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
100
hi0bits
eloqsql/strings/dtoa.c
static int hi0bits(register ULong x) { register int k= 0; if (!(x & 0xffff0000)) { k= 16; x<<= 16; } if (!(x & 0xff000000)) { k+= 8; x<<= 8; } if (!(x & 0xf0000000)) { k+= 4; x<<= 4; } if (!(x & 0xc0000000)) { k+= 2; x<<= 2; } if (!(x & 0x80000000)) { k++; if (!(x & 0x40000000)) return 32; } return k; }
O0
c
hi0bits: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0xffff0000, %eax # imm = 0xFFFF0000 cmpl $0x0, %eax jne 0x7bc3b movl $0x10, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x10, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xff000000, %eax # imm = 0xFF000000 cmpl $0x0, %eax jne 0x7bc5a movl -0xc(%rbp), %eax addl $0x8, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x8, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xf0000000, %eax # imm = 0xF0000000 cmpl $0x0, %eax jne 0x7bc79 movl -0xc(%rbp), %eax addl $0x4, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x4, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xc0000000, %eax # imm = 0xC0000000 cmpl $0x0, %eax jne 0x7bc98 movl -0xc(%rbp), %eax addl $0x2, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x2, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax jne 0x7bcc6 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0x40000000, %eax # imm = 0x40000000 cmpl $0x0, %eax jne 0x7bcc4 movl $0x20, -0x4(%rbp) jmp 0x7bccc jmp 0x7bcc6 movl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
hi0bits: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_C], 0 mov eax, [rbp+var_8] and eax, 0FFFF0000h cmp eax, 0 jnz short loc_7BC3B mov [rbp+var_C], 10h mov eax, [rbp+var_8] shl eax, 10h mov [rbp+var_8], eax loc_7BC3B: mov eax, [rbp+var_8] and eax, 0FF000000h cmp eax, 0 jnz short loc_7BC5A mov eax, [rbp+var_C] add eax, 8 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 8 mov [rbp+var_8], eax loc_7BC5A: mov eax, [rbp+var_8] and eax, 0F0000000h cmp eax, 0 jnz short loc_7BC79 mov eax, [rbp+var_C] add eax, 4 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 4 mov [rbp+var_8], eax loc_7BC79: mov eax, [rbp+var_8] and eax, 0C0000000h cmp eax, 0 jnz short loc_7BC98 mov eax, [rbp+var_C] add eax, 2 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 2 mov [rbp+var_8], eax loc_7BC98: mov eax, [rbp+var_8] and eax, 80000000h cmp eax, 0 jnz short loc_7BCC6 mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax mov eax, [rbp+var_8] and eax, 40000000h cmp eax, 0 jnz short loc_7BCC4 mov [rbp+var_4], 20h ; ' ' jmp short loc_7BCCC loc_7BCC4: jmp short $+2 loc_7BCC6: mov eax, [rbp+var_C] mov [rbp+var_4], eax loc_7BCCC: mov eax, [rbp+var_4] pop rbp retn
long long hi0bits(int a1) { unsigned int v2; // [rsp+0h] [rbp-Ch] int v3; // [rsp+4h] [rbp-8h] v3 = a1; v2 = 0; if ( (a1 & 0xFFFF0000) == 0 ) { v2 = 16; v3 = a1 << 16; } if ( (v3 & 0xFF000000) == 0 ) { v2 += 8; v3 <<= 8; } if ( (v3 & 0xF0000000) == 0 ) { v2 += 4; v3 *= 16; } if ( (v3 & 0xC0000000) == 0 ) { v2 += 2; v3 *= 4; } if ( v3 < 0 ) return v2; ++v2; if ( (v3 & 0x40000000) != 0 ) return v2; else return 32; }
hi0bits: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],0x0 MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xffff0000 CMP EAX,0x0 JNZ 0x0017bc3b MOV dword ptr [RBP + -0xc],0x10 MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x10 MOV dword ptr [RBP + -0x8],EAX LAB_0017bc3b: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xff000000 CMP EAX,0x0 JNZ 0x0017bc5a MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x8 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x8 MOV dword ptr [RBP + -0x8],EAX LAB_0017bc5a: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xf0000000 CMP EAX,0x0 JNZ 0x0017bc79 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x4 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x4 MOV dword ptr [RBP + -0x8],EAX LAB_0017bc79: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xc0000000 CMP EAX,0x0 JNZ 0x0017bc98 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x2 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x2 MOV dword ptr [RBP + -0x8],EAX LAB_0017bc98: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x80000000 CMP EAX,0x0 JNZ 0x0017bcc6 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x40000000 CMP EAX,0x0 JNZ 0x0017bcc4 MOV dword ptr [RBP + -0x4],0x20 JMP 0x0017bccc LAB_0017bcc4: JMP 0x0017bcc6 LAB_0017bcc6: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX LAB_0017bccc: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int hi0bits(uint param_1) { int local_14; uint local_10; int local_c; local_14 = 0; local_10 = param_1; if ((param_1 & 0xffff0000) == 0) { local_14 = 0x10; local_10 = param_1 << 0x10; } if ((local_10 & 0xff000000) == 0) { local_14 = local_14 + 8; local_10 = local_10 << 8; } if ((local_10 & 0xf0000000) == 0) { local_14 = local_14 + 4; local_10 = local_10 << 4; } if ((local_10 & 0xc0000000) == 0) { local_14 = local_14 + 2; local_10 = local_10 << 2; } if (((local_10 & 0x80000000) == 0) && (local_14 = local_14 + 1, (local_10 & 0x40000000) == 0)) { local_c = 0x20; } else { local_c = local_14; } return local_c; }
101
transid_store_packed
eloqsql/storage/maria/ma_key.c
uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid) { uchar *start; uint length; uchar buff[8]; DBUG_ASSERT(trid < (1LL << (MARIA_MAX_PACK_TRANSID_SIZE*8))); DBUG_ASSERT(trid >= info->s->state.create_trid); trid= (trid - info->s->state.create_trid) << 1; /* Mark that key contains transid */ to[-1]|= 1; if (trid < MARIA_MIN_TRANSID_PACK_OFFSET) { to[0]= (uchar) trid; return 1; } start= to; /* store things in low-byte-first-order in buff */ to= buff; do { *to++= (uchar) trid; trid= trid>>8; } while (trid); length= (uint) (to - buff); /* Store length prefix */ start[0]= (uchar) (length + MARIA_TRANSID_PACK_OFFSET); start++; /* Copy things in high-byte-first order to output buffer */ do { *start++= *--to; } while (to != buff); return length+1; }
O3
c
transid_store_packed: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq (%rdi), %rax subq 0xe0(%rax), %rdx addq %rdx, %rdx orb $0x1, -0x1(%rsi) cmpq $0xf3, %rdx jae 0x61cb0 movb %dl, (%rsi) movl $0x1, %eax jmp 0x61ce7 xorl %eax, %eax movq %rdx, %rcx movb %dl, -0x10(%rbp,%rax) shrq $0x8, %rcx incq %rax cmpq $0xff, %rdx movq %rcx, %rdx ja 0x61cb5 leal -0x7(%rax), %ecx movb %cl, (%rsi) incq %rsi movq %rax, %rcx movb -0x11(%rbp,%rcx), %dl movb %dl, (%rsi) incq %rsi decq %rcx jne 0x61cd7 incl %eax movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x61cfc addq $0x10, %rsp popq %rbp retq callq 0x2a280
transid_store_packed: push rbp mov rbp, rsp sub rsp, 10h mov rax, fs:28h mov [rbp+var_8], rax mov rax, [rdi] sub rdx, [rax+0E0h] add rdx, rdx or byte ptr [rsi-1], 1 cmp rdx, 0F3h jnb short loc_61CB0 mov [rsi], dl mov eax, 1 jmp short loc_61CE7 loc_61CB0: xor eax, eax mov rcx, rdx loc_61CB5: mov [rbp+rax+var_10], dl shr rcx, 8 inc rax cmp rdx, 0FFh mov rdx, rcx ja short loc_61CB5 lea ecx, [rax-7] mov [rsi], cl inc rsi mov rcx, rax loc_61CD7: mov dl, [rbp+rcx+var_11] mov [rsi], dl inc rsi dec rcx jnz short loc_61CD7 inc eax loc_61CE7: mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_61CFC add rsp, 10h pop rbp retn loc_61CFC: call ___stack_chk_fail
long long transid_store_packed(long long a1, _BYTE *a2, long long a3) { unsigned long long v3; // rdx long long v5; // rax unsigned long long v6; // rcx bool v7; // cc _BYTE *v8; // rsi long long v9; // rcx _BYTE v10[9]; // [rsp+1h] [rbp-11h] unsigned long long v11; // [rsp+Ah] [rbp-8h] v11 = __readfsqword(0x28u); v3 = 2 * (a3 - *(_QWORD *)(*(_QWORD *)a1 + 224LL)); *(a2 - 1) |= 1u; if ( v3 >= 0xF3 ) { v5 = 0LL; v6 = v3; do { v10[v5 + 1] = v3; v6 >>= 8; ++v5; v7 = v3 <= 0xFF; v3 = v6; } while ( !v7 ); *a2 = v5 - 7; v8 = a2 + 1; v9 = v5; do *v8++ = v10[v9--]; while ( v9 ); return (unsigned int)(v5 + 1); } else { *a2 = v3; return 1LL; } }
transid_store_packed: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RDI] SUB RDX,qword ptr [RAX + 0xe0] ADD RDX,RDX OR byte ptr [RSI + -0x1],0x1 CMP RDX,0xf3 JNC 0x00161cb0 MOV byte ptr [RSI],DL MOV EAX,0x1 JMP 0x00161ce7 LAB_00161cb0: XOR EAX,EAX MOV RCX,RDX LAB_00161cb5: MOV byte ptr [RBP + RAX*0x1 + -0x10],DL SHR RCX,0x8 INC RAX CMP RDX,0xff MOV RDX,RCX JA 0x00161cb5 LEA ECX,[RAX + -0x7] MOV byte ptr [RSI],CL INC RSI MOV RCX,RAX LAB_00161cd7: MOV DL,byte ptr [RBP + RCX*0x1 + -0x11] MOV byte ptr [RSI],DL INC RSI DEC RCX JNZ 0x00161cd7 INC EAX LAB_00161ce7: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x00161cfc ADD RSP,0x10 POP RBP RET LAB_00161cfc: CALL 0x0012a280
int transid_store_packed(long *param_1,char *param_2,long param_3) { bool bVar1; int iVar2; long lVar3; long lVar4; ulong uVar5; long in_FS_OFFSET; int8 uStack_20; char local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar5 = (param_3 - *(long *)(*param_1 + 0xe0)) * 2; param_2[-1] = param_2[-1] | 1; if (uVar5 < 0xf3) { *param_2 = (char)uVar5; iVar2 = 1; } else { lVar3 = 0; do { lVar4 = lVar3; local_18[lVar4] = (char)uVar5; lVar3 = lVar4 + 1; bVar1 = 0xff < uVar5; uVar5 = uVar5 >> 8; } while (bVar1); *param_2 = (char)lVar4 + -6; param_2 = param_2 + 1; lVar4 = lVar3; do { *param_2 = local_18[lVar4 + -1]; param_2 = param_2 + 1; lVar4 = lVar4 + -1; } while (lVar4 != 0); iVar2 = (int)lVar3 + 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return iVar2; } /* WARNING: Subroutine does not return */ uStack_20 = transid_get_packed; __stack_chk_fail(); }
102
ma_check_if_right_bitmap_type
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info, enum en_page_type page_type, pgcache_page_no_t page, uint *bitmap_pattern) { if ((*bitmap_pattern= _ma_bitmap_get_page_bits(info, &info->s->bitmap, page)) > 7) return 1; /* Couldn't read page */ switch (page_type) { case HEAD_PAGE: return *bitmap_pattern < 1 || *bitmap_pattern > 4; case TAIL_PAGE: return *bitmap_pattern < 5; case BLOB_PAGE: return *bitmap_pattern != 7; default: break; } DBUG_ASSERT(0); return 1; }
O0
c
ma_check_if_right_bitmap_type: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi addq $0xa10, %rsi # imm = 0xA10 movq -0x20(%rbp), %rdx callq 0x628e0 movq -0x28(%rbp), %rcx movl %eax, (%rcx) cmpl $0x7, %eax jbe 0x637a3 movb $0x1, -0x1(%rbp) jmp 0x6381e movl -0x14(%rbp), %eax movl %eax, -0x2c(%rbp) subl $0x1, %eax je 0x637c4 jmp 0x637b0 movl -0x2c(%rbp), %eax subl $0x2, %eax je 0x637ec jmp 0x637ba movl -0x2c(%rbp), %eax subl $0x3, %eax je 0x63800 jmp 0x63814 movq -0x28(%rbp), %rcx movb $0x1, %al cmpl $0x1, (%rcx) movb %al, -0x2d(%rbp) jb 0x637df movq -0x28(%rbp), %rax cmpl $0x4, (%rax) seta %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x6381e movq -0x28(%rbp), %rax cmpl $0x5, (%rax) setb %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x6381e movq -0x28(%rbp), %rax cmpl $0x7, (%rax) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x6381e jmp 0x63816 jmp 0x63818 jmp 0x6381a movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_check_if_right_bitmap_type: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] add rsi, 0A10h mov rdx, [rbp+var_20] call _ma_bitmap_get_page_bits mov rcx, [rbp+var_28] mov [rcx], eax cmp eax, 7 jbe short loc_637A3 mov [rbp+var_1], 1 jmp short loc_6381E loc_637A3: mov eax, [rbp+var_14] mov [rbp+var_2C], eax sub eax, 1 jz short loc_637C4 jmp short $+2 loc_637B0: mov eax, [rbp+var_2C] sub eax, 2 jz short loc_637EC jmp short $+2 loc_637BA: mov eax, [rbp+var_2C] sub eax, 3 jz short loc_63800 jmp short loc_63814 loc_637C4: mov rcx, [rbp+var_28] mov al, 1 cmp dword ptr [rcx], 1 mov [rbp+var_2D], al jb short loc_637DF mov rax, [rbp+var_28] cmp dword ptr [rax], 4 setnbe al mov [rbp+var_2D], al loc_637DF: mov al, [rbp+var_2D] and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_6381E loc_637EC: mov rax, [rbp+var_28] cmp dword ptr [rax], 5 setb al and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_6381E loc_63800: mov rax, [rbp+var_28] cmp dword ptr [rax], 7 setnz al and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_6381E loc_63814: jmp short $+2 loc_63816: jmp short $+2 loc_63818: jmp short $+2 loc_6381A: mov [rbp+var_1], 1 loc_6381E: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char ma_check_if_right_bitmap_type(_QWORD *a1, int a2, long long a3, unsigned int *a4) { unsigned int page_bits; // eax bool v6; // [rsp+3h] [rbp-2Dh] page_bits = ma_bitmap_get_page_bits((long long)a1, *a1 + 2576LL, a3); *a4 = page_bits; if ( page_bits > 7 ) return 1; if ( a2 == 1 ) { v6 = 1; if ( *a4 ) return *a4 > 4; return v6; } else if ( a2 == 2 ) { return *a4 < 5; } else { return a2 != 3 || *a4 != 7; } }
_ma_check_if_right_bitmap_type: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] ADD RSI,0xa10 MOV RDX,qword ptr [RBP + -0x20] CALL 0x001628e0 MOV RCX,qword ptr [RBP + -0x28] MOV dword ptr [RCX],EAX CMP EAX,0x7 JBE 0x001637a3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0016381e LAB_001637a3: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x2c],EAX SUB EAX,0x1 JZ 0x001637c4 JMP 0x001637b0 LAB_001637b0: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x2 JZ 0x001637ec JMP 0x001637ba LAB_001637ba: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x3 JZ 0x00163800 JMP 0x00163814 LAB_001637c4: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP dword ptr [RCX],0x1 MOV byte ptr [RBP + -0x2d],AL JC 0x001637df MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x4 SETA AL MOV byte ptr [RBP + -0x2d],AL LAB_001637df: MOV AL,byte ptr [RBP + -0x2d] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0016381e LAB_001637ec: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x5 SETC AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0016381e LAB_00163800: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x7 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0016381e LAB_00163814: JMP 0x00163816 LAB_00163816: JMP 0x00163818 LAB_00163818: JMP 0x0016381a LAB_0016381a: MOV byte ptr [RBP + -0x1],0x1 LAB_0016381e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool _ma_check_if_right_bitmap_type(long *param_1,int param_2,int8 param_3,uint *param_4) { uint uVar1; bool local_35; bool local_9; uVar1 = _ma_bitmap_get_page_bits(param_1,*param_1 + 0xa10,param_3); *param_4 = uVar1; if (uVar1 < 8) { if (param_2 == 1) { local_35 = true; if (*param_4 != 0) { local_35 = 4 < *param_4; } local_9 = local_35; } else if (param_2 == 2) { local_9 = *param_4 < 5; } else if (param_2 == 3) { local_9 = *param_4 != 7; } else { local_9 = true; } } else { local_9 = true; } return local_9; }
103
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) { std::string text; text.resize(std::max(text.capacity(), tokens.size())); int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special); if (n_chars < 0) { text.resize(-n_chars); n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special); GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization } text.resize(n_chars); // NOTE: the original tokenizer decodes bytes after collecting the pieces. return text; }
O3
cpp
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x8(%rdx), %rax subq (%rdx), %rax sarq $0x2, %rax cmpq $0x10, %rax movl $0xf, %esi cmovaeq %rax, %rsi xorl %edx, %edx callq 0x1a1d0 movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx shrq $0x2, %rdx movq (%rbx), %rcx movl 0x8(%rbx), %r8d movzbl %bpl, %ebp movl %ebp, (%rsp) movq %r14, %rdi xorl %r9d, %r9d callq 0x1a0d0 testl %eax, %eax jns 0x26c88 negl %eax movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx callq 0x1a1d0 movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx shrq $0x2, %rdx movq (%rbx), %rcx movl 0x8(%rbx), %r8d movl %ebp, (%rsp) movq %r14, %rdi xorl %r9d, %r9d callq 0x1a0d0 cmpl 0x8(%rbx), %eax jg 0x26ca5 movslq %eax, %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x1a1d0 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x86fc9(%rip), %rdi # 0xadc75 leaq 0x85c99(%rip), %rdx # 0xac94c leaq 0x8766e(%rip), %rcx # 0xae328 movl $0x6e2, %esi # imm = 0x6E2 xorl %eax, %eax callq 0x1ac70 jmp 0x26cc8 movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0x26cdf movq (%r12), %rsi incq %rsi callq 0x1a740 movq %r14, %rdi callq 0x1ad30
_Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov ebp, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rax, [rdx+8] sub rax, [rdx] sar rax, 2 cmp rax, 10h mov esi, 0Fh cmovnb rsi, rax xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi shr rdx, 2 mov rcx, [rbx] mov r8d, [rbx+8] movzx ebp, bpl mov [rsp+38h+var_38], ebp mov rdi, r14 xor r9d, r9d call _llama_detokenize test eax, eax jns short loc_26C88 neg eax mov rdi, rbx mov rsi, rax xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi shr rdx, 2 mov rcx, [rbx] mov r8d, [rbx+8] mov [rsp+38h+var_38], ebp mov rdi, r14 xor r9d, r9d call _llama_detokenize cmp eax, [rbx+8] jg short loc_26CA5 loc_26C88: movsxd rsi, eax mov rdi, rbx xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rax, rbx add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_26CA5: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()" mov esi, 6E2h xor eax, eax call _ggml_abort jmp short $+2 loc_26CC8: mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_26CDF mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_26CDF: mov rdi, r14 call __Unwind_Resume
_QWORD * common_detokenize[abi:cxx11](_QWORD *a1, long long a2, _QWORD *a3, long long a4) { unsigned __int8 v4; // bp _QWORD *v7; // r12 long long v8; // rsi int v9; // eax long long v10; // rcx long long v12; // r14 v4 = a4; v7 = a1 + 2; *a1 = a1 + 2; a1[1] = 0LL; *((_BYTE *)a1 + 16) = 0; v8 = 15LL; if ( (unsigned long long)((long long)(a3[1] - *a3) >> 2) >= 0x10 ) v8 = (long long)(a3[1] - *a3) >> 2; std::string::resize(a1, v8, 0LL, a4); v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v4); if ( v9 < 0 ) { std::string::resize(a1, (unsigned int)-v9, 0LL, v10); v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v4); if ( v9 > *((_DWORD *)a1 + 2) ) { v12 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 1762LL, "GGML_ASSERT(%s) failed", "n_chars <= (int32_t)text.size()"); if ( (_QWORD *)*a1 != v7 ) operator delete((void *)*a1, *v7 + 1LL); _Unwind_Resume(v12); } } std::string::resize(a1, v9, 0LL, v10); return a1; }
common_detokenize[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBP,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RDX + 0x8] SUB RAX,qword ptr [RDX] SAR RAX,0x2 CMP RAX,0x10 MOV ESI,0xf CMOVNC RSI,RAX LAB_00126c1f: XOR EDX,EDX CALL 0x0011a1d0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI SHR RDX,0x2 MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RBX + 0x8] LAB_00126c3b: MOVZX EBP,BPL MOV dword ptr [RSP],EBP MOV RDI,R14 XOR R9D,R9D CALL 0x0011a0d0 TEST EAX,EAX JNS 0x00126c88 NEG EAX MOV RDI,RBX MOV RSI,RAX XOR EDX,EDX CALL 0x0011a1d0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI SHR RDX,0x2 MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RBX + 0x8] MOV dword ptr [RSP],EBP MOV RDI,R14 XOR R9D,R9D CALL 0x0011a0d0 CMP EAX,dword ptr [RBX + 0x8] JG 0x00126ca5 LAB_00126c88: MOVSXD RSI,EAX MOV RDI,RBX XOR EDX,EDX CALL 0x0011a1d0 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00126ca5: LEA RDI,[0x1adc75] LEA RDX,[0x1ac94c] LEA RCX,[0x1ae328] MOV ESI,0x6e2 XOR EAX,EAX CALL 0x0011ac70
/* common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int> > const&, bool) */ llama_vocab * common_detokenize_abi_cxx11_(llama_vocab *param_1,vector *param_2,bool param_3) { int iVar1; ulong uVar2; int1 in_CL; int7 in_register_00000011; long *plVar3; ulong uVar4; plVar3 = (long *)CONCAT71(in_register_00000011,param_3); *(llama_vocab **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (llama_vocab)0x0; uVar2 = plVar3[1] - *plVar3 >> 2; uVar4 = 0xf; if (0xf < uVar2) { uVar4 = uVar2; } /* try { // try from 00126c1f to 00126c25 has its CatchHandler @ 00126cc6 */ std::__cxx11::string::resize((ulong)param_1,(char)uVar4); /* try { // try from 00126c3b to 00126cc5 has its CatchHandler @ 00126cc8 */ iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,*(int8 *)param_1, *(int4 *)(param_1 + 8),0,in_CL); if (iVar1 < 0) { std::__cxx11::string::resize((ulong)param_1,-(char)iVar1); iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2, *(int8 *)param_1,*(int4 *)(param_1 + 8),0,in_CL); if (*(int *)(param_1 + 8) < iVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6e2 ,"GGML_ASSERT(%s) failed","n_chars <= (int32_t)text.size()"); } } std::__cxx11::string::resize((ulong)param_1,(char)iVar1); return param_1; }
104
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/common.cpp
void common_batch_add( struct llama_batch & batch, llama_token id, llama_pos pos, const std::vector<llama_seq_id> & seq_ids, bool logits) { GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded"); batch.token [batch.n_tokens] = id; batch.pos [batch.n_tokens] = pos; batch.n_seq_id[batch.n_tokens] = seq_ids.size(); for (size_t i = 0; i < seq_ids.size(); ++i) { batch.seq_id[batch.n_tokens][i] = seq_ids[i]; } batch.logits [batch.n_tokens] = logits; batch.n_tokens++; }
O3
cpp
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool): pushq %rax movq 0x28(%rdi), %rax movslq (%rdi), %r9 cmpq $0x0, (%rax,%r9,8) je 0x74cd3 movq 0x8(%rdi), %r10 movl %esi, (%r10,%r9,4) movq 0x18(%rdi), %rsi movslq (%rdi), %r9 movl %edx, (%rsi,%r9,4) movq (%rcx), %rdx movq 0x8(%rcx), %rsi movq %rsi, %rcx subq %rdx, %rcx sarq $0x2, %rcx movq 0x20(%rdi), %r9 movslq (%rdi), %r10 movl %ecx, (%r9,%r10,4) cmpq %rdx, %rsi je 0x74cc4 cmpq $0x1, %rcx adcq $0x0, %rcx xorl %esi, %esi movl (%rdx,%rsi,4), %r9d movslq (%rdi), %r10 movq (%rax,%r10,8), %r10 movl %r9d, (%r10,%rsi,4) incq %rsi cmpq %rsi, %rcx jne 0x74cad movq 0x30(%rdi), %rax movslq (%rdi), %rcx movb %r8b, (%rax,%rcx) incl (%rdi) popq %rax retq leaq 0x78ea7(%rip), %rdi # 0xedb81 leaq 0x7615c(%rip), %rdx # 0xeae3d leaq 0x794dd(%rip), %rcx # 0xee1c5 movl $0x655, %esi # imm = 0x655 xorl %eax, %eax callq 0x1aeb0
_Z16common_batch_addR11llama_batchiiRKSt6vectorIiSaIiEEb: push rax mov rax, [rdi+28h] movsxd r9, dword ptr [rdi] cmp qword ptr [rax+r9*8], 0 jz short loc_74CD3 mov r10, [rdi+8] mov [r10+r9*4], esi mov rsi, [rdi+18h] movsxd r9, dword ptr [rdi] mov [rsi+r9*4], edx mov rdx, [rcx] mov rsi, [rcx+8] mov rcx, rsi sub rcx, rdx sar rcx, 2 mov r9, [rdi+20h] movsxd r10, dword ptr [rdi] mov [r9+r10*4], ecx cmp rsi, rdx jz short loc_74CC4 cmp rcx, 1 adc rcx, 0 xor esi, esi loc_74CAD: mov r9d, [rdx+rsi*4] movsxd r10, dword ptr [rdi] mov r10, [rax+r10*8] mov [r10+rsi*4], r9d inc rsi cmp rcx, rsi jnz short loc_74CAD loc_74CC4: mov rax, [rdi+30h] movsxd rcx, dword ptr [rdi] mov [rax+rcx], r8b inc dword ptr [rdi] pop rax retn loc_74CD3: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBatchSeqIdBatc; "batch.seq_id[batch.n_tokens] && \"llama"... mov esi, 655h xor eax, eax call _ggml_abort
long long common_batch_add(int *a1, int a2, int a3, long long *a4, char a5) { long long v5; // rax long long v6; // rax long long v7; // r9 long long v8; // rdx long long v9; // rsi long long v10; // rcx long long v11; // rcx long long v12; // rsi long long v14; // [rsp-8h] [rbp-8h] v14 = v5; v6 = *((_QWORD *)a1 + 5); v7 = *a1; if ( *(_QWORD *)(v6 + 8 * v7) ) { *(_DWORD *)(*((_QWORD *)a1 + 1) + 4 * v7) = a2; *(_DWORD *)(*((_QWORD *)a1 + 3) + 4LL * *a1) = a3; v8 = *a4; v9 = a4[1]; v10 = (v9 - *a4) >> 2; *(_DWORD *)(*((_QWORD *)a1 + 4) + 4LL * *a1) = v10; if ( v9 != v8 ) { v11 = (v10 == 0) + v10; v12 = 0LL; do { *(_DWORD *)(*(_QWORD *)(v6 + 8LL * *a1) + 4 * v12) = *(_DWORD *)(v8 + 4 * v12); ++v12; } while ( v11 != v12 ); } *(_BYTE *)(*((_QWORD *)a1 + 6) + (*a1)++) = a5; return v14; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 1621LL, "GGML_ASSERT(%s) failed", "batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\""); return common_lcp(); } }
common_batch_add: PUSH RAX MOV RAX,qword ptr [RDI + 0x28] MOVSXD R9,dword ptr [RDI] CMP qword ptr [RAX + R9*0x8],0x0 JZ 0x00174cd3 MOV R10,qword ptr [RDI + 0x8] MOV dword ptr [R10 + R9*0x4],ESI MOV RSI,qword ptr [RDI + 0x18] MOVSXD R9,dword ptr [RDI] MOV dword ptr [RSI + R9*0x4],EDX MOV RDX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x8] MOV RCX,RSI SUB RCX,RDX SAR RCX,0x2 MOV R9,qword ptr [RDI + 0x20] MOVSXD R10,dword ptr [RDI] MOV dword ptr [R9 + R10*0x4],ECX CMP RSI,RDX JZ 0x00174cc4 CMP RCX,0x1 ADC RCX,0x0 XOR ESI,ESI LAB_00174cad: MOV R9D,dword ptr [RDX + RSI*0x4] MOVSXD R10,dword ptr [RDI] MOV R10,qword ptr [RAX + R10*0x8] MOV dword ptr [R10 + RSI*0x4],R9D INC RSI CMP RCX,RSI JNZ 0x00174cad LAB_00174cc4: MOV RAX,qword ptr [RDI + 0x30] MOVSXD RCX,dword ptr [RDI] MOV byte ptr [RAX + RCX*0x1],R8B INC dword ptr [RDI] POP RAX RET LAB_00174cd3: LEA RDI,[0x1edb81] LEA RDX,[0x1eae3d] LEA RCX,[0x1ee1c5] MOV ESI,0x655 XOR EAX,EAX CALL 0x0011aeb0
/* common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int> > const&, bool) */ int8 common_batch_add(llama_batch *param_1,int param_2,int param_3,vector *param_4,bool param_5) { long lVar1; long lVar2; int8 in_RAX; long lVar3; long lVar4; lVar1 = *(long *)(param_1 + 0x28); if (*(long *)(lVar1 + (long)*(int *)param_1 * 8) != 0) { *(int *)(*(long *)(param_1 + 8) + (long)*(int *)param_1 * 4) = param_2; *(int *)(*(long *)(param_1 + 0x18) + (long)*(int *)param_1 * 4) = param_3; lVar2 = *(long *)param_4; lVar4 = *(long *)(param_4 + 8); lVar3 = lVar4 - lVar2 >> 2; *(int *)(*(long *)(param_1 + 0x20) + (long)*(int *)param_1 * 4) = (int)lVar3; if (lVar4 != lVar2) { lVar4 = 0; do { *(int4 *)(*(long *)(lVar1 + (long)*(int *)param_1 * 8) + lVar4 * 4) = *(int4 *)(lVar2 + lVar4 * 4); lVar4 = lVar4 + 1; } while (lVar3 + (ulong)(lVar3 == 0) != lVar4); } *(bool *)(*(long *)(param_1 + 0x30) + (long)*(int *)param_1) = param_5; *(int *)param_1 = *(int *)param_1 + 1; return in_RAX; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x655, "GGML_ASSERT(%s) failed", "batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\""); }
105
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++()
monkey531[P]llama/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++(): movq (%rdi), %rax testq %rax, %rax je 0x4f515 movzbl (%rax), %eax cmpl $0x2, %eax je 0x4f506 cmpl $0x1, %eax jne 0x4f50d addq $0x30, 0x8(%rdi) jmp 0x4f511 addq $0x10, 0x10(%rdi) jmp 0x4f511 incq 0x18(%rdi) movq %rdi, %rax retq pushq %rax leaq 0x62fd5(%rip), %rdi # 0xb24f2 leaq 0x60448(%rip), %rdx # 0xaf96c leaq 0x6571e(%rip), %rcx # 0xb4c49 movl $0x33c0, %esi # imm = 0x33C0 xorl %eax, %eax callq 0x1ac70 nop
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: mov rax, [rdi] test rax, rax jz short loc_4F515 movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_4F506 cmp eax, 1 jnz short loc_4F50D add qword ptr [rdi+8], 30h ; '0' jmp short loc_4F511 loc_4F506: add qword ptr [rdi+10h], 10h jmp short loc_4F511 loc_4F50D: inc qword ptr [rdi+18h] loc_4F511: mov rax, rdi retn loc_4F515: push rax lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 33C0h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 2 ) { a1[2] += 16; } else if ( v1 == 1 ) { a1[1] += 48; } else { ++a1[3]; } return (long long)a1; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::set_begin("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
operator++: MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0014f515 MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0014f506 CMP EAX,0x1 JNZ 0x0014f50d ADD qword ptr [RDI + 0x8],0x30 JMP 0x0014f511 LAB_0014f506: ADD qword ptr [RDI + 0x10],0x10 JMP 0x0014f511 LAB_0014f50d: INC qword ptr [RDI + 0x18] LAB_0014f511: MOV RAX,RDI RET LAB_0014f515: PUSH RAX LEA RDI,[0x1b24f2] LEA RDX,[0x1af96c] LEA RCX,[0x1b4c49] MOV ESI,0x33c0 XOR EAX,EAX CALL 0x0011ac70
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() */ iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { char cVar1; int8 in_R8; int8 in_R9; if (*(char **)this != (char *)0x0) { cVar1 = **(char **)this; if (cVar1 == '\x02') { *(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10; } else if (cVar1 == '\x01') { *(long *)(this + 8) = *(long *)(this + 8) + 0x30; } else { *(long *)(this + 0x18) = *(long *)(this + 0x18) + 1; } return this; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0, "GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0); }
106
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++()
monkey531[P]llama/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++(): movq (%rdi), %rax testq %rax, %rax je 0x4eb57 movzbl (%rax), %eax cmpl $0x2, %eax je 0x4eb48 cmpl $0x1, %eax jne 0x4eb4f addq $0x30, 0x8(%rdi) jmp 0x4eb53 addq $0x10, 0x10(%rdi) jmp 0x4eb53 incq 0x18(%rdi) movq %rdi, %rax retq pushq %rax leaq 0x45953(%rip), %rdi # 0x944b2 leaq 0x42e09(%rip), %rdx # 0x9196f leaq 0x480ab(%rip), %rcx # 0x96c18 movl $0x33c0, %esi # imm = 0x33C0 xorl %eax, %eax callq 0x22c90
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: mov rax, [rdi] test rax, rax jz short loc_4EB57 movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_4EB48 cmp eax, 1 jnz short loc_4EB4F add qword ptr [rdi+8], 30h ; '0' jmp short loc_4EB53 loc_4EB48: add qword ptr [rdi+10h], 10h jmp short loc_4EB53 loc_4EB4F: inc qword ptr [rdi+18h] loc_4EB53: mov rax, rdi retn loc_4EB57: push rax lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 33C0h xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 2 ) { a1[2] += 16; } else if ( v1 == 1 ) { a1[1] += 48; } else { ++a1[3]; } return (long long)a1; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); return std::make_shared<std::vector<minja::Value>>( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13248LL); } }
operator++: MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0014eb57 MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0014eb48 CMP EAX,0x1 JNZ 0x0014eb4f ADD qword ptr [RDI + 0x8],0x30 JMP 0x0014eb53 LAB_0014eb48: ADD qword ptr [RDI + 0x10],0x10 JMP 0x0014eb53 LAB_0014eb4f: INC qword ptr [RDI + 0x18] LAB_0014eb53: MOV RAX,RDI RET LAB_0014eb57: PUSH RAX LEA RDI,[0x1944b2] LEA RDX,[0x19196f] LEA RCX,[0x196c18] MOV ESI,0x33c0 XOR EAX,EAX CALL 0x00122c90
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */ iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *this) { char cVar1; int8 in_R8; int8 in_R9; if (*(char **)this != (char *)0x0) { cVar1 = **(char **)this; if (cVar1 == '\x02') { *(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10; } else if (cVar1 == '\x01') { *(long *)(this + 8) = *(long *)(this + 8) + 0x30; } else { *(long *)(this + 0x18) = *(long *)(this + 0x18) + 1; } return this; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0, "GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0); }
107
mi_find_writepos
eloqsql/storage/myisam/mi_dynrec.c
static int _mi_find_writepos(MI_INFO *info, ulong reclength, /* record length */ my_off_t *filepos, /* Return file pos */ ulong *length) /* length of block at filepos */ { MI_BLOCK_INFO block_info; ulong tmp; DBUG_ENTER("_mi_find_writepos"); if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { /* Deleted blocks exists; Get last used block */ *filepos=info->s->state.dellink; block_info.second_read=0; info->rec_cache.seek_not_done=1; if (!(_mi_get_block_info(&block_info,info->dfile,info->s->state.dellink) & BLOCK_DELETED)) { DBUG_PRINT("error",("Delete link crashed")); my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(-1); } info->s->state.dellink=block_info.next_filepos; info->state->del--; info->state->empty-= block_info.block_len; *length= block_info.block_len; } else { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) & (~ (ulong) (MI_DYN_ALIGN_SIZE-1))); if (info->state->data_file_length > (info->s->base.max_data_file_length - tmp)) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(-1); } if (tmp > MI_MAX_BLOCK_LENGTH) tmp=MI_MAX_BLOCK_LENGTH; *length= tmp; info->state->data_file_length+= tmp; info->s->state.split++; info->update|=HA_STATE_WRITE_AT_END; } DBUG_RETURN(0); }
O0
c
mi_find_writepos: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movq %rcx, -0x88(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax cmpq $-0x1, 0x58(%rax) je 0xac963 movq -0x70(%rbp), %rax cmpb $0x0, 0x33a(%rax) jne 0xac963 movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x58(%rax), %rcx movq -0x80(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x10(%rbp) movq -0x70(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x70(%rbp), %rax movl 0x1c0(%rax), %esi movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x58(%rax), %rdx leaq -0x60(%rbp), %rdi callq 0xa9a50 andl $0x4, %eax cmpl $0x0, %eax jne 0xac916 jmp 0xac8fd jmp 0xac8ff callq 0xf6080 movl $0x7f, (%rax) movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0xaca8d movq -0x20(%rbp), %rcx movq -0x70(%rbp), %rax movq (%rax), %rax movq %rcx, 0x58(%rax) movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdx movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x38(%rbp), %rcx movq -0x88(%rbp), %rax movq %rcx, (%rax) jmp 0xaca84 movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x28(%rax), %rcx movq -0x80(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax addq $0x3, %rax movq -0x78(%rbp), %rsi xorl %ecx, %ecx movl $0x1, %edx cmpq $0xffed, %rsi # imm = 0xFFED cmovael %edx, %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x70(%rbp), %rcx movq (%rcx), %rcx cmpq 0x160(%rcx), %rax jae 0xac9c7 movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x160(%rax), %rax movq %rax, -0x90(%rbp) jmp 0xac9e1 movq -0x90(%rbp), %rax addq $0x4, %rax subq $0x1, %rax andq $-0x4, %rax movq %rax, -0x90(%rbp) movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x28(%rax), %rax movq -0x70(%rbp), %rcx movq (%rcx), %rcx movq 0x110(%rcx), %rcx subq -0x90(%rbp), %rcx cmpq %rcx, %rax jbe 0xaca1b callq 0xf6080 movl $0x87, (%rax) movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0xaca8d cmpq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC jbe 0xaca33 movq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC movq -0x90(%rbp), %rcx movq -0x88(%rbp), %rax movq %rcx, (%rax) movq -0x90(%rbp), %rcx movq -0x70(%rbp), %rax movq 0x8(%rax), %rax addq 0x28(%rax), %rcx movq %rcx, 0x28(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x50(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x50(%rax) movq -0x70(%rbp), %rax movl 0x1d0(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0x1d0(%rax) jmp 0xaca86 movl $0x0, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x94(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xacab7 movl -0x94(%rbp), %eax addq $0xa0, %rsp popq %rbp retq callq 0x2a250 nopl (%rax)
_mi_find_writepos: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_88], rcx mov rax, [rbp+var_70] mov rax, [rax] cmp qword ptr [rax+58h], 0FFFFFFFFFFFFFFFFh jz loc_AC963 mov rax, [rbp+var_70] cmp byte ptr [rax+33Ah], 0 jnz loc_AC963 mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+58h] mov rax, [rbp+var_80] mov [rax], rcx mov [rbp+var_10], 0 mov rax, [rbp+var_70] mov dword ptr [rax+300h], 1 mov rax, [rbp+var_70] mov esi, [rax+1C0h] mov rax, [rbp+var_70] mov rax, [rax] mov rdx, [rax+58h] lea rdi, [rbp+var_60] call _mi_get_block_info and eax, 4 cmp eax, 0 jnz short loc_AC916 jmp short $+2 loc_AC8FD: jmp short $+2 loc_AC8FF: call _my_thread_var mov dword ptr [rax], 7Fh mov [rbp+var_64], 0FFFFFFFFh jmp loc_ACA8D loc_AC916: mov rcx, [rbp+var_20] mov rax, [rbp+var_70] mov rax, [rax] mov [rax+58h], rcx mov rax, [rbp+var_70] mov rax, [rax+8] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+8], rcx mov rdx, [rbp+var_38] mov rax, [rbp+var_70] mov rax, [rax+8] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_88] mov [rax], rcx jmp loc_ACA84 loc_AC963: mov rax, [rbp+var_70] mov rax, [rax+8] mov rcx, [rax+28h] mov rax, [rbp+var_80] mov [rax], rcx mov rax, [rbp+var_78] add rax, 3 mov rsi, [rbp+var_78] xor ecx, ecx mov edx, 1 cmp rsi, 0FFEDh cmovnb ecx, edx movsxd rcx, ecx add rax, rcx mov [rbp+var_90], rax mov rcx, [rbp+var_70] mov rcx, [rcx] cmp rax, [rcx+160h] jnb short loc_AC9C7 mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+160h] mov [rbp+var_90], rax jmp short loc_AC9E1 loc_AC9C7: mov rax, [rbp+var_90] add rax, 4 sub rax, 1 and rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_90], rax loc_AC9E1: mov rax, [rbp+var_70] mov rax, [rax+8] mov rax, [rax+28h] mov rcx, [rbp+var_70] mov rcx, [rcx] mov rcx, [rcx+110h] sub rcx, [rbp+var_90] cmp rax, rcx jbe short loc_ACA1B call _my_thread_var mov dword ptr [rax], 87h mov [rbp+var_64], 0FFFFFFFFh jmp short loc_ACA8D loc_ACA1B: cmp [rbp+var_90], 0FFFFFCh jbe short loc_ACA33 mov [rbp+var_90], 0FFFFFCh loc_ACA33: mov rcx, [rbp+var_90] mov rax, [rbp+var_88] mov [rax], rcx mov rcx, [rbp+var_90] mov rax, [rbp+var_70] mov rax, [rax+8] add rcx, [rax+28h] mov [rax+28h], rcx mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+50h] add rcx, 1 mov [rax+50h], rcx mov rax, [rbp+var_70] mov ecx, [rax+1D0h] or ecx, 100h mov [rax+1D0h], ecx loc_ACA84: jmp short $+2 loc_ACA86: mov [rbp+var_64], 0 loc_ACA8D: mov eax, [rbp+var_64] mov [rbp+var_94], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_ACAB7 mov eax, [rbp+var_94] add rsp, 0A0h pop rbp retn loc_ACAB7: call ___stack_chk_fail
long long mi_find_writepos(_QWORD *a1, const char *a2, _QWORD *a3, unsigned long long *a4) { const char *v4; // rsi unsigned long long v6; // [rsp+10h] [rbp-90h] unsigned long long v7; // [rsp+10h] [rbp-90h] char v10[40]; // [rsp+40h] [rbp-60h] BYREF unsigned long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+80h] [rbp-20h] int v13; // [rsp+90h] [rbp-10h] unsigned long long v14; // [rsp+98h] [rbp-8h] v14 = __readfsqword(0x28u); if ( *(_QWORD *)(*a1 + 88LL) == -1LL || *((_BYTE *)a1 + 826) ) { *a3 = *(_QWORD *)(a1[1] + 40LL); v6 = (unsigned long long)&a2[((unsigned long long)a2 >= 0xFFED) + 3]; if ( v6 >= *(_QWORD *)(*a1 + 352LL) ) v7 = (v6 + 3) & 0xFFFFFFFFFFFFFFFCLL; else v7 = *(_QWORD *)(*a1 + 352LL); if ( *(_QWORD *)(a1[1] + 40LL) > *(_QWORD *)(*a1 + 272LL) - v7 ) { *(_DWORD *)my_thread_var(a1, a2) = 135; return (unsigned int)-1; } if ( v7 > 0xFFFFFC ) v7 = 16777212LL; *a4 = v7; *(_QWORD *)(a1[1] + 40LL) += v7; ++*(_QWORD *)(*a1 + 80LL); *((_DWORD *)a1 + 116) |= 0x100u; return 0; } *a3 = *(_QWORD *)(*a1 + 88LL); v13 = 0; *((_DWORD *)a1 + 192) = 1; v4 = (const char *)*((unsigned int *)a1 + 112); if ( (mi_get_block_info(v10, v4, *(_QWORD *)(*a1 + 88LL)) & 4) != 0 ) { *(_QWORD *)(*a1 + 88LL) = v12; --*(_QWORD *)(a1[1] + 8LL); *(_QWORD *)(a1[1] + 16LL) -= v11; *a4 = v11; return 0; } *(_DWORD *)my_thread_var(v10, v4) = 127; return (unsigned int)-1; }
_mi_find_writepos: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV qword ptr [RBP + -0x88],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x58],-0x1 JZ 0x001ac963 MOV RAX,qword ptr [RBP + -0x70] CMP byte ptr [RAX + 0x33a],0x0 JNZ 0x001ac963 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x300],0x1 MOV RAX,qword ptr [RBP + -0x70] MOV ESI,dword ptr [RAX + 0x1c0] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x58] LEA RDI,[RBP + -0x60] CALL 0x001a9a50 AND EAX,0x4 CMP EAX,0x0 JNZ 0x001ac916 JMP 0x001ac8fd LAB_001ac8fd: JMP 0x001ac8ff LAB_001ac8ff: CALL 0x001f6080 MOV dword ptr [RAX],0x7f MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x001aca8d LAB_001ac916: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x1 MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RAX],RCX JMP 0x001aca84 LAB_001ac963: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x3 MOV RSI,qword ptr [RBP + -0x78] XOR ECX,ECX MOV EDX,0x1 CMP RSI,0xffed CMOVNC ECX,EDX MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x160] JNC 0x001ac9c7 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x160] MOV qword ptr [RBP + -0x90],RAX JMP 0x001ac9e1 LAB_001ac9c7: MOV RAX,qword ptr [RBP + -0x90] ADD RAX,0x4 SUB RAX,0x1 AND RAX,-0x4 MOV qword ptr [RBP + -0x90],RAX LAB_001ac9e1: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x110] SUB RCX,qword ptr [RBP + -0x90] CMP RAX,RCX JBE 0x001aca1b CALL 0x001f6080 MOV dword ptr [RAX],0x87 MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x001aca8d LAB_001aca1b: CMP qword ptr [RBP + -0x90],0xfffffc JBE 0x001aca33 MOV qword ptr [RBP + -0x90],0xfffffc LAB_001aca33: MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] ADD RCX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x50] ADD RCX,0x1 MOV qword ptr [RAX + 0x50],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x1d0] OR ECX,0x100 MOV dword ptr [RAX + 0x1d0],ECX LAB_001aca84: JMP 0x001aca86 LAB_001aca86: MOV dword ptr [RBP + -0x64],0x0 LAB_001aca8d: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001acab7 MOV EAX,dword ptr [RBP + -0x94] ADD RSP,0xa0 POP RBP RET LAB_001acab7: CALL 0x0012a250
int4 _mi_find_writepos(long *param_1,ulong param_2,int8 *param_3,ulong *param_4) { uint uVar1; int4 *puVar2; ulong uVar3; long in_FS_OFFSET; ulong local_98; int4 local_6c; int1 local_68 [40]; ulong local_40; int8 local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) { *param_3 = *(int8 *)(param_1[1] + 0x28); uVar3 = param_2 + 3 + (long)(int)(uint)(0xffec < param_2); if (uVar3 < *(ulong *)(*param_1 + 0x160)) { local_98 = *(ulong *)(*param_1 + 0x160); } else { local_98 = uVar3 + 3 & 0xfffffffffffffffc; } if (*(long *)(*param_1 + 0x110) - local_98 < *(ulong *)(param_1[1] + 0x28)) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; local_6c = 0xffffffff; goto LAB_001aca8d; } if (0xfffffc < local_98) { local_98 = 0xfffffc; } *param_4 = local_98; *(ulong *)(param_1[1] + 0x28) = local_98 + *(long *)(param_1[1] + 0x28); *(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1; *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 0x100; } else { *param_3 = *(int8 *)(*param_1 + 0x58); local_18 = 0; *(int4 *)(param_1 + 0x60) = 1; uVar1 = _mi_get_block_info(local_68,(int)param_1[0x38],*(int8 *)(*param_1 + 0x58)); if ((uVar1 & 4) == 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7f; local_6c = 0xffffffff; goto LAB_001aca8d; } *(int8 *)(*param_1 + 0x58) = local_28; *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1; *(ulong *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - local_40; *param_4 = local_40; } local_6c = 0; LAB_001aca8d: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_6c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
108
my_mb_wc_big5
eloqsql/strings/ctype-big5.c
static int my_mb_wc_big5(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) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O0
c
my_mb_wc_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 0x449be movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x44a97 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x449e6 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x44a97 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x44a00 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x44a97 movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x44a5a movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xf9, %eax jg 0x44a5a movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x40, %eax cmpl %ecx, %eax jg 0x44a3a movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7e, %eax jle 0x44a63 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x44a5a movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0x44a63 movl $0x0, -0x4(%rbp) jmp 0x44a97 movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi callq 0x44dd0 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x44a90 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x44a97 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
my_mb_wc_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_449BE mov [rbp+var_4], 0FFFFFF9Bh jmp loc_44A97 loc_449BE: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_449E6 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_44A97 loc_449E6: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_44A00 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_44A97 loc_44A00: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 0A1h cmp eax, ecx jg short loc_44A5A mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0F9h jg short loc_44A5A mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 40h ; '@' cmp eax, ecx jg short loc_44A3A mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jle short loc_44A63 loc_44A3A: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 0A1h cmp eax, ecx jg short loc_44A5A mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_44A63 loc_44A5A: mov [rbp+var_4], 0 jmp short loc_44A97 loc_44A63: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax call func_big5_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_44A90 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_44A97 loc_44A90: mov [rbp+var_4], 2 loc_44A97: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_big5(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { int v4; // eax unsigned int v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v6 = *a3; if ( v6 >= 0x80 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (unsigned __int8)v6 < 0xA1u || (unsigned __int8)v6 > 0xF9u || (a3[1] < 0x40u || a3[1] > 0x7Eu) && (a3[1] < 0xA1u || a3[1] == 255) ) { return 0; } else { v4 = func_big5_uni_onechar(a3[1] + (v6 << 8)); *a2 = v4; if ( v4 ) return 2; else return (unsigned int)-2; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_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 0x001449be MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00144a97 LAB_001449be: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x001449e6 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00144a97 LAB_001449e6: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00144a00 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00144a97 LAB_00144a00: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0xa1 CMP EAX,ECX JG 0x00144a5a MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xf9 JG 0x00144a5a MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x40 CMP EAX,ECX JG 0x00144a3a MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JLE 0x00144a63 LAB_00144a3a: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0xa1 CMP EAX,ECX JG 0x00144a5a MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x00144a63 LAB_00144a5a: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00144a97 LAB_00144a63: MOV EDI,dword ptr [RBP + -0x2c] SHL EDI,0x8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EDI,EAX CALL 0x00144dd0 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x00144a90 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x00144a97 LAB_00144a90: MOV dword ptr [RBP + -0x4],0x2 LAB_00144a97: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_big5(int8 param_1,long *param_2,byte *param_3,byte *param_4) { uint uVar1; int iVar2; int4 local_c; if (param_3 < param_4) { uVar1 = (uint)*param_3; if (uVar1 < 0x80) { *param_2 = (long)(int)uVar1; local_c = 1; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if (((uVar1 < 0xa1) || (0xf9 < uVar1)) || (((param_3[1] < 0x40 || (0x7e < param_3[1])) && ((param_3[1] < 0xa1 || (param_3[1] == 0xff)))))) { local_c = 0; } else { iVar2 = func_big5_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]); *param_2 = (long)iVar2; if ((long)iVar2 == 0) { local_c = 0xfffffffe; } else { local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
109
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O0
c
get_internal_charset: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2d0(%rbp) movl %esi, -0x2d4(%rbp) movq %rdx, -0x2e0(%rbp) jmp 0x3b86e movl -0x2d4(%rbp), %eax movl %eax, %ecx leaq 0x3765d3(%rip), %rax # 0x3b1e50 movq (%rax,%rcx,8), %rax movq %rax, -0x2e8(%rbp) cmpq $0x0, %rax je 0x3ba77 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax je 0x3b8c4 movl -0x2d4(%rbp), %edi callq 0x3d1d0 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) jmp 0x3ba85 leaq 0x37643d(%rip), %rdi # 0x3b1d08 leaq 0x54799(%rip), %rsi # 0x9006b movl $0x36b, %edx # imm = 0x36B callq 0x3d200 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x9, %eax cmpl $0x0, %eax jne 0x3b940 leaq -0x210(%rbp), %rdi callq 0x3aeb0 movq %rax, %rdi movq -0x2e8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x5473f(%rip), %rdx # 0x9004e xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x8bce0 leaq -0x2c0(%rbp), %rdi callq 0x3a810 leaq -0x210(%rbp), %rsi movq -0x2e0(%rbp), %rdx leaq -0x2c0(%rbp), %rdi callq 0x3cd50 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax je 0x3ba60 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0x3ba53 movq -0x2e8(%rbp), %rdi callq 0x3cc70 cmpb $0x0, %al jne 0x3b9b2 movq -0x2e8(%rbp), %rdi callq 0x3d270 movq %rax, -0x2f0(%rbp) cmpq $0x0, -0x2f0(%rbp) je 0x3b9b0 movq -0x2e8(%rbp), %rdi movq -0x2f0(%rbp), %rsi callq 0x3d2b0 jmp 0x3b9b2 movq -0x2e8(%rbp), %rdi callq 0x3ccd0 cmpb $0x0, %al jne 0x3b9fb movq -0x2e8(%rbp), %rdi movq -0x2e0(%rbp), %rsi callq 0x3d330 movq %rax, -0x2f8(%rbp) cmpq $0x0, -0x2f8(%rbp) je 0x3b9f9 movq -0x2e8(%rbp), %rdi movq -0x2f8(%rbp), %rsi callq 0x3d440 jmp 0x3b9fb movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x3d480 movsbl %al, %eax cmpl $0x0, %eax jne 0x3ba31 movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x3d4d0 movsbl %al, %eax cmpl $0x0, %eax je 0x3ba3e movq $0x0, -0x2e8(%rbp) jmp 0x3ba51 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0xc(%rax) jmp 0x3ba53 movl -0x2d4(%rbp), %edi callq 0x3d1d0 jmp 0x3ba6b movq $0x0, -0x2e8(%rbp) leaq 0x376296(%rip), %rdi # 0x3b1d08 callq 0x3d520 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) movq -0x2c8(%rbp), %rax movq %rax, -0x300(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3bab5 movq -0x300(%rbp), %rax addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x25410 nopw (%rax,%rax)
get_internal_charset: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2D0], rdi mov [rbp+var_2D4], esi mov [rbp+var_2E0], rdx jmp short $+2 loc_3B86E: mov eax, [rbp+var_2D4] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_2E8], rax cmp rax, 0 jz loc_3BA77 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jz short loc_3B8C4 mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax jmp loc_3BA85 loc_3B8C4: lea rdi, THR_LOCK_charset lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 36Bh call inline_mysql_mutex_lock_0 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 9 cmp eax, 0 jnz short loc_3B940 lea rdi, [rbp+var_210] call get_charsets_dir mov rdi, rax mov rax, [rbp+var_2E8] mov rsi, [rax+10h] lea rdx, aIndexXml+5; ".xml" xor eax, eax mov ecx, eax mov al, 0 call strxmov lea rdi, [rbp+var_2C0] call my_charset_loader_init_mysys lea rsi, [rbp+var_210] mov rdx, [rbp+var_2E0] lea rdi, [rbp+var_2C0] call my_read_charset_file loc_3B940: mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 200h cmp eax, 0 jz loc_3BA60 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jnz loc_3BA53 mov rdi, [rbp+var_2E8] call simple_8bit_charset_data_is_full cmp al, 0 jnz short loc_3B9B2 mov rdi, [rbp+var_2E8] call find_charset_data_inheritance_source mov [rbp+var_2F0], rax cmp [rbp+var_2F0], 0 jz short loc_3B9B0 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F0] call inherit_charset_data loc_3B9B0: jmp short $+2 loc_3B9B2: mov rdi, [rbp+var_2E8] call simple_8bit_collation_data_is_full cmp al, 0 jnz short loc_3B9FB mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2E0] call find_collation_data_inheritance_source mov [rbp+var_2F8], rax cmp [rbp+var_2F8], 0 jz short loc_3B9F9 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F8] call inherit_collation_data loc_3B9F9: jmp short $+2 loc_3B9FB: mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_charset movsx eax, al cmp eax, 0 jnz short loc_3BA31 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_collation movsx eax, al cmp eax, 0 jz short loc_3BA3E loc_3BA31: mov [rbp+var_2E8], 0 jmp short loc_3BA51 loc_3BA3E: mov rax, [rbp+var_2E8] mov ecx, [rax+0Ch] or ecx, 100h mov [rax+0Ch], ecx loc_3BA51: jmp short $+2 loc_3BA53: mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count jmp short loc_3BA6B loc_3BA60: mov [rbp+var_2E8], 0 loc_3BA6B: lea rdi, THR_LOCK_charset call inline_mysql_mutex_unlock_0 loc_3BA77: mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax loc_3BA85: mov rax, [rbp+var_2C8] mov [rbp+var_300], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3BAB5 mov rax, [rbp+var_300] add rsp, 300h pop rbp retn loc_3BAB5: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { int charsets_dir; // eax int v4; // r8d int v5; // r9d long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h] long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h] long long v9; // [rsp+18h] [rbp-2E8h] _BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF _BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2F8h] [rbp-8h] v14 = __readfsqword(0x28u); v9 = all_charsets[a2]; if ( !v9 ) return v9; if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { inline_mysql_mutex_lock_0(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL); if ( (*(_DWORD *)(v9 + 12) & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v13); strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5); my_charset_loader_init_mysys((long long)v12); my_read_charset_file(v12, v13, a3); } if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 ) { if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) ) { charset_data_inheritance_source = find_charset_data_inheritance_source(v9); if ( charset_data_inheritance_source ) inherit_charset_data(v9, charset_data_inheritance_source); } if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) ) { collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3); if ( collation_data_inheritance_source ) inherit_collation_data(v9, collation_data_inheritance_source); } if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) ) v9 = 0LL; else *(_DWORD *)(v9 + 12) |= 0x100u; } my_collation_statistics_inc_use_count(a2); } else { v9 = 0LL; } inline_mysql_mutex_unlock_0(&THR_LOCK_charset); return v9; } my_collation_statistics_inc_use_count(a2); return v9; }
get_internal_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2d0],RDI MOV dword ptr [RBP + -0x2d4],ESI MOV qword ptr [RBP + -0x2e0],RDX JMP 0x0013b86e LAB_0013b86e: MOV EAX,dword ptr [RBP + -0x2d4] MOV ECX,EAX LEA RAX,[0x4b1e50] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x2e8],RAX CMP RAX,0x0 JZ 0x0013ba77 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JZ 0x0013b8c4 MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x0013d1d0 MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX JMP 0x0013ba85 LAB_0013b8c4: LEA RDI,[0x4b1d08] LEA RSI,[0x19006b] MOV EDX,0x36b CALL 0x0013d200 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x9 CMP EAX,0x0 JNZ 0x0013b940 LEA RDI,[RBP + -0x210] CALL 0x0013aeb0 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0x19004e] XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x0018bce0 LEA RDI,[RBP + -0x2c0] CALL 0x0013a810 LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x2e0] LEA RDI,[RBP + -0x2c0] CALL 0x0013cd50 LAB_0013b940: MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x200 CMP EAX,0x0 JZ 0x0013ba60 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JNZ 0x0013ba53 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x0013cc70 CMP AL,0x0 JNZ 0x0013b9b2 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x0013d270 MOV qword ptr [RBP + -0x2f0],RAX CMP qword ptr [RBP + -0x2f0],0x0 JZ 0x0013b9b0 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f0] CALL 0x0013d2b0 LAB_0013b9b0: JMP 0x0013b9b2 LAB_0013b9b2: MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x0013ccd0 CMP AL,0x0 JNZ 0x0013b9fb MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2e0] CALL 0x0013d330 MOV qword ptr [RBP + -0x2f8],RAX CMP qword ptr [RBP + -0x2f8],0x0 JZ 0x0013b9f9 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f8] CALL 0x0013d440 LAB_0013b9f9: JMP 0x0013b9fb LAB_0013b9fb: MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x0013d480 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x0013ba31 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x0013d4d0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0013ba3e LAB_0013ba31: MOV qword ptr [RBP + -0x2e8],0x0 JMP 0x0013ba51 LAB_0013ba3e: MOV RAX,qword ptr [RBP + -0x2e8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x100 MOV dword ptr [RAX + 0xc],ECX LAB_0013ba51: JMP 0x0013ba53 LAB_0013ba53: MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x0013d1d0 JMP 0x0013ba6b LAB_0013ba60: MOV qword ptr [RBP + -0x2e8],0x0 LAB_0013ba6b: LEA RDI,[0x4b1d08] CALL 0x0013d520 LAB_0013ba77: MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX LAB_0013ba85: MOV RAX,qword ptr [RBP + -0x2c8] MOV qword ptr [RBP + -0x300],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013bab5 MOV RAX,qword ptr [RBP + -0x300] ADD RSP,0x300 POP RBP RET LAB_0013bab5: CALL 0x00125410
long get_internal_charset(int8 param_1,uint param_2,int8 param_3) { char cVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; long local_2f0; int1 local_2c8 [176]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2f0 = (&all_charsets)[param_2]; if (local_2f0 != 0) { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { inline_mysql_mutex_lock (THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b); if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) { uVar2 = get_charsets_dir(local_218); strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0); my_charset_loader_init_mysys(local_2c8); my_read_charset_file(local_2c8,local_218,param_3); } if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) { local_2f0 = 0; } else { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { cVar1 = simple_8bit_charset_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) { inherit_charset_data(local_2f0,lVar3); } cVar1 = simple_8bit_collation_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) { inherit_collation_data(local_2f0,lVar3); } cVar1 = my_ci_init_charset(local_2f0,param_1); if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) { *(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100; } else { local_2f0 = 0; } } my_collation_statistics_inc_use_count(param_2); } inline_mysql_mutex_unlock(THR_LOCK_charset); } else { my_collation_statistics_inc_use_count(param_2); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2f0; }
110
stbi__pnm_getinteger(stbi__context*, char*)
llama.cpp/examples/llava/../../common/stb_image.h
static int stbi__pnm_getinteger(stbi__context *s, char *c) { int value = 0; while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { value = value*10 + (*c - '0'); *c = (char) stbi__get8(s); if((value > 214748364) || (value == 214748364 && *c > '7')) return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); } return value; }
O3
c
stbi__pnm_getinteger(stbi__context*, char*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r15 xorl %ebx, %ebx cmpq $0x0, 0x10(%r15) je 0x43728 movq 0x28(%r15), %rdi callq *0x20(%r15) testl %eax, %eax je 0x4373c cmpl $0x0, 0x30(%r15) je 0x437c1 movq 0xc0(%r15), %rax cmpq 0xc8(%r15), %rax jae 0x437c1 movzbl (%r14), %r12d leal -0x3a(%r12), %eax cmpb $-0xa, %al jb 0x437c1 movq 0xc0(%r15), %rax cmpq 0xc8(%r15), %rax jb 0x4376f cmpl $0x0, 0x30(%r15) je 0x437a1 movq %r15, %rdi callq 0x3cfb1 movq 0xc0(%r15), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r15) movb (%rax), %al leal (%rbx,%rbx,4), %ecx leal (%r12,%rcx,2), %ebx addl $-0x30, %ebx movb %al, (%r14) cmpl $0xccccccc, %ebx # imm = 0xCCCCCCC jg 0x437a5 jne 0x4370a cmpb $0x38, %al jl 0x4370a jmp 0x437a5 xorl %eax, %eax jmp 0x4377c movq %fs:0x0, %rax leaq 0xf56d6(%rip), %rcx # 0x138e8e movq %rcx, -0x20(%rax) xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZL20stbi__pnm_getintegerP13stbi__contextPc: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov r15, rdi xor ebx, ebx loc_4370A: cmp qword ptr [r15+10h], 0 jz short loc_43728 mov rdi, [r15+28h] call qword ptr [r15+20h] test eax, eax jz short loc_4373C cmp dword ptr [r15+30h], 0 jz loc_437C1 loc_43728: mov rax, [r15+0C0h] cmp rax, [r15+0C8h] jnb loc_437C1 loc_4373C: movzx r12d, byte ptr [r14] lea eax, [r12-3Ah] cmp al, 0F6h jb short loc_437C1 mov rax, [r15+0C0h] cmp rax, [r15+0C8h] jb short loc_4376F cmp dword ptr [r15+30h], 0 jz short loc_437A1 mov rdi, r15 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r15+0C0h] loc_4376F: lea rcx, [rax+1] mov [r15+0C0h], rcx mov al, [rax] loc_4377C: lea ecx, [rbx+rbx*4] lea ebx, [r12+rcx*2] add ebx, 0FFFFFFD0h mov [r14], al cmp ebx, 0CCCCCCCh jg short loc_437A5 jnz loc_4370A cmp al, 38h ; '8' jl loc_4370A jmp short loc_437A5 loc_437A1: xor eax, eax jmp short loc_4377C loc_437A5: mov rax, fs:0 lea rcx, aIntegerParseOv; "integer parse overflow" mov [rax-20h], rcx xor ebx, ebx loc_437C1: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long stbi__pnm_getinteger(long long a1, char *a2) { unsigned int v2; // ebx int v3; // r12d char *v4; // rax char v5; // al v2 = 0; do { if ( *(_QWORD *)(a1 + 16) ) { if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) goto LABEL_6; if ( !*(_DWORD *)(a1 + 48) ) return v2; } if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) ) return v2; LABEL_6: v3 = (unsigned __int8)*a2; if ( (unsigned __int8)(v3 - 58) < 0xF6u ) return v2; v4 = *(char **)(a1 + 192); if ( (unsigned long long)v4 >= *(_QWORD *)(a1 + 200) ) { if ( !*(_DWORD *)(a1 + 48) ) { v5 = 0; goto LABEL_11; } stbi__refill_buffer(a1); v4 = *(char **)(a1 + 192); } *(_QWORD *)(a1 + 192) = v4 + 1; v5 = *v4; LABEL_11: v2 = v3 + 10 * v2 - 48; *a2 = v5; } while ( (int)v2 <= 214748364 && (v2 != 214748364 || v5 < 56) ); *(_QWORD *)(__readfsqword(0) - 32) = "integer parse overflow"; return 0; }
stbi__pnm_getinteger: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R15,RDI XOR EBX,EBX LAB_0014370a: CMP qword ptr [R15 + 0x10],0x0 JZ 0x00143728 MOV RDI,qword ptr [R15 + 0x28] CALL qword ptr [R15 + 0x20] TEST EAX,EAX JZ 0x0014373c CMP dword ptr [R15 + 0x30],0x0 JZ 0x001437c1 LAB_00143728: MOV RAX,qword ptr [R15 + 0xc0] CMP RAX,qword ptr [R15 + 0xc8] JNC 0x001437c1 LAB_0014373c: MOVZX R12D,byte ptr [R14] LEA EAX,[R12 + -0x3a] CMP AL,0xf6 JC 0x001437c1 MOV RAX,qword ptr [R15 + 0xc0] CMP RAX,qword ptr [R15 + 0xc8] JC 0x0014376f CMP dword ptr [R15 + 0x30],0x0 JZ 0x001437a1 MOV RDI,R15 CALL 0x0013cfb1 MOV RAX,qword ptr [R15 + 0xc0] LAB_0014376f: LEA RCX,[RAX + 0x1] MOV qword ptr [R15 + 0xc0],RCX MOV AL,byte ptr [RAX] LAB_0014377c: LEA ECX,[RBX + RBX*0x4] LEA EBX,[R12 + RCX*0x2] ADD EBX,-0x30 MOV byte ptr [R14],AL CMP EBX,0xccccccc JG 0x001437a5 JNZ 0x0014370a CMP AL,0x38 JL 0x0014370a JMP 0x001437a5 LAB_001437a1: XOR EAX,EAX JMP 0x0014377c LAB_001437a5: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x238e8e] MOV qword ptr [RAX + -0x20],RCX XOR EBX,EBX LAB_001437c1: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* stbi__pnm_getinteger(stbi__context*, char*) */ int stbi__pnm_getinteger(stbi__context *param_1,char *param_2) { byte bVar1; char cVar2; int iVar3; char *pcVar4; int iVar5; long *in_FS_OFFSET; iVar5 = 0; do { if (*(long *)(param_1 + 0x10) == 0) { LAB_00143728: if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) { return iVar5; } } else { iVar3 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28)); if (iVar3 != 0) { if (*(int *)(param_1 + 0x30) == 0) { return iVar5; } goto LAB_00143728; } } bVar1 = *param_2; if ((byte)(bVar1 - 0x3a) < 0xf6) { return iVar5; } pcVar4 = *(char **)(param_1 + 0xc0); if (pcVar4 < *(char **)(param_1 + 200)) { LAB_0014376f: *(char **)(param_1 + 0xc0) = pcVar4 + 1; cVar2 = *pcVar4; } else { if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pcVar4 = *(char **)(param_1 + 0xc0); goto LAB_0014376f; } cVar2 = '\0'; } iVar5 = (uint)bVar1 + iVar5 * 10 + -0x30; *param_2 = cVar2; if ((0xccccccc < iVar5) || ((iVar5 == 0xccccccc && ('7' < cVar2)))) { *(char **)(*in_FS_OFFSET + -0x20) = "integer parse overflow"; return 0; } } while( true ); }
111
get_rdlock
eloqsql/storage/maria/ma_pagecache.c
static my_bool get_rdlock(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block) { PAGECACHE_FILE file= block->hash_link->file; pgcache_page_no_t pageno= block->hash_link->pageno; pthread_t locker= pthread_self(); DBUG_ENTER("get_rdlock"); DBUG_PRINT("info", ("the block %p " "files %d(%d) pages %lu(%lu)", block, file.file, block->hash_link->file.file, (ulong) pageno, (ulong) block->hash_link->pageno)); PCBLOCK_INFO(block); while (block->wlocks && !pthread_equal(block->write_locker, locker)) { /* Lock failed we will wait */ if (pagecache_wait_lock(pagecache, block, file, pageno, MY_PTHREAD_LOCK_READ)) DBUG_RETURN(1); } /* we are doing it by global cache mutex protection, so it is OK */ if (block->wlocks) { DBUG_ASSERT(pthread_equal(block->write_locker, locker)); block->rlocks_queue++; DBUG_PRINT("info", ("RD lock put into queue, block %p", block)); } else { block->rlocks++; DBUG_PRINT("info", ("RD lock set, block %p", block)); } DBUG_RETURN(0); }
O0
c
get_rdlock: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi addq $0x18, %rsi leaq -0x60(%rbp), %rdi movl $0x48, %edx callq 0x2a090 movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq 0x60(%rax), %rax movq %rax, -0x68(%rbp) callq 0x2a540 movq %rax, -0x70(%rbp) jmp 0x32638 jmp 0x3263a jmp 0x3263c jmp 0x3263e movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x68(%rcx) movb %al, -0x71(%rbp) je 0x32669 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi movq -0x70(%rbp), %rsi callq 0x2a920 cmpl $0x0, %eax setne %al xorb $-0x1, %al movb %al, -0x71(%rbp) movb -0x71(%rbp), %al testb $0x1, %al jne 0x32672 jmp 0x326c2 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x68(%rbp), %rdx xorl %eax, %eax movq -0x20(%rbp), %rcx movq %rsp, %rax movq %rcx, 0x40(%rax) movups -0x60(%rbp), %xmm0 movups -0x50(%rbp), %xmm1 movups -0x40(%rbp), %xmm2 movups -0x30(%rbp), %xmm3 movups %xmm3, 0x30(%rax) movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) xorl %ecx, %ecx callq 0x32710 cmpb $0x0, %al je 0x326bd jmp 0x326b7 movb $0x1, -0x1(%rbp) jmp 0x326f8 jmp 0x3263e movq -0x18(%rbp), %rax cmpl $0x0, 0x68(%rax) je 0x326e1 jmp 0x326ce jmp 0x326d0 movq -0x18(%rbp), %rax movl 0x70(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x70(%rax) jmp 0x326df jmp 0x326f2 movq -0x18(%rbp), %rax movl 0x6c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x6c(%rax) jmp 0x326f0 jmp 0x326f2 jmp 0x326f4 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xc0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_rdlock: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rsi, [rax+20h] add rsi, 18h lea rdi, [rbp+var_60] mov edx, 48h ; 'H' call _memcpy mov rax, [rbp+var_18] mov rax, [rax+20h] mov rax, [rax+60h] mov [rbp+var_68], rax call _pthread_self mov [rbp+var_70], rax jmp short $+2 loc_32638: jmp short $+2 loc_3263A: jmp short $+2 loc_3263C: jmp short $+2 loc_3263E: mov rcx, [rbp+var_18] xor eax, eax cmp dword ptr [rcx+68h], 0 mov [rbp+var_71], al jz short loc_32669 mov rax, [rbp+var_18] mov rdi, [rax+38h] mov rsi, [rbp+var_70] call _pthread_equal cmp eax, 0 setnz al xor al, 0FFh mov [rbp+var_71], al loc_32669: mov al, [rbp+var_71] test al, 1 jnz short loc_32672 jmp short loc_326C2 loc_32672: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_68] xor eax, eax mov rcx, [rbp+var_20] mov rax, rsp mov [rax+40h], rcx movups xmm0, [rbp+var_60] movups xmm1, [rbp+var_50] movups xmm2, [rbp+var_40] movups xmm3, [rbp+var_30] movups xmmword ptr [rax+30h], xmm3 movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 xor ecx, ecx call pagecache_wait_lock cmp al, 0 jz short loc_326BD jmp short $+2 loc_326B7: mov [rbp+var_1], 1 jmp short loc_326F8 loc_326BD: jmp loc_3263E loc_326C2: mov rax, [rbp+var_18] cmp dword ptr [rax+68h], 0 jz short loc_326E1 jmp short $+2 loc_326CE: jmp short $+2 loc_326D0: mov rax, [rbp+var_18] mov ecx, [rax+70h] add ecx, 1 mov [rax+70h], ecx jmp short $+2 loc_326DF: jmp short loc_326F2 loc_326E1: mov rax, [rbp+var_18] mov ecx, [rax+6Ch] add ecx, 1 mov [rax+6Ch], ecx jmp short $+2 loc_326F0: jmp short $+2 loc_326F2: jmp short $+2 loc_326F4: mov [rbp+var_1], 0 loc_326F8: mov al, [rbp+var_1] add rsp, 0C0h pop rbp retn
char get_rdlock(long long a1, long long a2) { int v2; // r8d int v3; // r9d char v5; // [rsp+4Fh] [rbp-71h] long long v6; // [rsp+50h] [rbp-70h] long long v7; // [rsp+58h] [rbp-68h] _OWORD v8[4]; // [rsp+60h] [rbp-60h] BYREF long long v9; // [rsp+A0h] [rbp-20h] long long v10; // [rsp+A8h] [rbp-18h] long long v11; // [rsp+B0h] [rbp-10h] v11 = a1; v10 = a2; memcpy(v8, *(_QWORD *)(a2 + 32) + 24LL, 72LL); v7 = *(_QWORD *)(*(_QWORD *)(v10 + 32) + 96LL); v6 = pthread_self(); while ( 1 ) { v5 = 0; if ( *(_DWORD *)(v10 + 104) ) v5 = ~((unsigned int)pthread_equal(*(_QWORD *)(v10 + 56), v6) != 0); if ( (v5 & 1) == 0 ) break; if ( (unsigned __int8)pagecache_wait_lock(v11, v10, v7, 0, v2, v3, v8[0], v8[1], v8[2], v8[3], v9) ) return 1; } if ( *(_DWORD *)(v10 + 104) ) ++*(_DWORD *)(v10 + 112); else ++*(_DWORD *)(v10 + 108); return 0; }
get_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] ADD RSI,0x18 LEA RDI,[RBP + -0x60] MOV EDX,0x48 CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x68],RAX CALL 0x0012a540 MOV qword ptr [RBP + -0x70],RAX JMP 0x00132638 LAB_00132638: JMP 0x0013263a LAB_0013263a: JMP 0x0013263c LAB_0013263c: JMP 0x0013263e LAB_0013263e: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX + 0x68],0x0 MOV byte ptr [RBP + -0x71],AL JZ 0x00132669 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x70] CALL 0x0012a920 CMP EAX,0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x71],AL LAB_00132669: MOV AL,byte ptr [RBP + -0x71] TEST AL,0x1 JNZ 0x00132672 JMP 0x001326c2 LAB_00132672: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x68] XOR EAX,EAX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,RSP MOV qword ptr [RAX + 0x40],RCX MOVUPS XMM0,xmmword ptr [RBP + -0x60] MOVUPS XMM1,xmmword ptr [RBP + -0x50] MOVUPS XMM2,xmmword ptr [RBP + -0x40] MOVUPS XMM3,xmmword ptr [RBP + -0x30] MOVUPS xmmword ptr [RAX + 0x30],XMM3 MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 XOR ECX,ECX CALL 0x00132710 CMP AL,0x0 JZ 0x001326bd JMP 0x001326b7 LAB_001326b7: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001326f8 LAB_001326bd: JMP 0x0013263e LAB_001326c2: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x68],0x0 JZ 0x001326e1 JMP 0x001326ce LAB_001326ce: JMP 0x001326d0 LAB_001326d0: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x70] ADD ECX,0x1 MOV dword ptr [RAX + 0x70],ECX JMP 0x001326df LAB_001326df: JMP 0x001326f2 LAB_001326e1: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x6c] ADD ECX,0x1 MOV dword ptr [RAX + 0x6c],ECX JMP 0x001326f0 LAB_001326f0: JMP 0x001326f2 LAB_001326f2: JMP 0x001326f4 LAB_001326f4: MOV byte ptr [RBP + -0x1],0x0 LAB_001326f8: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xc0 POP RBP RET
int1 get_rdlock(int8 param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int8 param_6) { int8 uVar1; char cVar2; int iVar3; pthread_t __thread2; bool bVar4; int4 local_68 [2]; int4 uStack_60; int4 local_58; int4 uStack_50; int4 local_48; int4 uStack_40; int4 local_38; int4 uStack_30; int8 local_28; long local_20; int8 local_18; local_20 = param_2; local_18 = param_1; memcpy(local_68,(void *)(*(long *)(param_2 + 0x20) + 0x18),0x48); uVar1 = *(int8 *)(*(long *)(local_20 + 0x20) + 0x60); __thread2 = pthread_self(); while( true ) { bVar4 = false; if (*(int *)(local_20 + 0x68) != 0) { iVar3 = pthread_equal(*(pthread_t *)(local_20 + 0x38),__thread2); bVar4 = iVar3 == 0; } if (!bVar4) break; cVar2 = pagecache_wait_lock(local_18,local_20,uVar1,0,param_5,param_6,local_68[0],uStack_60, local_58,uStack_50,local_48,uStack_40,local_38,uStack_30,local_28); if (cVar2 != '\0') { return 1; } } if (*(int *)(local_20 + 0x68) == 0) { *(int *)(local_20 + 0x6c) = *(int *)(local_20 + 0x6c) + 1; } else { *(int *)(local_20 + 0x70) = *(int *)(local_20 + 0x70) + 1; } return 0; }
112
translog_put_LSN_diff
eloqsql/storage/maria/ma_loghandler.c
static uchar *translog_put_LSN_diff(LSN base_lsn, LSN lsn, uchar *dst) { uint64 diff; DBUG_ENTER("translog_put_LSN_diff"); DBUG_PRINT("enter", ("Base: " LSN_FMT " val: " LSN_FMT " dst: %p", LSN_IN_PARTS(base_lsn), LSN_IN_PARTS(lsn), dst)); DBUG_ASSERT(base_lsn > lsn); diff= base_lsn - lsn; DBUG_PRINT("info", ("Diff: 0x%llx", (ulonglong) diff)); if (diff <= 0x3FFF) { dst-= 2; /* Note we store this high uchar first to ensure that first uchar has 0 in the 3 upper bits. */ dst[0]= (uchar)(diff >> 8); dst[1]= (uchar)(diff & 0xFF); } else if (diff <= 0x3FFFFFL) { dst-= 3; dst[0]= (uchar)(0x40 | (diff >> 16)); int2store(dst + 1, diff & 0xFFFF); } else if (diff <= 0x3FFFFFFFL) { dst-= 4; dst[0]= (uchar)(0x80 | (diff >> 24)); int3store(dst + 1, diff & 0xFFFFFFL); } else if (diff <= 0x3FFFFFFFFFLL) { dst-= 5; dst[0]= (uchar)(0xC0 | (diff >> 32)); int4store(dst + 1, diff & 0xFFFFFFFFL); } else { /* It is full LSN after special 1 diff (which is impossible in real life) */ dst-= 2 + LSN_STORE_SIZE; dst[0]= 0; dst[1]= 1; lsn_store(dst + 2, lsn); } DBUG_PRINT("info", ("new dst: %p", dst)); DBUG_RETURN(dst); }
O0
c
translog_put_LSN_diff: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x5b0e2 jmp 0x5b0e4 jmp 0x5b0e6 movq -0x8(%rbp), %rax subq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x5b0f4 cmpq $0x3fff, -0x20(%rbp) # imm = 0x3FFF ja 0x5b132 movq -0x18(%rbp), %rax addq $-0x2, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x1(%rax) jmp 0x5b2d3 cmpq $0x3fffff, -0x20(%rbp) # imm = 0x3FFFFF ja 0x5b181 movq -0x18(%rbp), %rax addq $-0x3, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x10, %rax orq $0x40, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax andq $0xffff, %rax # imm = 0xFFFF movw %ax, %cx movq -0x28(%rbp), %rax movw %cx, (%rax) jmp 0x5b2d1 cmpq $0x3fffffff, -0x20(%rbp) # imm = 0x3FFFFFFF ja 0x5b1f2 movq -0x18(%rbp), %rax addq $-0x4, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x18, %rax orq $0x80, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rax andq $0xffffff, %rax # imm = 0xFFFFFF movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x1(%rax) movq -0x20(%rbp), %rax andq $0xffffff, %rax # imm = 0xFFFFFF shrl $0x8, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x2(%rax) movq -0x20(%rbp), %rax andq $0xffffff, %rax # imm = 0xFFFFFF shrq $0x10, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x3(%rax) jmp 0x5b2cf movabsq $0x3fffffffff, %rax # imm = 0x3FFFFFFFFF cmpq %rax, -0x20(%rbp) ja 0x5b24b movq -0x18(%rbp), %rax addq $-0x5, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x20, %rax orq $0xc0, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x20(%rbp), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) jmp 0x5b2cd movq -0x18(%rbp), %rax addq $-0x9, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x18(%rbp), %rax movb $0x1, 0x1(%rax) jmp 0x5b268 movq -0x10(%rbp), %rax sarq $0x20, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x3(%rax) movq -0x10(%rbp), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x4(%rax) jmp 0x5b2a3 movq -0x18(%rbp), %rax addq $0x2, %rax addq $0x3, %rax movq %rax, -0x38(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) jmp 0x5b2cb jmp 0x5b2cd jmp 0x5b2cf jmp 0x5b2d1 jmp 0x5b2d3 jmp 0x5b2d5 jmp 0x5b2d7 jmp 0x5b2d9 movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
translog_put_LSN_diff: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_5B0E2: jmp short $+2 loc_5B0E4: jmp short $+2 loc_5B0E6: mov rax, [rbp+var_8] sub rax, [rbp+var_10] mov [rbp+var_20], rax jmp short $+2 loc_5B0F4: cmp [rbp+var_20], 3FFFh ja short loc_5B132 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 8 mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_20] and rax, 0FFh mov cl, al mov rax, [rbp+var_18] mov [rax+1], cl jmp loc_5B2D3 loc_5B132: cmp [rbp+var_20], offset unk_3FFFFF ja short loc_5B181 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFDh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 10h or rax, 40h mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_20] and rax, 0FFFFh mov cx, ax mov rax, [rbp+var_28] mov [rax], cx jmp loc_5B2D1 loc_5B181: cmp [rbp+var_20], 3FFFFFFFh ja short loc_5B1F2 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 18h or rax, 80h mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_20] and rax, 0FFFFFFh mov cl, al mov rax, [rbp+var_18] mov [rax+1], cl mov rax, [rbp+var_20] and rax, 0FFFFFFh shr eax, 8 mov cl, al mov rax, [rbp+var_18] mov [rax+2], cl mov rax, [rbp+var_20] and rax, 0FFFFFFh shr rax, 10h mov cl, al mov rax, [rbp+var_18] mov [rax+3], cl jmp loc_5B2CF loc_5B1F2: mov rax, 3FFFFFFFFFh cmp [rbp+var_20], rax ja short loc_5B24B mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFBh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 20h or rax, 0C0h mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_30], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_20] mov ecx, eax mov rax, [rbp+var_30] mov [rax], ecx jmp loc_5B2CD loc_5B24B: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFF7h mov [rbp+var_18], rax mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_18] mov byte ptr [rax+1], 1 jmp short $+2 loc_5B268: mov rax, [rbp+var_10] sar rax, 20h mov cl, al mov rax, [rbp+var_18] mov [rax+2], cl mov rax, [rbp+var_10] sar rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_18] mov [rax+3], cl mov rax, [rbp+var_10] sar rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_18] mov [rax+4], cl jmp short $+2 loc_5B2A3: mov rax, [rbp+var_18] add rax, 2 add rax, 3 mov [rbp+var_38], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_10] mov ecx, eax mov rax, [rbp+var_38] mov [rax], ecx jmp short $+2 loc_5B2CB: jmp short $+2 loc_5B2CD: jmp short $+2 loc_5B2CF: jmp short $+2 loc_5B2D1: jmp short $+2 loc_5B2D3: jmp short $+2 loc_5B2D5: jmp short $+2 loc_5B2D7: jmp short $+2 loc_5B2D9: mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_40] pop rbp retn
long long translog_put_LSN_diff(long long a1, long long a2, long long a3) { unsigned long long v4; // [rsp+20h] [rbp-20h] long long v5; // [rsp+28h] [rbp-18h] v4 = a1 - a2; if ( (unsigned long long)(a1 - a2) > 0x3FFF ) { if ( v4 > (unsigned long long)&unk_3FFFFF ) { if ( v4 > 0x3FFFFFFF ) { if ( v4 > 0x3FFFFFFFFFLL ) { v5 = a3 - 9; *(_BYTE *)v5 = 0; *(_BYTE *)(v5 + 1) = 1; *(_WORD *)(v5 + 2) = WORD2(a2); *(_BYTE *)(v5 + 4) = BYTE6(a2); *(_DWORD *)(v5 + 5) = a2; } else { v5 = a3 - 5; *(_BYTE *)v5 = BYTE4(v4) | 0xC0; *(_DWORD *)(v5 + 1) = v4; } } else { v5 = a3 - 4; *(_BYTE *)v5 = ((unsigned int)(a1 - a2) >> 24) | 0x80; *(_WORD *)(v5 + 1) = v4; *(_BYTE *)(v5 + 3) = (v4 & 0xFFFFFF) >> 16; } } else { v5 = a3 - 3; *(_BYTE *)v5 = BYTE2(v4) | 0x40; *(_WORD *)(v5 + 1) = v4; } } else { v5 = a3 - 2; *(_BYTE *)v5 = BYTE1(v4); *(_BYTE *)(v5 + 1) = v4; } return v5; }
translog_put_LSN_diff: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x0015b0e2 LAB_0015b0e2: JMP 0x0015b0e4 LAB_0015b0e4: JMP 0x0015b0e6 LAB_0015b0e6: MOV RAX,qword ptr [RBP + -0x8] SUB RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX JMP 0x0015b0f4 LAB_0015b0f4: CMP qword ptr [RBP + -0x20],0x3fff JA 0x0015b132 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x2 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],CL JMP 0x0015b2d3 LAB_0015b132: CMP qword ptr [RBP + -0x20],0x3fffff JA 0x0015b181 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x3 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x10 OR RAX,0x40 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffff MOV CX,AX MOV RAX,qword ptr [RBP + -0x28] MOV word ptr [RAX],CX JMP 0x0015b2d1 LAB_0015b181: CMP qword ptr [RBP + -0x20],0x3fffffff JA 0x0015b1f2 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x4 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x18 OR RAX,0x80 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffffff MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffffff SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffffff SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x3],CL JMP 0x0015b2cf LAB_0015b1f2: MOV RAX,0x3fffffffff CMP qword ptr [RBP + -0x20],RAX JA 0x0015b24b MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x5 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x20 OR RAX,0xc0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x20] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX JMP 0x0015b2cd LAB_0015b24b: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x9 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],0x1 JMP 0x0015b268 LAB_0015b268: MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x4],CL JMP 0x0015b2a3 LAB_0015b2a3: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 ADD RAX,0x3 MOV qword ptr [RBP + -0x38],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX JMP 0x0015b2cb LAB_0015b2cb: JMP 0x0015b2cd LAB_0015b2cd: JMP 0x0015b2cf LAB_0015b2cf: JMP 0x0015b2d1 LAB_0015b2d1: JMP 0x0015b2d3 LAB_0015b2d3: JMP 0x0015b2d5 LAB_0015b2d5: JMP 0x0015b2d7 LAB_0015b2d7: JMP 0x0015b2d9 LAB_0015b2d9: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] POP RBP RET
byte * translog_put_LSN_diff(long param_1,long param_2,long param_3) { byte bVar1; byte bVar2; ulong uVar3; int8 local_20; uVar3 = param_1 - param_2; bVar1 = (byte)(uVar3 >> 8); if (uVar3 < 0x4000) { local_20 = (byte *)(param_3 + -2); *local_20 = bVar1; *(char *)(param_3 + -1) = (char)uVar3; } else { bVar2 = (byte)(uVar3 >> 0x10); if (uVar3 < 0x400000) { local_20 = (byte *)(param_3 + -3); *local_20 = bVar2 | 0x40; *(short *)(param_3 + -2) = (short)uVar3; } else if (uVar3 < 0x40000000) { local_20 = (byte *)(param_3 + -4); *local_20 = (byte)(uVar3 >> 0x18) | 0x80; *(char *)(param_3 + -3) = (char)uVar3; *(byte *)(param_3 + -2) = bVar1; *(byte *)(param_3 + -1) = bVar2; } else if (uVar3 < 0x4000000000) { local_20 = (byte *)(param_3 + -5); *local_20 = (byte)(uVar3 >> 0x20) | 0xc0; *(int *)(param_3 + -4) = (int)uVar3; } else { local_20 = (byte *)(param_3 + -9); *local_20 = 0; *(int1 *)(param_3 + -8) = 1; *(char *)(param_3 + -7) = (char)((ulong)param_2 >> 0x20); *(char *)(param_3 + -6) = (char)((ulong)param_2 >> 0x28); *(char *)(param_3 + -5) = (char)((ulong)param_2 >> 0x30); *(int *)(param_3 + -4) = (int)param_2; } } return local_20; }
113
ma_bitmap_create_missing
eloqsql/storage/maria/ma_bitmap.c
static my_bool _ma_bitmap_create_missing(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page) { MARIA_SHARE *share= info->s; uint block_size= bitmap->block_size; pgcache_page_no_t from, to; my_off_t data_file_length= share->state.state.data_file_length; DBUG_ENTER("_ma_bitmap_create_missing"); DBUG_PRINT("enter", ("page: %lld", (longlong) page)); /* First (in offset order) bitmap page to create */ if (data_file_length < block_size) goto err; /* corrupted, should have first bitmap page */ if (page * block_size >= share->base.max_data_file_length) { my_errno= HA_ERR_RECORD_FILE_FULL; goto err; } from= (data_file_length / block_size - 1) / bitmap->pages_covered + 1; from*= bitmap->pages_covered; /* page>=from because: (page + 1) * bs > dfl, and page == k * pc so: (k * pc + 1) * bs > dfl; k * pc + 1 > dfl / bs; k * pc > dfl / bs - 1 k > (dfl / bs - 1) / pc; k >= (dfl / bs - 1) / pc + 1 k * pc >= ((dfl / bs - 1) / pc + 1) * pc == from. */ DBUG_ASSERT(page >= from); if (share->now_transactional) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; page_store(log_data + FILEID_STORE_SIZE, from); page_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, page); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); /* We don't use info->trn so that this REDO is always executed even though the UNDO does not reach disk due to crash. This is also consistent with the fact that the new bitmap pages are not pinned. */ if (translog_write_record(&lsn, LOGREC_REDO_BITMAP_NEW_PAGE, &dummy_transaction_object, info, (translog_size_t)sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) goto err; /* No need to flush the log: the bitmap pages we are going to create will flush it when they go to disk. */ } /* Last bitmap page. It has special creation: will go to the page cache only later as we are going to modify it very soon. */ bzero(bitmap->map, bitmap->block_size); bitmap->used_size= bitmap->full_head_size= bitmap->full_tail_size= 0; bitmap->changed=1; #ifndef DBUG_OFF /* Make a copy of the page to be able to print out bitmap changes during debugging */ memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size); #endif /* Last bitmap page to create before 'page' */ DBUG_ASSERT(page >= bitmap->pages_covered); to= page - bitmap->pages_covered; /* In run-time situations, from>=to is always false, i.e. we always create one bitmap at a time ('page'). */ if ((from <= to) && _ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to, bitmap->map)) goto err; share->state.state.data_file_length= (page + 1) * bitmap->block_size; DBUG_RETURN(FALSE); err: DBUG_RETURN(TRUE); }
O0
c
ma_bitmap_create_missing: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x38(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x6629a movq -0x58(%rbp), %rax movl -0x3c(%rbp), %ecx cmpq %rcx, %rax jae 0x662ab jmp 0x66499 movq -0x30(%rbp), %rax movl -0x3c(%rbp), %ecx imulq %rcx, %rax movq -0x38(%rbp), %rcx cmpq 0x368(%rcx), %rax jb 0x662d3 callq 0xf6080 movl $0x87, (%rax) jmp 0x66499 movq -0x58(%rbp), %rax movl -0x3c(%rbp), %ecx xorl %edx, %edx divq %rcx subq $0x1, %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x138(%rax), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x6630e movq -0x38(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x663eb jmp 0x66321 leaq -0x14(%rbp), %rax addq $0x2, %rax movq %rax, -0x98(%rbp) movq -0x48(%rbp), %rax movl %eax, %ecx movq -0x98(%rbp), %rax movl %ecx, (%rax) movq -0x48(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x98(%rbp), %rax movb %cl, 0x4(%rax) jmp 0x66355 leaq -0x14(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0xa0(%rbp) movq -0x30(%rbp), %rax movl %eax, %ecx movq -0xa0(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xa0(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x14(%rbp), %rax movq %rax, -0x70(%rbp) movq $0xc, -0x68(%rbp) movq -0x20(%rbp), %rcx leaq -0x90(%rbp), %r10 leaq -0x14(%rbp), %rax leaq -0x60(%rbp), %rdi movl $0x28, %esi leaq 0x4114c6(%rip), %rdx # 0x477880 movl $0xc, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31e50 cmpb $0x0, %al je 0x663e9 jmp 0x66499 jmp 0x663eb movq -0x28(%rbp), %rax movq 0x8(%rax), %rdi movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 movq -0x28(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x28(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x24(%rax) movq -0x28(%rbp), %rax movb $0x1, 0x20(%rax) jmp 0x66431 movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx subq 0x138(%rcx), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax cmpq -0x50(%rbp), %rax ja 0x66475 movq -0x38(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x50(%rbp), %rcx movq -0x28(%rbp), %rax movq 0x8(%rax), %r8 callq 0x64ef0 movsbl %al, %eax cmpl $0x0, %eax je 0x66475 jmp 0x66499 movq -0x30(%rbp), %rcx addq $0x1, %rcx movq -0x28(%rbp), %rax movl 0x134(%rax), %eax imulq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x40(%rax) movb $0x0, -0x15(%rbp) jmp 0x6649f jmp 0x6649b movb $0x1, -0x15(%rbp) movb -0x15(%rbp), %al movb %al, -0xa1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x664c9 movb -0xa1(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a250 nop
_ma_bitmap_create_missing: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov eax, [rax+134h] mov [rbp+var_3C], eax mov rax, [rbp+var_38] mov rax, [rax+40h] mov [rbp+var_58], rax jmp short $+2 loc_6629A: mov rax, [rbp+var_58] mov ecx, [rbp+var_3C] cmp rax, rcx jnb short loc_662AB jmp loc_66499 loc_662AB: mov rax, [rbp+var_30] mov ecx, [rbp+var_3C] imul rax, rcx mov rcx, [rbp+var_38] cmp rax, [rcx+368h] jb short loc_662D3 call _my_thread_var mov dword ptr [rax], 87h jmp loc_66499 loc_662D3: mov rax, [rbp+var_58] mov ecx, [rbp+var_3C] xor edx, edx div rcx sub rax, 1 mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rax, [rax+138h] imul rax, [rbp+var_48] mov [rbp+var_48], rax jmp short $+2 loc_6630E: mov rax, [rbp+var_38] cmp byte ptr [rax+7E7h], 0 jz loc_663EB jmp short $+2 loc_66321: lea rax, [rbp+var_14] add rax, 2 mov [rbp+var_98], rax mov rax, [rbp+var_48] mov ecx, eax mov rax, [rbp+var_98] mov [rax], ecx mov rax, [rbp+var_48] shr rax, 20h mov cl, al mov rax, [rbp+var_98] mov [rax+4], cl jmp short $+2 loc_66355: lea rax, [rbp+var_14] add rax, 2 add rax, 5 mov [rbp+var_A0], rax mov rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_A0] mov [rax], ecx mov rax, [rbp+var_30] shr rax, 20h mov cl, al mov rax, [rbp+var_A0] mov [rax+4], cl lea rax, [rbp+var_14] mov [rbp+var_70], rax mov [rbp+var_68], 0Ch mov rcx, [rbp+var_20] lea r10, [rbp+var_90] lea rax, [rbp+var_14] lea rdi, [rbp+var_60] mov esi, 28h ; '(' lea rdx, dummy_transaction_object mov r8d, 0Ch mov r9d, 3 xor r11d, r11d mov [rsp+0C0h+var_C0], r10 mov [rsp+0C0h+var_B8], rax mov [rsp+0C0h+var_B0], 0 call translog_write_record cmp al, 0 jz short loc_663E9 jmp loc_66499 loc_663E9: jmp short $+2 loc_663EB: mov rax, [rbp+var_28] mov rdi, [rax+8] mov rax, [rbp+var_28] mov eax, [rax+134h] mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_28] mov dword ptr [rax+2Ch], 0 mov rax, [rbp+var_28] mov dword ptr [rax+28h], 0 mov rax, [rbp+var_28] mov dword ptr [rax+24h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+20h], 1 jmp short $+2 loc_66431: mov rax, [rbp+var_30] mov rcx, [rbp+var_28] sub rax, [rcx+138h] mov [rbp+var_50], rax mov rax, [rbp+var_48] cmp rax, [rbp+var_50] ja short loc_66475 mov rdi, [rbp+var_38] mov rsi, [rbp+var_28] mov rdx, [rbp+var_48] mov rcx, [rbp+var_50] mov rax, [rbp+var_28] mov r8, [rax+8] call _ma_bitmap_create_missing_into_pagecache movsx eax, al cmp eax, 0 jz short loc_66475 jmp short loc_66499 loc_66475: mov rcx, [rbp+var_30] add rcx, 1 mov rax, [rbp+var_28] mov eax, [rax+134h] imul rcx, rax mov rax, [rbp+var_38] mov [rax+40h], rcx mov [rbp+var_15], 0 jmp short loc_6649F loc_66499: jmp short $+2 loc_6649B: mov [rbp+var_15], 1 loc_6649F: mov al, [rbp+var_15] mov [rbp+var_A1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_664C9 mov al, [rbp+var_A1] add rsp, 0C0h pop rbp retn loc_664C9: call ___stack_chk_fail
char ma_bitmap_create_missing(long long *a1, long long a2, long long a3) { _QWORD v4[6]; // [rsp+30h] [rbp-90h] BYREF _BYTE v5[8]; // [rsp+60h] [rbp-60h] BYREF unsigned long long v6; // [rsp+68h] [rbp-58h] unsigned long long v7; // [rsp+70h] [rbp-50h] unsigned long long v8; // [rsp+78h] [rbp-48h] unsigned int v9; // [rsp+84h] [rbp-3Ch] long long v10; // [rsp+88h] [rbp-38h] long long v11; // [rsp+90h] [rbp-30h] long long v12; // [rsp+98h] [rbp-28h] long long *v13; // [rsp+A0h] [rbp-20h] __int16 v15; // [rsp+ACh] [rbp-14h] BYREF int v16; // [rsp+AEh] [rbp-12h] char v17; // [rsp+B2h] [rbp-Eh] int v18; // [rsp+B3h] [rbp-Dh] char v19; // [rsp+B7h] [rbp-9h] unsigned long long v20; // [rsp+B8h] [rbp-8h] v20 = __readfsqword(0x28u); v13 = a1; v12 = a2; v11 = a3; v10 = *a1; v9 = *(_DWORD *)(a2 + 308); v6 = *(_QWORD *)(v10 + 64); if ( v6 < v9 ) return 1; if ( (unsigned long long)v9 * v11 >= *(_QWORD *)(v10 + 872) ) { *(_DWORD *)my_thread_var() = 135; return 1; } v8 = ((v6 / v9 - 1) / *(_QWORD *)(v12 + 312) + 1) * *(_QWORD *)(v12 + 312); if ( *(_BYTE *)(v10 + 2023) ) { v16 = v8; v17 = BYTE4(v8); v18 = v11; v19 = BYTE4(v11); v4[4] = &v15; v4[5] = 12LL; if ( translog_write_record((long long)v5, 0x28u, (long long)dummy_transaction_object, v13, 12, 3u, v4, &v15, 0LL) ) return 1; } memset(*(_QWORD *)(v12 + 8), 0LL, *(unsigned int *)(v12 + 308)); *(_DWORD *)(v12 + 44) = 0; *(_DWORD *)(v12 + 40) = 0; *(_DWORD *)(v12 + 36) = 0; *(_BYTE *)(v12 + 32) = 1; v7 = v11 - *(_QWORD *)(v12 + 312); if ( v8 <= v7 ) { if ( ma_bitmap_create_missing_into_pagecache(v10, v12, v8, v7, *(_QWORD *)(v12 + 8)) ) return 1; } *(_QWORD *)(v10 + 64) = *(unsigned int *)(v12 + 308) * (v11 + 1); return 0; }
_ma_bitmap_create_missing: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x58],RAX JMP 0x0016629a LAB_0016629a: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x3c] CMP RAX,RCX JNC 0x001662ab JMP 0x00166499 LAB_001662ab: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x3c] IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RCX + 0x368] JC 0x001662d3 CALL 0x001f6080 MOV dword ptr [RAX],0x87 JMP 0x00166499 LAB_001662d3: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x3c] XOR EDX,EDX DIV RCX SUB RAX,0x1 MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x138] IMUL RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x0016630e LAB_0016630e: MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001663eb JMP 0x00166321 LAB_00166321: LEA RAX,[RBP + -0x14] ADD RAX,0x2 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x48] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x98] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x98] MOV byte ptr [RAX + 0x4],CL JMP 0x00166355 LAB_00166355: LEA RAX,[RBP + -0x14] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xa0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x14] MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x68],0xc MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0x90] LEA RAX,[RBP + -0x14] LEA RDI,[RBP + -0x60] MOV ESI,0x28 LEA RDX,[0x577880] MOV R8D,0xc MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131e50 CMP AL,0x0 JZ 0x001663e9 JMP 0x00166499 LAB_001663e9: JMP 0x001663eb LAB_001663eb: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x2c],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x24],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x20],0x1 JMP 0x00166431 LAB_00166431: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RCX + 0x138] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x50] JA 0x00166475 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RAX + 0x8] CALL 0x00164ef0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00166475 JMP 0x00166499 LAB_00166475: MOV RCX,qword ptr [RBP + -0x30] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x40],RCX MOV byte ptr [RBP + -0x15],0x0 JMP 0x0016649f LAB_00166499: JMP 0x0016649b LAB_0016649b: MOV byte ptr [RBP + -0x15],0x1 LAB_0016649f: MOV AL,byte ptr [RBP + -0x15] MOV byte ptr [RBP + -0xa1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001664c9 MOV AL,byte ptr [RBP + -0xa1] ADD RSP,0xc0 POP RBP RET LAB_001664c9: CALL 0x0012a250
int8 _ma_bitmap_create_missing(long *param_1,long param_2,long param_3) { char cVar1; int4 *puVar2; long in_FS_OFFSET; int1 local_98 [32]; int1 *local_78; int8 local_70; int1 local_68 [8]; ulong local_60; ulong local_58; ulong local_50; uint local_44; long local_40; long local_38; long local_30; long *local_28; int1 local_1d; int1 local_1c [2]; int4 local_1a; int1 local_16; int4 local_15; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_40 = *param_1; local_44 = *(uint *)(param_2 + 0x134); local_60 = *(ulong *)(local_40 + 0x40); local_38 = param_3; local_30 = param_2; local_28 = param_1; if (local_44 <= local_60) { if (param_3 * (ulong)local_44 < *(ulong *)(local_40 + 0x368)) { local_50 = *(long *)(param_2 + 0x138) * ((local_60 / local_44 - 1) / *(ulong *)(param_2 + 0x138) + 1); if (*(char *)(local_40 + 0x7e7) != '\0') { local_1a = (int4)local_50; local_16 = (int1)(local_50 >> 0x20); local_15 = (int4)param_3; local_11 = (int1)((ulong)param_3 >> 0x20); local_78 = local_1c; local_70 = 0xc; cVar1 = translog_write_record (local_68,0x28,dummy_transaction_object,param_1,0xc,3,local_98,local_1c,0) ; if (cVar1 != '\0') goto LAB_00166499; } memset(*(void **)(local_30 + 8),0,(ulong)*(uint *)(local_30 + 0x134)); *(int4 *)(local_30 + 0x2c) = 0; *(int4 *)(local_30 + 0x28) = 0; *(int4 *)(local_30 + 0x24) = 0; *(int1 *)(local_30 + 0x20) = 1; local_58 = local_38 - *(long *)(local_30 + 0x138); if ((local_58 < local_50) || (cVar1 = _ma_bitmap_create_missing_into_pagecache (local_40,local_30,local_50,local_58,*(int8 *)(local_30 + 8)), cVar1 == '\0')) { *(ulong *)(local_40 + 0x40) = (local_38 + 1) * (ulong)*(uint *)(local_30 + 0x134); local_1d = 0; goto LAB_0016649f; } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; } } LAB_00166499: local_1d = 1; LAB_0016649f: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1d); }
114
bitmap_intersect
eloqsql/mysys/my_bitmap.c
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; uint len= no_words_in_map(map), len2 = no_words_in_map(map2); DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); end= to+MY_MIN(len,len2); while (to < end) *to++ &= *from++; if (len2 <= len) { to[-1]&= ~map2->last_word_mask; /* Clear last not relevant bits */ end+= len-len2; while (to < end) *to++= 0; } }
O0
c
bitmap_intersect: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax addl $0x1f, %eax shrl $0x5, %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movl 0x1c(%rax), %eax addl $0x1f, %eax shrl $0x5, %eax movl %eax, -0x30(%rbp) jmp 0xee954 jmp 0xee956 jmp 0xee958 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x2c(%rbp), %eax cmpl -0x30(%rbp), %eax jae 0xee970 movl -0x2c(%rbp), %eax movl %eax, -0x3c(%rbp) jmp 0xee976 movl -0x30(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x38(%rbp), %rax movl -0x3c(%rbp), %ecx movl %ecx, %ecx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0xee9ba movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x20(%rbp) movl (%rax), %ecx movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x18(%rbp) andl (%rax), %ecx movl %ecx, (%rax) jmp 0xee98a movl -0x30(%rbp), %eax cmpl -0x2c(%rbp), %eax ja 0xeea10 movq -0x10(%rbp), %rax movl 0x18(%rax), %ecx xorl $-0x1, %ecx movq -0x18(%rbp), %rax andl -0x4(%rax), %ecx movl %ecx, -0x4(%rax) movl -0x2c(%rbp), %ecx subl -0x30(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0xeea0e movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x18(%rbp) movl $0x0, (%rax) jmp 0xee9ed jmp 0xeea10 popq %rbp retq nopw %cs:(%rax,%rax)
bitmap_intersect: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_8] mov eax, [rax+1Ch] add eax, 1Fh shr eax, 5 mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov eax, [rax+1Ch] add eax, 1Fh shr eax, 5 mov [rbp+var_30], eax jmp short $+2 loc_EE954: jmp short $+2 loc_EE956: jmp short $+2 loc_EE958: mov rax, [rbp+var_18] mov [rbp+var_38], rax mov eax, [rbp+var_2C] cmp eax, [rbp+var_30] jnb short loc_EE970 mov eax, [rbp+var_2C] mov [rbp+var_3C], eax jmp short loc_EE976 loc_EE970: mov eax, [rbp+var_30] mov [rbp+var_3C], eax loc_EE976: mov rax, [rbp+var_38] mov ecx, [rbp+var_3C] mov ecx, ecx shl rcx, 2 add rax, rcx mov [rbp+var_28], rax loc_EE98A: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb short loc_EE9BA mov rax, [rbp+var_20] mov rcx, rax add rcx, 4 mov [rbp+var_20], rcx mov ecx, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 4 mov [rbp+var_18], rdx and ecx, [rax] mov [rax], ecx jmp short loc_EE98A loc_EE9BA: mov eax, [rbp+var_30] cmp eax, [rbp+var_2C] ja short loc_EEA10 mov rax, [rbp+var_10] mov ecx, [rax+18h] xor ecx, 0FFFFFFFFh mov rax, [rbp+var_18] and ecx, [rax-4] mov [rax-4], ecx mov ecx, [rbp+var_2C] sub ecx, [rbp+var_30] mov rax, [rbp+var_28] mov ecx, ecx shl rcx, 2 add rax, rcx mov [rbp+var_28], rax loc_EE9ED: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb short loc_EEA0E mov rax, [rbp+var_18] mov rcx, rax add rcx, 4 mov [rbp+var_18], rcx mov dword ptr [rax], 0 jmp short loc_EE9ED loc_EEA0E: jmp short $+2 loc_EEA10: pop rbp retn
_DWORD * bitmap_intersect(long long a1, long long a2) { int *v2; // rax int v3; // ecx _DWORD *v4; // rax _DWORD *result; // rax _DWORD *v6; // rax unsigned int v7; // [rsp+0h] [rbp-3Ch] unsigned int v8; // [rsp+Ch] [rbp-30h] unsigned int v9; // [rsp+10h] [rbp-2Ch] unsigned long long v10; // [rsp+14h] [rbp-28h] unsigned long long v11; // [rsp+14h] [rbp-28h] int *v12; // [rsp+1Ch] [rbp-20h] _DWORD *v13; // [rsp+24h] [rbp-18h] v13 = *(_DWORD **)a1; v12 = *(int **)a2; v9 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5; v8 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5; if ( v9 >= v8 ) v7 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5; else v7 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5; v10 = 4LL * v7 + *(_QWORD *)a1; while ( (unsigned long long)v13 < v10 ) { v2 = v12++; v3 = *v2; v4 = v13++; *v4 &= v3; } result = (_DWORD *)v8; if ( v8 <= v9 ) { *(v13 - 1) &= ~*(_DWORD *)(a2 + 24); v11 = 4LL * (v9 - v8) + v10; while ( 1 ) { result = v13; if ( (unsigned long long)v13 >= v11 ) break; v6 = v13++; *v6 = 0; } } return result; }
bitmap_intersect: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] ADD EAX,0x1f SHR EAX,0x5 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1c] ADD EAX,0x1f SHR EAX,0x5 MOV dword ptr [RBP + -0x30],EAX JMP 0x001ee954 LAB_001ee954: JMP 0x001ee956 LAB_001ee956: JMP 0x001ee958 LAB_001ee958: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x30] JNC 0x001ee970 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001ee976 LAB_001ee970: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x3c],EAX LAB_001ee976: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] MOV ECX,ECX SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_001ee98a: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x001ee9ba MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x20],RCX MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x18],RDX AND ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX JMP 0x001ee98a LAB_001ee9ba: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x2c] JA 0x001eea10 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x18] XOR ECX,0xffffffff MOV RAX,qword ptr [RBP + -0x18] AND ECX,dword ptr [RAX + -0x4] MOV dword ptr [RAX + -0x4],ECX MOV ECX,dword ptr [RBP + -0x2c] SUB ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_001ee9ed: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x001eea0e MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x18],RCX MOV dword ptr [RAX],0x0 JMP 0x001ee9ed LAB_001eea0e: JMP 0x001eea10 LAB_001eea10: POP RBP RET
void bitmap_intersect(int8 *param_1,int8 *param_2) { uint uVar1; uint uVar2; uint *puVar3; uint local_44; uint *local_28; uint *local_20; uVar1 = *(int *)((long)param_1 + 0x1c) + 0x1fU >> 5; uVar2 = *(int *)((long)param_2 + 0x1c) + 0x1fU >> 5; local_44 = uVar2; if (uVar1 < uVar2) { local_44 = uVar1; } puVar3 = (uint *)*param_1 + local_44; local_28 = (uint *)*param_2; local_20 = (uint *)*param_1; while (local_20 < puVar3) { *local_20 = *local_28 & *local_20; local_28 = local_28 + 1; local_20 = local_20 + 1; } if (uVar2 <= uVar1) { local_20[-1] = (*(uint *)(param_2 + 3) ^ 0xffffffff) & local_20[-1]; while (local_20 < puVar3 + (uVar1 - uVar2)) { *local_20 = 0; local_20 = local_20 + 1; } } return; }
115
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan()
monkey531[P]llama/common/./json.hpp
token_type scan() { // initially, skip the BOM if (position.chars_read_total == 0 && !skip_bom()) { error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return token_type::parse_error; } // read next character and ignore whitespace skip_whitespace(); // ignore comments while (ignore_comments && current == '/') { if (!scan_comment()) { return token_type::parse_error; } // skip following whitespace skip_whitespace(); } switch (current) { // structural characters case '[': return token_type::begin_array; case ']': return token_type::end_array; case '{': return token_type::begin_object; case '}': return token_type::end_object; case ':': return token_type::name_separator; case ',': return token_type::value_separator; // literals case 't': { std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); } case 'f': { std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); } case 'n': { std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); } // string case '\"': return scan_string(); // number case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return scan_number(); // end of input (the null byte is needed when parsing from // string literals) case '\0': case char_traits<char_type>::eof(): return token_type::end_of_input; // error default: error_message = "invalid literal"; return token_type::parse_error; } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan(): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx cmpq $0x0, 0x20(%rdi) jne 0x35fb5 movq %rbx, %rdi callq 0x36184 testb %al, %al je 0x3608d movabsq $0x100002600, %r14 # imm = 0x100002600 movq %rbx, %rdi callq 0x1ac7c movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x35fff btq %rax, %r14 jb 0x35fbf jmp 0x35fff movq %rbx, %rdi callq 0x361c6 testb %al, %al je 0x36098 movq %rbx, %rdi callq 0x1ac7c movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x35fff btq %rax, %r14 jb 0x35fe8 cmpl $0x2f, %eax jne 0x3600a cmpb $0x0, 0x10(%rbx) jne 0x35fd8 cmpl $0x5a, %eax jg 0x3603c leal -0x22(%rax), %ecx cmpl $0x18, %ecx ja 0x360eb leaq 0x791d2(%rip), %rax # 0xaf1f4 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rbx, %rdi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmp 0x36242 cmpl $0x6d, %eax jle 0x360a7 cmpl $0x7a, %eax jg 0x360f9 cmpl $0x6e, %eax je 0x36118 cmpl $0x74, %eax jne 0x36148 movl $0x65757274, 0xc(%rsp) # imm = 0x65757274 movl $0x1, %r14d movq %rbx, %rdi callq 0x1ac7c cmpb %al, 0xc(%rsp,%r14) jne 0x36148 incq %r14 cmpq $0x4, %r14 jne 0x3606a movl $0x1, %eax jmp 0x3609d leaq 0x79e6b(%rip), %rax # 0xafeff movq %rax, 0x70(%rbx) movl $0xe, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq cmpl $0x5b, %eax je 0x36168 cmpl $0x5d, %eax je 0x3615e cmpl $0x66, %eax jne 0x36148 xorl %r14d, %r14d leaq 0x7c754(%rip), %r15 # 0xb2820 movq %rbx, %rdi callq 0x1ac7c cmpb %al, 0x1(%r14,%r15) jne 0x36148 incq %r14 movl $0x2, %eax cmpq $0x4, %r14 jne 0x360cc jmp 0x3609d incl %eax cmpl $0x2, %eax jae 0x36148 movl $0xf, %eax jmp 0x3609d cmpl $0x7b, %eax je 0x36154 cmpl $0x7d, %eax jne 0x36148 movl $0xb, %eax jmp 0x3609d movl $0xc, %eax jmp 0x3609d movl $0xd, %eax jmp 0x3609d movl $0x6c6c756e, 0x8(%rsp) # imm = 0x6C6C756E movl $0x1, %r14d movq %rbx, %rdi callq 0x1ac7c cmpb %al, 0x8(%rsp,%r14) jne 0x36148 incq %r14 cmpq $0x4, %r14 jne 0x36126 movl $0x3, %eax jmp 0x3609d leaq 0x79ddd(%rip), %rax # 0xaff2c jmp 0x36094 movl $0x9, %eax jmp 0x3609d movl $0xa, %eax jmp 0x3609d movl $0x8, %eax jmp 0x3609d movq %rbx, %rdi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmp 0x1a876 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdi cmp qword ptr [rdi+20h], 0 jnz short loc_35FB5 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(void) test al, al jz loc_3608D loc_35FB5: mov r14, 100002600h loc_35FBF: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov eax, [rbx+14h] cmp rax, 20h ; ' ' ja short loc_35FFF bt r14, rax jb short loc_35FBF jmp short loc_35FFF loc_35FD8: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(void) test al, al jz loc_36098 loc_35FE8: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov eax, [rbx+14h] cmp rax, 20h ; ' ' ja short loc_35FFF bt r14, rax jb short loc_35FE8 loc_35FFF: cmp eax, 2Fh ; '/' jnz short loc_3600A cmp byte ptr [rbx+10h], 0 jnz short loc_35FD8 loc_3600A: cmp eax, 5Ah ; 'Z' jg short loc_3603C lea ecx, [rax-22h]; switch 25 cases cmp ecx, 18h ja def_36029; jumptable 0000000000036029 default case lea rax, jpt_36029 movsxd rcx, ds:(jpt_36029 - 0AF1F4h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_3602B: mov rdi, rbx; jumptable 0000000000036029 cases 45,48-57 add rsp, 10h pop rbx pop r14 pop r15 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(void) loc_3603C: cmp eax, 6Dh ; 'm' jle short loc_360A7 cmp eax, 7Ah ; 'z' jg loc_360F9 cmp eax, 6Eh ; 'n' jz loc_36118 cmp eax, 74h ; 't' jnz loc_36148; jumptable 0000000000036029 cases 35-43,46,47 mov [rsp+28h+var_1C], 65757274h mov r14d, 1 loc_3606A: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp byte ptr [rsp+r14+28h+var_1C], al jnz loc_36148; jumptable 0000000000036029 cases 35-43,46,47 inc r14 cmp r14, 4 jnz short loc_3606A mov eax, 1 jmp short loc_3609D loc_3608D: lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "... loc_36094: mov [rbx+70h], rax loc_36098: mov eax, 0Eh loc_3609D: add rsp, 10h pop rbx pop r14 pop r15 retn loc_360A7: cmp eax, 5Bh ; '[' jz loc_36168 cmp eax, 5Dh ; ']' jz loc_3615E cmp eax, 66h ; 'f' jnz loc_36148; jumptable 0000000000036029 cases 35-43,46,47 xor r14d, r14d lea r15, aFalse_0; "false" loc_360CC: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp [r14+r15+1], al jnz short loc_36148; jumptable 0000000000036029 cases 35-43,46,47 inc r14 mov eax, 2 cmp r14, 4 jnz short loc_360CC jmp short loc_3609D def_36029: inc eax; jumptable 0000000000036029 default case cmp eax, 2 jnb short loc_36148; jumptable 0000000000036029 cases 35-43,46,47 mov eax, 0Fh jmp short loc_3609D loc_360F9: cmp eax, 7Bh ; '{' jz short loc_36154 cmp eax, 7Dh ; '}' jnz short loc_36148; jumptable 0000000000036029 cases 35-43,46,47 mov eax, 0Bh jmp short loc_3609D loc_3610A: mov eax, 0Ch; jumptable 0000000000036029 case 58 jmp short loc_3609D loc_36111: mov eax, 0Dh; jumptable 0000000000036029 case 44 jmp short loc_3609D loc_36118: mov [rsp+28h+var_20], 6C6C756Eh mov r14d, 1 loc_36126: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp byte ptr [rsp+r14+28h+var_20], al jnz short loc_36148; jumptable 0000000000036029 cases 35-43,46,47 inc r14 cmp r14, 4 jnz short loc_36126 mov eax, 3 jmp loc_3609D loc_36148: lea rax, aInvalidLiteral; jumptable 0000000000036029 cases 35-43,46,47 jmp loc_36094 loc_36154: mov eax, 9 jmp loc_3609D loc_3615E: mov eax, 0Ah jmp loc_3609D loc_36168: mov eax, 8 jmp loc_3609D loc_36172: mov rdi, rbx; jumptable 0000000000036029 case 34 add rsp, 10h pop rbx pop r14 pop r15 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(void)
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan( __m128i *a1) { long long v1; // r14 unsigned long long v2; // rax long long result; // rax long long v4; // r14 const char *v5; // rax long long v6; // r14 long long v7; // r14 int v8; // [rsp+8h] [rbp-20h] _DWORD v9[7]; // [rsp+Ch] [rbp-1Ch] if ( a1[2].m128i_i64[0] || (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(a1) ) { v1 = 0x100002600LL; do { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v2 = a1[1].m128i_u32[1]; } while ( v2 <= 0x20 && _bittest64(&v1, v2) ); while ( (_DWORD)v2 == 47 && a1[1].m128i_i8[0] ) { if ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(a1) ) return 14LL; do { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v2 = a1[1].m128i_u32[1]; } while ( v2 <= 0x20 && _bittest64(&v1, v2) ); } if ( (int)v2 <= 90 ) { switch ( (int)v2 ) { case '"': result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string((long long)a1); break; case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case '.': case '/': goto LABEL_45; case ',': result = 13LL; break; case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(a1); break; case ':': result = 12LL; break; default: if ( (unsigned int)(v2 + 1) >= 2 ) goto LABEL_45; result = 15LL; break; } return result; } if ( (int)v2 <= 109 ) { switch ( (_DWORD)v2 ) { case '[': return 8LL; case ']': return 10LL; case 'f': v6 = 0LL; while ( aFalse_0[v6 + 1] == (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) ) { ++v6; result = 2LL; if ( v6 == 4 ) return result; } break; } } else if ( (int)v2 > 122 ) { if ( (_DWORD)v2 == 123 ) return 9LL; if ( (_DWORD)v2 == 125 ) return 11LL; } else if ( (_DWORD)v2 == 110 ) { v8 = 1819047278; v7 = 1LL; while ( *((_BYTE *)&v9[-1] + v7) == (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) ) { if ( ++v7 == 4 ) return 3LL; } } else if ( (_DWORD)v2 == 116 ) { v9[0] = 1702195828; v4 = 1LL; while ( *((_BYTE *)v9 + v4) == (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) ) { if ( ++v4 == 4 ) return 1LL; } } LABEL_45: v5 = "invalid literal"; } else { v5 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; } a1[7].m128i_i64[0] = (long long)v5; return 14LL; }
scan: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CMP qword ptr [RDI + 0x20],0x0 JNZ 0x00135fb5 MOV RDI,RBX CALL 0x00136184 TEST AL,AL JZ 0x0013608d LAB_00135fb5: MOV R14,0x100002600 LAB_00135fbf: MOV RDI,RBX CALL 0x0011ac7c MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00135fff BT R14,RAX JC 0x00135fbf JMP 0x00135fff LAB_00135fd8: MOV RDI,RBX CALL 0x001361c6 TEST AL,AL JZ 0x00136098 LAB_00135fe8: MOV RDI,RBX CALL 0x0011ac7c MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00135fff BT R14,RAX JC 0x00135fe8 LAB_00135fff: CMP EAX,0x2f JNZ 0x0013600a CMP byte ptr [RBX + 0x10],0x0 JNZ 0x00135fd8 LAB_0013600a: CMP EAX,0x5a JG 0x0013603c LEA ECX,[RAX + -0x22] CMP ECX,0x18 JA 0x001360eb LEA RAX,[0x1af1f4] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_2d: MOV RDI,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 JMP 0x00136242 LAB_0013603c: CMP EAX,0x6d JLE 0x001360a7 CMP EAX,0x7a JG 0x001360f9 CMP EAX,0x6e JZ 0x00136118 CMP EAX,0x74 JNZ 0x00136148 MOV dword ptr [RSP + 0xc],0x65757274 MOV R14D,0x1 LAB_0013606a: MOV RDI,RBX CALL 0x0011ac7c CMP byte ptr [RSP + R14*0x1 + 0xc],AL JNZ 0x00136148 INC R14 CMP R14,0x4 JNZ 0x0013606a MOV EAX,0x1 JMP 0x0013609d LAB_0013608d: LEA RAX,[0x1afeff] LAB_00136094: MOV qword ptr [RBX + 0x70],RAX LAB_00136098: MOV EAX,0xe LAB_0013609d: ADD RSP,0x10 POP RBX POP R14 POP R15 RET LAB_001360a7: CMP EAX,0x5b JZ 0x00136168 CMP EAX,0x5d JZ 0x0013615e CMP EAX,0x66 JNZ 0x00136148 XOR R14D,R14D LEA R15,[0x1b2820] LAB_001360cc: MOV RDI,RBX CALL 0x0011ac7c CMP byte ptr [R14 + R15*0x1 + 0x1],AL JNZ 0x00136148 INC R14 MOV EAX,0x2 CMP R14,0x4 JNZ 0x001360cc JMP 0x0013609d default: INC EAX CMP EAX,0x2 JNC 0x00136148 MOV EAX,0xf JMP 0x0013609d LAB_001360f9: CMP EAX,0x7b JZ 0x00136154 CMP EAX,0x7d JNZ 0x00136148 MOV EAX,0xb JMP 0x0013609d caseD_3a: MOV EAX,0xc JMP 0x0013609d caseD_2c: MOV EAX,0xd JMP 0x0013609d LAB_00136118: MOV dword ptr [RSP + 0x8],0x6c6c756e MOV R14D,0x1 LAB_00136126: MOV RDI,RBX CALL 0x0011ac7c CMP byte ptr [RSP + R14*0x1 + 0x8],AL JNZ 0x00136148 INC R14 CMP R14,0x4 JNZ 0x00136126 MOV EAX,0x3 JMP 0x0013609d caseD_23: LEA RAX,[0x1aff2c] JMP 0x00136094 LAB_00136154: MOV EAX,0x9 JMP 0x0013609d LAB_0013615e: MOV EAX,0xa JMP 0x0013609d LAB_00136168: MOV EAX,0x8 JMP 0x0013609d caseD_22: MOV RDI,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 JMP 0x0011a876
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { char cVar1; int iVar2; ulong uVar3; int8 uVar4; char *pcVar5; long lVar6; char local_20 [8]; if ((*(long *)(this + 0x20) != 0) || (cVar1 = skip_bom(this), cVar1 != '\0')) { do { get(this); uVar3 = (ulong)*(uint *)(this + 0x14); if (0x20 < uVar3) break; } while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0); do { iVar2 = (int)uVar3; if ((iVar2 != 0x2f) || (this[0x10] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0)) goto LAB_0013600a; cVar1 = scan_comment(this); if (cVar1 == '\0') goto LAB_00136098; do { get(this); uVar3 = (ulong)*(uint *)(this + 0x14); if (0x20 < uVar3) break; } while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0); } while( true ); } pcVar5 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; goto LAB_00136094; LAB_0013600a: if (0x5a < iVar2) { if (iVar2 < 0x6e) { if (iVar2 == 0x5b) { return 8; } if (iVar2 == 0x5d) { return 10; } if (iVar2 == 0x66) { lVar6 = 0; while (cVar1 = get(this), "false"[lVar6 + 1] == cVar1) { lVar6 = lVar6 + 1; if (lVar6 == 4) { return 2; } } } } else if (iVar2 < 0x7b) { if (iVar2 == 0x6e) { builtin_strncpy(local_20,"null",4); lVar6 = 1; while (cVar1 = get(this), local_20[lVar6] == cVar1) { lVar6 = lVar6 + 1; if (lVar6 == 4) { return 3; } } } else if (iVar2 == 0x74) { builtin_strncpy(local_20 + 4,"true",4); lVar6 = 1; while (cVar1 = get(this), local_20[lVar6 + 4] == cVar1) { lVar6 = lVar6 + 1; if (lVar6 == 4) { return 1; } } } } else { if (iVar2 == 0x7b) { return 9; } if (iVar2 == 0x7d) { return 0xb; } } goto switchD_00136029_caseD_23; } switch(iVar2) { case 0x22: uVar4 = scan_string(this); return uVar4; case 0x2c: uVar4 = 0xd; break; case 0x2d: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar4 = scan_number(this); return uVar4; case 0x3a: uVar4 = 0xc; break; default: if (iVar2 + 1U < 2) { return 0xf; } case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2e: case 0x2f: switchD_00136029_caseD_23: pcVar5 = "invalid literal"; LAB_00136094: *(char **)(this + 0x70) = pcVar5; LAB_00136098: uVar4 = 0xe; } return uVar4; }
116
js_cond_timedwait
bluesky950520[P]quickjs/cutils.c
int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout) { int r; struct timespec ts; #if !defined(__APPLE__) timeout += js__hrtime_ns(); #endif ts.tv_sec = timeout / NANOSEC; ts.tv_nsec = timeout % NANOSEC; #if defined(__APPLE__) && defined(__MACH__) r = pthread_cond_timedwait_relative_np(cond, mutex, &ts); #else r = pthread_cond_timedwait(cond, mutex, &ts); #endif if (r == 0) return 0; if (r == ETIMEDOUT) return -1; abort(); /* Pacify some compilers. */ return -1; }
O0
c
js_cond_timedwait: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) callq 0x20e60 addq 0x18(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rax, (%rsp) movq 0x18(%rsp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rdx, 0x8(%rsp) movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movq %rsp, %rdx callq 0xe730 movl %eax, 0x14(%rsp) cmpl $0x0, 0x14(%rsp) jne 0x210e0 movl $0x0, 0x34(%rsp) jmp 0x210f6 cmpl $0x6e, 0x14(%rsp) jne 0x210f1 movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x210f6 callq 0xe090 movl 0x34(%rsp), %eax addq $0x38, %rsp retq nop
js_cond_timedwait: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx call js__hrtime_ns add rax, [rsp+38h+var_20] mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rsp+38h+var_38], rax mov rax, [rsp+38h+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rsp+38h+var_30], rdx mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] mov rdx, rsp call _pthread_cond_timedwait mov [rsp+38h+var_24], eax cmp [rsp+38h+var_24], 0 jnz short loc_210E0 mov [rsp+38h+var_4], 0 jmp short loc_210F6 loc_210E0: cmp [rsp+38h+var_24], 6Eh ; 'n' jnz short loc_210F1 mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_210F6 loc_210F1: call _abort loc_210F6: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long js_cond_timedwait(long long a1, long long a2, long long a3) { _QWORD v4[2]; // [rsp+0h] [rbp-38h] BYREF int v5; // [rsp+14h] [rbp-24h] unsigned long long v6; // [rsp+18h] [rbp-20h] long long v7; // [rsp+20h] [rbp-18h] long long v8; // [rsp+28h] [rbp-10h] v8 = a1; v7 = a2; v6 = a3 + js__hrtime_ns(); v4[0] = v6 / 0x3B9ACA00; v4[1] = v6 % 0x3B9ACA00; v5 = pthread_cond_timedwait(a1, a2, v4); if ( v5 ) { if ( v5 != 110 ) abort(); return (unsigned int)-1; } else { return 0; } }
js_cond_timedwait: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX CALL 0x00120e60 ADD RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x18] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RSP + 0x8],RDX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,RSP CALL 0x0010e730 MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RSP + 0x14],0x0 JNZ 0x001210e0 MOV dword ptr [RSP + 0x34],0x0 JMP 0x001210f6 LAB_001210e0: CMP dword ptr [RSP + 0x14],0x6e JNZ 0x001210f1 MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x001210f6 LAB_001210f1: CALL 0x0010e090 LAB_001210f6: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 js_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,long param_3) { long lVar1; timespec local_38; int local_24; ulong local_20; pthread_mutex_t *local_18; pthread_cond_t *local_10; int4 local_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar1 = js__hrtime_ns(); local_20 = lVar1 + local_20; local_38.tv_sec = local_20 / 1000000000; local_38.tv_nsec = local_20 % 1000000000; local_24 = pthread_cond_timedwait(local_10,local_18,&local_38); if (local_24 == 0) { local_4 = 0; } else { if (local_24 != 0x6e) { /* WARNING: Subroutine does not return */ abort(); } local_4 = 0xffffffff; } return local_4; }
117
js_cond_timedwait
bluesky950520[P]quickjs/cutils.c
int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout) { int r; struct timespec ts; #if !defined(__APPLE__) timeout += js__hrtime_ns(); #endif ts.tv_sec = timeout / NANOSEC; ts.tv_nsec = timeout % NANOSEC; #if defined(__APPLE__) && defined(__MACH__) r = pthread_cond_timedwait_relative_np(cond, mutex, &ts); #else r = pthread_cond_timedwait(cond, mutex, &ts); #endif if (r == 0) return 0; if (r == ETIMEDOUT) return -1; abort(); /* Pacify some compilers. */ return -1; }
O1
c
js_cond_timedwait: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x1c6e0 movq %rax, %rcx addq %rbx, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx movq %rsp, %rax movq %rdx, (%rax) imulq $0x3b9aca00, %rdx, %rdx # imm = 0x3B9ACA00 subq %rdx, %rcx movq %rcx, 0x8(%rax) movq %r15, %rdi movq %r14, %rsi movq %rax, %rdx callq 0xe740 testl %eax, %eax je 0x1c885 cmpl $0x6e, %eax jne 0x1c88f movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq callq 0xe090
js_cond_timedwait: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi call js__hrtime_ns mov rcx, rax add rcx, rbx mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh mov rax, rsp mov [rax], rdx imul rdx, 3B9ACA00h sub rcx, rdx mov [rax+8], rcx mov rdi, r15 mov rsi, r14 mov rdx, rax call _pthread_cond_timedwait test eax, eax jz short loc_1C885 cmp eax, 6Eh ; 'n' jnz short loc_1C88F mov eax, 0FFFFFFFFh loc_1C885: add rsp, 10h pop rbx pop r14 pop r15 retn loc_1C88F: call _abort
long long js_cond_timedwait(long long a1, long long a2, long long a3) { long long v4; // rax long long result; // rax _QWORD v6[5]; // [rsp+0h] [rbp-28h] BYREF v4 = js__hrtime_ns(); v6[0] = (a3 + v4) / 0x3B9ACA00uLL; v6[1] = (a3 + v4) % 0x3B9ACA00uLL; result = pthread_cond_timedwait(a1, a2, v6); if ( (_DWORD)result ) { if ( (_DWORD)result != 110 ) abort(a1); return 0xFFFFFFFFLL; } return result; }
js_cond_timedwait: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x0011c6e0 MOV RCX,RAX ADD RCX,RBX MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb MOV RAX,RSP MOV qword ptr [RAX],RDX IMUL RDX,RDX,0x3b9aca00 SUB RCX,RDX MOV qword ptr [RAX + 0x8],RCX MOV RDI,R15 MOV RSI,R14 MOV RDX,RAX CALL 0x0010e740 TEST EAX,EAX JZ 0x0011c885 CMP EAX,0x6e JNZ 0x0011c88f MOV EAX,0xffffffff LAB_0011c885: ADD RSP,0x10 POP RBX POP R14 POP R15 RET LAB_0011c88f: CALL 0x0010e090
int js_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,long param_3) { int iVar1; long lVar2; timespec local_28; lVar2 = js__hrtime_ns(); local_28.tv_sec = (ulong)(lVar2 + param_3) / 1000000000; local_28.tv_nsec = (ulong)(lVar2 + param_3) % 1000000000; iVar1 = pthread_cond_timedwait(param_1,param_2,&local_28); if (iVar1 != 0) { if (iVar1 != 0x6e) { /* WARNING: Subroutine does not return */ abort(); } iVar1 = -1; } return iVar1; }
118
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset()
hkr04[P]cpp-mcp/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset(): pushq %rax movq %rdi, %rax andq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x12cbe movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x12b34 popq %rax retq movq %rax, %rdi callq 0x68a2 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi and qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_12CBE mov [rax+40h], rcx loc_12CBE: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI AND qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x00112cbe MOV qword ptr [RAX + 0x40],RCX LAB_00112cbe: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_00112cc8: CALL 0x00112b34 POP RAX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::reset() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 00112cc8 to 00112ccc has its CatchHandler @ 00112ccf */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
119
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset()
hkr04[P]cpp-mcp/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset(): pushq %rax movq %rdi, %rax movq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x15583 movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x15438 popq %rax retq movq %rax, %rdi callq 0x786b
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi mov qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_15583 mov [rax+40h], rcx loc_15583: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI MOV qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x00115583 MOV qword ptr [RAX + 0x40],RCX LAB_00115583: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_0011558d: CALL 0x00115438 POP RAX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::reset() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 0011558d to 00115591 has its CatchHandler @ 00115594 */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
120
mysql_reset_connection
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_reset_connection(MYSQL *mysql) { int rc; /* check if connection handler is active */ if (IS_CONNHDLR_ACTIVE(mysql)) { if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reset) return(mysql->extension->conn_hdlr->plugin->reset(mysql)); } /* skip result sets */ if (mysql->status == MYSQL_STATUS_USE_RESULT || mysql->status == MYSQL_STATUS_GET_RESULT || mysql->status & SERVER_MORE_RESULTS_EXIST) { mthd_my_skip_result(mysql); mysql->status= MYSQL_STATUS_READY; } rc= ma_simple_command(mysql, COM_RESET_CONNECTION, 0, 0, 0, 0); if (rc && mysql->options.reconnect) { /* There is no big sense in resetting but we need reconnect */ rc= ma_simple_command(mysql, COM_RESET_CONNECTION,0,0,0,0); } if (rc) return 1; /* reset the connection in all active statements */ ma_invalidate_stmts(mysql, "mysql_reset_connection()"); free_old_query(mysql); mysql->status= MYSQL_STATUS_READY; mysql->affected_rows= ~(my_ulonglong)0; mysql->insert_id= 0; return 0; }
O0
c
mysql_reset_connection: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x4f0(%rax) je 0x469b2 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax cmpq $0x0, (%rax) je 0x469b2 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax cmpq $0x0, (%rax) je 0x469b0 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax cmpq $0x0, 0x80(%rax) je 0x469b0 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) jmp 0x46aa4 jmp 0x469b2 movq -0x10(%rbp), %rax cmpl $0x2, 0x488(%rax) je 0x469de movq -0x10(%rbp), %rax cmpl $0x1, 0x488(%rax) je 0x469de movq -0x10(%rbp), %rax movl 0x488(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x469f5 movq -0x10(%rbp), %rdi callq 0x3af80 movq -0x10(%rbp), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rdi movl $0x1f, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x3ad00 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x46a49 movq -0x10(%rbp), %rax movsbl 0x43b(%rax), %eax cmpl $0x0, %eax je 0x46a49 movq -0x10(%rbp), %rdi movl $0x1f, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x3ad00 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x46a58 movl $0x1, -0x4(%rbp) jmp 0x46aa4 movq -0x10(%rbp), %rdi leaq 0x84599(%rip), %rsi # 0xcaffc callq 0x41ab0 movq -0x10(%rbp), %rdi callq 0x42050 movq -0x10(%rbp), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x340(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
mysql_reset_connection: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp qword ptr [rax+4F0h], 0 jz short loc_469B2 mov rax, [rbp+var_10] mov rax, [rax+4F0h] cmp qword ptr [rax], 0 jz short loc_469B2 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] cmp qword ptr [rax], 0 jz short loc_469B0 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] cmp qword ptr [rax+80h], 0 jz short loc_469B0 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] mov rax, [rax+80h] mov rdi, [rbp+var_10] call rax mov [rbp+var_4], eax jmp loc_46AA4 loc_469B0: jmp short $+2 loc_469B2: mov rax, [rbp+var_10] cmp dword ptr [rax+488h], 2 jz short loc_469DE mov rax, [rbp+var_10] cmp dword ptr [rax+488h], 1 jz short loc_469DE mov rax, [rbp+var_10] mov eax, [rax+488h] and eax, 8 cmp eax, 0 jz short loc_469F5 loc_469DE: mov rdi, [rbp+var_10] call mthd_my_skip_result mov rax, [rbp+var_10] mov dword ptr [rax+488h], 0 loc_469F5: mov rdi, [rbp+var_10] mov esi, 1Fh xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_46A49 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+43Bh] cmp eax, 0 jz short loc_46A49 mov rdi, [rbp+var_10] mov esi, 1Fh xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command mov [rbp+var_14], eax loc_46A49: cmp [rbp+var_14], 0 jz short loc_46A58 mov [rbp+var_4], 1 jmp short loc_46AA4 loc_46A58: mov rdi, [rbp+var_10] lea rsi, aMysqlResetConn; "mysql_reset_connection()" call ma_invalidate_stmts mov rdi, [rbp+var_10] call free_old_query mov rax, [rbp+var_10] mov dword ptr [rax+488h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov qword ptr [rax+340h], 0 mov [rbp+var_4], 0 loc_46AA4: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long mysql_reset_connection(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { int v7; // [rsp+Ch] [rbp-14h] if ( *(_QWORD *)(a1 + 1264) && **(_QWORD **)(a1 + 1264) && ***(_QWORD ***)(a1 + 1264) && *(_QWORD *)(***(_QWORD ***)(a1 + 1264) + 128LL) ) { return (unsigned int)(*(long long ( **)(long long))(***(_QWORD ***)(a1 + 1264) + 128LL))(a1); } else { if ( *(_DWORD *)(a1 + 1160) == 2 || *(_DWORD *)(a1 + 1160) == 1 || (*(_DWORD *)(a1 + 1160) & 8) != 0 ) { mthd_my_skip_result(a1, a2, a3, a4, a5, a6); *(_DWORD *)(a1 + 1160) = 0; } v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL); if ( v7 && *(_BYTE *)(a1 + 1083) ) v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL); if ( v7 ) { return 1; } else { ma_invalidate_stmts(a1, (long long)"mysql_reset_connection()"); free_old_query(a1); *(_DWORD *)(a1 + 1160) = 0; *(_QWORD *)(a1 + 824) = -1LL; *(_QWORD *)(a1 + 832) = 0LL; return 0; } } }
mysql_reset_connection: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x4f0],0x0 JZ 0x001469b2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] CMP qword ptr [RAX],0x0 JZ 0x001469b2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX],0x0 JZ 0x001469b0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x80],0x0 JZ 0x001469b0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x00146aa4 LAB_001469b0: JMP 0x001469b2 LAB_001469b2: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x2 JZ 0x001469de MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x1 JZ 0x001469de MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x488] AND EAX,0x8 CMP EAX,0x0 JZ 0x001469f5 LAB_001469de: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013af80 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x0 LAB_001469f5: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1f XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x0013ad00 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00146a49 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x43b] CMP EAX,0x0 JZ 0x00146a49 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1f XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x0013ad00 MOV dword ptr [RBP + -0x14],EAX LAB_00146a49: CMP dword ptr [RBP + -0x14],0x0 JZ 0x00146a58 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00146aa4 LAB_00146a58: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1caffc] CALL 0x00141ab0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00142050 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x338],-0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x340],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_00146aa4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 mysql_reset_connection(long param_1) { int local_1c; int4 local_c; if ((((*(long *)(param_1 + 0x4f0) == 0) || (**(long **)(param_1 + 0x4f0) == 0)) || (*(long *)**(int8 **)(param_1 + 0x4f0) == 0)) || (*(long *)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80) == 0)) { if (((*(int *)(param_1 + 0x488) == 2) || (*(int *)(param_1 + 0x488) == 1)) || ((*(uint *)(param_1 + 0x488) & 8) != 0)) { mthd_my_skip_result(param_1); *(int4 *)(param_1 + 0x488) = 0; } local_1c = ma_simple_command(param_1,0x1f,0,0,0); if ((local_1c != 0) && (*(char *)(param_1 + 0x43b) != '\0')) { local_1c = ma_simple_command(param_1,0x1f,0,0,0); } if (local_1c == 0) { ma_invalidate_stmts(param_1,"mysql_reset_connection()"); free_old_query(param_1); *(int4 *)(param_1 + 0x488) = 0; *(int8 *)(param_1 + 0x338) = 0xffffffffffffffff; *(int8 *)(param_1 + 0x340) = 0; local_c = 0; } else { local_c = 1; } } else { local_c = (**(code **)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80))(param_1); } return local_c; }
121
ftxui::separator(ftxui::Pixel)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/separator.cpp
Element separator(Pixel pixel) { return std::make_shared<SeparatorWithPixel>(std::move(pixel)); }
O3
cpp
ftxui::separator(ftxui::Pixel): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r12 movq %rdi, %r14 movl $0xa0, %edi callq 0xb3e0 movq %rax, %rbx movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbx) leaq 0x3326a(%rip), %rax # 0x57748 movq %rax, (%rbx) leaq 0x10(%rbx), %r15 movzwl (%r12), %eax leaq 0x18(%rsp), %r13 movw %ax, -0x18(%r13) movq %r13, -0x10(%r13) movq 0x8(%r12), %rcx leaq 0x18(%r12), %rax cmpq %rax, %rcx je 0x24516 movq %rcx, 0x8(%rsp) movq (%rax), %rcx movq %rcx, 0x18(%rsp) jmp 0x2451e movups (%rax), %xmm0 movups %xmm0, (%r13) movq 0x10(%r12), %rcx movq %rcx, 0x10(%rsp) movq %rax, 0x8(%r12) movq $0x0, 0x10(%r12) movb $0x0, 0x18(%r12) movq 0x28(%r12), %rax movq %rax, 0x28(%rsp) movq %r15, %rdi callq 0x23de0 movl $0x0, 0x6c(%rbx) leaq 0x3323c(%rip), %rax # 0x57798 movq %rax, 0x10(%rbx) movzwl (%rsp), %eax movw %ax, 0x70(%rbx) movq %rbx, %rcx addq $0x88, %rcx movq %rcx, 0x78(%rbx) movq 0x8(%rsp), %rdx cmpq %r13, %rdx je 0x24592 movq %rdx, 0x78(%rbx) movq 0x18(%rsp), %rcx movq %rcx, 0x88(%rbx) jmp 0x2459a movups (%r13), %xmm0 movups %xmm0, (%rcx) movq 0x10(%rsp), %rcx movq %rcx, 0x80(%rbx) movq 0x28(%rsp), %rcx movq %rcx, 0x98(%rbx) orb $-0x80, %al movb %al, 0x70(%rbx) movq %r15, (%r14) movq %rbx, 0x8(%r14) movq %r14, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x245e9 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movl $0xa0, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui9separatorENS_5PixelE: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r12, rsi mov r14, rdi mov edi, 0A0h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, 100000001h mov [rbx+8], rax lea rax, off_57748 mov [rbx], rax lea r15, [rbx+10h] movzx eax, word ptr [r12] lea r13, [rsp+58h+var_40] mov [r13-18h], ax mov [r13-10h], r13 mov rcx, [r12+8] lea rax, [r12+18h] cmp rcx, rax jz short loc_24516 mov [rsp+58h+var_50], rcx mov rcx, [rax] mov [rsp+58h+var_40], rcx jmp short loc_2451E loc_24516: movups xmm0, xmmword ptr [rax] movups xmmword ptr [r13+0], xmm0 loc_2451E: mov rcx, [r12+10h] mov [rsp+58h+var_48], rcx mov [r12+8], rax mov qword ptr [r12+10h], 0 mov byte ptr [r12+18h], 0 mov rax, [r12+28h] mov [rsp+58h+var_30], rax mov rdi, r15; this call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void) mov dword ptr [rbx+6Ch], 0 lea rax, off_57798 mov [rbx+10h], rax movzx eax, [rsp+58h+var_58] mov [rbx+70h], ax mov rcx, rbx add rcx, 88h mov [rbx+78h], rcx mov rdx, [rsp+58h+var_50] cmp rdx, r13 jz short loc_24592 mov [rbx+78h], rdx mov rcx, [rsp+58h+var_40] mov [rbx+88h], rcx jmp short loc_2459A loc_24592: movups xmm0, xmmword ptr [r13+0] movups xmmword ptr [rcx], xmm0 loc_2459A: mov rcx, [rsp+58h+var_48] mov [rbx+80h], rcx mov rcx, [rsp+58h+var_30] mov [rbx+98h], rcx or al, 80h mov [rbx+70h], al mov [r14], r15 mov [r14+8], rbx mov rax, r14 add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_245E9 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_245E9: mov esi, 0A0h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
ftxui::Node ** ftxui::separator(ftxui::Node **a1, __int16 *a2) { long long v2; // rbx ftxui::Node *v3; // r15 __int128 *v4; // rax __int16 v6; // [rsp+0h] [rbp-58h] __int128 *v7; // [rsp+8h] [rbp-50h] long long v8; // [rsp+10h] [rbp-48h] __int128 v9; // [rsp+18h] [rbp-40h] BYREF long long v10; // [rsp+28h] [rbp-30h] v2 = operator new(0xA0uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = off_57748; v3 = (ftxui::Node *)(v2 + 16); v6 = *a2; v7 = &v9; v4 = (__int128 *)(a2 + 12); if ( *((__int16 **)a2 + 1) == a2 + 12 ) { v9 = *v4; } else { v7 = (__int128 *)*((_QWORD *)a2 + 1); *(_QWORD *)&v9 = *(_QWORD *)v4; } v8 = *((_QWORD *)a2 + 2); *((_QWORD *)a2 + 1) = v4; *((_QWORD *)a2 + 2) = 0LL; *((_BYTE *)a2 + 24) = 0; v10 = *((_QWORD *)a2 + 5); ftxui::Node::Node(v3); *(_DWORD *)(v2 + 108) = 0; *(_QWORD *)(v2 + 16) = off_57798; *(_WORD *)(v2 + 112) = v6; *(_QWORD *)(v2 + 120) = v2 + 136; if ( v7 == &v9 ) { *(_OWORD *)(v2 + 136) = v9; } else { *(_QWORD *)(v2 + 120) = v7; *(_QWORD *)(v2 + 136) = v9; } *(_QWORD *)(v2 + 128) = v8; *(_QWORD *)(v2 + 152) = v10; *(_BYTE *)(v2 + 112) = v6 | 0x80; *a1 = v3; a1[1] = (ftxui::Node *)v2; return a1; }
separator: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R12,RSI MOV R14,RDI MOV EDI,0xa0 CALL 0x0010b3e0 MOV RBX,RAX MOV RAX,0x100000001 MOV qword ptr [RBX + 0x8],RAX LEA RAX,[0x157748] MOV qword ptr [RBX],RAX LEA R15,[RBX + 0x10] MOVZX EAX,word ptr [R12] LEA R13,[RSP + 0x18] MOV word ptr [R13 + -0x18],AX MOV qword ptr [R13 + -0x10],R13 MOV RCX,qword ptr [R12 + 0x8] LEA RAX,[R12 + 0x18] CMP RCX,RAX JZ 0x00124516 MOV qword ptr [RSP + 0x8],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RCX JMP 0x0012451e LAB_00124516: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R13],XMM0 LAB_0012451e: MOV RCX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [R12 + 0x8],RAX MOV qword ptr [R12 + 0x10],0x0 MOV byte ptr [R12 + 0x18],0x0 MOV RAX,qword ptr [R12 + 0x28] MOV qword ptr [RSP + 0x28],RAX LAB_00124546: MOV RDI,R15 CALL 0x00123de0 LAB_0012454e: MOV dword ptr [RBX + 0x6c],0x0 LEA RAX,[0x157798] MOV qword ptr [RBX + 0x10],RAX MOVZX EAX,word ptr [RSP] MOV word ptr [RBX + 0x70],AX MOV RCX,RBX ADD RCX,0x88 MOV qword ptr [RBX + 0x78],RCX MOV RDX,qword ptr [RSP + 0x8] CMP RDX,R13 JZ 0x00124592 MOV qword ptr [RBX + 0x78],RDX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RBX + 0x88],RCX JMP 0x0012459a LAB_00124592: MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RCX],XMM0 LAB_0012459a: MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x80],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RBX + 0x98],RCX OR AL,0x80 MOV byte ptr [RBX + 0x70],AL MOV qword ptr [R14],R15 MOV qword ptr [R14 + 0x8],RBX MOV RAX,R14 ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* ftxui::separator(ftxui::Pixel) */ ftxui * __thiscall ftxui::separator(ftxui *this,int2 *param_2) { int8 *puVar1; int2 uVar2; int8 uVar3; int8 *puVar4; int8 *local_50; int8 local_40; int8 uStack_38; int8 local_30; puVar4 = (int8 *)operator_new(0xa0); puVar4[1] = 0x100000001; *puVar4 = &PTR___Sp_counted_ptr_inplace_00157748; uVar2 = *param_2; puVar1 = (int8 *)(param_2 + 0xc); if (*(int8 **)(param_2 + 4) == puVar1) { local_40 = *puVar1; uStack_38 = *(int8 *)(param_2 + 0x10); local_50 = &local_40; } else { local_40 = *puVar1; local_50 = *(int8 **)(param_2 + 4); } uVar3 = *(int8 *)(param_2 + 8); *(int8 **)(param_2 + 4) = puVar1; *(int8 *)(param_2 + 8) = 0; *(int1 *)(param_2 + 0xc) = 0; local_30 = *(int8 *)(param_2 + 0x14); /* try { // try from 00124546 to 0012454d has its CatchHandler @ 001245cf */ Node::Node((Node *)(puVar4 + 2)); *(int4 *)((long)puVar4 + 0x6c) = 0; puVar4[2] = &PTR__SeparatorWithPixel_00157798; *(int2 *)(puVar4 + 0xe) = uVar2; puVar4[0xf] = puVar4 + 0x11; if (local_50 == &local_40) { puVar4[0x11] = local_40; puVar4[0x12] = uStack_38; } else { puVar4[0xf] = local_50; puVar4[0x11] = local_40; } puVar4[0x10] = uVar3; puVar4[0x13] = local_30; *(byte *)(puVar4 + 0xe) = (byte)uVar2 | 0x80; *(Node **)this = (Node *)(puVar4 + 2); *(int8 **)(this + 8) = puVar4; return this; }
122
ma_real_read
eloqsql/libmariadb/libmariadb/ma_net.c
static ulong ma_real_read(NET *net, size_t *complen) { uchar *pos; ssize_t length; uint i; ulong len=packet_error; size_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE : NET_HEADER_SIZE); *complen = 0; net->reading_or_writing=1; pos = net->buff + net->where_b; /* net->packet -4 */ for (i=0 ; i < 2 ; i++) { while (remain > 0) { /* First read is done with non blocking mode */ if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L) { len= packet_error; net->error=2; /* Close socket */ goto end; } remain -= (ulong) length; pos+= (ulong) length; } if (i == 0) { /* First parts is packet length */ ulong helping; net->pkt_nr= net->buff[net->where_b + 3]; net->compress_pkt_nr= ++net->pkt_nr; #ifdef HAVE_COMPRESS if (net->compress) { /* complen is > 0 if package is really compressed */ *complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE])); } #endif len=uint3korr(net->buff+net->where_b); if (!len) goto end; helping = max(len,(ulong)*complen) + net->where_b; /* The necessary size of net->buff */ if (helping >= net->max_packet) { if (net_realloc(net, helping)) { len= packet_error; /* Return error */ goto end; } } pos=net->buff + net->where_b; remain = len; } } end: net->reading_or_writing=0; return(len); }
O0
c
ma_real_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movsbl 0x84(%rax), %edx movl $0x4, %eax movl $0x7, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax cltq movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movb $0x1, 0x80(%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x24(%rbp) cmpl $0x2, -0x24(%rbp) jae 0x49f61 jmp 0x49d87 cmpq $0x0, -0x38(%rbp) jbe 0x49de2 movq -0x8(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x24340 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jg 0x49dc5 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movb $0x2, 0x94(%rax) jmp 0x49f63 movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x49d87 cmpl $0x0, -0x24(%rbp) jne 0x49f51 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl 0x3(%rax,%rcx), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x60(%rax) movq -0x8(%rbp), %rax movl 0x60(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x60(%rax) movq -0x8(%rbp), %rax movl %ecx, 0x64(%rax) movq -0x8(%rbp), %rax cmpb $0x0, 0x84(%rax) je 0x49e7d movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl 0x4(%rax,%rcx), %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x5(%rcx,%rdx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x6(%rcx,%rdx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl (%rax,%rcx), %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x1(%rcx,%rdx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x2(%rcx,%rdx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, %eax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x49ed7 jmp 0x49f63 movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jbe 0x49eee movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x49ef9 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x50(%rcx), %rax jb 0x49f35 movq -0x8(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x4a000 cmpb $0x0, %al je 0x49f33 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) jmp 0x49f63 jmp 0x49f35 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x49f53 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x49d7b jmp 0x49f63 movq -0x8(%rbp), %rax movb $0x0, 0x80(%rax) movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
ma_real_read: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov eax, 0FFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_8] movsx edx, byte ptr [rax+84h] mov eax, 4 mov ecx, 7 cmp edx, 0 cmovnz eax, ecx cdqe mov [rbp+var_38], rax mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov byte ptr [rax+80h], 1 mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_18], rax mov [rbp+var_24], 0 loc_49D7B: cmp [rbp+var_24], 2 jnb loc_49F61 jmp short $+2 loc_49D87: cmp [rbp+var_38], 0 jbe short loc_49DE2 mov rax, [rbp+var_8] mov rdi, [rax] mov rsi, [rbp+var_18] mov rdx, [rbp+var_38] call ma_pvio_cache_read mov [rbp+var_20], rax cmp rax, 0 jg short loc_49DC5 mov eax, 0FFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_8] mov byte ptr [rax+94h], 2 jmp loc_49F63 loc_49DC5: mov rcx, [rbp+var_20] mov rax, [rbp+var_38] sub rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, [rbp+var_18] mov [rbp+var_18], rax jmp short loc_49D87 loc_49DE2: cmp [rbp+var_24], 0 jnz loc_49F51 mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx ecx, byte ptr [rax+rcx+3] mov rax, [rbp+var_8] mov [rax+60h], ecx mov rax, [rbp+var_8] mov ecx, [rax+60h] add ecx, 1 mov [rax+60h], ecx mov rax, [rbp+var_8] mov [rax+64h], ecx mov rax, [rbp+var_8] cmp byte ptr [rax+84h], 0 jz short loc_49E7D mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx eax, byte ptr [rax+rcx+4] mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+5] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+6] shl ecx, 10h add eax, ecx mov eax, eax mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx loc_49E7D: mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+2] shl ecx, 10h add eax, ecx mov eax, eax mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_49ED7 jmp loc_49F63 loc_49ED7: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] cmp rax, [rcx] jbe short loc_49EEE mov rax, [rbp+var_30] mov [rbp+var_48], rax jmp short loc_49EF9 loc_49EEE: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax loc_49EF9: mov rax, [rbp+var_48] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_8] cmp rax, [rcx+50h] jb short loc_49F35 mov rdi, [rbp+var_8] mov rsi, [rbp+var_40] call net_realloc cmp al, 0 jz short loc_49F33 mov eax, 0FFFFFFFFh mov [rbp+var_30], rax jmp short loc_49F63 loc_49F33: jmp short $+2 loc_49F35: mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_18], rax mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_49F51: jmp short $+2 loc_49F53: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_49D7B loc_49F61: jmp short $+2 loc_49F63: mov rax, [rbp+var_8] mov byte ptr [rax+80h], 0 mov rax, [rbp+var_30] add rsp, 50h pop rbp retn
unsigned long long ma_real_read(long long a1, unsigned long long *a2) { int v2; // eax int v3; // ecx long long v4; // rdx unsigned long long v6; // [rsp+8h] [rbp-48h] unsigned long long v7; // [rsp+10h] [rbp-40h] unsigned long long v8; // [rsp+18h] [rbp-38h] unsigned long long v9; // [rsp+20h] [rbp-30h] unsigned int i; // [rsp+2Ch] [rbp-24h] long long v11; // [rsp+30h] [rbp-20h] long long v12; // [rsp+38h] [rbp-18h] v9 = 0xFFFFFFFFLL; v2 = 4; if ( *(_BYTE *)(a1 + 132) ) v2 = 7; v8 = v2; *a2 = 0LL; *(_BYTE *)(a1 + 128) = 1; v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8); for ( i = 0; i < 2; ++i ) { while ( v8 ) { v11 = ma_pvio_cache_read(*(_QWORD **)a1, v12, v8); if ( v11 <= 0 ) { v9 = 0xFFFFFFFFLL; *(_BYTE *)(a1 + 148) = 2; goto LABEL_21; } v8 -= v11; v12 += v11; } if ( !i ) { *(_DWORD *)(a1 + 96) = *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 3LL); v3 = *(_DWORD *)(a1 + 96) + 1; *(_DWORD *)(a1 + 96) = v3; *(_DWORD *)(a1 + 100) = v3; if ( *(_BYTE *)(a1 + 132) ) *a2 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 6LL) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 5LL) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 4LL); v4 = *(_QWORD *)(a1 + 72); v9 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4); if ( !((*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4)) ) break; if ( v9 <= *a2 ) v6 = *a2; else v6 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 1LL) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72)); v7 = *(_QWORD *)(a1 + 72) + v6; if ( v7 >= *(_QWORD *)(a1 + 80) && (unsigned __int8)net_realloc(a1, v7) ) { v9 = 0xFFFFFFFFLL; break; } v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8); v8 = v9; } } LABEL_21: *(_BYTE *)(a1 + 128) = 0; return v9; }
ma_real_read: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x84] MOV EAX,0x4 MOV ECX,0x7 CMP EDX,0x0 CMOVNZ EAX,ECX CDQE MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x80],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_00149d7b: CMP dword ptr [RBP + -0x24],0x2 JNC 0x00149f61 JMP 0x00149d87 LAB_00149d87: CMP qword ptr [RBP + -0x38],0x0 JBE 0x00149de2 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00124340 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JG 0x00149dc5 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x94],0x2 JMP 0x00149f63 LAB_00149dc5: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX JMP 0x00149d87 LAB_00149de2: CMP dword ptr [RBP + -0x24],0x0 JNZ 0x00149f51 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX ECX,byte ptr [RAX + RCX*0x1 + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x60] ADD ECX,0x1 MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x64],ECX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x84],0x0 JZ 0x00149e7d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x4] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x5] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x6] SHL ECX,0x10 ADD EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_00149e7d: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00149ed7 JMP 0x00149f63 LAB_00149ed7: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JBE 0x00149eee MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX JMP 0x00149ef9 LAB_00149eee: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_00149ef9: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x50] JC 0x00149f35 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x40] CALL 0x0014a000 CMP AL,0x0 JZ 0x00149f33 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX JMP 0x00149f63 LAB_00149f33: JMP 0x00149f35 LAB_00149f35: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_00149f51: JMP 0x00149f53 LAB_00149f53: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00149d7b LAB_00149f61: JMP 0x00149f63 LAB_00149f63: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x50 POP RBP RET
ulong ma_real_read(int8 *param_1,ulong *param_2) { char cVar1; int iVar2; long lVar3; ulong local_50; ulong local_40; ulong local_38; uint local_2c; long local_20; local_38 = 0xffffffff; iVar2 = 4; if (*(char *)((long)param_1 + 0x84) != '\0') { iVar2 = 7; } local_40 = (ulong)iVar2; *param_2 = 0; *(int1 *)(param_1 + 0x10) = 1; local_20 = param_1[1] + param_1[9]; local_2c = 0; do { if (1 < local_2c) { LAB_00149f63: *(int1 *)(param_1 + 0x10) = 0; return local_38; } for (; local_40 != 0; local_40 = local_40 - lVar3) { lVar3 = ma_pvio_cache_read(*param_1,local_20,local_40); if (lVar3 < 1) { local_38 = 0xffffffff; *(int1 *)((long)param_1 + 0x94) = 2; goto LAB_00149f63; } local_20 = lVar3 + local_20; } if (local_2c == 0) { *(uint *)(param_1 + 0xc) = (uint)*(byte *)(param_1[1] + 3 + param_1[9]); iVar2 = *(int *)(param_1 + 0xc); *(int *)(param_1 + 0xc) = iVar2 + 1; *(int *)((long)param_1 + 100) = iVar2 + 1; if (*(char *)((long)param_1 + 0x84) != '\0') { *param_2 = (ulong)((uint)*(byte *)(param_1[1] + 4 + param_1[9]) + (uint)*(byte *)(param_1[1] + 5 + param_1[9]) * 0x100 + (uint)*(byte *)(param_1[1] + 6 + param_1[9]) * 0x10000); } local_40 = (ulong)((uint)*(byte *)(param_1[1] + param_1[9]) + (uint)*(byte *)(param_1[1] + 1 + param_1[9]) * 0x100 + (uint)*(byte *)(param_1[1] + 2 + param_1[9]) * 0x10000); local_38 = local_40; if (local_40 == 0) goto LAB_00149f63; local_50 = local_40; if (local_40 <= *param_2) { local_50 = *param_2; } if (((ulong)param_1[10] <= local_50 + param_1[9]) && (cVar1 = net_realloc(param_1,local_50 + param_1[9]), cVar1 != '\0')) { local_38 = 0xffffffff; goto LAB_00149f63; } local_20 = param_1[1] + param_1[9]; } local_2c = local_2c + 1; } while( true ); }
123
js_new_string8_len
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_string8_len(JSContext *ctx, const char *buf, int len) { JSString *str; str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; return JS_MKPTR(JS_TAG_STRING, str); }
O1
c
js_new_string8_len: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %rbx movl %edx, %esi xorl %edx, %edx callq 0x20b73 testq %rax, %rax je 0x20222 movq %rax, %r14 movq %rax, %rdi addq $0x18, %rdi movslq %ebp, %r15 movq %rbx, %rsi movq %r15, %rdx callq 0xe5b0 movb $0x0, 0x18(%r14,%r15) movq %r14, (%rsp) movq $-0x7, %rdx jmp 0x2022e movl $0x0, (%rsp) movl $0x6, %edx movq (%rsp), %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_new_string8_len: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov rbx, rsi mov esi, edx xor edx, edx call js_alloc_string test rax, rax jz short loc_20222 mov r14, rax mov rdi, rax add rdi, 18h loc_20201: movsxd r15, ebp mov rsi, rbx mov rdx, r15 call _memcpy mov byte ptr [r14+r15+18h], 0 mov [rsp+28h+var_28], r14 mov rdx, 0FFFFFFFFFFFFFFF9h jmp short loc_2022E loc_20222: mov dword ptr [rsp+28h+var_28], 0 mov edx, 6 loc_2022E: mov rax, [rsp+28h+var_28] add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_new_string8_len(long long a1, long long a2, unsigned int a3) { long long v3; // rax long long v5; // rax long long v6; // r14 long long v8; // [rsp+0h] [rbp-28h] HIDWORD(v8) = HIDWORD(v3); v5 = js_alloc_string(a1, a3, 0LL); if ( v5 ) { v6 = v5; memcpy(v5 + 24, a2, (int)a3); *(_BYTE *)(v6 + (int)a3 + 24) = 0; return v6; } else { LODWORD(v8) = 0; } return v8; }
js_new_string8_len: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV RBX,RSI MOV ESI,EDX XOR EDX,EDX CALL 0x00120b73 TEST RAX,RAX JZ 0x00120222 MOV R14,RAX MOV RDI,RAX ADD RDI,0x18 MOVSXD R15,EBP MOV RSI,RBX MOV RDX,R15 CALL 0x0010e5b0 MOV byte ptr [R14 + R15*0x1 + 0x18],0x0 MOV qword ptr [RSP],R14 MOV RDX,-0x7 JMP 0x0012022e LAB_00120222: MOV dword ptr [RSP],0x0 MOV EDX,0x6 LAB_0012022e: MOV RAX,qword ptr [RSP] ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int1 [16] js_new_string8_len(int8 param_1,void *param_2,int param_3) { ulong in_RAX; int8 uVar1; int1 auVar2 [16]; int8 local_28; local_28 = js_alloc_string(param_1,param_3,0); if (local_28 == 0) { local_28 = in_RAX & 0xffffffff00000000; uVar1 = 6; } else { memcpy((void *)(local_28 + 0x18),param_2,(long)param_3); *(int1 *)(local_28 + 0x18 + (long)param_3) = 0; uVar1 = 0xfffffffffffffff9; } auVar2._8_8_ = uVar1; auVar2._0_8_ = local_28; return auVar2; }
124
js_new_string8_len
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_string8_len(JSContext *ctx, const char *buf, int len) { JSString *str; str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; return JS_MKPTR(JS_TAG_STRING, str); }
O2
c
js_new_string8_len: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %r14 xorl %ebx, %ebx movl %edx, %esi xorl %edx, %edx callq 0x1ad45 testq %rax, %rax je 0x1a52a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movslq %ebp, %rbx movq %r14, %rsi movq %rbx, %rdx callq 0xe5c0 movb $0x0, 0x18(%r15,%rbx) pushq $-0x7 popq %rdx movq %r15, %rbx jmp 0x1a52d pushq $0x6 popq %rdx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_new_string8_len: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov r14, rsi xor ebx, ebx mov esi, edx xor edx, edx call js_alloc_string test rax, rax jz short loc_1A52A mov r15, rax mov rdi, rax add rdi, 18h movsxd rbx, ebp mov rsi, r14 mov rdx, rbx call _memcpy mov byte ptr [r15+rbx+18h], 0 push 0FFFFFFFFFFFFFFF9h pop rdx mov rbx, r15 jmp short loc_1A52D loc_1A52A: push 6 pop rdx loc_1A52D: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_new_string8_len(long long a1, long long a2, unsigned int a3) { long long v4; // rbx long long v5; // rax long long v6; // r15 v4 = 0LL; v5 = js_alloc_string(a1, a3, 0LL); if ( v5 ) { v6 = v5; memcpy(v5 + 24, a2, (int)a3); *(_BYTE *)(v6 + (int)a3 + 24) = 0; return v6; } return v4; }
js_new_string8_len: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV R14,RSI XOR EBX,EBX MOV ESI,EDX XOR EDX,EDX CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a52a MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOVSXD RBX,EBP MOV RSI,R14 MOV RDX,RBX CALL 0x0010e5c0 MOV byte ptr [R15 + RBX*0x1 + 0x18],0x0 PUSH -0x7 POP RDX MOV RBX,R15 JMP 0x0011a52d LAB_0011a52a: PUSH 0x6 POP RDX LAB_0011a52d: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int1 [16] js_new_string8_len(int8 param_1,void *param_2,int param_3) { long lVar1; int8 uVar2; long lVar3; int1 auVar4 [16]; lVar3 = 0; lVar1 = js_alloc_string(param_1,param_3,0); if (lVar1 == 0) { uVar2 = 6; } else { memcpy((void *)(lVar1 + 0x18),param_2,(long)param_3); *(int1 *)(lVar1 + 0x18 + (long)param_3) = 0; uVar2 = 0xfffffffffffffff9; lVar3 = lVar1; } auVar4._8_8_ = uVar2; auVar4._0_8_ = lVar3; return auVar4; }
125
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O0
c
init_available_charsets: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq 0x362dd1(%rip), %rdi # 0x392120 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x25190 leaq 0x366e2e(%rip), %rdi # 0x396190 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x25190 leaq 0x362aa7(%rip), %rax # 0x391e1c movl (%rax), %edi leaq 0x366da2(%rip), %rsi # 0x396120 movl $0x10, %edx leaq 0x250cc6(%rip), %rcx # 0x280050 movl $0x40, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x1ab4(%rip), %rax # 0x30e50 movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movl $0x1, 0x20(%rsp) callq 0x33d40 xorl %eax, %eax movl %eax, %edi callq 0x3a5b0 leaq 0x362d48(%rip), %rax # 0x392120 movq %rax, -0x2d8(%rbp) leaq 0x362d3a(%rip), %rax # 0x392120 addq $0x4000, %rax # imm = 0x4000 addq $-0x8, %rax cmpq %rax, -0x2d8(%rbp) jae 0x2f456 movq -0x2d8(%rbp), %rax cmpq $0x0, (%rax) je 0x2f440 jmp 0x2f408 jmp 0x2f40a movq -0x2d8(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x40(%rax) je 0x2f43e movq -0x2d8(%rbp), %rax movq (%rax), %rdi callq 0x309b0 cmpb $0x0, %al je 0x2f43c movq -0x2d8(%rbp), %rax movq $0x0, (%rax) jmp 0x2f43e jmp 0x2f440 jmp 0x2f442 movq -0x2d8(%rbp), %rax addq $0x8, %rax movq %rax, -0x2d8(%rbp) jmp 0x2f3df leaq -0x2d0(%rbp), %rdi callq 0x2e950 leaq -0x220(%rbp), %rdi callq 0x2eff0 movq %rax, %rdi leaq 0x53def(%rip), %rsi # 0x83267 callq 0x252d0 leaq -0x220(%rbp), %rsi leaq -0x2d0(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0x30e90 jmp 0x2f496 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2f4b1 addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x25330 nopw %cs:(%rax,%rax)
init_available_charsets: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, all_charsets xor esi, esi mov edx, 4000h call _memset lea rdi, my_collation_statistics xor esi, esi mov edx, 4000h call _memset lea rax, key_memory_charsets mov edi, [rax] lea rsi, charset_name_hash mov edx, 10h lea rcx, my_charset_latin1 mov r8d, 40h ; '@' xor eax, eax mov r9d, eax lea rax, get_charset_key mov [rsp+300h+var_300], 0 mov [rsp+300h+var_2F8], rax mov [rsp+300h+var_2F0], 0 mov [rsp+300h+var_2E8], 0 mov [rsp+300h+var_2E0], 1 call my_hash_init2 xor eax, eax mov edi, eax call init_compiled_charsets lea rax, all_charsets mov [rbp+var_2D8], rax loc_2F3DF: lea rax, all_charsets add rax, 4000h add rax, 0FFFFFFFFFFFFFFF8h cmp [rbp+var_2D8], rax jnb short loc_2F456 mov rax, [rbp+var_2D8] cmp qword ptr [rax], 0 jz short loc_2F440 jmp short $+2 loc_2F408: jmp short $+2 loc_2F40A: mov rax, [rbp+var_2D8] mov rax, [rax] cmp qword ptr [rax+40h], 0 jz short loc_2F43E mov rax, [rbp+var_2D8] mov rdi, [rax] call init_state_maps cmp al, 0 jz short loc_2F43C mov rax, [rbp+var_2D8] mov qword ptr [rax], 0 loc_2F43C: jmp short $+2 loc_2F43E: jmp short $+2 loc_2F440: jmp short $+2 loc_2F442: mov rax, [rbp+var_2D8] add rax, 8 mov [rbp+var_2D8], rax jmp short loc_2F3DF loc_2F456: lea rdi, [rbp+var_2D0] call my_charset_loader_init_mysys lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy lea rsi, [rbp+var_220] lea rdi, [rbp+var_2D0] xor eax, eax mov edx, eax call my_read_charset_file jmp short $+2 loc_2F496: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2F4B1 add rsp, 300h pop rbp retn loc_2F4B1: call ___stack_chk_fail
unsigned long long init_available_charsets() { long long charsets_dir; // rax _QWORD *i; // [rsp+28h] [rbp-2D8h] _BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF _BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF unsigned long long v5; // [rsp+2F8h] [rbp-8h] v5 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); for ( i = all_charsets; i < &all_charsets[2047]; ++i ) { if ( *i && *(_QWORD *)(*i + 64LL) ) { if ( (unsigned __int8)init_state_maps(*i) ) *i = 0LL; } } my_charset_loader_init_mysys((long long)v3); charsets_dir = get_charsets_dir((long long)v4); stpcpy(charsets_dir, "Index.xml"); my_read_charset_file(v3, v4, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[0x492120] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00125190 LEA RDI,[0x496190] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00125190 LEA RAX,[0x491e1c] MOV EDI,dword ptr [RAX] LEA RSI,[0x496120] MOV EDX,0x10 LEA RCX,[0x380050] MOV R8D,0x40 XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x130e50] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x20],0x1 CALL 0x00133d40 XOR EAX,EAX MOV EDI,EAX CALL 0x0013a5b0 LEA RAX,[0x492120] MOV qword ptr [RBP + -0x2d8],RAX LAB_0012f3df: LEA RAX,[0x492120] ADD RAX,0x4000 ADD RAX,-0x8 CMP qword ptr [RBP + -0x2d8],RAX JNC 0x0012f456 MOV RAX,qword ptr [RBP + -0x2d8] CMP qword ptr [RAX],0x0 JZ 0x0012f440 JMP 0x0012f408 LAB_0012f408: JMP 0x0012f40a LAB_0012f40a: MOV RAX,qword ptr [RBP + -0x2d8] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0012f43e MOV RAX,qword ptr [RBP + -0x2d8] MOV RDI,qword ptr [RAX] CALL 0x001309b0 CMP AL,0x0 JZ 0x0012f43c MOV RAX,qword ptr [RBP + -0x2d8] MOV qword ptr [RAX],0x0 LAB_0012f43c: JMP 0x0012f43e LAB_0012f43e: JMP 0x0012f440 LAB_0012f440: JMP 0x0012f442 LAB_0012f442: MOV RAX,qword ptr [RBP + -0x2d8] ADD RAX,0x8 MOV qword ptr [RBP + -0x2d8],RAX JMP 0x0012f3df LAB_0012f456: LEA RDI,[RBP + -0x2d0] CALL 0x0012e950 LEA RDI,[RBP + -0x220] CALL 0x0012eff0 MOV RDI,RAX LEA RSI,[0x183267] CALL 0x001252d0 LEA RSI,[RBP + -0x220] LEA RDI,[RBP + -0x2d0] XOR EAX,EAX MOV EDX,EAX CALL 0x00130e90 JMP 0x0012f496 LAB_0012f496: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012f4b1 ADD RSP,0x300 POP RBP RET LAB_0012f4b1: CALL 0x00125330
void init_available_charsets(void) { char cVar1; char *__dest; long in_FS_OFFSET; long *local_2e0; int1 local_2d8 [176]; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); for (local_2e0 = &all_charsets; local_2e0 < (long *)0x496118; local_2e0 = local_2e0 + 1) { if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) && (cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) { *local_2e0 = 0; } } my_charset_loader_init_mysys(local_2d8); __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_read_charset_file(local_2d8,local_228,0); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
126
my_aes_get_size
eloqsql/mysys_ssl/my_crypt.cc
unsigned int my_aes_get_size(enum my_aes_mode mode __attribute__((unused)), unsigned int source_length) { #ifdef HAVE_EncryptAes128Ctr if (mode == MY_AES_CTR) return source_length; #ifdef HAVE_EncryptAes128Gcm if (mode == MY_AES_GCM) return source_length + MY_AES_BLOCK_SIZE; #endif #endif return (source_length / MY_AES_BLOCK_SIZE + 1) * MY_AES_BLOCK_SIZE; }
O3
cpp
my_aes_get_size: pushq %rbp movq %rsp, %rbp movl %esi, %eax cmpl $0x2, %edi je 0xd82fb cmpl $0x3, %edi je 0xd82f8 andl $-0x10, %eax addl $0x10, %eax popq %rbp retq
my_aes_get_size: push rbp mov rbp, rsp mov eax, esi cmp edi, 2 jz short loc_D82FB cmp edi, 3 jz short loc_D82F8 and eax, 0FFFFFFF0h loc_D82F8: add eax, 10h loc_D82FB: pop rbp retn
long long my_aes_get_size(int a1, unsigned int a2) { long long result; // rax result = a2; if ( a1 != 2 ) { if ( a1 != 3 ) LODWORD(result) = a2 & 0xFFFFFFF0; return (unsigned int)(result + 16); } return result; }
my_aes_get_size: PUSH RBP MOV RBP,RSP MOV EAX,ESI CMP EDI,0x2 JZ 0x001d82fb CMP EDI,0x3 JZ 0x001d82f8 AND EAX,0xfffffff0 LAB_001d82f8: ADD EAX,0x10 LAB_001d82fb: POP RBP RET
uint my_aes_get_size(int param_1,uint param_2) { if (param_1 != 2) { if (param_1 != 3) { param_2 = param_2 & 0xfffffff0; } param_2 = param_2 + 0x10; } return param_2; }
127
CLI::App::_process_extras()
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::_process_extras() { if(!(allow_extras_ || prefix_command_)) { std::size_t num_left_over = remaining_size(); if(num_left_over > 0) { throw ExtrasError(name_, remaining(false)); } } for(App_p &sub : subcommands_) { if(sub->count() > 0) sub->_process_extras(); } }
O0
cpp
CLI::App::_process_extras(): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x60(%rbp) testb $0x1, 0x48(%rax) jne 0x34a92 movq -0x60(%rbp), %rax testb $0x1, 0x4a(%rax) jne 0x34a92 movq -0x60(%rbp), %rdi xorl %esi, %esi callq 0x3bfa0 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jbe 0x34a90 movb $0x1, -0x35(%rbp) movl $0x38, %edi callq 0x92d0 movq -0x60(%rbp), %rsi movq %rax, -0x70(%rbp) movq %rsi, %rax addq $0x8, %rax movq %rax, -0x68(%rbp) leaq -0x28(%rbp), %rdi xorl %edx, %edx callq 0x3c080 jmp 0x34a24 movq -0x68(%rbp), %rsi movq -0x70(%rbp), %rdi leaq -0x28(%rbp), %rdx callq 0x3c410 jmp 0x34a37 movq -0x70(%rbp), %rdi movb $0x0, -0x35(%rbp) leaq 0x6cb62(%rip), %rsi # 0xa15a8 leaq 0x7b73(%rip), %rdx # 0x3c5c0 callq 0x9a30 jmp 0x34b1e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) jmp 0x34a7a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x28(%rbp), %rdi callq 0xe270 testb $0x1, -0x35(%rbp) jne 0x34a82 jmp 0x34a8b movq -0x70(%rbp), %rdi callq 0x9470 jmp 0x34b15 jmp 0x34a92 movq -0x60(%rbp), %rax addq $0x280, %rax # imm = 0x280 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi callq 0x33d20 movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi callq 0x33d50 movq %rax, -0x50(%rbp) leaq -0x48(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x33d80 testb $0x1, %al jne 0x34acd jmp 0x34b0f leaq -0x48(%rbp), %rdi callq 0x33dc0 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi callq 0x33de0 movq %rax, %rdi callq 0x3c5e0 cmpq $0x0, %rax jbe 0x34b02 movq -0x58(%rbp), %rdi callq 0x33de0 movq %rax, %rdi callq 0x349b0 jmp 0x34b04 leaq -0x48(%rbp), %rdi callq 0x33e00 jmp 0x34aba addq $0x70, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0x9a70 nop
_ZN3CLI3App15_process_extrasEv: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_60], rax test byte ptr [rax+48h], 1 jnz loc_34A92 mov rax, [rbp+var_60] test byte ptr [rax+4Ah], 1 jnz loc_34A92 mov rdi, [rbp+var_60]; this xor esi, esi; bool call _ZNK3CLI3App14remaining_sizeEb; CLI::App::remaining_size(bool) mov [rbp+var_10], rax cmp [rbp+var_10], 0 jbe loc_34A90 mov [rbp+var_35], 1 mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov rsi, [rbp+var_60] mov [rbp+var_70], rax mov rax, rsi add rax, 8 mov [rbp+var_68], rax lea rdi, [rbp+var_28] xor edx, edx call _ZNK3CLI3App9remainingB5cxx11Eb; CLI::App::remaining(bool) jmp short $+2 loc_34A24: mov rsi, [rbp+var_68] mov rdi, [rbp+var_70] lea rdx, [rbp+var_28] call _ZN3CLI11ExtrasErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EE; CLI::ExtrasError::ExtrasError(std::string const&,std::vector<std::string>) jmp short $+2 loc_34A37: mov rdi, [rbp+var_70]; void * mov [rbp+var_35], 0 lea rsi, _ZTIN3CLI11ExtrasErrorE; lptinfo lea rdx, _ZN3CLI11ExtrasErrorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_34B1E mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax jmp short loc_34A7A mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_34A7A: test [rbp+var_35], 1 jnz short loc_34A82 jmp short loc_34A8B loc_34A82: mov rdi, [rbp+var_70]; void * call ___cxa_free_exception loc_34A8B: jmp loc_34B15 loc_34A90: jmp short $+2 loc_34A92: mov rax, [rbp+var_60] add rax, 280h mov [rbp+var_40], rax mov rdi, [rbp+var_40] call _ZNSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EE5beginEv; std::vector<std::shared_ptr<CLI::App>>::begin(void) mov [rbp+var_48], rax mov rdi, [rbp+var_40] call _ZNSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EE3endEv; std::vector<std::shared_ptr<CLI::App>>::end(void) mov [rbp+var_50], rax loc_34ABA: lea rdi, [rbp+var_48] lea rsi, [rbp+var_50] call _ZN9__gnu_cxxneIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>> const&) test al, 1 jnz short loc_34ACD jmp short loc_34B0F loc_34ACD: lea rdi, [rbp+var_48] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator*(void) mov [rbp+var_58], rax mov rdi, [rbp+var_58] call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax; this call _ZNK3CLI3App5countEv; CLI::App::count(void) cmp rax, 0 jbe short loc_34B02 mov rdi, [rbp+var_58] call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax; this call _ZN3CLI3App15_process_extrasEv; CLI::App::_process_extras(void) loc_34B02: jmp short $+2 loc_34B04: lea rdi, [rbp+var_48] call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator++(void) jmp short loc_34ABA loc_34B0F: add rsp, 70h pop rbp retn loc_34B15: mov rdi, [rbp+var_30] call __Unwind_Resume loc_34B1E: xchg ax, ax
bool CLI::App::_process_extras(CLI::App *this) { bool result; // al CLI::App *v2; // rax CLI::App *v3; // rax void *exception; // [rsp+0h] [rbp-70h] long long v5; // [rsp+18h] [rbp-58h] long long v6; // [rsp+20h] [rbp-50h] BYREF _QWORD v7[2]; // [rsp+28h] [rbp-48h] BYREF char v8; // [rsp+3Bh] [rbp-35h] _BYTE v9[24]; // [rsp+48h] [rbp-28h] BYREF CLI::App *v11; // [rsp+68h] [rbp-8h] v11 = this; if ( (*((_BYTE *)this + 72) & 1) == 0 && (*((_BYTE *)this + 74) & 1) == 0 ) { if ( CLI::App::remaining_size(this, 0) ) { exception = __cxa_allocate_exception(0x38uLL); CLI::App::remaining[abi:cxx11](v9, this, 0LL); CLI::ExtrasError::ExtrasError(exception, (char *)this + 8, v9); v8 = 0; __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::ExtrasError, CLI::ExtrasError::~ExtrasError); } } v7[1] = (char *)this + 640; v7[0] = std::vector<std::shared_ptr<CLI::App>>::begin((long long)this + 640); v6 = std::vector<std::shared_ptr<CLI::App>>::end((long long)this + 640); while ( 1 ) { result = __gnu_cxx::operator!=<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>( (long long)v7, (long long)&v6); if ( !result ) break; v5 = __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator*((long long)v7); v2 = (CLI::App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v5); if ( CLI::App::count(v2) ) { v3 = (CLI::App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v5); CLI::App::_process_extras(v3); } __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator++(v7); } return result; }
_process_extras: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x60],RAX TEST byte ptr [RAX + 0x48],0x1 JNZ 0x00134a92 MOV RAX,qword ptr [RBP + -0x60] TEST byte ptr [RAX + 0x4a],0x1 JNZ 0x00134a92 MOV RDI,qword ptr [RBP + -0x60] XOR ESI,ESI CALL 0x0013bfa0 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JBE 0x00134a90 MOV byte ptr [RBP + -0x35],0x1 MOV EDI,0x38 CALL 0x001092d0 MOV RSI,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x70],RAX MOV RAX,RSI ADD RAX,0x8 MOV qword ptr [RBP + -0x68],RAX LAB_00134a17: LEA RDI,[RBP + -0x28] XOR EDX,EDX CALL 0x0013c080 JMP 0x00134a24 LAB_00134a24: MOV RSI,qword ptr [RBP + -0x68] MOV RDI,qword ptr [RBP + -0x70] LEA RDX,[RBP + -0x28] CALL 0x0013c410 JMP 0x00134a37 LAB_00134a37: MOV RDI,qword ptr [RBP + -0x70] MOV byte ptr [RBP + -0x35],0x0 LEA RSI,[0x1a15a8] LEA RDX,[0x13c5c0] CALL 0x00109a30 LAB_00134a90: JMP 0x00134a92 LAB_00134a92: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x280 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x00133d20 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x00133d50 MOV qword ptr [RBP + -0x50],RAX LAB_00134aba: LEA RDI,[RBP + -0x48] LEA RSI,[RBP + -0x50] CALL 0x00133d80 TEST AL,0x1 JNZ 0x00134acd JMP 0x00134b0f LAB_00134acd: LEA RDI,[RBP + -0x48] CALL 0x00133dc0 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] CALL 0x00133de0 MOV RDI,RAX CALL 0x0013c5e0 CMP RAX,0x0 JBE 0x00134b02 MOV RDI,qword ptr [RBP + -0x58] CALL 0x00133de0 MOV RDI,RAX CALL 0x001349b0 LAB_00134b02: JMP 0x00134b04 LAB_00134b04: LEA RDI,[RBP + -0x48] CALL 0x00133e00 JMP 0x00134aba LAB_00134b0f: ADD RSP,0x70 POP RBP RET
/* CLI::App::_process_extras() */ void __thiscall CLI::App::_process_extras(App *this) { bool bVar1; ExtrasError *pEVar2; __shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false> *this_00; App *pAVar3; long lVar4; int8 local_58; int8 local_50; vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *local_48; int1 local_3d; int1 local_30 [24]; long local_18; App *local_10; local_10 = this; if ((((byte)this[0x48] & 1) == 0) && (((byte)this[0x4a] & 1) == 0)) { local_18 = remaining_size(this,false); if (local_18 != 0) { local_3d = 1; pEVar2 = (ExtrasError *)__cxa_allocate_exception(0x38); /* try { // try from 00134a17 to 00134a21 has its CatchHandler @ 00134a57 */ remaining_abi_cxx11_(SUB81(local_30,0)); /* try { // try from 00134a24 to 00134a51 has its CatchHandler @ 00134a65 */ ExtrasError::ExtrasError(pEVar2,this + 8,local_30); local_3d = 0; /* WARNING: Subroutine does not return */ __cxa_throw(pEVar2,&ExtrasError::typeinfo,ExtrasError::~ExtrasError); } local_18 = 0; } local_48 = (vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *) (this + 0x280); local_50 = std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::begin (local_48); local_58 = std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::end (local_48); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_50,(__normal_iterator *)&local_58); if (!bVar1) break; this_00 = (__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false> *) __gnu_cxx:: __normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>> ::operator*((__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>> *)&local_50); pAVar3 = (App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(this_00); lVar4 = count(pAVar3); if (lVar4 != 0) { pAVar3 = (App *)std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(this_00); _process_extras(pAVar3); } __gnu_cxx:: __normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>> ::operator++((__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>> *)&local_50); } return; }
128
lex2str
eloqsql/strings/xml.c
static const char *lex2str(int lex) { switch(lex) { case MY_XML_EOF: return "END-OF-INPUT"; case MY_XML_STRING: return "STRING"; case MY_XML_IDENT: return "IDENT"; case MY_XML_CDATA: return "CDATA"; case MY_XML_EQ: return "'='"; case MY_XML_LT: return "'<'"; case MY_XML_GT: return "'>'"; case MY_XML_SLASH: return "'/'"; case MY_XML_COMMENT: return "COMMENT"; case MY_XML_TEXT: return "TEXT"; case MY_XML_QUESTION: return "'?'"; case MY_XML_EXCLAM: return "'!'"; } return "unknown token"; }
O3
c
lex2str: pushq %rbp movq %rsp, %rbp leal -0x3c(%rdi), %eax cmpl $0x18, %eax ja 0x63a63 leaq 0x27e7cf(%rip), %rcx # 0x2e2220 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x5e5d(%rip), %rax # 0x698be jmp 0x63ad7 cmpl $0x21, %edi je 0x63ad0 cmpl $0x2f, %edi jne 0x63a76 leaq 0x5e52(%rip), %rax # 0x698c6 jmp 0x63ad7 leaq 0x5e62(%rip), %rax # 0x698df jmp 0x63ad7 leaq 0x5e28(%rip), %rax # 0x698ae jmp 0x63ad7 leaq 0x5e18(%rip), %rax # 0x698a7 jmp 0x63ad7 leaq 0x5e3f(%rip), %rax # 0x698d7 jmp 0x63ad7 leaq 0x5e19(%rip), %rax # 0x698ba jmp 0x63ad7 leaq 0x5e18(%rip), %rax # 0x698c2 jmp 0x63ad7 leaq 0x5e17(%rip), %rax # 0x698ca jmp 0x63ad7 leaq 0x5dc4(%rip), %rax # 0x69880 jmp 0x63ad7 leaq 0x5def(%rip), %rax # 0x698b4 jmp 0x63ad7 leaq 0x5e04(%rip), %rax # 0x698d2 jmp 0x63ad7 leaq 0x5e04(%rip), %rax # 0x698db popq %rbp retq
lex2str: push rbp mov rbp, rsp lea eax, [rdi-3Ch]; switch 25 cases cmp eax, 18h ja short def_63A58; jumptable 0000000000063A58 default case lea rcx, jpt_63A58 movsxd rax, ds:(jpt_63A58 - 2E2220h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_63A5A: lea rax, asc_698BE; jumptable 0000000000063A58 case 60 jmp short loc_63AD7 def_63A58: cmp edi, 21h ; '!'; jumptable 0000000000063A58 default case jz short loc_63AD0 cmp edi, 2Fh ; '/' jnz short loc_63A76; jumptable 0000000000063A58 cases 64-66,70-72,74-82 lea rax, asc_698C6; "'/'" jmp short loc_63AD7 loc_63A76: lea rax, aUnknownToken; jumptable 0000000000063A58 cases 64-66,70-72,74-82 jmp short loc_63AD7 loc_63A7F: lea rax, aIdent; jumptable 0000000000063A58 case 73 jmp short loc_63AD7 loc_63A88: lea rax, aString; jumptable 0000000000063A58 case 83 jmp short loc_63AD7 loc_63A91: lea rax, asc_698D7; jumptable 0000000000063A58 case 63 jmp short loc_63AD7 loc_63A9A: lea rax, asc_698BA; jumptable 0000000000063A58 case 61 jmp short loc_63AD7 loc_63AA3: lea rax, asc_698C2; jumptable 0000000000063A58 case 62 jmp short loc_63AD7 loc_63AAC: lea rax, aComment; jumptable 0000000000063A58 case 67 jmp short loc_63AD7 loc_63AB5: lea rax, aUnexpectedEndO+0Bh; jumptable 0000000000063A58 case 69 jmp short loc_63AD7 loc_63ABE: lea rax, aCdata; jumptable 0000000000063A58 case 68 jmp short loc_63AD7 loc_63AC7: lea rax, aText; jumptable 0000000000063A58 case 84 jmp short loc_63AD7 loc_63AD0: lea rax, asc_698DB; "'!'" loc_63AD7: pop rbp retn
char * lex2str(int a1) { char *result; // rax switch ( a1 ) { case '<': result = "'<'"; break; case '=': result = "'='"; break; case '>': result = "'>'"; break; case '?': result = "'?'"; break; case '@': case 'A': case 'B': case 'F': case 'G': case 'H': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': goto LABEL_6; case 'C': result = "COMMENT"; break; case 'D': result = "CDATA"; break; case 'E': result = "END-OF-INPUT"; break; case 'I': result = "IDENT"; break; case 'S': result = "STRING"; break; case 'T': result = "TEXT"; break; default: if ( a1 == 33 ) { result = "'!'"; } else if ( a1 == 47 ) { result = "'/'"; } else { LABEL_6: result = "unknown token"; } break; } return result; }
lex2str: PUSH RBP MOV RBP,RSP LEA EAX,[RDI + -0x3c] CMP EAX,0x18 JA 0x00163a63 LEA RCX,[0x3e2220] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_3c: LEA RAX,[0x1698be] JMP 0x00163ad7 default: CMP EDI,0x21 JZ 0x00163ad0 CMP EDI,0x2f JNZ 0x00163a76 LEA RAX,[0x1698c6] JMP 0x00163ad7 caseD_40: LEA RAX,[0x1698df] JMP 0x00163ad7 caseD_49: LEA RAX,[0x1698ae] JMP 0x00163ad7 caseD_53: LEA RAX,[0x1698a7] JMP 0x00163ad7 caseD_3f: LEA RAX,[0x1698d7] JMP 0x00163ad7 caseD_3d: LEA RAX,[0x1698ba] JMP 0x00163ad7 caseD_3e: LEA RAX,[0x1698c2] JMP 0x00163ad7 caseD_43: LEA RAX,[0x1698ca] JMP 0x00163ad7 caseD_45: LEA RAX,[0x169880] JMP 0x00163ad7 caseD_44: LEA RAX,[0x1698b4] JMP 0x00163ad7 caseD_54: LEA RAX,[0x1698d2] JMP 0x00163ad7 LAB_00163ad0: LEA RAX,[0x1698db] LAB_00163ad7: POP RBP RET
char * lex2str(int param_1) { char *pcVar1; switch(param_1) { case 0x3c: pcVar1 = "\'<\'"; break; case 0x3d: pcVar1 = "\'=\'"; break; case 0x3e: pcVar1 = "\'>\'"; break; case 0x3f: pcVar1 = "\'?\'"; break; case 0x43: pcVar1 = "COMMENT"; break; case 0x44: pcVar1 = "CDATA"; break; case 0x45: pcVar1 = "END-OF-INPUT"; break; case 0x49: pcVar1 = "IDENT"; break; case 0x53: pcVar1 = "STRING"; break; case 0x54: pcVar1 = "TEXT"; break; default: if (param_1 == 0x21) { return "\'!\'"; } if (param_1 == 0x2f) { return "\'/\'"; } case 0x40: case 0x41: case 0x42: case 0x46: case 0x47: case 0x48: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: case 0x50: case 0x51: case 0x52: pcVar1 = "unknown token"; } return pcVar1; }
129
get_partitioned_key_cache_statistics
eloqsql/mysys/mf_keycache.c
static void get_partitioned_key_cache_statistics(PARTITIONED_KEY_CACHE_CB *keycache, uint partition_no, KEY_CACHE_STATISTICS *keycache_stats) { uint i; SIMPLE_KEY_CACHE_CB *partition; uint partitions= keycache->partitions; DBUG_ENTER("get_partitioned_key_cache_statistics"); if (partition_no != 0) { partition= keycache->partition_array[partition_no-1]; get_simple_key_cache_statistics((void *) partition, 0, keycache_stats); DBUG_VOID_RETURN; } bzero(keycache_stats, sizeof(KEY_CACHE_STATISTICS)); keycache_stats->mem_size= (longlong) keycache->key_cache_mem_size; keycache_stats->block_size= (longlong) keycache->key_cache_block_size; for (i = 0; i < partitions; i++) { partition= keycache->partition_array[i]; keycache_stats->blocks_used+= partition->blocks_used; keycache_stats->blocks_unused+= partition->blocks_unused; keycache_stats->blocks_changed+= partition->global_blocks_changed; keycache_stats->blocks_warm+= partition->warm_blocks; keycache_stats->read_requests+= partition->global_cache_r_requests; keycache_stats->reads+= partition->global_cache_read; keycache_stats->write_requests+= partition->global_cache_w_requests; keycache_stats->writes+= partition->global_cache_write; } DBUG_VOID_RETURN; }
O3
c
get_partitioned_key_cache_statistics: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx testl %esi, %esi je 0x9adde movq 0x8(%rdi), %rax decl %esi movq (%rax,%rsi,8), %rax movq 0x8(%rax), %rcx movq %rcx, (%rdx) movl 0x18(%rax), %ecx movq %rcx, 0x8(%rdx) movq 0x50(%rax), %rcx movq %rcx, 0x10(%rdx) movq 0x58(%rax), %rcx movq %rcx, 0x18(%rdx) movq 0x138(%rax), %rcx movq %rcx, 0x20(%rdx) movq 0x68(%rax), %rcx movq %rcx, 0x28(%rdx) movq 0x150(%rax), %rcx movq %rcx, 0x30(%rdx) movq 0x158(%rax), %rcx movq %rcx, 0x38(%rdx) movq 0x140(%rax), %rcx movq %rcx, 0x40(%rdx) movq 0x148(%rax), %rax movq %rax, 0x48(%rdx) jmp 0x9ae98 movl 0x1c(%rdi), %eax xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdx) movups %xmm0, 0x30(%rdx) movups %xmm0, 0x20(%rdx) movups %xmm0, 0x10(%rdx) movups %xmm0, (%rdx) movq 0x10(%rdi), %rcx movq %rcx, (%rdx) movl 0x18(%rdi), %ecx movq %rcx, 0x8(%rdx) testq %rax, %rax je 0x9ae98 movq 0x10(%rdx), %rcx movq 0x18(%rdx), %rsi movq 0x20(%rdx), %r8 movq 0x28(%rdx), %r9 movq 0x30(%rdx), %r10 movq 0x38(%rdx), %r11 movq 0x40(%rdx), %rbx movq 0x48(%rdx), %r14 xorl %r15d, %r15d movq 0x8(%rdi), %r12 movq (%r12,%r15,8), %r12 addq 0x50(%r12), %rcx movq %rcx, 0x10(%rdx) addq 0x58(%r12), %rsi movq %rsi, 0x18(%rdx) addq 0x138(%r12), %r8 movq %r8, 0x20(%rdx) addq 0x68(%r12), %r9 movq %r9, 0x28(%rdx) addq 0x150(%r12), %r10 movq %r10, 0x30(%rdx) addq 0x158(%r12), %r11 movq %r11, 0x38(%rdx) addq 0x140(%r12), %rbx movq %rbx, 0x40(%rdx) addq 0x148(%r12), %r14 movq %r14, 0x48(%rdx) incq %r15 cmpq %r15, %rax jne 0x9ae31 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
get_partitioned_key_cache_statistics: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx test esi, esi jz short loc_9ADDE mov rax, [rdi+8] dec esi mov rax, [rax+rsi*8] mov rcx, [rax+8] mov [rdx], rcx mov ecx, [rax+18h] mov [rdx+8], rcx mov rcx, [rax+50h] mov [rdx+10h], rcx mov rcx, [rax+58h] mov [rdx+18h], rcx mov rcx, [rax+138h] mov [rdx+20h], rcx mov rcx, [rax+68h] mov [rdx+28h], rcx mov rcx, [rax+150h] mov [rdx+30h], rcx mov rcx, [rax+158h] mov [rdx+38h], rcx mov rcx, [rax+140h] mov [rdx+40h], rcx mov rax, [rax+148h] mov [rdx+48h], rax jmp loc_9AE98 loc_9ADDE: mov eax, [rdi+1Ch] xorps xmm0, xmm0 movups xmmword ptr [rdx+40h], xmm0 movups xmmword ptr [rdx+30h], xmm0 movups xmmword ptr [rdx+20h], xmm0 movups xmmword ptr [rdx+10h], xmm0 movups xmmword ptr [rdx], xmm0 mov rcx, [rdi+10h] mov [rdx], rcx mov ecx, [rdi+18h] mov [rdx+8], rcx test rax, rax jz loc_9AE98 mov rcx, [rdx+10h] mov rsi, [rdx+18h] mov r8, [rdx+20h] mov r9, [rdx+28h] mov r10, [rdx+30h] mov r11, [rdx+38h] mov rbx, [rdx+40h] mov r14, [rdx+48h] xor r15d, r15d loc_9AE31: mov r12, [rdi+8] mov r12, [r12+r15*8] add rcx, [r12+50h] mov [rdx+10h], rcx add rsi, [r12+58h] mov [rdx+18h], rsi add r8, [r12+138h] mov [rdx+20h], r8 add r9, [r12+68h] mov [rdx+28h], r9 add r10, [r12+150h] mov [rdx+30h], r10 add r11, [r12+158h] mov [rdx+38h], r11 add rbx, [r12+140h] mov [rdx+40h], rbx add r14, [r12+148h] mov [rdx+48h], r14 inc r15 cmp rax, r15 jnz short loc_9AE31 loc_9AE98: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long get_partitioned_key_cache_statistics(long long a1, int a2, _QWORD *a3) { long long v3; // rax long long result; // rax long long v5; // rcx long long v6; // rsi long long v7; // r8 long long v8; // r9 long long v9; // r10 long long v10; // r11 long long v11; // rbx long long v12; // r14 long long i; // r15 _QWORD *v14; // r12 if ( a2 ) { v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * (unsigned int)(a2 - 1)); *a3 = *(_QWORD *)(v3 + 8); a3[1] = *(unsigned int *)(v3 + 24); a3[2] = *(_QWORD *)(v3 + 80); a3[3] = *(_QWORD *)(v3 + 88); a3[4] = *(_QWORD *)(v3 + 312); a3[5] = *(_QWORD *)(v3 + 104); a3[6] = *(_QWORD *)(v3 + 336); a3[7] = *(_QWORD *)(v3 + 344); a3[8] = *(_QWORD *)(v3 + 320); result = *(_QWORD *)(v3 + 328); a3[9] = result; } else { result = *(unsigned int *)(a1 + 28); *((_OWORD *)a3 + 4) = 0LL; *((_OWORD *)a3 + 3) = 0LL; *((_OWORD *)a3 + 2) = 0LL; *((_OWORD *)a3 + 1) = 0LL; *(_OWORD *)a3 = 0LL; *a3 = *(_QWORD *)(a1 + 16); a3[1] = *(unsigned int *)(a1 + 24); if ( result ) { v5 = a3[2]; v6 = a3[3]; v7 = a3[4]; v8 = a3[5]; v9 = a3[6]; v10 = a3[7]; v11 = a3[8]; v12 = a3[9]; for ( i = 0LL; i != result; ++i ) { v14 = *(_QWORD **)(*(_QWORD *)(a1 + 8) + 8 * i); v5 += v14[10]; a3[2] = v5; v6 += v14[11]; a3[3] = v6; v7 += v14[39]; a3[4] = v7; v8 += v14[13]; a3[5] = v8; v9 += v14[42]; a3[6] = v9; v10 += v14[43]; a3[7] = v10; v11 += v14[40]; a3[8] = v11; v12 += v14[41]; a3[9] = v12; } } } return result; }
get_partitioned_key_cache_statistics: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX TEST ESI,ESI JZ 0x0019adde MOV RAX,qword ptr [RDI + 0x8] DEC ESI MOV RAX,qword ptr [RAX + RSI*0x8] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RDX],RCX MOV ECX,dword ptr [RAX + 0x18] MOV qword ptr [RDX + 0x8],RCX MOV RCX,qword ptr [RAX + 0x50] MOV qword ptr [RDX + 0x10],RCX MOV RCX,qword ptr [RAX + 0x58] MOV qword ptr [RDX + 0x18],RCX MOV RCX,qword ptr [RAX + 0x138] MOV qword ptr [RDX + 0x20],RCX MOV RCX,qword ptr [RAX + 0x68] MOV qword ptr [RDX + 0x28],RCX MOV RCX,qword ptr [RAX + 0x150] MOV qword ptr [RDX + 0x30],RCX MOV RCX,qword ptr [RAX + 0x158] MOV qword ptr [RDX + 0x38],RCX MOV RCX,qword ptr [RAX + 0x140] MOV qword ptr [RDX + 0x40],RCX MOV RAX,qword ptr [RAX + 0x148] MOV qword ptr [RDX + 0x48],RAX JMP 0x0019ae98 LAB_0019adde: MOV EAX,dword ptr [RDI + 0x1c] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDX + 0x40],XMM0 MOVUPS xmmword ptr [RDX + 0x30],XMM0 MOVUPS xmmword ptr [RDX + 0x20],XMM0 MOVUPS xmmword ptr [RDX + 0x10],XMM0 MOVUPS xmmword ptr [RDX],XMM0 MOV RCX,qword ptr [RDI + 0x10] MOV qword ptr [RDX],RCX MOV ECX,dword ptr [RDI + 0x18] MOV qword ptr [RDX + 0x8],RCX TEST RAX,RAX JZ 0x0019ae98 MOV RCX,qword ptr [RDX + 0x10] MOV RSI,qword ptr [RDX + 0x18] MOV R8,qword ptr [RDX + 0x20] MOV R9,qword ptr [RDX + 0x28] MOV R10,qword ptr [RDX + 0x30] MOV R11,qword ptr [RDX + 0x38] MOV RBX,qword ptr [RDX + 0x40] MOV R14,qword ptr [RDX + 0x48] XOR R15D,R15D LAB_0019ae31: MOV R12,qword ptr [RDI + 0x8] MOV R12,qword ptr [R12 + R15*0x8] ADD RCX,qword ptr [R12 + 0x50] MOV qword ptr [RDX + 0x10],RCX ADD RSI,qword ptr [R12 + 0x58] MOV qword ptr [RDX + 0x18],RSI ADD R8,qword ptr [R12 + 0x138] MOV qword ptr [RDX + 0x20],R8 ADD R9,qword ptr [R12 + 0x68] MOV qword ptr [RDX + 0x28],R9 ADD R10,qword ptr [R12 + 0x150] MOV qword ptr [RDX + 0x30],R10 ADD R11,qword ptr [R12 + 0x158] MOV qword ptr [RDX + 0x38],R11 ADD RBX,qword ptr [R12 + 0x140] MOV qword ptr [RDX + 0x40],RBX ADD R14,qword ptr [R12 + 0x148] MOV qword ptr [RDX + 0x48],R14 INC R15 CMP RAX,R15 JNZ 0x0019ae31 LAB_0019ae98: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void get_partitioned_key_cache_statistics(long param_1,int param_2,int8 *param_3) { uint uVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; long lVar8; long lVar9; long lVar10; ulong uVar11; if (param_2 == 0) { uVar1 = *(uint *)(param_1 + 0x1c); param_3[8] = 0; param_3[9] = 0; param_3[6] = 0; param_3[7] = 0; param_3[4] = 0; param_3[5] = 0; param_3[2] = 0; param_3[3] = 0; *param_3 = 0; param_3[1] = 0; *param_3 = *(int8 *)(param_1 + 0x10); param_3[1] = (ulong)*(uint *)(param_1 + 0x18); if ((ulong)uVar1 != 0) { lVar3 = param_3[2]; lVar5 = param_3[3]; lVar6 = param_3[4]; lVar7 = param_3[5]; lVar8 = param_3[6]; lVar9 = param_3[7]; lVar4 = param_3[8]; lVar10 = param_3[9]; uVar11 = 0; do { lVar2 = *(long *)(*(long *)(param_1 + 8) + uVar11 * 8); lVar3 = lVar3 + *(long *)(lVar2 + 0x50); param_3[2] = lVar3; lVar5 = lVar5 + *(long *)(lVar2 + 0x58); param_3[3] = lVar5; lVar6 = lVar6 + *(long *)(lVar2 + 0x138); param_3[4] = lVar6; lVar7 = lVar7 + *(long *)(lVar2 + 0x68); param_3[5] = lVar7; lVar8 = lVar8 + *(long *)(lVar2 + 0x150); param_3[6] = lVar8; lVar9 = lVar9 + *(long *)(lVar2 + 0x158); param_3[7] = lVar9; lVar4 = lVar4 + *(long *)(lVar2 + 0x140); param_3[8] = lVar4; lVar10 = lVar10 + *(long *)(lVar2 + 0x148); param_3[9] = lVar10; uVar11 = uVar11 + 1; } while (uVar1 != uVar11); } } else { lVar3 = *(long *)(*(long *)(param_1 + 8) + (ulong)(param_2 - 1) * 8); *param_3 = *(int8 *)(lVar3 + 8); param_3[1] = (ulong)*(uint *)(lVar3 + 0x18); param_3[2] = *(int8 *)(lVar3 + 0x50); param_3[3] = *(int8 *)(lVar3 + 0x58); param_3[4] = *(int8 *)(lVar3 + 0x138); param_3[5] = *(int8 *)(lVar3 + 0x68); param_3[6] = *(int8 *)(lVar3 + 0x150); param_3[7] = *(int8 *)(lVar3 + 0x158); param_3[8] = *(int8 *)(lVar3 + 0x140); param_3[9] = *(int8 *)(lVar3 + 0x148); } return; }
130
my_rw_trywrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_trywrlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if (rwp->state) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state = -1; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif } pthread_mutex_unlock(&rwp->lock); return(res); }
O3
c
my_rw_trywrlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x36280 movl $0x10, %r14d cmpl $0x0, 0x88(%rbx) jne 0x62d5a movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF xorl %r14d, %r14d movq %rbx, %rdi callq 0x36240 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_trywrlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov r14d, 10h cmp dword ptr [rbx+88h], 0 jnz short loc_62D5A mov dword ptr [rbx+88h], 0FFFFFFFFh xor r14d, r14d loc_62D5A: mov rdi, rbx call _pthread_mutex_unlock mov eax, r14d pop rbx pop r14 pop rbp retn
long long my_rw_trywrlock(long long a1) { unsigned int v1; // r14d pthread_mutex_lock(a1); v1 = 16; if ( !*(_DWORD *)(a1 + 136) ) { *(_DWORD *)(a1 + 136) = -1; v1 = 0; } pthread_mutex_unlock(a1); return v1; }
my_rw_trywrlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x00136280 MOV R14D,0x10 CMP dword ptr [RBX + 0x88],0x0 JNZ 0x00162d5a MOV dword ptr [RBX + 0x88],0xffffffff XOR R14D,R14D LAB_00162d5a: MOV RDI,RBX CALL 0x00136240 MOV EAX,R14D POP RBX POP R14 POP RBP RET
int8 my_rw_trywrlock(pthread_mutex_t *param_1) { int8 uVar1; pthread_mutex_lock(param_1); uVar1 = 0x10; if (*(int *)((long)param_1 + 0x88) == 0) { *(int4 *)((long)param_1 + 0x88) = 0xffffffff; uVar1 = 0; } pthread_mutex_unlock(param_1); return uVar1; }
131
unicode_case1
bluesky950520[P]quickjs/libunicode.c
static int unicode_case1(CharRange *cr, int case_mask) { #define MR(x) (1 << RUN_TYPE_ ## x) const uint32_t tab_run_mask[3] = { MR(U) | MR(UF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(U_EXT) | MR(UF_EXT2) | MR(UF_EXT3), MR(L) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2), MR(UF) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(LF_EXT) | MR(UF_EXT2) | MR(UF_EXT3), }; #undef MR uint32_t mask, v, code, type, len, i, idx; if (case_mask == 0) return 0; mask = 0; for(i = 0; i < 3; i++) { if ((case_mask >> i) & 1) mask |= tab_run_mask[i]; } for(idx = 0; idx < countof(case_conv_table1); idx++) { v = case_conv_table1[idx]; type = (v >> (32 - 17 - 7 - 4)) & 0xf; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if ((mask >> type) & 1) { // printf("%d: type=%d %04x %04x\n", idx, type, code, code + len - 1); switch(type) { case RUN_TYPE_UL: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; code += ((case_mask & CASE_U) != 0); for(i = 0; i < len; i += 2) { if (cr_add_interval(cr, code + i, code + i + 1)) return -1; } break; case RUN_TYPE_LSU: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; if (!(case_mask & CASE_U)) { if (cr_add_interval(cr, code, code + 1)) return -1; } if (cr_add_interval(cr, code + 1, code + 2)) return -1; if (case_mask & CASE_U) { if (cr_add_interval(cr, code + 2, code + 3)) return -1; } break; default: def_case: if (cr_add_interval(cr, code, code + len)) return -1; break; } } } return 0; }
O2
c
unicode_case1: testl %esi, %esi je 0x80577 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %eax, %eax leaq 0x1191c(%rip), %rcx # 0x91d7c xorl %r13d, %r13d cmpq $0x3, %rax je 0x8047a btl %eax, %esi jae 0x80471 orl (%rcx), %r13d incq %rax addq $0x4, %rcx jmp 0x80463 movl %esi, %eax andl $0x1, %eax movl %eax, 0x4(%rsp) sete %al testb $0x6, %sil sete %cl orb %al, %cl movb %cl, 0x3(%rsp) xorl %r14d, %r14d cmpq $0x17a, %r14 # imm = 0x17A je 0x8057a leaq 0xa2a6(%rip), %rax # 0x8a750 movl (%rax,%r14,4), %ebp movl %ebp, %eax shrl $0x4, %eax andl $0xf, %eax btl %eax, %r13d jae 0x8056a movl %ebp, %r15d shrl $0xf, %r15d shrl $0x8, %ebp andl $0x7f, %ebp cmpl $0x5, %eax je 0x80508 cmpl $0x4, %eax jne 0x80556 cmpb $0x0, 0x3(%rsp) je 0x80556 addl 0x4(%rsp), %r15d xorl %r12d, %r12d cmpl %ebp, %r12d jae 0x8056a leal 0x1(%r15), %edx movq %rbx, %rdi movl %r15d, %esi callq 0x80099 addl $0x2, %r12d addl $0x2, %r15d testl %eax, %eax je 0x804e6 jmp 0x80572 cmpb $0x0, 0x3(%rsp) je 0x80556 leal 0x1(%r15), %ebp cmpl $0x0, 0x4(%rsp) jne 0x8052b movq %rbx, %rdi movl %r15d, %esi movl %ebp, %edx callq 0x80099 testl %eax, %eax jne 0x80572 leal 0x2(%r15), %r12d movq %rbx, %rdi movl %ebp, %esi movl %r12d, %edx callq 0x80099 testl %eax, %eax jne 0x80572 cmpl $0x0, 0x4(%rsp) je 0x8056a addl $0x3, %r15d movq %rbx, %rdi movl %r12d, %esi movl %r15d, %edx jmp 0x80561 addl %r15d, %ebp movq %rbx, %rdi movl %r15d, %esi movl %ebp, %edx callq 0x80099 testl %eax, %eax jne 0x80572 incq %r14 jmp 0x80496 pushq $-0x1 popq %rax jmp 0x8057c xorl %eax, %eax retq xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
unicode_case1: test esi, esi jz loc_80577 push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi xor eax, eax lea rcx, unk_91D7C xor r13d, r13d loc_80463: cmp rax, 3 jz short loc_8047A bt esi, eax jnb short loc_80471 or r13d, [rcx] loc_80471: inc rax add rcx, 4 jmp short loc_80463 loc_8047A: mov eax, esi and eax, 1 mov [rsp+38h+var_34], eax setz al test sil, 6 setz cl or cl, al mov [rsp+38h+var_35], cl xor r14d, r14d loc_80496: cmp r14, 17Ah jz loc_8057A lea rax, case_conv_table1 mov ebp, [rax+r14*4] mov eax, ebp shr eax, 4 and eax, 0Fh bt r13d, eax jnb loc_8056A mov r15d, ebp shr r15d, 0Fh shr ebp, 8 and ebp, 7Fh cmp eax, 5 jz short loc_80508 cmp eax, 4 jnz short loc_80556 cmp [rsp+38h+var_35], 0 jz short loc_80556 add r15d, [rsp+38h+var_34] xor r12d, r12d loc_804E6: cmp r12d, ebp jnb short loc_8056A lea edx, [r15+1] mov rdi, rbx mov esi, r15d call cr_add_interval add r12d, 2 add r15d, 2 test eax, eax jz short loc_804E6 jmp short loc_80572 loc_80508: cmp [rsp+38h+var_35], 0 jz short loc_80556 lea ebp, [r15+1] cmp [rsp+38h+var_34], 0 jnz short loc_8052B mov rdi, rbx mov esi, r15d mov edx, ebp call cr_add_interval test eax, eax jnz short loc_80572 loc_8052B: lea r12d, [r15+2] mov rdi, rbx mov esi, ebp mov edx, r12d call cr_add_interval test eax, eax jnz short loc_80572 cmp [rsp+38h+var_34], 0 jz short loc_8056A add r15d, 3 mov rdi, rbx mov esi, r12d mov edx, r15d jmp short loc_80561 loc_80556: add ebp, r15d mov rdi, rbx mov esi, r15d mov edx, ebp loc_80561: call cr_add_interval test eax, eax jnz short loc_80572 loc_8056A: inc r14 jmp loc_80496 loc_80572: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_8057C loc_80577: xor eax, eax retn loc_8057A: xor eax, eax loc_8057C: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long unicode_case1(int *a1, int a2) { long long v3; // rax _DWORD *v4; // rcx int v5; // r13d long long i; // r14 unsigned int v7; // ebp unsigned int v8; // eax int v9; // r15d unsigned int v10; // ebp int v11; // r15d unsigned int j; // r12d int v13; // eax int v14; // ebp int *v15; // rdi int v16; // esi int v17; // edx bool v19; // [rsp+1h] [rbp-35h] int v20; // [rsp+2h] [rbp-34h] if ( !a2 ) return 0LL; v3 = 0LL; v4 = &unk_91D7C; v5 = 0; while ( v3 != 3 ) { if ( _bittest(&a2, v3) ) v5 |= *v4; ++v3; ++v4; } v20 = a2 & 1; v19 = v20 == 0 || (a2 & 6) == 0; for ( i = 0LL; i != 378; ++i ) { v7 = case_conv_table1[i]; v8 = (unsigned __int8)v7 >> 4; if ( !_bittest(&v5, v8) ) continue; v9 = v7 >> 15; v10 = (v7 >> 8) & 0x7F; if ( v8 != 5 ) { if ( v8 == 4 && v19 ) { v11 = v20 + v9; for ( j = 0; j < v10; j += 2 ) { v13 = cr_add_interval(a1, v11, v11 + 1); v11 += 2; if ( v13 ) return -1LL; } continue; } LABEL_23: v15 = a1; v16 = v9; v17 = v9 + v10; LABEL_24: if ( (unsigned int)cr_add_interval(v15, v16, v17) ) return -1LL; continue; } if ( !v19 ) goto LABEL_23; v14 = v9 + 1; if ( !v20 && (unsigned int)cr_add_interval(a1, v9, v14) || (unsigned int)cr_add_interval(a1, v14, v9 + 2) ) return -1LL; if ( v20 ) { v15 = a1; v16 = v9 + 2; v17 = v9 + 3; goto LABEL_24; } } return 0LL; }
unicode_case1: TEST ESI,ESI JZ 0x00180577 PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI XOR EAX,EAX LEA RCX,[0x191d7c] XOR R13D,R13D LAB_00180463: CMP RAX,0x3 JZ 0x0018047a BT ESI,EAX JNC 0x00180471 OR R13D,dword ptr [RCX] LAB_00180471: INC RAX ADD RCX,0x4 JMP 0x00180463 LAB_0018047a: MOV EAX,ESI AND EAX,0x1 MOV dword ptr [RSP + 0x4],EAX SETZ AL TEST SIL,0x6 SETZ CL OR CL,AL MOV byte ptr [RSP + 0x3],CL XOR R14D,R14D LAB_00180496: CMP R14,0x17a JZ 0x0018057a LEA RAX,[0x18a750] MOV EBP,dword ptr [RAX + R14*0x4] MOV EAX,EBP SHR EAX,0x4 AND EAX,0xf BT R13D,EAX JNC 0x0018056a MOV R15D,EBP SHR R15D,0xf SHR EBP,0x8 AND EBP,0x7f CMP EAX,0x5 JZ 0x00180508 CMP EAX,0x4 JNZ 0x00180556 CMP byte ptr [RSP + 0x3],0x0 JZ 0x00180556 ADD R15D,dword ptr [RSP + 0x4] XOR R12D,R12D LAB_001804e6: CMP R12D,EBP JNC 0x0018056a LEA EDX,[R15 + 0x1] MOV RDI,RBX MOV ESI,R15D CALL 0x00180099 ADD R12D,0x2 ADD R15D,0x2 TEST EAX,EAX JZ 0x001804e6 JMP 0x00180572 LAB_00180508: CMP byte ptr [RSP + 0x3],0x0 JZ 0x00180556 LEA EBP,[R15 + 0x1] CMP dword ptr [RSP + 0x4],0x0 JNZ 0x0018052b MOV RDI,RBX MOV ESI,R15D MOV EDX,EBP CALL 0x00180099 TEST EAX,EAX JNZ 0x00180572 LAB_0018052b: LEA R12D,[R15 + 0x2] MOV RDI,RBX MOV ESI,EBP MOV EDX,R12D CALL 0x00180099 TEST EAX,EAX JNZ 0x00180572 CMP dword ptr [RSP + 0x4],0x0 JZ 0x0018056a ADD R15D,0x3 MOV RDI,RBX MOV ESI,R12D MOV EDX,R15D JMP 0x00180561 LAB_00180556: ADD EBP,R15D MOV RDI,RBX MOV ESI,R15D MOV EDX,EBP LAB_00180561: CALL 0x00180099 TEST EAX,EAX JNZ 0x00180572 LAB_0018056a: INC R14 JMP 0x00180496 LAB_00180572: PUSH -0x1 POP RAX JMP 0x0018057c LAB_00180577: XOR EAX,EAX RET LAB_0018057a: XOR EAX,EAX LAB_0018057c: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 unicode_case1(int8 param_1,uint param_2) { uint uVar1; int iVar2; long lVar3; uint *puVar4; uint uVar5; uint uVar6; uint uVar7; int iVar8; bool bVar9; bool bVar10; uint local_34; if (param_2 == 0) { return 0; } puVar4 = &DAT_00191d7c; uVar6 = 0; for (lVar3 = 0; lVar3 != 3; lVar3 = lVar3 + 1) { if ((param_2 >> ((uint)lVar3 & 0x1f) & 1) != 0) { uVar6 = uVar6 | *puVar4; } puVar4 = puVar4 + 1; } bVar9 = (param_2 & 1) != 0; local_34 = param_2 & 1; bVar10 = (param_2 & 6) != 0; lVar3 = 0; do { if (lVar3 == 0x17a) { return 0; } uVar5 = (&case_conv_table1)[lVar3]; uVar1 = uVar5 >> 4 & 0xf; if ((uVar6 >> uVar1 & 1) != 0) { uVar7 = uVar5 >> 0xf; uVar5 = uVar5 >> 8 & 0x7f; if (uVar1 == 5) { if (bVar10 && bVar9) goto LAB_00180556; if ((local_34 == 0) && (iVar8 = cr_add_interval(param_1,uVar7,uVar7 + 1), iVar8 != 0)) { return 0xffffffffffffffff; } uVar5 = uVar7 + 2; iVar8 = cr_add_interval(param_1,uVar7 + 1,uVar5); if (iVar8 != 0) { return 0xffffffffffffffff; } if (local_34 == 0) goto LAB_0018056a; iVar8 = uVar7 + 3; } else { if ((uVar1 == 4) && (!bVar10 || !bVar9)) { iVar8 = uVar7 + local_34; uVar1 = 0; while (uVar1 < uVar5) { iVar2 = cr_add_interval(param_1,iVar8,iVar8 + 1); uVar1 = uVar1 + 2; iVar8 = iVar8 + 2; if (iVar2 != 0) { return 0xffffffffffffffff; } } goto LAB_0018056a; } LAB_00180556: iVar8 = uVar5 + uVar7; uVar5 = uVar7; } iVar8 = cr_add_interval(param_1,uVar5,iVar8); if (iVar8 != 0) { return 0xffffffffffffffff; } } LAB_0018056a: lVar3 = lVar3 + 1; } while( true ); }
132
unicode_case1
bluesky950520[P]quickjs/libunicode.c
static int unicode_case1(CharRange *cr, int case_mask) { #define MR(x) (1 << RUN_TYPE_ ## x) const uint32_t tab_run_mask[3] = { MR(U) | MR(UF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(U_EXT) | MR(UF_EXT2) | MR(UF_EXT3), MR(L) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2), MR(UF) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(LF_EXT) | MR(UF_EXT2) | MR(UF_EXT3), }; #undef MR uint32_t mask, v, code, type, len, i, idx; if (case_mask == 0) return 0; mask = 0; for(i = 0; i < 3; i++) { if ((case_mask >> i) & 1) mask |= tab_run_mask[i]; } for(idx = 0; idx < countof(case_conv_table1); idx++) { v = case_conv_table1[idx]; type = (v >> (32 - 17 - 7 - 4)) & 0xf; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if ((mask >> type) & 1) { // printf("%d: type=%d %04x %04x\n", idx, type, code, code + len - 1); switch(type) { case RUN_TYPE_UL: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; code += ((case_mask & CASE_U) != 0); for(i = 0; i < len; i += 2) { if (cr_add_interval(cr, code + i, code + i + 1)) return -1; } break; case RUN_TYPE_LSU: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; if (!(case_mask & CASE_U)) { if (cr_add_interval(cr, code, code + 1)) return -1; } if (cr_add_interval(cr, code + 1, code + 2)) return -1; if (case_mask & CASE_U) { if (cr_add_interval(cr, code + 2, code + 3)) return -1; } break; default: def_case: if (cr_add_interval(cr, code, code + len)) return -1; break; } } } return 0; }
O3
c
unicode_case1: testl %esi, %esi je 0x9c44b pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %eax, %eax leaq 0x11bab(%rip), %rcx # 0xade1c xorl %ebp, %ebp btl %eax, %esi jae 0x9c27a orl (%rcx), %ebp incq %rax addq $0x4, %rcx cmpq $0x3, %rax jne 0x9c273 movl %esi, %eax andl $0x1, %eax movl %eax, 0x4(%rsp) sete %al testb $0x6, %sil sete %cl orb %al, %cl movb %cl, 0x3(%rsp) xorl %r12d, %r12d leaq 0xa546(%rip), %rax # 0xa67f0 movl (%rax,%r12,4), %r13d movl %r13d, %eax shrl $0x4, %eax andl $0xf, %eax btl %eax, %ebp jae 0x9c437 movl %r13d, %r14d shrl $0xf, %r14d shrl $0x8, %r13d andl $0x7f, %r13d cmpl $0x5, %eax je 0x9c346 cmpl $0x4, %eax jne 0x9c3ee cmpb $0x0, 0x3(%rsp) je 0x9c3ee testl %r13d, %r13d je 0x9c437 addl 0x4(%rsp), %r14d xorl %r15d, %r15d movl (%rbx), %eax leal 0x2(%rax), %esi cmpl 0x4(%rbx), %esi jle 0x9c315 movq %rbx, %rdi callq 0x9af6f testl %eax, %eax jne 0x9c44e movl (%rbx), %eax leal (%r14,%r15), %ecx leal (%r14,%r15), %edx incl %edx movq 0x8(%rbx), %rsi leal 0x1(%rax), %edi movl %edi, (%rbx) cltq movl %ecx, (%rsi,%rax,4) movslq (%rbx), %rax leal 0x1(%rax), %ecx movl %ecx, (%rbx) movl %edx, (%rsi,%rax,4) addl $0x2, %r15d cmpl %r13d, %r15d jb 0x9c2f9 jmp 0x9c437 cmpb $0x0, 0x3(%rsp) je 0x9c3ee leal 0x1(%r14), %r13d cmpl $0x0, 0x4(%rsp) jne 0x9c393 movl (%rbx), %eax leal 0x2(%rax), %esi cmpl 0x4(%rbx), %esi jle 0x9c378 movq %rbx, %rdi callq 0x9af6f testl %eax, %eax jne 0x9c44e movl (%rbx), %eax movq 0x8(%rbx), %rcx leal 0x1(%rax), %edx movl %edx, (%rbx) cltq movl %r14d, (%rcx,%rax,4) movslq (%rbx), %rax leal 0x1(%rax), %edx movl %edx, (%rbx) movl %r13d, (%rcx,%rax,4) movl (%rbx), %ecx leal 0x2(%rcx), %esi cmpl 0x4(%rbx), %esi jle 0x9c3af movq %rbx, %rdi callq 0x9af6f testl %eax, %eax jne 0x9c44e movl (%rbx), %ecx leal 0x2(%r14), %r15d movq 0x8(%rbx), %rax leal 0x1(%rcx), %edx movl %edx, (%rbx) movslq %ecx, %rcx movl %r13d, (%rax,%rcx,4) movslq (%rbx), %rcx leal 0x1(%rcx), %edx movl %edx, (%rbx) movl %r15d, (%rax,%rcx,4) cmpl $0x0, 0x4(%rsp) je 0x9c437 addl $0x3, %r14d movl (%rbx), %ecx leal 0x2(%rcx), %esi cmpl 0x4(%rbx), %esi jle 0x9c41f movq %rbx, %rdi callq 0x9af6f jmp 0x9c409 addl %r14d, %r13d movl (%rbx), %ecx leal 0x2(%rcx), %esi cmpl 0x4(%rbx), %esi jle 0x9c415 movq %rbx, %rdi callq 0x9af6f movl %r14d, %r15d movl %r13d, %r14d testl %eax, %eax jne 0x9c44e movl %r14d, %r13d movl (%rbx), %ecx movl %r15d, %r14d movq 0x8(%rbx), %rax movl %r14d, %r15d movl %r13d, %r14d leal 0x1(%rcx), %edx movl %edx, (%rbx) movslq %ecx, %rcx movl %r15d, (%rax,%rcx,4) movslq (%rbx), %rcx leal 0x1(%rcx), %edx movl %edx, (%rbx) movl %r14d, (%rax,%rcx,4) incq %r12 cmpq $0x17a, %r12 # imm = 0x17A jne 0x9c2a3 xorl %eax, %eax jmp 0x9c453 xorl %eax, %eax retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
unicode_case1: test esi, esi jz loc_9C44B push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi xor eax, eax lea rcx, unk_ADE1C xor ebp, ebp loc_9C273: bt esi, eax jnb short loc_9C27A or ebp, [rcx] loc_9C27A: inc rax add rcx, 4 cmp rax, 3 jnz short loc_9C273 mov eax, esi and eax, 1 mov [rsp+38h+var_34], eax setz al test sil, 6 setz cl or cl, al mov [rsp+38h+var_35], cl xor r12d, r12d loc_9C2A3: lea rax, case_conv_table1 mov r13d, [rax+r12*4] mov eax, r13d shr eax, 4 and eax, 0Fh bt ebp, eax jnb loc_9C437 mov r14d, r13d shr r14d, 0Fh shr r13d, 8 and r13d, 7Fh cmp eax, 5 jz short loc_9C346 cmp eax, 4 jnz loc_9C3EE cmp [rsp+38h+var_35], 0 jz loc_9C3EE test r13d, r13d jz loc_9C437 add r14d, [rsp+38h+var_34] xor r15d, r15d loc_9C2F9: mov eax, [rbx] lea esi, [rax+2] cmp esi, [rbx+4] jle short loc_9C315 mov rdi, rbx call cr_realloc test eax, eax jnz loc_9C44E mov eax, [rbx] loc_9C315: lea ecx, [r14+r15] lea edx, [r14+r15] inc edx mov rsi, [rbx+8] lea edi, [rax+1] mov [rbx], edi cdqe mov [rsi+rax*4], ecx movsxd rax, dword ptr [rbx] lea ecx, [rax+1] mov [rbx], ecx mov [rsi+rax*4], edx add r15d, 2 cmp r15d, r13d jb short loc_9C2F9 jmp loc_9C437 loc_9C346: cmp [rsp+38h+var_35], 0 jz loc_9C3EE lea r13d, [r14+1] cmp [rsp+38h+var_34], 0 jnz short loc_9C393 mov eax, [rbx] lea esi, [rax+2] cmp esi, [rbx+4] jle short loc_9C378 mov rdi, rbx call cr_realloc test eax, eax jnz loc_9C44E mov eax, [rbx] loc_9C378: mov rcx, [rbx+8] lea edx, [rax+1] mov [rbx], edx cdqe mov [rcx+rax*4], r14d movsxd rax, dword ptr [rbx] lea edx, [rax+1] mov [rbx], edx mov [rcx+rax*4], r13d loc_9C393: mov ecx, [rbx] lea esi, [rcx+2] cmp esi, [rbx+4] jle short loc_9C3AF mov rdi, rbx call cr_realloc test eax, eax jnz loc_9C44E mov ecx, [rbx] loc_9C3AF: lea r15d, [r14+2] mov rax, [rbx+8] lea edx, [rcx+1] mov [rbx], edx movsxd rcx, ecx mov [rax+rcx*4], r13d movsxd rcx, dword ptr [rbx] lea edx, [rcx+1] mov [rbx], edx mov [rax+rcx*4], r15d cmp [rsp+38h+var_34], 0 jz short loc_9C437 add r14d, 3 mov ecx, [rbx] lea esi, [rcx+2] cmp esi, [rbx+4] jle short loc_9C41F mov rdi, rbx call cr_realloc jmp short loc_9C409 loc_9C3EE: add r13d, r14d mov ecx, [rbx] lea esi, [rcx+2] cmp esi, [rbx+4] jle short loc_9C415 mov rdi, rbx call cr_realloc mov r15d, r14d mov r14d, r13d loc_9C409: test eax, eax jnz short loc_9C44E mov r13d, r14d mov ecx, [rbx] mov r14d, r15d loc_9C415: mov rax, [rbx+8] mov r15d, r14d mov r14d, r13d loc_9C41F: lea edx, [rcx+1] mov [rbx], edx movsxd rcx, ecx mov [rax+rcx*4], r15d movsxd rcx, dword ptr [rbx] lea edx, [rcx+1] mov [rbx], edx mov [rax+rcx*4], r14d loc_9C437: inc r12 cmp r12, 17Ah jnz loc_9C2A3 xor eax, eax jmp short loc_9C453 loc_9C44B: xor eax, eax retn loc_9C44E: mov eax, 0FFFFFFFFh loc_9C453: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long unicode_case1(int *a1, int a2) { long long v2; // rax _DWORD *v3; // rcx int v4; // ebp long long v5; // r12 unsigned int v6; // r13d unsigned int v7; // eax unsigned int v8; // r14d unsigned int v9; // r13d unsigned int v10; // r14d unsigned int i; // r15d int v12; // eax int v13; // esi long long v14; // rsi long long v15; // rax unsigned int v16; // r13d int v17; // eax int v18; // esi long long v19; // rcx long long v20; // rax int v21; // ecx int v22; // esi unsigned int v23; // r15d long long v24; // rax long long v25; // rcx unsigned int v26; // r14d int v27; // ecx int v28; // esi int v29; // eax unsigned int v30; // r13d int v31; // esi long long v32; // rcx bool v34; // [rsp+1h] [rbp-35h] int v35; // [rsp+2h] [rbp-34h] if ( !a2 ) return 0LL; v2 = 0LL; v3 = &unk_ADE1C; v4 = 0; do { if ( _bittest(&a2, v2) ) v4 |= *v3; ++v2; ++v3; } while ( v2 != 3 ); v35 = a2 & 1; v34 = v35 == 0 || (a2 & 6) == 0; v5 = 0LL; while ( 1 ) { v6 = case_conv_table1[v5]; v7 = (unsigned __int8)v6 >> 4; if ( !_bittest(&v4, v7) ) goto LABEL_36; v8 = v6 >> 15; v9 = (v6 >> 8) & 0x7F; if ( v7 != 5 ) break; if ( !v34 ) goto LABEL_30; v16 = v8 + 1; if ( !v35 ) { v17 = *a1; v18 = *a1 + 2; if ( v18 > a1[1] ) { if ( (unsigned int)cr_realloc((long long)a1, v18) ) return 0xFFFFFFFFLL; v17 = *a1; } v19 = *((_QWORD *)a1 + 1); *a1 = v17 + 1; *(_DWORD *)(v19 + 4LL * v17) = v8; v20 = *a1; *a1 = v20 + 1; *(_DWORD *)(v19 + 4 * v20) = v16; } v21 = *a1; v22 = *a1 + 2; if ( v22 > a1[1] ) { if ( (unsigned int)cr_realloc((long long)a1, v22) ) return 0xFFFFFFFFLL; v21 = *a1; } v23 = v8 + 2; v24 = *((_QWORD *)a1 + 1); *a1 = v21 + 1; *(_DWORD *)(v24 + 4LL * v21) = v16; v25 = *a1; *a1 = v25 + 1; *(_DWORD *)(v24 + 4 * v25) = v8 + 2; if ( v35 ) { v26 = v8 + 3; v27 = *a1; v28 = *a1 + 2; if ( v28 > a1[1] ) { v29 = cr_realloc((long long)a1, v28); goto LABEL_32; } LABEL_35: *a1 = v27 + 1; *(_DWORD *)(v24 + 4LL * v27) = v23; v32 = *a1; *a1 = v32 + 1; *(_DWORD *)(v24 + 4 * v32) = v26; } LABEL_36: if ( ++v5 == 378 ) return 0LL; } if ( v7 == 4 && v34 ) { if ( v9 ) { v10 = v35 + v8; for ( i = 0; i < v9; i += 2 ) { v12 = *a1; v13 = *a1 + 2; if ( v13 > a1[1] ) { if ( (unsigned int)cr_realloc((long long)a1, v13) ) return 0xFFFFFFFFLL; v12 = *a1; } v14 = *((_QWORD *)a1 + 1); *a1 = v12 + 1; *(_DWORD *)(v14 + 4LL * v12) = v10 + i; v15 = *a1; *a1 = v15 + 1; *(_DWORD *)(v14 + 4 * v15) = v10 + i + 1; } } goto LABEL_36; } LABEL_30: v30 = v8 + v9; v27 = *a1; v31 = *a1 + 2; if ( v31 <= a1[1] ) goto LABEL_34; v29 = cr_realloc((long long)a1, v31); v23 = v8; v26 = v30; LABEL_32: if ( !v29 ) { v30 = v26; v27 = *a1; v8 = v23; LABEL_34: v24 = *((_QWORD *)a1 + 1); v23 = v8; v26 = v30; goto LABEL_35; } return 0xFFFFFFFFLL; }
unicode_case1: TEST ESI,ESI JZ 0x0019c44b PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI XOR EAX,EAX LEA RCX,[0x1ade1c] XOR EBP,EBP LAB_0019c273: BT ESI,EAX JNC 0x0019c27a OR EBP,dword ptr [RCX] LAB_0019c27a: INC RAX ADD RCX,0x4 CMP RAX,0x3 JNZ 0x0019c273 MOV EAX,ESI AND EAX,0x1 MOV dword ptr [RSP + 0x4],EAX SETZ AL TEST SIL,0x6 SETZ CL OR CL,AL MOV byte ptr [RSP + 0x3],CL XOR R12D,R12D LAB_0019c2a3: LEA RAX,[0x1a67f0] MOV R13D,dword ptr [RAX + R12*0x4] MOV EAX,R13D SHR EAX,0x4 AND EAX,0xf BT EBP,EAX JNC 0x0019c437 MOV R14D,R13D SHR R14D,0xf SHR R13D,0x8 AND R13D,0x7f CMP EAX,0x5 JZ 0x0019c346 CMP EAX,0x4 JNZ 0x0019c3ee CMP byte ptr [RSP + 0x3],0x0 JZ 0x0019c3ee TEST R13D,R13D JZ 0x0019c437 ADD R14D,dword ptr [RSP + 0x4] XOR R15D,R15D LAB_0019c2f9: MOV EAX,dword ptr [RBX] LEA ESI,[RAX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019c315 MOV RDI,RBX CALL 0x0019af6f TEST EAX,EAX JNZ 0x0019c44e MOV EAX,dword ptr [RBX] LAB_0019c315: LEA ECX,[R14 + R15*0x1] LEA EDX,[R14 + R15*0x1] INC EDX MOV RSI,qword ptr [RBX + 0x8] LEA EDI,[RAX + 0x1] MOV dword ptr [RBX],EDI CDQE MOV dword ptr [RSI + RAX*0x4],ECX MOVSXD RAX,dword ptr [RBX] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX],ECX MOV dword ptr [RSI + RAX*0x4],EDX ADD R15D,0x2 CMP R15D,R13D JC 0x0019c2f9 JMP 0x0019c437 LAB_0019c346: CMP byte ptr [RSP + 0x3],0x0 JZ 0x0019c3ee LEA R13D,[R14 + 0x1] CMP dword ptr [RSP + 0x4],0x0 JNZ 0x0019c393 MOV EAX,dword ptr [RBX] LEA ESI,[RAX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019c378 MOV RDI,RBX CALL 0x0019af6f TEST EAX,EAX JNZ 0x0019c44e MOV EAX,dword ptr [RBX] LAB_0019c378: MOV RCX,qword ptr [RBX + 0x8] LEA EDX,[RAX + 0x1] MOV dword ptr [RBX],EDX CDQE MOV dword ptr [RCX + RAX*0x4],R14D MOVSXD RAX,dword ptr [RBX] LEA EDX,[RAX + 0x1] MOV dword ptr [RBX],EDX MOV dword ptr [RCX + RAX*0x4],R13D LAB_0019c393: MOV ECX,dword ptr [RBX] LEA ESI,[RCX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019c3af MOV RDI,RBX CALL 0x0019af6f TEST EAX,EAX JNZ 0x0019c44e MOV ECX,dword ptr [RBX] LAB_0019c3af: LEA R15D,[R14 + 0x2] MOV RAX,qword ptr [RBX + 0x8] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],R13D MOVSXD RCX,dword ptr [RBX] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOV dword ptr [RAX + RCX*0x4],R15D CMP dword ptr [RSP + 0x4],0x0 JZ 0x0019c437 ADD R14D,0x3 MOV ECX,dword ptr [RBX] LEA ESI,[RCX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019c41f MOV RDI,RBX CALL 0x0019af6f JMP 0x0019c409 LAB_0019c3ee: ADD R13D,R14D MOV ECX,dword ptr [RBX] LEA ESI,[RCX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019c415 MOV RDI,RBX CALL 0x0019af6f MOV R15D,R14D MOV R14D,R13D LAB_0019c409: TEST EAX,EAX JNZ 0x0019c44e MOV R13D,R14D MOV ECX,dword ptr [RBX] MOV R14D,R15D LAB_0019c415: MOV RAX,qword ptr [RBX + 0x8] MOV R15D,R14D MOV R14D,R13D LAB_0019c41f: LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],R15D MOVSXD RCX,dword ptr [RBX] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOV dword ptr [RAX + RCX*0x4],R14D LAB_0019c437: INC R12 CMP R12,0x17a JNZ 0x0019c2a3 XOR EAX,EAX JMP 0x0019c453 LAB_0019c44b: XOR EAX,EAX RET LAB_0019c44e: MOV EAX,0xffffffff LAB_0019c453: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 unicode_case1(int *param_1,uint param_2) { uint uVar1; int iVar2; long lVar3; long lVar4; uint *puVar5; uint uVar6; uint uVar7; int iVar8; uint uVar9; bool bVar10; bool bVar11; uint local_34; if (param_2 == 0) { return 0; } lVar3 = 0; puVar5 = &DAT_001ade1c; uVar6 = 0; do { if ((param_2 >> ((uint)lVar3 & 0x1f) & 1) != 0) { uVar6 = uVar6 | *puVar5; } lVar3 = lVar3 + 1; puVar5 = puVar5 + 1; } while (lVar3 != 3); bVar10 = (param_2 & 1) == 0; local_34 = param_2 & 1; bVar11 = (param_2 & 6) == 0; lVar3 = 0; do { uVar7 = (&case_conv_table1)[lVar3]; uVar1 = uVar7 >> 4 & 0xf; if ((uVar6 >> uVar1 & 1) != 0) { uVar9 = uVar7 >> 0xf; uVar7 = uVar7 >> 8 & 0x7f; if (uVar1 == 5) { if (!bVar11 && !bVar10) goto LAB_0019c3ee; if (local_34 == 0) { iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } lVar4 = *(long *)(param_1 + 2); *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9; iVar2 = *param_1; *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + 1; } iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } uVar7 = uVar9 + 2; lVar4 = *(long *)(param_1 + 2); *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + 1; iVar2 = *param_1; *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar7; if (local_34 == 0) goto LAB_0019c437; iVar8 = uVar9 + 3; iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); uVar9 = uVar7; goto LAB_0019c409; } } else { if ((uVar1 == 4) && (bVar11 || bVar10)) { if (uVar7 != 0) { uVar1 = 0; do { iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } lVar4 = *(long *)(param_1 + 2); *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + local_34 + uVar1; iVar2 = *param_1; *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + local_34 + uVar1 + 1; uVar1 = uVar1 + 2; } while (uVar1 < uVar7); } goto LAB_0019c437; } LAB_0019c3ee: iVar8 = uVar7 + uVar9; iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); LAB_0019c409: if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } lVar4 = *(long *)(param_1 + 2); uVar7 = uVar9; } *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar7; iVar2 = *param_1; *param_1 = iVar2 + 1; *(int *)(lVar4 + (long)iVar2 * 4) = iVar8; } LAB_0019c437: lVar3 = lVar3 + 1; if (lVar3 == 0x17a) { return 0; } } while( true ); }
133
common_sampler_free(common_sampler*)
monkey531[P]llama/common/sampling.cpp
void common_sampler_free(struct common_sampler * gsmpl) { if (gsmpl) { llama_sampler_free(gsmpl->grmr); llama_sampler_free(gsmpl->chain); delete gsmpl; } }
O1
cpp
common_sampler_free(common_sampler*): testq %rdi, %rdi je 0xcf2be pushq %rbx movq %rdi, %rbx movq 0x138(%rdi), %rdi callq 0x1b780 movq 0x140(%rbx), %rdi callq 0x1b780 movq 0x180(%rbx), %rdi testq %rdi, %rdi je 0xcf28d movq 0x190(%rbx), %rsi subq %rdi, %rsi callq 0x1b900 movq 0x168(%rbx), %rdi testq %rdi, %rdi je 0xcf2a8 movq 0x178(%rbx), %rsi subq %rdi, %rsi callq 0x1b900 movq %rbx, %rdi callq 0x22eb8 movl $0x1b8, %esi # imm = 0x1B8 movq %rbx, %rdi popq %rbx jmp 0x1b900 retq
_Z19common_sampler_freeP14common_sampler: test rdi, rdi jz short locret_CF2BE push rbx mov rbx, rdi mov rdi, [rdi+138h] call _llama_sampler_free mov rdi, [rbx+140h] call _llama_sampler_free mov rdi, [rbx+180h]; void * test rdi, rdi jz short loc_CF28D mov rsi, [rbx+190h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CF28D: mov rdi, [rbx+168h]; void * test rdi, rdi jz short loc_CF2A8 mov rsi, [rbx+178h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CF2A8: mov rdi, rbx; this call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling() mov esi, 1B8h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong) locret_CF2BE: retn
void common_sampler_free(common_params_sampling *this) { void *v2; // rdi void *v3; // rdi if ( this ) { llama_sampler_free(*((_QWORD *)this + 39)); llama_sampler_free(*((_QWORD *)this + 40)); v2 = (void *)*((_QWORD *)this + 48); if ( v2 ) operator delete(v2, *((_QWORD *)this + 50) - (_QWORD)v2); v3 = (void *)*((_QWORD *)this + 45); if ( v3 ) operator delete(v3, *((_QWORD *)this + 47) - (_QWORD)v3); common_params_sampling::~common_params_sampling(this); operator delete(this, 0x1B8uLL); } }
common_sampler_free: TEST RDI,RDI JZ 0x001cf2be PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x138] CALL 0x0011b780 MOV RDI,qword ptr [RBX + 0x140] CALL 0x0011b780 MOV RDI,qword ptr [RBX + 0x180] TEST RDI,RDI JZ 0x001cf28d MOV RSI,qword ptr [RBX + 0x190] SUB RSI,RDI CALL 0x0011b900 LAB_001cf28d: MOV RDI,qword ptr [RBX + 0x168] TEST RDI,RDI JZ 0x001cf2a8 MOV RSI,qword ptr [RBX + 0x178] SUB RSI,RDI CALL 0x0011b900 LAB_001cf2a8: MOV RDI,RBX CALL 0x00122eb8 MOV ESI,0x1b8 MOV RDI,RBX POP RBX JMP 0x0011b900 LAB_001cf2be: RET
/* common_sampler_free(common_sampler*) */ void common_sampler_free(common_sampler *param_1) { void *pvVar1; if (param_1 != (common_sampler *)0x0) { llama_sampler_free(*(int8 *)(param_1 + 0x138)); llama_sampler_free(*(int8 *)(param_1 + 0x140)); pvVar1 = *(void **)(param_1 + 0x180); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(param_1 + 400) - (long)pvVar1); } pvVar1 = *(void **)(param_1 + 0x168); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(param_1 + 0x178) - (long)pvVar1); } common_params_sampling::~common_params_sampling((common_params_sampling *)param_1); operator_delete(param_1,0x1b8); return; } return; }
134
codegen_generate_variable_def
tsotchke[P]eshkol/src/backend/codegen/definitions.c
bool codegen_generate_variable_def(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); // Get diagnostics context DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); // Check node type if ((node->type != AST_DEFINE) && (node->type != AST_VARIABLE_DEF)) { char debug_msg[256]; snprintf(debug_msg, sizeof(debug_msg), "Expected AST_DEFINE node, got node type %d", node->type); diagnostic_error(diagnostics, node->line, node->column, debug_msg); return false; } // Get output file FILE* output = codegen_context_get_output(context); // Get type context TypeInferenceContext* type_context = codegen_context_get_type_context(context); // Get variable type Type* var_type = type_inference_get_type(type_context, node->as.define.value); // Check if we're in a function context bool in_function = codegen_context_in_function(context); // Generate type if (var_type) { fprintf(output, "%s ", codegen_type_to_c_type(var_type)); } else { fprintf(output, "void* "); } // Generate variable name if (node->as.define.name->type == AST_IDENTIFIER) { // Replace hyphens with underscores in variable names char* variable_name = strdup(node->as.define.name->as.identifier.name); if (variable_name) { for (char* p = variable_name; *p; p++) { if (*p == '-') { *p = '_'; } } // Only initialize if we're inside a function if (in_function) { fprintf(output, "%s = ", variable_name); // Generate initialization value inside a function if (!codegen_generate_expression(context, node->as.define.value)) { free(variable_name); return false; } } else { // At global scope, just declare and set to NULL fprintf(output, "%s = NULL", variable_name); } free(variable_name); } else { if (in_function) { fprintf(output, "%s = ", node->as.define.name->as.identifier.name); if (!codegen_generate_expression(context, node->as.define.value)) { return false; } } else { fprintf(output, "%s = NULL", node->as.define.name->as.identifier.name); } } } else { if (in_function) { fprintf(output, "_var_%zu_%zu = ", node->line, node->column); if (!codegen_generate_expression(context, node->as.define.value)) { return false; } } else { fprintf(output, "_var_%zu_%zu = NULL", node->line, node->column); } } // Add semicolon for variable definitions fprintf(output, ";"); return true; }
O3
c
codegen_generate_variable_def: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 testq %rdi, %rdi je 0x14b00 movq %rsi, %r14 testq %rsi, %rsi je 0x14b1f movq %rdi, %r15 callq 0xb340 movl (%r14), %ecx cmpl $0x7, %ecx je 0x1493b cmpl $0x1c, %ecx jne 0x1498a movq %r15, %rdi callq 0xb394 movq %rax, %rbx movq %r15, %rdi callq 0xb36a movq 0x50(%r14), %rsi movq %rax, %rdi callq 0x8c5e movq %rax, %r12 movq %r15, %rdi callq 0xb495 movl %eax, %ebp testq %r12, %r12 je 0x149c0 movq %r12, %rdi callq 0x14cec leaq 0x8df0(%rip), %rsi # 0x1d76b movq %rbx, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x2200 jmp 0x149d9 movq %rax, %rbx leaq 0xc543(%rip), %rdx # 0x20ed7 xorl %ebp, %ebp movq %rsp, %r15 movl $0x100, %esi # imm = 0x100 movq %r15, %rdi xorl %eax, %eax callq 0x2160 movl 0x8(%r14), %esi movl 0x10(%r14), %edx movq %rbx, %rdi movq %r15, %rcx callq 0x3e0b jmp 0x14aec leaq 0x8ddd(%rip), %rdi # 0x1d7a4 movl $0x6, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movq 0x48(%r14), %rax cmpl $0x6, (%rax) jne 0x14a10 movq 0x48(%rax), %r13 movq %r13, %rdi callq 0x22d0 testq %rax, %rax je 0x14a7d movq %rax, %r12 movzbl (%rax), %ecx cmpl $0x2d, %ecx je 0x14a08 testl %ecx, %ecx jne 0x14a0b jmp 0x14a32 movb $0x5f, (%rax) incq %rax jmp 0x149fa movq 0x8(%r14), %rdx movq 0x10(%r14), %rcx testb %bpl, %bpl je 0x14a6a leaq 0x8f49(%rip), %rsi # 0x1d96d xorl %ebp, %ebp movq %rbx, %rdi xorl %eax, %eax callq 0x2200 jmp 0x14a98 testb %bpl, %bpl je 0x14aaa leaq 0x8f25(%rip), %rsi # 0x1d963 movq %rbx, %rdi movq %r12, %rdx xorl %eax, %eax callq 0x2200 movq 0x50(%r14), %rsi movq %r15, %rdi callq 0x10f0c testb %al, %al jne 0x14abe movq %r12, %rdi callq 0x2030 xorl %ebp, %ebp jmp 0x14aec leaq 0xc49b(%rip), %rsi # 0x20f0c movq %rbx, %rdi xorl %eax, %eax callq 0x2200 jmp 0x14adc testb %bpl, %bpl je 0x14ac8 leaq 0x8eda(%rip), %rsi # 0x1d963 xorl %ebp, %ebp movq %rbx, %rdi movq %r13, %rdx xorl %eax, %eax callq 0x2200 movq 0x50(%r14), %rsi movq %r15, %rdi callq 0x10f0c testb %al, %al jne 0x14adc jmp 0x14aec leaq 0xc451(%rip), %rsi # 0x20f02 movq %rbx, %rdi movq %r12, %rdx xorl %eax, %eax callq 0x2200 movq %r12, %rdi callq 0x2030 jmp 0x14adc leaq 0xc433(%rip), %rsi # 0x20f02 movq %rbx, %rdi movq %r13, %rdx xorl %eax, %eax callq 0x2200 movl $0x3b, %edi movq %rbx, %rsi callq 0x21c0 movb $0x1, %bpl movl %ebp, %eax addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5258(%rip), %rdi # 0x19d5f leaq 0xc185(%rip), %rsi # 0x20c93 leaq 0xc37b(%rip), %rcx # 0x20e90 movl $0xcc, %edx callq 0x2180 leaq 0x6da9(%rip), %rdi # 0x1b8cf leaq 0xc166(%rip), %rsi # 0x20c93 leaq 0xc35c(%rip), %rcx # 0x20e90 movl $0xcd, %edx callq 0x2180
codegen_generate_variable_def: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h test rdi, rdi jz loc_14B00 mov r14, rsi test rsi, rsi jz loc_14B1F mov r15, rdi call codegen_context_get_diagnostics mov ecx, [r14] cmp ecx, 7 jz short loc_1493B cmp ecx, 1Ch jnz short loc_1498A loc_1493B: mov rdi, r15 call codegen_context_get_output mov rbx, rax mov rdi, r15 call codegen_context_get_type_context mov rsi, [r14+50h] mov rdi, rax call type_inference_get_type mov r12, rax mov rdi, r15 call codegen_context_in_function mov ebp, eax test r12, r12 jz short loc_149C0 mov rdi, r12 call codegen_type_to_c_type lea rsi, aS_1; "%s " mov rdi, rbx mov rdx, rax xor eax, eax call _fprintf jmp short loc_149D9 loc_1498A: mov rbx, rax lea rdx, aExpectedAstDef; "Expected AST_DEFINE node, got node type"... xor ebp, ebp mov r15, rsp mov esi, 100h mov rdi, r15 xor eax, eax call _snprintf mov esi, [r14+8] mov edx, [r14+10h] mov rdi, rbx mov rcx, r15 call diagnostic_error jmp loc_14AEC loc_149C0: lea rdi, aVoid_0; "void* " mov esi, 6 mov edx, 1 mov rcx, rbx call _fwrite loc_149D9: mov rax, [r14+48h] cmp dword ptr [rax], 6 jnz short loc_14A10 mov r13, [rax+48h] mov rdi, r13 call _strdup test rax, rax jz loc_14A7D mov r12, rax loc_149FA: movzx ecx, byte ptr [rax] cmp ecx, 2Dh ; '-' jz short loc_14A08 test ecx, ecx jnz short loc_14A0B jmp short loc_14A32 loc_14A08: mov byte ptr [rax], 5Fh ; '_' loc_14A0B: inc rax jmp short loc_149FA loc_14A10: mov rdx, [r14+8] mov rcx, [r14+10h] test bpl, bpl jz short loc_14A6A lea rsi, aVarZuZu+4; "_var_%zu_%zu = " xor ebp, ebp mov rdi, rbx xor eax, eax call _fprintf jmp short loc_14A98 loc_14A32: test bpl, bpl jz short loc_14AAA lea rsi, aS_2+4; "%s = " mov rdi, rbx mov rdx, r12 xor eax, eax call _fprintf mov rsi, [r14+50h] mov rdi, r15 call codegen_generate_expression test al, al jnz short loc_14ABE mov rdi, r12 call _free xor ebp, ebp jmp loc_14AEC loc_14A6A: lea rsi, aVarZuZuNull_0; "_var_%zu_%zu = NULL" mov rdi, rbx xor eax, eax call _fprintf jmp short loc_14ADC loc_14A7D: test bpl, bpl jz short loc_14AC8 lea rsi, aS_2+4; "%s = " xor ebp, ebp mov rdi, rbx mov rdx, r13 xor eax, eax call _fprintf loc_14A98: mov rsi, [r14+50h] mov rdi, r15 call codegen_generate_expression test al, al jnz short loc_14ADC jmp short loc_14AEC loc_14AAA: lea rsi, aSNull_0; "%s = NULL" mov rdi, rbx mov rdx, r12 xor eax, eax call _fprintf loc_14ABE: mov rdi, r12 call _free jmp short loc_14ADC loc_14AC8: lea rsi, aSNull_0; "%s = NULL" mov rdi, rbx mov rdx, r13 xor eax, eax call _fprintf loc_14ADC: mov edi, 3Bh ; ';' mov rsi, rbx call _fputc mov bpl, 1 loc_14AEC: mov eax, ebp add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_14B00: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenGen_29; "_Bool codegen_generate_variable_def(Cod"... mov edx, 0CCh call ___assert_fail loc_14B1F: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenGen_29; "_Bool codegen_generate_variable_def(Cod"... mov edx, 0CDh call ___assert_fail
long long codegen_generate_variable_def(long long a1, int *a2) { long long diagnostics; // rax int v4; // ecx long long output; // rbx _QWORD *type_context; // rax long long v7; // rsi long long type; // r12 unsigned int v9; // eax long long v10; // rdx unsigned int v11; // ebp const char *v12; // rax long long *v13; // rbx long long v14; // r8 long long v15; // r9 long long v16; // rax const char *v17; // r13 char *v18; // rax const char *v19; // r12 long long v20; // rdx long long v21; // rcx _BYTE v23[312]; // [rsp+0h] [rbp-138h] BYREF if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c", 204LL, "_Bool codegen_generate_variable_def(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c", 205LL, "_Bool codegen_generate_variable_def(CodegenContext *, const AstNode *)"); diagnostics = codegen_context_get_diagnostics(a1); v4 = *a2; if ( *a2 == 7 || v4 == 28 ) { output = codegen_context_get_output(a1); type_context = (_QWORD *)codegen_context_get_type_context(a1); v7 = *((_QWORD *)a2 + 10); type = type_inference_get_type(type_context, v7); LOBYTE(v9) = codegen_context_in_function(a1); v11 = v9; if ( type ) { v12 = (const char *)codegen_type_to_c_type(type, v7, v10); fprintf(output, "%s ", v12); } else { fwrite("void* ", 6LL, 1LL, output); } v16 = *((_QWORD *)a2 + 9); if ( *(_DWORD *)v16 == 6 ) { v17 = *(const char **)(v16 + 72); v18 = (char *)strdup(v17); if ( v18 ) { v19 = v18; while ( 1 ) { if ( *v18 == 45 ) { *v18 = 95; } else if ( !*v18 ) { if ( (_BYTE)v11 ) { fprintf(output, "%s = ", v19); if ( !(unsigned __int8)codegen_generate_expression(a1, *((_DWORD **)a2 + 10)) ) { free(v19); return 0; } } else { fprintf(output, "%s = NULL", v19); } free(v19); LABEL_30: fputc(59LL, output); LOBYTE(v11) = 1; return v11; } ++v18; } } if ( !(_BYTE)v11 ) { fprintf(output, "%s = NULL", v17); goto LABEL_30; } v11 = 0; fprintf(output, "%s = ", v17); } else { v20 = *((_QWORD *)a2 + 1); v21 = *((_QWORD *)a2 + 2); if ( !(_BYTE)v11 ) { fprintf(output, "_var_%zu_%zu = NULL", v20, v21); goto LABEL_30; } v11 = 0; fprintf(output, "_var_%zu_%zu = ", v20, v21); } if ( !(unsigned __int8)codegen_generate_expression(a1, *((_DWORD **)a2 + 10)) ) return v11; goto LABEL_30; } v13 = (long long *)diagnostics; v11 = 0; snprintf(v23, 256LL, "Expected AST_DEFINE node, got node type %d", v4); diagnostic_error(v13, a2[2], a2[4], (long long)v23, v14, v15); return v11; }
codegen_generate_variable_def: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 TEST RDI,RDI JZ 0x00114b00 MOV R14,RSI TEST RSI,RSI JZ 0x00114b1f MOV R15,RDI CALL 0x0010b340 MOV ECX,dword ptr [R14] CMP ECX,0x7 JZ 0x0011493b CMP ECX,0x1c JNZ 0x0011498a LAB_0011493b: MOV RDI,R15 CALL 0x0010b394 MOV RBX,RAX MOV RDI,R15 CALL 0x0010b36a MOV RSI,qword ptr [R14 + 0x50] MOV RDI,RAX CALL 0x00108c5e MOV R12,RAX MOV RDI,R15 CALL 0x0010b495 MOV EBP,EAX TEST R12,R12 JZ 0x001149c0 MOV RDI,R12 CALL 0x00114cec LEA RSI,[0x11d76b] MOV RDI,RBX MOV RDX,RAX XOR EAX,EAX CALL 0x00102200 JMP 0x001149d9 LAB_0011498a: MOV RBX,RAX LEA RDX,[0x120ed7] XOR EBP,EBP MOV R15,RSP MOV ESI,0x100 MOV RDI,R15 XOR EAX,EAX CALL 0x00102160 MOV ESI,dword ptr [R14 + 0x8] MOV EDX,dword ptr [R14 + 0x10] MOV RDI,RBX MOV RCX,R15 CALL 0x00103e0b JMP 0x00114aec LAB_001149c0: LEA RDI,[0x11d7a4] MOV ESI,0x6 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 LAB_001149d9: MOV RAX,qword ptr [R14 + 0x48] CMP dword ptr [RAX],0x6 JNZ 0x00114a10 MOV R13,qword ptr [RAX + 0x48] MOV RDI,R13 CALL 0x001022d0 TEST RAX,RAX JZ 0x00114a7d MOV R12,RAX LAB_001149fa: MOVZX ECX,byte ptr [RAX] CMP ECX,0x2d JZ 0x00114a08 TEST ECX,ECX JNZ 0x00114a0b JMP 0x00114a32 LAB_00114a08: MOV byte ptr [RAX],0x5f LAB_00114a0b: INC RAX JMP 0x001149fa LAB_00114a10: MOV RDX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0x10] TEST BPL,BPL JZ 0x00114a6a LEA RSI,[0x11d96d] XOR EBP,EBP MOV RDI,RBX XOR EAX,EAX CALL 0x00102200 JMP 0x00114a98 LAB_00114a32: TEST BPL,BPL JZ 0x00114aaa LEA RSI,[0x11d963] MOV RDI,RBX MOV RDX,R12 XOR EAX,EAX CALL 0x00102200 MOV RSI,qword ptr [R14 + 0x50] MOV RDI,R15 CALL 0x00110f0c TEST AL,AL JNZ 0x00114abe MOV RDI,R12 CALL 0x00102030 XOR EBP,EBP JMP 0x00114aec LAB_00114a6a: LEA RSI,[0x120f0c] MOV RDI,RBX XOR EAX,EAX CALL 0x00102200 JMP 0x00114adc LAB_00114a7d: TEST BPL,BPL JZ 0x00114ac8 LEA RSI,[0x11d963] XOR EBP,EBP MOV RDI,RBX MOV RDX,R13 XOR EAX,EAX CALL 0x00102200 LAB_00114a98: MOV RSI,qword ptr [R14 + 0x50] MOV RDI,R15 CALL 0x00110f0c TEST AL,AL JNZ 0x00114adc JMP 0x00114aec LAB_00114aaa: LEA RSI,[0x120f02] MOV RDI,RBX MOV RDX,R12 XOR EAX,EAX CALL 0x00102200 LAB_00114abe: MOV RDI,R12 CALL 0x00102030 JMP 0x00114adc LAB_00114ac8: LEA RSI,[0x120f02] MOV RDI,RBX MOV RDX,R13 XOR EAX,EAX CALL 0x00102200 LAB_00114adc: MOV EDI,0x3b MOV RSI,RBX CALL 0x001021c0 MOV BPL,0x1 LAB_00114aec: MOV EAX,EBP ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00114b00: LEA RDI,[0x119d5f] LEA RSI,[0x120c93] LEA RCX,[0x120e90] MOV EDX,0xcc CALL 0x00102180 LAB_00114b1f: LEA RDI,[0x11b8cf] LEA RSI,[0x120c93] LEA RCX,[0x120e90] MOV EDX,0xcd CALL 0x00102180
int8 codegen_generate_variable_def(long param_1,int *param_2) { char *__s; char cVar1; uint uVar2; int8 uVar3; FILE *__s_00; long lVar4; char *__ptr; char *pcVar5; ulong uVar6; char acStack_138 [264]; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c" ,0xcc,"_Bool codegen_generate_variable_def(CodegenContext *, const AstNode *)"); } if (param_2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/definitions.c" ,0xcd,"_Bool codegen_generate_variable_def(CodegenContext *, const AstNode *)"); } uVar3 = codegen_context_get_diagnostics(); if ((*param_2 != 7) && (*param_2 != 0x1c)) { snprintf(acStack_138,0x100,"Expected AST_DEFINE node, got node type %d"); diagnostic_error(uVar3,param_2[2],param_2[4],acStack_138); return 0; } __s_00 = (FILE *)codegen_context_get_output(param_1); uVar3 = codegen_context_get_type_context(param_1); lVar4 = type_inference_get_type(uVar3,*(int8 *)(param_2 + 0x14)); uVar2 = codegen_context_in_function(param_1); uVar6 = (ulong)uVar2; if (lVar4 == 0) { fwrite("void* ",6,1,__s_00); } else { uVar3 = codegen_type_to_c_type(lVar4); fprintf(__s_00,"%s ",uVar3); } cVar1 = (char)uVar2; if (**(int **)(param_2 + 0x12) == 6) { __s = *(char **)(*(int **)(param_2 + 0x12) + 0x12); __ptr = strdup(__s); pcVar5 = __ptr; if (__ptr != (char *)0x0) { do { if (*pcVar5 == '-') { *pcVar5 = '_'; } else if (*pcVar5 == '\0') goto LAB_00114a32; pcVar5 = pcVar5 + 1; } while( true ); } if (cVar1 == '\0') { fprintf(__s_00,"%s = NULL",__s); goto LAB_00114adc; } fprintf(__s_00,"%s = ",__s); } else { if (cVar1 == '\0') { fprintf(__s_00,"_var_%zu_%zu = NULL",*(int8 *)(param_2 + 2),*(int8 *)(param_2 + 4) ); goto LAB_00114adc; } fprintf(__s_00,"_var_%zu_%zu = ",*(int8 *)(param_2 + 2),*(int8 *)(param_2 + 4)); } uVar6 = 0; cVar1 = codegen_generate_expression(param_1,*(int8 *)(param_2 + 0x14)); if (cVar1 == '\0') { return 0; } LAB_00114adc: fputc(0x3b,__s_00); return CONCAT71((int7)(uVar6 >> 8),1); LAB_00114a32: if (cVar1 == '\0') { fprintf(__s_00,"%s = NULL",__ptr); } else { fprintf(__s_00,"%s = ",__ptr); cVar1 = codegen_generate_expression(param_1,*(int8 *)(param_2 + 0x14)); if (cVar1 == '\0') { free(__ptr); return 0; } } free(__ptr); goto LAB_00114adc; }
135
js_strtod
bluesky950520[P]quickjs/quickjs.c
static double js_strtod(const char *str, int radix, BOOL is_float) { double d; int c; if (!is_float || radix != 10) { const char *p = str; uint64_t n_max, n; int int_exp, is_neg; is_neg = 0; if (*p == '-') { is_neg = 1; p++; } /* skip leading zeros */ while (*p == '0') p++; n = 0; if (radix == 10) n_max = ((uint64_t)-1 - 9) / 10; /* most common case */ else n_max = ((uint64_t)-1 - (radix - 1)) / radix; /* XXX: could be more precise */ int_exp = 0; while ((c = to_digit(*p)) < radix) { if (n <= n_max) { n = n * radix + c; } else { if (radix == 10) goto strtod_case; int_exp++; } p++; } d = n; if (int_exp != 0) { d *= pow(radix, int_exp); } if (is_neg) d = -d; } else { strtod_case: d = strtod(str, NULL); } return d; }
O0
c
js_strtod: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movl %esi, 0x3c(%rsp) movl %edx, 0x38(%rsp) cmpl $0x0, 0x38(%rsp) je 0x69e13 cmpl $0xa, 0x3c(%rsp) je 0x69f98 movq 0x40(%rsp), %rax movq %rax, 0x20(%rsp) movl $0x0, 0x8(%rsp) movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x2d, %eax jne 0x69e48 movl $0x1, 0x8(%rsp) movq 0x20(%rsp), %rax addq $0x1, %rax movq %rax, 0x20(%rsp) jmp 0x69e4a movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x30, %eax jne 0x69e67 movq 0x20(%rsp), %rax addq $0x1, %rax movq %rax, 0x20(%rsp) jmp 0x69e4a movq $0x0, 0x10(%rsp) cmpl $0xa, 0x3c(%rsp) jne 0x69e88 movabsq $0x1999999999999998, %rax # imm = 0x1999999999999998 movq %rax, 0x18(%rsp) jmp 0x69eab movl 0x3c(%rsp), %eax subl $0x1, %eax movslq %eax, %rcx movq $-0x1, %rax subq %rcx, %rax movslq 0x3c(%rsp), %rcx xorl %edx, %edx divq %rcx movq %rax, 0x18(%rsp) movl $0x0, 0xc(%rsp) movq 0x20(%rsp), %rax movzbl (%rax), %edi callq 0x69c70 movl %eax, 0x2c(%rsp) cmpl 0x3c(%rsp), %eax jge 0x69f1a movq 0x10(%rsp), %rax cmpq 0x18(%rsp), %rax ja 0x69ef3 movq 0x10(%rsp), %rax movslq 0x3c(%rsp), %rcx imulq %rcx, %rax movslq 0x2c(%rsp), %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) jmp 0x69f0a cmpl $0xa, 0x3c(%rsp) jne 0x69eff jmp 0x69f9a movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) movq 0x20(%rsp), %rax addq $0x1, %rax movq %rax, 0x20(%rsp) jmp 0x69eb3 movaps 0xa9c0f(%rip), %xmm1 # 0x113b30 movq 0x10(%rsp), %xmm0 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movapd 0xa9c0d(%rip), %xmm1 # 0x113b40 subpd %xmm1, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movsd %xmm0, 0x30(%rsp) cmpl $0x0, 0xc(%rsp) je 0x69f6c cvtsi2sdl 0x3c(%rsp), %xmm0 cvtsi2sdl 0xc(%rsp), %xmm1 callq 0xe230 mulsd 0x30(%rsp), %xmm0 movsd %xmm0, 0x30(%rsp) cmpl $0x0, 0x8(%rsp) je 0x69f96 movsd 0x30(%rsp), %xmm0 movq %xmm0, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm0 movsd %xmm0, 0x30(%rsp) jmp 0x69fae jmp 0x69f9a movq 0x40(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xe1a0 movsd %xmm0, 0x30(%rsp) movsd 0x30(%rsp), %xmm0 addq $0x48, %rsp retq nopl (%rax)
js_strtod: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_C], esi mov [rsp+48h+var_10], edx cmp [rsp+48h+var_10], 0 jz short loc_69E13 cmp [rsp+48h+var_C], 0Ah jz loc_69F98 loc_69E13: mov rax, [rsp+48h+var_8] mov [rsp+48h+var_28], rax mov [rsp+48h+var_40], 0 mov rax, [rsp+48h+var_28] movzx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_69E48 mov [rsp+48h+var_40], 1 mov rax, [rsp+48h+var_28] add rax, 1 mov [rsp+48h+var_28], rax loc_69E48: jmp short $+2 loc_69E4A: mov rax, [rsp+48h+var_28] movzx eax, byte ptr [rax] cmp eax, 30h ; '0' jnz short loc_69E67 mov rax, [rsp+48h+var_28] add rax, 1 mov [rsp+48h+var_28], rax jmp short loc_69E4A loc_69E67: mov [rsp+48h+var_38], 0 cmp [rsp+48h+var_C], 0Ah jnz short loc_69E88 mov rax, 1999999999999998h mov [rsp+48h+var_30], rax jmp short loc_69EAB loc_69E88: mov eax, [rsp+48h+var_C] sub eax, 1 movsxd rcx, eax mov rax, 0FFFFFFFFFFFFFFFFh sub rax, rcx movsxd rcx, [rsp+48h+var_C] xor edx, edx div rcx mov [rsp+48h+var_30], rax loc_69EAB: mov [rsp+48h+var_3C], 0 loc_69EB3: mov rax, [rsp+48h+var_28] movzx edi, byte ptr [rax] call to_digit mov [rsp+48h+var_1C], eax cmp eax, [rsp+48h+var_C] jge short loc_69F1A mov rax, [rsp+48h+var_38] cmp rax, [rsp+48h+var_30] ja short loc_69EF3 mov rax, [rsp+48h+var_38] movsxd rcx, [rsp+48h+var_C] imul rax, rcx movsxd rcx, [rsp+48h+var_1C] add rax, rcx mov [rsp+48h+var_38], rax jmp short loc_69F0A loc_69EF3: cmp [rsp+48h+var_C], 0Ah jnz short loc_69EFF jmp loc_69F9A loc_69EFF: mov eax, [rsp+48h+var_3C] add eax, 1 mov [rsp+48h+var_3C], eax loc_69F0A: mov rax, [rsp+48h+var_28] add rax, 1 mov [rsp+48h+var_28], rax jmp short loc_69EB3 loc_69F1A: movaps xmm1, cs:xmmword_113B30 movq xmm0, [rsp+48h+var_38] punpckldq xmm0, xmm1 movapd xmm1, cs:xmmword_113B40 subpd xmm0, xmm1 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 movsd [rsp+48h+var_18], xmm0 cmp [rsp+48h+var_3C], 0 jz short loc_69F6C cvtsi2sd xmm0, [rsp+48h+var_C] cvtsi2sd xmm1, [rsp+48h+var_3C] call _pow mulsd xmm0, [rsp+48h+var_18] movsd [rsp+48h+var_18], xmm0 loc_69F6C: cmp [rsp+48h+var_40], 0 jz short loc_69F96 movsd xmm0, [rsp+48h+var_18] movq rax, xmm0 mov rcx, 8000000000000000h xor rax, rcx movq xmm0, rax movsd [rsp+48h+var_18], xmm0 loc_69F96: jmp short loc_69FAE loc_69F98: jmp short $+2 loc_69F9A: mov rdi, [rsp+48h+var_8] xor eax, eax mov esi, eax call _strtod movsd [rsp+48h+var_18], xmm0 loc_69FAE: movsd xmm0, [rsp+48h+var_18] add rsp, 48h retn
double js_strtod(_BYTE *a1, int a2, int a3) { __m128d v3; // xmm1 double v4; // xmm0_8 int v6; // [rsp+8h] [rbp-40h] int v7; // [rsp+Ch] [rbp-3Ch] __m128i v8; // [rsp+10h] [rbp-38h] BYREF _BYTE *v9; // [rsp+20h] [rbp-28h] int v10; // [rsp+2Ch] [rbp-1Ch] double v11; // [rsp+30h] [rbp-18h] int v12; // [rsp+38h] [rbp-10h] int v13; // [rsp+3Ch] [rbp-Ch] _BYTE *v14; // [rsp+40h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; if ( a3 && v13 == 10 ) return strtod(v14, 0LL); v9 = v14; v6 = 0; if ( *v14 == 45 ) { v6 = 1; ++v9; } while ( *v9 == 48 ) ++v9; v8.m128i_i64[0] = 0LL; if ( v13 == 10 ) v8.m128i_i64[1] = 0x1999999999999998LL; else v8.m128i_i64[1] = (-1LL - (v13 - 1)) / (unsigned long long)v13; v7 = 0; while ( 1 ) { v10 = to_digit((unsigned __int8)*v9); if ( v10 >= v13 ) break; if ( v8.m128i_i64[0] > (unsigned long long)v8.m128i_i64[1] ) { if ( v13 == 10 ) return strtod(v14, 0LL); ++v7; } else { v8.m128i_i64[0] = v10 + v13 * v8.m128i_i64[0]; } ++v9; } v3 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v8), (__m128i)xmmword_113B30), (__m128d)xmmword_113B40); v11 = _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0]; if ( v7 ) { v4 = pow((double)v13, (double)v7); v11 = v4 * v11; } if ( v6 ) *(_QWORD *)&v11 ^= 0x8000000000000000LL; return v11; }
js_strtod: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ESI MOV dword ptr [RSP + 0x38],EDX CMP dword ptr [RSP + 0x38],0x0 JZ 0x00169e13 CMP dword ptr [RSP + 0x3c],0xa JZ 0x00169f98 LAB_00169e13: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x8],0x0 MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x00169e48 MOV dword ptr [RSP + 0x8],0x1 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x1 MOV qword ptr [RSP + 0x20],RAX LAB_00169e48: JMP 0x00169e4a LAB_00169e4a: MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x30 JNZ 0x00169e67 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x1 MOV qword ptr [RSP + 0x20],RAX JMP 0x00169e4a LAB_00169e67: MOV qword ptr [RSP + 0x10],0x0 CMP dword ptr [RSP + 0x3c],0xa JNZ 0x00169e88 MOV RAX,0x1999999999999998 MOV qword ptr [RSP + 0x18],RAX JMP 0x00169eab LAB_00169e88: MOV EAX,dword ptr [RSP + 0x3c] SUB EAX,0x1 MOVSXD RCX,EAX MOV RAX,-0x1 SUB RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x3c] XOR EDX,EDX DIV RCX MOV qword ptr [RSP + 0x18],RAX LAB_00169eab: MOV dword ptr [RSP + 0xc],0x0 LAB_00169eb3: MOV RAX,qword ptr [RSP + 0x20] MOVZX EDI,byte ptr [RAX] CALL 0x00169c70 MOV dword ptr [RSP + 0x2c],EAX CMP EAX,dword ptr [RSP + 0x3c] JGE 0x00169f1a MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x18] JA 0x00169ef3 MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x3c] IMUL RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x2c] ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX JMP 0x00169f0a LAB_00169ef3: CMP dword ptr [RSP + 0x3c],0xa JNZ 0x00169eff JMP 0x00169f9a LAB_00169eff: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX LAB_00169f0a: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x1 MOV qword ptr [RSP + 0x20],RAX JMP 0x00169eb3 LAB_00169f1a: MOVAPS XMM1,xmmword ptr [0x00213b30] MOVQ XMM0,qword ptr [RSP + 0x10] PUNPCKLDQ XMM0,XMM1 MOVAPD XMM1,xmmword ptr [0x00213b40] SUBPD XMM0,XMM1 MOVAPS XMM1,XMM0 UNPCKHPD XMM0,XMM0 ADDSD XMM0,XMM1 MOVSD qword ptr [RSP + 0x30],XMM0 CMP dword ptr [RSP + 0xc],0x0 JZ 0x00169f6c CVTSI2SD XMM0,dword ptr [RSP + 0x3c] CVTSI2SD XMM1,dword ptr [RSP + 0xc] CALL 0x0010e230 MULSD XMM0,qword ptr [RSP + 0x30] MOVSD qword ptr [RSP + 0x30],XMM0 LAB_00169f6c: CMP dword ptr [RSP + 0x8],0x0 JZ 0x00169f96 MOVSD XMM0,qword ptr [RSP + 0x30] MOVQ RAX,XMM0 MOV RCX,-0x8000000000000000 XOR RAX,RCX MOVQ XMM0,RAX MOVSD qword ptr [RSP + 0x30],XMM0 LAB_00169f96: JMP 0x00169fae LAB_00169f98: JMP 0x00169f9a LAB_00169f9a: MOV RDI,qword ptr [RSP + 0x40] XOR EAX,EAX MOV ESI,EAX CALL 0x0010e1a0 MOVSD qword ptr [RSP + 0x30],XMM0 LAB_00169fae: MOVSD XMM0,qword ptr [RSP + 0x30] ADD RSP,0x48 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ double js_strtod(char *param_1,int param_2,int param_3) { char cVar1; int iVar2; double dVar3; int1 auVar4 [16]; int local_3c; ulong local_38; ulong local_30; char *local_28; double local_18; if ((param_3 == 0) || (param_2 != 10)) { cVar1 = *param_1; local_28 = param_1; if (cVar1 == '-') { local_28 = param_1 + 1; } for (; *local_28 == '0'; local_28 = local_28 + 1) { } local_38 = 0; if (param_2 == 10) { local_30 = 0x1999999999999998; } else { local_30 = (-(long)(param_2 + -1) - 1U) / (ulong)(long)param_2; } local_3c = 0; while (iVar2 = to_digit(*local_28), iVar2 < param_2) { if (local_30 < local_38) { if (param_2 == 10) goto LAB_00169f9a; local_3c = local_3c + 1; } else { local_38 = local_38 * (long)param_2 + (long)iVar2; } local_28 = local_28 + 1; } auVar4._8_4_ = (int)(local_38 >> 0x20); auVar4._0_8_ = local_38; auVar4._12_4_ = _UNK_00213b34; local_18 = (auVar4._8_8_ - _UNK_00213b48) + ((double)CONCAT44(_DAT_00213b30,(int)local_38) - _DAT_00213b40); if (local_3c != 0) { dVar3 = pow((double)param_2,(double)local_3c); local_18 = dVar3 * local_18; } if (cVar1 == '-') { local_18 = -local_18; } } else { LAB_00169f9a: local_18 = strtod(param_1,(char **)0x0); } return local_18; }
136
thai2sortable
eloqsql/strings/ctype-tis620.c
static size_t thai2sortable(uchar *tstr, size_t len) { uchar *p; size_t tlen; uchar l2bias; tlen= len; l2bias= 256 - 8; for (p= tstr; tlen > 0; p++, tlen--) { uchar c= *p; if (isthai(c)) { const int *t_ctype0= t_ctype[c]; if (isconsnt(c)) l2bias -= 8; if (isldvowel(c) && tlen != 1 && isconsnt(p[1])) { /* simply swap between leading-vowel and consonant */ *p= p[1]; p[1]= c; tlen--; p++; continue; } /* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */ if (t_ctype0[1] >= L2_GARAN) { /* l2bias use to control position weight of l2char example (*=l2char) XX*X must come before X*XX */ memmove((char*) p, (char*) (p+1), tlen-1); tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1; p--; continue; } } else { l2bias-= 8; *p= to_lower_tis620[c]; } } return len; }
O3
c
thai2sortable: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x38(%rbp) movq %rsi, -0x30(%rbp) testq %rsi, %rsi je 0x3c978 movb $-0x8, %r13b leaq 0x1a8485(%rip), %r12 # 0x1e4d40 leaq 0x2dddae(%rip), %r8 # 0x31a670 movq -0x38(%rbp), %r15 movq -0x30(%rbp), %rbx movb (%r15), %al movzbl %al, %ecx testb %cl, %cl js 0x3c8ec addb $-0x8, %r13b movb (%rcx,%r8), %al movb %al, (%r15) incq %r15 decq %rbx jne 0x3c8ca jmp 0x3c978 leaq (%rcx,%rcx,4), %rcx movl 0x10(%r12,%rcx,4), %edx leal -0x8(%r13), %esi testb $0x10, %dl movzbl %r13b, %edi movzbl %sil, %r13d cmovel %edi, %r13d cmpq $0x1, %rbx je 0x3c925 andl $0x20, %edx je 0x3c925 movzbl 0x1(%r15), %edx leaq -0xcf(%rdx), %rsi cmpq $-0x2e, %rsi jae 0x3c966 leaq (%r12,%rcx,4), %rax movl 0x4(%rax), %r14d cmpl $0x9, %r14d jl 0x3c8df leaq 0x1(%r15), %rsi leaq -0x1(%rbx), %rdx movq %r15, %rdi callq 0x245d0 leaq 0x2ddd26(%rip), %r8 # 0x31a670 addb %r13b, %r14b addb $-0x8, %r14b movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movb %r14b, -0x1(%rcx,%rax) decq %r15 jmp 0x3c8df movb %dl, (%r15) movb %al, 0x1(%r15) incq %r15 decq %rbx jmp 0x3c8df movq -0x30(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
thai2sortable: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdi mov [rbp+var_30], rsi test rsi, rsi jz loc_3C978 mov r13b, 0F8h lea r12, t_ctype lea r8, to_lower_tis620 mov r15, [rbp+var_38] mov rbx, [rbp+var_30] loc_3C8CA: mov al, [r15] movzx ecx, al test cl, cl js short loc_3C8EC add r13b, 0F8h mov al, [rcx+r8] mov [r15], al loc_3C8DF: inc r15 dec rbx jnz short loc_3C8CA jmp loc_3C978 loc_3C8EC: lea rcx, [rcx+rcx*4] mov edx, [r12+rcx*4+10h] lea esi, [r13-8] test dl, 10h movzx edi, r13b movzx r13d, sil cmovz r13d, edi cmp rbx, 1 jz short loc_3C925 and edx, 20h jz short loc_3C925 movzx edx, byte ptr [r15+1] lea rsi, [rdx-0CFh] cmp rsi, 0FFFFFFFFFFFFFFD2h jnb short loc_3C966 loc_3C925: lea rax, [r12+rcx*4] mov r14d, [rax+4] cmp r14d, 9 jl short loc_3C8DF lea rsi, [r15+1] lea rdx, [rbx-1] mov rdi, r15 call _memmove lea r8, to_lower_tis620 add r14b, r13b add r14b, 0F8h mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov [rcx+rax-1], r14b dec r15 jmp loc_3C8DF loc_3C966: mov [r15], dl mov [r15+1], al inc r15 dec rbx jmp loc_3C8DF loc_3C978: mov rax, [rbp+var_30] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long thai2sortable(unsigned __int8 *a1, long long a2) { char v2; // r13 unsigned __int8 *v3; // r15 long long v4; // rbx unsigned __int8 v5; // al long long v6; // rcx long long v7; // rcx int v8; // edx char v9; // di long long v10; // rdx int v11; // r14d if ( a2 ) { v2 = -8; v3 = a1; v4 = a2; do { v5 = *v3; v6 = *v3; if ( (v6 & 0x80u) != 0LL ) { v7 = 5 * v6; v8 = t_ctype[v7 + 4]; v9 = v2; v2 -= 8; if ( (v8 & 0x10) == 0 ) v2 = v9; if ( v4 != 1 && (v8 & 0x20) != 0 && (v10 = v3[1], (unsigned long long)(v10 - 207) >= 0xFFFFFFFFFFFFFFD2LL) ) { *v3 = v10; *++v3 = v5; --v4; } else { v11 = t_ctype[v7 + 1]; if ( v11 >= 9 ) { memmove(v3, v3 + 1, v4 - 1); a1[a2 - 1] = v2 + v11 - 8; --v3; } } } else { v2 -= 8; *v3 = to_lower_tis620[v6]; } ++v3; --v4; } while ( v4 ); } return a2; }
thai2sortable: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x30],RSI TEST RSI,RSI JZ 0x0013c978 MOV R13B,0xf8 LEA R12,[0x2e4d40] LEA R8,[0x41a670] MOV R15,qword ptr [RBP + -0x38] MOV RBX,qword ptr [RBP + -0x30] LAB_0013c8ca: MOV AL,byte ptr [R15] MOVZX ECX,AL TEST CL,CL JS 0x0013c8ec ADD R13B,0xf8 MOV AL,byte ptr [RCX + R8*0x1] MOV byte ptr [R15],AL LAB_0013c8df: INC R15 DEC RBX JNZ 0x0013c8ca JMP 0x0013c978 LAB_0013c8ec: LEA RCX,[RCX + RCX*0x4] MOV EDX,dword ptr [R12 + RCX*0x4 + 0x10] LEA ESI,[R13 + -0x8] TEST DL,0x10 MOVZX EDI,R13B MOVZX R13D,SIL CMOVZ R13D,EDI CMP RBX,0x1 JZ 0x0013c925 AND EDX,0x20 JZ 0x0013c925 MOVZX EDX,byte ptr [R15 + 0x1] LEA RSI,[RDX + -0xcf] CMP RSI,-0x2e JNC 0x0013c966 LAB_0013c925: LEA RAX,[R12 + RCX*0x4] MOV R14D,dword ptr [RAX + 0x4] CMP R14D,0x9 JL 0x0013c8df LEA RSI,[R15 + 0x1] LEA RDX,[RBX + -0x1] MOV RDI,R15 CALL 0x001245d0 LEA R8,[0x41a670] ADD R14B,R13B ADD R14B,0xf8 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV byte ptr [RCX + RAX*0x1 + -0x1],R14B DEC R15 JMP 0x0013c8df LAB_0013c966: MOV byte ptr [R15],DL MOV byte ptr [R15 + 0x1],AL INC R15 DEC RBX JMP 0x0013c8df LAB_0013c978: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long thai2sortable(byte *param_1,long param_2) { byte bVar1; int iVar2; char cVar3; ulong uVar4; long lVar5; char cVar6; byte *__dest; if (param_2 != 0) { cVar6 = -8; lVar5 = param_2; __dest = param_1; do { bVar1 = *__dest; uVar4 = (ulong)bVar1; if ((char)bVar1 < '\0') { cVar3 = cVar6 + -8; if ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x10) == 0) { cVar3 = cVar6; } cVar6 = cVar3; if (((lVar5 == 1) || ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x20) == 0)) || ((ulong)__dest[1] - 0xcf < 0xffffffffffffffd2)) { iVar2 = *(int *)(t_ctype + uVar4 * 0x14 + 4); if (8 < iVar2) { memmove(__dest,__dest + 1,lVar5 - 1); param_1[param_2 + -1] = ((char)iVar2 + cVar3) - 8; __dest = __dest + -1; } } else { *__dest = __dest[1]; __dest[1] = bVar1; __dest = __dest + 1; lVar5 = lVar5 + -1; } } else { *__dest = to_lower_tis620[uVar4]; cVar6 = cVar6 + -8; } __dest = __dest + 1; lVar5 = lVar5 + -1; } while (lVar5 != 0); } return param_2; }
137
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtAssign const*) const
BhuvanGudi[P]LexiParse/src/generation.hpp
void operator()(const NodeStmtAssign* stmt_assign) const { const auto it = std::ranges::find_if(gen.m_vars, [&](const Var& var) { return var.name == stmt_assign->ident.value.value(); }); if (it == gen.m_vars.end()) { std::cerr << "Undeclared identifier: " << stmt_assign->ident.value.value() << std::endl; exit(EXIT_FAILURE); } gen.gen_expr(stmt_assign->expr); gen.pop("rax"); gen.m_output << " mov [rsp + " << (gen.m_stack_size - it->stack_loc - 1) * 8 << "], rax\n"; }
O0
cpp
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtAssign const*) const: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x70(%rbp) movq (%rax), %rsi addq $0x1a8, %rsi # imm = 0x1A8 leaq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdx leaq 0x1829(%rip), %rdi # 0x175e1 callq 0x15f50 movq %rax, %rcx movq -0x70(%rbp), %rax movq %rcx, -0x18(%rbp) movq (%rax), %rdi addq $0x1a8, %rdi # imm = 0x1A8 callq 0x13c10 movq %rax, -0x30(%rbp) leaq -0x18(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x15fc0 testb $0x1, %al jne 0x15dee jmp 0x15e37 movq 0xe1fb(%rip), %rdi # 0x23ff0 leaq 0x166b(%rip), %rsi # 0x17467 callq 0x31c0 movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rdi addq $0x8, %rdi callq 0x11b00 movq -0x78(%rbp), %rdi movq %rax, %rsi callq 0x31a0 movq %rax, %rdi movq 0xe180(%rip), %rsi # 0x23fa8 callq 0x3200 movl $0x1, %edi callq 0x3230 movq -0x70(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x30(%rax), %rsi callq 0x114c0 movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0x88(%rbp) leaq -0x51(%rbp), %rdi movq %rdi, -0x80(%rbp) callq 0x32e0 movq -0x80(%rbp), %rdx leaq 0x15e8(%rip), %rsi # 0x17459 leaq -0x50(%rbp), %rdi callq 0x90b0 jmp 0x15e7c movq -0x88(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x114f0 jmp 0x15e8e leaq -0x50(%rbp), %rdi callq 0x3bd0 leaq -0x51(%rbp), %rdi callq 0x3220 movq -0x70(%rbp), %rax movq (%rax), %rdi addq $0x18, %rdi addq $0x10, %rdi leaq 0x16dd(%rip), %rsi # 0x17593 callq 0x31c0 movq %rax, %rcx movq -0x70(%rbp), %rax movq %rcx, -0x90(%rbp) movq (%rax), %rax movq 0x1a0(%rax), %rax movq %rax, -0x98(%rbp) leaq -0x18(%rbp), %rdi callq 0x16000 movq -0x98(%rbp), %rsi movq -0x90(%rbp), %rdi subq 0x20(%rax), %rsi subq $0x1, %rsi shlq $0x3, %rsi callq 0x3080 movq %rax, %rdi leaq 0x1697(%rip), %rsi # 0x175a3 callq 0x31c0 addq $0xa0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x15f3d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) leaq -0x50(%rbp), %rdi callq 0x3bd0 leaq -0x51(%rbp), %rdi callq 0x3220 movq -0x60(%rbp), %rdi callq 0x32d0 nop
_ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssign: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_70], rax mov rsi, [rax] add rsi, 1A8h lea rax, [rbp+var_10] mov [rbp+var_20], rax mov rdx, [rbp+var_20] lea rdi, _ZNSt6ranges7find_ifE; std::ranges::find_if call _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE_ mov rcx, rax mov rax, [rbp+var_70] mov [rbp+var_18], rcx mov rdi, [rax] add rdi, 1A8h call _ZNSt6vectorIN9Generator3VarESaIS1_EE3endEv; std::vector<Generator::Var>::end(void) mov [rbp+var_30], rax lea rdi, [rbp+var_18] lea rsi, [rbp+var_30] call _ZN9__gnu_cxxeqIPN9Generator3VarESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE test al, 1 jnz short loc_15DEE jmp short loc_15E37 loc_15DEE: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aUndeclaredIden; "Undeclared identifier: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_78], rax mov rdi, [rbp+var_10] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) mov rdi, [rbp+var_78] mov rsi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) mov edi, 1 call _exit loc_15E37: mov rax, [rbp+var_70] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+30h] call _ZN9Generator8gen_exprEPK8NodeExpr; Generator::gen_expr(NodeExpr const*) mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_88], rax lea rdi, [rbp+var_51] mov [rbp+var_80], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_80] lea rsi, aRax; "rax" lea rdi, [rbp+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_15E7C: mov rdi, [rbp+var_88] lea rsi, [rbp+var_50] call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&) jmp short $+2 loc_15E8E: lea rdi, [rbp+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rbp+var_70] mov rdi, [rax] add rdi, 18h add rdi, 10h lea rsi, aMovRsp; " mov [rsp + " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, rax mov rax, [rbp+var_70] mov [rbp+var_90], rcx mov rax, [rax] mov rax, [rax+1A0h] mov [rbp+var_98], rax lea rdi, [rbp+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPN9Generator3VarESt6vectorIS2_SaIS2_EEEptEv; __gnu_cxx::__normal_iterator<Generator::Var *,std::vector<Generator::Var>>::operator->(void) mov rsi, [rbp+var_98] mov rdi, [rbp+var_90] sub rsi, [rax+20h] sub rsi, 1 shl rsi, 3 call __ZNSolsEm; std::ostream::operator<<(ulong) mov rdi, rax lea rsi, aRax_0; "], rax\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 0A0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp short loc_15F3D mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax lea rdi, [rbp+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_15F3D: lea rdi, [rbp+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rbp+var_60] call __Unwind_Resume
long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(long long *a1, long long a2) { long long v2; // rsi long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // rax long long v8; // [rsp+8h] [rbp-98h] long long v9; // [rsp+10h] [rbp-90h] long long v10; // [rsp+18h] [rbp-88h] long long v11; // [rsp+28h] [rbp-78h] char v12; // [rsp+4Fh] [rbp-51h] BYREF _BYTE v13[32]; // [rsp+50h] [rbp-50h] BYREF _QWORD v14[3]; // [rsp+70h] [rbp-30h] BYREF long long if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE; // [rsp+88h] [rbp-18h] BYREF _QWORD v16[2]; // [rsp+90h] [rbp-10h] BYREF v16[1] = a1; v16[0] = a2; v2 = *a1 + 424; v14[2] = v16; if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE = ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE_(&std::ranges::find_if, v2, v16); v14[0] = std::vector<Generator::Var>::end(*a1 + 424); if ( (__gnu_cxx::operator==<Generator::Var *,std::vector<Generator::Var>>( &if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE, v14) & 1) != 0 ) { v11 = std::operator<<<std::char_traits<char>>(&std::cerr, "Undeclared identifier: "); v3 = std::optional<std::string>::value(v16[0] + 8LL); v4 = std::operator<<<char>(v11, v3); std::ostream::operator<<(v4, &std::endl<char,std::char_traits<char>>); exit(1LL); } Generator::gen_expr(*a1, *(_QWORD *)(v16[0] + 48LL)); v10 = *a1; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v13, (long long)"rax", (long long)&v12); Generator::pop(v10, (long long)v13); std::string::~string((long long)v13); std::allocator<char>::~allocator(&v12); v9 = std::operator<<<std::char_traits<char>>(*a1 + 40, " mov [rsp + "); v8 = *(_QWORD *)(*a1 + 416); v5 = __gnu_cxx::__normal_iterator<Generator::Var *,std::vector<Generator::Var>>::operator->(&if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE); v6 = std::ostream::operator<<(v9, 8 * (v8 - *(_QWORD *)(v5 + 32) - 1)); return std::operator<<<std::char_traits<char>>(v6, "], rax\n"); }
operator(): PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x70],RAX MOV RSI,qword ptr [RAX] ADD RSI,0x1a8 LEA RAX,[RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RDX,qword ptr [RBP + -0x20] LEA RDI,[0x1175e1] CALL 0x00115f50 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x18],RCX MOV RDI,qword ptr [RAX] ADD RDI,0x1a8 CALL 0x00113c10 MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x18] LEA RSI,[RBP + -0x30] CALL 0x00115fc0 TEST AL,0x1 JNZ 0x00115dee JMP 0x00115e37 LAB_00115dee: MOV RDI,qword ptr [0x00123ff0] LEA RSI,[0x117467] CALL 0x001031c0 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 CALL 0x00111b00 MOV RDI,qword ptr [RBP + -0x78] MOV RSI,RAX CALL 0x001031a0 MOV RDI,RAX MOV RSI,qword ptr [0x00123fa8] CALL 0x00103200 MOV EDI,0x1 CALL 0x00103230 LAB_00115e37: MOV RAX,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x30] CALL 0x001114c0 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x88],RAX LEA RDI,[RBP + -0x51] MOV qword ptr [RBP + -0x80],RDI CALL 0x001032e0 MOV RDX,qword ptr [RBP + -0x80] LAB_00115e6a: LEA RSI,[0x117459] LEA RDI,[RBP + -0x50] CALL 0x001090b0 JMP 0x00115e7c LAB_00115e7c: MOV RDI,qword ptr [RBP + -0x88] LEA RSI,[RBP + -0x50] CALL 0x001114f0 LAB_00115e8c: JMP 0x00115e8e LAB_00115e8e: LEA RDI,[RBP + -0x50] CALL 0x00103bd0 LEA RDI,[RBP + -0x51] CALL 0x00103220 MOV RAX,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RAX] ADD RDI,0x18 ADD RDI,0x10 LEA RSI,[0x117593] CALL 0x001031c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x90],RCX MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a0] MOV qword ptr [RBP + -0x98],RAX LEA RDI,[RBP + -0x18] CALL 0x00116000 MOV RSI,qword ptr [RBP + -0x98] MOV RDI,qword ptr [RBP + -0x90] SUB RSI,qword ptr [RAX + 0x20] SUB RSI,0x1 SHL RSI,0x3 CALL 0x00103080 MOV RDI,RAX LEA RSI,[0x1175a3] CALL 0x001031c0 ADD RSP,0xa0 POP RBP RET
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtAssign const*) const */ void __thiscall Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator() (StmtVisitor *this,NodeStmtAssign *param_1) { Generator *this_00; long lVar1; ulong uVar2; string *psVar3; ostream *poVar4; long lVar5; allocator local_59; string local_58 [32]; int8 local_38 [2]; NodeStmtAssign **local_28; int8 local_20; NodeStmtAssign *local_18; StmtVisitor *local_10; local_28 = &local_18; local_18 = param_1; local_10 = this; local_20 = _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE_ (&std::ranges::find_if,*(long *)this + 0x1a8,local_28); local_38[0] = std::vector<Generator::Var,std::allocator<Generator::Var>>::end ((vector<Generator::Var,std::allocator<Generator::Var>> *) (*(long *)this + 0x1a8)); uVar2 = _ZN9__gnu_cxxeqIPN9Generator3VarESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE (&local_20,local_38); if ((uVar2 & 1) == 0) { gen_expr(*(Generator **)this,*(NodeExpr **)(local_18 + 0x30)); this_00 = *(Generator **)this; std::allocator<char>::allocator(); /* try { // try from 00115e6a to 00115e79 has its CatchHandler @ 00115f1a */ std::__cxx11::string::string<std::allocator<char>>(local_58,"rax",&local_59); /* try { // try from 00115e7c to 00115e8b has its CatchHandler @ 00115f28 */ pop(this_00,local_58); std::__cxx11::string::~string(local_58); std::allocator<char>::~allocator((allocator<char> *)&local_59); poVar4 = std::operator<<((ostream *)(*(long *)this + 0x28)," mov [rsp + "); lVar1 = *(long *)(*(long *)this + 0x1a0); lVar5 = __gnu_cxx:: __normal_iterator<Generator::Var*,std::vector<Generator::Var,std::allocator<Generator::Var>>> ::operator->((__normal_iterator<Generator::Var*,std::vector<Generator::Var,std::allocator<Generator::Var>>> *)&local_20); poVar4 = (ostream *) std::ostream::operator<<(poVar4,((lVar1 - *(long *)(lVar5 + 0x20)) + -1) * 8); std::operator<<(poVar4,"], rax\n"); return; } poVar4 = std::operator<<((ostream *)PTR_cerr_00123ff0,"Undeclared identifier: "); psVar3 = (string *) std::optional<std::__cxx11::string>::value ((optional<std::__cxx11::string> *)(local_18 + 8)); poVar4 = std::operator<<(poVar4,psVar3); std::ostream::operator<< (poVar4,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00123fa8); /* WARNING: Subroutine does not return */ exit(1); }
138
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtAssign const*) const
BhuvanGudi[P]LexiParse/src/generation.hpp
void operator()(const NodeStmtAssign* stmt_assign) const { const auto it = std::ranges::find_if(gen.m_vars, [&](const Var& var) { return var.name == stmt_assign->ident.value.value(); }); if (it == gen.m_vars.end()) { std::cerr << "Undeclared identifier: " << stmt_assign->ident.value.value() << std::endl; exit(EXIT_FAILURE); } gen.gen_expr(stmt_assign->expr); gen.pop("rax"); gen.m_output << " mov [rsp + " << (gen.m_stack_size - it->stack_loc - 1) * 8 << "], rax\n"; }
O1
cpp
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtAssign const*) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %rax movq %rsi, (%rax) movq (%rdi), %rcx movq 0x1a8(%rcx), %r14 movq 0x1b0(%rcx), %r12 movq %rax, 0x10(%rsp) cmpq %r12, %r14 je 0x8cf2 leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x8e27 testb %al, %al jne 0x8cf2 addq $0x28, %r14 cmpq %r12, %r14 jne 0x8cda movq (%rbx), %rax cmpq 0x1b0(%rax), %r14 je 0x8dc4 movq 0x8(%rsp), %rcx movq 0x30(%rcx), %rsi leaq 0x10(%rsp), %rdi movq %rax, (%rdi) movzbl 0x8(%rsi), %eax leaq 0x401a(%rip), %rcx # 0xcd38 callq *(%rcx,%rax,8) movq (%rbx), %r15 leaq 0x20(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x711(%rip), %rsi # 0x9445 leaq 0x70d(%rip), %rdx # 0x9448 leaq 0x10(%rsp), %r12 movq %r12, %rdi callq 0x73ac movq %r15, %rdi movq %r12, %rsi callq 0x75ea movq 0x10(%rsp), %rdi cmpq %r13, %rdi je 0x8d6a movq 0x20(%rsp), %rsi incq %rsi callq 0x2200 movq (%rbx), %r15 addq $0x28, %r15 leaq 0x807(%rip), %rsi # 0x957f movl $0xf, %edx movq %r15, %rdi callq 0x2230 movq (%rbx), %rax movq 0x20(%r14), %rsi notq %rsi addq 0x1a0(%rax), %rsi shlq $0x3, %rsi movq %r15, %rdi callq 0x2120 leaq 0x7e6(%rip), %rsi # 0x958f movl $0x7, %edx movq %rax, %rdi callq 0x2230 addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq 0x4225(%rip), %rdi # 0xcff0 leaq 0x681(%rip), %rsi # 0x9453 callq 0x21e0 movq %rax, %rbx movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x7776 movq %rbx, %rdi movq %rax, %rsi callq 0x21c0 movq %rax, %rdi callq 0x20e0 movl $0x1, %edi callq 0x2240 movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r13, %rdi je 0x8e1f movq 0x20(%rsp), %rsi incq %rsi callq 0x2200 movq %rbx, %rdi callq 0x22d0
_ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssign: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov rbx, rdi lea rax, [rsp+58h+var_50] mov [rax], rsi mov rcx, [rdi] mov r14, [rcx+1A8h] mov r12, [rcx+1B0h] mov [rsp+58h+var_48], rax cmp r14, r12 jz short loc_8CF2 lea r15, [rsp+58h+var_48] loc_8CDA: mov rdi, r15 mov rsi, r14 call _ZSt13__invoke_implIbRZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKNS0_3VarEE_JRS8_EET_St14__invoke_otherOT0_DpOT1_; std::__invoke_impl<bool,Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator() const(NodeStmtAssign const*)::{lambda(Generator::Var const&)#1} &,Generator::Var&>(std::__invoke_other,Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator() const(NodeStmtAssign const*)::{lambda(Generator::Var const&)#1} &,Generator::Var&) test al, al jnz short loc_8CF2 add r14, 28h ; '(' cmp r14, r12 jnz short loc_8CDA loc_8CF2: mov rax, [rbx] cmp r14, [rax+1B0h] jz loc_8DC4 mov rcx, [rsp+58h+var_50] mov rsi, [rcx+30h] lea rdi, [rsp+58h+var_48] mov [rdi], rax movzx eax, byte ptr [rsi+8] lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD38h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&) mov r15, [rbx] lea r13, [rsp+58h+var_38] mov [r13-10h], r13 lea rsi, aRax; "rax" lea rdx, aRax+3; "" lea r12, [rsp+58h+var_48] mov rdi, r12 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 rdi, r15 mov rsi, r12 call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&) mov rdi, [rsp+58h+var_48]; void * cmp rdi, r13 jz short loc_8D6A mov rsi, [rsp+58h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8D6A: mov r15, [rbx] add r15, 28h ; '(' lea rsi, aMovRsp; " mov [rsp + " mov edx, 0Fh mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx] mov rsi, [r14+20h] not rsi add rsi, [rax+1A0h] shl rsi, 3 mov rdi, r15 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aRax_0; "], rax\n" mov edx, 7 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_8DC4: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aUndeclaredIden; "Undeclared identifier: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, [rsp+58h+var_50] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) mov rdi, rbx mov rsi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov edi, 1 call _exit mov rbx, rax mov rdi, [rsp+58h+var_48]; void * cmp rdi, r13 jz short loc_8E1F mov rsi, [rsp+58h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8E1F: mov rdi, rbx call __Unwind_Resume
long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(long long *a1, long long a2) { long long v2; // r14 long long v3; // r12 long long v4; // rsi long long v5; // r15 long long v6; // r15 long long v7; // rax long long v9; // rbx long long v10; // rax long long v11; // rax long long v12; // [rsp+8h] [rbp-50h] BYREF void *v13[2]; // [rsp+10h] [rbp-48h] BYREF _QWORD v14[7]; // [rsp+20h] [rbp-38h] BYREF v12 = a2; v2 = *(_QWORD *)(*a1 + 424); v3 = *(_QWORD *)(*a1 + 432); for ( v13[0] = &v12; v2 != v3; v2 += 40LL ) { if ( (unsigned __int8)std::__invoke_impl<bool,Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator() const(NodeStmtAssign const*)::{lambda(Generator::Var const&)#1} &,Generator::Var&>( v13, v2) ) break; } if ( v2 == *(_QWORD *)(*a1 + 432) ) { v9 = std::operator<<<std::char_traits<char>>(&std::cerr, "Undeclared identifier: "); v10 = std::optional<std::string>::value(v12 + 8); v11 = std::operator<<<char>(v9, v10); std::endl<char,std::char_traits<char>>(v11); exit(1LL); } v4 = *(_QWORD *)(v12 + 48); v13[0] = (void *)*a1; ((void ( *)(long long *, long long))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable + *(unsigned __int8 *)(v4 + 8)))( (long long *)v13, v4); v5 = *a1; v13[0] = v14; std::string::_M_construct<char const*>((long long *)v13, "rax", (long long)""); Generator::pop(v5, v13); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); v6 = *a1 + 40; std::__ostream_insert<char,std::char_traits<char>>(v6, " mov [rsp + ", 15LL); v7 = std::ostream::_M_insert<unsigned long>(v6, 8LL * (*(_QWORD *)(*a1 + 416) + ~*(_QWORD *)(v2 + 32))); return std::__ostream_insert<char,std::char_traits<char>>(v7, "], rax\n", 7LL); }
operator(): PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV RBX,RDI LEA RAX,[RSP + 0x8] MOV qword ptr [RAX],RSI MOV RCX,qword ptr [RDI] MOV R14,qword ptr [RCX + 0x1a8] MOV R12,qword ptr [RCX + 0x1b0] MOV qword ptr [RSP + 0x10],RAX CMP R14,R12 JZ 0x00108cf2 LEA R15,[RSP + 0x10] LAB_00108cda: MOV RDI,R15 MOV RSI,R14 CALL 0x00108e27 TEST AL,AL JNZ 0x00108cf2 ADD R14,0x28 CMP R14,R12 JNZ 0x00108cda LAB_00108cf2: MOV RAX,qword ptr [RBX] CMP R14,qword ptr [RAX + 0x1b0] JZ 0x00108dc4 MOV RCX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RCX + 0x30] LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],RAX MOVZX EAX,byte ptr [RSI + 0x8] LEA RCX,[0x10cd38] CALL qword ptr [RCX + RAX*0x8] MOV R15,qword ptr [RBX] LEA R13,[RSP + 0x20] MOV qword ptr [R13 + -0x10],R13 LEA RSI,[0x109445] LEA RDX,[0x109448] LEA R12,[RSP + 0x10] MOV RDI,R12 CALL 0x001073ac LAB_00108d48: MOV RDI,R15 MOV RSI,R12 CALL 0x001075ea LAB_00108d53: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R13 JZ 0x00108d6a MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00102200 LAB_00108d6a: MOV R15,qword ptr [RBX] ADD R15,0x28 LEA RSI,[0x10957f] MOV EDX,0xf MOV RDI,R15 CALL 0x00102230 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [R14 + 0x20] NOT RSI ADD RSI,qword ptr [RAX + 0x1a0] SHL RSI,0x3 MOV RDI,R15 CALL 0x00102120 LEA RSI,[0x10958f] MOV EDX,0x7 MOV RDI,RAX CALL 0x00102230 ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00108dc4: MOV RDI,qword ptr [0x0010cff0] LEA RSI,[0x109453] CALL 0x001021e0 MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 CALL 0x00107776 MOV RDI,RBX MOV RSI,RAX CALL 0x001021c0 MOV RDI,RAX CALL 0x001020e0 MOV EDI,0x1 CALL 0x00102240
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtAssign const*) const */ void __thiscall Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator() (StmtVisitor *this,NodeStmtAssign *param_1) { NodeStmtAssign *pNVar1; Generator *this_00; long lVar2; bool bVar3; ostream *poVar4; string *psVar5; NodeStmtAssign *pNVar6; NodeStmtAssign *local_50; NodeStmtAssign **local_48 [2]; NodeStmtAssign *local_38 [2]; local_48[0] = &local_50; pNVar6 = *(NodeStmtAssign **)(*(long *)this + 0x1a8); pNVar1 = *(NodeStmtAssign **)(*(long *)this + 0x1b0); local_50 = param_1; if (pNVar6 != pNVar1) { do { bVar3 = std::operator()(local_48,pNVar6); if (bVar3) break; pNVar6 = pNVar6 + 0x28; } while (pNVar6 != pNVar1); } if (pNVar6 != (*(NodeStmtAssign ***)this)[0x36]) { local_48[0] = *(NodeStmtAssign ***)this; (**(code **)(std::__detail::__variant:: __gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&> ::_S_vtable + (ulong)*(byte *)(*(long *)(local_50 + 0x30) + 8) * 8))(); this_00 = *(Generator **)this; local_48[0] = local_38; std::__cxx11::string::_M_construct<char_const*>((string *)local_48,&DAT_00109445,&DAT_00109448); /* try { // try from 00108d48 to 00108d52 has its CatchHandler @ 00108e05 */ pop(this_00,(string *)local_48); if (local_48[0] != local_38) { operator_delete(local_48[0],(ulong)(local_38[0] + 1)); } lVar2 = *(long *)this; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(lVar2 + 0x28)," mov [rsp + ",0xf); poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)(lVar2 + 0x28)); std::__ostream_insert<char,std::char_traits<char>>(poVar4,"], rax\n",7); return; } poVar4 = std::operator<<((ostream *)PTR_cerr_0010cff0,"Undeclared identifier: "); psVar5 = (string *) std::optional<std::__cxx11::string>::value ((optional<std::__cxx11::string> *)(local_50 + 8)); poVar4 = std::operator<<(poVar4,psVar5); std::endl<char,std::char_traits<char>>(poVar4); /* WARNING: Subroutine does not return */ exit(1); }
139
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtAssign const*) const
BhuvanGudi[P]LexiParse/src/generation.hpp
void operator()(const NodeStmtAssign* stmt_assign) const { const auto it = std::ranges::find_if(gen.m_vars, [&](const Var& var) { return var.name == stmt_assign->ident.value.value(); }); if (it == gen.m_vars.end()) { std::cerr << "Undeclared identifier: " << stmt_assign->ident.value.value() << std::endl; exit(EXIT_FAILURE); } gen.gen_expr(stmt_assign->expr); gen.pop("rax"); gen.m_output << " mov [rsp + " << (gen.m_stack_size - it->stack_loc - 1) * 8 << "], rax\n"; }
O2
cpp
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtAssign const*) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %rdx movq %rsi, (%rdx) movl $0x1a8, %esi # imm = 0x1A8 addq (%rdi), %rsi leaq 0x13c9(%rip), %rdi # 0x859a callq 0x72d8 movq %rax, %r14 movq (%rbx), %rax cmpq 0x1b0(%rax), %r14 je 0x7284 movq 0x10(%rsp), %rcx movq 0x30(%rcx), %rsi leaq 0x18(%rsp), %rdi movq %rax, (%rdi) movzbl 0x8(%rsi), %eax leaq 0x5b3b(%rip), %rcx # 0xcd40 callq *(%rcx,%rax,8) movq (%rbx), %r15 leaq 0x1207(%rip), %rsi # 0x8419 leaq 0x18(%rsp), %r12 leaq 0xf(%rsp), %rdx movq %r12, %rdi callq 0x43bc movq %r15, %rdi movq %r12, %rsi callq 0x5e6e leaq 0x18(%rsp), %rdi callq 0x27ea movq (%rbx), %rdi addq $0x28, %rdi leaq 0x130c(%rip), %rsi # 0x8553 callq 0x21a0 movq (%rbx), %rcx movq 0x20(%r14), %rsi notq %rsi addq 0x1a0(%rcx), %rsi shlq $0x3, %rsi movq %rax, %rdi callq 0x2100 leaq 0x12f3(%rip), %rsi # 0x8563 movq %rax, %rdi callq 0x21a0 addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x5d65(%rip), %rdi # 0xcff0 leaq 0x1195(%rip), %rsi # 0x8427 callq 0x21a0 movq %rax, %rbx movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0x5f96 movq %rbx, %rdi movq %rax, %rsi callq 0x2190 movq %rax, %rdi callq 0x20c0 pushq $0x1 popq %rdi callq 0x21e0 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x27ea movq %rbx, %rdi callq 0x2270
_ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssign: push r15 push r14 push r12 push rbx sub rsp, 38h mov rbx, rdi lea rdx, [rsp+58h+var_48] mov [rdx], rsi mov esi, 1A8h add rsi, [rdi] lea rdi, _ZNSt6ranges7find_ifE; std::ranges::find_if call _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE_ mov r14, rax mov rax, [rbx] cmp r14, [rax+1B0h] jz loc_7284 mov rcx, [rsp+58h+var_48] mov rsi, [rcx+30h] lea rdi, [rsp+58h+var_40] mov [rdi], rax movzx eax, byte ptr [rsi+8] lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD40h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&) mov r15, [rbx] lea rsi, aRax; "rax" lea r12, [rsp+58h+var_40] lea rdx, [rsp+58h+var_49] mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r15 mov rsi, r12 call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&) lea rdi, [rsp+58h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rbx] add rdi, 28h ; '(' lea rsi, aMovRsp; " mov [rsp + " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rbx] mov rsi, [r14+20h] not rsi add rsi, [rcx+1A0h] shl rsi, 3 mov rdi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aRax_0; "], rax\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_7284: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aUndeclaredIden; "Undeclared identifier: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, [rsp+58h+var_48] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) mov rdi, rbx mov rsi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) push 1 pop rdi call _exit mov rbx, rax lea rdi, [rsp+58h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(long long *a1, long long a2) { long long v2; // rdx long long if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE; // r14 long long v4; // rsi long long v5; // r15 long long v6; // rdx long long v7; // rdx long long v8; // rax long long v9; // rax long long v10; // rdx long long v12; // rbx long long v13; // rax long long v14; // rax _QWORD v15[8]; // [rsp+18h] [rbp-40h] BYREF if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE = ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE_(&std::ranges::find_if, *a1 + 424); if ( if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE == *(_QWORD *)(*a1 + 432) ) { v12 = std::operator<<<std::char_traits<char>>(&std::cerr, "Undeclared identifier: ", v2); v13 = std::optional<std::string>::value(a2 + 8); v14 = std::operator<<<char>(v12, v13); std::endl<char,std::char_traits<char>>(v14); exit(1LL); } v4 = *(_QWORD *)(a2 + 48); v15[0] = *a1; ((void ( *)(_QWORD *))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable + *(unsigned __int8 *)(v4 + 8)))(v15); v5 = *a1; std::string::basic_string<std::allocator<char>>(v15, (long long)"rax"); Generator::pop(v5, (long long)v15, v6); std::string::~string(); v8 = std::operator<<<std::char_traits<char>>(*a1 + 40, " mov [rsp + ", v7); v9 = std::ostream::_M_insert<unsigned long>( v8, 8LL * (*(_QWORD *)(*a1 + 416) + ~*(_QWORD *)(if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE + 32))); return std::operator<<<std::char_traits<char>>(v9, "], rax\n", v10); }
operator(): PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI LEA RDX,[RSP + 0x10] MOV qword ptr [RDX],RSI MOV ESI,0x1a8 ADD RSI,qword ptr [RDI] LEA RDI,[0x10859a] CALL 0x001072d8 MOV R14,RAX MOV RAX,qword ptr [RBX] CMP R14,qword ptr [RAX + 0x1b0] JZ 0x00107284 MOV RCX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RCX + 0x30] LEA RDI,[RSP + 0x18] MOV qword ptr [RDI],RAX MOVZX EAX,byte ptr [RSI + 0x8] LEA RCX,[0x10cd40] CALL qword ptr [RCX + RAX*0x8] MOV R15,qword ptr [RBX] LEA RSI,[0x108419] LEA R12,[RSP + 0x18] LEA RDX,[RSP + 0xf] MOV RDI,R12 CALL 0x001043bc LAB_00107224: MOV RDI,R15 MOV RSI,R12 CALL 0x00105e6e LAB_0010722f: LEA RDI,[RSP + 0x18] CALL 0x001027ea MOV RDI,qword ptr [RBX] ADD RDI,0x28 LEA RSI,[0x108553] CALL 0x001021a0 MOV RCX,qword ptr [RBX] MOV RSI,qword ptr [R14 + 0x20] NOT RSI ADD RSI,qword ptr [RCX + 0x1a0] SHL RSI,0x3 MOV RDI,RAX CALL 0x00102100 LEA RSI,[0x108563] MOV RDI,RAX CALL 0x001021a0 ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_00107284: MOV RDI,qword ptr [0x0010cff0] LEA RSI,[0x108427] CALL 0x001021a0 MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x00105f96 MOV RDI,RBX MOV RSI,RAX CALL 0x00102190 MOV RDI,RAX CALL 0x001020c0 PUSH 0x1 POP RDI CALL 0x001021e0
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtAssign const*) const */ void __thiscall Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator() (StmtVisitor *this,NodeStmtAssign *param_1) { Generator *this_00; long lVar1; ostream *poVar2; string *psVar3; allocator local_49; NodeStmtAssign *local_48; long local_40 [4]; local_48 = param_1; lVar1 = _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK14NodeStmtAssignEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISB_EESD_NS_8danglingEE4typeEOSB_T1_SE_ (&std::ranges::find_if,*(long *)this + 0x1a8); local_40[0] = *(long *)this; if (lVar1 != *(long *)(local_40[0] + 0x1b0)) { (**(code **)(std::__detail::__variant:: __gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&> ::_S_vtable + (ulong)*(byte *)(*(long *)(local_48 + 0x30) + 8) * 8))(); this_00 = *(Generator **)this; std::__cxx11::string::string<std::allocator<char>>((string *)local_40,"rax",&local_49); /* try { // try from 00107224 to 0010722e has its CatchHandler @ 001072c3 */ pop(this_00,(string *)local_40); std::__cxx11::string::~string((string *)local_40); poVar2 = std::operator<<((ostream *)(*(long *)this + 0x28)," mov [rsp + "); poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::operator<<(poVar2,"], rax\n"); return; } poVar2 = std::operator<<((ostream *)PTR_cerr_0010cff0,"Undeclared identifier: "); psVar3 = (string *)std::optional<std::__cxx11::string>::value(); poVar2 = std::operator<<(poVar2,psVar3); std::endl<char,std::char_traits<char>>(poVar2); /* WARNING: Subroutine does not return */ exit(1); }
140
int minja::Value::get<int>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O0
cpp
int minja::Value::get<int>() const: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x112670 testb $0x1, %al jne 0x12b7de jmp 0x12b7f1 movq 0x8(%rsp), %rdi addq $0x40, %rdi callq 0x12b9b0 addq $0x68, %rsp retq movb $0x1, 0x13(%rsp) movl $0x10, %edi callq 0x5a680 movq 0x8(%rsp), %rsi movq %rax, (%rsp) leaq 0x20(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x1126f0 jmp 0x12b81c leaq 0xe4f0b(%rip), %rsi # 0x21072e leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0xf6d00 jmp 0x12b834 movq (%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x5a4b0 jmp 0x12b844 movq (%rsp), %rdi movb $0x0, 0x13(%rsp) movq 0x17675c(%rip), %rsi # 0x2a1fb0 movq 0x17671d(%rip), %rdx # 0x2a1f78 callq 0x5aae0 jmp 0x12b8c2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x12b8a4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x12b89a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x40(%rsp), %rdi callq 0x5b528 leaq 0x20(%rsp), %rdi callq 0x5b528 testb $0x1, 0x13(%rsp) jne 0x12b8ad jmp 0x12b8b6 movq (%rsp), %rdi callq 0x5af50 jmp 0x12b8b8 movq 0x18(%rsp), %rdi callq 0x5aba0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK5minja5Value3getIiEET_v: sub rsp, 68h mov [rsp+68h+var_8], rdi mov rdi, [rsp+68h+var_8]; this mov [rsp+68h+var_60], rdi call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, 1 jnz short loc_12B7DE jmp short loc_12B7F1 loc_12B7DE: mov rdi, [rsp+68h+var_60] add rdi, 40h ; '@' call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3getIiiEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS0_6detail12priority_tagILj4EEEEEEv add rsp, 68h retn loc_12B7F1: mov [rsp+68h+var_55], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+68h+var_60] mov [rsp+68h+var_68], rax lea rdi, [rsp+68h+var_48] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_12B81C: lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... lea rdi, [rsp+68h+var_28] lea rdx, [rsp+68h+var_48] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_12B834: mov rdi, [rsp+68h+var_68] lea rsi, [rsp+68h+var_28] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_12B844: mov rdi, [rsp+68h+var_68]; void * mov [rsp+68h+var_55], 0 mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw
long long minja::Value::get<int>(minja::Value *a1) { void *exception; // [rsp+0h] [rbp-68h] _BYTE v3[32]; // [rsp+20h] [rbp-48h] BYREF _BYTE v4[32]; // [rsp+40h] [rbp-28h] BYREF minja::Value *v5; // [rsp+60h] [rbp-8h] v5 = a1; if ( (minja::Value::is_primitive(a1) & 1) == 0 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get<int,int>((char *)a1 + 64); }
141
int minja::Value::get<int>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O3
cpp
int minja::Value::get<int>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rdi) jne 0x904d3 cmpq $0x0, 0x20(%r14) jne 0x904d3 cmpq $0x0, 0x30(%r14) jne 0x904d3 addq $0x40, %r14 leaq 0x20(%rsp), %rbx movl $0x0, (%rbx) movq %r14, %rdi movq %rbx, %rsi callq 0x905a1 movl (%rbx), %eax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1a430 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x8610a leaq 0x5e79e(%rip), %rsi # 0xeec97 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x787d1 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x1ae00 xorl %ebp, %ebp movq 0x9aad1(%rip), %rsi # 0x12aff0 movq 0x9aa3a(%rip), %rdx # 0x12af60 movq %rbx, %rdi callq 0x1aef0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9054c movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8c0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x90567 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8c0 testb %bpl, %bpl jne 0x90591 jmp 0x90599 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x90591 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8c0 jmp 0x90591 movq %rax, %r14 movq %rbx, %rdi callq 0x1a660 movq %r14, %rdi callq 0x1af80
_ZNK5minja5Value3getIiEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rdi+10h], 0 jnz short loc_904D3 cmp qword ptr [r14+20h], 0 jnz short loc_904D3 cmp qword ptr [r14+30h], 0 jnz short loc_904D3 add r14, 40h ; '@' lea rbx, [rsp+58h+var_38] mov dword ptr [rbx], 0 mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ mov eax, [rbx] add rsp, 40h pop rbx pop r14 pop rbp retn loc_904D3: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9054C mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9054C: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_90567 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_90567: test bpl, bpl jnz short loc_90591 jmp short loc_90599 mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_90591 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_90591 mov r14, rax loc_90591: mov rdi, rbx; void * call ___cxa_free_exception loc_90599: mov rdi, r14 call __Unwind_Resume
long long minja::Value::get<int>(_QWORD *a1) { void *exception; // rbx _BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF _DWORD v4[4]; // [rsp+20h] [rbp-38h] BYREF if ( a1[2] || a1[4] || a1[6] ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v4[0] = 0; ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( a1 + 8, v4); return v4[0]; }
get<int>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RDI + 0x10],0x0 JNZ 0x001904d3 CMP qword ptr [R14 + 0x20],0x0 JNZ 0x001904d3 CMP qword ptr [R14 + 0x30],0x0 JNZ 0x001904d3 ADD R14,0x40 LEA RBX,[RSP + 0x20] MOV dword ptr [RBX],0x0 MOV RDI,R14 MOV RSI,RBX CALL 0x001905a1 MOV EAX,dword ptr [RBX] ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001904d3: MOV EDI,0x10 CALL 0x0011a430 MOV RBX,RAX LAB_001904e0: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0018610a LAB_001904f2: LEA RSI,[0x1eec97] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001787d1 MOV BPL,0x1 LAB_00190509: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0011ae00 XOR EBP,EBP MOV RSI,qword ptr [0x0022aff0] MOV RDX,qword ptr [0x0022af60] MOV RDI,RBX CALL 0x0011aef0
/* int minja::Value::get<int>() const */ int __thiscall minja::Value::get<int>(Value *this) { runtime_error *this_00; int1 auStack_58 [32]; int local_38 [8]; if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) && (*(long *)(this + 0x30) == 0)) { local_38[0] = 0; _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (this + 0x40,local_38); return local_38[0]; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001904e0 to 001904f1 has its CatchHandler @ 0019058e */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001904f2 to 00190505 has its CatchHandler @ 0019056e */ std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: "); /* try { // try from 00190509 to 0019052d has its CatchHandler @ 0019052e */ std::runtime_error::runtime_error(this_00,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60); }
142
arena_alloc_aligned
tsotchke[P]eshkol/src/core/memory/arena.c
void* arena_alloc_aligned(Arena* arena, size_t size, size_t alignment) { assert(arena != NULL); // Add debug output for zero-sized allocations if (size == 0) { fprintf(stderr, "ERROR: Attempted to allocate 0 bytes in arena_alloc_aligned\n"); // Print stack trace if possible void* buffer[100]; int nptrs = backtrace(buffer, 100); backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO); // Continue with a minimum size of 1 instead of failing size = 1; } assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2 // Try to allocate from current block void* result = arena_alloc_from_block(arena, arena->current, size, alignment); if (result) return result; // Need a new block size_t min_size = size + alignment - 1; // Ensure enough space for alignment Block* block = arena_add_block(arena, min_size); if (!block) return NULL; // Allocate from the new block result = arena_alloc_from_block(arena, block, size, alignment); assert(result != NULL); // Should always succeed return result; }
O1
c
arena_alloc_aligned: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rdi, %rdi je 0x2985 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 testq %rsi, %rsi je 0x2975 leaq -0x1(%rbx), %rax movq %rbx, %rcx xorq %rax, %rcx cmpq %rax, %rcx jbe 0x29a4 movq (%r14), %rsi movq %r14, %rdi movq %r15, %rdx movq %rbx, %rcx callq 0x29e2 testq %rax, %rax jne 0x296b leaq (%rbx,%r15), %rax decq %rax je 0x29c3 movq (%r14), %r12 movq 0x8(%r12), %r13 addq %r13, %r13 cmpq %rax, %r13 cmovbeq %rax, %r13 leaq 0x18(%r13), %rdi callq 0x1120 testq %rax, %rax je 0x292d xorl %ecx, %ecx movq %rcx, (%rax) movq %r13, 0x8(%rax) movq %rcx, 0x10(%rax) movq %rax, (%r12) movq %rax, (%r14) jmp 0x292f xorl %eax, %eax testq %rax, %rax je 0x2969 movq %r14, %rdi movq %rax, %rsi movq %r15, %rdx movq %rbx, %rcx callq 0x29e2 testq %rax, %rax jne 0x296b leaq 0x360f(%rip), %rdi # 0x5f60 leaq 0x3512(%rip), %rsi # 0x5e6a leaq 0x355d(%rip), %rcx # 0x5ebc movl $0xa5, %edx callq 0x10e0 xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq callq 0x11bc movl $0x1, %r15d jmp 0x28bd leaq 0x34d0(%rip), %rdi # 0x5e5c leaq 0x34d7(%rip), %rsi # 0x5e6a leaq 0x3522(%rip), %rcx # 0x5ebc movl $0x8b, %edx callq 0x10e0 leaq 0x3581(%rip), %rdi # 0x5f2c leaq 0x34b8(%rip), %rsi # 0x5e6a leaq 0x3503(%rip), %rcx # 0x5ebc movl $0x98, %edx callq 0x10e0 leaq 0x36ad(%rip), %rdi # 0x6077 leaq 0x3499(%rip), %rsi # 0x5e6a leaq 0x3677(%rip), %rcx # 0x604f movl $0x6f, %edx callq 0x10e0
arena_alloc_aligned: push r15 push r14 push r13 push r12 push rbx test rdi, rdi jz loc_2985 mov rbx, rdx mov r15, rsi mov r14, rdi test rsi, rsi jz loc_2975 loc_28BD: lea rax, [rbx-1] mov rcx, rbx xor rcx, rax cmp rcx, rax jbe loc_29A4 mov rsi, [r14] mov rdi, r14 mov rdx, r15 mov rcx, rbx call arena_alloc_from_block test rax, rax jnz loc_296B lea rax, [rbx+r15] dec rax jz loc_29C3 mov r12, [r14] mov r13, [r12+8] add r13, r13 cmp r13, rax cmovbe r13, rax lea rdi, [r13+18h] call _malloc test rax, rax jz short loc_292D xor ecx, ecx mov [rax], rcx mov [rax+8], r13 mov [rax+10h], rcx mov [r12], rax mov [r14], rax jmp short loc_292F loc_292D: xor eax, eax loc_292F: test rax, rax jz short loc_2969 mov rdi, r14 mov rsi, rax mov rdx, r15 mov rcx, rbx call arena_alloc_from_block test rax, rax jnz short loc_296B lea rdi, aResultNull; "result != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... mov edx, 0A5h call ___assert_fail loc_2969: xor eax, eax loc_296B: pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_2975: call arena_alloc_aligned_cold_1 mov r15d, 1 jmp loc_28BD loc_2985: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... mov edx, 8Bh call ___assert_fail loc_29A4: lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... mov edx, 98h call ___assert_fail loc_29C3: lea rdi, aMinSize0; "min_size > 0" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)" mov edx, 6Fh ; 'o' call ___assert_fail
long long arena_alloc_aligned(_QWORD *a1, long long a2, unsigned long long a3) { long long v4; // r15 long long result; // rax _QWORD *v6; // r12 unsigned long long v7; // r13 _QWORD *v8; // rax if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 139LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); v4 = a2; if ( !a2 ) { arena_alloc_aligned_cold_1(); v4 = 1LL; } if ( ((a3 - 1) ^ a3) <= a3 - 1 ) __assert_fail( "alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 152LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); result = arena_alloc_from_block(a1, *a1, v4, a3); if ( !result ) { if ( a3 + v4 == 1 ) __assert_fail( "min_size > 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 111LL, "Block *arena_add_block(Arena *, size_t)"); v6 = (_QWORD *)*a1; v7 = 2LL * *(_QWORD *)(*a1 + 8LL); if ( v7 <= a3 + v4 - 1 ) v7 = a3 + v4 - 1; v8 = (_QWORD *)malloc(v7 + 24); if ( v8 ) { *v8 = 0LL; v8[1] = v7; v8[2] = 0LL; *v6 = v8; *a1 = v8; } else { v8 = 0LL; } if ( v8 ) { result = arena_alloc_from_block(a1, v8, v4, a3); if ( !result ) __assert_fail( "result != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 165LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); } else { return 0LL; } } return result; }
arena_alloc_aligned: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RDI,RDI JZ 0x00102985 MOV RBX,RDX MOV R15,RSI MOV R14,RDI TEST RSI,RSI JZ 0x00102975 LAB_001028bd: LEA RAX,[RBX + -0x1] MOV RCX,RBX XOR RCX,RAX CMP RCX,RAX JBE 0x001029a4 MOV RSI,qword ptr [R14] MOV RDI,R14 MOV RDX,R15 MOV RCX,RBX CALL 0x001029e2 TEST RAX,RAX JNZ 0x0010296b LEA RAX,[RBX + R15*0x1] DEC RAX JZ 0x001029c3 MOV R12,qword ptr [R14] MOV R13,qword ptr [R12 + 0x8] ADD R13,R13 CMP R13,RAX CMOVBE R13,RAX LEA RDI,[R13 + 0x18] CALL 0x00101120 TEST RAX,RAX JZ 0x0010292d XOR ECX,ECX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],R13 MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [R12],RAX MOV qword ptr [R14],RAX JMP 0x0010292f LAB_0010292d: XOR EAX,EAX LAB_0010292f: TEST RAX,RAX JZ 0x00102969 MOV RDI,R14 MOV RSI,RAX MOV RDX,R15 MOV RCX,RBX CALL 0x001029e2 TEST RAX,RAX JNZ 0x0010296b LEA RDI,[0x105f60] LEA RSI,[0x105e6a] LEA RCX,[0x105ebc] MOV EDX,0xa5 CALL 0x001010e0 LAB_00102969: XOR EAX,EAX LAB_0010296b: POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00102975: CALL 0x001011bc MOV R15D,0x1 JMP 0x001028bd LAB_00102985: LEA RDI,[0x105e5c] LEA RSI,[0x105e6a] LEA RCX,[0x105ebc] MOV EDX,0x8b CALL 0x001010e0 LAB_001029a4: LEA RDI,[0x105f2c] LEA RSI,[0x105e6a] LEA RCX,[0x105ebc] MOV EDX,0x98 CALL 0x001010e0 LAB_001029c3: LEA RDI,[0x106077] LEA RSI,[0x105e6a] LEA RCX,[0x10604f] MOV EDX,0x6f CALL 0x001010e0
long arena_alloc_aligned(int8 *param_1,long param_2,ulong param_3) { int8 *puVar1; long lVar2; ulong uVar3; int8 *puVar4; ulong uVar5; if (param_1 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0x8b,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); } if (param_2 == 0) { arena_alloc_aligned_cold_1(); param_2 = 1; } if (param_3 - 1 < (param_3 ^ param_3 - 1)) { lVar2 = arena_alloc_from_block(param_1,*param_1,param_2); if (lVar2 == 0) { uVar3 = (param_3 + param_2) - 1; if (uVar3 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("min_size > 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0x6f,"Block *arena_add_block(Arena *, size_t)"); } puVar1 = (int8 *)*param_1; uVar5 = puVar1[1] * 2; if (uVar5 <= uVar3) { uVar5 = uVar3; } puVar4 = (int8 *)malloc(uVar5 + 0x18); if (puVar4 == (int8 *)0x0) { puVar4 = (int8 *)0x0; } else { *puVar4 = 0; puVar4[1] = uVar5; puVar4[2] = 0; *puVar1 = puVar4; *param_1 = puVar4; } if (puVar4 == (int8 *)0x0) { lVar2 = 0; } else { lVar2 = arena_alloc_from_block(param_1,puVar4,param_2,param_3); if (lVar2 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("result != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0xa5,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); } } } return lVar2; } /* WARNING: Subroutine does not return */ __assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 0x98,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); }
143
arena_alloc_aligned
tsotchke[P]eshkol/src/core/memory/arena.c
void* arena_alloc_aligned(Arena* arena, size_t size, size_t alignment) { assert(arena != NULL); // Add debug output for zero-sized allocations if (size == 0) { fprintf(stderr, "ERROR: Attempted to allocate 0 bytes in arena_alloc_aligned\n"); // Print stack trace if possible void* buffer[100]; int nptrs = backtrace(buffer, 100); backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO); // Continue with a minimum size of 1 instead of failing size = 1; } assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2 // Try to allocate from current block void* result = arena_alloc_from_block(arena, arena->current, size, alignment); if (result) return result; // Need a new block size_t min_size = size + alignment - 1; // Ensure enough space for alignment Block* block = arena_add_block(arena, min_size); if (!block) return NULL; // Allocate from the new block result = arena_alloc_from_block(arena, block, size, alignment); assert(result != NULL); // Should always succeed return result; }
O3
c
arena_alloc_aligned: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rdi, %rdi je 0x2960 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 testq %rsi, %rsi je 0x2950 leaq -0x1(%rbx), %rax movq %rbx, %rcx xorq %rax, %rcx cmpq %rax, %rcx jbe 0x297f movq (%r14), %rsi movq %r14, %rdi movq %r15, %rdx movq %rbx, %rcx callq 0x29bd testq %rax, %rax jne 0x2946 leaq (%rbx,%r15), %rax decq %rax je 0x299e movq (%r14), %r12 movq 0x8(%r12), %r13 addq %r13, %r13 cmpq %rax, %r13 cmovbeq %rax, %r13 leaq 0x18(%r13), %rdi callq 0x1120 testq %rax, %rax je 0x2944 xorl %ecx, %ecx movq %rcx, (%rax) movq %r13, 0x8(%rax) movq %rcx, 0x10(%rax) movq %rax, (%r12) movq %rax, (%r14) movq %r14, %rdi movq %rax, %rsi movq %r15, %rdx movq %rbx, %rcx callq 0x29bd testq %rax, %rax jne 0x2946 leaq 0x3648(%rip), %rdi # 0x5f74 leaq 0x354b(%rip), %rsi # 0x5e7e leaq 0x3596(%rip), %rcx # 0x5ed0 movl $0xa5, %edx callq 0x10e0 xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq callq 0x11bc movl $0x1, %r15d jmp 0x28a5 leaq 0x3509(%rip), %rdi # 0x5e70 leaq 0x3510(%rip), %rsi # 0x5e7e leaq 0x355b(%rip), %rcx # 0x5ed0 movl $0x8b, %edx callq 0x10e0 leaq 0x35ba(%rip), %rdi # 0x5f40 leaq 0x34f1(%rip), %rsi # 0x5e7e leaq 0x353c(%rip), %rcx # 0x5ed0 movl $0x98, %edx callq 0x10e0 leaq 0x36e6(%rip), %rdi # 0x608b leaq 0x34d2(%rip), %rsi # 0x5e7e leaq 0x36b0(%rip), %rcx # 0x6063 movl $0x6f, %edx callq 0x10e0
arena_alloc_aligned: push r15 push r14 push r13 push r12 push rbx test rdi, rdi jz loc_2960 mov rbx, rdx mov r15, rsi mov r14, rdi test rsi, rsi jz loc_2950 loc_28A5: lea rax, [rbx-1] mov rcx, rbx xor rcx, rax cmp rcx, rax jbe loc_297F mov rsi, [r14] mov rdi, r14 mov rdx, r15 mov rcx, rbx call arena_alloc_from_block test rax, rax jnz short loc_2946 lea rax, [rbx+r15] dec rax jz loc_299E mov r12, [r14] mov r13, [r12+8] add r13, r13 cmp r13, rax cmovbe r13, rax lea rdi, [r13+18h] call _malloc test rax, rax jz short loc_2944 xor ecx, ecx mov [rax], rcx mov [rax+8], r13 mov [rax+10h], rcx mov [r12], rax mov [r14], rax mov rdi, r14 mov rsi, rax mov rdx, r15 mov rcx, rbx call arena_alloc_from_block test rax, rax jnz short loc_2946 lea rdi, aResultNull; "result != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... mov edx, 0A5h call ___assert_fail loc_2944: xor eax, eax loc_2946: pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_2950: call arena_alloc_aligned_cold_1 mov r15d, 1 jmp loc_28A5 loc_2960: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... mov edx, 8Bh call ___assert_fail loc_297F: lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"... mov edx, 98h call ___assert_fail loc_299E: lea rdi, aMinSize0; "min_size > 0" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)" mov edx, 6Fh ; 'o' call ___assert_fail
long long arena_alloc_aligned(_QWORD *a1, long long a2, unsigned long long a3) { long long v4; // r15 long long result; // rax _QWORD *v6; // r12 unsigned long long v7; // r13 _QWORD *v8; // rax if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 139LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); v4 = a2; if ( !a2 ) { arena_alloc_aligned_cold_1(); v4 = 1LL; } if ( ((a3 - 1) ^ a3) <= a3 - 1 ) __assert_fail( "alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 152LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); result = arena_alloc_from_block(a1, *a1, v4, a3); if ( !result ) { if ( a3 + v4 == 1 ) __assert_fail( "min_size > 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 111LL, "Block *arena_add_block(Arena *, size_t)"); v6 = (_QWORD *)*a1; v7 = 2LL * *(_QWORD *)(*a1 + 8LL); if ( v7 <= a3 + v4 - 1 ) v7 = a3 + v4 - 1; v8 = (_QWORD *)malloc(v7 + 24); if ( v8 ) { *v8 = 0LL; v8[1] = v7; v8[2] = 0LL; *v6 = v8; *a1 = v8; result = arena_alloc_from_block(a1, v8, v4, a3); if ( !result ) __assert_fail( "result != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 165LL, "void *arena_alloc_aligned(Arena *, size_t, size_t)"); } else { return 0LL; } } return result; }
arena_alloc_aligned: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RDI,RDI JZ 0x00102960 MOV RBX,RDX MOV R15,RSI MOV R14,RDI TEST RSI,RSI JZ 0x00102950 LAB_001028a5: LEA RAX,[RBX + -0x1] MOV RCX,RBX XOR RCX,RAX CMP RCX,RAX JBE 0x0010297f MOV RSI,qword ptr [R14] MOV RDI,R14 MOV RDX,R15 MOV RCX,RBX CALL 0x001029bd TEST RAX,RAX JNZ 0x00102946 LEA RAX,[RBX + R15*0x1] DEC RAX JZ 0x0010299e MOV R12,qword ptr [R14] MOV R13,qword ptr [R12 + 0x8] ADD R13,R13 CMP R13,RAX CMOVBE R13,RAX LEA RDI,[R13 + 0x18] CALL 0x00101120 TEST RAX,RAX JZ 0x00102944 XOR ECX,ECX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],R13 MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [R12],RAX MOV qword ptr [R14],RAX MOV RDI,R14 MOV RSI,RAX MOV RDX,R15 MOV RCX,RBX CALL 0x001029bd TEST RAX,RAX JNZ 0x00102946 LEA RDI,[0x105f74] LEA RSI,[0x105e7e] LEA RCX,[0x105ed0] MOV EDX,0xa5 CALL 0x001010e0 LAB_00102944: XOR EAX,EAX LAB_00102946: POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00102950: CALL 0x001011bc MOV R15D,0x1 JMP 0x001028a5 LAB_00102960: LEA RDI,[0x105e70] LEA RSI,[0x105e7e] LEA RCX,[0x105ed0] MOV EDX,0x8b CALL 0x001010e0 LAB_0010297f: LEA RDI,[0x105f40] LEA RSI,[0x105e7e] LEA RCX,[0x105ed0] MOV EDX,0x98 CALL 0x001010e0 LAB_0010299e: LEA RDI,[0x10608b] LEA RSI,[0x105e7e] LEA RCX,[0x106063] MOV EDX,0x6f CALL 0x001010e0
long arena_alloc_aligned(int8 *param_1,long param_2,ulong param_3) { int8 *puVar1; long lVar2; ulong uVar3; int8 *puVar4; ulong uVar5; if (param_1 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0x8b,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); } if (param_2 == 0) { arena_alloc_aligned_cold_1(); param_2 = 1; } if (param_3 - 1 < (param_3 ^ param_3 - 1)) { lVar2 = arena_alloc_from_block(param_1,*param_1,param_2); if (lVar2 == 0) { uVar3 = (param_3 + param_2) - 1; if (uVar3 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("min_size > 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0x6f,"Block *arena_add_block(Arena *, size_t)"); } puVar1 = (int8 *)*param_1; uVar5 = puVar1[1] * 2; if (uVar5 <= uVar3) { uVar5 = uVar3; } puVar4 = (int8 *)malloc(uVar5 + 0x18); if (puVar4 == (int8 *)0x0) { lVar2 = 0; } else { *puVar4 = 0; puVar4[1] = uVar5; puVar4[2] = 0; *puVar1 = puVar4; *param_1 = puVar4; lVar2 = arena_alloc_from_block(param_1,puVar4,param_2,param_3); if (lVar2 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("result != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0xa5,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); } } } return lVar2; } /* WARNING: Subroutine does not return */ __assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 0x98,"void *arena_alloc_aligned(Arena *, size_t, size_t)"); }
144
R3D_DrawBufferAlbedo
r3d/src/r3d_utils.c
void R3D_DrawBufferAlbedo(float x, float y, float w, float h) { Texture2D tex = { .id = R3D.framebuffer.gBuffer.albedo, .width = R3D.state.resolution.width, .height = R3D.state.resolution.width }; DrawTexturePro( tex, (Rectangle) { 0, 0, (float)tex.width, (float)tex.height }, (Rectangle) { x, y, w, h }, (Vector2) { 0 }, 0, WHITE ); DrawRectangleLines( (int)(x + 0.5f), (int)(y + 0.5f), (int)(w + 0.5f), (int)(h + 0.5f), (Color) { 255, 0, 0, 255 } ); }
O3
c
R3D_DrawBufferAlbedo: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movaps %xmm3, %xmm4 movaps %xmm3, -0x60(%rbp) movaps %xmm2, %xmm5 movaps %xmm2, -0x50(%rbp) movaps %xmm1, %xmm3 movaps %xmm1, -0x40(%rbp) movaps %xmm0, -0x30(%rbp) leaq 0xf1634(%rip), %rax # 0x1affb0 movl 0x8(%rax), %ecx movl %ecx, -0x18(%rbp) movl 0x1700(%rax), %eax movl %eax, -0x14(%rbp) movl %eax, -0x10(%rbp) movq $0x0, -0xc(%rbp) xorps %xmm1, %xmm1 cvtsi2ss %eax, %xmm1 movups -0x18(%rbp), %xmm2 movups %xmm2, (%rsp) movl $0x0, 0x10(%rsp) movaps %xmm0, %xmm2 unpcklps %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1] movaps %xmm5, %xmm3 unpcklps %xmm4, %xmm3 # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1] shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] xorps %xmm0, %xmm0 xorps %xmm4, %xmm4 xorps %xmm5, %xmm5 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x8c6e5 movss 0x2262c(%rip), %xmm0 # 0xe1004 movaps -0x30(%rbp), %xmm1 addss %xmm0, %xmm1 cvttss2si %xmm1, %edi movaps -0x40(%rbp), %xmm1 addss %xmm0, %xmm1 cvttss2si %xmm1, %esi movaps -0x50(%rbp), %xmm1 addss %xmm0, %xmm1 cvttss2si %xmm1, %edx movaps -0x60(%rbp), %xmm1 addss %xmm0, %xmm1 cvttss2si %xmm1, %ecx movl $0xff0000ff, %r8d # imm = 0xFF0000FF addq $0x80, %rsp popq %rbp jmp 0x6ae2d
R3D_DrawBufferAlbedo: push rbp mov rbp, rsp sub rsp, 80h movaps xmm4, xmm3 movaps [rbp+var_60], xmm3 movaps xmm5, xmm2 movaps [rbp+var_50], xmm2 movaps xmm3, xmm1 movaps [rbp+var_40], xmm1 movaps [rbp+var_30], xmm0 lea rax, R3D mov ecx, [rax+8] mov dword ptr [rbp+var_18], ecx mov eax, [rax+1700h] mov dword ptr [rbp+var_18+4], eax mov dword ptr [rbp+var_18+8], eax mov qword ptr [rbp+var_18+0Ch], 0 xorps xmm1, xmm1 cvtsi2ss xmm1, eax movups xmm2, [rbp+var_18] movups [rsp+80h+var_80], xmm2 mov [rsp+80h+var_70], 0 movaps xmm2, xmm0 unpcklps xmm2, xmm3 movaps xmm3, xmm5 unpcklps xmm3, xmm4 shufps xmm1, xmm1, 0 xorps xmm0, xmm0 xorps xmm4, xmm4 xorps xmm5, xmm5 mov edi, 0FFFFFFFFh call DrawTexturePro movss xmm0, cs:dword_E1004 movaps xmm1, [rbp+var_30] addss xmm1, xmm0 cvttss2si edi, xmm1 movaps xmm1, [rbp+var_40] addss xmm1, xmm0 cvttss2si esi, xmm1 movaps xmm1, [rbp+var_50] addss xmm1, xmm0 cvttss2si edx, xmm1 movaps xmm1, [rbp+var_60] addss xmm1, xmm0 cvttss2si ecx, xmm1 mov r8d, 0FF0000FFh add rsp, 80h pop rbp jmp DrawRectangleLines
long long R3D_DrawBufferAlbedo( __m128 a1, __m128 a2, __m128 a3, __m128 a4, long long a5, long long a6, long long a7, long long a8, long long a9, long long a10) { __m128 v12; // xmm1 float v14; // [rsp+20h] [rbp-60h] float v15; // [rsp+40h] [rbp-40h] long long v16; // [rsp+68h] [rbp-18h] v14 = a4.m128_f32[0]; v15 = a2.m128_f32[0]; LODWORD(v16) = *((_DWORD *)&R3D + 2); HIDWORD(v16) = *((_DWORD *)&R3D + 1472); v12 = 0LL; v12.m128_f32[0] = (float)SHIDWORD(v16); DrawTexturePro( -1, a6, (__m128)0LL, _mm_shuffle_ps(v12, v12, 0), _mm_unpacklo_ps(a1, a2), _mm_unpacklo_ps(a3, a4), (__m128)0LL, 0.0, a7, (unsigned int)v16, a9, a10, v16, SHIDWORD(v16)); return DrawRectangleLines( (int)(float)(a1.m128_f32[0] + 0.5), (int)(float)(v15 + 0.5), (int)(float)(a3.m128_f32[0] + 0.5), (int)(float)(v14 + 0.5), 0xFF0000FF); }
R3D_DrawBufferAlbedo: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOVAPS XMM4,XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM3 MOVAPS XMM5,XMM2 MOVAPS xmmword ptr [RBP + -0x50],XMM2 MOVAPS XMM3,XMM1 MOVAPS xmmword ptr [RBP + -0x40],XMM1 MOVAPS xmmword ptr [RBP + -0x30],XMM0 LEA RAX,[0x2affb0] MOV ECX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x18],ECX MOV EAX,dword ptr [RAX + 0x1700] MOV dword ptr [RBP + -0x14],EAX MOV dword ptr [RBP + -0x10],EAX MOV qword ptr [RBP + -0xc],0x0 XORPS XMM1,XMM1 CVTSI2SS XMM1,EAX MOVUPS XMM2,xmmword ptr [RBP + -0x18] MOVUPS xmmword ptr [RSP],XMM2 MOV dword ptr [RSP + 0x10],0x0 MOVAPS XMM2,XMM0 UNPCKLPS XMM2,XMM3 MOVAPS XMM3,XMM5 UNPCKLPS XMM3,XMM4 SHUFPS XMM1,XMM1,0x0 XORPS XMM0,XMM0 XORPS XMM4,XMM4 XORPS XMM5,XMM5 MOV EDI,0xffffffff CALL 0x0018c6e5 MOVSS XMM0,dword ptr [0x001e1004] MOVAPS XMM1,xmmword ptr [RBP + -0x30] ADDSS XMM1,XMM0 CVTTSS2SI EDI,XMM1 MOVAPS XMM1,xmmword ptr [RBP + -0x40] ADDSS XMM1,XMM0 CVTTSS2SI ESI,XMM1 MOVAPS XMM1,xmmword ptr [RBP + -0x50] ADDSS XMM1,XMM0 CVTTSS2SI EDX,XMM1 MOVAPS XMM1,xmmword ptr [RBP + -0x60] ADDSS XMM1,XMM0 CVTTSS2SI ECX,XMM1 MOV R8D,0xff0000ff ADD RSP,0x80 POP RBP JMP 0x0016ae2d
void R3D_DrawBufferAlbedo(float param_1,float param_2,float param_3,float param_4) { int4 uVar1; int4 uVar2; uVar1 = 0; uVar2 = 0; DrawTexturePro(0,(float)DAT_002b16b0,param_1,param_3,0,0,0xffffffff); DrawRectangleLines(CONCAT44(uVar2,(int)(param_1 + DAT_001e1004)),(int)(param_2 + DAT_001e1004), (int)(param_3 + DAT_001e1004),CONCAT44(uVar1,(int)(param_4 + DAT_001e1004)), 0xff0000ff); return; }
145
maria_ftparser_call_initializer
eloqsql/storage/maria/ma_ft_parser.c
MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info, uint keynr, uint paramnr) { uint32 ftparser_nr; struct st_mysql_ftparser *parser; if (!maria_ftparser_alloc_param(info)) return 0; if (keynr == NO_SUCH_KEY) { ftparser_nr= 0; parser= &ft_default_parser; } else { ftparser_nr= info->s->keyinfo[keynr].ftkey_nr; parser= info->s->keyinfo[keynr].parser; } DBUG_ASSERT(paramnr < MAX_PARAM_NR); ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr; if (! info->ftparser_param[ftparser_nr].mysql_add_word) { /* Note, that mysql_add_word is used here as a flag: mysql_add_word == 0 - parser is not initialized mysql_add_word != 0 - parser is initialized, or no initialization needed. */ info->ftparser_param[ftparser_nr].mysql_add_word= (int (*)(struct st_mysql_ftparser_param *, const char *, int, MYSQL_FTPARSER_BOOLEAN_INFO *)) 1; if (parser->init && parser->init(&info->ftparser_param[ftparser_nr])) return 0; } return &info->ftparser_param[ftparser_nr]; }
O0
c
maria_ftparser_call_initializer: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x78710 cmpq $0x0, %rax jne 0x787be movq $0x0, -0x8(%rbp) jmp 0x788bf cmpl $-0x1, -0x14(%rbp) jne 0x787d8 movl $0x0, -0x1c(%rbp) leaq 0x24e9ce(%rip), %rax # 0x2c71a0 movq %rax, -0x28(%rbp) jmp 0x78822 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movl 0xbc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq 0xd0(%rax), %rax movq %rax, -0x28(%rbp) jmp 0x78824 jmp 0x78826 movl -0x1c(%rbp), %eax shll %eax addl -0x18(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax cmpq $0x0, 0x8(%rax) jne 0x788a6 movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movl $0x1, %ecx movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x788a4 movq -0x28(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq 0x368(%rcx), %rdi movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rdi callq *%rax cmpl $0x0, %eax je 0x788a4 movq $0x0, -0x8(%rbp) jmp 0x788bf jmp 0x788a6 movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
maria_ftparser_call_initializer: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rdi, [rbp+var_10] call maria_ftparser_alloc_param cmp rax, 0 jnz short loc_787BE mov [rbp+var_8], 0 jmp loc_788BF loc_787BE: cmp [rbp+var_14], 0FFFFFFFFh jnz short loc_787D8 mov [rbp+var_1C], 0 lea rax, ft_default_parser mov [rbp+var_28], rax jmp short loc_78822 loc_787D8: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov eax, [rax+0BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov rax, [rax+0D0h] mov [rbp+var_28], rax loc_78822: jmp short $+2 loc_78824: jmp short $+2 loc_78826: mov eax, [rbp+var_1C] shl eax, 1 add eax, [rbp+var_18] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx cmp qword ptr [rax+8], 0 jnz short loc_788A6 mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov ecx, 1 mov [rax+8], rcx mov rax, [rbp+var_28] cmp qword ptr [rax+10h], 0 jz short loc_788A4 mov rax, [rbp+var_28] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rdi, [rcx+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rdi, rcx call rax cmp eax, 0 jz short loc_788A4 mov [rbp+var_8], 0 jmp short loc_788BF loc_788A4: jmp short $+2 loc_788A6: mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov [rbp+var_8], rax loc_788BF: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
unsigned long long maria_ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3) { _QWORD *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] unsigned int v6; // [rsp+14h] [rbp-1Ch] if ( !maria_ftparser_alloc_param(a1) ) return 0LL; if ( a2 == -1 ) { v5 = 0; v4 = &ft_default_parser; } else { v5 = *(_DWORD *)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 188); v4 = *(_QWORD **)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 208); } v6 = a3 + 2 * v5; if ( !*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8) && (*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8) = 1LL, v4[2]) && ((unsigned int ( *)(unsigned long long))v4[2])(((unsigned long long)v6 << 6) + a1[109]) ) { return 0LL; } else { return ((unsigned long long)v6 << 6) + a1[109]; } }
maria_ftparser_call_initializer: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00178710 CMP RAX,0x0 JNZ 0x001787be MOV qword ptr [RBP + -0x8],0x0 JMP 0x001788bf LAB_001787be: CMP dword ptr [RBP + -0x14],-0x1 JNZ 0x001787d8 MOV dword ptr [RBP + -0x1c],0x0 LEA RAX,[0x3c71a0] MOV qword ptr [RBP + -0x28],RAX JMP 0x00178822 LAB_001787d8: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0xbc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0xd0] MOV qword ptr [RBP + -0x28],RAX LAB_00178822: JMP 0x00178824 LAB_00178824: JMP 0x00178826 LAB_00178826: MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x1 ADD EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x001788a6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV ECX,0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x10],0x0 JZ 0x001788a4 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RDI,RCX CALL RAX CMP EAX,0x0 JZ 0x001788a4 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001788bf LAB_001788a4: JMP 0x001788a6 LAB_001788a6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_001788bf: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long maria_ftparser_call_initializer(long *param_1,uint param_2,int param_3) { uint uVar1; int iVar2; long lVar3; int1 *local_30; int local_24; long local_10; lVar3 = maria_ftparser_alloc_param(param_1); if (lVar3 == 0) { local_10 = 0; } else { if (param_2 == 0xffffffff) { local_24 = 0; local_30 = ft_default_parser; } else { local_24 = *(int *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xbc); local_30 = *(int1 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xd0); } uVar1 = local_24 * 2 + param_3; if (((*(long *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) == 0) && (*(int8 *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) = 1, *(long *)(local_30 + 0x10) != 0)) && (iVar2 = (**(code **)(local_30 + 0x10))(param_1[0x6d] + (ulong)uVar1 * 0x40), iVar2 != 0)) { local_10 = 0; } else { local_10 = param_1[0x6d] + (ulong)uVar1 * 0x40; } } return local_10; }
146
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>::max_size() const
monkey531[P]llama/common/json.hpp
size_type max_size() const noexcept { switch (m_data.m_type) { case value_t::array: { // delegate call to array_t::max_size() return m_data.m_value.array->max_size(); } case value_t::object: { // delegate call to object_t::max_size() return m_data.m_value.object->max_size(); } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types have max_size() == size() return size(); } } }
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>::max_size() const: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movzbl (%rax), %eax movq %rax, 0x10(%rsp) subq $0x9, %rax ja 0xb9412 movq 0x10(%rsp), %rax leaq 0xfc363(%rip), %rcx # 0x1b5740 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0xa2c20 movq %rax, 0x20(%rsp) jmp 0xb9421 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0xba050 movq %rax, 0x20(%rsp) jmp 0xb9421 jmp 0xb9412 movq 0x8(%rsp), %rdi callq 0xba070 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_20], rax movzx eax, byte ptr [rax] mov [rsp+28h+var_18], rax sub rax, 9; switch 10 cases ja short def_B93E4; jumptable 00000000000B93E4 default case mov rax, [rsp+28h+var_18] lea rcx, jpt_B93E4 movsxd rax, ds:(jpt_B93E4 - 1B5740h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B93E6: mov rax, [rsp+28h+var_20]; jumptable 00000000000B93E4 case 2 mov rdi, [rax+8] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8max_sizeEv; 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>>::max_size(void) mov [rsp+28h+var_8], rax jmp short loc_B9421 loc_B93FB: mov rax, [rsp+28h+var_20]; jumptable 00000000000B93E4 case 1 mov rdi, [rax+8] call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE8max_sizeEv; 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>>>::max_size(void) mov [rsp+28h+var_8], rax jmp short loc_B9421 loc_B9410: jmp short $+2; jumptable 00000000000B93E4 cases 0,3-9 def_B93E4: mov rdi, [rsp+28h+var_20]; jumptable 00000000000B93E4 default case call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::size(void) mov [rsp+28h+var_8], rax loc_B9421: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size( long long a1) { long long v2; // [rsp+20h] [rbp-8h] switch ( *(_BYTE *)a1 ) { case 1: v2 = 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>>>::max_size(*(_QWORD *)(a1 + 8)); break; case 2: v2 = 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>>::max_size(*(_QWORD *)(a1 + 8)); break; default: v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(a1); break; } return v2; }
max_size: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP + 0x10],RAX SUB RAX,0x9 JA 0x001b9412 MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x2b5740] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_2: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001a2c20 MOV qword ptr [RSP + 0x20],RAX JMP 0x001b9421 caseD_1: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001ba050 MOV qword ptr [RSP + 0x20],RAX JMP 0x001b9421 caseD_0: JMP 0x001b9412 default: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001ba070 MOV qword ptr [RSP + 0x20],RAX LAB_001b9421: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 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>::max_size() const */ int8 __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> ::max_size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { int8 local_8; switch(*this) { case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0: case (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> )0x3: case (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> )0x4: case (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> )0x5: case (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> )0x6: case (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> )0x7: case (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> )0x8: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x9: default: local_8 = size(this); break; case (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: local_8 = std:: vector<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>>,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>>>> ::max_size(*(vector<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>>,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>>>> **)(this + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: local_8 = 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>>> ::max_size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8)); } return local_8; }
147
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>::max_size() const
monkey531[P]llama/common/json.hpp
size_type max_size() const noexcept { switch (m_data.m_type) { case value_t::array: { // delegate call to array_t::max_size() return m_data.m_value.array->max_size(); } case value_t::object: { // delegate call to object_t::max_size() return m_data.m_value.object->max_size(); } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types have max_size() == size() return size(); } } }
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>::max_size() const: movzbl (%rdi), %eax cmpl $0x2, %eax je 0x45cbc cmpl $0x1, %eax jne 0x45f9a movabsq $0x2aaaaaaaaaaaaaa, %rax # imm = 0x2AAAAAAAAAAAAAA retq movabsq $0x7ffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFF retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv: movzx eax, byte ptr [rdi] cmp eax, 2 jz short loc_45CBC cmp eax, 1 jnz _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::size(void) mov rax, 2AAAAAAAAAAAAAAh retn loc_45CBC: mov rax, 7FFFFFFFFFFFFFFh retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size( unsigned __int8 *a1) { int v1; // eax v1 = *a1; if ( v1 == 2 ) return 0x7FFFFFFFFFFFFFFLL; if ( v1 == 1 ) return 0x2AAAAAAAAAAAAAALL; return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(); }
max_size: MOVZX EAX,byte ptr [RDI] CMP EAX,0x2 JZ 0x00145cbc CMP EAX,0x1 JNZ 0x00145f9a MOV RAX,0x2aaaaaaaaaaaaaa RET LAB_00145cbc: MOV RAX,0x7ffffffffffffff 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>::max_size() const */ ulong __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> ::max_size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { basic_json<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> bVar1; ulong uVar2; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return 0x7ffffffffffffff; } if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { return 0x2aaaaaaaaaaaaaa; } bVar1 = *this; uVar2 = (ulong)(byte)bVar1; if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { if (bVar1 == (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) { return ((*(long **)(this + 8))[1] - **(long **)(this + 8)) / 0x30; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4; } uVar2 = 1; } return uVar2; }
148
my_strnxfrm_8bit_nopad_bin
eloqsql/strings/ctype-bin.c
static size_t my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs, uchar * dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { set_if_smaller(srclen, dstlen); set_if_smaller(srclen, nweights); if (dst != src) memcpy(dst, src, srclen); return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen, dst + dstlen,(uint)(nweights - srclen), flags, 0); }
O3
c
my_strnxfrm_8bit_nopad_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movl %ecx, %ebx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x10(%rbp), %r9d cmpq %rdx, %r13 cmovaeq %rdx, %r13 movl %ecx, %eax cmpq %rax, %r13 cmovaeq %rax, %r13 cmpq %r8, %rsi je 0xb1932 movq %r12, %rdi movq %r8, %rsi movq %r13, %rdx callq 0x2a0a0 movl 0x10(%rbp), %r9d leaq (%r12,%r13), %rdx addq %r12, %r14 subl %r13d, %ebx movl $0x0, (%rsp) movq %r15, %rdi movq %r12, %rsi movq %r14, %rcx movl %ebx, %r8d callq 0xb9c52 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_8bit_nopad_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov ebx, ecx mov r14, rdx mov r12, rsi mov r15, rdi mov r9d, [rbp+arg_0] cmp r13, rdx cmovnb r13, rdx mov eax, ecx cmp r13, rax cmovnb r13, rax cmp rsi, r8 jz short loc_B1932 mov rdi, r12 mov rsi, r8 mov rdx, r13 call _memcpy mov r9d, [rbp+arg_0] loc_B1932: lea rdx, [r12+r13] add r14, r12 sub ebx, r13d mov [rsp+30h+var_30], 0 mov rdi, r15 mov rsi, r12 mov rcx, r14 mov r8d, ebx call my_strxfrm_pad_desc_and_reverse_nopad add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_8bit_nopad_bin( int a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, int a7) { int v9; // r14d int v10; // r9d v9 = a3; v10 = a7; if ( a6 >= a3 ) a6 = a3; if ( a6 >= a4 ) a6 = a4; if ( a2 != a5 ) { memcpy(a2, a5, a6); v10 = a7; } return my_strxfrm_pad_desc_and_reverse_nopad(a1, a2, (int)a2 + (int)a6, (int)a2 + v9, a4 - (unsigned int)a6, v10, 0); }
my_strnxfrm_8bit_nopad_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV EBX,ECX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV R9D,dword ptr [RBP + 0x10] CMP R13,RDX CMOVNC R13,RDX MOV EAX,ECX CMP R13,RAX CMOVNC R13,RAX CMP RSI,R8 JZ 0x001b1932 MOV RDI,R12 MOV RSI,R8 MOV RDX,R13 CALL 0x0012a0a0 MOV R9D,dword ptr [RBP + 0x10] LAB_001b1932: LEA RDX,[R12 + R13*0x1] ADD R14,R12 SUB EBX,R13D MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R12 MOV RCX,R14 MOV R8D,EBX CALL 0x001b9c52 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_strnxfrm_8bit_nopad_bin (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; uint uVar1; uVar1 = (uint)((ulong)in_RAX >> 0x20); if (param_3 <= param_6) { param_6 = param_3; } if (param_4 <= param_6) { param_6 = (ulong)param_4; } if (param_2 != param_5) { memcpy(param_2,param_5,param_6); } my_strxfrm_pad_desc_and_reverse_nopad (param_1,param_2,(long)param_2 + param_6,param_3 + (long)param_2,param_4 - (int)param_6, param_7,(ulong)uVar1 << 0x20); return; }
149
js_string_localeCompare
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_localeCompare(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int i, n, an, bn, cmp; uint32_t *as, *bs, *ts; JSValue a, b, ret; ret = JS_EXCEPTION; as = NULL; bs = NULL; a = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(a)) return JS_EXCEPTION; b = JS_ToString(ctx, argv[0]); if (JS_IsException(b)) goto exception; an = to_utf32_buf(ctx, JS_VALUE_GET_STRING(a), &as); if (an == -1) goto exception; bn = to_utf32_buf(ctx, JS_VALUE_GET_STRING(b), &bs); if (bn == -1) goto exception; // TODO(bnoordhuis) skip normalization when input is latin1 an = unicode_normalize(&ts, as, an, UNICODE_NFC, ctx, (DynBufReallocFunc *)js_realloc); if (an == -1) goto exception; js_free(ctx, as); as = ts; // TODO(bnoordhuis) skip normalization when input is latin1 bn = unicode_normalize(&ts, bs, bn, UNICODE_NFC, ctx, (DynBufReallocFunc *)js_realloc); if (bn == -1) goto exception; js_free(ctx, bs); bs = ts; n = min_int(an, bn); for (i = 0; i < n; i++) if (as[i] != bs[i]) break; if (i < n) cmp = compare_u32(as[i], bs[i]); else cmp = compare_u32(an, bn); ret = js_int32(cmp); exception: JS_FreeValue(ctx, a); JS_FreeValue(ctx, b); js_free(ctx, as); js_free(ctx, bs); return ret; }
O2
c
js_string_localeCompare: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 andq $0x0, 0x10(%rsp) movq %rdi, %rbx andq $0x0, 0x8(%rsp) callq 0x3a290 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x68e81 pushq $0x6 popq %r12 xorl %r13d, %r13d jmp 0x68ffb movq %rax, %r13 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1b03c movq %rax, %r14 pushq $0x6 popq %r12 xorl %ebp, %ebp movq %rdx, 0x28(%rsp) cmpl $0x6, %edx movq %r13, 0x30(%rsp) jne 0x68eb3 xorl %r13d, %r13d jmp 0x68fc3 movq %r14, (%rsp) leaq 0x10(%rsp), %rdx movq %rbx, %rdi movq %r13, %rsi callq 0x69816 cmpl $-0x1, %eax je 0x68f9f movl %eax, %r14d leaq 0x8(%rsp), %rdx movq %rbx, %rdi movq (%rsp), %rsi callq 0x69816 movq 0x10(%rsp), %rbp cmpl $-0x1, %eax je 0x68fa4 movl %eax, 0x1c(%rsp) leaq -0x51c86(%rip), %r9 # 0x17277 leaq 0x20(%rsp), %rdi xorl %r13d, %r13d movq %rbp, %rsi movl %r14d, %edx xorl %ecx, %ecx movq %rbx, %r8 callq 0x7f747 cmpl $-0x1, %eax je 0x68fbf movl %eax, 0x18(%rsp) movq %rbx, %rdi movq %rbp, %rsi callq 0x1726e leaq 0x20(%rsp), %rdi movq (%rdi), %rbp movq 0x8(%rsp), %r14 leaq -0x51cca(%rip), %r9 # 0x17277 xorl %r13d, %r13d movq %r14, %rsi movl 0x1c(%rsp), %edx xorl %ecx, %ecx movq %rbx, %r8 callq 0x7f747 cmpl $-0x1, %eax je 0x68fbf movq %rbx, %rdi movq %r14, %rsi movl %eax, %r14d callq 0x1726e movl %r14d, %r8d movq 0x20(%rsp), %rax movl 0x18(%rsp), %edi cmpl %r14d, %edi movl %r14d, %ecx cmovll %edi, %ecx movq %rax, 0x8(%rsp) testl %ecx, %ecx cmovlel %r13d, %ecx cmpq %r13, %rcx je 0x68fa9 movl (%rbp,%r13,4), %edx movl (%rax,%r13,4), %esi incq %r13 cmpl %esi, %edx je 0x68f88 jmp 0x68fac movq 0x10(%rsp), %rbp xorl %r13d, %r13d jmp 0x68fbf cmpl %r8d, %edi setb %al seta %cl movzbl %al, %eax movzbl %cl, %r13d subl %eax, %r13d xorl %r12d, %r12d movq (%rsp), %r14 movq %rbx, %rdi movq 0x30(%rsp), %rsi movq %r15, %rdx callq 0x1801e movq %rbx, %rdi movq %r14, %rsi movq 0x28(%rsp), %rdx callq 0x1801e movq %rbx, %rdi movq %rbp, %rsi callq 0x1726e movq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1726e movq %r13, %rax movq %r12, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_string_localeCompare: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 and [rsp+68h+var_58], 0 mov rbx, rdi and [rsp+68h+var_60], 0 call JS_ToStringCheckObject mov r15, rdx cmp r15d, 6 jnz short loc_68E81 push 6 pop r12 xor r13d, r13d jmp loc_68FFB loc_68E81: mov r13, rax mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call JS_ToString mov r14, rax push 6 pop r12 xor ebp, ebp mov [rsp+68h+var_40], rdx cmp edx, 6 mov [rsp+68h+var_38], r13 jnz short loc_68EB3 xor r13d, r13d jmp loc_68FC3 loc_68EB3: mov [rsp+68h+var_68], r14 lea rdx, [rsp+68h+var_58] mov rdi, rbx mov rsi, r13 call to_utf32_buf cmp eax, 0FFFFFFFFh jz loc_68F9F mov r14d, eax lea rdx, [rsp+68h+var_60] mov rdi, rbx mov rsi, [rsp+68h+var_68] call to_utf32_buf mov rbp, [rsp+68h+var_58] cmp eax, 0FFFFFFFFh jz loc_68FA4 mov [rsp+68h+var_4C], eax lea r9, js_realloc lea rdi, [rsp+68h+var_48] xor r13d, r13d mov rsi, rbp mov edx, r14d xor ecx, ecx mov r8, rbx call unicode_normalize cmp eax, 0FFFFFFFFh jz loc_68FBF mov [rsp+68h+var_50], eax mov rdi, rbx mov rsi, rbp call js_free lea rdi, [rsp+68h+var_48] mov rbp, [rdi] mov r14, [rsp+68h+var_60] lea r9, js_realloc xor r13d, r13d mov rsi, r14 mov edx, [rsp+68h+var_4C] xor ecx, ecx mov r8, rbx call unicode_normalize cmp eax, 0FFFFFFFFh jz short loc_68FBF mov rdi, rbx mov rsi, r14 mov r14d, eax call js_free mov r8d, r14d mov rax, [rsp+68h+var_48] mov edi, [rsp+68h+var_50] cmp edi, r14d mov ecx, r14d cmovl ecx, edi mov [rsp+68h+var_60], rax test ecx, ecx cmovle ecx, r13d loc_68F88: cmp rcx, r13 jz short loc_68FA9 mov edx, [rbp+r13*4+0] mov esi, [rax+r13*4] inc r13 cmp edx, esi jz short loc_68F88 jmp short loc_68FAC loc_68F9F: mov rbp, [rsp+68h+var_58] loc_68FA4: xor r13d, r13d jmp short loc_68FBF loc_68FA9: cmp edi, r8d loc_68FAC: setb al setnbe cl movzx eax, al movzx r13d, cl sub r13d, eax xor r12d, r12d loc_68FBF: mov r14, [rsp+68h+var_68] loc_68FC3: mov rdi, rbx mov rsi, [rsp+68h+var_38] mov rdx, r15 call JS_FreeValue mov rdi, rbx mov rsi, r14 mov rdx, [rsp+68h+var_40] call JS_FreeValue mov rdi, rbx mov rsi, rbp call js_free mov rsi, [rsp+68h+var_60] mov rdi, rbx call js_free loc_68FFB: mov rax, r13 mov rdx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_string_localeCompare( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // rax long long v16; // rdx long long v17; // r15 long long v18; // r13 long long v19; // r13 long long v20; // rax long long v21; // r14 long long v22; // rbp long long v23; // rdx unsigned int v24; // eax unsigned int v25; // r14d unsigned int v26; // eax unsigned int v27; // eax long long v28; // r14 unsigned int v29; // eax long long v30; // rsi unsigned int v31; // r14d long long v32; // rcx unsigned int v33; // edx unsigned int v34; // esi bool v35; // cf bool v36; // zf long long v38; // [rsp+0h] [rbp-68h] long long v39; // [rsp+8h] [rbp-60h] BYREF long long v40; // [rsp+10h] [rbp-58h] BYREF unsigned int v41; // [rsp+18h] [rbp-50h] unsigned int v42; // [rsp+1Ch] [rbp-4Ch] long long v43; // [rsp+20h] [rbp-48h] BYREF long long v44; // [rsp+28h] [rbp-40h] long long v45; // [rsp+30h] [rbp-38h] v40 = 0LL; v39 = 0LL; v15 = JS_ToStringCheckObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = v16; if ( (_DWORD)v16 != 6 ) { v19 = v15; v20 = JS_ToString(a1, *a5, a5[1]); v21 = v20; v22 = 0LL; v44 = v23; v45 = v19; if ( (_DWORD)v23 == 6 ) { v18 = 0LL; LABEL_21: JS_FreeValue(a1, v45, v17); JS_FreeValue(a1, v21, v44); js_free(a1, v22); js_free(a1, v39); return v18; } v38 = v20; v24 = to_utf32_buf(a1, v19, &v40); if ( v24 == -1 ) { v22 = v40; } else { v25 = v24; v26 = to_utf32_buf(a1, v38, &v39); v22 = v40; if ( v26 != -1 ) { v42 = v26; v18 = 0LL; v27 = unicode_normalize(&v43, v40, v25, 0LL, a1, js_realloc); if ( v27 != -1 ) { v41 = v27; js_free(a1, v22); v22 = v43; v28 = v39; v18 = 0LL; v29 = unicode_normalize(&v43, v39, v42, 0LL, a1, js_realloc); if ( v29 != -1 ) { v30 = v28; v31 = v29; js_free(a1, v30); v32 = v31; if ( (int)v41 < (int)v31 ) v32 = v41; v39 = v43; if ( (int)v32 <= 0 ) v32 = 0LL; while ( v32 != v18 ) { v33 = *(_DWORD *)(v22 + 4 * v18); v34 = *(_DWORD *)(v43 + 4 * v18++); v35 = v33 < v34; v36 = v33 == v34; if ( v33 != v34 ) goto LABEL_19; } v35 = v41 < v31; v36 = v41 == v31; LABEL_19: v18 = (!v35 && !v36) - (unsigned int)v35; } } goto LABEL_20; } } v18 = 0LL; LABEL_20: v21 = v38; goto LABEL_21; } return 0LL; }
js_string_localeCompare: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 AND qword ptr [RSP + 0x10],0x0 MOV RBX,RDI AND qword ptr [RSP + 0x8],0x0 CALL 0x0013a290 MOV R15,RDX CMP R15D,0x6 JNZ 0x00168e81 PUSH 0x6 POP R12 XOR R13D,R13D JMP 0x00168ffb LAB_00168e81: MOV R13,RAX MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011b03c MOV R14,RAX PUSH 0x6 POP R12 XOR EBP,EBP MOV qword ptr [RSP + 0x28],RDX CMP EDX,0x6 MOV qword ptr [RSP + 0x30],R13 JNZ 0x00168eb3 XOR R13D,R13D JMP 0x00168fc3 LAB_00168eb3: MOV qword ptr [RSP],R14 LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV RSI,R13 CALL 0x00169816 CMP EAX,-0x1 JZ 0x00168f9f MOV R14D,EAX LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV RSI,qword ptr [RSP] CALL 0x00169816 MOV RBP,qword ptr [RSP + 0x10] CMP EAX,-0x1 JZ 0x00168fa4 MOV dword ptr [RSP + 0x1c],EAX LEA R9,[0x117277] LEA RDI,[RSP + 0x20] XOR R13D,R13D MOV RSI,RBP MOV EDX,R14D XOR ECX,ECX MOV R8,RBX CALL 0x0017f747 CMP EAX,-0x1 JZ 0x00168fbf MOV dword ptr [RSP + 0x18],EAX MOV RDI,RBX MOV RSI,RBP CALL 0x0011726e LEA RDI,[RSP + 0x20] MOV RBP,qword ptr [RDI] MOV R14,qword ptr [RSP + 0x8] LEA R9,[0x117277] XOR R13D,R13D MOV RSI,R14 MOV EDX,dword ptr [RSP + 0x1c] XOR ECX,ECX MOV R8,RBX CALL 0x0017f747 CMP EAX,-0x1 JZ 0x00168fbf MOV RDI,RBX MOV RSI,R14 MOV R14D,EAX CALL 0x0011726e MOV R8D,R14D MOV RAX,qword ptr [RSP + 0x20] MOV EDI,dword ptr [RSP + 0x18] CMP EDI,R14D MOV ECX,R14D CMOVL ECX,EDI MOV qword ptr [RSP + 0x8],RAX TEST ECX,ECX CMOVLE ECX,R13D LAB_00168f88: CMP RCX,R13 JZ 0x00168fa9 MOV EDX,dword ptr [RBP + R13*0x4] MOV ESI,dword ptr [RAX + R13*0x4] INC R13 CMP EDX,ESI JZ 0x00168f88 JMP 0x00168fac LAB_00168f9f: MOV RBP,qword ptr [RSP + 0x10] LAB_00168fa4: XOR R13D,R13D JMP 0x00168fbf LAB_00168fa9: CMP EDI,R8D LAB_00168fac: SETC AL SETA CL MOVZX EAX,AL MOVZX R13D,CL SUB R13D,EAX XOR R12D,R12D LAB_00168fbf: MOV R14,qword ptr [RSP] LAB_00168fc3: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,R15 CALL 0x0011801e MOV RDI,RBX MOV RSI,R14 MOV RDX,qword ptr [RSP + 0x28] CALL 0x0011801e MOV RDI,RBX MOV RSI,RBP CALL 0x0011726e MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x0011726e LAB_00168ffb: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_string_localeCompare(int8 param_1) { uint uVar1; long lVar2; int iVar3; int iVar4; uint uVar5; uint uVar6; ulong uVar7; long lVar8; int8 *in_R8; int8 uVar9; ulong uVar10; bool bVar11; bool bVar12; int1 auVar13 [16]; int1 auVar14 [16]; long local_60; long local_58; uint local_50; int local_4c; long local_48; int8 local_40; int8 local_38; local_58 = 0; local_60 = 0; auVar13 = JS_ToStringCheckObject(); local_38 = auVar13._0_8_; if (auVar13._8_4_ == 6) { uVar9 = 6; uVar10 = 0; } else { auVar14 = JS_ToString(param_1,*in_R8,in_R8[1]); local_40 = auVar14._8_8_; uVar9 = 6; if (auVar14._8_4_ == 6) { uVar10 = 0; lVar8 = 0; } else { iVar3 = to_utf32_buf(param_1,local_38,&local_58); if ((iVar3 == -1) || (iVar4 = to_utf32_buf(param_1,auVar14._0_8_,&local_60), lVar8 = local_58, iVar4 == -1)) { uVar10 = 0; lVar8 = local_58; } else { uVar10 = 0; local_4c = iVar4; uVar5 = unicode_normalize(&local_48,local_58,iVar3,0,param_1,js_realloc); if (uVar5 != 0xffffffff) { local_50 = uVar5; js_free(param_1,lVar8); lVar8 = local_48; lVar2 = local_60; uVar10 = 0; uVar5 = unicode_normalize(&local_48,local_60,local_4c,0,param_1,js_realloc); if (uVar5 != 0xffffffff) { js_free(param_1,lVar2); uVar6 = uVar5; if ((int)local_50 < (int)uVar5) { uVar6 = local_50; } local_60 = local_48; uVar7 = (ulong)uVar6; if ((int)uVar6 < 1) { uVar7 = uVar10; } do { if (uVar7 == uVar10) { bVar11 = local_50 < uVar5; bVar12 = local_50 == uVar5; break; } uVar6 = *(uint *)(lVar8 + uVar10 * 4); uVar1 = *(uint *)(local_48 + uVar10 * 4); uVar10 = uVar10 + 1; bVar11 = uVar6 < uVar1; bVar12 = uVar6 == uVar1; } while (bVar12); uVar10 = (ulong)((uint)(!bVar11 && !bVar12) - (uint)bVar11); uVar9 = 0; } } } } JS_FreeValue(param_1,local_38,auVar13._8_8_); JS_FreeValue(param_1,auVar14._0_8_,local_40); js_free(param_1,lVar8); js_free(param_1,local_60); } auVar13._8_8_ = uVar9; auVar13._0_8_ = uVar10; return auVar13; }
150
free_full_pages
eloqsql/storage/maria/ma_blockrec.c
static my_bool free_full_pages(MARIA_HA *info, MARIA_ROW *row) { uchar log_data[FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; LSN lsn; size_t extents_length; uchar *extents= row->extents; DBUG_ENTER("free_full_pages"); if (info->s->now_transactional) { /* Compact events by removing filler and tail events */ uchar *new_block= 0; uchar *end, *to, *compact_extent_info; my_bool res, buff_alloced; uint extents_count; alloc_on_stack(*info->stack_end_ptr, compact_extent_info, buff_alloced, row->extents_count * ROW_EXTENT_SIZE); if (!compact_extent_info) DBUG_RETURN(1); to= compact_extent_info; for (end= extents + row->extents_count * ROW_EXTENT_SIZE ; extents < end ; extents+= ROW_EXTENT_SIZE) { uint page_count= uint2korr(extents + ROW_EXTENT_PAGE_SIZE); page_count&= ~START_EXTENT_BIT; if (! (page_count & TAIL_BIT) && page_count != 0) { /* Found correct extent */ if (!new_block) new_block= extents; /* First extent in range */ continue; } /* Found extent to remove, copy everything found so far */ if (new_block) { size_t length= (size_t) (extents - new_block); memcpy(to, new_block, length); to+= length; new_block= 0; } } if (new_block) { size_t length= (size_t) (extents - new_block); memcpy(to, new_block, length); to+= length; } if (!unlikely(extents_length= (uint) (to - compact_extent_info))) { /* No ranges. This happens in the rear case when we have a allocated place for a blob on a tail page but it did fit into the main page. */ stack_alloc_free(compact_extent_info, buff_alloced); DBUG_RETURN(0); } extents_count= (uint) (extents_length / ROW_EXTENT_SIZE); pagerange_store(log_data + FILEID_STORE_SIZE, extents_count); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= compact_extent_info; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= extents_length; res= translog_write_record(&lsn, LOGREC_REDO_FREE_BLOCKS, info->trn, info, (translog_size_t) (sizeof(log_data) + extents_length), TRANSLOG_INTERNAL_PARTS + 2, log_array, log_data, NULL); stack_alloc_free(compact_extent_info, buff_alloced); if (res) DBUG_RETURN(1); } DBUG_RETURN(_ma_bitmap_free_full_pages(info, row->extents, row->extents_count)); }
O3
c
free_full_pages: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r15 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x10(%rsi), %r14 movq (%rdi), %rax cmpb $0x0, 0x7e7(%rax) je 0x48648 movl 0xac(%r15), %eax leal (,%rax,8), %r13d subl %eax, %r13d leaq -0xa0(%rbp), %r12 movq %r13, (%r12) movq 0x78(%rbx), %rcx movq (%rcx), %rcx subq %r12, %rcx subq %r13, %rcx jbe 0x484d7 cmpq $0x10000, %rcx # imm = 0x10000 ja 0x484ba cmpl $0x1000, %r13d # imm = 0x1000 jb 0x484d7 cmpq $0x8001, %rcx # imm = 0x8001 jb 0x484d7 movq %r15, -0x48(%rbp) movq %rbx, -0x40(%rbp) movq %rsp, %rdi leaq 0xf(%r13), %rcx andq $-0x10, %rcx subq %rcx, %rdi movq %rdi, %rsp movb $0x1, %bl jmp 0x4850e movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi movq %r13, %rsi callq 0xa2a95 testq %rax, %rax je 0x485b0 movq %rax, %rdi movq %rbx, -0x40(%rbp) movq %r15, -0x48(%rbp) movl 0xac(%r15), %eax leal (,%rax,8), %r13d subl %eax, %r13d xorl %ebx, %ebx movq %rdi, %r15 testl %eax, %eax je 0x48593 movl %ebx, -0x38(%rbp) addq %r14, %r13 xorl %esi, %esi movq %r14, %r12 movq %rdi, -0x50(%rbp) movq %rdi, %r15 movzwl 0x5(%r14), %eax testw %ax, %ax sets %cl testl $0xbfff, %eax # imm = 0xBFFF sete %al orb %cl, %al jne 0x48547 testq %rsi, %rsi cmoveq %r14, %rsi jmp 0x48562 testq %rsi, %rsi je 0x48560 movq %r12, %rbx subq %rsi, %rbx movq %r15, %rdi movq %rbx, %rdx callq 0x29090 addq %rbx, %r15 xorl %esi, %esi addq $0x7, %r14 addq $0x7, %r12 cmpq %r13, %r14 jb 0x48527 testq %rsi, %rsi je 0x48585 subq %rsi, %r12 movq %r15, %rdi movq %r12, %rdx callq 0x29090 addq %r12, %r15 leaq -0xa0(%rbp), %r12 movq -0x50(%rbp), %rdi movl -0x38(%rbp), %ebx subq %rdi, %r15 movl $0xffffffff, %eax # imm = 0xFFFFFFFF andq %r15, %rax jne 0x485b7 testb %bl, %bl jne 0x485a9 callq 0xa2cc2 xorl %eax, %eax jmp 0x4865a movb $0x1, %al jmp 0x4865a movq %rdi, %r13 movl %r15d, %ecx imulq $0x24924925, %rcx, %rcx # imm = 0x24924925 shrq $0x20, %rcx movl %r15d, %edx subl %ecx, %edx shrl %edx addl %ecx, %edx shrl $0x2, %edx leaq -0x34(%rbp), %r10 movw %dx, 0x2(%r10) movq %r10, -0x80(%rbp) movq $0x4, -0x78(%rbp) movq %rdi, -0x70(%rbp) movq %rax, -0x68(%rbp) movq -0x40(%rbp), %rcx movq 0x8(%rcx), %rdx addl $0x4, %r15d subq $0x8, %rsp leaq -0x58(%rbp), %rdi movl $0x8, %esi movq %rcx, -0x40(%rbp) movl %r15d, %r8d movl $0x4, %r9d pushq $0x0 pushq %r10 pushq %r12 callq 0x2ad79 addq $0x20, %rsp movl %eax, %r14d testb %bl, %bl jne 0x48635 movq %r13, %rdi callq 0xa2cc2 movb $0x1, %al testb %r14b, %r14b jne 0x4865a movq -0x48(%rbp), %r15 movq 0x10(%r15), %r14 movq -0x40(%rbp), %rbx movl 0xac(%r15), %edx movq %rbx, %rdi movq %r14, %rsi callq 0x50d97 movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x48678 leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29240
free_full_pages: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r15, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r14, [rsi+10h] mov rax, [rdi] cmp byte ptr [rax+7E7h], 0 jz loc_48648 mov eax, [r15+0ACh] lea r13d, ds:0[rax*8] sub r13d, eax lea r12, [rbp+var_A0] mov [r12], r13 mov rcx, [rbx+78h] mov rcx, [rcx] sub rcx, r12 sub rcx, r13 jbe short loc_484D7 cmp rcx, offset stru_10000 ja short loc_484BA cmp r13d, 1000h jb short loc_484D7 cmp rcx, 8001h jb short loc_484D7 loc_484BA: mov [rbp+var_48], r15 mov [rbp+var_40], rbx mov rdi, rsp lea rcx, [r13+0Fh] and rcx, 0FFFFFFFFFFFFFFF0h sub rdi, rcx mov rsp, rdi mov bl, 1 jmp short loc_4850E loc_484D7: mov edx, 10010h xor edi, edi mov rsi, r13 call my_malloc test rax, rax jz loc_485B0 mov rdi, rax mov [rbp+var_40], rbx mov [rbp+var_48], r15 mov eax, [r15+0ACh] lea r13d, ds:0[rax*8] sub r13d, eax xor ebx, ebx loc_4850E: mov r15, rdi test eax, eax jz short loc_48593 mov [rbp+var_38], ebx add r13, r14 xor esi, esi mov r12, r14 mov [rbp+var_50], rdi mov r15, rdi loc_48527: movzx eax, word ptr [r14+5] test ax, ax sets cl test eax, 0BFFFh setz al or al, cl jnz short loc_48547 test rsi, rsi cmovz rsi, r14 jmp short loc_48562 loc_48547: test rsi, rsi jz short loc_48560 mov rbx, r12 sub rbx, rsi mov rdi, r15 mov rdx, rbx call _memcpy add r15, rbx loc_48560: xor esi, esi loc_48562: add r14, 7 add r12, 7 cmp r14, r13 jb short loc_48527 test rsi, rsi jz short loc_48585 sub r12, rsi mov rdi, r15 mov rdx, r12 call _memcpy add r15, r12 loc_48585: lea r12, [rbp+var_A0] mov rdi, [rbp+var_50] mov ebx, [rbp+var_38] loc_48593: sub r15, rdi mov eax, 0FFFFFFFFh and rax, r15 jnz short loc_485B7 test bl, bl jnz short loc_485A9 call my_free loc_485A9: xor eax, eax jmp loc_4865A loc_485B0: mov al, 1 jmp loc_4865A loc_485B7: mov r13, rdi mov ecx, r15d imul rcx, 24924925h shr rcx, 20h mov edx, r15d sub edx, ecx shr edx, 1 add edx, ecx shr edx, 2 lea r10, [rbp+var_34] mov [r10+2], dx mov [rbp+var_80], r10 mov [rbp+var_78], 4 mov [rbp+var_70], rdi mov [rbp+var_68], rax mov rcx, [rbp+var_40] mov rdx, [rcx+8] add r15d, 4 sub rsp, 8 lea rdi, [rbp+var_58] mov esi, 8 mov [rbp+var_40], rcx mov r8d, r15d mov r9d, 4 push 0 push r10 push r12 call translog_write_record add rsp, 20h mov r14d, eax test bl, bl jnz short loc_48635 mov rdi, r13 call my_free loc_48635: mov al, 1 test r14b, r14b jnz short loc_4865A mov r15, [rbp+var_48] mov r14, [r15+10h] mov rbx, [rbp+var_40] loc_48648: mov edx, [r15+0ACh] mov rdi, rbx mov rsi, r14 call _ma_bitmap_free_full_pages loc_4865A: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_48678 lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_48678: call ___stack_chk_fail
char free_full_pages(_QWORD *a1, long long a2) { long long v2; // r15 _QWORD *v3; // rbx unsigned long long v4; // r14 int v5; // eax unsigned long long v6; // r13 unsigned long long v7; // rcx bool v8; // cc unsigned long long v9; // rcx char *v10; // rdi long long v11; // rax char *v12; // r15 unsigned long long v13; // r13 unsigned long long v14; // rsi unsigned long long v15; // r12 unsigned long long v16; // r12 unsigned int v17; // r15d char result; // al char v19; // r14 _OWORD v20[2]; // [rsp+0h] [rbp-A0h] BYREF _WORD *v21; // [rsp+20h] [rbp-80h] long long v22; // [rsp+28h] [rbp-78h] char *v23; // [rsp+30h] [rbp-70h] long long v24; // [rsp+38h] [rbp-68h] char v25[8]; // [rsp+48h] [rbp-58h] BYREF char *v26; // [rsp+50h] [rbp-50h] long long v27; // [rsp+58h] [rbp-48h] _QWORD *v28; // [rsp+60h] [rbp-40h] int v29; // [rsp+68h] [rbp-38h] _WORD v30[2]; // [rsp+6Ch] [rbp-34h] BYREF unsigned long long v31; // [rsp+70h] [rbp-30h] v2 = a2; v3 = a1; v31 = __readfsqword(0x28u); v4 = *(_QWORD *)(a2 + 16); if ( !*(_BYTE *)(*a1 + 2023LL) ) return ma_bitmap_free_full_pages(v3, v4, *(unsigned int *)(v2 + 172)); v5 = *(_DWORD *)(a2 + 172); v6 = (unsigned int)(7 * v5); *(_QWORD *)&v20[0] = v6; v7 = *(_QWORD *)a1[15] - (_QWORD)v20; v8 = v7 <= v6; v9 = v7 - v6; if ( v8 || v9 <= (unsigned long long)&stru_10000 && ((unsigned int)v6 < 0x1000 || v9 < 0x8001) ) { v11 = my_malloc(0LL, (unsigned int)(7 * v5), 65552LL); if ( !v11 ) return 1; v10 = (char *)v11; v28 = v3; v27 = a2; v5 = *(_DWORD *)(a2 + 172); v6 = (unsigned int)(7 * v5); LODWORD(v3) = 0; } else { v27 = a2; v28 = a1; v10 = (char *)v20 - ((v6 + 15) & 0xFFFFFFFFFFFFFFF0LL); LOBYTE(v3) = 1; } LODWORD(v12) = (_DWORD)v10; if ( v5 ) { v29 = (int)v3; v13 = v4 + v6; v14 = 0LL; v15 = v4; v26 = v10; v12 = v10; do { if ( *(__int16 *)(v4 + 5) < 0 || (*(_WORD *)(v4 + 5) & 0xBFFF) == 0 ) { if ( v14 ) { memcpy(v12, v14, v15 - v14); v12 += v15 - v14; } v14 = 0LL; } else if ( !v14 ) { v14 = v4; } v4 += 7LL; v15 += 7LL; } while ( v4 < v13 ); if ( v14 ) { v16 = v15 - v14; memcpy(v12, v14, v16); LODWORD(v12) = v16 + (_DWORD)v12; } v10 = v26; LOBYTE(v3) = v29; } v17 = (_DWORD)v12 - (_DWORD)v10; if ( !v17 ) { if ( !(_BYTE)v3 ) my_free(v10); return 0; } v30[1] = v17 / 7; v21 = v30; v22 = 4LL; v23 = v10; v24 = v17; v19 = translog_write_record((unsigned long long)v25, &byte_8, v28[1], v28, v17 + 4, 4, v20, v30, 0LL); if ( !(_BYTE)v3 ) my_free(v10); result = 1; if ( !v19 ) { v2 = v27; v4 = *(_QWORD *)(v27 + 16); v3 = v28; return ma_bitmap_free_full_pages(v3, v4, *(unsigned int *)(v2 + 172)); } return result; }
free_full_pages: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R14,qword ptr [RSI + 0x10] MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x00148648 MOV EAX,dword ptr [R15 + 0xac] LEA R13D,[RAX*0x8] SUB R13D,EAX LEA R12,[RBP + -0xa0] MOV qword ptr [R12],R13 MOV RCX,qword ptr [RBX + 0x78] MOV RCX,qword ptr [RCX] SUB RCX,R12 SUB RCX,R13 JBE 0x001484d7 CMP RCX,0x10000 JA 0x001484ba CMP R13D,0x1000 JC 0x001484d7 CMP RCX,0x8001 JC 0x001484d7 LAB_001484ba: MOV qword ptr [RBP + -0x48],R15 MOV qword ptr [RBP + -0x40],RBX MOV RDI,RSP LEA RCX,[R13 + 0xf] AND RCX,-0x10 SUB RDI,RCX MOV RSP,RDI MOV BL,0x1 JMP 0x0014850e LAB_001484d7: MOV EDX,0x10010 XOR EDI,EDI MOV RSI,R13 CALL 0x001a2a95 TEST RAX,RAX JZ 0x001485b0 MOV RDI,RAX MOV qword ptr [RBP + -0x40],RBX MOV qword ptr [RBP + -0x48],R15 MOV EAX,dword ptr [R15 + 0xac] LEA R13D,[RAX*0x8] SUB R13D,EAX XOR EBX,EBX LAB_0014850e: MOV R15,RDI TEST EAX,EAX JZ 0x00148593 MOV dword ptr [RBP + -0x38],EBX ADD R13,R14 XOR ESI,ESI MOV R12,R14 MOV qword ptr [RBP + -0x50],RDI MOV R15,RDI LAB_00148527: MOVZX EAX,word ptr [R14 + 0x5] TEST AX,AX SETS CL TEST EAX,0xbfff SETZ AL OR AL,CL JNZ 0x00148547 TEST RSI,RSI CMOVZ RSI,R14 JMP 0x00148562 LAB_00148547: TEST RSI,RSI JZ 0x00148560 MOV RBX,R12 SUB RBX,RSI MOV RDI,R15 MOV RDX,RBX CALL 0x00129090 ADD R15,RBX LAB_00148560: XOR ESI,ESI LAB_00148562: ADD R14,0x7 ADD R12,0x7 CMP R14,R13 JC 0x00148527 TEST RSI,RSI JZ 0x00148585 SUB R12,RSI MOV RDI,R15 MOV RDX,R12 CALL 0x00129090 ADD R15,R12 LAB_00148585: LEA R12,[RBP + -0xa0] MOV RDI,qword ptr [RBP + -0x50] MOV EBX,dword ptr [RBP + -0x38] LAB_00148593: SUB R15,RDI MOV EAX,0xffffffff AND RAX,R15 JNZ 0x001485b7 TEST BL,BL JNZ 0x001485a9 CALL 0x001a2cc2 LAB_001485a9: XOR EAX,EAX JMP 0x0014865a LAB_001485b0: MOV AL,0x1 JMP 0x0014865a LAB_001485b7: MOV R13,RDI MOV ECX,R15D IMUL RCX,RCX,0x24924925 SHR RCX,0x20 MOV EDX,R15D SUB EDX,ECX SHR EDX,0x1 ADD EDX,ECX SHR EDX,0x2 LEA R10,[RBP + -0x34] MOV word ptr [R10 + 0x2],DX MOV qword ptr [RBP + -0x80],R10 MOV qword ptr [RBP + -0x78],0x4 MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x68],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX + 0x8] ADD R15D,0x4 SUB RSP,0x8 LEA RDI,[RBP + -0x58] MOV ESI,0x8 MOV qword ptr [RBP + -0x40],RCX MOV R8D,R15D MOV R9D,0x4 PUSH 0x0 PUSH R10 PUSH R12 CALL 0x0012ad79 ADD RSP,0x20 MOV R14D,EAX TEST BL,BL JNZ 0x00148635 MOV RDI,R13 CALL 0x001a2cc2 LAB_00148635: MOV AL,0x1 TEST R14B,R14B JNZ 0x0014865a MOV R15,qword ptr [RBP + -0x48] MOV R14,qword ptr [R15 + 0x10] MOV RBX,qword ptr [RBP + -0x40] LAB_00148648: MOV EDX,dword ptr [R15 + 0xac] MOV RDI,RBX MOV RSI,R14 CALL 0x00150d97 LAB_0014865a: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00148678 LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00148678: CALL 0x00129240
int8 free_full_pages(long *param_1,long param_2) { int4 uVar1; long lVar2; long *plVar3; ulong *puVar4; char cVar5; int8 uVar6; int iVar7; ulong uVar8; ulong *puVar9; void *__src; int1 *puVar10; void *pvVar11; void *pvVar12; void *pvVar13; int1 *__dest; ulong uVar14; long in_FS_OFFSET; ulong local_a8 [4]; int1 *local_88; int8 local_80; int1 *local_78; ulong local_70; int1 local_60 [8]; int1 *local_58; long local_50; long *local_48; uint local_40; int1 local_3c [2]; int2 local_3a; long local_38; puVar9 = local_a8; local_38 = *(long *)(in_FS_OFFSET + 0x28); pvVar11 = *(void **)(param_2 + 0x10); puVar4 = local_a8; if (*(char *)(*param_1 + 0x7e7) != '\0') { iVar7 = *(int *)(param_2 + 0xac); uVar14 = (ulong)(uint)(iVar7 * 7); uVar8 = (*(long *)param_1[0xf] - (long)local_a8) - uVar14; local_a8[0] = uVar14; if ((uVar14 < (ulong)(*(long *)param_1[0xf] - (long)local_a8)) && ((0x10000 < uVar8 || ((0xfff < (uint)(iVar7 * 7) && (0x8000 < uVar8)))))) { __dest = (int1 *)((long)local_a8 - (uVar14 + 0xf & 0xfffffffffffffff0)); uVar8 = CONCAT71((int7)((ulong)param_1 >> 8),1); puVar9 = (ulong *)__dest; } else { __dest = (int1 *)my_malloc(0,uVar14,0x10010); if (__dest == (int1 *)0x0) { uVar6 = 1; goto LAB_0014865a; } iVar7 = *(int *)(param_2 + 0xac); uVar14 = (ulong)(uint)(iVar7 * 7); uVar8 = 0; puVar9 = local_a8; } puVar10 = __dest; local_50 = param_2; local_48 = param_1; if (iVar7 != 0) { local_40 = (uint)uVar8; pvVar12 = (void *)(uVar14 + (long)pvVar11); __src = (void *)0x0; pvVar13 = pvVar11; local_58 = __dest; do { if ((*(ushort *)((long)pvVar13 + 5) & 0xbfff) == 0 || (short)*(ushort *)((long)pvVar13 + 5) < 0) { if (__src != (void *)0x0) { *(int8 *)((long)puVar9 + -8) = 0x14855d; memcpy(__dest,__src,(long)pvVar11 - (long)__src); __dest = __dest + ((long)pvVar11 - (long)__src); } __src = (void *)0x0; } else if (__src == (void *)0x0) { __src = pvVar13; } pvVar13 = (void *)((long)pvVar13 + 7); pvVar11 = (void *)((long)pvVar11 + 7); } while (pvVar13 < pvVar12); if (__src != (void *)0x0) { *(int8 *)((long)puVar9 + -8) = 0x148582; memcpy(__dest,__src,(long)pvVar11 - (long)__src); __dest = __dest + ((long)pvVar11 - (long)__src); } uVar8 = (ulong)local_40; puVar10 = local_58; } plVar3 = local_48; uVar14 = (long)__dest - (long)puVar10; if ((uVar14 & 0xffffffff) == 0) { if ((char)uVar8 == '\0') { *(int8 *)((long)puVar9 + -8) = 0x1485a9; my_free(); } uVar6 = 0; goto LAB_0014865a; } iVar7 = (int)((uVar14 & 0xffffffff) * 0x24924925 >> 0x20); local_3a = (int2)(((uint)((int)uVar14 - iVar7) >> 1) + iVar7 >> 2); local_80 = 4; lVar2 = local_48[1]; local_88 = local_3c; local_78 = puVar10; local_70 = uVar14 & 0xffffffff; *(int8 *)((long)puVar9 + -0x10) = 0; *(int1 **)((long)puVar9 + -0x18) = local_3c; *(ulong **)((long)puVar9 + -0x20) = local_a8; *(int8 *)((long)puVar9 + -0x28) = 0x148622; cVar5 = translog_write_record(local_60,8,lVar2,plVar3,(int)uVar14 + 4,4); if ((char)uVar8 == '\0') { *(int8 *)((long)puVar9 + -8) = 0x148635; my_free(puVar10); } uVar6 = 1; if (cVar5 != '\0') goto LAB_0014865a; pvVar11 = *(void **)(local_50 + 0x10); param_1 = local_48; puVar4 = puVar9; param_2 = local_50; } puVar9 = puVar4; uVar1 = *(int4 *)(param_2 + 0xac); *(int8 *)((long)puVar9 + -8) = 0x14865a; uVar6 = _ma_bitmap_free_full_pages(param_1,pvVar11,uVar1); LAB_0014865a: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)((long)puVar9 + -8) = _ma_read_block_record2; __stack_chk_fail(); } return uVar6; }
151
inline_mysql_rwlock_unlock
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_rwlock_unlock( mysql_rwlock_t *that) { int result; #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi); #endif result= rw_unlock(&that->m_rwlock); return result; }
O0
c
inline_mysql_rwlock_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xb0141 leaq 0x20ef6e(%rip), %rax # 0x2bf098 movq (%rax), %rax movq 0x168(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0xf9680 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_rwlock_unlock_6: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 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_B0141 lea rax, PSI_server mov rax, [rax] mov rax, [rax+168h] mov rcx, [rbp+var_8] mov rdi, [rcx+90h] call rax loc_B0141: mov rdi, [rbp+var_8] call my_rw_unlock mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_rwlock_unlock_6(long long a1) { if ( *(_QWORD *)(a1 + 144) ) ((void ( *)(_QWORD))PSI_server[45])(*(_QWORD *)(a1 + 144)); return (unsigned int)my_rw_unlock(a1); }
inline_mysql_rwlock_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x90],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 0x001b0141 LEA RAX,[0x3bf098] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x168] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x90] CALL RAX LAB_001b0141: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f9680 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 inline_mysql_rwlock_unlock(long param_1) { int4 uVar1; if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(*(int8 *)(param_1 + 0x90)); } uVar1 = my_rw_unlock(param_1); return uVar1; }
152
mysql_stmt_attr_set
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) { switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: stmt->update_max_length= *(my_bool *)value; break; case STMT_ATTR_CURSOR_TYPE: if (*(ulong *)value > (unsigned long) CURSOR_TYPE_READ_ONLY) { SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } stmt->flags = *(ulong *)value; break; case STMT_ATTR_PREFETCH_ROWS: if (*(ulong *)value == 0) *(long *)value= MYSQL_DEFAULT_PREFETCH_ROWS; else stmt->prefetch_rows= *(long *)value; break; case STMT_ATTR_PREBIND_PARAMS: if (stmt->state > MYSQL_STMT_INITTED) { mysql_stmt_internal_reset(stmt, 1); net_stmt_close(stmt, 0); stmt->state= MYSQL_STMT_INITTED; stmt->params= 0; } stmt->prebind_params= stmt->param_count= *(unsigned int *)value; break; case STMT_ATTR_ARRAY_SIZE: stmt->array_size= *(unsigned int *)value; break; case STMT_ATTR_ROW_SIZE: stmt->row_size= *(size_t *)value; break; case STMT_ATTR_CB_RESULT: stmt->result_callback= (ps_result_callback)value; break; case STMT_ATTR_CB_PARAM: stmt->param_callback= (ps_param_callback)value; break; case STMT_ATTR_CB_USER_DATA: stmt->user_data= (void *)value; break; default: SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } return(0); }
O3
c
mysql_stmt_attr_set: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx cmpl $0xc7, %esi jle 0x235d3 addl $0xffffff38, %esi # imm = 0xFFFFFF38 cmpl $0x6, %esi ja 0x2364b leaq 0x19b33(%rip), %rax # 0x3d0c0 movslq (%rax,%rsi,4), %rcx addq %rax, %rcx jmpq *%rcx cmpl $0x0, 0x50(%rbx) je 0x235c2 movq %rbx, %rdi movl $0x1, %esi callq 0x236b8 movq %rbx, %rdi xorl %esi, %esi callq 0x2381a movl $0x0, 0x50(%rbx) movq $0x0, 0x70(%rbx) movl (%r14), %eax movl %eax, 0x64(%rbx) movl %eax, 0x378(%rbx) jmp 0x236b1 testl %esi, %esi je 0x23637 cmpl $0x1, %esi je 0x23642 cmpl $0x2, %esi jne 0x2364b movq (%r14), %rax testq %rax, %rax je 0x236aa movq %rax, 0x318(%rbx) jmp 0x236b1 movq %r14, 0x390(%rbx) jmp 0x236b1 movq (%r14), %rax movq %rax, 0x370(%rbx) jmp 0x236b1 movq %r14, 0x380(%rbx) jmp 0x236b1 movl (%r14), %eax movl %eax, 0x368(%rbx) jmp 0x236b1 movq %r14, 0x388(%rbx) jmp 0x236b1 movb (%r14), %al movb %al, 0x313(%rbx) jmp 0x236b1 movq (%r14), %rax cmpq $0x2, %rax jb 0x236a4 movl $0x806, 0x108(%rbx) # imm = 0x806 leaq 0x30d(%rbx), %rdi leaq 0x2b72d(%rip), %rax # 0x4ed90 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2b718(%rip), %rax # 0x4eda0 movq 0x1b0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movb $0x1, %al jmp 0x236b3 movq %rax, 0x48(%rbx) jmp 0x236b1 movq $0x1, (%r14) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
mysql_stmt_attr_set: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rdi cmp esi, 0C7h jle short loc_235D3 add esi, 0FFFFFF38h; switch 7 cases cmp esi, 6 ja def_23594; jumptable 0000000000023594 default case, case 203 lea rax, jpt_23594 movsxd rcx, ds:(jpt_23594 - 3D0C0h)[rax+rsi*4] add rcx, rax jmp rcx; switch jump loc_23596: cmp dword ptr [rbx+50h], 0; jumptable 0000000000023594 case 200 jz short loc_235C2 mov rdi, rbx mov esi, 1 call mysql_stmt_internal_reset mov rdi, rbx xor esi, esi call net_stmt_close mov dword ptr [rbx+50h], 0 mov qword ptr [rbx+70h], 0 loc_235C2: mov eax, [r14] mov [rbx+64h], eax mov [rbx+378h], eax jmp loc_236B1 loc_235D3: test esi, esi jz short loc_23637 cmp esi, 1 jz short loc_23642 cmp esi, 2 jnz short def_23594; jumptable 0000000000023594 default case, case 203 mov rax, [r14] test rax, rax jz loc_236AA mov [rbx+318h], rax jmp loc_236B1 loc_235F9: mov [rbx+390h], r14; jumptable 0000000000023594 case 205 jmp loc_236B1 loc_23605: mov rax, [r14]; jumptable 0000000000023594 case 202 mov [rbx+370h], rax jmp loc_236B1 loc_23614: mov [rbx+380h], r14; jumptable 0000000000023594 case 204 jmp loc_236B1 loc_23620: mov eax, [r14]; jumptable 0000000000023594 case 201 mov [rbx+368h], eax jmp loc_236B1 loc_2362E: mov [rbx+388h], r14; jumptable 0000000000023594 case 206 jmp short loc_236B1 loc_23637: mov al, [r14] mov [rbx+313h], al jmp short loc_236B1 loc_23642: mov rax, [r14] cmp rax, 2 jb short loc_236A4 def_23594: mov dword ptr [rbx+108h], 806h; jumptable 0000000000023594 default case, case 203 lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+1B0h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov al, 1 jmp short loc_236B3 loc_236A4: mov [rbx+48h], rax jmp short loc_236B1 loc_236AA: mov qword ptr [r14], 1 loc_236B1: xor eax, eax loc_236B3: pop rbx pop r14 pop rbp retn
char mysql_stmt_attr_set(long long a1, int a2, int *a3) { int v4; // eax if ( a2 > 199 ) { switch ( a2 ) { case 200: if ( *(_DWORD *)(a1 + 80) ) { mysql_stmt_internal_reset(a1, 1LL); net_stmt_close(a1, 0LL); *(_DWORD *)(a1 + 80) = 0; *(_QWORD *)(a1 + 112) = 0LL; } v4 = *a3; *(_DWORD *)(a1 + 100) = *a3; *(_DWORD *)(a1 + 888) = v4; return 0; case 201: *(_DWORD *)(a1 + 872) = *a3; return 0; case 202: *(_QWORD *)(a1 + 880) = *(_QWORD *)a3; return 0; case 204: *(_QWORD *)(a1 + 896) = a3; return 0; case 205: *(_QWORD *)(a1 + 912) = a3; return 0; case 206: *(_QWORD *)(a1 + 904) = a3; return 0; default: goto LABEL_18; } } if ( a2 ) { if ( a2 != 1 ) { if ( a2 == 2 ) { if ( *(_QWORD *)a3 ) *(_QWORD *)(a1 + 792) = *(_QWORD *)a3; else *(_QWORD *)a3 = 1LL; return 0; } LABEL_18: *(_DWORD *)(a1 + 264) = 2054; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[54], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } if ( *(_QWORD *)a3 >= 2uLL ) goto LABEL_18; *(_QWORD *)(a1 + 72) = *(_QWORD *)a3; } else { *(_BYTE *)(a1 + 787) = *(_BYTE *)a3; } return 0; }
mysql_stmt_attr_set: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RDI CMP ESI,0xc7 JLE 0x001235d3 ADD ESI,0xffffff38 CMP ESI,0x6 JA 0x0012364b LEA RAX,[0x13d0c0] MOVSXD RCX,dword ptr [RAX + RSI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_c8: CMP dword ptr [RBX + 0x50],0x0 JZ 0x001235c2 MOV RDI,RBX MOV ESI,0x1 CALL 0x001236b8 MOV RDI,RBX XOR ESI,ESI CALL 0x0012381a MOV dword ptr [RBX + 0x50],0x0 MOV qword ptr [RBX + 0x70],0x0 LAB_001235c2: MOV EAX,dword ptr [R14] MOV dword ptr [RBX + 0x64],EAX MOV dword ptr [RBX + 0x378],EAX JMP 0x001236b1 LAB_001235d3: TEST ESI,ESI JZ 0x00123637 CMP ESI,0x1 JZ 0x00123642 CMP ESI,0x2 JNZ 0x0012364b MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x001236aa MOV qword ptr [RBX + 0x318],RAX JMP 0x001236b1 caseD_cd: MOV qword ptr [RBX + 0x390],R14 JMP 0x001236b1 caseD_ca: MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x370],RAX JMP 0x001236b1 caseD_cc: MOV qword ptr [RBX + 0x380],R14 JMP 0x001236b1 caseD_c9: MOV EAX,dword ptr [R14] MOV dword ptr [RBX + 0x368],EAX JMP 0x001236b1 caseD_ce: MOV qword ptr [RBX + 0x388],R14 JMP 0x001236b1 LAB_00123637: MOV AL,byte ptr [R14] MOV byte ptr [RBX + 0x313],AL JMP 0x001236b1 LAB_00123642: MOV RAX,qword ptr [R14] CMP RAX,0x2 JC 0x001236a4 caseD_cb: MOV dword ptr [RBX + 0x108],0x806 LEA RDI,[RBX + 0x30d] LEA RAX,[0x14ed90] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14eda0] MOV RSI,qword ptr [RAX + 0x1b0] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV AL,0x1 JMP 0x001236b3 LAB_001236a4: MOV qword ptr [RBX + 0x48],RAX JMP 0x001236b1 LAB_001236aa: MOV qword ptr [R14],0x1 LAB_001236b1: XOR EAX,EAX LAB_001236b3: POP RBX POP R14 POP RBP RET
int8 mysql_stmt_attr_set(long param_1,int param_2,ulong *param_3) { ulong uVar1; if (param_2 < 200) { if (param_2 == 0) { *(char *)(param_1 + 0x313) = (char)*param_3; } else if (param_2 == 1) { if (1 < *param_3) goto switchD_00123594_caseD_cb; *(ulong *)(param_1 + 0x48) = *param_3; } else { if (param_2 != 2) { switchD_00123594_caseD_cb: *(int4 *)(param_1 + 0x108) = 0x806; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_This_feature_is_not_implemented_o_0014ef50,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } if (*param_3 == 0) { *param_3 = 1; } else { *(ulong *)(param_1 + 0x318) = *param_3; } } } else { switch(param_2) { case 200: if (*(int *)(param_1 + 0x50) != 0) { mysql_stmt_internal_reset(param_1,1); net_stmt_close(param_1,0); *(int4 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x70) = 0; } uVar1 = *param_3; *(int *)(param_1 + 100) = (int)uVar1; *(int *)(param_1 + 0x378) = (int)uVar1; break; case 0xc9: *(int *)(param_1 + 0x368) = (int)*param_3; break; case 0xca: *(ulong *)(param_1 + 0x370) = *param_3; break; default: goto switchD_00123594_caseD_cb; case 0xcc: *(ulong **)(param_1 + 0x380) = param_3; break; case 0xcd: *(ulong **)(param_1 + 0x390) = param_3; break; case 0xce: *(ulong **)(param_1 + 0x388) = param_3; } } return 0; }
153
nglog::tools::ProgramInvocationShortName()
ng-log[P]ng-log/src/utilities.cc
const char* ProgramInvocationShortName() { if (g_program_invocation_short_name != nullptr) { return g_program_invocation_short_name; } #if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME) return program_invocation_short_name; #elif defined(HAVE_GETPROGNAME) return getprogname(); #elif defined(HAVE___PROGNAME) return __progname; #elif defined(HAVE___ARGV) return const_basename(__argv[0]); #else return "UNKNOWN"; #endif }
O0
cpp
nglog::tools::ProgramInvocationShortName(): pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x35f6c(%rip) # 0x80c28 je 0x4accb movq 0x35f63(%rip), %rax # 0x80c28 movq %rax, -0x8(%rbp) jmp 0x4acd9 movq 0x252e6(%rip), %rax # 0x6ffb8 movq (%rax), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nop
_ZN5nglog5tools26ProgramInvocationShortNameEv: push rbp mov rbp, rsp cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name jz short loc_4ACCB mov rax, cs:_ZN5nglogL31g_program_invocation_short_nameE; nglog::g_program_invocation_short_name mov [rbp+var_8], rax jmp short loc_4ACD9 loc_4ACCB: mov rax, cs:program_invocation_short_name_ptr mov rax, [rax] mov [rbp+var_8], rax loc_4ACD9: mov rax, [rbp+var_8] pop rbp retn
long long nglog::tools::ProgramInvocationShortName(nglog::tools *this) { if ( nglog::g_program_invocation_short_name ) return nglog::g_program_invocation_short_name; else return program_invocation_short_name; }
ProgramInvocationShortName: PUSH RBP MOV RBP,RSP CMP qword ptr [0x00180c28],0x0 JZ 0x0014accb MOV RAX,qword ptr [0x00180c28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014acd9 LAB_0014accb: MOV RAX,qword ptr [0x0016ffb8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX LAB_0014acd9: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
/* nglog::tools::ProgramInvocationShortName() */ long nglog::tools::ProgramInvocationShortName(void) { int8 local_10; if (g_program_invocation_short_name == 0) { local_10 = *(long *)PTR_program_invocation_short_name_0016ffb8; } else { local_10 = g_program_invocation_short_name; } return local_10; }
154
intx::be::unsafe::store(unsigned char*, intx::uint<256u> const&)
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
inline void store(uint8_t* dst, const uint256& x) noexcept { // Store byte-swapped words in primitive temporaries. This helps with memory aliasing // and GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107837 // TODO: Use std::byte instead of uint8_t. const auto v0 = to_big_endian(x[0]); const auto v1 = to_big_endian(x[1]); const auto v2 = to_big_endian(x[2]); const auto v3 = to_big_endian(x[3]); // Store words in reverse (big-endian) order, write addresses are ascending. std::memcpy(dst, &v3, sizeof(v3)); std::memcpy(dst + 8, &v2, sizeof(v2)); std::memcpy(dst + 16, &v1, sizeof(v1)); std::memcpy(dst + 24, &v0, sizeof(v0)); }
O0
cpp
intx::be::unsafe::store(unsigned char*, intx::uint<256u> const&): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x5fde0 movq %rax, %rdi callq 0x68f50 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x5fde0 movq %rax, %rdi callq 0x68f50 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movl $0x2, %esi callq 0x5fde0 movq %rax, %rdi callq 0x68f50 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movl $0x3, %esi callq 0x5fde0 movq %rax, %rdi callq 0x68f50 movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq -0x30(%rbp), %rcx movq %rcx, (%rax) movq -0x8(%rbp), %rax movq -0x28(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, 0x18(%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN4intx2be6unsafe5storeEPhRKNS_4uintILj256EEE: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rdi, rax call _ZN4intx13to_big_endianImEET_RKS1_; intx::to_big_endian<ulong>(ulong const&) mov [rbp+var_18], rax mov rdi, [rbp+var_10] mov esi, 1 call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rdi, rax call _ZN4intx13to_big_endianImEET_RKS1_; intx::to_big_endian<ulong>(ulong const&) mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov esi, 2 call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rdi, rax call _ZN4intx13to_big_endianImEET_RKS1_; intx::to_big_endian<ulong>(ulong const&) mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov esi, 3 call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rdi, rax call _ZN4intx13to_big_endianImEET_RKS1_; intx::to_big_endian<ulong>(ulong const&) mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_30] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rbp+var_28] mov [rax+8], rcx mov rax, [rbp+var_8] mov rcx, [rbp+var_20] mov [rax+10h], rcx mov rax, [rbp+var_8] mov rcx, [rbp+var_18] mov [rax+18h], rcx add rsp, 30h pop rbp retn
_QWORD * intx::be::unsafe::store(_QWORD *a1, long long a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-28h] long long v8; // [rsp+10h] [rbp-20h] long long v9; // [rsp+18h] [rbp-18h] v2 = intx::uint<256u>::operator[](a2, 0LL); v9 = intx::to_big_endian<unsigned long>(v2); v3 = intx::uint<256u>::operator[](a2, 1LL); v8 = intx::to_big_endian<unsigned long>(v3); v4 = intx::uint<256u>::operator[](a2, 2LL); v7 = intx::to_big_endian<unsigned long>(v4); v5 = intx::uint<256u>::operator[](a2, 3LL); *a1 = intx::to_big_endian<unsigned long>(v5); a1[1] = v7; a1[2] = v8; result = a1; a1[3] = v9; return result; }
store: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x0015fde0 MOV RDI,RAX CALL 0x00168f50 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x0015fde0 MOV RDI,RAX CALL 0x00168f50 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 CALL 0x0015fde0 MOV RDI,RAX CALL 0x00168f50 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x3 CALL 0x0015fde0 MOV RDI,RAX CALL 0x00168f50 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX ADD RSP,0x30 POP RBP RET
/* intx::be::unsafe::store(unsigned char*, intx::uint<256u> const&) */ void intx::be::unsafe::store(uchar *param_1,uint *param_2) { ulong *puVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; puVar1 = (ulong *)uint<256u>::operator[]((uint<256u> *)param_2,0); uVar2 = to_big_endian<unsigned_long>(puVar1); puVar1 = (ulong *)uint<256u>::operator[]((uint<256u> *)param_2,1); uVar3 = to_big_endian<unsigned_long>(puVar1); puVar1 = (ulong *)uint<256u>::operator[]((uint<256u> *)param_2,2); uVar4 = to_big_endian<unsigned_long>(puVar1); puVar1 = (ulong *)uint<256u>::operator[]((uint<256u> *)param_2,3); uVar5 = to_big_endian<unsigned_long>(puVar1); *(ulong *)param_1 = uVar5; *(ulong *)(param_1 + 8) = uVar4; *(ulong *)(param_1 + 0x10) = uVar3; *(ulong *)(param_1 + 0x18) = uVar2; return; }
155
LefDefParser::defiGroup::Destroy()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiGroup.cpp
void defiGroup::Destroy() { if (name_) free(name_); if (region_) free(region_); name_ = 0; nameLength_ = 0; region_ = 0; regionLength_ = 0; clear(); free((char*)(propNames_)); free((char*)(propValues_)); free((char*)(propDValues_)); free((char*)(propTypes_)); free((char*)(xl_)); free((char*)(yl_)); free((char*)(xh_)); free((char*)(yh_)); }
O0
cpp
LefDefParser::defiGroup::Destroy(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, (%rax) je 0x49716 movq 0x8(%rsp), %rax movq (%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax cmpq $0x0, 0x10(%rax) je 0x49730 movq 0x8(%rsp), %rax movq 0x10(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rdi movq $0x0, (%rdi) movl $0x0, 0x8(%rdi) movq $0x0, 0x10(%rdi) movl $0x0, 0x18(%rdi) callq 0x497d0 movq 0x8(%rsp), %rax movq 0x68(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x70(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x78(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x80(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x28(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x30(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x38(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x40(%rax), %rdi callq 0x72a0 addq $0x18, %rsp retq nop
_ZN12LefDefParser9defiGroup7DestroyEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax cmp qword ptr [rax], 0 jz short loc_49716 mov rax, [rsp+18h+var_10] mov rdi, [rax] call _free loc_49716: mov rax, [rsp+18h+var_10] cmp qword ptr [rax+10h], 0 jz short loc_49730 mov rax, [rsp+18h+var_10] mov rdi, [rax+10h] call _free loc_49730: mov rdi, [rsp+18h+var_10]; this mov qword ptr [rdi], 0 mov dword ptr [rdi+8], 0 mov qword ptr [rdi+10h], 0 mov dword ptr [rdi+18h], 0 call _ZN12LefDefParser9defiGroup5clearEv; LefDefParser::defiGroup::clear(void) mov rax, [rsp+18h+var_10] mov rdi, [rax+68h] call _free mov rax, [rsp+18h+var_10] mov rdi, [rax+70h] call _free mov rax, [rsp+18h+var_10] mov rdi, [rax+78h] call _free mov rax, [rsp+18h+var_10] mov rdi, [rax+80h] call _free mov rax, [rsp+18h+var_10] mov rdi, [rax+28h] call _free mov rax, [rsp+18h+var_10] mov rdi, [rax+30h] call _free mov rax, [rsp+18h+var_10] mov rdi, [rax+38h] call _free mov rax, [rsp+18h+var_10] mov rdi, [rax+40h] call _free add rsp, 18h retn
long long LefDefParser::defiGroup::Destroy(LefDefParser::defiGroup *this) { if ( *(_QWORD *)this ) free(*(_QWORD *)this); if ( *((_QWORD *)this + 2) ) free(*((_QWORD *)this + 2)); *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; *((_QWORD *)this + 2) = 0LL; *((_DWORD *)this + 6) = 0; LefDefParser::defiGroup::clear(this); free(*((_QWORD *)this + 13)); free(*((_QWORD *)this + 14)); free(*((_QWORD *)this + 15)); free(*((_QWORD *)this + 16)); free(*((_QWORD *)this + 5)); free(*((_QWORD *)this + 6)); free(*((_QWORD *)this + 7)); return free(*((_QWORD *)this + 8)); }
Destroy: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RAX],0x0 JZ 0x00149716 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX] CALL 0x001072a0 LAB_00149716: MOV RAX,qword ptr [RSP + 0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00149730 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x001072a0 LAB_00149730: MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RDI],0x0 MOV dword ptr [RDI + 0x8],0x0 MOV qword ptr [RDI + 0x10],0x0 MOV dword ptr [RDI + 0x18],0x0 CALL 0x001497d0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x68] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x70] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x78] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x80] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x28] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x30] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x38] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x40] CALL 0x001072a0 ADD RSP,0x18 RET
/* LefDefParser::defiGroup::Destroy() */ void __thiscall LefDefParser::defiGroup::Destroy(defiGroup *this) { if (*(long *)this != 0) { free(*(void **)this); } if (*(long *)(this + 0x10) != 0) { free(*(void **)(this + 0x10)); } *(int8 *)this = 0; *(int4 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int4 *)(this + 0x18) = 0; clear(this); free(*(void **)(this + 0x68)); free(*(void **)(this + 0x70)); free(*(void **)(this + 0x78)); free(*(void **)(this + 0x80)); free(*(void **)(this + 0x28)); free(*(void **)(this + 0x30)); free(*(void **)(this + 0x38)); free(*(void **)(this + 0x40)); return; }
156
LefDefParser::defiGroup::Destroy()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiGroup.cpp
void defiGroup::Destroy() { if (name_) free(name_); if (region_) free(region_); name_ = 0; nameLength_ = 0; region_ = 0; regionLength_ = 0; clear(); free((char*)(propNames_)); free((char*)(propValues_)); free((char*)(propDValues_)); free((char*)(propTypes_)); free((char*)(xl_)); free((char*)(yl_)); free((char*)(xh_)); free((char*)(yh_)); }
O3
cpp
LefDefParser::defiGroup::Destroy(): pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi testq %rdi, %rdi je 0x2b4bf callq 0x6220 movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x2b4cd callq 0x6220 xorl %eax, %eax movq %rax, (%rbx) movl %eax, 0x8(%rbx) movq %rax, 0x10(%rbx) movl %eax, 0x18(%rbx) movq %rbx, %rdi callq 0x2b530 movq 0x68(%rbx), %rdi callq 0x6220 movq 0x70(%rbx), %rdi callq 0x6220 movq 0x78(%rbx), %rdi callq 0x6220 movq 0x80(%rbx), %rdi callq 0x6220 movq 0x28(%rbx), %rdi callq 0x6220 movq 0x30(%rbx), %rdi callq 0x6220 movq 0x38(%rbx), %rdi callq 0x6220 movq 0x40(%rbx), %rdi popq %rbx jmp 0x6220
_ZN12LefDefParser9defiGroup7DestroyEv: push rbx mov rbx, rdi mov rdi, [rdi] test rdi, rdi jz short loc_2B4BF call _free loc_2B4BF: mov rdi, [rbx+10h] test rdi, rdi jz short loc_2B4CD call _free loc_2B4CD: xor eax, eax mov [rbx], rax mov [rbx+8], eax mov [rbx+10h], rax mov [rbx+18h], eax mov rdi, rbx; this call _ZN12LefDefParser9defiGroup5clearEv; LefDefParser::defiGroup::clear(void) mov rdi, [rbx+68h] call _free mov rdi, [rbx+70h] call _free mov rdi, [rbx+78h] call _free mov rdi, [rbx+80h] call _free mov rdi, [rbx+28h] call _free mov rdi, [rbx+30h] call _free mov rdi, [rbx+38h] call _free mov rdi, [rbx+40h] pop rbx jmp _free
long long LefDefParser::defiGroup::Destroy(LefDefParser::defiGroup *this) { long long v2; // rdi long long v3; // rdi v2 = *(_QWORD *)this; if ( v2 ) free(v2); v3 = *((_QWORD *)this + 2); if ( v3 ) free(v3); *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; *((_QWORD *)this + 2) = 0LL; *((_DWORD *)this + 6) = 0; LefDefParser::defiGroup::clear(this); free(*((_QWORD *)this + 13)); free(*((_QWORD *)this + 14)); free(*((_QWORD *)this + 15)); free(*((_QWORD *)this + 16)); free(*((_QWORD *)this + 5)); free(*((_QWORD *)this + 6)); free(*((_QWORD *)this + 7)); return free(*((_QWORD *)this + 8)); }
Destroy: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ 0x0012b4bf CALL 0x00106220 LAB_0012b4bf: MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0012b4cd CALL 0x00106220 LAB_0012b4cd: XOR EAX,EAX MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x8],EAX MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x18],EAX MOV RDI,RBX CALL 0x0012b530 MOV RDI,qword ptr [RBX + 0x68] CALL 0x00106220 MOV RDI,qword ptr [RBX + 0x70] CALL 0x00106220 MOV RDI,qword ptr [RBX + 0x78] CALL 0x00106220 MOV RDI,qword ptr [RBX + 0x80] CALL 0x00106220 MOV RDI,qword ptr [RBX + 0x28] CALL 0x00106220 MOV RDI,qword ptr [RBX + 0x30] CALL 0x00106220 MOV RDI,qword ptr [RBX + 0x38] CALL 0x00106220 MOV RDI,qword ptr [RBX + 0x40] POP RBX JMP 0x00106220
/* LefDefParser::defiGroup::Destroy() */ void __thiscall LefDefParser::defiGroup::Destroy(defiGroup *this) { if (*(void **)this != (void *)0x0) { free(*(void **)this); } if (*(void **)(this + 0x10) != (void *)0x0) { free(*(void **)(this + 0x10)); } *(int8 *)this = 0; *(int4 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int4 *)(this + 0x18) = 0; clear(this); free(*(void **)(this + 0x68)); free(*(void **)(this + 0x70)); free(*(void **)(this + 0x78)); free(*(void **)(this + 0x80)); free(*(void **)(this + 0x28)); free(*(void **)(this + 0x30)); free(*(void **)(this + 0x38)); free(*(void **)(this + 0x40)); return; }
157
ggml_map_custom3_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_map_custom3_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, struct ggml_tensor * c, const ggml_custom3_op_t fun, int n_tasks, void * userdata, bool inplace) { GGML_ASSERT(n_tasks == GGML_N_TASKS_MAX || n_tasks > 0); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); struct ggml_map_custom3_op_params params = { /*.fun =*/ fun, /*.n_tasks =*/ n_tasks, /*.userdata =*/ userdata }; ggml_set_op_params(result, &params, sizeof(params)); result->op = GGML_OP_MAP_CUSTOM3; result->src[0] = a; result->src[1] = b; result->src[2] = c; return result; }
O1
c
ggml_map_custom3_impl: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx cmpl $-0x1, %r9d sete %al testl %r9d, %r9d setg %cl orb %al, %cl je 0x1fa68 movl %r9d, %ebp movq %r8, %r12 movq %rdx, %r14 movq %rsi, %r15 cmpb $0x0, 0x38(%rsp) je 0x1fa17 movq %r15, %rsi callq 0x16260 jmp 0x1fa2e movl (%r15), %esi leaq 0x10(%r15), %rcx movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19cd9 testq %rax, %rax je 0x1fa84 movq 0x30(%rsp), %rcx movq %r12, 0x54(%rax) movl %ebp, 0x5c(%rax) movq %rcx, 0x64(%rax) movl $0x4d, 0x50(%rax) movq %r15, 0x98(%rax) movq %r14, 0xa0(%rax) movq %rbx, 0xa8(%rax) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x2aba0(%rip), %rdi # 0x4a60f leaq 0x2abe4(%rip), %rdx # 0x4a65a leaq 0x2cfcd(%rip), %rcx # 0x4ca4a movl $0x1380, %esi # imm = 0x1380 jmp 0x1fa9e leaq 0x2cd4d(%rip), %rdi # 0x4c7d8 leaq 0x2abc8(%rip), %rdx # 0x4a65a leaq 0x2cd8f(%rip), %rcx # 0x4c828 movl $0x70, %esi xorl %eax, %eax callq 0x17c70
ggml_map_custom3_impl: push rbp push r15 push r14 push r12 push rbx mov rbx, rcx cmp r9d, 0FFFFFFFFh setz al test r9d, r9d setnle cl or cl, al jz short loc_1FA68 mov ebp, r9d mov r12, r8 mov r14, rdx mov r15, rsi cmp [rsp+28h+arg_8], 0 jz short loc_1FA17 mov rsi, r15 call _ggml_view_tensor jmp short loc_1FA2E loc_1FA17: mov esi, [r15] lea rcx, [r15+10h] mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_1FA2E: test rax, rax jz short loc_1FA84 mov rcx, [rsp+28h+arg_0] mov [rax+54h], r12 mov [rax+5Ch], ebp mov [rax+64h], rcx mov dword ptr [rax+50h], 4Dh ; 'M' mov [rax+98h], r15 mov [rax+0A0h], r14 mov [rax+0A8h], rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1FA68: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNTasksGgmlNTas; "n_tasks == GGML_N_TASKS_MAX || n_tasks "... mov esi, 1380h jmp short loc_1FA9E loc_1FA84: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' loc_1FA9E: xor eax, eax call _ggml_abort
long long ggml_map_custom3_impl( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, long long a7, char a8) { long long result; // rax const char *v13; // rdi const char *v14; // rcx int v15; // esi if ( a6 != -1 && a6 <= 0 ) { v13 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c"; v14 = "n_tasks == GGML_N_TASKS_MAX || n_tasks > 0"; v15 = 4992; goto LABEL_9; } if ( a8 ) result = ggml_view_tensor(a1, a2); else result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (_QWORD *)(a2 + 16), 0LL, 0LL); if ( !result ) { v13 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-impl.h"; v14 = "tensor != NULL"; v15 = 112; LABEL_9: ggml_abort((_DWORD)v13, v15, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v14, a5, a6); } *(_QWORD *)(result + 84) = a5; *(_DWORD *)(result + 92) = a6; *(_QWORD *)(result + 100) = a7; *(_DWORD *)(result + 80) = 77; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; *(_QWORD *)(result + 168) = a4; return result; }
ggml_map_custom3_impl: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX CMP R9D,-0x1 SETZ AL TEST R9D,R9D SETG CL OR CL,AL JZ 0x0011fa68 MOV EBP,R9D MOV R12,R8 MOV R14,RDX MOV R15,RSI CMP byte ptr [RSP + 0x38],0x0 JZ 0x0011fa17 MOV RSI,R15 CALL 0x00116260 JMP 0x0011fa2e LAB_0011fa17: MOV ESI,dword ptr [R15] LEA RCX,[R15 + 0x10] MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x00119cd9 LAB_0011fa2e: TEST RAX,RAX JZ 0x0011fa84 MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x54],R12 MOV dword ptr [RAX + 0x5c],EBP MOV qword ptr [RAX + 0x64],RCX MOV dword ptr [RAX + 0x50],0x4d MOV qword ptr [RAX + 0x98],R15 MOV qword ptr [RAX + 0xa0],R14 MOV qword ptr [RAX + 0xa8],RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011fa68: LEA RDI,[0x14a60f] LEA RDX,[0x14a65a] LEA RCX,[0x14ca4a] MOV ESI,0x1380 JMP 0x0011fa9e LAB_0011fa84: LEA RDI,[0x14c7d8] LEA RDX,[0x14a65a] LEA RCX,[0x14c828] MOV ESI,0x70 LAB_0011fa9e: XOR EAX,EAX CALL 0x00117c70
void ggml_map_custom3_impl (int8 param_1,int4 *param_2,int8 param_3,int8 param_4, int8 param_5,int param_6,int8 param_7,char param_8) { long lVar1; char *pcVar2; int8 uVar3; char *pcVar4; if (param_6 < 1 && param_6 != -1) { pcVar4 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c"; pcVar2 = "n_tasks == GGML_N_TASKS_MAX || n_tasks > 0"; uVar3 = 0x1380; } else { if (param_8 == '\0') { lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,param_2 + 4,0,0); } else { lVar1 = ggml_view_tensor(param_1,param_2); } if (lVar1 != 0) { *(int8 *)(lVar1 + 0x54) = param_5; *(int *)(lVar1 + 0x5c) = param_6; *(int8 *)(lVar1 + 100) = param_7; *(int4 *)(lVar1 + 0x50) = 0x4d; *(int4 **)(lVar1 + 0x98) = param_2; *(int8 *)(lVar1 + 0xa0) = param_3; *(int8 *)(lVar1 + 0xa8) = param_4; return; } pcVar4 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-impl.h"; pcVar2 = "tensor != NULL"; uVar3 = 0x70; } /* WARNING: Subroutine does not return */ ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
158
google::protobuf::DescriptorBuilder::AddImportError(google::protobuf::FileDescriptorProto const&, int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::AddImportError(const FileDescriptorProto& proto, int index) { std::string message; if (pool_->fallback_database_ == nullptr) { message = "Import \"" + proto.dependency(index) + "\" has not been loaded."; } else { message = "Import \"" + proto.dependency(index) + "\" was not found or had errors."; } AddError(proto.dependency(index), proto, DescriptorPool::ErrorCollector::IMPORT, message); }
O3
cpp
google::protobuf::DescriptorBuilder::AddImportError(google::protobuf::FileDescriptorProto const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) movq $0x0, -0x8(%r12) movb $0x0, (%r12) movq (%rdi), %rax cmpq $0x0, 0x8(%rax) movslq %edx, %r13 je 0xcd442 movq 0x28(%rbx), %rax movq 0x8(%rax,%r13,8), %rdx leaq 0x9f1e0(%rip), %rsi # 0x16c605 leaq 0x8(%rsp), %rdi callq 0x2d040 leaq 0x9f203(%rip), %rsi # 0x16c639 leaq 0x8(%rsp), %rdi callq 0x2e5a0 jmp 0xcd46d movq 0x28(%rbx), %rax movq 0x8(%rax,%r13,8), %rdx leaq 0x9f1b3(%rip), %rsi # 0x16c605 leaq 0x8(%rsp), %rdi callq 0x2d040 leaq 0x9f1bf(%rip), %rsi # 0x16c622 leaq 0x8(%rsp), %rdi callq 0x2e5a0 leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xcd494 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0xcd49b movups (%rcx), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rax), %rdx leaq 0x28(%rsp), %r15 movq %rdx, 0x8(%r15) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x48(%rsp), %rdi movq %r15, %rsi callq 0x2c6a0 movq (%r15), %rdi cmpq %rbp, %rdi je 0xcd4d1 callq 0x2d160 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xcd4e4 callq 0x2d160 movq 0x28(%rbx), %rax movq 0x8(%rax,%r13,8), %rsi leaq 0x48(%rsp), %r8 movq %r14, %rdi movq %rbx, %rdx movl $0x9, %ecx callq 0xc9ee0 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0xcd511 callq 0x2d160 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xcd524 jmp 0xcd53e movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xcd541 callq 0x2d160 jmp 0xcd541 jmp 0xcd53e movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0xcd550 callq 0x2d160 movq %rbx, %rdi callq 0x2e220
_ZN6google8protobuf17DescriptorBuilder14AddImportErrorERKNS0_19FileDescriptorProtoEi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rbx, rsi mov r14, rdi lea r12, [rsp+98h+var_40] mov [r12-10h], r12 mov qword ptr [r12-8], 0 mov byte ptr [r12], 0 mov rax, [rdi] cmp qword ptr [rax+8], 0 movsxd r13, edx jz short loc_CD442 mov rax, [rbx+28h] mov rdx, [rax+r13*8+8] lea rsi, aImport; "Import \"" lea rdi, [rsp+98h+var_90] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, aWasNotFoundOrH; "\" was not found or had errors." lea rdi, [rsp+98h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_CD46D loc_CD442: mov rax, [rbx+28h] mov rdx, [rax+r13*8+8] lea rsi, aImport; "Import \"" lea rdi, [rsp+98h+var_90] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, aHasNotBeenLoad; "\" has not been loaded." lea rdi, [rsp+98h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_CD46D: lea rbp, [rsp+98h+var_60] mov [rbp-10h], rbp mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_CD494 mov [rsp+98h+var_70], rdx mov rdx, [rcx] mov [rsp+98h+var_60], rdx jmp short loc_CD49B loc_CD494: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbp+0], xmm0 loc_CD49B: mov rdx, [rax+8] lea r15, [rsp+98h+var_70] mov [r15+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+98h+var_50] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, rbp jz short loc_CD4D1 call __ZdlPv; operator delete(void *) loc_CD4D1: lea rax, [rsp+98h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CD4E4 call __ZdlPv; operator delete(void *) loc_CD4E4: mov rax, [rbx+28h] mov rsi, [rax+r13*8+8] lea r8, [rsp+98h+var_50] mov rdi, r14 mov rdx, rbx mov ecx, 9 call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&) mov rdi, [rsp+98h+var_50]; void * cmp rdi, r12 jz short loc_CD511 call __ZdlPv; operator delete(void *) loc_CD511: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_CD524 jmp short loc_CD53E loc_CD524: mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CD541 call __ZdlPv; operator delete(void *) jmp short loc_CD541 jmp short $+2 loc_CD53E: mov rbx, rax loc_CD541: mov rdi, [rsp+arg_40]; void * cmp rdi, r12 jz short loc_CD550 call __ZdlPv; operator delete(void *) loc_CD550: mov rdi, rbx call __Unwind_Resume
void google::protobuf::DescriptorBuilder::AddImportError( google::protobuf::DescriptorBuilder *this, const google::protobuf::FileDescriptorProto *a2, int a3) { long long v3; // r13 long long v4; // rax __int128 *v5; // rcx void *v6[2]; // [rsp+8h] [rbp-90h] BYREF char v7; // [rsp+18h] [rbp-80h] BYREF void *v8[2]; // [rsp+28h] [rbp-70h] BYREF __int128 v9; // [rsp+38h] [rbp-60h] BYREF void *v10[2]; // [rsp+48h] [rbp-50h] BYREF _BYTE v11[64]; // [rsp+58h] [rbp-40h] BYREF v10[0] = v11; v10[1] = 0LL; v11[0] = 0; v3 = a3; if ( *(_QWORD *)(*(_QWORD *)this + 8LL) ) { std::operator+<char>(v6, "Import \"", *(_QWORD *)(*((_QWORD *)a2 + 5) + 8LL * a3 + 8)); v4 = std::string::append(v6, "\" was not found or had errors."); } else { std::operator+<char>(v6, "Import \"", *(_QWORD *)(*((_QWORD *)a2 + 5) + 8LL * a3 + 8)); v4 = std::string::append(v6, "\" has not been loaded."); } v8[0] = &v9; v5 = (__int128 *)(v4 + 16); if ( *(_QWORD *)v4 == v4 + 16 ) { v9 = *v5; } else { v8[0] = *(void **)v4; *(_QWORD *)&v9 = *(_QWORD *)v5; } v8[1] = *(void **)(v4 + 8); *(_QWORD *)v4 = v5; *(_QWORD *)(v4 + 8) = 0LL; *(_BYTE *)(v4 + 16) = 0; std::string::operator=(v10, (long long)v8); if ( v8[0] != &v9 ) operator delete(v8[0]); if ( v6[0] != &v7 ) operator delete(v6[0]); google::protobuf::DescriptorBuilder::AddError( (long long)this, *(_QWORD **)(*((_QWORD *)a2 + 5) + 8 * v3 + 8), (long long)a2, 9u, v10); if ( v10[0] != v11 ) operator delete(v10[0]); }
AddImportError: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,RSI MOV R14,RDI LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],0x0 MOV byte ptr [R12],0x0 MOV RAX,qword ptr [RDI] CMP qword ptr [RAX + 0x8],0x0 MOVSXD R13,EDX JZ 0x001cd442 MOV RAX,qword ptr [RBX + 0x28] MOV RDX,qword ptr [RAX + R13*0x8 + 0x8] LAB_001cd41e: LEA RSI,[0x26c605] LEA RDI,[RSP + 0x8] CALL 0x0012d040 LAB_001cd42f: LEA RSI,[0x26c639] LEA RDI,[RSP + 0x8] CALL 0x0012e5a0 JMP 0x001cd46d LAB_001cd442: MOV RAX,qword ptr [RBX + 0x28] MOV RDX,qword ptr [RAX + R13*0x8 + 0x8] LAB_001cd44b: LEA RSI,[0x26c605] LEA RDI,[RSP + 0x8] CALL 0x0012d040 LAB_001cd45c: LEA RSI,[0x26c622] LEA RDI,[RSP + 0x8] CALL 0x0012e5a0 LAB_001cd46d: LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001cd494 MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x001cd49b LAB_001cd494: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBP],XMM0 LAB_001cd49b: MOV RDX,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x28] MOV qword ptr [R15 + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RDI,[RSP + 0x48] MOV RSI,R15 CALL 0x0012c6a0 MOV RDI,qword ptr [R15] CMP RDI,RBP JZ 0x001cd4d1 CALL 0x0012d160 LAB_001cd4d1: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001cd4e4 CALL 0x0012d160 LAB_001cd4e4: MOV RAX,qword ptr [RBX + 0x28] MOV RSI,qword ptr [RAX + R13*0x8 + 0x8] LAB_001cd4ed: LEA R8,[RSP + 0x48] MOV RDI,R14 MOV RDX,RBX MOV ECX,0x9 CALL 0x001c9ee0 LAB_001cd502: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 JZ 0x001cd511 CALL 0x0012d160 LAB_001cd511: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::DescriptorBuilder::AddImportError(google::protobuf::FileDescriptorProto const&, int) */ void __thiscall google::protobuf::DescriptorBuilder::AddImportError (DescriptorBuilder *this,FileDescriptorProto *param_1,int param_2) { long *plVar1; long *plVar2; int1 *local_90 [2]; int1 local_80 [16]; long *local_70; long local_68; long local_60; long lStack_58; int1 *local_50; int8 local_48; int1 local_40 [16]; local_48 = 0; local_40[0] = 0; local_50 = local_40; if (*(long *)(*(long *)this + 8) == 0) { /* try { // try from 001cd44b to 001cd45b has its CatchHandler @ 001cd522 */ std::operator+((char *)local_90,(string *)"Import \""); /* try { // try from 001cd45c to 001cd46c has its CatchHandler @ 001cd520 */ plVar1 = (long *)std::__cxx11::string::append((string *)local_90,"\" has not been loaded."); } else { /* try { // try from 001cd41e to 001cd42e has its CatchHandler @ 001cd53c */ std::operator+((char *)local_90,(string *)"Import \""); /* try { // try from 001cd42f to 001cd43f has its CatchHandler @ 001cd524 */ plVar1 = (long *)std::__cxx11::string::append ((string *)local_90,"\" was not found or had errors."); } plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_60 = *plVar2; lStack_58 = plVar1[3]; local_70 = &local_60; } else { local_60 = *plVar2; local_70 = (long *)*plVar1; } local_68 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; std::__cxx11::string::operator=((string *)&local_50,(string *)&local_70); if (local_70 != &local_60) { operator_delete(local_70); } if (local_90[0] != local_80) { operator_delete(local_90[0]); } /* try { // try from 001cd4ed to 001cd501 has its CatchHandler @ 001cd53e */ AddError(this,*(int8 *)(*(long *)(param_1 + 0x28) + 8 + (long)param_2 * 8),param_1,9, &local_50); if (local_50 != local_40) { operator_delete(local_50); } return; }
159
json_schema_to_grammar(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&, bool)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string json_schema_to_grammar(const json & schema, bool force_gbnf) { #ifdef LLAMA_USE_LLGUIDANCE if (!force_gbnf) { return "%llguidance {}\nstart: %json " + schema.dump(); } #else (void)force_gbnf; #endif // LLAMA_USE_LLGUIDANCE return build_grammar([&](const common_grammar_builder & callbacks) { auto copy = schema; callbacks.resolve_refs(copy); callbacks.add_schema("", copy); }); }
O3
cpp
json_schema_to_grammar(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&, bool): pushq %rbx subq $0x30, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %rax movq $0x0, 0x8(%rax) movq %rsi, (%rax) leaq 0x267(%rip), %rcx # 0x960ea movq %rcx, 0x18(%rax) leaq 0x356(%rip), %rcx # 0x961e4 movq %rcx, 0x10(%rax) leaq 0xe(%rsp), %rdx movw $0x0, (%rdx) movq %rax, %rsi callq 0x95ef4 movq 0x20(%rsp), %rax testq %rax, %rax je 0x95ebd leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x30, %rsp popq %rbx retq jmp 0x95eec movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x95ee4 leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x18bb0 movq %rax, %rdi callq 0x2a243
_Z22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEb: push rbx sub rsp, 30h mov rbx, rdi lea rax, [rsp+38h+var_28] mov qword ptr [rax+8], 0 mov [rax], rsi lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rax+18h], rcx lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rax+10h], rcx lea rdx, [rsp+38h+var_2A] mov word ptr [rdx], 0 mov rsi, rax call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) mov rax, [rsp+38h+var_18] test rax, rax jz short loc_95EBD lea rdi, [rsp+38h+var_28] mov rsi, rdi mov edx, 3 call rax loc_95EBD: mov rax, rbx add rsp, 30h pop rbx retn jmp short loc_95EEC mov rbx, rax mov rax, [rsp+38h+var_18] test rax, rax jz short loc_95EE4 lea rdi, [rsp+38h+var_28] mov rsi, rdi mov edx, 3 call rax loc_95EE4: mov rdi, rbx call __Unwind_Resume loc_95EEC: mov rdi, rax call __clang_call_terminate
long long json_schema_to_grammar(long long a1, long long a2) { __int16 v3; // [rsp+Eh] [rbp-2Ah] BYREF _QWORD v4[2]; // [rsp+10h] [rbp-28h] BYREF long long ( *v5)(); // [rsp+20h] [rbp-18h] long long ( *v6)(); // [rsp+28h] [rbp-10h] v4[1] = 0LL; v4[0] = a2; v6 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,bool)::$_0>::_M_invoke; v5 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,bool)::$_0>::_M_manager; v3 = 0; build_grammar[abi:cxx11](a1, v4, &v3); if ( v5 ) ((void ( *)(_QWORD *, _QWORD *, long long))v5)(v4, v4, 3LL); return a1; }
json_schema_to_grammar: PUSH RBX SUB RSP,0x30 MOV RBX,RDI LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX],RSI LEA RCX,[0x1960ea] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[0x1961e4] MOV qword ptr [RAX + 0x10],RCX LEA RDX,[RSP + 0xe] MOV word ptr [RDX],0x0 LAB_00195e9c: MOV RSI,RAX CALL 0x00195ef4 MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x00195ebd LAB_00195eae: LEA RDI,[RSP + 0x10] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00195ebd: MOV RAX,RBX ADD RSP,0x30 POP RBX RET
/* json_schema_to_grammar(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&, bool) */ basic_json * json_schema_to_grammar(basic_json *param_1,bool param_2) { int7 in_register_00000031; int8 local_28; int8 local_20; code *local_18; code *local_10; local_28 = CONCAT71(in_register_00000031,param_2); local_20 = 0; local_10 = std:: _Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0> ::_M_invoke; local_18 = std:: _Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0> ::_M_manager; /* try { // try from 00195e9c to 00195ea3 has its CatchHandler @ 00195ec8 */ build_grammar_abi_cxx11_(param_1,(common_grammar_options *)&local_28); if (local_18 != (code *)0x0) { /* try { // try from 00195eae to 00195ebc has its CatchHandler @ 00195ec6 */ (*local_18)(&local_28,&local_28,3); } return param_1; }
160
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
monkey531[P]llama/common/json.hpp
void int_to_string( string_type& target, std::size_t value ) { // For ADL using std::to_string; target = to_string(value); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx movl $0x1, %esi cmpq $0xa, %r14 jb 0x74252 movl $0x4, %esi movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B movq %r14, %rcx cmpq $0x63, %rcx jbe 0x7424b cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x74250 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x74252 movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x74215 addl $-0x3, %esi jmp 0x74252 addl $-0x2, %esi jmp 0x74252 decl %esi movl %esi, %esi leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x8(%rsp), %r15 movq %r15, %rdi xorl %edx, %edx callq 0x187f0 movq (%r15), %rdi movl 0x8(%r15), %esi movq %r14, %rdx callq 0x4c685 movq %rbx, %rdi movq %r15, %rsi callq 0x18850 movq (%r15), %rdi cmpq %r12, %rdi je 0x7429c movq 0x18(%rsp), %rsi incq %rsi callq 0x186e0 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m: push r15 push r14 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi mov esi, 1 cmp r14, 0Ah jb short loc_74252 mov esi, 4 mov rdi, 346DC5D63886594Bh mov rcx, r14 loc_74215: cmp rcx, 63h ; 'c' jbe short loc_7424B cmp rcx, 3E7h jbe short loc_74250 cmp rcx, 2710h jb short loc_74252 mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_74215 add esi, 0FFFFFFFDh jmp short loc_74252 loc_7424B: add esi, 0FFFFFFFEh jmp short loc_74252 loc_74250: dec esi loc_74252: mov esi, esi lea r12, [rsp+48h+var_30] mov [r12-10h], r12 lea r15, [rsp+48h+var_40] mov rdi, r15 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [r15] mov esi, [r15+8] mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r12 jz short loc_7429C mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7429C: add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(long long a1, unsigned long long a2) { unsigned int v3; // esi unsigned long long v4; // rcx bool v5; // cc char *v6; // [rsp+8h] [rbp-40h] BYREF int v7; // [rsp+10h] [rbp-38h] _QWORD v8[6]; // [rsp+18h] [rbp-30h] BYREF v3 = 1; if ( a2 >= 0xA ) { v3 = 4; v4 = a2; while ( 1 ) { if ( v4 <= 0x63 ) { v3 -= 2; goto LABEL_10; } if ( v4 <= 0x3E7 ) break; if ( v4 < 0x2710 ) goto LABEL_10; v3 += 4; v5 = v4 <= 0x1869F; v4 /= 0x2710uLL; if ( v5 ) { v3 -= 3; goto LABEL_10; } } --v3; } LABEL_10: v6 = (char *)v8; std::string::_M_construct(&v6, v3, 0LL); std::__detail::__to_chars_10_impl<unsigned long>(v6, v7, a2); std::string::operator=(a1, &v6); if ( v6 != (char *)v8 ) operator delete(v6, v8[0] + 1LL); }
int_to_string<std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI MOV ESI,0x1 CMP R14,0xa JC 0x00174252 MOV ESI,0x4 MOV RDI,0x346dc5d63886594b MOV RCX,R14 LAB_00174215: CMP RCX,0x63 JBE 0x0017424b CMP RCX,0x3e7 JBE 0x00174250 CMP RCX,0x2710 JC 0x00174252 MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x00174215 ADD ESI,-0x3 JMP 0x00174252 LAB_0017424b: ADD ESI,-0x2 JMP 0x00174252 LAB_00174250: DEC ESI LAB_00174252: MOV ESI,ESI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LEA R15,[RSP + 0x8] MOV RDI,R15 XOR EDX,EDX CALL 0x001187f0 MOV RDI,qword ptr [R15] MOV ESI,dword ptr [R15 + 0x8] MOV RDX,R14 CALL 0x0014c685 MOV RDI,RBX MOV RSI,R15 CALL 0x00118850 MOV RDI,qword ptr [R15] CMP RDI,R12 JZ 0x0017429c MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186e0 LAB_0017429c: ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string >(std::__cxx11::string&, unsigned long) */ void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string> (string *param_1,ulong param_2) { bool bVar1; char cVar2; ulong uVar3; char cVar4; long *local_40; uint local_38; long local_30 [2]; cVar4 = '\x01'; if (9 < param_2) { uVar3 = param_2; cVar2 = '\x04'; do { cVar4 = cVar2; if (uVar3 < 100) { cVar4 = cVar4 + -2; goto LAB_00174252; } if (uVar3 < 1000) { cVar4 = cVar4 + -1; goto LAB_00174252; } if (uVar3 < 10000) goto LAB_00174252; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar2 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_00174252: local_40 = local_30; std::__cxx11::string::_M_construct((ulong)&local_40,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_40,local_38,param_2); std::__cxx11::string::operator=(param_1,(string *)&local_40); if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } return; }
161
js_array_pop
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_pop(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int shift) { JSValue obj, res = JS_UNDEFINED; int64_t len, newLen; JSValue *arrp; uint32_t count32; obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; newLen = 0; if (len > 0) { newLen = len - 1; /* Special case fast arrays */ if (js_get_fast_array(ctx, obj, &arrp, &count32) && count32 == len) { JSObject *p = JS_VALUE_GET_OBJ(obj); if (shift) { res = arrp[0]; memmove(arrp, arrp + 1, (count32 - 1) * sizeof(*arrp)); p->u.array.count--; } else { res = arrp[count32 - 1]; p->u.array.count--; } } else { if (shift) { res = JS_GetPropertyInt64(ctx, obj, 0); if (JS_IsException(res)) goto exception; if (JS_CopySubArray(ctx, obj, 0, 1, len - 1, +1)) goto exception; } else { res = JS_GetPropertyInt64(ctx, obj, newLen); if (JS_IsException(res)) goto exception; } if (JS_DeletePropertyInt64(ctx, obj, newLen, JS_PROP_THROW) < 0) goto exception; } } if (JS_SetProperty(ctx, obj, JS_ATOM_length, js_int64(newLen)) < 0) goto exception; JS_FreeValue(ctx, obj); return res; exception: JS_FreeValue(ctx, res); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O2
c
js_array_pop: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r9d, %ebp movq %rdi, %rbx callq 0x24742 movq %rax, %r14 movq %rdx, %r15 leaq 0x20(%rsp), %rsi movq %rbx, %rdi movq %rax, %rdx movq %r15, %rcx callq 0x207f3 testl %eax, %eax je 0x45ef0 pushq $0x3 popq %r13 xorl %ebp, %ebp movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1bbce pushq $0x6 popq %r13 xorl %ebp, %ebp movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1bbce movq %rbp, %rax movq %r13, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x20(%rsp), %r13 testq %r13, %r13 jle 0x45f98 leaq -0x1(%r13), %r12 leaq 0x18(%rsp), %rdx leaq 0x14(%rsp), %rcx movq %r14, %rdi movq %r15, %rsi callq 0x3de1c testl %eax, %eax je 0x45f4c movl 0x14(%rsp), %edx cmpq %rdx, %r13 jne 0x45f4c movq 0x18(%rsp), %rdi testl %ebp, %ebp je 0x45fdb movq (%rdi), %rbp movq 0x8(%rdi), %r13 leaq 0x10(%rdi), %rsi decl %edx shlq $0x4, %rdx callq 0xe7b0 jmp 0x45fea movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx testl %ebp, %ebp je 0x45fa3 xorl %ecx, %ecx callq 0x21d28 movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x45eb9 movl $0x1, (%rsp) pushq $0x1 popq %r8 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx xorl %ecx, %ecx movq %r12, %r9 callq 0x4601a testl %eax, %eax jne 0x45eb9 jmp 0x45fbb pushq $0x3 popq %r13 xorl %r12d, %r12d xorl %ebp, %ebp jmp 0x45fee movq %r12, %rcx callq 0x21d28 movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x45eb9 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx movl $0x4000, %r8d # imm = 0x4000 callq 0x24c59 testl %eax, %eax jns 0x45fee jmp 0x45eb9 decl %edx shlq $0x4, %rdx movq (%rdi,%rdx), %rbp movq 0x8(%rdi,%rdx), %r13 decl 0x40(%r14) movq %r12, %rdi callq 0x245bb movq %rdx, %r9 pushq $0x32 popq %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %rax, %r8 callq 0x21ff6 testl %eax, %eax jns 0x45ecd jmp 0x45eb9
js_array_pop: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, r9d mov rbx, rdi call JS_ToObject mov r14, rax mov r15, rdx lea rsi, [rsp+58h+var_38] mov rdi, rbx mov rdx, rax mov rcx, r15 call js_get_length64 test eax, eax jz short loc_45EF0 push 3 pop r13 xor ebp, ebp loc_45EB9: mov rdi, rbx mov rsi, rbp mov rdx, r13 call JS_FreeValue push 6 pop r13 xor ebp, ebp loc_45ECD: mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_FreeValue mov rax, rbp mov rdx, r13 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_45EF0: mov r13, [rsp+58h+var_38] test r13, r13 jle loc_45F98 lea r12, [r13-1] lea rdx, [rsp+58h+var_40] lea rcx, [rsp+58h+var_44] mov rdi, r14 mov rsi, r15 call js_get_fast_array test eax, eax jz short loc_45F4C mov edx, [rsp+58h+var_44] cmp r13, rdx jnz short loc_45F4C mov rdi, [rsp+58h+var_40] test ebp, ebp jz loc_45FDB mov rbp, [rdi] mov r13, [rdi+8] lea rsi, [rdi+10h] dec edx shl rdx, 4 call _memmove jmp loc_45FEA loc_45F4C: mov rdi, rbx mov rsi, r14 mov rdx, r15 test ebp, ebp jz short loc_45FA3 xor ecx, ecx call JS_GetPropertyInt64 mov rbp, rax mov r13, rdx cmp r13d, 6 jz loc_45EB9 mov [rsp+58h+var_58], 1 push 1 pop r8 mov rdi, rbx mov rsi, r14 mov rdx, r15 xor ecx, ecx mov r9, r12 call JS_CopySubArray test eax, eax jnz loc_45EB9 jmp short loc_45FBB loc_45F98: push 3 pop r13 xor r12d, r12d xor ebp, ebp jmp short loc_45FEE loc_45FA3: mov rcx, r12 call JS_GetPropertyInt64 mov rbp, rax mov r13, rdx cmp r13d, 6 jz loc_45EB9 loc_45FBB: mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, r12 mov r8d, 4000h call JS_DeletePropertyInt64 test eax, eax jns short loc_45FEE jmp loc_45EB9 loc_45FDB: dec edx shl rdx, 4 mov rbp, [rdi+rdx] mov r13, [rdi+rdx+8] loc_45FEA: dec dword ptr [r14+40h] loc_45FEE: mov rdi, r12 call js_int64 mov r9, rdx push 32h ; '2' pop rcx mov rdi, rbx mov rsi, r14 mov rdx, r15 mov r8, rax call JS_SetProperty test eax, eax jns loc_45ECD jmp loc_45EB9
unsigned long long js_array_pop( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v14; // ebp long long v15; // r14 long long v16; // rdx long long v17; // r15 long long v18; // r13 unsigned long long PropertyInt64; // rbp long long v21; // r13 unsigned long long v22; // r12 long long v23; // rdx double v24; // xmm4_8 double v25; // xmm5_8 long long v26; // rdx long long v27; // rdx int v28; // eax int v29; // edx int v30; // [rsp+14h] [rbp-44h] BYREF unsigned long long *v31; // [rsp+18h] [rbp-40h] BYREF long long v32[7]; // [rsp+20h] [rbp-38h] BYREF v14 = a6; v15 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = v16; if ( !(unsigned int)js_get_length64(a1, v32, v15, v16) ) { v21 = v32[0]; if ( v32[0] <= 0 ) { v18 = 3LL; v22 = 0LL; PropertyInt64 = 0LL; } else { v22 = v32[0] - 1; if ( (unsigned int)js_get_fast_array(v15, v17, &v31, &v30) && v21 == v30 ) { if ( v14 ) { PropertyInt64 = *v31; v18 = v31[1]; memmove(v31, v31 + 2, 16LL * (unsigned int)(v30 - 1)); } else { v27 = 2LL * (unsigned int)(v30 - 1); PropertyInt64 = v31[v27]; v18 = v31[v27 + 1]; } --*(_DWORD *)(v15 + 64); } else { if ( v14 ) { PropertyInt64 = JS_GetPropertyInt64(a1, v15, v17, 0LL); v18 = v23; if ( (_DWORD)v23 == 6 || (unsigned int)JS_CopySubArray(a1, v15, v17, 0, 1, v22, 1) ) goto LABEL_3; } else { PropertyInt64 = JS_GetPropertyInt64(a1, v15, v17, v21 - 1); v18 = v26; if ( (_DWORD)v26 == 6 ) goto LABEL_3; } if ( (int)JS_DeletePropertyInt64(a1, v15, v17, v22, 0x4000, a7, a8, a9, a10, v24, v25, a13, a14) < 0 ) goto LABEL_3; } } v28 = js_int64(v22); if ( (int)JS_SetProperty(a1, v15, v17, 50, v28, v29) >= 0 ) goto LABEL_4; goto LABEL_3; } v18 = 3LL; PropertyInt64 = 0LL; LABEL_3: JS_FreeValue(a1, PropertyInt64, v18); PropertyInt64 = 0LL; LABEL_4: JS_FreeValue(a1, v15, v17); return PropertyInt64; }
js_array_pop: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R9D MOV RBX,RDI CALL 0x00124742 MOV R14,RAX MOV R15,RDX LEA RSI,[RSP + 0x20] MOV RDI,RBX MOV RDX,RAX MOV RCX,R15 CALL 0x001207f3 TEST EAX,EAX JZ 0x00145ef0 PUSH 0x3 POP R13 XOR EBP,EBP LAB_00145eb9: MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 CALL 0x0011bbce PUSH 0x6 POP R13 XOR EBP,EBP LAB_00145ecd: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011bbce MOV RAX,RBP MOV RDX,R13 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00145ef0: MOV R13,qword ptr [RSP + 0x20] TEST R13,R13 JLE 0x00145f98 LEA R12,[R13 + -0x1] LEA RDX,[RSP + 0x18] LEA RCX,[RSP + 0x14] MOV RDI,R14 MOV RSI,R15 CALL 0x0013de1c TEST EAX,EAX JZ 0x00145f4c MOV EDX,dword ptr [RSP + 0x14] CMP R13,RDX JNZ 0x00145f4c MOV RDI,qword ptr [RSP + 0x18] TEST EBP,EBP JZ 0x00145fdb MOV RBP,qword ptr [RDI] MOV R13,qword ptr [RDI + 0x8] LEA RSI,[RDI + 0x10] DEC EDX SHL RDX,0x4 CALL 0x0010e7b0 JMP 0x00145fea LAB_00145f4c: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 TEST EBP,EBP JZ 0x00145fa3 XOR ECX,ECX CALL 0x00121d28 MOV RBP,RAX MOV R13,RDX CMP R13D,0x6 JZ 0x00145eb9 MOV dword ptr [RSP],0x1 PUSH 0x1 POP R8 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 XOR ECX,ECX MOV R9,R12 CALL 0x0014601a TEST EAX,EAX JNZ 0x00145eb9 JMP 0x00145fbb LAB_00145f98: PUSH 0x3 POP R13 XOR R12D,R12D XOR EBP,EBP JMP 0x00145fee LAB_00145fa3: MOV RCX,R12 CALL 0x00121d28 MOV RBP,RAX MOV R13,RDX CMP R13D,0x6 JZ 0x00145eb9 LAB_00145fbb: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 MOV R8D,0x4000 CALL 0x00124c59 TEST EAX,EAX JNS 0x00145fee JMP 0x00145eb9 LAB_00145fdb: DEC EDX SHL RDX,0x4 MOV RBP,qword ptr [RDI + RDX*0x1] MOV R13,qword ptr [RDI + RDX*0x1 + 0x8] LAB_00145fea: DEC dword ptr [R14 + 0x40] LAB_00145fee: MOV RDI,R12 CALL 0x001245bb MOV R9,RDX PUSH 0x32 POP RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV R8,RAX CALL 0x00121ff6 TEST EAX,EAX JNS 0x00145ecd JMP 0x00145eb9
int1 [16] js_array_pop(int8 param_1) { int iVar1; int8 uVar4; int in_R9D; long lVar5; int8 uVar6; int1 auVar7 [16]; int1 auVar8 [16]; uint local_44; int8 *local_40; ulong local_38; long lVar2; int8 uVar3; auVar7 = JS_ToObject(); uVar3 = auVar7._8_8_; lVar2 = auVar7._0_8_; iVar1 = js_get_length64(param_1,&local_38,lVar2,uVar3); if (iVar1 != 0) { auVar7 = ZEXT816(3) << 0x40; goto LAB_00145eb9; } if ((long)local_38 < 1) { lVar5 = 0; auVar7 = ZEXT816(3) << 0x40; LAB_00145fee: auVar8 = js_int64(lVar5); iVar1 = JS_SetProperty(param_1,lVar2,uVar3,0x32,auVar8._0_8_,auVar8._8_8_); if (-1 < iVar1) goto LAB_00145ecd; } else { lVar5 = local_38 - 1; iVar1 = js_get_fast_array(lVar2,uVar3,&local_40,&local_44); if ((iVar1 != 0) && (local_38 == local_44)) { if (in_R9D == 0) { uVar4 = local_40[(ulong)(local_44 - 1) * 2]; uVar6 = local_40[(ulong)(local_44 - 1) * 2 + 1]; } else { uVar4 = *local_40; uVar6 = local_40[1]; memmove(local_40,local_40 + 2,(ulong)(local_44 - 1) << 4); } auVar7._8_8_ = uVar6; auVar7._0_8_ = uVar4; *(int *)(lVar2 + 0x40) = *(int *)(lVar2 + 0x40) + -1; goto LAB_00145fee; } if (in_R9D == 0) { auVar7 = JS_GetPropertyInt64(param_1,lVar2,uVar3,lVar5); if (auVar7._8_4_ != 6) goto LAB_00145fbb; } else { auVar7 = JS_GetPropertyInt64(param_1,lVar2,uVar3,0); if ((auVar7._8_4_ != 6) && (iVar1 = JS_CopySubArray(param_1,lVar2,uVar3,0,1,lVar5,1), iVar1 == 0)) { LAB_00145fbb: iVar1 = JS_DeletePropertyInt64(param_1,lVar2,uVar3,lVar5,0x4000); if (-1 < iVar1) goto LAB_00145fee; } } } LAB_00145eb9: JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_); auVar7 = ZEXT816(6) << 0x40; LAB_00145ecd: JS_FreeValue(param_1,lVar2,uVar3); return auVar7; }
162
js_array_pop
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_pop(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int shift) { JSValue obj, res = JS_UNDEFINED; int64_t len, newLen; JSValue *arrp; uint32_t count32; obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; newLen = 0; if (len > 0) { newLen = len - 1; /* Special case fast arrays */ if (js_get_fast_array(ctx, obj, &arrp, &count32) && count32 == len) { JSObject *p = JS_VALUE_GET_OBJ(obj); if (shift) { res = arrp[0]; memmove(arrp, arrp + 1, (count32 - 1) * sizeof(*arrp)); p->u.array.count--; } else { res = arrp[count32 - 1]; p->u.array.count--; } } else { if (shift) { res = JS_GetPropertyInt64(ctx, obj, 0); if (JS_IsException(res)) goto exception; if (JS_CopySubArray(ctx, obj, 0, 1, len - 1, +1)) goto exception; } else { res = JS_GetPropertyInt64(ctx, obj, newLen); if (JS_IsException(res)) goto exception; } if (JS_DeletePropertyInt64(ctx, obj, newLen, JS_PROP_THROW) < 0) goto exception; } } if (JS_SetProperty(ctx, obj, JS_ATOM_length, js_int64(newLen)) < 0) goto exception; JS_FreeValue(ctx, obj); return res; exception: JS_FreeValue(ctx, res); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
js_array_pop: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r9d, %r12d movq %rdi, %r15 callq 0x2b520 movq %rax, %rbx movq %rdx, %r14 leaq 0x20(%rsp), %rsi movq %r15, %rdi movq %rax, %rdx movq %r14, %rcx callq 0x27327 testl %eax, %eax je 0x53195 addq $0x18, %r15 movq %r15, %rbp cmpl $-0x9, %r14d jb 0x53177 movq (%rbp), %rdi movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) movl $0x6, %r12d xorl %r13d, %r13d cmpl $0x1, %eax jg 0x53180 movq %rbx, %rsi movq %r14, %rdx callq 0x259d8 jmp 0x53180 movl $0x6, %r12d xorl %r13d, %r13d movq %r13, %rax movq %r12, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x20(%rsp), %rax testq %rax, %rax jle 0x5323e leaq -0x1(%rax), %rbp cmpl $-0x1, %r14d jne 0x531ef cmpw $0x2, 0x6(%rbx) jne 0x531ef testb $0x8, 0x5(%rbx) je 0x531ef movl 0x40(%rbx), %edx cmpq %rdx, %rax jne 0x531ef movq 0x38(%rbx), %rdi testl %r12d, %r12d je 0x53283 movq (%rdi), %r13 movq 0x8(%rdi), %r12 leaq 0x10(%rdi), %rsi decl %edx shlq $0x4, %rdx callq 0xe790 movl 0x40(%rbx), %edx decl %edx jmp 0x53295 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx testl %r12d, %r12d je 0x5324b xorl %ecx, %ecx callq 0x28814 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d je 0x53317 movl $0x1, (%rsp) movl $0x1, %r8d movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx xorl %ecx, %ecx movq %rbp, %r9 callq 0x5334d testl %eax, %eax jne 0x53317 jmp 0x53263 movl $0x3, %r12d xorl %ebp, %ebp xorl %r13d, %r13d jmp 0x53298 movq %rbp, %rcx callq 0x28814 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d je 0x53317 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx movq %rbp, %rcx movl $0x4000, %r8d # imm = 0x4000 callq 0x2bb79 testl %eax, %eax jns 0x53298 jmp 0x53317 decl %edx movq %rdx, %rax shlq $0x4, %rax movq (%rdi,%rax), %r13 movq 0x8(%rdi,%rax), %r12 movl %edx, 0x40(%rbx) movq %rbp, %rax shrq $0x1f, %rax movl %ebp, %ecx cvtsi2sd %rbp, %xmm0 movq %xmm0, %r8 cmoveq %rcx, %r8 movl $0x7, %r9d cmoveq %rax, %r9 movq %rbx, 0x28(%rsp) movq %r14, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx movl $0x32, %ecx callq 0x289c7 testl %eax, %eax js 0x53317 cmpl $-0x9, %r14d jb 0x53180 movq 0x18(%r15), %rdi movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x2, %eax jl 0x5316a jmp 0x53180 leaq 0x18(%r15), %rbp cmpl $-0x9, %r12d jb 0x5314b movq 0x18(%r15), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x5314b movq %r13, %rsi movq %r12, %rdx callq 0x259d8 jmp 0x5314b
js_array_pop: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12d, r9d mov r15, rdi call JS_ToObject mov rbx, rax mov r14, rdx lea rsi, [rsp+68h+var_48] mov rdi, r15 mov rdx, rax mov rcx, r14 call js_get_length64 test eax, eax jz short loc_53195 add r15, 18h mov rbp, r15 loc_5314B: cmp r14d, 0FFFFFFF7h jb short loc_53177 mov rdi, [rbp+0] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx mov r12d, 6 xor r13d, r13d cmp eax, 1 jg short loc_53180 loc_5316A: mov rsi, rbx mov rdx, r14 call js_free_value_rt jmp short loc_53180 loc_53177: mov r12d, 6 xor r13d, r13d loc_53180: mov rax, r13 mov rdx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_53195: mov rax, [rsp+68h+var_48] test rax, rax jle loc_5323E lea rbp, [rax-1] cmp r14d, 0FFFFFFFFh jnz short loc_531EF cmp word ptr [rbx+6], 2 jnz short loc_531EF test byte ptr [rbx+5], 8 jz short loc_531EF mov edx, [rbx+40h] cmp rax, rdx jnz short loc_531EF mov rdi, [rbx+38h] test r12d, r12d jz loc_53283 mov r13, [rdi] mov r12, [rdi+8] lea rsi, [rdi+10h] dec edx shl rdx, 4 call _memmove mov edx, [rbx+40h] dec edx jmp loc_53295 loc_531EF: mov rdi, r15 mov rsi, rbx mov rdx, r14 test r12d, r12d jz short loc_5324B xor ecx, ecx call JS_GetPropertyInt64 mov r13, rax mov r12, rdx cmp r12d, 6 jz loc_53317 mov dword ptr [rsp+68h+var_68], 1 mov r8d, 1 mov rdi, r15 mov rsi, rbx mov rdx, r14 xor ecx, ecx mov r9, rbp call JS_CopySubArray test eax, eax jnz loc_53317 jmp short loc_53263 loc_5323E: mov r12d, 3 xor ebp, ebp xor r13d, r13d jmp short loc_53298 loc_5324B: mov rcx, rbp call JS_GetPropertyInt64 mov r13, rax mov r12, rdx cmp r12d, 6 jz loc_53317 loc_53263: mov rdi, r15 mov rsi, rbx mov rdx, r14 mov rcx, rbp mov r8d, 4000h call JS_DeletePropertyInt64 test eax, eax jns short loc_53298 jmp loc_53317 loc_53283: dec edx mov rax, rdx shl rax, 4 mov r13, [rdi+rax] mov r12, [rdi+rax+8] loc_53295: mov [rbx+40h], edx loc_53298: mov rax, rbp shr rax, 1Fh mov ecx, ebp cvtsi2sd xmm0, rbp movq r8, xmm0 cmovz r8, rcx mov r9d, 7 cmovz r9, rax mov qword ptr [rsp+68h+var_40], rbx mov qword ptr [rsp+68h+var_40+8], r14 movups xmm0, [rsp+68h+var_40] movups [rsp+68h+var_68], xmm0 mov [rsp+68h+var_50], 0 mov [rsp+68h+var_58], 4000h mov rdi, r15 mov rsi, rbx mov rdx, r14 mov ecx, 32h ; '2' call JS_SetPropertyInternal2 test eax, eax js short loc_53317 cmp r14d, 0FFFFFFF7h jb loc_53180 mov rdi, [r15+18h] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 2 jl loc_5316A jmp loc_53180 loc_53317: lea rbp, [r15+18h] cmp r12d, 0FFFFFFF7h jb loc_5314B mov rdi, [r15+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg loc_5314B mov rsi, r13 mov rdx, r12 call js_free_value_rt jmp loc_5314B
_QWORD * js_array_pop( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v14; // r12d unsigned long long v16; // rbx long long v17; // rdx long long v18; // r14 long long v19; // r8 long long v20; // r9 double v21; // xmm4_8 double v22; // xmm5_8 long long *v23; // rbp long long v24; // rdi int v25; // eax long long v26; // rcx _QWORD *PropertyInt64; // r13 unsigned long long v29; // rbp long long v30; // rdx long long v31; // rdi long long v32; // r12 long long v33; // rdx long long v34; // rdx double v35; // xmm4_8 double v36; // xmm5_8 long long v37; // rdx double v38; // r8 long long v39; // r9 int v40; // eax long long v41; // rdi int v42; // eax long long v43; // rcx long long v44; // [rsp+20h] [rbp-48h] BYREF __m128 v45; // [rsp+28h] [rbp-40h] v14 = a6; v16 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; if ( (unsigned int)js_get_length64(a1, &v44, v16, v17) ) { v23 = (long long *)(a1 + 24); goto LABEL_3; } if ( v44 <= 0 ) { v32 = 3LL; v29 = 0LL; PropertyInt64 = 0LL; goto LABEL_25; } v29 = v44 - 1; if ( (_DWORD)v18 != -1 || *(_WORD *)(v16 + 6) != 2 || (*(_BYTE *)(v16 + 5) & 8) == 0 || (v30 = *(unsigned int *)(v16 + 64), v44 != v30) ) { if ( v14 ) { PropertyInt64 = (_QWORD *)JS_GetPropertyInt64(a1, v16, v18, 0LL); v32 = v34; if ( (_DWORD)v34 == 6 || (unsigned int)JS_CopySubArray(a1, v16, v18, 0, 1, v29, 1) ) goto LABEL_33; } else { PropertyInt64 = (_QWORD *)JS_GetPropertyInt64(a1, v16, v18, v44 - 1); v32 = v37; if ( (_DWORD)v37 == 6 ) goto LABEL_33; } if ( (int)JS_DeletePropertyInt64(a1, v16, v18, v29, 0x4000, a7, a8, a9, a10, v35, v36, a13, a14) >= 0 ) goto LABEL_25; LABEL_33: v23 = (long long *)(a1 + 24); if ( (unsigned int)v32 >= 0xFFFFFFF7 ) { v41 = *(_QWORD *)(a1 + 24); v42 = *(_DWORD *)PropertyInt64; v43 = (unsigned int)(*(_DWORD *)PropertyInt64 - 1); *(_DWORD *)PropertyInt64 = v43; if ( v42 <= 1 ) js_free_value_rt(v41, PropertyInt64, v32, v43, v19, v20); } LABEL_3: if ( (unsigned int)v18 < 0xFFFFFFF7 ) return 0LL; v24 = *v23; v25 = *(_DWORD *)v16; v26 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v26; PropertyInt64 = 0LL; if ( v25 <= 1 ) goto LABEL_5; return PropertyInt64; } v31 = *(_QWORD *)(v16 + 56); if ( v14 ) { PropertyInt64 = *(_QWORD **)v31; v32 = *(_QWORD *)(v31 + 8); memmove(v31, v31 + 16, 16LL * (unsigned int)(v30 - 1)); LODWORD(v33) = *(_DWORD *)(v16 + 64) - 1; } else { v33 = (unsigned int)(v30 - 1); PropertyInt64 = *(_QWORD **)(v31 + 16 * v33); v32 = *(_QWORD *)(v31 + 16 * v33 + 8); } *(_DWORD *)(v16 + 64) = v33; LABEL_25: v38 = (double)(int)v29; if ( !(v29 >> 31) ) *(_QWORD *)&v38 = (unsigned int)v29; v39 = 7LL; if ( !(v29 >> 31) ) v39 = v29 >> 31; v45.m128_u64[0] = v16; v45.m128_u64[1] = v18; if ( (int)JS_SetPropertyInternal2( a1, v16, v18, 0x32u, *(long long *)&v38, v39, v45, a8, a9, a10, v21, v22, a13, a14, v16, v18, 0x4000u, 0LL) < 0 ) goto LABEL_33; if ( (unsigned int)v18 >= 0xFFFFFFF7 ) { v24 = *(_QWORD *)(a1 + 24); v40 = *(_DWORD *)v16; v26 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v26; if ( v40 < 2 ) LABEL_5: js_free_value_rt(v24, (_QWORD *)v16, v18, v26, v19, v20); } return PropertyInt64; }
js_array_pop: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12D,R9D MOV R15,RDI CALL 0x0012b520 MOV RBX,RAX MOV R14,RDX LEA RSI,[RSP + 0x20] MOV RDI,R15 MOV RDX,RAX MOV RCX,R14 CALL 0x00127327 TEST EAX,EAX JZ 0x00153195 ADD R15,0x18 MOV RBP,R15 LAB_0015314b: CMP R14D,-0x9 JC 0x00153177 MOV RDI,qword ptr [RBP] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX MOV R12D,0x6 XOR R13D,R13D CMP EAX,0x1 JG 0x00153180 LAB_0015316a: MOV RSI,RBX MOV RDX,R14 CALL 0x001259d8 JMP 0x00153180 LAB_00153177: MOV R12D,0x6 XOR R13D,R13D LAB_00153180: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00153195: MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JLE 0x0015323e LEA RBP,[RAX + -0x1] CMP R14D,-0x1 JNZ 0x001531ef CMP word ptr [RBX + 0x6],0x2 JNZ 0x001531ef TEST byte ptr [RBX + 0x5],0x8 JZ 0x001531ef MOV EDX,dword ptr [RBX + 0x40] CMP RAX,RDX JNZ 0x001531ef MOV RDI,qword ptr [RBX + 0x38] TEST R12D,R12D JZ 0x00153283 MOV R13,qword ptr [RDI] MOV R12,qword ptr [RDI + 0x8] LEA RSI,[RDI + 0x10] DEC EDX SHL RDX,0x4 CALL 0x0010e790 MOV EDX,dword ptr [RBX + 0x40] DEC EDX JMP 0x00153295 LAB_001531ef: MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 TEST R12D,R12D JZ 0x0015324b XOR ECX,ECX CALL 0x00128814 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00153317 MOV dword ptr [RSP],0x1 MOV R8D,0x1 MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 XOR ECX,ECX MOV R9,RBP CALL 0x0015334d TEST EAX,EAX JNZ 0x00153317 JMP 0x00153263 LAB_0015323e: MOV R12D,0x3 XOR EBP,EBP XOR R13D,R13D JMP 0x00153298 LAB_0015324b: MOV RCX,RBP CALL 0x00128814 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00153317 LAB_00153263: MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 MOV RCX,RBP MOV R8D,0x4000 CALL 0x0012bb79 TEST EAX,EAX JNS 0x00153298 JMP 0x00153317 LAB_00153283: DEC EDX MOV RAX,RDX SHL RAX,0x4 MOV R13,qword ptr [RDI + RAX*0x1] MOV R12,qword ptr [RDI + RAX*0x1 + 0x8] LAB_00153295: MOV dword ptr [RBX + 0x40],EDX LAB_00153298: MOV RAX,RBP SHR RAX,0x1f MOV ECX,EBP CVTSI2SD XMM0,RBP MOVQ R8,XMM0 CMOVZ R8,RCX MOV R9D,0x7 CMOVZ R9,RAX MOV qword ptr [RSP + 0x28],RBX MOV qword ptr [RSP + 0x30],R14 MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x10],0x4000 MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 MOV ECX,0x32 CALL 0x001289c7 TEST EAX,EAX JS 0x00153317 CMP R14D,-0x9 JC 0x00153180 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x2 JL 0x0015316a JMP 0x00153180 LAB_00153317: LEA RBP,[R15 + 0x18] CMP R12D,-0x9 JC 0x0015314b MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x0015314b MOV RSI,R13 MOV RDX,R12 CALL 0x001259d8 JMP 0x0015314b
int1 [16] js_array_pop(long param_1) { int8 *__dest; bool bVar1; int iVar2; int *piVar3; uint uVar4; int8 uVar5; ulong uVar6; double dVar7; int in_R9D; int8 uVar8; int8 uVar9; int *piVar10; uint uVar11; int1 auVar12 [16]; int1 auVar13 [16]; ulong local_48; int1 local_40 [16]; auVar12 = JS_ToObject(); uVar5 = auVar12._8_8_; piVar3 = auVar12._0_8_; iVar2 = js_get_length64(param_1,&local_48,piVar3,uVar5); uVar11 = auVar12._8_4_; if (iVar2 == 0) { if ((long)local_48 < 1) { uVar6 = 0; auVar13 = ZEXT816(3) << 0x40; LAB_00153298: bVar1 = uVar6 >> 0x1f == 0; dVar7 = (double)(long)uVar6; if (bVar1) { dVar7 = (double)(uVar6 & 0xffffffff); } uVar8 = 7; if (bVar1) { uVar8 = 0; } local_40._0_4_ = auVar12._0_4_; iVar2 = JS_SetPropertyInternal2 (param_1,piVar3,uVar5,0x32,dVar7,uVar8,local_40._0_4_,uVar11,0x4000,0); local_40 = auVar12; if (-1 < iVar2) { if (uVar11 < 0xfffffff7) { return auVar13; } uVar8 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar3; *piVar3 = iVar2 + -1; auVar12 = auVar13; goto joined_r0x0015330c; } } else { uVar6 = local_48 - 1; if ((((uVar11 == 0xffffffff) && (*(short *)((long)piVar3 + 6) == 2)) && ((*(byte *)((long)piVar3 + 5) & 8) != 0)) && (uVar4 = piVar3[0x10], local_48 == uVar4)) { __dest = *(int8 **)(piVar3 + 0xe); if (in_R9D == 0) { uVar4 = uVar4 - 1; uVar8 = __dest[(ulong)uVar4 * 2]; uVar9 = __dest[(ulong)uVar4 * 2 + 1]; } else { uVar8 = *__dest; uVar9 = __dest[1]; memmove(__dest,__dest + 2,(ulong)(uVar4 - 1) << 4); uVar4 = piVar3[0x10] - 1; } auVar13._8_8_ = uVar9; auVar13._0_8_ = uVar8; piVar3[0x10] = uVar4; goto LAB_00153298; } if (in_R9D == 0) { auVar13 = JS_GetPropertyInt64(param_1,piVar3,uVar5,uVar6); if (auVar13._8_4_ != 6) { LAB_00153263: iVar2 = JS_DeletePropertyInt64(param_1,piVar3,uVar5,uVar6,0x4000); if (-1 < iVar2) goto LAB_00153298; } } else { auVar13 = JS_GetPropertyInt64(param_1,piVar3,uVar5,0); if (auVar13._8_4_ != 6) { iVar2 = JS_CopySubArray(param_1,piVar3,uVar5,0,1,uVar6,1); if (iVar2 == 0) goto LAB_00153263; } } } piVar10 = auVar13._0_8_; if (0xfffffff6 < auVar13._8_4_) { uVar8 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar10; *piVar10 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar8,piVar10,auVar13._8_8_); } } } if (uVar11 < 0xfffffff7) { return ZEXT816(6) << 0x40; } uVar8 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar3; *piVar3 = iVar2 + -1; auVar12 = ZEXT816(6) << 0x40; auVar13 = ZEXT816(6) << 0x40; joined_r0x0015330c: if (iVar2 < 2) { js_free_value_rt(uVar8,piVar3,uVar5); auVar12 = auVar13; } return auVar12; }
163
sound::play_ui(char const*, bool, float)
untodesu[P]voxelius/game/client/sound.cc
void sound::play_ui(const char *sound, bool looping, float pitch) { if(sound) sound::play_ui(resource::load<SoundEffect>(sound), looping, pitch); else sound::play_ui(static_cast<const char *>(nullptr), looping, pitch); }
O1
cpp
sound::play_ui(char const*, bool, float): pushq %r14 pushq %rbx subq $0x18, %rsp movss %xmm0, 0x4(%rsp) movl %esi, %ebx movq %rdi, %rsi movl $0x0, %edi testq %rsi, %rsi je 0x6e361 leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %edx, %edx callq 0x6c200 movzbl %bl, %esi movq %r14, %rdi movss 0x4(%rsp), %xmm0 callq 0x6e3bf movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x6e39d callq 0x2f77a addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x6e3b7 callq 0x2f77a movq %rbx, %rdi callq 0x26fe0
_ZN5sound7play_uiEPKcbf: push r14 push rbx sub rsp, 18h movss [rsp+28h+var_24], xmm0 mov ebx, esi loc_6E361: mov rsi, rdi mov edi, 0 test rsi, rsi jz short loc_6E361 lea r14, [rsp+28h+var_20] mov rdi, r14 xor edx, edx call _ZN8resource4loadI11SoundEffectEESt10shared_ptrIKT_EPKcj; resource::load<SoundEffect>(char const*,uint) movzx esi, bl mov rdi, r14 movss xmm0, [rsp+28h+var_24] call _ZN5sound7play_uiESt10shared_ptrIK11SoundEffectEbf; sound::play_ui(std::shared_ptr<SoundEffect const>,bool,float) mov rdi, [rsp+28h+var_18] test rdi, rdi jz short loc_6E39D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6E39D: add rsp, 18h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_6E3B7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6E3B7: mov rdi, rbx call __Unwind_Resume
long long sound::play_ui(sound *this, const char *a2, float a3) { unsigned __int8 v3; // bl sound *v4; // rsi long long result; // rax long long v6; // [rsp+8h] [rbp-20h] BYREF volatile signed __int32 *v7; // [rsp+10h] [rbp-18h] v3 = (unsigned __int8)a2; do { v4 = this; this = 0LL; } while ( !v4 ); resource::load<SoundEffect>(&v6, (long long)v4); result = sound::play_ui(&v6, v3, a3); if ( v7 ) return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); return result; }
play_ui: PUSH R14 PUSH RBX SUB RSP,0x18 MOVSS dword ptr [RSP + 0x4],XMM0 MOV EBX,ESI LAB_0016e361: MOV RSI,RDI MOV EDI,0x0 TEST RSI,RSI JZ 0x0016e361 LEA R14,[RSP + 0x8] MOV RDI,R14 XOR EDX,EDX CALL 0x0016c200 LAB_0016e37d: MOVZX ESI,BL MOV RDI,R14 MOVSS XMM0,dword ptr [RSP + 0x4] CALL 0x0016e3bf LAB_0016e38e: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0016e39d CALL 0x0012f77a LAB_0016e39d: ADD RSP,0x18 POP RBX POP R14 RET
/* sound::play_ui(char const*, bool, float) */ void sound::play_ui(char *param_1,bool param_2,float param_3) { char *pcVar1; char local_20 [8]; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18; do { pcVar1 = param_1; param_1 = (char *)0x0; } while (pcVar1 == (char *)0x0); resource::load<SoundEffect>(local_20,(uint)pcVar1); /* try { // try from 0016e37d to 0016e38d has its CatchHandler @ 0016e3a5 */ play_ui(param_3,local_20,param_2); if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18); } return; }
164
sound::play_ui(char const*, bool, float)
untodesu[P]voxelius/game/client/sound.cc
void sound::play_ui(const char *sound, bool looping, float pitch) { if(sound) sound::play_ui(resource::load<SoundEffect>(sound), looping, pitch); else sound::play_ui(static_cast<const char *>(nullptr), looping, pitch); }
O3
cpp
sound::play_ui(char const*, bool, float): pushq %r14 pushq %rbx subq $0x18, %rsp movss %xmm0, 0x4(%rsp) movl %esi, %ebx movq %rdi, %rsi movl $0x0, %edi testq %rsi, %rsi je 0x6eda5 leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %edx, %edx callq 0x6cb84 movzbl %bl, %esi movq %r14, %rdi movss 0x4(%rsp), %xmm0 callq 0x6ee03 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x6ede1 callq 0x2f116 addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x6edfb callq 0x2f116 movq %rbx, %rdi callq 0x26ff0
_ZN5sound7play_uiEPKcbf: push r14 push rbx sub rsp, 18h movss [rsp+28h+var_24], xmm0 mov ebx, esi loc_6EDA5: mov rsi, rdi mov edi, 0 test rsi, rsi jz short loc_6EDA5 lea r14, [rsp+28h+var_20] mov rdi, r14 xor edx, edx call _ZN8resource4loadI11SoundEffectEESt10shared_ptrIKT_EPKcj; resource::load<SoundEffect>(char const*,uint) movzx esi, bl mov rdi, r14 movss xmm0, [rsp+28h+var_24] call _ZN5sound7play_uiESt10shared_ptrIK11SoundEffectEbf; sound::play_ui(std::shared_ptr<SoundEffect const>,bool,float) mov rdi, [rsp+28h+var_18] test rdi, rdi jz short loc_6EDE1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6EDE1: add rsp, 18h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_6EDFB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6EDFB: mov rdi, rbx call __Unwind_Resume
long long sound::play_ui(sound *this, const char *a2, float a3) { unsigned __int8 v3; // bl sound *v4; // rsi long long result; // rax long long v6; // [rsp+8h] [rbp-20h] BYREF volatile signed __int32 *v7; // [rsp+10h] [rbp-18h] v3 = (unsigned __int8)a2; do { v4 = this; this = 0LL; } while ( !v4 ); resource::load<SoundEffect>(&v6, (long long)v4); result = sound::play_ui(&v6, v3, a3); if ( v7 ) return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); return result; }
play_ui: PUSH R14 PUSH RBX SUB RSP,0x18 MOVSS dword ptr [RSP + 0x4],XMM0 MOV EBX,ESI LAB_0016eda5: MOV RSI,RDI MOV EDI,0x0 TEST RSI,RSI JZ 0x0016eda5 LEA R14,[RSP + 0x8] MOV RDI,R14 XOR EDX,EDX CALL 0x0016cb84 LAB_0016edc1: MOVZX ESI,BL MOV RDI,R14 MOVSS XMM0,dword ptr [RSP + 0x4] CALL 0x0016ee03 LAB_0016edd2: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0016ede1 CALL 0x0012f116 LAB_0016ede1: ADD RSP,0x18 POP RBX POP R14 RET
/* sound::play_ui(char const*, bool, float) */ void sound::play_ui(char *param_1,bool param_2,float param_3) { char *pcVar1; char local_20 [8]; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18; do { pcVar1 = param_1; param_1 = (char *)0x0; } while (pcVar1 == (char *)0x0); resource::load<SoundEffect>(local_20,(uint)pcVar1); /* try { // try from 0016edc1 to 0016edd1 has its CatchHandler @ 0016ede9 */ play_ui(param_3,local_20,param_2); if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18); } return; }
165
uf_space_endspace
eloqsql/storage/maria/ma_packrec.c
static void uf_space_endspace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill(to, (end-to), ' '); else { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill(end - spaces, spaces, ' '); } }
O0
c
uf_space_endspace: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x480e7 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x4810b jmp 0x48129 movq -0x10(%rbp), %rdi callq 0x47720 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x48129 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x29280 jmp 0x481f4 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x24(%rcx), %eax jb 0x4816c movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %ecx movl %ecx, %edx leaq 0x275eec(%rip), %rcx # 0x2be050 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0x4817f movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %esi callq 0x46ed0 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0x481a1 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0x481f4 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0x481d4 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d xorl %eax, %eax subq %r8, %rax addq %rax, %rcx callq 0x47a60 movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x29280 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
uf_space_endspace: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_480E7 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_4810B jmp short loc_48129 loc_480E7: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_48129 loc_4810B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_481F4 loc_48129: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+24h] jb short loc_4816C mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+24h] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+24h] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_4817F loc_4816C: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+24h] call fill_and_get_bits mov [rbp+var_28], eax loc_4817F: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_481A1 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_481F4 loc_481A1: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_481D4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax xor eax, eax sub rax, r8 add rcx, rax call decode_bytes loc_481D4: mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset loc_481F4: add rsp, 30h pop rbp retn
long long uf_space_endspace(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax unsigned int v7; // eax int v8; // ecx unsigned int bits; // [rsp+8h] [rbp-28h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 32LL, a4 - a3); } fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36)); } else { v7 = *a2; v8 = a2[1] - *(_DWORD *)(a1 + 36); a2[1] = v8; bits = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v8); } if ( &a3[bits] <= a4 ) { if ( &a3[bits] != a4 ) decode_bytes(a1, (long long)a2, a3, &a4[-bits]); return memset(&a4[-bits], 32LL, bits); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_endspace: 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] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001480e7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0014810b JMP 0x00148129 LAB_001480e7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00147720 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x00148129 LAB_0014810b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x00129280 JMP 0x001481f4 LAB_00148129: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x24] JC 0x0014816c MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x24] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x24] MOV EDX,ECX LEA RCX,[0x3be050] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x0014817f LAB_0014816c: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x24] CALL 0x00146ed0 MOV dword ptr [RBP + -0x28],EAX LAB_0014817f: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001481a1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001481f4 LAB_001481a1: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001481d4 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX XOR EAX,EAX SUB RAX,R8 ADD RCX,RAX CALL 0x00147a60 LAB_001481d4: MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x00129280 LAB_001481f4: ADD RSP,0x30 POP RBP RET
void uf_space_endspace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] < *(uint *)(param_1 + 0x24)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x24); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,param_3,param_4 - local_30); } memset((void *)(param_4 - local_30),0x20,(ulong)local_30); } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
166
nglog::(anonymous namespace)::LogFileObject::Flush()
ng-log[P]ng-log/src/logging.cc
void LogFileObject::Flush() { std::lock_guard<std::mutex> l{mutex_}; FlushUnlocked(std::chrono::system_clock::now()); }
O3
cpp
nglog::(anonymous namespace)::LogFileObject::Flush(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x7820 testl %eax, %eax jne 0xf504 callq 0x7070 movq %rax, %r15 movq 0x98(%r14), %rdi testq %rdi, %rdi je 0xf4dc callq 0x7640 movl $0x0, 0xa4(%r14) leaq 0x204f5(%rip), %rax # 0x2f9d8 movslq (%rax), %rax imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00 addq %r15, %rax movq %rax, 0xb8(%r14) movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x73e0 movl %eax, %edi callq 0x7350 nop
_ZN5nglog12_GLOBAL__N_113LogFileObject5FlushEv: push r15 push r14 push rbx mov r14, rdi lea rbx, [rdi+8] mov rdi, rbx; this call _pthread_mutex_lock test eax, eax jnz short loc_F504 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov r15, rax mov rdi, [r14+98h] test rdi, rdi jz short loc_F4DC call _fflush mov dword ptr [r14+0A4h], 0 loc_F4DC: lea rax, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs movsxd rax, dword ptr [rax] imul rax, 3B9ACA00h add rax, r15 mov [r14+0B8h], rax mov rdi, rbx pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock loc_F504: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long nglog::`anonymous namespace'::LogFileObject::Flush( nglog::_anonymous_namespace_::LogFileObject *this) { char *v2; // rbx std::chrono::_V2::system_clock *v3; // rdi int v4; // eax long long v5; // r15 v2 = (char *)this + 8; v3 = (nglog::_anonymous_namespace_::LogFileObject *)((char *)this + 8); v4 = pthread_mutex_lock(v3); if ( v4 ) std::__throw_system_error(v4); v5 = std::chrono::_V2::system_clock::now(v3); if ( *((_QWORD *)this + 19) ) { fflush(); *((_DWORD *)this + 41) = 0; } *((_QWORD *)this + 23) = v5 + 1000000000LL * fLI::FLAGS_logbufsecs; return pthread_mutex_unlock(v2); }
Flush: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV RDI,RBX CALL 0x00107820 TEST EAX,EAX JNZ 0x0010f504 CALL 0x00107070 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x98] TEST RDI,RDI JZ 0x0010f4dc CALL 0x00107640 MOV dword ptr [R14 + 0xa4],0x0 LAB_0010f4dc: LEA RAX,[0x12f9d8] MOVSXD RAX,dword ptr [RAX] IMUL RAX,RAX,0x3b9aca00 ADD RAX,R15 MOV qword ptr [R14 + 0xb8],RAX MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x001073e0 LAB_0010f504: MOV EDI,EAX CALL 0x00107350
/* nglog::(anonymous namespace)::LogFileObject::Flush() */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::Flush(LogFileObject *this) { int iVar1; long lVar2; iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar1 == 0) { lVar2 = std::chrono::_V2::system_clock::now(); if (*(FILE **)(this + 0x98) != (FILE *)0x0) { fflush(*(FILE **)(this + 0x98)); *(int4 *)(this + 0xa4) = 0; } *(long *)(this + 0xb8) = (long)fLI::FLAGS_logbufsecs * 1000000000 + lVar2; pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
167
string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::string string_strip(const std::string & str) { size_t start = 0; size_t end = str.size(); while (start < end && std::isspace(str[start])) { start++; } while (end > start && std::isspace(str[end - 1])) { end--; } return str.substr(start, end - start); }
O2
cpp
string_strip(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 pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rbp movq 0x8(%rsi), %r13 xorl %r15d, %r15d cmpq %r15, %r13 je 0x58147 movsbl (%rbp,%r15), %edi callq 0x240b0 testl %eax, %eax je 0x5814a incq %r15 jmp 0x5812e movq %r13, %r15 cmpq %r13, %r15 movq %r13, %r12 cmovbq %r15, %r12 cmpq %r15, %r13 jbe 0x58171 movsbl -0x1(%rbp,%r13), %edi decq %r13 callq 0x240b0 testl %eax, %eax jne 0x58154 incq %r13 movq %r13, %r12 subq %r15, %r12 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x24970 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov rbp, [rsi] mov r13, [rsi+8] xor r15d, r15d loc_5812E: cmp r13, r15 jz short loc_58147 movsx edi, byte ptr [rbp+r15+0] call _isspace test eax, eax jz short loc_5814A inc r15 jmp short loc_5812E loc_58147: mov r15, r13 loc_5814A: cmp r15, r13 mov r12, r13 cmovb r12, r15 loc_58154: cmp r13, r15 jbe short loc_58171 movsx edi, byte ptr [rbp+r13-1] dec r13 call _isspace test eax, eax jnz short loc_58154 inc r13 mov r12, r13 loc_58171: sub r12, r15 mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_strip(long long a1, long long *a2) { long long v3; // rbp unsigned long long v4; // r13 unsigned long long i; // r15 unsigned long long v6; // r12 long long v7; // rdi v3 = *a2; v4 = a2[1]; for ( i = 0LL; v4 != i; ++i ) { if ( !(unsigned int)isspace((unsigned int)*(char *)(v3 + i)) ) goto LABEL_6; } i = v4; LABEL_6: v6 = v4; if ( i < v4 ) v6 = i; while ( v4 > i ) { v7 = (unsigned int)*(char *)(v3 + v4-- - 1); if ( !(unsigned int)isspace(v7) ) { v6 = v4 + 1; break; } } std::string::substr(a1, a2, i, v6 - i); return a1; }
string_strip: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RBP,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] XOR R15D,R15D LAB_0015812e: CMP R13,R15 JZ 0x00158147 MOVSX EDI,byte ptr [RBP + R15*0x1] CALL 0x001240b0 TEST EAX,EAX JZ 0x0015814a INC R15 JMP 0x0015812e LAB_00158147: MOV R15,R13 LAB_0015814a: CMP R15,R13 MOV R12,R13 CMOVC R12,R15 LAB_00158154: CMP R13,R15 JBE 0x00158171 MOVSX EDI,byte ptr [RBP + R13*0x1 + -0x1] DEC R13 CALL 0x001240b0 TEST EAX,EAX JNZ 0x00158154 INC R13 MOV R12,R13 LAB_00158171: SUB R12,R15 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 CALL 0x00124970 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_strip(std::__cxx11::string const&) */ string * string_strip(string *param_1) { char *pcVar1; long lVar2; int iVar3; long *in_RSI; ulong uVar4; ulong uVar5; ulong uVar6; lVar2 = *in_RSI; uVar4 = in_RSI[1]; uVar5 = 0; while ((uVar6 = uVar4, uVar4 != uVar5 && (iVar3 = isspace((int)*(char *)(lVar2 + uVar5)), uVar6 = uVar5, iVar3 != 0))) { uVar5 = uVar5 + 1; } do { if (uVar4 <= uVar6) break; pcVar1 = (char *)(lVar2 + -1 + uVar4); uVar4 = uVar4 - 1; iVar3 = isspace((int)*pcVar1); } while (iVar3 != 0); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI); return param_1; }
168
ma_bitmap_unlock
eloqsql/storage/maria/ma_bitmap.c
void _ma_bitmap_unlock(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; uint send_signal; DBUG_ENTER("_ma_bitmap_unlock"); if (!share->now_transactional) DBUG_VOID_RETURN; DBUG_ASSERT(bitmap->flush_all_requested > 0 && bitmap->non_flushable == 1); mysql_mutex_lock(&bitmap->bitmap_lock); bitmap->non_flushable= 0; _ma_bitmap_unpin_all(share); send_signal= bitmap->waiting_for_non_flushable; if (!--bitmap->flush_all_requested) send_signal|= bitmap->waiting_for_flush_all_requested; mysql_mutex_unlock(&bitmap->bitmap_lock); if (send_signal) mysql_cond_broadcast(&bitmap->bitmap_cond); DBUG_VOID_RETURN; }
O0
c
ma_bitmap_unlock: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x7e7(%rax) jne 0x4230e jmp 0x42309 jmp 0x42395 jmp 0x42310 jmp 0x42312 movq -0x10(%rbp), %rdi addq $0x88, %rdi leaq 0x10f368(%rip), %rsi # 0x15168c movl $0x279, %edx # imm = 0x279 callq 0x41c50 movq -0x10(%rbp), %rax movl $0x0, 0x38(%rax) movq -0x8(%rbp), %rdi callq 0x423a0 movq -0x10(%rbp), %rax movl 0x3c(%rax), %eax movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rcx movl 0x30(%rcx), %eax addl $-0x1, %eax movl %eax, 0x30(%rcx) cmpl $0x0, %eax jne 0x4236b movq -0x10(%rbp), %rax movl 0x34(%rax), %eax orl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rdi addq $0x88, %rdi callq 0x41f00 cmpl $0x0, -0x14(%rbp) je 0x42391 movq -0x10(%rbp), %rdi addq $0xd0, %rdi callq 0x421b0 jmp 0x42393 jmp 0x42395 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_bitmap_unlock: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] add rax, 0A10h mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp byte ptr [rax+7E7h], 0 jnz short loc_4230E jmp short $+2 loc_42309: jmp loc_42395 loc_4230E: jmp short $+2 loc_42310: jmp short $+2 loc_42312: mov rdi, [rbp+var_10] add rdi, 88h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 279h call inline_mysql_mutex_lock_4 mov rax, [rbp+var_10] mov dword ptr [rax+38h], 0 mov rdi, [rbp+var_8] call _ma_bitmap_unpin_all mov rax, [rbp+var_10] mov eax, [rax+3Ch] mov [rbp+var_14], eax mov rcx, [rbp+var_10] mov eax, [rcx+30h] add eax, 0FFFFFFFFh mov [rcx+30h], eax cmp eax, 0 jnz short loc_4236B mov rax, [rbp+var_10] mov eax, [rax+34h] or eax, [rbp+var_14] mov [rbp+var_14], eax loc_4236B: mov rdi, [rbp+var_10] add rdi, 88h call inline_mysql_mutex_unlock_4 cmp [rbp+var_14], 0 jz short loc_42391 mov rdi, [rbp+var_10] add rdi, 0D0h call inline_mysql_cond_broadcast loc_42391: jmp short $+2 loc_42393: jmp short $+2 loc_42395: add rsp, 20h pop rbp retn
long long ma_bitmap_unlock(long long a1) { long long result; // rax int v2; // eax int v3; // [rsp+Ch] [rbp-14h] result = a1; if ( *(_BYTE *)(a1 + 2023) ) { inline_mysql_mutex_lock_4( a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x279u); *(_DWORD *)(a1 + 2632) = 0; ma_bitmap_unpin_all(a1); v3 = *(_DWORD *)(a1 + 2636); v2 = *(_DWORD *)(a1 + 2624) - 1; *(_DWORD *)(a1 + 2624) = v2; if ( !v2 ) v3 |= *(_DWORD *)(a1 + 2628); result = inline_mysql_mutex_unlock_4(a1 + 2712); if ( v3 ) return inline_mysql_cond_broadcast(a1 + 2784); } return result; }
_ma_bitmap_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0xa10 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e7],0x0 JNZ 0x0014230e JMP 0x00142309 LAB_00142309: JMP 0x00142395 LAB_0014230e: JMP 0x00142310 LAB_00142310: JMP 0x00142312 LAB_00142312: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x88 LEA RSI,[0x25168c] MOV EDX,0x279 CALL 0x00141c50 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x38],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001423a0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x3c] MOV dword ptr [RBP + -0x14],EAX MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x30] ADD EAX,-0x1 MOV dword ptr [RCX + 0x30],EAX CMP EAX,0x0 JNZ 0x0014236b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x34] OR EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX LAB_0014236b: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x88 CALL 0x00141f00 CMP dword ptr [RBP + -0x14],0x0 JZ 0x00142391 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xd0 CALL 0x001421b0 LAB_00142391: JMP 0x00142393 LAB_00142393: JMP 0x00142395 LAB_00142395: ADD RSP,0x20 POP RBP RET
void _ma_bitmap_unlock(long param_1) { int iVar1; uint local_1c; if (*(char *)(param_1 + 0x7e7) != '\0') { inline_mysql_mutex_lock (param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x279); *(int4 *)(param_1 + 0xa48) = 0; _ma_bitmap_unpin_all(param_1); local_1c = *(uint *)(param_1 + 0xa4c); iVar1 = *(int *)(param_1 + 0xa40) + -1; *(int *)(param_1 + 0xa40) = iVar1; if (iVar1 == 0) { local_1c = *(uint *)(param_1 + 0xa44) | local_1c; } inline_mysql_mutex_unlock(param_1 + 0xa98); if (local_1c != 0) { inline_mysql_cond_broadcast(param_1 + 0xae0); } } return; }
169
PVG_FT_Outline_Check
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-raster.c
PVG_FT_Error PVG_FT_Outline_Check(PVG_FT_Outline* outline) { if (outline) { PVG_FT_Int n_points = outline->n_points; PVG_FT_Int n_contours = outline->n_contours; PVG_FT_Int end0, end; PVG_FT_Int n; /* empty glyph? */ if (n_points == 0 && n_contours == 0) return 0; /* check point and contour counts */ if (n_points <= 0 || n_contours <= 0) goto Bad; end0 = end = -1; for (n = 0; n < n_contours; n++) { end = outline->contours[n]; /* note that we don't accept empty contours */ if (end <= end0 || end >= n_points) goto Bad; end0 = end; } if (end != n_points - 1) goto Bad; /* XXX: check the tags array */ return 0; } Bad: return ErrRaster_Invalid_Outline; }
O3
c
PVG_FT_Outline_Check: testq %rdi, %rdi je 0x3b3b9 movl (%rdi), %ecx movl 0x4(%rdi), %eax movl %eax, %edx orl %ecx, %edx jne 0x3b3a7 xorl %eax, %eax retq movl %ecx, %ecx testl %eax, %eax setle %dl testl %ecx, %ecx setle %sil orb %dl, %sil je 0x3b3bf movl $0xffffffff, %eax # imm = 0xFFFFFFFF retq movq 0x18(%rdi), %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %edi, %edi movl %edx, %r8d movl (%rsi,%rdi,4), %edx cmpl %r8d, %edx jle 0x3b3b9 cmpl %eax, %edx jge 0x3b3b9 incq %rdi cmpq %rdi, %rcx jne 0x3b3ca decl %eax cmpl %eax, %edx je 0x3b3a4 jmp 0x3b3b9
PVG_FT_Outline_Check: test rdi, rdi jz short loc_3B3B9 mov ecx, [rdi] mov eax, [rdi+4] mov edx, eax or edx, ecx jnz short loc_3B3A7 loc_3B3A4: xor eax, eax retn loc_3B3A7: mov ecx, ecx test eax, eax setle dl test ecx, ecx setle sil or sil, dl jz short loc_3B3BF loc_3B3B9: mov eax, 0FFFFFFFFh retn loc_3B3BF: mov rsi, [rdi+18h] mov edx, 0FFFFFFFFh xor edi, edi loc_3B3CA: mov r8d, edx mov edx, [rsi+rdi*4] cmp edx, r8d jle short loc_3B3B9 cmp edx, eax jge short loc_3B3B9 inc rdi cmp rcx, rdi jnz short loc_3B3CA dec eax cmp edx, eax jz short loc_3B3A4 jmp short loc_3B3B9
long long PVG_FT_Outline_Check(int *a1) { int v1; // ecx int v2; // eax long long v4; // rsi int v5; // edx long long v6; // rdi int v7; // r8d if ( a1 ) { v1 = *a1; v2 = a1[1]; if ( !*(_QWORD *)a1 ) return 0LL; if ( v2 > 0 && v1 > 0 ) { v4 = *((_QWORD *)a1 + 3); v5 = -1; v6 = 0LL; while ( 1 ) { v7 = v5; v5 = *(_DWORD *)(v4 + 4 * v6); if ( v5 <= v7 || v5 >= v2 ) break; if ( v1 == ++v6 ) { if ( v5 == v2 - 1 ) return 0LL; return 0xFFFFFFFFLL; } } } } return 0xFFFFFFFFLL; }
PVG_FT_Outline_Check: TEST RDI,RDI JZ 0x0013b3b9 MOV ECX,dword ptr [RDI] MOV EAX,dword ptr [RDI + 0x4] MOV EDX,EAX OR EDX,ECX JNZ 0x0013b3a7 LAB_0013b3a4: XOR EAX,EAX RET LAB_0013b3a7: MOV ECX,ECX TEST EAX,EAX SETLE DL TEST ECX,ECX SETLE SIL OR SIL,DL JZ 0x0013b3bf LAB_0013b3b9: MOV EAX,0xffffffff RET LAB_0013b3bf: MOV RSI,qword ptr [RDI + 0x18] MOV EDX,0xffffffff XOR EDI,EDI LAB_0013b3ca: MOV R8D,EDX MOV EDX,dword ptr [RSI + RDI*0x4] CMP EDX,R8D JLE 0x0013b3b9 CMP EDX,EAX JGE 0x0013b3b9 INC RDI CMP RCX,RDI JNZ 0x0013b3ca DEC EAX CMP EDX,EAX JZ 0x0013b3a4 JMP 0x0013b3b9
int8 PVG_FT_Outline_Check(uint *param_1) { uint uVar1; uint uVar2; int iVar3; int iVar4; ulong uVar5; if (param_1 != (uint *)0x0) { uVar1 = *param_1; uVar2 = param_1[1]; if (uVar2 == 0 && uVar1 == 0) { return 0; } if (0 < (int)uVar1 && 0 < (int)uVar2) { uVar5 = 0; iVar4 = -1; do { iVar3 = *(int *)(*(long *)(param_1 + 6) + uVar5 * 4); if (iVar3 <= iVar4) { return 0xffffffff; } if ((int)uVar2 <= iVar3) { return 0xffffffff; } uVar5 = uVar5 + 1; iVar4 = iVar3; } while (uVar1 != uVar5); if (iVar3 == uVar2 - 1) { return 0; } } } return 0xffffffff; }
170
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::vector<llama_token> common_tokenize( const struct llama_vocab * vocab, const std::string & text, bool add_special, bool parse_special) { // upper limit for the number of tokens int n_tokens = text.length() + 2 * add_special; std::vector<llama_token> result(n_tokens); n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special); if (n_tokens < 0) { result.resize(-n_tokens); int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special); GGML_ASSERT(check == -n_tokens); } else { result.resize(n_tokens); } return result; }
O1
cpp
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx leal (%r14,%r14), %eax addl 0x8(%rdx), %eax movslq %eax, %rsi leaq 0x17(%rsp), %rdx callq 0x555c4 movq (%r12), %rsi movl 0x8(%r12), %edx movq (%rbx), %rcx movq 0x8(%rbx), %r8 subq %rcx, %r8 shrq $0x2, %r8 movl %ebp, (%rsp) movq %r15, %rdi movl %r14d, %r9d callq 0x19e90 movl %eax, %r13d testl %eax, %eax js 0x51d50 movl %r13d, %esi movq %rbx, %rdi callq 0x4b73a jmp 0x51d8d negl %r13d movq %rbx, %rdi movq %r13, %rsi callq 0x4b73a movq (%r12), %rsi movl 0x8(%r12), %edx movq (%rbx), %rcx movq 0x8(%rbx), %r8 subq %rcx, %r8 shrq $0x2, %r8 movzbl %bpl, %eax movl %eax, (%rsp) movzbl %r14b, %r9d movq %r15, %rdi callq 0x19e90 cmpl %r13d, %eax jne 0x51d9f movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x64e7f(%rip), %rdi # 0xb6c25 leaq 0x624a4(%rip), %rdx # 0xb4251 leaq 0x654a7(%rip), %rcx # 0xb725b movl $0x6b8, %esi # imm = 0x6B8 xorl %eax, %eax callq 0x19d20 jmp 0x51dc2 movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x51dd9 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0x197a0 movq %r14, %rdi callq 0x19e00
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, r8d mov r14d, ecx mov r12, rdx mov r15, rsi mov rbx, rdi lea eax, [r14+r14] add eax, [rdx+8] movsxd rsi, eax lea rdx, [rsp+48h+var_31] call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) mov rsi, [r12] mov edx, [r12+8] mov rcx, [rbx] mov r8, [rbx+8] sub r8, rcx shr r8, 2 mov [rsp+48h+var_48], ebp mov rdi, r15 mov r9d, r14d call _llama_tokenize mov r13d, eax test eax, eax js short loc_51D50 mov esi, r13d mov rdi, rbx call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) jmp short loc_51D8D loc_51D50: neg r13d mov rdi, rbx mov rsi, r13 call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rsi, [r12] mov edx, [r12+8] mov rcx, [rbx] mov r8, [rbx+8] sub r8, rcx shr r8, 2 movzx eax, bpl mov [rsp+48h+var_48], eax movzx r9d, r14b mov rdi, r15 call _llama_tokenize cmp eax, r13d jnz short loc_51D9F loc_51D8D: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_51D9F: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCheckNTokens; "check == -n_tokens" mov esi, 6B8h xor eax, eax call _ggml_abort jmp short $+2 loc_51DC2: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_51DD9 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_51DD9: mov rdi, r14 call __Unwind_Resume
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4) { int v6; // eax int v7; // r13d long long v9; // r14 _BYTE v10[49]; // [rsp+17h] [rbp-31h] BYREF std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v10); v6 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4); if ( v6 < 0 ) { v7 = -v6; std::vector<int>::resize(a1, (unsigned int)-v6); if ( (unsigned int)llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, (unsigned __int8)a4) != v7 ) { v9 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 1720LL, "GGML_ASSERT(%s) failed", "check == -n_tokens"); if ( *a1 ) operator delete((void *)*a1, a1[2] - *a1); _Unwind_Resume(v9); } } else { std::vector<int>::resize(a1, (unsigned int)v6); } return a1; }
common_tokenize: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,R8D MOV R14D,ECX MOV R12,RDX MOV R15,RSI MOV RBX,RDI LEA EAX,[R14 + R14*0x1] ADD EAX,dword ptr [RDX + 0x8] MOVSXD RSI,EAX LEA RDX,[RSP + 0x17] CALL 0x001555c4 MOV RSI,qword ptr [R12] MOV EDX,dword ptr [R12 + 0x8] MOV RCX,qword ptr [RBX] MOV R8,qword ptr [RBX + 0x8] SUB R8,RCX SHR R8,0x2 LAB_00151d2e: MOV dword ptr [RSP],EBP MOV RDI,R15 MOV R9D,R14D CALL 0x00119e90 MOV R13D,EAX TEST EAX,EAX JS 0x00151d50 MOV ESI,R13D MOV RDI,RBX CALL 0x0014b73a JMP 0x00151d8d LAB_00151d50: NEG R13D MOV RDI,RBX MOV RSI,R13 CALL 0x0014b73a MOV RSI,qword ptr [R12] MOV EDX,dword ptr [R12 + 0x8] MOV RCX,qword ptr [RBX] MOV R8,qword ptr [RBX + 0x8] SUB R8,RCX SHR R8,0x2 LAB_00151d75: MOVZX EAX,BPL MOV dword ptr [RSP],EAX MOVZX R9D,R14B MOV RDI,R15 CALL 0x00119e90 CMP EAX,R13D JNZ 0x00151d9f LAB_00151d8d: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00151d9f: LEA RDI,[0x1b6c25] LEA RDX,[0x1b4251] LEA RCX,[0x1b725b] MOV ESI,0x6b8 XOR EAX,EAX CALL 0x00119d20
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */ llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4) { uint uVar1; uint uVar2; int7 in_register_00000009; int7 in_register_00000011; int8 *puVar3; uint in_R8D; puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3); std::vector<int,std::allocator<int>>::vector ((ulong)param_1, (allocator *) (long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1))); /* try { // try from 00151d2e to 00151d5d has its CatchHandler @ 00151dc2 */ uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1, (ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2, CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D); if ((int)uVar1 < 0) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1); /* try { // try from 00151d75 to 00151dbf has its CatchHandler @ 00151dc0 */ uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1, (ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4, in_R8D & 0xff); if (uVar2 != -uVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8 ,"GGML_ASSERT(%s) failed","check == -n_tokens"); } } else { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1); } return param_1; }
171
CLI::App::exit(CLI::Error const&, std::ostream&, std::ostream&) const
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE int App::exit(const Error &e, std::ostream &out, std::ostream &err) const { /// Avoid printing anything if this is a CLI::RuntimeError if(e.get_name() == "RuntimeError") return e.get_exit_code(); if(e.get_name() == "CallForHelp") { out << help(); return e.get_exit_code(); } if(e.get_name() == "CallForAllHelp") { out << help("", AppFormatMode::All); return e.get_exit_code(); } if(e.get_name() == "CallForVersion") { out << e.what() << std::endl; return e.get_exit_code(); } if(e.get_exit_code() != static_cast<int>(ExitCodes::Success)) { if(failure_message_) err << failure_message_(this, e) << std::flush; } return e.get_exit_code(); }
O0
cpp
CLI::App::exit(CLI::Error const&, std::ostream&, std::ostream&) const: pushq %rbp movq %rsp, %rbp subq $0x1f0, %rsp # imm = 0x1F0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x180(%rbp) movq -0x18(%rbp), %rsi leaq -0x48(%rbp), %rdi movq %rdi, -0x178(%rbp) callq 0x45c40 movq -0x178(%rbp), %rdi leaq 0x5fc4e(%rip), %rsi # 0x6ffb6 callq 0xd920 movb %al, -0x169(%rbp) jmp 0x10375 leaq -0x48(%rbp), %rdi callq 0x9b90 movb -0x169(%rbp), %al testb $0x1, %al jne 0x1038a jmp 0x103b5 movq -0x18(%rbp), %rdi callq 0x45c70 movl %eax, -0x4(%rbp) jmp 0x107dc movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x48(%rbp), %rdi callq 0x9b90 jmp 0x107e8 movq -0x18(%rbp), %rsi leaq -0x78(%rbp), %rdi movq %rdi, -0x190(%rbp) callq 0x45c40 movq -0x190(%rbp), %rdi leaq 0x5f839(%rip), %rsi # 0x6fc10 callq 0xd920 movb %al, -0x181(%rbp) jmp 0x103e4 leaq -0x78(%rbp), %rdi callq 0x9b90 movb -0x181(%rbp), %al testb $0x1, %al jne 0x103fc jmp 0x10509 movq -0x20(%rbp), %rax movq %rax, -0x1a0(%rbp) leaq -0xb9(%rbp), %rdi movq %rdi, -0x198(%rbp) callq 0x9a80 movq -0x198(%rbp), %rdx leaq 0x5fbe6(%rip), %rsi # 0x7000e leaq -0xb8(%rbp), %rdi callq 0xbb20 jmp 0x10436 movq -0x180(%rbp), %rsi leaq -0x98(%rbp), %rdi leaq -0xb8(%rbp), %rdx xorl %ecx, %ecx callq 0x45c90 jmp 0x10454 movq -0x1a0(%rbp), %rdi leaq -0x98(%rbp), %rsi callq 0x9550 jmp 0x10469 leaq -0x98(%rbp), %rdi callq 0x9b90 leaq -0xb8(%rbp), %rdi callq 0x9b90 leaq -0xb9(%rbp), %rdi callq 0x9690 movq -0x18(%rbp), %rdi callq 0x45c70 movl %eax, -0x4(%rbp) jmp 0x107dc movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x78(%rbp), %rdi callq 0x9b90 jmp 0x107e8 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x104f8 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x104ec movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x98(%rbp), %rdi callq 0x9b90 leaq -0xb8(%rbp), %rdi callq 0x9b90 leaq -0xb9(%rbp), %rdi callq 0x9690 jmp 0x107e8 movq -0x18(%rbp), %rsi leaq -0xe0(%rbp), %rdi movq %rdi, -0x1b0(%rbp) callq 0x45c40 movq -0x1b0(%rbp), %rdi leaq 0x5f6d3(%rip), %rsi # 0x6fc01 callq 0xd920 movb %al, -0x1a1(%rbp) jmp 0x1053b leaq -0xe0(%rbp), %rdi callq 0x9b90 movb -0x1a1(%rbp), %al testb $0x1, %al jne 0x10556 jmp 0x10669 movq -0x20(%rbp), %rax movq %rax, -0x1c0(%rbp) leaq -0x121(%rbp), %rdi movq %rdi, -0x1b8(%rbp) callq 0x9a80 movq -0x1b8(%rbp), %rdx leaq 0x5fa8c(%rip), %rsi # 0x7000e leaq -0x120(%rbp), %rdi callq 0xbb20 jmp 0x10590 movq -0x180(%rbp), %rsi leaq -0x100(%rbp), %rdi leaq -0x120(%rbp), %rdx movl $0x1, %ecx callq 0x45c90 jmp 0x105b1 movq -0x1c0(%rbp), %rdi leaq -0x100(%rbp), %rsi callq 0x9550 jmp 0x105c6 leaq -0x100(%rbp), %rdi callq 0x9b90 leaq -0x120(%rbp), %rdi callq 0x9b90 leaq -0x121(%rbp), %rdi callq 0x9690 movq -0x18(%rbp), %rdi callq 0x45c70 movl %eax, -0x4(%rbp) jmp 0x107dc movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0xe0(%rbp), %rdi callq 0x9b90 jmp 0x107e8 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x10658 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x1064c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x100(%rbp), %rdi callq 0x9b90 leaq -0x120(%rbp), %rdi callq 0x9b90 leaq -0x121(%rbp), %rdi callq 0x9690 jmp 0x107e8 movq -0x18(%rbp), %rsi leaq -0x148(%rbp), %rdi movq %rdi, -0x1d0(%rbp) callq 0x45c40 movq -0x1d0(%rbp), %rdi leaq 0x5f935(%rip), %rsi # 0x6ffc3 callq 0xd920 movb %al, -0x1c1(%rbp) jmp 0x1069b leaq -0x148(%rbp), %rdi callq 0x9b90 movb -0x1c1(%rbp), %al testb $0x1, %al jne 0x106b3 jmp 0x10714 movq -0x20(%rbp), %rax movq %rax, -0x1d8(%rbp) movq -0x18(%rbp), %rdi movq (%rdi), %rax callq *0x10(%rax) movq -0x1d8(%rbp), %rdi movq %rax, %rsi callq 0x95e0 movq %rax, %rdi movq 0x91877(%rip), %rsi # 0xa1f58 callq 0x9660 movq -0x18(%rbp), %rdi callq 0x45c70 movl %eax, -0x4(%rbp) jmp 0x107dc movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x148(%rbp), %rdi callq 0x9b90 jmp 0x107e8 movq -0x18(%rbp), %rdi callq 0x45c70 cmpl $0x0, %eax je 0x107d0 movq -0x180(%rbp), %rdi addq $0x158, %rdi # imm = 0x158 callq 0x31bc0 testb $0x1, %al jne 0x10742 jmp 0x107ce movq -0x180(%rbp), %rdx movq -0x28(%rbp), %rax movq %rax, -0x1f0(%rbp) movq %rdx, %rsi addq $0x158, %rsi # imm = 0x158 movq -0x18(%rbp), %rcx leaq -0x168(%rbp), %rdi movq %rdi, -0x1e8(%rbp) callq 0x45ed0 movq -0x1f0(%rbp), %rdi movq -0x1e8(%rbp), %rsi callq 0x9550 movq %rax, -0x1e0(%rbp) jmp 0x10791 movq -0x1e0(%rbp), %rdi movq 0x91809(%rip), %rsi # 0xa1fa8 callq 0x9660 jmp 0x107a6 leaq -0x168(%rbp), %rdi callq 0x9b90 jmp 0x107ce movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x168(%rbp), %rdi callq 0x9b90 jmp 0x107e8 jmp 0x107d0 movq -0x18(%rbp), %rdi callq 0x45c70 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x1f0, %rsp # imm = 0x1F0 popq %rbp retq movq -0x50(%rbp), %rdi callq 0x9a70 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZNK3CLI3App4exitERKNS_5ErrorERSoS4_: push rbp mov rbp, rsp sub rsp, 1F0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov [rbp+var_180], rax mov rsi, [rbp+var_18] lea rdi, [rbp+var_48] mov [rbp+var_178], rdi call _ZNK3CLI5Error8get_nameB5cxx11Ev; CLI::Error::get_name(void) mov rdi, [rbp+var_178] lea rsi, aRuntimeerror; "RuntimeError" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_169], al jmp short $+2 loc_10375: lea rdi, [rbp+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov al, [rbp+var_169] test al, 1 jnz short loc_1038A jmp short loc_103B5 loc_1038A: mov rdi, [rbp+var_18]; this call _ZNK3CLI5Error13get_exit_codeEv; CLI::Error::get_exit_code(void) mov [rbp+var_4], eax jmp loc_107DC mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_107E8 loc_103B5: mov rsi, [rbp+var_18] lea rdi, [rbp+var_78] mov [rbp+var_190], rdi call _ZNK3CLI5Error8get_nameB5cxx11Ev; CLI::Error::get_name(void) mov rdi, [rbp+var_190] lea rsi, aCallforhelp; "CallForHelp" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_181], al jmp short $+2 loc_103E4: lea rdi, [rbp+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov al, [rbp+var_181] test al, 1 jnz short loc_103FC jmp loc_10509 loc_103FC: mov rax, [rbp+var_20] mov [rbp+var_1A0], rax lea rdi, [rbp+var_B9] mov [rbp+var_198], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_198] lea rsi, asc_7000C+2; "" lea rdi, [rbp+var_B8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_10436: mov rsi, [rbp+var_180] lea rdi, [rbp+var_98] lea rdx, [rbp+var_B8] xor ecx, ecx call _ZNK3CLI3App4helpENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13AppFormatModeE; CLI::App::help(std::string,CLI::AppFormatMode) jmp short $+2 loc_10454: mov rdi, [rbp+var_1A0] lea rsi, [rbp+var_98] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_10469: lea rdi, [rbp+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_B9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rbp+var_18]; this call _ZNK3CLI5Error13get_exit_codeEv; CLI::Error::get_exit_code(void) mov [rbp+var_4], eax jmp loc_107DC mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_107E8 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp short loc_104F8 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp short loc_104EC mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_104EC: lea rdi, [rbp+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_104F8: lea rdi, [rbp+var_B9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_107E8 loc_10509: mov rsi, [rbp+var_18] lea rdi, [rbp+var_E0] mov [rbp+var_1B0], rdi call _ZNK3CLI5Error8get_nameB5cxx11Ev; CLI::Error::get_name(void) mov rdi, [rbp+var_1B0] lea rsi, aCallforallhelp; "CallForAllHelp" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_1A1], al jmp short $+2 loc_1053B: lea rdi, [rbp+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov al, [rbp+var_1A1] test al, 1 jnz short loc_10556 jmp loc_10669 loc_10556: mov rax, [rbp+var_20] mov [rbp+var_1C0], rax lea rdi, [rbp+var_121] mov [rbp+var_1B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_1B8] lea rsi, asc_7000C+2; "" lea rdi, [rbp+var_120] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_10590: mov rsi, [rbp+var_180] lea rdi, [rbp+var_100] lea rdx, [rbp+var_120] mov ecx, 1 call _ZNK3CLI3App4helpENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13AppFormatModeE; CLI::App::help(std::string,CLI::AppFormatMode) jmp short $+2 loc_105B1: mov rdi, [rbp+var_1C0] lea rsi, [rbp+var_100] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_105C6: lea rdi, [rbp+var_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_120]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_121] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rbp+var_18]; this call _ZNK3CLI5Error13get_exit_codeEv; CLI::Error::get_exit_code(void) mov [rbp+var_4], eax jmp loc_107DC mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_107E8 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp short loc_10658 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp short loc_1064C mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1064C: lea rdi, [rbp+var_120]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_10658: lea rdi, [rbp+var_121] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_107E8 loc_10669: mov rsi, [rbp+var_18] lea rdi, [rbp+var_148] mov [rbp+var_1D0], rdi call _ZNK3CLI5Error8get_nameB5cxx11Ev; CLI::Error::get_name(void) mov rdi, [rbp+var_1D0] lea rsi, aCallforversion; "CallForVersion" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_1C1], al jmp short $+2 loc_1069B: lea rdi, [rbp+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov al, [rbp+var_1C1] test al, 1 jnz short loc_106B3 jmp short loc_10714 loc_106B3: mov rax, [rbp+var_20] mov [rbp+var_1D8], rax mov rdi, [rbp+var_18] mov rax, [rdi] call qword ptr [rax+10h] mov rdi, [rbp+var_1D8] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) mov rdi, [rbp+var_18]; this call _ZNK3CLI5Error13get_exit_codeEv; CLI::Error::get_exit_code(void) mov [rbp+var_4], eax jmp loc_107DC mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_107E8 loc_10714: mov rdi, [rbp+var_18]; this call _ZNK3CLI5Error13get_exit_codeEv; CLI::Error::get_exit_code(void) cmp eax, 0 jz loc_107D0 mov rdi, [rbp+var_180] add rdi, 158h call _ZNKSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN3CLI3AppERKNS6_5ErrorEEEcvbEv; std::function<std::string ()(CLI::App const*,CLI::Error const&)>::operator bool(void) test al, 1 jnz short loc_10742 jmp loc_107CE loc_10742: mov rdx, [rbp+var_180] mov rax, [rbp+var_28] mov [rbp+var_1F0], rax mov rsi, rdx add rsi, 158h mov rcx, [rbp+var_18] lea rdi, [rbp+var_168] mov [rbp+var_1E8], rdi call _ZNKSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKN3CLI3AppERKNS6_5ErrorEEEclES9_SC_; std::function<std::string ()(CLI::App const*,CLI::Error const&)>::operator()(CLI::App const*,CLI::Error const&) mov rdi, [rbp+var_1F0] mov rsi, [rbp+var_1E8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_1E0], rax jmp short $+2 loc_10791: mov rdi, [rbp+var_1E0] mov rsi, cs:_ZSt5flushIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_107A6: lea rdi, [rbp+var_168]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_107CE mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_168]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_107E8 loc_107CE: jmp short $+2 loc_107D0: mov rdi, [rbp+var_18]; this call _ZNK3CLI5Error13get_exit_codeEv; CLI::Error::get_exit_code(void) mov [rbp+var_4], eax loc_107DC: mov eax, [rbp+var_4] add rsp, 1F0h pop rbp retn loc_107E8: mov rdi, [rbp+var_50] call __Unwind_Resume
long long CLI::App::exit(CLI::App *this, const CLI::Error *a2, std::ostream *a3, std::ostream *a4) { long long v4; // rdx long long v5; // rdx long long v6; // rax long long v7; // rax std::ostream *v9; // [rsp+0h] [rbp-1F0h] long long v10; // [rsp+10h] [rbp-1E0h] std::ostream *v11; // [rsp+18h] [rbp-1D8h] bool v12; // [rsp+2Fh] [rbp-1C1h] std::ostream *v13; // [rsp+30h] [rbp-1C0h] bool v14; // [rsp+4Fh] [rbp-1A1h] std::ostream *v15; // [rsp+50h] [rbp-1A0h] bool v16; // [rsp+6Fh] [rbp-181h] bool v17; // [rsp+87h] [rbp-169h] _BYTE v18[32]; // [rsp+88h] [rbp-168h] BYREF _BYTE v19[39]; // [rsp+A8h] [rbp-148h] BYREF char v20; // [rsp+CFh] [rbp-121h] BYREF _BYTE v21[32]; // [rsp+D0h] [rbp-120h] BYREF _BYTE v22[32]; // [rsp+F0h] [rbp-100h] BYREF _BYTE v23[39]; // [rsp+110h] [rbp-E0h] BYREF char v24; // [rsp+137h] [rbp-B9h] BYREF _BYTE v25[32]; // [rsp+138h] [rbp-B8h] BYREF _BYTE v26[32]; // [rsp+158h] [rbp-98h] BYREF _BYTE v27[36]; // [rsp+178h] [rbp-78h] BYREF _BYTE v28[32]; // [rsp+1A8h] [rbp-48h] BYREF std::ostream *v29; // [rsp+1C8h] [rbp-28h] std::ostream *v30; // [rsp+1D0h] [rbp-20h] CLI::Error *v31; // [rsp+1D8h] [rbp-18h] CLI::App *v32; // [rsp+1E0h] [rbp-10h] v32 = this; v31 = a2; v30 = a3; v29 = a4; CLI::Error::get_name[abi:cxx11](v28, a2); v17 = std::operator==<char>((long long)v28, (long long)"RuntimeError"); std::string::~string(v28); if ( v17 ) { return (unsigned int)CLI::Error::get_exit_code(v31); } else { CLI::Error::get_name[abi:cxx11](v27, v31); v16 = std::operator==<char>((long long)v27, (long long)"CallForHelp"); std::string::~string(v27); if ( v16 ) { v15 = v30; std::allocator<char>::allocator(&v24, "CallForHelp", v4); std::string::basic_string<std::allocator<char>>((long long)v25, (long long)"", (long long)&v24); CLI::App::help(v26, this, v25, 0LL); std::operator<<<char>(v15, v26); std::string::~string(v26); std::string::~string(v25); std::allocator<char>::~allocator(&v24); return (unsigned int)CLI::Error::get_exit_code(v31); } else { CLI::Error::get_name[abi:cxx11](v23, v31); v14 = std::operator==<char>((long long)v23, (long long)"CallForAllHelp"); std::string::~string(v23); if ( v14 ) { v13 = v30; std::allocator<char>::allocator(&v20, "CallForAllHelp", v5); std::string::basic_string<std::allocator<char>>((long long)v21, (long long)"", (long long)&v20); CLI::App::help(v22, this, v21, 1LL); std::operator<<<char>(v13, v22); std::string::~string(v22); std::string::~string(v21); std::allocator<char>::~allocator(&v20); return (unsigned int)CLI::Error::get_exit_code(v31); } else { CLI::Error::get_name[abi:cxx11](v19, v31); v12 = std::operator==<char>((long long)v19, (long long)"CallForVersion"); std::string::~string(v19); if ( v12 ) { v11 = v30; v6 = (*(long long ( **)(CLI::Error *))(*(_QWORD *)v31 + 16LL))(v31); v7 = std::operator<<<std::char_traits<char>>(v11, v6); std::ostream::operator<<(v7, &std::endl<char,std::char_traits<char>>); return (unsigned int)CLI::Error::get_exit_code(v31); } else { if ( (unsigned int)CLI::Error::get_exit_code(v31) && (std::function<std::string ()(CLI::App const*,CLI::Error const&)>::operator bool((char *)this + 344) & 1) != 0 ) { v9 = v29; std::function<std::string ()(CLI::App const*,CLI::Error const&)>::operator()( v18, (char *)this + 344, this, v31); v10 = std::operator<<<char>(v9, v18); std::ostream::operator<<(v10, &std::flush<char,std::char_traits<char>>); std::string::~string(v18); } return (unsigned int)CLI::Error::get_exit_code(v31); } } } } }
exit: PUSH RBP MOV RBP,RSP SUB RSP,0x1f0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x180],RAX MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x48] MOV qword ptr [RBP + -0x178],RDI CALL 0x00145c40 MOV RDI,qword ptr [RBP + -0x178] LAB_00110361: LEA RSI,[0x16ffb6] CALL 0x0010d920 LAB_0011036d: MOV byte ptr [RBP + -0x169],AL JMP 0x00110375 LAB_00110375: LEA RDI,[RBP + -0x48] CALL 0x00109b90 MOV AL,byte ptr [RBP + -0x169] TEST AL,0x1 JNZ 0x0011038a JMP 0x001103b5 LAB_0011038a: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145c70 MOV dword ptr [RBP + -0x4],EAX JMP 0x001107dc LAB_001103b5: MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV qword ptr [RBP + -0x190],RDI CALL 0x00145c40 MOV RDI,qword ptr [RBP + -0x190] LAB_001103d0: LEA RSI,[0x16fc10] CALL 0x0010d920 MOV byte ptr [RBP + -0x181],AL JMP 0x001103e4 LAB_001103e4: LEA RDI,[RBP + -0x78] CALL 0x00109b90 MOV AL,byte ptr [RBP + -0x181] TEST AL,0x1 JNZ 0x001103fc JMP 0x00110509 LAB_001103fc: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x1a0],RAX LEA RDI,[RBP + -0xb9] MOV qword ptr [RBP + -0x198],RDI CALL 0x00109a80 MOV RDX,qword ptr [RBP + -0x198] LAB_00110421: LEA RSI,[0x17000e] LEA RDI,[RBP + -0xb8] CALL 0x0010bb20 JMP 0x00110436 LAB_00110436: MOV RSI,qword ptr [RBP + -0x180] LEA RDI,[RBP + -0x98] LEA RDX,[RBP + -0xb8] XOR ECX,ECX CALL 0x00145c90 JMP 0x00110454 LAB_00110454: MOV RDI,qword ptr [RBP + -0x1a0] LEA RSI,[RBP + -0x98] CALL 0x00109550 LAB_00110467: JMP 0x00110469 LAB_00110469: LEA RDI,[RBP + -0x98] CALL 0x00109b90 LEA RDI,[RBP + -0xb8] CALL 0x00109b90 LEA RDI,[RBP + -0xb9] CALL 0x00109690 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145c70 MOV dword ptr [RBP + -0x4],EAX JMP 0x001107dc LAB_00110509: MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0xe0] MOV qword ptr [RBP + -0x1b0],RDI CALL 0x00145c40 MOV RDI,qword ptr [RBP + -0x1b0] LAB_00110527: LEA RSI,[0x16fc01] CALL 0x0010d920 MOV byte ptr [RBP + -0x1a1],AL JMP 0x0011053b LAB_0011053b: LEA RDI,[RBP + -0xe0] CALL 0x00109b90 MOV AL,byte ptr [RBP + -0x1a1] TEST AL,0x1 JNZ 0x00110556 JMP 0x00110669 LAB_00110556: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x1c0],RAX LEA RDI,[RBP + -0x121] MOV qword ptr [RBP + -0x1b8],RDI CALL 0x00109a80 MOV RDX,qword ptr [RBP + -0x1b8] LAB_0011057b: LEA RSI,[0x17000e] LEA RDI,[RBP + -0x120] CALL 0x0010bb20 JMP 0x00110590 LAB_00110590: MOV RSI,qword ptr [RBP + -0x180] LEA RDI,[RBP + -0x100] LEA RDX,[RBP + -0x120] MOV ECX,0x1 CALL 0x00145c90 JMP 0x001105b1 LAB_001105b1: MOV RDI,qword ptr [RBP + -0x1c0] LEA RSI,[RBP + -0x100] CALL 0x00109550 LAB_001105c4: JMP 0x001105c6 LAB_001105c6: LEA RDI,[RBP + -0x100] CALL 0x00109b90 LEA RDI,[RBP + -0x120] CALL 0x00109b90 LEA RDI,[RBP + -0x121] CALL 0x00109690 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145c70 MOV dword ptr [RBP + -0x4],EAX JMP 0x001107dc LAB_00110669: MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x148] MOV qword ptr [RBP + -0x1d0],RDI CALL 0x00145c40 MOV RDI,qword ptr [RBP + -0x1d0] LAB_00110687: LEA RSI,[0x16ffc3] CALL 0x0010d920 LAB_00110693: MOV byte ptr [RBP + -0x1c1],AL JMP 0x0011069b LAB_0011069b: LEA RDI,[RBP + -0x148] CALL 0x00109b90 MOV AL,byte ptr [RBP + -0x1c1] TEST AL,0x1 JNZ 0x001106b3 JMP 0x00110714 LAB_001106b3: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x1d8],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x1d8] MOV RSI,RAX CALL 0x001095e0 MOV RDI,RAX MOV RSI,qword ptr [0x001a1f58] CALL 0x00109660 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145c70 MOV dword ptr [RBP + -0x4],EAX JMP 0x001107dc LAB_00110714: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145c70 CMP EAX,0x0 JZ 0x001107d0 MOV RDI,qword ptr [RBP + -0x180] ADD RDI,0x158 CALL 0x00131bc0 TEST AL,0x1 JNZ 0x00110742 JMP 0x001107ce LAB_00110742: MOV RDX,qword ptr [RBP + -0x180] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x1f0],RAX MOV RSI,RDX ADD RSI,0x158 MOV RCX,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x168] MOV qword ptr [RBP + -0x1e8],RDI CALL 0x00145ed0 MOV RDI,qword ptr [RBP + -0x1f0] MOV RSI,qword ptr [RBP + -0x1e8] LAB_00110783: CALL 0x00109550 MOV qword ptr [RBP + -0x1e0],RAX JMP 0x00110791 LAB_00110791: MOV RDI,qword ptr [RBP + -0x1e0] MOV RSI,qword ptr [0x001a1fa8] CALL 0x00109660 LAB_001107a4: JMP 0x001107a6 LAB_001107a6: LEA RDI,[RBP + -0x168] CALL 0x00109b90 JMP 0x001107ce LAB_001107ce: JMP 0x001107d0 LAB_001107d0: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00145c70 MOV dword ptr [RBP + -0x4],EAX LAB_001107dc: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x1f0 POP RBP RET
/* CLI::App::exit(CLI::Error const&, std::ostream&, std::ostream&) const */ int4 __thiscall CLI::App::exit(App *this,Error *param_1,ostream *param_2,ostream *param_3) { bool bVar1; int iVar2; char *pcVar3; ostream *poVar4; App local_170 [32]; string local_150 [39]; allocator local_129; string local_128 [32]; string local_108 [32]; string local_e8 [39]; allocator local_c1; string local_c0 [32]; string local_a0 [32]; string local_80 [48]; string local_50 [32]; ostream *local_30; ostream *local_28; Error *local_20; App *local_18; int4 local_c; local_30 = param_3; local_28 = param_2; local_20 = param_1; local_18 = this; Error::get_name_abi_cxx11_(); /* try { // try from 00110361 to 0011036c has its CatchHandler @ 0011039b */ bVar1 = std::operator==(local_50,"RuntimeError"); std::__cxx11::string::~string(local_50); if (bVar1) { local_c = Error::get_exit_code(local_20); } else { Error::get_name_abi_cxx11_(); /* try { // try from 001103d0 to 001103db has its CatchHandler @ 0011049e */ bVar1 = std::operator==(local_80,"CallForHelp"); std::__cxx11::string::~string(local_80); poVar4 = local_28; if (bVar1) { std::allocator<char>::allocator(); /* try { // try from 00110421 to 00110433 has its CatchHandler @ 001104b8 */ std::__cxx11::string::string<std::allocator<char>>(local_c0,"",&local_c1); /* try { // try from 00110436 to 00110451 has its CatchHandler @ 001104c6 */ help(local_a0,this,local_c0,0); /* try { // try from 00110454 to 00110466 has its CatchHandler @ 001104d4 */ std::operator<<(poVar4,local_a0); std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string(local_c0); std::allocator<char>::~allocator((allocator<char> *)&local_c1); local_c = Error::get_exit_code(local_20); } else { Error::get_name_abi_cxx11_(); /* try { // try from 00110527 to 00110532 has its CatchHandler @ 001105fb */ bVar1 = std::operator==(local_e8,"CallForAllHelp"); std::__cxx11::string::~string(local_e8); poVar4 = local_28; if (bVar1) { std::allocator<char>::allocator(); /* try { // try from 0011057b to 0011058d has its CatchHandler @ 00110618 */ std::__cxx11::string::string<std::allocator<char>>(local_128,"",&local_129); /* try { // try from 00110590 to 001105ae has its CatchHandler @ 00110626 */ help(local_108,this,local_128,1); /* try { // try from 001105b1 to 001105c3 has its CatchHandler @ 00110634 */ std::operator<<(poVar4,local_108); std::__cxx11::string::~string(local_108); std::__cxx11::string::~string(local_128); std::allocator<char>::~allocator((allocator<char> *)&local_129); local_c = Error::get_exit_code(local_20); } else { Error::get_name_abi_cxx11_(); /* try { // try from 00110687 to 00110692 has its CatchHandler @ 001106f7 */ bVar1 = std::operator==(local_150,"CallForVersion"); std::__cxx11::string::~string(local_150); poVar4 = local_28; if (bVar1) { pcVar3 = (char *)(**(code **)(*(long *)local_20 + 0x10))(); poVar4 = std::operator<<(poVar4,pcVar3); std::ostream::operator<< (poVar4,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_001a1f58); local_c = Error::get_exit_code(local_20); } else { iVar2 = Error::get_exit_code(local_20); if ((iVar2 != 0) && (bVar1 = std::function::operator_cast_to_bool((function *)(this + 0x158)), poVar4 = local_30, bVar1)) { std::function<std::__cxx11::string(CLI::App_const*,CLI::Error_const&)>::operator() (local_170,(Error *)(this + 0x158)); /* try { // try from 00110783 to 001107a3 has its CatchHandler @ 001107b4 */ poVar4 = std::operator<<(poVar4,(string *)local_170); std::ostream::operator<< (poVar4,(_func_ostream_ptr_ostream_ptr *) PTR_flush<char,std_char_traits<char>>_001a1fa8); std::__cxx11::string::~string((string *)local_170); } local_c = Error::get_exit_code(local_20); } } } } return local_c; }
172
bitmap_set_above
eloqsql/mysys/my_bitmap.c
void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit) { uchar use_byte= use_bit ? 0xff : 0; uchar *to= (uchar *)map->bitmap + from_byte; uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8; while (to < end) *to++= use_byte; }
O3
c
bitmap_set_above: pushq %rbp movq %rsp, %rbp movl 0x1c(%rdi), %eax addl $0x7, %eax shrl $0x3, %eax cmpl %esi, %eax jbe 0x9eba1 movl %eax, %eax movq (%rdi), %rcx movl %esi, %esi leaq (%rcx,%rsi), %rdi addq %rcx, %rsi incq %rsi addq %rcx, %rax cmpq %rax, %rsi cmovaq %rsi, %rax subq %rdi, %rax xorl %esi, %esi negl %edx sbbl %esi, %esi movq %rax, %rdx popq %rbp jmp 0x292a0 popq %rbp retq
bitmap_set_above: push rbp mov rbp, rsp mov eax, [rdi+1Ch] add eax, 7 shr eax, 3 cmp eax, esi jbe short loc_9EBA1 mov eax, eax mov rcx, [rdi] mov esi, esi lea rdi, [rcx+rsi] add rsi, rcx inc rsi add rax, rcx cmp rsi, rax cmova rax, rsi sub rax, rdi xor esi, esi neg edx sbb esi, esi mov rdx, rax pop rbp jmp _memset loc_9EBA1: pop rbp retn
long long bitmap_set_above(long long *a1, unsigned int a2, int a3) { long long result; // rax long long v4; // rcx long long v5; // rdi unsigned long long v6; // rax result = (unsigned int)(*((_DWORD *)a1 + 7) + 7) >> 3; if ( (unsigned int)result > a2 ) { v4 = *a1; v5 = *a1 + a2; v6 = v4 + (unsigned int)result; if ( v5 + 1 > v6 ) v6 = v5 + 1; return memset(v5, (unsigned int)-(a3 != 0), v6 - v5); } return result; }
bitmap_set_above: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0x1c] ADD EAX,0x7 SHR EAX,0x3 CMP EAX,ESI JBE 0x0019eba1 MOV EAX,EAX MOV RCX,qword ptr [RDI] MOV ESI,ESI LEA RDI,[RCX + RSI*0x1] ADD RSI,RCX INC RSI ADD RAX,RCX CMP RSI,RAX CMOVA RAX,RSI SUB RAX,RDI XOR ESI,ESI NEG EDX SBB ESI,ESI MOV RDX,RAX POP RBP JMP 0x001292a0 LAB_0019eba1: POP RBP RET
void bitmap_set_above(long *param_1,uint param_2,int param_3) { void *__s; long lVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(int *)((long)param_1 + 0x1c) + 7U >> 3; if (param_2 < uVar2) { lVar1 = *param_1; __s = (void *)(lVar1 + (ulong)param_2); uVar4 = (ulong)param_2 + lVar1 + 1; uVar3 = (ulong)uVar2 + lVar1; if (uVar3 < uVar4) { uVar3 = uVar4; } memset(__s,-(uint)(param_3 != 0),uVar3 - (long)__s); return; } return; }
173
mysql_client_plugin_init
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
int mysql_client_plugin_init() { MYSQL mysql; struct st_mysql_client_plugin **builtin; va_list unused; LINT_INIT_STRUCT(unused); if (initialized) return 0; memset(&mysql, 0, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ pthread_mutex_init(&LOCK_load_client_plugin, NULL); ma_init_alloc_root(&mem_root, 128, 128); memset(&plugin_list, 0, sizeof(plugin_list)); initialized= 1; pthread_mutex_lock(&LOCK_load_client_plugin); for (builtin= mysql_client_builtins; *builtin; builtin++) add_plugin(&mysql, *builtin, 0, 0, unused); pthread_mutex_unlock(&LOCK_load_client_plugin); load_env_plugins(&mysql); return 0; }
O0
c
mysql_client_plugin_init: pushq %rbp movq %rsp, %rbp subq $0x540, %rsp # imm = 0x540 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0x530(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x13260 cmpb $0x0, 0x2d18e(%rip) # 0x66f00 je 0x39d83 movl $0x0, -0x504(%rbp) jmp 0x39e54 leaq -0x500(%rbp), %rdi xorl %esi, %esi movl $0x4f8, %edx # imm = 0x4F8 callq 0x13260 leaq 0x2d16b(%rip), %rdi # 0x66f08 xorl %eax, %eax movl %eax, %esi callq 0x13680 leaq 0x2d183(%rip), %rdi # 0x66f30 movl $0x80, %edx movq %rdx, %rsi callq 0x28f60 leaq 0x2d1af(%rip), %rdi # 0x66f70 xorl %esi, %esi movl $0x40, %edx callq 0x13260 movb $0x1, 0x2d12c(%rip) # 0x66f00 leaq 0x2d12d(%rip), %rdi # 0x66f08 callq 0x13670 leaq 0x2a299(%rip), %rax # 0x64080 movq %rax, -0x510(%rbp) movq -0x510(%rbp), %rax cmpq $0x0, (%rax) je 0x39e32 movq -0x510(%rbp), %rax movq (%rax), %rsi leaq -0x530(%rbp), %r8 leaq -0x500(%rbp), %rdi xorl %eax, %eax movl %eax, %edx xorl %ecx, %ecx callq 0x39e90 movq -0x510(%rbp), %rax addq $0x8, %rax movq %rax, -0x510(%rbp) jmp 0x39dee leaq 0x2d0cf(%rip), %rdi # 0x66f08 callq 0x13320 leaq -0x500(%rbp), %rdi callq 0x3a0c0 movl $0x0, -0x504(%rbp) movl -0x504(%rbp), %eax movl %eax, -0x534(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x39e81 movl -0x534(%rbp), %eax addq $0x540, %rsp # imm = 0x540 popq %rbp retq callq 0x134c0 nopw %cs:(%rax,%rax)
mysql_client_plugin_init: push rbp mov rbp, rsp sub rsp, 540h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_530] xor esi, esi mov edx, 18h call _memset cmp cs:initialized, 0 jz short loc_39D83 mov [rbp+var_504], 0 jmp loc_39E54 loc_39D83: lea rdi, [rbp+var_500] xor esi, esi mov edx, 4F8h call _memset lea rdi, LOCK_load_client_plugin xor eax, eax mov esi, eax call _pthread_mutex_init lea rdi, mem_root mov edx, 80h mov rsi, rdx call ma_init_alloc_root lea rdi, plugin_list xor esi, esi mov edx, 40h ; '@' call _memset mov cs:initialized, 1 lea rdi, LOCK_load_client_plugin call _pthread_mutex_lock lea rax, mysql_client_builtins mov [rbp+var_510], rax loc_39DEE: mov rax, [rbp+var_510] cmp qword ptr [rax], 0 jz short loc_39E32 mov rax, [rbp+var_510] mov rsi, [rax] lea r8, [rbp+var_530] lea rdi, [rbp+var_500] xor eax, eax mov edx, eax xor ecx, ecx call add_plugin mov rax, [rbp+var_510] add rax, 8 mov [rbp+var_510], rax jmp short loc_39DEE loc_39E32: lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock lea rdi, [rbp+var_500] call load_env_plugins mov [rbp+var_504], 0 loc_39E54: mov eax, [rbp+var_504] mov [rbp+var_534], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_39E81 mov eax, [rbp+var_534] add rsp, 540h pop rbp retn loc_39E81: call ___stack_chk_fail
long long mysql_client_plugin_init() { _BYTE v1[32]; // [rsp+10h] [rbp-530h] BYREF _QWORD *i; // [rsp+30h] [rbp-510h] _BYTE v4[1272]; // [rsp+40h] [rbp-500h] BYREF unsigned long long v5; // [rsp+538h] [rbp-8h] v5 = __readfsqword(0x28u); memset(v1, 0LL, 24LL); if ( initialized ) { return 0; } else { memset(v4, 0LL, sizeof(v4)); pthread_mutex_init(&LOCK_load_client_plugin, 0LL); ma_init_alloc_root(mem_root, 128LL, 128LL); memset(&plugin_list, 0LL, 64LL); initialized = 1; pthread_mutex_lock(&LOCK_load_client_plugin); for ( i = &mysql_client_builtins; *i; ++i ) add_plugin(v4, *i, 0LL, 0LL, v1); pthread_mutex_unlock(&LOCK_load_client_plugin); load_env_plugins(v4); return 0; } }
mysql_client_plugin_init: PUSH RBP MOV RBP,RSP SUB RSP,0x540 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0x530] XOR ESI,ESI MOV EDX,0x18 CALL 0x00113260 CMP byte ptr [0x00166f00],0x0 JZ 0x00139d83 MOV dword ptr [RBP + -0x504],0x0 JMP 0x00139e54 LAB_00139d83: LEA RDI,[RBP + -0x500] XOR ESI,ESI MOV EDX,0x4f8 CALL 0x00113260 LEA RDI,[0x166f08] XOR EAX,EAX MOV ESI,EAX CALL 0x00113680 LEA RDI,[0x166f30] MOV EDX,0x80 MOV RSI,RDX CALL 0x00128f60 LEA RDI,[0x166f70] XOR ESI,ESI MOV EDX,0x40 CALL 0x00113260 MOV byte ptr [0x00166f00],0x1 LEA RDI,[0x166f08] CALL 0x00113670 LEA RAX,[0x164080] MOV qword ptr [RBP + -0x510],RAX LAB_00139dee: MOV RAX,qword ptr [RBP + -0x510] CMP qword ptr [RAX],0x0 JZ 0x00139e32 MOV RAX,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RAX] LEA R8,[RBP + -0x530] LEA RDI,[RBP + -0x500] XOR EAX,EAX MOV EDX,EAX XOR ECX,ECX CALL 0x00139e90 MOV RAX,qword ptr [RBP + -0x510] ADD RAX,0x8 MOV qword ptr [RBP + -0x510],RAX JMP 0x00139dee LAB_00139e32: LEA RDI,[0x166f08] CALL 0x00113320 LEA RDI,[RBP + -0x500] CALL 0x0013a0c0 MOV dword ptr [RBP + -0x504],0x0 LAB_00139e54: MOV EAX,dword ptr [RBP + -0x504] MOV dword ptr [RBP + -0x534],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00139e81 MOV EAX,dword ptr [RBP + -0x534] ADD RSP,0x540 POP RBP RET LAB_00139e81: CALL 0x001134c0
int4 mysql_client_plugin_init(void) { long in_FS_OFFSET; int1 local_538 [32]; int **local_518; int4 local_50c; int1 local_508 [1272]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(local_538,0,0x18); if (initialized == '\0') { memset(local_508,0,0x4f8); pthread_mutex_init((pthread_mutex_t *)LOCK_load_client_plugin,(pthread_mutexattr_t *)0x0); ma_init_alloc_root(mem_root); memset(plugin_list,0,0x40); initialized = '\x01'; pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin); for (local_518 = &mysql_client_builtins; *local_518 != (int *)0x0; local_518 = local_518 + 1) { add_plugin(local_508,*local_518,0,0,local_538); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); load_env_plugins(local_508); } local_50c = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return 0; }
174
google::protobuf::compiler::java::CamelCaseFieldName[abi:cxx11](google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc
std::string CamelCaseFieldName(const FieldDescriptor* field) { std::string fieldName = UnderscoresToCamelCase(field); if ('0' <= fieldName[0] && fieldName[0] <= '9') { return '_' + fieldName; } return fieldName; }
O0
cpp
google::protobuf::compiler::java::CamelCaseFieldName[abi:cxx11](google::protobuf::FieldDescriptor const*): subq $0x68, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x58(%rsp), %rsi leaq 0x38(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x738a0 movq 0x18(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x21bc0 movq %rax, 0x20(%rsp) jmp 0x73e24 movq 0x20(%rsp), %rax movsbl (%rax), %ecx movl $0x30, %eax cmpl %ecx, %eax jg 0x73e8f xorl %eax, %eax movl %eax, %esi leaq 0x38(%rsp), %rdi callq 0x21bc0 movq %rax, (%rsp) jmp 0x73e49 movq (%rsp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jg 0x73e8f movq 0x8(%rsp), %rdi movl $0x5f, %esi leaq 0x38(%rsp), %rdx callq 0x77da0 jmp 0x73e6b movl $0x1, 0x28(%rsp) jmp 0x73ea6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0x21cc8 jmp 0x73eba movq 0x8(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x21990 movl $0x1, 0x28(%rsp) leaq 0x38(%rsp), %rdi callq 0x21cc8 movq 0x10(%rsp), %rax addq $0x68, %rsp retq movq 0x30(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZN6google8protobuf8compiler4java18CamelCaseFieldNameB5cxx11EPKNS0_15FieldDescriptorE: sub rsp, 68h mov qword ptr [rsp+68h+var_60], rdi; int mov rax, rdi mov qword ptr [rsp+68h+var_58], rax; int mov [rsp+68h+var_8], rdi mov qword ptr [rsp+68h+var_10], rsi mov rsi, qword ptr [rsp+68h+var_10]; int lea rdi, [rsp+68h+var_30]; int mov [rsp+68h+var_50], rdi; int call _ZN6google8protobuf8compiler4java22UnderscoresToCamelCaseB5cxx11EPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::UnderscoresToCamelCase(google::protobuf::FieldDescriptor const*) mov rdi, [rsp+68h+var_50] xor eax, eax mov esi, eax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov qword ptr [rsp+68h+var_48], rax; int jmp short $+2 loc_73E24: mov rax, qword ptr [rsp+68h+var_48] movsx ecx, byte ptr [rax] mov eax, 30h ; '0' cmp eax, ecx jg short loc_73E8F xor eax, eax mov esi, eax lea rdi, [rsp+68h+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov [rsp+68h+var_68], rax; void * jmp short $+2 loc_73E49: mov rax, [rsp+68h+var_68] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jg short loc_73E8F mov rdi, qword ptr [rsp+68h+var_60]; int mov esi, 5Fh ; '_'; int lea rdx, [rsp+68h+var_30]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_; std::operator+<char>(char,std::string const&) jmp short $+2 loc_73E6B: mov [rsp+68h+var_40], 1 jmp short loc_73EA6 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_73EBA loc_73E8F: mov rdi, qword ptr [rsp+68h+var_60] lea rsi, [rsp+68h+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&) mov [rsp+68h+var_40], 1 loc_73EA6: lea rdi, [rsp+68h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, qword ptr [rsp+68h+var_58] add rsp, 68h retn loc_73EBA: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long google::protobuf::compiler::java::CamelCaseFieldName[abi:cxx11]( long long a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // ecx int v7; // r8d int v8; // r9d char *v10; // [rsp+0h] [rbp-68h] int v11[2]; // [rsp+10h] [rbp-58h] char *v12; // [rsp+20h] [rbp-48h] long long v13; // [rsp+28h] [rbp-40h] int v14; // [rsp+30h] [rbp-38h] long long v15[4]; // [rsp+38h] [rbp-30h] BYREF int v16[2]; // [rsp+58h] [rbp-10h] long long v17; // [rsp+60h] [rbp-8h] *(_QWORD *)v11 = a1; v17 = a1; *(_QWORD *)v16 = a2; google::protobuf::compiler::java::UnderscoresToCamelCase[abi:cxx11]((long long)v15, a2, a3, a4, a5, a6); v12 = (char *)std::string::operator[](v15, 0LL); if ( *v12 < 48 || (v10 = (char *)std::string::operator[](v15, 0LL), *v10 > 57) ) std::string::basic_string(a1, v15); else std::operator+<char>(a1, 95, (int)v15, v6, v7, v8, v10, a1, a1, (int)v15, (int)v12, v13, v14); std::string::~string(v15); return *(_QWORD *)v11; }
CamelCaseFieldName[abi:cxx11]: SUB RSP,0x68 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV RSI,qword ptr [RSP + 0x58] LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x18],RDI CALL 0x001738a0 MOV RDI,qword ptr [RSP + 0x18] LAB_00173e14: XOR EAX,EAX MOV ESI,EAX CALL 0x00121bc0 MOV qword ptr [RSP + 0x20],RAX JMP 0x00173e24 LAB_00173e24: MOV RAX,qword ptr [RSP + 0x20] MOVSX ECX,byte ptr [RAX] MOV EAX,0x30 CMP EAX,ECX JG 0x00173e8f XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x38] CALL 0x00121bc0 MOV qword ptr [RSP],RAX JMP 0x00173e49 LAB_00173e49: MOV RAX,qword ptr [RSP] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JG 0x00173e8f MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x5f LEA RDX,[RSP + 0x38] CALL 0x00177da0 LAB_00173e69: JMP 0x00173e6b LAB_00173e6b: MOV dword ptr [RSP + 0x28],0x1 JMP 0x00173ea6 LAB_00173e8f: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x38] CALL 0x00121990 MOV dword ptr [RSP + 0x28],0x1 LAB_00173ea6: LEA RDI,[RSP + 0x38] CALL 0x00121cc8 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x68 RET
/* google::protobuf::compiler::java::CamelCaseFieldName[abi:cxx11](google::protobuf::FieldDescriptor const*) */ java * __thiscall google::protobuf::compiler::java::CamelCaseFieldName_abi_cxx11_(java *this,FieldDescriptor *param_1) { char *pcVar1; java local_30 [32]; FieldDescriptor *local_10; java *local_8; local_10 = param_1; local_8 = this; UnderscoresToCamelCase_abi_cxx11_(local_30,param_1); /* try { // try from 00173e14 to 00173e68 has its CatchHandler @ 00173e75 */ pcVar1 = (char *)std::__cxx11::string::operator[]((ulong)local_30); if ('/' < *pcVar1) { pcVar1 = (char *)std::__cxx11::string::operator[]((ulong)local_30); if (*pcVar1 < ':') { std::operator+((char)this,(string *)0x5f); goto LAB_00173ea6; } } std::__cxx11::string::string((string *)this,(string *)local_30); LAB_00173ea6: std::__cxx11::string::~string((string *)local_30); return this; }
175
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[]<char const>(char const*)
monkey531[P]llama/common/json.hpp
reference operator[](T* key) { return operator[](typename object_t::key_type(key)); }
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>& 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>::operator[]<char const>(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x1c6e0 movq %rbx, %rdi movq %r14, %rsi callq 0x6e448 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x679eb movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x67a14 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18ba0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; 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[](std::string) mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_679EB mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_679EB: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_67A14 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_67A14: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( long long a1, long long a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2); v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2; }
operator[]<char_const>: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x0011c6e0 LAB_001679c2: MOV RDI,RBX MOV RSI,R14 CALL 0x0016e448 LAB_001679cd: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001679eb MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_001679eb: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 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>& 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>::operator[]<char const>(char const*) */ basic_json * __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> ::operator[]<char_const> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,char *param_1) { basic_json *pbVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001679c2 to 001679cc has its CatchHandler @ 001679f6 */ pbVar1 = (basic_json *)operator[](this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return pbVar1; }
176
mi_decrement_open_count
eloqsql/storage/myisam/mi_locking.c
int _mi_decrement_open_count(MI_INFO *info) { uchar buff[2]; register MYISAM_SHARE *share=info->s; int lock_error=0,write_error=0; if (share->global_changed) { uint old_lock=info->lock_type; share->global_changed=0; lock_error= my_disable_locking ? 0 : mi_lock_database(info,F_WRLCK); /* Its not fatal even if we couldn't get the lock ! */ if (share->state.open_count > 0) { share->state.open_count--; mi_int2store(buff,share->state.open_count); write_error= (mysql_file_pwrite(share->kfile, buff, sizeof(buff), sizeof(share->state.header), MYF(MY_NABP)) != 0); } if (!lock_error && !my_disable_locking) lock_error=mi_lock_database(info,old_lock); } return MY_TEST(lock_error || write_error); }
O3
c
mi_decrement_open_count: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq (%rdi), %r12 cmpb $0x0, 0x380(%r12) je 0x7cb57 movq %rdi, %rbx movl 0x1f4(%rdi), %r14d movb $0x0, 0x380(%r12) leaq 0xb8bb65(%rip), %r13 # 0xc08638 xorl %r15d, %r15d cmpb $0x0, (%r13) jne 0x7caed movq %rbx, %rdi movl $0x1, %esi callq 0x7bdc8 movl %eax, %r15d movl 0xec(%r12), %eax testl %eax, %eax je 0x7cb5b decl %eax movl %eax, 0xec(%r12) movb %al, -0x29(%rbp) movb %ah, -0x2a(%rbp) movl 0x350(%r12), %r12d leaq 0x3094f8(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %r12d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7cb96 leaq -0x2a(%rbp), %rsi movl $0x2, %edx movl $0x18, %ecx movl $0x4, %r8d movl %r12d, %edi callq 0xa095e testq %rax, %rax setne %r12b jmp 0x7cb5e xorl %eax, %eax jmp 0x7cb87 xorl %r12d, %r12d testl %r15d, %r15d jne 0x7cb78 cmpb $0x0, (%r13) jne 0x7cb78 movq %rbx, %rdi movl %r14d, %esi callq 0x7bdc8 movl %eax, %r15d testl %r15d, %r15d setne %al orb %r12b, %al movzbl %al, %eax andl $0x1, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x2a(%rbp), %rdx leaq -0x38(%rbp), %rcx movq %rax, %rdi movl %r12d, %esi movq %rcx, %r12 callq 0x2dacc movq (%r12), %rax jmp 0x7cb4e
_mi_decrement_open_count: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r12, [rdi] cmp byte ptr [r12+380h], 0 jz loc_7CB57 mov rbx, rdi mov r14d, [rdi+1F4h] mov byte ptr [r12+380h], 0 lea r13, my_disable_locking xor r15d, r15d cmp byte ptr [r13+0], 0 jnz short loc_7CAED mov rdi, rbx mov esi, 1 call mi_lock_database mov r15d, eax loc_7CAED: mov eax, [r12+0ECh] test eax, eax jz short loc_7CB5B dec eax mov [r12+0ECh], eax mov [rbp+var_29], al mov [rbp+var_2A], ah mov r12d, [r12+350h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov esi, r12d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_7CB96 lea rsi, [rbp+var_2A] mov edx, 2 mov ecx, 18h mov r8d, 4 mov edi, r12d call my_pwrite loc_7CB4E: test rax, rax setnz r12b jmp short loc_7CB5E loc_7CB57: xor eax, eax jmp short loc_7CB87 loc_7CB5B: xor r12d, r12d loc_7CB5E: test r15d, r15d jnz short loc_7CB78 cmp byte ptr [r13+0], 0 jnz short loc_7CB78 mov rdi, rbx mov esi, r14d call mi_lock_database mov r15d, eax loc_7CB78: test r15d, r15d setnz al or al, r12b movzx eax, al and eax, 1 loc_7CB87: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7CB96: lea rdx, [rbp+var_2A] lea rcx, [rbp+var_38] mov rdi, rax mov esi, r12d mov r12, rcx call _mi_decrement_open_count_cold_1 mov rax, [r12] jmp short loc_7CB4E
long long mi_decrement_open_count(_DWORD *a1, double a2, double a3) { long long v3; // r12 int v4; // r14d int v5; // r15d int v6; // eax int v7; // eax unsigned int v8; // r12d long long v9; // rax long long v10; // rax bool v11; // r12 _BYTE v13[72]; // [rsp+0h] [rbp-80h] BYREF long long v14; // [rsp+48h] [rbp-38h] BYREF _BYTE v15[42]; // [rsp+56h] [rbp-2Ah] BYREF v3 = *(_QWORD *)a1; if ( !*(_BYTE *)(*(_QWORD *)a1 + 896LL) ) return 0LL; v4 = a1[125]; *(_BYTE *)(v3 + 896) = 0; v5 = 0; if ( !my_disable_locking ) v5 = mi_lock_database(a1, 1, a2, a3); v6 = *(_DWORD *)(v3 + 236); if ( v6 ) { v7 = v6 - 1; *(_DWORD *)(v3 + 236) = v7; v15[0] = BYTE1(v7); v15[1] = v7; v8 = *(_DWORD *)(v3 + 848); v9 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, v8, 7LL); if ( v9 ) { mi_decrement_open_count_cold_1(v9, v8, (long long)v15, &v14); v10 = v14; } else { v10 = my_pwrite(v8, v15, 2LL, 24LL, 4LL); } v11 = v10 != 0; } else { v11 = 0; } if ( !v5 && !my_disable_locking ) v5 = mi_lock_database(a1, v4, a2, a3); return v11 | (unsigned __int8)(v5 != 0); }
_mi_decrement_open_count: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,qword ptr [RDI] CMP byte ptr [R12 + 0x380],0x0 JZ 0x0017cb57 MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x1f4] MOV byte ptr [R12 + 0x380],0x0 LEA R13,[0xd08638] XOR R15D,R15D CMP byte ptr [R13],0x0 JNZ 0x0017caed MOV RDI,RBX MOV ESI,0x1 CALL 0x0017bdc8 MOV R15D,EAX LAB_0017caed: MOV EAX,dword ptr [R12 + 0xec] TEST EAX,EAX JZ 0x0017cb5b DEC EAX MOV dword ptr [R12 + 0xec],EAX MOV byte ptr [RBP + -0x29],AL MOV byte ptr [RBP + -0x2a],AH MOV R12D,dword ptr [R12 + 0x350] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV ESI,R12D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017cb96 LEA RSI,[RBP + -0x2a] MOV EDX,0x2 MOV ECX,0x18 MOV R8D,0x4 MOV EDI,R12D CALL 0x001a095e LAB_0017cb4e: TEST RAX,RAX SETNZ R12B JMP 0x0017cb5e LAB_0017cb57: XOR EAX,EAX JMP 0x0017cb87 LAB_0017cb5b: XOR R12D,R12D LAB_0017cb5e: TEST R15D,R15D JNZ 0x0017cb78 CMP byte ptr [R13],0x0 JNZ 0x0017cb78 MOV RDI,RBX MOV ESI,R14D CALL 0x0017bdc8 MOV R15D,EAX LAB_0017cb78: TEST R15D,R15D SETNZ AL OR AL,R12B MOVZX EAX,AL AND EAX,0x1 LAB_0017cb87: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017cb96: LEA RDX,[RBP + -0x2a] LEA RCX,[RBP + -0x38] MOV RDI,RAX MOV ESI,R12D MOV R12,RCX CALL 0x0012dacc MOV RAX,qword ptr [R12] JMP 0x0017cb4e
byte _mi_decrement_open_count(long *param_1) { int4 uVar1; int4 uVar2; byte bVar3; int iVar4; int iVar5; long lVar6; bool bVar7; int1 local_88 [72]; long local_40; int1 local_32; int1 local_31; lVar6 = *param_1; if (*(char *)(lVar6 + 0x380) == '\0') { bVar3 = 0; } else { uVar1 = *(int4 *)((long)param_1 + 500); *(int1 *)(lVar6 + 0x380) = 0; iVar4 = 0; if (my_disable_locking == '\0') { iVar4 = mi_lock_database(param_1,1); } if (*(int *)(lVar6 + 0xec) == 0) { bVar7 = false; } else { iVar5 = *(int *)(lVar6 + 0xec) + -1; *(int *)(lVar6 + 0xec) = iVar5; local_31 = (int1)iVar5; local_32 = (int1)((uint)iVar5 >> 8); uVar2 = *(int4 *)(lVar6 + 0x350); lVar6 = (**(code **)(PSI_server + 0x158))(local_88,uVar2,7); if (lVar6 == 0) { local_40 = my_pwrite(uVar2,&local_32,2,0x18,4); } else { _mi_decrement_open_count_cold_1(lVar6,uVar2,&local_32); } bVar7 = local_40 != 0; } if ((iVar4 == 0) && (my_disable_locking == '\0')) { iVar4 = mi_lock_database(param_1,uVar1); } bVar3 = iVar4 != 0 | bVar7; } return bVar3; }
177
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::boolean: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O0
cpp
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rdi callq 0xc79a0 movzbl %al, %ecx movq %rcx, 0x8(%rsp) subb $0x9, %al ja 0xc893b movq 0x8(%rsp), %rax leaq 0xb9bc0(%rip), %rcx # 0x1824a0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x50(%rsp), %rdi callq 0xc79b0 movq (%rax), %rcx movq 0x48(%rsp), %rax movq %rcx, (%rax) jmp 0xc89e9 movq 0x50(%rsp), %rdi callq 0xc79d0 movq (%rax), %rcx movq 0x48(%rsp), %rax movq %rcx, (%rax) jmp 0xc89e9 movq 0x50(%rsp), %rdi callq 0xc79f0 cvttsd2si (%rax), %rcx movq 0x48(%rsp), %rax movq %rcx, (%rax) jmp 0xc89e9 jmp 0xc893b movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0xb320 movq %rax, (%rsp) movq 0x50(%rsp), %rdi callq 0xc7c70 movq %rax, 0x20(%rsp) leaq 0xbbaa1(%rip), %rsi # 0x184405 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0xc7bc0 jmp 0xc8975 movq (%rsp), %rdi movq 0x50(%rsp), %rcx movl $0x12e, %esi # imm = 0x12E leaq 0x28(%rsp), %rdx callq 0xc7a10 jmp 0xc898f movq (%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0x10ea09(%rip), %rsi # 0x1d73a8 leaq -0xc86(%rip), %rdx # 0xc7d20 callq 0xbcb0 jmp 0xc89f8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0xc89d5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0xbf00 testb $0x1, 0x13(%rsp) jne 0xc89de jmp 0xc89e7 movq (%rsp), %rdi callq 0xb540 jmp 0xc89ee addq $0x58, %rsp retq movq 0x18(%rsp), %rdi callq 0xbd30 nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: sub rsp, 58h mov qword ptr [rsp+58h+var_8], rdi; char mov qword ptr [rsp+58h+var_10], rsi; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEEcvNS0_6detail7value_tEEv; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::operator nlohmann::json_abi_v3_11_2::detail::value_t(void) movzx ecx, al mov qword ptr [rsp+58h+var_50], rcx; int sub al, 9; switch 10 cases ja short def_C88E7; jumptable 00000000000C88E7 default case mov rax, qword ptr [rsp+58h+var_50] lea rcx, jpt_C88E7 movsxd rax, ds:(jpt_C88E7 - 1824A0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C88E9: mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000C88E7 case 6 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv mov rcx, [rax] mov rax, qword ptr [rsp+58h+var_10] mov [rax], rcx jmp loc_C89E9 loc_C8903: mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000C88E7 case 5 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv mov rcx, [rax] mov rax, qword ptr [rsp+58h+var_10] mov [rax], rcx jmp loc_C89E9 loc_C891D: mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000C88E7 case 7 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv cvttsd2si rcx, qword ptr [rax] mov rax, qword ptr [rsp+58h+var_10] mov [rax], rcx jmp loc_C89E9 loc_C8939: jmp short $+2; jumptable 00000000000C88E7 cases 0-4,8,9 def_C88E7: mov [rsp+58h+var_45], 1; jumptable 00000000000C88E7 default case mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+58h+var_58], rax; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE9type_nameEv; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::type_name(void) mov qword ptr [rsp+58h+var_38], rax; int lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+58h+var_30] lea rdx, [rsp+58h+var_38] call _ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) jmp short $+2 loc_C8975: mov rdi, [rsp+58h+var_58]; int mov rcx, qword ptr [rsp+58h+var_8] mov esi, 12Eh lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_C898F: mov rdi, [rsp+58h+var_58]; void * mov [rsp+58h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_26detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_26detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_C89F8 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax jmp short loc_C89D5 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C89D5: test [rsp+arg_B], 1 jnz short loc_C89DE jmp short loc_C89E7 loc_C89DE: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_C89E7: jmp short loc_C89EE loc_C89E9: add rsp, 58h retn loc_C89EE: mov rdi, [rsp+arg_10] call __Unwind_Resume loc_C89F8: nop dword ptr [rax+rax+00000000h]
long long ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( long long a1, long long a2) { long long v2; // rcx long long result; // rax long long v4; // rcx long long v5; // rcx void *exception; // [rsp+0h] [rbp-58h] int v7[2]; // [rsp+20h] [rbp-38h] BYREF _BYTE v8[32]; // [rsp+28h] [rbp-30h] BYREF int v9[2]; // [rsp+48h] [rbp-10h] char v10[8]; // [rsp+50h] [rbp-8h] *(_QWORD *)v10 = a1; *(_QWORD *)v9 = a2; switch ( 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>>::operator nlohmann::json_abi_v3_11_2::detail::value_t(a1) ) { case 5: v4 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v10); result = *(_QWORD *)v9; **(_QWORD **)v9 = v4; break; case 6: v2 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v10); result = *(_QWORD *)v9; **(_QWORD **)v9 = v2; break; case 7: v5 = (unsigned int)(int)*(double *)ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v10); result = *(_QWORD *)v9; **(_QWORD **)v9 = v5; break; default: exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v7 = 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>>::type_name(*(_BYTE **)v10); nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[29],char const*>( (long long)v8, (long long)"type must be number, but is ", (long long)v7); ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( (long long)exception, 302, (long long)v8, *(long long *)v10); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_2::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_2::detail::type_error::~type_error); } return result; }
_ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RDI,qword ptr [RSP + 0x50] CALL 0x001c79a0 MOVZX ECX,AL MOV qword ptr [RSP + 0x8],RCX SUB AL,0x9 JA 0x001c893b MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x2824a0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_6: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001c79b0 MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX],RCX JMP 0x001c89e9 caseD_5: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001c79d0 MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX],RCX JMP 0x001c89e9 caseD_7: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001c79f0 CVTTSD2SI RCX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX],RCX JMP 0x001c89e9 caseD_0: JMP 0x001c893b default: MOV byte ptr [RSP + 0x13],0x1 MOV EDI,0x20 CALL 0x0010b320 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x50] CALL 0x001c7c70 MOV qword ptr [RSP + 0x20],RAX LAB_001c895d: LEA RSI,[0x284405] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x20] CALL 0x001c7bc0 JMP 0x001c8975 LAB_001c8975: MOV RDI,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x50] LAB_001c897e: MOV ESI,0x12e LEA RDX,[RSP + 0x28] CALL 0x001c7a10 JMP 0x001c898f LAB_001c898f: MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x13],0x0 LEA RSI,[0x2d73a8] LEA RDX,[0x1c7d20] CALL 0x0010bcb0 LAB_001c89e9: ADD RSP,0x58 RET
void _ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (basic_json *param_1,long *param_2) { int1 uVar1; long *plVar2; double *pdVar3; int8 uVar4; char *local_38; detail local_30 [32]; long *local_10; basic_json *local_8; local_10 = param_2; local_8 = param_1; uVar1 = nlohmann::json_abi_v3_11_2::basic_json::operator_cast_to_value_t(param_1); switch(uVar1) { case 0: case 1: case 2: case 3: case 4: case 8: case 9: default: uVar4 = __cxa_allocate_exception(0x20); local_38 = (char *)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>>> ::type_name((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>>> *)local_8); /* try { // try from 001c895d to 001c8972 has its CatchHandler @ 001c89ad */ nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_30,"type must be number, but is ",&local_38); /* try { // try from 001c897e to 001c89aa has its CatchHandler @ 001c89bd */ _ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x12e,local_30,local_8); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_2::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_2::detail::type_error::~type_error); case 5: plVar2 = (long *)_ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); *local_10 = *plVar2; break; case 6: plVar2 = (long *)_ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); *local_10 = *plVar2; break; case 7: pdVar3 = (double *) _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); *local_10 = (long)*pdVar3; } return; }
178
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::boolean: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O1
cpp
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax cmpl $0x5, %eax je 0x6e9e8 cmpl $0x7, %eax je 0x6e9ee cmpl $0x6, %eax jne 0x6ea1f movq 0x8(%r14), %rax jmp 0x6ea13 movsd 0x8(%r14), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x4f098(%rip), %xmm0 # 0xbdaa0 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax movq %rax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0xa280 movq %rax, %rbx movq %r14, %rdi callq 0x6ed0c leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x5392e(%rip), %rsi # 0xc2371 leaq 0x10(%rsp), %rdi callq 0x6ec83 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x6eab8 xorl %ebp, %ebp leaq 0x8746a(%rip), %rsi # 0xf5ed8 leaq 0x45cb(%rip), %rdx # 0x73040 movq %rbx, %rdi callq 0xaa80 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6eaa3 movq 0x20(%rsp), %rsi incq %rsi callq 0xa5e0 jmp 0x6eaa3 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x6eab0 movq %rbx, %rdi callq 0xa420 movq %r14, %rdi callq 0xaae0
_ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] cmp eax, 5 jz short loc_6E9E8 cmp eax, 7 jz short loc_6E9EE cmp eax, 6 jnz short loc_6EA1F loc_6E9E8: mov rax, [r14+8] jmp short loc_6EA13 loc_6E9EE: movsd xmm0, qword ptr [r14+8] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_BDAA0 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx loc_6EA13: mov [rsi], rax add rsp, 30h pop rbx pop r14 pop rbp retn loc_6EA1F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE9type_nameEv; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_26detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_26detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6EAA3 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6EAA3 mov r14, rax mov bpl, 1 loc_6EAA3: test bpl, bpl jz short loc_6EAB0 mov rdi, rbx; void * call ___cxa_free_exception loc_6EAB0: mov rdi, r14 call __Unwind_Resume
179
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::boolean: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O2
cpp
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax cmpl $0x5, %eax je 0x4b99a cmpl $0x7, %eax je 0x4b9a0 cmpl $0x6, %eax jne 0x4b9d1 movq 0x8(%r14), %rax jmp 0x4b9c5 movsd 0x8(%r14), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x4e016(%rip), %xmm0 # 0x999d0 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax movq %rax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0xa270 movq %rax, %rbx movq %r14, %rdi callq 0x4bba0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x5288e(%rip), %rsi # 0x9e281 leaq 0x10(%rsp), %rdi callq 0x4bb41 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x4ba54 xorl %ebp, %ebp leaq 0x894aa(%rip), %rsi # 0xd4ec8 leaq 0x4183(%rip), %rdx # 0x4fba8 movq %rbx, %rdi callq 0xaa50 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xac60 testb %bpl, %bpl jne 0x4ba44 jmp 0x4ba4c movq %rax, %r14 movq %rbx, %rdi callq 0xa410 movq %r14, %rdi callq 0xaab0
_ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] cmp eax, 5 jz short loc_4B99A cmp eax, 7 jz short loc_4B9A0 cmp eax, 6 jnz short loc_4B9D1 loc_4B99A: mov rax, [r14+8] jmp short loc_4B9C5 loc_4B9A0: movsd xmm0, qword ptr [r14+8] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_999D0 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx loc_4B9C5: mov [rsi], rax add rsp, 30h pop rbx pop r14 pop rbp retn loc_4B9D1: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE9type_nameEv; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_26detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_26detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_4BA44 jmp short loc_4BA4C mov r14, rax loc_4BA44: mov rdi, rbx; void * call ___cxa_free_exception loc_4BA4C: mov rdi, r14 call __Unwind_Resume
_ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI MOVZX EAX,byte ptr [RDI] CMP EAX,0x5 JZ 0x0014b99a CMP EAX,0x7 JZ 0x0014b9a0 CMP EAX,0x6 JNZ 0x0014b9d1 LAB_0014b99a: MOV RAX,qword ptr [R14 + 0x8] JMP 0x0014b9c5 LAB_0014b9a0: MOVSD XMM0,qword ptr [R14 + 0x8] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x001999d0] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX LAB_0014b9c5: MOV qword ptr [RSI],RAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0014b9d1: PUSH 0x20 POP RDI CALL 0x0010a270 MOV RBX,RAX MOV RDI,R14 CALL 0x0014bba0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0014b9ec: LEA RSI,[0x19e281] LEA RDI,[RSP + 0x10] CALL 0x0014bb41 MOV BPL,0x1 LAB_0014ba00: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x0014ba54 XOR EBP,EBP LEA RSI,[0x1d4ec8] LEA RDX,[0x14fba8] MOV RDI,RBX CALL 0x0010aa50
void _ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (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>>> *param_1,ulong *param_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>>> bVar1; int8 uVar2; ulong uVar3; char *local_40; detail local_38 [32]; bVar1 = *param_1; if (bVar1 != (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>>> )0x5) { if (bVar1 == (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>>> )0x7) { uVar3 = (ulong)*(double *)(param_1 + 8); uVar3 = (long)(*(double *)(param_1 + 8) - DAT_001999d0) & (long)uVar3 >> 0x3f | uVar3; goto LAB_0014b9c5; } if (bVar1 != (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>>> )0x6) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)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>>> ::type_name(param_1); /* try { // try from 0014b9ec to 0014b9fc has its CatchHandler @ 0014ba41 */ nlohmann::json_abi_v3_11_2::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be number, but is ",&local_40); /* try { // try from 0014ba00 to 0014ba2c has its CatchHandler @ 0014ba2d */ _ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_2::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_2::detail::exception::~exception); } } uVar3 = *(ulong *)(param_1 + 8); LAB_0014b9c5: *param_2 = uVar3; return; }
180
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::boolean: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O3
cpp
void nlohmann::json_abi_v3_11_2::detail::get_arithmetic_value<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>>>, long, 0>(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>>> const&, long&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax cmpl $0x5, %eax je 0x6e388 cmpl $0x7, %eax je 0x6e38e cmpl $0x6, %eax jne 0x6e3a0 movq 0x8(%r14), %rax jmp 0x6e394 cvttsd2si 0x8(%r14), %rax movq %rax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0xa270 movq %rax, %rbx movq %r14, %rdi callq 0x6e0ae leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x52fbd(%rip), %rsi # 0xc1381 leaq 0x10(%rsp), %rdi callq 0x6e025 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x6de5a xorl %ebp, %ebp leaq 0x85ae9(%rip), %rsi # 0xf3ed8 leaq 0x3eb6(%rip), %rdx # 0x722ac movq %rbx, %rdi callq 0xaa70 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6e41c movq 0x20(%rsp), %rsi incq %rsi callq 0xa5d0 testb %bpl, %bpl jne 0x6e426 jmp 0x6e42e movq %rax, %r14 movq %rbx, %rdi callq 0xa410 movq %r14, %rdi callq 0xaad0
_ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] cmp eax, 5 jz short loc_6E388 cmp eax, 7 jz short loc_6E38E cmp eax, 6 jnz short loc_6E3A0 loc_6E388: mov rax, [r14+8] jmp short loc_6E394 loc_6E38E: cvttsd2si rax, qword ptr [r14+8] loc_6E394: mov [rsi], rax add rsp, 30h pop rbx pop r14 pop rbp retn loc_6E3A0: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE9type_nameEv; nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<uchar>>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_26detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_26detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6E41C mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6E41C: test bpl, bpl jnz short loc_6E426 jmp short loc_6E42E mov r14, rax loc_6E426: mov rdi, rbx; void * call ___cxa_free_exception loc_6E42E: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_26detail20get_arithmetic_valueINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( double *a1, _QWORD *a2) { int v2; // eax long long result; // rax nlohmann::json_abi_v3_11_2::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF v2 = *(unsigned __int8 *)a1; if ( v2 != 5 ) { if ( v2 == 7 ) { result = (unsigned int)(int)a1[1]; goto LABEL_6; } if ( v2 != 6 ) { exception = (nlohmann::json_abi_v3_11_2::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = 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>>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_2::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"type must be number, but is ", &v5); ZN8nlohmann16json_abi_v3_11_26detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_2::detail::type_error, nlohmann::json_abi_v3_11_2::detail::exception::~exception); } } result = *((_QWORD *)a1 + 1); LABEL_6: *a2 = result; return result; }
181
ftxui::animation::easing::ElasticInOut(float)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/animation.cpp
float ElasticInOut(float p) { if (p < 0.5f) { return 0.5f * std::sin(13.f * kPi2 * (2.f * p)) * std::pow(2.f, 10.f * ((2.f * p) - 1.f)); } return 0.5f * (std::sin(-13.f * kPi2 * ((2.f * p - 1.f) + 1.f)) * std::pow(2.f, -10.f * (2.f * p - 1.f)) + 2.f); }
O0
cpp
ftxui::animation::easing::ElasticInOut(float): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movss %xmm0, -0x8(%rbp) movss 0x1392f(%rip), %xmm0 # 0x90fb4 ucomiss -0x8(%rbp), %xmm0 jbe 0x7d701 movss 0x148d9(%rip), %xmm1 # 0x91f6c mulss -0x8(%rbp), %xmm1 movss 0x160f4(%rip), %xmm0 # 0x93794 mulss %xmm1, %xmm0 callq 0x7de00 movaps %xmm0, %xmm1 movss 0x13900(%rip), %xmm0 # 0x90fb4 mulss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) movss -0x8(%rbp), %xmm0 addss %xmm0, %xmm0 movss 0x148a2(%rip), %xmm1 # 0x91f70 addss %xmm1, %xmm0 movss 0x160a6(%rip), %xmm1 # 0x93780 mulss %xmm0, %xmm1 movss 0x14886(%rip), %xmm0 # 0x91f6c callq 0x7de60 movaps %xmm0, %xmm1 movss -0xc(%rbp), %xmm0 mulss %xmm1, %xmm0 movss %xmm0, -0x4(%rbp) jmp 0x7d78c movss -0x8(%rbp), %xmm1 addss %xmm1, %xmm1 movss 0x1485e(%rip), %xmm0 # 0x91f70 addss %xmm0, %xmm1 movss 0x1389e(%rip), %xmm0 # 0x90fbc addss %xmm0, %xmm1 movss 0x1606e(%rip), %xmm0 # 0x93798 mulss %xmm1, %xmm0 callq 0x7de00 movss %xmm0, -0x10(%rbp) movss -0x8(%rbp), %xmm0 addss %xmm0, %xmm0 movss 0x14827(%rip), %xmm1 # 0x91f70 addss %xmm1, %xmm0 movss 0x1602f(%rip), %xmm1 # 0x93784 mulss %xmm0, %xmm1 movss 0x1480b(%rip), %xmm0 # 0x91f6c callq 0x7de60 movss -0x10(%rbp), %xmm1 mulss %xmm0, %xmm1 movss 0x147f5(%rip), %xmm0 # 0x91f6c addss %xmm0, %xmm1 movss 0x13831(%rip), %xmm0 # 0x90fb4 mulss %xmm1, %xmm0 movss %xmm0, -0x4(%rbp) movss -0x4(%rbp), %xmm0 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN5ftxui9animation6easing12ElasticInOutEf: push rbp mov rbp, rsp sub rsp, 10h movss [rbp+var_8], xmm0 movss xmm0, cs:dword_90FB4 ucomiss xmm0, [rbp+var_8] jbe short loc_7D701 movss xmm1, cs:flt_91F6C mulss xmm1, [rbp+var_8] movss xmm0, cs:dword_93794 mulss xmm0, xmm1; float call _ZSt3sinf; std::sin(float) movaps xmm1, xmm0 movss xmm0, cs:dword_90FB4 mulss xmm0, xmm1 movss [rbp+var_C], xmm0 movss xmm0, [rbp+var_8] addss xmm0, xmm0 movss xmm1, cs:dword_91F70 addss xmm0, xmm1 movss xmm1, cs:dword_93780 mulss xmm1, xmm0; float movss xmm0, cs:flt_91F6C; float call _ZSt3powff; std::pow(float,float) movaps xmm1, xmm0 movss xmm0, [rbp+var_C] mulss xmm0, xmm1 movss [rbp+var_4], xmm0 jmp loc_7D78C loc_7D701: movss xmm1, [rbp+var_8] addss xmm1, xmm1 movss xmm0, cs:dword_91F70 addss xmm1, xmm0 movss xmm0, cs:dword_90FBC addss xmm1, xmm0 movss xmm0, cs:dword_93798 mulss xmm0, xmm1; float call _ZSt3sinf; std::sin(float) movss [rbp+var_10], xmm0 movss xmm0, [rbp+var_8] addss xmm0, xmm0 movss xmm1, cs:dword_91F70 addss xmm0, xmm1 movss xmm1, cs:dword_93784 mulss xmm1, xmm0; float movss xmm0, cs:flt_91F6C; float call _ZSt3powff; std::pow(float,float) movss xmm1, [rbp+var_10] mulss xmm1, xmm0 movss xmm0, cs:flt_91F6C addss xmm1, xmm0 movss xmm0, cs:dword_90FB4 mulss xmm0, xmm1 movss [rbp+var_4], xmm0 loc_7D78C: movss xmm0, [rbp+var_4] add rsp, 10h pop rbp retn
float ftxui::animation::easing::ElasticInOut(ftxui::animation::easing *this, float a2) { float v2; // xmm0_4 if ( a2 >= 0.5 ) { std::sin(-20.420353 * (float)((float)((float)(a2 + a2) + -1.0) + 1.0)); std::pow(2.0, -10.0 * (float)((float)(a2 + a2) + -1.0)); return 0.5 * (float)((float)((float)(-20.420353 * (float)((float)((float)(a2 + a2) + -1.0) + 1.0)) * 2.0) + 2.0); } else { v2 = 20.420353 * (float)(2.0 * a2); std::sin(v2); std::pow(2.0, 10.0 * (float)((float)(a2 + a2) + -1.0)); return (float)(0.5 * v2) * 2.0; } }
ElasticInOut: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOVSS dword ptr [RBP + -0x8],XMM0 MOVSS XMM0,dword ptr [0x00190fb4] UCOMISS XMM0,dword ptr [RBP + -0x8] JBE 0x0017d701 MOVSS XMM1,dword ptr [0x00191f6c] MULSS XMM1,dword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [0x00193794] MULSS XMM0,XMM1 CALL 0x0017de00 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [0x00190fb4] MULSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8] ADDSS XMM0,XMM0 MOVSS XMM1,dword ptr [0x00191f70] ADDSS XMM0,XMM1 MOVSS XMM1,dword ptr [0x00193780] MULSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x00191f6c] CALL 0x0017de60 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] MULSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x0017d78c LAB_0017d701: MOVSS XMM1,dword ptr [RBP + -0x8] ADDSS XMM1,XMM1 MOVSS XMM0,dword ptr [0x00191f70] ADDSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x00190fbc] ADDSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x00193798] MULSS XMM0,XMM1 CALL 0x0017de00 MOVSS dword ptr [RBP + -0x10],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8] ADDSS XMM0,XMM0 MOVSS XMM1,dword ptr [0x00191f70] ADDSS XMM0,XMM1 MOVSS XMM1,dword ptr [0x00193784] MULSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x00191f6c] CALL 0x0017de60 MOVSS XMM1,dword ptr [RBP + -0x10] MULSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x00191f6c] ADDSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x00190fb4] MULSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x4],XMM0 LAB_0017d78c: MOVSS XMM0,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
/* ftxui::animation::easing::ElasticInOut(float) */ float ftxui::animation::easing::ElasticInOut(float param_1) { float fVar1; float fVar2; int4 local_c; if (DAT_00190fb4 <= param_1) { fVar1 = (float)std::sin(DAT_00193798 * (param_1 + param_1 + DAT_00191f70 + DAT_00190fbc)); fVar2 = (float)std::pow(DAT_00191f6c,DAT_00193784 * (param_1 + param_1 + DAT_00191f70)); local_c = DAT_00190fb4 * (fVar1 * fVar2 + DAT_00191f6c); } else { local_c = (float)std::sin(DAT_00193794 * DAT_00191f6c * param_1); local_c = DAT_00190fb4 * local_c; fVar1 = (float)std::pow(DAT_00191f6c,DAT_00193780 * (param_1 + param_1 + DAT_00191f70)); local_c = local_c * fVar1; } return local_c; }
182
mi_read_rnd_dynamic_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_read_rnd_dynamic_record(MI_INFO *info, uchar *buf, register my_off_t filepos, my_bool skip_deleted_blocks) { int block_of_record, info_read, save_errno; uint left_len,b_type; uchar *UNINIT_VAR(to); MI_BLOCK_INFO block_info; MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_read_rnd_dynamic_record"); info_read=0; if (info->lock_type == F_UNLCK) { #ifndef UNSAFE_LOCKING if (share->tot_locks == 0) { if (my_lock(share->kfile,F_RDLCK,0L,F_TO_EOF, MYF(MY_SEEK_NOT_DONE) | info->lock_wait)) DBUG_RETURN(my_errno); } #else info->tmp_lock_type=F_RDLCK; #endif } else info_read=1; /* memory-keyinfoblock is ok */ block_of_record= 0; /* First block of record is numbered as zero. */ block_info.second_read= 0; left_len=1; do { if (filepos >= info->state->data_file_length) { if (!info_read) { /* Check if changed */ info_read=1; info->rec_cache.seek_not_done=1; if (mi_state_info_read_dsk(share->kfile,&share->state,1)) goto panic; } if (filepos >= info->state->data_file_length) { my_errno= HA_ERR_END_OF_FILE; goto err; } } if (info->opt_flag & READ_CACHE_USED) { if (_mi_read_cache(&info->rec_cache,(uchar*) block_info.header,filepos, sizeof(block_info.header), (!block_of_record && skip_deleted_blocks ? READING_NEXT : 0) | READING_HEADER)) goto panic; b_type=_mi_get_block_info(&block_info,-1,filepos); } else { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file < filepos + MI_BLOCK_INFO_HEADER_LENGTH && flush_io_cache(&info->rec_cache)) DBUG_RETURN(my_errno); info->rec_cache.seek_not_done=1; b_type=_mi_get_block_info(&block_info,info->dfile,filepos); } if (b_type & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if ((b_type & (BLOCK_DELETED | BLOCK_SYNC_ERROR))) { if (skip_deleted_blocks) { filepos=block_info.filepos+block_info.block_len; block_info.second_read=0; continue; /* Search after next_record */ } /* If we're not on the first block of a record and the block is marked as deleted or out of sync, something's gone wrong: the record is damaged. */ if (block_of_record != 0) goto panic; my_errno=HA_ERR_RECORD_DELETED; info->lastpos=block_info.filepos; info->nextpos=block_info.filepos+block_info.block_len; } goto err; } if (block_of_record == 0) /* First block */ { if (block_info.rec_len > (uint) share->base.max_pack_length) goto panic; info->lastpos=filepos; if (share->base.blobs) { if (!(to= mi_alloc_rec_buff(info, block_info.rec_len, &info->rec_buff))) goto err; } else to= info->rec_buff; left_len=block_info.rec_len; } if (left_len < block_info.data_len) goto panic; /* Wrong linked record */ /* copy information that is already read */ { uint offset=(uint) (block_info.filepos - filepos); uint tmp_length= (sizeof(block_info.header) - offset); filepos=block_info.filepos; if (tmp_length > block_info.data_len) tmp_length= block_info.data_len; if (tmp_length) { memcpy((uchar*) to, block_info.header+offset,tmp_length); block_info.data_len-=tmp_length; left_len-=tmp_length; to+=tmp_length; filepos+=tmp_length; } } /* read rest of record from file */ if (block_info.data_len) { if (info->opt_flag & READ_CACHE_USED) { if (_mi_read_cache(&info->rec_cache,(uchar*) to,filepos, block_info.data_len, (!block_of_record && skip_deleted_blocks) ? READING_NEXT : 0)) goto panic; } else { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file < block_info.filepos + block_info.data_len && flush_io_cache(&info->rec_cache)) goto err; /* mysql_file_seek(info->dfile, filepos, MY_SEEK_SET, MYF(0)); */ if (mysql_file_read(info->dfile, (uchar*) to, block_info.data_len, MYF(MY_NABP))) { if (my_errno == HA_ERR_FILE_TOO_SHORT) my_errno= HA_ERR_WRONG_IN_RECORD; /* Unexpected end of file */ goto err; } } } /* Increment block-of-record counter. If it was the first block, remember the position behind the block for the next call. */ if (block_of_record++ == 0) { info->nextpos= block_info.filepos + block_info.block_len; skip_deleted_blocks= 0; } left_len-=block_info.data_len; to+=block_info.data_len; filepos=block_info.next_filepos; } while (left_len); info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; fast_mi_writeinfo(info); if (_mi_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) != MY_FILE_ERROR) DBUG_RETURN(0); DBUG_RETURN(my_errno); /* Wrong record */ panic: my_errno=HA_ERR_WRONG_IN_RECORD; /* Something is fatal wrong */ err: save_errno=my_errno; (void) _mi_writeinfo(info,0); DBUG_RETURN(my_errno=save_errno); }
O3
c
mi_read_rnd_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movl %ecx, %r13d movq %rdx, %r14 movq %rsi, -0xd0(%rbp) movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movl $0x1, %r15d cmpl $0x2, 0x1f4(%rdi) movl $0x1, %ecx movq %rcx, -0xa8(%rbp) movq %rax, -0xb0(%rbp) jne 0x308cd movq $0x0, -0xa8(%rbp) cmpl $0x0, 0x368(%rax) je 0x30cfe leaq -0x88(%rbp), %rax movl $0x0, 0x50(%rax) leaq 0x220(%rbx), %rax movq %rax, -0xa0(%rbp) leaq 0x120(%rbx), %rax movq %rax, -0xc8(%rbp) movl $0x0, -0x8c(%rbp) movq %rbx, -0xd8(%rbp) movq 0x8(%rbx), %rax movq 0x28(%rax), %rax cmpq %rax, %r14 jb 0x30964 cmpl $0x0, -0xa8(%rbp) jne 0x3094f movl $0x1, 0x300(%rbx) movq -0xb0(%rbp), %rsi movl 0x350(%rsi), %edi movl $0x1, %edx callq 0x3710c testl %eax, %eax jne 0x30d4d movq 0x8(%rbx), %rax movq 0x28(%rax), %rax movl $0x1, %ecx movq %rcx, -0xa8(%rbp) cmpq %rax, %r14 jae 0x30d37 movl 0x1c8(%rbx), %eax testb $0x2, %al jne 0x309ad testb $0x10, %al je 0x3099b leaq 0x14(%r14), %rax movq -0xa0(%rbp), %rcx cmpq %rax, (%rcx) jae 0x3099b movq -0xa0(%rbp), %rdi movl $0x1, %esi callq 0x506dd testl %eax, %eax jne 0x30d2d movl $0x1, 0x300(%rbx) movl 0x1c0(%rbx), %esi jmp 0x309ef cmpl $0x0, -0x8c(%rbp) sete %al testb %r13b, %r13b setne %cl andb %al, %cl movzbl %cl, %r8d orl $0x2, %r8d movl $0x14, %ecx movq -0xa0(%rbp), %rdi leaq -0x88(%rbp), %rsi movq %r14, %rdx callq 0x48768 movl $0xffffffff, %esi # imm = 0xFFFFFFFF testl %eax, %eax jne 0x30d4d leaq -0x88(%rbp), %rdi movq %r14, %rdx callq 0x2f37b cmpl $0x4, %eax jae 0x30a69 cmpl $0x0, -0x8c(%rbp) jne 0x30aa2 movq -0x70(%rbp), %rcx movq -0xb0(%rbp), %rax movl 0x158(%rax), %eax cmpq %rax, %rcx ja 0x30d4d movq %rcx, %rsi movq %r14, 0x170(%rbx) movq -0xb0(%rbp), %rax cmpl $0x0, 0x188(%rax) je 0x30a8e movq %rbx, %rdi movq -0xc8(%rbp), %rdx callq 0x36c65 movq %rax, -0x98(%rbp) testq %rax, %rax je 0x30d58 movq -0x70(%rbp), %r15 jmp 0x30aa2 testb $0x14, %al je 0x30d58 testb %r13b, %r13b je 0x30d44 movq -0x60(%rbp), %r14 addq -0x50(%rbp), %r14 movl $0x0, -0x38(%rbp) jmp 0x30c4b movq -0xc8(%rbp), %rax movq (%rax), %rax movq %rax, -0x98(%rbp) movq %rsi, %r15 movq %r15, -0xb8(%rbp) movl %r15d, %eax movq -0x68(%rbp), %r15 cmpq %rax, %r15 ja 0x30d4d movl %r13d, -0xbc(%rbp) movq -0x50(%rbp), %r12 movq %r12, %rax subq %r14, %rax movl $0x14, %ecx subl %eax, %ecx cmpq %rcx, %r15 movl %r15d, %r13d cmovael %ecx, %r13d testl %r13d, %r13d je 0x30b2b movl %eax, %eax leaq (%rax,%rbp), %rsi addq $-0x88, %rsi movl %r13d, %r14d movq -0x98(%rbp), %rbx movq %rbx, %rdi movq %r14, %rdx callq 0x282c0 movq -0x68(%rbp), %r15 subq %r14, %r15 movq %r15, -0x68(%rbp) movq -0xb8(%rbp), %rax subl %r13d, %eax movq %rax, -0xb8(%rbp) addq %r14, %rbx movq %rbx, -0x98(%rbp) addq %r14, %r12 testq %r15, %r15 movl -0xbc(%rbp), %r13d movq -0xd8(%rbp), %rbx je 0x30c0e movl 0x1c8(%rbx), %eax testb $0x2, %al jne 0x30bd7 testb $0x10, %al je 0x30b84 movq -0x50(%rbp), %rax addq %r15, %rax movq -0xa0(%rbp), %rcx cmpq %rax, (%rcx) jae 0x30b84 movq -0xa0(%rbp), %rdi movl $0x1, %esi callq 0x506dd testl %eax, %eax jne 0x30d58 movq -0x68(%rbp), %r15 movl 0x1c0(%rbx), %r14d leaq 0x2ff2be(%rip), %rax # 0x32fe50 movq (%rax), %rax leaq -0x120(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x30c56 movl $0x4, %ecx movl %r14d, %edi movq -0x98(%rbp), %rsi movq %r15, %rdx callq 0x5ad50 movq %rax, %r14 testq %r14, %r14 je 0x30c0e jmp 0x30db9 cmpl $0x0, -0x8c(%rbp) sete %al testb %r13b, %r13b setne %cl andb %al, %cl movzbl %cl, %r8d movq -0xa0(%rbp), %rdi movq -0x98(%rbp), %rsi movq %r12, %rdx movq %r15, %rcx callq 0x48768 testl %eax, %eax jne 0x30d4d movl -0x8c(%rbp), %ecx testl %ecx, %ecx jne 0x30c2a movq -0x60(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, 0x178(%rbx) xorl %r13d, %r13d incl %ecx movl %ecx, -0x8c(%rbp) movq -0x68(%rbp), %rax movq -0x48(%rbp), %r14 movq -0xb8(%rbp), %r15 subl %eax, %r15d addq %rax, -0x98(%rbp) testl %r15d, %r15d jne 0x30908 jmp 0x30cbc movq %rax, %r12 leaq 0x2ff1f0(%rip), %rax # 0x32fe50 movq (%rax), %rax movq %r12, %rdi movq %r15, %rsi leaq 0x6086b(%rip), %rdx # 0x914db movl $0x743, %ecx # imm = 0x743 callq *0x210(%rax) movl $0x4, %ecx movl %r14d, %edi movq -0x98(%rbp), %rsi movq %r15, %rdx callq 0x5ad50 movq %rax, %r14 testq %rax, %rax movl $0x0, %eax cmovneq %rax, %r15 leaq 0x2ff1a8(%rip), %rax # 0x32fe50 movq (%rax), %rax movq %r12, %rdi movq %r15, %rsi callq *0x218(%rax) jmp 0x30bcd orb $-0x7e, 0x1d0(%rbx) movq (%rbx), %rax cmpl $0x0, 0x368(%rax) jne 0x30cd9 movq %rbx, %rdi xorl %esi, %esi callq 0x3387e movq 0x120(%rbx), %rdx movq -0x70(%rbp), %rcx movq %rbx, %rdi movq -0xd0(%rbp), %rsi callq 0x2fc35 xorl %r14d, %r14d cmpq $-0x1, %rax jne 0x30d72 jmp 0x30d2d movl 0x350(%rax), %edi movq 0x330(%rbx), %r8 orq $0x20, %r8 movq $0x0, -0xa8(%rbp) xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x59f70 testl %eax, %eax je 0x308cd callq 0x5be8e movl (%rax), %r14d jmp 0x30d72 callq 0x5be8e movl $0x89, (%rax) jmp 0x30d58 cmpl $0x0, -0x8c(%rbp) je 0x30d96 callq 0x5be8e movl $0x7f, (%rax) callq 0x5be8e movl (%rax), %r14d movq %rbx, %rdi xorl %esi, %esi callq 0x3387e callq 0x5be8e movl %r14d, (%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x30dc8 movl %r14d, %eax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x5be8e movl $0x86, (%rax) movq -0x50(%rbp), %rax movq %rax, 0x170(%rbx) addq -0x60(%rbp), %rax movq %rax, 0x178(%rbx) jmp 0x30d58 callq 0x5be8e cmpl $0xaf, (%rax) je 0x30d4d jmp 0x30d58 callq 0x283f0
_mi_read_rnd_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r13d, ecx mov r14, rdx mov [rbp+var_D0], rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov r15d, 1 cmp dword ptr [rdi+1F4h], 2 mov ecx, 1 mov [rbp+var_A8], rcx mov [rbp+var_B0], rax jnz short loc_308CD mov [rbp+var_A8], 0 cmp dword ptr [rax+368h], 0 jz loc_30CFE loc_308CD: lea rax, [rbp+var_88] mov dword ptr [rax+50h], 0 lea rax, [rbx+220h] mov [rbp+var_A0], rax lea rax, [rbx+120h] mov [rbp+var_C8], rax mov [rbp+var_8C], 0 mov [rbp+var_D8], rbx loc_30908: mov rax, [rbx+8] mov rax, [rax+28h] cmp r14, rax jb short loc_30964 cmp dword ptr [rbp+var_A8], 0 jnz short loc_3094F mov dword ptr [rbx+300h], 1 mov rsi, [rbp+var_B0] mov edi, [rsi+350h] mov edx, 1 call mi_state_info_read_dsk test eax, eax jnz loc_30D4D mov rax, [rbx+8] mov rax, [rax+28h] loc_3094F: mov ecx, 1 mov [rbp+var_A8], rcx cmp r14, rax jnb loc_30D37 loc_30964: mov eax, [rbx+1C8h] test al, 2 jnz short loc_309AD test al, 10h jz short loc_3099B lea rax, [r14+14h] mov rcx, [rbp+var_A0] cmp [rcx], rax jnb short loc_3099B mov rdi, [rbp+var_A0] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz loc_30D2D loc_3099B: mov dword ptr [rbx+300h], 1 mov esi, [rbx+1C0h] jmp short loc_309EF loc_309AD: cmp [rbp+var_8C], 0 setz al test r13b, r13b setnz cl and cl, al movzx r8d, cl or r8d, 2 mov ecx, 14h mov rdi, [rbp+var_A0] lea rsi, [rbp+var_88] mov rdx, r14 call _mi_read_cache mov esi, 0FFFFFFFFh test eax, eax jnz loc_30D4D loc_309EF: lea rdi, [rbp+var_88] mov rdx, r14 call _mi_get_block_info cmp eax, 4 jnb short loc_30A69 cmp [rbp+var_8C], 0 jnz loc_30AA2 mov rcx, [rbp+var_70] mov rax, [rbp+var_B0] mov eax, [rax+158h] cmp rcx, rax ja loc_30D4D mov rsi, rcx mov [rbx+170h], r14 mov rax, [rbp+var_B0] cmp dword ptr [rax+188h], 0 jz short loc_30A8E mov rdi, rbx mov rdx, [rbp+var_C8] call mi_alloc_rec_buff mov [rbp+var_98], rax test rax, rax jz loc_30D58 mov r15, [rbp+var_70] jmp short loc_30AA2 loc_30A69: test al, 14h jz loc_30D58 test r13b, r13b jz loc_30D44 mov r14, [rbp+var_60] add r14, [rbp+var_50] mov [rbp+var_38], 0 jmp loc_30C4B loc_30A8E: mov rax, [rbp+var_C8] mov rax, [rax] mov [rbp+var_98], rax mov r15, rsi loc_30AA2: mov [rbp+var_B8], r15 mov eax, r15d mov r15, [rbp+var_68] cmp r15, rax ja loc_30D4D mov [rbp+var_BC], r13d mov r12, [rbp+var_50] mov rax, r12 sub rax, r14 mov ecx, 14h sub ecx, eax cmp r15, rcx mov r13d, r15d cmovnb r13d, ecx test r13d, r13d jz short loc_30B2B mov eax, eax lea rsi, [rax+rbp] add rsi, 0FFFFFFFFFFFFFF78h mov r14d, r13d mov rbx, [rbp+var_98] mov rdi, rbx mov rdx, r14 call _memcpy mov r15, [rbp+var_68] sub r15, r14 mov [rbp+var_68], r15 mov rax, [rbp+var_B8] sub eax, r13d mov [rbp+var_B8], rax add rbx, r14 mov [rbp+var_98], rbx add r12, r14 loc_30B2B: test r15, r15 mov r13d, [rbp+var_BC] mov rbx, [rbp+var_D8] jz loc_30C0E mov eax, [rbx+1C8h] test al, 2 jnz loc_30BD7 test al, 10h jz short loc_30B84 mov rax, [rbp+var_50] add rax, r15 mov rcx, [rbp+var_A0] cmp [rcx], rax jnb short loc_30B84 mov rdi, [rbp+var_A0] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz loc_30D58 mov r15, [rbp+var_68] loc_30B84: mov r14d, [rbx+1C0h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_120] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_30C56 mov ecx, 4 mov edi, r14d mov rsi, [rbp+var_98] mov rdx, r15 call my_read mov r14, rax loc_30BCD: test r14, r14 jz short loc_30C0E jmp loc_30DB9 loc_30BD7: cmp [rbp+var_8C], 0 setz al test r13b, r13b setnz cl and cl, al movzx r8d, cl mov rdi, [rbp+var_A0] mov rsi, [rbp+var_98] mov rdx, r12 mov rcx, r15 call _mi_read_cache test eax, eax jnz loc_30D4D loc_30C0E: mov ecx, [rbp+var_8C] test ecx, ecx jnz short loc_30C2A mov rax, [rbp+var_60] add rax, [rbp+var_50] mov [rbx+178h], rax xor r13d, r13d loc_30C2A: inc ecx mov [rbp+var_8C], ecx mov rax, [rbp+var_68] mov r14, [rbp+var_48] mov r15, [rbp+var_B8] sub r15d, eax add [rbp+var_98], rax loc_30C4B: test r15d, r15d jnz loc_30908 jmp short loc_30CBC loc_30C56: mov r12, rax lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov rsi, r15 lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 743h call qword ptr [rax+210h] mov ecx, 4 mov edi, r14d mov rsi, [rbp+var_98] mov rdx, r15 call my_read mov r14, rax test rax, rax mov eax, 0 cmovnz r15, rax lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov rsi, r15 call qword ptr [rax+218h] jmp loc_30BCD loc_30CBC: or byte ptr [rbx+1D0h], 82h mov rax, [rbx] cmp dword ptr [rax+368h], 0 jnz short loc_30CD9 mov rdi, rbx xor esi, esi call _mi_writeinfo loc_30CD9: mov rdx, [rbx+120h] mov rcx, [rbp+var_70] mov rdi, rbx mov rsi, [rbp+var_D0] call _mi_rec_unpack xor r14d, r14d cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_30D72 jmp short loc_30D2D loc_30CFE: mov edi, [rax+350h] mov r8, [rbx+330h] or r8, 20h mov [rbp+var_A8], 0 xor esi, esi xor edx, edx xor ecx, ecx call my_lock test eax, eax jz loc_308CD loc_30D2D: call _my_thread_var mov r14d, [rax] jmp short loc_30D72 loc_30D37: call _my_thread_var mov dword ptr [rax], 89h jmp short loc_30D58 loc_30D44: cmp [rbp+var_8C], 0 jz short loc_30D96 loc_30D4D: call _my_thread_var mov dword ptr [rax], 7Fh loc_30D58: call _my_thread_var mov r14d, [rax] mov rdi, rbx xor esi, esi call _mi_writeinfo call _my_thread_var mov [rax], r14d loc_30D72: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_30DC8 mov eax, r14d add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_30D96: call _my_thread_var mov dword ptr [rax], 86h mov rax, [rbp+var_50] mov [rbx+170h], rax add rax, [rbp+var_60] mov [rbx+178h], rax jmp short loc_30D58 loc_30DB9: call _my_thread_var cmp dword ptr [rax], 0AFh jz short loc_30D4D jmp short loc_30D58 loc_30DC8: call ___stack_chk_fail
long long mi_read_rnd_dynamic_record(unsigned long long a1, _WORD *a2, unsigned long long a3, int a4) { long long v6; // rbx unsigned int *v7; // rax long long v8; // r15 bool v9; // zf unsigned long long v10; // rax int v11; // eax long long v12; // rsi unsigned int block_info; // eax unsigned long long v14; // rcx unsigned long long v15; // rsi unsigned long long v16; // rax unsigned long long v17; // r15 long long v18; // r12 unsigned int v19; // r13d long long v20; // rbx int v21; // eax unsigned int v22; // r14d long long v23; // rax long long v24; // r14 int v25; // ecx _BYTE *v26; // r12 unsigned int v27; // r14d long long v28; // r8 long long v30; // rax _BYTE v31[72]; // [rsp+0h] [rbp-120h] BYREF long long v32; // [rsp+48h] [rbp-D8h] _WORD *v33; // [rsp+50h] [rbp-D0h] long long *v34; // [rsp+58h] [rbp-C8h] int v35; // [rsp+64h] [rbp-BCh] long long v36; // [rsp+68h] [rbp-B8h] unsigned int *v37; // [rsp+70h] [rbp-B0h] long long v38; // [rsp+78h] [rbp-A8h] _QWORD *v39; // [rsp+80h] [rbp-A0h] long long v40; // [rsp+88h] [rbp-98h] int v41; // [rsp+94h] [rbp-8Ch] _BYTE v42[24]; // [rsp+98h] [rbp-88h] BYREF unsigned long long v43; // [rsp+B0h] [rbp-70h] unsigned long long v44; // [rsp+B8h] [rbp-68h] long long v45; // [rsp+C0h] [rbp-60h] long long v46; // [rsp+D0h] [rbp-50h] unsigned long long v47; // [rsp+D8h] [rbp-48h] int v48; // [rsp+E8h] [rbp-38h] unsigned long long v49; // [rsp+F0h] [rbp-30h] v33 = a2; v6 = a1; v49 = __readfsqword(0x28u); v7 = *(unsigned int **)a1; v8 = 1LL; v9 = *(_DWORD *)(a1 + 500) == 2; v38 = 1LL; v37 = v7; if ( v9 ) { v38 = 0LL; if ( !v7[218] ) { a1 = v7[212]; v28 = *(_QWORD *)(v6 + 816) | 0x20LL; v38 = 0LL; if ( (unsigned int)my_lock(a1, 0LL, 0LL, 0LL, v28) ) return *(unsigned int *)my_thread_var(a1); } } v48 = 0; v39 = (_QWORD *)(v6 + 544); v34 = (long long *)(v6 + 288); v41 = 0; v32 = v6; do { v10 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 40LL); if ( a3 >= v10 ) { if ( !(_DWORD)v38 ) { *(_DWORD *)(v6 + 768) = 1; a1 = v37[212]; if ( (unsigned int)mi_state_info_read_dsk(a1, v37, 1LL) ) goto LABEL_57; v10 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 40LL); } v38 = 1LL; if ( a3 >= v10 ) { *(_DWORD *)my_thread_var(a1) = 137; goto LABEL_58; } } v11 = *(_DWORD *)(v6 + 456); if ( (v11 & 2) != 0 ) { a1 = (unsigned long long)v39; v12 = 0xFFFFFFFFLL; if ( (unsigned int)mi_read_cache(v39, v42, a3, 20LL, (v41 == 0 && (_BYTE)a4 != 0) | 2u) ) goto LABEL_57; } else { if ( (v11 & 0x10) != 0 && *v39 < a3 + 20 ) { a1 = (unsigned long long)v39; if ( (unsigned int)my_b_flush_io_cache(v39, 1LL) ) return *(unsigned int *)my_thread_var(a1); } *(_DWORD *)(v6 + 768) = 1; v12 = *(unsigned int *)(v6 + 448); } a1 = (unsigned long long)v42; block_info = mi_get_block_info((long long)v42, v12, a3); if ( block_info >= 4 ) { if ( (block_info & 0x14) == 0 ) goto LABEL_58; if ( !(_BYTE)a4 ) { if ( v41 ) goto LABEL_57; *(_DWORD *)my_thread_var(v42) = 134; v30 = v46; *(_QWORD *)(v6 + 368) = v46; *(_QWORD *)(v6 + 376) = v45 + v30; LABEL_58: v27 = *(_DWORD *)my_thread_var(a1); mi_writeinfo(v6, 0LL); *(_DWORD *)my_thread_var(v6) = v27; return v27; } a3 = v46 + v45; v48 = 0; } else { if ( !v41 ) { v14 = v43; if ( v43 > v37[86] ) goto LABEL_57; v15 = v43; *(_QWORD *)(v6 + 368) = a3; if ( v37[98] ) { a1 = v6; v40 = mi_alloc_rec_buff(v6, v15, v34); if ( !v40 ) goto LABEL_58; v8 = v43; } else { v40 = *v34; v8 = v14; } } v36 = v8; v16 = (unsigned int)v8; v17 = v44; if ( v44 > v16 ) goto LABEL_57; v35 = a4; v18 = v46; v19 = v44; if ( v44 >= (unsigned int)(20 - (v46 - a3)) ) v19 = 20 - (v46 - a3); if ( v19 ) { v20 = v40; a1 = v40; memcpy(v40, &v42[(unsigned int)(v46 - a3)], v19); v17 = v44 - v19; v44 = v17; v36 = (unsigned int)v36 - v19; v40 = v19 + v20; v18 += v19; } a4 = v35; v6 = v32; if ( v17 ) { v21 = *(_DWORD *)(v32 + 456); if ( (v21 & 2) != 0 ) { a1 = (unsigned long long)v39; if ( (unsigned int)mi_read_cache(v39, v40, v18, v17, (v41 == 0) & (unsigned __int8)((_BYTE)v35 != 0)) ) goto LABEL_57; } else { if ( (v21 & 0x10) != 0 && *v39 < v17 + v46 ) { a1 = (unsigned long long)v39; if ( (unsigned int)my_b_flush_io_cache(v39, 1LL) ) goto LABEL_58; v17 = v44; } v22 = *(_DWORD *)(v6 + 448); v23 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v31, v22, 6LL); if ( v23 ) { v26 = (_BYTE *)v23; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v23, v17, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 1859LL); v24 = my_read(v22, v40, v17, 4LL); if ( v24 ) v17 = 0LL; a1 = (unsigned long long)v26; ((void ( *)(_BYTE *, unsigned long long))PSI_server[67])(v26, v17); } else { a1 = v22; v24 = my_read(v22, v40, v17, 4LL); } if ( v24 ) { if ( *(_DWORD *)my_thread_var(a1) != 175 ) goto LABEL_58; LABEL_57: *(_DWORD *)my_thread_var(a1) = 127; goto LABEL_58; } } } v25 = v41; if ( !v41 ) { *(_QWORD *)(v6 + 376) = v46 + v45; a4 = 0; } v41 = v25 + 1; a3 = v47; v8 = (unsigned int)(v36 - v44); v40 += v44; } } while ( (_DWORD)v8 ); *(_BYTE *)(v6 + 464) |= 0x82u; if ( !*(_DWORD *)(*(_QWORD *)v6 + 872LL) ) mi_writeinfo(v6, 0LL); a1 = v6; v27 = 0; if ( mi_rec_unpack(v6, v33, *(unsigned __int8 **)(v6 + 288), v43) == -1 ) return *(unsigned int *)my_thread_var(a1); return v27; }
_mi_read_rnd_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R13D,ECX MOV R14,RDX MOV qword ptr [RBP + -0xd0],RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV R15D,0x1 CMP dword ptr [RDI + 0x1f4],0x2 MOV ECX,0x1 MOV qword ptr [RBP + -0xa8],RCX MOV qword ptr [RBP + -0xb0],RAX JNZ 0x001308cd MOV qword ptr [RBP + -0xa8],0x0 CMP dword ptr [RAX + 0x368],0x0 JZ 0x00130cfe LAB_001308cd: LEA RAX,[RBP + -0x88] MOV dword ptr [RAX + 0x50],0x0 LEA RAX,[RBX + 0x220] MOV qword ptr [RBP + -0xa0],RAX LEA RAX,[RBX + 0x120] MOV qword ptr [RBP + -0xc8],RAX MOV dword ptr [RBP + -0x8c],0x0 MOV qword ptr [RBP + -0xd8],RBX LAB_00130908: MOV RAX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RAX + 0x28] CMP R14,RAX JC 0x00130964 CMP dword ptr [RBP + -0xa8],0x0 JNZ 0x0013094f MOV dword ptr [RBX + 0x300],0x1 MOV RSI,qword ptr [RBP + -0xb0] MOV EDI,dword ptr [RSI + 0x350] MOV EDX,0x1 CALL 0x0013710c TEST EAX,EAX JNZ 0x00130d4d MOV RAX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RAX + 0x28] LAB_0013094f: MOV ECX,0x1 MOV qword ptr [RBP + -0xa8],RCX CMP R14,RAX JNC 0x00130d37 LAB_00130964: MOV EAX,dword ptr [RBX + 0x1c8] TEST AL,0x2 JNZ 0x001309ad TEST AL,0x10 JZ 0x0013099b LEA RAX,[R14 + 0x14] MOV RCX,qword ptr [RBP + -0xa0] CMP qword ptr [RCX],RAX JNC 0x0013099b MOV RDI,qword ptr [RBP + -0xa0] MOV ESI,0x1 CALL 0x001506dd TEST EAX,EAX JNZ 0x00130d2d LAB_0013099b: MOV dword ptr [RBX + 0x300],0x1 MOV ESI,dword ptr [RBX + 0x1c0] JMP 0x001309ef LAB_001309ad: CMP dword ptr [RBP + -0x8c],0x0 SETZ AL TEST R13B,R13B SETNZ CL AND CL,AL MOVZX R8D,CL OR R8D,0x2 MOV ECX,0x14 MOV RDI,qword ptr [RBP + -0xa0] LEA RSI,[RBP + -0x88] MOV RDX,R14 CALL 0x00148768 MOV ESI,0xffffffff TEST EAX,EAX JNZ 0x00130d4d LAB_001309ef: LEA RDI,[RBP + -0x88] MOV RDX,R14 CALL 0x0012f37b CMP EAX,0x4 JNC 0x00130a69 CMP dword ptr [RBP + -0x8c],0x0 JNZ 0x00130aa2 MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0xb0] MOV EAX,dword ptr [RAX + 0x158] CMP RCX,RAX JA 0x00130d4d MOV RSI,RCX MOV qword ptr [RBX + 0x170],R14 MOV RAX,qword ptr [RBP + -0xb0] CMP dword ptr [RAX + 0x188],0x0 JZ 0x00130a8e MOV RDI,RBX MOV RDX,qword ptr [RBP + -0xc8] CALL 0x00136c65 MOV qword ptr [RBP + -0x98],RAX TEST RAX,RAX JZ 0x00130d58 MOV R15,qword ptr [RBP + -0x70] JMP 0x00130aa2 LAB_00130a69: TEST AL,0x14 JZ 0x00130d58 TEST R13B,R13B JZ 0x00130d44 MOV R14,qword ptr [RBP + -0x60] ADD R14,qword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x38],0x0 JMP 0x00130c4b LAB_00130a8e: MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x98],RAX MOV R15,RSI LAB_00130aa2: MOV qword ptr [RBP + -0xb8],R15 MOV EAX,R15D MOV R15,qword ptr [RBP + -0x68] CMP R15,RAX JA 0x00130d4d MOV dword ptr [RBP + -0xbc],R13D MOV R12,qword ptr [RBP + -0x50] MOV RAX,R12 SUB RAX,R14 MOV ECX,0x14 SUB ECX,EAX CMP R15,RCX MOV R13D,R15D CMOVNC R13D,ECX TEST R13D,R13D JZ 0x00130b2b MOV EAX,EAX LEA RSI,[RAX + RBP*0x1] ADD RSI,-0x88 MOV R14D,R13D MOV RBX,qword ptr [RBP + -0x98] MOV RDI,RBX MOV RDX,R14 CALL 0x001282c0 MOV R15,qword ptr [RBP + -0x68] SUB R15,R14 MOV qword ptr [RBP + -0x68],R15 MOV RAX,qword ptr [RBP + -0xb8] SUB EAX,R13D MOV qword ptr [RBP + -0xb8],RAX ADD RBX,R14 MOV qword ptr [RBP + -0x98],RBX ADD R12,R14 LAB_00130b2b: TEST R15,R15 MOV R13D,dword ptr [RBP + -0xbc] MOV RBX,qword ptr [RBP + -0xd8] JZ 0x00130c0e MOV EAX,dword ptr [RBX + 0x1c8] TEST AL,0x2 JNZ 0x00130bd7 TEST AL,0x10 JZ 0x00130b84 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,R15 MOV RCX,qword ptr [RBP + -0xa0] CMP qword ptr [RCX],RAX JNC 0x00130b84 MOV RDI,qword ptr [RBP + -0xa0] MOV ESI,0x1 CALL 0x001506dd TEST EAX,EAX JNZ 0x00130d58 MOV R15,qword ptr [RBP + -0x68] LAB_00130b84: MOV R14D,dword ptr [RBX + 0x1c0] LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x120] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00130c56 MOV ECX,0x4 MOV EDI,R14D MOV RSI,qword ptr [RBP + -0x98] MOV RDX,R15 CALL 0x0015ad50 MOV R14,RAX LAB_00130bcd: TEST R14,R14 JZ 0x00130c0e JMP 0x00130db9 LAB_00130bd7: CMP dword ptr [RBP + -0x8c],0x0 SETZ AL TEST R13B,R13B SETNZ CL AND CL,AL MOVZX R8D,CL MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x98] MOV RDX,R12 MOV RCX,R15 CALL 0x00148768 TEST EAX,EAX JNZ 0x00130d4d LAB_00130c0e: MOV ECX,dword ptr [RBP + -0x8c] TEST ECX,ECX JNZ 0x00130c2a MOV RAX,qword ptr [RBP + -0x60] ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBX + 0x178],RAX XOR R13D,R13D LAB_00130c2a: INC ECX MOV dword ptr [RBP + -0x8c],ECX MOV RAX,qword ptr [RBP + -0x68] MOV R14,qword ptr [RBP + -0x48] MOV R15,qword ptr [RBP + -0xb8] SUB R15D,EAX ADD qword ptr [RBP + -0x98],RAX LAB_00130c4b: TEST R15D,R15D JNZ 0x00130908 JMP 0x00130cbc LAB_00130c56: MOV R12,RAX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV RSI,R15 LEA RDX,[0x1914db] MOV ECX,0x743 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R14D MOV RSI,qword ptr [RBP + -0x98] MOV RDX,R15 CALL 0x0015ad50 MOV R14,RAX TEST RAX,RAX MOV EAX,0x0 CMOVNZ R15,RAX LEA RAX,[0x42fe50] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV RSI,R15 CALL qword ptr [RAX + 0x218] JMP 0x00130bcd LAB_00130cbc: OR byte ptr [RBX + 0x1d0],0x82 MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x368],0x0 JNZ 0x00130cd9 MOV RDI,RBX XOR ESI,ESI CALL 0x0013387e LAB_00130cd9: MOV RDX,qword ptr [RBX + 0x120] MOV RCX,qword ptr [RBP + -0x70] MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xd0] CALL 0x0012fc35 XOR R14D,R14D CMP RAX,-0x1 JNZ 0x00130d72 JMP 0x00130d2d LAB_00130cfe: MOV EDI,dword ptr [RAX + 0x350] MOV R8,qword ptr [RBX + 0x330] OR R8,0x20 MOV qword ptr [RBP + -0xa8],0x0 XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX CALL 0x00159f70 TEST EAX,EAX JZ 0x001308cd LAB_00130d2d: CALL 0x0015be8e MOV R14D,dword ptr [RAX] JMP 0x00130d72 LAB_00130d37: CALL 0x0015be8e MOV dword ptr [RAX],0x89 JMP 0x00130d58 LAB_00130d44: CMP dword ptr [RBP + -0x8c],0x0 JZ 0x00130d96 LAB_00130d4d: CALL 0x0015be8e MOV dword ptr [RAX],0x7f LAB_00130d58: CALL 0x0015be8e MOV R14D,dword ptr [RAX] MOV RDI,RBX XOR ESI,ESI CALL 0x0013387e CALL 0x0015be8e MOV dword ptr [RAX],R14D LAB_00130d72: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00130dc8 MOV EAX,R14D ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00130d96: CALL 0x0015be8e MOV dword ptr [RAX],0x86 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBX + 0x170],RAX ADD RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBX + 0x178],RAX JMP 0x00130d58 LAB_00130db9: CALL 0x0015be8e CMP dword ptr [RAX],0xaf JZ 0x00130d4d JMP 0x00130d58 LAB_00130dc8: CALL 0x001283f0
int4 _mi_read_rnd_dynamic_record(long *param_1,int8 param_2,ulong param_3,int4 param_4) { void *pvVar1; int iVar2; uint uVar3; uint uVar4; ulong uVar5; long lVar6; int4 *puVar7; int *piVar8; uint uVar9; long lVar10; int4 uVar11; ulong uVar12; long in_FS_OFFSET; int1 local_128 [72]; long *local_e0; int8 local_d8; long *local_d0; int4 local_c4; ulong local_c0; long local_b8; int8 local_b0; ulong *local_a8; void *local_a0; int local_94; int1 local_90 [24]; ulong local_78; ulong local_70; long local_68; long local_58; ulong local_50; int4 local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_b8 = *param_1; uVar12 = 1; local_b0 = 1; local_d8 = param_2; if ((*(int *)((long)param_1 + 500) == 2) && (local_b0 = 0, *(int *)(local_b8 + 0x368) == 0)) { local_b0 = 0; iVar2 = my_lock(*(int4 *)(local_b8 + 0x350),0,0,0,param_1[0x66] | 0x20); if (iVar2 == 0) goto LAB_001308cd; } else { LAB_001308cd: local_40 = 0; local_a8 = (ulong *)(param_1 + 0x44); local_d0 = param_1 + 0x24; local_94 = 0; local_e0 = param_1; do { uVar5 = *(ulong *)(param_1[1] + 0x28); if (uVar5 <= param_3) { if ((int)local_b0 == 0) { *(int4 *)(param_1 + 0x60) = 1; iVar2 = mi_state_info_read_dsk(*(int4 *)(local_b8 + 0x350),local_b8,1); if (iVar2 == 0) { uVar5 = *(ulong *)(param_1[1] + 0x28); goto LAB_0013094f; } LAB_00130d4d: puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x7f; } else { LAB_0013094f: local_b0 = 1; if (param_3 < uVar5) goto LAB_00130964; puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x89; } LAB_00130d58: puVar7 = (int4 *)_my_thread_var(); uVar11 = *puVar7; _mi_writeinfo(param_1,0); puVar7 = (int4 *)_my_thread_var(); *puVar7 = uVar11; goto LAB_00130d72; } LAB_00130964: if ((*(uint *)(param_1 + 0x39) & 2) == 0) { if ((((*(uint *)(param_1 + 0x39) & 0x10) != 0) && (*local_a8 < param_3 + 0x14)) && (iVar2 = my_b_flush_io_cache(local_a8,1), iVar2 != 0)) goto LAB_00130d2d; *(int4 *)(param_1 + 0x60) = 1; uVar11 = (int4)param_1[0x38]; } else { iVar2 = _mi_read_cache(local_a8,local_90,param_3,0x14, ((char)param_4 != '\0' && local_94 == 0) | 2); uVar11 = 0xffffffff; if (iVar2 != 0) goto LAB_00130d4d; } uVar3 = _mi_get_block_info(local_90,uVar11,param_3); if (3 < uVar3) { if ((uVar3 & 0x14) != 0) { if ((char)param_4 != '\0') { param_3 = local_68 + local_58; local_40 = 0; goto LAB_00130c4b; } if (local_94 != 0) goto LAB_00130d4d; puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x86; param_1[0x2e] = local_58; param_1[0x2f] = local_58 + local_68; } goto LAB_00130d58; } if (local_94 == 0) { if (*(uint *)(local_b8 + 0x158) < local_78) goto LAB_00130d4d; param_1[0x2e] = param_3; if (*(int *)(local_b8 + 0x188) == 0) { local_a0 = (void *)*local_d0; uVar12 = local_78; } else { local_a0 = (void *)mi_alloc_rec_buff(param_1,local_78,local_d0); uVar12 = local_78; if (local_a0 == (void *)0x0) goto LAB_00130d58; } } lVar10 = local_58; pvVar1 = local_a0; local_c0 = uVar12; if ((uVar12 & 0xffffffff) < local_70) goto LAB_00130d4d; uVar4 = (int)local_58 - (int)param_3; uVar9 = 0x14 - uVar4; uVar3 = (uint)local_70; if (uVar9 <= local_70) { uVar3 = uVar9; } local_c4 = param_4; if (uVar3 != 0) { uVar12 = (ulong)uVar3; memcpy(local_a0,local_90 + uVar4,uVar12); local_70 = local_70 - uVar12; local_c0 = (ulong)((int)local_c0 - uVar3); local_a0 = (void *)((long)pvVar1 + uVar12); lVar10 = lVar10 + uVar12; } param_4 = local_c4; param_1 = local_e0; if (local_70 != 0) { if ((*(uint *)(local_e0 + 0x39) & 2) == 0) { if ((((*(uint *)(local_e0 + 0x39) & 0x10) == 0) || (local_58 + local_70 <= *local_a8)) || (iVar2 = my_b_flush_io_cache(local_a8,1), iVar2 == 0)) { uVar12 = local_70; uVar11 = (int4)param_1[0x38]; lVar10 = (**(code **)(PSI_server + 0x158))(local_128,uVar11,6); if (lVar10 == 0) { lVar6 = my_read(uVar11,local_a0,uVar12,4); } else { (**(code **)(PSI_server + 0x210)) (lVar10,uVar12, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x743 ); lVar6 = my_read(uVar11,local_a0,uVar12,4); if (lVar6 != 0) { uVar12 = 0; } (**(code **)(PSI_server + 0x218))(lVar10,uVar12); } if (lVar6 == 0) goto LAB_00130c0e; piVar8 = (int *)_my_thread_var(); if (*piVar8 == 0xaf) goto LAB_00130d4d; } goto LAB_00130d58; } iVar2 = _mi_read_cache(local_a8,local_a0,lVar10,local_70, (char)local_c4 != '\0' && local_94 == 0); if (iVar2 != 0) goto LAB_00130d4d; } LAB_00130c0e: if (local_94 == 0) { param_1[0x2f] = local_68 + local_58; param_4 = 0; } local_94 = local_94 + 1; uVar12 = (ulong)(uint)((int)local_c0 - (int)local_70); local_a0 = (void *)((long)local_a0 + local_70); param_3 = local_50; LAB_00130c4b: } while ((int)uVar12 != 0); *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 0x82; if (*(int *)(*param_1 + 0x368) == 0) { _mi_writeinfo(param_1,0); } lVar10 = _mi_rec_unpack(param_1,local_d8,param_1[0x24],local_78); uVar11 = 0; if (lVar10 != -1) goto LAB_00130d72; } LAB_00130d2d: puVar7 = (int4 *)_my_thread_var(); uVar11 = *puVar7; LAB_00130d72: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar11; }
183
test_bug6049
eloqsql/tests/mysql_client_test.c
static void test_bug6049() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[1]; MYSQL_RES *res; MYSQL_ROW row; const char *stmt_text; char buffer[30]; ulong length; int rc; myheader("test_bug6049"); stmt_text= "SELECT MAKETIME(-25, 12, 12)"; rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text)); myquery(rc); res= mysql_store_result(mysql); row= mysql_fetch_row(res); stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); check_execute(stmt, rc); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); bzero((char*) my_bind, sizeof(my_bind)); my_bind[0].buffer_type = MYSQL_TYPE_STRING; my_bind[0].buffer = &buffer; my_bind[0].buffer_length = sizeof(buffer); my_bind[0].length = &length; mysql_stmt_bind_result(stmt, my_bind); rc= mysql_stmt_fetch(stmt); DIE_UNLESS(rc == 0); if (!opt_silent) { printf("Result from query: %s\n", row[0]); printf("Result from prepared statement: %s\n", (char*) buffer); } DIE_UNLESS(strcmp(row[0], (char*) buffer) == 0); mysql_free_result(res); mysql_stmt_close(stmt); }
O0
c
test_bug6049: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) jmp 0x6c9fa movsbl 0x3fdad0(%rip), %eax # 0x46a4d1 cmpl $0x2, %eax jge 0x6ca82 movq 0x2425cb(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xc190d(%rip), %rsi # 0x12e324 movb $0x0, %al callq 0x3a1c0 movq 0x2425b3(%rip), %rax # 0x2aefd8 movq (%rax), %rdi movl 0x3fdcee(%rip), %edx # 0x46a71c movl %edx, %eax addl $0x1, %eax movl %eax, 0x3fdce3(%rip) # 0x46a71c movl 0x3fdcd9(%rip), %ecx # 0x46a718 movl 0x3fdab6(%rip), %r8d # 0x46a4fc leaq 0xc2bdf(%rip), %rsi # 0x12f62c leaq 0xc22ab(%rip), %r9 # 0x12ecff movb $0x0, %al callq 0x3a1c0 movq 0x242576(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xc18f0(%rip), %rsi # 0x12e35c movb $0x0, %al callq 0x3a1c0 movq 0x24255e(%rip), %rax # 0x2aefd8 movq (%rax), %rdi callq 0x3a4a0 leaq 0xce51b(%rip), %rax # 0x13afa4 movq %rax, -0xc8(%rbp) movq 0x3fda41(%rip), %rax # 0x46a4d8 movq %rax, -0xe8(%rbp) movq -0xc8(%rbp), %rax movq %rax, -0xe0(%rbp) movq -0xc8(%rbp), %rdi callq 0x3a400 movq -0xe8(%rbp), %rdi movq -0xe0(%rbp), %rsi movq %rax, %rdx callq 0x3af70 movl %eax, -0xd4(%rbp) movl -0xd4(%rbp), %eax movl %eax, -0xd8(%rbp) cmpl $0x0, -0xd8(%rbp) je 0x6caf2 xorl %eax, %eax movl %eax, %edi callq 0x3bf10 cmpl $0x0, -0xd8(%rbp) jne 0x6cafd jmp 0x6cb15 leaq 0xc1108(%rip), %rdi # 0x12dc0c movl $0x2efe, %esi # imm = 0x2EFE leaq 0xd745f(%rip), %rdx # 0x143f6f callq 0x3c010 movq 0x3fd9bc(%rip), %rdi # 0x46a4d8 callq 0x3b210 movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rdi callq 0x3b000 movq %rax, -0xc0(%rbp) movq 0x3fd996(%rip), %rdi # 0x46a4d8 callq 0xb2790 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0xf8(%rbp) movq -0xc8(%rbp), %rax movq %rax, -0xf0(%rbp) movq -0xc8(%rbp), %rdi callq 0x3a400 movq -0xf8(%rbp), %rdi movq -0xf0(%rbp), %rsi movq %rax, %rdx callq 0x3b810 movl %eax, -0xd4(%rbp) cmpl $0x0, -0xd4(%rbp) je 0x6cba2 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0xd4(%rbp) jne 0x6cbad jmp 0x6cbc5 leaq 0xc1058(%rip), %rdi # 0x12dc0c movl $0x2f04, %esi # imm = 0x2F04 leaq 0xccc4c(%rip), %rdx # 0x13980c callq 0x3c010 movq -0x38(%rbp), %rdi callq 0x3b8a0 movl %eax, -0xd4(%rbp) cmpl $0x0, -0xd4(%rbp) je 0x6cbea movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0xd4(%rbp) jne 0x6cbf5 jmp 0x6cc0d leaq 0xc1010(%rip), %rdi # 0x12dc0c movl $0x2f06, %esi # imm = 0x2F06 leaq 0xccc04(%rip), %rdx # 0x13980c callq 0x3c010 leaq -0xb0(%rbp), %rdi xorl %esi, %esi movl $0x70, %edx callq 0x3a2e0 movl $0xfe, -0x50(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0xa0(%rbp) movq $0x1e, -0x70(%rbp) leaq -0xd0(%rbp), %rax movq %rax, -0xb0(%rbp) movq -0x38(%rbp), %rdi leaq -0xb0(%rbp), %rsi callq 0xb1780 movq -0x38(%rbp), %rdi callq 0x3b910 movl %eax, -0xd4(%rbp) cmpl $0x0, -0xd4(%rbp) jne 0x6cc72 jmp 0x6cc8a leaq 0xc0f93(%rip), %rdi # 0x12dc0c movl $0x2f10, %esi # imm = 0x2F10 leaq 0xccb87(%rip), %rdx # 0x13980c callq 0x3c010 cmpb $0x0, 0x3fd840(%rip) # 0x46a4d1 jne 0x6ccbd movq -0xc0(%rbp), %rax movq (%rax), %rsi leaq 0xce31d(%rip), %rdi # 0x13afc1 movb $0x0, %al callq 0x3a070 leaq -0x30(%rbp), %rsi leaq 0xce322(%rip), %rdi # 0x13afd8 movb $0x0, %al callq 0x3a070 movq -0xc0(%rbp), %rax movq (%rax), %rdi leaq -0x30(%rbp), %rsi callq 0x3a880 cmpl $0x0, %eax jne 0x6ccd7 jmp 0x6ccef leaq 0xc0f2e(%rip), %rdi # 0x12dc0c movl $0x2f18, %esi # imm = 0x2F18 leaq 0xce312(%rip), %rdx # 0x13affc callq 0x3c010 movq -0xb8(%rbp), %rdi callq 0x3b280 movq -0x38(%rbp), %rdi callq 0x3b9f0 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x6cd1f addq $0x100, %rsp # imm = 0x100 popq %rbp retq callq 0x3a2a0 nopw %cs:(%rax,%rax)
test_bug6049: push rbp mov rbp, rsp sub rsp, 100h mov rax, fs:28h mov [rbp+var_8], rax jmp short $+2 loc_6C9FA: movsx eax, cs:opt_silent cmp eax, 2 jge short loc_6CA82 mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E324; "\n\n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] mov edx, cs:test_count mov eax, edx add eax, 1 mov cs:test_count, eax mov ecx, cs:iter_count mov r8d, cs:opt_count lea rsi, aUOfUUS; "%u of (%u/%u): %s" lea r9, aTestBug6049; "test_bug6049" mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E35C; " \n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush loc_6CA82: lea rax, aSelectMaketime; "SELECT MAKETIME(-25, 12, 12)" mov [rbp+var_C8], rax mov rax, cs:mysql mov [rbp+var_E8], rax mov rax, [rbp+var_C8] mov [rbp+var_E0], rax mov rdi, [rbp+var_C8] call _strlen mov rdi, [rbp+var_E8] mov rsi, [rbp+var_E0] mov rdx, rax call wrap_mysql_real_query mov [rbp+var_D4], eax mov eax, [rbp+var_D4] mov [rbp+var_D8], eax cmp [rbp+var_D8], 0 jz short loc_6CAF2 xor eax, eax mov edi, eax call print_error loc_6CAF2: cmp [rbp+var_D8], 0 jnz short loc_6CAFD jmp short loc_6CB15 loc_6CAFD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2EFEh lea rdx, aTmIYear0+9; "r == 0" call die loc_6CB15: mov rdi, cs:mysql call wrap_mysql_store_result mov [rbp+var_B8], rax mov rdi, [rbp+var_B8] call wrap_mysql_fetch_row mov [rbp+var_C0], rax mov rdi, cs:mysql call mysql_stmt_init mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_F8], rax mov rax, [rbp+var_C8] mov [rbp+var_F0], rax mov rdi, [rbp+var_C8] call _strlen mov rdi, [rbp+var_F8] mov rsi, [rbp+var_F0] mov rdx, rax call wrap_mysql_stmt_prepare mov [rbp+var_D4], eax cmp [rbp+var_D4], 0 jz short loc_6CBA2 mov rdi, [rbp+var_38] xor eax, eax mov esi, eax call print_st_error loc_6CBA2: cmp [rbp+var_D4], 0 jnz short loc_6CBAD jmp short loc_6CBC5 loc_6CBAD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2F04h lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_6CBC5: mov rdi, [rbp+var_38] call wrap_mysql_stmt_execute mov [rbp+var_D4], eax cmp [rbp+var_D4], 0 jz short loc_6CBEA mov rdi, [rbp+var_38] xor eax, eax mov esi, eax call print_st_error loc_6CBEA: cmp [rbp+var_D4], 0 jnz short loc_6CBF5 jmp short loc_6CC0D loc_6CBF5: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2F06h lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_6CC0D: lea rdi, [rbp+var_B0] xor esi, esi mov edx, 70h ; 'p' call _memset mov [rbp+var_50], 0FEh lea rax, [rbp+var_30] mov [rbp+var_A0], rax mov [rbp+var_70], 1Eh lea rax, [rbp+var_D0] mov [rbp+var_B0], rax mov rdi, [rbp+var_38] lea rsi, [rbp+var_B0] call mysql_stmt_bind_result mov rdi, [rbp+var_38] call wrap_mysql_stmt_fetch mov [rbp+var_D4], eax cmp [rbp+var_D4], 0 jnz short loc_6CC72 jmp short loc_6CC8A loc_6CC72: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2F10h lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_6CC8A: cmp cs:opt_silent, 0 jnz short loc_6CCBD mov rax, [rbp+var_C0] mov rsi, [rax] lea rdi, aResultFromQuer; "Result from query: %s\n" mov al, 0 call _printf lea rsi, [rbp+var_30] lea rdi, aResultFromPrep; "Result from prepared statement: %s\n" mov al, 0 call _printf loc_6CCBD: mov rax, [rbp+var_C0] mov rdi, [rax] lea rsi, [rbp+var_30] call _strcmp cmp eax, 0 jnz short loc_6CCD7 jmp short loc_6CCEF loc_6CCD7: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2F18h lea rdx, aStrcmpRow0Char; "strcmp(row[0], (char*) buffer) == 0" call die loc_6CCEF: mov rdi, [rbp+var_B8] call wrap_mysql_free_result mov rdi, [rbp+var_38] call wrap_mysql_stmt_close mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_6CD1F add rsp, 100h pop rbp retn loc_6CD1F: call ___stack_chk_fail
unsigned long long test_bug6049() { int v0; // edx long long v1; // rax long long v2; // rax long long v4; // [rsp+18h] [rbp-E8h] char v5; // [rsp+30h] [rbp-D0h] BYREF const char *v6; // [rsp+38h] [rbp-C8h] const char **row; // [rsp+40h] [rbp-C0h] long long v8; // [rsp+48h] [rbp-B8h] _QWORD v9[12]; // [rsp+50h] [rbp-B0h] BYREF int v10; // [rsp+B0h] [rbp-50h] long long v11; // [rsp+C8h] [rbp-38h] char v12[40]; // [rsp+D0h] [rbp-30h] BYREF unsigned long long v13; // [rsp+F8h] [rbp-8h] v13 = __readfsqword(0x28u); if ( opt_silent < 2 ) { fprintf(stdout, "\n\n#####################################\n"); v0 = test_count++; fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug6049"); fprintf(stdout, " \n#####################################\n"); fflush(stdout); } v6 = "SELECT MAKETIME(-25, 12, 12)"; v4 = mysql; v1 = strlen("SELECT MAKETIME(-25, 12, 12)"); if ( (unsigned int)wrap_mysql_real_query(v4, (long long)"SELECT MAKETIME(-25, 12, 12)", v1) ) { print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 12030, "r == 0"); } v8 = wrap_mysql_store_result(mysql); row = (const char **)wrap_mysql_fetch_row(v8); v11 = mysql_stmt_init(mysql); v2 = strlen(v6); if ( (unsigned int)wrap_mysql_stmt_prepare(v11, (long long)v6, v2) ) { print_st_error(v11, 0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 12036, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_execute(v11) ) { print_st_error(v11, 0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 12038, "rc == 0"); } memset(v9, 0LL, 112LL); v10 = 254; v9[2] = v12; v9[8] = 30LL; v9[0] = &v5; mysql_stmt_bind_result(v11, v9); if ( (unsigned int)wrap_mysql_stmt_fetch(v11) ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 12048, "rc == 0"); if ( !opt_silent ) { printf("Result from query: %s\n", *row); printf("Result from prepared statement: %s\n", v12); } if ( (unsigned int)strcmp(*row, v12) ) die( "/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 12056, "strcmp(row[0], (char*) buffer) == 0"); wrap_mysql_free_result(v8); wrap_mysql_stmt_close(v11); return __readfsqword(0x28u); }
test_bug6049: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0016c9fa LAB_0016c9fa: MOVSX EAX,byte ptr [0x0056a4d1] CMP EAX,0x2 JGE 0x0016ca82 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e324] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [0x0056a71c] MOV EAX,EDX ADD EAX,0x1 MOV dword ptr [0x0056a71c],EAX MOV ECX,dword ptr [0x0056a718] MOV R8D,dword ptr [0x0056a4fc] LEA RSI,[0x22f62c] LEA R9,[0x22ecff] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e35c] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] CALL 0x0013a4a0 LAB_0016ca82: LEA RAX,[0x23afa4] MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr [0x0056a4d8] MOV qword ptr [RBP + -0xe8],RAX MOV RAX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xe0],RAX MOV RDI,qword ptr [RBP + -0xc8] CALL 0x0013a400 MOV RDI,qword ptr [RBP + -0xe8] MOV RSI,qword ptr [RBP + -0xe0] MOV RDX,RAX CALL 0x0013af70 MOV dword ptr [RBP + -0xd4],EAX MOV EAX,dword ptr [RBP + -0xd4] MOV dword ptr [RBP + -0xd8],EAX CMP dword ptr [RBP + -0xd8],0x0 JZ 0x0016caf2 XOR EAX,EAX MOV EDI,EAX CALL 0x0013bf10 LAB_0016caf2: CMP dword ptr [RBP + -0xd8],0x0 JNZ 0x0016cafd JMP 0x0016cb15 LAB_0016cafd: LEA RDI,[0x22dc0c] MOV ESI,0x2efe LEA RDX,[0x243f6f] CALL 0x0013c010 LAB_0016cb15: MOV RDI,qword ptr [0x0056a4d8] CALL 0x0013b210 MOV qword ptr [RBP + -0xb8],RAX MOV RDI,qword ptr [RBP + -0xb8] CALL 0x0013b000 MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [0x0056a4d8] CALL 0x001b2790 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xf0],RAX MOV RDI,qword ptr [RBP + -0xc8] CALL 0x0013a400 MOV RDI,qword ptr [RBP + -0xf8] MOV RSI,qword ptr [RBP + -0xf0] MOV RDX,RAX CALL 0x0013b810 MOV dword ptr [RBP + -0xd4],EAX CMP dword ptr [RBP + -0xd4],0x0 JZ 0x0016cba2 MOV RDI,qword ptr [RBP + -0x38] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_0016cba2: CMP dword ptr [RBP + -0xd4],0x0 JNZ 0x0016cbad JMP 0x0016cbc5 LAB_0016cbad: LEA RDI,[0x22dc0c] MOV ESI,0x2f04 LEA RDX,[0x23980c] CALL 0x0013c010 LAB_0016cbc5: MOV RDI,qword ptr [RBP + -0x38] CALL 0x0013b8a0 MOV dword ptr [RBP + -0xd4],EAX CMP dword ptr [RBP + -0xd4],0x0 JZ 0x0016cbea MOV RDI,qword ptr [RBP + -0x38] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_0016cbea: CMP dword ptr [RBP + -0xd4],0x0 JNZ 0x0016cbf5 JMP 0x0016cc0d LAB_0016cbf5: LEA RDI,[0x22dc0c] MOV ESI,0x2f06 LEA RDX,[0x23980c] CALL 0x0013c010 LAB_0016cc0d: LEA RDI,[RBP + -0xb0] XOR ESI,ESI MOV EDX,0x70 CALL 0x0013a2e0 MOV dword ptr [RBP + -0x50],0xfe LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0xa0],RAX MOV qword ptr [RBP + -0x70],0x1e LEA RAX,[RBP + -0xd0] MOV qword ptr [RBP + -0xb0],RAX MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0xb0] CALL 0x001b1780 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0013b910 MOV dword ptr [RBP + -0xd4],EAX CMP dword ptr [RBP + -0xd4],0x0 JNZ 0x0016cc72 JMP 0x0016cc8a LAB_0016cc72: LEA RDI,[0x22dc0c] MOV ESI,0x2f10 LEA RDX,[0x23980c] CALL 0x0013c010 LAB_0016cc8a: CMP byte ptr [0x0056a4d1],0x0 JNZ 0x0016ccbd MOV RAX,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RAX] LEA RDI,[0x23afc1] MOV AL,0x0 CALL 0x0013a070 LEA RSI,[RBP + -0x30] LEA RDI,[0x23afd8] MOV AL,0x0 CALL 0x0013a070 LAB_0016ccbd: MOV RAX,qword ptr [RBP + -0xc0] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x30] CALL 0x0013a880 CMP EAX,0x0 JNZ 0x0016ccd7 JMP 0x0016ccef LAB_0016ccd7: LEA RDI,[0x22dc0c] MOV ESI,0x2f18 LEA RDX,[0x23affc] CALL 0x0013c010 LAB_0016ccef: MOV RDI,qword ptr [RBP + -0xb8] CALL 0x0013b280 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0013b9f0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0016cd1f ADD RSP,0x100 POP RBP RET LAB_0016cd1f: CALL 0x0013a2a0
void test_bug6049(void) { char *pcVar1; int iVar2; size_t sVar3; int8 uVar4; ulong uVar5; long in_FS_OFFSET; int1 local_d8 [8]; char *local_d0; int8 *local_c8; int8 local_c0; int1 *local_b8 [2]; char *local_a8; int8 local_78; int4 local_58; int8 local_40; char local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (opt_silent < '\x02') { fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n"); uVar5 = (ulong)test_count; test_count = test_count + 1; fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar5,(ulong)iter_count, (ulong)opt_count,"test_bug6049"); fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n"); fflush(*(FILE **)PTR_stdout_003aefd8); } uVar4 = mysql; local_d0 = "SELECT MAKETIME(-25, 12, 12)"; sVar3 = strlen("SELECT MAKETIME(-25, 12, 12)"); iVar2 = wrap_mysql_real_query(uVar4,"SELECT MAKETIME(-25, 12, 12)",sVar3); if (iVar2 != 0) { print_error(0); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2efe,"r == 0"); } local_c0 = wrap_mysql_store_result(mysql); local_c8 = (int8 *)wrap_mysql_fetch_row(local_c0); uVar4 = mysql_stmt_init(mysql); pcVar1 = local_d0; local_40 = uVar4; sVar3 = strlen(local_d0); iVar2 = wrap_mysql_stmt_prepare(uVar4,pcVar1,sVar3); if (iVar2 != 0) { print_st_error(local_40); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2f04,"rc == 0"); } iVar2 = wrap_mysql_stmt_execute(local_40); if (iVar2 != 0) { print_st_error(local_40); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2f06,"rc == 0"); } memset(local_b8,0,0x70); local_58 = 0xfe; local_a8 = local_38; local_78 = 0x1e; local_b8[0] = local_d8; mysql_stmt_bind_result(local_40,local_b8); iVar2 = wrap_mysql_stmt_fetch(local_40); if (iVar2 != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2f10,"rc == 0"); } if (opt_silent == '\0') { printf("Result from query: %s\n",*local_c8); printf("Result from prepared statement: %s\n",local_38); } iVar2 = strcmp((char *)*local_c8,local_38); if (iVar2 != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x2f18, "strcmp(row[0], (char*) buffer) == 0"); } wrap_mysql_free_result(local_c0); wrap_mysql_stmt_close(local_40); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
184
JS_DefinePropertyValueStr
bluesky950520[P]quickjs/quickjs.c
int JS_DefinePropertyValueStr(JSContext *ctx, JSValue this_obj, const char *prop, JSValue val, int flags) { JSAtom atom; int ret; atom = JS_NewAtom(ctx, prop); ret = JS_DefinePropertyValue(ctx, this_obj, atom, val, flags); JS_FreeAtom(ctx, atom); return ret; }
O1
c
JS_DefinePropertyValueStr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbp movq %rcx, %rdi callq 0xe270 movq %rbp, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x23e1c movl %eax, %r15d movl 0x40(%rsp), %eax movl %eax, (%rsp) movq %rbp, %rdi movq %r13, %rsi movq %r12, %rdx movl %r15d, %ecx movq %r14, %r8 movq %rbx, %r9 callq 0x2ab17 movl %eax, %ebx movq %rbp, %rdi movl %r15d, %esi callq 0x24834 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_DefinePropertyValueStr: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbp, rdi mov rdi, rcx call _strlen mov rdi, rbp mov rsi, r15 mov rdx, rax call JS_NewAtomLen mov r15d, eax mov eax, [rsp+38h+arg_0] mov [rsp+38h+var_38], eax mov rdi, rbp mov rsi, r13 mov rdx, r12 mov ecx, r15d mov r8, r14 mov r9, rbx call JS_DefinePropertyValue mov ebx, eax mov rdi, rbp mov esi, r15d call JS_FreeAtom mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_DefinePropertyValueStr( long long a1, unsigned long long a2, long long a3, unsigned __int8 *a4, _DWORD *a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, int a15) { unsigned __int8 *v17; // r15 long long v19; // rax __m128 v20; // xmm4 __m128 v21; // xmm5 v17 = a4; v19 = strlen(a4); LODWORD(v17) = JS_NewAtomLen(a1, v17, v19); LODWORD(a6) = JS_DefinePropertyValue(a1, a2, a3, (unsigned int)v17, a5, a6, a7, a8, a9, a10, v20, v21, a13, a14, a15); JS_FreeAtom(a1, (int)v17); return (unsigned int)a6; }
JS_DefinePropertyValueStr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBP,RDI MOV RDI,RCX CALL 0x0010e270 MOV RDI,RBP MOV RSI,R15 MOV RDX,RAX CALL 0x00123e1c MOV R15D,EAX MOV EAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP],EAX MOV RDI,RBP MOV RSI,R13 MOV RDX,R12 MOV ECX,R15D MOV R8,R14 MOV R9,RBX CALL 0x0012ab17 MOV EBX,EAX MOV RDI,RBP MOV ESI,R15D CALL 0x00124834 MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 JS_DefinePropertyValueStr (int8 param_1,int8 param_2,int8 param_3,char *param_4,int8 param_5 ,int8 param_6,int4 param_7) { int4 uVar1; int4 uVar2; int8 in_RAX; size_t sVar3; uVar2 = (int4)((ulong)in_RAX >> 0x20); sVar3 = strlen(param_4); uVar1 = JS_NewAtomLen(param_1,param_4,sVar3); uVar2 = JS_DefinePropertyValue (param_1,param_2,param_3,uVar1,param_5,param_6,CONCAT44(uVar2,param_7)); JS_FreeAtom(param_1,uVar1); return uVar2; }
185
thr_merge_locks
eloqsql/mysys/thr_lock.c
void thr_merge_locks(THR_LOCK_DATA **data, uint old_count, uint new_count) { THR_LOCK_DATA **pos, **end, **first_lock= 0; DBUG_ENTER("thr_merge_lock"); /* Remove marks on old locks to make them sort before new ones */ for (pos=data, end= pos + old_count; pos < end ; pos++) (*pos)->priority&= ~THR_LOCK_LATE_PRIV; /* Mark new locks with LATE_PRIV to make them sort after org ones */ for (pos=data + old_count, end= pos + new_count; pos < end ; pos++) (*pos)->priority|= THR_LOCK_LATE_PRIV; sort_locks(data, old_count + new_count); for (pos=data ; pos < end ; pos++) { /* Check if lock was unlocked before */ if (pos[0]->type == TL_UNLOCK || ! pos[0]->lock->fix_status) { DBUG_PRINT("info", ("lock skipped. unlocked: %d fix_status: %d", pos[0]->type == TL_UNLOCK, pos[0]->lock->fix_status == 0)); continue; } /* If same table as previous table use pointer to previous status information to ensure that all read/write tables shares same state. */ if (first_lock && pos[0]->lock == first_lock[0]->lock) (pos[0]->lock->fix_status)((*first_lock)->status_param, (*pos)->status_param); else { /* Different lock, use this as base for next lock */ first_lock= pos; (pos[0]->lock->fix_status)((*first_lock)->status_param, 0); } } DBUG_VOID_RETURN; }
O0
c
thr_merge_locks: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq $0x0, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl -0xc(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xc304c movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x48(%rax), %ecx andl $-0x2, %ecx movl %ecx, 0x48(%rax) movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xc3024 movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl -0x10(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xc3098 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x48(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x48(%rax) movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xc3070 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi addl -0x10(%rbp), %esi callq 0xc27e0 movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xc316e movq -0x18(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x40(%rax) je 0xc30df movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax cmpq $0x0, 0xe0(%rax) jne 0xc30e5 jmp 0xc30e1 jmp 0xc30e3 jmp 0xc315d cmpq $0x0, -0x28(%rbp) je 0xc3130 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx cmpq 0x18(%rcx), %rax jne 0xc3130 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq 0xe0(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx movq 0x28(%rcx), %rdi movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq 0x28(%rcx), %rsi callq *%rax jmp 0xc315b movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq 0xe0(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx movq 0x28(%rcx), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax jmp 0xc315d movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xc30af jmp 0xc3170 jmp 0xc3172 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
thr_merge_locks: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_28], 0 mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_C] shl rcx, 3 add rax, rcx mov [rbp+var_20], rax loc_C3024: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_C304C mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rax+48h] and ecx, 0FFFFFFFEh mov [rax+48h], ecx mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_C3024 loc_C304C: mov rax, [rbp+var_8] mov ecx, [rbp+var_C] shl rcx, 3 add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_10] shl rcx, 3 add rax, rcx mov [rbp+var_20], rax loc_C3070: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_C3098 mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rax+48h] or ecx, 1 mov [rax+48h], ecx mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_C3070 loc_C3098: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] add esi, [rbp+var_10] call sort_locks mov rax, [rbp+var_8] mov [rbp+var_18], rax loc_C30AF: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb loc_C316E mov rax, [rbp+var_18] mov rax, [rax] cmp dword ptr [rax+40h], 0 jz short loc_C30DF mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] cmp qword ptr [rax+0E0h], 0 jnz short loc_C30E5 loc_C30DF: jmp short $+2 loc_C30E1: jmp short $+2 loc_C30E3: jmp short loc_C315D loc_C30E5: cmp [rbp+var_28], 0 jz short loc_C3130 mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] mov rcx, [rbp+var_28] mov rcx, [rcx] cmp rax, [rcx+18h] jnz short loc_C3130 mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] mov rax, [rax+0E0h] mov rcx, [rbp+var_28] mov rcx, [rcx] mov rdi, [rcx+28h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rsi, [rcx+28h] call rax jmp short loc_C315B loc_C3130: mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] mov rax, [rax+0E0h] mov rcx, [rbp+var_28] mov rcx, [rcx] mov rdi, [rcx+28h] xor ecx, ecx mov esi, ecx call rax loc_C315B: jmp short $+2 loc_C315D: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp loc_C30AF loc_C316E: jmp short $+2 loc_C3170: jmp short $+2 loc_C3172: add rsp, 30h pop rbp retn
_QWORD * thr_merge_locks(_QWORD *a1, int a2, int a3) { _QWORD *result; // rax _QWORD *v4; // [rsp+8h] [rbp-28h] _QWORD *v5; // [rsp+10h] [rbp-20h] _QWORD *i; // [rsp+18h] [rbp-18h] _QWORD *v7; // [rsp+18h] [rbp-18h] _QWORD *j; // [rsp+18h] [rbp-18h] v4 = 0LL; for ( i = a1; i < &a1[a2]; ++i ) *(_DWORD *)(*i + 72LL) &= ~1u; v7 = &a1[a2]; v5 = &v7[a3]; while ( v7 < v5 ) *(_DWORD *)(*v7++ + 72LL) |= 1u; sort_locks(a1, a3 + a2); for ( j = a1; ; ++j ) { result = j; if ( j >= v5 ) break; if ( *(_DWORD *)(*j + 64LL) && *(_QWORD *)(*(_QWORD *)(*j + 24LL) + 224LL) ) { if ( v4 && *(_QWORD *)(*j + 24LL) == *(_QWORD *)(*v4 + 24LL) ) { (*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(*j + 24LL) + 224LL))( *(_QWORD *)(*v4 + 40LL), *(_QWORD *)(*j + 40LL)); } else { v4 = j; (*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(*j + 24LL) + 224LL))(*(_QWORD *)(*j + 40LL), 0LL); } } } return result; }
thr_merge_locks: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001c3024: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001c304c MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x48] AND ECX,0xfffffffe MOV dword ptr [RAX + 0x48],ECX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001c3024 LAB_001c304c: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x10] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001c3070: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001c3098 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x48] OR ECX,0x1 MOV dword ptr [RAX + 0x48],ECX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001c3070 LAB_001c3098: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] ADD ESI,dword ptr [RBP + -0x10] CALL 0x001c27e0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX LAB_001c30af: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001c316e MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x40],0x0 JZ 0x001c30df MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] CMP qword ptr [RAX + 0xe0],0x0 JNZ 0x001c30e5 LAB_001c30df: JMP 0x001c30e1 LAB_001c30e1: JMP 0x001c30e3 LAB_001c30e3: JMP 0x001c315d LAB_001c30e5: CMP qword ptr [RBP + -0x28],0x0 JZ 0x001c3130 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x18] JNZ 0x001c3130 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0xe0] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x28] CALL RAX JMP 0x001c315b LAB_001c3130: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0xe0] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x28] XOR ECX,ECX MOV ESI,ECX CALL RAX LAB_001c315b: JMP 0x001c315d LAB_001c315d: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001c30af LAB_001c316e: JMP 0x001c3170 LAB_001c3170: JMP 0x001c3172 LAB_001c3172: ADD RSP,0x30 POP RBP RET
void thr_merge_locks(long *param_1,uint param_2,uint param_3) { long *plVar1; long *local_30; long *local_20; local_30 = (long *)0x0; for (local_20 = param_1; local_20 < param_1 + param_2; local_20 = local_20 + 1) { *(uint *)(*local_20 + 0x48) = *(uint *)(*local_20 + 0x48) & 0xfffffffe; } local_20 = param_1 + param_2; plVar1 = local_20 + param_3; for (; local_20 < plVar1; local_20 = local_20 + 1) { *(uint *)(*local_20 + 0x48) = *(uint *)(*local_20 + 0x48) | 1; } sort_locks(param_1,param_2 + param_3); for (local_20 = param_1; local_20 < plVar1; local_20 = local_20 + 1) { if ((*(int *)(*local_20 + 0x40) != 0) && (*(long *)(*(long *)(*local_20 + 0x18) + 0xe0) != 0)) { if ((local_30 == (long *)0x0) || (*(long *)(*local_20 + 0x18) != *(long *)(*local_30 + 0x18))) { local_30 = local_20; (**(code **)(*(long *)(*local_20 + 0x18) + 0xe0))(*(int8 *)(*local_20 + 0x28),0); } else { (**(code **)(*(long *)(*local_20 + 0x18) + 0xe0)) (*(int8 *)(*local_30 + 0x28),*(int8 *)(*local_20 + 0x28)); } } } return; }
186
my_xpath_parse_OrExpr(my_xpath_st*)
eloqsql/sql/item_xmlfunc.cc
static int my_xpath_parse_OrExpr(MY_XPATH *xpath) { if (!my_xpath_parse_AndExpr(xpath)) return 0; while (my_xpath_parse_term(xpath, MY_XPATH_LEX_OR)) { Item *prev= xpath->item; if (!my_xpath_parse_AndExpr(xpath)) { xpath->error= 1; return 0; } xpath->item= new (xpath->thd->mem_root) Item_cond_or(xpath->thd, nodeset2bool(xpath, prev), nodeset2bool(xpath, xpath->item)); } return 1; }
O0
cpp
my_xpath_parse_OrExpr(my_xpath_st*): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0xe3db30 cmpl $0x0, %eax jne 0xe3d896 movl $0x0, -0x4(%rbp) jmp 0xe3d9b0 jmp 0xe3d898 movq -0x10(%rbp), %rdi movl $0x44, %esi callq 0xe3d9d0 cmpl $0x0, %eax je 0xe3d9a9 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0xe3db30 cmpl $0x0, %eax jne 0xe3d8e3 movq -0x10(%rbp), %rax movl $0x1, 0x98(%rax) movl $0x0, -0x4(%rbp) jmp 0xe3d9b0 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x28(%rax), %rsi movq %rsi, -0x58(%rbp) movl $0xd8, %edi callq 0x87dea0 movq %rax, %rcx movq %rcx, -0x50(%rbp) movb $0x0, -0x29(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x48(%rbp) je 0xe3d975 movq -0x58(%rbp), %rax movq -0x50(%rbp), %rcx movq %rcx, -0x20(%rbp) movq %rax, -0x28(%rbp) movb $0x1, -0x29(%rbp) movq -0x10(%rbp), %rdi movq (%rdi), %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rsi callq 0xe3c7a0 movq %rax, -0x60(%rbp) jmp 0xe3d941 movq -0x10(%rbp), %rdi movq 0x68(%rdi), %rsi callq 0xe3c7a0 movq %rax, -0x70(%rbp) jmp 0xe3d954 movq -0x70(%rbp), %rcx movq -0x60(%rbp), %rdx movq -0x68(%rbp), %rsi movq -0x50(%rbp), %rdi callq 0xa7c410 jmp 0xe3d96b movq -0x50(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0xe3d975 movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x68(%rax) jmp 0xe3d898 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) testb $0x1, -0x29(%rbp) jne 0xe3d99a jmp 0xe3d9a7 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x87df70 jmp 0xe3d9b9 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq movq -0x38(%rbp), %rdi callq 0x775a20 nopw %cs:(%rax,%rax)
_ZL21my_xpath_parse_OrExprP11my_xpath_st: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call _ZL22my_xpath_parse_AndExprP11my_xpath_st; my_xpath_parse_AndExpr(my_xpath_st *) cmp eax, 0 jnz short loc_E3D896 mov [rbp+var_4], 0 jmp loc_E3D9B0 loc_E3D896: jmp short $+2 loc_E3D898: mov rdi, [rbp+var_10] mov esi, 44h ; 'D' call _ZL19my_xpath_parse_termP11my_xpath_sti; my_xpath_parse_term(my_xpath_st *,int) cmp eax, 0 jz loc_E3D9A9 mov rax, [rbp+var_10] mov rax, [rax+68h] mov [rbp+var_18], rax mov rdi, [rbp+var_10] call _ZL22my_xpath_parse_AndExprP11my_xpath_st; my_xpath_parse_AndExpr(my_xpath_st *) cmp eax, 0 jnz short loc_E3D8E3 mov rax, [rbp+var_10] mov dword ptr [rax+98h], 1 mov [rbp+var_4], 0 jmp loc_E3D9B0 loc_E3D8E3: mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+28h] mov [rbp+var_58], rsi mov edi, 0D8h call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_50], rcx mov [rbp+var_29], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_48], rax jz short loc_E3D975 mov rax, [rbp+var_58] mov rcx, [rbp+var_50] mov [rbp+var_20], rcx mov [rbp+var_28], rax mov [rbp+var_29], 1 mov rdi, [rbp+var_10] mov rax, [rdi] mov [rbp+var_68], rax mov rsi, [rbp+var_18] call _ZL12nodeset2boolP11my_xpath_stP4Item; nodeset2bool(my_xpath_st *,Item *) mov [rbp+var_60], rax jmp short $+2 loc_E3D941: mov rdi, [rbp+var_10] mov rsi, [rdi+68h] call _ZL12nodeset2boolP11my_xpath_stP4Item; nodeset2bool(my_xpath_st *,Item *) mov [rbp+var_70], rax jmp short $+2 loc_E3D954: mov rcx, [rbp+var_70]; Item * mov rdx, [rbp+var_60]; Item * mov rsi, [rbp+var_68]; THD * mov rdi, [rbp+var_50]; this call _ZN12Item_cond_orC2EP3THDP4ItemS3_; Item_cond_or::Item_cond_or(THD *,Item *,Item *) jmp short $+2 loc_E3D96B: mov rax, [rbp+var_50] mov [rbp+var_48], rax jmp short $+2 loc_E3D975: mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax+68h], rcx jmp loc_E3D898 mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax test [rbp+var_29], 1 jnz short loc_E3D99A jmp short loc_E3D9A7 loc_E3D99A: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_E3D9A7: jmp short loc_E3D9B9 loc_E3D9A9: mov [rbp+var_4], 1 loc_E3D9B0: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn loc_E3D9B9: mov rdi, [rbp+var_38] call __Unwind_Resume
long long my_xpath_parse_OrExpr(THD **a1) { Item *v2; // [rsp+0h] [rbp-70h] THD *v3; // [rsp+8h] [rbp-68h] Item *v4; // [rsp+10h] [rbp-60h] Item_cond_or *v5; // [rsp+20h] [rbp-50h] THD *v6; // [rsp+28h] [rbp-48h] Item *v7; // [rsp+58h] [rbp-18h] if ( (unsigned int)my_xpath_parse_AndExpr(a1) ) { while ( (unsigned int)my_xpath_parse_term(a1, 68LL) ) { v7 = a1[13]; if ( !(unsigned int)my_xpath_parse_AndExpr(a1) ) { *((_DWORD *)a1 + 38) = 1; return 0; } v5 = (Item_cond_or *)Item::operator new(216LL, *((_QWORD *)*a1 + 5)); v6 = 0LL; if ( v5 ) { v3 = *a1; v4 = nodeset2bool(a1, v7); v2 = nodeset2bool(a1, a1[13]); Item_cond_or::Item_cond_or(v5, v3, v4, v2); v6 = v5; } a1[13] = v6; } return 1; } else { return 0; } }
Item_func_neg: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RDI MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00e43330 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x1b9f738] ADD RCX,0x10 MOV qword ptr [RAX],RCX ADD RSP,0x20 POP RBP RET
/* Item_func_neg::Item_func_neg(THD*, Item*) */ void __thiscall Item_func_neg::Item_func_neg(Item_func_neg *this,THD *param_1,Item *param_2) { Item_func_num1::Item_func_num1((Item_func_num1 *)this,param_1,param_2); *(int ***)this = &PTR__Item_func_neg_01b9f748; return; }
187
my_xpath_parse_OrExpr(my_xpath_st*)
eloqsql/sql/item_xmlfunc.cc
static int my_xpath_parse_OrExpr(MY_XPATH *xpath) { if (!my_xpath_parse_AndExpr(xpath)) return 0; while (my_xpath_parse_term(xpath, MY_XPATH_LEX_OR)) { Item *prev= xpath->item; if (!my_xpath_parse_AndExpr(xpath)) { xpath->error= 1; return 0; } xpath->item= new (xpath->thd->mem_root) Item_cond_or(xpath->thd, nodeset2bool(xpath, prev), nodeset2bool(xpath, xpath->item)); } return 1; }
O3
cpp
my_xpath_parse_OrExpr(my_xpath_st*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 callq 0xa4c1e1 xorl %ecx, %ecx testl %eax, %eax je 0xa4c11c movq %r14, %rdi movl $0x44, %esi callq 0xa4c135 testl %eax, %eax je 0xa4c108 leaq 0x9e79e9(%rip), %rbx # 0x1433a68 leaq 0x10(%rbx), %rax movq %rax, -0x30(%rbp) addq $0x678, %rbx # imm = 0x678 movq 0x68(%r14), %r12 movq %r14, %rdi callq 0xa4c1e1 testl %eax, %eax je 0xa4c10f movq (%r14), %rax movq 0x28(%rax), %rdi movl $0xd8, %esi callq 0xcf03ef movq %rax, %r15 testq %rax, %rax je 0xa4c0f3 movq (%r14), %r13 movq %r14, %rdi movq %r12, %rsi callq 0xa4b526 movq %rax, %r12 movq 0x68(%r14), %rsi movq %r14, %rdi callq 0xa4b526 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %rax, %rcx callq 0x9bd986 movq -0x30(%rbp), %rax movq %rax, (%r15) movq %rbx, 0xa8(%r15) movq %r15, 0x68(%r14) movq %r14, %rdi movl $0x44, %esi callq 0xa4c135 testl %eax, %eax jne 0xa4c08e movl $0x1, %ecx jmp 0xa4c11c movl $0x1, 0x98(%r14) xorl %ecx, %ecx movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi callq 0x6da8ee
_ZL21my_xpath_parse_OrExprP11my_xpath_st: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi call _ZL22my_xpath_parse_AndExprP11my_xpath_st; my_xpath_parse_AndExpr(my_xpath_st *) xor ecx, ecx test eax, eax jz loc_A4C11C mov rdi, r14 mov esi, 44h ; 'D' call _ZL19my_xpath_parse_termP11my_xpath_sti; my_xpath_parse_term(my_xpath_st *,int) test eax, eax jz loc_A4C108 lea rbx, _ZTV12Item_cond_or; `vtable for'Item_cond_or lea rax, [rbx+10h] mov [rbp+var_30], rax add rbx, 678h loc_A4C08E: mov r12, [r14+68h] mov rdi, r14 call _ZL22my_xpath_parse_AndExprP11my_xpath_st; my_xpath_parse_AndExpr(my_xpath_st *) test eax, eax jz short loc_A4C10F mov rax, [r14] mov rdi, [rax+28h] mov esi, 0D8h call alloc_root mov r15, rax test rax, rax jz short loc_A4C0F3 mov r13, [r14] mov rdi, r14 mov rsi, r12 call _ZL12nodeset2boolP11my_xpath_stP4Item; nodeset2bool(my_xpath_st *,Item *) mov r12, rax mov rsi, [r14+68h] mov rdi, r14 call _ZL12nodeset2boolP11my_xpath_stP4Item; nodeset2bool(my_xpath_st *,Item *) mov rdi, r15; this mov rsi, r13; THD * mov rdx, r12; Item * mov rcx, rax; Item * call _ZN9Item_condC2EP3THDP4ItemS3_; Item_cond::Item_cond(THD *,Item *,Item *) mov rax, [rbp+var_30] mov [r15], rax mov [r15+0A8h], rbx loc_A4C0F3: mov [r14+68h], r15 mov rdi, r14 mov esi, 44h ; 'D' call _ZL19my_xpath_parse_termP11my_xpath_sti; my_xpath_parse_term(my_xpath_st *,int) test eax, eax jnz short loc_A4C08E loc_A4C108: mov ecx, 1 jmp short loc_A4C11C loc_A4C10F: mov dword ptr [r14+98h], 1 xor ecx, ecx loc_A4C11C: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rdi, rax call __clang_call_terminate
long long my_xpath_parse_OrExpr(THD **a1) { int v1; // eax unsigned int v2; // ecx Item *v3; // r12 Item_cond *v4; // r15 THD *v5; // r13 Item *v6; // r12 Item *v7; // rax v1 = my_xpath_parse_AndExpr(a1); v2 = 0; if ( v1 ) { if ( (unsigned int)my_xpath_parse_term(a1, 68LL) ) { while ( 1 ) { v3 = a1[13]; if ( !(unsigned int)my_xpath_parse_AndExpr(a1) ) break; v4 = (Item_cond *)alloc_root(*((_QWORD *)*a1 + 5), 216LL); if ( v4 ) { v5 = *a1; v6 = nodeset2bool(a1, v3); v7 = nodeset2bool(a1, a1[13]); Item_cond::Item_cond(v4, v5, v6, v7); *(_QWORD *)v4 = &`vtable for'Item_cond_or + 2; *((_QWORD *)v4 + 21) = &`vtable for'Item_cond_or + 207; } a1[13] = v4; if ( !(unsigned int)my_xpath_parse_term(a1, 68LL) ) return 1; } *((_DWORD *)a1 + 38) = 1; return 0; } else { return 1; } } return v2; }
188
unsigned int const cxpr::floor<unsigned int, float>(float)
untodesu[P]voxelius/core/constexpr.hh
constexpr static inline const T cxpr::floor(const F x) { static_assert(std::is_integral_v<T>); static_assert(std::is_floating_point_v<F>); const T ival = static_cast<T>(x); if(ival > x) return ival - static_cast<T>(1); return ival; }
O0
cpp
unsigned int const cxpr::floor<unsigned int, float>(float): pushq %rbp movq %rsp, %rbp movss %xmm0, -0x8(%rbp) cvttss2si -0x8(%rbp), %rax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax cvtsi2ss %rax, %xmm0 ucomiss -0x8(%rbp), %xmm0 jbe 0x2c0cb movl -0xc(%rbp), %eax subl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x2c0d1 movl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ZN4cxprL5floorIjfEEKT_T0_: push rbp mov rbp, rsp movss [rbp+var_8], xmm0 cvttss2si rax, [rbp+var_8] mov [rbp+var_C], eax mov eax, [rbp+var_C] cvtsi2ss xmm0, rax ucomiss xmm0, [rbp+var_8] jbe short loc_2C0CB mov eax, [rbp+var_C] sub eax, 1 mov [rbp+var_4], eax jmp short loc_2C0D1 loc_2C0CB: mov eax, [rbp+var_C] mov [rbp+var_4], eax loc_2C0D1: mov eax, [rbp+var_4] pop rbp retn
long long cxpr::floor<unsigned int,float>(float a1) { if ( (float)(int)a1 <= a1 ) return (unsigned int)(int)a1; else return (unsigned int)((int)a1 - 1); }
floor<unsigned_int,float>: PUSH RBP MOV RBP,RSP MOVSS dword ptr [RBP + -0x8],XMM0 CVTTSS2SI RAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] CVTSI2SS XMM0,RAX UCOMISS XMM0,dword ptr [RBP + -0x8] JBE 0x0012c0cb MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0012c0d1 LAB_0012c0cb: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX LAB_0012c0d1: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
/* unsigned int const cxpr::floor<unsigned int, float>(float) */ uint cxpr::floor<unsigned_int,float>(float param_1) { uint local_c; local_c = (uint)(long)param_1; if (param_1 < (float)((long)param_1 & 0xffffffff)) { local_c = local_c - 1; } return local_c; }
189
copy_not_changed_fields
eloqsql/storage/maria/ma_blockrec.c
void copy_not_changed_fields(MARIA_HA *info, MY_BITMAP *changed_fields, uchar *to, uchar *from) { MARIA_COLUMNDEF *column, *end_column; uchar *bitmap= (uchar*) changed_fields->bitmap; MARIA_SHARE *share= info->s; uint bit= 1; for (column= share->columndef, end_column= column+ share->base.fields; column < end_column; column++) { if (!(*bitmap & bit)) { uint field_length= column->length; if (column->type == FIELD_VARCHAR) { if (column->fill_length == 1) field_length= (uint) from[column->offset] + 1; else field_length= uint2korr(from + column->offset) + 2; } memcpy(to + column->offset, from + column->offset, field_length); } if ((bit= (bit << 1)) == 256) { bitmap++; bit= 1; } } }
O0
c
copy_not_changed_fields: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movl $0x1, -0x44(%rbp) movq -0x40(%rbp), %rax movq 0x588(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x3c8(%rcx), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x74894 movq -0x38(%rbp), %rax movzbl (%rax), %eax andl -0x44(%rbp), %eax cmpl $0x0, %eax jne 0x7485f movq -0x28(%rbp), %rax movzwl 0x8(%rax), %eax movl %eax, -0x48(%rbp) movq -0x28(%rbp), %rax cmpl $0x8, (%rax) jne 0x74839 movq -0x28(%rbp), %rax movzwl 0xc(%rax), %eax cmpl $0x1, %eax jne 0x74822 movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x4(%rcx), %ecx movzbl (%rax,%rcx), %eax addl $0x1, %eax movl %eax, -0x48(%rbp) jmp 0x74837 movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x4(%rcx), %ecx movzwl (%rax,%rcx), %eax addl $0x2, %eax movl %eax, -0x48(%rbp) jmp 0x74839 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rax movl 0x4(%rax), %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rax movl 0x4(%rax), %eax addq %rax, %rsi movl -0x48(%rbp), %eax movl %eax, %edx callq 0x2a090 movl -0x44(%rbp), %eax shll %eax movl %eax, -0x44(%rbp) cmpl $0x100, %eax # imm = 0x100 jne 0x74881 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movl $0x1, -0x44(%rbp) jmp 0x74883 movq -0x28(%rbp), %rax addq $0x38, %rax movq %rax, -0x28(%rbp) jmp 0x747cd addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
copy_not_changed_fields: 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 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_40], rax mov [rbp+var_44], 1 mov rax, [rbp+var_40] mov rax, [rax+588h] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_40] mov ecx, [rcx+3C8h] imul rcx, 38h ; '8' add rax, rcx mov [rbp+var_30], rax loc_747CD: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb loc_74894 mov rax, [rbp+var_38] movzx eax, byte ptr [rax] and eax, [rbp+var_44] cmp eax, 0 jnz short loc_7485F mov rax, [rbp+var_28] movzx eax, word ptr [rax+8] mov [rbp+var_48], eax mov rax, [rbp+var_28] cmp dword ptr [rax], 8 jnz short loc_74839 mov rax, [rbp+var_28] movzx eax, word ptr [rax+0Ch] cmp eax, 1 jnz short loc_74822 mov rax, [rbp+var_20] mov rcx, [rbp+var_28] mov ecx, [rcx+4] movzx eax, byte ptr [rax+rcx] add eax, 1 mov [rbp+var_48], eax jmp short loc_74837 loc_74822: mov rax, [rbp+var_20] mov rcx, [rbp+var_28] mov ecx, [rcx+4] movzx eax, word ptr [rax+rcx] add eax, 2 mov [rbp+var_48], eax loc_74837: jmp short $+2 loc_74839: mov rdi, [rbp+var_18] mov rax, [rbp+var_28] mov eax, [rax+4] add rdi, rax mov rsi, [rbp+var_20] mov rax, [rbp+var_28] mov eax, [rax+4] add rsi, rax mov eax, [rbp+var_48] mov edx, eax call _memcpy loc_7485F: mov eax, [rbp+var_44] shl eax, 1 mov [rbp+var_44], eax cmp eax, 100h jnz short loc_74881 mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax mov [rbp+var_44], 1 loc_74881: jmp short $+2 loc_74883: mov rax, [rbp+var_28] add rax, 38h ; '8' mov [rbp+var_28], rax jmp loc_747CD loc_74894: add rsp, 50h pop rbp retn
unsigned long long copy_not_changed_fields(long long a1, _BYTE **a2, long long a3, long long a4) { unsigned long long result; // rax int v5; // eax unsigned int v6; // [rsp+8h] [rbp-48h] int v7; // [rsp+Ch] [rbp-44h] _BYTE *v8; // [rsp+18h] [rbp-38h] unsigned long long v9; // [rsp+20h] [rbp-30h] unsigned long long v10; // [rsp+28h] [rbp-28h] v8 = *a2; v7 = 1; v10 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL); v9 = 56LL * *(unsigned int *)(*(_QWORD *)a1 + 968LL) + v10; while ( 1 ) { result = v10; if ( v10 >= v9 ) break; if ( ((unsigned __int8)v7 & *v8) == 0 ) { v6 = *(unsigned __int16 *)(v10 + 8); if ( *(_DWORD *)v10 == 8 ) { if ( *(_WORD *)(v10 + 12) == 1 ) v5 = *(unsigned __int8 *)(a4 + *(unsigned int *)(v10 + 4)) + 1; else v5 = *(unsigned __int16 *)(a4 + *(unsigned int *)(v10 + 4)) + 2; v6 = v5; } memcpy(*(unsigned int *)(v10 + 4) + a3, *(unsigned int *)(v10 + 4) + a4, v6); } v7 *= 2; if ( v7 == 256 ) { ++v8; v7 = 1; } v10 += 56LL; } return result; }
copy_not_changed_fields: 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 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x44],0x1 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x588] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x3c8] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_001747cd: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00174894 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] AND EAX,dword ptr [RBP + -0x44] CMP EAX,0x0 JNZ 0x0017485f MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x8 JNZ 0x00174839 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0xc] CMP EAX,0x1 JNZ 0x00174822 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x4] MOVZX EAX,byte ptr [RAX + RCX*0x1] ADD EAX,0x1 MOV dword ptr [RBP + -0x48],EAX JMP 0x00174837 LAB_00174822: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x4] MOVZX EAX,word ptr [RAX + RCX*0x1] ADD EAX,0x2 MOV dword ptr [RBP + -0x48],EAX LAB_00174837: JMP 0x00174839 LAB_00174839: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x4] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x48] MOV EDX,EAX CALL 0x0012a090 LAB_0017485f: MOV EAX,dword ptr [RBP + -0x44] SHL EAX,0x1 MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x100 JNZ 0x00174881 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x44],0x1 LAB_00174881: JMP 0x00174883 LAB_00174883: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x38 MOV qword ptr [RBP + -0x28],RAX JMP 0x001747cd LAB_00174894: ADD RSP,0x50 POP RBP RET
void copy_not_changed_fields(long *param_1,int8 *param_2,long param_3,long param_4) { int *piVar1; uint local_50; uint local_4c; byte *local_40; int *local_30; local_40 = (byte *)*param_2; local_4c = 1; local_30 = *(int **)(*param_1 + 0x588); piVar1 = local_30 + (ulong)*(uint *)(*param_1 + 0x3c8) * 0xe; for (; local_30 < piVar1; local_30 = local_30 + 0xe) { if ((*local_40 & local_4c) == 0) { local_50 = (uint)*(ushort *)(local_30 + 2); if (*local_30 == 8) { if ((short)local_30[3] == 1) { local_50 = *(byte *)(param_4 + (ulong)(uint)local_30[1]) + 1; } else { local_50 = *(ushort *)(param_4 + (ulong)(uint)local_30[1]) + 2; } } memcpy((void *)(param_3 + (ulong)(uint)local_30[1]), (void *)(param_4 + (ulong)(uint)local_30[1]),(ulong)local_50); } local_4c = local_4c << 1; if (local_4c == 0x100) { local_40 = local_40 + 1; local_4c = 1; } } return; }
190
hi0bits
eloqsql/strings/dtoa.c
static int hi0bits(register ULong x) { register int k= 0; if (!(x & 0xffff0000)) { k= 16; x<<= 16; } if (!(x & 0xff000000)) { k+= 8; x<<= 8; } if (!(x & 0xf0000000)) { k+= 4; x<<= 4; } if (!(x & 0xc0000000)) { k+= 2; x<<= 2; } if (!(x & 0x80000000)) { k++; if (!(x & 0x40000000)) return 32; } return k; }
O0
c
hi0bits: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0xffff0000, %eax # imm = 0xFFFF0000 cmpl $0x0, %eax jne 0xa7b2b movl $0x10, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x10, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xff000000, %eax # imm = 0xFF000000 cmpl $0x0, %eax jne 0xa7b4a movl -0xc(%rbp), %eax addl $0x8, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x8, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xf0000000, %eax # imm = 0xF0000000 cmpl $0x0, %eax jne 0xa7b69 movl -0xc(%rbp), %eax addl $0x4, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x4, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xc0000000, %eax # imm = 0xC0000000 cmpl $0x0, %eax jne 0xa7b88 movl -0xc(%rbp), %eax addl $0x2, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x2, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax jne 0xa7bb6 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0x40000000, %eax # imm = 0x40000000 cmpl $0x0, %eax jne 0xa7bb4 movl $0x20, -0x4(%rbp) jmp 0xa7bbc jmp 0xa7bb6 movl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
hi0bits: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_C], 0 mov eax, [rbp+var_8] and eax, 0FFFF0000h cmp eax, 0 jnz short loc_A7B2B mov [rbp+var_C], 10h mov eax, [rbp+var_8] shl eax, 10h mov [rbp+var_8], eax loc_A7B2B: mov eax, [rbp+var_8] and eax, 0FF000000h cmp eax, 0 jnz short loc_A7B4A mov eax, [rbp+var_C] add eax, 8 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 8 mov [rbp+var_8], eax loc_A7B4A: mov eax, [rbp+var_8] and eax, 0F0000000h cmp eax, 0 jnz short loc_A7B69 mov eax, [rbp+var_C] add eax, 4 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 4 mov [rbp+var_8], eax loc_A7B69: mov eax, [rbp+var_8] and eax, 0C0000000h cmp eax, 0 jnz short loc_A7B88 mov eax, [rbp+var_C] add eax, 2 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 2 mov [rbp+var_8], eax loc_A7B88: mov eax, [rbp+var_8] and eax, 80000000h cmp eax, 0 jnz short loc_A7BB6 mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax mov eax, [rbp+var_8] and eax, 40000000h cmp eax, 0 jnz short loc_A7BB4 mov [rbp+var_4], 20h ; ' ' jmp short loc_A7BBC loc_A7BB4: jmp short $+2 loc_A7BB6: mov eax, [rbp+var_C] mov [rbp+var_4], eax loc_A7BBC: mov eax, [rbp+var_4] pop rbp retn
long long hi0bits(int a1) { unsigned int v2; // [rsp+0h] [rbp-Ch] int v3; // [rsp+4h] [rbp-8h] v3 = a1; v2 = 0; if ( (a1 & 0xFFFF0000) == 0 ) { v2 = 16; v3 = a1 << 16; } if ( (v3 & 0xFF000000) == 0 ) { v2 += 8; v3 <<= 8; } if ( (v3 & 0xF0000000) == 0 ) { v2 += 4; v3 *= 16; } if ( (v3 & 0xC0000000) == 0 ) { v2 += 2; v3 *= 4; } if ( v3 < 0 ) return v2; ++v2; if ( (v3 & 0x40000000) != 0 ) return v2; else return 32; }
hi0bits: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],0x0 MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xffff0000 CMP EAX,0x0 JNZ 0x001a7b2b MOV dword ptr [RBP + -0xc],0x10 MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x10 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b2b: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xff000000 CMP EAX,0x0 JNZ 0x001a7b4a MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x8 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x8 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b4a: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xf0000000 CMP EAX,0x0 JNZ 0x001a7b69 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x4 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x4 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b69: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xc0000000 CMP EAX,0x0 JNZ 0x001a7b88 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x2 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x2 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b88: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x80000000 CMP EAX,0x0 JNZ 0x001a7bb6 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x40000000 CMP EAX,0x0 JNZ 0x001a7bb4 MOV dword ptr [RBP + -0x4],0x20 JMP 0x001a7bbc LAB_001a7bb4: JMP 0x001a7bb6 LAB_001a7bb6: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX LAB_001a7bbc: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int hi0bits(uint param_1) { int local_14; uint local_10; int local_c; local_14 = 0; local_10 = param_1; if ((param_1 & 0xffff0000) == 0) { local_14 = 0x10; local_10 = param_1 << 0x10; } if ((local_10 & 0xff000000) == 0) { local_14 = local_14 + 8; local_10 = local_10 << 8; } if ((local_10 & 0xf0000000) == 0) { local_14 = local_14 + 4; local_10 = local_10 << 4; } if ((local_10 & 0xc0000000) == 0) { local_14 = local_14 + 2; local_10 = local_10 << 2; } if (((local_10 & 0x80000000) == 0) && (local_14 = local_14 + 1, (local_10 & 0x40000000) == 0)) { local_c = 0x20; } else { local_c = local_14; } return local_c; }
191
tailoring_append
eloqsql/strings/ctype.c
static int tailoring_append(MY_XML_PARSER *st, const char *fmt, size_t len, const char *attr) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len, attr); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O3
c
tailoring_append: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r9 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x690(%rdi), %r13 leaq (%rdx,%r13), %rax addq $0x40, %rax cmpq %rax, 0x698(%rdi) jbe 0xd7e07 movq 0x688(%rbx), %rax jmp 0xd7e4b movq %r9, %r14 addq %r15, %r13 movq 0x688(%rbx), %rdi movq 0x7a8(%rbx), %rax movq 0x90(%rax), %rax addq $0x8040, %r13 # imm = 0x8040 movq %r13, 0x698(%rbx) movq %r13, %rsi callq *%rax movq %rax, 0x688(%rbx) testq %rax, %rax je 0xd7e8e movq 0x690(%rbx), %r13 movq %r14, %r9 addq %rax, %r13 xorl %r14d, %r14d movq %r13, %rdi movl $0x1, %esi movq $-0x1, %rdx movq %r12, %rcx movl %r15d, %r8d xorl %eax, %eax callq 0x39c50 movq %r13, %rdi callq 0x39400 addq %rax, 0x690(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %r14d jmp 0xd7e7c
tailoring_append: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r9, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov r13, [rdi+690h] lea rax, [rdx+r13] add rax, 40h ; '@' cmp [rdi+698h], rax jbe short loc_D7E07 mov rax, [rbx+688h] jmp short loc_D7E4B loc_D7E07: mov r14, r9 add r13, r15 mov rdi, [rbx+688h] mov rax, [rbx+7A8h] mov rax, [rax+90h] add r13, 8040h mov [rbx+698h], r13 mov rsi, r13 call rax mov [rbx+688h], rax test rax, rax jz short loc_D7E8E mov r13, [rbx+690h] mov r9, r14 loc_D7E4B: add r13, rax xor r14d, r14d mov rdi, r13 mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh mov rcx, r12 mov r8d, r15d xor eax, eax call ___sprintf_chk mov rdi, r13 call _strlen add [rbx+690h], rax loc_D7E7C: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D7E8E: mov r14d, 1 jmp short loc_D7E7C
long long tailoring_append(_QWORD *a1, const char *a2, long long a3, long long a4) { long long v4; // rax long long v5; // r9 unsigned int v6; // r15d long long v8; // r13 long long v9; // rax long long v11; // rdi long long ( *v12)(long long, long long); // rax long long v13; // r13 long long v14; // r13 unsigned int v15; // r14d long long v17; // [rsp-8h] [rbp-30h] v17 = v4; v5 = a4; v6 = a3; v8 = a1[210]; if ( a1[211] <= (unsigned long long)(a3 + v8 + 64) ) { v11 = a1[209]; v12 = *(long long ( **)(long long, long long))(a1[245] + 144LL); v13 = a3 + v8 + 32832; a1[211] = v13; v9 = v12(v11, v13); a1[209] = v9; if ( !v9 ) return 1; v8 = a1[210]; v5 = a4; } else { v9 = a1[209]; } v14 = v9 + v8; v15 = 0; __sprintf_chk(v14, 1LL, -1LL, a2, v6, v5, v17); a1[210] += strlen(v14); return v15; }
tailoring_append: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R9,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x690] LEA RAX,[RDX + R13*0x1] ADD RAX,0x40 CMP qword ptr [RDI + 0x698],RAX JBE 0x001d7e07 MOV RAX,qword ptr [RBX + 0x688] JMP 0x001d7e4b LAB_001d7e07: MOV R14,R9 ADD R13,R15 MOV RDI,qword ptr [RBX + 0x688] MOV RAX,qword ptr [RBX + 0x7a8] MOV RAX,qword ptr [RAX + 0x90] ADD R13,0x8040 MOV qword ptr [RBX + 0x698],R13 MOV RSI,R13 CALL RAX MOV qword ptr [RBX + 0x688],RAX TEST RAX,RAX JZ 0x001d7e8e MOV R13,qword ptr [RBX + 0x690] MOV R9,R14 LAB_001d7e4b: ADD R13,RAX XOR R14D,R14D MOV RDI,R13 MOV ESI,0x1 MOV RDX,-0x1 MOV RCX,R12 MOV R8D,R15D XOR EAX,EAX CALL 0x00139c50 MOV RDI,R13 CALL 0x00139400 ADD qword ptr [RBX + 0x690],RAX LAB_001d7e7c: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d7e8e: MOV R14D,0x1 JMP 0x001d7e7c
int8 tailoring_append(long param_1,int8 param_2,ulong param_3,int8 param_4) { code *pcVar1; long lVar2; size_t sVar3; long lVar4; lVar4 = *(long *)(param_1 + 0x690); if (param_3 + lVar4 + 0x40 < *(ulong *)(param_1 + 0x698)) { lVar2 = *(long *)(param_1 + 0x688); } else { pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90); lVar4 = lVar4 + param_3 + 0x8040; *(long *)(param_1 + 0x698) = lVar4; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688),lVar4); *(long *)(param_1 + 0x688) = lVar2; if (lVar2 == 0) { return 1; } lVar4 = *(long *)(param_1 + 0x690); } __sprintf_chk((char *)(lVar4 + lVar2),1,0xffffffffffffffff,param_2,param_3 & 0xffffffff,param_4); sVar3 = strlen((char *)(lVar4 + lVar2)); *(long *)(param_1 + 0x690) = *(long *)(param_1 + 0x690) + sVar3; return 0; }
192
add_plugin
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
static struct st_mysql_client_plugin * add_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin, void *dlhandle, int argc, va_list args) { const char *errmsg; struct st_client_plugin_int plugin_int, *p; char errbuf[1024]; int plugin_nr; DBUG_ASSERT(initialized); plugin_int.plugin= plugin; plugin_int.dlhandle= dlhandle; if ((plugin_nr= get_plugin_nr(plugin->type)) == -1) { errmsg= "Unknown client plugin type"; goto err1; } if ((errmsg= check_plugin_version(plugin, valid_plugins[plugin_nr][1]))) goto err1; /* Call the plugin initialization function, if any */ if (plugin->init && plugin->init(errbuf, sizeof(errbuf), argc, args)) { errmsg= errbuf; goto err1; } p= (struct st_client_plugin_int *) ma_memdup_root(&mem_root, (char *)&plugin_int, sizeof(plugin_int)); if (!p) { errmsg= "Out of memory"; goto err2; } p->next= plugin_list[plugin_nr]; plugin_list[plugin_nr]= p; return plugin; err2: if (plugin->deinit) plugin->deinit(); err1: my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), plugin->name, errmsg); if (dlhandle) (void)dlclose(dlhandle); return NULL; }
O0
c
add_plugin: pushq %rbp movq %rsp, %rbp subq $0x480, %rsp # imm = 0x480 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x420(%rbp) movq %rsi, -0x428(%rbp) movq %rdx, -0x430(%rbp) movl %ecx, -0x434(%rbp) movq %r8, -0x440(%rbp) movq -0x428(%rbp), %rax movq %rax, -0x450(%rbp) movq -0x430(%rbp), %rax movq %rax, -0x458(%rbp) movq -0x428(%rbp), %rax movl (%rax), %edi callq 0x362d0 movl %eax, -0x46c(%rbp) cmpl $-0x1, %eax jne 0x35892 leaq 0x166ff(%rip), %rax # 0x4bf85 movq %rax, -0x448(%rbp) jmp 0x359a6 movq -0x428(%rbp), %rdi movslq -0x46c(%rbp), %rcx leaq 0x29509(%rip), %rax # 0x5edb0 movl 0x4(%rax,%rcx,8), %esi callq 0x36330 movq %rax, -0x448(%rbp) cmpq $0x0, %rax je 0x358c2 jmp 0x359a6 movq -0x428(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x3590e movq -0x428(%rbp), %rax movq 0x40(%rax), %rax leaq -0x410(%rbp), %rdi movl -0x434(%rbp), %edx movq -0x440(%rbp), %rcx movl $0x400, %esi # imm = 0x400 callq *%rax cmpl $0x0, %eax je 0x3590e leaq -0x410(%rbp), %rax movq %rax, -0x448(%rbp) jmp 0x359a6 leaq 0x2c31b(%rip), %rdi # 0x61c30 leaq -0x460(%rbp), %rsi movl $0x18, %edx callq 0x24d90 movq %rax, -0x468(%rbp) cmpq $0x0, -0x468(%rbp) jne 0x35947 leaq 0x16662(%rip), %rax # 0x4bfa0 movq %rax, -0x448(%rbp) jmp 0x3598c movslq -0x46c(%rbp), %rcx leaq 0x2c31b(%rip), %rax # 0x61c70 movq (%rax,%rcx,8), %rcx movq -0x468(%rbp), %rax movq %rcx, (%rax) movq -0x468(%rbp), %rdx movslq -0x46c(%rbp), %rcx leaq 0x2c2f8(%rip), %rax # 0x61c70 movq %rdx, (%rax,%rcx,8) movq -0x428(%rbp), %rax movq %rax, -0x418(%rbp) jmp 0x35a04 movq -0x428(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x359a4 movq -0x428(%rbp), %rax callq *0x48(%rax) jmp 0x359a6 movq -0x420(%rbp), %rdi leaq 0x2a4cc(%rip), %rax # 0x5fe80 movq (%rax), %rdx leaq 0x2a4d2(%rip), %rax # 0x5fe90 movq 0x1d8(%rax), %rcx movq -0x428(%rbp), %rax movq 0x8(%rax), %r8 movq -0x448(%rbp), %r9 movl $0x80b, %esi # imm = 0x80B movb $0x0, %al callq 0x15fd0 cmpq $0x0, -0x430(%rbp) je 0x359f9 movq -0x430(%rbp), %rdi callq 0x13340 movq $0x0, -0x418(%rbp) movq -0x418(%rbp), %rax movq %rax, -0x478(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x35a34 movq -0x478(%rbp), %rax addq $0x480, %rsp # imm = 0x480 popq %rbp retq callq 0x134b0 nopl (%rax)
add_plugin: push rbp mov rbp, rsp sub rsp, 480h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_420], rdi mov [rbp+var_428], rsi mov [rbp+var_430], rdx mov [rbp+var_434], ecx mov [rbp+var_440], r8 mov rax, [rbp+var_428] mov [rbp+var_450], rax mov rax, [rbp+var_430] mov [rbp+var_458], rax mov rax, [rbp+var_428] mov edi, [rax] call get_plugin_nr mov [rbp+var_46C], eax cmp eax, 0FFFFFFFFh jnz short loc_35892 lea rax, aUnknownClientP; "Unknown client plugin type" mov [rbp+var_448], rax jmp loc_359A6 loc_35892: mov rdi, [rbp+var_428] movsxd rcx, [rbp+var_46C] lea rax, valid_plugins mov esi, [rax+rcx*8+4] call check_plugin_version mov [rbp+var_448], rax cmp rax, 0 jz short loc_358C2 jmp loc_359A6 loc_358C2: mov rax, [rbp+var_428] cmp qword ptr [rax+40h], 0 jz short loc_3590E mov rax, [rbp+var_428] mov rax, [rax+40h] lea rdi, [rbp+var_410] mov edx, [rbp+var_434] mov rcx, [rbp+var_440] mov esi, 400h call rax cmp eax, 0 jz short loc_3590E lea rax, [rbp+var_410] mov [rbp+var_448], rax jmp loc_359A6 loc_3590E: lea rdi, mem_root lea rsi, [rbp+var_460] mov edx, 18h call ma_memdup_root mov [rbp+var_468], rax cmp [rbp+var_468], 0 jnz short loc_35947 lea rax, aOutOfMemory; "Out of memory" mov [rbp+var_448], rax jmp short loc_3598C loc_35947: movsxd rcx, [rbp+var_46C] lea rax, plugin_list mov rcx, [rax+rcx*8] mov rax, [rbp+var_468] mov [rax], rcx mov rdx, [rbp+var_468] movsxd rcx, [rbp+var_46C] lea rax, plugin_list mov [rax+rcx*8], rdx mov rax, [rbp+var_428] mov [rbp+var_418], rax jmp short loc_35A04 loc_3598C: mov rax, [rbp+var_428] cmp qword ptr [rax+48h], 0 jz short loc_359A4 mov rax, [rbp+var_428] call qword ptr [rax+48h] loc_359A4: jmp short $+2 loc_359A6: mov rdi, [rbp+var_420] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] mov rax, [rbp+var_428] mov r8, [rax+8] mov r9, [rbp+var_448] mov esi, 80Bh mov al, 0 call my_set_error cmp [rbp+var_430], 0 jz short loc_359F9 mov rdi, [rbp+var_430] call _dlclose loc_359F9: mov [rbp+var_418], 0 loc_35A04: mov rax, [rbp+var_418] mov [rbp+var_478], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_35A34 mov rax, [rbp+var_478] add rsp, 480h pop rbp retn loc_35A34: call ___stack_chk_fail
void (** add_plugin(long long a1, void (**a2)(void), long long a3, unsigned int a4, long long a5))(void) { int plugin_nr; // [rsp+14h] [rbp-46Ch] char *v7; // [rsp+18h] [rbp-468h] char v8[8]; // [rsp+20h] [rbp-460h] BYREF long long v9; // [rsp+28h] [rbp-458h] void (**v10)(void); // [rsp+30h] [rbp-450h] const char *v11; // [rsp+38h] [rbp-448h] long long v12; // [rsp+40h] [rbp-440h] unsigned int v13; // [rsp+4Ch] [rbp-434h] long long v14; // [rsp+50h] [rbp-430h] void (**v15)(void); // [rsp+58h] [rbp-428h] long long v16; // [rsp+60h] [rbp-420h] _BYTE v18[1032]; // [rsp+70h] [rbp-410h] BYREF unsigned long long v19; // [rsp+478h] [rbp-8h] v19 = __readfsqword(0x28u); v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v10 = a2; v9 = a3; plugin_nr = get_plugin_nr(*(unsigned int *)a2); if ( plugin_nr == -1 ) { v11 = "Unknown client plugin type"; } else { v11 = (const char *)check_plugin_version(v15, valid_plugins[2 * plugin_nr + 1]); if ( !v11 ) { if ( v15[8] && ((unsigned int ( *)(_BYTE *, long long, _QWORD, long long))v15[8])(v18, 1024LL, v13, v12) ) { v11 = v18; } else { v7 = ma_memdup_root((_QWORD **)mem_root, (long long)v8, 24LL); if ( v7 ) { *(_QWORD *)v7 = plugin_list[plugin_nr]; plugin_list[plugin_nr] = v7; return v15; } v11 = "Out of memory"; if ( v15[9] ) v15[9](); } } } my_set_error(v16, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], v15[1], v11); if ( v14 ) dlclose(v14); return 0LL; }
add_plugin: PUSH RBP MOV RBP,RSP SUB RSP,0x480 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x420],RDI MOV qword ptr [RBP + -0x428],RSI MOV qword ptr [RBP + -0x430],RDX MOV dword ptr [RBP + -0x434],ECX MOV qword ptr [RBP + -0x440],R8 MOV RAX,qword ptr [RBP + -0x428] MOV qword ptr [RBP + -0x450],RAX MOV RAX,qword ptr [RBP + -0x430] MOV qword ptr [RBP + -0x458],RAX MOV RAX,qword ptr [RBP + -0x428] MOV EDI,dword ptr [RAX] CALL 0x001362d0 MOV dword ptr [RBP + -0x46c],EAX CMP EAX,-0x1 JNZ 0x00135892 LEA RAX,[0x14bf85] MOV qword ptr [RBP + -0x448],RAX JMP 0x001359a6 LAB_00135892: MOV RDI,qword ptr [RBP + -0x428] MOVSXD RCX,dword ptr [RBP + -0x46c] LEA RAX,[0x15edb0] MOV ESI,dword ptr [RAX + RCX*0x8 + 0x4] CALL 0x00136330 MOV qword ptr [RBP + -0x448],RAX CMP RAX,0x0 JZ 0x001358c2 JMP 0x001359a6 LAB_001358c2: MOV RAX,qword ptr [RBP + -0x428] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0013590e MOV RAX,qword ptr [RBP + -0x428] MOV RAX,qword ptr [RAX + 0x40] LEA RDI,[RBP + -0x410] MOV EDX,dword ptr [RBP + -0x434] MOV RCX,qword ptr [RBP + -0x440] MOV ESI,0x400 CALL RAX CMP EAX,0x0 JZ 0x0013590e LEA RAX,[RBP + -0x410] MOV qword ptr [RBP + -0x448],RAX JMP 0x001359a6 LAB_0013590e: LEA RDI,[0x161c30] LEA RSI,[RBP + -0x460] MOV EDX,0x18 CALL 0x00124d90 MOV qword ptr [RBP + -0x468],RAX CMP qword ptr [RBP + -0x468],0x0 JNZ 0x00135947 LEA RAX,[0x14bfa0] MOV qword ptr [RBP + -0x448],RAX JMP 0x0013598c LAB_00135947: MOVSXD RCX,dword ptr [RBP + -0x46c] LEA RAX,[0x161c70] MOV RCX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x468] MOV qword ptr [RAX],RCX MOV RDX,qword ptr [RBP + -0x468] MOVSXD RCX,dword ptr [RBP + -0x46c] LEA RAX,[0x161c70] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x428] MOV qword ptr [RBP + -0x418],RAX JMP 0x00135a04 LAB_0013598c: MOV RAX,qword ptr [RBP + -0x428] CMP qword ptr [RAX + 0x48],0x0 JZ 0x001359a4 MOV RAX,qword ptr [RBP + -0x428] CALL qword ptr [RAX + 0x48] LAB_001359a4: JMP 0x001359a6 LAB_001359a6: MOV RDI,qword ptr [RBP + -0x420] LEA RAX,[0x15fe80] MOV RDX,qword ptr [RAX] LEA RAX,[0x15fe90] MOV RCX,qword ptr [RAX + 0x1d8] MOV RAX,qword ptr [RBP + -0x428] MOV R8,qword ptr [RAX + 0x8] MOV R9,qword ptr [RBP + -0x448] MOV ESI,0x80b MOV AL,0x0 CALL 0x00115fd0 CMP qword ptr [RBP + -0x430],0x0 JZ 0x001359f9 MOV RDI,qword ptr [RBP + -0x430] CALL 0x00113340 LAB_001359f9: MOV qword ptr [RBP + -0x418],0x0 LAB_00135a04: MOV RAX,qword ptr [RBP + -0x418] MOV qword ptr [RBP + -0x478],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00135a34 MOV RAX,qword ptr [RBP + -0x478] ADD RSP,0x480 POP RBP RET LAB_00135a34: CALL 0x001134b0
int4 * add_plugin(int8 param_1,int4 *param_2,long param_3,int4 param_4,int8 param_5 ) { int iVar1; int iVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_468 [8]; long local_460; int4 *local_458; char *local_450; int8 local_448; int4 local_43c; long local_438; int4 *local_430; int8 local_428; int4 *local_420; char local_418 [1032]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_460 = param_3; local_458 = param_2; local_448 = param_5; local_43c = param_4; local_438 = param_3; local_430 = param_2; local_428 = param_1; iVar1 = get_plugin_nr(*param_2); if (iVar1 == -1) { local_450 = "Unknown client plugin type"; } else { local_450 = (char *)check_plugin_version (local_430,*(int4 *)(valid_plugins + (long)iVar1 * 8 + 4)); if (local_450 == (char *)0x0) { if ((*(long *)(local_430 + 0x10) == 0) || (iVar2 = (**(code **)(local_430 + 0x10))(local_418,0x400,local_43c,local_448), iVar2 == 0)) { puVar3 = (int8 *)ma_memdup_root(mem_root,local_468,0x18); if (puVar3 != (int8 *)0x0) { *puVar3 = *(int8 *)(plugin_list + (long)iVar1 * 8); *(int8 **)(plugin_list + (long)iVar1 * 8) = puVar3; local_420 = local_430; goto LAB_00135a04; } local_450 = "Out of memory"; if (*(long *)(local_430 + 0x12) != 0) { (**(code **)(local_430 + 0x12))(); } } else { local_450 = local_418; } } } my_set_error(local_428,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00160068, *(int8 *)(local_430 + 2),local_450); if (local_438 != 0) { dlclose(local_438); } local_420 = (int4 *)0x0; LAB_00135a04: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_420; }
193
fn_ext2
eloqsql/mysys/mf_fn_ext.c
char *fn_ext2(const char *name) { register const char *pos, *gpos; DBUG_ENTER("fn_ext"); DBUG_PRINT("mfunkt",("name: '%s'",name)); #if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL) { char buff[FN_REFLEN]; size_t res_length; gpos= name+ dirname_part(buff,(char*) name, &res_length); } #else if (!(gpos= strrchr(name, FN_LIBCHAR))) gpos= name; #endif // locate the last occurrence of FN_EXTCHAR pos= strrchr(gpos, FN_EXTCHAR); DBUG_RETURN((char*) (pos ? pos : strend(gpos))); }
O0
c
fn_ext2: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) jmp 0x3547e movq -0x8(%rbp), %rdi movl $0x2f, %esi callq 0x25320 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x3549e movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi movl $0x2e, %esi callq 0x25320 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x354c1 movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x354ce movq -0x18(%rbp), %rdi callq 0x7fcc0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq
fn_ext2: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi jmp short $+2 loc_3547E: mov rdi, [rbp+var_8] mov esi, 2Fh ; '/' call _strrchr mov [rbp+var_18], rax cmp rax, 0 jnz short loc_3549E mov rax, [rbp+var_8] mov [rbp+var_18], rax loc_3549E: mov rdi, [rbp+var_18] mov esi, 2Eh ; '.' call _strrchr mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_354C1 mov rax, [rbp+var_10] mov [rbp+var_20], rax jmp short loc_354CE loc_354C1: mov rdi, [rbp+var_18] call strend mov [rbp+var_20], rax loc_354CE: mov rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
long long fn_ext2(long long a1) { long long v3; // [rsp+18h] [rbp-18h] long long v4; // [rsp+20h] [rbp-10h] v3 = strrchr(a1, 47LL); if ( !v3 ) v3 = a1; v4 = strrchr(v3, 46LL); if ( v4 ) return v4; else return strend(v3); }
fn_ext2: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI JMP 0x0013547e LAB_0013547e: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x2f CALL 0x00125320 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0013549e MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX LAB_0013549e: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x2e CALL 0x00125320 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x001354c1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX JMP 0x001354ce LAB_001354c1: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0017fcc0 MOV qword ptr [RBP + -0x20],RAX LAB_001354ce: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
char * fn_ext2(char *param_1) { int8 local_28; int8 local_20; local_20 = strrchr(param_1,0x2f); if (local_20 == (char *)0x0) { local_20 = param_1; } local_28 = strrchr(local_20,0x2e); if (local_28 == (char *)0x0) { local_28 = (char *)strend(local_20); } return local_28; }
194
fn_ext2
eloqsql/mysys/mf_fn_ext.c
char *fn_ext2(const char *name) { register const char *pos, *gpos; DBUG_ENTER("fn_ext"); DBUG_PRINT("mfunkt",("name: '%s'",name)); #if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL) { char buff[FN_REFLEN]; size_t res_length; gpos= name+ dirname_part(buff,(char*) name, &res_length); } #else if (!(gpos= strrchr(name, FN_LIBCHAR))) gpos= name; #endif // locate the last occurrence of FN_EXTCHAR pos= strrchr(gpos, FN_EXTCHAR); DBUG_RETURN((char*) (pos ? pos : strend(gpos))); }
O3
c
fn_ext2: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %r14 movl $0x2f, %esi callq 0x24360 movq %rax, %rbx testq %rax, %rax cmoveq %r14, %rbx movq %rbx, %rdi movl $0x2e, %esi callq 0x24360 testq %rax, %rax je 0x2eaea popq %rbx popq %r14 popq %rbp retq movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x5f3b8 nop
fn_ext2: push rbp mov rbp, rsp push r14 push rbx mov r14, rdi mov esi, 2Fh ; '/' call _strrchr mov rbx, rax test rax, rax cmovz rbx, r14 mov rdi, rbx mov esi, 2Eh ; '.' call _strrchr test rax, rax jz short loc_2EAEA pop rbx pop r14 pop rbp retn loc_2EAEA: mov rdi, rbx pop rbx pop r14 pop rbp jmp strend
long long fn_ext2(long long a1) { long long v1; // rbx long long result; // rax v1 = strrchr(a1, 47LL); if ( !v1 ) v1 = a1; result = strrchr(v1, 46LL); if ( !result ) return strend(v1); return result; }
fn_ext2: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDI MOV ESI,0x2f CALL 0x00124360 MOV RBX,RAX TEST RAX,RAX CMOVZ RBX,R14 MOV RDI,RBX MOV ESI,0x2e CALL 0x00124360 TEST RAX,RAX JZ 0x0012eaea POP RBX POP R14 POP RBP RET LAB_0012eaea: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x0015f3b8
void fn_ext2(char *param_1) { char *__s; char *pcVar1; __s = strrchr(param_1,0x2f); if (__s == (char *)0x0) { __s = param_1; } pcVar1 = strrchr(__s,0x2e); if (pcVar1 != (char *)0x0) { return; } strend(__s); return; }
195
wait_for_readers
eloqsql/storage/maria/ma_pagecache.c
static inline void wait_for_readers(PAGECACHE *pagecache __attribute__((unused)), PAGECACHE_BLOCK_LINK *block __attribute__((unused))) { struct st_my_thread_var *thread= my_thread_var; DBUG_ASSERT(block->condvar == NULL); while (block->hash_link->requests) { DBUG_ENTER("wait_for_readers"); DBUG_PRINT("wait", ("suspend thread: %s %ld block: %u", thread->name, (ulong) thread->id, PCBLOCK_NUMBER(pagecache, block))); block->condvar= &thread->suspend; pagecache_pthread_cond_wait(&thread->suspend, &pagecache->cache_lock); block->condvar= NULL; DBUG_VOID_RETURN; } }
O0
c
wait_for_readers: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) callq 0xf7a70 movq %rax, -0x18(%rbp) jmp 0x41dfb jmp 0x41dfd movq -0x10(%rbp), %rax movq 0x20(%rax), %rax cmpl $0x0, 0x68(%rax) je 0x41e51 jmp 0x41e0d jmp 0x41e0f movq -0x18(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rdi addq $0x8, %rdi movq -0x8(%rbp), %rsi addq $0xc8, %rsi leaq 0x111a7c(%rip), %rdx # 0x1538b5 movl $0x64d, %ecx # imm = 0x64D callq 0x414d0 movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) jmp 0x41e51 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
wait_for_readers: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi call _my_thread_var mov [rbp+var_18], rax jmp short $+2 loc_41DFB: jmp short $+2 loc_41DFD: mov rax, [rbp+var_10] mov rax, [rax+20h] cmp dword ptr [rax+68h], 0 jz short loc_41E51 jmp short $+2 loc_41E0D: jmp short $+2 loc_41E0F: mov rcx, [rbp+var_18] add rcx, 8 mov rax, [rbp+var_10] mov [rax+28h], rcx mov rdi, [rbp+var_18] add rdi, 8 mov rsi, [rbp+var_8] add rsi, 0C8h lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 64Dh call inline_mysql_cond_wait_0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 jmp short $+2 loc_41E51: add rsp, 20h pop rbp retn
long long wait_for_readers(long long a1, long long a2) { long long result; // rax long long v3; // [rsp+8h] [rbp-18h] v3 = my_thread_var(); result = *(_QWORD *)(a2 + 32); if ( *(_DWORD *)(result + 104) ) { *(_QWORD *)(a2 + 40) = v3 + 8; inline_mysql_cond_wait_0( v3 + 8, a1 + 200, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x64Du); result = a2; *(_QWORD *)(a2 + 40) = 0LL; } return result; }
wait_for_readers: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CALL 0x001f7a70 MOV qword ptr [RBP + -0x18],RAX JMP 0x00141dfb LAB_00141dfb: JMP 0x00141dfd LAB_00141dfd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] CMP dword ptr [RAX + 0x68],0x0 JZ 0x00141e51 JMP 0x00141e0d LAB_00141e0d: JMP 0x00141e0f LAB_00141e0f: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc8 LEA RDX,[0x2538b5] MOV ECX,0x64d CALL 0x001414d0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 JMP 0x00141e51 LAB_00141e51: ADD RSP,0x20 POP RBP RET
void wait_for_readers(long param_1,long param_2) { long lVar1; lVar1 = _my_thread_var(); if (*(int *)(*(long *)(param_2 + 0x20) + 0x68) != 0) { *(long *)(param_2 + 0x28) = lVar1 + 8; inline_mysql_cond_wait (lVar1 + 8,param_1 + 200, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x64d); *(int8 *)(param_2 + 0x28) = 0; } return; }
196
translog_set_file_size
eloqsql/storage/maria/ma_loghandler.c
void translog_set_file_size(uint32 size) { struct st_translog_buffer *old_buffer= NULL; DBUG_ENTER("translog_set_file_size"); translog_lock(); DBUG_PRINT("enter", ("Size: %lu", (ulong) size)); DBUG_ASSERT(size % TRANSLOG_PAGE_SIZE == 0); DBUG_ASSERT(size >= TRANSLOG_MIN_FILE_SIZE); log_descriptor.log_file_max_size= size; /* if current file longer then finish it*/ if (LSN_OFFSET(log_descriptor.horizon) >= log_descriptor.log_file_max_size) { old_buffer= log_descriptor.bc.buffer; translog_buffer_next(&log_descriptor.horizon, &log_descriptor.bc, 1); translog_buffer_unlock(old_buffer); } translog_unlock(); if (old_buffer) { translog_buffer_lock(old_buffer); translog_buffer_flush(old_buffer); translog_buffer_unlock(old_buffer); } DBUG_VOID_RETURN; }
O0
c
translog_set_file_size: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x4(%rbp) movq $0x0, -0x10(%rbp) callq 0x500f0 jmp 0x57d1a jmp 0x57d1c jmp 0x57d1e jmp 0x57d20 jmp 0x57d22 movl -0x4(%rbp), %eax movl %eax, 0x4216a5(%rip) # 0x4793d0 movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq 0xc222cc(%rip), %rax # 0xc7a008 movl 0x42168e(%rip), %ecx # 0x4793d0 cmpq %rcx, %rax jb 0x57d7d movq 0xc222ea(%rip), %rax # 0xc7a038 movq %rax, -0x10(%rbp) leaq 0x421667(%rip), %rsi # 0x4793c0 movq %rsi, %rdi addq $0x800c48, %rdi # imm = 0x800C48 addq $0x800c50, %rsi # imm = 0x800C50 movl $0x1, %edx callq 0x57db0 movq -0x10(%rbp), %rdi callq 0x501b0 callq 0x501e0 cmpq $0x0, -0x10(%rbp) je 0x57da4 movq -0x10(%rbp), %rdi callq 0x50170 movq -0x10(%rbp), %rdi callq 0x563a0 movq -0x10(%rbp), %rdi callq 0x501b0 jmp 0x57da6 jmp 0x57da8 addq $0x10, %rsp popq %rbp retq nop
translog_set_file_size: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov [rbp+var_10], 0 call translog_lock jmp short $+2 loc_57D1A: jmp short $+2 loc_57D1C: jmp short $+2 loc_57D1E: jmp short $+2 loc_57D20: jmp short $+2 loc_57D22: mov eax, [rbp+var_4] mov cs:dword_4793D0, eax mov rax, 0FFFFFFFFh and rax, cs:qword_C7A008 mov ecx, cs:dword_4793D0 cmp rax, rcx jb short loc_57D7D mov rax, cs:qword_C7A038 mov [rbp+var_10], rax lea rsi, log_descriptor mov rdi, rsi add rdi, 800C48h add rsi, 800C50h mov edx, 1 call translog_buffer_next mov rdi, [rbp+var_10] call translog_buffer_unlock loc_57D7D: call translog_unlock cmp [rbp+var_10], 0 jz short loc_57DA4 mov rdi, [rbp+var_10] call translog_buffer_lock mov rdi, [rbp+var_10] call translog_buffer_flush mov rdi, [rbp+var_10] call translog_buffer_unlock loc_57DA4: jmp short $+2 loc_57DA6: jmp short $+2 loc_57DA8: add rsp, 10h pop rbp retn
long long translog_set_file_size(unsigned int a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] v2 = 0LL; translog_lock(); dword_4793D0 = a1; if ( (unsigned int)qword_C7A008 >= (unsigned long long)a1 ) { v2 = qword_C7A038; translog_buffer_next(&log_descriptor[1048969], &log_descriptor[1048970], 1LL); translog_buffer_unlock(v2); } result = translog_unlock(); if ( v2 ) { translog_buffer_lock(v2); translog_buffer_flush(v2); return translog_buffer_unlock(v2); } return result; }
translog_set_file_size: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],0x0 CALL 0x001500f0 JMP 0x00157d1a LAB_00157d1a: JMP 0x00157d1c LAB_00157d1c: JMP 0x00157d1e LAB_00157d1e: JMP 0x00157d20 LAB_00157d20: JMP 0x00157d22 LAB_00157d22: MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [0x005793d0],EAX MOV RAX,0xffffffff AND RAX,qword ptr [0x00d7a008] MOV ECX,dword ptr [0x005793d0] CMP RAX,RCX JC 0x00157d7d MOV RAX,qword ptr [0x00d7a038] MOV qword ptr [RBP + -0x10],RAX LEA RSI,[0x5793c0] MOV RDI,RSI ADD RDI,0x800c48 ADD RSI,0x800c50 MOV EDX,0x1 CALL 0x00157db0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001501b0 LAB_00157d7d: CALL 0x001501e0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x00157da4 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00150170 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001563a0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001501b0 LAB_00157da4: JMP 0x00157da6 LAB_00157da6: JMP 0x00157da8 LAB_00157da8: ADD RSP,0x10 POP RBP RET
void translog_set_file_size(uint param_1) { long lVar1; long local_18; local_18 = 0; translog_lock(); lVar1 = DAT_00d7a038; DAT_005793d0 = param_1; if ((ulong)param_1 <= (DAT_00d7a008 & 0xffffffff)) { local_18 = DAT_00d7a038; translog_buffer_next(&DAT_00d7a008,&DAT_00d7a010,1); translog_buffer_unlock(lVar1); } translog_unlock(); if (local_18 != 0) { translog_buffer_lock(local_18); translog_buffer_flush(local_18); translog_buffer_unlock(local_18); } return; }
197
translog_set_file_size
eloqsql/storage/maria/ma_loghandler.c
void translog_set_file_size(uint32 size) { struct st_translog_buffer *old_buffer= NULL; DBUG_ENTER("translog_set_file_size"); translog_lock(); DBUG_PRINT("enter", ("Size: %lu", (ulong) size)); DBUG_ASSERT(size % TRANSLOG_PAGE_SIZE == 0); DBUG_ASSERT(size >= TRANSLOG_MIN_FILE_SIZE); log_descriptor.log_file_max_size= size; /* if current file longer then finish it*/ if (LSN_OFFSET(log_descriptor.horizon) >= log_descriptor.log_file_max_size) { old_buffer= log_descriptor.bc.buffer; translog_buffer_next(&log_descriptor.horizon, &log_descriptor.bc, 1); translog_buffer_unlock(old_buffer); } translog_unlock(); if (old_buffer) { translog_buffer_lock(old_buffer); translog_buffer_flush(old_buffer); translog_buffer_unlock(old_buffer); } DBUG_VOID_RETURN; }
O3
c
translog_set_file_size: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl %edi, %ebx callq 0x4902b movl %ebx, 0x3b076c(%rip) # 0x3fe7d0 cmpl %ebx, 0xbb139e(%rip) # 0xbff408 jae 0x4e070 xorl %ebx, %ebx jmp 0x4e0ab movq 0xbb13c1(%rip), %rbx # 0xbff438 leaq 0xbb138a(%rip), %rdi # 0xbff408 leaq 0xbb138b(%rip), %rsi # 0xbff410 movl $0x1, %edx callq 0x4e13f movq 0x1000d0(%rbx), %rdi testq %rdi, %rdi jne 0x4e12a leaq 0x100090(%rbx), %rdi callq 0x291e0 movq 0xbb1386(%rip), %r14 # 0xbff438 movq 0x1000d0(%r14), %rdi testq %rdi, %rdi jne 0x4e106 addq $0x100090, %r14 # imm = 0x100090 movq %r14, %rdi callq 0x291e0 testq %rbx, %rbx je 0x4e101 movq %rbx, %rdi callq 0x490cb movq %rbx, %rdi callq 0x4cd99 movq 0x1000d0(%rbx), %rdi testq %rdi, %rdi jne 0x4e118 addq $0x100090, %rbx # imm = 0x100090 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x291e0 popq %rbx popq %r14 popq %rbp retq leaq 0x337f03(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4e0be leaq 0x337ef1(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4e0ee leaq 0x337edf(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4e09f
translog_set_file_size: push rbp mov rbp, rsp push r14 push rbx mov ebx, edi call translog_lock mov cs:dword_3FE7D0, ebx cmp dword ptr cs:qword_BFF408, ebx jnb short loc_4E070 xor ebx, ebx jmp short loc_4E0AB loc_4E070: mov rbx, qword ptr cs:xmmword_BFF430+8 lea rdi, qword_BFF408 lea rsi, xmmword_BFF410 mov edx, 1 call translog_buffer_next mov rdi, ds:qword_1000D0[rbx] test rdi, rdi jnz loc_4E12A loc_4E09F: lea rdi, unk_100090[rbx] call _pthread_mutex_unlock loc_4E0AB: mov r14, qword ptr cs:xmmword_BFF430+8 mov rdi, ds:qword_1000D0[r14] test rdi, rdi jnz short loc_4E106 loc_4E0BE: add r14, 100090h mov rdi, r14 call _pthread_mutex_unlock test rbx, rbx jz short loc_4E101 mov rdi, rbx call translog_buffer_lock mov rdi, rbx call translog_buffer_flush mov rdi, ds:qword_1000D0[rbx] test rdi, rdi jnz short loc_4E118 loc_4E0EE: add rbx, 100090h mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_4E101: pop rbx pop r14 pop rbp retn loc_4E106: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4E0BE loc_4E118: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4E0EE loc_4E12A: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_4E09F
long long translog_set_file_size(unsigned int a1) { long long v1; // rbx long long v2; // r14 long long result; // rax translog_lock(); dword_3FE7D0 = a1; if ( (unsigned int)qword_BFF408 >= a1 ) { v1 = *((_QWORD *)&xmmword_BFF430 + 1); translog_buffer_next(&qword_BFF408, &xmmword_BFF410, 1LL); if ( *(long long *)((char *)&qword_1000D0 + v1) ) PSI_server[44](); pthread_mutex_unlock((char *)&unk_100090 + v1); } else { v1 = 0LL; } v2 = *((_QWORD *)&xmmword_BFF430 + 1); if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_BFF430 + 1)) ) PSI_server[44](); result = pthread_mutex_unlock(v2 + 1048720); if ( v1 ) { translog_buffer_lock(v1); translog_buffer_flush(v1); if ( *(long long *)((char *)&qword_1000D0 + v1) ) PSI_server[44](); return pthread_mutex_unlock(v1 + 1048720); } return result; }
translog_set_file_size: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV EBX,EDI CALL 0x0014902b MOV dword ptr [0x004fe7d0],EBX CMP dword ptr [0x00cff408],EBX JNC 0x0014e070 XOR EBX,EBX JMP 0x0014e0ab LAB_0014e070: MOV RBX,qword ptr [0x00cff438] LEA RDI,[0xcff408] LEA RSI,[0xcff410] MOV EDX,0x1 CALL 0x0014e13f MOV RDI,qword ptr [RBX + 0x1000d0] TEST RDI,RDI JNZ 0x0014e12a LAB_0014e09f: LEA RDI,[RBX + 0x100090] CALL 0x001291e0 LAB_0014e0ab: MOV R14,qword ptr [0x00cff438] MOV RDI,qword ptr [R14 + 0x1000d0] TEST RDI,RDI JNZ 0x0014e106 LAB_0014e0be: ADD R14,0x100090 MOV RDI,R14 CALL 0x001291e0 TEST RBX,RBX JZ 0x0014e101 MOV RDI,RBX CALL 0x001490cb MOV RDI,RBX CALL 0x0014cd99 MOV RDI,qword ptr [RBX + 0x1000d0] TEST RDI,RDI JNZ 0x0014e118 LAB_0014e0ee: ADD RBX,0x100090 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001291e0 LAB_0014e101: POP RBX POP R14 POP RBP RET LAB_0014e106: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014e0be LAB_0014e118: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014e0ee LAB_0014e12a: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014e09f
void translog_set_file_size(uint param_1) { long lVar1; long lVar2; translog_lock(); lVar2 = DAT_00cff438; DAT_004fe7d0 = param_1; if ((uint)DAT_00cff408 < param_1) { lVar2 = 0; } else { translog_buffer_next(&DAT_00cff408,&DAT_00cff410,1); if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + lVar2) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar2)); } lVar1 = DAT_00cff438; if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00cff438) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar1)); if (lVar2 != 0) { translog_buffer_lock(lVar2); translog_buffer_flush(lVar2); if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + lVar2) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar2)); return; } return; }
198
inline_mysql_file_fclose
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_fclose( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif MYSQL_FILE *file, myf flags) { int result= 0; if (likely(file != NULL)) { #ifdef HAVE_PSI_FILE_INTERFACE if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_STREAM_CLOSE); if (likely(locker != NULL)) { PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); result= my_fclose(file->m_file, flags); PSI_FILE_CALL(end_file_close_wait)(locker, result); my_free(file); return result; } } #endif result= my_fclose(file->m_file, flags); my_free(file); } return result; }
O0
c
inline_mysql_file_fclose: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl $0x0, -0x2c(%rbp) cmpq $0x0, -0x20(%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 0x33af4 movq -0x20(%rbp), %rax cmpq $0x0, 0x8(%rax) setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x33ad8 leaq 0x1a66bf(%rip), %rax # 0x1da0f8 movq (%rax), %rax movq 0x150(%rax), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rsi leaq -0x80(%rbp), %rdi movl $0x5, %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 0x33ad6 leaq 0x1a6677(%rip), %rax # 0x1da0f8 movq (%rax), %rax movq 0x220(%rax), %rax movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi callq 0x37ea0 movl %eax, -0x2c(%rbp) leaq 0x1a6646(%rip), %rax # 0x1da0f8 movq (%rax), %rax movq 0x228(%rax), %rax movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %esi callq *%rax movq -0x20(%rbp), %rdi callq 0x2b8e0 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x33afa jmp 0x33ad8 movq -0x20(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi callq 0x37ea0 movl %eax, -0x2c(%rbp) movq -0x20(%rbp), %rdi callq 0x2b8e0 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_fclose: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], 0 cmp [rbp+var_20], 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 loc_33AF4 mov rax, [rbp+var_20] cmp qword ptr [rax+8], 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_33AD8 lea rax, PSI_server mov rax, [rax] mov rax, [rax+150h] mov rcx, [rbp+var_20] mov rsi, [rcx+8] lea rdi, [rbp+var_80] mov edx, 5 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_33AD6 lea rax, PSI_server mov rax, [rax] mov rax, [rax+220h] mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rax, [rbp+var_20] mov rdi, [rax] mov rsi, [rbp+var_28] call my_fclose mov [rbp+var_2C], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+228h] mov rdi, [rbp+var_38] mov esi, [rbp+var_2C] call rax mov rdi, [rbp+var_20] call my_free mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_33AFA loc_33AD6: jmp short $+2 loc_33AD8: mov rax, [rbp+var_20] mov rdi, [rax] mov rsi, [rbp+var_28] call my_fclose mov [rbp+var_2C], eax mov rdi, [rbp+var_20] call my_free loc_33AF4: mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_33AFA: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_fclose(long long a1, unsigned int a2, _QWORD *a3, long long a4) { _BYTE v5[72]; // [rsp+0h] [rbp-80h] BYREF long long v6; // [rsp+48h] [rbp-38h] unsigned int v7; // [rsp+54h] [rbp-2Ch] long long v8; // [rsp+58h] [rbp-28h] _QWORD *v9; // [rsp+60h] [rbp-20h] unsigned int v10; // [rsp+6Ch] [rbp-14h] long long v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = 0; if ( !a3 ) return v7; if ( !v9[1] || (v6 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 42))(v5, v9[1], 5LL)) == 0 ) { v7 = my_fclose(*v9, v8); my_free((long long)v9); return v7; } (*((void ( **)(long long, long long, _QWORD))PSI_server[0] + 68))(v6, v11, v10); v7 = my_fclose(*v9, v8); (*((void ( **)(long long, _QWORD))PSI_server[0] + 69))(v6, v7); my_free((long long)v9); return v7; }
inline_mysql_file_fclose: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],0x0 CMP qword ptr [RBP + -0x20],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 0x00133af4 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x8],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00133ad8 LEA RAX,[0x2da0f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x150] MOV RCX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RCX + 0x8] LEA RDI,[RBP + -0x80] MOV EDX,0x5 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 0x00133ad6 LEA RAX,[0x2da0f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x220] MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00137ea0 MOV dword ptr [RBP + -0x2c],EAX LEA RAX,[0x2da0f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x228] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x2c] CALL RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012b8e0 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00133afa LAB_00133ad6: JMP 0x00133ad8 LAB_00133ad8: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00137ea0 MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012b8e0 LAB_00133af4: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_00133afa: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_fclose (int8 param_1,int4 param_2,int8 *param_3,int8 param_4) { int1 local_88 [72]; long local_40; int4 local_34; int8 local_30; int8 *local_28; int4 local_1c; int8 local_18; local_34 = 0; if (param_3 != (int8 *)0x0) { local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; if (param_3[1] != 0) { local_40 = (**(code **)(PSI_server + 0x150))(local_88,param_3[1],5); if (local_40 != 0) { (**(code **)(PSI_server + 0x220))(local_40,local_18,local_1c); local_34 = my_fclose(*local_28,local_30); (**(code **)(PSI_server + 0x228))(local_40,local_34); my_free(local_28); return local_34; } local_40 = 0; } local_34 = my_fclose(*local_28,local_30); my_free(local_28); } return local_34; }
199
translog_buffer_flush
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_buffer_flush(struct st_translog_buffer *buffer) { uint32 i, pg; TRANSLOG_ADDRESS offset= buffer->offset; TRANSLOG_FILE *file= buffer->file; uint8 ver= buffer->ver; uint skipped_data; DBUG_ENTER("translog_buffer_flush"); DBUG_PRINT("enter", ("Buffer: #%u %p file: %d offset: " LSN_FMT " size: %lu", (uint) buffer->buffer_no, buffer, buffer->file->handler.file, LSN_IN_PARTS(buffer->offset), (ulong) buffer->size)); translog_buffer_lock_assert_owner(buffer); if (buffer->file == NULL) DBUG_RETURN(0); translog_wait_for_writers(buffer); if (buffer->file != file || buffer->offset != offset || buffer->ver != ver) DBUG_RETURN(0); /* some the thread flushed the buffer already */ if (buffer->is_closing_buffer) { /* some other flush in progress */ translog_wait_for_closing(buffer); if (buffer->file != file || buffer->offset != offset || buffer->ver != ver) DBUG_RETURN(0); /* some the thread flushed the buffer already */ } if (buffer->overlay && translog_prev_buffer_flush_wait(buffer)) DBUG_RETURN(0); /* some the thread flushed the buffer already */ /* Send page by page in the pagecache what we are going to write on the disk */ file= buffer->file; skipped_data= buffer->skipped_data; DBUG_ASSERT(skipped_data < TRANSLOG_PAGE_SIZE); for (i= 0, pg= LSN_OFFSET(buffer->offset) / TRANSLOG_PAGE_SIZE; i < buffer->size; i+= TRANSLOG_PAGE_SIZE, pg++) { #ifndef DBUG_OFF TRANSLOG_ADDRESS addr= (buffer->offset + i); #endif DBUG_PRINT("info", ("send log form %lu till %lu address: " LSN_FMT " " "page #: %lu buffer size: %lu buffer: %p", (ulong) i, (ulong) (i + TRANSLOG_PAGE_SIZE), LSN_IN_PARTS(addr), (ulong) pg, (ulong) buffer->size, buffer)); DBUG_ASSERT(log_descriptor.pagecache->block_size == TRANSLOG_PAGE_SIZE); DBUG_ASSERT(i + TRANSLOG_PAGE_SIZE <= buffer->size); if (translog_status != TRANSLOG_OK && translog_status != TRANSLOG_SHUTDOWN) DBUG_RETURN(1); if (pagecache_write_part(log_descriptor.pagecache, &file->handler, pg, 3, buffer->buffer + i, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DONE, 0, LSN_IMPOSSIBLE, skipped_data, TRANSLOG_PAGE_SIZE - skipped_data)) { DBUG_PRINT("error", ("Can't write page " LSN_FMT " to pagecache, error: %d", buffer->file->number, (uint)(LSN_OFFSET(buffer->offset)+ i), my_errno)); translog_stop_writing(); DBUG_RETURN(1); } skipped_data= 0; } file->is_sync= 0; if (my_pwrite(file->handler.file, buffer->buffer + buffer->skipped_data, buffer->size - buffer->skipped_data, LSN_OFFSET(buffer->offset) + buffer->skipped_data, log_write_flags)) { DBUG_PRINT("error", ("Can't write buffer " LSN_FMT " size %lu " "to the disk (%d)", (uint) file->handler.file, (uint) LSN_OFFSET(buffer->offset), (ulong) buffer->size, errno)); translog_stop_writing(); DBUG_RETURN(1); } /* Dropping the flag in such way can make false alarm: signalling than the file in not sync when it is sync, but the situation is quite rare and protections with mutexes give much more overhead to the whole engine */ file->is_sync= 0; if (LSN_OFFSET(buffer->last_lsn) != 0) /* if buffer->last_lsn is set */ { if (translog_prev_buffer_flush_wait(buffer)) DBUG_RETURN(0); /* some the thread flushed the buffer already */ translog_set_sent_to_disk(buffer); } else translog_set_only_in_buffers(buffer->next_buffer_offset); /* say to next buffer that we are finished */ { struct st_translog_buffer *next_buffer= log_descriptor.buffers + ((buffer->buffer_no + 1) % TRANSLOG_BUFFERS_NO); if (likely(translog_status == TRANSLOG_OK)){ translog_buffer_lock(next_buffer); next_buffer->prev_sent_to_disk= buffer->offset; translog_buffer_unlock(next_buffer); mysql_cond_broadcast(&next_buffer->prev_sent_to_disk_cond); } else { /* It is shutdown => 1) there is only one thread 2) mutexes of other buffers can be destroyed => we can't use them */ next_buffer->prev_sent_to_disk= buffer->offset; } } /* Free buffer */ buffer->file= NULL; buffer->overlay= 0; buffer->ver++; mysql_mutex_lock(&log_descriptor.dirty_buffer_mask_lock); log_descriptor.dirty_buffer_mask&= ~(1 << buffer->buffer_no); mysql_mutex_unlock(&log_descriptor.dirty_buffer_mask_lock); mysql_cond_broadcast(&buffer->waiting_filling_buffer); DBUG_RETURN(0); }
O0
c
translog_buffer_flush: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x100010(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x100038(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movb 0x1000d9(%rax), %al movb %al, -0x29(%rbp) jmp 0x55d89 movq -0x10(%rbp), %rax cmpq $0x0, 0x100038(%rax) jne 0x55da2 jmp 0x55d99 movb $0x0, -0x1(%rbp) jmp 0x561a0 movq -0x10(%rbp), %rdi callq 0x588b0 movq -0x10(%rbp), %rax movq 0x100038(%rax), %rax cmpq -0x28(%rbp), %rax jne 0x55de0 movq -0x10(%rbp), %rax movq 0x100010(%rax), %rax cmpq -0x20(%rbp), %rax jne 0x55de0 movq -0x10(%rbp), %rax movzbl 0x1000d9(%rax), %eax movzbl -0x29(%rbp), %ecx cmpl %ecx, %eax je 0x55deb jmp 0x55de2 movb $0x0, -0x1(%rbp) jmp 0x561a0 movq -0x10(%rbp), %rax cmpb $0x0, 0x1000d8(%rax) je 0x55e43 movq -0x10(%rbp), %rdi callq 0x5c660 movq -0x10(%rbp), %rax movq 0x100038(%rax), %rax cmpq -0x28(%rbp), %rax jne 0x55e36 movq -0x10(%rbp), %rax movq 0x100010(%rax), %rax cmpq -0x20(%rbp), %rax jne 0x55e36 movq -0x10(%rbp), %rax movzbl 0x1000d9(%rax), %eax movzbl -0x29(%rbp), %ecx cmpl %ecx, %eax je 0x55e41 jmp 0x55e38 movb $0x0, -0x1(%rbp) jmp 0x561a0 jmp 0x55e43 movq -0x10(%rbp), %rax movsbl 0x100088(%rax), %eax cmpl $0x0, %eax je 0x55e6f movq -0x10(%rbp), %rdi callq 0x4f940 movsbl %al, %eax cmpl $0x0, %eax je 0x55e6f jmp 0x55e66 movb $0x0, -0x1(%rbp) jmp 0x561a0 movq -0x10(%rbp), %rax movq 0x100038(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movl 0x100034(%rax), %eax movl %eax, -0x30(%rbp) jmp 0x55e8d movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rcx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq 0x100010(%rcx), %rax shrq $0xd, %rax movl %eax, -0x18(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x100030(%rcx), %eax jae 0x55f94 jmp 0x55ec5 jmp 0x55ec7 jmp 0x55ec9 jmp 0x55ecb jmp 0x55ecd jmp 0x55ecf cmpl $0x1, 0x4212da(%rip) # 0x4771b0 je 0x55eec cmpl $0x3, 0x4212d1(%rip) # 0x4771b0 je 0x55eec jmp 0x55ee3 movb $0x1, -0x1(%rbp) jmp 0x561a0 movq 0x4224cd(%rip), %rdi # 0x4783c0 movq -0x28(%rbp), %rsi addq $0x8, %rsi movl -0x18(%rbp), %eax movl %eax, %edx movq -0x10(%rbp), %r8 movl -0x14(%rbp), %eax addq %rax, %r8 movl -0x30(%rbp), %r10d movl $0x2000, %eax # imm = 0x2000 subl -0x30(%rbp), %eax movl $0x3, %ecx movl $0x1, %r9d xorl %r11d, %r11d xorl %r11d, %r11d movl $0x0, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq $0x0, 0x20(%rsp) movl %r10d, 0x28(%rsp) movl %eax, 0x30(%rsp) callq 0x2ea20 cmpb $0x0, %al je 0x55f74 jmp 0x55f64 jmp 0x55f66 callq 0x4f190 movb $0x1, -0x1(%rbp) jmp 0x561a0 movl $0x0, -0x30(%rbp) movl -0x14(%rbp), %eax addl $0x2000, %eax # imm = 0x2000 movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x55eb0 movq -0x28(%rbp), %rax movb $0x0, 0x51(%rax) movq -0x28(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x100034(%rax), %eax addq %rax, %rsi movq -0x10(%rbp), %rax movl 0x100030(%rax), %eax movq -0x10(%rbp), %rcx subl 0x100034(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x10(%rbp), %rax movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF andq 0x100010(%rax), %rcx movq -0x10(%rbp), %rax movl 0x100034(%rax), %eax addq %rax, %rcx movl $0x34, %r8d callq 0xf4240 cmpq $0x0, %rax je 0x56011 jmp 0x56001 jmp 0x56003 callq 0x4f190 movb $0x1, -0x1(%rbp) jmp 0x561a0 movq -0x28(%rbp), %rax movb $0x0, 0x51(%rax) movq -0x10(%rbp), %rcx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq 0x100000(%rcx), %rax cmpq $0x0, %rax je 0x56057 movq -0x10(%rbp), %rdi callq 0x4f940 cmpb $0x0, %al je 0x5604c jmp 0x56043 movb $0x0, -0x1(%rbp) jmp 0x561a0 movq -0x10(%rbp), %rdi callq 0x5c6c0 jmp 0x56067 movq -0x10(%rbp), %rax movq 0x100018(%rax), %rdi callq 0x5c760 movq -0x10(%rbp), %rax movl 0x10008c(%rax), %eax addl $0x1, %eax andl $0x7, %eax movl %eax, %eax movl %eax, %ecx leaq 0x42233e(%rip), %rax # 0x4783c0 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rcx, %rcx # imm = 0x100120 addq %rcx, %rax movq %rax, -0x38(%rbp) cmpl $0x1, 0x421113(%rip) # 0x4771b0 sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x560f2 movq -0x38(%rbp), %rdi callq 0x4fb20 movq -0x10(%rbp), %rax movq 0x100010(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x1000e0(%rax) movq -0x38(%rbp), %rdi callq 0x4fb60 movq -0x38(%rbp), %rdi addq $0x1000e8, %rdi # imm = 0x1000E8 callq 0x55950 jmp 0x56108 movq -0x10(%rbp), %rax movq 0x100010(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x1000e0(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x100038(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x100088(%rax) movq -0x10(%rbp), %rax movb 0x1000d9(%rax), %cl addb $0x1, %cl movb %cl, 0x1000d9(%rax) leaq 0x422284(%rip), %rdi # 0x4783c0 addq $0x800c00, %rdi # imm = 0x800C00 leaq 0xfaa0e(%rip), %rsi # 0x150b58 movl $0xabf, %edx # imm = 0xABF callq 0x4f6d0 movq -0x10(%rbp), %rax movl 0x10008c(%rax), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, %ecx xorl $-0x1, %ecx movzbl 0xc22e47(%rip), %eax # 0xc78fb8 andl %ecx, %eax movb %al, 0xc22e3f(%rip) # 0xc78fb8 leaq 0x422240(%rip), %rdi # 0x4783c0 addq $0x800c00, %rdi # imm = 0x800C00 callq 0x4f740 movq -0x10(%rbp), %rdi addq $0x100040, %rdi # imm = 0x100040 callq 0x55950 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x70, %rsp popq %rbp retq nopl (%rax)
translog_buffer_flush: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+100010h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, ds:off_100038[rax] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov al, [rax+1000D9h] mov [rbp+var_29], al jmp short $+2 loc_55D89: mov rax, [rbp+var_10] cmp ds:off_100038[rax], 0 jnz short loc_55DA2 jmp short $+2 loc_55D99: mov [rbp+var_1], 0 jmp loc_561A0 loc_55DA2: mov rdi, [rbp+var_10] call translog_wait_for_writers mov rax, [rbp+var_10] mov rax, ds:off_100038[rax] cmp rax, [rbp+var_28] jnz short loc_55DE0 mov rax, [rbp+var_10] mov rax, [rax+100010h] cmp rax, [rbp+var_20] jnz short loc_55DE0 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1000D9h] movzx ecx, [rbp+var_29] cmp eax, ecx jz short loc_55DEB loc_55DE0: jmp short $+2 loc_55DE2: mov [rbp+var_1], 0 jmp loc_561A0 loc_55DEB: mov rax, [rbp+var_10] cmp byte ptr ds:loc_1000D8[rax], 0 jz short loc_55E43 mov rdi, [rbp+var_10] call translog_wait_for_closing mov rax, [rbp+var_10] mov rax, ds:off_100038[rax] cmp rax, [rbp+var_28] jnz short loc_55E36 mov rax, [rbp+var_10] mov rax, [rax+100010h] cmp rax, [rbp+var_20] jnz short loc_55E36 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1000D9h] movzx ecx, [rbp+var_29] cmp eax, ecx jz short loc_55E41 loc_55E36: jmp short $+2 loc_55E38: mov [rbp+var_1], 0 jmp loc_561A0 loc_55E41: jmp short $+2 loc_55E43: mov rax, [rbp+var_10] movsx eax, byte ptr ds:loc_100088[rax] cmp eax, 0 jz short loc_55E6F mov rdi, [rbp+var_10] call translog_prev_buffer_flush_wait movsx eax, al cmp eax, 0 jz short loc_55E6F jmp short $+2 loc_55E66: mov [rbp+var_1], 0 jmp loc_561A0 loc_55E6F: mov rax, [rbp+var_10] mov rax, ds:off_100038[rax] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov eax, [rax+100034h] mov [rbp+var_30], eax jmp short $+2 loc_55E8D: mov [rbp+var_14], 0 mov rcx, [rbp+var_10] mov rax, 0FFFFFFFFh and rax, [rcx+100010h] shr rax, 0Dh mov [rbp+var_18], eax loc_55EB0: mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+100030h] jnb loc_55F94 jmp short $+2 loc_55EC5: jmp short $+2 loc_55EC7: jmp short $+2 loc_55EC9: jmp short $+2 loc_55ECB: jmp short $+2 loc_55ECD: jmp short $+2 loc_55ECF: cmp cs:translog_status, 1 jz short loc_55EEC cmp cs:translog_status, 3 jz short loc_55EEC jmp short $+2 loc_55EE3: mov [rbp+var_1], 1 jmp loc_561A0 loc_55EEC: mov rdi, cs:log_descriptor mov rsi, [rbp+var_28] add rsi, 8 mov eax, [rbp+var_18] mov edx, eax mov r8, [rbp+var_10] mov eax, [rbp+var_14] add r8, rax mov r10d, [rbp+var_30] mov eax, 2000h sub eax, [rbp+var_30] mov ecx, 3 mov r9d, 1 xor r11d, r11d xor r11d, r11d mov [rsp+70h+var_70], 0 mov [rsp+70h+var_68], 1 mov [rsp+70h+var_60], 1 mov [rsp+70h+var_58], 0 mov [rsp+70h+var_50], 0 mov [rsp+70h+var_48], r10d mov [rsp+70h+var_40], eax call pagecache_write_part cmp al, 0 jz short loc_55F74 jmp short $+2 loc_55F64: jmp short $+2 loc_55F66: call translog_stop_writing mov [rbp+var_1], 1 jmp loc_561A0 loc_55F74: mov [rbp+var_30], 0 mov eax, [rbp+var_14] add eax, 2000h mov [rbp+var_14], eax mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp loc_55EB0 loc_55F94: mov rax, [rbp+var_28] mov byte ptr [rax+51h], 0 mov rax, [rbp+var_28] mov edi, [rax+18h] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] mov eax, [rax+100034h] add rsi, rax mov rax, [rbp+var_10] mov eax, [rax+100030h] mov rcx, [rbp+var_10] sub eax, [rcx+100034h] mov eax, eax mov edx, eax mov rax, [rbp+var_10] mov rcx, 0FFFFFFFFh and rcx, [rax+100010h] mov rax, [rbp+var_10] mov eax, [rax+100034h] add rcx, rax mov r8d, 34h ; '4' call my_pwrite cmp rax, 0 jz short loc_56011 jmp short $+2 loc_56001: jmp short $+2 loc_56003: call translog_stop_writing mov [rbp+var_1], 1 jmp loc_561A0 loc_56011: mov rax, [rbp+var_28] mov byte ptr [rax+51h], 0 mov rcx, [rbp+var_10] mov rax, 0FFFFFFFFh and rax, qword ptr ds:loc_100000[rcx] cmp rax, 0 jz short loc_56057 mov rdi, [rbp+var_10] call translog_prev_buffer_flush_wait cmp al, 0 jz short loc_5604C jmp short $+2 loc_56043: mov [rbp+var_1], 0 jmp loc_561A0 loc_5604C: mov rdi, [rbp+var_10] call translog_set_sent_to_disk jmp short loc_56067 loc_56057: mov rax, [rbp+var_10] mov rdi, qword ptr ds:loc_100018[rax] call translog_set_only_in_buffers loc_56067: mov rax, [rbp+var_10] mov eax, [rax+10008Ch] add eax, 1 and eax, 7 mov eax, eax mov ecx, eax lea rax, log_descriptor add rax, 2F8h imul rcx, 100120h add rax, rcx mov [rbp+var_38], rax cmp cs:translog_status, 1 setz 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_560F2 mov rdi, [rbp+var_38] call translog_buffer_lock mov rax, [rbp+var_10] mov rcx, [rax+100010h] mov rax, [rbp+var_38] mov [rax+1000E0h], rcx mov rdi, [rbp+var_38] call translog_buffer_unlock mov rdi, [rbp+var_38] add rdi, 1000E8h call inline_mysql_cond_broadcast_0 jmp short loc_56108 loc_560F2: mov rax, [rbp+var_10] mov rcx, [rax+100010h] mov rax, [rbp+var_38] mov [rax+1000E0h], rcx loc_56108: mov rax, [rbp+var_10] mov ds:off_100038[rax], 0 mov rax, [rbp+var_10] mov byte ptr ds:loc_100088[rax], 0 mov rax, [rbp+var_10] mov cl, [rax+1000D9h] add cl, 1 mov [rax+1000D9h], cl lea rdi, log_descriptor add rdi, 800C00h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0ABFh call inline_mysql_mutex_lock_8 mov rax, [rbp+var_10] mov ecx, [rax+10008Ch] mov eax, 1 shl eax, cl mov ecx, eax xor ecx, 0FFFFFFFFh movzx eax, cs:byte_C78FB8 and eax, ecx mov cs:byte_C78FB8, al lea rdi, log_descriptor add rdi, 800C00h call inline_mysql_mutex_unlock_8 mov rdi, [rbp+var_10] add rdi, 100040h call inline_mysql_cond_broadcast_0 mov [rbp+var_1], 0 loc_561A0: mov al, [rbp+var_1] add rsp, 70h pop rbp retn
char translog_buffer_flush(long long a1) { long long *v2; // [rsp+38h] [rbp-38h] unsigned int v3; // [rsp+40h] [rbp-30h] unsigned __int8 v4; // [rsp+47h] [rbp-29h] void *v5; // [rsp+48h] [rbp-28h] long long v6; // [rsp+48h] [rbp-28h] long long v7; // [rsp+50h] [rbp-20h] unsigned int v8; // [rsp+58h] [rbp-18h] unsigned int v9; // [rsp+5Ch] [rbp-14h] v7 = *(_QWORD *)(a1 + 1048592); v5 = *(_UNKNOWN **)((char *)&off_100038 + a1); v4 = *(_BYTE *)(a1 + 1048793); if ( !v5 ) return 0; translog_wait_for_writers(a1); if ( *(_UNKNOWN **)((char *)&off_100038 + a1) != v5 || *(_QWORD *)(a1 + 1048592) != v7 || *(unsigned __int8 *)(a1 + 1048793) != v4 ) { return 0; } if ( *((_BYTE *)&loc_1000D8 + a1) ) { translog_wait_for_closing(a1); if ( *(_UNKNOWN **)((char *)&off_100038 + a1) != v5 || *(_QWORD *)(a1 + 1048592) != v7 || *(unsigned __int8 *)(a1 + 1048793) != v4 ) { return 0; } } if ( *((_BYTE *)&loc_100088 + a1) && translog_prev_buffer_flush_wait(a1) ) return 0; v6 = *(long long *)((char *)&off_100038 + a1); v3 = *(_DWORD *)(a1 + 1048628); v9 = 0; v8 = (unsigned int)*(_QWORD *)(a1 + 1048592) >> 13; while ( v9 < *(_DWORD *)(a1 + 1048624) ) { if ( translog_status != 1 && translog_status != 3 ) return 1; if ( pagecache_write_part( (_QWORD *)log_descriptor[0], v6 + 8, v8, 3, v9 + a1, 1u, 0, 1u, 1, 0LL, 0LL, v3, 0x2000 - v3) ) { goto LABEL_21; } v3 = 0; v9 += 0x2000; ++v8; } *(_BYTE *)(v6 + 81) = 0; if ( my_pwrite( *(unsigned int *)(v6 + 24), *(unsigned int *)(a1 + 1048628) + a1, (unsigned int)(*(_DWORD *)(a1 + 1048624) - *(_DWORD *)(a1 + 1048628)), *(unsigned int *)(a1 + 1048628) + (unsigned long long)(unsigned int)*(_QWORD *)(a1 + 1048592)) ) { LABEL_21: translog_stop_writing(); return 1; } *(_BYTE *)(v6 + 81) = 0; if ( (unsigned int)*(_QWORD *)((char *)&loc_100000 + a1) ) { if ( translog_prev_buffer_flush_wait(a1) ) return 0; translog_set_sent_to_disk(a1); } else { translog_set_only_in_buffers(*(_QWORD *)((char *)&loc_100018 + a1)); } v2 = &log_descriptor[131108 * (((unsigned __int8)*(_DWORD *)(a1 + 1048716) + 1) & 7) + 95]; if ( translog_status == 1 ) { translog_buffer_lock((long long)v2); v2[131100] = *(_QWORD *)(a1 + 1048592); translog_buffer_unlock((long long)v2); inline_mysql_cond_broadcast_0((long long)(v2 + 131101)); } else { v2[131100] = *(_QWORD *)(a1 + 1048592); } *(_UNKNOWN **)((char *)&off_100038 + a1) = 0LL; *((_BYTE *)&loc_100088 + a1) = 0; ++*(_BYTE *)(a1 + 1048793); inline_mysql_mutex_lock_8( (long long)&log_descriptor[1048960], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xABFu); byte_C78FB8 &= ~(1 << *(_DWORD *)(a1 + 1048716)); inline_mysql_mutex_unlock_8((long long)&log_descriptor[1048960]); inline_mysql_cond_broadcast_0(a1 + 1048640); return 0; }
translog_buffer_flush: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100010] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100038] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX + 0x1000d9] MOV byte ptr [RBP + -0x29],AL JMP 0x00155d89 LAB_00155d89: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x100038],0x0 JNZ 0x00155da2 JMP 0x00155d99 LAB_00155d99: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001561a0 LAB_00155da2: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001588b0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100038] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00155de0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100010] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00155de0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1000d9] MOVZX ECX,byte ptr [RBP + -0x29] CMP EAX,ECX JZ 0x00155deb LAB_00155de0: JMP 0x00155de2 LAB_00155de2: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001561a0 LAB_00155deb: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x1000d8],0x0 JZ 0x00155e43 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015c660 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100038] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00155e36 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100010] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00155e36 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1000d9] MOVZX ECX,byte ptr [RBP + -0x29] CMP EAX,ECX JZ 0x00155e41 LAB_00155e36: JMP 0x00155e38 LAB_00155e38: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001561a0 LAB_00155e41: JMP 0x00155e43 LAB_00155e43: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x100088] CMP EAX,0x0 JZ 0x00155e6f MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014f940 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00155e6f JMP 0x00155e66 LAB_00155e66: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001561a0 LAB_00155e6f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100038] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x100034] MOV dword ptr [RBP + -0x30],EAX JMP 0x00155e8d LAB_00155e8d: MOV dword ptr [RBP + -0x14],0x0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,0xffffffff AND RAX,qword ptr [RCX + 0x100010] SHR RAX,0xd MOV dword ptr [RBP + -0x18],EAX LAB_00155eb0: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x100030] JNC 0x00155f94 JMP 0x00155ec5 LAB_00155ec5: JMP 0x00155ec7 LAB_00155ec7: JMP 0x00155ec9 LAB_00155ec9: JMP 0x00155ecb LAB_00155ecb: JMP 0x00155ecd LAB_00155ecd: JMP 0x00155ecf LAB_00155ecf: CMP dword ptr [0x005771b0],0x1 JZ 0x00155eec CMP dword ptr [0x005771b0],0x3 JZ 0x00155eec JMP 0x00155ee3 LAB_00155ee3: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001561a0 LAB_00155eec: MOV RDI,qword ptr [0x005783c0] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x8 MOV EAX,dword ptr [RBP + -0x18] MOV EDX,EAX MOV R8,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] ADD R8,RAX MOV R10D,dword ptr [RBP + -0x30] MOV EAX,0x2000 SUB EAX,dword ptr [RBP + -0x30] MOV ECX,0x3 MOV R9D,0x1 XOR R11D,R11D XOR R11D,R11D MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV qword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x0 MOV dword ptr [RSP + 0x28],R10D MOV dword ptr [RSP + 0x30],EAX CALL 0x0012ea20 CMP AL,0x0 JZ 0x00155f74 JMP 0x00155f64 LAB_00155f64: JMP 0x00155f66 LAB_00155f66: CALL 0x0014f190 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001561a0 LAB_00155f74: MOV dword ptr [RBP + -0x30],0x0 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x2000 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x00155eb0 LAB_00155f94: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x51],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV EDI,dword ptr [RAX + 0x18] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x100034] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x100030] MOV RCX,qword ptr [RBP + -0x10] SUB EAX,dword ptr [RCX + 0x100034] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xffffffff AND RCX,qword ptr [RAX + 0x100010] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x100034] ADD RCX,RAX MOV R8D,0x34 CALL 0x001f4240 CMP RAX,0x0 JZ 0x00156011 JMP 0x00156001 LAB_00156001: JMP 0x00156003 LAB_00156003: CALL 0x0014f190 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001561a0 LAB_00156011: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x51],0x0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,0xffffffff AND RAX,qword ptr [RCX + 0x100000] CMP RAX,0x0 JZ 0x00156057 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014f940 CMP AL,0x0 JZ 0x0015604c JMP 0x00156043 LAB_00156043: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001561a0 LAB_0015604c: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015c6c0 JMP 0x00156067 LAB_00156057: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x100018] CALL 0x0015c760 LAB_00156067: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10008c] ADD EAX,0x1 AND EAX,0x7 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x5783c0] ADD RAX,0x2f8 IMUL RCX,RCX,0x100120 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX CMP dword ptr [0x005771b0],0x1 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001560f2 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0014fb20 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x100010] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x1000e0],RCX MOV RDI,qword ptr [RBP + -0x38] CALL 0x0014fb60 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x1000e8 CALL 0x00155950 JMP 0x00156108 LAB_001560f2: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x100010] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x1000e0],RCX LAB_00156108: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x100038],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x100088],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x1000d9] ADD CL,0x1 MOV byte ptr [RAX + 0x1000d9],CL LEA RDI,[0x5783c0] ADD RDI,0x800c00 LEA RSI,[0x250b58] MOV EDX,0xabf CALL 0x0014f6d0 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x10008c] MOV EAX,0x1 SHL EAX,CL MOV ECX,EAX XOR ECX,0xffffffff MOVZX EAX,byte ptr [0x00d78fb8] AND EAX,ECX MOV byte ptr [0x00d78fb8],AL LEA RDI,[0x5783c0] ADD RDI,0x800c00 CALL 0x0014f740 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x100040 CALL 0x00155950 MOV byte ptr [RBP + -0x1],0x0 LAB_001561a0: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x70 POP RBP RET
int1 translog_buffer_flush(long param_1) { char cVar1; long lVar2; long lVar3; int local_38; int local_20; uint local_1c; int1 local_9; lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f); cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1); if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) == 0) { local_9 = 0; } else { translog_wait_for_writers(param_1); if (((*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) == lVar2) && (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) == lVar3)) && (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) == cVar1)) { if ((*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1) == '\0') || (((translog_wait_for_closing(param_1), *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) == lVar2 && (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) == lVar3)) && (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) == cVar1)))) { if ((*(char *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) == '\0') || (cVar1 = translog_prev_buffer_flush_wait(param_1), cVar1 == '\0')) { lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f); local_38 = *(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b); local_1c = 0; local_20 = (int)((*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) & 0xffffffff) >> 0xd); for (; local_1c < *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27); local_1c = local_1c + 0x2000) { if ((translog_status != 1) && (translog_status != 3)) { return 1; } cVar1 = pagecache_write_part (log_descriptor,lVar3 + 8,local_20,3,param_1 + (ulong)local_1c,1,0,1,1 ,0,0,local_38,0x2000 - local_38); if (cVar1 != '\0') { translog_stop_writing(); return 1; } local_38 = 0; local_20 = local_20 + 1; } *(int1 *)(lVar3 + 0x51) = 0; lVar2 = my_pwrite(*(int4 *)(lVar3 + 0x18), param_1 + (ulong)*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b), *(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27) - *(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b), (*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) & 0xffffffff) + (ulong)*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b), 0x34); if (lVar2 == 0) { *(int1 *)(lVar3 + 0x51) = 0; if ((*(ulong *)(param_1 + 0x100000) & 0xffffffff) == 0) { translog_set_only_in_buffers (*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf)); } else { cVar1 = translog_prev_buffer_flush_wait(param_1); if (cVar1 != '\0') { return 0; } translog_set_sent_to_disk(param_1); } lVar3 = (ulong)(*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1 + 4) + 1U & 7) * 0x100120; if (translog_status == 1) { translog_buffer_lock(&DAT_005786b8 + lVar3); *(int8 *)(&DAT_00678798 + lVar3) = *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); translog_buffer_unlock(&DAT_005786b8 + lVar3); inline_mysql_cond_broadcast(lVar3 + 0x6787a0); } else { *(int8 *)(&DAT_00678798 + lVar3) = *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); } *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) = 0; *(int1 *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) = 0; *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) + '\x01'; inline_mysql_mutex_lock (&DAT_00d78fc0, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xabf); DAT_00d78fb8 = DAT_00d78fb8 & ((byte)(1 << ((byte)*(int4 *) ((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1 + 4) & 0x1f)) ^ 0xff); inline_mysql_mutex_unlock(&DAT_00d78fc0); inline_mysql_cond_broadcast((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); local_9 = 0; } else { translog_stop_writing(); local_9 = 1; } } else { local_9 = 0; } } else { local_9 = 0; } } else { local_9 = 0; } } return local_9; }