index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
20,800
mi_unmap_file
eloqsql/storage/myisam/mi_packrec.c
void _mi_unmap_file(MI_INFO *info) { DBUG_ASSERT(info->s->options & HA_OPTION_COMPRESS_RECORD); (void) my_munmap((char*) info->s->file_map, info->s->mmaped_length); if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= info->s->mmaped_length; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } }
O0
c
mi_unmap_file: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0xc112e movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x270(%rax), %rdi movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x4d0(%rax), %rsi callq 0x2a490 leaq 0x20be92(%rip), %rax # 0x2ccfe8 cmpq $-0x1, (%rax) je 0xc11a5 leaq 0xbd1325(%rip), %rdi # 0xc92488 leaq 0x9e257(%rip), %rsi # 0x15f3c1 movl $0x61b, %edx # imm = 0x61B callq 0xc0df0 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x4d0(%rax), %rax leaq 0xbc84e7(%rip), %rcx # 0xc89670 movq (%rcx), %rcx subq %rax, %rcx leaq 0xbc84da(%rip), %rax # 0xc89670 movq %rcx, (%rax) leaq 0xbd12e8(%rip), %rdi # 0xc92488 callq 0xc0e60 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_mi_unmap_file: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_C112E: mov rax, [rbp+var_8] mov rax, [rax] mov rdi, [rax+270h] mov rax, [rbp+var_8] mov rax, [rax] mov rsi, [rax+4D0h] call _munmap lea rax, myisam_mmap_size cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_C11A5 lea rdi, THR_LOCK_myisam_mmap lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 61Bh call inline_mysql_mutex_lock_21 mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+4D0h] lea rcx, myisam_mmap_used mov rcx, [rcx] sub rcx, rax lea rax, myisam_mmap_used mov [rax], rcx lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_unlock_22 loc_C11A5: add rsp, 10h pop rbp retn
_QWORD * mi_unmap_file(long long a1) { _QWORD *result; // rax munmap(*(_QWORD *)(*(_QWORD *)a1 + 624LL), *(_QWORD *)(*(_QWORD *)a1 + 1232LL)); result = &myisam_mmap_size; if ( myisam_mmap_size != -1LL ) { inline_mysql_mutex_lock_21( (long long)&THR_LOCK_myisam_mmap, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x61Bu); myisam_mmap_used -= *(_QWORD *)(*(_QWORD *)a1 + 1232LL); return (_QWORD *)inline_mysql_mutex_unlock_22((long long)&THR_LOCK_myisam_mmap); } return result; }
_mi_unmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001c112e LAB_001c112e: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x270] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x4d0] CALL 0x0012a490 LEA RAX,[0x3ccfe8] CMP qword ptr [RAX],-0x1 JZ 0x001c11a5 LEA RDI,[0xd92488] LEA RSI,[0x25f3c1] MOV EDX,0x61b CALL 0x001c0df0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x4d0] LEA RCX,[0xd89670] MOV RCX,qword ptr [RCX] SUB RCX,RAX LEA RAX,[0xd89670] MOV qword ptr [RAX],RCX LEA RDI,[0xd92488] CALL 0x001c0e60 LAB_001c11a5: ADD RSP,0x10 POP RBP RET
void _mi_unmap_file(long *param_1) { munmap(*(void **)(*param_1 + 0x270),*(size_t *)(*param_1 + 0x4d0)); if (myisam_mmap_size != -1) { inline_mysql_mutex_lock (THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x61b); myisam_mmap_used = myisam_mmap_used - *(long *)(*param_1 + 0x4d0); inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap); } return; }
20,801
code_has_label
bluesky950520[P]quickjs/quickjs.c
static BOOL code_has_label(CodeContext *s, int pos, int label) { while (pos < s->bc_len) { int op = s->bc_buf[pos]; if (op == OP_source_loc) { pos += 9; continue; } if (op == OP_label) { int lab = get_u32(s->bc_buf + pos + 1); if (lab == label) return TRUE; pos += 5; continue; } if (op == OP_goto) { int lab = get_u32(s->bc_buf + pos + 1); if (lab == label) return TRUE; } break; } return FALSE; }
O0
c
code_has_label: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movl %edx, 0x10(%rsp) movl 0x14(%rsp), %eax movq 0x18(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0xbcd56 movq 0x18(%rsp), %rax movq (%rax), %rax movslq 0x14(%rsp), %rcx movzbl (%rax,%rcx), %eax movl %eax, 0xc(%rsp) cmpl $0xc4, 0xc(%rsp) jne 0xbcccf movl 0x14(%rsp), %eax addl $0x9, %eax movl %eax, 0x14(%rsp) jmp 0xbcc91 cmpl $0xb5, 0xc(%rsp) jne 0xbcd1a movq 0x18(%rsp), %rax movq (%rax), %rdi movslq 0x14(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi callq 0x5f1b0 movl %eax, 0x8(%rsp) movl 0x8(%rsp), %eax cmpl 0x10(%rsp), %eax jne 0xbcd0a movl $0x1, 0x24(%rsp) jmp 0xbcd5e movl 0x14(%rsp), %eax addl $0x5, %eax movl %eax, 0x14(%rsp) jmp 0xbcc91 cmpl $0x6b, 0xc(%rsp) jne 0xbcd54 movq 0x18(%rsp), %rax movq (%rax), %rdi movslq 0x14(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi callq 0x5f1b0 movl %eax, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x10(%rsp), %eax jne 0xbcd52 movl $0x1, 0x24(%rsp) jmp 0xbcd5e jmp 0xbcd54 jmp 0xbcd56 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw (%rax,%rax)
code_has_label: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_18], edx loc_BCC91: mov eax, [rsp+28h+var_14] mov rcx, [rsp+28h+var_10] cmp eax, [rcx+8] jge loc_BCD56 mov rax, [rsp+28h+var_10] mov rax, [rax] movsxd rcx, [rsp+28h+var_14] movzx eax, byte ptr [rax+rcx] mov [rsp+28h+var_1C], eax cmp [rsp+28h+var_1C], 0C4h jnz short loc_BCCCF mov eax, [rsp+28h+var_14] add eax, 9 mov [rsp+28h+var_14], eax jmp short loc_BCC91 loc_BCCCF: cmp [rsp+28h+var_1C], 0B5h jnz short loc_BCD1A mov rax, [rsp+28h+var_10] mov rdi, [rax] movsxd rax, [rsp+28h+var_14] add rdi, rax add rdi, 1 call get_u32 mov [rsp+28h+var_20], eax mov eax, [rsp+28h+var_20] cmp eax, [rsp+28h+var_18] jnz short loc_BCD0A mov [rsp+28h+var_4], 1 jmp short loc_BCD5E loc_BCD0A: mov eax, [rsp+28h+var_14] add eax, 5 mov [rsp+28h+var_14], eax jmp loc_BCC91 loc_BCD1A: cmp [rsp+28h+var_1C], 6Bh ; 'k' jnz short loc_BCD54 mov rax, [rsp+28h+var_10] mov rdi, [rax] movsxd rax, [rsp+28h+var_14] add rdi, rax add rdi, 1 call get_u32 mov [rsp+28h+var_24], eax mov eax, [rsp+28h+var_24] cmp eax, [rsp+28h+var_18] jnz short loc_BCD52 mov [rsp+28h+var_4], 1 jmp short loc_BCD5E loc_BCD52: jmp short $+2 loc_BCD54: jmp short $+2 loc_BCD56: mov [rsp+28h+var_4], 0 loc_BCD5E: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long code_has_label(long long a1, int a2, int a3) { int v4; // [rsp+Ch] [rbp-1Ch] while ( a2 < *(_DWORD *)(a1 + 8) ) { v4 = *(unsigned __int8 *)(*(_QWORD *)a1 + a2); if ( v4 == 196 ) { a2 += 9; } else { if ( v4 != 181 ) { if ( v4 == 107 && (unsigned int)get_u32((unsigned int *)(a2 + *(_QWORD *)a1 + 1LL)) == a3 ) return 1; break; } if ( (unsigned int)get_u32((unsigned int *)(a2 + *(_QWORD *)a1 + 1LL)) == a3 ) return 1; a2 += 5; } } return 0; }
code_has_label: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV dword ptr [RSP + 0x10],EDX LAB_001bcc91: MOV EAX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x18] CMP EAX,dword ptr [RCX + 0x8] JGE 0x001bcd56 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RSP + 0x14] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0xc4 JNZ 0x001bcccf MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x9 MOV dword ptr [RSP + 0x14],EAX JMP 0x001bcc91 LAB_001bcccf: CMP dword ptr [RSP + 0xc],0xb5 JNZ 0x001bcd1a MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOVSXD RAX,dword ptr [RSP + 0x14] ADD RDI,RAX ADD RDI,0x1 CALL 0x0015f1b0 MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0x8] CMP EAX,dword ptr [RSP + 0x10] JNZ 0x001bcd0a MOV dword ptr [RSP + 0x24],0x1 JMP 0x001bcd5e LAB_001bcd0a: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x5 MOV dword ptr [RSP + 0x14],EAX JMP 0x001bcc91 LAB_001bcd1a: CMP dword ptr [RSP + 0xc],0x6b JNZ 0x001bcd54 MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOVSXD RAX,dword ptr [RSP + 0x14] ADD RDI,RAX ADD RDI,0x1 CALL 0x0015f1b0 MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x10] JNZ 0x001bcd52 MOV dword ptr [RSP + 0x24],0x1 JMP 0x001bcd5e LAB_001bcd52: JMP 0x001bcd54 LAB_001bcd54: JMP 0x001bcd56 LAB_001bcd56: MOV dword ptr [RSP + 0x24],0x0 LAB_001bcd5e: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 code_has_label(long *param_1,int param_2,int param_3) { char cVar1; int iVar2; int local_14; local_14 = param_2; while( true ) { while( true ) { if ((int)param_1[1] <= local_14) { return 0; } cVar1 = *(char *)(*param_1 + (long)local_14); if (cVar1 != -0x3c) break; local_14 = local_14 + 9; } if (cVar1 != -0x4b) break; iVar2 = get_u32(*param_1 + (long)local_14 + 1); if (iVar2 == param_3) { return 1; } local_14 = local_14 + 5; } if (cVar1 != 'k') { return 0; } iVar2 = get_u32(*param_1 + (long)local_14 + 1); if (iVar2 != param_3) { return 0; } return 1; }
20,802
mysql_free_result_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_free_result_cont(MYSQL_RES *result, int ready_status) { MK_ASYNC_CONT_BODY_VOID_RETURN(result->handle) }
O3
c
mysql_free_result_cont: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x78(%rdi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r14 cmpb $0x0, 0x15(%r14) je 0x29cff movb $0x1, 0x14(%r14) movl %esi, 0x4(%r14) leaq 0x38(%r14), %rdi callq 0x2daab movb $0x0, 0x14(%r14) testl %eax, %eax jle 0x29d5f movl (%r14), %r14d jmp 0x29d6b movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x78(%rbx), %rdi leaq 0x1eda7(%rip), %rax # 0x48ac0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x78(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x78(%rbx), %rdi leaq 0x1ed8c(%rip), %rax # 0x48ad0 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x78(%rbx), %rax movb %r14b, 0x296(%rax) jmp 0x29d6b movb $0x0, 0x15(%r14) xorl %r14d, %r14d testl %eax, %eax js 0x29d73 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movq 0x78(%rbx), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x78(%rbx), %rdi leaq 0x1ed2f(%rip), %rax # 0x48ac0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x78(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x78(%rbx), %rdi leaq 0x1ed14(%rip), %rax # 0x48ad0 movq 0x40(%rax), %rsi jmp 0x29d48
mysql_free_result_cont: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov rax, [rdi+78h] mov rcx, [rax+480h] mov r14, [rcx+28h] cmp byte ptr [r14+15h], 0 jz short loc_29CFF mov byte ptr [r14+14h], 1 mov [r14+4], esi lea rdi, [r14+38h] call my_context_continue mov byte ptr [r14+14h], 0 test eax, eax jle short loc_29D5F mov r14d, [r14] jmp short loc_29D6B loc_29CFF: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [rbx+78h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbx+78h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+78h] lea rax, client_errors mov rsi, [rax+70h] loc_29D48: mov edx, 1FFh call _strncpy mov rax, [rbx+78h] mov [rax+296h], r14b jmp short loc_29D6B loc_29D5F: mov byte ptr [r14+15h], 0 xor r14d, r14d test eax, eax js short loc_29D73 loc_29D6B: mov eax, r14d pop rbx pop r14 pop rbp retn loc_29D73: mov rax, [rbx+78h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [rbx+78h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbx+78h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+78h] lea rax, client_errors mov rsi, [rax+40h] jmp short loc_29D48
long long mysql_free_result_cont(long long a1, unsigned int a2) { long long v3; // rax unsigned int *v4; // r14 int v5; // eax unsigned int v6; // r14d long long v7; // rdi char *v8; // rsi v3 = *(_QWORD *)(a1 + 120); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( !*((_BYTE *)v4 + 21) ) { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a1 + 120) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a1 + 120) + 668LL) = 0; v7 = *(_QWORD *)(a1 + 120) + 151LL; v8 = client_errors[14]; LABEL_5: strncpy(v7, v8, 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 120) + 662LL) = 0; return v6; } *((_BYTE *)v4 + 20) = 1; v4[1] = a2; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; v6 = 0; if ( v5 >= 0 ) return v6; *(_DWORD *)(*(_QWORD *)(a1 + 120) + 144LL) = 2008; strncpy(*(_QWORD *)(a1 + 120) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a1 + 120) + 668LL) = 0; v7 = *(_QWORD *)(a1 + 120) + 151LL; v8 = client_errors[8]; goto LABEL_5; } return *v4; }
mysql_free_result_cont: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x78] MOV RCX,qword ptr [RAX + 0x480] MOV R14,qword ptr [RCX + 0x28] CMP byte ptr [R14 + 0x15],0x0 JZ 0x00129cff MOV byte ptr [R14 + 0x14],0x1 MOV dword ptr [R14 + 0x4],ESI LEA RDI,[R14 + 0x38] CALL 0x0012daab MOV byte ptr [R14 + 0x14],0x0 TEST EAX,EAX JLE 0x00129d5f MOV R14D,dword ptr [R14] JMP 0x00129d6b LAB_00129cff: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x148ac0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x78] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x148ad0] MOV RSI,qword ptr [RAX + 0x70] LAB_00129d48: MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x78] MOV byte ptr [RAX + 0x296],R14B JMP 0x00129d6b LAB_00129d5f: MOV byte ptr [R14 + 0x15],0x0 XOR R14D,R14D TEST EAX,EAX JS 0x00129d73 LAB_00129d6b: MOV EAX,R14D POP RBX POP R14 POP RBP RET LAB_00129d73: MOV RAX,qword ptr [RBX + 0x78] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x148ac0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x78] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x148ad0] MOV RSI,qword ptr [RAX + 0x40] JMP 0x00129d48
int4 mysql_free_result_cont(long param_1,int4 param_2) { int4 *puVar1; long lVar2; int iVar3; char *__src; puVar1 = *(int4 **)(*(long *)(*(long *)(param_1 + 0x78) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_1 + 0x78) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x78) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x78) + 0x29c) = 0; lVar2 = *(long *)(param_1 + 0x78); __src = PTR_s_Commands_out_of_sync__you_can_t_r_00148b40; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_2; iVar3 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (0 < iVar3) { return *puVar1; } *(int1 *)((long)puVar1 + 0x15) = 0; if (-1 < iVar3) { return 0; } *(int4 *)(*(long *)(param_1 + 0x78) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_1 + 0x78) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x78) + 0x29c) = 0; lVar2 = *(long *)(param_1 + 0x78); __src = PTR_s_Client_run_out_of_memory_00148b10; } strncpy((char *)(lVar2 + 0x97),__src,0x1ff); *(int1 *)(*(long *)(param_1 + 0x78) + 0x296) = 0; return 0; }
20,803
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O3
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movl %esi, %ebx movl %edi, %r14d leaq 0x3099ba(%rip), %rax # 0x389060 movq (%rax), %rax leaq -0x68(%rbp), %rdi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7f6d1 movl %ebx, %edi xorl %esi, %esi callq 0xa4258 addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq -0x1c(%rbp), %r15 movq %rax, %rdi movl %r14d, %esi movl %ebx, %edx movq %r15, %rcx callq 0x2db7f movl (%r15), %eax jmp 0x7f6c6
inline_mysql_file_sync_1: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 58h mov ebx, esi mov r14d, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_68] mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_7F6D1 mov edi, ebx xor esi, esi call my_sync loc_7F6C6: add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_7F6D1: lea r15, [rbp+var_1C] mov rdi, rax mov esi, r14d mov edx, ebx mov rcx, r15 call inline_mysql_file_sync_cold_1_0 mov eax, [r15] jmp short loc_7F6C6
long long inline_mysql_file_sync_1(unsigned int a1, long long a2) { long long v2; // rax _BYTE v4[76]; // [rsp+8h] [rbp-68h] BYREF _DWORD v5[7]; // [rsp+54h] [rbp-1Ch] BYREF v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 16LL); if ( !v2 ) return my_sync((unsigned int)a2, 0LL); inline_mysql_file_sync_cold_1_0(v2, a1, a2, v5); return v5[0]; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV EBX,ESI MOV R14D,EDI LEA RAX,[0x489060] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x68] MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017f6d1 MOV EDI,EBX XOR ESI,ESI CALL 0x001a4258 LAB_0017f6c6: ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_0017f6d1: LEA R15,[RBP + -0x1c] MOV RDI,RAX MOV ESI,R14D MOV EDX,EBX MOV RCX,R15 CALL 0x0012db7f MOV EAX,dword ptr [R15] JMP 0x0017f6c6
ulong inline_mysql_file_sync(int4 param_1,ulong param_2) { long lVar1; ulong uVar2; int1 local_70 [76]; uint local_24; lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_2,0x10); if (lVar1 == 0) { uVar2 = my_sync(param_2 & 0xffffffff,0); } else { inline_mysql_file_sync_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_24); uVar2 = (ulong)local_24; } return uVar2; }
20,804
thr_print_lock
eloqsql/mysys/thr_lock.c
static void thr_print_lock(const char* name,struct st_lock_list *list) { THR_LOCK_DATA *data,**prev; uint count=0; if (list->data) { printf("%-10s: ",name); prev= &list->data; for (data=list->data; data && count++ < MAX_LOCKS ; data=data->next) { printf("%p (%lu:%d); ", data, (ulong) data->owner->thread_id, (int) data->type); if (data->prev != prev) printf("\nWarning: prev didn't point at previous lock\n"); prev= &data->next; } puts(""); if (prev != list->last) printf("Warning: last didn't point at last lock\n"); } }
O3
c
thr_print_lock: cmpq $0x0, (%rsi) je 0xaea64 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %rdx leaq 0x3a5c1(%rip), %rsi # 0xe8f7a movl $0x1, %edi xorl %eax, %eax callq 0x2a850 movq (%rbx), %r12 movq %rbx, %r14 testq %r12, %r12 je 0xaea32 movl $0x3e9, %r13d # imm = 0x3E9 leaq 0x3a5a5(%rip), %r15 # 0xe8f82 movq %rbx, %r14 decl %r13d je 0xaea32 movq (%r12), %rax movq 0x8(%rax), %rcx movl 0x40(%r12), %r8d movl $0x1, %edi movq %r15, %rsi movq %r12, %rdx xorl %eax, %eax callq 0x2a850 cmpq %r14, 0x10(%r12) je 0xaea1e movl $0x1, %edi leaq 0x3a579(%rip), %rsi # 0xe8f90 xorl %eax, %eax callq 0x2a850 movq %r12, %r14 movq 0x8(%r12), %rax addq $0x8, %r14 movq %rax, %r12 testq %rax, %rax jne 0xae9e0 movl $0xa, %edi callq 0x2a960 cmpq 0x8(%rbx), %r14 leaq 0x8(%rsp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp je 0xaea64 leaq 0x3a566(%rip), %rsi # 0xe8fbe movl $0x1, %edi xorl %eax, %eax jmp 0x2a850 retq nopl (%rax)
thr_print_lock: cmp qword ptr [rsi], 0 jz locret_AEA64 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov rdx, rdi lea rsi, a10s; "%-10s: " mov edi, 1 xor eax, eax call ___printf_chk mov r12, [rbx] mov r14, rbx test r12, r12 jz short loc_AEA32 mov r13d, 3E9h lea r15, aPLuD; "%p (%lu:%d); " mov r14, rbx loc_AE9E0: dec r13d jz short loc_AEA32 mov rax, [r12] mov rcx, [rax+8] mov r8d, [r12+40h] mov edi, 1 mov rsi, r15 mov rdx, r12 xor eax, eax call ___printf_chk cmp [r12+10h], r14 jz short loc_AEA1E mov edi, 1 lea rsi, aWarningPrevDid; "\nWarning: prev didn't point at previou"... xor eax, eax call ___printf_chk loc_AEA1E: mov r14, r12 mov rax, [r12+8] add r14, 8 mov r12, rax test rax, rax jnz short loc_AE9E0 loc_AEA32: mov edi, 0Ah call _putchar cmp r14, [rbx+8] lea rsp, [rsp+8] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jz short locret_AEA64 lea rsi, aWarningLastDid; "Warning: last didn't point at last lock"... mov edi, 1 xor eax, eax jmp ___printf_chk locret_AEA64: retn
long long thr_print_lock(const char *a1, _QWORD *a2) { long long v2; // r12 _QWORD *v3; // r14 int v4; // r13d long long result; // rax if ( *a2 ) { __printf_chk(1LL, "%-10s: ", a1); v2 = *a2; v3 = a2; if ( *a2 ) { v4 = 1001; v3 = a2; do { if ( !--v4 ) break; __printf_chk(1LL, "%p (%lu:%d); ", (const void *)v2, *(_QWORD *)(*(_QWORD *)v2 + 8LL), *(_DWORD *)(v2 + 64)); if ( *(_QWORD **)(v2 + 16) != v3 ) __printf_chk(1LL, "\nWarning: prev didn't point at previous lock\n"); v3 = (_QWORD *)(v2 + 8); v2 = *(_QWORD *)(v2 + 8); } while ( v2 ); } result = putchar(10LL); if ( v3 != (_QWORD *)a2[1] ) return __printf_chk(1LL, "Warning: last didn't point at last lock\n"); } return result; }
thr_print_lock: CMP qword ptr [RSI],0x0 JZ 0x001aea64 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV RDX,RDI LEA RSI,[0x1e8f7a] MOV EDI,0x1 XOR EAX,EAX CALL 0x0012a850 MOV R12,qword ptr [RBX] MOV R14,RBX TEST R12,R12 JZ 0x001aea32 MOV R13D,0x3e9 LEA R15,[0x1e8f82] MOV R14,RBX LAB_001ae9e0: DEC R13D JZ 0x001aea32 MOV RAX,qword ptr [R12] MOV RCX,qword ptr [RAX + 0x8] MOV R8D,dword ptr [R12 + 0x40] MOV EDI,0x1 MOV RSI,R15 MOV RDX,R12 XOR EAX,EAX CALL 0x0012a850 CMP qword ptr [R12 + 0x10],R14 JZ 0x001aea1e MOV EDI,0x1 LEA RSI,[0x1e8f90] XOR EAX,EAX CALL 0x0012a850 LAB_001aea1e: MOV R14,R12 MOV RAX,qword ptr [R12 + 0x8] ADD R14,0x8 MOV R12,RAX TEST RAX,RAX JNZ 0x001ae9e0 LAB_001aea32: MOV EDI,0xa CALL 0x0012a960 CMP R14,qword ptr [RBX + 0x8] LEA RSP,[RSP + 0x8] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JZ 0x001aea64 LEA RSI,[0x1e8fbe] MOV EDI,0x1 XOR EAX,EAX JMP 0x0012a850 LAB_001aea64: RET
void thr_print_lock(int8 param_1,long *param_2) { long *plVar1; long *plVar2; int iVar3; long *plVar4; if (*param_2 != 0) { __printf_chk(1,"%-10s: ",param_1); plVar4 = param_2; if ((long *)*param_2 != (long *)0x0) { iVar3 = 0x3e9; plVar2 = (long *)*param_2; do { iVar3 = iVar3 + -1; if (iVar3 == 0) break; __printf_chk(1,"%p (%lu:%d); ",plVar2,*(int8 *)(*plVar2 + 8),(int)plVar2[8]); if ((long *)plVar2[2] != plVar4) { __printf_chk(1,"\nWarning: prev didn\'t point at previous lock\n"); } plVar1 = plVar2 + 1; plVar4 = plVar2 + 1; plVar2 = (long *)*plVar1; } while ((long *)*plVar1 != (long *)0x0); } putchar(10); if (plVar4 != (long *)param_2[1]) { __printf_chk(1,"Warning: last didn\'t point at last lock\n"); return; } } return; }
20,805
common_init()::$_0::__invoke(ggml_log_level, char const*, void*)
llama.cpp/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O3
cpp
common_init()::$_0::__invoke(ggml_log_level, char const*, void*): leaq 0x697d3(%rip), %rax # 0x167a98 cmpl $0x0, (%rax) js 0xfe2f3 pushq %rbp pushq %rbx pushq %rax movq %rsi, %rbx movl %edi, %ebp callq 0x11083f leaq 0x1c880(%rip), %rdx # 0x11ab5e movq %rax, %rdi movl %ebp, %esi movq %rbx, %rcx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0x1108dc retq
_ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short locret_FE2F3 push rbp push rbx push rax mov rbx, rsi mov ebp, edi call _Z15common_log_mainv; common_log_main(void) lea rdx, aSetCustomJinja_0+0FEh; "%s" mov rdi, rax mov esi, ebp mov rcx, rbx xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) locret_FE2F3: retn
void * common_init(void)::$_0::__invoke(int a1, int a2) { void *result; // rax int v3; // eax int v4; // r8d int v5; // r9d result = &common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v3 = common_log_main(); return (void *)common_log_add(v3, a1, (unsigned int)"%s", a2, v4, v5); } return result; }
__invoke: LEA RAX,[0x267a98] CMP dword ptr [RAX],0x0 JS 0x001fe2f3 PUSH RBP PUSH RBX PUSH RAX MOV RBX,RSI MOV EBP,EDI CALL 0x0021083f LEA RDX,[0x21ab5e] MOV RDI,RAX MOV ESI,EBP MOV RCX,RBX XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x002108dc LAB_001fe2f3: RET
/* __invoke(ggml_log_level, char const*, void*) */ void common_init()::$_0::__invoke(int4 param_1,int8 param_2) { int8 uVar1; if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,param_1,"%s",param_2); return; } return; }
20,806
mp_sub_ui
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_ui(limb_t *tab, limb_t b, mp_size_t n) { mp_size_t i; limb_t k, a, v; k=b; for(i=0;i<n;i++) { v = tab[i]; a = v - k; k = a > v; tab[i] = a; if (k == 0) break; } return k; }
O1
c
mp_sub_ui: movq %rsi, %rax testq %rdx, %rdx jle 0x849e9 xorl %ecx, %ecx subq %rax, (%rdi,%rcx,8) jae 0x849ea incq %rcx movl $0x1, %eax cmpq %rcx, %rdx jne 0x849d6 retq xorl %eax, %eax retq
mp_sub_ui: mov rax, rsi test rdx, rdx jle short locret_849E9 xor ecx, ecx loc_849D6: sub [rdi+rcx*8], rax jnb short loc_849EA inc rcx mov eax, 1 cmp rdx, rcx jnz short loc_849D6 locret_849E9: retn loc_849EA: xor eax, eax retn
unsigned long long mp_sub_ui(long long a1, unsigned long long a2, long long a3) { unsigned long long result; // rax long long v4; // rcx bool v5; // cf result = a2; if ( a3 > 0 ) { v4 = 0LL; while ( 1 ) { v5 = *(_QWORD *)(a1 + 8 * v4) < result; *(_QWORD *)(a1 + 8 * v4) -= result; if ( !v5 ) break; ++v4; result = 1LL; if ( a3 == v4 ) return result; } return 0LL; } return result; }
mp_sub_ui: MOV RAX,RSI TEST RDX,RDX JLE 0x001849e9 XOR ECX,ECX LAB_001849d6: SUB qword ptr [RDI + RCX*0x8],RAX JNC 0x001849ea INC RCX MOV EAX,0x1 CMP RDX,RCX JNZ 0x001849d6 LAB_001849e9: RET LAB_001849ea: XOR EAX,EAX RET
ulong mp_sub_ui(long param_1,ulong param_2,long param_3) { ulong *puVar1; ulong uVar2; long lVar3; if (0 < param_3) { lVar3 = 0; do { puVar1 = (ulong *)(param_1 + lVar3 * 8); uVar2 = *puVar1; *puVar1 = *puVar1 - param_2; if (param_2 <= uVar2) { return 0; } lVar3 = lVar3 + 1; param_2 = 1; } while (param_3 != lVar3); } return param_2; }
20,807
mp_sub_ui
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_ui(limb_t *tab, limb_t b, mp_size_t n) { mp_size_t i; limb_t k, a, v; k=b; for(i=0;i<n;i++) { v = tab[i]; a = v - k; k = a > v; tab[i] = a; if (k == 0) break; } return k; }
O2
c
mp_sub_ui: movq %rsi, %rax xorl %ecx, %ecx testq %rdx, %rdx cmovleq %rcx, %rdx pushq $0x1 popq %rsi cmpq %rcx, %rdx je 0x6f3ad subq %rax, (%rdi,%rcx,8) leaq 0x1(%rcx), %rcx movq %rsi, %rax jb 0x6f399 xorl %eax, %eax retq
mp_sub_ui: mov rax, rsi xor ecx, ecx test rdx, rdx cmovle rdx, rcx push 1 pop rsi loc_6F399: cmp rdx, rcx jz short locret_6F3AD sub [rdi+rcx*8], rax lea rcx, [rcx+1] mov rax, rsi jb short loc_6F399 xor eax, eax locret_6F3AD: retn
unsigned long long mp_sub_ui(long long a1, unsigned long long a2, long long a3) { unsigned long long result; // rax long long v4; // rcx bool v5; // cf result = a2; v4 = 0LL; if ( a3 <= 0 ) a3 = 0LL; while ( a3 != v4 ) { v5 = *(_QWORD *)(a1 + 8 * v4) < result; *(_QWORD *)(a1 + 8 * v4++) -= result; result = 1LL; if ( !v5 ) return 0LL; } return result; }
mp_sub_ui: MOV RAX,RSI XOR ECX,ECX TEST RDX,RDX CMOVLE RDX,RCX PUSH 0x1 POP RSI LAB_0016f399: CMP RDX,RCX JZ 0x0016f3ad SUB qword ptr [RDI + RCX*0x8],RAX LEA RCX,[RCX + 0x1] MOV RAX,RSI JC 0x0016f399 XOR EAX,EAX LAB_0016f3ad: RET
ulong mp_sub_ui(long param_1,ulong param_2,long param_3) { ulong *puVar1; long lVar2; bool bVar3; lVar2 = 0; if (param_3 < 1) { param_3 = lVar2; } do { if (param_3 == lVar2) { return param_2; } puVar1 = (ulong *)(param_1 + lVar2 * 8); bVar3 = *puVar1 < param_2; *puVar1 = *puVar1 - param_2; lVar2 = lVar2 + 1; param_2 = 1; } while (bVar3); return 0; }
20,808
findopt
eloqsql/mysys/my_getopt.c
static int findopt(char *optpat, uint length, const struct my_option **opt_res, const char **ffname) { uint count; const struct my_option *opt= *opt_res; DBUG_ENTER("findopt"); for (count= 0; opt->name; opt++) { if (!getopt_compare_strings(opt->name, optpat, length)) /* match found */ { (*opt_res)= opt; if (!opt->name[length]) /* Exact match */ DBUG_RETURN(1); if (!my_getopt_prefix_matching) continue; if (!count) { /* We only need to know one prev */ count= 1; *ffname= opt->name; } else if (strcmp(*ffname, opt->name)) { /* The above test is to not count same option twice (see mysql.cc, option "help") */ count++; } } } if (count == 1) my_getopt_error_reporter(INFORMATION_LEVEL, "Using unique option prefix '%.*s' is error-prone " "and can break in the future. " "Please use the full name '%s' instead.", length, optpat, *ffname); DBUG_RETURN(count); }
O0
c
findopt: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movl $0x0, -0x2c(%rbp) movq -0x38(%rbp), %rax cmpq $0x0, (%rax) je 0xb78ba movq -0x38(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq 0xb7900 cmpb $0x0, %al jne 0xb78a7 movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movq (%rax), %rax movl -0x14(%rbp), %ecx cmpb $0x0, (%rax,%rcx) jne 0xb7857 jmp 0xb784b movl $0x1, -0x4(%rbp) jmp 0xb78f1 leaq 0x1d63c3(%rip), %rax # 0x28dc21 cmpb $0x0, (%rax) jne 0xb7865 jmp 0xb78a9 cmpl $0x0, -0x2c(%rbp) jne 0xb7882 movl $0x1, -0x2c(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xb78a5 movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x38(%rbp), %rax movq (%rax), %rsi callq 0x3b990 cmpl $0x0, %eax je 0xb78a3 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xb78a5 jmp 0xb78a7 jmp 0xb78a9 movq -0x38(%rbp), %rax addq $0x70, %rax movq %rax, -0x38(%rbp) jmp 0xb7809 cmpl $0x1, -0x2c(%rbp) jne 0xb78e9 leaq 0x1d6339(%rip), %rax # 0x28dc00 movq (%rax), %r9 movl -0x14(%rbp), %edx movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq (%rax), %r8 movl $0x2, %edi leaq 0x61225(%rip), %rsi # 0x118b09 movb $0x0, %al callq *%r9 jmp 0xb78eb movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
findopt: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov [rbp+var_2C], 0 loc_B7809: mov rax, [rbp+var_38] cmp qword ptr [rax], 0 jz loc_B78BA mov rax, [rbp+var_38] mov rdi, [rax] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call getopt_compare_strings cmp al, 0 jnz short loc_B78A7 mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_38] mov rax, [rax] mov ecx, [rbp+var_14] cmp byte ptr [rax+rcx], 0 jnz short loc_B7857 jmp short $+2 loc_B784B: mov [rbp+var_4], 1 jmp loc_B78F1 loc_B7857: lea rax, my_getopt_prefix_matching cmp byte ptr [rax], 0 jnz short loc_B7865 jmp short loc_B78A9 loc_B7865: cmp [rbp+var_2C], 0 jnz short loc_B7882 mov [rbp+var_2C], 1 mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_28] mov [rax], rcx jmp short loc_B78A5 loc_B7882: mov rax, [rbp+var_28] mov rdi, [rax] mov rax, [rbp+var_38] mov rsi, [rax] call _strcmp cmp eax, 0 jz short loc_B78A3 mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax loc_B78A3: jmp short $+2 loc_B78A5: jmp short $+2 loc_B78A7: jmp short $+2 loc_B78A9: mov rax, [rbp+var_38] add rax, 70h ; 'p' mov [rbp+var_38], rax jmp loc_B7809 loc_B78BA: cmp [rbp+var_2C], 1 jnz short loc_B78E9 lea rax, my_getopt_error_reporter mov r9, [rax] mov edx, [rbp+var_14] mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov r8, [rax] mov edi, 2 lea rsi, aUsingUniqueOpt; "Using unique option prefix '%.*s' is er"... mov al, 0 call r9 loc_B78E9: jmp short $+2 loc_B78EB: mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_B78F1: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long findopt(const char *a1, unsigned int a2, const char ***a3, const char **a4) { const char **v5; // [rsp+8h] [rbp-38h] unsigned int v6; // [rsp+14h] [rbp-2Ch] v5 = *a3; v6 = 0; while ( *v5 ) { if ( !(unsigned __int8)getopt_compare_strings(*v5, a1, a2) ) { *a3 = v5; if ( !(*v5)[a2] ) return 1; if ( my_getopt_prefix_matching ) { if ( v6 ) { if ( (unsigned int)strcmp(*a4, *v5) ) ++v6; } else { v6 = 1; *a4 = *v5; } } } v5 += 14; } if ( v6 == 1 ) my_getopt_error_reporter( 2, (long long)"Using unique option prefix '%.*s' is error-prone and can break in the future. Please use the full name '%s' instead.", a2, a1, *a4); return v6; }
findopt: PUSH RBP MOV RBP,RSP SUB RSP,0x40 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 RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x2c],0x0 LAB_001b7809: MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX],0x0 JZ 0x001b78ba MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL 0x001b7900 CMP AL,0x0 JNZ 0x001b78a7 MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x14] CMP byte ptr [RAX + RCX*0x1],0x0 JNZ 0x001b7857 JMP 0x001b784b LAB_001b784b: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001b78f1 LAB_001b7857: LEA RAX,[0x38dc21] CMP byte ptr [RAX],0x0 JNZ 0x001b7865 JMP 0x001b78a9 LAB_001b7865: CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x001b7882 MOV dword ptr [RBP + -0x2c],0x1 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x001b78a5 LAB_001b7882: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX] CALL 0x0013b990 CMP EAX,0x0 JZ 0x001b78a3 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX LAB_001b78a3: JMP 0x001b78a5 LAB_001b78a5: JMP 0x001b78a7 LAB_001b78a7: JMP 0x001b78a9 LAB_001b78a9: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x70 MOV qword ptr [RBP + -0x38],RAX JMP 0x001b7809 LAB_001b78ba: CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x001b78e9 LEA RAX,[0x38dc00] MOV R9,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RAX] MOV EDI,0x2 LEA RSI,[0x218b09] MOV AL,0x0 CALL R9 LAB_001b78e9: JMP 0x001b78eb LAB_001b78eb: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_001b78f1: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int findopt(int8 param_1,uint param_2,int8 *param_3,long *param_4) { char cVar1; int iVar2; long *local_40; int local_34; local_40 = (long *)*param_3; local_34 = 0; do { if (*local_40 == 0) { if (local_34 == 1) { (*(code *)my_getopt_error_reporter) (2, "Using unique option prefix \'%.*s\' is error-prone and can break in the future. Please use the full name \'%s\' instead." ,param_2,param_1,*param_4); } return local_34; } cVar1 = getopt_compare_strings(*local_40,param_1,param_2); if (cVar1 == '\0') { *param_3 = local_40; if (*(char *)(*local_40 + (ulong)param_2) == '\0') { return 1; } if (my_getopt_prefix_matching != '\0') { if (local_34 == 0) { local_34 = 1; *param_4 = *local_40; } else { iVar2 = strcmp((char *)*param_4,(char *)*local_40); if (iVar2 != 0) { local_34 = local_34 + 1; } } } } local_40 = local_40 + 0xe; } while( true ); }
20,809
my_casedn_str_mb
eloqsql/strings/ctype-mb.c
size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; register const uchar *map= cs->to_lower; char *str_orig= str; while (*str) { /* Pointing after the '\0' is safe here. */ if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) str+= l; else { *str= (char) map[(uchar)*str]; str++; } } return (size_t) (str - str_orig); }
O3
c
my_casedn_str_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %rax je 0x3f5b0 movq %rdi, %r14 movq 0x48(%rdi), %r12 movq %rbx, %r15 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x3f5a0 movzbl (%r15), %eax movb (%r12,%rax), %al movb %al, (%r15) movl $0x1, %ecx jmp 0x3f5a2 movl %eax, %ecx leaq (%r15,%rcx), %rax cmpb $0x0, (%r15,%rcx) movq %rax, %r15 jne 0x3f56c subq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_casedn_str_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi cmp byte ptr [rsi], 0 mov rax, rsi jz short loc_3F5B0 mov r14, rdi mov r12, [rdi+48h] mov r15, rbx loc_3F56C: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_3F5A0 movzx eax, byte ptr [r15] mov al, [r12+rax] mov [r15], al mov ecx, 1 jmp short loc_3F5A2 loc_3F5A0: mov ecx, eax loc_3F5A2: lea rax, [r15+rcx] cmp byte ptr [r15+rcx], 0 mov r15, rax jnz short loc_3F56C loc_3F5B0: sub rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_casedn_str_mb(long long a1, _BYTE *a2) { _BYTE *v2; // rax long long v3; // r12 _BYTE *v4; // r15 int v5; // eax long long v6; // rcx bool v7; // zf v2 = a2; if ( *a2 ) { v3 = *(_QWORD *)(a1 + 72); v4 = a2; do { v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, &v4[*(unsigned int *)(a1 + 156)]); if ( v5 >= 2 ) { v6 = (unsigned int)v5; } else { *v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4); v6 = 1LL; } v2 = &v4[v6]; v7 = v4[v6] == 0; v4 += v6; } while ( !v7 ); } return v2 - a2; }
my_casedn_str_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV RAX,RSI JZ 0x0013f5b0 MOV R14,RDI MOV R12,qword ptr [RDI + 0x48] MOV R15,RBX LAB_0013f56c: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x0013f5a0 MOVZX EAX,byte ptr [R15] MOV AL,byte ptr [R12 + RAX*0x1] MOV byte ptr [R15],AL MOV ECX,0x1 JMP 0x0013f5a2 LAB_0013f5a0: MOV ECX,EAX LAB_0013f5a2: LEA RAX,[R15 + RCX*0x1] CMP byte ptr [R15 + RCX*0x1],0x0 MOV R15,RAX JNZ 0x0013f56c LAB_0013f5b0: SUB RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_casedn_str_mb(long param_1,byte *param_2) { byte *pbVar1; long lVar2; uint uVar3; byte *pbVar4; ulong uVar5; byte *pbVar6; pbVar4 = param_2; if (*param_2 != 0) { lVar2 = *(long *)(param_1 + 0x48); pbVar6 = param_2; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c)); if ((int)uVar3 < 2) { *pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6); uVar5 = 1; } else { uVar5 = (ulong)uVar3; } pbVar4 = pbVar6 + uVar5; pbVar1 = pbVar6 + uVar5; pbVar6 = pbVar4; } while (*pbVar1 != 0); } return (long)pbVar4 - (long)param_2; }
20,810
bool httplib::detail::process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::'lambda'(httplib::Stream&, bool, bool&)>(std::atomic<int> const&, ssl_st*, int, unsigned long, long, long, long, long, long, httplib::SSLServer::process_and_close_socket(int)::'lambda'(httplib::Stream&, bool, bool&))
nickolajgrishuk[P]metricz-cpp/build_O0/_deps/httplib-src/httplib.h
inline bool process_server_socket_ssl( const std::atomic<socket_t> &svr_sock, SSL *ssl, socket_t sock, size_t keep_alive_max_count, time_t keep_alive_timeout_sec, time_t read_timeout_sec, time_t read_timeout_usec, time_t write_timeout_sec, time_t write_timeout_usec, T callback) { return process_server_socket_core( svr_sock, sock, keep_alive_max_count, keep_alive_timeout_sec, [&](bool close_connection, bool &connection_closed) { SSLSocketStream strm(sock, ssl, read_timeout_sec, read_timeout_usec, write_timeout_sec, write_timeout_usec); return callback(strm, close_connection, connection_closed); }); }
O0
c
bool httplib::detail::process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::'lambda'(httplib::Stream&, bool, bool&)>(std::atomic<int> const&, ssl_st*, int, unsigned long, long, long, long, long, long, httplib::SSLServer::process_and_close_socket(int)::'lambda'(httplib::Stream&, bool, bool&)): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp leaq 0x28(%rbp), %rax movq 0x20(%rbp), %r10 movq 0x18(%rbp), %r10 movq 0x10(%rbp), %r10 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x14(%rbp), %r8 movq %r8, -0x68(%rbp) leaq -0x10(%rbp), %r8 movq %r8, -0x60(%rbp) leaq -0x30(%rbp), %r8 movq %r8, -0x58(%rbp) leaq 0x10(%rbp), %r8 movq %r8, -0x50(%rbp) leaq 0x18(%rbp), %r8 movq %r8, -0x48(%rbp) leaq 0x20(%rbp), %r8 movq %r8, -0x40(%rbp) movq %rax, -0x38(%rbp) movq -0x38(%rbp), %r8 movq %rsp, %rax movq %r8, 0x30(%rax) movups -0x68(%rbp), %xmm0 movups -0x58(%rbp), %xmm1 movups -0x48(%rbp), %xmm2 movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) callq 0x69cf0 andb $0x1, %al addq $0xa0, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN7httplib6detail25process_server_socket_sslIZNS_9SSLServer24process_and_close_socketEiEUlRNS_6StreamEbRbE_EEbRKSt6atomicIiEP6ssl_stimlllllT_: push rbp mov rbp, rsp sub rsp, 0A0h lea rax, [rbp+arg_18] mov r10, [rbp+arg_10] mov r10, [rbp+arg_8] mov r10, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rdi, [rbp+var_8] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] lea r8, [rbp+var_14] mov qword ptr [rbp+var_68], r8 lea r8, [rbp+var_10] mov qword ptr [rbp+var_68+8], r8 lea r8, [rbp+var_30] mov qword ptr [rbp+var_58], r8 lea r8, [rbp+arg_0] mov qword ptr [rbp+var_58+8], r8 lea r8, [rbp+arg_8] mov qword ptr [rbp+var_48], r8 lea r8, [rbp+arg_10] mov qword ptr [rbp+var_48+8], r8 mov [rbp+var_38], rax mov r8, [rbp+var_38] mov rax, rsp mov [rax+30h], r8 movups xmm0, [rbp+var_68] movups xmm1, [rbp+var_58] movups xmm2, [rbp+var_48] movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 call _ZN7httplib6detail26process_server_socket_coreIZNS0_25process_server_socket_sslIZNS_9SSLServer24process_and_close_socketEiEUlRNS_6StreamEbRbE_EEbRKSt6atomicIiEP6ssl_stimlllllT_EUlbS6_E_EEbSB_imlSE_; httplib::detail::process_server_socket_core<httplib::detail::process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1}>(std::atomic<int> const&,ssl_st *,int,ulong,long,long,long,long,long,httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1})::{lambda(bool,bool &)#1}>(std::atomic<int> const&,int,ulong,long,httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1}) and al, 1 add rsp, 0A0h pop rbp retn
char httplib::detail::process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1}>( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9, char a10) { __int128 v11; // [rsp+38h] [rbp-68h] __int128 v12; // [rsp+48h] [rbp-58h] __int128 v13; // [rsp+58h] [rbp-48h] _QWORD v14[3]; // [rsp+70h] [rbp-30h] BYREF int v15; // [rsp+8Ch] [rbp-14h] BYREF _QWORD v16[2]; // [rsp+90h] [rbp-10h] BYREF v16[1] = a1; v16[0] = a2; v15 = a3; v14[2] = a4; v14[1] = a5; v14[0] = a6; *(_QWORD *)&v11 = &v15; *((_QWORD *)&v11 + 1) = v16; *(_QWORD *)&v12 = v14; *((_QWORD *)&v12 + 1) = &a7; *(_QWORD *)&v13 = &a8; *((_QWORD *)&v13 + 1) = &a9; return httplib::detail::process_server_socket_core<bool httplib::detail::process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1}>(std::atomic<int> const&,ssl_st *,int,unsigned long,long,long,long,long,long,httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1})::{lambda(bool,bool &)#1}>( a1, a3, a4, a5, (unsigned int)&a10, a6, v11, v12, v13, &a10, v11, v12, v13, &a10) & 1; }
process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream&,bool,bool&)#1}>: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 LEA RAX,[RBP + 0x28] MOV R10,qword ptr [RBP + 0x20] MOV R10,qword ptr [RBP + 0x18] MOV R10,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] LEA R8,[RBP + -0x14] MOV qword ptr [RBP + -0x68],R8 LEA R8,[RBP + -0x10] MOV qword ptr [RBP + -0x60],R8 LEA R8,[RBP + -0x30] MOV qword ptr [RBP + -0x58],R8 LEA R8,[RBP + 0x10] MOV qword ptr [RBP + -0x50],R8 LEA R8,[RBP + 0x18] MOV qword ptr [RBP + -0x48],R8 LEA R8,[RBP + 0x20] MOV qword ptr [RBP + -0x40],R8 MOV qword ptr [RBP + -0x38],RAX MOV R8,qword ptr [RBP + -0x38] MOV RAX,RSP MOV qword ptr [RAX + 0x30],R8 MOVUPS XMM0,xmmword ptr [RBP + -0x68] MOVUPS XMM1,xmmword ptr [RBP + -0x58] MOVUPS XMM2,xmmword ptr [RBP + -0x48] MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 CALL 0x00169cf0 AND AL,0x1 ADD RSP,0xa0 POP RBP RET
/* bool httplib::detail::process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream&, bool, bool&)#1}>(std::atomic<int> const&, ssl_st*, int, unsigned long, long, long, long, long, long, httplib::SSLServer::process_and_close_socket(int)::{lambda(httplib::Stream&, bool, bool&)#1}) */ bool httplib::detail:: process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::_lambda(httplib::Stream&,bool,bool&)_1_> (int8 param_1,int8 param_2,int4 param_3,int8 param_4, int8 param_5,int8 param_6) { bool bVar1; int4 local_70; int4 uStack_68; int4 local_60; int4 uStack_58; int4 local_50; int4 uStack_48; int8 local_38; int8 local_30; int8 local_28; int4 local_1c; int8 local_18; int8 local_10; local_70 = SUB84(&local_1c,0); uStack_68 = SUB84(&local_18,0); local_60 = SUB84(&local_38,0); uStack_58 = SUB84(&stack0x00000008,0); local_50 = SUB84(&stack0x00000010,0); uStack_48 = SUB84(&stack0x00000018,0); local_38 = param_6; local_30 = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; bVar1 = process_server_socket_core<httplib::detail::process_server_socket_ssl<httplib::SSLServer::process_and_close_socket(int)::_lambda(httplib::Stream&,bool,bool&)_1_>(std::atomic<int>const&,ssl_st*,int,unsigned_long,long,long,long,long,long,httplib::SSLServer::process_and_close_socket(int)::_lambda(httplib::Stream&,bool,bool&)_1_)::_lambda(bool,bool&)_1_> (param_1,param_3,param_4,param_5,&stack0x00000020,param_6,local_70,uStack_68, local_60,uStack_58,local_50,uStack_48,&stack0x00000020); return bVar1; }
20,811
dump_all_views_in_db
eloqsql/client/mysqldump.c
static my_bool dump_all_views_in_db(char *database) { char *table; uint numrows; char table_buff[NAME_LEN*2+3]; char hash_key[2*NAME_LEN+2]; /* "db.tablename" */ char *afterdot; afterdot= strmov(hash_key, database); *afterdot++= '.'; if (init_dumping(database, init_dumping_views)) return 1; if (opt_xml) print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS); if (lock_tables) { DYNAMIC_STRING query; init_dynamic_string_checked(&query, "LOCK TABLES ", 256, 1024); for (numrows= 0 ; (table= getTableName(1, DUMP_TABLE_TABLE)); ) { char *end= strmov(afterdot, table); if (include_table((uchar*) hash_key,end - hash_key)) { numrows++; dynstr_append_checked(&query, quote_name(table, table_buff, 1)); dynstr_append_checked(&query, " READ /*!32311 LOCAL */,"); } } if (numrows && mysql_real_query(mysql, query.str, (ulong)query.length-1)) DB_error(mysql, "when using LOCK TABLES"); /* We shall continue here, if --force was given */ dynstr_free(&query); } if (flush_logs) { if (mysql_refresh(mysql, REFRESH_LOG)) DB_error(mysql, "when doing refresh"); /* We shall continue here, if --force was given */ else verbose_msg("-- dump_all_views_in_db : logs flushed successfully!\n"); } while ((table= getTableName(0, DUMP_TABLE_TABLE))) { char *end= strmov(afterdot, table); if (include_table((uchar*) hash_key, end - hash_key)) get_view_structure(table, database); } if (opt_xml) { fputs("</database>\n", md_result_file); check_io(md_result_file); } if (lock_tables) (void) mysql_query_with_error_report(mysql, 0, "UNLOCK TABLES"); return 0; }
O3
c
dump_all_views_in_db: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x458, %rsp # imm = 0x458 movq %rdi, %r13 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x450(%rbp), %r14 movq %r14, %rdi movq %r13, %rsi callq 0x37a00 movq %rax, %r15 movb $0x2e, (%rax) leaq 0x5194(%rip), %rsi # 0x42e9f movq %r13, %rdi callq 0x3df6d movb $0x1, %bl testl %eax, %eax jne 0x3df45 cmpb $0x1, 0x386894(%rip) # 0x3c45b8 jne 0x3dd54 movq 0x386753(%rip), %rdi # 0x3c4480 movq $0x0, (%rsp) leaq 0x63e3b(%rip), %rsi # 0xa1b77 leaq 0x6309e(%rip), %rdx # 0xa0de1 leaq 0x6375e(%rip), %rcx # 0xa14a8 movq %r13, %r9 xorl %eax, %eax callq 0x3e24c incq %r15 cmpb $0x0, 0x30de03(%rip) # 0x34bb61 je 0x3de63 movq %r13, -0x458(%rbp) leaq 0x6356b(%rip), %rsi # 0xa12dd leaq -0x478(%rbp), %rdi movl $0x100, %edx # imm = 0x100 movl $0x400, %ecx # imm = 0x400 callq 0x3b1ba xorl %r13d, %r13d movl $0x1, %edi xorl %esi, %esi callq 0x3e3b8 testq %rax, %rax je 0x3de50 movq %rax, %rbx leaq 0x386926(%rip), %r12 # 0x3c46d0 movq %r15, %rdi movq %rbx, %rsi callq 0x37a00 subq %r14, %rax movq %r12, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x65566 testq %rax, %rax jne 0x3de03 incl %r13d movq %rbx, %rdi leaq -0x240(%rbp), %rsi movl $0x1, %edx callq 0x3e4bf leaq -0x478(%rbp), %rbx movq %rbx, %rdi movq %rax, %rsi callq 0x3ccf2 movq %rbx, %rdi leaq 0x634ec(%rip), %rsi # 0xa12ea callq 0x3ccf2 movl $0x1, %edi xorl %esi, %esi callq 0x3e3b8 movq %rax, %rbx testq %rax, %rax jne 0x3ddaa testl %r13d, %r13d je 0x3de50 movq 0x386675(%rip), %rdi # 0x3c4498 movq -0x478(%rbp), %rsi movq -0x470(%rbp), %rdx decq %rdx callq 0x4867a testl %eax, %eax je 0x3de50 movq 0x386654(%rip), %rdi # 0x3c4498 leaq 0x634b8(%rip), %rsi # 0xa1303 callq 0x3ca81 leaq -0x478(%rbp), %rdi callq 0x6ceab movq -0x458(%rbp), %r13 cmpb $0x0, 0x386797(%rip) # 0x3c4601 je 0x3dea4 movq 0x386625(%rip), %rdi # 0x3c4498 movl $0x2, %esi callq 0x4a968 testl %eax, %eax je 0x3de96 movq 0x386610(%rip), %rdi # 0x3c4498 leaq 0x6348b(%rip), %rsi # 0xa131a callq 0x3ca81 jmp 0x3dea4 leaq 0x64f3a(%rip), %rdi # 0xa2dd7 xorl %eax, %eax callq 0x39178 xorl %edi, %edi xorl %esi, %esi callq 0x3e3b8 testq %rax, %rax je 0x3def9 movq %rax, %r12 leaq 0x386814(%rip), %rbx # 0x3c46d0 movq %r15, %rdi movq %r12, %rsi callq 0x37a00 subq %r14, %rax movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x65566 testq %rax, %rax jne 0x3dee8 movq %r12, %rdi movq %r13, %rsi callq 0x42ea7 xorl %edi, %edi xorl %esi, %esi callq 0x3e3b8 movq %rax, %r12 testq %rax, %rax jne 0x3debc cmpb $0x1, 0x3866b8(%rip) # 0x3c45b8 jne 0x3df21 movq 0x386577(%rip), %rsi # 0x3c4480 leaq 0x6353e(%rip), %rdi # 0xa144e callq 0x37340 movq 0x386564(%rip), %rdi # 0x3c4480 callq 0x38cfc cmpb $0x0, 0x30dc39(%rip) # 0x34bb61 je 0x3df43 movq 0x386567(%rip), %rdi # 0x3c4498 leaq 0x62eff(%rip), %rdx # 0xa0e37 xorl %ebx, %ebx xorl %esi, %esi callq 0x390fd jmp 0x3df45 xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x3df68 movl %ebx, %eax addq $0x458, %rsp # imm = 0x458 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x372b0
dump_all_views_in_db: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 458h mov r13, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r14, [rbp+var_450] mov rdi, r14 mov rsi, r13 call _stpcpy mov r15, rax mov byte ptr [rax], 2Eh ; '.' lea rsi, init_dumping_views mov rdi, r13 call init_dumping mov bl, 1 test eax, eax jnz loc_3DF45 cmp cs:opt_xml, 1 jnz short loc_3DD54 mov rdi, cs:md_result_file mov [rsp+480h+var_480], 0 lea rsi, asc_A1B75+2; "" lea rdx, aPositionToStar_0+62h; "\n" lea rcx, aWhenSelectingT+13h; "database" mov r9, r13 xor eax, eax call print_xml_tag loc_3DD54: inc r15 cmp cs:lock_tables, 0 jz loc_3DE63 mov [rbp+var_458], r13 lea rsi, aLockTables; "LOCK TABLES " lea rdi, [rbp+var_478] mov edx, 100h mov ecx, 400h call init_dynamic_string_checked xor r13d, r13d mov edi, 1 xor esi, esi call getTableName test rax, rax jz loc_3DE50 mov rbx, rax lea r12, ignore_table loc_3DDAA: mov rdi, r15 mov rsi, rbx call _stpcpy sub rax, r14 mov rdi, r12 mov rsi, r14 mov rdx, rax call my_hash_search test rax, rax jnz short loc_3DE03 inc r13d mov rdi, rbx lea rsi, [rbp+var_240] mov edx, 1 call quote_name lea rbx, [rbp+var_478] mov rdi, rbx mov rsi, rax call dynstr_append_checked mov rdi, rbx lea rsi, aRead32311Local; " READ /*!32311 LOCAL */," call dynstr_append_checked loc_3DE03: mov edi, 1 xor esi, esi call getTableName mov rbx, rax test rax, rax jnz short loc_3DDAA test r13d, r13d jz short loc_3DE50 mov rdi, cs:mysql mov rsi, [rbp+var_478] mov rdx, [rbp+var_470] dec rdx call mysql_real_query test eax, eax jz short loc_3DE50 mov rdi, cs:mysql lea rsi, aWhenUsingLockT; "when using LOCK TABLES" call DB_error loc_3DE50: lea rdi, [rbp+var_478] call dynstr_free mov r13, [rbp+var_458] loc_3DE63: cmp cs:flush_logs, 0 jz short loc_3DEA4 mov rdi, cs:mysql mov esi, 2 call mysql_refresh test eax, eax jz short loc_3DE96 mov rdi, cs:mysql lea rsi, aWhenDoingRefre; "when doing refresh" call DB_error jmp short loc_3DEA4 loc_3DE96: lea rdi, aDumpAllViewsIn; "-- dump_all_views_in_db : logs flushed "... xor eax, eax call verbose_msg loc_3DEA4: xor edi, edi xor esi, esi call getTableName test rax, rax jz short loc_3DEF9 mov r12, rax lea rbx, ignore_table loc_3DEBC: mov rdi, r15 mov rsi, r12 call _stpcpy sub rax, r14 mov rdi, rbx mov rsi, r14 mov rdx, rax call my_hash_search test rax, rax jnz short loc_3DEE8 mov rdi, r12 mov rsi, r13 call get_view_structure loc_3DEE8: xor edi, edi xor esi, esi call getTableName mov r12, rax test rax, rax jnz short loc_3DEBC loc_3DEF9: cmp cs:opt_xml, 1 jnz short loc_3DF21 mov rsi, cs:md_result_file lea rdi, aDatabase_0; "</database>\n" call _fputs mov rdi, cs:md_result_file call check_io loc_3DF21: cmp cs:lock_tables, 0 jz short loc_3DF43 mov rdi, cs:mysql lea rdx, aUnlockTables; "UNLOCK TABLES" xor ebx, ebx xor esi, esi call mysql_query_with_error_report jmp short loc_3DF45 loc_3DF43: xor ebx, ebx loc_3DF45: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_3DF68 mov eax, ebx add rsp, 458h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3DF68: call ___stack_chk_fail
long long dump_all_views_in_db( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { unsigned int v9; // ebx long long v10; // r13 _BYTE *v11; // r15 long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 double v16; // xmm4_8 double v17; // xmm5_8 _BYTE *v18; // r15 int v19; // r13d long long TableName; // rax long long v21; // rbx long long v22; // rax long long v23; // rax long long v24; // rdx long long v25; // rcx long long v26; // r8 long long v27; // r9 double v28; // xmm4_8 double v29; // xmm5_8 long long v30; // rdx long long v31; // rcx long long v32; // r8 long long v33; // r9 double v34; // xmm4_8 double v35; // xmm5_8 long long v36; // rdx long long v37; // rcx long long v38; // r8 long long v39; // r9 double v40; // xmm4_8 double v41; // xmm5_8 long long v42; // rdx long long v43; // rcx long long v44; // r8 long long v45; // r9 double v46; // xmm4_8 double v47; // xmm5_8 long long v48; // rax long long v49; // rdx long long v50; // r12 long long v51; // rax long long v52; // rsi long long v53; // rdx long long v54; // rcx long long v55; // r8 long long v56; // r9 char v58; // [rsp+0h] [rbp-480h] char v59; // [rsp+0h] [rbp-480h] _QWORD v60[4]; // [rsp+8h] [rbp-478h] BYREF long long v61; // [rsp+28h] [rbp-458h] _BYTE v62[528]; // [rsp+30h] [rbp-450h] BYREF _BYTE v63[528]; // [rsp+240h] [rbp-240h] BYREF unsigned long long v64; // [rsp+450h] [rbp-30h] v10 = a1; v64 = __readfsqword(0x28u); v11 = (_BYTE *)stpcpy(v62, a1); *v11 = 46; LOBYTE(v9) = 1; if ( !(unsigned int)init_dumping(a1, init_dumping_views) ) { if ( opt_xml == 1 ) print_xml_tag(md_result_file, (unsigned int)"", (unsigned int)"\n", (unsigned int)"database", v14, a1, 0); v18 = v11 + 1; if ( lock_tables ) { v61 = a1; init_dynamic_string_checked( a2, a3, a4, a5, v16, v17, a8, a9, (long long)v60, (long long)"LOCK TABLES ", 256LL, 1024LL, v14, v15, v58); v19 = 0; TableName = getTableName(1LL, 0LL); if ( TableName ) { v21 = TableName; do { v22 = stpcpy(v18, v21); if ( !my_hash_search(&ignore_table, v62, v22 - (_QWORD)v62) ) { ++v19; v23 = quote_name(v21, v63, 1LL); dynstr_append_checked(a2, a3, a4, a5, v28, v29, a8, a9, (long long)v60, v23, v24, v25, v26, v27, v58); dynstr_append_checked( a2, a3, a4, a5, v34, v35, a8, a9, (long long)v60, (long long)" READ /*!32311 LOCAL */,", v30, v31, v32, v33, v59); } v21 = getTableName(1LL, 0LL); } while ( v21 ); if ( v19 && (unsigned int)mysql_real_query(mysql, v60[0], v60[1] - 1LL) ) DB_error(mysql, (long long)"when using LOCK TABLES", a2, a3, a4, a5, v40, v41, a8, a9, v36, v37, v38, v39, v58); } dynstr_free(v60); v10 = v61; } if ( flush_logs ) { if ( (unsigned int)mysql_refresh(mysql, 2LL, v12, v13, *(double *)a2.m128_u64) ) DB_error(mysql, (long long)"when doing refresh", a2, a3, a4, a5, v46, v47, a8, a9, v42, v43, v44, v45, v58); else verbose_msg((long long)"-- dump_all_views_in_db : logs flushed successfully!\n"); } v48 = getTableName(0LL, 0LL); if ( v48 ) { v50 = v48; do { v51 = stpcpy(v18, v50); if ( !my_hash_search(&ignore_table, v62, v51 - (_QWORD)v62) ) get_view_structure(v50, v10); v50 = getTableName(0LL, 0LL); } while ( v50 ); } if ( opt_xml == 1 ) { v52 = md_result_file; fputs("</database>\n", md_result_file, v49); check_io(md_result_file, v52, v53, v54, v55, v56, v58); } v9 = 0; if ( lock_tables ) mysql_query_with_error_report(mysql, 0LL, (long long)"UNLOCK TABLES"); } return v9; }
dump_all_views_in_db: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x458 MOV R13,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R14,[RBP + -0x450] MOV RDI,R14 MOV RSI,R13 CALL 0x00137a00 MOV R15,RAX MOV byte ptr [RAX],0x2e LEA RSI,[0x142e9f] MOV RDI,R13 CALL 0x0013df6d MOV BL,0x1 TEST EAX,EAX JNZ 0x0013df45 CMP byte ptr [0x004c45b8],0x1 JNZ 0x0013dd54 MOV RDI,qword ptr [0x004c4480] MOV qword ptr [RSP],0x0 LEA RSI,[0x1a1b77] LEA RDX,[0x1a0de1] LEA RCX,[0x1a14a8] MOV R9,R13 XOR EAX,EAX CALL 0x0013e24c LAB_0013dd54: INC R15 CMP byte ptr [0x0044bb61],0x0 JZ 0x0013de63 MOV qword ptr [RBP + -0x458],R13 LEA RSI,[0x1a12dd] LEA RDI,[RBP + -0x478] MOV EDX,0x100 MOV ECX,0x400 CALL 0x0013b1ba XOR R13D,R13D MOV EDI,0x1 XOR ESI,ESI CALL 0x0013e3b8 TEST RAX,RAX JZ 0x0013de50 MOV RBX,RAX LEA R12,[0x4c46d0] LAB_0013ddaa: MOV RDI,R15 MOV RSI,RBX CALL 0x00137a00 SUB RAX,R14 MOV RDI,R12 MOV RSI,R14 MOV RDX,RAX CALL 0x00165566 TEST RAX,RAX JNZ 0x0013de03 INC R13D MOV RDI,RBX LEA RSI,[RBP + -0x240] MOV EDX,0x1 CALL 0x0013e4bf LEA RBX,[RBP + -0x478] MOV RDI,RBX MOV RSI,RAX CALL 0x0013ccf2 MOV RDI,RBX LEA RSI,[0x1a12ea] CALL 0x0013ccf2 LAB_0013de03: MOV EDI,0x1 XOR ESI,ESI CALL 0x0013e3b8 MOV RBX,RAX TEST RAX,RAX JNZ 0x0013ddaa TEST R13D,R13D JZ 0x0013de50 MOV RDI,qword ptr [0x004c4498] MOV RSI,qword ptr [RBP + -0x478] MOV RDX,qword ptr [RBP + -0x470] DEC RDX CALL 0x0014867a TEST EAX,EAX JZ 0x0013de50 MOV RDI,qword ptr [0x004c4498] LEA RSI,[0x1a1303] CALL 0x0013ca81 LAB_0013de50: LEA RDI,[RBP + -0x478] CALL 0x0016ceab MOV R13,qword ptr [RBP + -0x458] LAB_0013de63: CMP byte ptr [0x004c4601],0x0 JZ 0x0013dea4 MOV RDI,qword ptr [0x004c4498] MOV ESI,0x2 CALL 0x0014a968 TEST EAX,EAX JZ 0x0013de96 MOV RDI,qword ptr [0x004c4498] LEA RSI,[0x1a131a] CALL 0x0013ca81 JMP 0x0013dea4 LAB_0013de96: LEA RDI,[0x1a2dd7] XOR EAX,EAX CALL 0x00139178 LAB_0013dea4: XOR EDI,EDI XOR ESI,ESI CALL 0x0013e3b8 TEST RAX,RAX JZ 0x0013def9 MOV R12,RAX LEA RBX,[0x4c46d0] LAB_0013debc: MOV RDI,R15 MOV RSI,R12 CALL 0x00137a00 SUB RAX,R14 MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x00165566 TEST RAX,RAX JNZ 0x0013dee8 MOV RDI,R12 MOV RSI,R13 CALL 0x00142ea7 LAB_0013dee8: XOR EDI,EDI XOR ESI,ESI CALL 0x0013e3b8 MOV R12,RAX TEST RAX,RAX JNZ 0x0013debc LAB_0013def9: CMP byte ptr [0x004c45b8],0x1 JNZ 0x0013df21 MOV RSI,qword ptr [0x004c4480] LEA RDI,[0x1a144e] CALL 0x00137340 MOV RDI,qword ptr [0x004c4480] CALL 0x00138cfc LAB_0013df21: CMP byte ptr [0x0044bb61],0x0 JZ 0x0013df43 MOV RDI,qword ptr [0x004c4498] LEA RDX,[0x1a0e37] XOR EBX,EBX XOR ESI,ESI CALL 0x001390fd JMP 0x0013df45 LAB_0013df43: XOR EBX,EBX LAB_0013df45: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0013df68 MOV EAX,EBX ADD RSP,0x458 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013df68: CALL 0x001372b0
ulong dump_all_views_in_db(char *param_1) { int iVar1; char *pcVar2; char *pcVar3; char *pcVar4; long lVar5; int8 uVar6; int8 unaff_RBX; ulong uVar7; int8 in_R8; long in_FS_OFFSET; int8 local_480; long local_478; char *local_460; char local_458 [528]; int1 local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar2 = stpcpy(local_458,param_1); *pcVar2 = '.'; iVar1 = init_dumping(param_1,init_dumping_views); uVar7 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if (iVar1 == 0) { if (opt_xml == '\x01') { print_xml_tag(md_result_file,&DAT_001a1b77,"\n","database",in_R8,param_1,0); } if (lock_tables != '\0') { local_460 = param_1; init_dynamic_string_checked(&local_480,"LOCK TABLES ",0x100,0x400); iVar1 = 0; pcVar3 = (char *)getTableName(1,0); if (pcVar3 != (char *)0x0) { do { pcVar4 = stpcpy(pcVar2 + 1,pcVar3); lVar5 = my_hash_search(ignore_table,local_458,(long)pcVar4 - (long)local_458); if (lVar5 == 0) { iVar1 = iVar1 + 1; uVar6 = quote_name(pcVar3,local_248,1); dynstr_append_checked(&local_480,uVar6); dynstr_append_checked(&local_480," READ /*!32311 LOCAL */,"); } pcVar3 = (char *)getTableName(1,0); } while (pcVar3 != (char *)0x0); if ((iVar1 != 0) && (iVar1 = mysql_real_query(mysql,local_480,local_478 + -1), iVar1 != 0)) { DB_error(mysql,"when using LOCK TABLES"); } } dynstr_free(&local_480); param_1 = local_460; } if (flush_logs != '\0') { iVar1 = mysql_refresh(mysql,2); if (iVar1 == 0) { verbose_msg("-- dump_all_views_in_db : logs flushed successfully!\n"); } else { DB_error(mysql,"when doing refresh"); } } pcVar3 = (char *)getTableName(0,0); while (pcVar3 != (char *)0x0) { pcVar4 = stpcpy(pcVar2 + 1,pcVar3); lVar5 = my_hash_search(ignore_table,local_458,(long)pcVar4 - (long)local_458); if (lVar5 == 0) { get_view_structure(pcVar3,param_1); } pcVar3 = (char *)getTableName(0,0); } if (opt_xml == '\x01') { fputs("</database>\n",md_result_file); check_io(md_result_file); } if (lock_tables == '\0') { uVar7 = 0; } else { uVar7 = 0; mysql_query_with_error_report(mysql,0,"UNLOCK TABLES"); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar7 & 0xffffffff; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
20,812
ma_SHA1Init
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Init(_MA_SHA1_CTX * context) { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. */ context->state[0] = 0x67452301; context->state[1] = 0xefcdab89; context->state[2] = 0x98badcfe; context->state[3] = 0x10325476; context->state[4] = 0xc3d2e1f0; }
O0
c
ma_SHA1Init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x8(%rbp), %rax movl $0x67452301, (%rax) # imm = 0x67452301 movq -0x8(%rbp), %rax movl $0xefcdab89, 0x4(%rax) # imm = 0xEFCDAB89 movq -0x8(%rbp), %rax movl $0x98badcfe, 0x8(%rax) # imm = 0x98BADCFE movq -0x8(%rbp), %rax movl $0x10325476, 0xc(%rax) # imm = 0x10325476 movq -0x8(%rbp), %rax movl $0xc3d2e1f0, 0x10(%rax) # imm = 0xC3D2E1F0 popq %rbp retq nopw %cs:(%rax,%rax)
ma_SHA1Init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_8] mov dword ptr [rax], 67452301h mov rax, [rbp+var_8] mov dword ptr [rax+4], 0EFCDAB89h mov rax, [rbp+var_8] mov dword ptr [rax+8], 98BADCFEh mov rax, [rbp+var_8] mov dword ptr [rax+0Ch], 10325476h mov rax, [rbp+var_8] mov dword ptr [rax+10h], 0C3D2E1F0h pop rbp retn
_DWORD * ma_SHA1Init(_DWORD *a1) { _DWORD *result; // rax a1[6] = 0; a1[5] = 0; *a1 = 1732584193; a1[1] = -271733879; a1[2] = -1732584194; a1[3] = 271733878; result = a1; a1[4] = -1009589776; return result; }
ma_SHA1Init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x67452301 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0xefcdab89 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],0x98badcfe MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],0x10325476 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],0xc3d2e1f0 POP RBP RET
void ma_SHA1Init(int4 *param_1) { param_1[6] = 0; param_1[5] = 0; *param_1 = 0x67452301; param_1[1] = 0xefcdab89; param_1[2] = 0x98badcfe; param_1[3] = 0x10325476; param_1[4] = 0xc3d2e1f0; return; }
20,813
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O3
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %eax leaq 0xb6d21c(%rip), %rcx # 0xbff600 movq %rdi, (%rcx,%rax,8) orb $0x2, 0xd(%rdi) leaq 0xb7120d(%rip), %rdi # 0xc03600 movq %rbx, %rsi callq 0x93cf6 testb %al, %al je 0x9241b movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx leaq 0xb711f2(%rip), %rdi # 0xc03600 callq 0x93a96 movups 0x10(%rax), %xmm0 movups %xmm0, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
add_compiled_extra_collation: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov eax, [rdi] lea rcx, all_charsets mov [rcx+rax*8], rdi or byte ptr [rdi+0Dh], 2 lea rdi, charset_name_hash mov rsi, rbx call my_hash_insert test al, al jz short loc_9241B mov rsi, [rbx+10h] mov rdx, [rbx+18h] lea rdi, charset_name_hash call my_hash_search movups xmm0, xmmword ptr [rax+10h] movups xmmword ptr [rbx+10h], xmm0 loc_9241B: add rsp, 8 pop rbx pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax all_charsets[*a1] = a1; *((_BYTE *)a1 + 13) |= 2u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { result = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); *((_OWORD *)a1 + 1) = *(_OWORD *)(result + 16); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI] LEA RCX,[0xcff600] MOV qword ptr [RCX + RAX*0x8],RDI OR byte ptr [RDI + 0xd],0x2 LEA RDI,[0xd03600] MOV RSI,RBX CALL 0x00193cf6 TEST AL,AL JZ 0x0019241b MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] LEA RDI,[0xd03600] CALL 0x00193a96 MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM0 LAB_0019241b: ADD RSP,0x8 POP RBX POP RBP RET
void add_compiled_extra_collation(uint *param_1) { int8 uVar1; char cVar2; long lVar3; (&all_charsets)[*param_1] = param_1; *(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2; cVar2 = my_hash_insert(charset_name_hash,param_1); if (cVar2 != '\0') { lVar3 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); uVar1 = *(int8 *)(lVar3 + 0x18); *(int8 *)(param_1 + 4) = *(int8 *)(lVar3 + 0x10); *(int8 *)(param_1 + 6) = uVar1; } return; }
20,814
make_obj_error
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue make_obj_error(JSContext *ctx, JSValue obj, int err) { JSValue arr; if (JS_IsException(obj)) return obj; arr = JS_NewArray(ctx); if (JS_IsException(arr)) return JS_EXCEPTION; JS_DefinePropertyValueUint32(ctx, arr, 0, obj, JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, arr, 1, JS_NewInt32(ctx, err), JS_PROP_C_W_E); return arr; }
O0
c
make_obj_error: subq $0x88, %rsp movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rdi, 0x40(%rsp) movl %ecx, 0x3c(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x10390 cmpl $0x0, %eax je 0x1cfa7 movq 0x48(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x60(%rsp) jmp 0x1d098 movq 0x40(%rsp), %rdi callq 0x2a520 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x10390 cmpl $0x0, %eax je 0x1cff9 movl $0x0, 0x58(%rsp) movq $0x6, 0x60(%rsp) jmp 0x1d098 movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x48(%rsp), %r8 movq 0x50(%rsp), %r9 movq %rsp, %rax movl $0x7, (%rax) xorl %ecx, %ecx callq 0x37370 movq 0x40(%rsp), %rdi movl 0x3c(%rsp), %eax movq %rdi, 0x70(%rsp) movl %eax, 0x6c(%rsp) movl 0x6c(%rsp), %eax movl %eax, 0x78(%rsp) movq $0x0, 0x80(%rsp) movq 0x78(%rsp), %rcx movq 0x80(%rsp), %rax movq %rcx, 0x8(%rsp) movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x8(%rsp), %r8 movq 0x10(%rsp), %r9 movl $0x1, %ecx movl $0x7, (%rsp) callq 0x37370 movq 0x28(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rdx addq $0x88, %rsp retq nopw (%rax,%rax)
make_obj_error: sub rsp, 88h mov [rsp+88h+var_40], rsi mov [rsp+88h+var_38], rdx mov [rsp+88h+var_48], rdi mov [rsp+88h+var_4C], ecx mov rdi, [rsp+88h+var_40] mov rsi, [rsp+88h+var_38] call JS_IsException_0 cmp eax, 0 jz short loc_1CFA7 mov rax, [rsp+88h+var_40] mov [rsp+88h+var_30], rax mov rax, [rsp+88h+var_38] mov [rsp+88h+var_28], rax jmp loc_1D098 loc_1CFA7: mov rdi, [rsp+88h+var_48] call JS_NewArray mov [rsp+88h+var_70], rax mov [rsp+88h+var_68], rdx mov rax, [rsp+88h+var_70] mov [rsp+88h+var_60], rax mov rax, [rsp+88h+var_68] mov [rsp+88h+var_58], rax mov rdi, [rsp+88h+var_60] mov rsi, [rsp+88h+var_58] call JS_IsException_0 cmp eax, 0 jz short loc_1CFF9 mov dword ptr [rsp+88h+var_30], 0 mov [rsp+88h+var_28], 6 jmp loc_1D098 loc_1CFF9: mov rdi, [rsp+88h+var_48] mov rsi, [rsp+88h+var_60] mov rdx, [rsp+88h+var_58] mov r8, [rsp+88h+var_40] mov r9, [rsp+88h+var_38] mov rax, rsp mov dword ptr [rax], 7 xor ecx, ecx call JS_DefinePropertyValueUint32 mov rdi, [rsp+88h+var_48] mov eax, [rsp+88h+var_4C] mov [rsp+88h+var_18], rdi mov [rsp+88h+var_1C], eax mov eax, [rsp+88h+var_1C] mov dword ptr [rsp+88h+var_10], eax mov [rsp+88h+var_8], 0 mov rcx, [rsp+88h+var_10] mov rax, [rsp+88h+var_8] mov [rsp+88h+var_80], rcx mov [rsp+88h+var_78], rax mov rsi, [rsp+88h+var_60] mov rdx, [rsp+88h+var_58] mov r8, [rsp+88h+var_80] mov r9, [rsp+88h+var_78] mov ecx, 1 mov [rsp+88h+var_88], 7 call JS_DefinePropertyValueUint32 mov rax, [rsp+88h+var_60] mov [rsp+88h+var_30], rax mov rax, [rsp+88h+var_58] mov [rsp+88h+var_28], rax loc_1D098: mov rax, [rsp+88h+var_30] mov rdx, [rsp+88h+var_28] add rsp, 88h retn
long long make_obj_error(long long a1, long long a2, int a3, int a4) { int v4; // edx long long v6; // [rsp+18h] [rbp-70h] int v7; // [rsp+30h] [rbp-58h] long long v10; // [rsp+58h] [rbp-30h] if ( JS_IsException_0(a2, a3) ) return a2; v6 = JS_NewArray(a1); v7 = v4; if ( JS_IsException_0(v6, v4) ) { LODWORD(v10) = 0; } else { JS_DefinePropertyValueUint32(a1, v6, v7, 0, a2, a3, 7); JS_DefinePropertyValueUint32(a1, v6, v7, 1, a4, 0, 7); return v6; } return v10; }
make_obj_error: SUB RSP,0x88 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ECX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00110390 CMP EAX,0x0 JZ 0x0011cfa7 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x60],RAX JMP 0x0011d098 LAB_0011cfa7: MOV RDI,qword ptr [RSP + 0x40] CALL 0x0012a520 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00110390 CMP EAX,0x0 JZ 0x0011cff9 MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x6 JMP 0x0011d098 LAB_0011cff9: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x48] MOV R9,qword ptr [RSP + 0x50] MOV RAX,RSP MOV dword ptr [RAX],0x7 XOR ECX,ECX CALL 0x00137370 MOV RDI,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RSP + 0x3c] MOV qword ptr [RSP + 0x70],RDI MOV dword ptr [RSP + 0x6c],EAX MOV EAX,dword ptr [RSP + 0x6c] MOV dword ptr [RSP + 0x78],EAX MOV qword ptr [RSP + 0x80],0x0 MOV RCX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x8] MOV R9,qword ptr [RSP + 0x10] MOV ECX,0x1 MOV dword ptr [RSP],0x7 CALL 0x00137370 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x60],RAX LAB_0011d098: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x88 RET
int1 [16] make_obj_error(int8 param_1,int8 param_2,int8 param_3,int4 param_4) { int iVar1; int1 auVar2 [16]; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; iVar1 = JS_IsException(param_2,param_3); if (iVar1 == 0) { auVar2 = JS_NewArray(param_1); local_28 = auVar2._8_8_; auVar2._0_8_ = auVar2._0_8_; iVar1 = JS_IsException(auVar2._0_8_,local_28); if (iVar1 == 0) { JS_DefinePropertyValueUint32(param_1,auVar2._0_8_,local_28,0,param_2,param_3,7); JS_DefinePropertyValueUint32(param_1,auVar2._0_8_,local_28,1,CONCAT44(uStack_c,param_4),0,7); local_30 = auVar2._0_4_; uStack_2c = auVar2._4_4_; } else { local_30 = 0; local_28 = 6; } } else { local_30 = (int4)param_2; uStack_2c = (int4)((ulong)param_2 >> 0x20); local_28 = param_3; } auVar2._4_4_ = uStack_2c; auVar2._0_4_ = local_30; auVar2._8_8_ = local_28; return auVar2; }
20,815
make_obj_error
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue make_obj_error(JSContext *ctx, JSValue obj, int err) { JSValue arr; if (JS_IsException(obj)) return obj; arr = JS_NewArray(ctx); if (JS_IsException(arr)) return JS_EXCEPTION; JS_DefinePropertyValueUint32(ctx, arr, 0, obj, JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, arr, 1, JS_NewInt32(ctx, err), JS_PROP_C_W_E); return arr; }
O2
c
make_obj_error: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 cmpl $0x6, %ebx jne 0x15800 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx jmp 0x1586c movl %ecx, %ebp movq %rdi, %r13 callq 0x1b2bb movq %rdx, %r15 cmpl $0x6, %r15d jne 0x1581d pushq $0x6 popq %rbx xorl %r14d, %r14d xorl %ecx, %ecx jmp 0x1586c movq %rax, %r12 pushq $0x7 popq %rax movl %eax, (%rsp) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx xorl %ecx, %ecx movq %r14, %r8 movq %rbx, %r9 callq 0x20972 movl %ebp, %r8d pushq $0x7 popq %rax movl %eax, (%rsp) pushq $0x1 popq %rcx movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx xorl %r9d, %r9d callq 0x20972 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movq %r12, %r14 movq %r15, %rbx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
make_obj_error: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi cmp ebx, 6 jnz short loc_15800 mov rcx, 0FFFFFFFF00000000h and rcx, r14 jmp short loc_1586C loc_15800: mov ebp, ecx mov r13, rdi call JS_NewArray mov r15, rdx cmp r15d, 6 jnz short loc_1581D push 6 pop rbx xor r14d, r14d xor ecx, ecx jmp short loc_1586C loc_1581D: mov r12, rax push 7 pop rax mov [rsp+38h+var_38], eax mov rdi, r13 mov rsi, r12 mov rdx, r15 xor ecx, ecx mov r8, r14 mov r9, rbx call JS_DefinePropertyValueUint32 mov r8d, ebp push 7 pop rax mov [rsp+38h+var_38], eax push 1 pop rcx mov rdi, r13 mov rsi, r12 mov rdx, r15 xor r9d, r9d call JS_DefinePropertyValueUint32 mov rcx, 0FFFFFFFF00000000h and rcx, r12 mov r14, r12 mov rbx, r15 loc_1586C: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long make_obj_error(long long a1, long long a2, int a3, int a4) { unsigned int v5; // r14d unsigned long long v6; // rcx long long v8; // rax int v9; // edx int v10; // r15d long long v11; // r12 v5 = a2; if ( a3 == 6 ) { v6 = a2 & 0xFFFFFFFF00000000LL; } else { v8 = JS_NewArray(a1); v10 = v9; if ( v9 == 6 ) { v5 = 0; v6 = 0LL; } else { v11 = v8; JS_DefinePropertyValueUint32(a1, v8, v9, 0, a2, a3, 7); JS_DefinePropertyValueUint32(a1, v11, v10, 1, a4, 0, 7); v6 = v11 & 0xFFFFFFFF00000000LL; v5 = v11; } } return v6 | v5; }
make_obj_error: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI CMP EBX,0x6 JNZ 0x00115800 MOV RCX,-0x100000000 AND RCX,R14 JMP 0x0011586c LAB_00115800: MOV EBP,ECX MOV R13,RDI CALL 0x0011b2bb MOV R15,RDX CMP R15D,0x6 JNZ 0x0011581d PUSH 0x6 POP RBX XOR R14D,R14D XOR ECX,ECX JMP 0x0011586c LAB_0011581d: MOV R12,RAX PUSH 0x7 POP RAX MOV dword ptr [RSP],EAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 XOR ECX,ECX MOV R8,R14 MOV R9,RBX CALL 0x00120972 MOV R8D,EBP PUSH 0x7 POP RAX MOV dword ptr [RSP],EAX PUSH 0x1 POP RCX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 XOR R9D,R9D CALL 0x00120972 MOV RCX,-0x100000000 AND RCX,R12 MOV R14,R12 MOV RBX,R15 LAB_0011586c: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] make_obj_error(int8 param_1,ulong param_2,int8 param_3,int4 param_4) { int8 in_RAX; int4 uVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar1; auVar3._8_8_ = param_3; auVar3._0_8_ = param_2; uVar2 = (int4)((ulong)in_RAX >> 0x20); if ((int)param_3 == 6) { param_2 = param_2 & 0xffffffff00000000; } else { auVar3 = JS_NewArray(); uVar1 = auVar3._0_8_; if (auVar3._8_4_ == 6) { auVar3 = ZEXT816(6) << 0x40; param_2 = 0; } else { JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,0,param_2,param_3,CONCAT44(uVar2,7)); JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,1,param_4,0,7); param_2 = uVar1 & 0xffffffff00000000; } } auVar4._0_8_ = auVar3._0_8_ & 0xffffffff | param_2; auVar4._8_8_ = auVar3._8_8_; return auVar4; }
20,816
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O0
c
my_numcells_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x5648d movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xa1, %eax jl 0x56448 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xdf, %eax jg 0x56448 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x56488 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0x5646e movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x56486 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x56488 jmp 0x56408 movq -0x20(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_numcells_sjis: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_20], 0 loc_56408: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_5648D mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0A1h jl short loc_56448 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0DFh jg short loc_56448 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_56488 loc_56448: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 7Fh jle short loc_5646E mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short loc_56486 loc_5646E: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_56486: jmp short $+2 loc_56488: jmp loc_56408 loc_5648D: mov rax, [rbp+var_20] pop rbp retn
long long my_numcells_sjis(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long v5; // [rsp+10h] [rbp-20h] v5 = 0LL; while ( (unsigned long long)a2 < a3 ) { if ( *a2 < 0xA1u || *a2 > 0xDFu ) { if ( *a2 <= 0x7Fu ) { ++v5; ++a2; } else { v5 += 2LL; a2 += 2; } } else { ++v5; ++a2; } } return v5; }
my_numcells_sjis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x20],0x0 LAB_00156408: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0015648d MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xa1 JL 0x00156448 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xdf JG 0x00156448 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00156488 LAB_00156448: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JLE 0x0015646e MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x00156486 LAB_0015646e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00156486: JMP 0x00156488 LAB_00156488: JMP 0x00156408 LAB_0015648d: MOV RAX,qword ptr [RBP + -0x20] POP RBP RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { byte *local_30; long local_28; local_28 = 0; local_30 = param_2; while (local_30 < param_3) { if ((*local_30 < 0xa1) || (0xdf < *local_30)) { if (*local_30 < 0x80) { local_28 = local_28 + 1; local_30 = local_30 + 1; } else { local_28 = local_28 + 2; local_30 = local_30 + 2; } } else { local_28 = local_28 + 1; local_30 = local_30 + 1; } } return local_28; }
20,817
find_group_name
bluesky950520[P]quickjs/libregexp.c
static int find_group_name(REParseState *s, const char *name) { const char *p, *buf_end; size_t len, name_len; int capture_index; p = (char *)s->group_names.buf; if (!p) return -1; buf_end = (char *)s->group_names.buf + s->group_names.size; name_len = strlen(name); capture_index = 1; while (p < buf_end) { len = strlen(p); if (len == name_len && memcmp(name, p, name_len) == 0) return capture_index; p += len + 1; capture_index++; } return -1; }
O1
c
find_group_name: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x70(%rdi), %r15 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %r15, %r15 je 0x97621 movq %rsi, %r14 movq 0x78(%rdi), %rbp movq %rsi, %rdi callq 0xe240 testq %rbp, %rbp jle 0x97621 movq %rax, %r12 addq %r15, %rbp movl $0x1, %ebx movq %r15, %rdi callq 0xe240 movq %rax, %r13 cmpq %r12, %rax jne 0x9760f movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0xe6a0 testl %eax, %eax je 0x97621 addq %r13, %r15 incq %r15 incl %ebx cmpq %rbp, %r15 jb 0x975ed movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
find_group_name: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, [rdi+70h] mov ebx, 0FFFFFFFFh test r15, r15 jz short loc_97621 mov r14, rsi mov rbp, [rdi+78h] mov rdi, rsi call _strlen test rbp, rbp jle short loc_97621 mov r12, rax add rbp, r15 mov ebx, 1 loc_975ED: mov rdi, r15 call _strlen mov r13, rax cmp rax, r12 jnz short loc_9760F mov rdi, r14 mov rsi, r15 mov rdx, r12 call _bcmp test eax, eax jz short loc_97621 loc_9760F: add r15, r13 inc r15 inc ebx cmp r15, rbp jb short loc_975ED mov ebx, 0FFFFFFFFh loc_97621: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long find_group_name(long long a1, long long a2) { unsigned long long v2; // r15 unsigned int i; // ebx long long v4; // rbp long long v5; // rax long long v6; // r12 unsigned long long v7; // rbp long long v8; // rcx long long v9; // r13 v2 = *(_QWORD *)(a1 + 112); i = -1; if ( v2 ) { v4 = *(_QWORD *)(a1 + 120); v5 = strlen(a2); if ( v4 > 0 ) { v6 = v5; v7 = v2 + v4; for ( i = 1; ; ++i ) { v9 = strlen(v2); if ( v9 == v6 && !(unsigned int)bcmp(a2, v2, v6, v8) ) break; v2 += v9 + 1; if ( v2 >= v7 ) return (unsigned int)-1; } } } return i; }
find_group_name: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI + 0x70] MOV EBX,0xffffffff TEST R15,R15 JZ 0x00197621 MOV R14,RSI MOV RBP,qword ptr [RDI + 0x78] MOV RDI,RSI CALL 0x0010e240 TEST RBP,RBP JLE 0x00197621 MOV R12,RAX ADD RBP,R15 MOV EBX,0x1 LAB_001975ed: MOV RDI,R15 CALL 0x0010e240 MOV R13,RAX CMP RAX,R12 JNZ 0x0019760f MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x0010e6a0 TEST EAX,EAX JZ 0x00197621 LAB_0019760f: ADD R15,R13 INC R15 INC EBX CMP R15,RBP JC 0x001975ed MOV EBX,0xffffffff LAB_00197621: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int find_group_name(long param_1,char *param_2) { long lVar1; int iVar2; size_t __n; size_t sVar3; int iVar4; char *pcVar5; char *__s; __s = *(char **)(param_1 + 0x70); if (__s != (char *)0x0) { lVar1 = *(long *)(param_1 + 0x78); __n = strlen(param_2); if (0 < lVar1) { pcVar5 = __s + lVar1; iVar4 = 1; do { sVar3 = strlen(__s); if ((sVar3 == __n) && (iVar2 = bcmp(param_2,__s,__n), iVar2 == 0)) { return iVar4; } __s = __s + sVar3 + 1; iVar4 = iVar4 + 1; } while (__s < pcVar5); } } return -1; }
20,818
mthd_my_read_query_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int mthd_my_read_query_result(MYSQL *mysql) { uchar *pos; ulong field_count; MYSQL_DATA *fields; ulong length; const uchar *end; uchar has_metadata; my_bool can_local_infile= (mysql->options.extension) && (mysql->extension->auto_local_infile != WAIT_FOR_QUERY); if (mysql->options.extension && mysql->extension->auto_local_infile == ACCEPT_FILE_REQUEST) mysql->extension->auto_local_infile= WAIT_FOR_QUERY; if ((length = ma_net_safe_read(mysql)) == packet_error) { return(1); } free_old_query(mysql); /* Free old result */ get_info: pos=(uchar*) mysql->net.read_pos; end= pos + length; if ((field_count= net_field_length(&pos)) == 0) return ma_read_ok_packet(mysql, pos, length); if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */ { int error=mysql_handle_local_infile(mysql, (char *)pos, can_local_infile); if ((length=ma_net_safe_read(mysql)) == packet_error || error) return(-1); goto get_info; /* Get info packet */ } has_metadata= 1; if (ma_supports_cache_metadata(mysql)) { assert(mysql->fields == NULL); if (pos < end) { has_metadata= *pos; pos++; } } if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT)) mysql->server_status|= SERVER_STATUS_IN_TRANS; if (has_metadata) { if (!(fields= mysql->methods->db_read_rows(mysql, (MYSQL_FIELD *) 0, ma_result_set_rows(mysql)))) return (-1); if (!(mysql->fields= unpack_fields(mysql, fields, &mysql->field_alloc, (uint) field_count, 1))) return (-1); } else { /* Read EOF, to get the status and warning count. */ if ((length= ma_net_safe_read(mysql)) == packet_error) { return -1; } pos= (uchar *) mysql->net.read_pos; if (length != 5 || pos[0] != 0xfe) { return -1; } mysql->warning_count= uint2korr(pos + 1); mysql->server_status= uint2korr(pos + 3); } mysql->status=MYSQL_STATUS_GET_RESULT; mysql->field_count=field_count; return(0); }
O0
c
mthd_my_read_query_result: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq $0x0, 0x480(%rcx) movb %al, -0x41(%rbp) je 0x1c677 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movsbl 0x78(%rax), %eax cmpl $0x1, %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x3a(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x1c6b3 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movsbl 0x78(%rax), %eax cmpl $0x2, %eax jne 0x1c6b3 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movb $0x1, 0x78(%rax) movq -0x10(%rbp), %rdi callq 0x12f60 movq %rax, -0x30(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x1c6d6 movl $0x1, -0x4(%rbp) jmp 0x1c922 movq -0x10(%rbp), %rdi callq 0x1b410 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x18(%rbp), %rdi callq 0x13580 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x1c723 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x1b990 movl %eax, -0x4(%rbp) jmp 0x1c922 cmpq $-0x1, -0x20(%rbp) jne 0x1c76f movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movsbl -0x3a(%rbp), %edx callq 0x2a9f0 movsbl %al, %eax movl %eax, -0x40(%rbp) movq -0x10(%rbp), %rdi callq 0x12f60 movq %rax, -0x30(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x1c75e cmpl $0x0, -0x40(%rbp) je 0x1c76a movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1c922 jmp 0x1c6df movb $0x1, -0x39(%rbp) movq -0x10(%rbp), %rdi callq 0x1c930 cmpb $0x0, %al je 0x1c7a1 movq -0x18(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x1c79f movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x39(%rbp) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x1c7a1 movq -0x10(%rbp), %rax movl 0x380(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x1c7c6 movq -0x10(%rbp), %rax movl 0x380(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x380(%rax) cmpb $0x0, -0x39(%rbp) je 0x1c860 movq -0x10(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rdi callq 0x1c960 movq -0x58(%rbp), %rdi movl %eax, %edx movq -0x50(%rbp), %rax xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0x1c81a movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1c922 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx addq $0x300, %rdx # imm = 0x300 movq -0x20(%rbp), %rax movl %eax, %ecx movl $0x1, %r8d callq 0x16fb0 movq -0x10(%rbp), %rcx movq %rax, 0x2f8(%rcx) cmpq $0x0, %rax jne 0x1c85b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1c922 jmp 0x1c8fd movq -0x10(%rbp), %rdi callq 0x12f60 movq %rax, -0x30(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x1c883 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1c922 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x5, -0x30(%rbp) jne 0x1c8a4 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfe, %eax je 0x1c8ad movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x1c922 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x388(%rax) movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl 0x4(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x380(%rax) movq -0x10(%rbp), %rax movl $0x1, 0x488(%rax) movq -0x20(%rbp), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x37c(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
mthd_my_read_query_result: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov rcx, [rbp+var_10] xor eax, eax cmp qword ptr [rcx+480h], 0 mov [rbp+var_41], al jz short loc_1C677 mov rax, [rbp+var_10] mov rax, [rax+4F0h] movsx eax, byte ptr [rax+78h] cmp eax, 1 setnz al mov [rbp+var_41], al loc_1C677: mov al, [rbp+var_41] and al, 1 movzx eax, al mov [rbp+var_3A], al mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_1C6B3 mov rax, [rbp+var_10] mov rax, [rax+4F0h] movsx eax, byte ptr [rax+78h] cmp eax, 2 jnz short loc_1C6B3 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov byte ptr [rax+78h], 1 loc_1C6B3: mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_30], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_1C6D6 mov [rbp+var_4], 1 jmp loc_1C922 loc_1C6D6: mov rdi, [rbp+var_10] call free_old_query loc_1C6DF: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_18], rax mov rax, [rbp+var_18] add rax, [rbp+var_30] mov [rbp+var_38], rax lea rdi, [rbp+var_18] call net_field_length mov [rbp+var_20], rax cmp rax, 0 jnz short loc_1C723 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] call ma_read_ok_packet mov [rbp+var_4], eax jmp loc_1C922 loc_1C723: cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_1C76F mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] movsx edx, [rbp+var_3A] call mysql_handle_local_infile movsx eax, al mov [rbp+var_40], eax mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_30], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jz short loc_1C75E cmp [rbp+var_40], 0 jz short loc_1C76A loc_1C75E: mov [rbp+var_4], 0FFFFFFFFh jmp loc_1C922 loc_1C76A: jmp loc_1C6DF loc_1C76F: mov [rbp+var_39], 1 mov rdi, [rbp+var_10] call ma_supports_cache_metadata cmp al, 0 jz short loc_1C7A1 mov rax, [rbp+var_18] cmp rax, [rbp+var_38] jnb short loc_1C79F mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_39], al mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax loc_1C79F: jmp short $+2 loc_1C7A1: mov rax, [rbp+var_10] mov eax, [rax+380h] and eax, 2 cmp eax, 0 jnz short loc_1C7C6 mov rax, [rbp+var_10] mov ecx, [rax+380h] or ecx, 1 mov [rax+380h], ecx loc_1C7C6: cmp [rbp+var_39], 0 jz loc_1C860 mov rax, [rbp+var_10] mov rax, [rax+4D0h] mov rax, [rax+28h] mov [rbp+var_50], rax mov rax, [rbp+var_10] mov [rbp+var_58], rax mov rdi, [rbp+var_10] call ma_result_set_rows mov rdi, [rbp+var_58] mov edx, eax mov rax, [rbp+var_50] xor ecx, ecx mov esi, ecx call rax mov [rbp+var_28], rax cmp rax, 0 jnz short loc_1C81A mov [rbp+var_4], 0FFFFFFFFh jmp loc_1C922 loc_1C81A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] add rdx, 300h mov rax, [rbp+var_20] mov ecx, eax mov r8d, 1 call unpack_fields mov rcx, [rbp+var_10] mov [rcx+2F8h], rax cmp rax, 0 jnz short loc_1C85B mov [rbp+var_4], 0FFFFFFFFh jmp loc_1C922 loc_1C85B: jmp loc_1C8FD loc_1C860: mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_30], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_1C883 mov [rbp+var_4], 0FFFFFFFFh jmp loc_1C922 loc_1C883: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_18], rax cmp [rbp+var_30], 5 jnz short loc_1C8A4 mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FEh jz short loc_1C8AD loc_1C8A4: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_1C922 loc_1C8AD: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+388h], ecx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+4] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+380h], ecx loc_1C8FD: mov rax, [rbp+var_10] mov dword ptr [rax+488h], 1 mov rax, [rbp+var_20] mov ecx, eax mov rax, [rbp+var_10] mov [rax+37Ch], ecx mov [rbp+var_4], 0 loc_1C922: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mthd_my_read_query_result(long long a1, unsigned __int8 *a2, long long a3, long long a4, int a5, int a6) { long long v6; // rdx long long v7; // rcx int v8; // r8d int v9; // r9d long long v10; // rdx long long v11; // rcx int v12; // r8d int v13; // r9d unsigned int v14; // eax long long v15; // rax long long v17; // [rsp+8h] [rbp-58h] long long ( *v18)(long long, _QWORD, _QWORD); // [rsp+10h] [rbp-50h] bool v19; // [rsp+1Fh] [rbp-41h] int v20; // [rsp+20h] [rbp-40h] char v21; // [rsp+27h] [rbp-39h] unsigned __int8 *v22; // [rsp+28h] [rbp-38h] long long v23; // [rsp+30h] [rbp-30h] long long v24; // [rsp+30h] [rbp-30h] _QWORD *v25; // [rsp+38h] [rbp-28h] long long v26; // [rsp+40h] [rbp-20h] unsigned __int8 *v27; // [rsp+48h] [rbp-18h] BYREF long long v28; // [rsp+50h] [rbp-10h] v28 = a1; v19 = 0; if ( *(_QWORD *)(a1 + 1152) ) v19 = *(_BYTE *)(*(_QWORD *)(v28 + 1264) + 120LL) != 1; if ( *(_QWORD *)(v28 + 1152) && *(_BYTE *)(*(_QWORD *)(v28 + 1264) + 120LL) == 2 ) *(_BYTE *)(*(_QWORD *)(v28 + 1264) + 120LL) = 1; v23 = ma_net_safe_read(v28, (long long)a2, a3, a1, a5, a6); if ( v23 != 0xFFFFFFFFLL ) { free_old_query(v28); while ( 1 ) { v27 = *(unsigned __int8 **)(v28 + 32); v22 = &v27[v23]; v26 = net_field_length(&v27); if ( !v26 ) return (unsigned int)ma_read_ok_packet(v28, v27, v23); if ( v26 != -1 ) break; a2 = v27; v20 = (char)mysql_handle_local_infile(v28, v27, v19); v23 = ma_net_safe_read(v28, (long long)a2, v6, v7, v8, v9); if ( v23 == 0xFFFFFFFFLL || v20 ) return (unsigned int)-1; } v21 = 1; if ( (unsigned __int8)ma_supports_cache_metadata(v28) && v27 < v22 ) v21 = *v27++; if ( (*(_DWORD *)(v28 + 896) & 2) == 0 ) { v11 = *(_DWORD *)(v28 + 896) | 1u; *(_DWORD *)(v28 + 896) = v11; } if ( v21 ) { v18 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v28 + 1232) + 40LL); v17 = v28; v14 = ma_result_set_rows(v28); v25 = (_QWORD *)v18(v17, 0LL, v14); if ( !v25 ) return (unsigned int)-1; v15 = unpack_fields(v28, v25, v28 + 768, v26, 1); *(_QWORD *)(v28 + 760) = v15; if ( !v15 ) return (unsigned int)-1; } else { v24 = ma_net_safe_read(v28, (long long)a2, v10, v11, v12, v13); if ( v24 == 0xFFFFFFFFLL ) return (unsigned int)-1; v27 = *(unsigned __int8 **)(v28 + 32); if ( v24 != 5 || *v27 != 254 ) return (unsigned int)-1; *(_DWORD *)(v28 + 904) = (unsigned __int16)((v27[2] << 8) + v27[1]); *(_DWORD *)(v28 + 896) = (unsigned __int16)((v27[4] << 8) + v27[3]); } *(_DWORD *)(v28 + 1160) = 1; *(_DWORD *)(v28 + 892) = v26; return 0; } return 1; }
mthd_my_read_query_result: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP qword ptr [RCX + 0x480],0x0 MOV byte ptr [RBP + -0x41],AL JZ 0x0011c677 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOVSX EAX,byte ptr [RAX + 0x78] CMP EAX,0x1 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_0011c677: MOV AL,byte ptr [RBP + -0x41] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x3a],AL MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0011c6b3 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOVSX EAX,byte ptr [RAX + 0x78] CMP EAX,0x2 JNZ 0x0011c6b3 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV byte ptr [RAX + 0x78],0x1 LAB_0011c6b3: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00112f60 MOV qword ptr [RBP + -0x30],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0011c6d6 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011c922 LAB_0011c6d6: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011b410 LAB_0011c6df: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x18] CALL 0x00113580 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0011c723 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] CALL 0x0011b990 MOV dword ptr [RBP + -0x4],EAX JMP 0x0011c922 LAB_0011c723: CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x0011c76f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOVSX EDX,byte ptr [RBP + -0x3a] CALL 0x0012a9f0 MOVSX EAX,AL MOV dword ptr [RBP + -0x40],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00112f60 MOV qword ptr [RBP + -0x30],RAX MOV ECX,0xffffffff CMP RAX,RCX JZ 0x0011c75e CMP dword ptr [RBP + -0x40],0x0 JZ 0x0011c76a LAB_0011c75e: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011c922 LAB_0011c76a: JMP 0x0011c6df LAB_0011c76f: MOV byte ptr [RBP + -0x39],0x1 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011c930 CMP AL,0x0 JZ 0x0011c7a1 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0011c79f MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x39],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX LAB_0011c79f: JMP 0x0011c7a1 LAB_0011c7a1: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x380] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0011c7c6 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x380] OR ECX,0x1 MOV dword ptr [RAX + 0x380],ECX LAB_0011c7c6: CMP byte ptr [RBP + -0x39],0x0 JZ 0x0011c860 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011c960 MOV RDI,qword ptr [RBP + -0x58] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x50] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x0011c81a MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011c922 LAB_0011c81a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x300 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,EAX MOV R8D,0x1 CALL 0x00116fb0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x2f8],RAX CMP RAX,0x0 JNZ 0x0011c85b MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011c922 LAB_0011c85b: JMP 0x0011c8fd LAB_0011c860: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00112f60 MOV qword ptr [RBP + -0x30],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0011c883 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011c922 LAB_0011c883: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x30],0x5 JNZ 0x0011c8a4 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JZ 0x0011c8ad LAB_0011c8a4: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0011c922 LAB_0011c8ad: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x388],ECX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x4] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x380],ECX LAB_0011c8fd: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x37c],ECX MOV dword ptr [RBP + -0x4],0x0 LAB_0011c922: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 mthd_my_read_query_result(long param_1) { code *pcVar1; char cVar2; int4 uVar3; char *pcVar4; ulong uVar5; long lVar6; bool local_49; char local_41; long local_38; char *local_20; long local_18; int4 local_c; local_49 = false; if (*(long *)(param_1 + 0x480) != 0) { local_49 = *(char *)(*(long *)(param_1 + 0x4f0) + 0x78) != '\x01'; } if ((*(long *)(param_1 + 0x480) != 0) && (*(char *)(*(long *)(param_1 + 0x4f0) + 0x78) == '\x02')) { *(int1 *)(*(long *)(param_1 + 0x4f0) + 0x78) = 1; } local_18 = param_1; local_38 = ma_net_safe_read(param_1); if (local_38 == 0xffffffff) { local_c = 1; } else { free_old_query(local_18); do { local_20 = *(char **)(local_18 + 0x20); pcVar4 = local_20 + local_38; uVar5 = net_field_length(&local_20); if (uVar5 == 0) { uVar3 = ma_read_ok_packet(local_18,local_20,local_38); return uVar3; } if (uVar5 != 0xffffffffffffffff) { local_41 = '\x01'; cVar2 = ma_supports_cache_metadata(local_18); lVar6 = local_18; if ((cVar2 != '\0') && (local_20 < pcVar4)) { local_41 = *local_20; local_20 = local_20 + 1; } if ((*(uint *)(local_18 + 0x380) & 2) == 0) { *(uint *)(local_18 + 0x380) = *(uint *)(local_18 + 0x380) | 1; } if (local_41 == '\0') { lVar6 = ma_net_safe_read(local_18); if (lVar6 == 0xffffffff) { return 0xffffffff; } pcVar4 = *(char **)(local_18 + 0x20); if ((lVar6 != 5) || (*pcVar4 != -2)) { return 0xffffffff; } *(uint *)(local_18 + 0x388) = (uint)(byte)pcVar4[1] + (uint)(byte)pcVar4[2] * 0x100 & 0xffff; *(uint *)(local_18 + 0x380) = (uint)(byte)pcVar4[3] + (uint)(byte)pcVar4[4] * 0x100 & 0xffff; } else { pcVar1 = *(code **)(*(long *)(local_18 + 0x4d0) + 0x28); uVar3 = ma_result_set_rows(local_18); lVar6 = (*pcVar1)(lVar6,0,uVar3); if (lVar6 == 0) { return 0xffffffff; } lVar6 = unpack_fields(local_18,lVar6,local_18 + 0x300,uVar5 & 0xffffffff,1); *(long *)(local_18 + 0x2f8) = lVar6; if (lVar6 == 0) { return 0xffffffff; } } *(int4 *)(local_18 + 0x488) = 1; *(int *)(local_18 + 0x37c) = (int)uVar5; return 0; } cVar2 = mysql_handle_local_infile(local_18,local_20,local_49); local_38 = ma_net_safe_read(local_18); } while ((local_38 != 0xffffffff) && (cVar2 == '\0')); local_c = 0xffffffff; } return local_c; }
20,819
minja::Parser::unterminated(minja::TemplateToken const&) const
monkey531[P]llama/common/minja.hpp
std::runtime_error unterminated(const TemplateToken & token) const { return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O3
cpp
minja::Parser::unterminated(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x9a1de leaq 0x5927a(%rip), %rcx # 0xf2956 movl $0xd, %r8d movq %r12, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9b0 leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x99716 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x9971e movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x48(%rsp), %rdi callq 0x78200 movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x50(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r12, %rcx je 0x99769 movq 0x38(%rsp), %rdi movq 0x48(%rsp), %rsi cmpq %rdi, %rax jbe 0x9978c leaq 0x58(%rsp), %r9 movl $0xf, %edi cmpq %r9, %rsi je 0x99787 movq 0x58(%rsp), %rdi cmpq %rdi, %rax jbe 0x99798 leaq 0x28(%rsp), %rdi callq 0x1b260 jmp 0x997a6 leaq 0x48(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9b0 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x997ca movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x997d0 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1be10 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99815 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99830 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8c0 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x99847 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8c0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99862 movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8c0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99897 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x99897 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x998b7 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x998b7 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x998d3 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x998d3 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x998ee movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8c0 movq %rbx, %rdi callq 0x1bf90
_ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE: push r15; int push r14; int push r12; int push rbx; int sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rcx, aUnterminated; "Unterminated " mov r8d, 0Dh mov rdi, r12 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r12, [rsp+0A8h+var_70] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h; int cmp rdx, rcx jz short loc_99716 mov [rsp+0A8h+var_80], rdx mov rdx, [rcx] mov [rsp+0A8h+var_70], rdx jmp short loc_9971E loc_99716: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_9971E: mov rdx, [rax+8] mov qword ptr [rsp+0A8h+var_78], rdx; int mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [r15]; int mov rdx, [r14+20h]; int lea rdi, [rsp+0A8h+var_60]; int call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) mov rcx, [rsp+0A8h+var_80] mov r8, qword ptr [rsp+0A8h+var_78] mov rdx, [rsp+0A8h+var_58] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r12 jz short loc_99769 mov rdi, [rsp+0A8h+var_70] loc_99769: mov rsi, qword ptr [rsp+0A8h+var_60] cmp rax, rdi jbe short loc_9978C lea r9, [rsp+0A8h+var_50] mov edi, 0Fh cmp rsi, r9 jz short loc_99787 mov rdi, [rsp+0A8h+var_50] loc_99787: cmp rax, rdi jbe short loc_99798 loc_9978C: lea rdi, [rsp+0A8h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_997A6 loc_99798: lea rdi, [rsp+0A8h+var_60] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_997A6: lea rdx, [rsp+0A8h+var_90] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_997CA mov [rsp+0A8h+var_A0], rsi mov rdx, [rcx] mov [rsp+0A8h+var_90], rdx jmp short loc_997D0 loc_997CA: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_997D0: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0A8h+var_98], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, [rsp+0A8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_99815 mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_99815: lea rax, [rsp+0A8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_99830 mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_99830: mov rdi, [rsp+0A8h+var_80]; void * cmp rdi, r12 jz short loc_99847 mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_99847: lea rax, [rsp+0A8h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_99862 mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_99862: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_99897 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_99897 mov rbx, rax loc_99897: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_998B7 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_998B7 mov rbx, rax loc_998B7: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_998D3 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_998D3 mov rbx, rax loc_998D3: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_998EE mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_998EE: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3) { long long v5; // rax __int128 *v6; // rcx unsigned long long v7; // rax unsigned long long v8; // rdi unsigned long long v9; // rdi void **v10; // rax __int128 *v11; // rcx void *v13[2]; // [rsp+8h] [rbp-A0h] BYREF __int128 v14; // [rsp+18h] [rbp-90h] BYREF void *v15; // [rsp+28h] [rbp-80h] BYREF int v16[2]; // [rsp+30h] [rbp-78h] __int128 v17; // [rsp+38h] [rbp-70h] BYREF int v18[2]; // [rsp+48h] [rbp-60h] BYREF long long v19; // [rsp+50h] [rbp-58h] _QWORD v20[2]; // [rsp+58h] [rbp-50h] BYREF void *v21[2]; // [rsp+68h] [rbp-40h] BYREF long long v22; // [rsp+78h] [rbp-30h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v21, *(unsigned int *)(a3 + 8)); v5 = std::string::replace(v21, 0LL, 0LL, "Unterminated ", 13LL); v15 = &v17; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v17 = *v6; } else { v15 = *(void **)v5; *(_QWORD *)&v17 = *(_QWORD *)v6; } *(_QWORD *)v16 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; minja::error_location_suffix((long long)v18, *(_QWORD *)a2, *(_QWORD *)(a3 + 32)); v7 = v19 + *(_QWORD *)v16; v8 = 15LL; if ( v15 != &v17 ) v8 = v17; if ( v7 <= v8 ) goto LABEL_10; v9 = 15LL; if ( *(_QWORD **)v18 != v20 ) v9 = v20[0]; if ( v7 <= v9 ) v10 = (void **)std::string::replace(v18, 0LL, 0LL, v15, *(_QWORD *)v16); else LABEL_10: v10 = (void **)std::string::_M_append(&v15, *(_QWORD *)v18, v19); v13[0] = &v14; v11 = (__int128 *)(v10 + 2); if ( *v10 == v10 + 2 ) { v14 = *v11; } else { v13[0] = *v10; *(_QWORD *)&v14 = *(_QWORD *)v11; } v13[1] = v10[1]; *v10 = v11; v10[1] = 0LL; *(_BYTE *)v11 = 0; std::runtime_error::runtime_error(this, v13); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); if ( *(_QWORD **)v18 != v20 ) operator delete(*(void **)v18, v20[0] + 1LL); if ( v15 != &v17 ) operator delete(v15, v17 + 1); if ( v21[0] != &v22 ) operator delete(v21[0], v22 + 1); return this; }
unterminated: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV ESI,dword ptr [RDX + 0x8] LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x0019a1de LAB_001996d5: LEA RCX,[0x1f2956] MOV R8D,0xd MOV RDI,R12 XOR ESI,ESI XOR EDX,EDX CALL 0x0011b9b0 LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00199716 MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0019971e LAB_00199716: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_0019971e: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R14 + 0x20] LAB_0019973d: LEA RDI,[RSP + 0x48] CALL 0x00178200 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x50] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R12 JZ 0x00199769 MOV RDI,qword ptr [RSP + 0x38] LAB_00199769: MOV RSI,qword ptr [RSP + 0x48] CMP RAX,RDI JBE 0x0019978c LEA R9,[RSP + 0x58] MOV EDI,0xf CMP RSI,R9 JZ 0x00199787 MOV RDI,qword ptr [RSP + 0x58] LAB_00199787: CMP RAX,RDI JBE 0x00199798 LAB_0019978c: LEA RDI,[RSP + 0x28] CALL 0x0011b260 JMP 0x001997a6 LAB_00199798: LEA RDI,[RSP + 0x48] XOR ESI,ESI XOR EDX,EDX CALL 0x0011b9b0 LAB_001997a6: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x001997ca MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x001997d0 LAB_001997ca: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_001997d0: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_001997ed: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0011be10 LAB_001997fa: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00199815 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8c0 LAB_00199815: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00199830 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b8c0 LAB_00199830: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x00199847 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b8c0 LAB_00199847: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00199862 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011b8c0 LAB_00199862: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Parser::unterminated(minja::TemplateToken const&) const */ TemplateToken * minja::Parser::unterminated(TemplateToken *param_1) { long *plVar1; int8 *puVar2; ulong *puVar3; long in_RDX; int8 *in_RSI; ulong uVar4; long *local_a0; int8 local_98; long local_90; int8 uStack_88; ulong *local_80; long local_78; ulong local_70; long lStack_68; ulong *local_60; long local_58; ulong local_50 [2]; long *local_40 [2]; long local_30 [2]; TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40); /* try { // try from 001996d5 to 001996ed has its CatchHandler @ 001998d0 */ plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1f2956); puVar3 = (ulong *)(plVar1 + 2); if ((ulong *)*plVar1 == puVar3) { local_70 = *puVar3; lStack_68 = plVar1[3]; local_80 = &local_70; } else { local_70 = *puVar3; local_80 = (ulong *)*plVar1; } local_78 = plVar1[1]; *plVar1 = (long)puVar3; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 0019973d to 00199746 has its CatchHandler @ 001998b4 */ error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20)); uVar4 = 0xf; if (local_80 != &local_70) { uVar4 = local_70; } if (uVar4 < (ulong)(local_58 + local_78)) { uVar4 = 0xf; if (local_60 != local_50) { uVar4 = local_50[0]; } if ((ulong)(local_58 + local_78) <= uVar4) { puVar2 = (int8 *) std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80); goto LAB_001997a6; } } /* try { // try from 0019978c to 001997a5 has its CatchHandler @ 00199894 */ puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60); LAB_001997a6: local_a0 = &local_90; plVar1 = puVar2 + 2; if ((long *)*puVar2 == plVar1) { local_90 = *plVar1; uStack_88 = puVar2[3]; } else { local_90 = *plVar1; local_a0 = (long *)*puVar2; } local_98 = puVar2[1]; *puVar2 = plVar1; puVar2[1] = 0; *(int1 *)plVar1 = 0; /* try { // try from 001997ed to 001997f9 has its CatchHandler @ 00199874 */ std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0); if (local_a0 != &local_90) { operator_delete(local_a0,local_90 + 1); } if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return param_1; }
20,820
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool)
monkey531[P]llama/common/json.hpp
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) { JSON_ASSERT(!keep_stack.empty()); // do not handle this value if we know it would be added to a discarded // container if (!keep_stack.back()) { return {false, nullptr}; } // create value auto value = BasicJsonType(std::forward<Value>(v)); // check callback const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); // do not handle this value if we just learnt it shall be discarded if (!keep) { return {false, nullptr}; } if (ref_stack.empty()) { root = std::move(value); return {true, & root}; } // skip this value if we already decided to skip the parent // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) if (!ref_stack.back()) { return {false, nullptr}; } // we now only expect arrays and objects JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); // array if (ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); return {true, & (ref_stack.back()->m_data.m_value.array->back())}; } // object JSON_ASSERT(ref_stack.back()->is_object()); // check if we should store an element for the current key JSON_ASSERT(!key_keep_stack.empty()); const bool store_element = key_keep_stack.back(); key_keep_stack.pop_back(); if (!store_element) { return {false, nullptr}; } JSON_ASSERT(object_element); *object_element = std::move(value); return {true, object_element}; }
O1
cpp
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq %rdi, %rbx movq 0x30(%rdi), %rax movl 0x38(%rdi), %ecx cmpq %rax, 0x20(%rdi) sete %dl testl %ecx, %ecx sete %dil andb %dl, %dil cmpb $0x1, %dil je 0x4c374 movl %ecx, %ecx movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000 leaq -0x1(%rcx), %rdx addq $0x3e, %rcx testq %rdx, %rdx cmovnsq %rdx, %rcx sarq $0x6, %rcx leaq (%rax,%rcx,8), %rax leaq 0x3f(%r15), %rcx andq %rdx, %rcx xorl %edi, %edi cmpq %r15, %rcx setbe %dil movq -0x8(%rax,%rdi,8), %rax btq %rdx, %rax jae 0x4c207 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r14 movaps %xmm0, (%r14) movq (%rsi), %rsi movq %r14, %rdi callq 0x4c40e movq %r14, %rdi movl $0x1, %esi callq 0x3dcd2 testb %bpl, %bpl jne 0x4c1b4 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x5, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x4c395 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) testb %al, %al je 0x4c348 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x4c211 movq -0x8(%rax), %rax testq %rax, %rax je 0x4c348 movzbl (%rax), %ecx cmpl $0x1, %ecx je 0x4c26b cmpl $0x2, %ecx jne 0x4c39a movq 0x8(%rax), %rdi leaq 0x10(%rsp), %rsi callq 0x3f2ea movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %r14 addq $-0x10, %r14 jmp 0x4c344 xorl %ebx, %ebx xorl %r14d, %r14d jmp 0x4c364 leaq 0x10(%rsp), %r14 movaps (%r14), %xmm0 leaq 0x30(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x3dcd2 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x3dcd2 movq (%rbx), %rdi movq %r15, %rsi callq 0x2a918 movq %r15, %rdi xorl %esi, %esi callq 0x3dcd2 movq %r15, %rdi callq 0x4ac3e movq (%rbx), %r14 jmp 0x4c344 movq 0x58(%rbx), %rax movl 0x60(%rbx), %ecx cmpq %rax, 0x48(%rbx) sete %dl testl %ecx, %ecx sete %sil andb %dl, %sil cmpb $0x1, %sil je 0x4c3a8 movl %ecx, %esi leaq -0x1(%rsi), %rcx movq %rsi, %rdx addq $0x3e, %rdx testq %rcx, %rcx cmovnsq %rcx, %rdx sarq $0x6, %rdx leaq (%rax,%rdx,8), %rdi leaq 0x3f(%r15), %rdx andq %rcx, %rdx xorl %r8d, %r8d cmpq %r15, %rdx setbe %r8b movl $0x1, %edx shlq %cl, %rdx andq -0x8(%rdi,%r8,8), %rdx subl $0x1, %esi movl %esi, 0x60(%rbx) jae 0x4c2dd movl $0x3f, 0x60(%rbx) addq $-0x8, %rax movq %rax, 0x58(%rbx) testq %rdx, %rdx je 0x4c348 cmpq $0x0, 0x70(%rbx) je 0x4c3c9 leaq 0x10(%rsp), %r14 movaps (%r14), %xmm0 leaq 0x20(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x3dcd2 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x3dcd2 movq 0x70(%rbx), %rdi movq %r15, %rsi callq 0x2a918 movq %r15, %rdi xorl %esi, %esi callq 0x3dcd2 movq %r15, %rdi callq 0x4ac3e movq 0x70(%rbx), %r14 movb $0x1, %bl jmp 0x4c34d xorl %ebx, %ebx xorl %r14d, %r14d leaq 0x10(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x3dcd2 movq %r15, %rdi callq 0x4ac3e movl %ebx, %eax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x6038c(%rip), %rdi # 0xac707 leaq 0x5eb3f(%rip), %rdx # 0xaaec1 leaq 0x6180a(%rip), %rcx # 0xadb93 movl $0x1c28, %esi # imm = 0x1C28 xorl %eax, %eax callq 0x18ad0 callq 0x18250 leaq 0x61806(%rip), %rcx # 0xadba7 movl $0x1c4b, %esi # imm = 0x1C4B jmp 0x4c3b4 leaq 0x61836(%rip), %rcx # 0xadbe5 movl $0x1c57, %esi # imm = 0x1C57 leaq 0x6034c(%rip), %rdi # 0xac707 leaq 0x5eaff(%rip), %rdx # 0xaaec1 xorl %eax, %eax callq 0x18ad0 leaq 0x60337(%rip), %rdi # 0xac707 leaq 0x5eaea(%rip), %rdx # 0xaaec1 leaq 0x6181f(%rip), %rcx # 0xadbfd movl $0x1c60, %esi # imm = 0x1C60 xorl %eax, %eax callq 0x18ad0 jmp 0x4c3ec movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3dcd2 movq %r14, %rdi callq 0x4ac3e movq %rbx, %rdi callq 0x18bb0
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b: push rbp push r15 push r14 push rbx sub rsp, 48h mov ebp, edx mov rbx, rdi mov rax, [rdi+30h] mov ecx, [rdi+38h] cmp [rdi+20h], rax setz dl test ecx, ecx setz dil and dil, dl cmp dil, 1 jz loc_4C374 mov ecx, ecx mov r15, 8000000000000000h lea rdx, [rcx-1] add rcx, 3Eh ; '>' test rdx, rdx cmovns rcx, rdx sar rcx, 6 lea rax, [rax+rcx*8] lea rcx, [r15+3Fh] and rcx, rdx xor edi, edi cmp rcx, r15 setbe dil mov rax, [rax+rdi*8-8] bt rax, rdx jnb loc_4C207 xorps xmm0, xmm0 lea r14, [rsp+68h+var_58] movaps xmmword ptr [r14], xmm0 mov rsi, [rsi] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) test bpl, bpl jnz short loc_4C1B4 mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+68h+var_5C], eax mov [rsp+68h+var_5D], 5 cmp qword ptr [rbx+90h], 0 jz loc_4C395 lea rdi, [rbx+80h] lea rsi, [rsp+68h+var_5C] lea rdx, [rsp+68h+var_5D] lea rcx, [rsp+68h+var_58] call qword ptr [rbx+98h] test al, al jz loc_4C348 loc_4C1B4: mov rax, [rbx+10h] cmp [rbx+8], rax jz short loc_4C211 mov rax, [rax-8] test rax, rax jz loc_4C348 movzx ecx, byte ptr [rax] cmp ecx, 1 jz loc_4C26B cmp ecx, 2 jnz loc_4C39A mov rdi, [rax+8] lea rsi, [rsp+68h+var_58] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) mov rax, [rbx+10h] mov rax, [rax-8] mov rax, [rax+8] mov r14, [rax+8] add r14, 0FFFFFFFFFFFFFFF0h jmp loc_4C344 loc_4C207: xor ebx, ebx xor r14d, r14d jmp loc_4C364 loc_4C211: lea r14, [rsp+68h+var_58] movaps xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_38] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx] jmp loc_4C344 loc_4C26B: mov rax, [rbx+58h] mov ecx, [rbx+60h] cmp [rbx+48h], rax setz dl test ecx, ecx setz sil and sil, dl cmp sil, 1 jz loc_4C3A8 mov esi, ecx lea rcx, [rsi-1] mov rdx, rsi add rdx, 3Eh ; '>' test rcx, rcx cmovns rdx, rcx sar rdx, 6 lea rdi, [rax+rdx*8] lea rdx, [r15+3Fh] and rdx, rcx xor r8d, r8d cmp rdx, r15 setbe r8b mov edx, 1 shl rdx, cl and rdx, [rdi+r8*8-8] sub esi, 1 mov [rbx+60h], esi jnb short loc_4C2DD mov dword ptr [rbx+60h], 3Fh ; '?' add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+58h], rax loc_4C2DD: test rdx, rdx jz short loc_4C348 cmp qword ptr [rbx+70h], 0 jz loc_4C3C9 lea r14, [rsp+68h+var_58] movaps xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_48] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx+70h] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx+70h] loc_4C344: mov bl, 1 jmp short loc_4C34D loc_4C348: xor ebx, ebx xor r14d, r14d loc_4C34D: lea r15, [rsp+68h+var_58] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_4C364: mov eax, ebx mov rdx, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_4C374: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1C28h xor eax, eax call _ggml_abort loc_4C395: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_4C39A: lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"... mov esi, 1C4Bh jmp short loc_4C3B4 loc_4C3A8: lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()" mov esi, 1C57h loc_4C3B4: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" xor eax, eax call _ggml_abort loc_4C3C9: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aObjectElement; "object_element" mov esi, 1C60h xor eax, eax call _ggml_abort jmp short $+2 loc_4C3EC: mov rbx, rax lea r14, [rsp+68h+var_58] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>( long long a1, _QWORD *a2, char a3) { unsigned int v4; // ebx long long v5; // rax unsigned int v6; // ecx signed long long v7; // rdx long long v8; // rcx long long v9; // rax long long v10; // rax unsigned __int8 *v11; // rax int v12; // ecx long long v13; // rax unsigned int v14; // ecx long long v15; // rsi long long v16; // rcx long long v17; // rdx long long v18; // rdx const char *v20; // rcx long long v21; // rsi long long v22; // rax char v23; // [rsp+Bh] [rbp-5Dh] BYREF int v24; // [rsp+Ch] [rbp-5Ch] BYREF __int128 v25; // [rsp+10h] [rbp-58h] BYREF __int128 v26; // [rsp+20h] [rbp-48h] BYREF _OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF v4 = a1; v5 = *(_QWORD *)(a1 + 48); v6 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7208LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); goto LABEL_28; } v7 = v6 - 1LL; v8 = v6 + 62LL; if ( v7 >= 0 ) v8 = v7; v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8); if ( _bittest64(&v9, v7) ) { v25 = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( &v25, *a2); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); if ( a3 ) { LABEL_8: v10 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v10 ) { v27[0] = v25; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); LOBYTE(v25) = 0; *((_QWORD *)&v25 + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(char **)a1, (char *)v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)v27); goto LABEL_23; } v11 = *(unsigned __int8 **)(v10 - 8); if ( v11 ) { v12 = *v11; if ( v12 != 1 ) { if ( v12 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( *((_QWORD *)v11 + 1), (long long)&v25); LABEL_23: LOBYTE(v4) = 1; LABEL_25: nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)&v25); return v4; } v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; v21 = 7243LL; goto LABEL_31; } v13 = *(_QWORD *)(a1 + 88); v14 = *(_DWORD *)(a1 + 96); if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 ) { v20 = "!key_keep_stack.empty()"; v21 = 7255LL; LABEL_31: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20); goto LABEL_32; } v15 = v14; v16 = v14 - 1LL; v17 = v15 + 62; if ( v16 >= 0 ) v17 = v16; v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16); *(_DWORD *)(a1 + 96) = v15 - 1; if ( !(_DWORD)v15 ) { *(_DWORD *)(a1 + 96) = 63; *(_QWORD *)(a1 + 88) = v13 - 8; } if ( v18 ) { if ( *(_QWORD *)(a1 + 112) ) { v26 = v25; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); LOBYTE(v25) = 0; *((_QWORD *)&v25 + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(char **)(a1 + 112), (char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)&v26); goto LABEL_23; } LABEL_32: v22 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7264LL, "GGML_ASSERT(%s) failed", "object_element"); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)&v25); _Unwind_Resume(v22); } } LABEL_24: v4 = 0; goto LABEL_25; } v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v23 = 5; if ( *(_QWORD *)(a1 + 144) ) { if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))( a1 + 128, &v24, &v23, &v25) ) goto LABEL_24; goto LABEL_8; } LABEL_28: std::__throw_bad_function_call(); } return 0; }
handle_value<unsigned_long&>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV EBP,EDX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x30] MOV ECX,dword ptr [RDI + 0x38] CMP qword ptr [RDI + 0x20],RAX SETZ DL TEST ECX,ECX SETZ DIL AND DIL,DL CMP DIL,0x1 JZ 0x0014c374 MOV ECX,ECX MOV R15,-0x8000000000000000 LEA RDX,[RCX + -0x1] ADD RCX,0x3e TEST RDX,RDX CMOVNS RCX,RDX SAR RCX,0x6 LEA RAX,[RAX + RCX*0x8] LEA RCX,[R15 + 0x3f] AND RCX,RDX XOR EDI,EDI CMP RCX,R15 SETBE DIL MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8] BT RAX,RDX JNC 0x0014c207 XORPS XMM0,XMM0 LEA R14,[RSP + 0x10] MOVAPS xmmword ptr [R14],XMM0 MOV RSI,qword ptr [RSI] MOV RDI,R14 CALL 0x0014c40e MOV RDI,R14 MOV ESI,0x1 CALL 0x0013dcd2 TEST BPL,BPL JNZ 0x0014c1b4 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x5 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0014c395 LEA RDI,[RBX + 0x80] LAB_0014c197: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] TEST AL,AL JZ 0x0014c348 LAB_0014c1b4: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x0014c211 MOV RAX,qword ptr [RAX + -0x8] TEST RAX,RAX JZ 0x0014c348 MOVZX ECX,byte ptr [RAX] CMP ECX,0x1 JZ 0x0014c26b CMP ECX,0x2 JNZ 0x0014c39a MOV RDI,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x10] CALL 0x0013f2ea LAB_0014c1ee: MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV R14,qword ptr [RAX + 0x8] ADD R14,-0x10 JMP 0x0014c344 LAB_0014c207: XOR EBX,EBX XOR R14D,R14D JMP 0x0014c364 LAB_0014c211: LEA R14,[RSP + 0x10] MOVAPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x30] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x0013dcd2 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x0013dcd2 MOV RDI,qword ptr [RBX] MOV RSI,R15 CALL 0x0012a918 MOV RDI,R15 XOR ESI,ESI CALL 0x0013dcd2 MOV RDI,R15 CALL 0x0014ac3e MOV R14,qword ptr [RBX] JMP 0x0014c344 LAB_0014c26b: MOV RAX,qword ptr [RBX + 0x58] MOV ECX,dword ptr [RBX + 0x60] CMP qword ptr [RBX + 0x48],RAX SETZ DL TEST ECX,ECX SETZ SIL AND SIL,DL CMP SIL,0x1 JZ 0x0014c3a8 MOV ESI,ECX LEA RCX,[RSI + -0x1] MOV RDX,RSI ADD RDX,0x3e TEST RCX,RCX CMOVNS RDX,RCX SAR RDX,0x6 LEA RDI,[RAX + RDX*0x8] LEA RDX,[R15 + 0x3f] AND RDX,RCX XOR R8D,R8D CMP RDX,R15 SETBE R8B MOV EDX,0x1 SHL RDX,CL AND RDX,qword ptr [RDI + R8*0x8 + -0x8] SUB ESI,0x1 MOV dword ptr [RBX + 0x60],ESI JNC 0x0014c2dd MOV dword ptr [RBX + 0x60],0x3f ADD RAX,-0x8 MOV qword ptr [RBX + 0x58],RAX LAB_0014c2dd: TEST RDX,RDX JZ 0x0014c348 CMP qword ptr [RBX + 0x70],0x0 JZ 0x0014c3c9 LEA R14,[RSP + 0x10] MOVAPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x20] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x0013dcd2 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x0013dcd2 MOV RDI,qword ptr [RBX + 0x70] MOV RSI,R15 CALL 0x0012a918 MOV RDI,R15 XOR ESI,ESI CALL 0x0013dcd2 MOV RDI,R15 CALL 0x0014ac3e MOV R14,qword ptr [RBX + 0x70] LAB_0014c344: MOV BL,0x1 JMP 0x0014c34d LAB_0014c348: XOR EBX,EBX XOR R14D,R14D LAB_0014c34d: LEA R15,[RSP + 0x10] MOV RDI,R15 XOR ESI,ESI CALL 0x0013dcd2 MOV RDI,R15 CALL 0x0014ac3e LAB_0014c364: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0014c374: LEA RDI,[0x1ac707] LEA RDX,[0x1aaec1] LEA RCX,[0x1adb93] MOV ESI,0x1c28 XOR EAX,EAX CALL 0x00118ad0 LAB_0014c395: CALL 0x00118250 LAB_0014c39a: LEA RCX,[0x1adba7] MOV ESI,0x1c4b JMP 0x0014c3b4 LAB_0014c3a8: LEA RCX,[0x1adbe5] MOV ESI,0x1c57 LAB_0014c3b4: LEA RDI,[0x1ac707] LEA RDX,[0x1aaec1] XOR EAX,EAX CALL 0x00118ad0 LAB_0014c3c9: LEA RDI,[0x1ac707] LEA RDX,[0x1aaec1] LEA RCX,[0x1adbfd] MOV ESI,0x1c60 XOR EAX,EAX CALL 0x00118ad0
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::handle_value<unsigned_long&> (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,ulong *param_1,bool param_2) { uint uVar1; char cVar2; ulong uVar3; char *pcVar4; ulong uVar5; int8 uVar6; bool bVar7; long lVar8; int1 auVar9 [16]; int1 local_5d; int4 local_5c; ulong local_58; int8 uStack_50; ulong local_48; int8 uStack_40; ulong local_38; int8 uStack_30; uVar1 = *(uint *)(this + 0x38); if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) & 1) == 0) { uVar5 = 0; lVar8 = 0; goto LAB_0014c364; } local_58 = 0; uStack_50 = 0; external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (&local_58,*param_1); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); if (param_2) { LAB_0014c1b4: if (*(long *)(this + 8) == *(long *)(this + 0x10)) { local_38 = local_58; uStack_30 = uStack_50; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); local_58 = local_58 & 0xffffffffffffff00; uStack_50 = 0; bVar7 = SUB81((data *)&local_38,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)this,(data *)&local_38); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_38); lVar8 = *(long *)this; } else { pcVar4 = *(char **)(*(long *)(this + 0x10) + -8); if (pcVar4 == (char *)0x0) goto LAB_0014c348; if (*pcVar4 == '\x01') { lVar8 = *(long *)(this + 0x58); uVar1 = *(uint *)(this + 0x60); if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) { pcVar4 = "!key_keep_stack.empty()"; uVar6 = 0x1c57; goto LAB_0014c3b4; } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8); *(uint *)(this + 0x60) = uVar1 - 1; if (uVar1 == 0) { *(int4 *)(this + 0x60) = 0x3f; *(long *)(this + 0x58) = lVar8 + -8; } if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0014c348; if (*(long *)(this + 0x70) == 0) { /* try { // try from 0014c3c9 to 0014c3e9 has its CatchHandler @ 0014c3ea */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 0x1c60,"GGML_ASSERT(%s) failed","object_element"); } local_48 = local_58; uStack_40 = uStack_50; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); local_58 = local_58 & 0xffffffffffffff00; uStack_50 = 0; bVar7 = SUB81((data *)&local_48,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(this + 0x70),(data *)&local_48); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_48); lVar8 = *(long *)(this + 0x70); } else { if (*pcVar4 != '\x02') { pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; uVar6 = 0x1c4b; LAB_0014c3b4: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", uVar6,"GGML_ASSERT(%s) failed",pcVar4); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(pcVar4 + 8),(basic_json *)&local_58); lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10; } } uVar5 = CONCAT71((int7)((ulong)this >> 8),1); } else { local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_5d = 5; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 0014c395 to 0014c3c8 has its CatchHandler @ 0014c3ec */ std::__throw_bad_function_call(); } /* try { // try from 0014c197 to 0014c1ed has its CatchHandler @ 0014c3ec */ cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58); if (cVar2 != '\0') goto LAB_0014c1b4; LAB_0014c348: uVar5 = 0; lVar8 = 0; } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_58,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_58); LAB_0014c364: auVar9._0_8_ = uVar5 & 0xffffffff; auVar9._8_8_ = lVar8; return auVar9; }
20,821
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool)
monkey531[P]llama/common/json.hpp
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) { JSON_ASSERT(!keep_stack.empty()); // do not handle this value if we know it would be added to a discarded // container if (!keep_stack.back()) { return {false, nullptr}; } // create value auto value = BasicJsonType(std::forward<Value>(v)); // check callback const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); // do not handle this value if we just learnt it shall be discarded if (!keep) { return {false, nullptr}; } if (ref_stack.empty()) { root = std::move(value); return {true, & root}; } // skip this value if we already decided to skip the parent // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) if (!ref_stack.back()) { return {false, nullptr}; } // we now only expect arrays and objects JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); // array if (ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); return {true, & (ref_stack.back()->m_data.m_value.array->back())}; } // object JSON_ASSERT(ref_stack.back()->is_object()); // check if we should store an element for the current key JSON_ASSERT(!key_keep_stack.empty()); const bool store_element = key_keep_stack.back(); key_keep_stack.pop_back(); if (!store_element) { return {false, nullptr}; } JSON_ASSERT(object_element); *object_element = std::move(value); return {true, object_element}; }
O3
cpp
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<unsigned long&>(unsigned long&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq 0x30(%rdi), %rax movl 0x38(%rdi), %ecx cmpq %rax, 0x20(%rdi) sete %dl testl %ecx, %ecx sete %sil andb %dl, %sil cmpb $0x1, %sil je 0x4aa73 movl %ecx, %ecx movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000 leaq -0x1(%rcx), %rdx addq $0x3e, %rcx testq %rdx, %rdx cmovnsq %rdx, %rcx sarq $0x6, %rcx leaq (%rax,%rcx,8), %rax leaq 0x3f(%r15), %rcx andq %rdx, %rcx xorl %esi, %esi cmpq %r15, %rcx setbe %sil movq -0x8(%rax,%rsi,8), %rax btq %rdx, %rax jae 0x4a906 movq %rdi, %rbx leaq 0x10(%rsp), %r14 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x3d0e4 movq %r14, %rdi movl $0x1, %esi callq 0x3d0e4 testb %bpl, %bpl jne 0x4a8b3 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x5, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x4aa94 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) testb %al, %al je 0x4aa47 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x4a910 movq -0x8(%rax), %rax testq %rax, %rax je 0x4aa47 movzbl (%rax), %ecx cmpl $0x1, %ecx je 0x4a96a cmpl $0x2, %ecx jne 0x4aa99 movq 0x8(%rax), %rdi leaq 0x10(%rsp), %rsi callq 0x3e770 movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %r14 addq $-0x10, %r14 jmp 0x4aa43 xorl %ebx, %ebx xorl %r14d, %r14d jmp 0x4aa63 leaq 0x10(%rsp), %r14 movups (%r14), %xmm0 leaq 0x30(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x3d0e4 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x3d0e4 movq (%rbx), %rdi movq %r15, %rsi callq 0x2a0d4 movq %r15, %rdi xorl %esi, %esi callq 0x3d0e4 movq %r15, %rdi callq 0x49cd2 movq (%rbx), %r14 jmp 0x4aa43 movq 0x58(%rbx), %rax movl 0x60(%rbx), %ecx cmpq %rax, 0x48(%rbx) sete %dl testl %ecx, %ecx sete %sil andb %dl, %sil cmpb $0x1, %sil je 0x4aaa7 movl %ecx, %esi leaq -0x1(%rsi), %rcx movq %rsi, %rdx addq $0x3e, %rdx testq %rcx, %rcx cmovnsq %rcx, %rdx sarq $0x6, %rdx leaq (%rax,%rdx,8), %rdi leaq 0x3f(%r15), %rdx andq %rcx, %rdx xorl %r8d, %r8d cmpq %r15, %rdx setbe %r8b movl $0x1, %edx shlq %cl, %rdx andq -0x8(%rdi,%r8,8), %rdx subl $0x1, %esi movl %esi, 0x60(%rbx) jae 0x4a9dc movl $0x3f, 0x60(%rbx) addq $-0x8, %rax movq %rax, 0x58(%rbx) testq %rdx, %rdx je 0x4aa47 cmpq $0x0, 0x70(%rbx) je 0x4aac8 leaq 0x10(%rsp), %r14 movups (%r14), %xmm0 leaq 0x20(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x3d0e4 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x3d0e4 movq 0x70(%rbx), %rdi movq %r15, %rsi callq 0x2a0d4 movq %r15, %rdi xorl %esi, %esi callq 0x3d0e4 movq %r15, %rdi callq 0x49cd2 movq 0x70(%rbx), %r14 movb $0x1, %bl jmp 0x4aa4c xorl %ebx, %ebx xorl %r14d, %r14d leaq 0x10(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x3d0e4 movq %r15, %rdi callq 0x49cd2 movl %ebx, %eax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x5ec7d(%rip), %rdi # 0xa96f7 leaq 0x5d430(%rip), %rdx # 0xa7eb1 leaq 0x600fb(%rip), %rcx # 0xaab83 movl $0x1c28, %esi # imm = 0x1C28 xorl %eax, %eax callq 0x18ad0 callq 0x18250 leaq 0x600f7(%rip), %rcx # 0xaab97 movl $0x1c4b, %esi # imm = 0x1C4B jmp 0x4aab3 leaq 0x60127(%rip), %rcx # 0xaabd5 movl $0x1c57, %esi # imm = 0x1C57 leaq 0x5ec3d(%rip), %rdi # 0xa96f7 leaq 0x5d3f0(%rip), %rdx # 0xa7eb1 xorl %eax, %eax callq 0x18ad0 leaq 0x5ec28(%rip), %rdi # 0xa96f7 leaq 0x5d3db(%rip), %rdx # 0xa7eb1 leaq 0x60110(%rip), %rcx # 0xaabed movl $0x1c60, %esi # imm = 0x1C60 xorl %eax, %eax callq 0x18ad0 jmp 0x4aaeb movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3d0e4 movq %r14, %rdi callq 0x49cd2 movq %rbx, %rdi callq 0x18bb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIDnEESt4pairIbPSF_EOT_b: push rbp push r15 push r14 push rbx sub rsp, 48h mov ebp, edx mov rax, [rdi+30h] mov ecx, [rdi+38h] cmp [rdi+20h], rax setz dl test ecx, ecx setz sil and sil, dl cmp sil, 1 jz loc_4AA73 mov ecx, ecx mov r15, 8000000000000000h lea rdx, [rcx-1] add rcx, 3Eh ; '>' test rdx, rdx cmovns rcx, rdx sar rcx, 6 lea rax, [rax+rcx*8] lea rcx, [r15+3Fh] and rcx, rdx xor esi, esi cmp rcx, r15 setbe sil mov rax, [rax+rsi*8-8] bt rax, rdx jnb loc_4A906 mov rbx, rdi lea r14, [rsp+68h+var_58] mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) test bpl, bpl jnz short loc_4A8B3 mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+68h+var_5C], eax mov [rsp+68h+var_5D], 5 cmp qword ptr [rbx+90h], 0 jz loc_4AA94 lea rdi, [rbx+80h] lea rsi, [rsp+68h+var_5C] lea rdx, [rsp+68h+var_5D] lea rcx, [rsp+68h+var_58] call qword ptr [rbx+98h] test al, al jz loc_4AA47 loc_4A8B3: mov rax, [rbx+10h] cmp [rbx+8], rax jz short loc_4A910 mov rax, [rax-8] test rax, rax jz loc_4AA47 movzx ecx, byte ptr [rax] cmp ecx, 1 jz loc_4A96A cmp ecx, 2 jnz loc_4AA99 mov rdi, [rax+8] lea rsi, [rsp+68h+var_58] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) mov rax, [rbx+10h] mov rax, [rax-8] mov rax, [rax+8] mov r14, [rax+8] add r14, 0FFFFFFFFFFFFFFF0h jmp loc_4AA43 loc_4A906: xor ebx, ebx xor r14d, r14d jmp loc_4AA63 loc_4A910: lea r14, [rsp+68h+var_58] movups xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_38] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx] jmp loc_4AA43 loc_4A96A: mov rax, [rbx+58h] mov ecx, [rbx+60h] cmp [rbx+48h], rax setz dl test ecx, ecx setz sil and sil, dl cmp sil, 1 jz loc_4AAA7 mov esi, ecx lea rcx, [rsi-1] mov rdx, rsi add rdx, 3Eh ; '>' test rcx, rcx cmovns rdx, rcx sar rdx, 6 lea rdi, [rax+rdx*8] lea rdx, [r15+3Fh] and rdx, rcx xor r8d, r8d cmp rdx, r15 setbe r8b mov edx, 1 shl rdx, cl and rdx, [rdi+r8*8-8] sub esi, 1 mov [rbx+60h], esi jnb short loc_4A9DC mov dword ptr [rbx+60h], 3Fh ; '?' add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+58h], rax loc_4A9DC: test rdx, rdx jz short loc_4AA47 cmp qword ptr [rbx+70h], 0 jz loc_4AAC8 lea r14, [rsp+68h+var_58] movups xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_48] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx+70h] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx+70h] loc_4AA43: mov bl, 1 jmp short loc_4AA4C loc_4AA47: xor ebx, ebx xor r14d, r14d loc_4AA4C: lea r15, [rsp+68h+var_58] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_4AA63: mov eax, ebx mov rdx, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_4AA73: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1C28h xor eax, eax call _ggml_abort loc_4AA94: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_4AA99: lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"... mov esi, 1C4Bh jmp short loc_4AAB3 loc_4AAA7: lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()" mov esi, 1C57h loc_4AAB3: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" xor eax, eax call _ggml_abort loc_4AAC8: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aObjectElement; "object_element" mov esi, 1C60h xor eax, eax call _ggml_abort jmp short $+2 loc_4AAEB: mov rbx, rax lea r14, [rsp+68h+var_58] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<decltype(nullptr)>( long long a1, long long a2, char a3) { long long v4; // rax unsigned int v5; // ecx signed long long v6; // rdx long long v7; // rcx long long v8; // rax unsigned int v9; // ebx long long v10; // rax unsigned __int8 *v11; // rax int v12; // ecx long long v13; // rax unsigned int v14; // ecx long long v15; // rsi long long v16; // rcx long long v17; // rdx long long v18; // rdx const char *v20; // rcx long long v21; // rsi long long v22; // rax char v23; // [rsp+Bh] [rbp-5Dh] BYREF int v24; // [rsp+Ch] [rbp-5Ch] BYREF __int128 v25; // [rsp+10h] [rbp-58h] BYREF __int128 v26; // [rsp+20h] [rbp-48h] BYREF _OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF v4 = *(_QWORD *)(a1 + 48); v5 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v4 && v5 == 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7208LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); goto LABEL_28; } v6 = v5 - 1LL; v7 = v5 + 62LL; if ( v6 >= 0 ) v7 = v6; v8 = *(_QWORD *)(v4 + 8 * (v7 >> 6) + 8LL * ((v6 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8); if ( _bittest64(&v8, v6) ) { v9 = a1; LOBYTE(v25) = 0; *((_QWORD *)&v25 + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); if ( a3 ) { LABEL_8: v10 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v10 ) { v27[0] = v25; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); LOBYTE(v25) = 0; *((_QWORD *)&v25 + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(char **)a1, (char *)v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)v27); goto LABEL_23; } v11 = *(unsigned __int8 **)(v10 - 8); if ( v11 ) { v12 = *v11; if ( v12 != 1 ) { if ( v12 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( *((_QWORD *)v11 + 1), (long long)&v25); LABEL_23: LOBYTE(v9) = 1; LABEL_25: nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)&v25); return v9; } v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; v21 = 7243LL; goto LABEL_31; } v13 = *(_QWORD *)(a1 + 88); v14 = *(_DWORD *)(a1 + 96); if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 ) { v20 = "!key_keep_stack.empty()"; v21 = 7255LL; LABEL_31: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20); goto LABEL_32; } v15 = v14; v16 = v14 - 1LL; v17 = v15 + 62; if ( v16 >= 0 ) v17 = v16; v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16); *(_DWORD *)(a1 + 96) = v15 - 1; if ( !(_DWORD)v15 ) { *(_DWORD *)(a1 + 96) = 63; *(_QWORD *)(a1 + 88) = v13 - 8; } if ( v18 ) { if ( *(_QWORD *)(a1 + 112) ) { v26 = v25; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); LOBYTE(v25) = 0; *((_QWORD *)&v25 + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(char **)(a1 + 112), (char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)&v26); goto LABEL_23; } LABEL_32: v22 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7264LL, "GGML_ASSERT(%s) failed", "object_element"); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)&v25); _Unwind_Resume(v22); } } LABEL_24: v9 = 0; goto LABEL_25; } v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v23 = 5; if ( *(_QWORD *)(a1 + 144) ) { if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))( a1 + 128, &v24, &v23, &v25) ) goto LABEL_24; goto LABEL_8; } LABEL_28: std::__throw_bad_function_call(); } return 0; }
handle_value<decltype(nullptr)>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV EBP,EDX MOV RAX,qword ptr [RDI + 0x30] MOV ECX,dword ptr [RDI + 0x38] CMP qword ptr [RDI + 0x20],RAX SETZ DL TEST ECX,ECX SETZ SIL AND SIL,DL CMP SIL,0x1 JZ 0x0014aa73 MOV ECX,ECX MOV R15,-0x8000000000000000 LEA RDX,[RCX + -0x1] ADD RCX,0x3e TEST RDX,RDX CMOVNS RCX,RDX SAR RCX,0x6 LEA RAX,[RAX + RCX*0x8] LEA RCX,[R15 + 0x3f] AND RCX,RDX XOR ESI,ESI CMP RCX,R15 SETBE SIL MOV RAX,qword ptr [RAX + RSI*0x8 + -0x8] BT RAX,RDX JNC 0x0014a906 MOV RBX,RDI LEA R14,[RSP + 0x10] MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d0e4 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d0e4 TEST BPL,BPL JNZ 0x0014a8b3 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x5 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0014aa94 LEA RDI,[RBX + 0x80] LAB_0014a896: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] TEST AL,AL JZ 0x0014aa47 LAB_0014a8b3: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x0014a910 MOV RAX,qword ptr [RAX + -0x8] TEST RAX,RAX JZ 0x0014aa47 MOVZX ECX,byte ptr [RAX] CMP ECX,0x1 JZ 0x0014a96a CMP ECX,0x2 JNZ 0x0014aa99 MOV RDI,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x10] CALL 0x0013e770 LAB_0014a8ed: MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV R14,qword ptr [RAX + 0x8] ADD R14,-0x10 JMP 0x0014aa43 LAB_0014a906: XOR EBX,EBX XOR R14D,R14D JMP 0x0014aa63 LAB_0014a910: LEA R14,[RSP + 0x10] MOVUPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x30] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x0013d0e4 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x0013d0e4 MOV RDI,qword ptr [RBX] MOV RSI,R15 CALL 0x0012a0d4 MOV RDI,R15 XOR ESI,ESI CALL 0x0013d0e4 MOV RDI,R15 CALL 0x00149cd2 MOV R14,qword ptr [RBX] JMP 0x0014aa43 LAB_0014a96a: MOV RAX,qword ptr [RBX + 0x58] MOV ECX,dword ptr [RBX + 0x60] CMP qword ptr [RBX + 0x48],RAX SETZ DL TEST ECX,ECX SETZ SIL AND SIL,DL CMP SIL,0x1 JZ 0x0014aaa7 MOV ESI,ECX LEA RCX,[RSI + -0x1] MOV RDX,RSI ADD RDX,0x3e TEST RCX,RCX CMOVNS RDX,RCX SAR RDX,0x6 LEA RDI,[RAX + RDX*0x8] LEA RDX,[R15 + 0x3f] AND RDX,RCX XOR R8D,R8D CMP RDX,R15 SETBE R8B MOV EDX,0x1 SHL RDX,CL AND RDX,qword ptr [RDI + R8*0x8 + -0x8] SUB ESI,0x1 MOV dword ptr [RBX + 0x60],ESI JNC 0x0014a9dc MOV dword ptr [RBX + 0x60],0x3f ADD RAX,-0x8 MOV qword ptr [RBX + 0x58],RAX LAB_0014a9dc: TEST RDX,RDX JZ 0x0014aa47 CMP qword ptr [RBX + 0x70],0x0 JZ 0x0014aac8 LEA R14,[RSP + 0x10] MOVUPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x20] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x0013d0e4 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x0013d0e4 MOV RDI,qword ptr [RBX + 0x70] MOV RSI,R15 CALL 0x0012a0d4 MOV RDI,R15 XOR ESI,ESI CALL 0x0013d0e4 MOV RDI,R15 CALL 0x00149cd2 MOV R14,qword ptr [RBX + 0x70] LAB_0014aa43: MOV BL,0x1 JMP 0x0014aa4c LAB_0014aa47: XOR EBX,EBX XOR R14D,R14D LAB_0014aa4c: LEA R15,[RSP + 0x10] MOV RDI,R15 XOR ESI,ESI CALL 0x0013d0e4 MOV RDI,R15 CALL 0x00149cd2 LAB_0014aa63: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0014aa73: LEA RDI,[0x1a96f7] LEA RDX,[0x1a7eb1] LEA RCX,[0x1aab83] MOV ESI,0x1c28 XOR EAX,EAX CALL 0x00118ad0 LAB_0014aa94: CALL 0x00118250 LAB_0014aa99: LEA RCX,[0x1aab97] MOV ESI,0x1c4b JMP 0x0014aab3 LAB_0014aaa7: LEA RCX,[0x1aabd5] MOV ESI,0x1c57 LAB_0014aab3: LEA RDI,[0x1a96f7] LEA RDX,[0x1a7eb1] XOR EAX,EAX CALL 0x00118ad0 LAB_0014aac8: LEA RDI,[0x1a96f7] LEA RDX,[0x1a7eb1] LEA RCX,[0x1aabed] MOV ESI,0x1c60 XOR EAX,EAX CALL 0x00118ad0
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::handle_value<decltype(nullptr)>(decltype(nullptr)&&, bool) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::handle_value<decltype(nullptr)> (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,_func_decltype_nullptr **param_1,bool param_2) { uint uVar1; char cVar2; ulong uVar3; char *pcVar4; ulong uVar5; int8 uVar6; bool bVar7; long lVar8; int1 auVar9 [16]; int1 local_5d; int4 local_5c; basic_json local_58; int7 uStack_57; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; uVar1 = *(uint *)(this + 0x38); if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) & 1) == 0) { uVar5 = 0; lVar8 = 0; goto LAB_0014aa63; } local_58 = (basic_json)0x0; uStack_50 = 0; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); if (param_2) { LAB_0014a8b3: if (*(long *)(this + 8) == *(long *)(this + 0x10)) { local_38 = CONCAT71(uStack_57,local_58); uStack_30 = uStack_50; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); local_58 = (basic_json)0x0; uStack_50 = 0; bVar7 = SUB81((data *)&local_38,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)this,(data *)&local_38); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_38); lVar8 = *(long *)this; } else { pcVar4 = *(char **)(*(long *)(this + 0x10) + -8); if (pcVar4 == (char *)0x0) goto LAB_0014aa47; if (*pcVar4 == '\x01') { lVar8 = *(long *)(this + 0x58); uVar1 = *(uint *)(this + 0x60); if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) { pcVar4 = "!key_keep_stack.empty()"; uVar6 = 0x1c57; goto LAB_0014aab3; } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8); *(uint *)(this + 0x60) = uVar1 - 1; if (uVar1 == 0) { *(int4 *)(this + 0x60) = 0x3f; *(long *)(this + 0x58) = lVar8 + -8; } if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0014aa47; if (*(long *)(this + 0x70) == 0) { /* try { // try from 0014aac8 to 0014aae8 has its CatchHandler @ 0014aae9 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 0x1c60,"GGML_ASSERT(%s) failed","object_element"); } local_48 = CONCAT71(uStack_57,local_58); uStack_40 = uStack_50; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); local_58 = (basic_json)0x0; uStack_50 = 0; bVar7 = SUB81((data *)&local_48,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(this + 0x70),(data *)&local_48); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_48); lVar8 = *(long *)(this + 0x70); } else { if (*pcVar4 != '\x02') { pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; uVar6 = 0x1c4b; LAB_0014aab3: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", uVar6,"GGML_ASSERT(%s) failed",pcVar4); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(pcVar4 + 8),&local_58); lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10; } } uVar5 = CONCAT71((int7)((ulong)this >> 8),1); } else { local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_5d = 5; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 0014aa94 to 0014aac7 has its CatchHandler @ 0014aaeb */ std::__throw_bad_function_call(); } /* try { // try from 0014a896 to 0014a8ec has its CatchHandler @ 0014aaeb */ cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58); if (cVar2 != '\0') goto LAB_0014a8b3; LAB_0014aa47: uVar5 = 0; lVar8 = 0; } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_58,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_58); LAB_0014aa63: auVar9._0_8_ = uVar5 & 0xffffffff; auVar9._8_8_ = lVar8; return auVar9; }
20,822
madb_get_os_character_set
eloqsql/libmariadb/libmariadb/ma_charset.c
const char *madb_get_os_character_set() { unsigned int i= 0; char *p= NULL; #ifdef _WIN32 char codepage[FN_REFLEN]; snprintf(codepage, FN_REFLEN, "%u", GetConsoleCP() ? GetConsoleCP() : GetACP()); p= codepage; #elif defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE) if (setlocale(LC_CTYPE, "")) p= nl_langinfo(CODESET); #endif if (!p) return MADB_DEFAULT_CHARSET_NAME; while (MADB_OS_CHARSET[i].identifier) { if (MADB_OS_CHARSET[i].supported > MADB_CS_UNSUPPORTED && strcasecmp(MADB_OS_CHARSET[i].identifier, p) == 0) return MADB_OS_CHARSET[i].charset; i++; } return MADB_DEFAULT_CHARSET_NAME; }
O0
c
madb_get_os_character_set: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x0, -0xc(%rbp) movq $0x0, -0x18(%rbp) xorl %edi, %edi leaq 0x7716(%rip), %rsi # 0x4b726 callq 0x133a0 cmpq $0x0, %rax je 0x44029 movl $0xe, %edi callq 0x13410 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x44040 leaq 0x82ac(%rip), %rax # 0x4c2e3 movq %rax, -0x8(%rbp) jmp 0x440d1 jmp 0x44042 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1b022(%rip), %rax # 0x5f070 imulq $0x28, %rcx, %rcx addq %rcx, %rax cmpq $0x0, (%rax) je 0x440c6 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1b009(%rip), %rax # 0x5f070 imulq $0x28, %rcx, %rcx addq %rcx, %rax movzbl 0x20(%rax), %eax cmpl $0x0, %eax jle 0x440b8 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1afed(%rip), %rax # 0x5f070 imulq $0x28, %rcx, %rcx addq %rcx, %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi callq 0x13480 cmpl $0x0, %eax jne 0x440b8 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x1afc9(%rip), %rax # 0x5f070 imulq $0x28, %rcx, %rcx addq %rcx, %rax movq 0x10(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x440d1 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x44042 leaq 0x8216(%rip), %rax # 0x4c2e3 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
madb_get_os_character_set: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], 0 mov [rbp+var_18], 0 xor edi, edi lea rsi, aExecuteTestWit+29h; "" call _setlocale cmp rax, 0 jz short loc_44029 mov edi, 0Eh call _nl_langinfo mov [rbp+var_18], rax loc_44029: cmp [rbp+var_18], 0 jnz short loc_44040 lea rax, aLatin1; "latin1" mov [rbp+var_8], rax jmp loc_440D1 loc_44040: jmp short $+2 loc_44042: mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx cmp qword ptr [rax], 0 jz short loc_440C6 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx movzx eax, byte ptr [rax+20h] cmp eax, 0 jle short loc_440B8 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx mov rdi, [rax] mov rsi, [rbp+var_18] call _strcasecmp cmp eax, 0 jnz short loc_440B8 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx mov rax, [rax+10h] mov [rbp+var_8], rax jmp short loc_440D1 loc_440B8: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp loc_44042 loc_440C6: lea rax, aLatin1; "latin1" mov [rbp+var_8], rax loc_440D1: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
const char *madb_get_os_character_set() { long long v1; // [rsp+8h] [rbp-18h] unsigned int v2; // [rsp+14h] [rbp-Ch] v2 = 0; v1 = 0LL; if ( setlocale(0LL, "") ) v1 = nl_langinfo(14LL); if ( !v1 ) return "latin1"; while ( *(&MADB_OS_CHARSET + 5 * v2) ) { if ( *((_BYTE *)&MADB_OS_CHARSET + 40 * v2 + 32) && !(unsigned int)strcasecmp(*(&MADB_OS_CHARSET + 5 * v2), v1) ) return (const char *)*(&MADB_OS_CHARSET + 5 * v2 + 2); ++v2; } return "latin1"; }
madb_get_os_character_set: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],0x0 MOV qword ptr [RBP + -0x18],0x0 XOR EDI,EDI LEA RSI,[0x14b726] CALL 0x001133a0 CMP RAX,0x0 JZ 0x00144029 MOV EDI,0xe CALL 0x00113410 MOV qword ptr [RBP + -0x18],RAX LAB_00144029: CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00144040 LEA RAX,[0x14c2e3] MOV qword ptr [RBP + -0x8],RAX JMP 0x001440d1 LAB_00144040: JMP 0x00144042 LAB_00144042: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x15f070] IMUL RCX,RCX,0x28 ADD RAX,RCX CMP qword ptr [RAX],0x0 JZ 0x001440c6 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x15f070] IMUL RCX,RCX,0x28 ADD RAX,RCX MOVZX EAX,byte ptr [RAX + 0x20] CMP EAX,0x0 JLE 0x001440b8 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x15f070] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00113480 CMP EAX,0x0 JNZ 0x001440b8 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x15f070] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001440d1 LAB_001440b8: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00144042 LAB_001440c6: LEA RAX,[0x14c2e3] MOV qword ptr [RBP + -0x8],RAX LAB_001440d1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
char * madb_get_os_character_set(void) { int iVar1; char *pcVar2; char *local_20; uint local_14; char *local_10; local_14 = 0; local_20 = (char *)0x0; pcVar2 = setlocale(0,""); if (pcVar2 != (char *)0x0) { local_20 = nl_langinfo(0xe); } if (local_20 != (char *)0x0) { while (*(long *)(MADB_OS_CHARSET + (ulong)local_14 * 0x28) != 0) { if ((MADB_OS_CHARSET[(ulong)local_14 * 0x28 + 0x20] != '\0') && (iVar1 = strcasecmp(*(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28),local_20), iVar1 == 0)) { return *(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28 + 0x10); } local_14 = local_14 + 1; } } local_10 = "latin1"; return local_10; }
20,823
minja::Parser::parseLogicalOr()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseLogicalOr() { auto left = parseLogicalAnd(); if (!left) throw std::runtime_error("Expected left side of 'logical or' expression"); static std::regex or_tok(R"(or\b)"); auto location = get_location(); while (!consumeToken(or_tok).empty()) { auto right = parseLogicalAnd(); if (!right) throw std::runtime_error("Expected right side of 'or' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::Or); } return left; }
O3
cpp
minja::Parser::parseLogicalOr(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x6b4b0 cmpq $0x0, (%rbx) je 0x6b1c7 leaq 0x7df3c(%rip), %rax # 0xe8f98 movb (%rax), %al testb %al, %al je 0x6b1f9 movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) testq %rax, %rax je 0x6b091 movq 0x7cf0d(%rip), %rcx # 0xe7f90 cmpb $0x0, (%rcx) je 0x6b08d incl 0x8(%rax) jmp 0x6b091 lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x20(%rsp), %rcx movq %rax, 0x10(%rcx) movq %rsp, %r13 leaq 0x7bcec(%rip), %r12 # 0xe6d98 addq $0x10, %r12 movq %r13, %rdi movq %r14, %rsi leaq 0x7debb(%rip), %rdx # 0xe8f78 movl $0x1, %ecx callq 0x5f158 movq (%rsp), %rdi movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x6b0e7 movq 0x10(%rsp), %rsi incq %rsi callq 0x197b0 testq %r15, %r15 je 0x6b172 movq %r13, %rdi movq %r14, %rsi callq 0x6b4b0 cmpq $0x0, (%rsp) je 0x6b193 movl $0x58, %edi callq 0x197a0 movq %rax, %rbp movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbp) movq %r12, (%rbp) movq %rbp, %r15 addq $0x10, %r15 movq %r15, %rdi leaq 0x20(%rsp), %rsi movq %rbx, %rdx movq %r13, %rcx movl $0xf, %r8d callq 0x77632 movq %r15, (%rbx) movq 0x8(%rbx), %rdi movq %rbp, 0x8(%rbx) testq %rdi, %rdi je 0x6b15a callq 0x33e7e movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x6b0b0 callq 0x33e7e jmp 0x6b0b0 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x6b181 callq 0x33e7e movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x193b0 movq %rax, %r15 leaq 0x4a0de(%rip), %rsi # 0xb5285 movq %rax, %rdi callq 0x192c0 movq 0x7ce3a(%rip), %rsi # 0xe7ff0 movq 0x7cdab(%rip), %rdx # 0xe7f68 movq %r15, %rdi callq 0x19da0 jmp 0x6b1f9 movl $0x10, %edi callq 0x193b0 movq %rax, %r15 leaq 0x4a077(%rip), %rsi # 0xb5252 movq %rax, %rdi callq 0x192c0 movq 0x7ce06(%rip), %rsi # 0xe7ff0 movq 0x7cd77(%rip), %rdx # 0xe7f68 movq %r15, %rdi callq 0x19da0 leaq 0x7dd98(%rip), %rdi # 0xe8f98 callq 0x19e70 testl %eax, %eax je 0x6b066 leaq 0x7dd64(%rip), %rdi # 0xe8f78 leaq 0x4a065(%rip), %rsi # 0xb5280 movl $0x10, %edx callq 0x5ecc2 leaq -0xc502(%rip), %rdi # 0x5ed2a leaq 0x7dd45(%rip), %rsi # 0xe8f78 leaq 0x7d5ce(%rip), %rdx # 0xe8808 callq 0x19680 leaq 0x7dd52(%rip), %rdi # 0xe8f98 callq 0x194c0 jmp 0x6b066 movq %rax, %r14 leaq 0x7dd3e(%rip), %rdi # 0xe8f98 callq 0x194b0 jmp 0x6b2aa movq %rax, %r14 jmp 0x6b2aa movq %rax, %r14 movq %r15, %rdi callq 0x19570 jmp 0x6b2aa jmp 0x6b284 movq %rax, %r14 movq %r15, %rdi callq 0x19570 jmp 0x6b287 jmp 0x6b298 movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x6b29b callq 0x33e7e jmp 0x6b29b movq %rax, %r14 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x6b2aa callq 0x33e7e movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x6b2b8 callq 0x33e7e movq %r14, %rdi callq 0x19e10
_ZN5minja6Parser14parseLogicalOrEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void) cmp qword ptr [rbx], 0 jz loc_6B1C7 lea rax, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalOr(void)::or_tok mov al, [rax] test al, al jz loc_6B1F9 loc_6B066: mov rax, [r14] mov [rsp+68h+var_48], rax mov rax, [r14+8] mov [rsp+68h+var_40], rax test rax, rax jz short loc_6B091 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_6B08D inc dword ptr [rax+8] jmp short loc_6B091 loc_6B08D: lock inc dword ptr [rax+8] loc_6B091: mov rax, [r14+20h] sub rax, [r14+10h] lea rcx, [rsp+68h+var_48] mov [rcx+10h], rax mov r13, rsp lea r12, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> add r12, 10h loc_6B0B0: mov rdi, r13 mov rsi, r14 lea rdx, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, [rsp+68h+var_68]; void * mov r15, [rsp+68h+var_60] lea rax, [rsp+68h+var_58] cmp rdi, rax jz short loc_6B0E7 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6B0E7: test r15, r15 jz loc_6B172 mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void) cmp [rsp+68h+var_68], 0 jz loc_6B193 mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov rbp, rax mov rax, 100000001h mov [rbp+8], rax mov [rbp+0], r12 mov r15, rbp add r15, 10h mov rdi, r15 lea rsi, [rsp+68h+var_48] mov rdx, rbx mov rcx, r13 mov r8d, 0Fh call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbx], r15 mov rdi, [rbx+8] mov [rbx+8], rbp test rdi, rdi jz short loc_6B15A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6B15A: mov rdi, [rsp+68h+var_60] test rdi, rdi jz loc_6B0B0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_6B0B0 loc_6B172: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_6B181 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6B181: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6B193: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS; "Expected right side of 'or' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_6B1F9 loc_6B1C7: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi; "Expected left side of 'logical or' expr"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_6B1F9: lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_6B066 lea rdi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok lea rsi, aOrB; "or\\b" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_6B066 mov r14, rax lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_6B2AA mov r14, rax jmp short loc_6B2AA mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6B2AA jmp short loc_6B284 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6B287 jmp short loc_6B298 loc_6B284: mov r14, rax loc_6B287: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_6B29B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_6B29B loc_6B298: mov r14, rax loc_6B29B: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_6B2AA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6B2AA: mov rdi, [rbx+8] test rdi, rdi jz short loc_6B2B8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6B2B8: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalOr(volatile signed __int32 **this, long long *a2) { volatile signed __int32 *v3; // rax volatile signed __int32 *v4; // r15 volatile signed __int32 *v5; // rbp volatile signed __int32 *v6; // rdi std::runtime_error *v8; // r15 std::runtime_error *exception; // r15 void *v10; // [rsp+0h] [rbp-68h] BYREF volatile signed __int32 *v11; // [rsp+8h] [rbp-60h] long long v12; // [rsp+10h] [rbp-58h] BYREF long long v13; // [rsp+20h] [rbp-48h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-40h] long long v15; // [rsp+30h] [rbp-38h] minja::Parser::parseLogicalAnd((minja::Parser *)this); if ( !*this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical or' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], "or\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]); } v13 = *a2; v3 = (volatile signed __int32 *)a2[1]; v14 = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v3 + 2); else _InterlockedIncrement(v3 + 2); } v15 = a2[4] - a2[2]; while ( 1 ) { minja::Parser::consumeToken( (long long)&v10, (long long)a2, (long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], 1u); v4 = v11; if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( !v4 ) break; minja::Parser::parseLogicalAnd((minja::Parser *)&v10); if ( !v10 ) { v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v8, "Expected right side of 'or' expression"); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v5 = (volatile signed __int32 *)operator new(0x58uLL); *((_QWORD *)v5 + 1) = 0x100000001LL; *(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> + 2; minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v13, this, &v10, 15LL); *this = v5 + 4; v6 = this[1]; this[1] = v5; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); } if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return (minja::Parser *)this; }
parseLogicalOr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RSI MOV RBX,RDI CALL 0x0016b4b0 CMP qword ptr [RBX],0x0 JZ 0x0016b1c7 LEA RAX,[0x1e8f98] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0016b1f9 LAB_0016b066: MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x0016b091 MOV RCX,qword ptr [0x001e7f90] CMP byte ptr [RCX],0x0 JZ 0x0016b08d INC dword ptr [RAX + 0x8] JMP 0x0016b091 LAB_0016b08d: INC.LOCK dword ptr [RAX + 0x8] LAB_0016b091: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA RCX,[RSP + 0x20] MOV qword ptr [RCX + 0x10],RAX MOV R13,RSP LEA R12,[0x1e6d98] ADD R12,0x10 LAB_0016b0b0: MOV RDI,R13 MOV RSI,R14 LEA RDX,[0x1e8f78] MOV ECX,0x1 CALL 0x0015f158 MOV RDI,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0016b0e7 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001197b0 LAB_0016b0e7: TEST R15,R15 JZ 0x0016b172 LAB_0016b0f0: MOV RDI,R13 MOV RSI,R14 CALL 0x0016b4b0 CMP qword ptr [RSP],0x0 JZ 0x0016b193 LAB_0016b106: MOV EDI,0x58 CALL 0x001197a0 LAB_0016b110: MOV RBP,RAX MOV RAX,0x100000001 MOV qword ptr [RBP + 0x8],RAX MOV qword ptr [RBP],R12 MOV R15,RBP ADD R15,0x10 MOV RDI,R15 LEA RSI,[RSP + 0x20] MOV RDX,RBX MOV RCX,R13 MOV R8D,0xf CALL 0x00177632 MOV qword ptr [RBX],R15 MOV RDI,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP TEST RDI,RDI JZ 0x0016b15a CALL 0x00133e7e LAB_0016b15a: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0016b0b0 CALL 0x00133e7e JMP 0x0016b0b0 LAB_0016b172: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0016b181 CALL 0x00133e7e LAB_0016b181: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016b193: MOV EDI,0x10 CALL 0x001193b0 MOV R15,RAX LAB_0016b1a0: LEA RSI,[0x1b5285] MOV RDI,RAX CALL 0x001192c0 LAB_0016b1af: MOV RSI,qword ptr [0x001e7ff0] MOV RDX,qword ptr [0x001e7f68] MOV RDI,R15 CALL 0x00119da0 LAB_0016b1c7: MOV EDI,0x10 CALL 0x001193b0 MOV R15,RAX LAB_0016b1d4: LEA RSI,[0x1b5252] MOV RDI,RAX CALL 0x001192c0 LAB_0016b1e3: MOV RSI,qword ptr [0x001e7ff0] MOV RDX,qword ptr [0x001e7f68] MOV RDI,R15 CALL 0x00119da0 LAB_0016b1f9: LEA RDI,[0x1e8f98] CALL 0x00119e70 TEST EAX,EAX JZ 0x0016b066 LAB_0016b20d: LEA RDI,[0x1e8f78] LEA RSI,[0x1b5280] MOV EDX,0x10 CALL 0x0015ecc2 LAB_0016b225: LEA RDI,[0x15ed2a] LEA RSI,[0x1e8f78] LEA RDX,[0x1e8808] CALL 0x00119680 LEA RDI,[0x1e8f98] CALL 0x001194c0 JMP 0x0016b066
/* minja::Parser::parseLogicalOr() */ void minja::Parser::parseLogicalOr(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; int8 *puVar3; runtime_error *prVar4; int8 *in_RSI; long *in_RDI; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58 [2]; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; parseLogicalAnd(); if (*in_RDI == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016b1d4 to 0016b1e2 has its CatchHandler @ 0016b266 */ std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical or\' expression"); /* try { // try from 0016b1e3 to 0016b1f8 has its CatchHandler @ 0016b261 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001e7ff0,PTR__runtime_error_001e7f68); } if (parseLogicalOr()::or_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalOr()::or_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 0016b20d to 0016b224 has its CatchHandler @ 0016b250 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalOr()::or_tok_abi_cxx11_,&DAT_001b5280,0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalOr()::or_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalOr()::or_tok_abi_cxx11_); } } local_48 = *in_RSI; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001e7f90 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } local_38 = in_RSI[4] - in_RSI[2]; while( true ) { /* try { // try from 0016b0b0 to 0016b0c6 has its CatchHandler @ 0016b298 */ consumeToken(&local_68); p_Var1 = local_60; if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break; /* try { // try from 0016b0f0 to 0016b0fa has its CatchHandler @ 0016b282 */ parseLogicalAnd(); if (local_68 == (long *)0x0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016b1a0 to 0016b1ae has its CatchHandler @ 0016b275 */ std::runtime_error::runtime_error(prVar4,"Expected right side of \'or\' expression"); /* try { // try from 0016b1af to 0016b1c4 has its CatchHandler @ 0016b273 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001e7ff0,PTR__runtime_error_001e7f68); } /* try { // try from 0016b106 to 0016b10f has its CatchHandler @ 0016b284 */ puVar3 = (int8 *)operator_new(0x58); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_ptr_inplace_001e6da8; BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_48); *in_RDI = (long)(puVar3 + 2); p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar3; if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } return; }
20,824
test_bad_union
eloqsql/tests/mysql_client_test.c
static void test_bad_union() { MYSQL_STMT *stmt; const char *query= "SELECT 1, 2 union SELECT 1"; myheader("test_bad_union"); stmt= mysql_simple_prepare(mysql, query); DIE_UNLESS(stmt == 0); myerror(NULL); }
O0
c
test_bad_union: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0xd46ec(%rip), %rax # 0x1383cb movq %rax, -0x10(%rbp) jmp 0x63ce5 movsbl 0x4067e5(%rip), %eax # 0x46a4d1 cmpl $0x2, %eax jge 0x63d6d movq 0x24b2e0(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xca622(%rip), %rsi # 0x12e324 movb $0x0, %al callq 0x3a1c0 movq 0x24b2c8(%rip), %rax # 0x2aefd8 movq (%rax), %rdi movl 0x406a03(%rip), %edx # 0x46a71c movl %edx, %eax addl $0x1, %eax movl %eax, 0x4069f8(%rip) # 0x46a71c movl 0x4069ee(%rip), %ecx # 0x46a718 movl 0x4067cb(%rip), %r8d # 0x46a4fc leaq 0xcb8f4(%rip), %rsi # 0x12f62c leaq 0xcae15(%rip), %r9 # 0x12eb54 movb $0x0, %al callq 0x3a1c0 movq 0x24b28b(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xca605(%rip), %rsi # 0x12e35c movb $0x0, %al callq 0x3a1c0 movq 0x24b273(%rip), %rax # 0x2aefd8 movq (%rax), %rdi callq 0x3a4a0 movq 0x406764(%rip), %rdi # 0x46a4d8 movq -0x10(%rbp), %rsi callq 0x3be90 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x63d8a jmp 0x63da2 leaq 0xc9e7b(%rip), %rdi # 0x12dc0c movl $0x24c1, %esi # imm = 0x24C1 leaq 0xce51a(%rip), %rdx # 0x1322b7 callq 0x3c010 xorl %eax, %eax movl %eax, %edi callq 0x3bf10 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_bad_union: push rbp mov rbp, rsp sub rsp, 10h lea rax, aSelect12UnionS; "SELECT 1, 2 union SELECT 1" mov [rbp+var_10], rax jmp short $+2 loc_63CE5: movsx eax, cs:opt_silent cmp eax, 2 jge short loc_63D6D 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, aTestBadUnion; "test_bad_union" 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_63D6D: mov rdi, cs:mysql mov rsi, [rbp+var_10] call mysql_simple_prepare mov [rbp+var_8], rax cmp [rbp+var_8], 0 jnz short loc_63D8A jmp short loc_63DA2 loc_63D8A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 24C1h lea rdx, aStmt0_0; "stmt == 0" call die loc_63DA2: xor eax, eax mov edi, eax call print_error add rsp, 10h pop rbp retn
void test_bad_union() { int v0; // edx 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_bad_union"); fprintf(stdout, " \n#####################################\n"); fflush(stdout); } if ( mysql_simple_prepare(mysql, (long long)"SELECT 1, 2 union SELECT 1") ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 9409, "stmt == 0"); print_error(0LL); }
test_bad_union: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x2383cb] MOV qword ptr [RBP + -0x10],RAX JMP 0x00163ce5 LAB_00163ce5: MOVSX EAX,byte ptr [0x0056a4d1] CMP EAX,0x2 JGE 0x00163d6d 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,[0x22eb54] 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_00163d6d: MOV RDI,qword ptr [0x0056a4d8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0013be90 MOV qword ptr [RBP + -0x8],RAX CMP qword ptr [RBP + -0x8],0x0 JNZ 0x00163d8a JMP 0x00163da2 LAB_00163d8a: LEA RDI,[0x22dc0c] MOV ESI,0x24c1 LEA RDX,[0x2322b7] CALL 0x0013c010 LAB_00163da2: XOR EAX,EAX MOV EDI,EAX CALL 0x0013bf10 ADD RSP,0x10 POP RBP RET
void test_bad_union(void) { long lVar1; ulong uVar2; if (opt_silent < '\x02') { fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n"); uVar2 = (ulong)test_count; test_count = test_count + 1; fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar2,(ulong)iter_count, (ulong)opt_count,"test_bad_union"); fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n"); fflush(*(FILE **)PTR_stdout_003aefd8); } lVar1 = mysql_simple_prepare(mysql,"SELECT 1, 2 union SELECT 1"); if (lVar1 != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x24c1,"stmt == 0"); } print_error(0); return; }
20,825
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O0
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x68(%rsp) movq %r8, 0x60(%rsp) movq 0x80(%rsp), %rdi movq %rdi, 0x30(%rsp) movq 0x78(%rsp), %rsi callq 0x14d360 movq 0x30(%rsp), %rdi leaq 0x1557e2(%rip), %rax # 0x2ae2d8 addq $0x10, %rax movq %rax, (%rdi) addq $0x20, %rdi movq %rdi, 0x18(%rsp) movq 0x70(%rsp), %rsi callq 0x130c20 movq 0x30(%rsp), %rdi addq $0x30, %rdi movq %rdi, 0x20(%rsp) movq 0x68(%rsp), %rsi callq 0x133070 movq 0x30(%rsp), %rdi addq $0x48, %rdi movq %rdi, 0x28(%rsp) movq 0x60(%rsp), %rsi callq 0x14a6b0 movq 0x30(%rsp), %rdi addq $0x58, %rdi movq %rdi, 0x38(%rsp) callq 0x158c50 movq $0x0, 0x58(%rsp) movq 0x30(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) addq $0x30, %rdi callq 0x12fdf0 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax jae 0x158c33 movq 0x30(%rsp), %rdi addq $0x30, %rdi movq 0x58(%rsp), %rsi callq 0x158c60 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi callq 0x5d4e0 testb $0x1, %al jne 0x158c1e movq 0x30(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, (%rsp) addq $0x58, %rdi movq 0x50(%rsp), %rsi callq 0x158c80 movq %rax, 0x8(%rsp) jmp 0x158bce movq 0x8(%rsp), %rax movq (%rsp), %rcx movq %rcx, (%rax) jmp 0x158c1e movq 0x38(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) callq 0x158cb0 movq 0x28(%rsp), %rdi callq 0x106920 movq 0x20(%rsp), %rdi callq 0x111580 movq 0x18(%rsp), %rdi callq 0x1115e0 movq 0x30(%rsp), %rdi callq 0x14d620 jmp 0x158c3b jmp 0x158c20 movq 0x58(%rsp), %rax addq $0x1, %rax movq %rax, 0x58(%rsp) jmp 0x158b5c addq $0x88, %rsp retq movq 0x48(%rsp), %rdi callq 0x5dbc0 nopw %cs:(%rax,%rax) nop
_ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE: sub rsp, 88h mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_20], rcx mov [rsp+88h+var_28], r8 mov rdi, [rsp+88h+var_8]; this mov [rsp+88h+var_58], rdi mov rsi, [rsp+88h+var_10]; minja::Location * call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) mov rdi, [rsp+88h+var_58] lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode add rax, 10h mov [rdi], rax add rdi, 20h ; ' ' mov [rsp+88h+var_70], rdi mov rsi, [rsp+88h+var_18] call _ZNSt10shared_ptrIN5minja12VariableExprEEC2EOS2_; std::shared_ptr<minja::VariableExpr>::shared_ptr(std::shared_ptr<minja::VariableExpr>&&) mov rdi, [rsp+88h+var_58] add rdi, 30h ; '0' mov [rsp+88h+var_68], rdi mov rsi, [rsp+88h+var_20] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EEC2EOSD_; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::vector(std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>&&) mov rdi, [rsp+88h+var_58] add rdi, 48h ; 'H' mov [rsp+88h+var_60], rdi mov rsi, [rsp+88h+var_28] call _ZNSt10shared_ptrIN5minja12TemplateNodeEEC2EOS2_; std::shared_ptr<minja::TemplateNode>::shared_ptr(std::shared_ptr<minja::TemplateNode>&&) mov rdi, [rsp+88h+var_58] add rdi, 58h ; 'X' mov [rsp+88h+var_50], rdi call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEC2Ev; std::unordered_map<std::string,ulong>::unordered_map(void) mov [rsp+88h+var_30], 0 loc_158B5C: mov rdi, [rsp+88h+var_58] mov rax, [rsp+88h+var_30] mov [rsp+88h+var_78], rax add rdi, 30h ; '0' call _ZNKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EE4sizeEv; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::size(void) mov rcx, rax mov rax, [rsp+88h+var_78] cmp rax, rcx jnb loc_158C33 mov rdi, [rsp+88h+var_58] add rdi, 30h ; '0' mov rsi, [rsp+88h+var_30] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EEixEm; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::operator[](ulong) mov [rsp+88h+var_38], rax mov rdi, [rsp+88h+var_38] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_158C1E mov rdi, [rsp+88h+var_58] mov rax, [rsp+88h+var_30] mov [rsp+88h+var_88], rax add rdi, 58h ; 'X' mov rsi, [rsp+88h+var_38] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEixERSB_; std::unordered_map<std::string,ulong>::operator[](std::string const&) mov [rsp+88h+var_80], rax jmp short $+2 loc_158BCE: mov rax, [rsp+88h+var_80] mov rcx, [rsp+88h+var_88] mov [rax], rcx jmp short loc_158C1E mov rdi, [rsp+arg_30] mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEED2Ev; std::unordered_map<std::string,ulong>::~unordered_map() mov rdi, [rsp+arg_20] call _ZNSt10shared_ptrIN5minja12TemplateNodeEED2Ev; std::shared_ptr<minja::TemplateNode>::~shared_ptr() mov rdi, [rsp+arg_18] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector() mov rdi, [rsp+arg_10] call _ZNSt10shared_ptrIN5minja12VariableExprEED2Ev; std::shared_ptr<minja::VariableExpr>::~shared_ptr() mov rdi, [rsp+arg_28]; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() jmp short loc_158C3B loc_158C1E: jmp short $+2 loc_158C20: mov rax, [rsp+88h+var_30] add rax, 1 mov [rsp+88h+var_30], rax jmp loc_158B5C loc_158C33: add rsp, 88h retn loc_158C3B: mov rdi, [rsp+arg_40] call __Unwind_Resume
unsigned long long minja::MacroNode::MacroNode( minja::TemplateNode *a1, const minja::Location *a2, long long a3, long long a4, long long a5) { unsigned long long v5; // rcx unsigned long long result; // rax long long v7; // [rsp+50h] [rbp-38h] unsigned long long i; // [rsp+58h] [rbp-30h] minja::TemplateNode::TemplateNode(a1, a2); *(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2; std::shared_ptr<minja::VariableExpr>::shared_ptr((long long)a1 + 32, a3); std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::vector((long long)a1 + 48, a4); std::shared_ptr<minja::TemplateNode>::shared_ptr((long long)a1 + 72, a5); std::unordered_map<std::string,unsigned long>::unordered_map(); for ( i = 0LL; ; ++i ) { v5 = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::size((_QWORD *)a1 + 6); result = i; if ( i >= v5 ) break; v7 = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::operator[]((char *)a1 + 48, i); if ( (std::string::empty(v7) & 1) == 0 ) *(_QWORD *)std::unordered_map<std::string,unsigned long>::operator[]((char *)a1 + 88, v7) = i; } return result; }
20,826
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O1
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x18(%rdi), %r15 movq 0x20(%rdi), %r12 cmpq %r12, %r15 setne %bl je 0xb4e09 movq (%rsi), %r14 movq 0x8(%rsi), %r13 movq 0x8(%r15), %rdx cmpq %r13, %rdx jne 0xb4dfd testq %rdx, %rdx je 0xb4e09 movq (%r15), %rdi movq %r14, %rsi callq 0x1b900 testl %eax, %eax je 0xb4e09 addq $0x70, %r15 cmpq %r12, %r15 setne %bl jne 0xb4de0 andb $0x1, %bl movl %ebx, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx mov r15, [rdi+18h] mov r12, [rdi+20h] cmp r15, r12 setnz bl jz short loc_B4E09 mov r14, [rsi] mov r13, [rsi+8] loc_B4DE0: mov rdx, [r15+8] cmp rdx, r13 jnz short loc_B4DFD test rdx, rdx jz short loc_B4E09 mov rdi, [r15] mov rsi, r14 call _bcmp test eax, eax jz short loc_B4E09 loc_B4DFD: add r15, 70h ; 'p' cmp r15, r12 setnz bl jnz short loc_B4DE0 loc_B4E09: and bl, 1 mov eax, ebx pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long minja::ArgumentsValue::has_named(long long a1, long long *a2) { unsigned int v2; // ebx _QWORD *v3; // r15 _QWORD *v4; // r12 long long v5; // r14 long long v6; // r13 long long v7; // rdx v3 = *(_QWORD **)(a1 + 24); v4 = *(_QWORD **)(a1 + 32); LOBYTE(v2) = v3 != v4; if ( v3 != v4 ) { v5 = *a2; v6 = a2[1]; do { v7 = v3[1]; if ( v7 == v6 && (!v7 || !(unsigned int)bcmp(*v3, v5)) ) break; v3 += 14; LOBYTE(v2) = v3 != v4; } while ( v3 != v4 ); } LOBYTE(v2) = v2 & 1; return v2; }
has_named: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R15,qword ptr [RDI + 0x18] MOV R12,qword ptr [RDI + 0x20] CMP R15,R12 SETNZ BL JZ 0x001b4e09 MOV R14,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] LAB_001b4de0: MOV RDX,qword ptr [R15 + 0x8] CMP RDX,R13 JNZ 0x001b4dfd TEST RDX,RDX JZ 0x001b4e09 MOV RDI,qword ptr [R15] MOV RSI,R14 CALL 0x0011b900 TEST EAX,EAX JZ 0x001b4e09 LAB_001b4dfd: ADD R15,0x70 CMP R15,R12 SETNZ BL JNZ 0x001b4de0 LAB_001b4e09: AND BL,0x1 MOV EAX,EBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */ ulong __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1) { int8 *puVar1; void *__s2; size_t sVar2; size_t __n; int iVar3; int8 unaff_RBX; int8 *puVar4; bool bVar5; puVar4 = *(int8 **)(this + 0x18); puVar1 = *(int8 **)(this + 0x20); bVar5 = puVar4 != puVar1; if (bVar5) { __s2 = *(void **)param_1; sVar2 = *(size_t *)(param_1 + 8); do { __n = puVar4[1]; if (__n == sVar2) { if (__n == 0) break; iVar3 = bcmp((void *)*puVar4,__s2,__n); if (iVar3 == 0) break; } puVar4 = puVar4 + 0xe; bVar5 = puVar4 != puVar1; } while (bVar5); } return CONCAT71((int7)((ulong)unaff_RBX >> 8),bVar5) & 0xffffffff; }
20,827
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O2
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx callq 0x73a84 leaq 0x8935e(%rip), %rax # 0x100458 addq $0x10, %rax movq %rax, (%rbx) leaq 0x28(%rbx), %rax movq %rax, 0x10(%rsp) andq $0x0, 0x28(%rbx) movups (%r13), %xmm0 andq $0x0, 0x8(%r13) movups %xmm0, 0x20(%rbx) andq $0x0, (%r13) movups (%r12), %xmm0 movups %xmm0, 0x30(%rbx) movq 0x10(%r12), %rax movq %rax, 0x40(%rbx) xorps %xmm0, %xmm0 andq $0x0, 0x10(%r12) movups %xmm0, (%r12) andq $0x0, 0x50(%rbx) movups (%r15), %xmm1 andq $0x0, 0x8(%r15) movups %xmm1, 0x48(%rbx) andq $0x0, (%r15) leaq 0x30(%rbx), %rax movq %rax, 0x8(%rsp) leaq 0x50(%rbx), %r12 leaq 0x58(%rbx), %r13 leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movq $0x1, 0x60(%rbx) movups %xmm0, 0x68(%rbx) movl $0x3f800000, 0x78(%rbx) # imm = 0x3F800000 movups %xmm0, 0x80(%rbx) xorl %ebp, %ebp pushq $0x30 popq %r14 xorl %r15d, %r15d movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rax subq %rsi, %rax cqto idivq %r14 cmpq %rax, %r15 jae 0x771cb cmpq $0x0, 0x8(%rsi,%rbp) je 0x771c2 addq %rbp, %rsi movq %r13, %rdi callq 0x773c4 movq %r15, (%rax) incq %r15 addq $0x30, %rbp jmp 0x77197 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbp movq %r13, %rdi callq 0x77806 movq %r12, %rdi callq 0x50496 movq 0x8(%rsp), %rdi callq 0x61f9c movq 0x10(%rsp), %rdi callq 0x50496 movq %rbx, %rdi callq 0x786fe movq %rbp, %rdi callq 0x24f80 nop
_ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode add rax, 10h mov [rbx], rax lea rax, [rbx+28h] mov [rsp+48h+var_38], rax and qword ptr [rbx+28h], 0 movups xmm0, xmmword ptr [r13+0] and qword ptr [r13+8], 0 movups xmmword ptr [rbx+20h], xmm0 and qword ptr [r13+0], 0 movups xmm0, xmmword ptr [r12] movups xmmword ptr [rbx+30h], xmm0 mov rax, [r12+10h] mov [rbx+40h], rax xorps xmm0, xmm0 and qword ptr [r12+10h], 0 movups xmmword ptr [r12], xmm0 and qword ptr [rbx+50h], 0 movups xmm1, xmmword ptr [r15] and qword ptr [r15+8], 0 movups xmmword ptr [rbx+48h], xmm1 and qword ptr [r15], 0 lea rax, [rbx+30h] mov [rsp+48h+var_40], rax lea r12, [rbx+50h] lea r13, [rbx+58h] lea rax, [rbx+88h] mov [rbx+58h], rax mov qword ptr [rbx+60h], 1 movups xmmword ptr [rbx+68h], xmm0 mov dword ptr [rbx+78h], 3F800000h movups xmmword ptr [rbx+80h], xmm0 xor ebp, ebp push 30h ; '0' pop r14 xor r15d, r15d loc_77197: mov rsi, [rbx+30h] mov rax, [rbx+38h] sub rax, rsi cqo idiv r14 cmp r15, rax jnb short loc_771CB cmp qword ptr [rsi+rbp+8], 0 jz short loc_771C2 add rsi, rbp mov rdi, r13 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) mov [rax], r15 loc_771C2: inc r15 add rbp, 30h ; '0' jmp short loc_77197 loc_771CB: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbp, rax mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+arg_0] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector() mov rdi, [rsp+arg_8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() mov rdi, rbp call __Unwind_Resume
unsigned long long minja::MacroNode::MacroNode(long long a1, _QWORD *a2, __int128 *a3, long long a4, __int128 *a5) { int v8; // ecx int v9; // r8d int v10; // r9d __int128 v11; // xmm0 __int128 v12; // xmm1 long long v13; // rbp unsigned long long i; // r15 long long v15; // rsi unsigned long long result; // rax char v17; // [rsp+0h] [rbp-48h] minja::TemplateNode::TemplateNode((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2; *(_QWORD *)(a1 + 40) = 0LL; v11 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v11; *(_QWORD *)a3 = 0LL; *(_OWORD *)(a1 + 48) = *(_OWORD *)a4; *(_QWORD *)(a1 + 64) = *(_QWORD *)(a4 + 16); *(_QWORD *)(a4 + 16) = 0LL; *(_OWORD *)a4 = 0LL; *(_QWORD *)(a1 + 80) = 0LL; v12 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v12; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; v13 = 0LL; for ( i = 0LL; ; ++i ) { v15 = *(_QWORD *)(a1 + 48); result = (*(_QWORD *)(a1 + 56) - v15) / 48; if ( i >= result ) break; if ( *(_QWORD *)(v15 + v13 + 8) ) *(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a1 + 88, (int)v13 + (int)v15, (*(_QWORD *)(a1 + 56) - v15) % 48, v8, v9, v10, v17) = i; v13 += 48LL; } return result; }
MacroNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RDI CALL 0x00173a84 LEA RAX,[0x200458] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RAX,[RBX + 0x28] MOV qword ptr [RSP + 0x10],RAX AND qword ptr [RBX + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R13] AND qword ptr [R13 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 AND qword ptr [R13],0x0 MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RBX + 0x40],RAX XORPS XMM0,XMM0 AND qword ptr [R12 + 0x10],0x0 MOVUPS xmmword ptr [R12],XMM0 AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM1,xmmword ptr [R15] AND qword ptr [R15 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM1 AND qword ptr [R15],0x0 LEA RAX,[RBX + 0x30] MOV qword ptr [RSP + 0x8],RAX LEA R12,[RBX + 0x50] LEA R13,[RBX + 0x58] LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV qword ptr [RBX + 0x60],0x1 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV dword ptr [RBX + 0x78],0x3f800000 MOVUPS xmmword ptr [RBX + 0x80],XMM0 XOR EBP,EBP PUSH 0x30 POP R14 XOR R15D,R15D LAB_00177197: MOV RSI,qword ptr [RBX + 0x30] MOV RAX,qword ptr [RBX + 0x38] SUB RAX,RSI CQO IDIV R14 CMP R15,RAX JNC 0x001771cb CMP qword ptr [RSI + RBP*0x1 + 0x8],0x0 JZ 0x001771c2 ADD RSI,RBP LAB_001771b7: MOV RDI,R13 CALL 0x001773c4 LAB_001771bf: MOV qword ptr [RAX],R15 LAB_001771c2: INC R15 ADD RBP,0x30 JMP 0x00177197 LAB_001771cb: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >, std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::MacroNode::MacroNode (MacroNode *this,Location *param_1,shared_ptr *param_2,vector *param_3,shared_ptr *param_4 ) { long lVar1; int8 uVar2; ulong *puVar3; long lVar4; ulong uVar5; TemplateNode::TemplateNode((TemplateNode *)this,param_1); *(int ***)this = &PTR_do_render_00200468; *(int8 *)(this + 0x28) = 0; uVar2 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar2; *(int8 *)param_2 = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar2; *(int8 *)(this + 0x40) = *(int8 *)(param_3 + 0x10); *(int8 *)(param_3 + 0x10) = 0; *(int8 *)param_3 = 0; *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x50) = 0; uVar2 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x48) = *(int8 *)param_4; *(int8 *)(this + 0x50) = uVar2; *(int8 *)param_4 = 0; *(MacroNode **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; lVar4 = 0; for (uVar5 = 0; lVar1 = *(long *)(this + 0x30), uVar5 < (ulong)((*(long *)(this + 0x38) - lVar1) / 0x30); uVar5 = uVar5 + 1) { if (*(long *)(lVar1 + 8 + lVar4) != 0) { /* try { // try from 001771b7 to 001771be has its CatchHandler @ 001771da */ puVar3 = (ulong *)std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)(this + 0x58),(string *)(lVar1 + lVar4)); *puVar3 = uVar5; } lVar4 = lVar4 + 0x30; } return; }
20,828
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O3
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq 0x18(%rdi), %r15 movq 0x20(%rdi), %r12 cmpq %r12, %r15 je 0xb44e1 movq (%rsi), %rbx movq 0x8(%rsi), %r14 cmpq %r14, 0x8(%r15) jne 0xb44d8 movb $0x1, %bpl testq %r14, %r14 je 0xb44e3 movq (%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1b900 testl %eax, %eax je 0xb44e3 addq $0x70, %r15 cmpq %r12, %r15 jne 0xb44b8 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx mov r15, [rdi+18h] mov r12, [rdi+20h] cmp r15, r12 jz short loc_B44E1 mov rbx, [rsi] mov r14, [rsi+8] loc_B44B8: cmp [r15+8], r14 jnz short loc_B44D8 mov bpl, 1 test r14, r14 jz short loc_B44E3 mov rdi, [r15] mov rsi, rbx mov rdx, r14 call _bcmp test eax, eax jz short loc_B44E3 loc_B44D8: add r15, 70h ; 'p' cmp r15, r12 jnz short loc_B44B8 loc_B44E1: xor ebp, ebp loc_B44E3: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long minja::ArgumentsValue::has_named(long long a1, long long *a2) { unsigned int v2; // ebp _QWORD *v3; // r15 _QWORD *v4; // r12 long long v5; // rbx long long v6; // r14 v3 = *(_QWORD **)(a1 + 24); v4 = *(_QWORD **)(a1 + 32); if ( v3 == v4 ) { return 0; } else { v5 = *a2; v6 = a2[1]; while ( 1 ) { if ( v3[1] == v6 ) { LOBYTE(v2) = 1; if ( !v6 || !(unsigned int)bcmp(*v3, v5) ) break; } v3 += 14; if ( v3 == v4 ) return 0; } } return v2; }
has_named: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15,qword ptr [RDI + 0x18] MOV R12,qword ptr [RDI + 0x20] CMP R15,R12 JZ 0x001b44e1 MOV RBX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] LAB_001b44b8: CMP qword ptr [R15 + 0x8],R14 JNZ 0x001b44d8 MOV BPL,0x1 TEST R14,R14 JZ 0x001b44e3 MOV RDI,qword ptr [R15] MOV RSI,RBX MOV RDX,R14 CALL 0x0011b900 TEST EAX,EAX JZ 0x001b44e3 LAB_001b44d8: ADD R15,0x70 CMP R15,R12 JNZ 0x001b44b8 LAB_001b44e1: XOR EBP,EBP LAB_001b44e3: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */ ulong __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1) { int8 *puVar1; void *__s2; size_t __n; int iVar2; ulong unaff_RBP; int8 *puVar3; puVar3 = *(int8 **)(this + 0x18); puVar1 = *(int8 **)(this + 0x20); if (puVar3 != puVar1) { __s2 = *(void **)param_1; __n = *(size_t *)(param_1 + 8); do { if (puVar3[1] == __n) { unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),1); if (__n == 0) goto LAB_001b44e3; iVar2 = bcmp((void *)*puVar3,__s2,__n); if (iVar2 == 0) goto LAB_001b44e3; } puVar3 = puVar3 + 0xe; } while (puVar3 != puVar1); } unaff_RBP = 0; LAB_001b44e3: return unaff_RBP & 0xffffffff; }
20,829
CLI::Option::get_single_name[abi:cxx11]() const
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/Option.hpp
CLI11_NODISCARD const std::string &get_single_name() const { if(!lnames_.empty()) { return lnames_[0]; } if(!pname_.empty()) { return pname_; } if(!snames_.empty()) { return snames_[0]; } return envname_; }
O0
cpp
CLI::Option::get_single_name[abi:cxx11]() const: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x18(%rbp) addq $0x40, %rdi callq 0xe8d0 testb $0x1, %al jne 0xde38 movq -0x18(%rbp), %rdi addq $0x40, %rdi xorl %eax, %eax movl %eax, %esi callq 0x1b040 movq %rax, -0x8(%rbp) jmp 0xde92 movq -0x18(%rbp), %rdi addq $0x88, %rdi callq 0x99c0 testb $0x1, %al jne 0xde5c movq -0x18(%rbp), %rax addq $0x88, %rax movq %rax, -0x8(%rbp) jmp 0xde92 movq -0x18(%rbp), %rdi addq $0x28, %rdi callq 0xe8d0 testb $0x1, %al jne 0xde84 movq -0x18(%rbp), %rdi addq $0x28, %rdi xorl %eax, %eax movl %eax, %esi callq 0x1b040 movq %rax, -0x8(%rbp) jmp 0xde92 movq -0x18(%rbp), %rax addq $0xa8, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ZNK3CLI6Option15get_single_nameB5cxx11Ev: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] mov [rbp+var_18], rdi add rdi, 40h ; '@' call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz short loc_DE38 mov rdi, [rbp+var_18] add rdi, 40h ; '@' xor eax, eax mov esi, eax call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov [rbp+var_8], rax jmp short loc_DE92 loc_DE38: mov rdi, [rbp+var_18] add rdi, 88h call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_DE5C mov rax, [rbp+var_18] add rax, 88h mov [rbp+var_8], rax jmp short loc_DE92 loc_DE5C: mov rdi, [rbp+var_18] add rdi, 28h ; '(' call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz short loc_DE84 mov rdi, [rbp+var_18] add rdi, 28h ; '(' xor eax, eax mov esi, eax call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov [rbp+var_8], rax jmp short loc_DE92 loc_DE84: mov rax, [rbp+var_18] add rax, 0A8h mov [rbp+var_8], rax loc_DE92: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long CLI::Option::get_single_name[abi:cxx11](long long a1) { if ( (std::vector<std::string>::empty(a1 + 64) & 1) == 0 ) return std::vector<std::string>::operator[](a1 + 64, 0LL); if ( (std::string::empty(a1 + 136) & 1) == 0 ) return a1 + 136; if ( (std::vector<std::string>::empty(a1 + 40) & 1) != 0 ) return a1 + 168; return std::vector<std::string>::operator[](a1 + 40, 0LL); }
get_single_name[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RDI ADD RDI,0x40 CALL 0x0010e8d0 TEST AL,0x1 JNZ 0x0010de38 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x40 XOR EAX,EAX MOV ESI,EAX CALL 0x0011b040 MOV qword ptr [RBP + -0x8],RAX JMP 0x0010de92 LAB_0010de38: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x88 CALL 0x001099c0 TEST AL,0x1 JNZ 0x0010de5c MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x88 MOV qword ptr [RBP + -0x8],RAX JMP 0x0010de92 LAB_0010de5c: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x28 CALL 0x0010e8d0 TEST AL,0x1 JNZ 0x0010de84 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x28 XOR EAX,EAX MOV ESI,EAX CALL 0x0011b040 MOV qword ptr [RBP + -0x8],RAX JMP 0x0010de92 LAB_0010de84: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0xa8 MOV qword ptr [RBP + -0x8],RAX LAB_0010de92: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
/* CLI::Option::get_single_name[abi:cxx11]() const */ Option * __thiscall CLI::Option::get_single_name_abi_cxx11_(Option *this) { ulong uVar1; Option *local_10; uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) (this + 0x40)); if ((uVar1 & 1) == 0) { local_10 = (Option *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) (this + 0x40),0); } else { uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) == 0) { local_10 = this + 0x88; } else { uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) (this + 0x28)); if ((uVar1 & 1) == 0) { local_10 = (Option *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: operator[]((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) (this + 0x28),0); } else { local_10 = this + 0xa8; } } } return local_10; }
20,830
ma_crypt_data_pre_write_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_data_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint size= share->block_size; uint key_version; uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, share->block_size, MYF(0)); if (crypt_buf == NULL) { args->crypt_buf= NULL; /* for post-hook */ return 1; } if (!share->base.born_transactional) { /* store a random number instead of LSN (for counter block) */ store_rand_lsn(args->page); } maria_page_crc_set_normal(args); { const uchar *src= args->page; uchar* dst= crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uchar page_type= src[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK; const uint head= (page_type <= TAIL_PAGE) ? PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share); const uint tail= CRC_SIZE; const uint32 key_version_offset= (page_type <= TAIL_PAGE) ? KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET; DBUG_ASSERT(page_type < MAX_PAGE_TYPE); /* 1 - copy head */ memcpy(dst, src, head); /* 2 - encrypt page */ if (ma_encrypt(share, share->crypt_data, src + head, dst + head, size - (head + tail), pageno, lsn, &key_version)) return 1; /* 3 - copy tail */ memcpy(dst + size - tail, src + size - tail, tail); /* 4 - store key version */ int4store(dst + key_version_offset, key_version); } /* swap pointers to instead write out the encrypted block */ args->crypt_buf= args->page; args->page= crypt_buf; return 0; }
O0
c
ma_crypt_data_pre_write_hook: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, %esi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xf2e30 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x5e23f movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movb $0x1, -0x1(%rbp) jmp 0x5e3c5 movq -0x18(%rbp), %rax cmpb $0x0, 0x44c(%rax) jne 0x5e258 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x5ea50 movq -0x10(%rbp), %rdi callq 0x5cb60 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x30(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x30(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax movb %al, -0x49(%rbp) movzbl -0x49(%rbp), %eax cmpl $0x2, %eax jg 0x5e2dd movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0xc, %eax movl %eax, -0x64(%rbp) jmp 0x5e2ed movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0x8, %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x50(%rbp) movl $0x4, -0x54(%rbp) movzbl -0x49(%rbp), %edx movl $0x8, %eax movl $0xc, %ecx cmpl $0x2, %edx cmovlel %ecx, %eax movl %eax, -0x58(%rbp) jmp 0x5e313 movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x50(%rbp), %eax movl %eax, %edx callq 0x2a0a0 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x30(%rbp), %rdx movl -0x50(%rbp), %eax addq %rax, %rdx movq -0x38(%rbp), %rcx movl -0x50(%rbp), %eax addq %rax, %rcx movl -0x1c(%rbp), %r8d movl -0x50(%rbp), %eax addl $0x4, %eax subl %eax, %r8d movl -0x3c(%rbp), %r9d movq -0x48(%rbp), %r10 leaq -0x20(%rbp), %rax movq %r10, (%rsp) movq %rax, 0x8(%rsp) callq 0x5eb00 cmpl $0x0, %eax je 0x5e37a movb $0x1, -0x1(%rbp) jmp 0x5e3c5 movq -0x38(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x38(%rbp), %rax movl -0x58(%rbp), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movl -0x20(%rbp), %ecx movq -0x60(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_crypt_data_pre_write_hook: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov esi, eax xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_28], rax cmp [rbp+var_28], 0 jnz short loc_5E23F mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov [rbp+var_1], 1 jmp loc_5E3C5 loc_5E23F: mov rax, [rbp+var_18] cmp byte ptr [rax+44Ch], 0 jnz short loc_5E258 mov rax, [rbp+var_10] mov rdi, [rax] call store_rand_lsn loc_5E258: mov rdi, [rbp+var_10] call maria_page_crc_set_normal mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_30] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+7] and eax, 7 mov [rbp+var_49], al movzx eax, [rbp+var_49] cmp eax, 2 jg short loc_5E2DD mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 0Ch mov [rbp+var_64], eax jmp short loc_5E2ED loc_5E2DD: mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 8 mov [rbp+var_64], eax loc_5E2ED: mov eax, [rbp+var_64] mov [rbp+var_50], eax mov [rbp+var_54], 4 movzx edx, [rbp+var_49] mov eax, 8 mov ecx, 0Ch cmp edx, 2 cmovle eax, ecx mov [rbp+var_58], eax jmp short $+2 loc_5E313: mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] mov eax, [rbp+var_50] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_30] mov eax, [rbp+var_50] add rdx, rax mov rcx, [rbp+var_38] mov eax, [rbp+var_50] add rcx, rax mov r8d, [rbp+var_1C] mov eax, [rbp+var_50] add eax, 4 sub r8d, eax mov r9d, [rbp+var_3C] mov r10, [rbp+var_48] lea rax, [rbp+var_20] mov [rsp+80h+var_80], r10 mov [rsp+80h+var_78], rax call ma_encrypt cmp eax, 0 jz short loc_5E37A mov [rbp+var_1], 1 jmp short loc_5E3C5 loc_5E37A: mov rax, [rbp+var_38] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_30] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_38] mov ecx, [rbp+var_58] add rax, rcx mov [rbp+var_60], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_60] mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_1], 0 loc_5E3C5: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_crypt_data_pre_write_hook(long long *a1) { int v1; // eax int v2; // eax unsigned int v4; // [rsp+28h] [rbp-58h] unsigned int v5; // [rsp+30h] [rbp-50h] unsigned __int8 v6; // [rsp+37h] [rbp-49h] unsigned long long v7; // [rsp+38h] [rbp-48h] int v8; // [rsp+44h] [rbp-3Ch] unsigned __int16 *v9; // [rsp+50h] [rbp-30h] long long v10; // [rsp+58h] [rbp-28h] int v11; // [rsp+60h] [rbp-20h] BYREF unsigned int v12; // [rsp+64h] [rbp-1Ch] long long v13; // [rsp+68h] [rbp-18h] long long *v14; // [rsp+70h] [rbp-10h] v14 = a1; v13 = a1[2]; v12 = *(_DWORD *)(v13 + 1980); v10 = my_malloc(0LL, *(unsigned int *)(v13 + 1980), 0LL); if ( v10 ) { if ( !*(_BYTE *)(v13 + 1100) ) store_rand_lsn(*v14); maria_page_crc_set_normal(v14); v9 = (unsigned __int16 *)*v14; v8 = v14[1]; v7 = *(unsigned int *)((char *)v9 + 3) | ((unsigned long long)((*((unsigned __int8 *)v9 + 2) << 16) | (unsigned int)*v9) << 32); v6 = *(_BYTE *)(*v14 + 7) & 7; if ( v6 > 2u ) v1 = *(_DWORD *)(v13 + 3096) + 8; else v1 = *(_DWORD *)(v13 + 3096) + 12; v5 = v1; v2 = 8; if ( v6 <= 2u ) v2 = 12; v4 = v2; memcpy(v10, v9, v5); if ( (unsigned int)ma_encrypt( v13, *(_QWORD *)(v13 + 3104), v5 + (unsigned int)v9, v5 + (unsigned int)v10, v12 - (v5 + 4), v8, v7, (long long)&v11) ) { return 1; } else { *(_DWORD *)(v10 + v12 - 4) = *(_DWORD *)((char *)v9 + v12 - 4); *(_DWORD *)(v4 + v10) = v11; v14[3] = *v14; *v14 = v10; return 0; } } else { v14[3] = 0LL; return 1; } }
ma_crypt_data_pre_write_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV ESI,EAX XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001f2e30 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x0015e23f MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015e3c5 LAB_0015e23f: MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x0015e258 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0015ea50 LAB_0015e258: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015cb60 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 MOV byte ptr [RBP + -0x49],AL MOVZX EAX,byte ptr [RBP + -0x49] CMP EAX,0x2 JG 0x0015e2dd MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc MOV dword ptr [RBP + -0x64],EAX JMP 0x0015e2ed LAB_0015e2dd: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x8 MOV dword ptr [RBP + -0x64],EAX LAB_0015e2ed: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x50],EAX MOV dword ptr [RBP + -0x54],0x4 MOVZX EDX,byte ptr [RBP + -0x49] MOV EAX,0x8 MOV ECX,0xc CMP EDX,0x2 CMOVLE EAX,ECX MOV dword ptr [RBP + -0x58],EAX JMP 0x0015e313 LAB_0015e313: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x50] MOV EDX,EAX CALL 0x0012a0a0 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x50] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x50] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x1c] MOV EAX,dword ptr [RBP + -0x50] ADD EAX,0x4 SUB R8D,EAX MOV R9D,dword ptr [RBP + -0x3c] MOV R10,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x20] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX CALL 0x0015eb00 CMP EAX,0x0 JZ 0x0015e37a MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015e3c5 LAB_0015e37a: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x58] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_0015e3c5: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 ma_crypt_data_pre_write_hook(int8 *param_1) { int4 uVar1; int3 *__src; ulong uVar2; int3 uVar3; byte bVar4; uint uVar5; int iVar6; void *__dest; uint local_6c; int4 local_28; uint local_24; long local_20; int8 *local_18; int1 local_9; local_20 = param_1[2]; local_24 = *(uint *)(local_20 + 0x7bc); local_18 = param_1; __dest = (void *)my_malloc(0,*(int4 *)(local_20 + 0x7bc),0); if (__dest == (void *)0x0) { local_18[3] = 0; local_9 = 1; } else { if (*(char *)(local_20 + 0x44c) == '\0') { store_rand_lsn(*local_18); } maria_page_crc_set_normal(local_18); __src = (int3 *)*local_18; uVar2 = local_18[1]; uVar3 = *__src; uVar1 = *(int4 *)((long)__src + 3); bVar4 = *(byte *)((long)__src + 7) & 7; if (bVar4 < 3) { local_6c = *(int *)(local_20 + 0xc18) + 0xc; } else { local_6c = *(int *)(local_20 + 0xc18) + 8; } uVar5 = 8; if (bVar4 < 3) { uVar5 = 0xc; } memcpy(__dest,__src,(ulong)local_6c); iVar6 = ma_encrypt(local_20,*(int8 *)(local_20 + 0xc20),(long)__src + (ulong)local_6c, (long)__dest + (ulong)local_6c,local_24 - (local_6c + 4),uVar2 & 0xffffffff, (ulong)CONCAT34(uVar3,uVar1),&local_28); if (iVar6 == 0) { *(int4 *)((long)__dest + ((ulong)local_24 - 4)) = *(int4 *)((long)__src + ((ulong)local_24 - 4)); *(int4 *)((long)__dest + (ulong)uVar5) = local_28; local_18[3] = *local_18; *local_18 = __dest; local_9 = 0; } else { local_9 = 1; } } return local_9; }
20,831
Cache::initCache()
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
void Cache::initCache() { this->blocks = std::vector<Block>(policy.blockNum); for (uint32_t i = 0; i < this->blocks.size(); ++i) { Block &b = this->blocks[i]; b.valid = false; b.modified = false; b.size = policy.blockSize; b.tag = 0; b.id = i / policy.associativity; b.lastReference = 0; b.data = std::vector<uint8_t>(b.size); } }
O0
cpp
Cache::initCache(): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x20(%rsp) movl 0x40(%rax), %eax movq %rax, 0x28(%rsp) leaq 0x77(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x5770 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x78(%rsp), %rdi callq 0x5780 jmp 0x44e9 movq 0x20(%rsp), %rdi addq $0x50, %rdi leaq 0x78(%rsp), %rsi callq 0x5800 leaq 0x78(%rsp), %rdi callq 0x56b0 leaq 0x77(%rsp), %rdi callq 0x5840 movl $0x0, 0x60(%rsp) movq 0x20(%rsp), %rdi movl 0x60(%rsp), %eax movq %rax, 0x18(%rsp) addq $0x50, %rdi callq 0x5750 movq %rax, %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax jae 0x4644 movq 0x20(%rsp), %rdi addq $0x50, %rdi movl 0x60(%rsp), %eax movl %eax, %esi callq 0x5710 movq 0x20(%rsp), %rcx movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movb $0x0, (%rax) movq 0x58(%rsp), %rax movb $0x0, 0x1(%rax) movl 0x3c(%rcx), %edx movq 0x58(%rsp), %rax movl %edx, 0xc(%rax) movq 0x58(%rsp), %rax movl $0x0, 0x4(%rax) movl 0x60(%rsp), %eax movl 0x44(%rcx), %ecx xorl %edx, %edx divl %ecx movl %eax, %ecx movq 0x58(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x58(%rsp), %rax movl $0x0, 0x10(%rax) movq 0x58(%rsp), %rax movl 0xc(%rax), %eax movq %rax, 0x8(%rsp) leaq 0x3f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x5850 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x5860 jmp 0x45d9 movq 0x58(%rsp), %rdi addq $0x18, %rdi leaq 0x40(%rsp), %rsi callq 0x58e0 leaq 0x40(%rsp), %rdi callq 0x5920 leaq 0x3f(%rsp), %rdi callq 0x5980 movl 0x60(%rsp), %eax addl $0x1, %eax movl %eax, 0x60(%rsp) jmp 0x4518 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x77(%rsp), %rdi callq 0x5840 jmp 0x464c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x3f(%rsp), %rdi callq 0x5980 jmp 0x464c addq $0x98, %rsp retq movq 0x68(%rsp), %rdi callq 0x22f0 nopw %cs:(%rax,%rax)
_ZN5Cache9initCacheEv: sub rsp, 98h mov [rsp+98h+var_8], rdi mov rax, [rsp+98h+var_8] mov [rsp+98h+var_78], rax mov eax, [rax+40h] mov [rsp+98h+var_70], rax lea rdi, [rsp+98h+var_21] mov [rsp+98h+var_68], rdi call _ZNSaIN5Cache5BlockEEC2Ev; std::allocator<Cache::Block>::allocator(void) mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_68] lea rdi, [rsp+98h+var_20] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEC2EmRKS2_; std::vector<Cache::Block>::vector(ulong,std::allocator<Cache::Block> const&) jmp short $+2 loc_44E9: mov rdi, [rsp+98h+var_78] add rdi, 50h ; 'P' lea rsi, [rsp+98h+var_20] call _ZNSt6vectorIN5Cache5BlockESaIS1_EEaSEOS3_; std::vector<Cache::Block>::operator=(std::vector<Cache::Block>&&) lea rdi, [rsp+98h+var_20] call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() lea rdi, [rsp+98h+var_21] call _ZNSaIN5Cache5BlockEED2Ev; std::allocator<Cache::Block>::~allocator() mov [rsp+98h+var_38], 0 loc_4518: mov rdi, [rsp+98h+var_78] mov eax, [rsp+98h+var_38] mov [rsp+98h+var_80], rax add rdi, 50h ; 'P' call _ZNKSt6vectorIN5Cache5BlockESaIS1_EE4sizeEv; std::vector<Cache::Block>::size(void) mov rcx, rax mov rax, [rsp+98h+var_80] cmp rax, rcx jnb loc_4644 mov rdi, [rsp+98h+var_78] add rdi, 50h ; 'P' mov eax, [rsp+98h+var_38] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov rcx, [rsp+98h+var_78] mov [rsp+98h+var_40], rax mov rax, [rsp+98h+var_40] mov byte ptr [rax], 0 mov rax, [rsp+98h+var_40] mov byte ptr [rax+1], 0 mov edx, [rcx+3Ch] mov rax, [rsp+98h+var_40] mov [rax+0Ch], edx mov rax, [rsp+98h+var_40] mov dword ptr [rax+4], 0 mov eax, [rsp+98h+var_38] mov ecx, [rcx+44h] xor edx, edx div ecx mov ecx, eax mov rax, [rsp+98h+var_40] mov [rax+8], ecx mov rax, [rsp+98h+var_40] mov dword ptr [rax+10h], 0 mov rax, [rsp+98h+var_40] mov eax, [rax+0Ch] mov [rsp+98h+var_90], rax lea rdi, [rsp+98h+var_59] mov [rsp+98h+var_88], rdi call _ZNSaIhEC2Ev; std::allocator<uchar>::allocator(void) mov rsi, [rsp+98h+var_90] mov rdx, [rsp+98h+var_88] lea rdi, [rsp+98h+var_58] call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&) jmp short $+2 loc_45D9: mov rdi, [rsp+98h+var_40] add rdi, 18h lea rsi, [rsp+98h+var_58] call _ZNSt6vectorIhSaIhEEaSEOS1_; std::vector<uchar>::operator=(std::vector<uchar>&&) lea rdi, [rsp+98h+var_58] call _ZNSt6vectorIhSaIhEED2Ev; std::vector<uchar>::~vector() lea rdi, [rsp+98h+var_59] call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator() mov eax, [rsp+98h+var_38] add eax, 1 mov [rsp+98h+var_38], eax jmp loc_4518 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_6F] call _ZNSaIN5Cache5BlockEED2Ev; std::allocator<Cache::Block>::~allocator() jmp short loc_464C mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_37] call _ZNSaIhED2Ev; std::allocator<uchar>::~allocator() jmp short loc_464C loc_4644: add rsp, 98h retn loc_464C: mov rdi, [rsp+arg_60] call __Unwind_Resume
unsigned long long Cache::initCache(Cache *this) { int v1; // ecx int v2; // r8d int v3; // r9d unsigned long long v4; // rcx unsigned long long result; // rax long long v6; // rsi unsigned int v7; // ecx unsigned int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // [rsp+0h] [rbp-98h] int v13; // [rsp+8h] [rbp-90h] unsigned long long v14; // [rsp+18h] [rbp-80h] int v15; // [rsp+28h] [rbp-70h] char v16; // [rsp+3Fh] [rbp-59h] BYREF _BYTE v17[24]; // [rsp+40h] [rbp-58h] BYREF long long v18; // [rsp+58h] [rbp-40h] unsigned int i; // [rsp+60h] [rbp-38h] char v20; // [rsp+77h] [rbp-21h] BYREF _BYTE v21[24]; // [rsp+78h] [rbp-20h] BYREF Cache *v22; // [rsp+90h] [rbp-8h] v22 = this; v15 = *((_DWORD *)this + 16); std::allocator<Cache::Block>::allocator(); std::vector<Cache::Block>::vector((unsigned int)v21, v15, (unsigned int)&v20, v1, v2, v3); std::vector<Cache::Block>::operator=((char *)this + 80, v21); std::vector<Cache::Block>::~vector(v21); std::allocator<Cache::Block>::~allocator(&v20); for ( i = 0; ; ++i ) { v14 = i; v4 = std::vector<Cache::Block>::size((char *)this + 80); result = v14; if ( v14 >= v4 ) break; v6 = i; v18 = std::vector<Cache::Block>::operator[]((char *)this + 80, i); *(_BYTE *)v18 = 0; *(_BYTE *)(v18 + 1) = 0; *(_DWORD *)(v18 + 12) = *((_DWORD *)this + 15); *(_DWORD *)(v18 + 4) = 0; v7 = *((_DWORD *)this + 17); v8 = i % v7; *(_DWORD *)(v18 + 8) = i / v7; *(_DWORD *)(v18 + 16) = 0; v13 = *(_DWORD *)(v18 + 12); std::allocator<unsigned char>::allocator(&v16, v6, v8); std::vector<unsigned char>::vector( (unsigned int)v17, v13, (unsigned int)&v16, v9, v10, v11, v12, v13, (long long)&v16); std::vector<unsigned char>::operator=(v18 + 24, v17); std::vector<unsigned char>::~vector(v17); std::allocator<unsigned char>::~allocator(&v16); } return result; }
initCache: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x20],RAX MOV EAX,dword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x28],RAX LEA RDI,[RSP + 0x77] MOV qword ptr [RSP + 0x30],RDI CALL 0x00105770 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_001044dd: LEA RDI,[RSP + 0x78] CALL 0x00105780 JMP 0x001044e9 LAB_001044e9: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x50 LEA RSI,[RSP + 0x78] CALL 0x00105800 LEA RDI,[RSP + 0x78] CALL 0x001056b0 LEA RDI,[RSP + 0x77] CALL 0x00105840 MOV dword ptr [RSP + 0x60],0x0 LAB_00104518: MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x18],RAX ADD RDI,0x50 CALL 0x00105750 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] CMP RAX,RCX JNC 0x00104644 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x50 MOV EAX,dword ptr [RSP + 0x60] MOV ESI,EAX CALL 0x00105710 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x58] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x58] MOV byte ptr [RAX + 0x1],0x0 MOV EDX,dword ptr [RCX + 0x3c] MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0xc],EDX MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x4],0x0 MOV EAX,dword ptr [RSP + 0x60] MOV ECX,dword ptr [RCX + 0x44] XOR EDX,EDX DIV ECX MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX + 0xc] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x3f] MOV qword ptr [RSP + 0x10],RDI CALL 0x00105850 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001045cd: LEA RDI,[RSP + 0x40] CALL 0x00105860 LAB_001045d7: JMP 0x001045d9 LAB_001045d9: MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x18 LEA RSI,[RSP + 0x40] CALL 0x001058e0 LEA RDI,[RSP + 0x40] CALL 0x00105920 LEA RDI,[RSP + 0x3f] CALL 0x00105980 MOV EAX,dword ptr [RSP + 0x60] ADD EAX,0x1 MOV dword ptr [RSP + 0x60],EAX JMP 0x00104518 LAB_00104644: ADD RSP,0x98 RET
/* Cache::initCache() */ void __thiscall Cache::initCache(Cache *this) { uint uVar1; ulong uVar2; ulong uVar3; allocator<unsigned_char> local_59; vector<unsigned_char,std::allocator<unsigned_char>> local_58 [24]; int1 *local_40; uint local_38; allocator<Cache::Block> local_21; vector<Cache::Block,std::allocator<Cache::Block>> local_20 [24]; Cache *local_8; uVar1 = *(uint *)(this + 0x40); local_8 = this; std::allocator<Cache::Block>::allocator(&local_21); /* try { // try from 001044dd to 001044e6 has its CatchHandler @ 00104610 */ std::vector<Cache::Block,std::allocator<Cache::Block>>::vector (local_20,(ulong)uVar1,(allocator *)&local_21); std::vector<Cache::Block,std::allocator<Cache::Block>>::operator= ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),(vector *)local_20); std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector(local_20); std::allocator<Cache::Block>::~allocator(&local_21); local_38 = 0; while( true ) { uVar2 = (ulong)local_38; uVar3 = std::vector<Cache::Block,std::allocator<Cache::Block>>::size ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50)); if (uVar3 <= uVar2) break; local_40 = (int1 *) std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (ulong)local_38); *local_40 = 0; local_40[1] = 0; *(int4 *)(local_40 + 0xc) = *(int4 *)(this + 0x3c); *(int4 *)(local_40 + 4) = 0; *(uint *)(local_40 + 8) = local_38 / *(uint *)(this + 0x44); *(int4 *)(local_40 + 0x10) = 0; uVar1 = *(uint *)(local_40 + 0xc); std::allocator<unsigned_char>::allocator(&local_59); /* try { // try from 001045cd to 001045d6 has its CatchHandler @ 0010462a */ std::vector<unsigned_char,std::allocator<unsigned_char>>::vector (local_58,(ulong)uVar1,(allocator *)&local_59); std::vector<unsigned_char,std::allocator<unsigned_char>>::operator= ((vector<unsigned_char,std::allocator<unsigned_char>> *)(local_40 + 0x18), (vector *)local_58); std::vector<unsigned_char,std::allocator<unsigned_char>>::~vector(local_58); std::allocator<unsigned_char>::~allocator(&local_59); local_38 = local_38 + 1; } return; }
20,832
Cache::initCache()
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
void Cache::initCache() { this->blocks = std::vector<Block>(policy.blockNum); for (uint32_t i = 0; i < this->blocks.size(); ++i) { Block &b = this->blocks[i]; b.valid = false; b.modified = false; b.size = policy.blockSize; b.tag = 0; b.id = i / policy.associativity; b.lastReference = 0; b.data = std::vector<uint8_t>(b.size); } }
O2
cpp
Cache::initCache(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl 0x40(%rdi), %esi leaq 0x10(%rsp), %r14 leaq 0xf(%rsp), %r15 movq %r14, %rdi movq %r15, %rdx callq 0x3e40 leaq 0x50(%rbx), %rdi movq %r14, %rsi callq 0x419a movq %r14, %rdi callq 0x3e1e xorl %eax, %eax pushq $0x30 popq %rbp movl %eax, %r12d movq 0x50(%rbx), %rcx movq 0x58(%rbx), %rax subq %rcx, %rax cqto idivq %rbp cmpq %r12, %rax jbe 0x3650 imulq $0x30, %r12, %rax leaq (%rcx,%rax), %r13 addq $0x18, %r13 andw $0x0, -0x18(%r13) movl 0x3c(%rbx), %esi movl %esi, -0xc(%r13) andl $0x0, -0x14(%r13) movl %r12d, %eax xorl %edx, %edx divl 0x44(%rbx) movl %eax, -0x10(%r13) andl $0x0, -0x8(%r13) movq %r14, %rdi movq %r15, %rdx callq 0x3e92 movq %r13, %rdi movq %r14, %rsi callq 0x4262 movq %r14, %rdi callq 0x4098 leal 0x1(%r12), %eax jmp 0x35e4 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN5Cache9initCacheEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov esi, [rdi+40h] lea r14, [rsp+58h+var_48] lea r15, [rsp+58h+var_49] mov rdi, r14 mov rdx, r15 call _ZNSt6vectorIN5Cache5BlockESaIS1_EEC2EmRKS2_; std::vector<Cache::Block>::vector(ulong,std::allocator<Cache::Block> const&) lea rdi, [rbx+50h] mov rsi, r14 call _ZNSt6vectorIN5Cache5BlockESaIS1_EE14_M_move_assignEOS3_St17integral_constantIbLb1EE; std::vector<Cache::Block>::_M_move_assign(std::vector<Cache::Block>&&,std::integral_constant<bool,true>) mov rdi, r14 call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() xor eax, eax push 30h ; '0' pop rbp loc_35E4: mov r12d, eax mov rcx, [rbx+50h] mov rax, [rbx+58h] sub rax, rcx cqo idiv rbp cmp rax, r12 jbe short loc_3650 imul rax, r12, 30h ; '0' lea r13, [rcx+rax] add r13, 18h and word ptr [r13-18h], 0 mov esi, [rbx+3Ch] mov [r13-0Ch], esi and dword ptr [r13-14h], 0 mov eax, r12d xor edx, edx div dword ptr [rbx+44h] mov [r13-10h], eax and dword ptr [r13-8], 0 mov rdi, r14 mov rdx, r15 call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&) mov rdi, r13 mov rsi, r14 call _ZNSt6vectorIhSaIhEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<uchar>::_M_move_assign(std::vector<uchar>&&,std::integral_constant<bool,true>) mov rdi, r14 call _ZNSt12_Vector_baseIhSaIhEED2Ev; std::_Vector_base<uchar>::~_Vector_base() lea eax, [r12+1] jmp short loc_35E4 loc_3650: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long Cache::initCache(Cache *this) { unsigned int i; // eax unsigned long long v2; // r12 long long v3; // rcx unsigned long long result; // rax long long v5; // r13 long long v6; // rsi char v7; // [rsp+Fh] [rbp-49h] BYREF _BYTE v8[72]; // [rsp+10h] [rbp-48h] BYREF std::vector<Cache::Block>::vector(v8, *((unsigned int *)this + 16), &v7); std::vector<Cache::Block>::_M_move_assign((char *)this + 80, v8); std::vector<Cache::Block>::~vector(v8); for ( i = 0; ; i = v2 + 1 ) { v2 = i; v3 = *((_QWORD *)this + 10); result = (*((_QWORD *)this + 11) - v3) / 48; if ( result <= v2 ) break; v5 = v3 + 48 * v2 + 24; *(_WORD *)(v5 - 24) = 0; v6 = *((unsigned int *)this + 15); *(_DWORD *)(v5 - 12) = v6; *(_DWORD *)(v5 - 20) = 0; *(_DWORD *)(v5 - 16) = (unsigned int)v2 / *((_DWORD *)this + 17); *(_DWORD *)(v5 - 8) = 0; std::vector<unsigned char>::vector(v8, v6, &v7); std::vector<unsigned char>::_M_move_assign(v5, v8); std::_Vector_base<unsigned char>::~_Vector_base(v8); } return result; }
initCache: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV ESI,dword ptr [RDI + 0x40] LEA R14,[RSP + 0x10] LEA R15,[RSP + 0xf] MOV RDI,R14 MOV RDX,R15 CALL 0x00103e40 LEA RDI,[RBX + 0x50] MOV RSI,R14 CALL 0x0010419a MOV RDI,R14 CALL 0x00103e1e XOR EAX,EAX PUSH 0x30 POP RBP LAB_001035e4: MOV R12D,EAX MOV RCX,qword ptr [RBX + 0x50] MOV RAX,qword ptr [RBX + 0x58] SUB RAX,RCX CQO IDIV RBP CMP RAX,R12 JBE 0x00103650 IMUL RAX,R12,0x30 LEA R13,[RCX + RAX*0x1] ADD R13,0x18 AND word ptr [R13 + -0x18],0x0 MOV ESI,dword ptr [RBX + 0x3c] MOV dword ptr [R13 + -0xc],ESI AND dword ptr [R13 + -0x14],0x0 MOV EAX,R12D XOR EDX,EDX DIV dword ptr [RBX + 0x44] MOV dword ptr [R13 + -0x10],EAX AND dword ptr [R13 + -0x8],0x0 MOV RDI,R14 MOV RDX,R15 CALL 0x00103e92 MOV RDI,R13 MOV RSI,R14 CALL 0x00104262 MOV RDI,R14 CALL 0x00104098 LEA EAX,[R12 + 0x1] JMP 0x001035e4 LAB_00103650: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Cache::initCache() */ void __thiscall Cache::initCache(Cache *this) { int2 *puVar1; uint uVar2; uint uVar3; allocator local_49; vector<Cache::Block,std::allocator<Cache::Block>> local_48 [24]; std::vector<Cache::Block,std::allocator<Cache::Block>>::vector (local_48,(ulong)*(uint *)(this + 0x40),&local_49); std::vector<Cache::Block,std::allocator<Cache::Block>>::_M_move_assign(this + 0x50,local_48); std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector(local_48); uVar3 = 0; while( true ) { if ((ulong)((*(long *)(this + 0x58) - *(long *)(this + 0x50)) / 0x30) <= (ulong)uVar3) break; puVar1 = (int2 *)(*(long *)(this + 0x50) + (ulong)uVar3 * 0x30); *puVar1 = 0; uVar2 = *(uint *)(this + 0x3c); *(uint *)(puVar1 + 6) = uVar2; *(int4 *)(puVar1 + 2) = 0; *(uint *)(puVar1 + 4) = uVar3 / *(uint *)(this + 0x44); *(int4 *)(puVar1 + 8) = 0; std::vector<unsigned_char,std::allocator<unsigned_char>>::vector ((vector<unsigned_char,std::allocator<unsigned_char>> *)local_48,(ulong)uVar2, &local_49); std::vector<unsigned_char,std::allocator<unsigned_char>>::_M_move_assign(puVar1 + 0xc,local_48); std::_Vector_base<unsigned_char,std::allocator<unsigned_char>>::~_Vector_base ((_Vector_base<unsigned_char,std::allocator<unsigned_char>> *)local_48); uVar3 = uVar3 + 1; } return; }
20,833
mi_unique_hash
eloqsql/storage/myisam/mi_unique.c
ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const uchar *record) { const uchar *pos, *end; ha_checksum crc= 0; ulong seed1=0, seed2= 4; HA_KEYSEG *keyseg; for (keyseg=def->seg ; keyseg < def->end ; keyseg++) { enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type; uint length=keyseg->length; if (keyseg->null_bit) { if (record[keyseg->null_pos] & keyseg->null_bit) { /* Change crc in a way different from an empty string or 0. (This is an optimisation; The code will work even if this isn't done) */ crc=((crc << 8) + 511+ (crc >> (8*sizeof(ha_checksum)-8))); continue; } } pos= record+keyseg->start; if (keyseg->flag & HA_VAR_LENGTH_PART) { uint pack_length= keyseg->bit_start; uint tmp_length= (pack_length == 1 ? (uint) *(uchar*) pos : uint2korr(pos)); pos+= pack_length; /* Skip VARCHAR length */ set_if_smaller(length,tmp_length); } else if (keyseg->flag & HA_BLOB_PART) { uint tmp_length=_mi_calc_blob_length(keyseg->bit_start,pos); memcpy((char**) &pos, pos+keyseg->bit_start, sizeof(char*)); if (!length || length > tmp_length) length=tmp_length; /* The whole blob */ } end= pos+length; if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 || type == HA_KEYTYPE_VARTEXT2) { my_ci_hash_sort(keyseg->charset, (const uchar*) pos, length, &seed1, &seed2); crc^= seed1; } else while (pos != end) crc=((crc << 8) + (((uchar) *(uchar*) pos++))) + (crc >> (8*sizeof(ha_checksum)-8)); } return crc; }
O0
c
mi_unique_hash: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x24(%rbp) movq $0x0, -0x30(%rbp) movq $0x4, -0x38(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0xc6568 movq -0x40(%rbp), %rax movzbl 0x18(%rax), %eax movl %eax, -0x44(%rbp) movq -0x40(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x48(%rbp) movq -0x40(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0xc6410 movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movl 0xc(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x40(%rbp), %rcx movzbl 0x19(%rcx), %ecx andl %ecx, %eax cmpl $0x0, %eax je 0xc640e movl -0x24(%rbp), %eax shll $0x8, %eax addl $0x1ff, %eax # imm = 0x1FF movl -0x24(%rbp), %ecx shrl $0x18, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) jmp 0xc6557 jmp 0xc6410 movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x40(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xc6481 movq -0x40(%rbp), %rax movzbl 0x1a(%rax), %eax movl %eax, -0x4c(%rbp) cmpl $0x1, -0x4c(%rbp) jne 0xc644f movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x58(%rbp) jmp 0xc6459 movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x50(%rbp) movl -0x4c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x48(%rbp), %eax cmpl -0x50(%rbp), %eax jbe 0xc647d movl -0x50(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0xc647f jmp 0xc64d4 movq -0x40(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0xc64d2 movq -0x40(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x18(%rbp), %rsi callq 0xac820 movl %eax, -0x54(%rbp) movq -0x18(%rbp), %rax movq -0x40(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x18(%rbp) cmpl $0x0, -0x48(%rbp) je 0xc64ca movl -0x48(%rbp), %eax cmpl -0x54(%rbp), %eax jbe 0xc64d0 movl -0x54(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0xc64d2 jmp 0xc64d4 movq -0x18(%rbp), %rax movl -0x48(%rbp), %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) cmpl $0x1, -0x44(%rbp) je 0xc64f4 cmpl $0xf, -0x44(%rbp) je 0xc64f4 cmpl $0x11, -0x44(%rbp) jne 0xc6520 movq -0x40(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movl -0x48(%rbp), %eax movl %eax, %edx leaq -0x30(%rbp), %rcx leaq -0x38(%rbp), %r8 callq 0xc6580 movq -0x30(%rbp), %rcx movl -0x24(%rbp), %eax xorq %rcx, %rax movl %eax, -0x24(%rbp) jmp 0xc6555 jmp 0xc6522 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0xc6553 movl -0x24(%rbp), %eax shll $0x8, %eax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movzbl (%rcx), %ecx addl %ecx, %eax movl -0x24(%rbp), %ecx shrl $0x18, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) jmp 0xc6522 jmp 0xc6555 jmp 0xc6557 movq -0x40(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) jmp 0xc63a3 movl -0x24(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mi_unique_hash: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_24], 0 mov [rbp+var_30], 0 mov [rbp+var_38], 4 mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_40], rax loc_C63A3: mov rax, [rbp+var_40] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb loc_C6568 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+18h] mov [rbp+var_44], eax mov rax, [rbp+var_40] movzx eax, word ptr [rax+14h] mov [rbp+var_48], eax mov rax, [rbp+var_40] cmp byte ptr [rax+19h], 0 jz short loc_C6410 mov rax, [rbp+var_10] mov rcx, [rbp+var_40] mov ecx, [rcx+0Ch] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx+19h] and eax, ecx cmp eax, 0 jz short loc_C640E mov eax, [rbp+var_24] shl eax, 8 add eax, 1FFh mov ecx, [rbp+var_24] shr ecx, 18h add eax, ecx mov [rbp+var_24], eax jmp loc_C6557 loc_C640E: jmp short $+2 loc_C6410: mov rax, [rbp+var_10] mov rcx, [rbp+var_40] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_40] movzx eax, word ptr [rax+12h] and eax, 8 cmp eax, 0 jz short loc_C6481 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+1Ah] mov [rbp+var_4C], eax cmp [rbp+var_4C], 1 jnz short loc_C644F mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov [rbp+var_58], eax jmp short loc_C6459 loc_C644F: mov rax, [rbp+var_18] movzx eax, word ptr [rax] mov [rbp+var_58], eax loc_C6459: mov eax, [rbp+var_58] mov [rbp+var_50], eax mov ecx, [rbp+var_4C] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_48] cmp eax, [rbp+var_50] jbe short loc_C647D mov eax, [rbp+var_50] mov [rbp+var_48], eax loc_C647D: jmp short $+2 loc_C647F: jmp short loc_C64D4 loc_C6481: mov rax, [rbp+var_40] movzx eax, word ptr [rax+12h] and eax, 20h cmp eax, 0 jz short loc_C64D2 mov rax, [rbp+var_40] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_18] call _mi_calc_blob_length mov [rbp+var_54], eax mov rax, [rbp+var_18] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_18], rax cmp [rbp+var_48], 0 jz short loc_C64CA mov eax, [rbp+var_48] cmp eax, [rbp+var_54] jbe short loc_C64D0 loc_C64CA: mov eax, [rbp+var_54] mov [rbp+var_48], eax loc_C64D0: jmp short $+2 loc_C64D2: jmp short $+2 loc_C64D4: mov rax, [rbp+var_18] mov ecx, [rbp+var_48] add rax, rcx mov [rbp+var_20], rax cmp [rbp+var_44], 1 jz short loc_C64F4 cmp [rbp+var_44], 0Fh jz short loc_C64F4 cmp [rbp+var_44], 11h jnz short loc_C6520 loc_C64F4: mov rax, [rbp+var_40] mov rdi, [rax] mov rsi, [rbp+var_18] mov eax, [rbp+var_48] mov edx, eax lea rcx, [rbp+var_30] lea r8, [rbp+var_38] call my_ci_hash_sort_0 mov rcx, [rbp+var_30] mov eax, [rbp+var_24] xor rax, rcx mov [rbp+var_24], eax jmp short loc_C6555 loc_C6520: jmp short $+2 loc_C6522: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_C6553 mov eax, [rbp+var_24] shl eax, 8 mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 1 mov [rbp+var_18], rdx movzx ecx, byte ptr [rcx] add eax, ecx mov ecx, [rbp+var_24] shr ecx, 18h add eax, ecx mov [rbp+var_24], eax jmp short loc_C6522 loc_C6553: jmp short $+2 loc_C6555: jmp short $+2 loc_C6557: mov rax, [rbp+var_40] add rax, 20h ; ' ' mov [rbp+var_40], rax jmp loc_C63A3 loc_C6568: mov eax, [rbp+var_24] add rsp, 60h pop rbp retn
long long mi_unique_hash(long long a1, long long a2) { unsigned __int8 *v2; // rcx unsigned int v4; // [rsp+8h] [rbp-58h] unsigned int v5; // [rsp+Ch] [rbp-54h] unsigned int v6; // [rsp+18h] [rbp-48h] int v7; // [rsp+1Ch] [rbp-44h] unsigned long long i; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] BYREF long long v10; // [rsp+30h] [rbp-30h] BYREF unsigned int v11; // [rsp+3Ch] [rbp-24h] unsigned __int8 *v12; // [rsp+40h] [rbp-20h] unsigned __int8 *v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] long long v15; // [rsp+58h] [rbp-8h] v15 = a1; v14 = a2; v11 = 0; v10 = 0LL; v9 = 4LL; for ( i = *(_QWORD *)(a1 + 8); i < *(_QWORD *)(v15 + 16); i += 32LL ) { v7 = *(unsigned __int8 *)(i + 24); v6 = *(unsigned __int16 *)(i + 20); if ( *(_BYTE *)(i + 25) && (*(_BYTE *)(i + 25) & *(_BYTE *)(v14 + *(unsigned int *)(i + 12))) != 0 ) { v11 = HIBYTE(v11) + (v11 << 8) + 511; } else { v13 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + v14); if ( (*(_WORD *)(i + 18) & 8) != 0 ) { if ( *(_BYTE *)(i + 26) == 1 ) v4 = *v13; else v4 = *(unsigned __int16 *)v13; v13 += *(unsigned __int8 *)(i + 26); if ( v6 > v4 ) v6 = v4; } else if ( (*(_WORD *)(i + 18) & 0x20) != 0 ) { v5 = mi_calc_blob_length(*(unsigned __int8 *)(i + 26), v13); v13 = *(unsigned __int8 **)&v13[*(unsigned __int8 *)(i + 26)]; if ( !v6 || v6 > v5 ) v6 = v5; } v12 = &v13[v6]; if ( v7 == 1 || v7 == 15 || v7 == 17 ) { my_ci_hash_sort_0(*(_QWORD *)i, v13, v6, &v10, &v9); v11 ^= v10; } else { while ( v13 != v12 ) { v2 = v13++; v11 = HIBYTE(v11) + *v2 + (v11 << 8); } } } } return v11; }
mi_unique_hash: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x24],0x0 MOV qword ptr [RBP + -0x30],0x0 MOV qword ptr [RBP + -0x38],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX LAB_001c63a3: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x001c6568 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x18] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x40] CMP byte ptr [RAX + 0x19],0x0 JZ 0x001c6410 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0xc] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX + 0x19] AND EAX,ECX CMP EAX,0x0 JZ 0x001c640e MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x8 ADD EAX,0x1ff MOV ECX,dword ptr [RBP + -0x24] SHR ECX,0x18 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX JMP 0x001c6557 LAB_001c640e: JMP 0x001c6410 LAB_001c6410: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x8 CMP EAX,0x0 JZ 0x001c6481 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x1a] MOV dword ptr [RBP + -0x4c],EAX CMP dword ptr [RBP + -0x4c],0x1 JNZ 0x001c644f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x58],EAX JMP 0x001c6459 LAB_001c644f: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x58],EAX LAB_001c6459: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x50],EAX MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x50] JBE 0x001c647d MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x48],EAX LAB_001c647d: JMP 0x001c647f LAB_001c647f: JMP 0x001c64d4 LAB_001c6481: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x20 CMP EAX,0x0 JZ 0x001c64d2 MOV RAX,qword ptr [RBP + -0x40] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001ac820 MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x18],RAX CMP dword ptr [RBP + -0x48],0x0 JZ 0x001c64ca MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x54] JBE 0x001c64d0 LAB_001c64ca: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x48],EAX LAB_001c64d0: JMP 0x001c64d2 LAB_001c64d2: JMP 0x001c64d4 LAB_001c64d4: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x48] ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x44],0x1 JZ 0x001c64f4 CMP dword ptr [RBP + -0x44],0xf JZ 0x001c64f4 CMP dword ptr [RBP + -0x44],0x11 JNZ 0x001c6520 LAB_001c64f4: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x48] MOV EDX,EAX LEA RCX,[RBP + -0x30] LEA R8,[RBP + -0x38] CALL 0x001c6580 MOV RCX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x24] XOR RAX,RCX MOV dword ptr [RBP + -0x24],EAX JMP 0x001c6555 LAB_001c6520: JMP 0x001c6522 LAB_001c6522: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x001c6553 MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x18] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x18],RDX MOVZX ECX,byte ptr [RCX] ADD EAX,ECX MOV ECX,dword ptr [RBP + -0x24] SHR ECX,0x18 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX JMP 0x001c6522 LAB_001c6553: JMP 0x001c6555 LAB_001c6555: JMP 0x001c6557 LAB_001c6557: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX JMP 0x001c63a3 LAB_001c6568: MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x60 POP RBP RET
uint mi_unique_hash(long param_1,long param_2) { char cVar1; uint uVar2; uint local_60; uint local_50; int8 *local_48; int8 local_40; int8 local_38; uint local_2c; ushort *local_28; ushort *local_20; long local_18; long local_10; local_2c = 0; local_38 = 0; local_40 = 4; local_18 = param_2; local_10 = param_1; for (local_48 = *(int8 **)(param_1 + 8); local_48 < *(int8 **)(local_10 + 0x10); local_48 = local_48 + 4) { cVar1 = *(char *)(local_48 + 3); local_50 = (uint)*(ushort *)((long)local_48 + 0x14); if ((*(char *)((long)local_48 + 0x19) == '\0') || ((*(byte *)(local_18 + (ulong)*(uint *)((long)local_48 + 0xc)) & *(byte *)((long)local_48 + 0x19)) == 0)) { local_20 = (ushort *)(local_18 + (ulong)*(uint *)(local_48 + 1)); if ((*(ushort *)((long)local_48 + 0x12) & 8) == 0) { if ((*(ushort *)((long)local_48 + 0x12) & 0x20) != 0) { uVar2 = _mi_calc_blob_length(*(int1 *)((long)local_48 + 0x1a),local_20); local_20 = *(ushort **) ((long)local_20 + (long)(int)(uint)*(byte *)((long)local_48 + 0x1a)); if ((local_50 == 0) || (uVar2 < local_50)) { local_50 = uVar2; } } } else { if (*(byte *)((long)local_48 + 0x1a) == 1) { local_60 = (uint)(byte)*local_20; } else { local_60 = (uint)*local_20; } local_20 = (ushort *)((long)local_20 + (ulong)(uint)*(byte *)((long)local_48 + 0x1a)); if (local_60 < local_50) { local_50 = local_60; } } local_28 = (ushort *)((long)local_20 + (ulong)local_50); if (((cVar1 == '\x01') || (cVar1 == '\x0f')) || (cVar1 == '\x11')) { my_ci_hash_sort(*local_48,local_20,local_50,&local_38,&local_40); local_2c = local_2c ^ (uint)local_38; } else { for (; local_20 != local_28; local_20 = (ushort *)((long)local_20 + 1)) { local_2c = local_2c * 0x100 + (uint)(byte)*local_20 + (local_2c >> 0x18); } } } else { local_2c = local_2c * 0x100 + 0x1ff + (local_2c >> 0x18); } } return local_2c; }
20,834
js_thisBigIntValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_thisBigIntValue(JSContext *ctx, JSValue this_val) { if (JS_IsBigInt(ctx, this_val)) return js_dup(this_val); if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_BIG_INT) { if (JS_IsBigInt(ctx, p->u.object_data)) return js_dup(p->u.object_data); } } return JS_ThrowTypeError(ctx, "not a BigInt"); }
O2
c
js_thisBigIntValue: pushq %rbx movq %rsi, %rbx cmpl $-0x1, %edx je 0x5d211 cmpl $-0x9, %edx jne 0x5d227 incl (%rbx) jmp 0x5d23a cmpw $0x22, 0x6(%rbx) jne 0x5d227 movq 0x38(%rbx), %rdx cmpl $-0x9, %edx jne 0x5d227 movq 0x30(%rbx), %rbx jmp 0x5d20d leaq 0x29e1c(%rip), %rsi # 0x8704a xorl %ebx, %ebx xorl %eax, %eax callq 0x1bad1 pushq $0x6 popq %rdx movq %rbx, %rax popq %rbx retq
js_thisBigIntValue: push rbx mov rbx, rsi cmp edx, 0FFFFFFFFh jz short loc_5D211 cmp edx, 0FFFFFFF7h jnz short loc_5D227 loc_5D20D: inc dword ptr [rbx] jmp short loc_5D23A loc_5D211: cmp word ptr [rbx+6], 22h ; '"' jnz short loc_5D227 mov rdx, [rbx+38h] cmp edx, 0FFFFFFF7h jnz short loc_5D227 mov rbx, [rbx+30h] jmp short loc_5D20D loc_5D227: lea rsi, aNotABigint; "not a BigInt" xor ebx, ebx xor eax, eax call JS_ThrowTypeError push 6 pop rdx loc_5D23A: mov rax, rbx pop rbx retn
_DWORD * js_thisBigIntValue( 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) { _DWORD *v14; // rbx char v16; // [rsp+0h] [rbp-8h] v14 = (_DWORD *)a2; if ( (_DWORD)a3 == -1 ) { if ( *(_WORD *)(a2 + 6) == 34 ) { a3 = *(_QWORD *)(a2 + 56); if ( (_DWORD)a3 == -9 ) { v14 = *(_DWORD **)(a2 + 48); goto LABEL_3; } } LABEL_7: v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a BigInt", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); return v14; } if ( (_DWORD)a3 != -9 ) goto LABEL_7; LABEL_3: ++*v14; return v14; }
js_thisBigIntValue: PUSH RBX MOV RBX,RSI CMP EDX,-0x1 JZ 0x0015d211 CMP EDX,-0x9 JNZ 0x0015d227 LAB_0015d20d: INC dword ptr [RBX] JMP 0x0015d23a LAB_0015d211: CMP word ptr [RBX + 0x6],0x22 JNZ 0x0015d227 MOV RDX,qword ptr [RBX + 0x38] CMP EDX,-0x9 JNZ 0x0015d227 MOV RBX,qword ptr [RBX + 0x30] JMP 0x0015d20d LAB_0015d227: LEA RSI,[0x18704a] XOR EBX,EBX XOR EAX,EAX CALL 0x0011bad1 PUSH 0x6 POP RDX LAB_0015d23a: MOV RAX,RBX POP RBX RET
int1 [16] js_thisBigIntValue(int8 param_1,int *param_2,int8 param_3) { int1 auVar1 [16]; if ((int)param_3 == -1) { if ((*(short *)((long)param_2 + 6) != 0x22) || (param_3 = *(int8 *)(param_2 + 0xe), (int)param_3 != -9)) goto LAB_0015d227; param_2 = *(int **)(param_2 + 0xc); } else if ((int)param_3 != -9) { LAB_0015d227: param_2 = (int *)0x0; JS_ThrowTypeError(param_1,"not a BigInt"); param_3 = 6; goto LAB_0015d23a; } *param_2 = *param_2 + 1; LAB_0015d23a: auVar1._8_8_ = param_3; auVar1._0_8_ = param_2; return auVar1; }
20,835
LefDefParser::defwIOTiming(char const*, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwIOTiming(const char *instance, const char *pin) { defwFunc = DEFW_IOTIMING; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_IOTIMING_START && defwState != DEFW_IOTIMING) return DEFW_BAD_ORDER; if (defwState == DEFW_IOTIMING) fprintf(defwFile, " ;\n"); // from previous statement fprintf(defwFile, " - ( %s %s )\n", instance, pin); defwLines++; defwCounter--; defwState = DEFW_IOTIMING; return DEFW_OK; }
O0
cpp
LefDefParser::defwIOTiming(char const*, char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) movq %rsi, (%rsp) leaq 0xf614(%rip), %rax # 0x2b168 movl $0x41, (%rax) leaq 0xf5f7(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x1bb74 movl $0x1, 0x14(%rsp) jmp 0x1bc1d leaq 0xf5e9(%rip), %rax # 0x2b164 cmpl $0x40, (%rax) je 0x1bb99 leaq 0xf5dd(%rip), %rax # 0x2b164 cmpl $0x41, (%rax) je 0x1bb99 movl $0x2, 0x14(%rsp) jmp 0x1bc1d leaq 0xf5c4(%rip), %rax # 0x2b164 cmpl $0x41, (%rax) jne 0x1bbbd leaq 0xf5ac(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x829c(%rip), %rsi # 0x23e52 movb $0x0, %al callq 0x10f0 leaq 0xf594(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x8(%rsp), %rdx movq (%rsp), %rcx leaq 0x91b2(%rip), %rsi # 0x24d89 movb $0x0, %al callq 0x10f0 leaq 0xf57b(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0xf56f(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0xf57e(%rip), %rax # 0x2b178 movl (%rax), %ecx addl $-0x1, %ecx leaq 0xf572(%rip), %rax # 0x2b178 movl %ecx, (%rax) leaq 0xf555(%rip), %rax # 0x2b164 movl $0x41, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser12defwIOTimingEPKcS1_: sub rsp, 18h mov [rsp+18h+var_10], rdi mov [rsp+18h+var_18], rsi lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 41h ; 'A' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_1BB74 mov [rsp+18h+var_4], 1 jmp loc_1BC1D loc_1BB74: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 40h ; '@' jz short loc_1BB99 lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 41h ; 'A' jz short loc_1BB99 mov [rsp+18h+var_4], 2 jmp loc_1BC1D loc_1BB99: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 41h ; 'A' jnz short loc_1BBBD lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aDividercharS+10h; " ;\n" mov al, 0 call _fprintf loc_1BBBD: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] mov rcx, [rsp+18h+var_18] lea rsi, aSS_2; " - ( %s %s )\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov ecx, [rax] add ecx, 0FFFFFFFFh lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov [rax], ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 41h ; 'A' mov [rsp+18h+var_4], 0 loc_1BC1D: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::defwIOTiming(LefDefParser *this, const char *a2, const char *a3) { LefDefParser::defwFunc = 65; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState == 64 || LefDefParser::defwState == 65 ) { if ( LefDefParser::defwState == 65 ) fprintf(LefDefParser::defwFile, " ;\n"); fprintf(LefDefParser::defwFile, " - ( %s %s )\n", (const char *)this, a2); ++LefDefParser::defwLines; --LefDefParser::defwCounter; LefDefParser::defwState = 65; return 0; } else { return 2; } } else { return 1; } }
defwIOTiming: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP],RSI LEA RAX,[0x12b168] MOV dword ptr [RAX],0x41 LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x0011bb74 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011bc1d LAB_0011bb74: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x40 JZ 0x0011bb99 LEA RAX,[0x12b164] CMP dword ptr [RAX],0x41 JZ 0x0011bb99 MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011bc1d LAB_0011bb99: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x41 JNZ 0x0011bbbd LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x123e52] MOV AL,0x0 CALL 0x001010f0 LAB_0011bbbd: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP] LEA RSI,[0x124d89] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LEA RAX,[0x12b178] MOV ECX,dword ptr [RAX] ADD ECX,-0x1 LEA RAX,[0x12b178] MOV dword ptr [RAX],ECX LEA RAX,[0x12b164] MOV dword ptr [RAX],0x41 MOV dword ptr [RSP + 0x14],0x0 LAB_0011bc1d: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::defwIOTiming(char const*, char const*) */ int4 LefDefParser::defwIOTiming(char *param_1,char *param_2) { int4 local_4; defwFunc = 0x41; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if ((defwState == 0x40) || (defwState == 0x41)) { if (defwState == 0x41) { fprintf(defwFile," ;\n"); } fprintf(defwFile," - ( %s %s )\n",param_1,param_2); defwLines = defwLines + 1; defwCounter = defwCounter + -1; defwState = 0x41; local_4 = 0; } else { local_4 = 2; } return local_4; }
20,836
minja::Value::empty() const
monkey531[P]llama/common/minja.hpp
bool empty() const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_string()) return primitive_.empty(); if (is_array()) return array_->empty(); if (is_object()) return object_->empty(); return false; }
O1
cpp
minja::Value::empty() const: pushq %r14 pushq %rbx pushq %rax movq 0x10(%rdi), %rax movq 0x20(%rdi), %rcx movb 0x40(%rdi), %dl testq %rcx, %rcx jne 0x3f7ac testq %rax, %rax jne 0x3f7ac testb %dl, %dl jne 0x3f7ac cmpq $0x0, 0x30(%rdi) je 0x3f7d4 cmpb $0x3, %dl jne 0x3f7b5 xorl %eax, %eax jmp 0x3f7cc testq %rax, %rax jne 0x3f7c2 movq %rcx, %rax testq %rcx, %rcx je 0x3f7b1 movq (%rax), %rcx cmpq 0x8(%rax), %rcx sete %al addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x18350 movq %rax, %rbx leaq 0x6c0da(%rip), %rsi # 0xab8c2 movq %rax, %rdi callq 0x18260 movq 0x9e7f9(%rip), %rsi # 0xddff0 movq 0x9e772(%rip), %rdx # 0xddf70 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18ba0
_ZNK5minja5Value5emptyEv: push r14 push rbx push rax mov rax, [rdi+10h] mov rcx, [rdi+20h] mov dl, [rdi+40h] test rcx, rcx jnz short loc_3F7AC test rax, rax jnz short loc_3F7AC test dl, dl jnz short loc_3F7AC cmp qword ptr [rdi+30h], 0 jz short loc_3F7D4 loc_3F7AC: cmp dl, 3 jnz short loc_3F7B5 loc_3F7B1: xor eax, eax jmp short loc_3F7CC loc_3F7B5: test rax, rax jnz short loc_3F7C2 mov rax, rcx test rcx, rcx jz short loc_3F7B1 loc_3F7C2: mov rcx, [rax] cmp rcx, [rax+8] setz al loc_3F7CC: add rsp, 8 pop rbx pop r14 retn loc_3F7D4: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
bool minja::Value::empty(minja::Value *this) { _QWORD *v1; // rax long long v2; // rcx char v3; // dl bool result; // al std::runtime_error *exception; // rbx v1 = (_QWORD *)*((_QWORD *)this + 2); v2 = *((_QWORD *)this + 4); v3 = *((_BYTE *)this + 64); if ( !v2 && !v1 && !v3 && !*((_QWORD *)this + 6) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } result = v3 != 3 && (v1 || (v1 = (_QWORD *)*((_QWORD *)this + 4), v2)) && *v1 == v1[1]; return result; }
empty: PUSH R14 PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RDI + 0x20] MOV DL,byte ptr [RDI + 0x40] TEST RCX,RCX JNZ 0x0013f7ac TEST RAX,RAX JNZ 0x0013f7ac TEST DL,DL JNZ 0x0013f7ac CMP qword ptr [RDI + 0x30],0x0 JZ 0x0013f7d4 LAB_0013f7ac: CMP DL,0x3 JNZ 0x0013f7b5 LAB_0013f7b1: XOR EAX,EAX JMP 0x0013f7cc LAB_0013f7b5: TEST RAX,RAX JNZ 0x0013f7c2 MOV RAX,RCX TEST RCX,RCX JZ 0x0013f7b1 LAB_0013f7c2: MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] SETZ AL LAB_0013f7cc: ADD RSP,0x8 POP RBX POP R14 RET LAB_0013f7d4: MOV EDI,0x10 CALL 0x00118350 MOV RBX,RAX LAB_0013f7e1: LEA RSI,[0x1ab8c2] MOV RDI,RAX CALL 0x00118260 LAB_0013f7f0: MOV RSI,qword ptr [0x001ddff0] MOV RDX,qword ptr [0x001ddf70] MOV RDI,RBX CALL 0x00118b30
/* minja::Value::empty() const */ int8 __thiscall minja::Value::empty(Value *this) { long *plVar1; long *plVar2; int8 uVar3; runtime_error *this_00; plVar2 = *(long **)(this + 0x10); plVar1 = *(long **)(this + 0x20); if ((((plVar1 == (long *)0x0) && (plVar2 == (long *)0x0)) && (this[0x40] == (Value)0x0)) && (*(long *)(this + 0x30) == 0)) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013f7e1 to 0013f7ef has its CatchHandler @ 0013f806 */ std::runtime_error::runtime_error(this_00,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70); } if ((this[0x40] == (Value)0x3) || ((plVar2 == (long *)0x0 && (plVar2 = plVar1, plVar1 == (long *)0x0)))) { uVar3 = 0; } else { uVar3 = CONCAT71((int7)((ulong)plVar2 >> 8),*plVar2 == plVar2[1]); } return uVar3; }
20,837
minja::Value::empty() const
monkey531[P]llama/common/minja.hpp
bool empty() const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_string()) return primitive_.empty(); if (is_array()) return array_->empty(); if (is_object()) return object_->empty(); return false; }
O2
cpp
minja::Value::empty() const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x3d1f0 testb %al, %al jne 0x3de2f cmpb $0x3, 0x40(%rbx) jne 0x3de07 addq $0x40, %rbx movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3e09a movq 0x10(%rbx), %rax testq %rax, %rax jne 0x3de19 movq 0x20(%rbx), %rax testq %rax, %rax je 0x3de2b movq (%rax), %rcx cmpq 0x8(%rax), %rcx sete %al addq $0x8, %rsp popq %rbx popq %r14 retq xorl %eax, %eax jmp 0x3de23 pushq $0x10 popq %rdi callq 0x20380 movq %rax, %rbx leaq 0x50a31(%rip), %rsi # 0x8e872 movq %rax, %rdi callq 0x20270 movq 0x911a0(%rip), %rsi # 0xceff0 movq 0x91119(%rip), %rdx # 0xcef70 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20ba0
_ZNK5minja5Value5emptyEv: push r14 push rbx push rax mov rbx, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz short loc_3DE2F cmp byte ptr [rbx+40h], 3 jnz short loc_3DE07 add rbx, 40h ; '@' mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv; 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>::empty(void) loc_3DE07: mov rax, [rbx+10h] test rax, rax jnz short loc_3DE19 mov rax, [rbx+20h] test rax, rax jz short loc_3DE2B loc_3DE19: mov rcx, [rax] cmp rcx, [rax+8] setz al loc_3DE23: add rsp, 8 pop rbx pop r14 retn loc_3DE2B: xor eax, eax jmp short loc_3DE23 loc_3DE2F: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
char minja::Value::empty(minja::Value *this) { _QWORD *v2; // rax std::runtime_error *exception; // rbx if ( minja::Value::is_null(this) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_BYTE *)this + 64) == 3 ) 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>::empty((char *)this + 64); v2 = (_QWORD *)*((_QWORD *)this + 2); return (v2 || (v2 = (_QWORD *)*((_QWORD *)this + 4)) != 0LL) && *v2 == v2[1]; }
empty: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0013d1f0 TEST AL,AL JNZ 0x0013de2f CMP byte ptr [RBX + 0x40],0x3 JNZ 0x0013de07 ADD RBX,0x40 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0013e09a LAB_0013de07: MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JNZ 0x0013de19 MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x0013de2b LAB_0013de19: MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] SETZ AL LAB_0013de23: ADD RSP,0x8 POP RBX POP R14 RET LAB_0013de2b: XOR EAX,EAX JMP 0x0013de23 LAB_0013de2f: PUSH 0x10 POP RDI CALL 0x00120380 MOV RBX,RAX LAB_0013de3a: LEA RSI,[0x18e872] MOV RDI,RAX CALL 0x00120270 LAB_0013de49: MOV RSI,qword ptr [0x001ceff0] MOV RDX,qword ptr [0x001cef70] MOV RDI,RBX CALL 0x00120b30
/* minja::Value::empty() const */ int8 __thiscall minja::Value::empty(Value *this) { char cVar1; int8 uVar2; long *plVar3; runtime_error *this_00; cVar1 = is_null(this); if (cVar1 != '\0') { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013de3a to 0013de48 has its CatchHandler @ 0013de5f */ std::runtime_error::runtime_error(this_00,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001ceff0,PTR__runtime_error_001cef70); } if (this[0x40] == (Value)0x3) { uVar2 = 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> ::empty((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(this + 0x40)); return uVar2; } plVar3 = *(long **)(this + 0x10); if ((plVar3 == (long *)0x0) && (plVar3 = *(long **)(this + 0x20), plVar3 == (long *)0x0)) { uVar2 = 0; } else { uVar2 = CONCAT71((int7)((ulong)plVar3 >> 8),*plVar3 == plVar3[1]); } return uVar2; }
20,838
testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
bool MatchesTest(const std::string& test_suite_name, const std::string& test_name) const { return MatchesName(test_suite_name + "." + test_name); }
O1
cpp
testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %rax, %rsi callq 0xf66a leaq 0x23b01(%rip), %rsi # 0x4398d movq %r15, %rdi callq 0x9a70 movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x9170 leaq 0x38(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x1fecc movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x1fed3 movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rdx leaq 0x28(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi callq 0x1f804 testb %al, %al je 0x1ff13 addq $0x50, %rbx leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1f804 movl %eax, %ebx xorb $0x1, %bl jmp 0x1ff15 xorl %ebx, %ebx movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x1ff2c movq 0x38(%rsp), %rsi incq %rsi callq 0x94c0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1ff43 movq 0x18(%rsp), %rsi incq %rsi callq 0x94c0 movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x1ff53 movq %rax, %rbx jmp 0x1ff72 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x1ff72 movq 0x38(%rsp), %rsi incq %rsi callq 0x94c0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1ff89 movq 0x18(%rsp), %rsi incq %rsi callq 0x94c0 movq %rbx, %rdi callq 0x99a0 nop
_ZNK7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilter11MatchesTestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_: push r15 push r14 push r12 push rbx sub rsp, 48h mov r14, rdx mov rbx, rdi lea r12, [rsp+68h+var_50] mov [r12-10h], r12 mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax lea r15, [rsp+68h+var_60] mov rdi, r15 mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, asc_4398C+1; "." mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] lea rdi, [rsp+68h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea r14, [rsp+68h+var_30] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_1FECC mov [rsp+68h+var_40], rdx mov rdx, [rcx] mov [rsp+68h+var_30], rdx jmp short loc_1FED3 loc_1FECC: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r14], xmm0 loc_1FED3: mov rdx, [rax+8] lea rsi, [rsp+68h+var_40] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rbx call _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&) test al, al jz short loc_1FF13 add rbx, 50h ; 'P' lea rsi, [rsp+68h+var_40] mov rdi, rbx call _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&) mov ebx, eax xor bl, 1 jmp short loc_1FF15 loc_1FF13: xor ebx, ebx loc_1FF15: mov rdi, [rsp+68h+var_40]; void * cmp rdi, r14 jz short loc_1FF2C mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1FF2C: mov rdi, [rsp+68h+var_60]; void * cmp rdi, r12 jz short loc_1FF43 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1FF43: mov eax, ebx add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_1FF53: mov rbx, rax jmp short loc_1FF72 mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r14 jz short loc_1FF72 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1FF72: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_1FF89 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1FF89: mov rdi, rbx call __Unwind_Resume
long long testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::MatchesTest( long long *a1, long long a2, _QWORD *a3) { long long v4; // rax _OWORD *v5; // rcx unsigned int v6; // eax unsigned int v7; // ebx void *v9[2]; // [rsp+8h] [rbp-60h] BYREF _QWORD v10[2]; // [rsp+18h] [rbp-50h] BYREF void *v11[2]; // [rsp+28h] [rbp-40h] BYREF _OWORD v12[3]; // [rsp+38h] [rbp-30h] BYREF v9[0] = v10; std::string::_M_construct<char *>(v9, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::string::append(v9, "."); v4 = std::string::_M_append(v9, *a3); v11[0] = v12; v5 = (_OWORD *)(v4 + 16); if ( *(_QWORD *)v4 == v4 + 16 ) { v12[0] = *v5; } else { v11[0] = *(void **)v4; *(_QWORD *)&v12[0] = *(_QWORD *)v5; } v11[1] = *(void **)(v4 + 8); *(_QWORD *)v4 = v5; *(_QWORD *)(v4 + 8) = 0LL; *(_BYTE *)(v4 + 16) = 0; if ( testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(a1, (long long)v11) ) { LOBYTE(v6) = testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(a1 + 10, (long long)v11); v7 = v6; LOBYTE(v7) = v6 ^ 1; } else { v7 = 0; } if ( v11[0] != v12 ) operator delete(v11[0], *(_QWORD *)&v12[0] + 1LL); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); return v7; }
MatchesTest: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,RAX CALL 0x0010f66a LAB_0011fe85: LEA RSI,[0x14398d] MOV RDI,R15 CALL 0x00109a70 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_0011fe9b: LEA RDI,[RSP + 0x8] CALL 0x00109170 LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0011fecc MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0011fed3 LAB_0011fecc: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R14],XMM0 LAB_0011fed3: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x28] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0011feef: MOV RDI,RBX CALL 0x0011f804 TEST AL,AL JZ 0x0011ff13 ADD RBX,0x50 LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011f804 LAB_0011ff0c: MOV EBX,EAX XOR BL,0x1 JMP 0x0011ff15 LAB_0011ff13: XOR EBX,EBX LAB_0011ff15: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x0011ff2c MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001094c0 LAB_0011ff2c: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0011ff43 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001094c0 LAB_0011ff43: MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest(std::__cxx11::string const&, std::__cxx11::string const&) const */ uint __thiscall testing::internal::(anonymous_namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest (PositiveAndNegativeUnitTestFilter *this,string *param_1,string *param_2) { char cVar1; uint uVar2; long *plVar3; long *plVar4; long *local_60 [2]; long local_50 [2]; long *local_40; long local_38; long local_30; long lStack_28; local_60[0] = local_50; std::__cxx11::string::_M_construct<char*> (local_60,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 0011fe85 to 0011fe93 has its CatchHandler @ 0011ff53 */ std::__cxx11::string::append((char *)local_60); /* try { // try from 0011fe9b to 0011fea4 has its CatchHandler @ 0011ff51 */ plVar3 = (long *)std::__cxx11::string::_M_append((char *)local_60,*(ulong *)param_2); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_30 = *plVar4; lStack_28 = plVar3[3]; local_40 = &local_30; } else { local_30 = *plVar4; local_40 = (long *)*plVar3; } local_38 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 0011feef to 0011ff0b has its CatchHandler @ 0011ff58 */ cVar1 = UnitTestFilter::MatchesName((UnitTestFilter *)this,(string *)&local_40); if (cVar1 == '\0') { uVar2 = 0; } else { uVar2 = UnitTestFilter::MatchesName((UnitTestFilter *)(this + 0x50),(string *)&local_40); uVar2 = uVar2 ^ 1; } if (local_40 != &local_30) { operator_delete(local_40,local_30 + 1); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } return uVar2; }
20,839
simd_print_info
tsotchke[P]eshkol/src/core/utils/simd.c
void simd_print_info(void) { if (!g_simd_initialized) { simd_init(); } printf("SIMD Information:\n"); printf(" CPU: %s\n", g_simd_info.name); printf(" Vector size: %d bytes\n", g_simd_info.vector_size); printf(" Instruction sets:\n"); printf(" SSE: %s\n", (g_simd_info.flags & SIMD_SSE) ? "Yes" : "No"); printf(" SSE2: %s\n", (g_simd_info.flags & SIMD_SSE2) ? "Yes" : "No"); printf(" SSE3: %s\n", (g_simd_info.flags & SIMD_SSE3) ? "Yes" : "No"); printf(" SSSE3: %s\n", (g_simd_info.flags & SIMD_SSSE3) ? "Yes" : "No"); printf(" SSE4.1: %s\n", (g_simd_info.flags & SIMD_SSE4_1) ? "Yes" : "No"); printf(" SSE4.2: %s\n", (g_simd_info.flags & SIMD_SSE4_2) ? "Yes" : "No"); printf(" AVX: %s\n", (g_simd_info.flags & SIMD_AVX) ? "Yes" : "No"); printf(" AVX2: %s\n", (g_simd_info.flags & SIMD_AVX2) ? "Yes" : "No"); printf(" AVX-512: %s\n", (g_simd_info.flags & SIMD_AVX512F) ? "Yes" : "No"); printf(" NEON: %s\n", (g_simd_info.flags & SIMD_NEON) ? "Yes" : "No"); printf(" Extensions:\n"); printf(" FMA: %s\n", g_simd_info.has_fma ? "Yes" : "No"); printf(" POPCNT: %s\n", g_simd_info.has_popcnt ? "Yes" : "No"); }
O0
c
simd_print_info: pushq %rbp movq %rsp, %rbp testb $0x1, 0x9f9e(%rip) # 0x120d9 jne 0x8142 callq 0x7e00 leaq 0x5e18(%rip), %rdi # 0xdf61 movb $0x0, %al callq 0x10a0 movq 0x9f71(%rip), %rsi # 0x120c8 leaq 0x5e16(%rip), %rdi # 0xdf74 movb $0x0, %al callq 0x10a0 movl 0x9f65(%rip), %esi # 0x120d0 leaq 0x5e0d(%rip), %rdi # 0xdf7f movb $0x0, %al callq 0x10a0 leaq 0x5e18(%rip), %rdi # 0xdf98 movb $0x0, %al callq 0x10a0 movl 0x9f33(%rip), %ecx # 0x120c0 andl $0x1, %ecx leaq 0x5e2b(%rip), %rsi # 0xdfc2 leaq 0x5e20(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5e01(%rip), %rdi # 0xdfad movb $0x0, %al callq 0x10a0 movl 0x9f07(%rip), %ecx # 0x120c0 andl $0x2, %ecx leaq 0x5dff(%rip), %rsi # 0xdfc2 leaq 0x5df4(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5ded(%rip), %rdi # 0xdfc5 movb $0x0, %al callq 0x10a0 movl 0x9edb(%rip), %ecx # 0x120c0 andl $0x4, %ecx leaq 0x5dd3(%rip), %rsi # 0xdfc2 leaq 0x5dc8(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5dd2(%rip), %rdi # 0xdfd6 movb $0x0, %al callq 0x10a0 movl 0x9eaf(%rip), %ecx # 0x120c0 andl $0x8, %ecx leaq 0x5da7(%rip), %rsi # 0xdfc2 leaq 0x5d9c(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5db7(%rip), %rdi # 0xdfe7 movb $0x0, %al callq 0x10a0 movl 0x9e83(%rip), %ecx # 0x120c0 andl $0x10, %ecx leaq 0x5d7b(%rip), %rsi # 0xdfc2 leaq 0x5d70(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5d9c(%rip), %rdi # 0xdff8 movb $0x0, %al callq 0x10a0 movl 0x9e57(%rip), %ecx # 0x120c0 andl $0x20, %ecx leaq 0x5d4f(%rip), %rsi # 0xdfc2 leaq 0x5d44(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5d81(%rip), %rdi # 0xe009 movb $0x0, %al callq 0x10a0 movl 0x9e2b(%rip), %ecx # 0x120c0 andl $0x40, %ecx leaq 0x5d23(%rip), %rsi # 0xdfc2 leaq 0x5d18(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5d66(%rip), %rdi # 0xe01a movb $0x0, %al callq 0x10a0 movl 0x9dff(%rip), %ecx # 0x120c0 andl $0x80, %ecx leaq 0x5cf4(%rip), %rsi # 0xdfc2 leaq 0x5ce9(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5d48(%rip), %rdi # 0xe02b movb $0x0, %al callq 0x10a0 movl 0x9dd0(%rip), %ecx # 0x120c0 andl $0x100, %ecx # imm = 0x100 leaq 0x5cc5(%rip), %rsi # 0xdfc2 leaq 0x5cba(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5d2a(%rip), %rdi # 0xe03c movb $0x0, %al callq 0x10a0 movl 0x9da1(%rip), %ecx # 0x120c0 andl $0x200, %ecx # imm = 0x200 leaq 0x5c96(%rip), %rsi # 0xdfc2 leaq 0x5c8b(%rip), %rax # 0xdfbe cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x5d0c(%rip), %rdi # 0xe04d movb $0x0, %al callq 0x10a0 leaq 0x5d0f(%rip), %rdi # 0xe05e movb $0x0, %al callq 0x10a0 movb 0x9d78(%rip), %cl # 0x120d4 leaq 0x5c5f(%rip), %rsi # 0xdfc2 leaq 0x5c54(%rip), %rax # 0xdfbe testb $0x1, %cl cmovneq %rax, %rsi leaq 0x5cf5(%rip), %rdi # 0xe06d movb $0x0, %al callq 0x10a0 movb 0x9d50(%rip), %cl # 0x120d5 leaq 0x5c36(%rip), %rsi # 0xdfc2 leaq 0x5c2b(%rip), %rax # 0xdfbe testb $0x1, %cl cmovneq %rax, %rsi leaq 0x5cdd(%rip), %rdi # 0xe07e movb $0x0, %al callq 0x10a0 popq %rbp retq nopw (%rax,%rax)
simd_print_info: push rbp mov rbp, rsp test cs:g_simd_initialized, 1 jnz short loc_8142 call simd_init loc_8142: lea rdi, aSimdInformatio; "SIMD Information:\n" mov al, 0 call _printf mov rsi, cs:off_120C8; "Unknown" lea rdi, aCpuS; " CPU: %s\n" mov al, 0 call _printf mov esi, cs:dword_120D0 lea rdi, aVectorSizeDByt; " Vector size: %d bytes\n" mov al, 0 call _printf lea rdi, aInstructionSet; " Instruction sets:\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 1 lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aSseS; " SSE: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 2 lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aSse2S; " SSE2: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 4 lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aSse3S; " SSE3: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 8 lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aSsse3S; " SSSE3: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 10h lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aSse41S; " SSE4.1: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 20h lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aSse42S; " SSE4.2: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 40h lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aAvxS; " AVX: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 80h lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aAvx2S; " AVX2: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 100h lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aAvx512S; " AVX-512: %s\n" mov al, 0 call _printf mov ecx, cs:g_simd_info and ecx, 200h lea rsi, aNo; "No" lea rax, aYes; "Yes" cmp ecx, 0 cmovnz rsi, rax lea rdi, aNeonS; " NEON: %s\n" mov al, 0 call _printf lea rdi, aExtensions; " Extensions:\n" mov al, 0 call _printf mov cl, cs:byte_120D4 lea rsi, aNo; "No" lea rax, aYes; "Yes" test cl, 1 cmovnz rsi, rax lea rdi, aFmaS; " FMA: %s\n" mov al, 0 call _printf mov cl, cs:byte_120D5 lea rsi, aNo; "No" lea rax, aYes; "Yes" test cl, 1 cmovnz rsi, rax lea rdi, aPopcntS; " POPCNT: %s\n" mov al, 0 call _printf pop rbp retn
long long simd_print_info() { const char *v0; // rsi const char *v1; // rsi const char *v2; // rsi const char *v3; // rsi const char *v4; // rsi const char *v5; // rsi const char *v6; // rsi const char *v7; // rsi const char *v8; // rsi const char *v9; // rsi const char *v10; // rsi const char *v11; // rsi if ( (g_simd_initialized & 1) == 0 ) simd_init(); printf("SIMD Information:\n"); printf(" CPU: %s\n", off_120C8); printf(" Vector size: %d bytes\n", dword_120D0); printf(" Instruction sets:\n"); v0 = "No"; if ( (g_simd_info & 1) != 0 ) v0 = "Yes"; printf(" SSE: %s\n", v0); v1 = "No"; if ( (g_simd_info & 2) != 0 ) v1 = "Yes"; printf(" SSE2: %s\n", v1); v2 = "No"; if ( (g_simd_info & 4) != 0 ) v2 = "Yes"; printf(" SSE3: %s\n", v2); v3 = "No"; if ( (g_simd_info & 8) != 0 ) v3 = "Yes"; printf(" SSSE3: %s\n", v3); v4 = "No"; if ( (g_simd_info & 0x10) != 0 ) v4 = "Yes"; printf(" SSE4.1: %s\n", v4); v5 = "No"; if ( (g_simd_info & 0x20) != 0 ) v5 = "Yes"; printf(" SSE4.2: %s\n", v5); v6 = "No"; if ( (g_simd_info & 0x40) != 0 ) v6 = "Yes"; printf(" AVX: %s\n", v6); v7 = "No"; if ( (g_simd_info & 0x80) != 0 ) v7 = "Yes"; printf(" AVX2: %s\n", v7); v8 = "No"; if ( (g_simd_info & 0x100) != 0 ) v8 = "Yes"; printf(" AVX-512: %s\n", v8); v9 = "No"; if ( (g_simd_info & 0x200) != 0 ) v9 = "Yes"; printf(" NEON: %s\n", v9); printf(" Extensions:\n"); v10 = "No"; if ( (byte_120D4 & 1) != 0 ) v10 = "Yes"; printf(" FMA: %s\n", v10); v11 = "No"; if ( (byte_120D5 & 1) != 0 ) v11 = "Yes"; return printf(" POPCNT: %s\n", v11); }
simd_print_info: PUSH RBP MOV RBP,RSP TEST byte ptr [0x001120d9],0x1 JNZ 0x00108142 CALL 0x00107e00 LAB_00108142: LEA RDI,[0x10df27] MOV AL,0x0 CALL 0x001010a0 MOV RSI,qword ptr [0x001120c8] LEA RDI,[0x10df3a] MOV AL,0x0 CALL 0x001010a0 MOV ESI,dword ptr [0x001120d0] LEA RDI,[0x10df45] MOV AL,0x0 CALL 0x001010a0 LEA RDI,[0x10df5e] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x1 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10df73] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x2 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10df8b] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x4 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10df9c] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x8 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10dfad] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x10 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10dfbe] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x20 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10dfcf] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x40 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10dfe0] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x80 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10dff1] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x100 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10e002] MOV AL,0x0 CALL 0x001010a0 MOV ECX,dword ptr [0x001120c0] AND ECX,0x200 LEA RSI,[0x10df88] LEA RAX,[0x10df84] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x10e013] MOV AL,0x0 CALL 0x001010a0 LEA RDI,[0x10e024] MOV AL,0x0 CALL 0x001010a0 MOV CL,byte ptr [0x001120d4] LEA RSI,[0x10df88] LEA RAX,[0x10df84] TEST CL,0x1 CMOVNZ RSI,RAX LEA RDI,[0x10e033] MOV AL,0x0 CALL 0x001010a0 MOV CL,byte ptr [0x001120d5] LEA RSI,[0x10df88] LEA RAX,[0x10df84] TEST CL,0x1 CMOVNZ RSI,RAX LEA RDI,[0x10e044] MOV AL,0x0 CALL 0x001010a0 POP RBP RET
void simd_print_info(void) { int *puVar1; if ((g_simd_initialized & 1) == 0) { simd_init(); } printf("SIMD Information:\n"); printf(" CPU: %s\n",PTR_s_Unknown_001120c8); printf(" Vector size: %d bytes\n",(ulong)DAT_001120d0); printf(" Instruction sets:\n"); puVar1 = &DAT_0010df88; if ((g_simd_info & 1) != 0) { puVar1 = &DAT_0010df84; } printf(" SSE: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 2) != 0) { puVar1 = &DAT_0010df84; } printf(" SSE2: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 4) != 0) { puVar1 = &DAT_0010df84; } printf(" SSE3: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 8) != 0) { puVar1 = &DAT_0010df84; } printf(" SSSE3: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 0x10) != 0) { puVar1 = &DAT_0010df84; } printf(" SSE4.1: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 0x20) != 0) { puVar1 = &DAT_0010df84; } printf(" SSE4.2: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 0x40) != 0) { puVar1 = &DAT_0010df84; } printf(" AVX: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 0x80) != 0) { puVar1 = &DAT_0010df84; } printf(" AVX2: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 0x100) != 0) { puVar1 = &DAT_0010df84; } printf(" AVX-512: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((g_simd_info & 0x200) != 0) { puVar1 = &DAT_0010df84; } printf(" NEON: %s\n",puVar1); printf(" Extensions:\n"); puVar1 = &DAT_0010df88; if ((DAT_001120d4 & 1) != 0) { puVar1 = &DAT_0010df84; } printf(" FMA: %s\n",puVar1); puVar1 = &DAT_0010df88; if ((DAT_001120d5 & 1) != 0) { puVar1 = &DAT_0010df84; } printf(" POPCNT: %s\n",puVar1); return; }
20,840
simd_print_info
tsotchke[P]eshkol/src/core/utils/simd.c
void simd_print_info(void) { if (!g_simd_initialized) { simd_init(); } printf("SIMD Information:\n"); printf(" CPU: %s\n", g_simd_info.name); printf(" Vector size: %d bytes\n", g_simd_info.vector_size); printf(" Instruction sets:\n"); printf(" SSE: %s\n", (g_simd_info.flags & SIMD_SSE) ? "Yes" : "No"); printf(" SSE2: %s\n", (g_simd_info.flags & SIMD_SSE2) ? "Yes" : "No"); printf(" SSE3: %s\n", (g_simd_info.flags & SIMD_SSE3) ? "Yes" : "No"); printf(" SSSE3: %s\n", (g_simd_info.flags & SIMD_SSSE3) ? "Yes" : "No"); printf(" SSE4.1: %s\n", (g_simd_info.flags & SIMD_SSE4_1) ? "Yes" : "No"); printf(" SSE4.2: %s\n", (g_simd_info.flags & SIMD_SSE4_2) ? "Yes" : "No"); printf(" AVX: %s\n", (g_simd_info.flags & SIMD_AVX) ? "Yes" : "No"); printf(" AVX2: %s\n", (g_simd_info.flags & SIMD_AVX2) ? "Yes" : "No"); printf(" AVX-512: %s\n", (g_simd_info.flags & SIMD_AVX512F) ? "Yes" : "No"); printf(" NEON: %s\n", (g_simd_info.flags & SIMD_NEON) ? "Yes" : "No"); printf(" Extensions:\n"); printf(" FMA: %s\n", g_simd_info.has_fma ? "Yes" : "No"); printf(" POPCNT: %s\n", g_simd_info.has_popcnt ? "Yes" : "No"); }
O3
c
simd_print_info: pushq %r14 pushq %rbx pushq %rax cmpb $0x0, 0x945b(%rip) # 0xf0d9 jne 0x5c85 callq 0x59d4 leaq 0x54d4(%rip), %rdi # 0xb160 callq 0x1060 movq 0x9430(%rip), %rsi # 0xf0c8 leaq 0x53c2(%rip), %rdi # 0xb061 xorl %eax, %eax callq 0x10a0 movl 0x9424(%rip), %esi # 0xf0d0 leaq 0x53b9(%rip), %rdi # 0xb06c xorl %eax, %eax callq 0x10a0 leaq 0x54b1(%rip), %rdi # 0xb172 callq 0x1060 testb $0x1, 0x93f3(%rip) # 0xf0c0 leaq 0x53c6(%rip), %r14 # 0xb09a leaq 0x53bb(%rip), %rbx # 0xb096 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x539c(%rip), %rdi # 0xb085 xorl %eax, %eax callq 0x10a0 testb $0x2, 0x93c9(%rip) # 0xf0c0 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x5398(%rip), %rdi # 0xb09d xorl %eax, %eax callq 0x10a0 testb $0x4, 0x93ad(%rip) # 0xf0c0 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x538d(%rip), %rdi # 0xb0ae xorl %eax, %eax callq 0x10a0 testb $0x8, 0x9391(%rip) # 0xf0c0 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x5382(%rip), %rdi # 0xb0bf xorl %eax, %eax callq 0x10a0 testb $0x10, 0x9375(%rip) # 0xf0c0 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x5377(%rip), %rdi # 0xb0d0 xorl %eax, %eax callq 0x10a0 testb $0x20, 0x9359(%rip) # 0xf0c0 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x536c(%rip), %rdi # 0xb0e1 xorl %eax, %eax callq 0x10a0 testb $0x40, 0x933d(%rip) # 0xf0c0 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x5361(%rip), %rdi # 0xb0f2 xorl %eax, %eax callq 0x10a0 cmpb $0x0, 0x9321(%rip) # 0xf0c0 movq %rbx, %rsi cmovnsq %r14, %rsi leaq 0x5356(%rip), %rdi # 0xb103 xorl %eax, %eax callq 0x10a0 btl $0x8, 0x9304(%rip) # 0xf0c0 movq %rbx, %rsi cmovaeq %r14, %rsi leaq 0x534a(%rip), %rdi # 0xb114 xorl %eax, %eax callq 0x10a0 btl $0x9, 0x92e7(%rip) # 0xf0c0 movq %rbx, %rsi cmovaeq %r14, %rsi leaq 0x533e(%rip), %rdi # 0xb125 xorl %eax, %eax callq 0x10a0 leaq 0x5391(%rip), %rdi # 0xb186 callq 0x1060 cmpb $0x0, 0x92d3(%rip) # 0xf0d4 movq %rbx, %rsi cmoveq %r14, %rsi leaq 0x5327(%rip), %rdi # 0xb136 xorl %eax, %eax callq 0x10a0 cmpb $0x0, 0x92b8(%rip) # 0xf0d5 cmoveq %r14, %rbx leaq 0x531f(%rip), %rdi # 0xb147 movq %rbx, %rsi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 jmp 0x10a0 nopl (%rax)
simd_print_info: push r14 push rbx push rax cmp cs:g_simd_initialized, 0 jnz short loc_5C85 call simd_init loc_5C85: lea rdi, aSimdInformatio; "SIMD Information:" call _puts mov rsi, cs:off_F0C8; "Unknown" lea rdi, aCpuS; " CPU: %s\n" xor eax, eax call _printf mov esi, cs:dword_F0D0 lea rdi, aVectorSizeDByt; " Vector size: %d bytes\n" xor eax, eax call _printf lea rdi, aInstructionSet; " Instruction sets:" call _puts test byte ptr cs:g_simd_info, 1 lea r14, aNo; "No" lea rbx, aYes; "Yes" mov rsi, rbx cmovz rsi, r14 lea rdi, aSseS; " SSE: %s\n" xor eax, eax call _printf test byte ptr cs:g_simd_info, 2 mov rsi, rbx cmovz rsi, r14 lea rdi, aSse2S; " SSE2: %s\n" xor eax, eax call _printf test byte ptr cs:g_simd_info, 4 mov rsi, rbx cmovz rsi, r14 lea rdi, aSse3S; " SSE3: %s\n" xor eax, eax call _printf test byte ptr cs:g_simd_info, 8 mov rsi, rbx cmovz rsi, r14 lea rdi, aSsse3S; " SSSE3: %s\n" xor eax, eax call _printf test byte ptr cs:g_simd_info, 10h mov rsi, rbx cmovz rsi, r14 lea rdi, aSse41S; " SSE4.1: %s\n" xor eax, eax call _printf test byte ptr cs:g_simd_info, 20h mov rsi, rbx cmovz rsi, r14 lea rdi, aSse42S; " SSE4.2: %s\n" xor eax, eax call _printf test byte ptr cs:g_simd_info, 40h mov rsi, rbx cmovz rsi, r14 lea rdi, aAvxS; " AVX: %s\n" xor eax, eax call _printf cmp byte ptr cs:g_simd_info, 0 mov rsi, rbx cmovns rsi, r14 lea rdi, aAvx2S; " AVX2: %s\n" xor eax, eax call _printf bt cs:g_simd_info, 8 mov rsi, rbx cmovnb rsi, r14 lea rdi, aAvx512S; " AVX-512: %s\n" xor eax, eax call _printf bt cs:g_simd_info, 9 mov rsi, rbx cmovnb rsi, r14 lea rdi, aNeonS; " NEON: %s\n" xor eax, eax call _printf lea rdi, aExtensions; " Extensions:" call _puts cmp cs:byte_F0D4, 0 mov rsi, rbx cmovz rsi, r14 lea rdi, aFmaS; " FMA: %s\n" xor eax, eax call _printf cmp cs:byte_F0D5, 0 cmovz rbx, r14 lea rdi, aPopcntS; " POPCNT: %s\n" mov rsi, rbx xor eax, eax add rsp, 8 pop rbx pop r14 jmp _printf
long long simd_print_info(long long a1, unsigned long long a2, long long a3, long long a4, long long a5, long long a6) { long long v6; // rsi long long v7; // rdx const char *v8; // rbx const char *v9; // rsi const char *v10; // rsi const char *v11; // rsi const char *v12; // rsi const char *v13; // rsi const char *v14; // rsi const char *v15; // rsi const char *v16; // rsi const char *v17; // rsi const char *v18; // rsi long long v19; // rdx const char *v20; // rsi if ( !g_simd_initialized ) simd_init(a1, a2, a3, a4, a5, a6); puts("SIMD Information:", a2, a3); printf(" CPU: %s\n", off_F0C8); v6 = (unsigned int)dword_F0D0; printf(" Vector size: %d bytes\n", dword_F0D0); puts(" Instruction sets:", v6, v7); v8 = "Yes"; v9 = "Yes"; if ( (g_simd_info & 1) == 0 ) v9 = "No"; printf(" SSE: %s\n", v9); v10 = "Yes"; if ( (g_simd_info & 2) == 0 ) v10 = "No"; printf(" SSE2: %s\n", v10); v11 = "Yes"; if ( (g_simd_info & 4) == 0 ) v11 = "No"; printf(" SSE3: %s\n", v11); v12 = "Yes"; if ( (g_simd_info & 8) == 0 ) v12 = "No"; printf(" SSSE3: %s\n", v12); v13 = "Yes"; if ( (g_simd_info & 0x10) == 0 ) v13 = "No"; printf(" SSE4.1: %s\n", v13); v14 = "Yes"; if ( (g_simd_info & 0x20) == 0 ) v14 = "No"; printf(" SSE4.2: %s\n", v14); v15 = "Yes"; if ( (g_simd_info & 0x40) == 0 ) v15 = "No"; printf(" AVX: %s\n", v15); v16 = "Yes"; if ( (g_simd_info & 0x80u) == 0 ) v16 = "No"; printf(" AVX2: %s\n", v16); v17 = "Yes"; if ( !_bittest(&g_simd_info, 8u) ) v17 = "No"; printf(" AVX-512: %s\n", v17); v18 = "Yes"; if ( !_bittest(&g_simd_info, 9u) ) v18 = "No"; printf(" NEON: %s\n", v18); puts(" Extensions:", v18, v19); v20 = "Yes"; if ( !byte_F0D4 ) v20 = "No"; printf(" FMA: %s\n", v20); if ( !byte_F0D5 ) v8 = "No"; return printf(" POPCNT: %s\n", v8); }
20,841
Object::Object()
csit-sgu[P]mit-game-2025_1/internal.hpp
Object() : enabled(true) , position({0, 0}) , render(Render()) , collider(Collider()) , physics(Physics()) , bullet(Bullet()) , player(Player()) , gui_draw(nullptr) , finish(Finish()) , enemy(Enemy()) { static GameId next_id = 0; this->id = next_id++; }
O0
cpp
Object::Object(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) movb $0x1, (%rdi) movl $0x0, 0x10(%rdi) movl $0x0, 0x14(%rdi) addq $0x18, %rdi movq %rdi, -0x30(%rbp) callq 0xea50 movq -0x28(%rbp), %rdi addq $0x50, %rdi movq %rdi, -0x20(%rbp) callq 0xea80 jmp 0xc505 movq -0x28(%rbp), %rdi addq $0x90, %rdi callq 0xeb10 jmp 0xc517 movq -0x28(%rbp), %rdi addq $0xa8, %rdi callq 0xeb50 jmp 0xc529 movq -0x28(%rbp), %rdi addq $0xbc, %rdi callq 0xeb90 jmp 0xc53b movq -0x28(%rbp), %rdi movq $0x0, 0xc8(%rdi) addq $0xd0, %rdi callq 0xebb0 jmp 0xc558 movq -0x28(%rbp), %rdi addq $0xd4, %rdi callq 0xebd0 jmp 0xc56a movq -0x28(%rbp), %rax movq 0x20a3a3(%rip), %rcx # 0x216918 movq %rcx, %rdx addq $0x1, %rdx movq %rdx, 0x20a395(%rip) # 0x216918 movq %rcx, 0x8(%rax) addq $0x30, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x10(%rbp) movl %eax, -0x14(%rbp) jmp 0xc5b0 movq -0x20(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x10(%rbp) movl %eax, -0x14(%rbp) callq 0xebf0 movq -0x30(%rbp), %rdi callq 0xcdb0 movq -0x10(%rbp), %rdi callq 0xa9e0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN6ObjectC2Ev: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_28], rdi mov byte ptr [rdi], 1 mov dword ptr [rdi+10h], 0 mov dword ptr [rdi+14h], 0 add rdi, 18h; this mov [rbp+var_30], rdi call _ZN6RenderC2Ev; Render::Render(void) mov rdi, [rbp+var_28] add rdi, 50h ; 'P'; this mov [rbp+var_20], rdi call _ZN8ColliderC2Ev; Collider::Collider(void) jmp short $+2 loc_C505: mov rdi, [rbp+var_28] add rdi, 90h; this call _ZN7PhysicsC2Ev; Physics::Physics(void) jmp short $+2 loc_C517: mov rdi, [rbp+var_28] add rdi, 0A8h; this call _ZN6BulletC2Ev; Bullet::Bullet(void) jmp short $+2 loc_C529: mov rdi, [rbp+var_28] add rdi, 0BCh; this call _ZN6PlayerC2Ev; Player::Player(void) jmp short $+2 loc_C53B: mov rdi, [rbp+var_28] mov qword ptr [rdi+0C8h], 0 add rdi, 0D0h; this call _ZN6FinishC2Ev; Finish::Finish(void) jmp short $+2 loc_C558: mov rdi, [rbp+var_28] add rdi, 0D4h; this call _ZN5EnemyC2Ev; Enemy::Enemy(void) jmp short $+2 loc_C56A: mov rax, [rbp+var_28] mov rcx, cs:_ZZN6ObjectC1EvE7next_id; Object::Object(void)::next_id mov rdx, rcx add rdx, 1 mov cs:_ZZN6ObjectC1EvE7next_id, rdx; Object::Object(void)::next_id mov [rax+8], rcx add rsp, 30h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_10], rcx mov [rbp+var_14], eax jmp short loc_C5B0 mov rdi, [rbp+var_20]; this mov rcx, rax mov eax, edx mov [rbp+var_10], rcx mov [rbp+var_14], eax call _ZN8ColliderD2Ev; Collider::~Collider() loc_C5B0: mov rdi, [rbp+var_30]; this call _ZN6RenderD2Ev; Render::~Render() mov rdi, [rbp+var_10] call __Unwind_Resume
void Object::Object(Object *this) { long long v1; // rcx *(_BYTE *)this = 1; *((_DWORD *)this + 4) = 0; *((_DWORD *)this + 5) = 0; Render::Render((Object *)((char *)this + 24)); Collider::Collider((Object *)((char *)this + 80)); Physics::Physics((Object *)((char *)this + 144)); Bullet::Bullet((Object *)((char *)this + 168)); Player::Player((Object *)((char *)this + 188)); *((_QWORD *)this + 25) = 0LL; Finish::Finish((Object *)((char *)this + 208)); Enemy::Enemy((Object *)((char *)this + 212)); v1 = Object::Object(void)::next_id++; *((_QWORD *)this + 1) = v1; }
Object: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI MOV byte ptr [RDI],0x1 MOV dword ptr [RDI + 0x10],0x0 MOV dword ptr [RDI + 0x14],0x0 ADD RDI,0x18 MOV qword ptr [RBP + -0x30],RDI CALL 0x0010ea50 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x50 MOV qword ptr [RBP + -0x20],RDI LAB_0010c4fe: CALL 0x0010ea80 JMP 0x0010c505 LAB_0010c505: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x90 LAB_0010c510: CALL 0x0010eb10 JMP 0x0010c517 LAB_0010c517: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xa8 CALL 0x0010eb50 JMP 0x0010c529 LAB_0010c529: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xbc CALL 0x0010eb90 JMP 0x0010c53b LAB_0010c53b: MOV RDI,qword ptr [RBP + -0x28] MOV qword ptr [RDI + 0xc8],0x0 ADD RDI,0xd0 CALL 0x0010ebb0 JMP 0x0010c558 LAB_0010c558: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xd4 CALL 0x0010ebd0 LAB_0010c568: JMP 0x0010c56a LAB_0010c56a: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [0x00316918] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [0x00316918],RDX MOV qword ptr [RAX + 0x8],RCX ADD RSP,0x30 POP RBP RET
/* Object::Object() */ void __thiscall Object::Object(Object *this) { long lVar1; *this = (Object)0x1; *(int4 *)(this + 0x10) = 0; *(int4 *)(this + 0x14) = 0; Render::Render((Render *)(this + 0x18)); /* try { // try from 0010c4fe to 0010c502 has its CatchHandler @ 0010c58d */ Collider::Collider((Collider *)(this + 0x50)); /* try { // try from 0010c510 to 0010c567 has its CatchHandler @ 0010c59b */ Physics::Physics((Physics *)(this + 0x90)); Bullet::Bullet((Bullet *)(this + 0xa8)); Player::Player((Player *)(this + 0xbc)); *(int8 *)(this + 200) = 0; Finish::Finish((Finish *)(this + 0xd0)); Enemy::Enemy((Enemy *)(this + 0xd4)); lVar1 = Object()::next_id + 1; *(long *)(this + 8) = Object()::next_id; Object()::next_id = lVar1; return; }
20,842
Object::Object()
csit-sgu[P]mit-game-2025_1/internal.hpp
Object() : enabled(true) , position({0, 0}) , render(Render()) , collider(Collider()) , physics(Physics()) , bullet(Bullet()) , player(Player()) , gui_draw(nullptr) , finish(Finish()) , enemy(Enemy()) { static GameId next_id = 0; this->id = next_id++; }
O2
cpp
Object::Object(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movb $0x1, (%rdi) leaq 0x38(%rdi), %rax xorl %ecx, %ecx movb %cl, 0x18(%rdi) andq $0x0, 0x10(%rdi) movq %rax, 0x28(%rdi) andq $0x0, 0x30(%rdi) leaq 0x28(%rdi), %r14 movb %cl, 0x38(%rdi) addq $0x50, %rdi callq 0xad66 andw $0x0, 0x90(%rbx) movabsq $0x100000000, %rax # imm = 0x100000000 movq %rax, 0xc0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x94(%rbx) andq $0x0, 0xa1(%rbx) movups %xmm0, 0xac(%rbx) xorl %eax, %eax movb %al, 0xbc(%rbx) andq $0x0, 0xc8(%rbx) movb %al, 0xd0(%rbx) movb %al, 0xd4(%rbx) andl $0x0, 0xd8(%rbx) movq 0x119181(%rip), %rax # 0x123878 leaq 0x1(%rax), %rcx movq %rcx, 0x119176(%rip) # 0x123878 movq %rax, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0xa5ac movq %rbx, %rdi callq 0x99b0 nop
_ZN6ObjectC2Ev: push r14 push rbx push rax mov rbx, rdi mov byte ptr [rdi], 1 lea rax, [rdi+38h] xor ecx, ecx mov [rdi+18h], cl and qword ptr [rdi+10h], 0 mov [rdi+28h], rax and qword ptr [rdi+30h], 0 lea r14, [rdi+28h] mov [rdi+38h], cl add rdi, 50h ; 'P'; this call _ZN8ColliderC2Ev; Collider::Collider(void) and word ptr [rbx+90h], 0 mov rax, 100000000h mov [rbx+0C0h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+94h], xmm0 and qword ptr [rbx+0A1h], 0 movups xmmword ptr [rbx+0ACh], xmm0 xor eax, eax mov [rbx+0BCh], al and qword ptr [rbx+0C8h], 0 mov [rbx+0D0h], al mov [rbx+0D4h], al and dword ptr [rbx+0D8h], 0 mov rax, cs:_ZZN6ObjectC1EvE7next_id; Object::Object(void)::next_id lea rcx, [rax+1] mov cs:_ZZN6ObjectC1EvE7next_id, rcx; Object::Object(void)::next_id mov [rbx+8], rax add rsp, 8 pop rbx pop r14 retn mov rbx, rax mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
void Object::Object(Object *this) { long long v1; // rax *(_BYTE *)this = 1; *((_BYTE *)this + 24) = 0; *((_QWORD *)this + 2) = 0LL; *((_QWORD *)this + 5) = (char *)this + 56; *((_QWORD *)this + 6) = 0LL; *((_BYTE *)this + 56) = 0; Collider::Collider((Object *)((char *)this + 80)); *((_WORD *)this + 72) = 0; *((_QWORD *)this + 24) = 0x100000000LL; *(_OWORD *)((char *)this + 148) = 0LL; *(_QWORD *)((char *)this + 161) = 0LL; *(_OWORD *)((char *)this + 172) = 0LL; *((_BYTE *)this + 188) = 0; *((_QWORD *)this + 25) = 0LL; *((_BYTE *)this + 208) = 0; *((_BYTE *)this + 212) = 0; *((_DWORD *)this + 54) = 0; v1 = Object::Object(void)::next_id++; *((_QWORD *)this + 1) = v1; }
Object: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV byte ptr [RDI],0x1 LEA RAX,[RDI + 0x38] XOR ECX,ECX MOV byte ptr [RDI + 0x18],CL AND qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x28],RAX AND qword ptr [RDI + 0x30],0x0 LEA R14,[RDI + 0x28] MOV byte ptr [RDI + 0x38],CL ADD RDI,0x50 LAB_0010a696: CALL 0x0010ad66 LAB_0010a69b: AND word ptr [RBX + 0x90],0x0 MOV RAX,0x100000000 MOV qword ptr [RBX + 0xc0],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x94],XMM0 AND qword ptr [RBX + 0xa1],0x0 MOVUPS xmmword ptr [RBX + 0xac],XMM0 XOR EAX,EAX MOV byte ptr [RBX + 0xbc],AL AND qword ptr [RBX + 0xc8],0x0 MOV byte ptr [RBX + 0xd0],AL MOV byte ptr [RBX + 0xd4],AL AND dword ptr [RBX + 0xd8],0x0 MOV RAX,qword ptr [0x00223878] LEA RCX,[RAX + 0x1] MOV qword ptr [0x00223878],RCX MOV qword ptr [RBX + 0x8],RAX ADD RSP,0x8 POP RBX POP R14 RET
/* Object::Object() */ void __thiscall Object::Object(Object *this) { long lVar1; *this = (Object)0x1; this[0x18] = (Object)0x0; *(int8 *)(this + 0x10) = 0; *(Object **)(this + 0x28) = this + 0x38; *(int8 *)(this + 0x30) = 0; this[0x38] = (Object)0x0; /* try { // try from 0010a696 to 0010a69a has its CatchHandler @ 0010a70e */ Collider::Collider((Collider *)(this + 0x50)); *(int2 *)(this + 0x90) = 0; *(int8 *)(this + 0xc0) = 0x100000000; *(int8 *)(this + 0x94) = 0; *(int8 *)(this + 0x9c) = 0; *(int8 *)(this + 0xa1) = 0; *(int8 *)(this + 0xac) = 0; *(int8 *)(this + 0xb4) = 0; this[0xbc] = (Object)0x0; *(int8 *)(this + 200) = 0; this[0xd0] = (Object)0x0; this[0xd4] = (Object)0x0; *(int4 *)(this + 0xd8) = 0; lVar1 = Object()::next_id + 1; *(long *)(this + 8) = Object()::next_id; Object()::next_id = lVar1; return; }
20,843
translog_free_link
eloqsql/storage/maria/ma_loghandler.c
static void translog_free_link(PAGECACHE_BLOCK_LINK *direct_link) { DBUG_ENTER("translog_free_link"); DBUG_PRINT("info", ("Direct link: %p", direct_link)); if (direct_link) pagecache_unlock_by_link(log_descriptor.pagecache, direct_link, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); DBUG_VOID_RETURN; }
O0
c
translog_free_link: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) jmp 0x560fe cmpq $0x0, -0x8(%rbp) je 0x56138 movq 0x424554(%rip), %rdi # 0x47a660 movq -0x8(%rbp), %rsi movl $0x5, %edx movl $0x3, %ecx xorl %eax, %eax movl %eax, %r9d xorl %eax, %eax movq %r9, %r8 movl $0x0, (%rsp) movl $0x0, 0x8(%rsp) callq 0x2ea90 jmp 0x5613a jmp 0x5613c addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_free_link: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi jmp short $+2 loc_560FE: cmp [rbp+var_8], 0 jz short loc_56138 mov rdi, cs:log_descriptor mov rsi, [rbp+var_8] mov edx, 5 mov ecx, 3 xor eax, eax mov r9d, eax xor eax, eax mov r8, r9 mov [rsp+20h+var_20], 0 mov [rsp+20h+var_18], 0 call pagecache_unlock_by_link loc_56138: jmp short $+2 loc_5613A: jmp short $+2 loc_5613C: add rsp, 20h pop rbp retn
long long translog_free_link(long long a1) { long long result; // rax if ( a1 ) return pagecache_unlock_by_link((_QWORD *)log_descriptor[0], a1, 5, 3, 0LL, 0LL, 0, 0); return result; }
translog_free_link: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI JMP 0x001560fe LAB_001560fe: CMP qword ptr [RBP + -0x8],0x0 JZ 0x00156138 MOV RDI,qword ptr [0x0057a660] MOV RSI,qword ptr [RBP + -0x8] MOV EDX,0x5 MOV ECX,0x3 XOR EAX,EAX MOV R9D,EAX XOR EAX,EAX MOV R8,R9 MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x0 CALL 0x0012ea90 LAB_00156138: JMP 0x0015613a LAB_0015613a: JMP 0x0015613c LAB_0015613c: ADD RSP,0x20 POP RBP RET
void translog_free_link(long param_1) { if (param_1 != 0) { pagecache_unlock_by_link(log_descriptor,param_1,5,3,0,0,0,0); } return; }
20,844
Catch::operator+[abi:cxx11](Catch::StringRef, Catch::StringRef)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
std::string operator+(StringRef lhs, StringRef rhs) { std::string ret; ret.reserve(lhs.size() + rhs.size()); ret += lhs; ret += rhs; return ret; }
O3
cpp
Catch::operator+[abi:cxx11](Catch::StringRef, Catch::StringRef): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %rbp movq %rbp, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) leaq (%r8,%rdx), %rsi callq 0x76b7c movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x78a02 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x78a02 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq %rbp, %rdi je 0x61413 movq (%rbp), %rsi incq %rsi callq 0x17150 movq %r14, %rdi callq 0x17740 nop
_ZN5CatchplB5cxx11ENS_9StringRefES0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea rbp, [rdi+10h] mov [rdi], rbp mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 lea rsi, [r8+rdx] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r13 mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, rbp jz short loc_61413 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61413: mov rdi, r14 call __Unwind_Resume
long long Catch::operator+[abi:cxx11](long long a1, long long a2, long long a3, long long a4, long long a5) { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::reserve(a1, a5 + a3); std::string::append(a1, a2, a3); std::string::append(a1, a4, a5); return a1; }
operator+[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBX,RDI LEA RBP,[RDI + 0x10] MOV qword ptr [RDI],RBP MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LEA RSI,[R8 + RDX*0x1] LAB_001613c9: CALL 0x00176b7c MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x00178a02 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00178a02 LAB_001613ea: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Catch::operator+[abi:cxx11](Catch::StringRef, Catch::StringRef) */ string * Catch::operator+[abi_cxx11_ (string *param_1,char *param_2,ulong param_3,char *param_4,ulong param_5) { *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; /* try { // try from 001613c9 to 001613e9 has its CatchHandler @ 001613fc */ std::__cxx11::string::reserve(param_1,param_5 + param_3); std::__cxx11::string::append(param_1,param_2,param_3); std::__cxx11::string::append(param_1,param_4,param_5); return param_1; }
20,845
HeapVerifyIntegrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
int HeapVerifyIntegrity(int repair) { int segments_verified = 0; int segments_repaired = 0; int errors = verify_heap_integrity(repair, &segments_verified, &segments_repaired); HEAP_LOG("Integrity verification results: %d segments, %d errors, %d repaired\n", segments_verified, errors, segments_repaired); // Return the number of errors found (0 = no errors) return errors; }
O1
c
HeapVerifyIntegrity: pushq %rax xorl %eax, %eax leaq 0x4(%rsp), %rsi movl %eax, (%rsi) movq %rsp, %rdx movl %eax, (%rdx) callq 0x3ecf popq %rcx retq
HeapVerifyIntegrity: push rax xor eax, eax lea rsi, [rsp+8+var_4] mov [rsi], eax mov rdx, rsp mov [rdx], eax call verify_heap_integrity pop rcx retn
long long HeapVerifyIntegrity(int a1) { int v2; // [rsp-4h] [rbp-8h] BYREF int v3; // [rsp+0h] [rbp-4h] BYREF v3 = 0; v2 = 0; return verify_heap_integrity(a1, &v3, &v2); }
HeapVerifyIntegrity: PUSH RAX XOR EAX,EAX LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],EAX MOV RDX,RSP MOV dword ptr [RDX],EAX CALL 0x00103ecf POP RCX RET
void HeapVerifyIntegrity(void) { verify_heap_integrity(); return; }
20,846
HeapVerifyIntegrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
int HeapVerifyIntegrity(int repair) { int segments_verified = 0; int segments_repaired = 0; int errors = verify_heap_integrity(repair, &segments_verified, &segments_repaired); HEAP_LOG("Integrity verification results: %d segments, %d errors, %d repaired\n", segments_verified, errors, segments_repaired); // Return the number of errors found (0 = no errors) return errors; }
O3
c
HeapVerifyIntegrity: pushq %rax leaq 0x4(%rsp), %rsi movq %rsp, %rdx callq 0x3e79 popq %rcx retq
HeapVerifyIntegrity: push rax lea rsi, [rsp+8+var_4] mov rdx, rsp call verify_heap_integrity pop rcx retn
long long HeapVerifyIntegrity(int a1) { long long v1; // rax long long v3; // [rsp-4h] [rbp-8h] BYREF v3 = v1; return verify_heap_integrity(a1, (_DWORD *)&v3 + 1, &v3); }
HeapVerifyIntegrity: PUSH RAX LEA RSI,[RSP + 0x4] MOV RDX,RSP CALL 0x00103e79 POP RCX RET
void HeapVerifyIntegrity(int8 param_1) { int1 auStack_8 [4]; int1 local_4 [4]; verify_heap_integrity(param_1,local_4,auStack_8); return; }
20,847
my_mb_wc_gbk
eloqsql/strings/ctype-gbk.c
static int my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; hi=s[0]; if (hi<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_gbk_uni_onechar( (hi<<8) + s[1]))) return -2; return 2; }
O0
c
my_mb_wc_gbk: 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 0x3dd2e movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x3de09 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, -0x2c(%rbp) jge 0x3dd58 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x3de09 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x3dd72 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x3de09 movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0x3ddcc movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xfe, %eax jg 0x3ddcc movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x40, %eax cmpl %ecx, %eax jg 0x3ddac movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7e, %eax jle 0x3ddd5 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x80, %eax cmpl %ecx, %eax jg 0x3ddcc movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0x3ddd5 movl $0x0, -0x4(%rbp) jmp 0x3de09 movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi callq 0x3e150 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x3de02 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x3de09 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_mb_wc_gbk: 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_3DD2E mov [rbp+var_4], 0FFFFFF9Bh jmp loc_3DE09 loc_3DD2E: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp [rbp+var_2C], 80h jge short loc_3DD58 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_3DE09 loc_3DD58: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_3DD72 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_3DE09 loc_3DD72: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 81h cmp eax, ecx jg short loc_3DDCC mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0FEh jg short loc_3DDCC mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 40h ; '@' cmp eax, ecx jg short loc_3DDAC mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jle short loc_3DDD5 loc_3DDAC: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 80h cmp eax, ecx jg short loc_3DDCC mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_3DDD5 loc_3DDCC: mov [rbp+var_4], 0 jmp short loc_3DE09 loc_3DDD5: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax call func_gbk_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_3DE02 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_3DE09 loc_3DE02: mov [rbp+var_4], 2 loc_3DE09: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_gbk(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 < 0x81u || (unsigned __int8)v6 == 255 || (a3[1] < 0x40u || a3[1] > 0x7Eu) && (a3[1] < 0x80u || a3[1] == 255) ) { return 0; } else { v4 = func_gbk_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_gbk: 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 0x0013dd2e MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0013de09 LAB_0013dd2e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x80 JGE 0x0013dd58 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013de09 LAB_0013dd58: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0013dd72 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0013de09 LAB_0013dd72: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0x81 CMP EAX,ECX JG 0x0013ddcc MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xfe JG 0x0013ddcc MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x40 CMP EAX,ECX JG 0x0013ddac MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JLE 0x0013ddd5 LAB_0013ddac: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x80 CMP EAX,ECX JG 0x0013ddcc MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x0013ddd5 LAB_0013ddcc: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013de09 LAB_0013ddd5: 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 0x0013e150 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x0013de02 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x0013de09 LAB_0013de02: MOV dword ptr [RBP + -0x4],0x2 LAB_0013de09: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_gbk(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 < 0x81) || (0xfe < uVar1)) || (((param_3[1] < 0x40 || (0x7e < param_3[1])) && ((param_3[1] < 0x80 || (param_3[1] == 0xff)))))) { local_c = 0; } else { iVar2 = func_gbk_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; }
20,848
mariadb_server_version_id
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t mariadb_server_version_id(MYSQL *mysql) { size_t major, minor, patch; char *p; if (!(p = mysql->server_version)) { return 0; } major = strtol(p, &p, 10); p += 1; /* consume the dot */ minor = strtol(p, &p, 10); p += 1; /* consume the dot */ patch = strtol(p, &p, 10); return (major * 10000L + (unsigned long)(minor * 100L + patch)); }
O3
c
mariadb_server_version_id: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, -0x20(%rbp) testq %rdi, %rdi je 0x231d9 leaq -0x20(%rbp), %rbx movq %rbx, %rsi movl $0xa, %edx callq 0x17810 movq %rax, %r14 movq (%rbx), %rdi incq %rdi movq %rdi, (%rbx) movq %rbx, %rsi movl $0xa, %edx callq 0x17810 movq %rax, %r15 movq (%rbx), %rdi incq %rdi movq %rdi, (%rbx) movq %rbx, %rsi movl $0xa, %edx callq 0x17810 movq %rax, %rcx imulq $0x2710, %r14, %rax # imm = 0x2710 imulq $0x64, %r15, %rdx addq %rcx, %rax addq %rdx, %rax jmp 0x231db xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mariadb_server_version_id: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov [rbp+var_20], rdi test rdi, rdi jz short loc_231D9 lea rbx, [rbp+var_20] mov rsi, rbx mov edx, 0Ah call _strtol mov r14, rax mov rdi, [rbx] inc rdi mov [rbx], rdi mov rsi, rbx mov edx, 0Ah call _strtol mov r15, rax mov rdi, [rbx] inc rdi mov [rbx], rdi mov rsi, rbx mov edx, 0Ah call _strtol mov rcx, rax imul rax, r14, 2710h imul rdx, r15, 64h ; 'd' add rax, rcx add rax, rdx jmp short loc_231DB loc_231D9: xor eax, eax loc_231DB: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mariadb_server_version_id(long long a1) { long long v1; // r14 long long v2; // r15 _QWORD v4[4]; // [rsp+0h] [rbp-20h] BYREF v4[0] = a1; if ( !a1 ) return 0LL; v1 = strtol(a1, v4, 10LL); v2 = strtol(++v4[0], v4, 10LL); return 100 * v2 + strtol(v4[0] + 1LL, v4, 10LL) + 10000 * v1; }
mariadb_server_version_id: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x20],RDI TEST RDI,RDI JZ 0x001231d9 LEA RBX,[RBP + -0x20] MOV RSI,RBX MOV EDX,0xa CALL 0x00117810 MOV R14,RAX MOV RDI,qword ptr [RBX] INC RDI MOV qword ptr [RBX],RDI MOV RSI,RBX MOV EDX,0xa CALL 0x00117810 MOV R15,RAX MOV RDI,qword ptr [RBX] INC RDI MOV qword ptr [RBX],RDI MOV RSI,RBX MOV EDX,0xa CALL 0x00117810 MOV RCX,RAX IMUL RAX,R14,0x2710 IMUL RDX,R15,0x64 ADD RAX,RCX ADD RAX,RDX JMP 0x001231db LAB_001231d9: XOR EAX,EAX LAB_001231db: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
long mariadb_server_version_id(char *param_1) { long lVar1; long lVar2; long lVar3; char *local_28; if (param_1 == (char *)0x0) { lVar1 = 0; } else { local_28 = param_1; lVar1 = strtol(param_1,&local_28,10); local_28 = local_28 + 1; lVar2 = strtol(local_28,&local_28,10); local_28 = local_28 + 1; lVar3 = strtol(local_28,&local_28,10); lVar1 = lVar1 * 10000 + lVar3 + lVar2 * 100; } return lVar1; }
20,849
js_promise_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_promise_finalizer(JSRuntime *rt, JSValue val) { JSPromiseData *s = JS_GetOpaque(val, JS_CLASS_PROMISE); struct list_head *el, *el1; int i; if (!s) return; for(i = 0; i < 2; i++) { list_for_each_safe(el, el1, &s->promise_reactions[i]) { JSPromiseReactionData *rd = list_entry(el, JSPromiseReactionData, link); promise_reaction_data_free(rt, rd); } } JS_FreeValueRT(rt, s->promise_result); js_free_rt(rt, s); }
O1
c
js_promise_finalizer: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsi, (%rsp) cmpl $-0x1, %edx jne 0x526c5 movq (%rsp), %rax cmpw $0x31, 0x6(%rax) jne 0x526c5 movq 0x30(%rax), %r14 jmp 0x526c8 xorl %r14d, %r14d testq %r14, %r14 je 0x52752 leaq 0x8(%r14), %r15 xorl %r12d, %r12d movq %r12, %rax shlq $0x4, %rax leaq (%r15,%rax), %r13 movq 0x8(%r15,%rax), %rsi cmpq %r13, %rsi je 0x52701 movq 0x8(%rsi), %rbp movq %rbx, %rdi callq 0x441e9 movq %rbp, %rsi cmpq %r13, %rbp jne 0x526ed leaq 0x1(%r12), %rax testq %r12, %r12 movq %rax, %r12 je 0x526d8 movq 0x30(%r14), %rsi movq 0x38(%r14), %rdx movq %rbx, %rdi callq 0x1d8c6 decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x10(%rbx), %rcx movq 0x30(%rbx), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%rbx) movq 0x40(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_finalizer: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov [rsp+38h+var_38], rsi cmp edx, 0FFFFFFFFh jnz short loc_526C5 mov rax, [rsp+38h+var_38] cmp word ptr [rax+6], 31h ; '1' jnz short loc_526C5 mov r14, [rax+30h] jmp short loc_526C8 loc_526C5: xor r14d, r14d loc_526C8: test r14, r14 jz loc_52752 lea r15, [r14+8] xor r12d, r12d loc_526D8: mov rax, r12 shl rax, 4 lea r13, [r15+rax] mov rsi, [r15+rax+8] cmp rsi, r13 jz short loc_52701 loc_526ED: mov rbp, [rsi+8] mov rdi, rbx call promise_reaction_data_free mov rsi, rbp cmp rbp, r13 jnz short loc_526ED loc_52701: lea rax, [r12+1] test r12, r12 mov r12, rax jz short loc_526D8 mov rsi, [r14+30h] mov rdx, [r14+38h] mov rdi, rbx call JS_FreeValueRT dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+10h] mov rdx, [rbx+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx mov rdi, [rbx+40h] mov rsi, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rcx loc_52752: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void js_promise_finalizer(long long a1, long long a2, int a3) { long long v3; // r14 long long v4; // r15 long long v5; // r12 long long v6; // rsi long long v7; // rbp long long v9; // rax void ( *v10)(_QWORD, long long); // rcx if ( a3 == -1 && *(_WORD *)(a2 + 6) == 49 ) v3 = *(_QWORD *)(a2 + 48); else v3 = 0LL; if ( v3 ) { v4 = v3 + 8; v5 = 0LL; do { v6 = *(_QWORD *)(v4 + 16 * v5 + 8); if ( v6 != v4 + 16 * v5 ) { do { v7 = *(_QWORD *)(v6 + 8); promise_reaction_data_free(a1, v6); v6 = v7; } while ( v7 != v4 + 16 * v5 ); } } while ( v5++ == 0 ); JS_FreeValueRT(a1, *(_DWORD **)(v3 + 48), *(_QWORD *)(v3 + 56)); --*(_QWORD *)(a1 + 40); v9 = (*(long long ( **)(long long))(a1 + 32))(v3); v10 = *(void ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v9 - 8; v10(*(_QWORD *)(a1 + 64), v3); } }
js_promise_finalizer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV qword ptr [RSP],RSI CMP EDX,-0x1 JNZ 0x001526c5 MOV RAX,qword ptr [RSP] CMP word ptr [RAX + 0x6],0x31 JNZ 0x001526c5 MOV R14,qword ptr [RAX + 0x30] JMP 0x001526c8 LAB_001526c5: XOR R14D,R14D LAB_001526c8: TEST R14,R14 JZ 0x00152752 LEA R15,[R14 + 0x8] XOR R12D,R12D LAB_001526d8: MOV RAX,R12 SHL RAX,0x4 LEA R13,[R15 + RAX*0x1] MOV RSI,qword ptr [R15 + RAX*0x1 + 0x8] CMP RSI,R13 JZ 0x00152701 LAB_001526ed: MOV RBP,qword ptr [RSI + 0x8] MOV RDI,RBX CALL 0x001441e9 MOV RSI,RBP CMP RBP,R13 JNZ 0x001526ed LAB_00152701: LEA RAX,[R12 + 0x1] TEST R12,R12 MOV R12,RAX JZ 0x001526d8 MOV RSI,qword ptr [R14 + 0x30] MOV RDX,qword ptr [R14 + 0x38] MOV RDI,RBX CALL 0x0011d8c6 DEC qword ptr [RBX + 0x28] MOV RDI,R14 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RCX LAB_00152752: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void js_promise_finalizer(long param_1,long param_2,int param_3) { long lVar1; long lVar2; long lVar3; bool bVar4; if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x31)) { lVar3 = *(long *)(param_2 + 0x30); } else { lVar3 = 0; } if (lVar3 == 0) { return; } lVar2 = 0; do { lVar1 = *(long *)(lVar3 + 0x10 + lVar2 * 0x10); while (lVar1 != lVar3 + 8 + lVar2 * 0x10) { lVar1 = *(long *)(lVar1 + 8); promise_reaction_data_free(param_1); } bVar4 = lVar2 == 0; lVar2 = lVar2 + 1; } while (bVar4); JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x30),*(int8 *)(lVar3 + 0x38)); *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar2 = (**(code **)(param_1 + 0x20))(lVar3); lVar2 = (*(long *)(param_1 + 0x30) - lVar2) + -8; *(long *)(param_1 + 0x30) = lVar2; /* WARNING: Could not recover jumptable at 0x00152750. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),lVar3,lVar2,*(code **)(param_1 + 0x10)); return; }
20,850
testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-port.cc
GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line) : severity_(severity) { const char* const marker = severity == GTEST_INFO ? "[ INFO ]" : severity == GTEST_WARNING ? "[WARNING]" : severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]"; GetStream() << ::std::endl << marker << " " << FormatFileLocation(file, line).c_str() << ": "; }
O3
cpp
testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movl %ecx, %ebp movq %rdx, %r14 movl %esi, (%rdi) cmpl $0x2, %esi leaq 0x2b9cd(%rip), %rax # 0x424f0 leaq 0x2b9d0(%rip), %rcx # 0x424fa cmoveq %rax, %rcx cmpl $0x1, %esi leaq 0x2b9ae(%rip), %rax # 0x424e6 cmovneq %rcx, %rax testl %esi, %esi leaq 0x2b997(%rip), %r15 # 0x424dc cmovneq %rax, %r15 movq 0x42498(%rip), %rbx # 0x58fe8 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x8490 movsbl %al, %esi movq %rbx, %rdi callq 0x8050 movq %rax, %rdi callq 0x8320 movq %rax, %rbx movl $0x9, %edx movq %rax, %rdi movq %r15, %rsi callq 0x85b0 leaq 0x2c054(%rip), %rsi # 0x42be5 movl $0x1, %edx movq %rbx, %rdi callq 0x85b0 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movl %ebp, %edx callq 0x1663e movq (%r15), %r14 testq %r14, %r14 je 0x16bd0 movq %r14, %rdi callq 0x8200 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x85b0 jmp 0x16be9 movq (%rbx), %rax movq -0x18(%rax), %rax movq %rbx, %rdi addq %rax, %rdi movl 0x20(%rbx,%rax), %esi orl $0x1, %esi callq 0x8930 leaq 0x2cb24(%rip), %rsi # 0x43714 movl $0x2, %edx movq %rbx, %rdi callq 0x85b0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x16c18 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x16c41 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci: push rbp; int push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov ebp, ecx mov r14, rdx mov [rdi], esi cmp esi, 2 lea rax, aError; "[ ERROR ]" lea rcx, aFatal; "[ FATAL ]" cmovz rcx, rax cmp esi, 1 lea rax, aWarning; "[WARNING]" cmovnz rax, rcx test esi, esi lea r15, aInfo; "[ INFO ]" cmovnz r15, rax mov rbx, cs:_ZSt4cerr_ptr mov rax, [rbx] mov rdi, [rax-18h] add rdi, rbx mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbx; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rbx, rax mov edx, 9 mov rdi, rax mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, asc_42BE3+2; " " mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea r15, [rsp+48h+var_40] mov rdi, r15; int mov rsi, r14; int mov edx, ebp; int call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int) mov r14, [r15] test r14, r14 jz short loc_16BD0 mov rdi, r14 call _strlen mov rdi, rbx mov rsi, r14 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_16BE9 loc_16BD0: mov rax, [rbx] mov rax, [rax-18h] mov rdi, rbx add rdi, rax mov esi, [rbx+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_16BE9: lea rsi, asc_43713+1; ": " mov edx, 2 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+48h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_16C18 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_16C18: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_16C41 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_16C41: mov rdi, rbx call __Unwind_Resume
void testing::internal::GTestLog::GTestLog(_DWORD *a1, int a2, const char *a3, int a4) { const char *v6; // rcx const char *v7; // rax const char *v8; // r15 char v9; // al std::ostream *v10; // rax _QWORD *v11; // rbx long long *v12; // r14 long long v13; // rax long long *v14; // [rsp+8h] [rbp-40h] BYREF long long v15; // [rsp+18h] [rbp-30h] BYREF *a1 = a2; v6 = "[ FATAL ]"; if ( a2 == 2 ) v6 = "[ ERROR ]"; v7 = "[WARNING]"; if ( a2 != 1 ) v7 = v6; v8 = "[ INFO ]"; if ( a2 ) v8 = v7; v9 = std::ios::widen((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL), 10LL, a3, v6); v10 = (std::ostream *)std::ostream::put((std::ostream *)&std::cerr, v9); v11 = (_QWORD *)std::ostream::flush(v10); std::__ostream_insert<char,std::char_traits<char>>(v11, v8, 9LL); std::__ostream_insert<char,std::char_traits<char>>(v11, " ", 1LL); testing::internal::FormatFileLocation[abi:cxx11]((long long)&v14, a3, a4); v12 = v14; if ( v14 ) { v13 = strlen(v14); std::__ostream_insert<char,std::char_traits<char>>(v11, v12, v13); } else { std::ios::clear( (char *)v11 + *(_QWORD *)(*v11 - 24LL), *(_DWORD *)((char *)v11 + *(_QWORD *)(*v11 - 24LL) + 32) | 1u); } std::__ostream_insert<char,std::char_traits<char>>(v11, ": ", 2LL); if ( v14 != &v15 ) operator delete(v14, v15 + 1); }
GTestLog: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV EBP,ECX MOV R14,RDX MOV dword ptr [RDI],ESI CMP ESI,0x2 LEA RAX,[0x1424f0] LEA RCX,[0x1424fa] CMOVZ RCX,RAX CMP ESI,0x1 LEA RAX,[0x1424e6] CMOVNZ RAX,RCX TEST ESI,ESI LEA R15,[0x1424dc] CMOVNZ R15,RAX MOV RBX,qword ptr [0x00158fe8] MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBX MOV ESI,0xa CALL 0x00108490 MOVSX ESI,AL MOV RDI,RBX CALL 0x00108050 MOV RDI,RAX CALL 0x00108320 MOV RBX,RAX MOV EDX,0x9 MOV RDI,RAX MOV RSI,R15 CALL 0x001085b0 LEA RSI,[0x142be5] MOV EDX,0x1 MOV RDI,RBX CALL 0x001085b0 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 MOV EDX,EBP CALL 0x0011663e MOV R14,qword ptr [R15] TEST R14,R14 JZ 0x00116bd0 MOV RDI,R14 CALL 0x00108200 LAB_00116bc0: MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x001085b0 JMP 0x00116be9 LAB_00116bd0: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] MOV RDI,RBX ADD RDI,RAX MOV ESI,dword ptr [RBX + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00108930 LAB_00116be9: LEA RSI,[0x143714] MOV EDX,0x2 MOV RDI,RBX CALL 0x001085b0 LAB_00116bfd: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00116c18 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_00116c18: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int) */ void __thiscall testing::internal::GTestLog::GTestLog(GTestLog *this,int param_2,char *param_3,int param_4) { char cVar1; long *plVar2; char *pcVar3; ostream *poVar4; size_t sVar5; char *pcVar6; long *local_40 [2]; long local_30 [2]; *(int *)this = param_2; pcVar6 = "[ FATAL ]"; if (param_2 == 2) { pcVar6 = "[ ERROR ]"; } pcVar3 = "[WARNING]"; if (param_2 != 1) { pcVar3 = pcVar6; } pcVar6 = "[ INFO ]"; if (param_2 != 0) { pcVar6 = pcVar3; } cVar1 = (char)PTR_cerr_00158fe8; std::ios::widen((char)*(int8 *)(*(long *)PTR_cerr_00158fe8 + -0x18) + cVar1); std::ostream::put(cVar1); poVar4 = (ostream *)std::ostream::flush(); std::__ostream_insert<char,std::char_traits<char>>(poVar4,pcVar6,9); std::__ostream_insert<char,std::char_traits<char>>(poVar4," ",1); FormatFileLocation_abi_cxx11_((internal *)local_40,param_3,param_4); plVar2 = local_40[0]; if (local_40[0] == (long *)0x0) { std::ios::clear(poVar4 + *(long *)(*(long *)poVar4 + -0x18), *(uint *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x20) | 1); } else { sVar5 = strlen((char *)local_40[0]); /* try { // try from 00116bc0 to 00116bfc has its CatchHandler @ 00116c23 */ std::__ostream_insert<char,std::char_traits<char>>(poVar4,(char *)plVar2,sVar5); } std::__ostream_insert<char,std::char_traits<char>>(poVar4,": ",2); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return; }
20,851
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const
monkey531[P]llama/common/minja.hpp
std::unique_ptr<std::string> parseString() { auto doParse = [&](char quote) -> std::unique_ptr<std::string> { if (it == end || *it != quote) return nullptr; std::string result; bool escape = false; for (++it; it != end; ++it) { if (escape) { escape = false; switch (*it) { case 'n': result += '\n'; break; case 'r': result += '\r'; break; case 't': result += '\t'; break; case 'b': result += '\b'; break; case 'f': result += '\f'; break; case '\\': result += '\\'; break; default: if (*it == quote) { result += quote; } else { result += *it; } break; } } else if (*it == '\\') { escape = true; } else if (*it == quote) { ++it; return std::make_unique<std::string>(std::move(result)); } else { result += *it; } } return nullptr; }; consumeSpaces(); if (it == end) return nullptr; if (*it == '"') return doParse('"'); if (*it == '\'') return doParse('\''); return nullptr; }
O2
cpp
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq (%rsi), %r15 movq 0x18(%r15), %rcx movq 0x20(%r15), %rax cmpq %rcx, %rax je 0x67a35 movl %edx, %ebp cmpb %bpl, (%rax) jne 0x67a35 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) andq $0x0, -0x8(%rdx) movb $0x0, (%rdx) xorl %edx, %edx movl $0x1a29, %r12d # imm = 0x1A29 leaq 0x4b596(%rip), %r13 # 0xb2f74 leaq 0x8(%rsp), %r14 leaq 0x1(%rax), %rsi movq %rsi, 0x20(%r15) cmpq %rcx, %rsi je 0x67a3b movb (%rsi), %cl testb $0x1, %dl je 0x67a12 movsbl %cl, %eax addl $-0x5c, %eax rorl %eax cmpl $0xc, %eax ja 0x67a1e btl %eax, %r12d jae 0x67a1e movl %eax, %eax movb (%rax,%r13), %cl jmp 0x67a1e movb $0x1, %dl cmpb $0x5c, %cl je 0x67a2b cmpb %bpl, %cl je 0x67a5b movsbl %cl, %esi movq %r14, %rdi callq 0x23780 xorl %edx, %edx movq 0x18(%r15), %rcx movq 0x20(%r15), %rax jmp 0x679e3 andq $0x0, (%rbx) jmp 0x67a49 andq $0x0, (%rbx) leaq 0x8(%rsp), %rdi callq 0x24208 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x2, %rax movq %rax, 0x20(%r15) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x67a89 jmp 0x67a3f jmp 0x67a74 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x24208 movq %rbx, %rdi callq 0x23fc0
_ZZN5minja6Parser11parseStringB5cxx11EvENKUlcE_clB5cxx11Ec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov r15, [rsi] mov rcx, [r15+18h] mov rax, [r15+20h] cmp rax, rcx jz short loc_67A35 mov ebp, edx cmp [rax], bpl jnz short loc_67A35 lea rdx, [rsp+58h+var_40] mov [rdx-10h], rdx and qword ptr [rdx-8], 0 mov byte ptr [rdx], 0 xor edx, edx mov r12d, 1A29h lea r13, unk_B2F74 lea r14, [rsp+58h+var_50] loc_679E3: lea rsi, [rax+1] mov [r15+20h], rsi cmp rsi, rcx jz short loc_67A3B mov cl, [rsi] test dl, 1 jz short loc_67A12 movsx eax, cl add eax, 0FFFFFFA4h ror eax, 1 cmp eax, 0Ch ja short loc_67A1E bt r12d, eax jnb short loc_67A1E mov eax, eax mov cl, [rax+r13] jmp short loc_67A1E loc_67A12: mov dl, 1 cmp cl, 5Ch ; '\' jz short loc_67A2B cmp cl, bpl jz short loc_67A5B loc_67A1E: movsx esi, cl mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) xor edx, edx loc_67A2B: mov rcx, [r15+18h] mov rax, [r15+20h] jmp short loc_679E3 loc_67A35: and qword ptr [rbx], 0 jmp short loc_67A49 loc_67A3B: and qword ptr [rbx], 0 loc_67A3F: lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_67A49: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_67A5B: add rax, 2 mov [r15+20h], rax lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZSt11make_uniqueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::string,std::string>(std::string &&) jmp short loc_67A3F jmp short $+2 loc_67A74: mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Parser::parseString[abi:cxx11](void)::{lambda(char)#1}::operator()[abi:cxx11]( _QWORD *a1, long long *a2, char a3) { long long v3; // r15 _BYTE *v4; // rcx _BYTE *v5; // rax long long v7; // rdx int v8; // r12d char v9; // cl unsigned int v10; // eax _QWORD v12[2]; // [rsp+8h] [rbp-50h] BYREF char v13; // [rsp+18h] [rbp-40h] BYREF v3 = *a2; v4 = *(_BYTE **)(*a2 + 24); v5 = *(_BYTE **)(*a2 + 32); if ( v5 == v4 || *v5 != a3 ) { *a1 = 0LL; return a1; } v12[0] = &v13; v12[1] = 0LL; v13 = 0; v7 = 0LL; v8 = 6697; while ( 1 ) { *(_QWORD *)(v3 + 32) = v5 + 1; if ( v5 + 1 == v4 ) { *a1 = 0LL; goto LABEL_15; } v9 = v5[1]; if ( (v7 & 1) != 0 ) { v10 = __ROR4__(v9 - 92, 1); if ( v10 <= 0xC ) { if ( _bittest(&v8, v10) ) v9 = byte_B2F74[v10]; } goto LABEL_11; } LOBYTE(v7) = 1; if ( v9 == 92 ) goto LABEL_12; if ( v9 == a3 ) break; LABEL_11: std::string::push_back(v12, (unsigned int)v9); v7 = 0LL; LABEL_12: v4 = *(_BYTE **)(v3 + 24); v5 = *(_BYTE **)(v3 + 32); } *(_QWORD *)(v3 + 32) = v5 + 2; std::make_unique<std::string,std::string>(a1, v12, v7); LABEL_15: std::string::~string(v12); return a1; }
operator()[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R15,qword ptr [RSI] MOV RCX,qword ptr [R15 + 0x18] MOV RAX,qword ptr [R15 + 0x20] CMP RAX,RCX JZ 0x00167a35 MOV EBP,EDX CMP byte ptr [RAX],BPL JNZ 0x00167a35 LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX AND qword ptr [RDX + -0x8],0x0 MOV byte ptr [RDX],0x0 XOR EDX,EDX MOV R12D,0x1a29 LEA R13,[0x1b2f74] LEA R14,[RSP + 0x8] LAB_001679e3: LEA RSI,[RAX + 0x1] MOV qword ptr [R15 + 0x20],RSI CMP RSI,RCX JZ 0x00167a3b MOV CL,byte ptr [RSI] TEST DL,0x1 JZ 0x00167a12 MOVSX EAX,CL ADD EAX,-0x5c ROR EAX,0x1 CMP EAX,0xc JA 0x00167a1e BT R12D,EAX JNC 0x00167a1e MOV EAX,EAX MOV CL,byte ptr [RAX + R13*0x1] JMP 0x00167a1e LAB_00167a12: MOV DL,0x1 CMP CL,0x5c JZ 0x00167a2b CMP CL,BPL JZ 0x00167a5b LAB_00167a1e: MOVSX ESI,CL MOV RDI,R14 CALL 0x00123780 XOR EDX,EDX LAB_00167a2b: MOV RCX,qword ptr [R15 + 0x18] MOV RAX,qword ptr [R15 + 0x20] JMP 0x001679e3 LAB_00167a35: AND qword ptr [RBX],0x0 JMP 0x00167a49 LAB_00167a3b: AND qword ptr [RBX],0x0 LAB_00167a3f: LEA RDI,[RSP + 0x8] CALL 0x00124208 LAB_00167a49: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00167a5b: ADD RAX,0x2 MOV qword ptr [R15 + 0x20],RAX LAB_00167a63: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00167a89 LAB_00167a70: JMP 0x00167a3f
/* operator()[abi:cxx11](char) const */ string * minja::Parser::parseString[abi:cxx11]()::{lambda(char)#1}::operator()[abi_cxx11_ (char param_1) { char *pcVar1; long lVar2; char *pcVar3; char *pcVar4; char in_DL; bool bVar5; long *in_RSI; int7 in_register_00000039; string *psVar6; int1 *local_50; int8 local_48; int1 local_40 [16]; psVar6 = (string *)CONCAT71(in_register_00000039,param_1); lVar2 = *in_RSI; pcVar4 = *(char **)(lVar2 + 0x18); pcVar3 = *(char **)(lVar2 + 0x20); if ((pcVar3 == pcVar4) || (*pcVar3 != in_DL)) { *(int8 *)psVar6 = 0; } else { local_50 = local_40; local_48 = 0; local_40[0] = 0; bVar5 = false; while( true ) { pcVar1 = pcVar3 + 1; *(char **)(lVar2 + 0x20) = pcVar1; if (pcVar1 == pcVar4) break; if (bVar5) { LAB_00167a1e: /* try { // try from 00167a1e to 00167a28 has its CatchHandler @ 00167a74 */ std::__cxx11::string::push_back((char)&local_50); bVar5 = false; } else { bVar5 = true; if (*pcVar1 != '\\') { if (*pcVar1 != in_DL) goto LAB_00167a1e; *(char **)(lVar2 + 0x20) = pcVar3 + 2; /* try { // try from 00167a63 to 00167a6f has its CatchHandler @ 00167a72 */ std::make_unique<std::__cxx11::string,std::__cxx11::string>(psVar6); goto LAB_00167a3f; } } pcVar4 = *(char **)(lVar2 + 0x18); pcVar3 = *(char **)(lVar2 + 0x20); } *(int8 *)psVar6 = 0; LAB_00167a3f: std::__cxx11::string::~string((string *)&local_50); } return psVar6; }
20,852
ma_dispose
eloqsql/storage/maria/ma_page.c
int _ma_dispose(register MARIA_HA *info, my_off_t pos, my_bool page_not_read) { my_off_t old_link; uchar buff[MAX_KEYPAGE_HEADER_SIZE+ 8 + 2]; ulonglong page_no; MARIA_SHARE *share= info->s; MARIA_PINNED_PAGE page_link; uint block_size= share->block_size; int result= 0; enum pagecache_page_lock lock_method; enum pagecache_page_pin pin_method; DBUG_ENTER("_ma_dispose"); DBUG_PRINT("enter",("page: %lu", (ulong) (pos / block_size))); DBUG_ASSERT(pos % block_size == 0); (void) _ma_lock_key_del(info, 0); old_link= share->key_del_current; share->key_del_current= pos; page_no= pos / block_size; bzero(buff, share->keypage_header); _ma_store_keynr(share, buff, (uchar) MARIA_DELETE_KEY_NR); _ma_store_page_used(share, buff, share->keypage_header + 8); mi_sizestore(buff + share->keypage_header, old_link); share->state.changed|= STATE_NOT_SORTED_PAGES; if (share->now_transactional) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; my_off_t page; /* Store address of deleted page */ page_store(log_data + FILEID_STORE_SIZE, page_no); /* Store link to next unused page (the link that is written to page) */ page= (old_link == HA_OFFSET_ERROR ? IMPOSSIBLE_PAGE_NO : old_link / block_size); 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); if (translog_write_record(&lsn, LOGREC_REDO_INDEX_FREE_PAGE, info->trn, info, (translog_size_t) sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) result= 1; } if (page_not_read) { lock_method= PAGECACHE_LOCK_WRITE; pin_method= PAGECACHE_PIN; } else { lock_method= PAGECACHE_LOCK_LEFT_WRITELOCKED; pin_method= PAGECACHE_PIN_LEFT_PINNED; } if (pagecache_write_part(share->pagecache, &share->kfile, (pgcache_page_no_t) page_no, PAGECACHE_PRIORITY_LOW, buff, share->page_type, lock_method, pin_method, PAGECACHE_WRITE_DELAY, &page_link.link, LSN_IMPOSSIBLE, 0, share->keypage_header + 8)) result= 1; #ifdef IDENTICAL_PAGES_AFTER_RECOVERY { uchar *page_buff= pagecache_block_link_to_buffer(page_link.link); bzero(page_buff + share->keypage_header + 8, block_size - share->keypage_header - 8 - KEYPAGE_CHECKSUM_SIZE); } #endif if (page_not_read) { /* It was not locked before, we have to unlock it when we unpin pages */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= 1; push_dynamic(&info->pinned_pages, (void*) &page_link); } DBUG_RETURN(result); }
O0
c
ma_dispose: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x160, %rsp # imm = 0x160 movb %dl, %al movq %fs:0x28, %rcx movq %rcx, -0x18(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movb %al, -0x61(%rbp) movq -0x58(%rbp), %rax movq (%rax), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x9c(%rbp) movl $0x0, -0xa0(%rbp) jmp 0x9b50f jmp 0x9b511 jmp 0x9b513 movq -0x58(%rbp), %rdi xorl %esi, %esi callq 0x48160 movq -0x80(%rbp), %rax movq 0x700(%rax), %rax movq %rax, -0x70(%rbp) movq -0x60(%rbp), %rcx movq -0x80(%rbp), %rax movq %rcx, 0x700(%rax) movq -0x60(%rbp), %rax movl -0x9c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x78(%rbp) leaq -0x40(%rbp), %rdi movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 movq -0x80(%rbp), %rax movl 0x744(%rax), %eax subl $0x1, %eax subl $0x1, %eax subl $0x2, %eax movl %eax, %eax movb $-0x1, -0x40(%rbp,%rax) movq -0x80(%rbp), %rax movl 0x744(%rax), %eax addl $0x8, %eax movl %eax, -0xac(%rbp) movl -0xac(%rbp), %eax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x41(%rbp,%rax) movl -0xac(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x42(%rbp,%rax) movq -0x70(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0x70(%rbp), %rax shrq $0x20, %rax movq %rax, -0xc0(%rbp) movq -0xc0(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0xc8(%rbp), %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x3d(%rbp,%rax) movq -0xc8(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x3e(%rbp,%rax) movq -0xc8(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x3f(%rbp,%rax) movq -0xc8(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x40(%rbp,%rax) movq -0xb8(%rbp), %rax movq %rax, -0xd0(%rbp) movq -0xd0(%rbp), %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x39(%rbp,%rax) movq -0xd0(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x3a(%rbp,%rax) movq -0xd0(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x3b(%rbp,%rax) movq -0xd0(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x80(%rbp), %rax movl 0x744(%rax), %eax movb %cl, -0x3c(%rbp,%rax) movq -0x80(%rbp), %rax movl 0x170(%rax), %ecx orl $0x20, %ecx movl %ecx, 0x170(%rax) movq -0x80(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x9b809 jmp 0x9b6ee leaq -0x4c(%rbp), %rax addq $0x2, %rax movq %rax, -0x120(%rbp) movq -0x78(%rbp), %rax movl %eax, %ecx movq -0x120(%rbp), %rax movl %ecx, (%rax) movq -0x78(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x120(%rbp), %rax movb %cl, 0x4(%rax) cmpq $-0x1, -0x70(%rbp) jne 0x9b73a movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF movq %rax, -0x130(%rbp) jmp 0x9b750 movq -0x70(%rbp), %rax movl -0x9c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x130(%rbp) movq -0x130(%rbp), %rax movq %rax, -0x118(%rbp) leaq -0x4c(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0x128(%rbp) movq -0x118(%rbp), %rax movl %eax, %ecx movq -0x128(%rbp), %rax movl %ecx, (%rax) movq -0x118(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x128(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x4c(%rbp), %rax movq %rax, -0xf0(%rbp) movq $0xc, -0xe8(%rbp) movq -0x58(%rbp), %rax movq 0x8(%rax), %rdx movq -0x58(%rbp), %rcx leaq -0x110(%rbp), %r10 leaq -0x4c(%rbp), %rax leaq -0xd8(%rbp), %rdi movl $0xe, %esi movl $0xc, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x33840 cmpb $0x0, %al je 0x9b807 movl $0x1, -0xa0(%rbp) jmp 0x9b809 cmpb $0x0, -0x61(%rbp) je 0x9b825 movl $0x4, -0xa4(%rbp) movl $0x2, -0xa8(%rbp) jmp 0x9b839 movl $0x2, -0xa4(%rbp) movl $0x0, -0xa8(%rbp) movq -0x80(%rbp), %rax movq 0x600(%rax), %rdi movq -0x80(%rbp), %rsi addq $0x750, %rsi # imm = 0x750 movq -0x78(%rbp), %rdx leaq -0x40(%rbp), %r8 movq -0x80(%rbp), %rax movl 0x7d4(%rax), %r9d movl -0xa4(%rbp), %ebx movl -0xa8(%rbp), %r11d leaq -0x98(%rbp), %r10 movq -0x80(%rbp), %rax movl 0x744(%rax), %eax addl $0x8, %eax xorl %ecx, %ecx xorl %r14d, %r14d movl %ebx, (%rsp) movl %r11d, 0x8(%rsp) movl $0x0, 0x10(%rsp) movq %r10, 0x18(%rsp) movq $0x0, 0x20(%rsp) movl $0x0, 0x28(%rsp) movl %eax, 0x30(%rsp) callq 0x400f0 cmpb $0x0, %al je 0x9b8c5 movl $0x1, -0xa0(%rbp) cmpb $0x0, -0x61(%rbp) je 0x9b8f3 movl $0x6, -0x90(%rbp) movb $0x1, -0x88(%rbp) movq -0x58(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x98(%rbp), %rsi callq 0xdc070 jmp 0x9b8f5 movl -0xa0(%rbp), %eax movl %eax, -0x134(%rbp) movq %fs:0x28, %rax movq -0x18(%rbp), %rcx cmpq %rcx, %rax jne 0x9b925 movl -0x134(%rbp), %eax addq $0x160, %rsp # imm = 0x160 popq %rbx popq %r14 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
_ma_dispose: push rbp mov rbp, rsp push r14 push rbx sub rsp, 160h mov al, dl mov rcx, fs:28h mov [rbp+var_18], rcx mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_61], al mov rax, [rbp+var_58] mov rax, [rax] mov [rbp+var_80], rax mov rax, [rbp+var_80] mov eax, [rax+7BCh] mov [rbp+var_9C], eax mov [rbp+var_A0], 0 jmp short $+2 loc_9B50F: jmp short $+2 loc_9B511: jmp short $+2 loc_9B513: mov rdi, [rbp+var_58] xor esi, esi call _ma_lock_key_del mov rax, [rbp+var_80] mov rax, [rax+700h] mov [rbp+var_70], rax mov rcx, [rbp+var_60] mov rax, [rbp+var_80] mov [rax+700h], rcx mov rax, [rbp+var_60] mov ecx, [rbp+var_9C] xor edx, edx div rcx mov [rbp+var_78], rax lea rdi, [rbp+var_40] mov rax, [rbp+var_80] mov eax, [rax+744h] mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_80] mov eax, [rax+744h] sub eax, 1 sub eax, 1 sub eax, 2 mov eax, eax mov [rbp+rax+var_40], 0FFh mov rax, [rbp+var_80] mov eax, [rax+744h] add eax, 8 mov [rbp+var_AC], eax mov eax, [rbp+var_AC] mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_41], cl mov eax, [rbp+var_AC] shr eax, 8 mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_42], cl mov rax, [rbp+var_70] mov [rbp+var_B8], rax mov rax, [rbp+var_70] shr rax, 20h mov [rbp+var_C0], rax mov rax, [rbp+var_C0] mov [rbp+var_C8], rax mov rax, [rbp+var_C8] mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_3D], cl mov rax, [rbp+var_C8] shr rax, 8 mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_3E], cl mov rax, [rbp+var_C8] shr rax, 10h mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_3F], cl mov rax, [rbp+var_C8] shr rax, 18h mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_40], cl mov rax, [rbp+var_B8] mov [rbp+var_D0], rax mov rax, [rbp+var_D0] mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_39], cl mov rax, [rbp+var_D0] shr rax, 8 mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_3A], cl mov rax, [rbp+var_D0] shr rax, 10h mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_3B], cl mov rax, [rbp+var_D0] shr rax, 18h mov cl, al mov rax, [rbp+var_80] mov eax, [rax+744h] mov [rbp+rax+var_3C], cl mov rax, [rbp+var_80] mov ecx, [rax+170h] or ecx, 20h mov [rax+170h], ecx mov rax, [rbp+var_80] cmp byte ptr [rax+7E7h], 0 jz loc_9B809 jmp short $+2 loc_9B6EE: lea rax, [rbp+var_4C] add rax, 2 mov [rbp+var_120], rax mov rax, [rbp+var_78] mov ecx, eax mov rax, [rbp+var_120] mov [rax], ecx mov rax, [rbp+var_78] shr rax, 20h mov cl, al mov rax, [rbp+var_120] mov [rax+4], cl cmp [rbp+var_70], 0FFFFFFFFFFFFFFFFh jnz short loc_9B73A mov rax, 0FFFFFFFFFFh mov [rbp+var_130], rax jmp short loc_9B750 loc_9B73A: mov rax, [rbp+var_70] mov ecx, [rbp+var_9C] xor edx, edx div rcx mov [rbp+var_130], rax loc_9B750: mov rax, [rbp+var_130] mov [rbp+var_118], rax lea rax, [rbp+var_4C] add rax, 2 add rax, 5 mov [rbp+var_128], rax mov rax, [rbp+var_118] mov ecx, eax mov rax, [rbp+var_128] mov [rax], ecx mov rax, [rbp+var_118] shr rax, 20h mov cl, al mov rax, [rbp+var_128] mov [rax+4], cl lea rax, [rbp+var_4C] mov [rbp+var_F0], rax mov [rbp+var_E8], 0Ch mov rax, [rbp+var_58] mov rdx, [rax+8] mov rcx, [rbp+var_58] lea r10, [rbp+var_110] lea rax, [rbp+var_4C] lea rdi, [rbp+var_D8] mov esi, 0Eh mov r8d, 0Ch mov r9d, 3 xor r11d, r11d mov [rsp+170h+var_170], r10 mov [rsp+170h+var_168], rax mov [rsp+170h+var_160], 0 call translog_write_record cmp al, 0 jz short loc_9B807 mov [rbp+var_A0], 1 loc_9B807: jmp short $+2 loc_9B809: cmp [rbp+var_61], 0 jz short loc_9B825 mov [rbp+var_A4], 4 mov [rbp+var_A8], 2 jmp short loc_9B839 loc_9B825: mov [rbp+var_A4], 2 mov [rbp+var_A8], 0 loc_9B839: mov rax, [rbp+var_80] mov rdi, [rax+600h] mov rsi, [rbp+var_80] add rsi, 750h mov rdx, [rbp+var_78] lea r8, [rbp+var_40] mov rax, [rbp+var_80] mov r9d, [rax+7D4h] mov ebx, [rbp+var_A4] mov r11d, [rbp+var_A8] lea r10, [rbp+var_98] mov rax, [rbp+var_80] mov eax, [rax+744h] add eax, 8 xor ecx, ecx xor r14d, r14d mov dword ptr [rsp+170h+var_170], ebx mov dword ptr [rsp+170h+var_168], r11d mov dword ptr [rsp+170h+var_160], 0 mov [rsp+170h+var_158], r10 mov [rsp+170h+var_150], 0 mov [rsp+170h+var_148], 0 mov [rsp+170h+var_140], eax call pagecache_write_part cmp al, 0 jz short loc_9B8C5 mov [rbp+var_A0], 1 loc_9B8C5: cmp [rbp+var_61], 0 jz short loc_9B8F3 mov [rbp+var_90], 6 mov [rbp+var_88], 1 mov rdi, [rbp+var_58] add rdi, 2E8h lea rsi, [rbp+var_98] call insert_dynamic loc_9B8F3: jmp short $+2 loc_9B8F5: mov eax, [rbp+var_A0] mov [rbp+var_134], eax mov rax, fs:28h mov rcx, [rbp+var_18] cmp rax, rcx jnz short loc_9B925 mov eax, [rbp+var_134] add rsp, 160h pop rbx pop r14 pop rbp retn loc_9B925: call ___stack_chk_fail
long long ma_dispose(long long *a1, unsigned long long a2, char a3) { unsigned long long v4; // [rsp+40h] [rbp-130h] _QWORD v5[7]; // [rsp+60h] [rbp-110h] BYREF _BYTE v6[8]; // [rsp+98h] [rbp-D8h] BYREF unsigned long long v7; // [rsp+A0h] [rbp-D0h] unsigned long long v8; // [rsp+A8h] [rbp-C8h] unsigned long long v9; // [rsp+B0h] [rbp-C0h] unsigned long long v10; // [rsp+B8h] [rbp-B8h] int v11; // [rsp+C4h] [rbp-ACh] unsigned int v12; // [rsp+C8h] [rbp-A8h] unsigned int v13; // [rsp+CCh] [rbp-A4h] unsigned int v14; // [rsp+D0h] [rbp-A0h] unsigned int v15; // [rsp+D4h] [rbp-9Ch] char v16[8]; // [rsp+D8h] [rbp-98h] BYREF int v17; // [rsp+E0h] [rbp-90h] char v18; // [rsp+E8h] [rbp-88h] long long v19; // [rsp+F0h] [rbp-80h] unsigned long long v20; // [rsp+F8h] [rbp-78h] unsigned long long v21; // [rsp+100h] [rbp-70h] char v22; // [rsp+10Fh] [rbp-61h] unsigned long long v23; // [rsp+110h] [rbp-60h] long long *v24; // [rsp+118h] [rbp-58h] __int16 v25; // [rsp+124h] [rbp-4Ch] BYREF int v26; // [rsp+126h] [rbp-4Ah] char v27; // [rsp+12Ah] [rbp-46h] int v28; // [rsp+12Bh] [rbp-45h] char v29; // [rsp+12Fh] [rbp-41h] _BYTE v30[40]; // [rsp+130h] [rbp-40h] BYREF unsigned long long v31; // [rsp+158h] [rbp-18h] v31 = __readfsqword(0x28u); v24 = a1; v23 = a2; v22 = a3; v19 = *a1; v15 = *(_DWORD *)(v19 + 1980); v14 = 0; ma_lock_key_del(a1, 0); v21 = *(_QWORD *)(v19 + 1792); *(_QWORD *)(v19 + 1792) = a2; v20 = v23 / v15; memset(v30, 0LL, *(unsigned int *)(v19 + 1860)); v30[*(_DWORD *)(v19 + 1860) - 4] = -1; v11 = *(_DWORD *)(v19 + 1860) + 8; v30[*(unsigned int *)(v19 + 1860) - 1] = v11; *((_BYTE *)&v28 + *(unsigned int *)(v19 + 1860) + 3) = BYTE1(v11); v10 = v21; v9 = HIDWORD(v21); v8 = HIDWORD(v21); v30[*(unsigned int *)(v19 + 1860) + 3] = BYTE4(v21); v30[*(unsigned int *)(v19 + 1860) + 2] = BYTE1(v8); v30[*(unsigned int *)(v19 + 1860) + 1] = BYTE2(v8); v30[*(unsigned int *)(v19 + 1860)] = BYTE3(v8); v7 = v10; v30[*(unsigned int *)(v19 + 1860) + 7] = v10; v30[*(unsigned int *)(v19 + 1860) + 6] = BYTE1(v7); v30[*(unsigned int *)(v19 + 1860) + 5] = BYTE2(v7); v30[*(unsigned int *)(v19 + 1860) + 4] = BYTE3(v7); *(_DWORD *)(v19 + 368) |= 0x20u; if ( *(_BYTE *)(v19 + 2023) ) { v26 = v20; v27 = BYTE4(v20); v4 = v21 == -1LL ? 0xFFFFFFFFFFLL : v21 / v15; v28 = v4; v29 = BYTE4(v4); v5[4] = &v25; v5[5] = 12LL; if ( translog_write_record((long long)v6, 0xEu, v24[1], v24, 12, 3u, v5, &v25, 0LL) ) v14 = 1; } if ( v22 ) { v13 = 4; v12 = 2; } else { v13 = 2; v12 = 0; } if ( pagecache_write_part( *(_QWORD **)(v19 + 1536), v19 + 1872, v20, 0, (long long)v30, *(_DWORD *)(v19 + 2004), v13, v12, 0, v16, 0LL, 0, *(_DWORD *)(v19 + 1860) + 8) ) { v14 = 1; } if ( v22 ) { v17 = 6; v18 = 1; insert_dynamic(v24 + 93, v16); } return v14; }
_ma_dispose: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x160 MOV AL,DL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RCX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV byte ptr [RBP + -0x61],AL MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x9c],EAX MOV dword ptr [RBP + -0xa0],0x0 JMP 0x0019b50f LAB_0019b50f: JMP 0x0019b511 LAB_0019b511: JMP 0x0019b513 LAB_0019b513: MOV RDI,qword ptr [RBP + -0x58] XOR ESI,ESI CALL 0x00148160 MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX + 0x700] MOV qword ptr [RBP + -0x70],RAX MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX + 0x700],RCX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RBP + -0x9c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x78],RAX LEA RDI,[RBP + -0x40] MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] SUB EAX,0x1 SUB EAX,0x1 SUB EAX,0x2 MOV EAX,EAX MOV byte ptr [RBP + RAX*0x1 + -0x40],0xff MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] ADD EAX,0x8 MOV dword ptr [RBP + -0xac],EAX MOV EAX,dword ptr [RBP + -0xac] MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x41],CL MOV EAX,dword ptr [RBP + -0xac] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x42],CL MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x20 MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr [RBP + -0xc8] MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x3d],CL MOV RAX,qword ptr [RBP + -0xc8] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x3e],CL MOV RAX,qword ptr [RBP + -0xc8] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x3f],CL MOV RAX,qword ptr [RBP + -0xc8] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x40],CL MOV RAX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr [RBP + -0xd0] MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x39],CL MOV RAX,qword ptr [RBP + -0xd0] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x3a],CL MOV RAX,qword ptr [RBP + -0xd0] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x3b],CL MOV RAX,qword ptr [RBP + -0xd0] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] MOV byte ptr [RBP + RAX*0x1 + -0x3c],CL MOV RAX,qword ptr [RBP + -0x80] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x20 MOV dword ptr [RAX + 0x170],ECX MOV RAX,qword ptr [RBP + -0x80] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x0019b809 JMP 0x0019b6ee LAB_0019b6ee: LEA RAX,[RBP + -0x4c] ADD RAX,0x2 MOV qword ptr [RBP + -0x120],RAX MOV RAX,qword ptr [RBP + -0x78] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x120] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x78] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x120] MOV byte ptr [RAX + 0x4],CL CMP qword ptr [RBP + -0x70],-0x1 JNZ 0x0019b73a MOV RAX,0xffffffffff MOV qword ptr [RBP + -0x130],RAX JMP 0x0019b750 LAB_0019b73a: MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RBP + -0x9c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x130],RAX LAB_0019b750: MOV RAX,qword ptr [RBP + -0x130] MOV qword ptr [RBP + -0x118],RAX LEA RAX,[RBP + -0x4c] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x118] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x128] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x118] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x128] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x4c] MOV qword ptr [RBP + -0xf0],RAX MOV qword ptr [RBP + -0xe8],0xc MOV RAX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x58] LEA R10,[RBP + -0x110] LEA RAX,[RBP + -0x4c] LEA RDI,[RBP + -0xd8] MOV ESI,0xe 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 0x00133840 CMP AL,0x0 JZ 0x0019b807 MOV dword ptr [RBP + -0xa0],0x1 LAB_0019b807: JMP 0x0019b809 LAB_0019b809: CMP byte ptr [RBP + -0x61],0x0 JZ 0x0019b825 MOV dword ptr [RBP + -0xa4],0x4 MOV dword ptr [RBP + -0xa8],0x2 JMP 0x0019b839 LAB_0019b825: MOV dword ptr [RBP + -0xa4],0x2 MOV dword ptr [RBP + -0xa8],0x0 LAB_0019b839: MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x80] ADD RSI,0x750 MOV RDX,qword ptr [RBP + -0x78] LEA R8,[RBP + -0x40] MOV RAX,qword ptr [RBP + -0x80] MOV R9D,dword ptr [RAX + 0x7d4] MOV EBX,dword ptr [RBP + -0xa4] MOV R11D,dword ptr [RBP + -0xa8] LEA R10,[RBP + -0x98] MOV RAX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RAX + 0x744] ADD EAX,0x8 XOR ECX,ECX XOR R14D,R14D MOV dword ptr [RSP],EBX MOV dword ptr [RSP + 0x8],R11D MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],R10 MOV qword ptr [RSP + 0x20],0x0 MOV dword ptr [RSP + 0x28],0x0 MOV dword ptr [RSP + 0x30],EAX CALL 0x001400f0 CMP AL,0x0 JZ 0x0019b8c5 MOV dword ptr [RBP + -0xa0],0x1 LAB_0019b8c5: CMP byte ptr [RBP + -0x61],0x0 JZ 0x0019b8f3 MOV dword ptr [RBP + -0x90],0x6 MOV byte ptr [RBP + -0x88],0x1 MOV RDI,qword ptr [RBP + -0x58] ADD RDI,0x2e8 LEA RSI,[RBP + -0x98] CALL 0x001dc070 LAB_0019b8f3: JMP 0x0019b8f5 LAB_0019b8f5: MOV EAX,dword ptr [RBP + -0xa0] MOV dword ptr [RBP + -0x134],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,RCX JNZ 0x0019b925 MOV EAX,dword ptr [RBP + -0x134] ADD RSP,0x160 POP RBX POP R14 POP RBP RET LAB_0019b925: CALL 0x0012a250
int4 _ma_dispose(long *param_1,ulong param_2,char param_3) { char cVar1; long in_FS_OFFSET; ulong in_stack_fffffffffffffe98; ulong local_138; int1 local_118 [32]; int1 *local_f8; int8 local_f0; int1 local_e0 [8]; ulong local_d8; ulong local_d0; ulong local_c8; ulong local_c0; int local_b4; int4 local_b0; int4 local_ac; int4 local_a8; uint local_a4; int1 local_a0 [8]; int4 local_98; int1 local_90; long local_88; ulong local_80; ulong local_78; char local_69; ulong local_68; long *local_60; int1 local_54 [2]; int4 local_52; int1 local_4e; int4 local_4d; int1 local_49 [41]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_88 = *param_1; local_a4 = *(uint *)(local_88 + 0x7bc); local_a8 = 0; local_69 = param_3; local_68 = param_2; local_60 = param_1; _ma_lock_key_del(param_1); local_78 = *(ulong *)(local_88 + 0x700); *(ulong *)(local_88 + 0x700) = local_68; local_80 = local_68 / local_a4; memset(local_49 + 1,0,(ulong)*(uint *)(local_88 + 0x744)); local_49[(ulong)(*(int *)(local_88 + 0x744) - 4) + 1] = 0xff; local_b4 = *(int *)(local_88 + 0x744) + 8; local_49[*(uint *)(local_88 + 0x744)] = (char)local_b4; local_49[(ulong)*(uint *)(local_88 + 0x744) - 1] = (char)((uint)local_b4 >> 8); local_c0 = local_78; local_d0 = local_78 >> 0x20; local_49[(ulong)*(uint *)(local_88 + 0x744) + 4] = (char)(local_78 >> 0x20); local_49[(ulong)*(uint *)(local_88 + 0x744) + 3] = (char)(local_78 >> 0x28); local_49[(ulong)*(uint *)(local_88 + 0x744) + 2] = (char)(local_78 >> 0x30); local_49[(ulong)*(uint *)(local_88 + 0x744) + 1] = (char)(local_78 >> 0x38); local_d8 = local_78; local_49[(ulong)*(uint *)(local_88 + 0x744) + 8] = (char)local_78; local_49[(ulong)*(uint *)(local_88 + 0x744) + 7] = (char)(local_78 >> 8); local_49[(ulong)*(uint *)(local_88 + 0x744) + 6] = (char)(local_78 >> 0x10); local_49[(ulong)*(uint *)(local_88 + 0x744) + 5] = (char)(local_78 >> 0x18); *(uint *)(local_88 + 0x170) = *(uint *)(local_88 + 0x170) | 0x20; local_c8 = local_d0; if (*(char *)(local_88 + 0x7e7) != '\0') { local_52 = (int4)local_80; local_4e = (int1)(local_80 >> 0x20); if (local_78 == 0xffffffffffffffff) { local_138 = 0xffffffffff; } else { local_138 = local_78 / local_a4; } local_4d = (int4)local_138; local_49[0] = (int1)(local_138 >> 0x20); local_f8 = local_54; local_f0 = 0xc; in_stack_fffffffffffffe98 = 0; cVar1 = translog_write_record(local_e0,0xe,local_60[1],local_60,0xc,3,local_118,local_54,0); if (cVar1 != '\0') { local_a8 = 1; } } if (local_69 == '\0') { local_ac = 2; local_b0 = 0; } else { local_ac = 4; local_b0 = 2; } cVar1 = pagecache_write_part (*(int8 *)(local_88 + 0x600),local_88 + 0x750,local_80,0,local_49 + 1, *(int4 *)(local_88 + 0x7d4),local_ac,local_b0, in_stack_fffffffffffffe98 & 0xffffffff00000000,local_a0,0,0, *(int *)(local_88 + 0x744) + 8); if (cVar1 != '\0') { local_a8 = 1; } if (local_69 != '\0') { local_98 = 6; local_90 = 1; insert_dynamic(local_60 + 0x5d,local_a0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_a8; }
20,853
c4_verify_init
corpus-core[P]colibri-stateless/src/verifier/verify.c
c4_status_t c4_verify_init(verify_ctx_t* ctx, bytes_t request, char* method, json_t args, chain_id_t chain_id) { chain_type_t chain_type = c4_chain_type(chain_id); memset(ctx, 0, sizeof(verify_ctx_t)); if (request.len == 0) { method_type_t method_type = c4_get_method_type(chain_id, method); if (method_type == METHOD_UNDEFINED) { ctx->state.error = strdup("method not known"); return C4_ERROR; } else if (method_type == METHOD_NOT_SUPPORTED) { ctx->state.error = strdup("method not supported"); return C4_ERROR; } else if (method_type == METHOD_PROOFABLE) { ctx->state.error = strdup("missing proof!"); return C4_ERROR; } ctx->data.def = &ssz_none; ctx->data.bytes.data = (void*) &ssz_none; ctx->proof.def = &ssz_none; ctx->proof.bytes.data = (void*) &ssz_none; ctx->sync_data.def = &ssz_none; ctx->sync_data.bytes.data = (void*) &ssz_none; } else { if (chain_type != c4_get_chain_type_from_req(request)) { ctx->state.error = strdup("chain type does not match the proof"); return C4_ERROR; } ssz_ob_t req = {.bytes = request, .def = request_container(chain_type)}; if (!req.def) { ctx->state.error = strdup("chain not supported"); return C4_ERROR; } if (!ssz_is_valid(req, true, &ctx->state)) return C4_ERROR; ctx->data = ssz_get(&req, "data"); ctx->proof = ssz_get(&req, "proof"); ctx->sync_data = ssz_get(&req, "sync_data"); } ctx->chain_id = chain_id; // ssz_get_uint64(&req, "chainId"); ctx->method = method; ctx->args = args; return C4_SUCCESS; }
O1
c
c4_verify_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r8d, %ebp movq %rcx, %r14 movq %rdx, %r15 movl %esi, %r12d movq %rdi, %rbx movl %r8d, %edi callq 0x5cdc5 movl %eax, %r13d movl $0x88, %edx movq %rbx, %rdi xorl %esi, %esi callq 0x22190 testl %r12d, %r12d je 0x25adb movl $0x1, %eax cmpl $0x4, %r12d jb 0x25a0d movzbl (%r15), %eax cmpl %eax, %r13d jne 0x25afc movl %r12d, 0x18(%rsp) movq %r15, 0x20(%rsp) movl %r13d, %edi callq 0x26a26 movq %rax, 0x28(%rsp) testq %rax, %rax je 0x25b05 leaq 0x70(%rbx), %rsi movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x18(%rsp), %xmm0 movups %xmm0, (%rsp) movl $0x1, %edi callq 0x57e09 testb %al, %al je 0x25b27 leaq 0x5fb21(%rip), %rdx # 0x85587 leaq 0x30(%rsp), %r15 leaq 0x18(%rsp), %r12 movq %r15, %rdi movq %r12, %rsi callq 0x594b1 movq 0x10(%r15), %rax movq %rax, 0x48(%rbx) movups (%r15), %xmm0 movups %xmm0, 0x38(%rbx) leaq 0x5fad6(%rip), %rdx # 0x85568 leaq 0x30(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x594b1 movq 0x10(%r15), %rax movq %rax, 0x30(%rbx) movups (%r15), %xmm0 movups %xmm0, 0x20(%rbx) leaq 0x5fac9(%rip), %rdx # 0x85582 leaq 0x30(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x594b1 movq 0x10(%r15), %rax movq %rax, 0x60(%rbx) movups (%r15), %xmm0 movups %xmm0, 0x50(%rbx) jmp 0x25b5a movl %ebp, %edi movq %r14, %rsi callq 0x26928 cmpl $0x3, %eax je 0x25b17 cmpl $0x1, %eax je 0x25b0e testl %eax, %eax jne 0x25b3b leaq 0x5fa1b(%rip), %rdi # 0x85515 jmp 0x25b1e leaq 0x5fa47(%rip), %rdi # 0x8554a jmp 0x25b1e leaq 0x5fa62(%rip), %rdi # 0x8556e jmp 0x25b1e leaq 0x5fa26(%rip), %rdi # 0x8553b jmp 0x25b1e leaq 0x5fa08(%rip), %rdi # 0x85526 callq 0x22030 movq %rax, 0x78(%rbx) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9f186(%rip), %rax # 0xc4cc8 movq %rax, 0x48(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x30(%rbx) movq %rax, 0x28(%rbx) movq %rax, 0x60(%rbx) movq %rax, 0x58(%rbx) leaq 0x80(%rsp), %rax movl %ebp, 0x80(%rbx) movq %r14, (%rbx) movups (%rax), %xmm0 movups %xmm0, 0x8(%rbx) movq 0x10(%rax), %rax movq %rax, 0x18(%rbx) xorl %eax, %eax jmp 0x25b2c
c4_verify_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, r8d mov r14, rcx mov r15, rdx mov r12d, esi mov rbx, rdi mov edi, r8d call c4_chain_type mov r13d, eax mov edx, 88h mov rdi, rbx xor esi, esi call _memset test r12d, r12d jz loc_25ADB mov eax, 1 cmp r12d, 4 jb short loc_25A0D movzx eax, byte ptr [r15] loc_25A0D: cmp r13d, eax jnz loc_25AFC mov dword ptr [rsp+78h+var_60], r12d mov qword ptr [rsp+78h+var_60+8], r15 mov edi, r13d call c4_eth_get_request_type mov [rsp+78h+var_50], rax test rax, rax jz loc_25B05 lea rsi, [rbx+70h] mov rax, [rsp+78h+var_50] mov [rsp+78h+var_68], rax movups xmm0, [rsp+78h+var_60] movups [rsp+78h+var_78], xmm0 mov edi, 1 call ssz_is_valid test al, al jz loc_25B27 lea rdx, aSyncData+5; "data" lea r15, [rsp+78h+var_48] lea r12, [rsp+78h+var_60] mov rdi, r15 mov rsi, r12 call ssz_get mov rax, [r15+10h] mov [rbx+48h], rax movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx+38h], xmm0 lea rdx, aChainTypeDoesN+1Eh; "proof" lea r15, [rsp+78h+var_48] mov rdi, r15 mov rsi, r12 call ssz_get mov rax, [r15+10h] mov [rbx+30h], rax movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx+20h], xmm0 lea rdx, aSyncData; "sync_data" lea r15, [rsp+78h+var_48] mov rdi, r15 mov rsi, r12 call ssz_get mov rax, [r15+10h] mov [rbx+60h], rax movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx+50h], xmm0 jmp short loc_25B5A loc_25ADB: mov edi, ebp mov rsi, r14 call c4_eth_get_method_type cmp eax, 3 jz short loc_25B17 cmp eax, 1 jz short loc_25B0E test eax, eax jnz short loc_25B3B lea rdi, aMethodNotKnown_0; "method not known" jmp short loc_25B1E loc_25AFC: lea rdi, aChainTypeDoesN; "chain type does not match the proof" jmp short loc_25B1E loc_25B05: lea rdi, aChainNotSuppor; "chain not supported" jmp short loc_25B1E loc_25B0E: lea rdi, aMissingProof; "missing proof!" jmp short loc_25B1E loc_25B17: lea rdi, aMethodNotSuppo_0; "method not supported" loc_25B1E: call _strdup mov [rbx+78h], rax loc_25B27: mov eax, 0FFFFFFFFh loc_25B2C: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_25B3B: lea rax, ssz_none mov [rbx+48h], rax mov [rbx+40h], rax mov [rbx+30h], rax mov [rbx+28h], rax mov [rbx+60h], rax mov [rbx+58h], rax loc_25B5A: lea rax, [rsp+78h+arg_0] mov [rbx+80h], ebp mov [rbx], r14 movups xmm0, xmmword ptr [rax] movups xmmword ptr [rbx+8], xmm0 mov rax, [rax+10h] mov [rbx+18h], rax xor eax, eax jmp short loc_25B2C
long long c4_verify_init( long long a1, unsigned int a2, unsigned __int8 *a3, long long a4, unsigned int a5, long long a6, __int128 a7, long long a8) { unsigned int v12; // r13d int v13; // eax int v14; // edx int v15; // ecx int v16; // r8d int v17; // r9d int method_type; // eax const char *v19; // rdi unsigned int v21; // [rsp+18h] [rbp-60h] BYREF unsigned __int8 *v22; // [rsp+20h] [rbp-58h] long long request_type; // [rsp+28h] [rbp-50h] __int128 v24; // [rsp+30h] [rbp-48h] BYREF long long v25; // [rsp+40h] [rbp-38h] v12 = c4_chain_type(a5); memset(a1, 0LL, 136LL); if ( !a2 ) { method_type = c4_eth_get_method_type(a5, a4); if ( method_type == 3 ) { v19 = "method not supported"; } else if ( method_type == 1 ) { v19 = "missing proof!"; } else { if ( method_type ) { *(_QWORD *)(a1 + 72) = &ssz_none; *(_QWORD *)(a1 + 64) = &ssz_none; *(_QWORD *)(a1 + 48) = &ssz_none; *(_QWORD *)(a1 + 40) = &ssz_none; *(_QWORD *)(a1 + 96) = &ssz_none; *(_QWORD *)(a1 + 88) = &ssz_none; goto LABEL_19; } v19 = "method not known"; } goto LABEL_16; } v13 = 1; if ( a2 >= 4 ) v13 = *a3; if ( v12 != v13 ) { v19 = "chain type does not match the proof"; LABEL_16: *(_QWORD *)(a1 + 120) = strdup(v19); return 0xFFFFFFFFLL; } v21 = a2; v22 = a3; request_type = c4_eth_get_request_type(v12); if ( !request_type ) { v19 = "chain not supported"; goto LABEL_16; } if ( !(unsigned __int8)ssz_is_valid(1, (int)a1 + 112, v14, v15, v16, v17, v21, (_DWORD)v22, request_type) ) return 0xFFFFFFFFLL; ssz_get(&v24, &v21, "data"); *(_QWORD *)(a1 + 72) = v25; *(_OWORD *)(a1 + 56) = v24; ssz_get(&v24, &v21, "proof"); *(_QWORD *)(a1 + 48) = v25; *(_OWORD *)(a1 + 32) = v24; ssz_get(&v24, &v21, "sync_data"); *(_QWORD *)(a1 + 96) = v25; *(_OWORD *)(a1 + 80) = v24; LABEL_19: *(_DWORD *)(a1 + 128) = a5; *(_QWORD *)a1 = a4; *(_OWORD *)(a1 + 8) = a7; *(_QWORD *)(a1 + 24) = a8; return 0LL; }
c4_verify_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,R8D MOV R14,RCX MOV R15,RDX MOV R12D,ESI MOV RBX,RDI MOV EDI,R8D CALL 0x0015cdc5 MOV R13D,EAX MOV EDX,0x88 MOV RDI,RBX XOR ESI,ESI CALL 0x00122190 TEST R12D,R12D JZ 0x00125adb MOV EAX,0x1 CMP R12D,0x4 JC 0x00125a0d MOVZX EAX,byte ptr [R15] LAB_00125a0d: CMP R13D,EAX JNZ 0x00125afc MOV dword ptr [RSP + 0x18],R12D MOV qword ptr [RSP + 0x20],R15 MOV EDI,R13D CALL 0x00126a26 MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x00125b05 LEA RSI,[RBX + 0x70] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x18] MOVUPS xmmword ptr [RSP],XMM0 MOV EDI,0x1 CALL 0x00157e09 TEST AL,AL JZ 0x00125b27 LEA RDX,[0x185587] LEA R15,[RSP + 0x30] LEA R12,[RSP + 0x18] MOV RDI,R15 MOV RSI,R12 CALL 0x001594b1 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RBX + 0x48],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX + 0x38],XMM0 LEA RDX,[0x185568] LEA R15,[RSP + 0x30] MOV RDI,R15 MOV RSI,R12 CALL 0x001594b1 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RBX + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX + 0x20],XMM0 LEA RDX,[0x185582] LEA R15,[RSP + 0x30] MOV RDI,R15 MOV RSI,R12 CALL 0x001594b1 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RBX + 0x60],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX + 0x50],XMM0 JMP 0x00125b5a LAB_00125adb: MOV EDI,EBP MOV RSI,R14 CALL 0x00126928 CMP EAX,0x3 JZ 0x00125b17 CMP EAX,0x1 JZ 0x00125b0e TEST EAX,EAX JNZ 0x00125b3b LEA RDI,[0x185515] JMP 0x00125b1e LAB_00125afc: LEA RDI,[0x18554a] JMP 0x00125b1e LAB_00125b05: LEA RDI,[0x18556e] JMP 0x00125b1e LAB_00125b0e: LEA RDI,[0x18553b] JMP 0x00125b1e LAB_00125b17: LEA RDI,[0x185526] LAB_00125b1e: CALL 0x00122030 MOV qword ptr [RBX + 0x78],RAX LAB_00125b27: MOV EAX,0xffffffff LAB_00125b2c: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00125b3b: LEA RAX,[0x1c4cc8] MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x30],RAX MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x60],RAX MOV qword ptr [RBX + 0x58],RAX LAB_00125b5a: LEA RAX,[RSP + 0x80] MOV dword ptr [RBX + 0x80],EBP MOV qword ptr [RBX],R14 MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBX + 0x18],RAX XOR EAX,EAX JMP 0x00125b2c
int8 c4_verify_init(int8 *param_1,uint param_2,byte *param_3,int8 param_4,int4 param_5, int8 param_6,int8 param_7,int8 param_8,int8 param_9) { char cVar1; uint uVar2; uint uVar3; int iVar4; char *pcVar5; uint local_60 [2]; byte *pbStack_58; long local_50; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_38; uVar2 = c4_chain_type(param_5); memset(param_1,0,0x88); if (param_2 == 0) { iVar4 = c4_eth_get_method_type(param_5,param_4); if (iVar4 == 3) { pcVar5 = "method not supported"; } else if (iVar4 == 1) { pcVar5 = "missing proof!"; } else { if (iVar4 != 0) { param_1[9] = ssz_none; param_1[8] = ssz_none; param_1[6] = ssz_none; param_1[5] = ssz_none; param_1[0xc] = ssz_none; param_1[0xb] = ssz_none; goto LAB_00125b5a; } pcVar5 = "method not known"; } } else { uVar3 = 1; if (3 < param_2) { uVar3 = (uint)*param_3; } if (uVar2 == uVar3) { local_60[0] = param_2; pbStack_58 = param_3; local_50 = c4_eth_get_request_type(uVar2); if (local_50 != 0) { cVar1 = ssz_is_valid(1,param_1 + 0xe); if (cVar1 == '\0') { return 0xffffffff; } ssz_get(&local_48,local_60,"data"); param_1[9] = local_38; *(int4 *)(param_1 + 7) = local_48; *(int4 *)((long)param_1 + 0x3c) = uStack_44; *(int4 *)(param_1 + 8) = uStack_40; *(int4 *)((long)param_1 + 0x44) = uStack_3c; ssz_get(&local_48,local_60,"proof"); param_1[6] = local_38; *(int4 *)(param_1 + 4) = local_48; *(int4 *)((long)param_1 + 0x24) = uStack_44; *(int4 *)(param_1 + 5) = uStack_40; *(int4 *)((long)param_1 + 0x2c) = uStack_3c; ssz_get(&local_48,local_60,"sync_data"); param_1[0xc] = local_38; param_1[10] = CONCAT44(uStack_44,local_48); param_1[0xb] = CONCAT44(uStack_3c,uStack_40); LAB_00125b5a: *(int4 *)(param_1 + 0x10) = param_5; *param_1 = param_4; param_1[1] = param_7; param_1[2] = param_8; param_1[3] = param_9; return 0; } pcVar5 = "chain not supported"; local_50 = 0; } else { pcVar5 = "chain type does not match the proof"; } } pcVar5 = strdup(pcVar5); param_1[0xf] = pcVar5; return 0xffffffff; }
20,854
c4_verify_init
corpus-core[P]colibri-stateless/src/verifier/verify.c
c4_status_t c4_verify_init(verify_ctx_t* ctx, bytes_t request, char* method, json_t args, chain_id_t chain_id) { chain_type_t chain_type = c4_chain_type(chain_id); memset(ctx, 0, sizeof(verify_ctx_t)); if (request.len == 0) { method_type_t method_type = c4_get_method_type(chain_id, method); if (method_type == METHOD_UNDEFINED) { ctx->state.error = strdup("method not known"); return C4_ERROR; } else if (method_type == METHOD_NOT_SUPPORTED) { ctx->state.error = strdup("method not supported"); return C4_ERROR; } else if (method_type == METHOD_PROOFABLE) { ctx->state.error = strdup("missing proof!"); return C4_ERROR; } ctx->data.def = &ssz_none; ctx->data.bytes.data = (void*) &ssz_none; ctx->proof.def = &ssz_none; ctx->proof.bytes.data = (void*) &ssz_none; ctx->sync_data.def = &ssz_none; ctx->sync_data.bytes.data = (void*) &ssz_none; } else { if (chain_type != c4_get_chain_type_from_req(request)) { ctx->state.error = strdup("chain type does not match the proof"); return C4_ERROR; } ssz_ob_t req = {.bytes = request, .def = request_container(chain_type)}; if (!req.def) { ctx->state.error = strdup("chain not supported"); return C4_ERROR; } if (!ssz_is_valid(req, true, &ctx->state)) return C4_ERROR; ctx->data = ssz_get(&req, "data"); ctx->proof = ssz_get(&req, "proof"); ctx->sync_data = ssz_get(&req, "sync_data"); } ctx->chain_id = chain_id; // ssz_get_uint64(&req, "chainId"); ctx->method = method; ctx->args = args; return C4_SUCCESS; }
O2
c
c4_verify_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r8d, %ebp movq %rcx, %r14 movq %rdx, %r15 movl %esi, %r12d movq %rdi, %rbx movl %r8d, %edi callq 0x504fa movl %eax, %r13d movl $0x88, %edx movq %rbx, %rdi xorl %esi, %esi callq 0x221a0 testl %r12d, %r12d je 0x24825 cmpl $0x4, %r12d jae 0x24855 pushq $0x1 popq %rax jmp 0x24859 movl %ebp, %edi movq %r14, %rsi callq 0x2568c cmpl $0x3, %eax je 0x24940 cmpl $0x1, %eax je 0x24937 testl %eax, %eax jne 0x24962 leaq 0x4fcc5(%rip), %rdi # 0x74515 jmp 0x24947 movzbl (%r15), %eax cmpl %eax, %r13d jne 0x24925 movl %r12d, 0x18(%rsp) movq %r15, 0x20(%rsp) movl %r13d, %edi callq 0x25733 movq %rax, 0x28(%rsp) testq %rax, %rax je 0x2492e leaq 0x70(%rbx), %rsi movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x18(%rsp), %xmm0 movups %xmm0, (%rsp) pushq $0x1 popq %rdi callq 0x4bce8 testb %al, %al je 0x24950 leaq 0x4fcd7(%rip), %rdx # 0x74587 leaq 0x30(%rsp), %r15 leaq 0x18(%rsp), %r12 movq %r15, %rdi movq %r12, %rsi callq 0x4d119 movq 0x10(%r15), %rax movq %rax, 0x48(%rbx) movups (%r15), %xmm0 movups %xmm0, 0x38(%rbx) leaq 0x4fc8c(%rip), %rdx # 0x74568 leaq 0x30(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x4d119 movq 0x10(%r15), %rax movq %rax, 0x30(%rbx) movups (%r15), %xmm0 movups %xmm0, 0x20(%rbx) leaq 0x4fc7f(%rip), %rdx # 0x74582 leaq 0x30(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x4d119 movq 0x10(%r15), %rax movq %rax, 0x60(%rbx) movups (%r15), %xmm0 movups %xmm0, 0x50(%rbx) jmp 0x24981 leaq 0x4fc1e(%rip), %rdi # 0x7454a jmp 0x24947 leaq 0x4fc39(%rip), %rdi # 0x7456e jmp 0x24947 leaq 0x4fbfd(%rip), %rdi # 0x7453b jmp 0x24947 leaq 0x4fbdf(%rip), %rdi # 0x74526 callq 0x22030 movq %rax, 0x78(%rbx) pushq $-0x1 popq %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9735f(%rip), %rax # 0xbbcc8 movq %rax, 0x48(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x30(%rbx) movq %rax, 0x28(%rbx) movq %rax, 0x60(%rbx) movq %rax, 0x58(%rbx) leaq 0x80(%rsp), %rax movl %ebp, 0x80(%rbx) movq %r14, (%rbx) movups (%rax), %xmm0 movups %xmm0, 0x8(%rbx) movq 0x10(%rax), %rax movq %rax, 0x18(%rbx) xorl %eax, %eax jmp 0x24953
c4_verify_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, r8d mov r14, rcx mov r15, rdx mov r12d, esi mov rbx, rdi mov edi, r8d call c4_chain_type mov r13d, eax mov edx, 88h mov rdi, rbx xor esi, esi call _memset test r12d, r12d jz short loc_24825 cmp r12d, 4 jnb short loc_24855 push 1 pop rax jmp short loc_24859 loc_24825: mov edi, ebp mov rsi, r14 call c4_eth_get_method_type cmp eax, 3 jz loc_24940 cmp eax, 1 jz loc_24937 test eax, eax jnz loc_24962 lea rdi, aMethodNotKnown_0; "method not known" jmp loc_24947 loc_24855: movzx eax, byte ptr [r15] loc_24859: cmp r13d, eax jnz loc_24925 mov dword ptr [rsp+78h+var_60], r12d mov qword ptr [rsp+78h+var_60+8], r15 mov edi, r13d call c4_eth_get_request_type mov [rsp+78h+var_50], rax test rax, rax jz loc_2492E lea rsi, [rbx+70h] mov rax, [rsp+78h+var_50] mov [rsp+78h+var_68], rax movups xmm0, [rsp+78h+var_60] movups [rsp+78h+var_78], xmm0 push 1 pop rdi call ssz_is_valid test al, al jz loc_24950 lea rdx, aSyncData+5; "data" lea r15, [rsp+78h+var_48] lea r12, [rsp+78h+var_60] mov rdi, r15 mov rsi, r12 call ssz_get mov rax, [r15+10h] mov [rbx+48h], rax movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx+38h], xmm0 lea rdx, aChainTypeDoesN+1Eh; "proof" lea r15, [rsp+78h+var_48] mov rdi, r15 mov rsi, r12 call ssz_get mov rax, [r15+10h] mov [rbx+30h], rax movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx+20h], xmm0 lea rdx, aSyncData; "sync_data" lea r15, [rsp+78h+var_48] mov rdi, r15 mov rsi, r12 call ssz_get mov rax, [r15+10h] mov [rbx+60h], rax movups xmm0, xmmword ptr [r15] movups xmmword ptr [rbx+50h], xmm0 jmp short loc_24981 loc_24925: lea rdi, aChainTypeDoesN; "chain type does not match the proof" jmp short loc_24947 loc_2492E: lea rdi, aChainNotSuppor; "chain not supported" jmp short loc_24947 loc_24937: lea rdi, aMissingProof; "missing proof!" jmp short loc_24947 loc_24940: lea rdi, aMethodNotSuppo_0; "method not supported" loc_24947: call _strdup mov [rbx+78h], rax loc_24950: push 0FFFFFFFFFFFFFFFFh pop rax loc_24953: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_24962: lea rax, ssz_none mov [rbx+48h], rax mov [rbx+40h], rax mov [rbx+30h], rax mov [rbx+28h], rax mov [rbx+60h], rax mov [rbx+58h], rax loc_24981: lea rax, [rsp+78h+arg_0] mov [rbx+80h], ebp mov [rbx], r14 movups xmm0, xmmword ptr [rax] movups xmmword ptr [rbx+8], xmm0 mov rax, [rax+10h] mov [rbx+18h], rax xor eax, eax jmp short loc_24953
long long c4_verify_init( long long a1, unsigned int a2, unsigned __int8 *a3, long long a4, unsigned int a5, long long a6, __int128 a7, long long a8) { unsigned int v12; // r13d int v13; // eax int method_type; // eax const char *v15; // rdi int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d unsigned int v21; // [rsp+18h] [rbp-60h] BYREF unsigned __int8 *v22; // [rsp+20h] [rbp-58h] long long request_type; // [rsp+28h] [rbp-50h] __int128 v24; // [rsp+30h] [rbp-48h] BYREF long long v25; // [rsp+40h] [rbp-38h] v12 = c4_chain_type(a5); memset(a1, 0LL, 136LL); if ( !a2 ) { method_type = c4_eth_get_method_type(a5, a4); if ( method_type == 3 ) { v15 = "method not supported"; } else if ( method_type == 1 ) { v15 = "missing proof!"; } else { if ( method_type ) { *(_QWORD *)(a1 + 72) = &ssz_none; *(_QWORD *)(a1 + 64) = &ssz_none; *(_QWORD *)(a1 + 48) = &ssz_none; *(_QWORD *)(a1 + 40) = &ssz_none; *(_QWORD *)(a1 + 96) = &ssz_none; *(_QWORD *)(a1 + 88) = &ssz_none; goto LABEL_20; } v15 = "method not known"; } goto LABEL_17; } if ( a2 >= 4 ) v13 = *a3; else v13 = 1; if ( v12 != v13 ) { v15 = "chain type does not match the proof"; LABEL_17: *(_QWORD *)(a1 + 120) = strdup(v15); return -1LL; } v21 = a2; v22 = a3; request_type = c4_eth_get_request_type(v12); if ( !request_type ) { v15 = "chain not supported"; goto LABEL_17; } if ( !(unsigned __int8)ssz_is_valid(1, (int)a1 + 112, v16, v17, v18, v19, v21, (_DWORD)v22, request_type) ) return -1LL; ssz_get(&v24, &v21, "data"); *(_QWORD *)(a1 + 72) = v25; *(_OWORD *)(a1 + 56) = v24; ssz_get(&v24, &v21, "proof"); *(_QWORD *)(a1 + 48) = v25; *(_OWORD *)(a1 + 32) = v24; ssz_get(&v24, &v21, "sync_data"); *(_QWORD *)(a1 + 96) = v25; *(_OWORD *)(a1 + 80) = v24; LABEL_20: *(_DWORD *)(a1 + 128) = a5; *(_QWORD *)a1 = a4; *(_OWORD *)(a1 + 8) = a7; *(_QWORD *)(a1 + 24) = a8; return 0LL; }
c4_verify_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,R8D MOV R14,RCX MOV R15,RDX MOV R12D,ESI MOV RBX,RDI MOV EDI,R8D CALL 0x001504fa MOV R13D,EAX MOV EDX,0x88 MOV RDI,RBX XOR ESI,ESI CALL 0x001221a0 TEST R12D,R12D JZ 0x00124825 CMP R12D,0x4 JNC 0x00124855 PUSH 0x1 POP RAX JMP 0x00124859 LAB_00124825: MOV EDI,EBP MOV RSI,R14 CALL 0x0012568c CMP EAX,0x3 JZ 0x00124940 CMP EAX,0x1 JZ 0x00124937 TEST EAX,EAX JNZ 0x00124962 LEA RDI,[0x174515] JMP 0x00124947 LAB_00124855: MOVZX EAX,byte ptr [R15] LAB_00124859: CMP R13D,EAX JNZ 0x00124925 MOV dword ptr [RSP + 0x18],R12D MOV qword ptr [RSP + 0x20],R15 MOV EDI,R13D CALL 0x00125733 MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x0012492e LEA RSI,[RBX + 0x70] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x18] MOVUPS xmmword ptr [RSP],XMM0 PUSH 0x1 POP RDI CALL 0x0014bce8 TEST AL,AL JZ 0x00124950 LEA RDX,[0x174587] LEA R15,[RSP + 0x30] LEA R12,[RSP + 0x18] MOV RDI,R15 MOV RSI,R12 CALL 0x0014d119 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RBX + 0x48],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX + 0x38],XMM0 LEA RDX,[0x174568] LEA R15,[RSP + 0x30] MOV RDI,R15 MOV RSI,R12 CALL 0x0014d119 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RBX + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX + 0x20],XMM0 LEA RDX,[0x174582] LEA R15,[RSP + 0x30] MOV RDI,R15 MOV RSI,R12 CALL 0x0014d119 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RBX + 0x60],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RBX + 0x50],XMM0 JMP 0x00124981 LAB_00124925: LEA RDI,[0x17454a] JMP 0x00124947 LAB_0012492e: LEA RDI,[0x17456e] JMP 0x00124947 LAB_00124937: LEA RDI,[0x17453b] JMP 0x00124947 LAB_00124940: LEA RDI,[0x174526] LAB_00124947: CALL 0x00122030 MOV qword ptr [RBX + 0x78],RAX LAB_00124950: PUSH -0x1 POP RAX LAB_00124953: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00124962: LEA RAX,[0x1bbcc8] MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x30],RAX MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x60],RAX MOV qword ptr [RBX + 0x58],RAX LAB_00124981: LEA RAX,[RSP + 0x80] MOV dword ptr [RBX + 0x80],EBP MOV qword ptr [RBX],R14 MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBX + 0x18],RAX XOR EAX,EAX JMP 0x00124953
int8 c4_verify_init(int8 *param_1,uint param_2,byte *param_3,int8 param_4,int4 param_5, int8 param_6,int8 param_7,int8 param_8,int8 param_9) { char cVar1; uint uVar2; uint uVar3; int iVar4; char *pcVar5; uint local_60 [2]; byte *pbStack_58; long local_50; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_38; uVar2 = c4_chain_type(param_5); memset(param_1,0,0x88); if (param_2 == 0) { iVar4 = c4_eth_get_method_type(param_5,param_4); if (iVar4 == 3) { pcVar5 = "method not supported"; } else if (iVar4 == 1) { pcVar5 = "missing proof!"; } else { if (iVar4 != 0) { param_1[9] = ssz_none; param_1[8] = ssz_none; param_1[6] = ssz_none; param_1[5] = ssz_none; param_1[0xc] = ssz_none; param_1[0xb] = ssz_none; goto LAB_00124981; } pcVar5 = "method not known"; } } else { if (param_2 < 4) { uVar3 = 1; } else { uVar3 = (uint)*param_3; } if (uVar2 == uVar3) { local_60[0] = param_2; pbStack_58 = param_3; local_50 = c4_eth_get_request_type(uVar2); if (local_50 != 0) { cVar1 = ssz_is_valid(1,param_1 + 0xe); if (cVar1 == '\0') { return 0xffffffffffffffff; } ssz_get(&local_48,local_60,"data"); param_1[9] = local_38; *(int4 *)(param_1 + 7) = local_48; *(int4 *)((long)param_1 + 0x3c) = uStack_44; *(int4 *)(param_1 + 8) = uStack_40; *(int4 *)((long)param_1 + 0x44) = uStack_3c; ssz_get(&local_48,local_60,"proof"); param_1[6] = local_38; *(int4 *)(param_1 + 4) = local_48; *(int4 *)((long)param_1 + 0x24) = uStack_44; *(int4 *)(param_1 + 5) = uStack_40; *(int4 *)((long)param_1 + 0x2c) = uStack_3c; ssz_get(&local_48,local_60,"sync_data"); param_1[0xc] = local_38; param_1[10] = CONCAT44(uStack_44,local_48); param_1[0xb] = CONCAT44(uStack_3c,uStack_40); LAB_00124981: *(int4 *)(param_1 + 0x10) = param_5; *param_1 = param_4; param_1[1] = param_7; param_1[2] = param_8; param_1[3] = param_9; return 0; } pcVar5 = "chain not supported"; local_50 = 0; } else { pcVar5 = "chain type does not match the proof"; } } pcVar5 = strdup(pcVar5); param_1[0xf] = pcVar5; return 0xffffffffffffffff; }
20,855
list_add
eloqsql/mysys/list.c
LIST *list_add(LIST *root, LIST *element) { DBUG_ENTER("list_add"); DBUG_PRINT("enter",("root: %p element: %p", root, element)); if (root) { if (root->prev) /* If add in mid of list */ root->prev->next= element; element->prev=root->prev; root->prev=element; } else element->prev=0; element->next=root; DBUG_RETURN(element); /* New root */ }
O0
c
list_add: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe230e cmpq $0x0, -0x8(%rbp) je 0xe2349 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0xe232e movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) jmp 0xe2354 movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax popq %rbp retq nop
list_add: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E230E: cmp [rbp+var_8], 0 jz short loc_E2349 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_E232E mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx loc_E232E: mov rax, [rbp+var_8] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx jmp short loc_E2354 loc_E2349: mov rax, [rbp+var_10] mov qword ptr [rax], 0 loc_E2354: mov rcx, [rbp+var_8] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rax, [rbp+var_18] pop rbp retn
_QWORD * list_add(long long a1, _QWORD *a2) { if ( a1 ) { if ( *(_QWORD *)a1 ) *(_QWORD *)(*(_QWORD *)a1 + 8LL) = a2; *a2 = *(_QWORD *)a1; *(_QWORD *)a1 = a2; } else { *a2 = 0LL; } a2[1] = a1; return a2; }
list_add: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e230e LAB_001e230e: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001e2349 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x001e232e MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX LAB_001e232e: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX JMP 0x001e2354 LAB_001e2349: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 LAB_001e2354: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
long * list_add(long *param_1,long *param_2) { if (param_1 == (long *)0x0) { *param_2 = 0; } else { if (*param_1 != 0) { *(long **)(*param_1 + 8) = param_2; } *param_2 = *param_1; *param_1 = (long)param_2; } param_2[1] = (long)param_1; return param_2; }
20,856
get_length_arg
eloqsql/strings/my_vsnprintf.c
static const char *get_length_arg(const char *fmt, ARGS_INFO *args_arr, size_t *arg_count, size_t *length, uint *flags) { fmt= get_length(fmt+1, length, flags); *arg_count= MY_MAX(*arg_count, *length); (*length)--; DBUG_ASSERT(*fmt == '$' && *length < MAX_ARGS); args_arr[*length].arg_type= 'd'; args_arr[*length].have_longlong= 0; return fmt+1; }
O0
c
get_length_arg: 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 %r8, -0x28(%rbp) movq -0x8(%rbp), %rdi addq $0x1, %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xaba70 movq %rax, -0x8(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq -0x20(%rbp), %rcx cmpq (%rcx), %rax jbe 0xad882 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) jmp 0xad88d movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx addq $-0x1, %rcx movq %rcx, (%rax) jmp 0xad8a8 movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx shlq $0x5, %rcx addq %rcx, %rax movb $0x64, (%rax) movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx shlq $0x5, %rcx addq %rcx, %rax movl $0x0, 0x4(%rax) movq -0x8(%rbp), %rax addq $0x1, %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_length_arg: 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 [rbp+var_28], r8 mov rdi, [rbp+var_8] add rdi, 1 mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call get_length mov [rbp+var_8], rax mov rax, [rbp+var_18] mov rax, [rax] mov rcx, [rbp+var_20] cmp rax, [rcx] jbe short loc_AD882 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_30], rax jmp short loc_AD88D loc_AD882: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_30], rax loc_AD88D: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_20] mov rcx, [rax] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax], rcx jmp short $+2 loc_AD8A8: mov rax, [rbp+var_10] mov rcx, [rbp+var_20] mov rcx, [rcx] shl rcx, 5 add rax, rcx mov byte ptr [rax], 64h ; 'd' mov rax, [rbp+var_10] mov rcx, [rbp+var_20] mov rcx, [rcx] shl rcx, 5 add rax, rcx mov dword ptr [rax+4], 0 mov rax, [rbp+var_8] add rax, 1 add rsp, 30h pop rbp retn
unsigned __int8 * get_length_arg(long long a1, long long a2, long long *a3, long long *a4, _DWORD *a5) { long long v6; // [rsp+0h] [rbp-30h] unsigned __int8 *length; // [rsp+28h] [rbp-8h] length = get_length((unsigned __int8 *)(a1 + 1), a4, a5); if ( *a3 <= (unsigned long long)*a4 ) v6 = *a4; else v6 = *a3; *a3 = v6; --*a4; *(_BYTE *)(32 * *a4 + a2) = 100; *(_DWORD *)(32 * *a4 + a2 + 4) = 0; return length + 1; }
get_length_arg: 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 qword ptr [RBP + -0x28],R8 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x1 MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001aba70 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RCX] JBE 0x001ad882 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX JMP 0x001ad88d LAB_001ad882: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX LAB_001ad88d: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] ADD RCX,-0x1 MOV qword ptr [RAX],RCX JMP 0x001ad8a8 LAB_001ad8a8: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] SHL RCX,0x5 ADD RAX,RCX MOV byte ptr [RAX],0x64 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] SHL RCX,0x5 ADD RAX,RCX MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 ADD RSP,0x30 POP RBP RET
long get_length_arg(long param_1,long param_2,ulong *param_3,ulong *param_4,int8 param_5) { long lVar1; int8 local_38; lVar1 = get_length(param_1 + 1,param_4,param_5); if (*param_4 < *param_3) { local_38 = *param_3; } else { local_38 = *param_4; } *param_3 = local_38; *param_4 = *param_4 - 1; *(int1 *)(param_2 + *param_4 * 0x20) = 100; *(int4 *)(param_2 + *param_4 * 0x20 + 4) = 0; return lVar1 + 1; }
20,857
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
string LogSink::ToString(LogSeverity severity, const char* file, int line, const LogMessageTime& time, const char* message, size_t message_len) { ostringstream stream; stream.fill('0'); stream << LogSeverityNames[severity][0]; if (FLAGS_log_year_in_prefix) { stream << setw(4) << 1900 + time.year(); } stream << setw(2) << 1 + time.month() << setw(2) << time.day() << ' ' << setw(2) << time.hour() << ':' << setw(2) << time.min() << ':' << setw(2) << time.sec() << '.' << setw(6) << time.usec() << ' ' << setfill(' ') << setw(5) << std::this_thread::get_id() << setfill('0') << ' ' << file << ':' << line << "] "; // A call to `write' is enclosed in parenthneses to prevent possible macro // expansion. On Windows, `write' could be a macro defined for portability. (stream.write)(message, static_cast<std::streamsize>(message_len)); return stream.str(); }
O0
cpp
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x320, %rsp # imm = 0x320 movq %rdi, -0x1f8(%rbp) movq %rdi, %rax movq %rax, -0x1f0(%rbp) movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq -0x1a8(%rbp), %rdi callq 0x99c0 movq -0x1a8(%rbp), %rax movq -0x18(%rax), %rax leaq -0x1a8(%rbp,%rax), %rdi movl $0x30, %esi callq 0x97b0 jmp 0x12281 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x5f303(%rip), %rax # 0x71590 movq (%rax,%rcx,8), %rax movsbl (%rax), %esi leaq -0x1a8(%rbp), %rdi callq 0x9860 jmp 0x122a2 leaq 0x60abc(%rip), %rax # 0x72d65 testb $0x1, (%rax) je 0x1232b movl $0x4, %edi callq 0x19980 movl %eax, -0x1fc(%rbp) jmp 0x122c0 movl -0x1fc(%rbp), %eax movl %eax, -0x1b8(%rbp) movl -0x1b8(%rbp), %esi leaq -0x1a8(%rbp), %rdi callq 0x9840 movq %rax, -0x208(%rbp) jmp 0x122e7 movq -0x28(%rbp), %rdi callq 0x199a0 movq -0x208(%rbp), %rdi movl %eax, %esi addl $0x76c, %esi # imm = 0x76C callq 0x9c90 jmp 0x12306 jmp 0x1232b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1b0(%rbp) movl %eax, -0x1b4(%rbp) leaq -0x1a8(%rbp), %rdi callq 0x9140 jmp 0x1275c movl $0x2, %edi callq 0x19980 movl %eax, -0x20c(%rbp) jmp 0x1233d movl -0x20c(%rbp), %eax movl %eax, -0x1bc(%rbp) movl -0x1bc(%rbp), %esi leaq -0x1a8(%rbp), %rdi callq 0x9840 movq %rax, -0x218(%rbp) jmp 0x12364 movq -0x28(%rbp), %rdi callq 0x19a30 movq -0x218(%rbp), %rdi movl %eax, %esi incl %esi callq 0x9c90 movq %rax, -0x220(%rbp) jmp 0x12386 movl $0x2, %edi callq 0x19980 movl %eax, -0x224(%rbp) jmp 0x12398 movq -0x220(%rbp), %rdi movl -0x224(%rbp), %eax movl %eax, -0x1c0(%rbp) movl -0x1c0(%rbp), %esi callq 0x9840 movq %rax, -0x230(%rbp) jmp 0x123bf movq -0x28(%rbp), %rdi callq 0x19a50 movq -0x230(%rbp), %rdi movl %eax, %esi callq 0x9c90 movq %rax, -0x238(%rbp) jmp 0x123df movq -0x238(%rbp), %rdi movl $0x20, %esi callq 0x9860 movq %rax, -0x240(%rbp) jmp 0x123f9 movl $0x2, %edi callq 0x19980 movl %eax, -0x244(%rbp) jmp 0x1240b movq -0x240(%rbp), %rdi movl -0x244(%rbp), %eax movl %eax, -0x1c4(%rbp) movl -0x1c4(%rbp), %esi callq 0x9840 movq %rax, -0x250(%rbp) jmp 0x12432 movq -0x28(%rbp), %rdi callq 0x19a70 movq -0x250(%rbp), %rdi movl %eax, %esi callq 0x9c90 movq %rax, -0x258(%rbp) jmp 0x12452 movq -0x258(%rbp), %rdi movl $0x3a, %esi callq 0x9860 movq %rax, -0x260(%rbp) jmp 0x1246c movl $0x2, %edi callq 0x19980 movl %eax, -0x264(%rbp) jmp 0x1247e movq -0x260(%rbp), %rdi movl -0x264(%rbp), %eax movl %eax, -0x1c8(%rbp) movl -0x1c8(%rbp), %esi callq 0x9840 movq %rax, -0x270(%rbp) jmp 0x124a5 movq -0x28(%rbp), %rdi callq 0x19a90 movq -0x270(%rbp), %rdi movl %eax, %esi callq 0x9c90 movq %rax, -0x278(%rbp) jmp 0x124c5 movq -0x278(%rbp), %rdi movl $0x3a, %esi callq 0x9860 movq %rax, -0x280(%rbp) jmp 0x124df movl $0x2, %edi callq 0x19980 movl %eax, -0x284(%rbp) jmp 0x124f1 movq -0x280(%rbp), %rdi movl -0x284(%rbp), %eax movl %eax, -0x1cc(%rbp) movl -0x1cc(%rbp), %esi callq 0x9840 movq %rax, -0x290(%rbp) jmp 0x12518 movq -0x28(%rbp), %rdi callq 0x19ab0 movq -0x290(%rbp), %rdi movl %eax, %esi callq 0x9c90 movq %rax, -0x298(%rbp) jmp 0x12538 movq -0x298(%rbp), %rdi movl $0x2e, %esi callq 0x9860 movq %rax, -0x2a0(%rbp) jmp 0x12552 movl $0x6, %edi callq 0x19980 movl %eax, -0x2a4(%rbp) jmp 0x12564 movq -0x2a0(%rbp), %rdi movl -0x2a4(%rbp), %eax movl %eax, -0x1d0(%rbp) movl -0x1d0(%rbp), %esi callq 0x9840 movq %rax, -0x2b0(%rbp) jmp 0x1258b movq -0x28(%rbp), %rdi callq 0x19ac0 movq -0x2b0(%rbp), %rdi movq %rax, %rsi callq 0x9d20 movq %rax, -0x2b8(%rbp) jmp 0x125ac movq -0x2b8(%rbp), %rdi movl $0x20, %esi callq 0x9860 movq %rax, -0x2c0(%rbp) jmp 0x125c6 movl $0x20, %edi callq 0x19b00 movb %al, -0x2c1(%rbp) jmp 0x125d8 movq -0x2c0(%rbp), %rdi movb -0x2c1(%rbp), %al movb %al, -0x1d1(%rbp) movzbl -0x1d1(%rbp), %esi callq 0x9b60 movq %rax, -0x2d0(%rbp) jmp 0x12600 movl $0x5, %edi callq 0x19980 movl %eax, -0x2d4(%rbp) jmp 0x12612 movq -0x2d0(%rbp), %rdi movl -0x2d4(%rbp), %eax movl %eax, -0x1d8(%rbp) movl -0x1d8(%rbp), %esi callq 0x9840 movq %rax, -0x2e0(%rbp) jmp 0x12639 callq 0x19950 movq -0x2e0(%rbp), %rdi movq %rax, -0x1e0(%rbp) movq -0x1e0(%rbp), %rsi callq 0x199c0 movq %rax, -0x2e8(%rbp) jmp 0x12661 movl $0x30, %edi callq 0x19b00 movb %al, -0x2e9(%rbp) jmp 0x12673 movq -0x2e8(%rbp), %rdi movb -0x2e9(%rbp), %al movb %al, -0x1e1(%rbp) movzbl -0x1e1(%rbp), %esi callq 0x9b60 movq %rax, -0x2f8(%rbp) jmp 0x1269b movq -0x2f8(%rbp), %rdi movl $0x20, %esi callq 0x9860 movq %rax, -0x300(%rbp) jmp 0x126b5 movq -0x300(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x96e0 movq %rax, -0x308(%rbp) jmp 0x126ce movq -0x308(%rbp), %rdi movl $0x3a, %esi callq 0x9860 movq %rax, -0x310(%rbp) jmp 0x126e8 movq -0x310(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0x9c90 movq %rax, -0x318(%rbp) jmp 0x12700 movq -0x318(%rbp), %rdi leaq 0x3c594(%rip), %rsi # 0x4eca2 callq 0x96e0 jmp 0x12715 movq -0x30(%rbp), %rsi movq 0x10(%rbp), %rdx leaq -0x1a8(%rbp), %rdi callq 0x9970 jmp 0x1272b movq -0x1f8(%rbp), %rdi leaq -0x1a8(%rbp), %rsi callq 0x9710 jmp 0x12740 leaq -0x1a8(%rbp), %rdi callq 0x9140 movq -0x1f0(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq movq -0x1b0(%rbp), %rdi callq 0x9cc0 nopl (%rax,%rax)
_ZN5nglog7LogSink8ToStringB5cxx11ENS_11LogSeverityEPKciRKNS_14LogMessageTimeES3_m: push rbp mov rbp, rsp sub rsp, 320h mov [rbp+var_1F8], rdi mov rax, rdi mov [rbp+var_1F0], rax mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [rbp+var_1A8] mov rax, [rax-18h] lea rdi, [rbp+rax+var_1A8] mov esi, 30h ; '0' call __ZNSt9basic_iosIcSt11char_traitsIcEE4fillEc; std::ios::fill(char) jmp short $+2 loc_12281: mov eax, [rbp+var_C] mov ecx, eax lea rax, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames mov rax, [rax+rcx*8] movsx esi, byte ptr [rax] lea rdi, [rbp+var_1A8] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short $+2 loc_122A2: lea rax, _ZN3fLB24FLAGS_log_year_in_prefixE; fLB::FLAGS_log_year_in_prefix test byte ptr [rax], 1 jz short loc_1232B mov edi, 4; int call _ZSt4setwi; std::setw(int) mov [rbp+var_1FC], eax jmp short $+2 loc_122C0: mov eax, [rbp+var_1FC] mov [rbp+var_1B8], eax mov esi, [rbp+var_1B8] lea rdi, [rbp+var_1A8] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_208], rax jmp short $+2 loc_122E7: mov rdi, [rbp+var_28]; this call _ZNK5nglog14LogMessageTime4yearEv; nglog::LogMessageTime::year(void) mov rdi, [rbp+var_208] mov esi, eax add esi, 76Ch call __ZNSolsEi; std::ostream::operator<<(int) jmp short $+2 loc_12306: jmp short loc_1232B mov rcx, rax mov eax, edx mov [rbp+var_1B0], rcx mov [rbp+var_1B4], eax lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() jmp loc_1275C loc_1232B: mov edi, 2; int call _ZSt4setwi; std::setw(int) mov [rbp+var_20C], eax jmp short $+2 loc_1233D: mov eax, [rbp+var_20C] mov [rbp+var_1BC], eax mov esi, [rbp+var_1BC] lea rdi, [rbp+var_1A8] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_218], rax jmp short $+2 loc_12364: mov rdi, [rbp+var_28]; this call _ZNK5nglog14LogMessageTime5monthEv; nglog::LogMessageTime::month(void) mov rdi, [rbp+var_218] mov esi, eax inc esi call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_220], rax jmp short $+2 loc_12386: mov edi, 2; int call _ZSt4setwi; std::setw(int) mov [rbp+var_224], eax jmp short $+2 loc_12398: mov rdi, [rbp+var_220] mov eax, [rbp+var_224] mov [rbp+var_1C0], eax mov esi, [rbp+var_1C0] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_230], rax jmp short $+2 loc_123BF: mov rdi, [rbp+var_28]; this call _ZNK5nglog14LogMessageTime3dayEv; nglog::LogMessageTime::day(void) mov rdi, [rbp+var_230] mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_238], rax jmp short $+2 loc_123DF: mov rdi, [rbp+var_238] mov esi, 20h ; ' ' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov [rbp+var_240], rax jmp short $+2 loc_123F9: mov edi, 2; int call _ZSt4setwi; std::setw(int) mov [rbp+var_244], eax jmp short $+2 loc_1240B: mov rdi, [rbp+var_240] mov eax, [rbp+var_244] mov [rbp+var_1C4], eax mov esi, [rbp+var_1C4] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_250], rax jmp short $+2 loc_12432: mov rdi, [rbp+var_28]; this call _ZNK5nglog14LogMessageTime4hourEv; nglog::LogMessageTime::hour(void) mov rdi, [rbp+var_250] mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_258], rax jmp short $+2 loc_12452: mov rdi, [rbp+var_258] mov esi, 3Ah ; ':' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov [rbp+var_260], rax jmp short $+2 loc_1246C: mov edi, 2; int call _ZSt4setwi; std::setw(int) mov [rbp+var_264], eax jmp short $+2 loc_1247E: mov rdi, [rbp+var_260] mov eax, [rbp+var_264] mov [rbp+var_1C8], eax mov esi, [rbp+var_1C8] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_270], rax jmp short $+2 loc_124A5: mov rdi, [rbp+var_28]; this call _ZNK5nglog14LogMessageTime3minEv; nglog::LogMessageTime::min(void) mov rdi, [rbp+var_270] mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_278], rax jmp short $+2 loc_124C5: mov rdi, [rbp+var_278] mov esi, 3Ah ; ':' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov [rbp+var_280], rax jmp short $+2 loc_124DF: mov edi, 2; int call _ZSt4setwi; std::setw(int) mov [rbp+var_284], eax jmp short $+2 loc_124F1: mov rdi, [rbp+var_280] mov eax, [rbp+var_284] mov [rbp+var_1CC], eax mov esi, [rbp+var_1CC] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_290], rax jmp short $+2 loc_12518: mov rdi, [rbp+var_28]; this call _ZNK5nglog14LogMessageTime3secEv; nglog::LogMessageTime::sec(void) mov rdi, [rbp+var_290] mov esi, eax call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_298], rax jmp short $+2 loc_12538: mov rdi, [rbp+var_298] mov esi, 2Eh ; '.' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov [rbp+var_2A0], rax jmp short $+2 loc_12552: mov edi, 6; int call _ZSt4setwi; std::setw(int) mov [rbp+var_2A4], eax jmp short $+2 loc_12564: mov rdi, [rbp+var_2A0] mov eax, [rbp+var_2A4] mov [rbp+var_1D0], eax mov esi, [rbp+var_1D0] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_2B0], rax jmp short $+2 loc_1258B: mov rdi, [rbp+var_28]; this call _ZNK5nglog14LogMessageTime4usecEv; nglog::LogMessageTime::usec(void) mov rdi, [rbp+var_2B0] mov rsi, rax call __ZNSolsEl; std::ostream::operator<<(long) mov [rbp+var_2B8], rax jmp short $+2 loc_125AC: mov rdi, [rbp+var_2B8] mov esi, 20h ; ' ' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov [rbp+var_2C0], rax jmp short $+2 loc_125C6: mov edi, 20h ; ' ' call _ZSt7setfillIcESt8_SetfillIT_ES1_; std::setfill<char>(char) mov [rbp+var_2C1], al jmp short $+2 loc_125D8: mov rdi, [rbp+var_2C0] mov al, [rbp+var_2C1] mov [rbp+var_1D1], al movzx esi, [rbp+var_1D1] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setfill<char>) mov [rbp+var_2D0], rax jmp short $+2 loc_12600: mov edi, 5; int call _ZSt4setwi; std::setw(int) mov [rbp+var_2D4], eax jmp short $+2 loc_12612: mov rdi, [rbp+var_2D0]; this mov eax, [rbp+var_2D4] mov [rbp+var_1D8], eax mov esi, [rbp+var_1D8] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_2E0], rax jmp short $+2 loc_12639: call _ZNSt11this_thread6get_idEv; std::this_thread::get_id(void) mov rdi, [rbp+var_2E0] mov [rbp+var_1E0], rax mov rsi, [rbp+var_1E0] call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_NSt6thread2idE; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::thread::id) mov [rbp+var_2E8], rax jmp short $+2 loc_12661: mov edi, 30h ; '0' call _ZSt7setfillIcESt8_SetfillIT_ES1_; std::setfill<char>(char) mov [rbp+var_2E9], al jmp short $+2 loc_12673: mov rdi, [rbp+var_2E8] mov al, [rbp+var_2E9] mov [rbp+var_1E1], al movzx esi, [rbp+var_1E1] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setfill<char>) mov [rbp+var_2F8], rax jmp short $+2 loc_1269B: mov rdi, [rbp+var_2F8] mov esi, 20h ; ' ' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov [rbp+var_300], rax jmp short $+2 loc_126B5: mov rdi, [rbp+var_300] mov rsi, [rbp+var_18] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_308], rax jmp short $+2 loc_126CE: mov rdi, [rbp+var_308] mov esi, 3Ah ; ':' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov [rbp+var_310], rax jmp short $+2 loc_126E8: mov rdi, [rbp+var_310] mov esi, [rbp+var_1C] call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_318], rax jmp short $+2 loc_12700: mov rdi, [rbp+var_318] lea rsi, aLog_0+4; "] " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_12715: mov rsi, [rbp+var_30]; char * mov rdx, [rbp+arg_0]; __int64 lea rdi, [rbp+var_1A8]; this call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short $+2 loc_1272B: mov rdi, [rbp+var_1F8] lea rsi, [rbp+var_1A8] call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void) jmp short $+2 loc_12740: lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rax, [rbp+var_1F0] add rsp, 320h pop rbp retn loc_1275C: mov rdi, [rbp+var_1B0] call __Unwind_Resume
long long nglog::LogSink::ToString[abi:cxx11]( long long a1, int a2, long long a3, unsigned int a4, nglog::LogMessageTime *a5, char *a6, long long a7) { int v7; // eax int v8; // eax unsigned int v9; // eax unsigned int v10; // eax unsigned int v11; // eax unsigned int v12; // eax long long v13; // rax long long v15; // [rsp+8h] [rbp-318h] long long v16; // [rsp+10h] [rbp-310h] long long v17; // [rsp+18h] [rbp-308h] long long v18; // [rsp+20h] [rbp-300h] long long v19; // [rsp+28h] [rbp-2F8h] long long v20; // [rsp+38h] [rbp-2E8h] long long v21; // [rsp+40h] [rbp-2E0h] std::this_thread *v22; // [rsp+50h] [rbp-2D0h] long long v23; // [rsp+60h] [rbp-2C0h] long long v24; // [rsp+68h] [rbp-2B8h] long long v25; // [rsp+70h] [rbp-2B0h] long long v26; // [rsp+80h] [rbp-2A0h] long long v27; // [rsp+88h] [rbp-298h] long long v28; // [rsp+90h] [rbp-290h] long long v29; // [rsp+A0h] [rbp-280h] long long v30; // [rsp+A8h] [rbp-278h] long long v31; // [rsp+B0h] [rbp-270h] long long v32; // [rsp+C0h] [rbp-260h] long long v33; // [rsp+C8h] [rbp-258h] long long v34; // [rsp+D0h] [rbp-250h] long long v35; // [rsp+E0h] [rbp-240h] long long v36; // [rsp+E8h] [rbp-238h] long long v37; // [rsp+F0h] [rbp-230h] long long v38; // [rsp+100h] [rbp-220h] long long v39; // [rsp+108h] [rbp-218h] long long v40; // [rsp+118h] [rbp-208h] unsigned __int8 v41; // [rsp+13Fh] [rbp-1E1h] long long id; // [rsp+140h] [rbp-1E0h] unsigned int v43; // [rsp+148h] [rbp-1D8h] unsigned __int8 v44; // [rsp+14Fh] [rbp-1D1h] unsigned int v45; // [rsp+150h] [rbp-1D0h] unsigned int v46; // [rsp+154h] [rbp-1CCh] unsigned int v47; // [rsp+158h] [rbp-1C8h] unsigned int v48; // [rsp+15Ch] [rbp-1C4h] unsigned int v49; // [rsp+160h] [rbp-1C0h] unsigned int v50; // [rsp+164h] [rbp-1BCh] unsigned int v51; // [rsp+168h] [rbp-1B8h] _QWORD v52[47]; // [rsp+178h] [rbp-1A8h] BYREF char *v53; // [rsp+2F0h] [rbp-30h] nglog::LogMessageTime *v54; // [rsp+2F8h] [rbp-28h] unsigned int v55; // [rsp+304h] [rbp-1Ch] long long v56; // [rsp+308h] [rbp-18h] int v57; // [rsp+314h] [rbp-Ch] long long v58; // [rsp+318h] [rbp-8h] v58 = a1; v57 = a2; v56 = a3; v55 = a4; v54 = a5; v53 = a6; std::ostringstream::basic_ostringstream(v52); std::ios::fill((char *)v52 + *(_QWORD *)(v52[0] - 24LL), 48LL); std::operator<<<std::char_traits<char>>(v52, (unsigned int)*nglog::LogSeverityNames[v57]); if ( (fLB::FLAGS_log_year_in_prefix & 1) != 0 ) { v51 = std::setw(4); v40 = std::operator<<<char,std::char_traits<char>>(v52, v51); v7 = nglog::LogMessageTime::year(v54); std::ostream::operator<<(v40, (unsigned int)(v7 + 1900)); } v50 = std::setw(2); v39 = std::operator<<<char,std::char_traits<char>>(v52, v50); v8 = nglog::LogMessageTime::month(v54); v38 = std::ostream::operator<<(v39, (unsigned int)(v8 + 1)); v49 = std::setw(2); v37 = std::operator<<<char,std::char_traits<char>>(v38, v49); v9 = nglog::LogMessageTime::day(v54); v36 = std::ostream::operator<<(v37, v9); v35 = std::operator<<<std::char_traits<char>>(v36, 32LL); v48 = std::setw(2); v34 = std::operator<<<char,std::char_traits<char>>(v35, v48); v10 = nglog::LogMessageTime::hour(v54); v33 = std::ostream::operator<<(v34, v10); v32 = std::operator<<<std::char_traits<char>>(v33, 58LL); v47 = std::setw(2); v31 = std::operator<<<char,std::char_traits<char>>(v32, v47); v11 = nglog::LogMessageTime::min(v54); v30 = std::ostream::operator<<(v31, v11); v29 = std::operator<<<std::char_traits<char>>(v30, 58LL); v46 = std::setw(2); v28 = std::operator<<<char,std::char_traits<char>>(v29, v46); v12 = nglog::LogMessageTime::sec(v54); v27 = std::ostream::operator<<(v28, v12); v26 = std::operator<<<std::char_traits<char>>(v27, 46LL); v45 = std::setw(6); v25 = std::operator<<<char,std::char_traits<char>>(v26, v45); v13 = nglog::LogMessageTime::usec(v54); v24 = std::ostream::operator<<(v25, v13); v23 = std::operator<<<std::char_traits<char>>(v24, 32LL); v44 = std::setfill<char>(32LL); v22 = (std::this_thread *)std::operator<<<char,std::char_traits<char>>(v23, v44); v43 = std::setw(5); v21 = std::operator<<<char,std::char_traits<char>>(v22, v43); id = std::this_thread::get_id(v22); v20 = std::operator<<<char,std::char_traits<char>>(v21, id); v41 = std::setfill<char>(48LL); v19 = std::operator<<<char,std::char_traits<char>>(v20, v41); v18 = std::operator<<<std::char_traits<char>>(v19, 32LL); v17 = std::operator<<<std::char_traits<char>>(v18, v56); v16 = std::operator<<<std::char_traits<char>>(v17, 58LL); v15 = std::ostream::operator<<(v16, v55); std::operator<<<std::char_traits<char>>(v15, "] "); std::ostream::write((std::ostream *)v52, v53, a7); std::ostringstream::str(a1, v52); std::ostringstream::~ostringstream(v52); return a1; }
ToString[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x320 MOV qword ptr [RBP + -0x1f8],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x1f0],RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RDI,[RBP + -0x1a8] CALL 0x001099c0 MOV RAX,qword ptr [RBP + -0x1a8] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[RBP + RAX*0x1 + -0x1a8] LAB_00112275: MOV ESI,0x30 CALL 0x001097b0 JMP 0x00112281 LAB_00112281: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x171590] MOV RAX,qword ptr [RAX + RCX*0x8] MOVSX ESI,byte ptr [RAX] LEA RDI,[RBP + -0x1a8] CALL 0x00109860 JMP 0x001122a2 LAB_001122a2: LEA RAX,[0x172d65] TEST byte ptr [RAX],0x1 JZ 0x0011232b MOV EDI,0x4 CALL 0x00119980 MOV dword ptr [RBP + -0x1fc],EAX JMP 0x001122c0 LAB_001122c0: MOV EAX,dword ptr [RBP + -0x1fc] MOV dword ptr [RBP + -0x1b8],EAX MOV ESI,dword ptr [RBP + -0x1b8] LEA RDI,[RBP + -0x1a8] CALL 0x00109840 MOV qword ptr [RBP + -0x208],RAX JMP 0x001122e7 LAB_001122e7: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001199a0 MOV RDI,qword ptr [RBP + -0x208] MOV ESI,EAX ADD ESI,0x76c CALL 0x00109c90 JMP 0x00112306 LAB_00112306: JMP 0x0011232b LAB_0011232b: MOV EDI,0x2 CALL 0x00119980 MOV dword ptr [RBP + -0x20c],EAX JMP 0x0011233d LAB_0011233d: MOV EAX,dword ptr [RBP + -0x20c] MOV dword ptr [RBP + -0x1bc],EAX MOV ESI,dword ptr [RBP + -0x1bc] LEA RDI,[RBP + -0x1a8] CALL 0x00109840 MOV qword ptr [RBP + -0x218],RAX JMP 0x00112364 LAB_00112364: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00119a30 MOV RDI,qword ptr [RBP + -0x218] MOV ESI,EAX INC ESI CALL 0x00109c90 MOV qword ptr [RBP + -0x220],RAX JMP 0x00112386 LAB_00112386: MOV EDI,0x2 CALL 0x00119980 MOV dword ptr [RBP + -0x224],EAX JMP 0x00112398 LAB_00112398: MOV RDI,qword ptr [RBP + -0x220] MOV EAX,dword ptr [RBP + -0x224] MOV dword ptr [RBP + -0x1c0],EAX MOV ESI,dword ptr [RBP + -0x1c0] CALL 0x00109840 MOV qword ptr [RBP + -0x230],RAX JMP 0x001123bf LAB_001123bf: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00119a50 MOV RDI,qword ptr [RBP + -0x230] MOV ESI,EAX CALL 0x00109c90 MOV qword ptr [RBP + -0x238],RAX JMP 0x001123df LAB_001123df: MOV RDI,qword ptr [RBP + -0x238] MOV ESI,0x20 CALL 0x00109860 MOV qword ptr [RBP + -0x240],RAX JMP 0x001123f9 LAB_001123f9: MOV EDI,0x2 CALL 0x00119980 MOV dword ptr [RBP + -0x244],EAX JMP 0x0011240b LAB_0011240b: MOV RDI,qword ptr [RBP + -0x240] MOV EAX,dword ptr [RBP + -0x244] MOV dword ptr [RBP + -0x1c4],EAX MOV ESI,dword ptr [RBP + -0x1c4] CALL 0x00109840 MOV qword ptr [RBP + -0x250],RAX JMP 0x00112432 LAB_00112432: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00119a70 MOV RDI,qword ptr [RBP + -0x250] MOV ESI,EAX CALL 0x00109c90 MOV qword ptr [RBP + -0x258],RAX JMP 0x00112452 LAB_00112452: MOV RDI,qword ptr [RBP + -0x258] MOV ESI,0x3a CALL 0x00109860 MOV qword ptr [RBP + -0x260],RAX JMP 0x0011246c LAB_0011246c: MOV EDI,0x2 CALL 0x00119980 MOV dword ptr [RBP + -0x264],EAX JMP 0x0011247e LAB_0011247e: MOV RDI,qword ptr [RBP + -0x260] MOV EAX,dword ptr [RBP + -0x264] MOV dword ptr [RBP + -0x1c8],EAX MOV ESI,dword ptr [RBP + -0x1c8] CALL 0x00109840 MOV qword ptr [RBP + -0x270],RAX JMP 0x001124a5 LAB_001124a5: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00119a90 MOV RDI,qword ptr [RBP + -0x270] MOV ESI,EAX CALL 0x00109c90 MOV qword ptr [RBP + -0x278],RAX JMP 0x001124c5 LAB_001124c5: MOV RDI,qword ptr [RBP + -0x278] MOV ESI,0x3a CALL 0x00109860 MOV qword ptr [RBP + -0x280],RAX JMP 0x001124df LAB_001124df: MOV EDI,0x2 CALL 0x00119980 MOV dword ptr [RBP + -0x284],EAX JMP 0x001124f1 LAB_001124f1: MOV RDI,qword ptr [RBP + -0x280] MOV EAX,dword ptr [RBP + -0x284] MOV dword ptr [RBP + -0x1cc],EAX MOV ESI,dword ptr [RBP + -0x1cc] CALL 0x00109840 MOV qword ptr [RBP + -0x290],RAX JMP 0x00112518 LAB_00112518: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00119ab0 MOV RDI,qword ptr [RBP + -0x290] MOV ESI,EAX CALL 0x00109c90 MOV qword ptr [RBP + -0x298],RAX JMP 0x00112538 LAB_00112538: MOV RDI,qword ptr [RBP + -0x298] MOV ESI,0x2e CALL 0x00109860 MOV qword ptr [RBP + -0x2a0],RAX JMP 0x00112552 LAB_00112552: MOV EDI,0x6 CALL 0x00119980 MOV dword ptr [RBP + -0x2a4],EAX JMP 0x00112564 LAB_00112564: MOV RDI,qword ptr [RBP + -0x2a0] MOV EAX,dword ptr [RBP + -0x2a4] MOV dword ptr [RBP + -0x1d0],EAX MOV ESI,dword ptr [RBP + -0x1d0] CALL 0x00109840 MOV qword ptr [RBP + -0x2b0],RAX JMP 0x0011258b LAB_0011258b: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00119ac0 MOV RDI,qword ptr [RBP + -0x2b0] MOV RSI,RAX CALL 0x00109d20 MOV qword ptr [RBP + -0x2b8],RAX JMP 0x001125ac LAB_001125ac: MOV RDI,qword ptr [RBP + -0x2b8] MOV ESI,0x20 CALL 0x00109860 MOV qword ptr [RBP + -0x2c0],RAX JMP 0x001125c6 LAB_001125c6: MOV EDI,0x20 CALL 0x00119b00 MOV byte ptr [RBP + -0x2c1],AL JMP 0x001125d8 LAB_001125d8: MOV RDI,qword ptr [RBP + -0x2c0] MOV AL,byte ptr [RBP + -0x2c1] MOV byte ptr [RBP + -0x1d1],AL MOVZX ESI,byte ptr [RBP + -0x1d1] CALL 0x00109b60 MOV qword ptr [RBP + -0x2d0],RAX JMP 0x00112600 LAB_00112600: MOV EDI,0x5 CALL 0x00119980 MOV dword ptr [RBP + -0x2d4],EAX JMP 0x00112612 LAB_00112612: MOV RDI,qword ptr [RBP + -0x2d0] MOV EAX,dword ptr [RBP + -0x2d4] MOV dword ptr [RBP + -0x1d8],EAX MOV ESI,dword ptr [RBP + -0x1d8] CALL 0x00109840 MOV qword ptr [RBP + -0x2e0],RAX JMP 0x00112639 LAB_00112639: CALL 0x00119950 MOV RDI,qword ptr [RBP + -0x2e0] MOV qword ptr [RBP + -0x1e0],RAX MOV RSI,qword ptr [RBP + -0x1e0] CALL 0x001199c0 MOV qword ptr [RBP + -0x2e8],RAX JMP 0x00112661 LAB_00112661: MOV EDI,0x30 CALL 0x00119b00 MOV byte ptr [RBP + -0x2e9],AL JMP 0x00112673 LAB_00112673: MOV RDI,qword ptr [RBP + -0x2e8] MOV AL,byte ptr [RBP + -0x2e9] MOV byte ptr [RBP + -0x1e1],AL MOVZX ESI,byte ptr [RBP + -0x1e1] CALL 0x00109b60 MOV qword ptr [RBP + -0x2f8],RAX JMP 0x0011269b LAB_0011269b: MOV RDI,qword ptr [RBP + -0x2f8] MOV ESI,0x20 CALL 0x00109860 MOV qword ptr [RBP + -0x300],RAX JMP 0x001126b5 LAB_001126b5: MOV RDI,qword ptr [RBP + -0x300] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001096e0 MOV qword ptr [RBP + -0x308],RAX JMP 0x001126ce LAB_001126ce: MOV RDI,qword ptr [RBP + -0x308] MOV ESI,0x3a CALL 0x00109860 MOV qword ptr [RBP + -0x310],RAX JMP 0x001126e8 LAB_001126e8: MOV RDI,qword ptr [RBP + -0x310] MOV ESI,dword ptr [RBP + -0x1c] CALL 0x00109c90 MOV qword ptr [RBP + -0x318],RAX JMP 0x00112700 LAB_00112700: MOV RDI,qword ptr [RBP + -0x318] LEA RSI,[0x14eca2] CALL 0x001096e0 JMP 0x00112715 LAB_00112715: MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + 0x10] LEA RDI,[RBP + -0x1a8] CALL 0x00109970 JMP 0x0011272b LAB_0011272b: MOV RDI,qword ptr [RBP + -0x1f8] LEA RSI,[RBP + -0x1a8] CALL 0x00109710 LAB_0011273e: JMP 0x00112740 LAB_00112740: LEA RDI,[RBP + -0x1a8] CALL 0x00109140 MOV RAX,qword ptr [RBP + -0x1f0] ADD RSP,0x320 POP RBP RET
/* nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long) */ int8 nglog::LogSink::ToString_abi_cxx11_ (int8 param_1,uint param_2,char *param_3,int param_4,LogMessageTime *param_5, long param_6) { int1 uVar1; int4 uVar2; int iVar3; ostream *poVar4; int8 uVar5; long lVar6; long local_1b0 [47]; long local_38; LogMessageTime *local_30; int local_24; char *local_20; uint local_14; int8 local_10; local_38 = param_6; local_30 = param_5; local_24 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1b0); /* try { // try from 00112275 to 0011273d has its CatchHandler @ 00112308 */ std::ios::fill((char)local_1b0 + (char)*(int8 *)(local_1b0[0] + -0x18)); std::operator<<((ostream *)local_1b0,**(char **)(LogSeverityNames + (ulong)local_14 * 8)); if ((fLB::FLAGS_log_year_in_prefix & 1) != 0) { uVar2 = std::setw(4); poVar4 = std::operator<<(local_1b0,uVar2); iVar3 = LogMessageTime::year(local_30); std::ostream::operator<<(poVar4,iVar3 + 0x76c); } uVar2 = std::setw(2); poVar4 = std::operator<<(local_1b0,uVar2); iVar3 = LogMessageTime::month(local_30); uVar5 = std::ostream::operator<<(poVar4,iVar3 + 1); uVar2 = std::setw(2); poVar4 = std::operator<<(uVar5,uVar2); iVar3 = LogMessageTime::day(local_30); poVar4 = (ostream *)std::ostream::operator<<(poVar4,iVar3); poVar4 = std::operator<<(poVar4,' '); uVar2 = std::setw(2); poVar4 = std::operator<<(poVar4,uVar2); iVar3 = LogMessageTime::hour(local_30); poVar4 = (ostream *)std::ostream::operator<<(poVar4,iVar3); poVar4 = std::operator<<(poVar4,':'); uVar2 = std::setw(2); poVar4 = std::operator<<(poVar4,uVar2); iVar3 = LogMessageTime::min(local_30); poVar4 = (ostream *)std::ostream::operator<<(poVar4,iVar3); poVar4 = std::operator<<(poVar4,':'); uVar2 = std::setw(2); poVar4 = std::operator<<(poVar4,uVar2); iVar3 = LogMessageTime::sec(local_30); poVar4 = (ostream *)std::ostream::operator<<(poVar4,iVar3); poVar4 = std::operator<<(poVar4,'.'); uVar2 = std::setw(6); poVar4 = std::operator<<(poVar4,uVar2); lVar6 = LogMessageTime::usec(local_30); poVar4 = (ostream *)std::ostream::operator<<(poVar4,lVar6); poVar4 = std::operator<<(poVar4,' '); uVar1 = std::setfill<char>(' '); poVar4 = std::operator<<(poVar4,uVar1); uVar2 = std::setw(5); poVar4 = std::operator<<(poVar4,uVar2); uVar5 = std::this_thread::get_id(); poVar4 = std::operator<<(poVar4,uVar5); uVar1 = std::setfill<char>('0'); poVar4 = std::operator<<(poVar4,uVar1); poVar4 = std::operator<<(poVar4,' '); poVar4 = std::operator<<(poVar4,local_20); poVar4 = std::operator<<(poVar4,':'); poVar4 = (ostream *)std::ostream::operator<<(poVar4,local_24); std::operator<<(poVar4,"] "); std::ostream::write((char *)local_1b0,local_38); std::__cxx11::ostringstream::str(); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1b0); return param_1; }
20,858
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
string LogSink::ToString(LogSeverity severity, const char* file, int line, const LogMessageTime& time, const char* message, size_t message_len) { ostringstream stream; stream.fill('0'); stream << LogSeverityNames[severity][0]; if (FLAGS_log_year_in_prefix) { stream << setw(4) << 1900 + time.year(); } stream << setw(2) << 1 + time.month() << setw(2) << time.day() << ' ' << setw(2) << time.hour() << ':' << setw(2) << time.min() << ':' << setw(2) << time.sec() << '.' << setw(6) << time.usec() << ' ' << setfill(' ') << setw(5) << std::this_thread::get_id() << setfill('0') << ' ' << file << ':' << line << "] "; // A call to `write' is enclosed in parenthneses to prevent possible macro // expansion. On Windows, `write' could be a macro defined for portability. (stream.write)(message, static_cast<std::streamsize>(message_len)); return stream.str(); }
O2
cpp
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq %r9, 0x8(%rsp) movq %r8, %r12 movl %ecx, %ebp movq %rdx, %r15 movl %esi, %r13d movq %rdi, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x7790 movq (%r14), %rax addq -0x18(%rax), %r14 movq %r14, %rdi callq 0x72a0 movb $0x30, 0xe0(%r14) movl %r13d, %eax leaq 0x22a3a(%rip), %rcx # 0x2d5c0 movq (%rcx,%rax,8), %rax movsbl (%rax), %esi leaq 0x10(%rsp), %rdi callq 0x7670 leaq 0x24017(%rip), %rax # 0x2ebb5 cmpb $0x1, (%rax) jne 0xabc7 leaq 0x10(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax movq $0x4, 0x20(%rsp,%rax) movl $0x76c, %esi # imm = 0x76C addl 0x14(%r12), %esi callq 0x79a0 leaq 0x10(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax movq $0x2, 0x20(%rsp,%rax) movl 0x10(%r12), %esi incl %esi callq 0x79a0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movq $0x2, 0x10(%rax,%rcx) movl 0xc(%r12), %esi movq %rax, %rdi callq 0x79a0 pushq $0x20 popq %rsi movq %rax, %rdi callq 0x7670 movq (%rax), %rcx movq -0x18(%rcx), %rcx movq $0x2, 0x10(%rax,%rcx) movl 0x8(%r12), %esi movq %rax, %rdi callq 0x79a0 pushq $0x3a popq %rsi movq %rax, %rdi callq 0x7670 movq (%rax), %rcx movq -0x18(%rcx), %rcx movq $0x2, 0x10(%rax,%rcx) movl 0x4(%r12), %esi movq %rax, %rdi callq 0x79a0 pushq $0x3a popq %rsi movq %rax, %rdi callq 0x7670 movq (%rax), %rcx movq -0x18(%rcx), %rcx movq $0x2, 0x10(%rax,%rcx) movl (%r12), %esi movq %rax, %rdi callq 0x79a0 pushq $0x2e popq %rsi movq %rax, %rdi callq 0x7670 movq (%rax), %rcx movq -0x18(%rcx), %rcx movq $0x6, 0x10(%rax,%rcx) movq 0x40(%r12), %rsi movq %rax, %rdi callq 0x7540 pushq $0x20 popq %rsi movq %rax, %rdi callq 0x7670 pushq $0x20 popq %rsi movq %rax, %rdi callq 0x78d0 movq %rax, %r14 movq (%rax), %rax movq -0x18(%rax), %rax movq $0x5, 0x10(%r14,%rax) callq 0x74d0 movq %r14, %rdi movq %rax, %rsi callq 0xe1e6 pushq $0x30 popq %rsi movq %rax, %rdi callq 0x78d0 pushq $0x20 popq %rsi movq %rax, %rdi callq 0x7670 movq %rax, %rdi movq %r15, %rsi callq 0x7570 pushq $0x3a popq %rsi movq %rax, %rdi callq 0x7670 movq %rax, %rdi movl %ebp, %esi callq 0x79a0 leaq 0x13eac(%rip), %rsi # 0x1ebc6 movq %rax, %rdi callq 0x7570 movq 0x1c0(%rsp), %rdx leaq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x7740 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x78e0 leaq 0x10(%rsp), %rdi callq 0x70f0 movq %rbx, %rax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x70f0 movq %rbx, %rdi callq 0x79c0
_ZN5nglog7LogSink8ToStringB5cxx11ENS_11LogSeverityEPKciRKNS_14LogMessageTimeES3_m: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov [rsp+1B8h+var_1B0], r9 mov r12, r8 mov ebp, ecx mov r15, rdx mov r13d, esi mov rbx, rdi lea r14, [rsp+1B8h+var_1A8] mov rdi, r14 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r14] add r14, [rax-18h] mov rdi, r14 call __ZNKSt9basic_iosIcSt11char_traitsIcEE4fillEv; std::ios::fill(void) mov byte ptr [r14+0E0h], 30h ; '0' mov eax, r13d lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames mov rax, [rcx+rax*8] movsx esi, byte ptr [rax] lea rdi, [rsp+1B8h+var_1A8] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) lea rax, _ZN3fLB24FLAGS_log_year_in_prefixE; fLB::FLAGS_log_year_in_prefix cmp byte ptr [rax], 1 jnz short loc_ABC7 lea rdi, [rsp+1B8h+var_1A8] mov rax, [rdi] mov rax, [rax-18h] mov [rsp+rax+1B8h+var_198], 4 mov esi, 76Ch add esi, [r12+14h] call __ZNSolsEi; std::ostream::operator<<(int) loc_ABC7: lea rdi, [rsp+1B8h+var_1A8] mov rax, [rdi] mov rax, [rax-18h] mov [rsp+rax+1B8h+var_198], 2 mov esi, [r12+10h] inc esi call __ZNSolsEi; std::ostream::operator<<(int) mov rcx, [rax] mov rcx, [rcx-18h] mov qword ptr [rax+rcx+10h], 2 mov esi, [r12+0Ch] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) push 20h ; ' ' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rcx, [rax] mov rcx, [rcx-18h] mov qword ptr [rax+rcx+10h], 2 mov esi, [r12+8] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) push 3Ah ; ':' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rcx, [rax] mov rcx, [rcx-18h] mov qword ptr [rax+rcx+10h], 2 mov esi, [r12+4] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) push 3Ah ; ':' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rcx, [rax] mov rcx, [rcx-18h] mov qword ptr [rax+rcx+10h], 2 mov esi, [r12] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) push 2Eh ; '.' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rcx, [rax] mov rcx, [rcx-18h] mov qword ptr [rax+rcx+10h], 6 mov rsi, [r12+40h] mov rdi, rax call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long) push 20h ; ' ' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) push 20h ; ' ' pop rsi mov rdi, rax call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setfill<char>) mov r14, rax mov rax, [rax] mov rax, [rax-18h] mov qword ptr [r14+rax+10h], 5 call _pthread_self mov rdi, r14 mov rsi, rax call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_NSt6thread2idE; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::thread::id) push 30h ; '0' pop rsi mov rdi, rax call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setfill<char>) push 20h ; ' ' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rdi, rax mov rsi, r15 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) push 3Ah ; ':' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rdi, rax mov esi, ebp call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aLog_0+4; "] " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdx, [rsp+1B8h+arg_0]; __int64 lea rdi, [rsp+1B8h+var_1A8]; this mov rsi, [rsp+1B8h+var_1B0]; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) lea rsi, [rsp+1B8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+1B8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rax, rbx add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rdi, rbx call __Unwind_Resume
long long nglog::LogSink::ToString[abi:cxx11]( long long a1, int a2, long long a3, unsigned int a4, unsigned int *a5, const char *a6, long long a7) { _BYTE *v11; // r14 _QWORD *v12; // rax long long v13; // rax _QWORD *v14; // rax long long v15; // rax _QWORD *v16; // rax long long v17; // rax _QWORD *v18; // rax long long v19; // rax _QWORD *v20; // rax long long v21; // rax long long v22; // rdi _QWORD *v23; // r14 long long v24; // rax long long v25; // rax long long v26; // rax long long v27; // rax long long v28; // rax long long v29; // rax long long v30; // rax long long v33; // [rsp+10h] [rbp-1A8h] BYREF _BYTE v34[416]; // [rsp+18h] [rbp-1A0h] BYREF std::ostringstream::basic_ostringstream(&v33); v11 = &v34[*(_QWORD *)(v33 - 24) - 8]; std::ios::fill(v11); v11[224] = 48; std::operator<<<std::char_traits<char>>(&v33, (unsigned int)*nglog::LogSeverityNames[a2]); if ( fLB::FLAGS_log_year_in_prefix == 1 ) { *(_QWORD *)&v34[*(_QWORD *)(v33 - 24) + 8] = 4LL; std::ostream::operator<<(&v33, a5[5] + 1900); } *(_QWORD *)&v34[*(_QWORD *)(v33 - 24) + 8] = 2LL; v12 = (_QWORD *)std::ostream::operator<<(&v33, a5[4] + 1); *(_QWORD *)((char *)v12 + *(_QWORD *)(*v12 - 24LL) + 16) = 2LL; v13 = std::ostream::operator<<(v12, a5[3]); v14 = (_QWORD *)std::operator<<<std::char_traits<char>>(v13, 32LL); *(_QWORD *)((char *)v14 + *(_QWORD *)(*v14 - 24LL) + 16) = 2LL; v15 = std::ostream::operator<<(v14, a5[2]); v16 = (_QWORD *)std::operator<<<std::char_traits<char>>(v15, 58LL); *(_QWORD *)((char *)v16 + *(_QWORD *)(*v16 - 24LL) + 16) = 2LL; v17 = std::ostream::operator<<(v16, a5[1]); v18 = (_QWORD *)std::operator<<<std::char_traits<char>>(v17, 58LL); *(_QWORD *)((char *)v18 + *(_QWORD *)(*v18 - 24LL) + 16) = 2LL; v19 = std::ostream::operator<<(v18, *a5); v20 = (_QWORD *)std::operator<<<std::char_traits<char>>(v19, 46LL); *(_QWORD *)((char *)v20 + *(_QWORD *)(*v20 - 24LL) + 16) = 6LL; v21 = std::ostream::_M_insert<long>(v20, *((_QWORD *)a5 + 8)); v22 = std::operator<<<std::char_traits<char>>(v21, 32LL); v23 = (_QWORD *)std::operator<<<char,std::char_traits<char>>(v22, 32LL); *(_QWORD *)((char *)v23 + *(_QWORD *)(*v23 - 24LL) + 16) = 5LL; v24 = pthread_self(); v25 = std::operator<<<char,std::char_traits<char>>(v23, v24); v26 = std::operator<<<char,std::char_traits<char>>(v25, 48LL); v27 = std::operator<<<std::char_traits<char>>(v26, 32LL); v28 = std::operator<<<std::char_traits<char>>(v27, a3); v29 = std::operator<<<std::char_traits<char>>(v28, 58LL); v30 = std::ostream::operator<<(v29, a4); std::operator<<<std::char_traits<char>>(v30, "] "); std::ostream::write((std::ostream *)&v33, a6, a7); std::stringbuf::str(a1, v34); std::ostringstream::~ostringstream(&v33); return a1; }
ToString[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x188 MOV qword ptr [RSP + 0x8],R9 MOV R12,R8 MOV EBP,ECX MOV R15,RDX MOV R13D,ESI MOV RBX,RDI LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x00107790 MOV RAX,qword ptr [R14] ADD R14,qword ptr [RAX + -0x18] LAB_0010ab6c: MOV RDI,R14 CALL 0x001072a0 MOV byte ptr [R14 + 0xe0],0x30 MOV EAX,R13D LEA RCX,[0x12d5c0] MOV RAX,qword ptr [RCX + RAX*0x8] MOVSX ESI,byte ptr [RAX] LEA RDI,[RSP + 0x10] CALL 0x00107670 LEA RAX,[0x12ebb5] CMP byte ptr [RAX],0x1 JNZ 0x0010abc7 LEA RDI,[RSP + 0x10] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x20],0x4 MOV ESI,0x76c ADD ESI,dword ptr [R12 + 0x14] CALL 0x001079a0 LAB_0010abc7: LEA RDI,[RSP + 0x10] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x20],0x2 MOV ESI,dword ptr [R12 + 0x10] INC ESI CALL 0x001079a0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2 MOV ESI,dword ptr [R12 + 0xc] MOV RDI,RAX CALL 0x001079a0 PUSH 0x20 POP RSI MOV RDI,RAX CALL 0x00107670 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2 MOV ESI,dword ptr [R12 + 0x8] MOV RDI,RAX CALL 0x001079a0 PUSH 0x3a POP RSI MOV RDI,RAX CALL 0x00107670 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2 MOV ESI,dword ptr [R12 + 0x4] MOV RDI,RAX CALL 0x001079a0 PUSH 0x3a POP RSI MOV RDI,RAX CALL 0x00107670 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2 MOV ESI,dword ptr [R12] MOV RDI,RAX CALL 0x001079a0 PUSH 0x2e POP RSI MOV RDI,RAX CALL 0x00107670 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RAX + RCX*0x1 + 0x10],0x6 MOV RSI,qword ptr [R12 + 0x40] MOV RDI,RAX CALL 0x00107540 PUSH 0x20 POP RSI MOV RDI,RAX CALL 0x00107670 PUSH 0x20 POP RSI MOV RDI,RAX CALL 0x001078d0 MOV R14,RAX MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [R14 + RAX*0x1 + 0x10],0x5 CALL 0x001074d0 MOV RDI,R14 MOV RSI,RAX CALL 0x0010e1e6 PUSH 0x30 POP RSI MOV RDI,RAX CALL 0x001078d0 PUSH 0x20 POP RSI MOV RDI,RAX CALL 0x00107670 MOV RDI,RAX MOV RSI,R15 CALL 0x00107570 PUSH 0x3a POP RSI MOV RDI,RAX CALL 0x00107670 MOV RDI,RAX MOV ESI,EBP CALL 0x001079a0 LEA RSI,[0x11ebc6] MOV RDI,RAX CALL 0x00107570 MOV RDX,qword ptr [RSP + 0x1c0] LEA RDI,[RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00107740 LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x001078e0 LAB_0010ad46: LEA RDI,[RSP + 0x10] CALL 0x001070f0 MOV RAX,RBX ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long) */ int8 nglog::LogSink::ToString_abi_cxx11_ (int8 param_1,uint param_2,char *param_3,int param_4,int *param_5,long param_6) { long lVar1; ostream *poVar2; pthread_t pVar3; long local_1a8 [2]; int8 auStack_198 [26]; int1 auStack_c8 [152]; std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8); lVar1 = *(long *)(local_1a8[0] + -0x18); /* try { // try from 0010ab6c to 0010ad45 has its CatchHandler @ 0010ad65 */ std::ios::fill(); auStack_c8[lVar1] = 0x30; std::operator<<((ostream *)local_1a8,**(char **)(LogSeverityNames + (ulong)param_2 * 8)); if (fLB::FLAGS_log_year_in_prefix == '\x01') { *(int8 *)((long)auStack_198 + *(long *)(local_1a8[0] + -0x18)) = 4; std::ostream::operator<<((ostream *)local_1a8,param_5[5] + 0x76c); } *(int8 *)((long)auStack_198 + *(long *)(local_1a8[0] + -0x18)) = 2; poVar2 = (ostream *)std::ostream::operator<<((ostream *)local_1a8,param_5[4] + 1); *(int8 *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x10) = 2; poVar2 = (ostream *)std::ostream::operator<<(poVar2,param_5[3]); poVar2 = std::operator<<(poVar2,' '); *(int8 *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x10) = 2; poVar2 = (ostream *)std::ostream::operator<<(poVar2,param_5[2]); poVar2 = std::operator<<(poVar2,':'); *(int8 *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x10) = 2; poVar2 = (ostream *)std::ostream::operator<<(poVar2,param_5[1]); poVar2 = std::operator<<(poVar2,':'); *(int8 *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x10) = 2; poVar2 = (ostream *)std::ostream::operator<<(poVar2,*param_5); poVar2 = std::operator<<(poVar2,'.'); *(int8 *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x10) = 6; poVar2 = std::ostream::_M_insert<long>((long)poVar2); poVar2 = std::operator<<(poVar2,' '); poVar2 = std::operator<<(poVar2,0x20); *(int8 *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x10) = 5; pVar3 = pthread_self(); poVar2 = std::operator<<(poVar2,pVar3); poVar2 = std::operator<<(poVar2,0x30); poVar2 = std::operator<<(poVar2,' '); poVar2 = std::operator<<(poVar2,param_3); poVar2 = std::operator<<(poVar2,':'); poVar2 = (ostream *)std::ostream::operator<<(poVar2,param_4); std::operator<<(poVar2,"] "); std::ostream::write((char *)local_1a8,param_6); std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8); return param_1; }
20,859
lunasvg::FontFace::operator=(lunasvg::FontFace const&)
dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp
FontFace& FontFace::operator=(const FontFace& face) { FontFace(face).swap(*this); return *this; }
O1
cpp
lunasvg::FontFace::operator=(lunasvg::FontFace const&): pushq %rbx movq %rdi, %rbx movq (%rsi), %rdi callq 0x24ea8 movq (%rbx), %rdi movq %rax, (%rbx) callq 0x24eb6 movq %rbx, %rax popq %rbx retq movq %rax, %rdi callq 0xc48f
_ZN7lunasvg8FontFaceaSERKS0_: push rbx mov rbx, rdi mov rdi, [rsi] call plutovg_font_face_reference mov rdi, [rbx] mov [rbx], rax call plutovg_font_face_destroy mov rax, rbx pop rbx retn mov rdi, rax call __clang_call_terminate
long long * lunasvg::FontFace::operator=(long long *a1, _QWORD *a2) { long long v3; // rax long long v4; // rdi v3 = plutovg_font_face_reference(*a2); v4 = *a1; *a1 = v3; plutovg_font_face_destroy(v4); return a1; }
operator=: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RSI] CALL 0x00124ea8 MOV RDI,qword ptr [RBX] MOV qword ptr [RBX],RAX LAB_0010d45c: CALL 0x00124eb6 MOV RAX,RBX POP RBX RET
/* lunasvg::FontFace::TEMPNAMEPLACEHOLDERVALUE(lunasvg::FontFace const&) */ FontFace * __thiscall lunasvg::FontFace::operator=(FontFace *this,FontFace *param_1) { int8 uVar1; int8 uVar2; uVar2 = plutovg_font_face_reference(*(int8 *)param_1); uVar1 = *(int8 *)this; *(int8 *)this = uVar2; /* try { // try from 0010d45c to 0010d460 has its CatchHandler @ 0010d466 */ plutovg_font_face_destroy(uVar1); return this; }
20,860
my_atod
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
double my_atod(const char *number, const char *end, int *error) { double val= 0.0; char buffer[MAX_DBL_STR + 1]; int len= (int)(end - number); *error= errno= 0; if (len > MAX_DBL_STR) { *error= 1; len= MAX_DBL_STR; } memcpy(buffer, number, len); buffer[len]= '\0'; val= strtod(buffer, NULL); if (errno) *error= errno; return val; }
O0
c
my_atod: pushq %rbp movq %rsp, %rbp subq $0x470, %rsp # imm = 0x470 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x448(%rbp) movq %rsi, -0x450(%rbp) movq %rdx, -0x458(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x460(%rbp) movq -0x450(%rbp), %rax movq -0x448(%rbp), %rcx subq %rcx, %rax movl %eax, -0x464(%rbp) callq 0x13050 movl $0x0, (%rax) movq -0x458(%rbp), %rax movl $0x0, (%rax) cmpl $0x435, -0x464(%rbp) # imm = 0x435 jle 0x2e0ca movq -0x458(%rbp), %rax movl $0x1, (%rax) movl $0x435, -0x464(%rbp) # imm = 0x435 leaq -0x440(%rbp), %rdi movq -0x448(%rbp), %rsi movslq -0x464(%rbp), %rdx callq 0x13360 movslq -0x464(%rbp), %rax movb $0x0, -0x440(%rbp,%rax) leaq -0x440(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x13330 movsd %xmm0, -0x460(%rbp) callq 0x13050 cmpl $0x0, (%rax) je 0x2e125 callq 0x13050 movl (%rax), %ecx movq -0x458(%rbp), %rax movl %ecx, (%rax) movsd -0x460(%rbp), %xmm0 movsd %xmm0, -0x470(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2e158 movsd -0x470(%rbp), %xmm0 addq $0x470, %rsp # imm = 0x470 popq %rbp retq callq 0x134b0 nopl (%rax)
my_atod: push rbp mov rbp, rsp sub rsp, 470h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_448], rdi mov [rbp+var_450], rsi mov [rbp+var_458], rdx xorps xmm0, xmm0 movsd [rbp+var_460], xmm0 mov rax, [rbp+var_450] mov rcx, [rbp+var_448] sub rax, rcx mov [rbp+var_464], eax call ___errno_location mov dword ptr [rax], 0 mov rax, [rbp+var_458] mov dword ptr [rax], 0 cmp [rbp+var_464], 435h jle short loc_2E0CA mov rax, [rbp+var_458] mov dword ptr [rax], 1 mov [rbp+var_464], 435h loc_2E0CA: lea rdi, [rbp+var_440] mov rsi, [rbp+var_448] movsxd rdx, [rbp+var_464] call _memcpy movsxd rax, [rbp+var_464] mov [rbp+rax+var_440], 0 lea rdi, [rbp+var_440] xor eax, eax mov esi, eax call _strtod movsd [rbp+var_460], xmm0 call ___errno_location cmp dword ptr [rax], 0 jz short loc_2E125 call ___errno_location mov ecx, [rax] mov rax, [rbp+var_458] mov [rax], ecx loc_2E125: movsd xmm0, [rbp+var_460] movsd [rbp+var_470], xmm0 mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2E158 movsd xmm0, [rbp+var_470] add rsp, 470h pop rbp retn loc_2E158: call ___stack_chk_fail
double my_atod(long long a1, int a2, _DWORD *a3) { int v4; // [rsp+Ch] [rbp-464h] double v5; // [rsp+10h] [rbp-460h] _BYTE v7[1080]; // [rsp+30h] [rbp-440h] BYREF unsigned long long v8; // [rsp+468h] [rbp-8h] v8 = __readfsqword(0x28u); v4 = a2 - a1; *(_DWORD *)__errno_location() = 0; *a3 = 0; if ( a2 - (int)a1 > 1077 ) { *a3 = 1; v4 = 1077; } memcpy(v7, a1, v4); v7[v4] = 0; v5 = strtod(v7, 0LL); if ( *(_DWORD *)__errno_location() ) *a3 = *(_DWORD *)__errno_location(); return v5; }
my_atod: PUSH RBP MOV RBP,RSP SUB RSP,0x470 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x448],RDI MOV qword ptr [RBP + -0x450],RSI MOV qword ptr [RBP + -0x458],RDX XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x460],XMM0 MOV RAX,qword ptr [RBP + -0x450] MOV RCX,qword ptr [RBP + -0x448] SUB RAX,RCX MOV dword ptr [RBP + -0x464],EAX CALL 0x00113050 MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x458] MOV dword ptr [RAX],0x0 CMP dword ptr [RBP + -0x464],0x435 JLE 0x0012e0ca MOV RAX,qword ptr [RBP + -0x458] MOV dword ptr [RAX],0x1 MOV dword ptr [RBP + -0x464],0x435 LAB_0012e0ca: LEA RDI,[RBP + -0x440] MOV RSI,qword ptr [RBP + -0x448] MOVSXD RDX,dword ptr [RBP + -0x464] CALL 0x00113360 MOVSXD RAX,dword ptr [RBP + -0x464] MOV byte ptr [RBP + RAX*0x1 + -0x440],0x0 LEA RDI,[RBP + -0x440] XOR EAX,EAX MOV ESI,EAX CALL 0x00113330 MOVSD qword ptr [RBP + -0x460],XMM0 CALL 0x00113050 CMP dword ptr [RAX],0x0 JZ 0x0012e125 CALL 0x00113050 MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x458] MOV dword ptr [RAX],ECX LAB_0012e125: MOVSD XMM0,qword ptr [RBP + -0x460] MOVSD qword ptr [RBP + -0x470],XMM0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012e158 MOVSD XMM0,qword ptr [RBP + -0x470] ADD RSP,0x470 POP RBP RET LAB_0012e158: CALL 0x001134b0
double my_atod(void *param_1,int param_2,int *param_3) { int *piVar1; long in_FS_OFFSET; double dVar2; int local_46c; char local_448 [1080]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_46c = param_2 - (int)param_1; piVar1 = __errno_location(); *piVar1 = 0; *param_3 = 0; if (0x435 < local_46c) { *param_3 = 1; local_46c = 0x435; } memcpy(local_448,param_1,(long)local_46c); local_448[local_46c] = '\0'; dVar2 = strtod(local_448,(char **)0x0); piVar1 = __errno_location(); if (*piVar1 != 0) { piVar1 = __errno_location(); *param_3 = *piVar1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return dVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
20,861
blst_p1_compress
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/e1.c
void blst_p1_compress(unsigned char out[48], const POINTonE1 *in) { if (vec_is_zero(in->Z, sizeof(in->Z))) { bytes_zero(out, 48); out[0] = 0xc0; /* compressed and infinity bits */ } else { limb_t sign = POINTonE1_Compress_BE(out, in); out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4)); } }
O2
c
blst_p1_compress: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsi), %r15 pushq $0x30 popq %rsi movq %r15, %rdi callq 0x17a59 testq %rax, %rax je 0x17dc4 pushq $0x30 popq %rsi movq %rbx, %rdi callq 0x17c29 movb $-0x40, %al jmp 0x17e04 leaq 0x22d7d(%rip), %rsi # 0x3ab48 pushq $0x30 popq %rdx movq %r15, %rdi callq 0x19898 testq %rax, %rax jne 0x17df0 leaq -0xa8(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x17867 movq %r15, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x17d36 shlb $0x4, %al andb $0x20, %al orb (%rbx), %al orb $-0x80, %al movb %al, (%rbx) addq $0x98, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
blst_p1_compress: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 98h mov r14, rsi mov rbx, rdi lea r15, [rsi+60h] push 30h ; '0' pop rsi mov rdi, r15 call vec_is_zero test rax, rax jz short loc_17DC4 push 30h ; '0' pop rsi mov rdi, rbx call bytes_zero mov al, 0C0h jmp short loc_17E04 loc_17DC4: lea rsi, BLS12_381_Rx push 30h ; '0' pop rdx mov rdi, r15 call vec_is_equal test rax, rax jnz short loc_17DF0 lea r15, [rbp+var_A8] mov rdi, r15 mov rsi, r14 call POINTonE1_from_Jacobian mov r14, r15 loc_17DF0: mov rdi, rbx mov rsi, r14 call POINTonE1_affine_Compress_BE shl al, 4 and al, 20h or al, [rbx] or al, 80h loc_17E04: mov [rbx], al add rsp, 98h pop rbx pop r14 pop r15 pop rbp retn
char blst_p1_compress(char *a1, long long a2) { _BYTE *v2; // r14 char result; // al _BYTE v4[168]; // [rsp+8h] [rbp-A8h] BYREF v2 = (_BYTE *)a2; if ( vec_is_zero(a2 + 96, 0x30uLL) ) { bytes_zero((long long)a1, 48LL); result = -64; } else { if ( !vec_is_equal(a2 + 96, &BLS12_381_Rx, 48LL) ) { POINTonE1_from_Jacobian((long long)v4, a2); v2 = v4; } result = *a1 | (16 * POINTonE1_affine_Compress_BE((long long)a1, (long long)v2)) & 0x20 | 0x80; } *a1 = result; return result; }
blst_p1_compress: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x98 MOV R14,RSI MOV RBX,RDI LEA R15,[RSI + 0x60] PUSH 0x30 POP RSI MOV RDI,R15 CALL 0x00117a59 TEST RAX,RAX JZ 0x00117dc4 PUSH 0x30 POP RSI MOV RDI,RBX CALL 0x00117c29 MOV AL,0xc0 JMP 0x00117e04 LAB_00117dc4: LEA RSI,[0x13ab48] PUSH 0x30 POP RDX MOV RDI,R15 CALL 0x00119898 TEST RAX,RAX JNZ 0x00117df0 LEA R15,[RBP + -0xa8] MOV RDI,R15 MOV RSI,R14 CALL 0x00117867 MOV R14,R15 LAB_00117df0: MOV RDI,RBX MOV RSI,R14 CALL 0x00117d36 SHL AL,0x4 AND AL,0x20 OR AL,byte ptr [RBX] OR AL,0x80 LAB_00117e04: MOV byte ptr [RBX],AL ADD RSP,0x98 POP RBX POP R14 POP R15 POP RBP RET
void blst_p1_compress(byte *param_1,int1 *param_2) { long lVar1; byte bVar2; int1 *puVar3; int1 local_b0 [144]; lVar1 = vec_is_zero(param_2 + 0x60,0x30); if (lVar1 == 0) { lVar1 = vec_is_equal(param_2 + 0x60,BLS12_381_Rx,0x30); puVar3 = param_2; if (lVar1 == 0) { puVar3 = local_b0; POINTonE1_from_Jacobian(puVar3,param_2); } bVar2 = POINTonE1_affine_Compress_BE(param_1,puVar3); bVar2 = (bVar2 & 2) << 4 | *param_1 | 0x80; } else { bytes_zero(param_1,0x30); bVar2 = 0xc0; } *param_1 = bVar2; return; }
20,862
stbi__tga_test(stbi__context*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__tga_test(stbi__context *s) { int res = 0; int sz, tga_color_type; stbi__get8(s); // discard Offset tga_color_type = stbi__get8(s); // color type if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed sz = stbi__get8(s); // image type if ( tga_color_type == 1 ) { // colormapped (paletted) image if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; stbi__skip(s,4); // skip image x and y origin } else { // "normal" image w/o colormap if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE stbi__skip(s,9); // skip colormap specification and image x/y origin } if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height sz = stbi__get8(s); // bits per pixel if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; res = 1; // if we got this far, everything's good and we can return 1 instead of 0 errorEnd: stbi__rewind(s); return res; }
O0
c
stbi__tga_test(stbi__context*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movl $0x0, 0xc(%rsp) movq 0x10(%rsp), %rdi callq 0x17f50 movq 0x10(%rsp), %rdi callq 0x17f50 movzbl %al, %eax movl %eax, 0x4(%rsp) cmpl $0x1, 0x4(%rsp) jle 0x173d8 jmp 0x17503 movq 0x10(%rsp), %rdi callq 0x17f50 movzbl %al, %eax movl %eax, 0x8(%rsp) cmpl $0x1, 0x4(%rsp) jne 0x1745c cmpl $0x1, 0x8(%rsp) je 0x17403 cmpl $0x9, 0x8(%rsp) je 0x17403 jmp 0x17503 movq 0x10(%rsp), %rdi movl $0x4, %esi callq 0x19dd0 movq 0x10(%rsp), %rdi callq 0x17f50 movzbl %al, %eax movl %eax, 0x8(%rsp) cmpl $0x8, 0x8(%rsp) je 0x1744b cmpl $0xf, 0x8(%rsp) je 0x1744b cmpl $0x10, 0x8(%rsp) je 0x1744b cmpl $0x18, 0x8(%rsp) je 0x1744b cmpl $0x20, 0x8(%rsp) je 0x1744b jmp 0x17503 movq 0x10(%rsp), %rdi movl $0x4, %esi callq 0x19dd0 jmp 0x1748c cmpl $0x2, 0x8(%rsp) je 0x1747d cmpl $0x3, 0x8(%rsp) je 0x1747d cmpl $0xa, 0x8(%rsp) je 0x1747d cmpl $0xb, 0x8(%rsp) je 0x1747d jmp 0x17503 movq 0x10(%rsp), %rdi movl $0x9, %esi callq 0x19dd0 movq 0x10(%rsp), %rdi callq 0x1ca50 cmpl $0x1, %eax jge 0x1749d jmp 0x17503 movq 0x10(%rsp), %rdi callq 0x1ca50 cmpl $0x1, %eax jge 0x174ae jmp 0x17503 movq 0x10(%rsp), %rdi callq 0x17f50 movzbl %al, %eax movl %eax, 0x8(%rsp) cmpl $0x1, 0x4(%rsp) jne 0x174d6 cmpl $0x8, 0x8(%rsp) je 0x174d6 cmpl $0x10, 0x8(%rsp) je 0x174d6 jmp 0x17503 cmpl $0x8, 0x8(%rsp) je 0x174fb cmpl $0xf, 0x8(%rsp) je 0x174fb cmpl $0x10, 0x8(%rsp) je 0x174fb cmpl $0x18, 0x8(%rsp) je 0x174fb cmpl $0x20, 0x8(%rsp) je 0x174fb jmp 0x17503 movl $0x1, 0xc(%rsp) movq 0x10(%rsp), %rdi callq 0x17f10 movl 0xc(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZL14stbi__tga_testP13stbi__context: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_C], 0 mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_14], eax cmp [rsp+18h+var_14], 1 jle short loc_173D8 jmp loc_17503 loc_173D8: mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_10], eax cmp [rsp+18h+var_14], 1 jnz short loc_1745C cmp [rsp+18h+var_10], 1 jz short loc_17403 cmp [rsp+18h+var_10], 9 jz short loc_17403 jmp loc_17503 loc_17403: mov rdi, [rsp+18h+var_8] mov esi, 4 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_10], eax cmp [rsp+18h+var_10], 8 jz short loc_1744B cmp [rsp+18h+var_10], 0Fh jz short loc_1744B cmp [rsp+18h+var_10], 10h jz short loc_1744B cmp [rsp+18h+var_10], 18h jz short loc_1744B cmp [rsp+18h+var_10], 20h ; ' ' jz short loc_1744B jmp loc_17503 loc_1744B: mov rdi, [rsp+18h+var_8] mov esi, 4 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) jmp short loc_1748C loc_1745C: cmp [rsp+18h+var_10], 2 jz short loc_1747D cmp [rsp+18h+var_10], 3 jz short loc_1747D cmp [rsp+18h+var_10], 0Ah jz short loc_1747D cmp [rsp+18h+var_10], 0Bh jz short loc_1747D jmp loc_17503 loc_1747D: mov rdi, [rsp+18h+var_8] mov esi, 9 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) loc_1748C: mov rdi, [rsp+18h+var_8] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) cmp eax, 1 jge short loc_1749D jmp short loc_17503 loc_1749D: mov rdi, [rsp+18h+var_8] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) cmp eax, 1 jge short loc_174AE jmp short loc_17503 loc_174AE: mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+18h+var_10], eax cmp [rsp+18h+var_14], 1 jnz short loc_174D6 cmp [rsp+18h+var_10], 8 jz short loc_174D6 cmp [rsp+18h+var_10], 10h jz short loc_174D6 jmp short loc_17503 loc_174D6: cmp [rsp+18h+var_10], 8 jz short loc_174FB cmp [rsp+18h+var_10], 0Fh jz short loc_174FB cmp [rsp+18h+var_10], 10h jz short loc_174FB cmp [rsp+18h+var_10], 18h jz short loc_174FB cmp [rsp+18h+var_10], 20h ; ' ' jz short loc_174FB jmp short loc_17503 loc_174FB: mov [rsp+18h+var_C], 1 loc_17503: mov rdi, [rsp+18h+var_8] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov eax, [rsp+18h+var_C] add rsp, 18h retn
long long stbi__tga_test(long long a1) { unsigned int v2; // [rsp+4h] [rbp-14h] int v3; // [rsp+8h] [rbp-10h] int v4; // [rsp+8h] [rbp-10h] int v5; // [rsp+8h] [rbp-10h] unsigned int v6; // [rsp+Ch] [rbp-Ch] v6 = 0; stbi__get8(a1); v2 = (unsigned __int8)stbi__get8(a1); if ( v2 > 1 ) goto LABEL_27; v3 = (unsigned __int8)stbi__get8(a1); if ( v2 == 1 ) { if ( v3 != 1 && v3 != 9 ) goto LABEL_27; stbi__skip(a1, 4LL); v4 = (unsigned __int8)stbi__get8(a1); if ( v4 != 8 && v4 != 15 && v4 != 16 && v4 != 24 && v4 != 32 ) goto LABEL_27; stbi__skip(a1, 4LL); } else { if ( v3 != 2 && v3 != 3 && v3 != 10 && v3 != 11 ) goto LABEL_27; stbi__skip(a1, 9LL); } if ( (int)stbi__get16le(a1) >= 1 && (int)stbi__get16le(a1) >= 1 ) { v5 = (unsigned __int8)stbi__get8(a1); if ( (v2 != 1 || v5 == 8 || v5 == 16) && (v5 == 8 || v5 == 15 || v5 == 16 || v5 == 24 || v5 == 32) ) v6 = 1; } LABEL_27: stbi__rewind(a1); return v6; }
stbi__tga_test: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV dword ptr [RSP + 0xc],0x0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f50 MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f50 MOVZX EAX,AL MOV dword ptr [RSP + 0x4],EAX CMP dword ptr [RSP + 0x4],0x1 JLE 0x001173d8 JMP 0x00117503 LAB_001173d8: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f50 MOVZX EAX,AL MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x4],0x1 JNZ 0x0011745c CMP dword ptr [RSP + 0x8],0x1 JZ 0x00117403 CMP dword ptr [RSP + 0x8],0x9 JZ 0x00117403 JMP 0x00117503 LAB_00117403: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x4 CALL 0x00119dd0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f50 MOVZX EAX,AL MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x8],0x8 JZ 0x0011744b CMP dword ptr [RSP + 0x8],0xf JZ 0x0011744b CMP dword ptr [RSP + 0x8],0x10 JZ 0x0011744b CMP dword ptr [RSP + 0x8],0x18 JZ 0x0011744b CMP dword ptr [RSP + 0x8],0x20 JZ 0x0011744b JMP 0x00117503 LAB_0011744b: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x4 CALL 0x00119dd0 JMP 0x0011748c LAB_0011745c: CMP dword ptr [RSP + 0x8],0x2 JZ 0x0011747d CMP dword ptr [RSP + 0x8],0x3 JZ 0x0011747d CMP dword ptr [RSP + 0x8],0xa JZ 0x0011747d CMP dword ptr [RSP + 0x8],0xb JZ 0x0011747d JMP 0x00117503 LAB_0011747d: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x9 CALL 0x00119dd0 LAB_0011748c: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011ca50 CMP EAX,0x1 JGE 0x0011749d JMP 0x00117503 LAB_0011749d: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011ca50 CMP EAX,0x1 JGE 0x001174ae JMP 0x00117503 LAB_001174ae: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f50 MOVZX EAX,AL MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x4],0x1 JNZ 0x001174d6 CMP dword ptr [RSP + 0x8],0x8 JZ 0x001174d6 CMP dword ptr [RSP + 0x8],0x10 JZ 0x001174d6 JMP 0x00117503 LAB_001174d6: CMP dword ptr [RSP + 0x8],0x8 JZ 0x001174fb CMP dword ptr [RSP + 0x8],0xf JZ 0x001174fb CMP dword ptr [RSP + 0x8],0x10 JZ 0x001174fb CMP dword ptr [RSP + 0x8],0x18 JZ 0x001174fb CMP dword ptr [RSP + 0x8],0x20 JZ 0x001174fb JMP 0x00117503 LAB_001174fb: MOV dword ptr [RSP + 0xc],0x1 LAB_00117503: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f10 MOV EAX,dword ptr [RSP + 0xc] ADD RSP,0x18 RET
/* stbi__tga_test(stbi__context*) */ int4 stbi__tga_test(stbi__context *param_1) { byte bVar1; char cVar2; int iVar3; int4 local_c; local_c = 0; stbi__get8(param_1); bVar1 = stbi__get8(param_1); if (1 < bVar1) goto LAB_00117503; cVar2 = stbi__get8(param_1); if (bVar1 == 1) { if ((cVar2 != '\x01') && (cVar2 != '\t')) goto LAB_00117503; stbi__skip(param_1,4); cVar2 = stbi__get8(param_1); if (((cVar2 != '\b') && ((cVar2 != '\x0f' && (cVar2 != '\x10')))) && ((cVar2 != '\x18' && (cVar2 != ' ')))) goto LAB_00117503; stbi__skip(param_1,4); } else { if ((((cVar2 != '\x02') && (cVar2 != '\x03')) && (cVar2 != '\n')) && (cVar2 != '\v')) goto LAB_00117503; stbi__skip(param_1,9); } iVar3 = stbi__get16le(param_1); if ((((0 < iVar3) && (iVar3 = stbi__get16le(param_1), 0 < iVar3)) && ((cVar2 = stbi__get8(param_1), bVar1 != 1 || ((cVar2 == '\b' || (cVar2 == '\x10')))))) && ((cVar2 == '\b' || ((((cVar2 == '\x0f' || (cVar2 == '\x10')) || (cVar2 == '\x18')) || (cVar2 == ' ')))))) { local_c = 1; } LAB_00117503: stbi__rewind(param_1); return local_c; }
20,863
stbi__tga_test(stbi__context*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__tga_test(stbi__context *s) { int res = 0; int sz, tga_color_type; stbi__get8(s); // discard Offset tga_color_type = stbi__get8(s); // color type if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed sz = stbi__get8(s); // image type if ( tga_color_type == 1 ) { // colormapped (paletted) image if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; stbi__skip(s,4); // skip image x and y origin } else { // "normal" image w/o colormap if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE stbi__skip(s,9); // skip colormap specification and image x/y origin } if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height sz = stbi__get8(s); // bits per pixel if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; res = 1; // if we got this far, everything's good and we can return 1 instead of 0 errorEnd: stbi__rewind(s); return res; }
O1
c
stbi__tga_test(stbi__context*): pushq %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq 0xc0(%rdi), %rax cmpq 0xc8(%rdi), %rax jb 0x25e55 cmpl $0x0, 0x30(%rbx) je 0x25e5f movq %rbx, %rdi callq 0x2696c movq 0xc0(%rbx), %rax incq %rax movq %rax, 0xc0(%rbx) movq 0xc0(%rbx), %rax cmpq 0xc8(%rbx), %rax jb 0x25e88 cmpl $0x0, 0x30(%rbx) je 0x25f71 movq %rbx, %rdi callq 0x2696c movq 0xc0(%rbx), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%rbx) movb (%rax), %r14b xorl %ebp, %ebp cmpb $0x1, %r14b jbe 0x25eb3 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq movq 0xc0(%rbx), %rax cmpq 0xc8(%rbx), %rax jb 0x25edc cmpl $0x0, 0x30(%rbx) je 0x25f79 movq %rbx, %rdi callq 0x2696c movq 0xc0(%rbx), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%rbx) movb (%rax), %al cmpb $0x1, %r14b jne 0x25f2d andb $-0x9, %al cmpb $0x1, %al jne 0x25e9e cmpq $0x0, 0x10(%rbx) je 0x25f80 movq 0xc8(%rbx), %rcx movl 0xc0(%rbx), %edx movl %ecx, %eax subl %edx, %eax cmpl $0x3, %eax jg 0x25f80 movq %rcx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x4, %esi subl %eax, %esi callq *0x18(%rbx) jmp 0x25f88 andb $-0xa, %al cmpb $0x2, %al jne 0x25e9e cmpq $0x0, 0x10(%rbx) je 0x26011 movq 0xc8(%rbx), %rcx movl 0xc0(%rbx), %edx movl %ecx, %eax subl %edx, %eax cmpl $0x8, %eax jg 0x26011 movq %rcx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x9, %esi jmp 0x2600a xorl %r14d, %r14d jmp 0x25e96 xorl %eax, %eax jmp 0x25ee9 addq $0x4, 0xc0(%rbx) movq 0xc0(%rbx), %rax cmpq 0xc8(%rbx), %rax jb 0x25fb1 cmpl $0x0, 0x30(%rbx) je 0x260b3 movq %rbx, %rdi callq 0x2696c movq 0xc0(%rbx), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%rbx) movb (%rax), %al cmpb $0x20, %al ja 0x25e9e movzbl %al, %eax movabsq $0x101018100, %rcx # imm = 0x101018100 btq %rax, %rcx jae 0x25e9e cmpq $0x0, 0x10(%rbx) je 0x2601b movq 0xc8(%rbx), %rcx movl 0xc0(%rbx), %edx movl %ecx, %eax subl %edx, %eax cmpl $0x3, %eax jg 0x2601b movq %rcx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x4, %esi subl %eax, %esi callq *0x18(%rbx) jmp 0x26023 addq $0x9, 0xc0(%rbx) jmp 0x26023 addq $0x4, 0xc0(%rbx) movq %rbx, %rdi callq 0x2934f testl %eax, %eax je 0x25e9e movq %rbx, %rdi callq 0x2934f testl %eax, %eax je 0x25e9e movq 0xc0(%rbx), %rax cmpq 0xc8(%rbx), %rax jb 0x26068 cmpl $0x0, 0x30(%rbx) je 0x260ba movq %rbx, %rdi callq 0x2696c movq 0xc0(%rbx), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%rbx) movb (%rax), %al cmpb $0x1, %r14b jne 0x2608a addb $-0x8, %al xorl %ebp, %ebp testb $-0x9, %al sete %bpl jmp 0x25e9e cmpb $0x20, %al ja 0x25e9e movzbl %al, %eax movabsq $0x101018100, %rcx # imm = 0x101018100 btq %rax, %rcx jae 0x25e9e movl $0x1, %ebp jmp 0x25e9e xorl %eax, %eax jmp 0x25fbe xorl %eax, %eax jmp 0x26075
_ZL14stbi__tga_testP13stbi__context: push rbp push r14 push rbx mov rbx, rdi mov rax, [rdi+0C0h] cmp rax, [rdi+0C8h] jb short loc_25E55 cmp dword ptr [rbx+30h], 0 jz short loc_25E5F mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] loc_25E55: inc rax mov [rbx+0C0h], rax loc_25E5F: mov rax, [rbx+0C0h] cmp rax, [rbx+0C8h] jb short loc_25E88 cmp dword ptr [rbx+30h], 0 jz loc_25F71 mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] loc_25E88: lea rcx, [rax+1] mov [rbx+0C0h], rcx mov r14b, [rax] loc_25E96: xor ebp, ebp cmp r14b, 1 jbe short loc_25EB3 loc_25E9E: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov eax, ebp pop rbx pop r14 pop rbp retn loc_25EB3: mov rax, [rbx+0C0h] cmp rax, [rbx+0C8h] jb short loc_25EDC cmp dword ptr [rbx+30h], 0 jz loc_25F79 mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] loc_25EDC: lea rcx, [rax+1] mov [rbx+0C0h], rcx mov al, [rax] loc_25EE9: cmp r14b, 1 jnz short loc_25F2D and al, 0F7h cmp al, 1 jnz short loc_25E9E cmp qword ptr [rbx+10h], 0 jz loc_25F80 mov rcx, [rbx+0C8h] mov edx, [rbx+0C0h] mov eax, ecx sub eax, edx cmp eax, 3 jg short loc_25F80 mov [rbx+0C0h], rcx mov rdi, [rbx+28h] mov esi, 4 sub esi, eax call qword ptr [rbx+18h] jmp short loc_25F88 loc_25F2D: and al, 0F6h cmp al, 2 jnz loc_25E9E cmp qword ptr [rbx+10h], 0 jz loc_26011 mov rcx, [rbx+0C8h] mov edx, [rbx+0C0h] mov eax, ecx sub eax, edx cmp eax, 8 jg loc_26011 mov [rbx+0C0h], rcx mov rdi, [rbx+28h] mov esi, 9 jmp loc_2600A loc_25F71: xor r14d, r14d jmp loc_25E96 loc_25F79: xor eax, eax jmp loc_25EE9 loc_25F80: add qword ptr [rbx+0C0h], 4 loc_25F88: mov rax, [rbx+0C0h] cmp rax, [rbx+0C8h] jb short loc_25FB1 cmp dword ptr [rbx+30h], 0 jz loc_260B3 mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] loc_25FB1: lea rcx, [rax+1] mov [rbx+0C0h], rcx mov al, [rax] loc_25FBE: cmp al, 20h ; ' ' ja loc_25E9E movzx eax, al mov rcx, 101018100h bt rcx, rax jnb loc_25E9E cmp qword ptr [rbx+10h], 0 jz short loc_2601B mov rcx, [rbx+0C8h] mov edx, [rbx+0C0h] mov eax, ecx sub eax, edx cmp eax, 3 jg short loc_2601B mov [rbx+0C0h], rcx mov rdi, [rbx+28h] mov esi, 4 loc_2600A: sub esi, eax call qword ptr [rbx+18h] jmp short loc_26023 loc_26011: add qword ptr [rbx+0C0h], 9 jmp short loc_26023 loc_2601B: add qword ptr [rbx+0C0h], 4 loc_26023: mov rdi, rbx call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) test eax, eax jz loc_25E9E mov rdi, rbx call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) test eax, eax jz loc_25E9E mov rax, [rbx+0C0h] cmp rax, [rbx+0C8h] jb short loc_26068 cmp dword ptr [rbx+30h], 0 jz short loc_260BA mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] loc_26068: lea rcx, [rax+1] mov [rbx+0C0h], rcx mov al, [rax] loc_26075: cmp r14b, 1 jnz short loc_2608A add al, 0F8h xor ebp, ebp test al, 0F7h setz bpl jmp loc_25E9E loc_2608A: cmp al, 20h ; ' ' ja loc_25E9E movzx eax, al mov rcx, 101018100h bt rcx, rax jnb loc_25E9E mov ebp, 1 jmp loc_25E9E loc_260B3: xor eax, eax jmp loc_25FBE loc_260BA: xor eax, eax jmp short loc_26075
_BOOL8 stbi__tga_test(long long a1) { unsigned long long v2; // rax unsigned __int8 *v3; // rax unsigned __int8 v4; // r14 BOOL v5; // ebp char *v7; // rax char v8; // al int v9; // eax int v10; // eax long long v11; // rdi int v12; // esi unsigned __int8 *v13; // rax unsigned __int8 v14; // al long long v15; // rcx unsigned __int8 *v16; // rax unsigned __int8 v17; // al long long v18; // rcx v2 = *(_QWORD *)(a1 + 192); if ( v2 >= *(_QWORD *)(a1 + 200) ) { if ( !*(_DWORD *)(a1 + 48) ) goto LABEL_5; stbi__refill_buffer(a1); v2 = *(_QWORD *)(a1 + 192); } *(_QWORD *)(a1 + 192) = v2 + 1; LABEL_5: v3 = *(unsigned __int8 **)(a1 + 192); if ( (unsigned long long)v3 < *(_QWORD *)(a1 + 200) ) { LABEL_8: *(_QWORD *)(a1 + 192) = v3 + 1; v4 = *v3; goto LABEL_9; } if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v3 = *(unsigned __int8 **)(a1 + 192); goto LABEL_8; } v4 = 0; LABEL_9: v5 = 0; if ( v4 > 1u ) goto LABEL_10; v7 = *(char **)(a1 + 192); if ( (unsigned long long)v7 < *(_QWORD *)(a1 + 200) ) goto LABEL_14; if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v7 = *(char **)(a1 + 192); LABEL_14: *(_QWORD *)(a1 + 192) = v7 + 1; v8 = *v7; goto LABEL_15; } v8 = 0; LABEL_15: if ( v4 == 1 ) { if ( (v8 & 0xF7) != 1 ) goto LABEL_10; if ( *(_QWORD *)(a1 + 16) && (v9 = *(_QWORD *)(a1 + 200) - *(_DWORD *)(a1 + 192), v9 <= 3) ) { *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(4 - v9)); } else { *(_QWORD *)(a1 + 192) += 4LL; } v13 = *(unsigned __int8 **)(a1 + 192); if ( (unsigned long long)v13 >= *(_QWORD *)(a1 + 200) ) { if ( !*(_DWORD *)(a1 + 48) ) { v14 = 0; LABEL_31: if ( v14 > 0x20u ) goto LABEL_10; v15 = 0x101018100LL; if ( !_bittest64(&v15, v14) ) goto LABEL_10; if ( !*(_QWORD *)(a1 + 16) || (v10 = *(_QWORD *)(a1 + 200) - *(_DWORD *)(a1 + 192), v10 > 3) ) { *(_QWORD *)(a1 + 192) += 4LL; goto LABEL_39; } *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); v11 = *(_QWORD *)(a1 + 40); v12 = 4; goto LABEL_36; } stbi__refill_buffer(a1); v13 = *(unsigned __int8 **)(a1 + 192); } *(_QWORD *)(a1 + 192) = v13 + 1; v14 = *v13; goto LABEL_31; } if ( (v8 & 0xF6) != 2 ) goto LABEL_10; if ( !*(_QWORD *)(a1 + 16) || (v10 = *(_QWORD *)(a1 + 200) - *(_DWORD *)(a1 + 192), v10 > 8) ) { *(_QWORD *)(a1 + 192) += 9LL; goto LABEL_39; } *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); v11 = *(_QWORD *)(a1 + 40); v12 = 9; LABEL_36: (*(void ( **)(long long, _QWORD))(a1 + 24))(v11, (unsigned int)(v12 - v10)); LABEL_39: if ( !(unsigned int)stbi__get16le(a1) || !(unsigned int)stbi__get16le(a1) ) goto LABEL_10; v16 = *(unsigned __int8 **)(a1 + 192); if ( (unsigned long long)v16 < *(_QWORD *)(a1 + 200) ) goto LABEL_44; if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v16 = *(unsigned __int8 **)(a1 + 192); LABEL_44: *(_QWORD *)(a1 + 192) = v16 + 1; v17 = *v16; goto LABEL_45; } v17 = 0; LABEL_45: if ( v4 == 1 ) { v5 = ((v17 - 8) & 0xF7) == 0; } else if ( v17 <= 0x20u ) { v18 = 0x101018100LL; if ( _bittest64(&v18, v17) ) v5 = 1; } LABEL_10: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return v5; }
20,864
plutovg_skip_string
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-utils.h
static inline bool plutovg_skip_string(const char** begin, const char* end, const char* data) { const char* it = *begin; while(it < end && *data && *it == *data) { ++data; ++it; } if(*data == '\0') { *begin = it; return true; } return false; }
O0
c
plutovg_skip_string: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x29(%rbp) jae 0x5d441 movq -0x20(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x29(%rbp) je 0x5d441 movq -0x28(%rbp), %rax movsbl (%rax), %eax movq -0x20(%rbp), %rcx movsbl (%rcx), %ecx cmpl %ecx, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0x5d44a jmp 0x5d464 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x5d40b movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x5d481 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x5d485 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al popq %rbp retq nopl (%rax)
plutovg_skip_string: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax loc_5D40B: mov rcx, [rbp+var_28] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_29], al jnb short loc_5D441 mov rax, [rbp+var_20] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_29], al jz short loc_5D441 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] mov rcx, [rbp+var_20] movsx ecx, byte ptr [rcx] cmp eax, ecx setz al mov [rbp+var_29], al loc_5D441: mov al, [rbp+var_29] test al, 1 jnz short loc_5D44A jmp short loc_5D464 loc_5D44A: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_5D40B loc_5D464: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_5D481 mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_1], 1 jmp short loc_5D485 loc_5D481: mov [rbp+var_1], 0 loc_5D485: mov al, [rbp+var_1] and al, 1 pop rbp retn
char plutovg_skip_string(char **a1, unsigned long long a2, _BYTE *a3) { bool v4; // [rsp+1h] [rbp-29h] char *i; // [rsp+2h] [rbp-28h] for ( i = *a1; ; ++i ) { v4 = 0; if ( (unsigned long long)i < a2 ) { v4 = 0; if ( *a3 ) v4 = *i == (char)*a3; } if ( !v4 ) break; ++a3; } if ( *a3 ) return 0; *a1 = i; return 1; }
plutovg_skip_string: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX LAB_0015d40b: MOV RCX,qword ptr [RBP + -0x28] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x29],AL JNC 0x0015d441 MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x29],AL JZ 0x0015d441 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RCX] CMP EAX,ECX SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_0015d441: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x0015d44a JMP 0x0015d464 LAB_0015d44a: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0015d40b LAB_0015d464: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0015d481 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015d485 LAB_0015d481: MOV byte ptr [RBP + -0x1],0x0 LAB_0015d485: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 POP RBP RET
bool plutovg_skip_string(int8 *param_1,char *param_2,char *param_3) { char cVar1; bool bVar2; char *local_30; char *local_28; local_30 = (char *)*param_1; local_28 = param_3; while( true ) { bVar2 = false; if ((local_30 < param_2) && (bVar2 = false, *local_28 != '\0')) { bVar2 = *local_30 == *local_28; } if (!bVar2) break; local_28 = local_28 + 1; local_30 = local_30 + 1; } cVar1 = *local_28; if (cVar1 == '\0') { *param_1 = local_30; } return cVar1 == '\0'; }
20,865
plutovg_skip_string
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-utils.h
static inline bool plutovg_skip_string(const char** begin, const char* end, const char* data) { const char* it = *begin; while(it < end && *data && *it == *data) { ++data; ++it; } if(*data == '\0') { *begin = it; return true; } return false; }
O2
c
plutovg_skip_string: movq (%rdi), %rax movb (%rdx), %cl cmpq %rsi, %rax jae 0x24201 testb %cl, %cl je 0x24208 cmpb %cl, (%rax) jne 0x24205 incq %rdx incq %rax jmp 0x241ea testb %cl, %cl je 0x24208 xorl %eax, %eax retq movq %rax, (%rdi) movb $0x1, %al retq
plutovg_skip_string: mov rax, [rdi] loc_241EA: mov cl, [rdx] cmp rax, rsi jnb short loc_24201 test cl, cl jz short loc_24208 cmp [rax], cl jnz short loc_24205 inc rdx inc rax jmp short loc_241EA loc_24201: test cl, cl jz short loc_24208 loc_24205: xor eax, eax retn loc_24208: mov [rdi], rax mov al, 1 retn
char plutovg_skip_string(_BYTE **a1, unsigned long long a2, char *a3) { _BYTE *i; // rax char v4; // cl for ( i = *a1; ; ++i ) { v4 = *a3; if ( (unsigned long long)i >= a2 ) break; if ( !v4 ) goto LABEL_8; if ( *i != v4 ) return 0; ++a3; } if ( v4 ) return 0; LABEL_8: *a1 = i; return 1; }
plutovg_skip_string: MOV RAX,qword ptr [RDI] LAB_001241ea: MOV CL,byte ptr [RDX] CMP RAX,RSI JNC 0x00124201 TEST CL,CL JZ 0x00124208 CMP byte ptr [RAX],CL JNZ 0x00124205 INC RDX INC RAX JMP 0x001241ea LAB_00124201: TEST CL,CL JZ 0x00124208 LAB_00124205: XOR EAX,EAX RET LAB_00124208: MOV qword ptr [RDI],RAX MOV AL,0x1 RET
int8 plutovg_skip_string(int8 *param_1,char *param_2,char *param_3) { char cVar1; char *pcVar2; for (pcVar2 = (char *)*param_1; cVar1 = *param_3, pcVar2 < param_2; pcVar2 = pcVar2 + 1) { if (cVar1 == '\0') goto LAB_00124208; if (*pcVar2 != cVar1) { return 0; } param_3 = param_3 + 1; } if (cVar1 != '\0') { return 0; } LAB_00124208: *param_1 = pcVar2; return CONCAT71((int7)((ulong)pcVar2 >> 8),1); }
20,866
ma_get_buffer_offset
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static void *ma_get_buffer_offset(MYSQL_STMT *stmt, enum enum_field_types type, void *buffer, unsigned long row_nr) { if (stmt->param_callback) return buffer; if (stmt->array_size) { int len; if (stmt->row_size) return (void *)((char *)buffer + stmt->row_size * row_nr); len= mysql_ps_fetch_functions[type].pack_len; if (len > 0) return (void *)((char *)buffer + len * row_nr); return ((void **)buffer)[row_nr]; } return buffer; }
O0
c
ma_get_buffer_offset: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x390(%rax) je 0x242de movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x24365 movq -0x10(%rbp), %rax cmpl $0x0, 0x368(%rax) je 0x2435d movq -0x10(%rbp), %rax cmpq $0x0, 0x370(%rax) je 0x24316 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x370(%rcx), %rcx imulq -0x28(%rbp), %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x24365 movl -0x14(%rbp), %eax movl %eax, %ecx leaq 0x37e1e(%rip), %rax # 0x5c140 imulq $0x18, %rcx, %rcx addq %rcx, %rax movl 0x8(%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jle 0x2434b movq -0x20(%rbp), %rax movslq -0x2c(%rbp), %rcx imulq -0x28(%rbp), %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x24365 movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x8(%rbp) jmp 0x24365 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
ma_get_buffer_offset: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] cmp qword ptr [rax+390h], 0 jz short loc_242DE mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp loc_24365 loc_242DE: mov rax, [rbp+var_10] cmp dword ptr [rax+368h], 0 jz short loc_2435D mov rax, [rbp+var_10] cmp qword ptr [rax+370h], 0 jz short loc_24316 mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov rcx, [rcx+370h] imul rcx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax jmp short loc_24365 loc_24316: mov eax, [rbp+var_14] mov ecx, eax lea rax, mysql_ps_fetch_functions imul rcx, 18h add rax, rcx mov eax, [rax+8] mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jle short loc_2434B mov rax, [rbp+var_20] movsxd rcx, [rbp+var_2C] imul rcx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax jmp short loc_24365 loc_2434B: mov rax, [rbp+var_20] mov rcx, [rbp+var_28] mov rax, [rax+rcx*8] mov [rbp+var_8], rax jmp short loc_24365 loc_2435D: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_24365: mov rax, [rbp+var_8] pop rbp retn
long long ma_get_buffer_offset(long long a1, int a2, long long a3, long long a4) { int v5; // [rsp+0h] [rbp-2Ch] if ( *(_QWORD *)(a1 + 912) ) return a3; if ( !*(_DWORD *)(a1 + 872) ) return a3; if ( *(_QWORD *)(a1 + 880) ) return a4 * *(_QWORD *)(a1 + 880) + a3; v5 = mysql_ps_fetch_functions[6 * a2 + 2]; if ( v5 <= 0 ) return *(_QWORD *)(a3 + 8 * a4); else return a4 * v5 + a3; }
ma_get_buffer_offset: PUSH RBP MOV RBP,RSP 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 RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x390],0x0 JZ 0x001242de MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x00124365 LAB_001242de: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x368],0x0 JZ 0x0012435d MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x370],0x0 JZ 0x00124316 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x370] IMUL RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x00124365 LAB_00124316: MOV EAX,dword ptr [RBP + -0x14] MOV ECX,EAX LEA RAX,[0x15c140] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JLE 0x0012434b MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,dword ptr [RBP + -0x2c] IMUL RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x00124365 LAB_0012434b: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x00124365 LAB_0012435d: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00124365: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
long ma_get_buffer_offset(long param_1,uint param_2,long param_3,long param_4) { long local_10; local_10 = param_3; if ((*(long *)(param_1 + 0x390) == 0) && (*(int *)(param_1 + 0x368) != 0)) { if (*(long *)(param_1 + 0x370) == 0) { if ((int)(&DAT_0015c148)[(ulong)param_2 * 6] < 1) { local_10 = *(long *)(param_3 + param_4 * 8); } else { local_10 = param_3 + (int)(&DAT_0015c148)[(ulong)param_2 * 6] * param_4; } } else { local_10 = param_3 + *(long *)(param_1 + 0x370) * param_4; } } return local_10; }
20,867
mysql_stmt_send_long_data_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_send_long_data_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_send_long_data, (parms->stmt, parms->param_number, parms->data, parms->length), parms->stmt->mysql, my_bool, r_my_bool) }
O0
c
mysql_stmt_send_long_data_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %esi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx callq 0x51770 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nop
mysql_stmt_send_long_data_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov esi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] mov rax, [rbp+var_10] mov rcx, [rax+18h] call mysql_stmt_send_long_data mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_stmt_send_long_data_start_internal(long long a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 56LL) + 1152LL) + 40LL); *(_BYTE *)(v2 + 8) = mysql_stmt_send_long_data( *(_QWORD *)a1, *(_DWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_stmt_send_long_data_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] CALL 0x00151770 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_stmt_send_long_data_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_send_long_data(*param_1,(int)param_1[1],param_1[2],param_1[3]); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
20,868
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [9], 0>(char const (&) [9])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O0
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [9], 0>(char const (&) [9]): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xeda30 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xeda60 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xeda90 testb $0x1, %al jne 0x1ca856 jmp 0x1ca896 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xeec00 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x1ca8b0 testb $0x1, %al jne 0x1ca886 jmp 0x1ca888 jmp 0x1ca8a5 jmp 0x1ca88a leaq 0x30(%rsp), %rdi callq 0xedb10 jmp 0x1ca832 movq 0x10(%rsp), %rdi callq 0xeda60 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rdi, [rsp+38h+var_10] mov [rsp+38h+var_28], rdi call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; 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>>>::begin(void) mov [rsp+38h+var_8], rax loc_1CA832: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_20], rax lea rdi, [rsp+38h+var_8] lea rsi, [rsp+38h+var_20] call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_1CA856 jmp short loc_1CA896 loc_1CA856: mov rax, [rsp+38h+var_28] add rax, 18h mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_8] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+38h+var_30] mov rsi, rax mov rdx, [rsp+38h+var_18] call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA17_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_ test al, 1 jnz short loc_1CA886 jmp short loc_1CA888 loc_1CA886: jmp short loc_1CA8A5 loc_1CA888: jmp short $+2 loc_1CA88A: lea rdi, [rsp+38h+var_8] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void) jmp short loc_1CA832 loc_1CA896: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_8], rax loc_1CA8A5: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+18h] [rbp-20h] BYREF long long v5; // [rsp+20h] [rbp-18h] long long v6; // [rsp+28h] [rbp-10h] long long i; // [rsp+30h] [rbp-8h] BYREF v6 = a1; v5 = a2; for ( i = 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>>>::begin(a1); ; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(&i) ) { v4 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)&i, (long long)&v4) ) break; v2 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&i); if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[17]>(a1 + 24, v2, v5) & 1) != 0 ) return i; } return std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); }
copy<__gnu_cxx::__normal_iterator<llama_logit_bias_const*,std::vector<llama_logit_bias,std::allocator<llama_logit_bias>>>,llama_logit_bias*>: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] CALL 0x001ca8f0 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP] CALL 0x001ca8f0 MOV qword ptr [RSP + 0x8],RAX MOV RDX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x8] CALL 0x001ca870 ADD RSP,0x38 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* llama_logit_bias* std::copy<__gnu_cxx::__normal_iterator<llama_logit_bias const*, std::vector<llama_logit_bias, std::allocator<llama_logit_bias> > >, llama_logit_bias*>(__gnu_cxx::__normal_iterator<llama_logit_bias const*, std::vector<llama_logit_bias, std::allocator<llama_logit_bias> > >, __gnu_cxx::__normal_iterator<llama_logit_bias const*, std::vector<llama_logit_bias, std::allocator<llama_logit_bias> > >, llama_logit_bias*) */ llama_logit_bias * std:: copy<__gnu_cxx::__normal_iterator<llama_logit_bias_const*,std::vector<llama_logit_bias,std::allocator<llama_logit_bias>>>,llama_logit_bias*> (int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; int8 uVar2; llama_logit_bias *plVar3; uVar1 = __miter_base<__gnu_cxx::__normal_iterator<llama_logit_bias_const*,std::vector<llama_logit_bias,std::allocator<llama_logit_bias>>>> (param_1); uVar2 = __miter_base<__gnu_cxx::__normal_iterator<llama_logit_bias_const*,std::vector<llama_logit_bias,std::allocator<llama_logit_bias>>>> (param_2); plVar3 = __copy_move_a<false,__gnu_cxx::__normal_iterator<llama_logit_bias_const*,std::vector<llama_logit_bias,std::allocator<llama_logit_bias>>>,llama_logit_bias*> (uVar1,uVar2,param_3); return plVar3; }
20,869
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [9], 0>(char const (&) [9])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [9], 0>(char const (&) [9]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x99c97 movq %r14, %rdi movq %rbx, %rsi callq 0x2cbe9 testb %al, %al jne 0x99c94 addq $0x30, %r14 jmp 0x99c76 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_99C76: mov rax, [r15+8] cmp r14, rax jz short loc_99C97 mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_99C94 add r14, 30h ; '0' jmp short loc_99C76 loc_99C94: mov rax, r14 loc_99C97: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_00199c76: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x00199c97 MOV RDI,R14 MOV RSI,RBX CALL 0x0012cbe9 TEST AL,AL JNZ 0x00199c94 ADD R14,0x30 JMP 0x00199c76 LAB_00199c94: MOV RAX,R14 LAB_00199c97: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
20,870
my_time_init
eloqsql/mysys/my_getsystime.c
void my_time_init() { #ifdef _WIN32 compile_time_assert(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency); DBUG_ASSERT(query_performance_frequency); #endif }
O0
c
my_time_init: pushq %rbp movq %rsp, %rbp popq %rbp retq nopw %cs:(%rax,%rax)
my_time_init: push rbp mov rbp, rsp pop rbp retn
void my_time_init() { ; }
my_time_init: PUSH RBP MOV RBP,RSP POP RBP RET
void my_time_init(void) { return; }
20,871
minja::Value::to_str[abi:cxx11]() const
monkey531[P]llama/common/minja.hpp
std::string to_str() const { if (is_string()) return get<std::string>(); if (is_number_integer()) return std::to_string(get<int64_t>()); if (is_number_float()) return std::to_string(get<double>()); if (is_boolean()) return get<bool>() ? "True" : "False"; if (is_null()) return "None"; return dump(); }
O1
cpp
minja::Value::to_str[abi:cxx11]() const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movzbl 0x40(%rsi), %eax cmpl $0x3, %eax jne 0xa4fb3 movq %rbx, %rdi callq 0x9551c jmp 0xa511c leal -0x5(%rax), %ecx cmpb $0x1, %cl ja 0xa503a movq %rsi, %rdi callq 0x944aa movq %rax, %r15 movq %rax, %r14 negq %r14 cmovsq %rax, %r14 movl $0x1, %r12d cmpq $0xa, %r14 jb 0xa50ef movl $0x4, %r12d movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B movq %r14, %rcx cmpq $0x63, %rcx jbe 0xa50e6 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0xa50ec cmpq $0x2710, %rcx # imm = 0x2710 jb 0xa50ef movq %rcx, %rax mulq %rsi shrq $0xb, %rdx addl $0x4, %r12d cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0xa4ff3 addl $-0x3, %r12d jmp 0xa50ef cmpl $0x4, %eax je 0xa506e cmpl $0x7, %eax jne 0xa509d movq %rsi, %rdi callq 0x945dc movq 0x97edd(%rip), %rsi # 0x13cf30 leaq 0x5b9e4(%rip), %rcx # 0x100a3e movl $0x148, %edx # imm = 0x148 movq %rbx, %rdi movb $0x1, %al callq 0xa5e35 jmp 0xa511c movq %rsi, %rdi callq 0x95422 leaq 0x5ad73(%rip), %rcx # 0xffdf0 leaq 0x5ad71(%rip), %rsi # 0xffdf5 testb %al, %al cmovneq %rcx, %rsi leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movzbl %al, %edx xorq $0x5, %rdx addq %rsi, %rdx jmp 0xa50cb testl %eax, %eax jne 0xa50d5 cmpq $0x0, 0x20(%rsi) jne 0xa50d5 cmpq $0x0, 0x10(%rsi) jne 0xa50d5 cmpq $0x0, 0x30(%rsi) jne 0xa50d5 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x5b14c(%rip), %rsi # 0x100210 leaq 0x5b149(%rip), %rdx # 0x100214 movq %rbx, %rdi callq 0x2d748 jmp 0xa511c movq %rbx, %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x94712 jmp 0xa511c addl $-0x2, %r12d jmp 0xa50ef decl %r12d shrq $0x3f, %r15 leal (%r15,%r12), %esi leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %rbx, %rdi movl $0x2d, %edx callq 0x1ba40 addq (%rbx), %r15 movq %r15, %rdi movl %r12d, %esi movq %r14, %rdx callq 0x6aecf movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK5minja5Value6to_strB5cxx11Ev: push r15 push r14 push r12 push rbx push rax mov rbx, rdi movzx eax, byte ptr [rsi+40h] cmp eax, 3 jnz short loc_A4FB3 mov rdi, rbx call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) jmp loc_A511C loc_A4FB3: lea ecx, [rax-5] cmp cl, 1 ja short loc_A503A mov rdi, rsi call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov r14, rax neg r14 cmovs r14, rax mov r12d, 1 cmp r14, 0Ah jb loc_A50EF mov r12d, 4 mov rsi, 346DC5D63886594Bh mov rcx, r14 loc_A4FF3: cmp rcx, 63h ; 'c' jbe loc_A50E6 cmp rcx, 3E7h jbe loc_A50EC cmp rcx, 2710h jb loc_A50EF mov rax, rcx mul rsi shr rdx, 0Bh add r12d, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_A4FF3 add r12d, 0FFFFFFFDh jmp loc_A50EF loc_A503A: cmp eax, 4 jz short loc_A506E cmp eax, 7 jnz short loc_A509D mov rdi, rsi call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) mov rsi, cs:vsnprintf_ptr lea rcx, asc_100A3E; "%f" mov edx, 148h mov rdi, rbx mov al, 1 call _ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z; __gnu_cxx::__to_xstring<std::string,char>(int (*)(char *,ulong,char const*,__va_list_tag *),ulong,char const*,...) jmp loc_A511C loc_A506E: mov rdi, rsi call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) lea rcx, aTrue_0; "True" lea rsi, aFalse; "False" test al, al cmovnz rsi, rcx lea rcx, [rbx+10h] mov [rbx], rcx movzx edx, al xor rdx, 5 add rdx, rsi jmp short loc_A50CB loc_A509D: test eax, eax jnz short loc_A50D5 cmp qword ptr [rsi+20h], 0 jnz short loc_A50D5 cmp qword ptr [rsi+10h], 0 jnz short loc_A50D5 cmp qword ptr [rsi+30h], 0 jnz short loc_A50D5 lea rax, [rbx+10h] mov [rbx], rax lea rsi, aNone_0; "None" lea rdx, aNone_0+4; "" loc_A50CB: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) jmp short loc_A511C loc_A50D5: mov rdi, rbx mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short loc_A511C loc_A50E6: add r12d, 0FFFFFFFEh jmp short loc_A50EF loc_A50EC: dec r12d loc_A50EF: shr r15, 3Fh lea esi, [r15+r12] lea rax, [rbx+10h] mov [rbx], rax mov rdi, rbx mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r15, [rbx] mov rdi, r15 mov esi, r12d mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) loc_A511C: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
_QWORD * minja::Value::to_str[abi:cxx11](_QWORD *a1, long long a2) { char v2; // al int v3; // eax long long v4; // rax unsigned long long v5; // r14 int v6; // r12d unsigned long long v7; // rcx bool v8; // cc int v9; // r8d int v10; // r9d unsigned __int8 v11; // al char *v12; // rsi char *v13; // rdx unsigned long long v14; // r15 char v16; // [rsp-8h] [rbp-28h] v16 = v2; v3 = *(unsigned __int8 *)(a2 + 64); if ( v3 == 3 ) { minja::Value::get<std::string>((long long)a1, (_QWORD *)a2); } else { if ( (unsigned __int8)(v3 - 5) > 1u ) { if ( v3 == 4 ) { v11 = minja::Value::get<bool>((_QWORD *)a2); v12 = "False"; if ( v11 ) v12 = "True"; *a1 = a1 + 2; v13 = &v12[v11 ^ 5LL]; } else { if ( v3 == 7 ) { minja::Value::get<double>(a2); __gnu_cxx::__to_xstring<std::string,char>( (_DWORD)a1, (unsigned int)&vsnprintf, 328, (unsigned int)"%f", v9, v10, v16); return a1; } if ( *(_BYTE *)(a2 + 64) || *(_QWORD *)(a2 + 32) || *(_QWORD *)(a2 + 16) || *(_QWORD *)(a2 + 48) ) { minja::Value::dump[abi:cxx11]((long long)a1, a2, 0xFFFFFFFF, 0); return a1; } *a1 = a1 + 2; v12 = "None"; v13 = ""; } std::string::_M_construct<char const*>(a1, v12, (long long)v13); return a1; } v4 = minja::Value::get<long>(a2); v5 = -v4; if ( v4 > 0 ) v5 = v4; v6 = 1; if ( v5 >= 0xA ) { v6 = 4; v7 = v5; while ( 1 ) { if ( v7 <= 0x63 ) { v6 -= 2; goto LABEL_28; } if ( v7 <= 0x3E7 ) break; if ( v7 < 0x2710 ) goto LABEL_28; v6 += 4; v8 = v7 <= 0x1869F; v7 /= 0x2710uLL; if ( v8 ) { v6 -= 3; goto LABEL_28; } } --v6; } LABEL_28: v14 = (unsigned long long)v4 >> 63; *a1 = a1 + 2; std::string::_M_construct(a1, (unsigned int)((unsigned long long)v4 >> 63) + v6, 45LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)(*a1 + v14), v6, v5); } return a1; }
to_str[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOVZX EAX,byte ptr [RSI + 0x40] CMP EAX,0x3 JNZ 0x001a4fb3 MOV RDI,RBX CALL 0x0019551c JMP 0x001a511c LAB_001a4fb3: LEA ECX,[RAX + -0x5] CMP CL,0x1 JA 0x001a503a MOV RDI,RSI CALL 0x001944aa MOV R15,RAX MOV R14,RAX NEG R14 CMOVS R14,RAX MOV R12D,0x1 CMP R14,0xa JC 0x001a50ef MOV R12D,0x4 MOV RSI,0x346dc5d63886594b MOV RCX,R14 LAB_001a4ff3: CMP RCX,0x63 JBE 0x001a50e6 CMP RCX,0x3e7 JBE 0x001a50ec CMP RCX,0x2710 JC 0x001a50ef MOV RAX,RCX MUL RSI SHR RDX,0xb ADD R12D,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x001a4ff3 ADD R12D,-0x3 JMP 0x001a50ef LAB_001a503a: CMP EAX,0x4 JZ 0x001a506e CMP EAX,0x7 JNZ 0x001a509d MOV RDI,RSI CALL 0x001945dc MOV RSI,qword ptr [0x0023cf30] LEA RCX,[0x200a3e] MOV EDX,0x148 MOV RDI,RBX MOV AL,0x1 CALL 0x001a5e35 JMP 0x001a511c LAB_001a506e: MOV RDI,RSI CALL 0x00195422 LEA RCX,[0x1ffdf0] LEA RSI,[0x1ffdf5] TEST AL,AL CMOVNZ RSI,RCX LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOVZX EDX,AL XOR RDX,0x5 ADD RDX,RSI JMP 0x001a50cb LAB_001a509d: TEST EAX,EAX JNZ 0x001a50d5 CMP qword ptr [RSI + 0x20],0x0 JNZ 0x001a50d5 CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001a50d5 CMP qword ptr [RSI + 0x30],0x0 JNZ 0x001a50d5 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x200210] LEA RDX,[0x200214] LAB_001a50cb: MOV RDI,RBX CALL 0x0012d748 JMP 0x001a511c LAB_001a50d5: MOV RDI,RBX MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00194712 JMP 0x001a511c LAB_001a50e6: ADD R12D,-0x2 JMP 0x001a50ef LAB_001a50ec: DEC R12D LAB_001a50ef: SHR R15,0x3f LEA ESI,[R15 + R12*0x1] LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RDI,RBX MOV EDX,0x2d CALL 0x0011ba40 ADD R15,qword ptr [RBX] MOV RDI,R15 MOV ESI,R12D MOV RDX,R14 CALL 0x0016aecf LAB_001a511c: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Value::to_str[abi:cxx11]() const */ void minja::Value::to_str_abi_cxx11_(void) { Value VVar1; bool bVar2; uint uVar3; ulong uVar4; ulong uVar5; Value *in_RSI; _func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr *in_RDI; uint uVar6; ulong uVar7; VVar1 = in_RSI[0x40]; if (VVar1 == (Value)0x3) { get<std::__cxx11::string>(); } else if ((byte)((char)VVar1 - 5U) < 2) { uVar4 = get<long>(in_RSI); uVar7 = -uVar4; if (0 < (long)uVar4) { uVar7 = uVar4; } uVar6 = 1; if (9 < uVar7) { uVar5 = uVar7; uVar3 = 4; do { uVar6 = uVar3; if (uVar5 < 100) { uVar6 = uVar6 - 2; goto LAB_001a50ef; } if (uVar5 < 1000) { uVar6 = uVar6 - 1; goto LAB_001a50ef; } if (uVar5 < 10000) goto LAB_001a50ef; bVar2 = 99999 < uVar5; uVar5 = uVar5 / 10000; uVar3 = uVar6 + 4; } while (bVar2); uVar6 = uVar6 + 1; } LAB_001a50ef: *(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10; std::__cxx11::string::_M_construct((ulong)in_RDI,(char)uVar6 - (char)((long)uVar4 >> 0x3f)); std::__detail::__to_chars_10_impl<unsigned_long> ((char *)(*(long *)in_RDI - ((long)uVar4 >> 0x3f)),uVar6,uVar7); } else { if (VVar1 == (Value)0x4) { get<bool>(in_RSI); *(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10; } else { if (VVar1 == (Value)0x7) { get<double>(in_RSI); __gnu_cxx::__to_xstring<std::__cxx11::string,char> (in_RDI,(ulong)PTR_vsnprintf_0023cf30,(char *)0x148,&DAT_00200a3e); return; } if ((((VVar1 != (Value)0x0) || (*(long *)(in_RSI + 0x20) != 0)) || (*(long *)(in_RSI + 0x10) != 0)) || (*(long *)(in_RSI + 0x30) != 0)) { dump_abi_cxx11_((int)in_RDI,SUB81(in_RSI,0)); return; } *(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10; } std::__cxx11::string::_M_construct<char_const*>(); } return; }
20,872
hp_key_cmp
eloqsql/storage/heap/hp_hash.c
int hp_key_cmp(HP_KEYDEF *keydef, const uchar *rec, const uchar *key) { HA_KEYSEG *seg,*endseg; for (seg=keydef->seg,endseg=seg+keydef->keysegs ; seg < endseg ; key+= (seg++)->length) { if (seg->null_bit) { int found_null= MY_TEST(rec[seg->null_pos] & seg->null_bit); if (found_null != (int) *key++) return 1; if (found_null) { /* Add key pack length (2) to key for VARCHAR segments */ if (seg->type == HA_KEYTYPE_VARTEXT1) key+= 2; continue; } } if (seg->type == HA_KEYTYPE_TEXT) { CHARSET_INFO *cs= seg->charset; size_t char_length_key; size_t char_length_rec; uchar *pos= (uchar*) rec + seg->start; if (cs->mbmaxlen > 1) { size_t char_length= seg->length / cs->mbmaxlen; char_length_key= hp_charpos(cs, key, key + seg->length, char_length); set_if_smaller(char_length_key, seg->length); char_length_rec= hp_charpos(cs, pos, pos + seg->length, char_length); set_if_smaller(char_length_rec, seg->length); } else { char_length_key= seg->length; char_length_rec= seg->length; } if (my_ci_strnncollsp(seg->charset, pos, char_length_rec, key, char_length_key)) return 1; } else if (seg->type == HA_KEYTYPE_VARTEXT1) /* Any VARCHAR segments */ { uchar *pos= (uchar*) rec + seg->start; CHARSET_INFO *cs= seg->charset; size_t pack_length= seg->bit_start; size_t char_length_rec= (pack_length == 1 ? (size_t) *(uchar*) pos : uint2korr(pos)); /* Key segments are always packed with 2 bytes */ size_t char_length_key= uint2korr(key); pos+= pack_length; key+= 2; /* skip key pack length */ if (cs->mbmaxlen > 1) { size_t char_length1, char_length2; char_length1= char_length2= seg->length / cs->mbmaxlen; char_length1= hp_charpos(cs, key, key + char_length_key, char_length1); set_if_smaller(char_length_key, char_length1); char_length2= hp_charpos(cs, pos, pos + char_length_rec, char_length2); set_if_smaller(char_length_rec, char_length2); } else set_if_smaller(char_length_rec, seg->length); if (my_ci_strnncollsp(seg->charset, pos, char_length_rec, key, char_length_key)) return 1; } else { uint dec= 0; if (seg->type == HA_KEYTYPE_BIT && seg->bit_length) { uchar bits= get_rec_bits(rec + seg->bit_pos, seg->bit_start, seg->bit_length); if (bits != (*key)) return 1; dec= 1; key++; } if (bcmp(rec + seg->start, key, seg->length - dec)) return 1; } } return 0; }
O0
c
hp_key_cmp: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x4(%rcx), %ecx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x29daf movq -0x28(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0x299f5 movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx movl 0xc(%rcx), %ecx movzbl (%rax,%rcx), %edx movq -0x28(%rbp), %rax movzbl 0x19(%rax), %eax andl %eax, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movq -0x20(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x299cf movl $0x1, -0x4(%rbp) jmp 0x29db6 cmpl $0x0, -0x34(%rbp) je 0x299f3 movq -0x28(%rbp), %rax movzbl 0x18(%rax), %eax cmpl $0xf, %eax jne 0x299ee movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) jmp 0x29d89 jmp 0x299f5 movq -0x28(%rbp), %rax movzbl 0x18(%rax), %eax cmpl $0x1, %eax jne 0x29b24 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x40(%rbp), %rax cmpl $0x1, 0x9c(%rax) jbe 0x29ada movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq -0x40(%rbp), %rcx xorl %edx, %edx divl 0x9c(%rcx) movl %eax, %eax movq %rax, -0x60(%rbp) movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax cltq addq %rax, %rdx movq -0x60(%rbp), %rcx callq 0x2a220 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x28(%rbp), %rcx movzwl 0x14(%rcx), %ecx cmpq %rcx, %rax jbe 0x29a91 movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq %rax, -0x48(%rbp) jmp 0x29a93 movq -0x40(%rbp), %rdi movq -0x58(%rbp), %rsi movq -0x58(%rbp), %rdx movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax cltq addq %rax, %rdx movq -0x60(%rbp), %rcx callq 0x2a220 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq -0x28(%rbp), %rcx movzwl 0x14(%rcx), %ecx cmpq %rcx, %rax jbe 0x29ad6 movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq %rax, -0x50(%rbp) jmp 0x29ad8 jmp 0x29af2 movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x48(%rbp), %r8 callq 0x2a810 cmpl $0x0, %eax je 0x29b1f movl $0x1, -0x4(%rbp) jmp 0x29db6 jmp 0x29d87 movq -0x28(%rbp), %rax movzbl 0x18(%rax), %eax cmpl $0xf, %eax jne 0x29cc6 movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x70(%rbp) movq -0x28(%rbp), %rax movzbl 0x1a(%rax), %eax movq %rax, -0x78(%rbp) cmpq $0x1, -0x78(%rbp) jne 0x29b75 movq -0x68(%rbp), %rax movzbl (%rax), %eax movq %rax, -0xa8(%rbp) jmp 0x29b83 movq -0x68(%rbp), %rax movzwl (%rax), %eax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x20(%rbp), %rax movzwl (%rax), %eax movq %rax, -0x88(%rbp) movq -0x78(%rbp), %rax addq -0x68(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x70(%rbp), %rax cmpl $0x1, 0x9c(%rax) jbe 0x29c6e movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq -0x70(%rbp), %rcx xorl %edx, %edx divl 0x9c(%rcx) movl %eax, %eax movq %rax, -0x98(%rbp) movq %rax, -0x90(%rbp) movq -0x70(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rdx addq -0x88(%rbp), %rdx movq -0x90(%rbp), %rcx callq 0x2a220 movq %rax, -0x90(%rbp) movq -0x88(%rbp), %rax cmpq -0x90(%rbp), %rax jbe 0x29c2d movq -0x90(%rbp), %rax movq %rax, -0x88(%rbp) jmp 0x29c2f movq -0x70(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x68(%rbp), %rdx addq -0x80(%rbp), %rdx movq -0x98(%rbp), %rcx callq 0x2a220 movq %rax, -0x98(%rbp) movq -0x80(%rbp), %rax cmpq -0x98(%rbp), %rax jbe 0x29c6a movq -0x98(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x29c6c jmp 0x29c91 jmp 0x29c70 movq -0x80(%rbp), %rax movq -0x28(%rbp), %rcx movzwl 0x14(%rcx), %ecx cmpq %rcx, %rax jbe 0x29c8d movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq %rax, -0x80(%rbp) jmp 0x29c8f jmp 0x29c91 movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x68(%rbp), %rsi movq -0x80(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x88(%rbp), %r8 callq 0x2a810 cmpl $0x0, %eax je 0x29cc1 movl $0x1, -0x4(%rbp) jmp 0x29db6 jmp 0x29d85 movl $0x0, -0x9c(%rbp) movq -0x28(%rbp), %rax movzbl 0x18(%rax), %eax cmpl $0x13, %eax jne 0x29d4c movq -0x28(%rbp), %rax movzbl 0x1b(%rax), %eax cmpl $0x0, %eax je 0x29d4c movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rax movzwl 0x10(%rax), %eax cltq addq %rax, %rdi movq -0x28(%rbp), %rax movb 0x1a(%rax), %al movq -0x28(%rbp), %rcx movzbl 0x1b(%rcx), %edx movzbl %al, %esi callq 0x2a2b0 movb %al, -0x9d(%rbp) movzbl -0x9d(%rbp), %eax movq -0x20(%rbp), %rcx movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x29d36 movl $0x1, -0x4(%rbp) jmp 0x29db6 movl $0x1, -0x9c(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rax movl 0x8(%rax), %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax subl -0x9c(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x24130 cmpl $0x0, %eax je 0x29d83 movl $0x1, -0x4(%rbp) jmp 0x29db6 jmp 0x29d85 jmp 0x29d87 jmp 0x29d89 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x20, %rcx movq %rcx, -0x28(%rbp) movzwl 0x14(%rax), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x29969 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xb0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
hp_key_cmp: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_10] mov ecx, [rcx+4] shl rcx, 5 add rax, rcx mov [rbp+var_30], rax loc_29969: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb loc_29DAF mov rax, [rbp+var_28] cmp byte ptr [rax+19h], 0 jz short loc_299F5 mov rax, [rbp+var_18] mov rcx, [rbp+var_28] mov ecx, [rcx+0Ch] movzx edx, byte ptr [rax+rcx] mov rax, [rbp+var_28] movzx eax, byte ptr [rax+19h] and edx, eax xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_34], eax mov eax, [rbp+var_34] mov rcx, [rbp+var_20] mov rdx, rcx add rdx, 1 mov [rbp+var_20], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_299CF mov [rbp+var_4], 1 jmp loc_29DB6 loc_299CF: cmp [rbp+var_34], 0 jz short loc_299F3 mov rax, [rbp+var_28] movzx eax, byte ptr [rax+18h] cmp eax, 0Fh jnz short loc_299EE mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax loc_299EE: jmp loc_29D89 loc_299F3: jmp short $+2 loc_299F5: mov rax, [rbp+var_28] movzx eax, byte ptr [rax+18h] cmp eax, 1 jnz loc_29B24 mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_28] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_40] cmp dword ptr [rax+9Ch], 1 jbe loc_29ADA mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov rcx, [rbp+var_40] xor edx, edx div dword ptr [rcx+9Ch] mov eax, eax mov [rbp+var_60], rax mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] cdqe add rdx, rax mov rcx, [rbp+var_60] call hp_charpos mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rcx, [rbp+var_28] movzx ecx, word ptr [rcx+14h] cmp rax, rcx jbe short loc_29A91 mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov [rbp+var_48], rax loc_29A91: jmp short $+2 loc_29A93: mov rdi, [rbp+var_40] mov rsi, [rbp+var_58] mov rdx, [rbp+var_58] mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] cdqe add rdx, rax mov rcx, [rbp+var_60] call hp_charpos mov [rbp+var_50], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_28] movzx ecx, word ptr [rcx+14h] cmp rax, rcx jbe short loc_29AD6 mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov [rbp+var_50], rax loc_29AD6: jmp short $+2 loc_29AD8: jmp short loc_29AF2 loc_29ADA: mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov [rbp+var_48], rax mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov [rbp+var_50], rax loc_29AF2: mov rax, [rbp+var_28] mov rdi, [rax] mov rsi, [rbp+var_58] mov rdx, [rbp+var_50] mov rcx, [rbp+var_20] mov r8, [rbp+var_48] call my_ci_strnncollsp cmp eax, 0 jz short loc_29B1F mov [rbp+var_4], 1 jmp loc_29DB6 loc_29B1F: jmp loc_29D87 loc_29B24: mov rax, [rbp+var_28] movzx eax, byte ptr [rax+18h] cmp eax, 0Fh jnz loc_29CC6 mov rax, [rbp+var_18] mov rcx, [rbp+var_28] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_70], rax mov rax, [rbp+var_28] movzx eax, byte ptr [rax+1Ah] mov [rbp+var_78], rax cmp [rbp+var_78], 1 jnz short loc_29B75 mov rax, [rbp+var_68] movzx eax, byte ptr [rax] mov [rbp+var_A8], rax jmp short loc_29B83 loc_29B75: mov rax, [rbp+var_68] movzx eax, word ptr [rax] mov [rbp+var_A8], rax loc_29B83: mov rax, [rbp+var_A8] mov [rbp+var_80], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov [rbp+var_88], rax mov rax, [rbp+var_78] add rax, [rbp+var_68] mov [rbp+var_68], rax mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_70] cmp dword ptr [rax+9Ch], 1 jbe loc_29C6E mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov rcx, [rbp+var_70] xor edx, edx div dword ptr [rcx+9Ch] mov eax, eax mov [rbp+var_98], rax mov [rbp+var_90], rax mov rdi, [rbp+var_70] mov rsi, [rbp+var_20] mov rdx, [rbp+var_20] add rdx, [rbp+var_88] mov rcx, [rbp+var_90] call hp_charpos mov [rbp+var_90], rax mov rax, [rbp+var_88] cmp rax, [rbp+var_90] jbe short loc_29C2D mov rax, [rbp+var_90] mov [rbp+var_88], rax loc_29C2D: jmp short $+2 loc_29C2F: mov rdi, [rbp+var_70] mov rsi, [rbp+var_68] mov rdx, [rbp+var_68] add rdx, [rbp+var_80] mov rcx, [rbp+var_98] call hp_charpos mov [rbp+var_98], rax mov rax, [rbp+var_80] cmp rax, [rbp+var_98] jbe short loc_29C6A mov rax, [rbp+var_98] mov [rbp+var_80], rax loc_29C6A: jmp short $+2 loc_29C6C: jmp short loc_29C91 loc_29C6E: jmp short $+2 loc_29C70: mov rax, [rbp+var_80] mov rcx, [rbp+var_28] movzx ecx, word ptr [rcx+14h] cmp rax, rcx jbe short loc_29C8D mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov [rbp+var_80], rax loc_29C8D: jmp short $+2 loc_29C8F: jmp short $+2 loc_29C91: mov rax, [rbp+var_28] mov rdi, [rax] mov rsi, [rbp+var_68] mov rdx, [rbp+var_80] mov rcx, [rbp+var_20] mov r8, [rbp+var_88] call my_ci_strnncollsp cmp eax, 0 jz short loc_29CC1 mov [rbp+var_4], 1 jmp loc_29DB6 loc_29CC1: jmp loc_29D85 loc_29CC6: mov [rbp+var_9C], 0 mov rax, [rbp+var_28] movzx eax, byte ptr [rax+18h] cmp eax, 13h jnz short loc_29D4C mov rax, [rbp+var_28] movzx eax, byte ptr [rax+1Bh] cmp eax, 0 jz short loc_29D4C mov rdi, [rbp+var_18] mov rax, [rbp+var_28] movzx eax, word ptr [rax+10h] cdqe add rdi, rax mov rax, [rbp+var_28] mov al, [rax+1Ah] mov rcx, [rbp+var_28] movzx edx, byte ptr [rcx+1Bh] movzx esi, al call get_rec_bits mov [rbp+var_9D], al movzx eax, [rbp+var_9D] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_29D36 mov [rbp+var_4], 1 jmp loc_29DB6 loc_29D36: mov [rbp+var_9C], 1 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax loc_29D4C: mov rdi, [rbp+var_18] mov rax, [rbp+var_28] mov eax, [rax+8] add rdi, rax mov rsi, [rbp+var_20] mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] sub eax, [rbp+var_9C] mov eax, eax mov edx, eax call _memcmp cmp eax, 0 jz short loc_29D83 mov [rbp+var_4], 1 jmp short loc_29DB6 loc_29D83: jmp short $+2 loc_29D85: jmp short $+2 loc_29D87: jmp short $+2 loc_29D89: mov rax, [rbp+var_28] mov rcx, rax add rcx, 20h ; ' ' mov [rbp+var_28], rcx movzx ecx, word ptr [rax+14h] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp loc_29969 loc_29DAF: mov [rbp+var_4], 0 loc_29DB6: mov eax, [rbp+var_4] add rsp, 0B0h pop rbp retn
long long hp_key_cmp(long long a1, long long a2, unsigned __int16 *a3) { _BYTE *v3; // rcx _QWORD *v4; // rax unsigned long long v6; // [rsp+8h] [rbp-A8h] int v7; // [rsp+14h] [rbp-9Ch] long long v8; // [rsp+18h] [rbp-98h] unsigned long long v9; // [rsp+18h] [rbp-98h] unsigned long long v10; // [rsp+20h] [rbp-90h] unsigned long long v11; // [rsp+28h] [rbp-88h] unsigned long long v12; // [rsp+30h] [rbp-80h] long long v13; // [rsp+38h] [rbp-78h] long long v14; // [rsp+40h] [rbp-70h] unsigned __int8 *v15; // [rsp+48h] [rbp-68h] unsigned __int8 *v16; // [rsp+48h] [rbp-68h] long long v17; // [rsp+50h] [rbp-60h] long long v18; // [rsp+58h] [rbp-58h] unsigned long long v19; // [rsp+60h] [rbp-50h] unsigned long long v20; // [rsp+68h] [rbp-48h] long long v21; // [rsp+70h] [rbp-40h] _QWORD *v22; // [rsp+80h] [rbp-30h] _QWORD *v23; // [rsp+88h] [rbp-28h] v23 = *(_QWORD **)(a1 + 16); v22 = &v23[4 * *(unsigned int *)(a1 + 4)]; while ( v23 < v22 ) { if ( !*((_BYTE *)v23 + 25) ) goto LABEL_10; v3 = a3; a3 = (unsigned __int16 *)((char *)a3 + 1); if ( ((unsigned __int8)(*((_BYTE *)v23 + 25) & *(_BYTE *)(a2 + *((unsigned int *)v23 + 3))) != 0) != *v3 ) return 1; if ( (*((_BYTE *)v23 + 25) & *(_BYTE *)(a2 + *((unsigned int *)v23 + 3))) != 0 ) { if ( *((_BYTE *)v23 + 24) == 15 ) ++a3; } else { LABEL_10: if ( *((_BYTE *)v23 + 24) == 1 ) { v21 = *v23; v18 = *((unsigned int *)v23 + 2) + a2; if ( *(_DWORD *)(*v23 + 156LL) <= 1u ) { v20 = *((unsigned __int16 *)v23 + 10); v19 = v20; } else { v17 = (unsigned int)*((unsigned __int16 *)v23 + 10) / *(_DWORD *)(v21 + 156); v20 = hp_charpos(v21, a3, (char *)a3 + *((unsigned __int16 *)v23 + 10), v17); if ( v20 > *((unsigned __int16 *)v23 + 10) ) v20 = *((unsigned __int16 *)v23 + 10); v19 = hp_charpos(v21, v18, *((unsigned __int16 *)v23 + 10) + v18, v17); if ( v19 > *((unsigned __int16 *)v23 + 10) ) v19 = *((unsigned __int16 *)v23 + 10); } if ( (unsigned int)my_ci_strnncollsp(*v23, v18, v19, a3, v20) ) return 1; } else if ( *((_BYTE *)v23 + 24) == 15 ) { v15 = (unsigned __int8 *)(*((unsigned int *)v23 + 2) + a2); v14 = *v23; v13 = *((unsigned __int8 *)v23 + 26); if ( v13 == 1 ) v6 = *v15; else v6 = *(unsigned __int16 *)v15; v12 = v6; v11 = *a3; v16 = &v15[v13]; ++a3; if ( *(_DWORD *)(v14 + 156) <= 1u ) { if ( v6 > *((unsigned __int16 *)v23 + 10) ) v12 = *((unsigned __int16 *)v23 + 10); } else { v8 = (unsigned int)*((unsigned __int16 *)v23 + 10) / *(_DWORD *)(v14 + 156); v10 = hp_charpos(v14, a3, (char *)a3 + v11, v8); if ( v11 > v10 ) v11 = v10; v9 = hp_charpos(v14, v16, &v16[v6], v8); if ( v6 > v9 ) v12 = v9; } if ( (unsigned int)my_ci_strnncollsp(*v23, v16, v12, a3, v11) ) return 1; } else { v7 = 0; if ( *((_BYTE *)v23 + 24) == 19 && *((_BYTE *)v23 + 27) ) { if ( (unsigned __int8)get_rec_bits( *((unsigned __int16 *)v23 + 8) + a2, *((unsigned __int8 *)v23 + 26), *((unsigned __int8 *)v23 + 27)) != *(unsigned __int8 *)a3 ) return 1; v7 = 1; a3 = (unsigned __int16 *)((char *)a3 + 1); } if ( (unsigned int)memcmp( *((unsigned int *)v23 + 2) + a2, a3, (unsigned int)*((unsigned __int16 *)v23 + 10) - v7) ) return 1; } } v4 = v23; v23 += 4; a3 = (unsigned __int16 *)((char *)a3 + *((unsigned __int16 *)v4 + 10)); } return 0; }
hp_key_cmp: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x4] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_00129969: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00129daf MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x19],0x0 JZ 0x001299f5 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0xc] MOVZX EDX,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x19] AND EDX,EAX XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x001299cf MOV dword ptr [RBP + -0x4],0x1 JMP 0x00129db6 LAB_001299cf: CMP dword ptr [RBP + -0x34],0x0 JZ 0x001299f3 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x18] CMP EAX,0xf JNZ 0x001299ee MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX LAB_001299ee: JMP 0x00129d89 LAB_001299f3: JMP 0x001299f5 LAB_001299f5: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x18] CMP EAX,0x1 JNZ 0x00129b24 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x40] CMP dword ptr [RAX + 0x9c],0x1 JBE 0x00129ada MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV RCX,qword ptr [RBP + -0x40] XOR EDX,EDX DIV dword ptr [RCX + 0x9c] MOV EAX,EAX MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] CDQE ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x60] CALL 0x0012a220 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,word ptr [RCX + 0x14] CMP RAX,RCX JBE 0x00129a91 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV qword ptr [RBP + -0x48],RAX LAB_00129a91: JMP 0x00129a93 LAB_00129a93: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] CDQE ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x60] CALL 0x0012a220 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,word ptr [RCX + 0x14] CMP RAX,RCX JBE 0x00129ad6 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV qword ptr [RBP + -0x50],RAX LAB_00129ad6: JMP 0x00129ad8 LAB_00129ad8: JMP 0x00129af2 LAB_00129ada: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV qword ptr [RBP + -0x50],RAX LAB_00129af2: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x48] CALL 0x0012a810 CMP EAX,0x0 JZ 0x00129b1f MOV dword ptr [RBP + -0x4],0x1 JMP 0x00129db6 LAB_00129b1f: JMP 0x00129d87 LAB_00129b24: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x18] CMP EAX,0xf JNZ 0x00129cc6 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x1a] MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x78],0x1 JNZ 0x00129b75 MOV RAX,qword ptr [RBP + -0x68] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0xa8],RAX JMP 0x00129b83 LAB_00129b75: MOV RAX,qword ptr [RBP + -0x68] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0xa8],RAX LAB_00129b83: MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x70] CMP dword ptr [RAX + 0x9c],0x1 JBE 0x00129c6e MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV RCX,qword ptr [RBP + -0x70] XOR EDX,EDX DIV dword ptr [RCX + 0x9c] MOV EAX,EAX MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x20] ADD RDX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x90] CALL 0x0012a220 MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x88] CMP RAX,qword ptr [RBP + -0x90] JBE 0x00129c2d MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x88],RAX LAB_00129c2d: JMP 0x00129c2f LAB_00129c2f: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x68] ADD RDX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x98] CALL 0x0012a220 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x98] JBE 0x00129c6a MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x80],RAX LAB_00129c6a: JMP 0x00129c6c LAB_00129c6c: JMP 0x00129c91 LAB_00129c6e: JMP 0x00129c70 LAB_00129c70: MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,word ptr [RCX + 0x14] CMP RAX,RCX JBE 0x00129c8d MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV qword ptr [RBP + -0x80],RAX LAB_00129c8d: JMP 0x00129c8f LAB_00129c8f: JMP 0x00129c91 LAB_00129c91: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x88] CALL 0x0012a810 CMP EAX,0x0 JZ 0x00129cc1 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00129db6 LAB_00129cc1: JMP 0x00129d85 LAB_00129cc6: MOV dword ptr [RBP + -0x9c],0x0 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x18] CMP EAX,0x13 JNZ 0x00129d4c MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x1b] CMP EAX,0x0 JZ 0x00129d4c MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x10] CDQE ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x28] MOV AL,byte ptr [RAX + 0x1a] MOV RCX,qword ptr [RBP + -0x28] MOVZX EDX,byte ptr [RCX + 0x1b] MOVZX ESI,AL CALL 0x0012a2b0 MOV byte ptr [RBP + -0x9d],AL MOVZX EAX,byte ptr [RBP + -0x9d] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00129d36 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00129db6 LAB_00129d36: MOV dword ptr [RBP + -0x9c],0x1 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX LAB_00129d4c: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x8] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] SUB EAX,dword ptr [RBP + -0x9c] MOV EAX,EAX MOV EDX,EAX CALL 0x00124130 CMP EAX,0x0 JZ 0x00129d83 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00129db6 LAB_00129d83: JMP 0x00129d85 LAB_00129d85: JMP 0x00129d87 LAB_00129d87: JMP 0x00129d89 LAB_00129d89: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x20 MOV qword ptr [RBP + -0x28],RCX MOVZX ECX,word ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00129969 LAB_00129daf: MOV dword ptr [RBP + -0x4],0x0 LAB_00129db6: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xb0 POP RBP RET
int4 hp_key_cmp(long param_1,long param_2,ushort *param_3) { uint uVar1; long *plVar2; long lVar3; char cVar4; int iVar5; long lVar6; ushort *puVar7; byte *pbVar8; ulong uVar9; ulong uVar10; bool bVar11; ulong local_b0; int local_a4; ulong local_90; ulong local_88; ulong local_58; ulong local_50; long *local_30; ushort *local_28; plVar2 = *(long **)(param_1 + 0x10); uVar1 = *(uint *)(param_1 + 4); local_30 = plVar2; local_28 = param_3; do { if (plVar2 + (ulong)uVar1 * 4 <= local_30) { return 0; } puVar7 = local_28; if (*(char *)((long)local_30 + 0x19) == '\0') { LAB_001299f5: local_28 = puVar7; if ((char)local_30[3] == '\x01') { lVar3 = *local_30; lVar6 = param_2 + (ulong)*(uint *)(local_30 + 1); if (*(uint *)(lVar3 + 0x9c) < 2) { local_50 = (ulong)*(ushort *)((long)local_30 + 0x14); local_58 = (ulong)*(ushort *)((long)local_30 + 0x14); } else { uVar10 = (ulong)*(ushort *)((long)local_30 + 0x14) / (ulong)*(uint *)(lVar3 + 0x9c); local_50 = hp_charpos(lVar3,local_28, (char *)((long)local_28 + (long)(int)(uint)*(ushort *)((long)local_30 + 0x14)),uVar10) ; if (*(ushort *)((long)local_30 + 0x14) < local_50) { local_50 = (ulong)*(ushort *)((long)local_30 + 0x14); } local_58 = hp_charpos(lVar3,lVar6,lVar6 + (int)(uint)*(ushort *)((long)local_30 + 0x14), uVar10); if (*(ushort *)((long)local_30 + 0x14) < local_58) { local_58 = (ulong)*(ushort *)((long)local_30 + 0x14); } } iVar5 = my_ci_strnncollsp(*local_30,lVar6,local_58,local_28,local_50); puVar7 = local_28; if (iVar5 != 0) { return 1; } } else if ((char)local_30[3] == '\x0f') { puVar7 = (ushort *)(param_2 + (ulong)*(uint *)(local_30 + 1)); lVar3 = *local_30; if ((ulong)*(byte *)((long)local_30 + 0x1a) == 1) { local_b0 = (ulong)(byte)*puVar7; } else { local_b0 = (ulong)*puVar7; } local_88 = local_b0; local_90 = (ulong)*local_28; pbVar8 = (byte *)((ulong)*(byte *)((long)local_30 + 0x1a) + (long)puVar7); puVar7 = local_28 + 1; if (*(uint *)(lVar3 + 0x9c) < 2) { if (*(ushort *)((long)local_30 + 0x14) < local_b0) { local_88 = (ulong)*(ushort *)((long)local_30 + 0x14); } } else { uVar10 = (ulong)*(ushort *)((long)local_30 + 0x14) / (ulong)*(uint *)(lVar3 + 0x9c); uVar9 = hp_charpos(lVar3,puVar7,(char *)((long)puVar7 + local_90),uVar10); if (uVar9 < local_90) { local_90 = uVar9; } uVar10 = hp_charpos(lVar3,pbVar8,pbVar8 + local_b0,uVar10); if (uVar10 < local_b0) { local_88 = uVar10; } } iVar5 = my_ci_strnncollsp(*local_30,pbVar8,local_88,puVar7,local_90); if (iVar5 != 0) { return 1; } } else { local_a4 = 0; if (((char)local_30[3] == '\x13') && (*(char *)((long)local_30 + 0x1b) != '\0')) { cVar4 = get_rec_bits(param_2 + (int)(uint)*(ushort *)(local_30 + 2), *(int1 *)((long)local_30 + 0x1a), *(int1 *)((long)local_30 + 0x1b)); if (cVar4 != (char)*local_28) { return 1; } local_a4 = 1; local_28 = (ushort *)((long)local_28 + 1); } iVar5 = memcmp((void *)(param_2 + (ulong)*(uint *)(local_30 + 1)),local_28, (ulong)((uint)*(ushort *)((long)local_30 + 0x14) - local_a4)); puVar7 = local_28; if (iVar5 != 0) { return 1; } } } else { bVar11 = (*(byte *)(param_2 + (ulong)*(uint *)((long)local_30 + 0xc)) & *(byte *)((long)local_30 + 0x19)) != 0; if (bVar11 != (bool)(char)*local_28) { return 1; } puVar7 = (ushort *)((long)local_28 + 1); if (!bVar11) goto LAB_001299f5; if ((char)local_30[3] == '\x0f') { puVar7 = (ushort *)((long)local_28 + 3); } } local_28 = puVar7; local_28 = (ushort *)((long)local_28 + (long)(int)(uint)*(ushort *)((long)local_30 + 0x14)); local_30 = local_30 + 4; } while( true ); }
20,873
my_strnxfrm_czech
eloqsql/strings/ctype-czech.c
static size_t my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, size_t len, uint nweights_arg __attribute__((unused)), const uchar *src, size_t srclen, uint flags) { int value; const uchar *p, * store; int pass = 0; size_t totlen = 0; p = src; store = src; if (!(flags & 0x0F)) /* All levels by default */ flags|= 0x0F; do { int add= (1 << pass) & flags; /* If this level is needed */ NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen); if (add) ADD_TO_RESULT(dest, len, totlen, value); } while (value); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen) { memset(dest + totlen, ' ', len - totlen); totlen= len; } return totlen; }
O0
c
my_strnxfrm_czech: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movl $0x0, -0x4c(%rbp) movq $0x0, -0x58(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movl 0x10(%rbp), %eax andl $0xf, %eax cmpl $0x0, %eax jne 0x10fc38 movl 0x10(%rbp), %eax orl $0xf, %eax movl %eax, 0x10(%rbp) jmp 0x10fc3a movl -0x4c(%rbp), %ecx movl $0x1, %eax shll %cl, %eax andl 0x10(%rbp), %eax movl %eax, -0x5c(%rbp) movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jl 0x10fcad movl $0x0, -0x34(%rbp) cmpl $0x3, -0x4c(%rbp) je 0x10fca8 movl -0x4c(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0x4c(%rbp) cmpl $0x0, %eax jne 0x10fc8b movq -0x48(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x10fc96 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x40(%rbp) movl $0x1, -0x34(%rbp) jmp 0x10ff07 movslq -0x4c(%rbp), %rcx leaq 0x1a5738(%rip), %rax # 0x2b53f0 movq (%rax,%rcx,8), %rax movq -0x40(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) jne 0x10fce1 movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x10fc4a cmpl $0x2, -0x34(%rbp) jne 0x10fded movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rcx movq -0x28(%rbp), %rax subq %rax, %rcx movq -0x30(%rbp), %rax movslq %eax, %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x99(%rbp) jge 0x10fd40 movslq -0x4c(%rbp), %rcx leaq 0x1a56cb(%rip), %rax # 0x2b53f0 movq (%rax,%rcx,8), %rax movq -0x70(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax cmpl $0x2, %eax sete %al movb %al, -0x99(%rbp) movb -0x99(%rbp), %al testb $0x1, %al jne 0x10fd4c jmp 0x10fd5a movq -0x70(%rbp), %rax addq $0x1, %rax movq %rax, -0x70(%rbp) jmp 0x10fcfb movq -0x70(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jl 0x10fd79 movq -0x70(%rbp), %rax movq %rax, -0x40(%rbp) cmpl $0x2, -0x4c(%rbp) jg 0x10fd9e movq -0x70(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jge 0x10fd9e movq -0x70(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jl 0x10fdba jmp 0x10fc4a cmpl $0x1, -0x4c(%rbp) jle 0x10fdc5 jmp 0x10ff07 movq -0x40(%rbp), %rax movq %rax, -0x68(%rbp) movl $0x1, %eax subl -0x4c(%rbp), %eax movl %eax, -0x4c(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x10ff07 cmpl $0xff, -0x34(%rbp) jne 0x10fefb movl $0x0, -0x74(%rbp) cmpl $0x50, -0x74(%rbp) jge 0x10fef9 movslq -0x74(%rbp), %rcx leaq 0x1a55fa(%rip), %rax # 0x2b5410 shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x80(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x88(%rbp) movl $0x0, -0x8c(%rbp) movq -0x80(%rbp), %rax movslq -0x8c(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x10fea6 movq -0x88(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jge 0x10fe81 movq -0x88(%rbp), %rax movsbl (%rax), %eax movq -0x80(%rbp), %rcx movslq -0x8c(%rbp), %rdx movsbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x10fe83 jmp 0x10fea6 movl -0x8c(%rbp), %eax addl $0x1, %eax movl %eax, -0x8c(%rbp) movq -0x88(%rbp), %rax addq $0x1, %rax movq %rax, -0x88(%rbp) jmp 0x10fe39 movq -0x80(%rbp), %rax movslq -0x8c(%rbp), %rcx cmpb $0x0, (%rax,%rcx) jne 0x10fee9 movslq -0x74(%rbp), %rcx leaq 0x1a554e(%rip), %rax # 0x2b5410 shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movslq -0x4c(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, -0x34(%rbp) movq -0x88(%rbp), %rax addq $-0x1, %rax movq %rax, -0x40(%rbp) jmp 0x10fef9 jmp 0x10feeb movl -0x74(%rbp), %eax addl $0x1, %eax movl %eax, -0x74(%rbp) jmp 0x10fe01 jmp 0x10fefb movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) cmpl $0x0, -0x5c(%rbp) je 0x10ff34 movq -0x58(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x10ff32 movl -0x34(%rbp), %eax movb %al, %dl movq -0x10(%rbp), %rax movq -0x58(%rbp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, -0x58(%rbp) movb %dl, (%rax,%rcx) jmp 0x10ff34 jmp 0x10ff36 cmpl $0x0, -0x34(%rbp) jne 0x10fc3a movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x10ff79 movq -0x18(%rbp), %rax cmpq -0x58(%rbp), %rax jbe 0x10ff79 movq -0x10(%rbp), %rdi addq -0x58(%rbp), %rdi movq -0x18(%rbp), %rdx subq -0x58(%rbp), %rdx movl $0x20, %esi callq 0x2a2c0 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strnxfrm_czech: push rbp mov rbp, rsp sub rsp, 0A0h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov [rbp+var_4C], 0 mov [rbp+var_58], 0 mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_28] mov [rbp+var_48], rax mov eax, [rbp+arg_0] and eax, 0Fh cmp eax, 0 jnz short loc_10FC38 mov eax, [rbp+arg_0] or eax, 0Fh mov [rbp+arg_0], eax loc_10FC38: jmp short $+2 loc_10FC3A: mov ecx, [rbp+var_4C] mov eax, 1 shl eax, cl and eax, [rbp+arg_0] mov [rbp+var_5C], eax loc_10FC4A: mov rax, [rbp+var_40] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jl short loc_10FCAD mov [rbp+var_34], 0 cmp [rbp+var_4C], 3 jz short loc_10FCA8 mov eax, [rbp+var_4C] mov ecx, eax add ecx, 1 mov [rbp+var_4C], ecx cmp eax, 0 jnz short loc_10FC8B mov rax, [rbp+var_48] mov [rbp+var_98], rax jmp short loc_10FC96 loc_10FC8B: mov rax, [rbp+var_28] mov [rbp+var_98], rax loc_10FC96: mov rax, [rbp+var_98] mov [rbp+var_40], rax mov [rbp+var_34], 1 loc_10FCA8: jmp loc_10FF07 loc_10FCAD: movsxd rcx, [rbp+var_4C] lea rax, CZ_SORT_TABLE mov rax, [rax+rcx*8] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov [rbp+var_34], eax cmp [rbp+var_34], 0 jnz short loc_10FCE1 mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp loc_10FC4A loc_10FCE1: cmp [rbp+var_34], 2 jnz loc_10FDED mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax mov [rbp+var_70], rax loc_10FCFB: mov rcx, [rbp+var_70] mov rax, [rbp+var_28] sub rcx, rax mov rax, [rbp+var_30] movsxd rdx, eax xor eax, eax cmp rcx, rdx mov [rbp+var_99], al jge short loc_10FD40 movsxd rcx, [rbp+var_4C] lea rax, CZ_SORT_TABLE mov rax, [rax+rcx*8] mov rcx, [rbp+var_70] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] cmp eax, 2 setz al mov [rbp+var_99], al loc_10FD40: mov al, [rbp+var_99] test al, 1 jnz short loc_10FD4C jmp short loc_10FD5A loc_10FD4C: mov rax, [rbp+var_70] add rax, 1 mov [rbp+var_70], rax jmp short loc_10FCFB loc_10FD5A: mov rax, [rbp+var_70] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jl short loc_10FD79 mov rax, [rbp+var_70] mov [rbp+var_40], rax loc_10FD79: cmp [rbp+var_4C], 2 jg short loc_10FD9E mov rax, [rbp+var_70] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jge short loc_10FD9E mov rax, [rbp+var_70] mov [rbp+var_40], rax loc_10FD9E: mov rax, [rbp+var_40] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jl short loc_10FDBA jmp loc_10FC4A loc_10FDBA: cmp [rbp+var_4C], 1 jle short loc_10FDC5 jmp loc_10FF07 loc_10FDC5: mov rax, [rbp+var_40] mov [rbp+var_68], rax mov eax, 1 sub eax, [rbp+var_4C] mov [rbp+var_4C], eax mov rax, [rbp+var_48] mov [rbp+var_40], rax mov rax, [rbp+var_68] mov [rbp+var_48], rax jmp loc_10FF07 loc_10FDED: cmp [rbp+var_34], 0FFh jnz loc_10FEFB mov [rbp+var_74], 0 loc_10FE01: cmp [rbp+var_74], 50h ; 'P' jge loc_10FEF9 movsxd rcx, [rbp+var_74] lea rax, doubles shl rcx, 4 add rax, rcx mov rax, [rax] mov [rbp+var_80], rax mov rax, [rbp+var_40] mov [rbp+var_88], rax mov [rbp+var_8C], 0 loc_10FE39: mov rax, [rbp+var_80] movsxd rcx, [rbp+var_8C] cmp byte ptr [rax+rcx], 0 jz short loc_10FEA6 mov rax, [rbp+var_88] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jge short loc_10FE81 mov rax, [rbp+var_88] movsx eax, byte ptr [rax] mov rcx, [rbp+var_80] movsxd rdx, [rbp+var_8C] movsx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_10FE83 loc_10FE81: jmp short loc_10FEA6 loc_10FE83: mov eax, [rbp+var_8C] add eax, 1 mov [rbp+var_8C], eax mov rax, [rbp+var_88] add rax, 1 mov [rbp+var_88], rax jmp short loc_10FE39 loc_10FEA6: mov rax, [rbp+var_80] movsxd rcx, [rbp+var_8C] cmp byte ptr [rax+rcx], 0 jnz short loc_10FEE9 movsxd rcx, [rbp+var_74] lea rax, doubles shl rcx, 4 add rax, rcx mov rax, [rax+8] movsxd rcx, [rbp+var_4C] movzx eax, byte ptr [rax+rcx] mov [rbp+var_34], eax mov rax, [rbp+var_88] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rax jmp short loc_10FEF9 loc_10FEE9: jmp short $+2 loc_10FEEB: mov eax, [rbp+var_74] add eax, 1 mov [rbp+var_74], eax jmp loc_10FE01 loc_10FEF9: jmp short $+2 loc_10FEFB: mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax loc_10FF07: cmp [rbp+var_5C], 0 jz short loc_10FF34 mov rax, [rbp+var_58] cmp rax, [rbp+var_18] jnb short loc_10FF32 mov eax, [rbp+var_34] mov dl, al mov rax, [rbp+var_10] mov rcx, [rbp+var_58] mov rsi, rcx add rsi, 1 mov [rbp+var_58], rsi mov [rax+rcx], dl loc_10FF32: jmp short $+2 loc_10FF34: jmp short $+2 loc_10FF36: cmp [rbp+var_34], 0 jnz loc_10FC3A mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_10FF79 mov rax, [rbp+var_18] cmp rax, [rbp+var_58] jbe short loc_10FF79 mov rdi, [rbp+var_10] add rdi, [rbp+var_58] mov rdx, [rbp+var_18] sub rdx, [rbp+var_58] mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov [rbp+var_58], rax loc_10FF79: mov rax, [rbp+var_58] add rsp, 0A0h pop rbp retn
unsigned long long my_strnxfrm_czech( long long a1, long long a2, unsigned long long a3, long long a4, char *a5, int a6, int a7) { long long v8; // rcx long long v9; // rcx bool v11; // [rsp+7h] [rbp-99h] char *v12; // [rsp+8h] [rbp-98h] int k; // [rsp+14h] [rbp-8Ch] char *v14; // [rsp+18h] [rbp-88h] long long v15; // [rsp+20h] [rbp-80h] int j; // [rsp+2Ch] [rbp-74h] unsigned __int8 *i; // [rsp+30h] [rbp-70h] char *v18; // [rsp+38h] [rbp-68h] int v19; // [rsp+44h] [rbp-5Ch] unsigned long long v20; // [rsp+48h] [rbp-58h] int v21; // [rsp+54h] [rbp-4Ch] char *v22; // [rsp+58h] [rbp-48h] char *v23; // [rsp+60h] [rbp-40h] int v24; // [rsp+6Ch] [rbp-34h] v21 = 0; v20 = 0LL; v23 = a5; v22 = a5; if ( (a7 & 0xF) == 0 ) a7 |= 0xFu; do { v19 = a7 & (1 << v21); while ( 1 ) { while ( 1 ) { if ( v23 - a5 >= a6 ) { v24 = 0; if ( v21 != 3 ) { if ( v21++ ) v12 = a5; else v12 = v22; v23 = v12; v24 = 1; } goto LABEL_40; } v8 = (unsigned __int8)*v23; v24 = *((unsigned __int8 *)*(&CZ_SORT_TABLE + v21) + v8); if ( *((_BYTE *)*(&CZ_SORT_TABLE + v21) + v8) ) break; ++v23; } if ( v24 != 2 ) break; for ( i = (unsigned __int8 *)++v23; ; ++i ) { v11 = 0; if ( i - (unsigned __int8 *)a5 < a6 ) v11 = *((_BYTE *)*(&CZ_SORT_TABLE + v21) + *i) == 2; if ( !v11 ) break; } if ( i - (unsigned __int8 *)a5 >= a6 ) v23 = (char *)i; if ( v21 <= 2 && i - (unsigned __int8 *)a5 < a6 ) v23 = (char *)i; if ( v23 - a5 < a6 ) { if ( v21 <= 1 ) { v18 = v23; v21 = 1 - v21; v23 = v22; v22 = v18; } goto LABEL_40; } } if ( v24 == 255 ) { for ( j = 0; j < 80; ++j ) { v15 = (long long)*(&doubles + 2 * j); v14 = v23; for ( k = 0; *(_BYTE *)(v15 + k) && v14 - a5 < a6 && *v14 == *(char *)(v15 + k); ++k ) ++v14; if ( !*(_BYTE *)(v15 + k) ) { v24 = *((unsigned __int8 *)*(&doubles + 2 * j + 1) + v21); v23 = v14 - 1; break; } } } ++v23; LABEL_40: if ( v19 && v20 < a3 ) { v9 = v20++; *(_BYTE *)(a2 + v9) = v24; } } while ( v24 ); if ( (a7 & 0x80) != 0 && a3 > v20 ) { memset(v20 + a2, 32LL, a3 - v20); return a3; } return v20; }
20,874
my_strnxfrm_czech
eloqsql/strings/ctype-czech.c
static size_t my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, size_t len, uint nweights_arg __attribute__((unused)), const uchar *src, size_t srclen, uint flags) { int value; const uchar *p, * store; int pass = 0; size_t totlen = 0; p = src; store = src; if (!(flags & 0x0F)) /* All levels by default */ flags|= 0x0F; do { int add= (1 << pass) & flags; /* If this level is needed */ NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen); if (add) ADD_TO_RESULT(dest, len, totlen, value); } while (value); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen) { memset(dest + totlen, ' ', len - totlen); totlen= len; } return totlen; }
O3
c
my_strnxfrm_czech: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r15 movq %rdx, %rbx movq %rsi, -0x48(%rbp) movl 0x10(%rbp), %eax movl %eax, %r11d orl $0xf, %r11d testb $0xf, %al cmovnel %eax, %r11d movslq %r9d, %rdx movl $0x1, %eax subq %r8, %rax movq %rax, -0x50(%rbp) xorl %ecx, %ecx leaq 0x2ce140(%rip), %r13 # 0x37c310 movq %r8, %r14 xorl %r12d, %r12d movq %rbx, -0x38(%rbp) movl %r11d, -0x2c(%rbp) movl $0x1, %esi shll %cl, %esi movq %r8, %rax subq %r15, %rax cmpq %rdx, %rax jge 0xae26f movslq %ecx, %rax movq %rax, -0x58(%rbp) movq (%r13,%rax,8), %r9 movzbl (%r8), %eax movzbl (%r9,%rax), %eax testl %eax, %eax je 0xae23e cmpl $0x2, %eax jne 0xae2a3 incq %r8 movq %r8, %rax subq %r15, %rax movq %r8, %r10 cmpq %rdx, %rax jge 0xae24c movzbl (%r10), %edi cmpb $0x2, (%r9,%rdi) jne 0xae24c incq %r10 incq %rax movq %r10, %rdi cmpq %rdx, %rax jl 0xae223 jmp 0xae24f incq %r8 movq %r8, %rax subq %r15, %rax movq %r8, %r10 jmp 0xae268 movq %r8, %rdi cmpl $0x3, %ecx cmovgeq %rdi, %r10 movq %r10, %rax subq %r15, %rax cmpq %rdx, %rax jl 0xae324 movq %r10, %r8 cmpq %rdx, %rax jl 0xae1fc jmp 0xae272 movq %r8, %r10 cmpl $0x3, %ecx jne 0xae28a xorl %r9d, %r9d movl $0x3, %ecx movq %r14, %rax movq %r10, %r8 jmp 0xae37c testl %ecx, %ecx movq %r15, %r8 cmoveq %r14, %r8 incl %ecx movl $0x1, %r9d movq %r14, %rax jmp 0xae37c cmpl $0xff, %eax jne 0xae372 movq %r12, -0x40(%rbp) movq %r8, %r9 subq %r15, %r9 movq -0x50(%rbp), %rax addq %r8, %rax movq %rax, -0x60(%rbp) xorl %ebx, %ebx movq %rbx, %r11 shlq $0x4, %r11 leaq 0x2ce05d(%rip), %rax # 0x37c330 movq (%r11,%rax), %r13 movb (%r13), %al testb %al, %al je 0xae310 cmpq %rdx, %r9 jge 0xae310 incq %r13 movq -0x60(%rbp), %r10 movq %r8, %r12 cmpb %al, (%r12) jne 0xae317 incq %r12 movb (%r13), %al testb %al, %al je 0xae313 incq %r13 leaq 0x1(%r10), %rdi cmpq %rdx, %r10 movq %rdi, %r10 jl 0xae2ee jmp 0xae313 movq %r8, %r12 testb %al, %al je 0xae344 incq %rbx cmpq $0x50, %rbx jne 0xae2c5 movb $-0x1, %al jmp 0xae35f movl $0x2, %r9d cmpl $0x1, %ecx jg 0xae27f movl $0x1, %edi subl %ecx, %edi movq %r10, %rax movl %edi, %ecx movq %r14, %r8 jmp 0xae37c leaq 0x2cdfe5(%rip), %rax # 0x37c330 addq %rax, %r11 movq 0x8(%r11), %rax movq -0x58(%rbp), %rdi movb (%rax,%rdi), %al decq %r12 movq %r12, %r8 movq -0x38(%rbp), %rbx movl -0x2c(%rbp), %r11d movq -0x40(%rbp), %r12 leaq 0x2cdf9e(%rip), %r13 # 0x37c310 movzbl %al, %r9d incq %r8 movq %r14, %rax testl %r11d, %esi setne %r10b cmpq %rbx, %r12 setb %dil andb %r10b, %dil cmpb $0x1, %dil jne 0xae39e movq -0x48(%rbp), %rsi movb %r9b, (%rsi,%r12) incq %r12 movq %rax, %r14 testl %r9d, %r9d jne 0xae1de testb %r11b, %r11b sets %al movq %rbx, %rdx subq %r12, %rdx seta %cl andb %al, %cl cmpb $0x1, %cl jne 0xae3d3 movq -0x48(%rbp), %rdi addq %r12, %rdi movl $0x20, %esi callq 0x292c0 jmp 0xae3d6 movq %r12, %rbx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_czech: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, r8 mov rbx, rdx mov [rbp+var_48], rsi mov eax, [rbp+arg_0] mov r11d, eax or r11d, 0Fh test al, 0Fh cmovnz r11d, eax movsxd rdx, r9d mov eax, 1 sub rax, r8 mov [rbp+var_50], rax xor ecx, ecx lea r13, CZ_SORT_TABLE mov r14, r8 xor r12d, r12d mov [rbp+var_38], rbx mov [rbp+var_2C], r11d loc_AE1DE: mov esi, 1 shl esi, cl mov rax, r8 sub rax, r15 cmp rax, rdx jge short loc_AE26F movsxd rax, ecx mov [rbp+var_58], rax mov r9, [r13+rax*8+0] loc_AE1FC: movzx eax, byte ptr [r8] movzx eax, byte ptr [r9+rax] test eax, eax jz short loc_AE23E cmp eax, 2 jnz loc_AE2A3 inc r8 mov rax, r8 sub rax, r15 mov r10, r8 cmp rax, rdx jge short loc_AE24C loc_AE223: movzx edi, byte ptr [r10] cmp byte ptr [r9+rdi], 2 jnz short loc_AE24C inc r10 inc rax mov rdi, r10 cmp rax, rdx jl short loc_AE223 jmp short loc_AE24F loc_AE23E: inc r8 mov rax, r8 sub rax, r15 mov r10, r8 jmp short loc_AE268 loc_AE24C: mov rdi, r8 loc_AE24F: cmp ecx, 3 cmovge r10, rdi mov rax, r10 sub rax, r15 cmp rax, rdx jl loc_AE324 mov r8, r10 loc_AE268: cmp rax, rdx jl short loc_AE1FC jmp short loc_AE272 loc_AE26F: mov r10, r8 loc_AE272: cmp ecx, 3 jnz short loc_AE28A xor r9d, r9d mov ecx, 3 loc_AE27F: mov rax, r14 mov r8, r10 jmp loc_AE37C loc_AE28A: test ecx, ecx mov r8, r15 cmovz r8, r14 inc ecx mov r9d, 1 mov rax, r14 jmp loc_AE37C loc_AE2A3: cmp eax, 0FFh jnz loc_AE372 mov [rbp+var_40], r12 mov r9, r8 sub r9, r15 mov rax, [rbp+var_50] add rax, r8 mov [rbp+var_60], rax xor ebx, ebx loc_AE2C5: mov r11, rbx shl r11, 4 lea rax, doubles mov r13, [r11+rax] mov al, [r13+0] test al, al jz short loc_AE310 cmp r9, rdx jge short loc_AE310 inc r13 mov r10, [rbp+var_60] mov r12, r8 loc_AE2EE: cmp [r12], al jnz short loc_AE317 inc r12 mov al, [r13+0] test al, al jz short loc_AE313 inc r13 lea rdi, [r10+1] cmp r10, rdx mov r10, rdi jl short loc_AE2EE jmp short loc_AE313 loc_AE310: mov r12, r8 loc_AE313: test al, al jz short loc_AE344 loc_AE317: inc rbx cmp rbx, 50h ; 'P' jnz short loc_AE2C5 mov al, 0FFh jmp short loc_AE35F loc_AE324: mov r9d, 2 cmp ecx, 1 jg loc_AE27F mov edi, 1 sub edi, ecx mov rax, r10 mov ecx, edi mov r8, r14 jmp short loc_AE37C loc_AE344: lea rax, doubles add r11, rax mov rax, [r11+8] mov rdi, [rbp+var_58] mov al, [rax+rdi] dec r12 mov r8, r12 loc_AE35F: mov rbx, [rbp+var_38] mov r11d, [rbp+var_2C] mov r12, [rbp+var_40] lea r13, CZ_SORT_TABLE loc_AE372: movzx r9d, al inc r8 mov rax, r14 loc_AE37C: test esi, r11d setnz r10b cmp r12, rbx setb dil and dil, r10b cmp dil, 1 jnz short loc_AE39E mov rsi, [rbp+var_48] mov [rsi+r12], r9b inc r12 loc_AE39E: mov r14, rax test r9d, r9d jnz loc_AE1DE test r11b, r11b sets al mov rdx, rbx sub rdx, r12 setnbe cl and cl, al cmp cl, 1 jnz short loc_AE3D3 mov rdi, [rbp+var_48] add rdi, r12 mov esi, 20h ; ' ' call _memset jmp short loc_AE3D6 loc_AE3D3: mov rbx, r12 loc_AE3D6: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_czech( long long a1, long long a2, unsigned long long a3, long long a4, unsigned __int8 *a5, int a6, int a7) { unsigned __int8 *v7; // r15 int v9; // r11d long long v10; // rdx int v11; // ecx unsigned __int8 *v12; // r14 unsigned long long v13; // r12 int v14; // esi long long v15; // r9 int v16; // eax unsigned __int8 *v17; // r8 long long v18; // rax unsigned __int8 *v19; // r10 unsigned __int8 *v20; // rdi unsigned __int8 *v21; // rax int v22; // r9d unsigned __int8 *v23; // rax long long v24; // rbx char *v25; // r13 char v26; // al char *v27; // r13 unsigned __int8 *v28; // r10 _BYTE *v29; // r12 long long v32; // [rsp+10h] [rbp-50h] unsigned long long v34; // [rsp+20h] [rbp-40h] unsigned long long v35; // [rsp+28h] [rbp-38h] int v36; // [rsp+34h] [rbp-2Ch] v7 = a5; v9 = a7 | 0xF; if ( (a7 & 0xF) != 0 ) v9 = a7; v10 = a6; v32 = 1LL - (_QWORD)a5; v11 = 0; v12 = a5; v13 = 0LL; v35 = a3; v36 = v9; do { v14 = 1 << v11; if ( a5 - v7 >= v10 ) { v19 = a5; LABEL_21: if ( v11 != 3 ) { a5 = v7; if ( !v11 ) a5 = v12; ++v11; v22 = 1; v23 = v12; goto LABEL_45; } v22 = 0; v11 = 3; LABEL_23: v23 = v12; a5 = v19; goto LABEL_45; } v15 = (long long)*(&CZ_SORT_TABLE + v11); while ( 1 ) { v16 = *(unsigned __int8 *)(v15 + *a5); if ( !*(_BYTE *)(v15 + *a5) ) { v21 = (unsigned __int8 *)(++a5 - v7); v19 = a5; goto LABEL_18; } if ( v16 != 2 ) break; v17 = a5 + 1; v18 = v17 - v7; v19 = v17; if ( v17 - v7 < v10 ) { while ( *(_BYTE *)(v15 + *v19) == 2 ) { ++v19; ++v18; v20 = v19; if ( v18 >= v10 ) goto LABEL_14; } } v20 = v17; LABEL_14: if ( v11 >= 3 ) v19 = v20; v21 = (unsigned __int8 *)(v19 - v7); if ( v19 - v7 < v10 ) { v22 = 2; if ( v11 <= 1 ) { v23 = v19; v11 = 1 - v11; a5 = v12; goto LABEL_45; } goto LABEL_23; } a5 = v19; LABEL_18: if ( (long long)v21 >= v10 ) goto LABEL_21; } if ( v16 != 255 ) goto LABEL_44; v34 = v13; v24 = 0LL; while ( 2 ) { v25 = (char *)*(&doubles + 2 * v24); v26 = *v25; if ( *v25 && a5 - v7 < v10 ) { v27 = v25 + 1; v28 = &a5[v32]; v29 = a5; while ( *v29 == v26 ) { ++v29; v26 = *v27; if ( *v27 ) { ++v27; if ( (long long)v28++ < v10 ) continue; } goto LABEL_37; } goto LABEL_38; } v29 = a5; LABEL_37: if ( v26 ) { LABEL_38: if ( ++v24 == 80 ) { LOBYTE(v16) = -1; goto LABEL_43; } continue; } break; } LOBYTE(v16) = *((_BYTE *)*(&doubles + 2 * v24 + 1) + v11); a5 = v29 - 1; LABEL_43: a3 = v35; v9 = v36; v13 = v34; LABEL_44: v22 = (unsigned __int8)v16; ++a5; v23 = v12; LABEL_45: if ( (v9 & v14) != 0 && v13 < a3 ) *(_BYTE *)(a2 + v13++) = v22; v12 = v23; } while ( v22 ); if ( (v9 & 0x80u) == 0 || a3 <= v13 ) return v13; memset(v13 + a2, 32LL, a3 - v13); return a3; }
my_strnxfrm_czech: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,R8 MOV RBX,RDX MOV qword ptr [RBP + -0x48],RSI MOV EAX,dword ptr [RBP + 0x10] MOV R11D,EAX OR R11D,0xf TEST AL,0xf CMOVNZ R11D,EAX MOVSXD RDX,R9D MOV EAX,0x1 SUB RAX,R8 MOV qword ptr [RBP + -0x50],RAX XOR ECX,ECX LEA R13,[0x47c310] MOV R14,R8 XOR R12D,R12D MOV qword ptr [RBP + -0x38],RBX MOV dword ptr [RBP + -0x2c],R11D LAB_001ae1de: MOV ESI,0x1 SHL ESI,CL MOV RAX,R8 SUB RAX,R15 CMP RAX,RDX JGE 0x001ae26f MOVSXD RAX,ECX MOV qword ptr [RBP + -0x58],RAX MOV R9,qword ptr [R13 + RAX*0x8] LAB_001ae1fc: MOVZX EAX,byte ptr [R8] MOVZX EAX,byte ptr [R9 + RAX*0x1] TEST EAX,EAX JZ 0x001ae23e CMP EAX,0x2 JNZ 0x001ae2a3 INC R8 MOV RAX,R8 SUB RAX,R15 MOV R10,R8 CMP RAX,RDX JGE 0x001ae24c LAB_001ae223: MOVZX EDI,byte ptr [R10] CMP byte ptr [R9 + RDI*0x1],0x2 JNZ 0x001ae24c INC R10 INC RAX MOV RDI,R10 CMP RAX,RDX JL 0x001ae223 JMP 0x001ae24f LAB_001ae23e: INC R8 MOV RAX,R8 SUB RAX,R15 MOV R10,R8 JMP 0x001ae268 LAB_001ae24c: MOV RDI,R8 LAB_001ae24f: CMP ECX,0x3 CMOVGE R10,RDI MOV RAX,R10 SUB RAX,R15 CMP RAX,RDX JL 0x001ae324 MOV R8,R10 LAB_001ae268: CMP RAX,RDX JL 0x001ae1fc JMP 0x001ae272 LAB_001ae26f: MOV R10,R8 LAB_001ae272: CMP ECX,0x3 JNZ 0x001ae28a XOR R9D,R9D MOV ECX,0x3 LAB_001ae27f: MOV RAX,R14 MOV R8,R10 JMP 0x001ae37c LAB_001ae28a: TEST ECX,ECX MOV R8,R15 CMOVZ R8,R14 INC ECX MOV R9D,0x1 MOV RAX,R14 JMP 0x001ae37c LAB_001ae2a3: CMP EAX,0xff JNZ 0x001ae372 MOV qword ptr [RBP + -0x40],R12 MOV R9,R8 SUB R9,R15 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,R8 MOV qword ptr [RBP + -0x60],RAX XOR EBX,EBX LAB_001ae2c5: MOV R11,RBX SHL R11,0x4 LEA RAX,[0x47c330] MOV R13,qword ptr [R11 + RAX*0x1] MOV AL,byte ptr [R13] TEST AL,AL JZ 0x001ae310 CMP R9,RDX JGE 0x001ae310 INC R13 MOV R10,qword ptr [RBP + -0x60] MOV R12,R8 LAB_001ae2ee: CMP byte ptr [R12],AL JNZ 0x001ae317 INC R12 MOV AL,byte ptr [R13] TEST AL,AL JZ 0x001ae313 INC R13 LEA RDI,[R10 + 0x1] CMP R10,RDX MOV R10,RDI JL 0x001ae2ee JMP 0x001ae313 LAB_001ae310: MOV R12,R8 LAB_001ae313: TEST AL,AL JZ 0x001ae344 LAB_001ae317: INC RBX CMP RBX,0x50 JNZ 0x001ae2c5 MOV AL,0xff JMP 0x001ae35f LAB_001ae324: MOV R9D,0x2 CMP ECX,0x1 JG 0x001ae27f MOV EDI,0x1 SUB EDI,ECX MOV RAX,R10 MOV ECX,EDI MOV R8,R14 JMP 0x001ae37c LAB_001ae344: LEA RAX,[0x47c330] ADD R11,RAX MOV RAX,qword ptr [R11 + 0x8] MOV RDI,qword ptr [RBP + -0x58] MOV AL,byte ptr [RAX + RDI*0x1] DEC R12 MOV R8,R12 LAB_001ae35f: MOV RBX,qword ptr [RBP + -0x38] MOV R11D,dword ptr [RBP + -0x2c] MOV R12,qword ptr [RBP + -0x40] LEA R13,[0x47c310] LAB_001ae372: MOVZX R9D,AL INC R8 MOV RAX,R14 LAB_001ae37c: TEST ESI,R11D SETNZ R10B CMP R12,RBX SETC DIL AND DIL,R10B CMP DIL,0x1 JNZ 0x001ae39e MOV RSI,qword ptr [RBP + -0x48] MOV byte ptr [RSI + R12*0x1],R9B INC R12 LAB_001ae39e: MOV R14,RAX TEST R9D,R9D JNZ 0x001ae1de TEST R11B,R11B SETS AL MOV RDX,RBX SUB RDX,R12 SETA CL AND CL,AL CMP CL,0x1 JNZ 0x001ae3d3 MOV RDI,qword ptr [RBP + -0x48] ADD RDI,R12 MOV ESI,0x20 CALL 0x001292c0 JMP 0x001ae3d6 LAB_001ae3d3: MOV RBX,R12 LAB_001ae3d6: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_czech(int8 param_1,long param_2,ulong param_3,int8 param_4, byte *param_5,int param_6,uint param_7) { uint uVar1; byte *pbVar2; byte *pbVar3; byte bVar4; char cVar5; long lVar6; byte *pbVar7; byte bVar8; int iVar9; long lVar10; byte *pbVar11; byte *pbVar12; byte *pbVar13; ulong uVar14; byte *pbVar15; uVar1 = param_7 | 0xf; if ((param_7 & 0xf) != 0) { uVar1 = param_7; } lVar10 = (long)param_6; iVar9 = 0; uVar14 = 0; pbVar13 = param_5; pbVar15 = param_5; LAB_001ae1de: bVar8 = (byte)iVar9; pbVar7 = pbVar15; if ((long)pbVar13 - (long)param_5 < lVar10) { do { cVar5 = (&CZ_SORT_TABLE)[iVar9][*pbVar13]; if (cVar5 == '\0') { pbVar13 = pbVar13 + 1; lVar6 = (long)pbVar13 - (long)param_5; } else { if (cVar5 != '\x02') { if (cVar5 != -1) goto LAB_001ae372; lVar6 = 0; goto LAB_001ae2c5; } pbVar12 = pbVar13 + 1; lVar6 = (long)pbVar12 - (long)param_5; pbVar13 = pbVar12; while ((pbVar11 = pbVar13, lVar6 < lVar10 && (pbVar11 = pbVar12, (&CZ_SORT_TABLE)[iVar9][*pbVar13] == '\x02'))) { pbVar13 = pbVar13 + 1; lVar6 = lVar6 + 1; } if (2 < iVar9) { pbVar13 = pbVar11; } lVar6 = (long)pbVar13 - (long)param_5; if (lVar6 < lVar10) { cVar5 = '\x02'; if (iVar9 < 2) { iVar9 = 1 - iVar9; pbVar7 = pbVar13; pbVar13 = pbVar15; } goto LAB_001ae37c; } } } while (lVar6 < lVar10); } if (iVar9 == 3) { cVar5 = '\0'; iVar9 = 3; } else { pbVar13 = param_5; if (iVar9 == 0) { pbVar13 = pbVar15; } iVar9 = iVar9 + 1; cVar5 = '\x01'; } goto LAB_001ae37c; LAB_001ae2c5: do { pbVar15 = (&doubles)[lVar6 * 2]; bVar4 = *pbVar15; pbVar12 = pbVar13; pbVar3 = pbVar13 + (1 - (long)param_5); pbVar11 = pbVar13 + -(long)param_5; if (bVar4 != 0) { while (pbVar2 = pbVar3, (long)pbVar11 < lVar10) { pbVar15 = pbVar15 + 1; if (*pbVar12 != bVar4) goto LAB_001ae317; pbVar12 = pbVar12 + 1; bVar4 = *pbVar15; if (bVar4 == 0) break; pbVar3 = pbVar2 + 1; pbVar11 = pbVar2; } } if (bVar4 == 0) { cVar5 = (&PTR_DAT_0047c338)[lVar6 * 2][iVar9]; pbVar13 = pbVar12 + -1; goto LAB_001ae372; } LAB_001ae317: lVar6 = lVar6 + 1; } while (lVar6 != 0x50); cVar5 = -1; LAB_001ae372: pbVar13 = pbVar13 + 1; LAB_001ae37c: if (uVar14 < param_3 && (1 << (bVar8 & 0x1f) & uVar1) != 0) { *(char *)(param_2 + uVar14) = cVar5; uVar14 = uVar14 + 1; } pbVar15 = pbVar7; if (cVar5 == '\0') { if ((uVar14 <= param_3 && param_3 - uVar14 != 0) && (char)uVar1 < '\0') { memset((void *)(param_2 + uVar14),0x20,param_3 - uVar14); uVar14 = param_3; } return uVar14; } goto LAB_001ae1de; }
20,875
minja::Value::for_each(std::function<void (minja::Value&)> const&) const
monkey531[P]llama/common/minja.hpp
void for_each(const std::function<void(Value &)> & callback) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (auto& item : *array_) { callback(item); } } else if (object_) { for (auto & item : *object_) { Value key(item.first); callback(key); } } else if (is_string()) { for (char c : primitive_.get<std::string>()) { auto val = Value(std::string(1, c)); callback(val); } } else { throw std::runtime_error("Value is not iterable: " + dump()); } }
O2
cpp
minja::Value::for_each(std::function<void (minja::Value&)> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %rbx movq %rdi, %r14 callq 0x634ea testb %al, %al jne 0x6d71e movq 0x10(%r14), %rax testq %rax, %rax je 0x6d642 movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x6d70c movq %rbx, %rdi movq %r14, %rsi callq 0x6d85c addq $0x50, %r14 jmp 0x6d628 movq 0x20(%r14), %rax testq %rax, %rax je 0x6d684 movq (%rax), %r14 movq 0x8(%rax), %r12 leaq 0x48(%rsp), %r15 cmpq %r12, %r14 je 0x6d70c movq %r15, %rdi movq %r14, %rsi callq 0x67518 movq %rbx, %rdi movq %r15, %rsi callq 0x6d85c movq %r15, %rdi callq 0x62d12 addq $0x60, %r14 jmp 0x6d657 cmpb $0x3, 0x40(%r14) jne 0x6d74e addq $0x40, %r14 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x63bca movq (%r15), %r13 movq 0x8(%r15), %rbp xorl %r15d, %r15d leaq 0x28(%rsp), %r14 leaq 0x48(%rsp), %r12 cmpq %r15, %rbp je 0x6d702 movsbl (%r13,%r15), %edx leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq %r14, %rdi pushq $0x1 popq %rsi callq 0x23a50 movq %r12, %rdi movq %r14, %rsi callq 0x65cf0 movq %r14, %rdi callq 0x24208 movq %rbx, %rdi movq %r12, %rsi callq 0x6d85c movq %r12, %rdi callq 0x62d12 incq %r15 jmp 0x6d6b7 leaq 0x8(%rsp), %rdi callq 0x24208 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x465aa(%rip), %rsi # 0xb3cda movq %rax, %rdi callq 0x23340 movq 0x908b1(%rip), %rsi # 0xfdff0 movq 0x90812(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62f00 leaq 0x46f58(%rip), %rsi # 0xb46ca leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x58626 movb $0x1, %bpl leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x23e60 xorl %ebp, %ebp movq 0x90856(%rip), %rsi # 0xfdff0 movq 0x907b7(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x24208 jmp 0x6d7be movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x6d7d4 jmp 0x6d818 jmp 0x6d7d1 movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 jmp 0x6d818 movq %rax, %r14 jmp 0x6d7ff movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x24208 jmp 0x6d7ff movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x62d12 leaq 0x8(%rsp), %rdi callq 0x24208 jmp 0x6d818 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x62d12 movq %r14, %rdi callq 0x23fd0
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rsi mov r14, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz loc_6D71E mov rax, [r14+10h] test rax, rax jz short loc_6D642 mov r14, [rax] mov r15, [rax+8] loc_6D628: cmp r14, r15 jz loc_6D70C mov rdi, rbx mov rsi, r14 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) add r14, 50h ; 'P' jmp short loc_6D628 loc_6D642: mov rax, [r14+20h] test rax, rax jz short loc_6D684 mov r14, [rax] mov r12, [rax+8] lea r15, [rsp+0C8h+var_80] loc_6D657: cmp r14, r12 jz loc_6D70C mov rdi, r15 mov rsi, r14 call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, rbx mov rsi, r15 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r14, 60h ; '`' jmp short loc_6D657 loc_6D684: cmp byte ptr [r14+40h], 3 jnz loc_6D74E add r14, 40h ; '@' lea r15, [rsp+0C8h+var_C0] mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE mov r13, [r15] mov rbp, [r15+8] xor r15d, r15d lea r14, [rsp+0C8h+var_A0] lea r12, [rsp+0C8h+var_80] loc_6D6B7: cmp rbp, r15 jz short loc_6D702 movsx edx, byte ptr [r13+r15+0] lea rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_A0], rax mov rdi, r14 push 1 pop rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, r12 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r12 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() inc r15 jmp short loc_6D6B7 loc_6D702: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6D70C: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6D71E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6D74E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_C0] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotIter; "Value is not iterable: " lea rdi, [rsp+0C8h+var_80] lea rdx, [rsp+0C8h+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+0C8h+var_80] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+0C8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D7BE mov r14, rax mov bpl, 1 loc_6D7BE: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6D7D4 jmp short loc_6D818 jmp short $+2 loc_6D7D1: mov r14, rax loc_6D7D4: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_6D818 mov r14, rax jmp short loc_6D7FF mov r14, rax lea rdi, [rsp+0C8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D7FF mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6D7FF: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D818 mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6D818: mov rdi, r14 call __Unwind_Resume
void minja::Value::for_each(long long a1, long long a2) { long long *v2; // rax long long v3; // r14 long long v4; // r15 unsigned __int8 **v5; // rax unsigned __int8 *v6; // r14 unsigned __int8 *v7; // r12 long long v8; // r13 long long v9; // rbp long long i; // r15 long long v11; // rdx std::runtime_error *exception; // rbx void *v13; // rbx _QWORD v14[4]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-A0h] BYREF char v16; // [rsp+38h] [rbp-90h] BYREF _OWORD v17[8]; // [rsp+48h] [rbp-80h] BYREF if ( minja::Value::is_null((minja::Value *)a1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v2 = *(long long **)(a1 + 16); if ( v2 ) { v3 = *v2; v4 = v2[1]; while ( v3 != v4 ) { std::function<void ()(minja::Value &)>::operator()(a2, v3); v3 += 80LL; } } else { v5 = *(unsigned __int8 ***)(a1 + 32); if ( v5 ) { v6 = *v5; v7 = v5[1]; while ( v6 != v7 ) { minja::Value::Value(v17, v6); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); v6 += 96; } } else { if ( *(_BYTE *)(a1 + 64) != 3 ) { v13 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v17, (long long)"Value is not iterable: ", (long long)v14); std::runtime_error::runtime_error(v13, v17); __cxa_throw( v13, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v14, a1 + 64); v8 = v14[0]; v9 = v14[1]; for ( i = 0LL; v9 != i; ++i ) { v11 = (unsigned int)*(char *)(v8 + i); v15[0] = &v16; std::string::_M_construct(v15, 1LL, v11); minja::Value::Value((long long)v17, (long long)v15); std::string::~string(v15); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); } std::string::~string(v14); } } }
for_each: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RSI MOV R14,RDI CALL 0x001634ea TEST AL,AL JNZ 0x0016d71e MOV RAX,qword ptr [R14 + 0x10] TEST RAX,RAX JZ 0x0016d642 MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0016d628: CMP R14,R15 JZ 0x0016d70c MOV RDI,RBX MOV RSI,R14 CALL 0x0016d85c ADD R14,0x50 JMP 0x0016d628 LAB_0016d642: MOV RAX,qword ptr [R14 + 0x20] TEST RAX,RAX JZ 0x0016d684 MOV R14,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x48] LAB_0016d657: CMP R14,R12 JZ 0x0016d70c MOV RDI,R15 MOV RSI,R14 CALL 0x00167518 LAB_0016d66b: MOV RDI,RBX MOV RSI,R15 CALL 0x0016d85c LAB_0016d676: MOV RDI,R15 CALL 0x00162d12 ADD R14,0x60 JMP 0x0016d657 LAB_0016d684: CMP byte ptr [R14 + 0x40],0x3 JNZ 0x0016d74e ADD R14,0x40 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 CALL 0x00163bca MOV R13,qword ptr [R15] MOV RBP,qword ptr [R15 + 0x8] XOR R15D,R15D LEA R14,[RSP + 0x28] LEA R12,[RSP + 0x48] LAB_0016d6b7: CMP RBP,R15 JZ 0x0016d702 MOVSX EDX,byte ptr [R13 + R15*0x1] LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_0016d6cc: MOV RDI,R14 PUSH 0x1 POP RSI CALL 0x00123a50 LAB_0016d6d7: MOV RDI,R12 MOV RSI,R14 CALL 0x00165cf0 MOV RDI,R14 CALL 0x00124208 LAB_0016d6ea: MOV RDI,RBX MOV RSI,R12 CALL 0x0016d85c LAB_0016d6f5: MOV RDI,R12 CALL 0x00162d12 INC R15 JMP 0x0016d6b7 LAB_0016d702: LEA RDI,[RSP + 0x8] CALL 0x00124208 LAB_0016d70c: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016d71e: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0016d729: LEA RSI,[0x1b3cda] MOV RDI,RAX CALL 0x00123340 LAB_0016d738: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30 LAB_0016d74e: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0016d759: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162f00 LAB_0016d76b: LEA RSI,[0x1b46ca] LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] CALL 0x00158626 MOV BPL,0x1 LAB_0016d784: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00123e60 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */ void __thiscall minja::Value::for_each(Value *this,function *param_1) { int8 *puVar1; Value *pVVar2; basic_json *pbVar3; char cVar4; runtime_error *prVar5; Value *pVVar6; basic_json *pbVar7; long lVar8; string local_c0 [8]; long local_b8; int1 *local_a0 [2]; int1 local_90 [16]; Value local_80 [80]; cVar4 = is_null(this); if (cVar4 != '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d729 to 0016d737 has its CatchHandler @ 0016d7d1 */ std::runtime_error::runtime_error(prVar5,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } puVar1 = *(int8 **)(this + 0x10); if (puVar1 == (int8 *)0x0) { puVar1 = *(int8 **)(this + 0x20); if (puVar1 == (int8 *)0x0) { if (this[0x40] != (Value)0x3) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d759 to 0016d76a has its CatchHandler @ 0016d7cf */ dump_abi_cxx11_((int)local_c0,SUB81(this,0)); /* try { // try from 0016d76b to 0016d780 has its CatchHandler @ 0016d7b8 */ std::operator+((char *)local_80,(string *)"Value is not iterable: "); /* try { // try from 0016d784 to 0016d7a8 has its CatchHandler @ 0016d7a9 */ std::runtime_error::runtime_error(prVar5,(string *)local_80); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_c0,this + 0x40); for (lVar8 = 0; local_b8 != lVar8; lVar8 = lVar8 + 1) { local_a0[0] = local_90; /* try { // try from 0016d6cc to 0016d6d6 has its CatchHandler @ 0016d7de */ std::__cxx11::string::_M_construct((ulong)local_a0,'\x01'); /* try { // try from 0016d6d7 to 0016d6e1 has its CatchHandler @ 0016d7e3 */ Value(local_80,(string *)local_a0); std::__cxx11::string::~string((string *)local_a0); /* try { // try from 0016d6ea to 0016d6f4 has its CatchHandler @ 0016d7f2 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } std::__cxx11::string::~string(local_c0); } else { pbVar3 = (basic_json *)puVar1[1]; for (pbVar7 = (basic_json *)*puVar1; pbVar7 != pbVar3; pbVar7 = pbVar7 + 0x60) { Value(local_80,pbVar7); /* try { // try from 0016d66b to 0016d675 has its CatchHandler @ 0016d80b */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } } } else { pVVar2 = (Value *)puVar1[1]; for (pVVar6 = (Value *)*puVar1; pVVar6 != pVVar2; pVVar6 = pVVar6 + 0x50) { std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,pVVar6); } } return; }
20,876
free_sh
bluesky950520[P]quickjs/quickjs-libc.c
static void free_sh(JSRuntime *rt, JSOSSignalHandler *sh) { list_del(&sh->link); JS_FreeValueRT(rt, sh->func); js_free_rt(rt, sh); }
O2
c
free_sh: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movq 0x18(%rsi), %rsi movq 0x20(%rbx), %rdx callq 0x18031 movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x170cb
free_sh: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rax, [rsi] mov rcx, [rsi+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov rsi, [rsi+18h] mov rdx, [rbx+20h] call JS_FreeValueRT mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt
long long free_sh(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; JS_FreeValueRT(a1, a2[3], a2[4]); return js_free_rt(a1, a2); }
free_sh: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV RSI,qword ptr [RSI + 0x18] MOV RDX,qword ptr [RBX + 0x20] CALL 0x00118031 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001170cb
void free_sh(int8 param_1,long *param_2) { long lVar1; long *plVar2; lVar1 = *param_2; plVar2 = (long *)param_2[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_2 = 0; param_2[1] = 0; JS_FreeValueRT(param_1,param_2[3],param_2[4]); js_free_rt(param_1,param_2); return; }
20,877
free_sh
bluesky950520[P]quickjs/quickjs-libc.c
static void free_sh(JSRuntime *rt, JSOSSignalHandler *sh) { list_del(&sh->link); JS_FreeValueRT(rt, sh->func); js_free_rt(rt, sh); }
O3
c
free_sh: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movq 0x18(%rsi), %rsi movq 0x20(%rbx), %rdx callq 0x1e1f9 movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1d36c
free_sh: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rax, [rsi] mov rcx, [rsi+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov rsi, [rsi+18h] mov rdx, [rbx+20h] call JS_FreeValueRT mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt
long long free_sh(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; JS_FreeValueRT(a1, a2[3], a2[4]); return js_free_rt(a1, a2); }
free_sh: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV RSI,qword ptr [RSI + 0x18] MOV RDX,qword ptr [RBX + 0x20] CALL 0x0011e1f9 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0011d36c
void free_sh(int8 param_1,long *param_2) { long lVar1; long *plVar2; lVar1 = *param_2; plVar2 = (long *)param_2[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_2 = 0; param_2[1] = 0; JS_FreeValueRT(param_1,param_2[3],param_2[4]); js_free_rt(param_1,param_2); return; }
20,878
my_strxfrm_flag_normalize
eloqsql/strings/ctype-simple.c
uint my_strxfrm_flag_normalize(uint flags, uint maximum) { DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS); /* If levels are omitted, then 1-maximum is assumed*/ if (!(flags & MY_STRXFRM_LEVEL_ALL)) { static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F }; uint flag_pad= flags & (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); flags= def_level_flags[maximum] | flag_pad; } else { uint i; uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL; uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL; uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL; uint flag_pad= flags & (MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN); /* If any level number is greater than the maximum, it is treated as the maximum. */ for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++) { uint src_bit= 1 << i; if (flag_lev & src_bit) { uint dst_bit= 1 << MY_MIN(i, maximum); flags|= dst_bit; flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT; flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT; } } flags|= flag_pad; } return flags; }
O3
c
my_strxfrm_flag_normalize: movl %edi, %eax movl %edi, %edx andl $0x3f, %edx je 0x3d7a8 pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx decl %esi movl %eax, %r8d andl $0x3f00, %r8d # imm = 0x3F00 movl %eax, %r9d andl $0x3f0000, %r9d # imm = 0x3F0000 xorl %edi, %edi xorl %r10d, %r10d btl %r10d, %edx jae 0x3d793 cmpl %esi, %r10d movl %esi, %ecx cmovbl %r10d, %ecx movl $0x1, %r11d shll %cl, %r11d movl $0x100, %ebx # imm = 0x100 shll %cl, %ebx andl %r8d, %ebx movl $0x10000, %r14d # imm = 0x10000 shll %cl, %r14d addl %r11d, %ebx andl %r9d, %r14d addl %ebx, %r14d orl %r14d, %edi incl %r10d cmpl $0x6, %r10d jne 0x3d75c andl $0xc0, %eax orl %edi, %eax popq %rbx popq %r14 popq %rbp retq andl $0xc0, %eax movl %esi, %ecx leaq 0x16a88a(%rip), %rdx # 0x1a8040 orl (%rdx,%rcx,4), %eax retq
my_strxfrm_flag_normalize: mov eax, edi mov edx, edi and edx, 3Fh jz short loc_3D7A8 push rbp mov rbp, rsp push r14 push rbx dec esi mov r8d, eax and r8d, 3F00h mov r9d, eax and r9d, 3F0000h xor edi, edi xor r10d, r10d loc_3D75C: bt edx, r10d jnb short loc_3D793 cmp r10d, esi mov ecx, esi cmovb ecx, r10d mov r11d, 1 shl r11d, cl mov ebx, 100h shl ebx, cl and ebx, r8d mov r14d, 10000h shl r14d, cl add ebx, r11d and r14d, r9d add r14d, ebx or edi, r14d loc_3D793: inc r10d cmp r10d, 6 jnz short loc_3D75C and eax, 0C0h or eax, edi pop rbx pop r14 pop rbp retn loc_3D7A8: and eax, 0C0h mov ecx, esi lea rdx, my_strxfrm_flag_normalize_def_level_flags or eax, [rdx+rcx*4] retn
long long my_strxfrm_flag_normalize(int a1, int a2) { int v3; // edx unsigned int v4; // esi int v5; // r8d int v6; // edi unsigned int i; // r10d char v8; // cl v3 = a1 & 0x3F; if ( (a1 & 0x3F) == 0 ) return my_strxfrm_flag_normalize_def_level_flags[a2] | a1 & 0xC0u; v4 = a2 - 1; v5 = a1 & 0x3F00; v6 = 0; for ( i = 0; i != 6; ++i ) { if ( _bittest(&v3, i) ) { v8 = v4; if ( i < v4 ) v8 = i; v6 |= (1 << v8) + (v5 & (256 << v8)) + (a1 & 0x3F0000 & (0x10000 << v8)); } } return v6 | a1 & 0xC0u; }
my_strxfrm_flag_normalize: MOV EAX,EDI MOV EDX,EDI AND EDX,0x3f JZ 0x0013d7a8 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX DEC ESI MOV R8D,EAX AND R8D,0x3f00 MOV R9D,EAX AND R9D,0x3f0000 XOR EDI,EDI XOR R10D,R10D LAB_0013d75c: BT EDX,R10D JNC 0x0013d793 CMP R10D,ESI MOV ECX,ESI CMOVC ECX,R10D MOV R11D,0x1 SHL R11D,CL MOV EBX,0x100 SHL EBX,CL AND EBX,R8D MOV R14D,0x10000 SHL R14D,CL ADD EBX,R11D AND R14D,R9D ADD R14D,EBX OR EDI,R14D LAB_0013d793: INC R10D CMP R10D,0x6 JNZ 0x0013d75c AND EAX,0xc0 OR EAX,EDI POP RBX POP R14 POP RBP RET LAB_0013d7a8: AND EAX,0xc0 MOV ECX,ESI LEA RDX,[0x2a8040] OR EAX,dword ptr [RDX + RCX*0x4] RET
uint my_strxfrm_flag_normalize(uint param_1,uint param_2) { uint uVar1; byte bVar2; uint uVar3; uint uVar4; if ((param_1 & 0x3f) != 0) { uVar3 = 0; uVar4 = 0; do { if (((param_1 & 0x3f) >> (uVar4 & 0x1f) & 1) != 0) { uVar1 = param_2 - 1; if (uVar4 < param_2 - 1) { uVar1 = uVar4; } bVar2 = (byte)uVar1; uVar3 = uVar3 | (0x10000 << (bVar2 & 0x1f) & param_1 & 0x3f0000) + (0x100 << (bVar2 & 0x1f) & param_1 & 0x3f00) + (1 << (bVar2 & 0x1f)); } uVar4 = uVar4 + 1; } while (uVar4 != 6); return param_1 & 0xc0 | uVar3; } return param_1 & 0xc0 | *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4); }
20,879
String::append(char const*, unsigned long, charset_info_st const*)
eloqsql/sql/sql_string.cc
bool String::append(const char *s, size_t arg_length, CHARSET_INFO *cs) { if (!arg_length) return false; uint32 offset; if (needs_conversion((uint32)arg_length, cs, charset(), &offset)) { size_t add_length; if ((cs == &my_charset_bin) && offset) { DBUG_ASSERT(mbminlen() > offset); offset= mbminlen() - offset; // How many characters to pad add_length= arg_length + offset; if (realloc(str_length + add_length)) return TRUE; bzero((char*) Ptr + str_length, offset); memcpy(Ptr + str_length + offset, s, arg_length); str_length+= (uint32)add_length; return FALSE; } add_length= arg_length / cs->mbminlen * mbmaxlen(); uint dummy_errors; if (realloc_with_extra_if_needed(str_length + add_length)) return TRUE; str_length+= copy_and_convert(Ptr + str_length, (uint32)add_length, charset(), s, (uint32)arg_length, cs, &dummy_errors); return false; } return Binary_string::append(s, arg_length); }
O3
cpp
String::append(char const*, unsigned long, charset_info_st const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp testq %rdx, %rdx je 0x27237 movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rcx cmpq %r12, %rcx je 0x271e0 testq %rcx, %rcx je 0x271e0 cmpq 0x2d2ea4(%rip), %rcx # 0x2f9fa8 je 0x271e0 movq 0x10(%r12), %rax cmpq 0x10(%rcx), %rax je 0x271e0 cmpq 0x2d2e88(%rip), %r12 # 0x2f9fa8 je 0x2715e movl 0x98(%r12), %esi movq %r14, %rax xorl %edx, %edx divq %rsi movl 0x9c(%rcx), %ecx imulq %rax, %rcx leaq 0x8(%rbx), %rdi movl 0x10(%rbx), %esi movl 0x14(%rbx), %eax addq %rcx, %rsi cmpq %rax, %rsi jae 0x27200 movq (%rdi), %rax movb $0x0, (%rax,%rsi) jmp 0x27212 movl 0x98(%rcx), %r12d movl %r14d, %eax xorl %edx, %edx divl %r12d testl %edx, %edx je 0x271e0 subl %edx, %r12d leaq (%r12,%r14), %rax leaq 0x8(%rbx), %rdi movl 0x10(%rbx), %ecx movq %rax, -0x30(%rbp) movq %rcx, -0x38(%rbp) leaq (%rcx,%rax), %rsi incq %rsi callq 0x2666c movb $0x1, %r13b testb %al, %al jne 0x2723a movq -0x38(%rbp), %rcx addq -0x30(%rbp), %rcx movq 0x8(%rbx), %rax movb $0x0, (%rax,%rcx) movl 0x10(%rbx), %edi addq 0x8(%rbx), %rdi xorl %r13d, %r13d xorl %esi, %esi movq %r12, %rdx callq 0x241e0 movl 0x10(%rbx), %edi addq 0x8(%rbx), %rdi addq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x24290 movq -0x30(%rbp), %rax addl %eax, 0x10(%rbx) jmp 0x2723a addq $0x8, %rbx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x27d42 movq %rcx, %r13 callq 0x27da8 movq %r13, %rcx movb $0x1, %r13b testb %al, %al jne 0x2723a movl 0x10(%rbx), %edi addq 0x8(%rbx), %rdi movq (%rbx), %rdx leaq -0x3c(%rbp), %rax movq %rax, (%rsp) movl %ecx, %esi movq %r15, %rcx movl %r14d, %r8d movq %r12, %r9 callq 0x5dcbb addl %eax, 0x10(%rbx) xorl %r13d, %r13d movl %r13d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6String6appendEPKcmPK15charset_info_st: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h test rdx, rdx jz loc_27237 mov r12, rcx mov r14, rdx mov r15, rsi mov rbx, rdi mov rcx, [rdi] cmp rcx, r12 jz loc_271E0 test rcx, rcx jz loc_271E0 cmp rcx, cs:my_charset_bin_ptr jz loc_271E0 mov rax, [r12+10h] cmp rax, [rcx+10h] jz loc_271E0 cmp r12, cs:my_charset_bin_ptr jz short loc_2715E mov esi, [r12+98h] mov rax, r14 xor edx, edx div rsi mov ecx, [rcx+9Ch] imul rcx, rax lea rdi, [rbx+8]; this mov esi, [rbx+10h] mov eax, [rbx+14h] add rsi, rcx; unsigned __int64 cmp rsi, rax jnb loc_27200 mov rax, [rdi] mov byte ptr [rax+rsi], 0 jmp loc_27212 loc_2715E: mov r12d, [rcx+98h] mov eax, r14d xor edx, edx div r12d test edx, edx jz short loc_271E0 sub r12d, edx lea rax, [r12+r14] lea rdi, [rbx+8]; this mov ecx, [rbx+10h] mov [rbp+var_30], rax mov [rbp+var_38], rcx lea rsi, [rcx+rax] inc rsi; unsigned __int64 call _ZN13Binary_string11realloc_rawEm; Binary_string::realloc_raw(ulong) mov r13b, 1 test al, al jnz loc_2723A mov rcx, [rbp+var_38] add rcx, [rbp+var_30] mov rax, [rbx+8] mov byte ptr [rax+rcx], 0 mov edi, [rbx+10h] add rdi, [rbx+8] xor r13d, r13d xor esi, esi mov rdx, r12 call _memset mov edi, [rbx+10h] add rdi, [rbx+8] add rdi, r12 mov rsi, r15 mov rdx, r14 call _memcpy mov rax, [rbp+var_30] add [rbx+10h], eax jmp short loc_2723A loc_271E0: add rbx, 8 mov rdi, rbx; this mov rsi, r15; char * mov rdx, r14; unsigned __int64 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZN13Binary_string6appendEPKcm; Binary_string::append(char const*,ulong) loc_27200: mov r13, rcx call _ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong) mov rcx, r13 mov r13b, 1 test al, al jnz short loc_2723A loc_27212: mov edi, [rbx+10h] add rdi, [rbx+8] mov rdx, [rbx] lea rax, [rbp+var_3C] mov [rsp+50h+var_50], rax mov esi, ecx mov rcx, r15 mov r8d, r14d mov r9, r12 call my_convert add [rbx+10h], eax loc_27237: xor r13d, r13d loc_2723A: mov eax, r13d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long String::append(long long *a1, const char *a2, unsigned long long a3, long long a4) { unsigned int v4; // r13d int v6; // r14d int v7; // r15d long long v9; // rcx unsigned long long v10; // rcx Binary_string *v11; // rdi unsigned long long v12; // rsi unsigned int v13; // r12d long long v14; // r12 long long v15; // rcx char v17; // al _BYTE v18[4]; // [rsp+14h] [rbp-3Ch] BYREF long long v19; // [rsp+18h] [rbp-38h] long long v20; // [rsp+20h] [rbp-30h] if ( !a3 ) return 0; v6 = a3; v7 = (int)a2; v9 = *a1; if ( *a1 == a4 || !v9 || (_UNKNOWN *)v9 == &my_charset_bin || *(_QWORD *)(a4 + 16) == *(_QWORD *)(v9 + 16) ) return Binary_string::append((Binary_string *)(a1 + 1), a2, a3); if ( (_UNKNOWN *)a4 == &my_charset_bin ) { v13 = *(_DWORD *)(v9 + 152); if ( (unsigned int)a3 % v13 ) { v14 = v13 - (unsigned int)a3 % v13; v15 = *((unsigned int *)a1 + 4); v20 = v14 + a3; v19 = v15; LOBYTE(v4) = 1; if ( !(unsigned __int8)Binary_string::realloc_raw((Binary_string *)(a1 + 1), v15 + v14 + a3 + 1) ) { *(_BYTE *)(a1[1] + v20 + v19) = 0; v4 = 0; memset(a1[1] + *((unsigned int *)a1 + 4), 0LL, v14); memcpy(v14 + a1[1] + *((unsigned int *)a1 + 4), a2); *((_DWORD *)a1 + 4) += v20; } return v4; } return Binary_string::append((Binary_string *)(a1 + 1), a2, a3); } v10 = a3 / *(unsigned int *)(a4 + 152) * *(unsigned int *)(v9 + 156); v11 = (Binary_string *)(a1 + 1); v12 = v10 + *((unsigned int *)a1 + 4); if ( v12 < *((unsigned int *)a1 + 5) ) { *(_BYTE *)(*(_QWORD *)v11 + v12) = 0; LABEL_14: *((_DWORD *)a1 + 4) += my_convert(*((_DWORD *)a1 + 2) + *((_DWORD *)a1 + 4), v10, *a1, v7, v6, a4, (long long)v18); return 0; } v4 = v10; v17 = Binary_string::realloc_with_extra(v11, v12); LODWORD(v10) = v4; LOBYTE(v4) = 1; if ( !v17 ) goto LABEL_14; return v4; }
append: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 TEST RDX,RDX JZ 0x00127237 MOV R12,RCX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RCX,qword ptr [RDI] CMP RCX,R12 JZ 0x001271e0 TEST RCX,RCX JZ 0x001271e0 CMP RCX,qword ptr [0x003f9fa8] JZ 0x001271e0 MOV RAX,qword ptr [R12 + 0x10] CMP RAX,qword ptr [RCX + 0x10] JZ 0x001271e0 CMP R12,qword ptr [0x003f9fa8] JZ 0x0012715e MOV ESI,dword ptr [R12 + 0x98] MOV RAX,R14 XOR EDX,EDX DIV RSI MOV ECX,dword ptr [RCX + 0x9c] IMUL RCX,RAX LEA RDI,[RBX + 0x8] MOV ESI,dword ptr [RBX + 0x10] MOV EAX,dword ptr [RBX + 0x14] ADD RSI,RCX CMP RSI,RAX JNC 0x00127200 MOV RAX,qword ptr [RDI] MOV byte ptr [RAX + RSI*0x1],0x0 JMP 0x00127212 LAB_0012715e: MOV R12D,dword ptr [RCX + 0x98] MOV EAX,R14D XOR EDX,EDX DIV R12D TEST EDX,EDX JZ 0x001271e0 SUB R12D,EDX LEA RAX,[R12 + R14*0x1] LEA RDI,[RBX + 0x8] MOV ECX,dword ptr [RBX + 0x10] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],RCX LEA RSI,[RCX + RAX*0x1] INC RSI CALL 0x0012666c MOV R13B,0x1 TEST AL,AL JNZ 0x0012723a MOV RCX,qword ptr [RBP + -0x38] ADD RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBX + 0x8] MOV byte ptr [RAX + RCX*0x1],0x0 MOV EDI,dword ptr [RBX + 0x10] ADD RDI,qword ptr [RBX + 0x8] XOR R13D,R13D XOR ESI,ESI MOV RDX,R12 CALL 0x001241e0 MOV EDI,dword ptr [RBX + 0x10] ADD RDI,qword ptr [RBX + 0x8] ADD RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x00124290 MOV RAX,qword ptr [RBP + -0x30] ADD dword ptr [RBX + 0x10],EAX JMP 0x0012723a LAB_001271e0: ADD RBX,0x8 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00127d42 LAB_00127200: MOV R13,RCX CALL 0x00127da8 MOV RCX,R13 MOV R13B,0x1 TEST AL,AL JNZ 0x0012723a LAB_00127212: MOV EDI,dword ptr [RBX + 0x10] ADD RDI,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RBX] LEA RAX,[RBP + -0x3c] MOV qword ptr [RSP],RAX MOV ESI,ECX MOV RCX,R15 MOV R8D,R14D MOV R9,R12 CALL 0x0015dcbb ADD dword ptr [RBX + 0x10],EAX LAB_00127237: XOR R13D,R13D LAB_0012723a: MOV EAX,R13D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* String::append(char const*, unsigned long, charset_info_st const*) */ ulong __thiscall String::append(String *this,char *param_1,ulong param_2,charset_info_st *param_3) { charset_info_st *pcVar1; char cVar2; int iVar3; ulong uVar4; ulong uVar5; int8 unaff_R13; int1 local_44 [4]; ulong local_40; long local_38; if (param_2 != 0) { pcVar1 = *(charset_info_st **)this; if ((((pcVar1 == param_3) || (pcVar1 == (charset_info_st *)0x0)) || (pcVar1 == (charset_info_st *)PTR_my_charset_bin_003f9fa8)) || (*(long *)(param_3 + 0x10) == *(long *)(pcVar1 + 0x10))) { LAB_001271e0: uVar4 = Binary_string::append((Binary_string *)(this + 8),param_1,param_2); return uVar4; } if (param_3 == (charset_info_st *)PTR_my_charset_bin_003f9fa8) { iVar3 = (int)((param_2 & 0xffffffff) % (ulong)*(uint *)(pcVar1 + 0x98)); if (iVar3 == 0) goto LAB_001271e0; uVar4 = (ulong)(*(uint *)(pcVar1 + 0x98) - iVar3); local_38 = uVar4 + param_2; local_40 = (ulong)*(uint *)(this + 0x10); cVar2 = Binary_string::realloc_raw((Binary_string *)(this + 8),local_40 + local_38 + 1); uVar5 = CONCAT71((int7)((ulong)unaff_R13 >> 8),1); if (cVar2 == '\0') { *(int1 *)(*(long *)(this + 8) + local_40 + local_38) = 0; uVar5 = 0; memset((void *)((ulong)*(uint *)(this + 0x10) + *(long *)(this + 8)),0,uVar4); memcpy((void *)((ulong)*(uint *)(this + 0x10) + *(long *)(this + 8) + uVar4),param_1,param_2 ); *(int *)(this + 0x10) = *(int *)(this + 0x10) + (int)local_38; } goto LAB_0012723a; } uVar4 = (ulong)*(uint *)(pcVar1 + 0x9c) * (param_2 / *(uint *)(param_3 + 0x98)); uVar5 = *(uint *)(this + 0x10) + uVar4; if (uVar5 < *(uint *)(this + 0x14)) { *(int1 *)(*(long *)(this + 8) + uVar5) = 0; } else { cVar2 = Binary_string::realloc_with_extra((Binary_string *)(this + 8),uVar5); uVar5 = CONCAT71((int7)(uVar4 >> 8),1); if (cVar2 != '\0') goto LAB_0012723a; } iVar3 = my_convert((ulong)*(uint *)(this + 0x10) + *(long *)(this + 8),uVar4 & 0xffffffff, *(int8 *)this,param_1,param_2 & 0xffffffff,param_3,local_44); *(int *)(this + 0x10) = *(int *)(this + 0x10) + iVar3; } uVar5 = 0; LAB_0012723a: return uVar5 & 0xffffffff; }
20,880
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 0>(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&, unsigned long&)
monkey531[P]llama/common/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_3::detail::get_arithmetic_value<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>, unsigned long, 0>(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&, unsigned long&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax cmpl $0x5, %eax je 0x6c864 cmpl $0x7, %eax je 0x6c86a cmpl $0x6, %eax jne 0x6c89b movq 0x8(%r14), %rax jmp 0x6c88f movsd 0x8(%r14), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x25a9c(%rip), %xmm0 # 0x92320 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 0x223c0 movq %rax, %rbx movq %r14, %rdi callq 0x41dd0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x27d7a(%rip), %rsi # 0x94637 leaq 0x10(%rsp), %rdi callq 0x41d71 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x41c84 xorl %ebp, %ebp leaq 0x689f0(%rip), %rsi # 0xd52d8 leaq -0x1f5bd(%rip), %rdx # 0x4d332 movq %rbx, %rdi callq 0x22cd0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x22f48 testb %bpl, %bpl jne 0x6c90e jmp 0x6c916 movq %rax, %r14 movq %rbx, %rdi callq 0x22550 movq %r14, %rdi callq 0x22d30
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_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_6C864 cmp eax, 7 jz short loc_6C86A cmp eax, 6 jnz short loc_6C89B loc_6C864: mov rax, [r14+8] jmp short loc_6C88F loc_6C86A: movsd xmm0, qword ptr [r14+8] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_92320 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx loc_6C88F: mov [rsi], rax add rsp, 30h pop rbx pop r14 pop rbp retn loc_6C89B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6C90E jmp short loc_6C916 mov r14, rax loc_6C90E: mov rdi, rbx; void * call ___cxa_free_exception loc_6C916: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( double *a1, _QWORD *a2) { int v2; // eax long long result; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx char *v5; // [rsp+8h] [rbp-40h] BYREF _BYTE v6[56]; // [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_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"type must be number, but is ", (long long)&v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x12Eu, (long long)v6, (long long)a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } result = *((_QWORD *)a1 + 1); LABEL_6: *a2 = result; return result; }
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_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 0x0016c864 CMP EAX,0x7 JZ 0x0016c86a CMP EAX,0x6 JNZ 0x0016c89b LAB_0016c864: MOV RAX,qword ptr [R14 + 0x8] JMP 0x0016c88f LAB_0016c86a: MOVSD XMM0,qword ptr [R14 + 0x8] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x00192320] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX LAB_0016c88f: MOV qword ptr [RSI],RAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0016c89b: PUSH 0x20 POP RDI CALL 0x001223c0 MOV RBX,RAX MOV RDI,R14 CALL 0x00141dd0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0016c8b6: LEA RSI,[0x194637] LEA RDI,[RSP + 0x10] CALL 0x00141d71 MOV BPL,0x1 LAB_0016c8ca: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00141c84 XOR EBP,EBP LEA RSI,[0x1d52d8] LEA RDX,[0x14d332] MOV RDI,RBX CALL 0x00122cd0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,ulong *param_2) { 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; int8 uVar2; ulong uVar3; char *local_40; detail local_38 [32]; bVar1 = *param_1; 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> )0x5) { 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> )0x7) { uVar3 = (ulong)*(double *)(param_1 + 8); uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_00192320) & (long)uVar3 >> 0x3f | uVar3; goto LAB_0016c88f; } 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> )0x6) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0016c8b6 to 0016c8c6 has its CatchHandler @ 0016c90b */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be number, but is ",&local_40); /* try { // try from 0016c8ca to 0016c8f6 has its CatchHandler @ 0016c8f7 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } uVar3 = *(ulong *)(param_1 + 8); LAB_0016c88f: *param_2 = uVar3; return; }
20,881
FindPeaksCppTest_BasicPeakDetection_Test::TestBody()
giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp
TEST_F(FindPeaksCppTest, BasicPeakDetection) { auto peaks = find_peaks(simple_signal); ASSERT_EQ(5, peaks.size()); EXPECT_EQ(1, peaks[0].peak); // Peak at index 1 with height 1 EXPECT_EQ(3, peaks[1].peak); // Peak at index 3 with height 2 EXPECT_EQ(5, peaks[2].peak); // Peak at index 5 with height 3 EXPECT_EQ(7, peaks[3].peak); // Peak at index 7 with height 2 EXPECT_EQ(9, peaks[4].peak); // Peak at index 9 with height 1 }
O1
cpp
FindPeaksCppTest_BasicPeakDetection_Test::TestBody(): pushq %rbx subq $0xc0, %rsp leaq 0x10(%rdi), %rsi movabsq $-0x10000000000001, %rax # imm = 0xFFEFFFFFFFFFFFFF leaq 0x38(%rsp), %rdx movq %rax, 0x8(%rdx) movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF movq %rcx, 0x10(%rdx) movq %rax, 0x20(%rdx) movq %rcx, 0x28(%rdx) movq $0x1, 0x30(%rdx) movq %rax, 0x40(%rdx) movq %rcx, 0x48(%rdx) movq %rax, 0x58(%rdx) movq %rcx, 0x60(%rdx) xorl %eax, %eax movq %rax, 0x68(%rdx) movabsq $0x3fe0000000000000, %rcx # imm = 0x3FE0000000000000 movq %rcx, 0x70(%rdx) movq %rax, 0x78(%rdx) movq $-0x1, 0x80(%rdx) leaq 0x20(%rsp), %rbx movq %rbx, %rdi callq 0x3d63a leaq 0x8(%rsp), %rcx movl $0x5, (%rcx) movq 0x8(%rbx), %rax subq (%rbx), %rax sarq $0x4, %rax movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7 imulq %rax, %rdx movq %rsp, %r8 movq %rdx, (%r8) leaq 0x35a24(%rip), %rsi # 0x4028e leaq 0x35b8e(%rip), %rdx # 0x403ff leaq 0x10(%rsp), %rdi callq 0xe1ec cmpb $0x0, 0x10(%rsp) je 0xa8de movq 0x18(%rsp), %rsi testq %rsi, %rsi je 0xa896 leaq 0x18(%rsp), %rdi callq 0xde4a movq %rsp, %rcx movl $0x1, (%rcx) movq 0x20(%rsp), %r8 leaq 0x379f8(%rip), %rsi # 0x422a3 leaq 0x3587e(%rip), %rdx # 0x40130 leaq 0x10(%rsp), %rdi callq 0xe1ec cmpb $0x0, 0x10(%rsp) jne 0xa971 movq %rsp, %rdi callq 0x1cd64 movq 0x18(%rsp), %rax testq %rax, %rax je 0xa929 movq (%rax), %r8 jmp 0xa930 movq %rsp, %rdi callq 0x1cd64 movq 0x18(%rsp), %rax testq %rax, %rax je 0xa8f5 movq (%rax), %r8 jmp 0xa8fc leaq 0x389e2(%rip), %r8 # 0x432de leaq 0x357d1(%rip), %rdx # 0x400d4 leaq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x16, %ecx callq 0x18f74 leaq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x16886 jmp 0xabee leaq 0x389ae(%rip), %r8 # 0x432de leaq 0x3579d(%rip), %rdx # 0x400d4 leaq 0x8(%rsp), %rdi movl $0x1, %esi movl $0x17, %ecx callq 0x18f74 leaq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x16886 leaq 0x8(%rsp), %rdi callq 0x18fe0 movq (%rsp), %rdi testq %rdi, %rdi je 0xa971 movq (%rdi), %rax callq *0x8(%rax) movq 0x18(%rsp), %rsi testq %rsi, %rsi je 0xa985 leaq 0x18(%rsp), %rdi callq 0xde4a movq %rsp, %rcx movl $0x3, (%rcx) movq 0x20(%rsp), %r8 addq $0x70, %r8 leaq 0x357a0(%rip), %rsi # 0x4013e leaq 0x3579b(%rip), %rdx # 0x40140 leaq 0x10(%rsp), %rdi callq 0xe1ec cmpb $0x0, 0x10(%rsp) jne 0xaa15 movq %rsp, %rdi callq 0x1cd64 movq 0x18(%rsp), %rax testq %rax, %rax je 0xa9cd movq (%rax), %r8 jmp 0xa9d4 leaq 0x3890a(%rip), %r8 # 0x432de leaq 0x356f9(%rip), %rdx # 0x400d4 leaq 0x8(%rsp), %rdi movl $0x1, %esi movl $0x18, %ecx callq 0x18f74 leaq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x16886 leaq 0x8(%rsp), %rdi callq 0x18fe0 movq (%rsp), %rdi testq %rdi, %rdi je 0xaa15 movq (%rdi), %rax callq *0x8(%rax) movq 0x18(%rsp), %rsi testq %rsi, %rsi je 0xaa29 leaq 0x18(%rsp), %rdi callq 0xde4a movq %rsp, %rcx movl $0x5, (%rcx) movl $0xe0, %r8d addq 0x20(%rsp), %r8 leaq 0x3584a(%rip), %rsi # 0x4028e leaq 0x35703(%rip), %rdx # 0x4014e leaq 0x10(%rsp), %rdi callq 0xe1ec cmpb $0x0, 0x10(%rsp) jne 0xaabb movq %rsp, %rdi callq 0x1cd64 movq 0x18(%rsp), %rax testq %rax, %rax je 0xaa73 movq (%rax), %r8 jmp 0xaa7a leaq 0x38864(%rip), %r8 # 0x432de leaq 0x35653(%rip), %rdx # 0x400d4 leaq 0x8(%rsp), %rdi movl $0x1, %esi movl $0x19, %ecx callq 0x18f74 leaq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x16886 leaq 0x8(%rsp), %rdi callq 0x18fe0 movq (%rsp), %rdi testq %rdi, %rdi je 0xaabb movq (%rdi), %rax callq *0x8(%rax) movq 0x18(%rsp), %rsi testq %rsi, %rsi je 0xaacf leaq 0x18(%rsp), %rdi callq 0xde4a movq %rsp, %rcx movl $0x7, (%rcx) movl $0x150, %r8d # imm = 0x150 addq 0x20(%rsp), %r8 leaq 0x35672(%rip), %rsi # 0x4015c leaq 0x3566d(%rip), %rdx # 0x4015e leaq 0x10(%rsp), %rdi callq 0xe1ec cmpb $0x0, 0x10(%rsp) jne 0xab61 movq %rsp, %rdi callq 0x1cd64 movq 0x18(%rsp), %rax testq %rax, %rax je 0xab19 movq (%rax), %r8 jmp 0xab20 leaq 0x387be(%rip), %r8 # 0x432de leaq 0x355ad(%rip), %rdx # 0x400d4 leaq 0x8(%rsp), %rdi movl $0x1, %esi movl $0x1a, %ecx callq 0x18f74 leaq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x16886 leaq 0x8(%rsp), %rdi callq 0x18fe0 movq (%rsp), %rdi testq %rdi, %rdi je 0xab61 movq (%rdi), %rax callq *0x8(%rax) movq 0x18(%rsp), %rsi testq %rsi, %rsi je 0xab75 leaq 0x18(%rsp), %rdi callq 0xde4a movq %rsp, %rcx movl $0x9, (%rcx) movl $0x1c0, %r8d # imm = 0x1C0 addq 0x20(%rsp), %r8 leaq 0x355dc(%rip), %rsi # 0x4016c leaq 0x355d7(%rip), %rdx # 0x4016e leaq 0x10(%rsp), %rdi callq 0xe1ec cmpb $0x0, 0x10(%rsp) jne 0xac07 movq %rsp, %rdi callq 0x1cd64 movq 0x18(%rsp), %rax testq %rax, %rax je 0xabbf movq (%rax), %r8 jmp 0xabc6 leaq 0x38718(%rip), %r8 # 0x432de leaq 0x35507(%rip), %rdx # 0x400d4 leaq 0x8(%rsp), %rdi movl $0x1, %esi movl $0x1b, %ecx callq 0x18f74 leaq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x16886 leaq 0x8(%rsp), %rdi callq 0x18fe0 movq (%rsp), %rdi testq %rdi, %rdi je 0xac07 movq (%rdi), %rax callq *0x8(%rax) movq 0x18(%rsp), %rsi testq %rsi, %rsi je 0xac1b leaq 0x18(%rsp), %rdi callq 0xde4a movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0xac32 movq 0x30(%rsp), %rsi subq %rdi, %rsi callq 0x84e0 addq $0xc0, %rsp popq %rbx retq jmp 0xac61 jmp 0xac70 jmp 0xac8c jmp 0xac61 jmp 0xac70 jmp 0xac8c jmp 0xac61 jmp 0xac70 jmp 0xac8c jmp 0xac61 jmp 0xac70 jmp 0xac8c jmp 0xac61 jmp 0xac70 jmp 0xac8c jmp 0xacb0 jmp 0xacb0 jmp 0xacb0 jmp 0xacb0 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x18fe0 jmp 0xac73 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xac82 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, (%rsp) jmp 0xac8f movq %rax, %rbx movq 0x18(%rsp), %rsi testq %rsi, %rsi je 0xaca3 leaq 0x18(%rsp), %rdi callq 0xde4a movq $0x0, 0x18(%rsp) jmp 0xacb3 jmp 0xacb0 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0xacca movq 0x30(%rsp), %rsi subq %rdi, %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990
_ZN40FindPeaksCppTest_BasicPeakDetection_Test8TestBodyEv: push rbx; int sub rsp, 0C0h lea rsi, [rdi+10h]; int mov rax, 0FFEFFFFFFFFFFFFFh lea rdx, [rsp+0C8h+var_90]; int mov [rdx+8], rax mov rcx, 7FEFFFFFFFFFFFFFh mov [rdx+10h], rcx mov [rdx+20h], rax mov [rdx+28h], rcx mov qword ptr [rdx+30h], 1 mov [rdx+40h], rax mov [rdx+48h], rcx mov [rdx+58h], rax mov [rdx+60h], rcx xor eax, eax mov [rdx+68h], rax mov rcx, 3FE0000000000000h; int mov [rdx+70h], rcx mov [rdx+78h], rax mov qword ptr [rdx+80h], 0FFFFFFFFFFFFFFFFh lea rbx, [rsp+0C8h+var_A8] mov rdi, rbx; int call _ZN9findPeaks10find_peaksERKSt6vectorIdSaIdEENS_14PeakConditionsE; findPeaks::find_peaks(std::vector<double> const&,findPeaks::PeakConditions) lea rcx, [rsp+0C8h+var_C0] mov dword ptr [rcx], 5 mov rax, [rbx+8] sub rax, [rbx] sar rax, 4 mov rdx, 6DB6DB6DB6DB6DB7h imul rdx, rax mov r8, rsp mov [r8], rdx lea rsi, a15+2; "5" lea rdx, aExpectedPeaksS+9; "peaks.size()" lea rdi, [rsp+0C8h+var_B8]; this call _ZN7testing8internal11CmpHelperEQIimEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<int,ulong>(char const*,char const*,int const&,ulong const&) cmp [rsp+0C8h+var_B8], 0 jz short loc_A8DE mov rsi, [rsp+0C8h+var_B0] test rsi, rsi jz short loc_A896 lea rdi, [rsp+0C8h+var_B0] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_A896: mov rcx, rsp mov dword ptr [rcx], 1 mov r8, [rsp+0C8h+var_A8] lea rsi, aFcntlPipeFd1FS+22h; "1" lea rdx, aPeaks0Peak; "peaks[0].peak" lea rdi, [rsp+0C8h+var_B8]; this call _ZN7testing8internal11CmpHelperEQIimEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<int,ulong>(char const*,char const*,int const&,ulong const&) cmp [rsp+0C8h+var_B8], 0 jnz loc_A971 mov rdi, rsp; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [rsp+0C8h+var_B0] test rax, rax jz short loc_A929 mov r8, [rax] jmp short loc_A930 loc_A8DE: mov rdi, rsp; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [rsp+0C8h+var_B0] test rax, rax jz short loc_A8F5 mov r8, [rax] jmp short loc_A8FC loc_A8F5: lea r8, aSFromSSMsTotal+1Ah; "" loc_A8FC: lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0C8h+var_C0] mov esi, 2 mov ecx, 16h call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) lea rdi, [rsp+0C8h+var_C0] mov rsi, rsp call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp loc_ABEE loc_A929: lea r8, aSFromSSMsTotal+1Ah; "" loc_A930: lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0C8h+var_C0] mov esi, 1 mov ecx, 17h call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) lea rdi, [rsp+0C8h+var_C0] mov rsi, rsp call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) lea rdi, [rsp+0C8h+var_C0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() mov rdi, [rsp+0C8h+var_C8] test rdi, rdi jz short loc_A971 mov rax, [rdi] call qword ptr [rax+8] loc_A971: mov rsi, [rsp+0C8h+var_B0] test rsi, rsi jz short loc_A985 lea rdi, [rsp+0C8h+var_B0] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_A985: mov rcx, rsp mov dword ptr [rcx], 3 mov r8, [rsp+0C8h+var_A8] add r8, 70h ; 'p' lea rsi, a3; "3" lea rdx, aPeaks1Peak; "peaks[1].peak" lea rdi, [rsp+0C8h+var_B8]; this call _ZN7testing8internal11CmpHelperEQIimEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<int,ulong>(char const*,char const*,int const&,ulong const&) cmp [rsp+0C8h+var_B8], 0 jnz short loc_AA15 mov rdi, rsp; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [rsp+0C8h+var_B0] test rax, rax jz short loc_A9CD mov r8, [rax] jmp short loc_A9D4 loc_A9CD: lea r8, aSFromSSMsTotal+1Ah; "" loc_A9D4: lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0C8h+var_C0] mov esi, 1 mov ecx, 18h call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) lea rdi, [rsp+0C8h+var_C0] mov rsi, rsp call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) lea rdi, [rsp+0C8h+var_C0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() mov rdi, [rsp+0C8h+var_C8] test rdi, rdi jz short loc_AA15 mov rax, [rdi] call qword ptr [rax+8] loc_AA15: mov rsi, [rsp+0C8h+var_B0] test rsi, rsi jz short loc_AA29 lea rdi, [rsp+0C8h+var_B0] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_AA29: mov rcx, rsp mov dword ptr [rcx], 5 mov r8d, 0E0h add r8, [rsp+0C8h+var_A8] lea rsi, a15+2; "5" lea rdx, aPeaks2Peak; "peaks[2].peak" lea rdi, [rsp+0C8h+var_B8]; this call _ZN7testing8internal11CmpHelperEQIimEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<int,ulong>(char const*,char const*,int const&,ulong const&) cmp [rsp+0C8h+var_B8], 0 jnz short loc_AABB mov rdi, rsp; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [rsp+0C8h+var_B0] test rax, rax jz short loc_AA73 mov r8, [rax] jmp short loc_AA7A loc_AA73: lea r8, aSFromSSMsTotal+1Ah; "" loc_AA7A: lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0C8h+var_C0] mov esi, 1 mov ecx, 19h call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) lea rdi, [rsp+0C8h+var_C0] mov rsi, rsp call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) lea rdi, [rsp+0C8h+var_C0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() mov rdi, [rsp+0C8h+var_C8] test rdi, rdi jz short loc_AABB mov rax, [rdi] call qword ptr [rax+8] loc_AABB: mov rsi, [rsp+0C8h+var_B0] test rsi, rsi jz short loc_AACF lea rdi, [rsp+0C8h+var_B0] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_AACF: mov rcx, rsp mov dword ptr [rcx], 7 mov r8d, 150h add r8, [rsp+0C8h+var_A8] lea rsi, a7; "7" lea rdx, aPeaks3Peak; "peaks[3].peak" lea rdi, [rsp+0C8h+var_B8]; this call _ZN7testing8internal11CmpHelperEQIimEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<int,ulong>(char const*,char const*,int const&,ulong const&) cmp [rsp+0C8h+var_B8], 0 jnz short loc_AB61 mov rdi, rsp; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [rsp+0C8h+var_B0] test rax, rax jz short loc_AB19 mov r8, [rax] jmp short loc_AB20 loc_AB19: lea r8, aSFromSSMsTotal+1Ah; "" loc_AB20: lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0C8h+var_C0] mov esi, 1 mov ecx, 1Ah call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) lea rdi, [rsp+0C8h+var_C0] mov rsi, rsp call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) lea rdi, [rsp+0C8h+var_C0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() mov rdi, [rsp+0C8h+var_C8] test rdi, rdi jz short loc_AB61 mov rax, [rdi] call qword ptr [rax+8] loc_AB61: mov rsi, [rsp+0C8h+var_B0] test rsi, rsi jz short loc_AB75 lea rdi, [rsp+0C8h+var_B0] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_AB75: mov rcx, rsp mov dword ptr [rcx], 9 mov r8d, 1C0h add r8, [rsp+0C8h+var_A8] lea rsi, a9; "9" lea rdx, aPeaks4Peak; "peaks[4].peak" lea rdi, [rsp+0C8h+var_B8]; this call _ZN7testing8internal11CmpHelperEQIimEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperEQ<int,ulong>(char const*,char const*,int const&,ulong const&) cmp [rsp+0C8h+var_B8], 0 jnz short loc_AC07 mov rdi, rsp; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [rsp+0C8h+var_B0] test rax, rax jz short loc_ABBF mov r8, [rax] jmp short loc_ABC6 loc_ABBF: lea r8, aSFromSSMsTotal+1Ah; "" loc_ABC6: lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0C8h+var_C0] mov esi, 1 mov ecx, 1Bh call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) lea rdi, [rsp+0C8h+var_C0] mov rsi, rsp call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) loc_ABEE: lea rdi, [rsp+0C8h+var_C0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() mov rdi, [rsp+0C8h+var_C8] test rdi, rdi jz short loc_AC07 mov rax, [rdi] call qword ptr [rax+8] loc_AC07: mov rsi, [rsp+0C8h+var_B0] test rsi, rsi jz short loc_AC1B lea rdi, [rsp+0C8h+var_B0] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_AC1B: mov rdi, [rsp+0C8h+var_A8]; void * test rdi, rdi jz short loc_AC32 mov rsi, [rsp+0C8h+var_98] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC32: add rsp, 0C0h pop rbx retn jmp short loc_AC61 jmp short loc_AC70 jmp short loc_AC8C jmp short loc_AC61 jmp short loc_AC70 jmp short loc_AC8C jmp short loc_AC61 jmp short loc_AC70 jmp short loc_AC8C jmp short loc_AC61 jmp short loc_AC70 jmp short loc_AC8C jmp short loc_AC61 jmp short loc_AC70 jmp short loc_AC8C jmp short loc_ACB0 jmp short loc_ACB0 jmp short loc_ACB0 jmp short loc_ACB0 loc_AC61: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() jmp short loc_AC73 loc_AC70: mov rbx, rax loc_AC73: mov rdi, [rsp+0] test rdi, rdi jz short loc_AC82 mov rax, [rdi] call qword ptr [rax+8] loc_AC82: mov qword ptr [rsp+0], 0 jmp short loc_AC8F loc_AC8C: mov rbx, rax loc_AC8F: mov rsi, [rsp+arg_10] test rsi, rsi jz short loc_ACA3 lea rdi, [rsp+arg_10] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_ACA3: mov [rsp+arg_10], 0 jmp short loc_ACB3 jmp short $+2 loc_ACB0: mov rbx, rax loc_ACB3: mov rdi, [rsp+arg_18]; void * test rdi, rdi jz short loc_ACCA mov rsi, [rsp+arg_28] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ACCA: mov rdi, rbx call __Unwind_Resume
TestBody: PUSH RBX SUB RSP,0xc0 LEA RSI,[RDI + 0x10] MOV RAX,-0x10000000000001 LEA RDX,[RSP + 0x38] MOV qword ptr [RDX + 0x8],RAX MOV RCX,0x7fefffffffffffff MOV qword ptr [RDX + 0x10],RCX MOV qword ptr [RDX + 0x20],RAX MOV qword ptr [RDX + 0x28],RCX MOV qword ptr [RDX + 0x30],0x1 MOV qword ptr [RDX + 0x40],RAX MOV qword ptr [RDX + 0x48],RCX MOV qword ptr [RDX + 0x58],RAX MOV qword ptr [RDX + 0x60],RCX XOR EAX,EAX MOV qword ptr [RDX + 0x68],RAX MOV RCX,0x3fe0000000000000 MOV qword ptr [RDX + 0x70],RCX MOV qword ptr [RDX + 0x78],RAX MOV qword ptr [RDX + 0x80],-0x1 LEA RBX,[RSP + 0x20] MOV RDI,RBX CALL 0x0013d63a LEA RCX,[RSP + 0x8] MOV dword ptr [RCX],0x5 MOV RAX,qword ptr [RBX + 0x8] SUB RAX,qword ptr [RBX] SAR RAX,0x4 MOV RDX,0x6db6db6db6db6db7 IMUL RDX,RAX MOV R8,RSP MOV qword ptr [R8],RDX LAB_0010a863: LEA RSI,[0x14028e] LEA RDX,[0x1403ff] LEA RDI,[RSP + 0x10] CALL 0x0010e1ec CMP byte ptr [RSP + 0x10],0x0 JZ 0x0010a8de MOV RSI,qword ptr [RSP + 0x18] TEST RSI,RSI JZ 0x0010a896 LEA RDI,[RSP + 0x18] CALL 0x0010de4a LAB_0010a896: MOV RCX,RSP MOV dword ptr [RCX],0x1 MOV R8,qword ptr [RSP + 0x20] LAB_0010a8a4: LEA RSI,[0x1422a3] LEA RDX,[0x140130] LEA RDI,[RSP + 0x10] CALL 0x0010e1ec CMP byte ptr [RSP + 0x10],0x0 JNZ 0x0010a971 LAB_0010a8c7: MOV RDI,RSP CALL 0x0011cd64 MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0010a929 MOV R8,qword ptr [RAX] JMP 0x0010a930 LAB_0010a8de: MOV RDI,RSP CALL 0x0011cd64 MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0010a8f5 MOV R8,qword ptr [RAX] JMP 0x0010a8fc LAB_0010a8f5: LEA R8,[0x1432de] LAB_0010a8fc: LEA RDX,[0x1400d4] LEA RDI,[RSP + 0x8] MOV ESI,0x2 MOV ECX,0x16 CALL 0x00118f74 LAB_0010a917: LEA RDI,[RSP + 0x8] MOV RSI,RSP CALL 0x00116886 JMP 0x0010abee LAB_0010a929: LEA R8,[0x1432de] LAB_0010a930: LEA RDX,[0x1400d4] LEA RDI,[RSP + 0x8] MOV ESI,0x1 MOV ECX,0x17 CALL 0x00118f74 LAB_0010a94b: LEA RDI,[RSP + 0x8] MOV RSI,RSP CALL 0x00116886 LAB_0010a958: LEA RDI,[RSP + 0x8] CALL 0x00118fe0 MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010a971 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010a971: MOV RSI,qword ptr [RSP + 0x18] TEST RSI,RSI JZ 0x0010a985 LEA RDI,[RSP + 0x18] CALL 0x0010de4a LAB_0010a985: MOV RCX,RSP MOV dword ptr [RCX],0x3 MOV R8,qword ptr [RSP + 0x20] ADD R8,0x70 LAB_0010a997: LEA RSI,[0x14013e] LEA RDX,[0x140140] LEA RDI,[RSP + 0x10] CALL 0x0010e1ec CMP byte ptr [RSP + 0x10],0x0 JNZ 0x0010aa15 LAB_0010a9b6: MOV RDI,RSP CALL 0x0011cd64 MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0010a9cd MOV R8,qword ptr [RAX] JMP 0x0010a9d4 LAB_0010a9cd: LEA R8,[0x1432de] LAB_0010a9d4: LEA RDX,[0x1400d4] LEA RDI,[RSP + 0x8] MOV ESI,0x1 MOV ECX,0x18 CALL 0x00118f74 LAB_0010a9ef: LEA RDI,[RSP + 0x8] MOV RSI,RSP CALL 0x00116886 LAB_0010a9fc: LEA RDI,[RSP + 0x8] CALL 0x00118fe0 MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010aa15 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010aa15: MOV RSI,qword ptr [RSP + 0x18] TEST RSI,RSI JZ 0x0010aa29 LEA RDI,[RSP + 0x18] CALL 0x0010de4a LAB_0010aa29: MOV RCX,RSP MOV dword ptr [RCX],0x5 MOV R8D,0xe0 ADD R8,qword ptr [RSP + 0x20] LAB_0010aa3d: LEA RSI,[0x14028e] LEA RDX,[0x14014e] LEA RDI,[RSP + 0x10] CALL 0x0010e1ec CMP byte ptr [RSP + 0x10],0x0 JNZ 0x0010aabb LAB_0010aa5c: MOV RDI,RSP CALL 0x0011cd64 MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0010aa73 MOV R8,qword ptr [RAX] JMP 0x0010aa7a LAB_0010aa73: LEA R8,[0x1432de] LAB_0010aa7a: LEA RDX,[0x1400d4] LEA RDI,[RSP + 0x8] MOV ESI,0x1 MOV ECX,0x19 CALL 0x00118f74 LAB_0010aa95: LEA RDI,[RSP + 0x8] MOV RSI,RSP CALL 0x00116886 LAB_0010aaa2: LEA RDI,[RSP + 0x8] CALL 0x00118fe0 MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010aabb MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010aabb: MOV RSI,qword ptr [RSP + 0x18] TEST RSI,RSI JZ 0x0010aacf LEA RDI,[RSP + 0x18] CALL 0x0010de4a LAB_0010aacf: MOV RCX,RSP MOV dword ptr [RCX],0x7 MOV R8D,0x150 ADD R8,qword ptr [RSP + 0x20] LAB_0010aae3: LEA RSI,[0x14015c] LEA RDX,[0x14015e] LEA RDI,[RSP + 0x10] CALL 0x0010e1ec CMP byte ptr [RSP + 0x10],0x0 JNZ 0x0010ab61 LAB_0010ab02: MOV RDI,RSP CALL 0x0011cd64 MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0010ab19 MOV R8,qword ptr [RAX] JMP 0x0010ab20 LAB_0010ab19: LEA R8,[0x1432de] LAB_0010ab20: LEA RDX,[0x1400d4] LEA RDI,[RSP + 0x8] MOV ESI,0x1 MOV ECX,0x1a CALL 0x00118f74 LAB_0010ab3b: LEA RDI,[RSP + 0x8] MOV RSI,RSP CALL 0x00116886 LAB_0010ab48: LEA RDI,[RSP + 0x8] CALL 0x00118fe0 MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010ab61 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010ab61: MOV RSI,qword ptr [RSP + 0x18] TEST RSI,RSI JZ 0x0010ab75 LEA RDI,[RSP + 0x18] CALL 0x0010de4a LAB_0010ab75: MOV RCX,RSP MOV dword ptr [RCX],0x9 MOV R8D,0x1c0 ADD R8,qword ptr [RSP + 0x20] LAB_0010ab89: LEA RSI,[0x14016c] LEA RDX,[0x14016e] LEA RDI,[RSP + 0x10] CALL 0x0010e1ec CMP byte ptr [RSP + 0x10],0x0 JNZ 0x0010ac07 LAB_0010aba8: MOV RDI,RSP CALL 0x0011cd64 MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0010abbf MOV R8,qword ptr [RAX] JMP 0x0010abc6 LAB_0010abbf: LEA R8,[0x1432de] LAB_0010abc6: LEA RDX,[0x1400d4] LEA RDI,[RSP + 0x8] MOV ESI,0x1 MOV ECX,0x1b CALL 0x00118f74 LAB_0010abe1: LEA RDI,[RSP + 0x8] MOV RSI,RSP CALL 0x00116886 LAB_0010abee: LEA RDI,[RSP + 0x8] CALL 0x00118fe0 MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010ac07 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010ac07: MOV RSI,qword ptr [RSP + 0x18] TEST RSI,RSI JZ 0x0010ac1b LEA RDI,[RSP + 0x18] CALL 0x0010de4a LAB_0010ac1b: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0010ac32 MOV RSI,qword ptr [RSP + 0x30] SUB RSI,RDI CALL 0x001084e0 LAB_0010ac32: ADD RSP,0xc0 POP RBX RET
/* FindPeaksCppTest_BasicPeakDetection_Test::TestBody() */ void __thiscall FindPeaksCppTest_BasicPeakDetection_Test::TestBody(FindPeaksCppTest_BasicPeakDetection_Test *this) { char *pcVar1; long *local_c8; int local_c0 [2]; internal local_b8 [8]; string *local_b0; ulong *local_a8; long local_a0; long local_98; int8 local_88; int8 local_80; int8 local_70; int8 local_68; int8 local_60; int8 local_50; int8 local_48; int8 local_38; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int8 local_10; local_88 = 0xffefffffffffffff; local_80 = 0x7fefffffffffffff; local_70 = 0xffefffffffffffff; local_68 = 0x7fefffffffffffff; local_60 = 1; local_50 = 0xffefffffffffffff; local_48 = 0x7fefffffffffffff; local_38 = 0xffefffffffffffff; local_30 = 0x7fefffffffffffff; local_28 = 0; local_20 = 0x3fe0000000000000; local_18 = 0; local_10 = 0xffffffffffffffff; findPeaks::find_peaks((findPeaks *)&local_a8,this + 0x10); local_c0[0] = 5; local_c8 = (long *)((local_a0 - (long)local_a8 >> 4) * 0x6db6db6db6db6db7); /* try { // try from 0010a863 to 0010a87a has its CatchHandler @ 0010acb0 */ testing::internal::CmpHelperEQ<int,unsigned_long> (local_b8,"5","peaks.size()",local_c0,(ulong *)&local_c8); if (local_b8[0] == (internal)0x0) { /* try { // try from 0010a8de to 0010a8e5 has its CatchHandler @ 0010ac8c */ testing::Message::Message((Message *)&local_c8); if (local_b0 == (string *)0x0) { pcVar1 = ""; } else { pcVar1 = *(char **)local_b0; } /* try { // try from 0010a8fc to 0010a916 has its CatchHandler @ 0010ac70 */ testing::internal::AssertHelper::AssertHelper ((AssertHelper *)local_c0,2, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp" ,0x16,pcVar1); /* try { // try from 0010a917 to 0010a923 has its CatchHandler @ 0010ac61 */ testing::internal::AssertHelper::operator=((AssertHelper *)local_c0,(Message *)&local_c8); } else { if (local_b0 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_b0,local_b0); } local_c8 = (long *)CONCAT44(local_c8._4_4_,1); /* try { // try from 0010a8a4 to 0010a8bb has its CatchHandler @ 0010acae */ testing::internal::CmpHelperEQ<int,unsigned_long> (local_b8,"1","peaks[0].peak",(int *)&local_c8,local_a8); if (local_b8[0] == (internal)0x0) { /* try { // try from 0010a8c7 to 0010a8ce has its CatchHandler @ 0010ac57 */ testing::Message::Message((Message *)&local_c8); if (local_b0 == (string *)0x0) { pcVar1 = ""; } else { pcVar1 = *(char **)local_b0; } /* try { // try from 0010a930 to 0010a94a has its CatchHandler @ 0010ac55 */ testing::internal::AssertHelper::AssertHelper ((AssertHelper *)local_c0,1, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp" ,0x17,pcVar1); /* try { // try from 0010a94b to 0010a957 has its CatchHandler @ 0010ac53 */ testing::internal::AssertHelper::operator=((AssertHelper *)local_c0,(Message *)&local_c8); testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_c0); if (local_c8 != (long *)0x0) { (**(code **)(*local_c8 + 8))(); } } if (local_b0 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_b0,local_b0); } local_c8 = (long *)CONCAT44(local_c8._4_4_,3); /* try { // try from 0010a997 to 0010a9ae has its CatchHandler @ 0010ac5f */ testing::internal::CmpHelperEQ<int,unsigned_long> (local_b8,"3","peaks[1].peak",(int *)&local_c8,local_a8 + 0xe); if (local_b8[0] == (internal)0x0) { /* try { // try from 0010a9b6 to 0010a9bd has its CatchHandler @ 0010ac51 */ testing::Message::Message((Message *)&local_c8); if (local_b0 == (string *)0x0) { pcVar1 = ""; } else { pcVar1 = *(char **)local_b0; } /* try { // try from 0010a9d4 to 0010a9ee has its CatchHandler @ 0010ac4f */ testing::internal::AssertHelper::AssertHelper ((AssertHelper *)local_c0,1, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp" ,0x18,pcVar1); /* try { // try from 0010a9ef to 0010a9fb has its CatchHandler @ 0010ac4d */ testing::internal::AssertHelper::operator=((AssertHelper *)local_c0,(Message *)&local_c8); testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_c0); if (local_c8 != (long *)0x0) { (**(code **)(*local_c8 + 8))(); } } if (local_b0 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_b0,local_b0); } local_c8 = (long *)CONCAT44(local_c8._4_4_,5); /* try { // try from 0010aa3d to 0010aa54 has its CatchHandler @ 0010ac5d */ testing::internal::CmpHelperEQ<int,unsigned_long> (local_b8,"5","peaks[2].peak",(int *)&local_c8,local_a8 + 0x1c); if (local_b8[0] == (internal)0x0) { /* try { // try from 0010aa5c to 0010aa63 has its CatchHandler @ 0010ac4b */ testing::Message::Message((Message *)&local_c8); if (local_b0 == (string *)0x0) { pcVar1 = ""; } else { pcVar1 = *(char **)local_b0; } /* try { // try from 0010aa7a to 0010aa94 has its CatchHandler @ 0010ac49 */ testing::internal::AssertHelper::AssertHelper ((AssertHelper *)local_c0,1, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp" ,0x19,pcVar1); /* try { // try from 0010aa95 to 0010aaa1 has its CatchHandler @ 0010ac47 */ testing::internal::AssertHelper::operator=((AssertHelper *)local_c0,(Message *)&local_c8); testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_c0); if (local_c8 != (long *)0x0) { (**(code **)(*local_c8 + 8))(); } } if (local_b0 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_b0,local_b0); } local_c8 = (long *)CONCAT44(local_c8._4_4_,7); /* try { // try from 0010aae3 to 0010aafa has its CatchHandler @ 0010ac5b */ testing::internal::CmpHelperEQ<int,unsigned_long> (local_b8,"7","peaks[3].peak",(int *)&local_c8,local_a8 + 0x2a); if (local_b8[0] == (internal)0x0) { /* try { // try from 0010ab02 to 0010ab09 has its CatchHandler @ 0010ac45 */ testing::Message::Message((Message *)&local_c8); if (local_b0 == (string *)0x0) { pcVar1 = ""; } else { pcVar1 = *(char **)local_b0; } /* try { // try from 0010ab20 to 0010ab3a has its CatchHandler @ 0010ac43 */ testing::internal::AssertHelper::AssertHelper ((AssertHelper *)local_c0,1, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp" ,0x1a,pcVar1); /* try { // try from 0010ab3b to 0010ab47 has its CatchHandler @ 0010ac41 */ testing::internal::AssertHelper::operator=((AssertHelper *)local_c0,(Message *)&local_c8); testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_c0); if (local_c8 != (long *)0x0) { (**(code **)(*local_c8 + 8))(); } } if (local_b0 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_b0,local_b0); } local_c8 = (long *)CONCAT44(local_c8._4_4_,9); /* try { // try from 0010ab89 to 0010aba0 has its CatchHandler @ 0010ac59 */ testing::internal::CmpHelperEQ<int,unsigned_long> (local_b8,"9","peaks[4].peak",(int *)&local_c8,local_a8 + 0x38); if (local_b8[0] != (internal)0x0) goto LAB_0010ac07; /* try { // try from 0010aba8 to 0010abaf has its CatchHandler @ 0010ac3f */ testing::Message::Message((Message *)&local_c8); if (local_b0 == (string *)0x0) { pcVar1 = ""; } else { pcVar1 = *(char **)local_b0; } /* try { // try from 0010abc6 to 0010abe0 has its CatchHandler @ 0010ac3d */ testing::internal::AssertHelper::AssertHelper ((AssertHelper *)local_c0,1, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp" ,0x1b,pcVar1); /* try { // try from 0010abe1 to 0010abed has its CatchHandler @ 0010ac3b */ testing::internal::AssertHelper::operator=((AssertHelper *)local_c0,(Message *)&local_c8); } testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_c0); if (local_c8 != (long *)0x0) { (**(code **)(*local_c8 + 8))(); } LAB_0010ac07: if (local_b0 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_b0,local_b0); } if (local_a8 != (ulong *)0x0) { operator_delete(local_a8,local_98 - (long)local_a8); } return; }
20,882
binding_system_is_descendant_scope
tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c
bool binding_system_is_descendant_scope(BindingSystem* system, uint64_t scope_id, uint64_t ancestor_id) { assert(system != NULL); // Check if scope_id is the same as ancestor_id if (scope_id == ancestor_id) { return true; } // Check if scope_id is a descendant of ancestor_id uint64_t parent_id = binding_system_get_parent_scope(system, scope_id); while (parent_id != 0) { if (parent_id == ancestor_id) { return true; } parent_id = binding_system_get_parent_scope(system, parent_id); } // Not a descendant return false; }
O0
c
binding_system_is_descendant_scope: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x535d jmp 0x537c leaq 0x11a6b(%rip), %rdi # 0x16dcf leaq 0x11a73(%rip), %rsi # 0x16dde movl $0x94, %edx leaq 0x11b6d(%rip), %rcx # 0x16ee4 callq 0x1120 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x538c movb $0x1, -0x1(%rbp) jmp 0x53cb movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x53e0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x53c7 movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x53b4 movb $0x1, -0x1(%rbp) jmp 0x53cb movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x53e0 movq %rax, -0x28(%rbp) jmp 0x539d movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
binding_system_is_descendant_scope: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_535D jmp short loc_537C loc_535D: lea rdi, aSystemNull; "system != NULL" lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... mov edx, 94h lea rcx, aBoolBindingSys_0; "_Bool binding_system_is_descendant_scop"... call ___assert_fail loc_537C: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_538C mov [rbp+var_1], 1 jmp short loc_53CB loc_538C: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call binding_system_get_parent_scope mov [rbp+var_28], rax loc_539D: cmp [rbp+var_28], 0 jz short loc_53C7 mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnz short loc_53B4 mov [rbp+var_1], 1 jmp short loc_53CB loc_53B4: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call binding_system_get_parent_scope mov [rbp+var_28], rax jmp short loc_539D loc_53C7: mov [rbp+var_1], 0 loc_53CB: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char binding_system_is_descendant_scope(long long a1, long long a2, long long a3) { long long i; // [rsp+8h] [rbp-28h] if ( !a1 ) __assert_fail( "system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c", 148LL, "_Bool binding_system_is_descendant_scope(BindingSystem *, uint64_t, uint64_t)"); if ( a2 == a3 ) return 1; for ( i = binding_system_get_parent_scope(a1, a2); i; i = binding_system_get_parent_scope(a1, i) ) { if ( i == a3 ) return 1; } return 0; }
binding_system_is_descendant_scope: 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 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0010535d JMP 0x0010537c LAB_0010535d: LEA RDI,[0x116dcf] LEA RSI,[0x116dde] MOV EDX,0x94 LEA RCX,[0x116ee4] CALL 0x00101120 LAB_0010537c: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0010538c MOV byte ptr [RBP + -0x1],0x1 JMP 0x001053cb LAB_0010538c: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001053e0 MOV qword ptr [RBP + -0x28],RAX LAB_0010539d: CMP qword ptr [RBP + -0x28],0x0 JZ 0x001053c7 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001053b4 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001053cb LAB_001053b4: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001053e0 MOV qword ptr [RBP + -0x28],RAX JMP 0x0010539d LAB_001053c7: MOV byte ptr [RBP + -0x1],0x0 LAB_001053cb: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
int1 binding_system_is_descendant_scope(long param_1,long param_2,long param_3) { long lVar1; int1 local_9; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("system != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c" ,0x94, "_Bool binding_system_is_descendant_scope(BindingSystem *, uint64_t, uint64_t)"); } if (param_2 == param_3) { local_9 = 1; } else { for (lVar1 = binding_system_get_parent_scope(param_1,param_2); lVar1 != 0; lVar1 = binding_system_get_parent_scope(param_1,lVar1)) { if (lVar1 == param_3) { return 1; } } local_9 = 0; } return local_9; }
20,883
js_parse_template_part
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_template_part(JSParseState *s, const uint8_t *p) { const uint8_t *p_next; uint32_t c; StringBuffer b_s, *b = &b_s; /* p points to the first byte of the template part */ if (string_buffer_init(s->ctx, b, 32)) goto fail; for(;;) { if (p >= s->buf_end) goto unexpected_eof; c = *p++; if (c == '`') { /* template end part */ break; } if (c == '$' && *p == '{') { /* template start or middle part */ p++; break; } if (c == '\\') { if (string_buffer_putc8(b, c)) goto fail; if (p >= s->buf_end) goto unexpected_eof; c = *p++; } /* newline sequences are normalized as single '\n' bytes */ if (c == '\r') { if (*p == '\n') p++; c = '\n'; } if (c == '\n') { s->line_num++; s->eol = &p[-1]; s->mark = p; } else if (c >= 0x80) { c = utf8_decode(p - 1, &p_next); if (p_next == p) { js_parse_error(s, "invalid UTF-8 sequence"); goto fail; } p = p_next; } if (string_buffer_putc(b, c)) goto fail; } s->token.val = TOK_TEMPLATE; s->token.u.str.sep = c; s->token.u.str.str = string_buffer_end(b); s->buf_ptr = p; return 0; unexpected_eof: js_parse_error(s, "unexpected end of string"); fail: string_buffer_free(b); return -1; }
O1
c
js_parse_template_part: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r12 movq %rdi, %rbx movq (%rdi), %rdi movq %rdi, 0x8(%rsp) movsd 0x3f6b6(%rip), %xmm0 # 0x9e780 movups %xmm0, 0x18(%rsp) movl $0x20, %esi xorl %edx, %edx callq 0x20b73 movq %rax, 0x10(%rsp) testq %rax, %rax je 0x5f233 leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r15 cmpq 0x78(%rbx), %r12 jae 0x5f1c3 leaq 0x1(%r12), %r13 movzbl (%r12), %esi cmpl $0x24, %esi je 0x5f11b cmpl $0x5c, %esi je 0x5f12b cmpl $0x60, %esi jne 0x5f153 jmp 0x5f206 cmpb $0x7b, (%r13) je 0x5f1ff cmpl $0x5c, %esi jne 0x5f153 movq %r14, %rdi movl $0x5c, %esi callq 0x4b861 testl %eax, %eax jne 0x5f1d4 cmpq 0x78(%rbx), %r13 jae 0x5f1c3 movzbl 0x1(%r12), %esi addq $0x2, %r12 movq %r12, %r13 cmpl $0xd, %esi jne 0x5f16a xorl %eax, %eax cmpb $0xa, (%r13) sete %al addq %rax, %r13 movl $0xa, %esi cmpl $0xa, %esi jne 0x5f18b incl 0x10(%rbx) leaq -0x1(%r13), %rax movq %rax, 0x80(%rbx) movq %r13, 0x88(%rbx) movl $0xa, %esi jmp 0x5f1ae cmpl $0x80, %esi jb 0x5f1ae leaq -0x1(%r13), %rdi movq %r15, %rsi callq 0x1b729 movl %eax, %esi movq 0x28(%rsp), %rax cmpq %r13, %rax je 0x5f22a movq %rax, %r13 movq %r14, %rdi callq 0x333f0 movq %r13, %r12 testl %eax, %eax je 0x5f0f3 jmp 0x5f1d4 leaq 0x4166d(%rip), %rsi # 0xa0837 movq %rbx, %rdi xorl %eax, %eax callq 0x2fce9 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x1cb99 movq $0x0, 0x10(%rsp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq addq $0x2, %r12 movq %r12, %r13 movl $0xffffff82, 0x20(%rbx) # imm = 0xFFFFFF82 movl %esi, 0x48(%rbx) leaq 0x8(%rsp), %rdi callq 0x33444 movq %rax, 0x38(%rbx) movq %rdx, 0x40(%rbx) movq %r13, 0x70(%rbx) xorl %eax, %eax jmp 0x5f1f1 leaq 0x415ef(%rip), %rsi # 0xa0820 jmp 0x5f1ca movl $0x0, 0x1c(%rsp) movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x5f1d4
js_parse_template_part: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r12, rsi mov rbx, rdi mov rdi, [rdi] mov [rsp+58h+var_50], rdi movsd xmm0, cs:qword_9E780 movups [rsp+58h+var_40], xmm0 mov esi, 20h ; ' ' xor edx, edx call js_alloc_string mov [rsp+58h+var_48], rax test rax, rax jz loc_5F233 lea r14, [rsp+58h+var_50] lea r15, [rsp+58h+var_30] loc_5F0F3: cmp r12, [rbx+78h] jnb loc_5F1C3 lea r13, [r12+1] movzx esi, byte ptr [r12] cmp esi, 24h ; '$' jz short loc_5F11B cmp esi, 5Ch ; '\' jz short loc_5F12B cmp esi, 60h ; '`' jnz short loc_5F153 jmp loc_5F206 loc_5F11B: cmp byte ptr [r13+0], 7Bh ; '{' jz loc_5F1FF cmp esi, 5Ch ; '\' jnz short loc_5F153 loc_5F12B: mov rdi, r14 mov esi, 5Ch ; '\' call string_buffer_putc8 test eax, eax jnz loc_5F1D4 cmp r13, [rbx+78h] jnb short loc_5F1C3 movzx esi, byte ptr [r12+1] add r12, 2 mov r13, r12 loc_5F153: cmp esi, 0Dh jnz short loc_5F16A xor eax, eax cmp byte ptr [r13+0], 0Ah setz al add r13, rax mov esi, 0Ah loc_5F16A: cmp esi, 0Ah jnz short loc_5F18B inc dword ptr [rbx+10h] lea rax, [r13-1] mov [rbx+80h], rax mov [rbx+88h], r13 mov esi, 0Ah jmp short loc_5F1AE loc_5F18B: cmp esi, 80h jb short loc_5F1AE lea rdi, [r13-1] mov rsi, r15 call utf8_decode mov esi, eax mov rax, [rsp+58h+var_30] cmp rax, r13 jz short loc_5F22A mov r13, rax loc_5F1AE: mov rdi, r14 call string_buffer_putc mov r12, r13 test eax, eax jz loc_5F0F3 jmp short loc_5F1D4 loc_5F1C3: lea rsi, aUnexpectedEndO_1; "unexpected end of string" loc_5F1CA: mov rdi, rbx xor eax, eax call js_parse_error loc_5F1D4: mov rdi, [rsp+58h+var_50] mov rsi, [rsp+58h+var_48] call js_free mov [rsp+58h+var_48], 0 mov eax, 0FFFFFFFFh loc_5F1F1: add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_5F1FF: add r12, 2 mov r13, r12 loc_5F206: mov dword ptr [rbx+20h], 0FFFFFF82h mov [rbx+48h], esi lea rdi, [rsp+58h+var_50] call string_buffer_end mov [rbx+38h], rax mov [rbx+40h], rdx mov [rbx+70h], r13 xor eax, eax jmp short loc_5F1F1 loc_5F22A: lea rsi, aInvalidUtf8Seq; "invalid UTF-8 sequence" jmp short loc_5F1CA loc_5F233: mov dword ptr [rsp+58h+var_40+4], 0 mov dword ptr [rsp+58h+var_40+0Ch], 0FFFFFFFFh jmp short loc_5F1D4
long long js_parse_template_part( long long a1, char *a2, double a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 char *v17; // r13 unsigned int v18; // esi const char *v19; // rsi long long v21; // rdx char v22; // [rsp+0h] [rbp-58h] long long v23; // [rsp+8h] [rbp-50h] BYREF long long v24; // [rsp+10h] [rbp-48h] __int128 v25; // [rsp+18h] [rbp-40h] char *v26; // [rsp+28h] [rbp-30h] BYREF v23 = *(_QWORD *)a1; v25 = 0x2000000000uLL; v24 = js_alloc_string(v23, 32LL, 0); if ( !v24 ) { DWORD1(v25) = 0; HIDWORD(v25) = -1; LABEL_23: js_free(v23, v24); v24 = 0LL; return 0xFFFFFFFFLL; } while ( 1 ) { if ( (unsigned long long)a2 >= *(_QWORD *)(a1 + 120) ) { LABEL_21: v19 = "unexpected end of string"; LABEL_22: js_parse_error( (long long *)a1, (long long)v19, v11, v12, v13, v14, (__m128)0x2000000000uLL, a4, a5, a6, v15, v16, a9, a10, v22); goto LABEL_23; } v17 = a2 + 1; v18 = (unsigned __int8)*a2; if ( v18 == 36 ) break; if ( v18 == 92 ) { if ( (unsigned int)string_buffer_putc8( (long long)&v23, 0x5Cu, (__m128)0x2000000000uLL, a4, a5, a6, v15, v16, a9, a10, v11, v12, v13, v14) ) goto LABEL_23; if ( (unsigned long long)v17 >= *(_QWORD *)(a1 + 120) ) goto LABEL_21; v18 = (unsigned __int8)a2[1]; v17 = a2 + 2; } else if ( v18 == 96 ) { goto LABEL_25; } LABEL_12: if ( v18 == 13 ) { v17 += *v17 == 10; v18 = 10; } if ( v18 == 10 ) { ++*(_DWORD *)(a1 + 16); *(_QWORD *)(a1 + 128) = v17 - 1; *(_QWORD *)(a1 + 136) = v17; v18 = 10; } else if ( v18 >= 0x80 ) { v18 = utf8_decode(v17 - 1, &v26); if ( v26 == v17 ) { v19 = "invalid UTF-8 sequence"; goto LABEL_22; } v17 = v26; } a2 = v17; if ( (unsigned int)string_buffer_putc((long long)&v23, v18) ) goto LABEL_23; } if ( *v17 != 123 ) goto LABEL_12; v17 = a2 + 2; LABEL_25: *(_DWORD *)(a1 + 32) = -126; *(_DWORD *)(a1 + 72) = v18; *(_QWORD *)(a1 + 56) = string_buffer_end((long long)&v23); *(_QWORD *)(a1 + 64) = v21; *(_QWORD *)(a1 + 112) = v17; return 0LL; }
20,884
js_parse_template_part
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_template_part(JSParseState *s, const uint8_t *p) { const uint8_t *p_next; uint32_t c; StringBuffer b_s, *b = &b_s; /* p points to the first byte of the template part */ if (string_buffer_init(s->ctx, b, 32)) goto fail; for(;;) { if (p >= s->buf_end) goto unexpected_eof; c = *p++; if (c == '`') { /* template end part */ break; } if (c == '$' && *p == '{') { /* template start or middle part */ p++; break; } if (c == '\\') { if (string_buffer_putc8(b, c)) goto fail; if (p >= s->buf_end) goto unexpected_eof; c = *p++; } /* newline sequences are normalized as single '\n' bytes */ if (c == '\r') { if (*p == '\n') p++; c = '\n'; } if (c == '\n') { s->line_num++; s->eol = &p[-1]; s->mark = p; } else if (c >= 0x80) { c = utf8_decode(p - 1, &p_next); if (p_next == p) { js_parse_error(s, "invalid UTF-8 sequence"); goto fail; } p = p_next; } if (string_buffer_putc(b, c)) goto fail; } s->token.val = TOK_TEMPLATE; s->token.u.str.sep = c; s->token.u.str.str = string_buffer_end(b); s->buf_ptr = p; return 0; unexpected_eof: js_parse_error(s, "unexpected end of string"); fail: string_buffer_free(b); return -1; }
O2
c
js_parse_template_part: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r13 movq %rdi, %rbx movq (%rdi), %rdi leaq 0x8(%rsp), %rsi pushq $0x20 popq %rdx callq 0x2e042 testl %eax, %eax jne 0x5149c leaq 0x8(%rsp), %r15 pushq $0x5c popq %rbp pushq $0xa popq %r14 cmpq 0x78(%rbx), %r13 jae 0x5148b leaq 0x1(%r13), %r12 movzbl (%r13), %eax cmpl $0x24, %eax je 0x51448 cmpl $0x5c, %eax je 0x513ef cmpl $0x60, %eax je 0x514bf movq %r12, %r13 jmp 0x51414 movq %r15, %rdi movl %ebp, %esi callq 0x41425 testl %eax, %eax jne 0x5149c cmpq 0x78(%rbx), %r12 jae 0x5148b movzbl 0x1(%r13), %eax addq $0x2, %r13 cmpl $0xa, %eax je 0x5142b cmpl $0xd, %eax jne 0x51454 xorl %eax, %eax cmpb $0xa, (%r13) sete %al addq %rax, %r13 incl 0x10(%rbx) leaq -0x1(%r13), %rax movq %rax, 0x80(%rbx) movq %r13, 0x88(%rbx) movl %r14d, %esi movq %r13, %r12 jmp 0x51472 cmpb $0x7b, (%r12) pushq $0x24 popq %rsi jne 0x51472 jmp 0x514b8 cmpl $0x80, %eax jb 0x51487 leaq -0x1(%r13), %rdi movq %rsp, %rsi callq 0x15f80 movq (%rsp), %r12 cmpq %r13, %r12 je 0x514e3 movl %eax, %esi movq %r15, %rdi callq 0x2ca82 movq %r12, %r13 testl %eax, %eax je 0x513c4 jmp 0x5149c movl %eax, %esi jmp 0x51443 leaq 0x362df(%rip), %rsi # 0x87771 movq %rbx, %rdi xorl %eax, %eax callq 0x28457 leaq 0x8(%rsp), %rdi callq 0x2ef01 pushq $-0x1 popq %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x2, %r13 movq %r13, %r12 movl $0xffffff82, 0x20(%rbx) # imm = 0xFFFFFF82 movl %eax, 0x48(%rbx) leaq 0x8(%rsp), %rdi callq 0x2cad4 movq %rax, 0x38(%rbx) movq %rdx, 0x40(%rbx) movq %r12, 0x70(%rbx) xorl %eax, %eax jmp 0x514a9 leaq 0x36270(%rip), %rsi # 0x8775a jmp 0x51492
js_parse_template_part: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13, rsi mov rbx, rdi mov rdi, [rdi] lea rsi, [rsp+58h+var_50] push 20h ; ' ' pop rdx call string_buffer_init test eax, eax jnz loc_5149C lea r15, [rsp+58h+var_50] push 5Ch ; '\' pop rbp push 0Ah pop r14 loc_513C4: cmp r13, [rbx+78h] jnb loc_5148B lea r12, [r13+1] movzx eax, byte ptr [r13+0] cmp eax, 24h ; '$' jz short loc_51448 cmp eax, 5Ch ; '\' jz short loc_513EF cmp eax, 60h ; '`' jz loc_514BF mov r13, r12 jmp short loc_51414 loc_513EF: mov rdi, r15 mov esi, ebp call string_buffer_putc8 test eax, eax jnz loc_5149C cmp r12, [rbx+78h] jnb loc_5148B movzx eax, byte ptr [r13+1] add r13, 2 loc_51414: cmp eax, 0Ah jz short loc_5142B cmp eax, 0Dh jnz short loc_51454 xor eax, eax cmp byte ptr [r13+0], 0Ah setz al add r13, rax loc_5142B: inc dword ptr [rbx+10h] lea rax, [r13-1] mov [rbx+80h], rax mov [rbx+88h], r13 mov esi, r14d loc_51443: mov r12, r13 jmp short loc_51472 loc_51448: cmp byte ptr [r12], 7Bh ; '{' push 24h ; '$' pop rsi jnz short loc_51472 jmp short loc_514B8 loc_51454: cmp eax, 80h jb short loc_51487 lea rdi, [r13-1] mov rsi, rsp call utf8_decode mov r12, [rsp+58h+var_58] cmp r12, r13 jz short loc_514E3 mov esi, eax loc_51472: mov rdi, r15 call string_buffer_putc mov r13, r12 test eax, eax jz loc_513C4 jmp short loc_5149C loc_51487: mov esi, eax jmp short loc_51443 loc_5148B: lea rsi, aUnexpectedEndO_1; "unexpected end of string" loc_51492: mov rdi, rbx xor eax, eax call js_parse_error loc_5149C: lea rdi, [rsp+58h+var_50] call string_buffer_free push 0FFFFFFFFFFFFFFFFh pop rax loc_514A9: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_514B8: add r13, 2 mov r12, r13 loc_514BF: mov dword ptr [rbx+20h], 0FFFFFF82h mov [rbx+48h], eax lea rdi, [rsp+58h+var_50] call string_buffer_end mov [rbx+38h], rax mov [rbx+40h], rdx mov [rbx+70h], r12 xor eax, eax jmp short loc_514A9 loc_514E3: lea rsi, aInvalidUtf8Seq; "invalid UTF-8 sequence" jmp short loc_51492
long long js_parse_template_part( long long a1, char *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 char *v17; // r12 unsigned int v18; // eax char *v19; // r13 unsigned int v20; // esi unsigned int v21; // eax const char *v22; // rsi long long v24; // rdx char *v25; // [rsp+0h] [rbp-58h] BYREF long long v26[10]; // [rsp+8h] [rbp-50h] BYREF if ( (unsigned int)string_buffer_init(*(_QWORD *)a1, (long long)v26, 0x20u) ) { LABEL_25: string_buffer_free(v26); return -1LL; } while ( 1 ) { if ( (unsigned long long)a2 >= *(_QWORD *)(a1 + 120) ) { LABEL_23: v22 = "unexpected end of string"; LABEL_24: js_parse_error((long long *)a1, (long long)v22, v11, v12, v13, v14, a3, a4, a5, a6, v15, v16, a9, a10, (char)v25); goto LABEL_25; } v17 = a2 + 1; v18 = (unsigned __int8)*a2; if ( v18 == 36 ) break; switch ( v18 ) { case 0x5Cu: if ( (unsigned int)string_buffer_putc8( (long long)v26, 0x5Cu, a3, a4, a5, a6, v15, v16, a9, a10, v11, v12, v13, v14) ) goto LABEL_25; if ( (unsigned long long)v17 >= *(_QWORD *)(a1 + 120) ) goto LABEL_23; v18 = (unsigned __int8)a2[1]; v19 = a2 + 2; break; case 0x60u: goto LABEL_26; case 0xAu: goto LABEL_13; case 0xDu: v19 += *v19 == 10; LABEL_13: ++*(_DWORD *)(a1 + 16); *(_QWORD *)(a1 + 128) = v19 - 1; *(_QWORD *)(a1 + 136) = v19; v20 = 10; LABEL_14: v17 = v19; goto LABEL_20; default: v19 = a2 + 1; break; } if ( v18 < 0x80 ) { v20 = v18; goto LABEL_14; } v21 = utf8_decode(v19 - 1, &v25); v17 = v25; if ( v25 == v19 ) { v22 = "invalid UTF-8 sequence"; goto LABEL_24; } v20 = v21; LABEL_20: a2 = v17; if ( (unsigned int)string_buffer_putc((long long)v26, v20) ) goto LABEL_25; } v20 = 36; if ( *v17 != 123 ) goto LABEL_20; v17 = a2 + 2; LABEL_26: *(_DWORD *)(a1 + 32) = -126; *(_DWORD *)(a1 + 72) = v18; *(_QWORD *)(a1 + 56) = string_buffer_end(v26); *(_QWORD *)(a1 + 64) = v24; *(_QWORD *)(a1 + 112) = v17; return 0LL; }
js_parse_template_part: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R13,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI] LEA RSI,[RSP + 0x8] PUSH 0x20 POP RDX CALL 0x0012e042 TEST EAX,EAX JNZ 0x0015149c LEA R15,[RSP + 0x8] PUSH 0x5c POP RBP PUSH 0xa POP R14 LAB_001513c4: CMP R13,qword ptr [RBX + 0x78] JNC 0x0015148b LEA R12,[R13 + 0x1] MOVZX EAX,byte ptr [R13] CMP EAX,0x24 JZ 0x00151448 CMP EAX,0x5c JZ 0x001513ef CMP EAX,0x60 JZ 0x001514bf MOV R13,R12 JMP 0x00151414 LAB_001513ef: MOV RDI,R15 MOV ESI,EBP CALL 0x00141425 TEST EAX,EAX JNZ 0x0015149c CMP R12,qword ptr [RBX + 0x78] JNC 0x0015148b MOVZX EAX,byte ptr [R13 + 0x1] ADD R13,0x2 LAB_00151414: CMP EAX,0xa JZ 0x0015142b CMP EAX,0xd JNZ 0x00151454 XOR EAX,EAX CMP byte ptr [R13],0xa SETZ AL ADD R13,RAX LAB_0015142b: INC dword ptr [RBX + 0x10] LEA RAX,[R13 + -0x1] MOV qword ptr [RBX + 0x80],RAX MOV qword ptr [RBX + 0x88],R13 MOV ESI,R14D LAB_00151443: MOV R12,R13 JMP 0x00151472 LAB_00151448: CMP byte ptr [R12],0x7b PUSH 0x24 POP RSI JNZ 0x00151472 JMP 0x001514b8 LAB_00151454: CMP EAX,0x80 JC 0x00151487 LEA RDI,[R13 + -0x1] MOV RSI,RSP CALL 0x00115f80 MOV R12,qword ptr [RSP] CMP R12,R13 JZ 0x001514e3 MOV ESI,EAX LAB_00151472: MOV RDI,R15 CALL 0x0012ca82 MOV R13,R12 TEST EAX,EAX JZ 0x001513c4 JMP 0x0015149c LAB_00151487: MOV ESI,EAX JMP 0x00151443 LAB_0015148b: LEA RSI,[0x187771] LAB_00151492: MOV RDI,RBX XOR EAX,EAX CALL 0x00128457 LAB_0015149c: LEA RDI,[RSP + 0x8] CALL 0x0012ef01 PUSH -0x1 POP RAX LAB_001514a9: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001514b8: ADD R13,0x2 MOV R12,R13 LAB_001514bf: MOV dword ptr [RBX + 0x20],0xffffff82 MOV dword ptr [RBX + 0x48],EAX LEA RDI,[RSP + 0x8] CALL 0x0012cad4 MOV qword ptr [RBX + 0x38],RAX MOV qword ptr [RBX + 0x40],RDX MOV qword ptr [RBX + 0x70],R12 XOR EAX,EAX JMP 0x001514a9 LAB_001514e3: LEA RSI,[0x18775a] JMP 0x00151492
int8 js_parse_template_part(int8 *param_1,byte *param_2) { byte bVar1; int iVar2; uint uVar3; char *pcVar4; byte *pbVar5; bool bVar6; int1 auVar7 [16]; byte *local_58; int1 local_50 [32]; iVar2 = string_buffer_init(*param_1,local_50,0x20); if (iVar2 == 0) { do { if ((byte *)param_1[0xf] <= param_2) { LAB_0015148b: pcVar4 = "unexpected end of string"; LAB_00151492: js_parse_error(param_1,pcVar4); break; } pbVar5 = param_2 + 1; bVar1 = *param_2; if (bVar1 == 0x24) { uVar3 = 0x24; if (*pbVar5 == 0x7b) { pbVar5 = param_2 + 2; LAB_001514bf: *(int4 *)(param_1 + 4) = 0xffffff82; *(uint *)(param_1 + 9) = (uint)bVar1; auVar7 = string_buffer_end(local_50); *(int1 (*) [16])(param_1 + 7) = auVar7; param_1[0xe] = pbVar5; return 0; } } else { if (bVar1 == 0x5c) { iVar2 = string_buffer_putc8(local_50,0x5c); if (iVar2 != 0) break; if ((byte *)param_1[0xf] <= pbVar5) goto LAB_0015148b; bVar1 = param_2[1]; pbVar5 = param_2 + 2; } else if (bVar1 == 0x60) goto LAB_001514bf; uVar3 = (uint)bVar1; if (uVar3 != 10) { if (uVar3 != 0xd) { if ((0x7f < uVar3) && (uVar3 = utf8_decode(pbVar5 + -1,&local_58), bVar6 = local_58 == pbVar5, pbVar5 = local_58, bVar6)) { pcVar4 = "invalid UTF-8 sequence"; goto LAB_00151492; } goto LAB_00151472; } pbVar5 = pbVar5 + (*pbVar5 == 10); } *(int *)(param_1 + 2) = *(int *)(param_1 + 2) + 1; param_1[0x10] = pbVar5 + -1; param_1[0x11] = pbVar5; uVar3 = 10; } LAB_00151472: iVar2 = string_buffer_putc(local_50,uVar3); param_2 = pbVar5; } while (iVar2 == 0); } string_buffer_free(local_50); return 0xffffffffffffffff; }
20,885
my_mb_wc_gb2312
eloqsql/strings/ctype-gb2312.c
static int my_mb_wc_gb2312(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_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F))) return -2; return 2; }
O0
c
my_mb_wc_gb2312: 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 0x8fb8e movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x8fc4c movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x8fbb6 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x8fc4c movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x8fbcd movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x8fc4c movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x8fc09 movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xf7, %eax jg 0x8fc09 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x8fc09 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0x8fc12 movl $0x0, -0x4(%rbp) jmp 0x8fc4c movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi andl $0x7f7f, %edi # imm = 0x7F7F callq 0x8ff60 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x8fc45 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x8fc4c movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_mb_wc_gb2312: 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_8FB8E mov [rbp+var_4], 0FFFFFF9Bh jmp loc_8FC4C loc_8FB8E: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_8FBB6 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_8FC4C loc_8FBB6: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_8FBCD mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_8FC4C loc_8FBCD: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 0A1h cmp eax, ecx jg short loc_8FC09 mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0F7h jg short loc_8FC09 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov eax, 0A1h cmp eax, ecx jg short loc_8FC09 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_8FC12 loc_8FC09: mov [rbp+var_4], 0 jmp short loc_8FC4C loc_8FC12: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax and edi, 7F7Fh call func_gb2312_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_8FC45 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_8FC4C loc_8FC45: mov [rbp+var_4], 2 loc_8FC4C: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_gb2312(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { int v4; // eax __int16 v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v6 = *a3; if ( *a3 >= 0x80u ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (unsigned __int8)v6 < 0xA1u || (unsigned __int8)v6 > 0xF7u || a3[1] < 0xA1u || a3[1] == 255 ) { return 0; } else { v4 = func_gb2312_uni_onechar((a3[1] + (v6 << 8)) & 0x7F7F); *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_gb2312: 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 0x0018fb8e MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0018fc4c LAB_0018fb8e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x0018fbb6 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018fc4c LAB_0018fbb6: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0018fbcd MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0018fc4c LAB_0018fbcd: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0xa1 CMP EAX,ECX JG 0x0018fc09 MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xf7 JG 0x0018fc09 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0xa1 CMP EAX,ECX JG 0x0018fc09 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x0018fc12 LAB_0018fc09: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018fc4c LAB_0018fc12: MOV EDI,dword ptr [RBP + -0x2c] SHL EDI,0x8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EDI,EAX AND EDI,0x7f7f CALL 0x0018ff60 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x0018fc45 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x0018fc4c LAB_0018fc45: MOV dword ptr [RBP + -0x4],0x2 LAB_0018fc4c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_gb2312(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) || (0xf7 < uVar1)) || (param_3[1] < 0xa1)) || (param_3[1] == 0xff)) { local_c = 0; } else { iVar2 = func_gb2312_uni_onechar(uVar1 * 0x100 + (uint)param_3[1] & 0x7f7f); *param_2 = (long)iVar2; if ((long)iVar2 == 0) { local_c = 0xfffffffe; } else { local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
20,886
progress_display::progress_display(double, char const*, char const*, char const*)
iqtree3/utils/progress.cpp
progress_display::progress_display( double workToDo, const char* doingWhat , const char* verb, const char* unitName) : startTime(getRealTime()), startCPUTime(getCPUTime()) , totalWorkToDo(workToDo), workDone(0.0) , taskDescription(doingWhat), isDone(false) , workVerb(verb), workUnitName(unitName) { lastReportedWork = 0.0; lastReportedTime = startTime; lastReportedCPUTime = startCPUTime; }
O3
cpp
progress_display::progress_display(double, char const*, char const*, char const*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movsd %xmm0, 0x8(%rsp) movq %rdi, %rbx leaq 0x10(%rsp), %r13 movq %r13, %rdi xorl %esi, %esi callq 0x15510 xorps %xmm0, %xmm0 cvtsi2sdq (%r13), %xmm0 cvtsi2sdq 0x8(%r13), %xmm1 divsd 0x18a6(%rip), %xmm1 # 0x2b458 addsd %xmm0, %xmm1 movsd %xmm1, (%rbx) leaq 0x10(%rsp), %r13 xorl %edi, %edi movq %r13, %rsi callq 0x15190 xorps %xmm0, %xmm0 cvtsi2sdq (%r13), %xmm0 xorps %xmm1, %xmm1 cvtsi2sdq 0x8(%r13), %xmm1 divsd 0x1875(%rip), %xmm1 # 0x2b458 addsd %xmm0, %xmm1 movsd %xmm1, 0x8(%rbx) movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x10(%rbx) movq $0x0, 0x18(%rbx) leaq 0x20(%rbx), %rdi leaq 0x10(%rsp), %rdx movq %r12, %rsi callq 0x16c5c movb $0x0, 0x40(%rbx) leaq 0x48(%rbx), %rdi leaq 0x10(%rsp), %rdx movq %r15, %rsi callq 0x16c5c leaq 0x68(%rbx), %rdi leaq 0x10(%rsp), %rdx movq %r14, %rsi callq 0x16c5c movq $0x0, 0x88(%rbx) movups (%rbx), %xmm0 movups %xmm0, 0x90(%rbx) addq $0xa0, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq 0x48(%rbx), %rdi leaq 0x58(%rbx), %rax cmpq %rax, %rdi je 0x29c7c movq (%rax), %rsi incq %rsi callq 0x152e0 jmp 0x29c7c movq %rax, %r14 movq 0x20(%rbx), %rdi addq $0x30, %rbx cmpq %rbx, %rdi je 0x29c94 movq (%rbx), %rsi incq %rsi callq 0x152e0 movq %r14, %rdi callq 0x15580
_ZN16progress_displayC2EdPKcS1_S1_: push r15; Alternative name is 'progress_display::progress_display(double, char const*, char const*, char const*)' push r14 push r13 push r12 push rbx sub rsp, 0A0h mov r14, rcx mov r15, rdx mov r12, rsi movsd [rsp+0C8h+var_C0], xmm0 mov rbx, rdi lea r13, [rsp+0C8h+var_B8] mov rdi, r13 xor esi, esi call _gettimeofday xorps xmm0, xmm0 cvtsi2sd xmm0, qword ptr [r13+0] cvtsi2sd xmm1, qword ptr [r13+8] divsd xmm1, cs:qword_2B458 addsd xmm1, xmm0 movsd qword ptr [rbx], xmm1 lea r13, [rsp+0C8h+var_B8] xor edi, edi mov rsi, r13 call _getrusage xorps xmm0, xmm0 cvtsi2sd xmm0, qword ptr [r13+0] xorps xmm1, xmm1 cvtsi2sd xmm1, qword ptr [r13+8] divsd xmm1, cs:qword_2B458 addsd xmm1, xmm0 movsd qword ptr [rbx+8], xmm1 movsd xmm0, [rsp+0C8h+var_C0] movsd qword ptr [rbx+10h], xmm0 mov qword ptr [rbx+18h], 0 lea rdi, [rbx+20h] lea rdx, [rsp+0C8h+var_B8] mov rsi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov byte ptr [rbx+40h], 0 lea rdi, [rbx+48h] lea rdx, [rsp+0C8h+var_B8] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rbx+68h] lea rdx, [rsp+0C8h+var_B8] mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov qword ptr [rbx+88h], 0 movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rbx+90h], xmm0 add rsp, 0A0h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx+48h]; void * lea rax, [rbx+58h] cmp rdi, rax jz short loc_29C7C mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_29C7C mov r14, rax loc_29C7C: mov rdi, [rbx+20h]; void * add rbx, 30h ; '0' cmp rdi, rbx jz short loc_29C94 mov rsi, [rbx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_29C94: mov rdi, r14 call __Unwind_Resume
void progress_display::progress_display( progress_display *this, double a2, const char *a3, const char *a4, const char *a5) { int v7; // [rsp+10h] [rbp-B8h] BYREF int v8; // [rsp+18h] [rbp-B0h] gettimeofday(&v7, 0LL); *(double *)this = (double)v8 / 1000000.0 + (double)v7; getrusage(0LL, &v7); *((double *)this + 1) = (double)v8 / 1000000.0 + (double)v7; *((_OWORD *)this + 1) = *(unsigned long long *)&a2; std::string::basic_string<std::allocator<char>>((_QWORD *)this + 4, (long long)a3); *((_BYTE *)this + 64) = 0; std::string::basic_string<std::allocator<char>>((_QWORD *)this + 9, (long long)a4); std::string::basic_string<std::allocator<char>>((_QWORD *)this + 13, (long long)a5); *((_QWORD *)this + 17) = 0LL; *((_OWORD *)this + 9) = *(_OWORD *)this; }
progress_display: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOVSD qword ptr [RSP + 0x8],XMM0 MOV RBX,RDI LEA R13,[RSP + 0x10] MOV RDI,R13 XOR ESI,ESI CALL 0x00115510 XORPS XMM0,XMM0 CVTSI2SD XMM0,qword ptr [R13] CVTSI2SD XMM1,qword ptr [R13 + 0x8] DIVSD XMM1,qword ptr [0x0012b458] ADDSD XMM1,XMM0 MOVSD qword ptr [RBX],XMM1 LEA R13,[RSP + 0x10] XOR EDI,EDI MOV RSI,R13 CALL 0x00115190 XORPS XMM0,XMM0 CVTSI2SD XMM0,qword ptr [R13] XORPS XMM1,XMM1 CVTSI2SD XMM1,qword ptr [R13 + 0x8] DIVSD XMM1,qword ptr [0x0012b458] ADDSD XMM1,XMM0 MOVSD qword ptr [RBX + 0x8],XMM1 MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD qword ptr [RBX + 0x10],XMM0 MOV qword ptr [RBX + 0x18],0x0 LEA RDI,[RBX + 0x20] LEA RDX,[RSP + 0x10] MOV RSI,R12 CALL 0x00116c5c MOV byte ptr [RBX + 0x40],0x0 LEA RDI,[RBX + 0x48] LAB_00129c18: LEA RDX,[RSP + 0x10] MOV RSI,R15 CALL 0x00116c5c LEA RDI,[RBX + 0x68] LAB_00129c29: LEA RDX,[RSP + 0x10] MOV RSI,R14 CALL 0x00116c5c LAB_00129c36: MOV qword ptr [RBX + 0x88],0x0 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RBX + 0x90],XMM0 ADD RSP,0xa0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* progress_display::progress_display(double, char const*, char const*, char const*) */ void __thiscall progress_display::progress_display (progress_display *this,double param_1,char *param_2,char *param_3,char *param_4) { rusage local_b8; gettimeofday(&local_b8.ru_utime,(__timezone_ptr_t)0x0); *(double *)this = (double)local_b8.ru_utime.tv_usec / _DAT_0012b458 + (double)local_b8.ru_utime.tv_sec; getrusage(RUSAGE_SELF,&local_b8); *(double *)(this + 8) = (double)local_b8.ru_utime.tv_usec / _DAT_0012b458 + (double)local_b8.ru_utime.tv_sec; *(double *)(this + 0x10) = param_1; *(int8 *)(this + 0x18) = 0; std::__cxx11::string::string<std::allocator<char>> ((string *)(this + 0x20),param_2,(allocator *)&local_b8); this[0x40] = (progress_display)0x0; /* try { // try from 00129c18 to 00129c24 has its CatchHandler @ 00129c79 */ std::__cxx11::string::string<std::allocator<char>> ((string *)(this + 0x48),param_3,(allocator *)&local_b8); /* try { // try from 00129c29 to 00129c35 has its CatchHandler @ 00129c5c */ std::__cxx11::string::string<std::allocator<char>> ((string *)(this + 0x68),param_4,(allocator *)&local_b8); *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x90) = *(int8 *)this; *(int8 *)(this + 0x98) = *(int8 *)(this + 8); return; }
20,887
mbedtls_rsa_export_raw
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/rsa.c
int mbedtls_rsa_export_raw(const mbedtls_rsa_context *ctx, unsigned char *N, size_t N_len, unsigned char *P, size_t P_len, unsigned char *Q, size_t Q_len, unsigned char *D, size_t D_len, unsigned char *E, size_t E_len) { int ret = 0; int is_priv; RSA_VALIDATE_RET(ctx != NULL); /* Check if key is private or public */ is_priv = mbedtls_mpi_cmp_int(&ctx->N, 0) != 0 && mbedtls_mpi_cmp_int(&ctx->P, 0) != 0 && mbedtls_mpi_cmp_int(&ctx->Q, 0) != 0 && mbedtls_mpi_cmp_int(&ctx->D, 0) != 0 && mbedtls_mpi_cmp_int(&ctx->E, 0) != 0; if (!is_priv) { /* If we're trying to export private parameters for a public key, * something must be wrong. */ if (P != NULL || Q != NULL || D != NULL) { return MBEDTLS_ERR_RSA_BAD_INPUT_DATA; } } if (N != NULL) { MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&ctx->N, N, N_len)); } if (P != NULL) { MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&ctx->P, P, P_len)); } if (Q != NULL) { MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&ctx->Q, Q, Q_len)); } if (D != NULL) { MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&ctx->D, D, D_len)); } if (E != NULL) { MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&ctx->E, E, E_len)); } cleanup: return ret; }
O3
c
mbedtls_rsa_export_raw: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %rbp movq %r8, 0x28(%rsp) movq %rcx, %r12 movq %rdx, 0x30(%rsp) movq %rsi, %r15 movq %rdi, %r14 movq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x78(%rsp), %r13 movq 0x70(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x10(%rdi), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x7f149 testl %eax, %eax je 0x8fb1d leaq 0x58(%r14), %rdi xorl %esi, %esi callq 0x7f149 testl %eax, %eax je 0x8fb1d leaq 0x70(%r14), %rdi xorl %esi, %esi callq 0x7f149 testl %eax, %eax je 0x8fb1d leaq 0x40(%r14), %rdi xorl %esi, %esi callq 0x7f149 testl %eax, %eax je 0x8fb1d leaq 0x28(%r14), %rdi xorl %esi, %esi callq 0x7f149 testl %eax, %eax jne 0x8fb31 movq %r12, %rcx orq %rbp, %rcx movl $0xffffbf80, %eax # imm = 0xFFFFBF80 orq %r13, %rcx jne 0x8fbd9 testq %r15, %r15 je 0x8fb4e movq %rbx, %rdi movq %r15, %rsi movq 0x30(%rsp), %rdx callq 0x7ed97 testl %eax, %eax jne 0x8fbd9 testq %r12, %r12 je 0x8fb68 leaq 0x58(%r14), %rdi movq %r12, %rsi movq 0x28(%rsp), %rdx callq 0x7ed97 testl %eax, %eax jne 0x8fbd9 testq %rbp, %rbp je 0x8fb82 leaq 0x70(%r14), %rdi movq %rbp, %rsi movq 0x20(%rsp), %rdx callq 0x7ed97 testl %eax, %eax jne 0x8fbd9 testq %r13, %r13 je 0x8fbae leaq 0x40(%r14), %rdi movq %r13, %rsi movq 0x18(%rsp), %rdx callq 0x7ed97 testl %eax, %eax sete %cl movq 0x8(%rsp), %rsi testq %rsi, %rsi setne %dl testb %cl, %dl jne 0x8fbb8 jmp 0x8fbd9 movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0x8fbd7 addq $0x28, %r14 movq %r14, %rdi movq 0x10(%rsp), %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x7ed97 xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mbedtls_rsa_export_raw: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbp, r9 mov [rsp+68h+var_40], r8 mov r12, rcx mov [rsp+68h+var_38], rdx mov r15, rsi mov r14, rdi mov rax, [rsp+68h+arg_20] mov [rsp+68h+var_58], rax mov rax, [rsp+68h+arg_18] mov [rsp+68h+var_60], rax mov rax, [rsp+68h+arg_10] mov [rsp+68h+var_50], rax mov r13, [rsp+68h+arg_8] mov rax, [rsp+68h+arg_0] mov [rsp+68h+var_48], rax lea rbx, [rdi+10h] mov rdi, rbx xor esi, esi call mbedtls_mpi_cmp_int test eax, eax jz short loc_8FB1D lea rdi, [r14+58h] xor esi, esi call mbedtls_mpi_cmp_int test eax, eax jz short loc_8FB1D lea rdi, [r14+70h] xor esi, esi call mbedtls_mpi_cmp_int test eax, eax jz short loc_8FB1D lea rdi, [r14+40h] xor esi, esi call mbedtls_mpi_cmp_int test eax, eax jz short loc_8FB1D lea rdi, [r14+28h] xor esi, esi call mbedtls_mpi_cmp_int test eax, eax jnz short loc_8FB31 loc_8FB1D: mov rcx, r12 or rcx, rbp mov eax, 0FFFFBF80h or rcx, r13 jnz loc_8FBD9 loc_8FB31: test r15, r15 jz short loc_8FB4E mov rdi, rbx mov rsi, r15 mov rdx, [rsp+68h+var_38] call mbedtls_mpi_write_binary test eax, eax jnz loc_8FBD9 loc_8FB4E: test r12, r12 jz short loc_8FB68 lea rdi, [r14+58h] mov rsi, r12 mov rdx, [rsp+68h+var_40] call mbedtls_mpi_write_binary test eax, eax jnz short loc_8FBD9 loc_8FB68: test rbp, rbp jz short loc_8FB82 lea rdi, [r14+70h] mov rsi, rbp mov rdx, [rsp+68h+var_48] call mbedtls_mpi_write_binary test eax, eax jnz short loc_8FBD9 loc_8FB82: test r13, r13 jz short loc_8FBAE lea rdi, [r14+40h] mov rsi, r13 mov rdx, [rsp+68h+var_50] call mbedtls_mpi_write_binary test eax, eax setz cl mov rsi, [rsp+68h+var_60] test rsi, rsi setnz dl test dl, cl jnz short loc_8FBB8 jmp short loc_8FBD9 loc_8FBAE: mov rsi, [rsp+68h+var_60] test rsi, rsi jz short loc_8FBD7 loc_8FBB8: add r14, 28h ; '(' mov rdi, r14 mov rdx, [rsp+68h+var_58] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp mbedtls_mpi_write_binary loc_8FBD7: xor eax, eax loc_8FBD9: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mbedtls_rsa_export_raw( _QWORD *a1, unsigned long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5, unsigned long long a6, unsigned long long a7, unsigned long long a8, unsigned long long a9, unsigned long long a10, unsigned long long a11) { long long result; // rax unsigned long long v14; // rsi if ( (unsigned int)mbedtls_mpi_cmp_int(a1 + 2, 0LL) && (unsigned int)mbedtls_mpi_cmp_int(a1 + 11, 0LL) && (unsigned int)mbedtls_mpi_cmp_int(a1 + 14, 0LL) && (unsigned int)mbedtls_mpi_cmp_int(a1 + 8, 0LL) && (unsigned int)mbedtls_mpi_cmp_int(a1 + 5, 0LL) || (result = 4294950784LL, !(a8 | a6 | a4)) ) { if ( !a2 || (result = mbedtls_mpi_write_binary((long long)(a1 + 2), a2, a3), !(_DWORD)result) ) { if ( !a4 || (result = mbedtls_mpi_write_binary((long long)(a1 + 11), a4, a5), !(_DWORD)result) ) { if ( !a6 || (result = mbedtls_mpi_write_binary((long long)(a1 + 14), a6, a7), !(_DWORD)result) ) { if ( a8 ) { result = mbedtls_mpi_write_binary((long long)(a1 + 8), a8, a9); v14 = a10; if ( (_DWORD)result != 0 || a10 == 0 ) return result; } else { v14 = a10; if ( !a10 ) return 0LL; } return mbedtls_mpi_write_binary((long long)(a1 + 5), v14, a11); } } } } return result; }
mbedtls_rsa_export_raw: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBP,R9 MOV qword ptr [RSP + 0x28],R8 MOV R12,RCX MOV qword ptr [RSP + 0x30],RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x18],RAX MOV R13,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x20],RAX LEA RBX,[RDI + 0x10] MOV RDI,RBX XOR ESI,ESI CALL 0x0017f149 TEST EAX,EAX JZ 0x0018fb1d LEA RDI,[R14 + 0x58] XOR ESI,ESI CALL 0x0017f149 TEST EAX,EAX JZ 0x0018fb1d LEA RDI,[R14 + 0x70] XOR ESI,ESI CALL 0x0017f149 TEST EAX,EAX JZ 0x0018fb1d LEA RDI,[R14 + 0x40] XOR ESI,ESI CALL 0x0017f149 TEST EAX,EAX JZ 0x0018fb1d LEA RDI,[R14 + 0x28] XOR ESI,ESI CALL 0x0017f149 TEST EAX,EAX JNZ 0x0018fb31 LAB_0018fb1d: MOV RCX,R12 OR RCX,RBP MOV EAX,0xffffbf80 OR RCX,R13 JNZ 0x0018fbd9 LAB_0018fb31: TEST R15,R15 JZ 0x0018fb4e MOV RDI,RBX MOV RSI,R15 MOV RDX,qword ptr [RSP + 0x30] CALL 0x0017ed97 TEST EAX,EAX JNZ 0x0018fbd9 LAB_0018fb4e: TEST R12,R12 JZ 0x0018fb68 LEA RDI,[R14 + 0x58] MOV RSI,R12 MOV RDX,qword ptr [RSP + 0x28] CALL 0x0017ed97 TEST EAX,EAX JNZ 0x0018fbd9 LAB_0018fb68: TEST RBP,RBP JZ 0x0018fb82 LEA RDI,[R14 + 0x70] MOV RSI,RBP MOV RDX,qword ptr [RSP + 0x20] CALL 0x0017ed97 TEST EAX,EAX JNZ 0x0018fbd9 LAB_0018fb82: TEST R13,R13 JZ 0x0018fbae LEA RDI,[R14 + 0x40] MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x18] CALL 0x0017ed97 TEST EAX,EAX SETZ CL MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI SETNZ DL TEST DL,CL JNZ 0x0018fbb8 JMP 0x0018fbd9 LAB_0018fbae: MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI JZ 0x0018fbd7 LAB_0018fbb8: ADD R14,0x28 MOV RDI,R14 MOV RDX,qword ptr [RSP + 0x10] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0017ed97 LAB_0018fbd7: XOR EAX,EAX LAB_0018fbd9: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 mbedtls_rsa_export_raw (long param_1,long param_2,int8 param_3,long param_4,int8 param_5,long param_6 ,int8 param_7,long param_8,int8 param_9,long param_10,int8 param_11) { int iVar1; int8 uVar2; iVar1 = mbedtls_mpi_cmp_int(param_1 + 0x10,0); if ((((((iVar1 != 0) && (iVar1 = mbedtls_mpi_cmp_int(param_1 + 0x58,0), iVar1 != 0)) && (iVar1 = mbedtls_mpi_cmp_int(param_1 + 0x70,0), iVar1 != 0)) && ((iVar1 = mbedtls_mpi_cmp_int(param_1 + 0x40,0), iVar1 != 0 && (iVar1 = mbedtls_mpi_cmp_int(param_1 + 0x28,0), iVar1 != 0)))) || (uVar2 = 0xffffbf80, (param_4 == 0 && param_6 == 0) && param_8 == 0)) && ((((param_2 == 0 || (uVar2 = mbedtls_mpi_write_binary(param_1 + 0x10,param_2,param_3), (int)uVar2 == 0)) && ((param_4 == 0 || (uVar2 = mbedtls_mpi_write_binary(param_1 + 0x58,param_4,param_5), (int)uVar2 == 0)))) && ((param_6 == 0 || (uVar2 = mbedtls_mpi_write_binary(param_1 + 0x70,param_6,param_7), (int)uVar2 == 0)))))) { if (param_8 == 0) { if (param_10 != 0) goto LAB_0018fbb8; uVar2 = 0; } else { uVar2 = mbedtls_mpi_write_binary(param_1 + 0x40,param_8,param_9); if (param_10 != 0 && (int)uVar2 == 0) { LAB_0018fbb8: uVar2 = mbedtls_mpi_write_binary(param_1 + 0x28,param_10,param_11); return uVar2; } } } return uVar2; }
20,888
end_io_cache
eloqsql/mysys/mf_iocache.c
int end_io_cache(IO_CACHE *info) { int error=0; DBUG_ENTER("end_io_cache"); DBUG_PRINT("enter",("cache: %p", info)); /* Every thread must call remove_io_thread(). The last one destroys the share elements. */ DBUG_ASSERT(!info->share || !info->share->total_threads); if (info->alloced_buffer) { info->alloced_buffer=0; if (info->file != -1) /* File doesn't exist */ error= my_b_flush_io_cache(info,1); my_free(info->buffer); info->buffer=info->read_pos=(uchar*) 0; } if (info->type == SEQ_READ_APPEND) { /* Destroy allocated mutex */ mysql_mutex_destroy(&info->append_buffer_lock); } info->share= 0; info->type= TYPE_NOT_SET; /* Ensure that flush_io_cache() does nothing */ info->write_end= 0; /* Ensure that my_b_write() fails */ info->write_function= 0; /* my_b_write will crash if used */ DBUG_RETURN(error); }
O3
c
end_io_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, 0x100(%rdi) je 0x2bf30 movq $0x0, 0x100(%rbx) cmpl $-0x1, 0xd4(%rbx) je 0x2bf35 movq %rbx, %rdi movl $0x1, %esi callq 0x2af4d movl %eax, %r14d jmp 0x2bf38 xorl %r14d, %r14d jmp 0x2bf4b xorl %r14d, %r14d movq 0x20(%rbx), %rdi callq 0x30306 xorl %eax, %eax movq %rax, 0x10(%rbx) movq %rax, 0x20(%rbx) cmpl $0x3, 0xb0(%rbx) jne 0x2bf84 leaq 0x50(%rbx), %r15 movq 0x90(%rbx), %rdi testq %rdi, %rdi je 0x2bf7c leaq 0x2cec1d(%rip), %rax # 0x2fab88 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x90(%rbx) movq %r15, %rdi callq 0x24420 xorl %eax, %eax movq %rax, 0x98(%rbx) movl $0x0, 0xb0(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0xa8(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
end_io_cache: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi cmp qword ptr [rdi+100h], 0 jz short loc_2BF30 mov qword ptr [rbx+100h], 0 cmp dword ptr [rbx+0D4h], 0FFFFFFFFh jz short loc_2BF35 mov rdi, rbx mov esi, 1 call my_b_flush_io_cache mov r14d, eax jmp short loc_2BF38 loc_2BF30: xor r14d, r14d jmp short loc_2BF4B loc_2BF35: xor r14d, r14d loc_2BF38: mov rdi, [rbx+20h] call my_free xor eax, eax mov [rbx+10h], rax mov [rbx+20h], rax loc_2BF4B: cmp dword ptr [rbx+0B0h], 3 jnz short loc_2BF84 lea r15, [rbx+50h] mov rdi, [rbx+90h] test rdi, rdi jz short loc_2BF7C lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+90h], 0 loc_2BF7C: mov rdi, r15 call _pthread_mutex_destroy loc_2BF84: xor eax, eax mov [rbx+98h], rax mov dword ptr [rbx+0B0h], 0 mov [rbx+48h], rax mov [rbx+0A8h], rax mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long end_io_cache(long long a1) { unsigned int v2; // r14d long long v3; // rdi if ( *(_QWORD *)(a1 + 256) ) { *(_QWORD *)(a1 + 256) = 0LL; if ( *(_DWORD *)(a1 + 212) == -1 ) v2 = 0; else v2 = my_b_flush_io_cache((long long *)a1, 1); my_free(*(_QWORD *)(a1 + 32)); *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; } else { v2 = 0; } if ( *(_DWORD *)(a1 + 176) == 3 ) { v3 = *(_QWORD *)(a1 + 144); if ( v3 ) { (*((void ( **)(long long))PSI_server + 9))(v3); *(_QWORD *)(a1 + 144) = 0LL; } pthread_mutex_destroy(a1 + 80); } *(_QWORD *)(a1 + 152) = 0LL; *(_DWORD *)(a1 + 176) = 0; *(_QWORD *)(a1 + 72) = 0LL; *(_QWORD *)(a1 + 168) = 0LL; return v2; }
end_io_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP qword ptr [RDI + 0x100],0x0 JZ 0x0012bf30 MOV qword ptr [RBX + 0x100],0x0 CMP dword ptr [RBX + 0xd4],-0x1 JZ 0x0012bf35 MOV RDI,RBX MOV ESI,0x1 CALL 0x0012af4d MOV R14D,EAX JMP 0x0012bf38 LAB_0012bf30: XOR R14D,R14D JMP 0x0012bf4b LAB_0012bf35: XOR R14D,R14D LAB_0012bf38: MOV RDI,qword ptr [RBX + 0x20] CALL 0x00130306 XOR EAX,EAX MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RBX + 0x20],RAX LAB_0012bf4b: CMP dword ptr [RBX + 0xb0],0x3 JNZ 0x0012bf84 LEA R15,[RBX + 0x50] MOV RDI,qword ptr [RBX + 0x90] TEST RDI,RDI JZ 0x0012bf7c LEA RAX,[0x3fab88] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x90],0x0 LAB_0012bf7c: MOV RDI,R15 CALL 0x00124420 LAB_0012bf84: XOR EAX,EAX MOV qword ptr [RBX + 0x98],RAX MOV dword ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0xa8],RAX MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 end_io_cache(long param_1) { int4 uVar1; if (*(long *)(param_1 + 0x100) == 0) { uVar1 = 0; } else { *(int8 *)(param_1 + 0x100) = 0; if (*(int *)(param_1 + 0xd4) == -1) { uVar1 = 0; } else { uVar1 = my_b_flush_io_cache(param_1,1); } my_free(*(int8 *)(param_1 + 0x20)); *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x20) = 0; } if (*(int *)(param_1 + 0xb0) == 3) { if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(param_1 + 0x90) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x50)); } *(int8 *)(param_1 + 0x98) = 0; *(int4 *)(param_1 + 0xb0) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0xa8) = 0; return uVar1; }
20,889
remove_key
eloqsql/storage/maria/ma_delete.c
static uint remove_key(MARIA_KEYDEF *keyinfo, uint page_flag, uint nod_flag, uchar *keypos, uchar *lastkey, uchar *page_end, my_off_t *next_block, MARIA_KEY_PARAM *s_temp) { int s_length; uchar *start; DBUG_ENTER("remove_key"); DBUG_PRINT("enter", ("keypos:%p page_end: %p", keypos, page_end)); start= s_temp->key_pos= keypos; s_temp->changed_length= 0; if (!(keyinfo->flag & (HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && !(page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { /* Static length key */ s_length=(int) (keyinfo->keylength+nod_flag); if (next_block && nod_flag) *next_block= _ma_kpos(nod_flag,keypos+s_length); } else { /* Let keypos point at next key */ MARIA_KEY key; /* Calculate length of key */ key.keyinfo= keyinfo; key.data= lastkey; if (!(*keyinfo->get_key)(&key, page_flag, nod_flag, &keypos)) DBUG_RETURN(0); /* Error */ if (next_block && nod_flag) *next_block= _ma_kpos(nod_flag,keypos); s_length=(int) (keypos-start); if (keypos != page_end) { if (keyinfo->flag & HA_BINARY_PACK_KEY) { uchar *old_key= start; uint next_length,prev_length,prev_pack_length; /* keypos points here on start of next key */ get_key_length(next_length,keypos); get_key_pack_length(prev_length,prev_pack_length,old_key); if (next_length > prev_length) { uint diff= (next_length-prev_length); /* We have to copy data from the current key to the next key */ keypos-= diff + prev_pack_length; store_key_length(keypos, prev_length); bmove(keypos + prev_pack_length, lastkey + prev_length, diff); s_length=(int) (keypos-start); s_temp->changed_length= diff + prev_pack_length; } } else { /* Check if a variable length first key part */ if ((keyinfo->seg->flag & HA_PACK_KEY) && *keypos & 128) { /* Next key is packed against the current one */ uint next_length,prev_length,prev_pack_length,lastkey_length, rest_length; if (keyinfo->seg[0].length >= 127) { if (!(prev_length=mi_uint2korr(start) & 32767)) goto end; next_length=mi_uint2korr(keypos) & 32767; keypos+=2; prev_pack_length=2; } else { if (!(prev_length= *start & 127)) goto end; /* Same key as previous*/ next_length= *keypos & 127; keypos++; prev_pack_length=1; } if (!(*start & 128)) prev_length=0; /* prev key not packed */ if (keyinfo->seg[0].flag & HA_NULL_PART) lastkey++; /* Skip null marker */ get_key_length(lastkey_length,lastkey); if (!next_length) /* Same key after */ { next_length=lastkey_length; rest_length=0; } else get_key_length(rest_length,keypos); if (next_length >= prev_length) { /* Next key is based on deleted key */ uint pack_length; uint diff= (next_length-prev_length); /* keypos points to data of next key (after key length) */ bmove(keypos - diff, lastkey + prev_length, diff); rest_length+= diff; pack_length= prev_length ? get_pack_length(rest_length): 0; keypos-= diff + pack_length + prev_pack_length; s_length=(int) (keypos-start); if (prev_length) /* Pack against prev key */ { *keypos++= start[0]; if (prev_pack_length == 2) *keypos++= start[1]; store_key_length(keypos,rest_length); } else { /* Next key is not packed anymore */ if (keyinfo->seg[0].flag & HA_NULL_PART) { rest_length++; /* Mark not null */ } if (prev_pack_length == 2) { mi_int2store(keypos,rest_length); } else *keypos= rest_length; } s_temp->changed_length= diff + pack_length + prev_pack_length; } } } } } end: bmove(start, start+s_length, (uint) (page_end-start-s_length)); s_temp->move_length= s_length; DBUG_RETURN((uint) s_length); }
O3
c
remove_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r13 movq %rcx, %r14 movl %edx, %r15d movq %rdi, %r12 movq 0x18(%rbp), %rax movq 0x10(%rbp), %rbx movq %rcx, -0x30(%rbp) movq %rcx, 0x18(%rax) movl $0x0, 0x40(%rax) testb $0x2, %sil jne 0x6846a movzwl 0xa2(%r12), %eax andl $0x2e, %eax jne 0x6846a movzwl 0xaa(%r12), %r13d addl %r15d, %r13d testq %rbx, %rbx sete %al testl %r15d, %r15d sete %cl orb %al, %cl jne 0x6864f movslq %r13d, %rsi addq %r14, %rsi movl %r15d, %edi movq %r9, %r15 callq 0x56ee7 movq %r15, %r9 movq %rax, (%rbx) jmp 0x6864f movq %r9, -0x48(%rbp) leaq -0x68(%rbp), %rdi movq %r12, 0x8(%rdi) movq %r13, (%rdi) leaq -0x30(%rbp), %rcx movl %r15d, %edx callq *0xe0(%r12) testl %eax, %eax je 0x68542 movq %r13, -0x40(%rbp) testq %rbx, %rbx sete %al testl %r15d, %r15d sete %cl orb %al, %cl jne 0x684b3 movq -0x30(%rbp), %rsi movl %r15d, %edi callq 0x56ee7 movq %rax, (%rbx) movq -0x30(%rbp), %rax movq -0x48(%rbp), %r9 movq %r9, %r13 cmpq %r9, %rax je 0x6864c testb $0x20, 0xa2(%r12) jne 0x6854a movq 0xc0(%r12), %rdx movzwl 0x12(%rdx), %esi testb $0x2, %sil je 0x68649 movzbl (%rax), %ecx testb %cl, %cl jns 0x68649 movzwl 0x14(%rdx), %edi cmpw $0x7f, %di jb 0x685fb movzbl 0x1(%r14), %edx movzbl (%r14), %r11d movl %r11d, %r8d andl $0x7f, %r8d shll $0x8, %r8d orl %edx, %r8d movq -0x40(%rbp), %r10 je 0x68649 movw %di, -0x32(%rbp) movzbl 0x1(%rax), %edx andl $0x7f, %ecx shll $0x8, %ecx orl %edx, %ecx movl $0x2, %r15d movl $0x2, %edi jmp 0x6861e xorl %r13d, %r13d jmp 0x6866b cmpb $-0x1, (%rax) je 0x68561 leaq 0x1(%rax), %rcx movq %rcx, -0x30(%rbp) movzbl (%rax), %ecx movl $0x1, %edi jmp 0x68579 movzwl 0x1(%rax), %ecx rolw $0x8, %cx movzwl %cx, %ecx leaq 0x3(%rax), %rdx movq %rdx, -0x30(%rbp) movl $0x3, %edi movzbl (%r14), %edx cmpl $0xff, %edx movq -0x40(%rbp), %rsi je 0x68591 movl $0x1, %r8d jmp 0x685a3 movzwl 0x1(%r14), %edx rolw $0x8, %dx movzwl %dx, %edx movl $0x3, %r8d subl %edx, %ecx jbe 0x68649 addq %rdi, %rax leal (%rcx,%r8), %r15d subq %r15, %rax movq %rax, -0x30(%rbp) cmpl $0xfe, %edx ja 0x685c5 movb %dl, (%rax) jmp 0x685d6 movb $-0x1, (%rax) movq -0x30(%rbp), %rax movb %dl, 0x2(%rax) movq -0x30(%rbp), %rax movb %dh, 0x1(%rax) movl %r8d, %edi addq -0x30(%rbp), %rdi movl %edx, %eax addq %rax, %rsi movl %ecx, %edx callq 0x29120 movq -0x30(%rbp), %r13 movq -0x48(%rbp), %r9 movq 0x18(%rbp), %rax movl %r15d, 0x40(%rax) jmp 0x6864c movzbl (%r14), %r11d movl %r11d, %r8d andl $0x7f, %r8d movq -0x40(%rbp), %r10 je 0x68649 movw %di, -0x32(%rbp) andl $0x7f, %ecx movl $0x1, %r15d movl $0x1, %edi addq %rax, %rdi movq %rdi, -0x30(%rbp) xorl %ebx, %ebx testb %r11b, %r11b cmovsl %r8d, %ebx btl $0x4, %esi adcq $0x0, %r10 movzbl (%r10), %edx cmpl $0xff, %edx je 0x6867d movl $0x1, %esi jmp 0x6868e movq %rax, %r13 subl %r14d, %r13d movslq %r13d, %rbx leaq (%r14,%rbx), %rsi subl %esi, %r9d movq %r14, %rdi movq %r9, %rdx callq 0x29120 movq 0x18(%rbp), %rax movl %ebx, 0x44(%rax) movl %r13d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzwl 0x1(%r10), %esi rolw $0x8, %si movzwl %si, %edx movl $0x3, %esi testl %ecx, %ecx je 0x686aa cmpb $-0x1, (%rdi) je 0x686b3 leaq 0x1(%rdi), %r8 movq %r8, -0x30(%rbp) movzbl (%rdi), %edi movl %edi, -0x40(%rbp) movq %r8, %rdi jmp 0x686cd movl $0x0, -0x40(%rbp) jmp 0x686cf movzwl 0x1(%rdi), %r8d rolw $0x8, %r8w movzwl %r8w, %r8d movl %r8d, -0x40(%rbp) addq $0x3, %rdi movq %rdi, -0x30(%rbp) movl %ecx, %edx movq %rax, %r13 subl %ebx, %edx jb 0x6864c addq %rsi, %r10 subq %rdx, %rdi movl %ebx, %esi addq %r10, %rsi movl %r11d, %ebx movq %rdx, %r13 callq 0x29120 movl -0x40(%rbp), %edx addl %r13d, %edx xorl %eax, %eax cmpl $0xff, %edx setae %al xorl %ecx, %ecx testb %bl, %bl leal 0x1(%rax,%rax), %eax cmovnsl %ecx, %eax addl %r13d, %r15d addl %eax, %r15d movq -0x30(%rbp), %r13 subq %r15, %r13 movq %r13, -0x30(%rbp) testb %bl, %bl js 0x6874a movq 0xc0(%r12), %rax movzwl 0x12(%rax), %eax btl $0x4, %eax adcl $0x0, %edx cmpw $0x7f, -0x32(%rbp) jb 0x6878d movb %dl, 0x1(%r13) movq -0x30(%rbp), %rax movb %dh, (%rax) jmp 0x685ed leaq 0x1(%r13), %rax movb (%r14), %cl movq %rax, -0x30(%rbp) movb %cl, (%r13) cmpw $0x7f, -0x32(%rbp) jb 0x68776 movb 0x1(%r14), %al movq -0x30(%rbp), %rcx movl %edx, %esi leaq 0x1(%rcx), %rdx movq %rdx, -0x30(%rbp) movl %esi, %edx movb %al, (%rcx) cmpl $0xfe, %edx movq -0x48(%rbp), %r9 ja 0x68796 movq -0x30(%rbp), %rax movb %dl, (%rax) jmp 0x685f1 movb %dl, (%r13) jmp 0x685ed movq -0x30(%rbp), %rax movb $-0x1, (%rax) movq -0x30(%rbp), %rax movb %dl, 0x2(%rax) movq -0x30(%rbp), %rax movb %dh, 0x1(%rax) jmp 0x685f1
remove_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, r8 mov r14, rcx mov r15d, edx mov r12, rdi mov rax, [rbp+arg_8] mov rbx, [rbp+arg_0] mov [rbp+var_30], rcx mov [rax+18h], rcx mov dword ptr [rax+40h], 0 test sil, 2 jnz short loc_6846A movzx eax, word ptr [r12+0A2h] and eax, 2Eh jnz short loc_6846A movzx r13d, word ptr [r12+0AAh] add r13d, r15d test rbx, rbx setz al test r15d, r15d setz cl or cl, al jnz loc_6864F movsxd rsi, r13d add rsi, r14 mov edi, r15d mov r15, r9 call _ma_kpos mov r9, r15 mov [rbx], rax jmp loc_6864F loc_6846A: mov [rbp+var_48], r9 lea rdi, [rbp+var_68] mov [rdi+8], r12 mov [rdi], r13 lea rcx, [rbp+var_30] mov edx, r15d call qword ptr [r12+0E0h] test eax, eax jz loc_68542 mov [rbp+var_40], r13 test rbx, rbx setz al test r15d, r15d setz cl or cl, al jnz short loc_684B3 mov rsi, [rbp+var_30] mov edi, r15d call _ma_kpos mov [rbx], rax loc_684B3: mov rax, [rbp+var_30] mov r9, [rbp+var_48] mov r13, r9 cmp rax, r9 jz loc_6864C test byte ptr [r12+0A2h], 20h jnz short loc_6854A mov rdx, [r12+0C0h] movzx esi, word ptr [rdx+12h] test sil, 2 jz loc_68649 movzx ecx, byte ptr [rax] test cl, cl jns loc_68649 movzx edi, word ptr [rdx+14h] cmp di, 7Fh jb loc_685FB movzx edx, byte ptr [r14+1] movzx r11d, byte ptr [r14] mov r8d, r11d and r8d, 7Fh shl r8d, 8 or r8d, edx mov r10, [rbp+var_40] jz loc_68649 mov [rbp+var_32], di movzx edx, byte ptr [rax+1] and ecx, 7Fh shl ecx, 8 or ecx, edx mov r15d, 2 mov edi, 2 jmp loc_6861E loc_68542: xor r13d, r13d jmp loc_6866B loc_6854A: cmp byte ptr [rax], 0FFh jz short loc_68561 lea rcx, [rax+1] mov [rbp+var_30], rcx movzx ecx, byte ptr [rax] mov edi, 1 jmp short loc_68579 loc_68561: movzx ecx, word ptr [rax+1] rol cx, 8 movzx ecx, cx lea rdx, [rax+3] mov [rbp+var_30], rdx mov edi, 3 loc_68579: movzx edx, byte ptr [r14] cmp edx, 0FFh mov rsi, [rbp+var_40] jz short loc_68591 mov r8d, 1 jmp short loc_685A3 loc_68591: movzx edx, word ptr [r14+1] rol dx, 8 movzx edx, dx mov r8d, 3 loc_685A3: sub ecx, edx jbe loc_68649 add rax, rdi lea r15d, [rcx+r8] sub rax, r15 mov [rbp+var_30], rax cmp edx, 0FEh ja short loc_685C5 mov [rax], dl jmp short loc_685D6 loc_685C5: mov byte ptr [rax], 0FFh mov rax, [rbp+var_30] mov [rax+2], dl mov rax, [rbp+var_30] mov [rax+1], dh loc_685D6: mov edi, r8d add rdi, [rbp+var_30] mov eax, edx add rsi, rax mov edx, ecx call _memmove mov r13, [rbp+var_30] loc_685ED: mov r9, [rbp+var_48] loc_685F1: mov rax, [rbp+arg_8] mov [rax+40h], r15d jmp short loc_6864C loc_685FB: movzx r11d, byte ptr [r14] mov r8d, r11d and r8d, 7Fh mov r10, [rbp+var_40] jz short loc_68649 mov [rbp+var_32], di and ecx, 7Fh mov r15d, 1 mov edi, 1 loc_6861E: add rdi, rax mov [rbp+var_30], rdi xor ebx, ebx test r11b, r11b cmovs ebx, r8d bt esi, 4 adc r10, 0 movzx edx, byte ptr [r10] cmp edx, 0FFh jz short loc_6867D mov esi, 1 jmp short loc_6868E loc_68649: mov r13, rax loc_6864C: sub r13d, r14d loc_6864F: movsxd rbx, r13d lea rsi, [r14+rbx] sub r9d, esi mov rdi, r14 mov rdx, r9 call _memmove mov rax, [rbp+arg_8] mov [rax+44h], ebx loc_6866B: mov eax, r13d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6867D: movzx esi, word ptr [r10+1] rol si, 8 movzx edx, si mov esi, 3 loc_6868E: test ecx, ecx jz short loc_686AA cmp byte ptr [rdi], 0FFh jz short loc_686B3 lea r8, [rdi+1] mov [rbp+var_30], r8 movzx edi, byte ptr [rdi] mov dword ptr [rbp+var_40], edi mov rdi, r8 jmp short loc_686CD loc_686AA: mov dword ptr [rbp+var_40], 0 jmp short loc_686CF loc_686B3: movzx r8d, word ptr [rdi+1] rol r8w, 8 movzx r8d, r8w mov dword ptr [rbp+var_40], r8d add rdi, 3 mov [rbp+var_30], rdi loc_686CD: mov edx, ecx loc_686CF: mov r13, rax sub edx, ebx jb loc_6864C add r10, rsi sub rdi, rdx mov esi, ebx add rsi, r10 mov ebx, r11d mov r13, rdx call _memmove mov edx, dword ptr [rbp+var_40] add edx, r13d xor eax, eax cmp edx, 0FFh setnb al xor ecx, ecx test bl, bl lea eax, [rax+rax+1] cmovns eax, ecx add r15d, r13d add r15d, eax mov r13, [rbp+var_30] sub r13, r15 mov [rbp+var_30], r13 test bl, bl js short loc_6874A mov rax, [r12+0C0h] movzx eax, word ptr [rax+12h] bt eax, 4 adc edx, 0 cmp [rbp+var_32], 7Fh jb short loc_6878D mov [r13+1], dl mov rax, [rbp+var_30] mov [rax], dh jmp loc_685ED loc_6874A: lea rax, [r13+1] mov cl, [r14] mov [rbp+var_30], rax mov [r13+0], cl cmp [rbp+var_32], 7Fh jb short loc_68776 mov al, [r14+1] mov rcx, [rbp+var_30] mov esi, edx lea rdx, [rcx+1] mov [rbp+var_30], rdx mov edx, esi mov [rcx], al loc_68776: cmp edx, 0FEh mov r9, [rbp+var_48] ja short loc_68796 mov rax, [rbp+var_30] mov [rax], dl jmp loc_685F1 loc_6878D: mov [r13+0], dl jmp loc_685ED loc_68796: mov rax, [rbp+var_30] mov byte ptr [rax], 0FFh mov rax, [rbp+var_30] mov [rax+2], dl mov rax, [rbp+var_30] mov [rax+1], dh jmp loc_685F1
long long remove_key( long long a1, long long a2, unsigned int a3, unsigned __int8 *a4, long long a5, unsigned __int8 *a6, long long *a7, long long a8) { unsigned int v12; // r13d int v13; // r15d long long v14; // rax unsigned __int8 *v15; // rax char *v16; // r13 long long v17; // rdx __int16 v18; // si unsigned __int8 v19; // cl char v20; // r11 int v21; // r8d long long v22; // r10 int v23; // ecx int v24; // r15d long long v25; // rdi unsigned int v26; // ecx long long v27; // rdi unsigned int v28; // edx long long v29; // rsi unsigned int v30; // r8d bool v31; // cc unsigned int v32; // ecx long long v33; // r15 unsigned __int8 *v34; // rax unsigned __int8 *v35; // rdi unsigned int v36; // ebx unsigned __int8 *v37; // r10 unsigned int v38; // edx long long v39; // rsi bool v41; // cf long long v42; // rdx unsigned __int8 *v43; // rsi char v44; // bl int v45; // r13d unsigned int v46; // edx int v47; // eax __int16 v48; // dx char v49; // cl unsigned __int8 v50; // al unsigned __int8 *v51; // rcx _QWORD v52[4]; // [rsp+8h] [rbp-68h] BYREF unsigned __int8 *v53; // [rsp+28h] [rbp-48h] long long v54; // [rsp+30h] [rbp-40h] unsigned __int16 v55; // [rsp+3Eh] [rbp-32h] unsigned __int8 *v56; // [rsp+40h] [rbp-30h] BYREF v56 = a4; *(_QWORD *)(a8 + 24) = a4; *(_DWORD *)(a8 + 64) = 0; if ( (a2 & 2) == 0 && (*(_WORD *)(a1 + 162) & 0x2E) == 0 ) { v12 = a3 + *(unsigned __int16 *)(a1 + 170); if ( a7 != 0LL && a3 != 0 ) { v13 = (int)a6; v14 = ma_kpos(a3, (long long)&a4[v12]); LODWORD(a6) = v13; *a7 = v14; } goto LABEL_37; } v53 = a6; v52[1] = a1; v52[0] = a5; if ( (*(unsigned int ( **)(_QWORD *, long long, _QWORD, unsigned __int8 **))(a1 + 224))(v52, a2, a3, &v56) ) { v54 = a5; if ( a7 != 0LL && a3 != 0 ) *a7 = ma_kpos(a3, (long long)v56); v15 = v56; LODWORD(a6) = (_DWORD)v53; LODWORD(v16) = (_DWORD)v53; if ( v56 == v53 ) goto LABEL_36; if ( (*(_BYTE *)(a1 + 162) & 0x20) != 0 ) { if ( *v56 == 0xFF ) { v26 = (unsigned __int16)__ROL2__(*(_WORD *)(v56 + 1), 8); v56 += 3; v27 = 3LL; } else { ++v56; v26 = *v15; v27 = 1LL; } v28 = *a4; v29 = v54; if ( v28 == 255 ) { v28 = (unsigned __int16)__ROL2__(*(_WORD *)(a4 + 1), 8); v30 = 3; } else { v30 = 1; } v31 = v26 <= v28; v32 = v26 - v28; if ( !v31 ) { v33 = v32 + v30; v34 = &v15[v27 - v33]; v56 = v34; if ( v28 > 0xFE ) { *v34 = -1; v56[2] = v28; v56[1] = BYTE1(v28); } else { *v34 = v28; } memmove(&v56[v30], v28 + v29, v32); LODWORD(v16) = (_DWORD)v56; goto LABEL_27; } } else { v17 = *(_QWORD *)(a1 + 192); v18 = *(_WORD *)(v17 + 18); if ( (v18 & 2) != 0 ) { v19 = *v56; if ( (*v56 & 0x80u) != 0 ) { if ( *(_WORD *)(v17 + 20) < 0x7Fu ) { v20 = *a4; v21 = *a4 & 0x7F; v22 = v54; if ( (*a4 & 0x7F) != 0 ) { v55 = *(_WORD *)(v17 + 20); v23 = v19 & 0x7F; v24 = 1; v25 = 1LL; goto LABEL_31; } } else { v20 = *a4; v21 = a4[1] | ((*a4 & 0x7F) << 8); v22 = v54; if ( v21 ) { v55 = *(_WORD *)(v17 + 20); v23 = v56[1] | ((v19 & 0x7F) << 8); v24 = 2; v25 = 2LL; LABEL_31: v35 = &v56[v25]; v56 = v35; v36 = 0; if ( v20 < 0 ) v36 = v21; v37 = (unsigned __int8 *)(((v18 & 0x10) != 0) + v22); v38 = *v37; if ( v38 == 255 ) { v38 = (unsigned __int16)__ROL2__(*(_WORD *)(v37 + 1), 8); v39 = 3LL; } else { v39 = 1LL; } if ( v23 ) { if ( *v35 == 0xFF ) { LODWORD(v54) = (unsigned __int16)__ROL2__(*(_WORD *)(v35 + 1), 8); v35 += 3; v56 = v35; } else { v56 = v35 + 1; LODWORD(v54) = *v35++; } v38 = v23; } else { LODWORD(v54) = 0; } LODWORD(v16) = (_DWORD)v15; v41 = v38 < v36; v42 = v38 - v36; if ( v41 ) goto LABEL_36; v43 = &v37[v39 + v36]; v44 = v20; v45 = v42; memmove(&v35[-(unsigned int)v42], v43, v42); v46 = v45 + v54; v47 = 2 * ((unsigned int)(v45 + v54) >= 0xFF) + 1; if ( v44 >= 0 ) v47 = 0; v33 = (unsigned int)(v47 + v45 + v24); v16 = (char *)&v56[-v33]; v56 -= v33; if ( v44 < 0 ) { v49 = *a4; v56 = (unsigned __int8 *)(v16 + 1); *v16 = v49; if ( v55 >= 0x7Fu ) { v50 = a4[1]; v51 = v56++; *v51 = v50; } LODWORD(a6) = (_DWORD)v53; if ( v46 > 0xFE ) { *v56 = -1; v56[2] = v46; v56[1] = BYTE1(v46); } else { *v56 = v46; } goto LABEL_28; } v48 = ((*(_WORD *)(*(_QWORD *)(a1 + 192) + 18LL) & 0x10) != 0) + (_WORD)v46; if ( v55 < 0x7Fu ) { *v16 = v48; } else { v16[1] = v48; *v56 = HIBYTE(v48); } LABEL_27: LODWORD(a6) = (_DWORD)v53; LABEL_28: *(_DWORD *)(a8 + 64) = v33; LABEL_36: v12 = (_DWORD)v16 - (_DWORD)a4; LABEL_37: memmove(a4, &a4[v12], (unsigned int)a6 - ((_DWORD)a4 + v12)); *(_DWORD *)(a8 + 68) = v12; return v12; } } } } } LODWORD(v16) = (_DWORD)v15; goto LABEL_36; } return 0; }
remove_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,R8 MOV R14,RCX MOV R15D,EDX MOV R12,RDI MOV RAX,qword ptr [RBP + 0x18] MOV RBX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RAX + 0x40],0x0 TEST SIL,0x2 JNZ 0x0016846a MOVZX EAX,word ptr [R12 + 0xa2] AND EAX,0x2e JNZ 0x0016846a MOVZX R13D,word ptr [R12 + 0xaa] ADD R13D,R15D TEST RBX,RBX SETZ AL TEST R15D,R15D SETZ CL OR CL,AL JNZ 0x0016864f MOVSXD RSI,R13D ADD RSI,R14 MOV EDI,R15D MOV R15,R9 CALL 0x00156ee7 MOV R9,R15 MOV qword ptr [RBX],RAX JMP 0x0016864f LAB_0016846a: MOV qword ptr [RBP + -0x48],R9 LEA RDI,[RBP + -0x68] MOV qword ptr [RDI + 0x8],R12 MOV qword ptr [RDI],R13 LEA RCX,[RBP + -0x30] MOV EDX,R15D CALL qword ptr [R12 + 0xe0] TEST EAX,EAX JZ 0x00168542 MOV qword ptr [RBP + -0x40],R13 TEST RBX,RBX SETZ AL TEST R15D,R15D SETZ CL OR CL,AL JNZ 0x001684b3 MOV RSI,qword ptr [RBP + -0x30] MOV EDI,R15D CALL 0x00156ee7 MOV qword ptr [RBX],RAX LAB_001684b3: MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RBP + -0x48] MOV R13,R9 CMP RAX,R9 JZ 0x0016864c TEST byte ptr [R12 + 0xa2],0x20 JNZ 0x0016854a MOV RDX,qword ptr [R12 + 0xc0] MOVZX ESI,word ptr [RDX + 0x12] TEST SIL,0x2 JZ 0x00168649 MOVZX ECX,byte ptr [RAX] TEST CL,CL JNS 0x00168649 MOVZX EDI,word ptr [RDX + 0x14] CMP DI,0x7f JC 0x001685fb MOVZX EDX,byte ptr [R14 + 0x1] MOVZX R11D,byte ptr [R14] MOV R8D,R11D AND R8D,0x7f SHL R8D,0x8 OR R8D,EDX MOV R10,qword ptr [RBP + -0x40] JZ 0x00168649 MOV word ptr [RBP + -0x32],DI MOVZX EDX,byte ptr [RAX + 0x1] AND ECX,0x7f SHL ECX,0x8 OR ECX,EDX MOV R15D,0x2 MOV EDI,0x2 JMP 0x0016861e LAB_00168542: XOR R13D,R13D JMP 0x0016866b LAB_0016854a: CMP byte ptr [RAX],0xff JZ 0x00168561 LEA RCX,[RAX + 0x1] MOV qword ptr [RBP + -0x30],RCX MOVZX ECX,byte ptr [RAX] MOV EDI,0x1 JMP 0x00168579 LAB_00168561: MOVZX ECX,word ptr [RAX + 0x1] ROL CX,0x8 MOVZX ECX,CX LEA RDX,[RAX + 0x3] MOV qword ptr [RBP + -0x30],RDX MOV EDI,0x3 LAB_00168579: MOVZX EDX,byte ptr [R14] CMP EDX,0xff MOV RSI,qword ptr [RBP + -0x40] JZ 0x00168591 MOV R8D,0x1 JMP 0x001685a3 LAB_00168591: MOVZX EDX,word ptr [R14 + 0x1] ROL DX,0x8 MOVZX EDX,DX MOV R8D,0x3 LAB_001685a3: SUB ECX,EDX JBE 0x00168649 ADD RAX,RDI LEA R15D,[RCX + R8*0x1] SUB RAX,R15 MOV qword ptr [RBP + -0x30],RAX CMP EDX,0xfe JA 0x001685c5 MOV byte ptr [RAX],DL JMP 0x001685d6 LAB_001685c5: MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x2],DL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],DH LAB_001685d6: MOV EDI,R8D ADD RDI,qword ptr [RBP + -0x30] MOV EAX,EDX ADD RSI,RAX MOV EDX,ECX CALL 0x00129120 MOV R13,qword ptr [RBP + -0x30] LAB_001685ed: MOV R9,qword ptr [RBP + -0x48] LAB_001685f1: MOV RAX,qword ptr [RBP + 0x18] MOV dword ptr [RAX + 0x40],R15D JMP 0x0016864c LAB_001685fb: MOVZX R11D,byte ptr [R14] MOV R8D,R11D AND R8D,0x7f MOV R10,qword ptr [RBP + -0x40] JZ 0x00168649 MOV word ptr [RBP + -0x32],DI AND ECX,0x7f MOV R15D,0x1 MOV EDI,0x1 LAB_0016861e: ADD RDI,RAX MOV qword ptr [RBP + -0x30],RDI XOR EBX,EBX TEST R11B,R11B CMOVS EBX,R8D BT ESI,0x4 ADC R10,0x0 MOVZX EDX,byte ptr [R10] CMP EDX,0xff JZ 0x0016867d MOV ESI,0x1 JMP 0x0016868e LAB_00168649: MOV R13,RAX LAB_0016864c: SUB R13D,R14D LAB_0016864f: MOVSXD RBX,R13D LEA RSI,[R14 + RBX*0x1] SUB R9D,ESI MOV RDI,R14 MOV RDX,R9 CALL 0x00129120 MOV RAX,qword ptr [RBP + 0x18] MOV dword ptr [RAX + 0x44],EBX LAB_0016866b: MOV EAX,R13D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016867d: MOVZX ESI,word ptr [R10 + 0x1] ROL SI,0x8 MOVZX EDX,SI MOV ESI,0x3 LAB_0016868e: TEST ECX,ECX JZ 0x001686aa CMP byte ptr [RDI],0xff JZ 0x001686b3 LEA R8,[RDI + 0x1] MOV qword ptr [RBP + -0x30],R8 MOVZX EDI,byte ptr [RDI] MOV dword ptr [RBP + -0x40],EDI MOV RDI,R8 JMP 0x001686cd LAB_001686aa: MOV dword ptr [RBP + -0x40],0x0 JMP 0x001686cf LAB_001686b3: MOVZX R8D,word ptr [RDI + 0x1] ROL R8W,0x8 MOVZX R8D,R8W MOV dword ptr [RBP + -0x40],R8D ADD RDI,0x3 MOV qword ptr [RBP + -0x30],RDI LAB_001686cd: MOV EDX,ECX LAB_001686cf: MOV R13,RAX SUB EDX,EBX JC 0x0016864c ADD R10,RSI SUB RDI,RDX MOV ESI,EBX ADD RSI,R10 MOV EBX,R11D MOV R13,RDX CALL 0x00129120 MOV EDX,dword ptr [RBP + -0x40] ADD EDX,R13D XOR EAX,EAX CMP EDX,0xff SETNC AL XOR ECX,ECX TEST BL,BL LEA EAX,[RAX + RAX*0x1 + 0x1] CMOVNS EAX,ECX ADD R15D,R13D ADD R15D,EAX MOV R13,qword ptr [RBP + -0x30] SUB R13,R15 MOV qword ptr [RBP + -0x30],R13 TEST BL,BL JS 0x0016874a MOV RAX,qword ptr [R12 + 0xc0] MOVZX EAX,word ptr [RAX + 0x12] BT EAX,0x4 ADC EDX,0x0 CMP word ptr [RBP + -0x32],0x7f JC 0x0016878d MOV byte ptr [R13 + 0x1],DL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],DH JMP 0x001685ed LAB_0016874a: LEA RAX,[R13 + 0x1] MOV CL,byte ptr [R14] MOV qword ptr [RBP + -0x30],RAX MOV byte ptr [R13],CL CMP word ptr [RBP + -0x32],0x7f JC 0x00168776 MOV AL,byte ptr [R14 + 0x1] MOV RCX,qword ptr [RBP + -0x30] MOV ESI,EDX LEA RDX,[RCX + 0x1] MOV qword ptr [RBP + -0x30],RDX MOV EDX,ESI MOV byte ptr [RCX],AL LAB_00168776: CMP EDX,0xfe MOV R9,qword ptr [RBP + -0x48] JA 0x00168796 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],DL JMP 0x001685f1 LAB_0016878d: MOV byte ptr [R13],DL JMP 0x001685ed LAB_00168796: MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x2],DL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],DH JMP 0x001685f1
int remove_key(long param_1,ulong param_2,int param_3,byte *param_4,long param_5,byte *param_6, int8 *param_7,long param_8) { ushort uVar1; ushort uVar2; int8 uVar3; uint uVar4; uint uVar5; byte bVar6; uint uVar7; long lVar8; byte *pbVar9; uint uVar10; byte *pbVar11; byte bVar12; int iVar13; int iVar14; long local_70; long local_68; byte *local_50; int8 local_48; ushort local_3a; byte *local_38; *(byte **)(param_8 + 0x18) = param_4; *(int4 *)(param_8 + 0x40) = 0; local_38 = param_4; if (((param_2 & 2) == 0) && ((*(ushort *)(param_1 + 0xa2) & 0x2e) == 0)) { iVar13 = (uint)*(ushort *)(param_1 + 0xaa) + param_3; if (param_3 != 0 && param_7 != (int8 *)0x0) { uVar3 = _ma_kpos(param_3,param_4 + iVar13); *param_7 = uVar3; } goto LAB_0016864f; } local_70 = param_5; local_68 = param_1; local_50 = param_6; iVar13 = (**(code **)(param_1 + 0xe0))(&local_70,param_2,param_3,&local_38); if (iVar13 == 0) { return 0; } local_48 = param_5; if (param_3 != 0 && param_7 != (int8 *)0x0) { uVar3 = _ma_kpos(param_3,local_38); *param_7 = uVar3; } pbVar11 = local_38; iVar13 = (int)local_50; if (local_38 != local_50) { iVar13 = (int)local_38; if ((*(byte *)(param_1 + 0xa2) & 0x20) == 0) { uVar1 = *(ushort *)(*(long *)(param_1 + 0xc0) + 0x12); if (((uVar1 & 2) != 0) && (bVar6 = *local_38, (char)bVar6 < '\0')) { uVar2 = *(ushort *)(*(long *)(param_1 + 0xc0) + 0x14); if (uVar2 < 0x7f) { bVar12 = *param_4; uVar10 = bVar12 & 0x7f; if ((bVar12 & 0x7f) != 0) { uVar4 = bVar6 & 0x7f; iVar14 = 1; lVar8 = 1; goto LAB_0016861e; } } else { bVar12 = *param_4; uVar10 = (bVar12 & 0x7f) << 8 | (uint)param_4[1]; if (uVar10 != 0) { uVar4 = (bVar6 & 0x7f) << 8 | (uint)local_38[1]; iVar14 = 2; lVar8 = 2; LAB_0016861e: local_38 = local_38 + lVar8; uVar7 = 0; if ((char)bVar12 < '\0') { uVar7 = uVar10; } pbVar11 = (byte *)(local_48 + (ulong)((uVar1 >> 4 & 1) != 0)); uVar10 = (uint)*pbVar11; if (*pbVar11 == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(pbVar11 + 1) << 8 | *(ushort *)(pbVar11 + 1) >> 8) ; lVar8 = 3; } else { lVar8 = 1; } if (uVar4 == 0) { local_48 = (ulong)local_48._4_4_ << 0x20; } else { if (*local_38 == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 | *(ushort *)(local_38 + 1) >> 8); pbVar9 = local_38 + 3; } else { pbVar9 = local_38 + 1; uVar10 = (uint)*local_38; } local_48 = CONCAT44(local_48._4_4_,uVar10); uVar10 = uVar4; local_38 = pbVar9; } uVar4 = uVar10 - uVar7; local_3a = uVar2; if (uVar7 <= uVar10) { memmove(local_38 + -(ulong)uVar4,pbVar11 + (ulong)uVar7 + lVar8,(ulong)uVar4); uVar7 = (int)local_48 + uVar4; iVar13 = (0xfe < uVar7) + 1 + (uint)(0xfe < uVar7); if (-1 < (char)bVar12) { iVar13 = 0; } uVar10 = iVar14 + uVar4 + iVar13; pbVar11 = local_38 + -(ulong)uVar10; if ((char)bVar12 < '\0') { *pbVar11 = *param_4; local_38 = pbVar11 + 1; if (0x7e < local_3a) { local_38 = pbVar11 + 2; pbVar11[1] = param_4[1]; } if (uVar7 < 0xff) { *local_38 = (byte)uVar7; } else { *local_38 = 0xff; local_38[2] = (byte)uVar7; local_38[1] = (byte)(uVar7 >> 8); } } else { iVar13 = uVar7 + ((*(ushort *)(*(long *)(param_1 + 0xc0) + 0x12) >> 4 & 1) != 0); bVar6 = (byte)iVar13; local_38 = pbVar11; if (local_3a < 0x7f) { *pbVar11 = bVar6; } else { pbVar11[1] = bVar6; *pbVar11 = (byte)((uint)iVar13 >> 8); } } goto LAB_001685f1; } } } } } else { if (*local_38 == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 | *(ushort *)(local_38 + 1) >> 8); local_38 = local_38 + 3; lVar8 = 3; } else { uVar10 = (uint)*local_38; lVar8 = 1; local_38 = local_38 + 1; } uVar4 = (uint)*param_4; if (*param_4 == 0xff) { uVar4 = (uint)(ushort)(*(ushort *)(param_4 + 1) << 8 | *(ushort *)(param_4 + 1) >> 8); uVar7 = 3; } else { uVar7 = 1; } uVar5 = uVar10 - uVar4; if (uVar4 <= uVar10 && uVar5 != 0) { uVar10 = uVar5 + uVar7; local_38 = pbVar11 + (lVar8 - (ulong)uVar10); if (uVar4 < 0xff) { *local_38 = (byte)uVar4; } else { *local_38 = 0xff; local_38[2] = (byte)uVar4; local_38[1] = (byte)(uVar4 >> 8); } memmove(local_38 + uVar7,(void *)(local_48 + (ulong)uVar4),(ulong)uVar5); pbVar11 = local_38; LAB_001685f1: iVar13 = (int)pbVar11; *(uint *)(param_8 + 0x40) = uVar10; } } } iVar13 = iVar13 - (int)param_4; param_6 = local_50; LAB_0016864f: memmove(param_4,param_4 + iVar13,(ulong)(uint)((int)param_6 - (int)(param_4 + iVar13))); *(int *)(param_8 + 0x44) = iVar13; return iVar13; }
20,890
vsort_calibrate_thresholds
davidesantangelo[P]vsort/vsort.c
static void vsort_calibrate_thresholds(void) { // Insertion Sort Threshold: Related to cache line size. thresholds.insertion_threshold = VSORT_MAX(8, VSORT_MIN(32, hardware.cache_line_size > 0 ? hardware.cache_line_size / (int)sizeof(int) : 16)); // Vector Threshold: Minimum size where vectorization (NEON) might be beneficial. if (hardware.has_neon && hardware.simd_width > 0) { thresholds.vector_threshold = VSORT_MAX(32, (hardware.simd_width / (int)sizeof(int)) * 4); // e.g., 4*4=16 for NEON } else { thresholds.vector_threshold = 64; // Higher threshold if no SIMD } // Parallel Threshold: Size where parallel overhead is likely overcome. int effective_cores = hardware.performance_cores > 0 ? hardware.performance_cores : hardware.total_cores; if (effective_cores <= 0) effective_cores = 1; // Ensure at least 1 if (effective_cores >= 8) { thresholds.parallel_threshold = 50000; } else if (effective_cores >= 4) { thresholds.parallel_threshold = 75000; } else { thresholds.parallel_threshold = 150000; } // Refine based on L2 cache size per core (approx) if (hardware.l2_cache_size > 0) { int cache_per_core = hardware.l2_cache_size / effective_cores; thresholds.parallel_threshold = VSORT_MAX(10000, VSORT_MIN(thresholds.parallel_threshold, cache_per_core > 0 ? cache_per_core / (int)sizeof(int) * 4 : thresholds.parallel_threshold)); } else { // Fallback if L2 size unknown thresholds.parallel_threshold = VSORT_MAX(10000, thresholds.parallel_threshold); } // Radix Sort Threshold (Integers only): Size where radix sort typically outperforms quicksort. if (hardware.l2_cache_size > 0) { thresholds.radix_threshold = VSORT_MAX(100000, hardware.l2_cache_size / (int)sizeof(int)); } else { thresholds.radix_threshold = 500000; // Fallback } // Cache Optimal Elements: Approx number of elements fitting in L1 data cache. if (hardware.l1_cache_size > 0) { thresholds.cache_optimal_elements = hardware.l1_cache_size / sizeof(int); } else { thresholds.cache_optimal_elements = 8192; // Fallback (e.g., 32KB / 4 bytes) } // Log calibrated thresholds (only if logger is initialized) if (vsort_library_initialized) { vsort_log_info("Calibrated thresholds - insertion: %d, vector: %d (NEEDS IMPL), parallel: %d, radix: %d, cache_optimal: %d", thresholds.insertion_threshold, thresholds.vector_threshold, thresholds.parallel_threshold, thresholds.radix_threshold, thresholds.cache_optimal_elements); } }
O0
c
vsort_calibrate_thresholds: subq $0x58, %rsp cmpl $0x0, 0x5f05(%rip) # 0x80f0 jle 0x2201 movl 0x5efd(%rip), %eax # 0x80f0 movl $0x4, %ecx cltd idivl %ecx movl %eax, 0x4c(%rsp) jmp 0x220c movl $0x10, %eax movl %eax, 0x4c(%rsp) jmp 0x220c movl 0x4c(%rsp), %ecx movl $0x20, %eax cmpl %ecx, %eax jge 0x2224 movl $0x20, %eax movl %eax, 0x48(%rsp) jmp 0x2254 cmpl $0x0, 0x5ec5(%rip) # 0x80f0 jle 0x2241 movl 0x5ebd(%rip), %eax # 0x80f0 movl $0x4, %ecx cltd idivl %ecx movl %eax, 0x44(%rsp) jmp 0x224c movl $0x10, %eax movl %eax, 0x44(%rsp) jmp 0x224c movl 0x44(%rsp), %eax movl %eax, 0x48(%rsp) movl 0x48(%rsp), %ecx movl $0x8, %eax cmpl %ecx, %eax jle 0x226c movl $0x8, %eax movl %eax, 0x40(%rsp) jmp 0x22e4 cmpl $0x0, 0x5e7d(%rip) # 0x80f0 jle 0x2289 movl 0x5e75(%rip), %eax # 0x80f0 movl $0x4, %ecx cltd idivl %ecx movl %eax, 0x3c(%rsp) jmp 0x2294 movl $0x10, %eax movl %eax, 0x3c(%rsp) jmp 0x2294 movl 0x3c(%rsp), %ecx movl $0x20, %eax cmpl %ecx, %eax jge 0x22ac movl $0x20, %eax movl %eax, 0x38(%rsp) jmp 0x22dc cmpl $0x0, 0x5e3d(%rip) # 0x80f0 jle 0x22c9 movl 0x5e35(%rip), %eax # 0x80f0 movl $0x4, %ecx cltd idivl %ecx movl %eax, 0x34(%rsp) jmp 0x22d4 movl $0x10, %eax movl %eax, 0x34(%rsp) jmp 0x22d4 movl 0x34(%rsp), %eax movl %eax, 0x38(%rsp) movl 0x38(%rsp), %eax movl %eax, 0x40(%rsp) movl 0x40(%rsp), %eax movl %eax, 0x5de2(%rip) # 0x80d0 testb $0x1, 0x5e10(%rip) # 0x8105 je 0x2348 cmpl $0x0, 0x5df6(%rip) # 0x80f4 jle 0x2348 movl 0x5dee(%rip), %eax # 0x80f4 movl $0x4, %ecx cltd idivl %ecx movl %eax, %ecx shll $0x2, %ecx movl $0x20, %eax cmpl %ecx, %eax jle 0x2327 movl $0x20, %eax movl %eax, 0x30(%rsp) jmp 0x233c movl 0x5dc7(%rip), %eax # 0x80f4 movl $0x4, %ecx cltd idivl %ecx shll $0x2, %eax movl %eax, 0x30(%rsp) movl 0x30(%rsp), %eax movl %eax, 0x5d8e(%rip) # 0x80d4 jmp 0x2352 movl $0x40, 0x5d82(%rip) # 0x80d4 cmpl $0x0, 0x5d9f(%rip) # 0x80f8 jle 0x2367 movl 0x5d97(%rip), %eax # 0x80f8 movl %eax, 0x2c(%rsp) jmp 0x2371 movl 0x5d93(%rip), %eax # 0x8100 movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax movl %eax, 0x54(%rsp) cmpl $0x0, 0x54(%rsp) jg 0x2388 movl $0x1, 0x54(%rsp) cmpl $0x8, 0x54(%rsp) jl 0x239b movl $0xc350, 0x5d3f(%rip) # imm = 0xC350 jmp 0x23ba cmpl $0x4, 0x54(%rsp) jl 0x23ae movl $0x124f8, 0x5d2c(%rip) # imm = 0x124F8 jmp 0x23b8 movl $0x249f0, 0x5d20(%rip) # imm = 0x249F0 jmp 0x23ba cmpl $0x0, 0x5d27(%rip) # 0x80e8 jle 0x24ee movl 0x5d1b(%rip), %eax # 0x80e8 cltd idivl 0x54(%rsp) movl %eax, 0x50(%rsp) movl 0x5cfc(%rip), %eax # 0x80d8 movl %eax, 0x28(%rsp) cmpl $0x0, 0x50(%rsp) jle 0x23fc movl 0x50(%rsp), %eax movl $0x4, %ecx cltd idivl %ecx shll $0x2, %eax movl %eax, 0x24(%rsp) jmp 0x2406 movl 0x5cd6(%rip), %eax # 0x80d8 movl %eax, 0x24(%rsp) movl 0x28(%rsp), %eax movl 0x24(%rsp), %ecx cmpl %ecx, %eax jge 0x241e movl 0x5cc0(%rip), %eax # 0x80d8 movl %eax, 0x20(%rsp) jmp 0x244c cmpl $0x0, 0x50(%rsp) jle 0x243a movl 0x50(%rsp), %eax movl $0x4, %ecx cltd idivl %ecx shll $0x2, %eax movl %eax, 0x1c(%rsp) jmp 0x2444 movl 0x5c98(%rip), %eax # 0x80d8 movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movl %eax, 0x20(%rsp) movl 0x20(%rsp), %ecx movl $0x2710, %eax # imm = 0x2710 cmpl %ecx, %eax jle 0x2464 movl $0x2710, %eax # imm = 0x2710 movl %eax, 0x18(%rsp) jmp 0x24e2 movl 0x5c6e(%rip), %eax # 0x80d8 movl %eax, 0x14(%rsp) cmpl $0x0, 0x50(%rsp) jle 0x248a movl 0x50(%rsp), %eax movl $0x4, %ecx cltd idivl %ecx shll $0x2, %eax movl %eax, 0x10(%rsp) jmp 0x2494 movl 0x5c48(%rip), %eax # 0x80d8 movl %eax, 0x10(%rsp) movl 0x14(%rsp), %eax movl 0x10(%rsp), %ecx cmpl %ecx, %eax jge 0x24ac movl 0x5c32(%rip), %eax # 0x80d8 movl %eax, 0xc(%rsp) jmp 0x24da cmpl $0x0, 0x50(%rsp) jle 0x24c8 movl 0x50(%rsp), %eax movl $0x4, %ecx cltd idivl %ecx shll $0x2, %eax movl %eax, 0x8(%rsp) jmp 0x24d2 movl 0x5c0a(%rip), %eax # 0x80d8 movl %eax, 0x8(%rsp) movl 0x8(%rsp), %eax movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax movl %eax, 0x18(%rsp) movl 0x18(%rsp), %eax movl %eax, 0x5bec(%rip) # 0x80d8 jmp 0x251a movl $0x2710, %eax # imm = 0x2710 cmpl 0x5bdf(%rip), %eax # 0x80d8 jle 0x2506 movl $0x2710, %eax # imm = 0x2710 movl %eax, 0x4(%rsp) jmp 0x2510 movl 0x5bcc(%rip), %eax # 0x80d8 movl %eax, 0x4(%rsp) movl 0x4(%rsp), %eax movl %eax, 0x5bbe(%rip) # 0x80d8 cmpl $0x0, 0x5bc7(%rip) # 0x80e8 jle 0x2562 movl 0x5bbf(%rip), %eax # 0x80e8 movl $0x4, %ecx cltd idivl %ecx movl %eax, %ecx movl $0x186a0, %eax # imm = 0x186A0 cmpl %ecx, %eax jle 0x2546 movl $0x186a0, %eax # imm = 0x186A0 movl %eax, (%rsp) jmp 0x2557 movl 0x5b9c(%rip), %eax # 0x80e8 movl $0x4, %ecx cltd idivl %ecx movl %eax, (%rsp) movl (%rsp), %eax movl %eax, 0x5b7c(%rip) # 0x80dc jmp 0x256c movl $0x7a120, 0x5b70(%rip) # imm = 0x7A120 cmpl $0x0, 0x5b71(%rip) # 0x80e4 jle 0x2588 movslq 0x5b68(%rip), %rax # 0x80e4 shrq $0x2, %rax movl %eax, 0x5b5a(%rip) # 0x80e0 jmp 0x2592 movl $0x2000, 0x5b4e(%rip) # imm = 0x2000 testb $0x1, 0x5c30(%rip) # 0x81c9 je 0x25c9 movl 0x5b2f(%rip), %esi # 0x80d0 movl 0x5b2d(%rip), %edx # 0x80d4 movl 0x5b2b(%rip), %ecx # 0x80d8 movl 0x5b28(%rip), %r8d # 0x80dc movl 0x5b25(%rip), %r9d # 0x80e0 leaq 0x3033(%rip), %rdi # 0x55f5 movb $0x0, %al callq 0x4190 addq $0x58, %rsp retq nop
vsort_calibrate_thresholds: sub rsp, 58h cmp cs:dword_80F0, 0 jle short loc_2201 mov eax, cs:dword_80F0 mov ecx, 4 cdq idiv ecx mov [rsp+58h+var_C], eax jmp short loc_220C loc_2201: mov eax, 10h mov [rsp+58h+var_C], eax jmp short $+2 loc_220C: mov ecx, [rsp+58h+var_C] mov eax, 20h ; ' ' cmp eax, ecx jge short loc_2224 mov eax, 20h ; ' ' mov [rsp+58h+var_10], eax jmp short loc_2254 loc_2224: cmp cs:dword_80F0, 0 jle short loc_2241 mov eax, cs:dword_80F0 mov ecx, 4 cdq idiv ecx mov [rsp+58h+var_14], eax jmp short loc_224C loc_2241: mov eax, 10h mov [rsp+58h+var_14], eax jmp short $+2 loc_224C: mov eax, [rsp+58h+var_14] mov [rsp+58h+var_10], eax loc_2254: mov ecx, [rsp+58h+var_10] mov eax, 8 cmp eax, ecx jle short loc_226C mov eax, 8 mov [rsp+58h+var_18], eax jmp short loc_22E4 loc_226C: cmp cs:dword_80F0, 0 jle short loc_2289 mov eax, cs:dword_80F0 mov ecx, 4 cdq idiv ecx mov [rsp+58h+var_1C], eax jmp short loc_2294 loc_2289: mov eax, 10h mov [rsp+58h+var_1C], eax jmp short $+2 loc_2294: mov ecx, [rsp+58h+var_1C] mov eax, 20h ; ' ' cmp eax, ecx jge short loc_22AC mov eax, 20h ; ' ' mov [rsp+58h+var_20], eax jmp short loc_22DC loc_22AC: cmp cs:dword_80F0, 0 jle short loc_22C9 mov eax, cs:dword_80F0 mov ecx, 4 cdq idiv ecx mov [rsp+58h+var_24], eax jmp short loc_22D4 loc_22C9: mov eax, 10h mov [rsp+58h+var_24], eax jmp short $+2 loc_22D4: mov eax, [rsp+58h+var_24] mov [rsp+58h+var_20], eax loc_22DC: mov eax, [rsp+58h+var_20] mov [rsp+58h+var_18], eax loc_22E4: mov eax, [rsp+58h+var_18] mov cs:thresholds, eax test cs:byte_8105, 1 jz short loc_2348 cmp cs:dword_80F4, 0 jle short loc_2348 mov eax, cs:dword_80F4 mov ecx, 4 cdq idiv ecx mov ecx, eax shl ecx, 2 mov eax, 20h ; ' ' cmp eax, ecx jle short loc_2327 mov eax, 20h ; ' ' mov [rsp+58h+var_28], eax jmp short loc_233C loc_2327: mov eax, cs:dword_80F4 mov ecx, 4 cdq idiv ecx shl eax, 2 mov [rsp+58h+var_28], eax loc_233C: mov eax, [rsp+58h+var_28] mov cs:dword_80D4, eax jmp short loc_2352 loc_2348: mov cs:dword_80D4, 40h ; '@' loc_2352: cmp cs:dword_80F8, 0 jle short loc_2367 mov eax, cs:dword_80F8 mov [rsp+58h+var_2C], eax jmp short loc_2371 loc_2367: mov eax, cs:dword_8100 mov [rsp+58h+var_2C], eax loc_2371: mov eax, [rsp+58h+var_2C] mov [rsp+58h+var_4], eax cmp [rsp+58h+var_4], 0 jg short loc_2388 mov [rsp+58h+var_4], 1 loc_2388: cmp [rsp+58h+var_4], 8 jl short loc_239B mov cs:dword_80D8, 0C350h jmp short loc_23BA loc_239B: cmp [rsp+58h+var_4], 4 jl short loc_23AE mov cs:dword_80D8, 124F8h jmp short loc_23B8 loc_23AE: mov cs:dword_80D8, 249F0h loc_23B8: jmp short $+2 loc_23BA: cmp cs:dword_80E8, 0 jle loc_24EE mov eax, cs:dword_80E8 cdq idiv [rsp+58h+var_4] mov [rsp+58h+var_8], eax mov eax, cs:dword_80D8 mov [rsp+58h+var_30], eax cmp [rsp+58h+var_8], 0 jle short loc_23FC mov eax, [rsp+58h+var_8] mov ecx, 4 cdq idiv ecx shl eax, 2 mov [rsp+58h+var_34], eax jmp short loc_2406 loc_23FC: mov eax, cs:dword_80D8 mov [rsp+58h+var_34], eax loc_2406: mov eax, [rsp+58h+var_30] mov ecx, [rsp+58h+var_34] cmp eax, ecx jge short loc_241E mov eax, cs:dword_80D8 mov [rsp+58h+var_38], eax jmp short loc_244C loc_241E: cmp [rsp+58h+var_8], 0 jle short loc_243A mov eax, [rsp+58h+var_8] mov ecx, 4 cdq idiv ecx shl eax, 2 mov [rsp+58h+var_3C], eax jmp short loc_2444 loc_243A: mov eax, cs:dword_80D8 mov [rsp+58h+var_3C], eax loc_2444: mov eax, [rsp+58h+var_3C] mov [rsp+58h+var_38], eax loc_244C: mov ecx, [rsp+58h+var_38] mov eax, 2710h cmp eax, ecx jle short loc_2464 mov eax, 2710h mov [rsp+58h+var_40], eax jmp short loc_24E2 loc_2464: mov eax, cs:dword_80D8 mov [rsp+58h+var_44], eax cmp [rsp+58h+var_8], 0 jle short loc_248A mov eax, [rsp+58h+var_8] mov ecx, 4 cdq idiv ecx shl eax, 2 mov [rsp+58h+var_48], eax jmp short loc_2494 loc_248A: mov eax, cs:dword_80D8 mov [rsp+58h+var_48], eax loc_2494: mov eax, [rsp+58h+var_44] mov ecx, [rsp+58h+var_48] cmp eax, ecx jge short loc_24AC mov eax, cs:dword_80D8 mov [rsp+58h+var_4C], eax jmp short loc_24DA loc_24AC: cmp [rsp+58h+var_8], 0 jle short loc_24C8 mov eax, [rsp+58h+var_8] mov ecx, 4 cdq idiv ecx shl eax, 2 mov [rsp+58h+var_50], eax jmp short loc_24D2 loc_24C8: mov eax, cs:dword_80D8 mov [rsp+58h+var_50], eax loc_24D2: mov eax, [rsp+58h+var_50] mov [rsp+58h+var_4C], eax loc_24DA: mov eax, [rsp+58h+var_4C] mov [rsp+58h+var_40], eax loc_24E2: mov eax, [rsp+58h+var_40] mov cs:dword_80D8, eax jmp short loc_251A loc_24EE: mov eax, 2710h cmp eax, cs:dword_80D8 jle short loc_2506 mov eax, 2710h mov [rsp+58h+var_54], eax jmp short loc_2510 loc_2506: mov eax, cs:dword_80D8 mov [rsp+58h+var_54], eax loc_2510: mov eax, [rsp+58h+var_54] mov cs:dword_80D8, eax loc_251A: cmp cs:dword_80E8, 0 jle short loc_2562 mov eax, cs:dword_80E8 mov ecx, 4 cdq idiv ecx mov ecx, eax mov eax, 186A0h cmp eax, ecx jle short loc_2546 mov eax, 186A0h mov [rsp+58h+var_58], eax jmp short loc_2557 loc_2546: mov eax, cs:dword_80E8 mov ecx, 4 cdq idiv ecx mov [rsp+58h+var_58], eax loc_2557: mov eax, [rsp+58h+var_58] mov cs:dword_80DC, eax jmp short loc_256C loc_2562: mov cs:dword_80DC, 7A120h loc_256C: cmp cs:hardware, 0 jle short loc_2588 movsxd rax, cs:hardware shr rax, 2 mov cs:dword_80E0, eax jmp short loc_2592 loc_2588: mov cs:dword_80E0, 2000h loc_2592: test cs:vsort_library_initialized, 1 jz short loc_25C9 mov esi, cs:thresholds mov edx, cs:dword_80D4 mov ecx, cs:dword_80D8 mov r8d, cs:dword_80DC mov r9d, cs:dword_80E0 lea rdi, aCalibratedThre; "Calibrated thresholds - insertion: %d, "... mov al, 0 call vsort_log_info loc_25C9: add rsp, 58h retn
unsigned long long vsort_calibrate_thresholds() { unsigned long long result; // rax unsigned int v1; // [rsp+0h] [rbp-58h] unsigned int v2; // [rsp+4h] [rbp-54h] int v3; // [rsp+8h] [rbp-50h] int v4; // [rsp+Ch] [rbp-4Ch] int v5; // [rsp+10h] [rbp-48h] unsigned int v6; // [rsp+18h] [rbp-40h] int v7; // [rsp+1Ch] [rbp-3Ch] int v8; // [rsp+20h] [rbp-38h] int v9; // [rsp+24h] [rbp-34h] int v10; // [rsp+2Ch] [rbp-2Ch] int v11; // [rsp+30h] [rbp-28h] int v12; // [rsp+34h] [rbp-24h] int v13; // [rsp+38h] [rbp-20h] int v14; // [rsp+3Ch] [rbp-1Ch] int v15; // [rsp+40h] [rbp-18h] int v16; // [rsp+44h] [rbp-14h] int v17; // [rsp+48h] [rbp-10h] int v18; // [rsp+4Ch] [rbp-Ch] int v19; // [rsp+50h] [rbp-8h] int v20; // [rsp+54h] [rbp-4h] if ( dword_80F0 <= 0 ) v18 = 16; else v18 = dword_80F0 / 4; if ( v18 <= 32 ) { if ( dword_80F0 <= 0 ) v16 = 16; else v16 = dword_80F0 / 4; v17 = v16; } else { v17 = 32; } if ( v17 >= 8 ) { if ( dword_80F0 <= 0 ) v14 = 16; else v14 = dword_80F0 / 4; if ( v14 <= 32 ) { if ( dword_80F0 <= 0 ) v12 = 16; else v12 = dword_80F0 / 4; v13 = v12; } else { v13 = 32; } v15 = v13; } else { v15 = 8; } thresholds = v15; if ( (byte_8105 & 1) != 0 && dword_80F4 > 0 ) { if ( 4 * (dword_80F4 / 4) >= 32 ) v11 = 4 * (dword_80F4 / 4); else v11 = 32; dword_80D4 = v11; } else { dword_80D4 = 64; } if ( dword_80F8 <= 0 ) v10 = dword_8100; else v10 = dword_80F8; v20 = v10; if ( v10 <= 0 ) v20 = 1; if ( v20 < 8 ) { if ( v20 < 4 ) dword_80D8 = 150000; else dword_80D8 = 75000; } else { dword_80D8 = 50000; } if ( dword_80E8 <= 0 ) { if ( dword_80D8 >= 10000 ) v2 = dword_80D8; else v2 = 10000; result = v2; dword_80D8 = v2; } else { v19 = dword_80E8 / v20; if ( dword_80E8 / v20 <= 0 ) v9 = dword_80D8; else v9 = 4 * (v19 / 4); if ( dword_80D8 >= v9 ) { if ( v19 <= 0 ) v7 = dword_80D8; else v7 = 4 * (v19 / 4); v8 = v7; } else { v8 = dword_80D8; } if ( v8 >= 10000 ) { if ( v19 <= 0 ) v5 = dword_80D8; else v5 = 4 * (v19 / 4); if ( dword_80D8 >= v5 ) { if ( v19 <= 0 ) v3 = dword_80D8; else v3 = 4 * (v19 / 4); v4 = v3; } else { v4 = dword_80D8; } v6 = v4; } else { v6 = 10000; } result = v6; dword_80D8 = v6; } if ( dword_80E8 <= 0 ) { dword_80DC = 500000; } else { if ( dword_80E8 / 4 >= 100000 ) v1 = dword_80E8 / 4; else v1 = 100000; result = v1; dword_80DC = v1; } if ( hardware <= 0 ) { dword_80E0 = 0x2000; } else { result = (unsigned long long)hardware >> 2; dword_80E0 = result; } if ( (vsort_library_initialized & 1) != 0 ) return vsort_log_info( (unsigned int)"Calibrated thresholds - insertion: %d, vector: %d (NEEDS IMPL), parallel: %d, radix: %d, cache_optimal: %d", thresholds, dword_80D4, dword_80D8, dword_80DC, dword_80E0); return result; }
vsort_calibrate_thresholds: SUB RSP,0x58 CMP dword ptr [0x001080f0],0x0 JLE 0x00102201 MOV EAX,dword ptr [0x001080f0] MOV ECX,0x4 CDQ IDIV ECX MOV dword ptr [RSP + 0x4c],EAX JMP 0x0010220c LAB_00102201: MOV EAX,0x10 MOV dword ptr [RSP + 0x4c],EAX JMP 0x0010220c LAB_0010220c: MOV ECX,dword ptr [RSP + 0x4c] MOV EAX,0x20 CMP EAX,ECX JGE 0x00102224 MOV EAX,0x20 MOV dword ptr [RSP + 0x48],EAX JMP 0x00102254 LAB_00102224: CMP dword ptr [0x001080f0],0x0 JLE 0x00102241 MOV EAX,dword ptr [0x001080f0] MOV ECX,0x4 CDQ IDIV ECX MOV dword ptr [RSP + 0x44],EAX JMP 0x0010224c LAB_00102241: MOV EAX,0x10 MOV dword ptr [RSP + 0x44],EAX JMP 0x0010224c LAB_0010224c: MOV EAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + 0x48],EAX LAB_00102254: MOV ECX,dword ptr [RSP + 0x48] MOV EAX,0x8 CMP EAX,ECX JLE 0x0010226c MOV EAX,0x8 MOV dword ptr [RSP + 0x40],EAX JMP 0x001022e4 LAB_0010226c: CMP dword ptr [0x001080f0],0x0 JLE 0x00102289 MOV EAX,dword ptr [0x001080f0] MOV ECX,0x4 CDQ IDIV ECX MOV dword ptr [RSP + 0x3c],EAX JMP 0x00102294 LAB_00102289: MOV EAX,0x10 MOV dword ptr [RSP + 0x3c],EAX JMP 0x00102294 LAB_00102294: MOV ECX,dword ptr [RSP + 0x3c] MOV EAX,0x20 CMP EAX,ECX JGE 0x001022ac MOV EAX,0x20 MOV dword ptr [RSP + 0x38],EAX JMP 0x001022dc LAB_001022ac: CMP dword ptr [0x001080f0],0x0 JLE 0x001022c9 MOV EAX,dword ptr [0x001080f0] MOV ECX,0x4 CDQ IDIV ECX MOV dword ptr [RSP + 0x34],EAX JMP 0x001022d4 LAB_001022c9: MOV EAX,0x10 MOV dword ptr [RSP + 0x34],EAX JMP 0x001022d4 LAB_001022d4: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x38],EAX LAB_001022dc: MOV EAX,dword ptr [RSP + 0x38] MOV dword ptr [RSP + 0x40],EAX LAB_001022e4: MOV EAX,dword ptr [RSP + 0x40] MOV dword ptr [0x001080d0],EAX TEST byte ptr [0x00108105],0x1 JZ 0x00102348 CMP dword ptr [0x001080f4],0x0 JLE 0x00102348 MOV EAX,dword ptr [0x001080f4] MOV ECX,0x4 CDQ IDIV ECX MOV ECX,EAX SHL ECX,0x2 MOV EAX,0x20 CMP EAX,ECX JLE 0x00102327 MOV EAX,0x20 MOV dword ptr [RSP + 0x30],EAX JMP 0x0010233c LAB_00102327: MOV EAX,dword ptr [0x001080f4] MOV ECX,0x4 CDQ IDIV ECX SHL EAX,0x2 MOV dword ptr [RSP + 0x30],EAX LAB_0010233c: MOV EAX,dword ptr [RSP + 0x30] MOV dword ptr [0x001080d4],EAX JMP 0x00102352 LAB_00102348: MOV dword ptr [0x001080d4],0x40 LAB_00102352: CMP dword ptr [0x001080f8],0x0 JLE 0x00102367 MOV EAX,dword ptr [0x001080f8] MOV dword ptr [RSP + 0x2c],EAX JMP 0x00102371 LAB_00102367: MOV EAX,dword ptr [0x00108100] MOV dword ptr [RSP + 0x2c],EAX LAB_00102371: MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x54],EAX CMP dword ptr [RSP + 0x54],0x0 JG 0x00102388 MOV dword ptr [RSP + 0x54],0x1 LAB_00102388: CMP dword ptr [RSP + 0x54],0x8 JL 0x0010239b MOV dword ptr [0x001080d8],0xc350 JMP 0x001023ba LAB_0010239b: CMP dword ptr [RSP + 0x54],0x4 JL 0x001023ae MOV dword ptr [0x001080d8],0x124f8 JMP 0x001023b8 LAB_001023ae: MOV dword ptr [0x001080d8],0x249f0 LAB_001023b8: JMP 0x001023ba LAB_001023ba: CMP dword ptr [0x001080e8],0x0 JLE 0x001024ee MOV EAX,dword ptr [0x001080e8] CDQ IDIV dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x50],EAX MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x28],EAX CMP dword ptr [RSP + 0x50],0x0 JLE 0x001023fc MOV EAX,dword ptr [RSP + 0x50] MOV ECX,0x4 CDQ IDIV ECX SHL EAX,0x2 MOV dword ptr [RSP + 0x24],EAX JMP 0x00102406 LAB_001023fc: MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x24],EAX LAB_00102406: MOV EAX,dword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x24] CMP EAX,ECX JGE 0x0010241e MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x20],EAX JMP 0x0010244c LAB_0010241e: CMP dword ptr [RSP + 0x50],0x0 JLE 0x0010243a MOV EAX,dword ptr [RSP + 0x50] MOV ECX,0x4 CDQ IDIV ECX SHL EAX,0x2 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00102444 LAB_0010243a: MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x1c],EAX LAB_00102444: MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x20],EAX LAB_0010244c: MOV ECX,dword ptr [RSP + 0x20] MOV EAX,0x2710 CMP EAX,ECX JLE 0x00102464 MOV EAX,0x2710 MOV dword ptr [RSP + 0x18],EAX JMP 0x001024e2 LAB_00102464: MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RSP + 0x50],0x0 JLE 0x0010248a MOV EAX,dword ptr [RSP + 0x50] MOV ECX,0x4 CDQ IDIV ECX SHL EAX,0x2 MOV dword ptr [RSP + 0x10],EAX JMP 0x00102494 LAB_0010248a: MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x10],EAX LAB_00102494: MOV EAX,dword ptr [RSP + 0x14] MOV ECX,dword ptr [RSP + 0x10] CMP EAX,ECX JGE 0x001024ac MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0xc],EAX JMP 0x001024da LAB_001024ac: CMP dword ptr [RSP + 0x50],0x0 JLE 0x001024c8 MOV EAX,dword ptr [RSP + 0x50] MOV ECX,0x4 CDQ IDIV ECX SHL EAX,0x2 MOV dword ptr [RSP + 0x8],EAX JMP 0x001024d2 LAB_001024c8: MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x8],EAX LAB_001024d2: MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0xc],EAX LAB_001024da: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x18],EAX LAB_001024e2: MOV EAX,dword ptr [RSP + 0x18] MOV dword ptr [0x001080d8],EAX JMP 0x0010251a LAB_001024ee: MOV EAX,0x2710 CMP EAX,dword ptr [0x001080d8] JLE 0x00102506 MOV EAX,0x2710 MOV dword ptr [RSP + 0x4],EAX JMP 0x00102510 LAB_00102506: MOV EAX,dword ptr [0x001080d8] MOV dword ptr [RSP + 0x4],EAX LAB_00102510: MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [0x001080d8],EAX LAB_0010251a: CMP dword ptr [0x001080e8],0x0 JLE 0x00102562 MOV EAX,dword ptr [0x001080e8] MOV ECX,0x4 CDQ IDIV ECX MOV ECX,EAX MOV EAX,0x186a0 CMP EAX,ECX JLE 0x00102546 MOV EAX,0x186a0 MOV dword ptr [RSP],EAX JMP 0x00102557 LAB_00102546: MOV EAX,dword ptr [0x001080e8] MOV ECX,0x4 CDQ IDIV ECX MOV dword ptr [RSP],EAX LAB_00102557: MOV EAX,dword ptr [RSP] MOV dword ptr [0x001080dc],EAX JMP 0x0010256c LAB_00102562: MOV dword ptr [0x001080dc],0x7a120 LAB_0010256c: CMP dword ptr [0x001080e4],0x0 JLE 0x00102588 MOVSXD RAX,dword ptr [0x001080e4] SHR RAX,0x2 MOV dword ptr [0x001080e0],EAX JMP 0x00102592 LAB_00102588: MOV dword ptr [0x001080e0],0x2000 LAB_00102592: TEST byte ptr [0x001081c9],0x1 JZ 0x001025c9 MOV ESI,dword ptr [0x001080d0] MOV EDX,dword ptr [0x001080d4] MOV ECX,dword ptr [0x001080d8] MOV R8D,dword ptr [0x001080dc] MOV R9D,dword ptr [0x001080e0] LEA RDI,[0x1055f5] MOV AL,0x0 CALL 0x00104190 LAB_001025c9: ADD RSP,0x58 RET
void vsort_calibrate_thresholds(void) { int iVar1; int local_58; uint local_54; uint local_50; uint local_4c; uint local_48; uint local_40; uint local_3c; uint local_38; uint local_34; int local_2c; int local_28; int local_24; int local_20; int local_1c; int local_18; int local_14; int local_10; int local_c; int local_4; if (DAT_001080f0 < 1) { local_c = 0x10; } else { local_c = DAT_001080f0 / 4; } if (local_c < 0x21) { if (DAT_001080f0 < 1) { local_14 = 0x10; } else { local_14 = DAT_001080f0 / 4; } local_10 = local_14; } else { local_10 = 0x20; } if (local_10 < 8) { local_18 = 8; } else { if (DAT_001080f0 < 1) { local_1c = 0x10; } else { local_1c = DAT_001080f0 / 4; } if (local_1c < 0x21) { if (DAT_001080f0 < 1) { local_24 = 0x10; } else { local_24 = DAT_001080f0 / 4; } local_20 = local_24; } else { local_20 = 0x20; } local_18 = local_20; } thresholds = local_18; if (((DAT_00108105 & 1) == 0) || (DAT_001080f4 < 1)) { DAT_001080d4 = 0x40; } else { iVar1 = (DAT_001080f4 / 4) * 4; if (iVar1 == 0x20 || SBORROW4(0x20,iVar1) != (DAT_001080f4 / 4) * -4 + 0x20 < 0) { local_28 = DAT_001080f4 / 4 << 2; } else { local_28 = 0x20; } DAT_001080d4 = local_28; } if (DAT_001080f8 < 1) { local_2c = DAT_00108100; } else { local_2c = DAT_001080f8; } local_4 = local_2c; if (local_2c < 1) { local_4 = 1; } if (local_4 < 8) { if (local_4 < 4) { DAT_001080d8 = 150000; } else { DAT_001080d8 = 75000; } } else { DAT_001080d8 = 50000; } if (DAT_001080e8 < 1) { if (DAT_001080d8 < 10000) { local_54 = 10000; } else { local_54 = DAT_001080d8; } DAT_001080d8 = local_54; } else { local_4 = DAT_001080e8 / local_4; if (local_4 < 1) { local_34 = DAT_001080d8; } else { local_34 = local_4 / 4 << 2; } if ((int)DAT_001080d8 < (int)local_34) { local_38 = DAT_001080d8; } else { if (local_4 < 1) { local_3c = DAT_001080d8; } else { local_3c = local_4 / 4 << 2; } local_38 = local_3c; } if ((int)local_38 < 10000) { local_40 = 10000; } else { if (local_4 < 1) { local_48 = DAT_001080d8; } else { local_48 = local_4 / 4 << 2; } if ((int)DAT_001080d8 < (int)local_48) { local_4c = DAT_001080d8; } else { if (local_4 < 1) { local_50 = DAT_001080d8; } else { local_50 = local_4 / 4 << 2; } local_4c = local_50; } local_40 = local_4c; } DAT_001080d8 = local_40; } if (DAT_001080e8 < 1) { DAT_001080dc = 500000; } else { if (DAT_001080e8 / 4 < 100000) { local_58 = 100000; } else { local_58 = DAT_001080e8 / 4; } DAT_001080dc = local_58; } if (hardware < 1) { DAT_001080e0 = 0x2000; } else { DAT_001080e0 = (int4)((ulong)(long)hardware >> 2); } if ((vsort_library_initialized & 1) != 0) { vsort_log_info("Calibrated thresholds - insertion: %d, vector: %d (NEEDS IMPL), parallel: %d, radix: %d, cache_optimal: %d" ,local_18,DAT_001080d4,DAT_001080d8,DAT_001080dc,DAT_001080e0); } return; }
20,891
ftxui::borderDashed(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/border.cpp
Element borderDashed(Element child) { return std::make_shared<Border>(unpack(std::move(child)), DASHED); }
O1
cpp
ftxui::borderDashed(std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %rbx movq (%rsi), %rcx leaq 0x18(%rsp), %rax movq %rcx, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq 0x8(%rsi), %rdx movq %rcx, 0x8(%rsi) movq %rdx, 0x8(%rax) movq %rcx, (%rsi) movq %rsp, %rdi movq %rax, %rsi callq 0x22c33 movl $0x80, %edi callq 0xb3e0 movq %rax, %r14 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x36a7d(%rip), %rax # 0x580a0 movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 movq (%rsp), %rax leaq 0x28(%rsp), %rsi movq %rax, (%rsi) movups 0x8(%rsp), %xmm0 movups %xmm0, 0x8(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq %r15, %rdi movl $0x1, %edx xorl %ecx, %ecx callq 0x21dd2 leaq 0x28(%rsp), %rdi callq 0x151c0 movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq %rsp, %rdi callq 0x151c0 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x21689 callq 0x14c7c movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x151c0 movl $0x80, %esi movq %r14, %rdi callq 0xb400 jmp 0x216b5 movq %rax, %rbx movq %rsp, %rdi callq 0x151c0 jmp 0x216c2 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x216d1 callq 0x14c7c movq %rbx, %rdi callq 0xb780
_ZN5ftxui12borderDashedESt10shared_ptrINS_4NodeEE: push r15 push r14 push rbx sub rsp, 40h mov rbx, rdi mov rcx, [rsi] lea rax, [rsp+58h+var_40] mov [rax], rcx xor ecx, ecx mov [rax+8], rcx mov rdx, [rsi+8] mov [rsi+8], rcx mov [rax+8], rdx mov [rsi], rcx mov rdi, rsp mov rsi, rax call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>) mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rax, 100000001h mov [r14+8], rax lea rax, off_580A0 mov [r14], rax mov r15, r14 add r15, 10h mov rax, qword ptr [rsp+58h+var_58] lea rsi, [rsp+58h+var_30] mov [rsi], rax movups xmm0, [rsp+58h+var_58+8] movups xmmword ptr [rsi+8], xmm0 xorps xmm0, xmm0 movaps [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], 0 mov rdi, r15 mov edx, 1 xor ecx, ecx call _ZN5ftxui12_GLOBAL__N_16BorderC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EENS_11BorderStyleESt8optionalINS_5ColorEE; ftxui::`anonymous namespace'::Border::Border(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle,std::optional<ftxui::Color>) lea rdi, [rsp+58h+var_30] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov [rbx], r15 mov [rbx+8], r14 mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, [rsp+58h+var_38] test rdi, rdi jz short loc_21689 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_21689: mov rax, rbx add rsp, 40h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_20] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov esi, 80h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_216B5 mov rbx, rax loc_216B5: mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_216C2 mov rbx, rax loc_216C2: mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_216D1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_216D1: mov rdi, rbx call __Unwind_Resume
_QWORD * ftxui::borderDashed(_QWORD *a1, long long *a2, long long a3, long long a4, int a5, int a6) { volatile signed __int32 *v6; // rdx _QWORD *v7; // r14 int v8; // r8d int v9; // r9d void *v11; // [rsp+0h] [rbp-58h] BYREF __int128 v12; // [rsp+8h] [rbp-50h] long long v13; // [rsp+18h] [rbp-40h] BYREF volatile signed __int32 *v14; // [rsp+20h] [rbp-38h] void *v15; // [rsp+28h] [rbp-30h] BYREF __int128 v16; // [rsp+30h] [rbp-28h] v13 = *a2; v14 = 0LL; v6 = (volatile signed __int32 *)a2[1]; a2[1] = 0LL; v14 = v6; *a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>>( (unsigned int)&v11, (unsigned int)&v13, (_DWORD)v6, 0, a5, a6, (_DWORD)v11, v12); v7 = (_QWORD *)operator new(0x80uLL); v7[1] = 0x100000001LL; *v7 = off_580A0; v15 = v11; v16 = v12; ftxui::`anonymous namespace'::Border::Border((_DWORD)v7 + 16, (unsigned int)&v15, 1, 0, v8, v9, 0LL, 0LL, 0LL); std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v15); *a1 = v7 + 2; a1[1] = v7; std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v11); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return a1; }
borderDashed: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV RBX,RDI MOV RCX,qword ptr [RSI] LEA RAX,[RSP + 0x18] MOV qword ptr [RAX],RCX XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSI + 0x8] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RSI],RCX LAB_001215f6: MOV RDI,RSP MOV RSI,RAX CALL 0x00122c33 LAB_00121601: MOV EDI,0x80 CALL 0x0010b3e0 MOV R14,RAX MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x1580a0] MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 MOV RAX,qword ptr [RSP] LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RSI + 0x8],XMM0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_00121652: MOV RDI,R15 MOV EDX,0x1 XOR ECX,ECX CALL 0x00121dd2 LAB_00121661: LEA RDI,[RSP + 0x28] CALL 0x001151c0 MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,RSP CALL 0x001151c0 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x00121689 CALL 0x00114c7c LAB_00121689: MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* ftxui::borderDashed(std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::borderDashed(ftxui *this,int8 *param_2) { int8 *puVar1; int8 local_58; int8 uStack_50; int8 uStack_48; int8 local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; int8 local_30; int8 local_28; int8 uStack_20; local_40 = *param_2; local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; param_2[1] = 0; *param_2 = 0; /* try { // try from 001215f6 to 00121600 has its CatchHandler @ 001216bf */ unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_58,&local_40); /* try { // try from 00121601 to 0012160a has its CatchHandler @ 001216b2 */ puVar1 = (int8 *)operator_new(0x80); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_001580a0; local_30 = local_58; local_28 = uStack_50; uStack_20 = uStack_48; local_58 = 0; uStack_50 = 0; uStack_48 = 0; /* try { // try from 00121652 to 00121660 has its CatchHandler @ 00121696 */ (anonymous_namespace)::Border::Border((Border *)(puVar1 + 2),&local_30,1,0); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_30); *(Border **)this = (Border *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_58); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } return this; }
20,892
ConfigNumber<float>::set(char const*)
untodesu[P]voxelius/core/config.hh
inline void ConfigNumber<T>::set(const char *value) { std::istringstream(value) >> m_value; m_value = std::clamp(m_value, m_min_value, m_max_value); m_string = std::to_string(m_value); }
O0
cpp
ConfigNumber<float>::set(char const*): pushq %rbp movq %rsp, %rbp subq $0x200, %rsp # imm = 0x200 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x200(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x1f8(%rbp) leaq -0x1b1(%rbp), %rdi movq %rdi, -0x1f0(%rbp) callq 0x2d1c0 movq -0x1f8(%rbp), %rsi movq -0x1f0(%rbp), %rdx leaq -0x1b0(%rbp), %rdi callq 0x329f0 jmp 0x40ca8 leaq -0x190(%rbp), %rdi leaq -0x1b0(%rbp), %rsi movl $0x8, %edx callq 0x2c920 jmp 0x40cc2 movq -0x200(%rbp), %rsi addq $0x8, %rsi leaq -0x190(%rbp), %rdi callq 0x412c0 jmp 0x40cdb leaq -0x190(%rbp), %rdi callq 0x2ca40 leaq -0x1b0(%rbp), %rdi callq 0x2d648 leaq -0x1b1(%rbp), %rdi callq 0x2d620 movq -0x200(%rbp), %rdx movq %rdx, %rdi addq $0x8, %rdi movq %rdx, %rsi addq $0xc, %rsi addq $0x10, %rdx callq 0x412f0 movq %rax, %rcx movq -0x200(%rbp), %rax movss (%rcx), %xmm0 movss %xmm0, 0x8(%rax) movss 0x8(%rax), %xmm0 leaq -0x1e8(%rbp), %rdi callq 0x40e20 movq -0x200(%rbp), %rdi addq $0x18, %rdi leaq -0x1e8(%rbp), %rsi callq 0x2c9c0 leaq -0x1e8(%rbp), %rdi callq 0x2d648 addq $0x200, %rsp # imm = 0x200 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c0(%rbp) movl %eax, -0x1c4(%rbp) jmp 0x40dbf movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c0(%rbp) movl %eax, -0x1c4(%rbp) jmp 0x40db3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c0(%rbp) movl %eax, -0x1c4(%rbp) leaq -0x190(%rbp), %rdi callq 0x2ca40 leaq -0x1b0(%rbp), %rdi callq 0x2d648 leaq -0x1b1(%rbp), %rdi callq 0x2d620 movq -0x1c0(%rbp), %rdi callq 0x2cbe0 nopw (%rax,%rax)
_ZN12ConfigNumberIfE3setEPKc: push rbp mov rbp, rsp sub rsp, 200h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_200], rax mov rax, [rbp+var_10] mov [rbp+var_1F8], rax lea rdi, [rbp+var_1B1] mov [rbp+var_1F0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_1F8] mov rdx, [rbp+var_1F0] lea rdi, [rbp+var_1B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_40CA8: lea rdi, [rbp+var_190] lea rsi, [rbp+var_1B0] mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) jmp short $+2 loc_40CC2: mov rsi, [rbp+var_200] add rsi, 8 lea rdi, [rbp+var_190] call _ZStrsINSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEERfEOT_S8_OT0_; std::operator>><std::istringstream,float &>(std::istringstream &,float &) jmp short $+2 loc_40CDB: lea rdi, [rbp+var_190] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() lea rdi, [rbp+var_1B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_1B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdx, [rbp+var_200] mov rdi, rdx add rdi, 8 mov rsi, rdx add rsi, 0Ch add rdx, 10h call _ZSt5clampIfERKT_S2_S2_S2_; std::clamp<float>(float const&,float const&,float const&) mov rcx, rax mov rax, [rbp+var_200] movss xmm0, dword ptr [rcx] movss dword ptr [rax+8], xmm0 movss xmm0, dword ptr [rax+8]; float lea rdi, [rbp+var_1E8]; this call _ZNSt7__cxx119to_stringEf; std::to_string(float) mov rdi, [rbp+var_200] add rdi, 18h lea rsi, [rbp+var_1E8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 200h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_1C0], rcx mov [rbp+var_1C4], eax jmp short loc_40DBF mov rcx, rax mov eax, edx mov [rbp+var_1C0], rcx mov [rbp+var_1C4], eax jmp short loc_40DB3 mov rcx, rax mov eax, edx mov [rbp+var_1C0], rcx mov [rbp+var_1C4], eax lea rdi, [rbp+var_190] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_40DB3: lea rdi, [rbp+var_1B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_40DBF: lea rdi, [rbp+var_1B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rbp+var_1C0] call __Unwind_Resume
void ConfigNumber<float>::set(long long a1, long long a2) { _BYTE v2[36]; // [rsp+18h] [rbp-1E8h] BYREF char v3; // [rsp+4Fh] [rbp-1B1h] BYREF _BYTE v4[32]; // [rsp+50h] [rbp-1B0h] BYREF _BYTE v5[384]; // [rsp+70h] [rbp-190h] BYREF long long v6; // [rsp+1F0h] [rbp-10h] long long v7; // [rsp+1F8h] [rbp-8h] v7 = a1; v6 = a2; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v4, a2, (long long)&v3); std::istringstream::basic_istringstream(v5, v4, 8LL); std::operator>><std::istringstream,float &>(v5, a1 + 8); std::istringstream::~istringstream(v5); std::string::~string(v4); std::allocator<char>::~allocator(&v3); *(_DWORD *)(a1 + 8) = *(_DWORD *)std::clamp<float>(a1 + 8, a1 + 12, a1 + 16); std::to_string((std::__cxx11 *)v2, *(float *)(a1 + 8)); std::string::operator=(a1 + 24); std::string::~string(v2); }
set: PUSH RBP MOV RBP,RSP SUB RSP,0x200 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x200],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x1f8],RAX LEA RDI,[RBP + -0x1b1] MOV qword ptr [RBP + -0x1f0],RDI CALL 0x0012d1c0 MOV RSI,qword ptr [RBP + -0x1f8] MOV RDX,qword ptr [RBP + -0x1f0] LAB_00140c9a: LEA RDI,[RBP + -0x1b0] CALL 0x001329f0 JMP 0x00140ca8 LAB_00140ca8: LEA RDI,[RBP + -0x190] LEA RSI,[RBP + -0x1b0] MOV EDX,0x8 CALL 0x0012c920 JMP 0x00140cc2 LAB_00140cc2: MOV RSI,qword ptr [RBP + -0x200] ADD RSI,0x8 LAB_00140ccd: LEA RDI,[RBP + -0x190] CALL 0x001412c0 LAB_00140cd9: JMP 0x00140cdb LAB_00140cdb: LEA RDI,[RBP + -0x190] CALL 0x0012ca40 LEA RDI,[RBP + -0x1b0] CALL 0x0012d648 LEA RDI,[RBP + -0x1b1] CALL 0x0012d620 MOV RDX,qword ptr [RBP + -0x200] MOV RDI,RDX ADD RDI,0x8 MOV RSI,RDX ADD RSI,0xc ADD RDX,0x10 CALL 0x001412f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x200] MOVSS XMM0,dword ptr [RCX] MOVSS dword ptr [RAX + 0x8],XMM0 MOVSS XMM0,dword ptr [RAX + 0x8] LEA RDI,[RBP + -0x1e8] CALL 0x00140e20 MOV RDI,qword ptr [RBP + -0x200] ADD RDI,0x18 LEA RSI,[RBP + -0x1e8] CALL 0x0012c9c0 LEA RDI,[RBP + -0x1e8] CALL 0x0012d648 ADD RSP,0x200 POP RBP RET
/* ConfigNumber<float>::set(char const*) */ void __thiscall ConfigNumber<float>::set(ConfigNumber<float> *this,char *param_1) { float *pfVar1; __cxx11 local_1f0 [55]; allocator local_1b9; string local_1b8 [32]; istringstream local_198 [384]; char *local_18; ConfigNumber<float> *local_10; local_18 = param_1; local_10 = this; std::allocator<char>::allocator(); /* try { // try from 00140c9a to 00140ca5 has its CatchHandler @ 00140d6d */ std::__cxx11::string::string<std::allocator<char>>(local_1b8,param_1,&local_1b9); /* try { // try from 00140ca8 to 00140cbf has its CatchHandler @ 00140d81 */ std::__cxx11::istringstream::istringstream(local_198,local_1b8,8); /* try { // try from 00140ccd to 00140cd8 has its CatchHandler @ 00140d95 */ std::operator>>(local_198,(float *)(this + 8)); std::__cxx11::istringstream::~istringstream(local_198); std::__cxx11::string::~string(local_1b8); std::allocator<char>::~allocator((allocator<char> *)&local_1b9); pfVar1 = std::clamp<float>((float *)(this + 8),(float *)(this + 0xc),(float *)(this + 0x10)); *(float *)(this + 8) = *pfVar1; std::__cxx11::to_string(local_1f0,*(float *)(this + 8)); std::__cxx11::string::operator=((string *)(this + 0x18),(string *)local_1f0); std::__cxx11::string::~string((string *)local_1f0); return; }
20,893
ConfigNumber<float>::set(char const*)
untodesu[P]voxelius/core/config.hh
inline void ConfigNumber<T>::set(const char *value) { std::istringstream(value) >> m_value; m_value = std::clamp(m_value, m_min_value, m_max_value); m_string = std::to_string(m_value); }
O2
cpp
ConfigNumber<float>::set(char const*): pushq %r14 pushq %rbx subq $0x1a8, %rsp # imm = 0x1A8 movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x2a464 leaq 0x28(%rsp), %rdi pushq $0x8 popq %rdx movq %r14, %rsi callq 0x26f70 leaq 0x8(%rbx), %rsi leaq 0x28(%rsp), %rdi callq 0x27270 leaq 0x28(%rsp), %rdi callq 0x26390 leaq 0x8(%rsp), %rdi callq 0x272a8 movss 0x8(%rbx), %xmm0 xorl %eax, %eax ucomiss 0x10(%rbx), %xmm0 seta %al movss 0xc(%rbx), %xmm1 ucomiss %xmm0, %xmm1 leaq 0x8(,%rax,8), %rax pushq $0xc popq %rcx cmovbeq %rax, %rcx movss (%rbx,%rcx), %xmm0 movss %xmm0, 0x8(%rbx) leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x2da4d addq $0x18, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x26b30 movq %r14, %rdi callq 0x272a8 addq $0x1a8, %rsp # imm = 0x1A8 popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x26390 jmp 0x2da35 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x272a8 movq %rbx, %rdi callq 0x27040 nop
_ZN12ConfigNumberIfE3setEPKc: push r14 push rbx sub rsp, 1A8h mov rbx, rdi lea r14, [rsp+1B8h+var_1B0] lea rdx, [rsp+1B8h+var_1B1] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+1B8h+var_190] push 8 pop rdx mov rsi, r14 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rsi, [rbx+8] lea rdi, [rsp+1B8h+var_190] call __ZNSi10_M_extractIfEERSiRT_; std::istream::_M_extract<float>(float &) lea rdi, [rsp+1B8h+var_190] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() lea rdi, [rsp+1B8h+var_1B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() movss xmm0, dword ptr [rbx+8] xor eax, eax ucomiss xmm0, dword ptr [rbx+10h] setnbe al movss xmm1, dword ptr [rbx+0Ch] ucomiss xmm1, xmm0 lea rax, ds:8[rax*8] push 0Ch pop rcx cmovbe rcx, rax movss xmm0, dword ptr [rbx+rcx]; float movss dword ptr [rbx+8], xmm0 lea r14, [rsp+1B8h+var_190] mov rdi, r14; this call _ZNSt7__cxx119to_stringEf; std::to_string(float) add rbx, 18h mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 1A8h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() jmp short loc_2DA35 mov rbx, rax loc_2DA35: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
void ConfigNumber<float>::set(float *a1, long long a2) { float v2; // xmm0_4 long long v3; // rcx float v4; // xmm0_4 _QWORD v5[4]; // [rsp+8h] [rbp-1B0h] BYREF _BYTE v6[400]; // [rsp+28h] [rbp-190h] BYREF std::string::basic_string<std::allocator<char>>(v5, a2); std::istringstream::basic_istringstream(v6, v5, 8LL); std::istream::_M_extract<float>(v6, a1 + 2); std::istringstream::~istringstream(v6); std::string::~string(v5); v2 = a1[2]; v3 = 12LL; if ( a1[3] <= v2 ) v3 = 8LL * (v2 > a1[4]) + 8; v4 = *(float *)((char *)a1 + v3); a1[2] = v4; std::to_string((std::__cxx11 *)v6, v4); std::string::operator=(a1 + 6, v6); std::string::~string(v6); }
set: PUSH R14 PUSH RBX SUB RSP,0x1a8 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x0012a464 LAB_0012d993: LEA RDI,[RSP + 0x28] PUSH 0x8 POP RDX MOV RSI,R14 CALL 0x00126f70 LEA RSI,[RBX + 0x8] LAB_0012d9a7: LEA RDI,[RSP + 0x28] CALL 0x00127270 LAB_0012d9b1: LEA RDI,[RSP + 0x28] CALL 0x00126390 LEA RDI,[RSP + 0x8] CALL 0x001272a8 MOVSS XMM0,dword ptr [RBX + 0x8] XOR EAX,EAX UCOMISS XMM0,dword ptr [RBX + 0x10] SETA AL MOVSS XMM1,dword ptr [RBX + 0xc] UCOMISS XMM1,XMM0 LEA RAX,[0x8 + RAX*0x8] PUSH 0xc POP RCX CMOVBE RCX,RAX MOVSS XMM0,dword ptr [RBX + RCX*0x1] MOVSS dword ptr [RBX + 0x8],XMM0 LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x0012da4d ADD RBX,0x18 MOV RDI,RBX MOV RSI,R14 CALL 0x00126b30 MOV RDI,R14 CALL 0x001272a8 ADD RSP,0x1a8 POP RBX POP R14 RET
/* ConfigNumber<float>::set(char const*) */ void __thiscall ConfigNumber<float>::set(ConfigNumber<float> *this,char *param_1) { float fVar1; long lVar2; allocator local_1b1; string local_1b0 [32]; istringstream local_190 [384]; std::__cxx11::string::string<std::allocator<char>>(local_1b0,param_1,&local_1b1); /* try { // try from 0012d993 to 0012d9a2 has its CatchHandler @ 0012da32 */ std::__cxx11::istringstream::istringstream(local_190,local_1b0,8); /* try { // try from 0012d9a7 to 0012d9b0 has its CatchHandler @ 0012da23 */ std::istream::_M_extract<float>((float *)local_190); std::__cxx11::istringstream::~istringstream(local_190); std::__cxx11::string::~string(local_1b0); fVar1 = *(float *)(this + 8); lVar2 = 0xc; if (*(float *)(this + 0xc) <= fVar1) { lVar2 = (ulong)(*(float *)(this + 0x10) <= fVar1 && fVar1 != *(float *)(this + 0x10)) * 8 + 8; } fVar1 = *(float *)(this + lVar2); *(float *)(this + 8) = fVar1; std::__cxx11::to_string((__cxx11 *)local_190,fVar1); std::__cxx11::string::operator=((string *)(this + 0x18),(string *)local_190); std::__cxx11::string::~string((string *)local_190); return; }
20,894
ConfigNumber<float>::set(char const*)
untodesu[P]voxelius/core/config.hh
inline void ConfigNumber<T>::set(const char *value) { std::istringstream(value) >> m_value; m_value = std::clamp(m_value, m_min_value, m_max_value); m_string = std::to_string(m_value); }
O3
cpp
ConfigNumber<float>::set(char const*): pushq %r14 pushq %rbx subq $0x1a8, %rsp # imm = 0x1A8 movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x2f9b0 leaq 0x28(%rsp), %rdi movq %r14, %rsi movl $0x8, %edx callq 0x26f00 leaq 0x8(%rbx), %rsi leaq 0x28(%rsp), %rdi callq 0x27200 movq 0x224652(%rip), %rsi # 0x256f58 leaq 0x28(%rsp), %rdi callq 0x26ca0 leaq 0xa0(%rsp), %rdi callq 0x26280 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x32938 movq 0x18(%rsp), %rsi incq %rsi callq 0x268e0 movss 0x8(%rbx), %xmm0 xorl %eax, %eax ucomiss 0x10(%rbx), %xmm0 seta %al movss 0xc(%rbx), %xmm1 ucomiss %xmm0, %xmm1 leaq 0x8(,%rax,8), %rax movl $0xc, %ecx cmovbeq %rax, %rcx movss (%rbx,%rcx), %xmm0 movss %xmm0, 0x8(%rbx) cvtss2sd %xmm0, %xmm0 movq 0x2245bc(%rip), %rsi # 0x256f30 leaq 0x1a7c28(%rip), %rcx # 0x1da5a3 leaq 0x28(%rsp), %r14 movl $0x3a, %edx movq %r14, %rdi movb $0x1, %al callq 0x32a46 addq $0x18, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x26ad0 movq (%r14), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x329b8 movq 0x38(%rsp), %rsi incq %rsi callq 0x268e0 addq $0x1a8, %rsp # imm = 0x1A8 popq %rbx popq %r14 retq movq %rax, %rbx movq 0x22458b(%rip), %rsi # 0x256f58 leaq 0x28(%rsp), %rdi callq 0x26ca0 leaq 0xa0(%rsp), %rdi callq 0x26280 jmp 0x329e9 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x32a04 movq 0x18(%rsp), %rsi incq %rsi callq 0x268e0 movq %rbx, %rdi callq 0x26ff0
_ZN12ConfigNumberIfE3setEPKc: push r14 push rbx sub rsp, 1A8h mov rbx, rdi lea r14, [rsp+1B8h+var_1B0] lea rdx, [rsp+1B8h+var_1B1] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+1B8h+var_190] mov rsi, r14 mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rsi, [rbx+8] lea rdi, [rsp+1B8h+var_190] call __ZNSi10_M_extractIfEERSiRT_; std::istream::_M_extract<float>(float &) mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1B8h+var_190] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+1B8h+var_118]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() lea rax, [rsp+1B8h+var_1A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_32938 mov rsi, [rsp+1B8h+var_1A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_32938: movss xmm0, dword ptr [rbx+8] xor eax, eax ucomiss xmm0, dword ptr [rbx+10h] setnbe al movss xmm1, dword ptr [rbx+0Ch] ucomiss xmm1, xmm0 lea rax, ds:8[rax*8] mov ecx, 0Ch cmovbe rcx, rax movss xmm0, dword ptr [rbx+rcx] movss dword ptr [rbx+8], xmm0 cvtss2sd xmm0, xmm0 mov rsi, cs:vsnprintf_ptr lea rcx, aAscentFDescent+21h; "%f" lea r14, [rsp+1B8h+var_190] mov edx, 3Ah ; ':' mov rdi, r14 mov al, 1 call _ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z; __gnu_cxx::__to_xstring<std::string,char>(int (*)(char *,ulong,char const*,__va_list_tag *),ulong,char const*,...) add rbx, 18h mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+1B8h+var_180] cmp rdi, rax jz short loc_329B8 mov rsi, [rsp+1B8h+var_180] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_329B8: add rsp, 1A8h pop rbx pop r14 retn mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+arg_98]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() jmp short loc_329E9 mov rbx, rax loc_329E9: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_32A04 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_32A04: mov rdi, rbx call __Unwind_Resume
void ConfigNumber<float>::set(float *a1, long long a2) { int v2; // r8d int v3; // r9d float v4; // xmm0_4 long long v5; // rcx float v6; // xmm0_4 void *v7[2]; // [rsp+8h] [rbp-1B0h] BYREF long long v8; // [rsp+18h] [rbp-1A0h] BYREF void *v9[2]; // [rsp+28h] [rbp-190h] BYREF long long v10; // [rsp+38h] [rbp-180h] BYREF _BYTE v11[280]; // [rsp+A0h] [rbp-118h] BYREF std::string::basic_string<std::allocator<char>>(v7, a2); std::istringstream::basic_istringstream(v9, v7, 8LL); std::istream::_M_extract<float>(v9, a1 + 2); std::istringstream::~istringstream(v9, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v11); if ( v7[0] != &v8 ) operator delete(v7[0], v8 + 1); v4 = a1[2]; v5 = 12LL; if ( a1[3] <= v4 ) v5 = 8LL * (v4 > a1[4]) + 8; v6 = *(float *)((char *)a1 + v5); a1[2] = v6; __gnu_cxx::__to_xstring<std::string,char>((unsigned int)v9, (unsigned int)&vsnprintf, 58, (unsigned int)"%f", v2, v3); std::string::operator=(a1 + 6, v9, v6); if ( v9[0] != &v10 ) operator delete(v9[0], v10 + 1); }
set: PUSH R14 PUSH RBX SUB RSP,0x1a8 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x0012f9b0 LAB_001328df: LEA RDI,[RSP + 0x28] MOV RSI,R14 MOV EDX,0x8 CALL 0x00126f00 LEA RSI,[RBX + 0x8] LAB_001328f5: LEA RDI,[RSP + 0x28] CALL 0x00127200 LAB_001328ff: MOV RSI,qword ptr [0x00356f58] LEA RDI,[RSP + 0x28] CALL 0x00126ca0 LEA RDI,[RSP + 0xa0] CALL 0x00126280 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00132938 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001268e0 LAB_00132938: MOVSS XMM0,dword ptr [RBX + 0x8] XOR EAX,EAX UCOMISS XMM0,dword ptr [RBX + 0x10] SETA AL MOVSS XMM1,dword ptr [RBX + 0xc] UCOMISS XMM1,XMM0 LEA RAX,[0x8 + RAX*0x8] MOV ECX,0xc CMOVBE RCX,RAX MOVSS XMM0,dword ptr [RBX + RCX*0x1] MOVSS dword ptr [RBX + 0x8],XMM0 CVTSS2SD XMM0,XMM0 MOV RSI,qword ptr [0x00356f30] LEA RCX,[0x2da5a3] LEA R14,[RSP + 0x28] MOV EDX,0x3a MOV RDI,R14 MOV AL,0x1 CALL 0x00132a46 ADD RBX,0x18 MOV RDI,RBX MOV RSI,R14 CALL 0x00126ad0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x001329b8 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001268e0 LAB_001329b8: ADD RSP,0x1a8 POP RBX POP R14 RET
/* ConfigNumber<float>::set(char const*) */ void __thiscall ConfigNumber<float>::set(ConfigNumber<float> *this,char *param_1) { float fVar1; long lVar2; allocator local_1b1; long *local_1b0 [2]; long local_1a0 [2]; long *local_190 [2]; long local_180 [13]; ios_base local_118 [264]; std::__cxx11::string::string<std::allocator<char>>((string *)local_1b0,param_1,&local_1b1); /* try { // try from 001328df to 001328f0 has its CatchHandler @ 001329e6 */ std::__cxx11::istringstream::istringstream((istringstream *)local_190,(string *)local_1b0,8); /* try { // try from 001328f5 to 001328fe has its CatchHandler @ 001329c3 */ std::istream::_M_extract<float>((float *)local_190); std::__cxx11::istringstream::~istringstream((istringstream *)local_190); std::ios_base::~ios_base(local_118); if (local_1b0[0] != local_1a0) { operator_delete(local_1b0[0],local_1a0[0] + 1); } fVar1 = *(float *)(this + 8); lVar2 = 0xc; if (*(float *)(this + 0xc) <= fVar1) { lVar2 = (ulong)(*(float *)(this + 0x10) <= fVar1 && fVar1 != *(float *)(this + 0x10)) * 8 + 8; } fVar1 = *(float *)(this + lVar2); *(float *)(this + 8) = fVar1; __gnu_cxx::__to_xstring<std::__cxx11::string,char> ((_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr *)local_190, (ulong)PTR_vsnprintf_00356f30,(char *)0x3a,(double)fVar1,"%f"); std::__cxx11::string::operator=((string *)(this + 0x18),(string *)local_190); if (local_190[0] != local_180) { operator_delete(local_190[0],local_180[0] + 1); } return; }
20,895
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O0
c
my_hash_sort_simple: 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 %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x20(%rax), %eax movw %ax, -0x3a(%rbp) cmpq $0x10, -0x18(%rbp) jbe 0xa1bde movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xa1c60 movq %rax, -0x48(%rbp) jmp 0xa1bea movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0xa1c2f movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x38(%rbp) movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movzwl -0x3a(%rbp), %ecx cmpl %ecx, %eax je 0xa1c2d movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0xa1c2f jmp 0xa1bf2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0xa1ad0 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_simple: 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 [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+20h] mov [rbp+var_3A], ax cmp [rbp+var_18], 10h jbe short loc_A1BDE mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call skip_trailing_space_2 mov [rbp+var_48], rax jmp short loc_A1BEA loc_A1BDE: mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax loc_A1BEA: mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_A1BF2: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_A1C2F mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_3A] cmp eax, ecx jz short loc_A1C2D mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_A1C2F loc_A1C2D: jmp short loc_A1BF2 loc_A1C2F: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] sub rdx, rax mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call my_hash_sort_simple_nopad add rsp, 50h pop rbp retn
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5) { unsigned long long v5; // rcx long long v7; // [rsp+8h] [rbp-48h] __int16 v8; // [rsp+16h] [rbp-3Ah] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] v10 = *(_QWORD *)(a1 + 88); v8 = *(unsigned __int8 *)(v10 + 32); if ( a3 <= 0x10 ) v7 = (long long)&a2[a3]; else v7 = skip_trailing_space_2(a2, a3); v9 = v7; while ( (unsigned long long)a2 < v9 ) { v5 = v9--; if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 ) return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5); } return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5); }
my_hash_sort_simple: 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 qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x20] MOV word ptr [RBP + -0x3a],AX CMP qword ptr [RBP + -0x18],0x10 JBE 0x001a1bde MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001a1c60 MOV qword ptr [RBP + -0x48],RAX JMP 0x001a1bea LAB_001a1bde: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LAB_001a1bea: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_001a1bf2: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001a1c2f MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,word ptr [RBP + -0x3a] CMP EAX,ECX JZ 0x001a1c2d MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x001a1c2f LAB_001a1c2d: JMP 0x001a1bf2 LAB_001a1c2f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x001a1ad0 ADD RSP,0x50 POP RBP RET
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4, int8 param_5) { char cVar1; long lVar2; ulong uVar3; ulong local_50; ulong local_40; lVar2 = *(long *)(param_1 + 0x58); cVar1 = *(char *)(lVar2 + 0x20); if (param_3 < 0x11) { local_50 = param_2 + param_3; } else { local_50 = skip_trailing_space(param_2,param_3); } local_40 = local_50; uVar3 = local_40; do { local_40 = uVar3; if (local_40 <= param_2) break; uVar3 = local_40 - 1; } while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1); my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5); return; }
20,896
minja::Value::dump_string(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&, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, char)
monkey531[P]llama/common/minja.hpp
static void dump_string(const json & primitive, std::ostringstream & out, char string_quote = '\'') { if (!primitive.is_string()) throw std::runtime_error("Value is not a string: " + primitive.dump()); auto s = primitive.dump(); if (string_quote == '"' || s.find('\'') != std::string::npos) { out << s; return; } // Reuse json dump, just changing string quotes out << string_quote; for (size_t i = 1, n = s.size() - 1; i < n; ++i) { if (s[i] == '\\' && s[i + 1] == '"') { out << '"'; i++; } else if (s[i] == string_quote) { out << '\\' << string_quote; } else { out << s[i]; } } out << string_quote; }
O3
cpp
minja::Value::dump_string(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&, std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, char): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x89cdf movl %edx, %ebp movq %rsi, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0x20, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x825f4 cmpb $0x22, %bpl je 0x89bdf movq %rsp, %rdi movl $0x27, %esi xorl %edx, %edx callq 0x1bcf0 cmpq $-0x1, %rax je 0x89c18 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x1bb70 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x89c0b movq 0x10(%rsp), %rsi incq %rsi callq 0x1ba20 addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x20(%rsp), %rsi movb %bpl, (%rsi) movl $0x1, %edx movq %rbx, %rdi callq 0x1bb70 movq 0x8(%rsp), %r15 decq %r15 cmpq $0x2, %r15 jb 0x89cc5 movl $0x1, %r12d leaq 0x20(%rsp), %r14 movq (%rsp), %rcx movb (%rcx,%r12), %al cmpb $0x5c, %al jne 0x89c78 cmpb $0x22, 0x1(%rcx,%r12) jne 0x89c78 movb $0x22, 0x20(%rsp) movl $0x1, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x1bb70 incq %r12 jmp 0x89cbd cmpb %bpl, %al jne 0x89ca9 movb $0x5c, 0x20(%rsp) movl $0x1, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x1bb70 movb %bpl, 0x20(%rsp) movl $0x1, %edx movq %rax, %rdi movq %r14, %rsi callq 0x1bb70 jmp 0x89cbd movb %al, 0x20(%rsp) movl $0x1, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x1bb70 incq %r12 cmpq %r15, %r12 jb 0x89c4a leaq 0x20(%rsp), %rsi movb %bpl, (%rsi) movl $0x1, %edx movq %rbx, %rdi callq 0x1bb70 jmp 0x89bf0 movl $0x10, %edi callq 0x1b4f0 movq %rax, %rbx leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0x20, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x825f4 leaq 0x681a3(%rip), %rsi # 0xf1eb3 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x7b895 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x1c030 xorl %ebp, %ebp movq 0xa42b4(%rip), %rsi # 0x12dfe8 movq 0xa421d(%rip), %rdx # 0x12df58 movq %rbx, %rdi callq 0x1c150 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x89d61 movq 0x10(%rsp), %rsi incq %rsi callq 0x1ba20 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x89d7c movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba20 testb %bpl, %bpl jne 0x89da6 jmp 0x89dd0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x89da6 movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba20 jmp 0x89da6 movq %rax, %r14 movq %rbx, %rdi callq 0x1b770 jmp 0x89dd0 jmp 0x89db2 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x89dd0 movq 0x10(%rsp), %rsi incq %rsi callq 0x1ba20 movq %r14, %rdi callq 0x1c1e0
_ZN5minja5Value11dump_stringERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERNS6_19basic_ostringstreamIcS9_SA_EEc: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 3 jnz loc_89CDF mov ebp, edx mov rbx, rsi mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh mov ecx, 20h ; ' ' xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) cmp bpl, 22h ; '"' jz short loc_89BDF mov rdi, rsp mov esi, 27h ; ''' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_89C18 loc_89BDF: mov rsi, [rsp+68h+var_68] mov rdx, [rsp+68h+var_60] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_89BF0: lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_89C0B mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89C0B: add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_89C18: lea rsi, [rsp+68h+var_48] mov [rsi], bpl mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r15, [rsp+68h+var_60] dec r15 cmp r15, 2 jb loc_89CC5 mov r12d, 1 lea r14, [rsp+68h+var_48] loc_89C4A: mov rcx, [rsp+68h+var_68] mov al, [rcx+r12] cmp al, 5Ch ; '\' jnz short loc_89C78 cmp byte ptr [rcx+r12+1], 22h ; '"' jnz short loc_89C78 mov [rsp+68h+var_48], 22h ; '"' mov edx, 1 mov rdi, rbx mov rsi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) inc r12 jmp short loc_89CBD loc_89C78: cmp al, bpl jnz short loc_89CA9 mov [rsp+68h+var_48], 5Ch ; '\' mov edx, 1 mov rdi, rbx mov rsi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov [rsp+68h+var_48], bpl mov edx, 1 mov rdi, rax mov rsi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_89CBD loc_89CA9: mov [rsp+68h+var_48], al mov edx, 1 mov rdi, rbx mov rsi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_89CBD: inc r12 cmp r12, r15 jb short loc_89C4A loc_89CC5: lea rsi, [rsp+68h+var_48] mov [rsi], bpl mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp loc_89BF0 loc_89CDF: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_48] mov rsi, r14 mov edx, 0FFFFFFFFh mov ecx, 20h ; ' ' xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) lea rsi, aValueIsNotAStr; "Value is not a string: " mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_89D61 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89D61: lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_89D7C mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89D7C: test bpl, bpl jnz short loc_89DA6 jmp short loc_89DD0 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_89DA6 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_89DA6 mov r14, rax loc_89DA6: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_89DD0 jmp short $+2 loc_89DB2: mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_89DD0 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89DD0: mov rdi, r14 call __Unwind_Resume
void minja::Value::dump_string(_BYTE *a1, long long a2, char a3) { unsigned long long v4; // r15 unsigned long long v5; // r12 char v6; // al long long v7; // rax void *exception; // rbx long long *v9; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+8h] [rbp-60h] long long v11; // [rsp+10h] [rbp-58h] BYREF _BYTE v12[16]; // [rsp+20h] [rbp-48h] BYREF if ( *a1 != 3 ) { exception = __cxa_allocate_exception(0x10uLL); 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>::dump( (long long)v12, (long long)a1, -1, 32, 0, 0); std::operator+<char>((long long)&v9, (long long)"Value is not a string: ", (long long)v12); std::runtime_error::runtime_error(exception); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } 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>::dump( (long long)&v9, (long long)a1, -1, 32, 0, 0); if ( a3 != 34 && std::string::find(&v9, 39LL, 0LL) == -1 ) { v12[0] = a3; std::__ostream_insert<char,std::char_traits<char>>(a2, v12, 1LL); v4 = v10 - 1; if ( (unsigned long long)(v10 - 1) >= 2 ) { v5 = 1LL; do { v6 = *((_BYTE *)v9 + v5); if ( v6 == 92 && *((_BYTE *)v9 + v5 + 1) == 34 ) { v12[0] = 34; std::__ostream_insert<char,std::char_traits<char>>(a2, v12, 1LL); ++v5; } else if ( v6 == a3 ) { v12[0] = 92; v7 = std::__ostream_insert<char,std::char_traits<char>>(a2, v12, 1LL); v12[0] = a3; std::__ostream_insert<char,std::char_traits<char>>(v7, v12, 1LL); } else { v12[0] = *((_BYTE *)v9 + v5); std::__ostream_insert<char,std::char_traits<char>>(a2, v12, 1LL); } ++v5; } while ( v5 < v4 ); } v12[0] = a3; std::__ostream_insert<char,std::char_traits<char>>(a2, v12, 1LL); } else { std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10); } if ( v9 != &v11 ) operator delete(v9, v11 + 1); }
dump_string: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x00189cdf MOV EBP,EDX MOV RBX,RSI MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff MOV ECX,0x20 XOR R8D,R8D XOR R9D,R9D CALL 0x001825f4 CMP BPL,0x22 JZ 0x00189bdf MOV RDI,RSP MOV ESI,0x27 XOR EDX,EDX CALL 0x0011bcf0 CMP RAX,-0x1 JZ 0x00189c18 LAB_00189bdf: MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_00189be8: MOV RDI,RBX CALL 0x0011bb70 LAB_00189bf0: LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00189c0b MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011ba20 LAB_00189c0b: ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00189c18: LEA RSI,[RSP + 0x20] MOV byte ptr [RSI],BPL MOV EDX,0x1 MOV RDI,RBX CALL 0x0011bb70 MOV R15,qword ptr [RSP + 0x8] DEC R15 CMP R15,0x2 JC 0x00189cc5 MOV R12D,0x1 LEA R14,[RSP + 0x20] LAB_00189c4a: MOV RCX,qword ptr [RSP] MOV AL,byte ptr [RCX + R12*0x1] CMP AL,0x5c JNZ 0x00189c78 CMP byte ptr [RCX + R12*0x1 + 0x1],0x22 JNZ 0x00189c78 MOV byte ptr [RSP + 0x20],0x22 LAB_00189c63: MOV EDX,0x1 MOV RDI,RBX MOV RSI,R14 CALL 0x0011bb70 INC R12 JMP 0x00189cbd LAB_00189c78: CMP AL,BPL JNZ 0x00189ca9 MOV byte ptr [RSP + 0x20],0x5c MOV EDX,0x1 MOV RDI,RBX MOV RSI,R14 CALL 0x0011bb70 MOV byte ptr [RSP + 0x20],BPL MOV EDX,0x1 MOV RDI,RAX MOV RSI,R14 CALL 0x0011bb70 JMP 0x00189cbd LAB_00189ca9: MOV byte ptr [RSP + 0x20],AL MOV EDX,0x1 MOV RDI,RBX MOV RSI,R14 CALL 0x0011bb70 LAB_00189cbd: INC R12 CMP R12,R15 JC 0x00189c4a LAB_00189cc5: LEA RSI,[RSP + 0x20] MOV byte ptr [RSI],BPL LAB_00189ccd: MOV EDX,0x1 MOV RDI,RBX CALL 0x0011bb70 LAB_00189cda: JMP 0x00189bf0 LAB_00189cdf: MOV EDI,0x10 CALL 0x0011b4f0 MOV RBX,RAX LAB_00189cec: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV EDX,0xffffffff MOV ECX,0x20 XOR R8D,R8D XOR R9D,R9D CALL 0x001825f4 LAB_00189d09: LEA RSI,[0x1f1eb3] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x0017b895 MOV BPL,0x1 LAB_00189d20: MOV RSI,RSP MOV RDI,RBX CALL 0x0011c030 XOR EBP,EBP MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df58] MOV RDI,RBX CALL 0x0011c150
/* minja::Value::dump_string(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, std::__cxx11::ostringstream&, char) */ void minja::Value::dump_string(basic_json *param_1,ostringstream *param_2,char param_3) { long lVar1; ostream *poVar2; runtime_error *this; ulong uVar3; long *local_68; long local_60; long local_58 [2]; char local_48 [32]; if (*param_1 != (basic_json)0x3) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00189cec to 00189d08 has its CatchHandler @ 00189da3 */ 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> ::dump(local_48,param_1,0xffffffff,0x20,0,0); /* try { // try from 00189d09 to 00189d1c has its CatchHandler @ 00189d83 */ std::operator+((char *)&local_68,(string *)"Value is not a string: "); /* try { // try from 00189d20 to 00189d42 has its CatchHandler @ 00189d43 */ std::runtime_error::runtime_error(this,(string *)&local_68); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df58); } 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> ::dump(&local_68,param_1,0xffffffff,0x20,0,0); if (param_3 != '\"') { lVar1 = std::__cxx11::string::find((char)&local_68,0x27); if (lVar1 == -1) { local_48[0] = param_3; std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_48,1); if (1 < local_60 - 1U) { uVar3 = 1; do { local_48[0] = *(char *)((long)local_68 + uVar3); if ((local_48[0] == '\\') && (*(char *)((long)local_68 + uVar3 + 1) == '\"')) { local_48[0] = '\"'; /* try { // try from 00189c63 to 00189cbc has its CatchHandler @ 00189db2 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_48,1); uVar3 = uVar3 + 1; } else if (local_48[0] == param_3) { local_48[0] = '\\'; poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)param_2,local_48,1); local_48[0] = param_3; std::__ostream_insert<char,std::char_traits<char>>(poVar2,local_48,1); } else { std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_48,1); } uVar3 = uVar3 + 1; } while (uVar3 < local_60 - 1U); } local_48[0] = param_3; /* try { // try from 00189ccd to 00189cd9 has its CatchHandler @ 00189db0 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,local_48,1); goto LAB_00189bf0; } } /* try { // try from 00189be8 to 00189c2c has its CatchHandler @ 00189db0 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,(char *)local_68,local_60); LAB_00189bf0: if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } return; }
20,897
queue_replace
eloqsql/mysys/queues.c
void queue_replace(QUEUE *queue, uint idx) { uchar *element= queue->root[idx]; uint next_index, elements= queue->elements, half_queue= elements>>1, offset_to_key= queue->offset_to_key, offset_to_queue_pos= queue->offset_to_queue_pos; my_bool first= TRUE; while (idx <= half_queue) { next_index= idx + idx; if (next_index < elements && queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, queue->root[next_index+1]+offset_to_key) * queue->max_at_top > 0) next_index++; if (first && queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, element+offset_to_key) * queue->max_at_top >= 0) { queue->root[idx]= element; if (offset_to_queue_pos) (*(uint*) (element + offset_to_queue_pos-1))= idx; break; } first= FALSE; queue->root[idx]= queue->root[next_index]; if (offset_to_queue_pos) (*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx; idx=next_index; } insert_at(queue, element, idx); }
O0
c
queue_replace: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax shrl %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x18(%rax), %eax movl %eax, -0x28(%rbp) movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x2c(%rbp) movb $0x1, -0x2d(%rbp) movl -0xc(%rbp), %eax cmpl -0x24(%rbp), %eax ja 0xf7564 movl -0xc(%rbp), %eax addl -0xc(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax jae 0xf74ad movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx addl $0x1, %edx movl %edx, %edx movq (%rcx,%rdx,8), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jle 0xf74ad movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) movsbl -0x2d(%rbp), %eax cmpl $0x0, %eax je 0xf751b movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x18(%rbp), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jl 0xf751b movq -0x18(%rbp), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xf7519 movl -0xc(%rbp), %edx movq -0x18(%rbp), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) jmp 0xf7564 movb $0x0, -0x2d(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xf7559 movl -0xc(%rbp), %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) movl -0x1c(%rbp), %eax movl %eax, -0xc(%rbp) jmp 0xf743b movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0xc(%rbp), %edx callq 0xf7200 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
queue_replace: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov eax, [rax+10h] mov [rbp+var_20], eax mov eax, [rbp+var_20] shr eax, 1 mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+18h] mov [rbp+var_28], eax mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov [rbp+var_2C], eax mov [rbp+var_2D], 1 loc_F743B: mov eax, [rbp+var_C] cmp eax, [rbp+var_24] ja loc_F7564 mov eax, [rbp+var_C] add eax, [rbp+var_C] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jnb short loc_F74AD mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] add edx, 1 mov edx, edx mov rdx, [rcx+rdx*8] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jle short loc_F74AD mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax loc_F74AD: movsx eax, [rbp+var_2D] cmp eax, 0 jz short loc_F751B mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rdx, [rbp+var_18] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jl short loc_F751B mov rdx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_F7519 mov edx, [rbp+var_C] mov rax, [rbp+var_18] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_F7519: jmp short loc_F7564 loc_F751B: mov [rbp+var_2D], 0 mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_1C] mov rdx, [rax+rcx*8] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_F7559 mov edx, [rbp+var_C] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_F7559: mov eax, [rbp+var_1C] mov [rbp+var_C], eax jmp loc_F743B loc_F7564: mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov edx, [rbp+var_C] call insert_at add rsp, 30h pop rbp retn
long long queue_replace(long long a1, unsigned int a2) { char v3; // [rsp+3h] [rbp-2Dh] unsigned int v4; // [rsp+4h] [rbp-2Ch] unsigned int v5; // [rsp+8h] [rbp-28h] unsigned int v6; // [rsp+10h] [rbp-20h] unsigned int v7; // [rsp+14h] [rbp-1Ch] long long v8; // [rsp+18h] [rbp-18h] unsigned int v9; // [rsp+24h] [rbp-Ch] v9 = a2; v8 = *(_QWORD *)(*(_QWORD *)a1 + 8LL * a2); v6 = *(_DWORD *)(a1 + 16); v5 = *(_DWORD *)(a1 + 24); v4 = *(_DWORD *)(a1 + 28); v3 = 1; while ( v9 <= v6 >> 1 ) { v7 = 2 * v9; if ( 2 * v9 < v6 && (int)(*(_DWORD *)(a1 + 36) * (*(long long ( **)(_QWORD, _QWORD, _QWORD))(a1 + 40))( *(_QWORD *)(a1 + 8), v5 + *(_QWORD *)(*(_QWORD *)a1 + 8LL * v7), v5 + *(_QWORD *)(*(_QWORD *)a1 + 8LL * (v7 + 1)))) > 0 ) { ++v7; } if ( v3 && (int)(*(_DWORD *)(a1 + 36) * (*(long long ( **)(_QWORD, _QWORD, long long))(a1 + 40))( *(_QWORD *)(a1 + 8), v5 + *(_QWORD *)(*(_QWORD *)a1 + 8LL * v7), v5 + v8)) >= 0 ) { *(_QWORD *)(*(_QWORD *)a1 + 8LL * v9) = v8; if ( v4 ) *(_DWORD *)(v8 + v4 - 1) = v9; return insert_at((long long *)a1, v8, v9); } v3 = 0; *(_QWORD *)(*(_QWORD *)a1 + 8LL * v9) = *(_QWORD *)(*(_QWORD *)a1 + 8LL * v7); if ( v4 ) *(_DWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 8LL * v9) + v4 - 1LL) = v9; v9 = v7; } return insert_at((long long *)a1, v8, v9); }
queue_replace: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] SHR EAX,0x1 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x2c],EAX MOV byte ptr [RBP + -0x2d],0x1 LAB_001f743b: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x24] JA 0x001f7564 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JNC 0x001f74ad MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] ADD EDX,0x1 MOV EDX,EDX MOV RDX,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JLE 0x001f74ad MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_001f74ad: MOVSX EAX,byte ptr [RBP + -0x2d] CMP EAX,0x0 JZ 0x001f751b MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JL 0x001f751b MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001f7519 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001f7519: JMP 0x001f7564 LAB_001f751b: MOV byte ptr [RBP + -0x2d],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001f7559 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001f7559: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xc],EAX JMP 0x001f743b LAB_001f7564: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0xc] CALL 0x001f7200 ADD RSP,0x30 POP RBP RET
void queue_replace(long *param_1,uint param_2) { uint uVar1; uint uVar2; uint uVar3; long lVar4; bool bVar5; int iVar6; uint local_24; uint local_14; lVar4 = *(long *)(*param_1 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); uVar2 = *(uint *)(param_1 + 3); uVar3 = *(uint *)((long)param_1 + 0x1c); bVar5 = true; local_14 = param_2; do { if (uVar1 >> 1 < local_14) { LAB_001f7564: insert_at(param_1,lVar4,local_14); return; } local_24 = local_14 * 2; if ((local_24 < uVar1) && (iVar6 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, *(long *)(*param_1 + (ulong)(local_24 + 1) * 8) + (ulong)uVar2), 0 < iVar6 * *(int *)((long)param_1 + 0x24))) { local_24 = local_24 + 1; } if ((bVar5) && (iVar6 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, lVar4 + (ulong)uVar2), -1 < iVar6 * *(int *)((long)param_1 + 0x24))) { *(long *)(*param_1 + (ulong)local_14 * 8) = lVar4; if (uVar3 != 0) { *(uint *)(lVar4 + -1 + (ulong)uVar3) = local_14; } goto LAB_001f7564; } bVar5 = false; *(int8 *)(*param_1 + (ulong)local_14 * 8) = *(int8 *)(*param_1 + (ulong)local_24 * 8); if (uVar3 != 0) { *(uint *)(*(long *)(*param_1 + (ulong)local_14 * 8) + -1 + (ulong)uVar3) = local_14; } local_14 = local_24; } while( true ); }
20,898
free_maria_share
eloqsql/storage/maria/ma_close.c
void free_maria_share(MARIA_SHARE *share) { if (!share->internal_table) mysql_mutex_assert_owner(&share->intern_lock); if (!share->reopen && !share->in_trans && !(share->in_checkpoint & MARIA_CHECKPOINT_SHOULD_FREE_ME)) { /* No one can access this share anymore, time to delete it ! */ if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); ma_crypt_free(share); my_free(share->s3_path); (void) mysql_mutex_destroy(&share->intern_lock); (void) mysql_mutex_destroy(&share->close_lock); (void) mysql_cond_destroy(&share->key_del_cond); my_free(share); return; } if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); return; }
O0
c
free_maria_share: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x71f6f jmp 0x71f6b jmp 0x71f6d jmp 0x71f6f movq -0x8(%rbp), %rax cmpl $0x0, 0x7a8(%rax) jne 0x72015 movq -0x8(%rbp), %rax cmpl $0x0, 0x7ac(%rax) jne 0x72015 movq -0x8(%rbp), %rax movzbl 0x7d8(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x72015 movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x71fc1 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x71ef0 movq -0x8(%rbp), %rdi callq 0x88f50 movq -0x8(%rbp), %rax movq 0x798(%rax), %rdi callq 0xf3d30 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x71e30 movq -0x8(%rbp), %rdi addq $0x9b8, %rdi # imm = 0x9B8 callq 0x71e30 movq -0x8(%rbp), %rdi addq $0x980, %rdi # imm = 0x980 callq 0x72040 movq -0x8(%rbp), %rdi callq 0xf3d30 jmp 0x72034 movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x72032 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x71ef0 jmp 0x72034 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
free_maria_share: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_71F6F jmp short $+2 loc_71F6B: jmp short $+2 loc_71F6D: jmp short $+2 loc_71F6F: mov rax, [rbp+var_8] cmp dword ptr [rax+7A8h], 0 jnz loc_72015 mov rax, [rbp+var_8] cmp dword ptr [rax+7ACh], 0 jnz loc_72015 mov rax, [rbp+var_8] movzx eax, byte ptr [rax+7D8h] and eax, 2 cmp eax, 0 jnz short loc_72015 mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_71FC1 mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_10 loc_71FC1: mov rdi, [rbp+var_8] call ma_crypt_free mov rax, [rbp+var_8] mov rdi, [rax+798h] call my_free mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_destroy_3 mov rdi, [rbp+var_8] add rdi, 9B8h call inline_mysql_mutex_destroy_3 mov rdi, [rbp+var_8] add rdi, 980h call inline_mysql_cond_destroy_2 mov rdi, [rbp+var_8] call my_free jmp short loc_72034 loc_72015: mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_72032 mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_10 loc_72032: jmp short $+2 loc_72034: add rsp, 10h pop rbp retn
long long free_maria_share(long long a1) { long long result; // rax if ( *(_DWORD *)(a1 + 1960) || *(_DWORD *)(a1 + 1964) || (*(_BYTE *)(a1 + 2008) & 2) != 0 ) { result = a1; if ( !*(_BYTE *)(a1 + 2018) ) return inline_mysql_mutex_unlock_10(a1 + 2288); } else { if ( !*(_BYTE *)(a1 + 2018) ) inline_mysql_mutex_unlock_10(a1 + 2288); ma_crypt_free(a1); my_free(*(_QWORD *)(a1 + 1944)); inline_mysql_mutex_destroy_3(a1 + 2288); inline_mysql_mutex_destroy_3(a1 + 2488); inline_mysql_cond_destroy_2(a1 + 2432); return my_free(a1); } return result; }
free_maria_share: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x00171f6f JMP 0x00171f6b LAB_00171f6b: JMP 0x00171f6d LAB_00171f6d: JMP 0x00171f6f LAB_00171f6f: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x7a8],0x0 JNZ 0x00172015 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x7ac],0x0 JNZ 0x00172015 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x7d8] AND EAX,0x2 CMP EAX,0x0 JNZ 0x00172015 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x00171fc1 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00171ef0 LAB_00171fc1: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00188f50 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x798] CALL 0x001f3d30 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00171e30 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x9b8 CALL 0x00171e30 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x980 CALL 0x00172040 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f3d30 JMP 0x00172034 LAB_00172015: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x00172032 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00171ef0 LAB_00172032: JMP 0x00172034 LAB_00172034: ADD RSP,0x10 POP RBP RET
void free_maria_share(long param_1) { if (((*(int *)(param_1 + 0x7a8) == 0) && (*(int *)(param_1 + 0x7ac) == 0)) && ((*(byte *)(param_1 + 0x7d8) & 2) == 0)) { if (*(char *)(param_1 + 0x7e2) == '\0') { inline_mysql_mutex_unlock(param_1 + 0x8f0); } ma_crypt_free(param_1); my_free(*(int8 *)(param_1 + 0x798)); inline_mysql_mutex_destroy(param_1 + 0x8f0); inline_mysql_mutex_destroy(param_1 + 0x9b8); inline_mysql_cond_destroy(param_1 + 0x980); my_free(param_1); } else if (*(char *)(param_1 + 0x7e2) == '\0') { inline_mysql_mutex_unlock(param_1 + 0x8f0); } return; }
20,899
free_maria_share
eloqsql/storage/maria/ma_close.c
void free_maria_share(MARIA_SHARE *share) { if (!share->internal_table) mysql_mutex_assert_owner(&share->intern_lock); if (!share->reopen && !share->in_trans && !(share->in_checkpoint & MARIA_CHECKPOINT_SHOULD_FREE_ME)) { /* No one can access this share anymore, time to delete it ! */ if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); ma_crypt_free(share); my_free(share->s3_path); (void) mysql_mutex_destroy(&share->intern_lock); (void) mysql_mutex_destroy(&share->close_lock); (void) mysql_cond_destroy(&share->key_del_cond); my_free(share); return; } if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); return; }
O3
c
free_maria_share: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movb 0x7e2(%rdi), %al cmpl $0x0, 0x7a8(%rdi) jne 0x5c103 cmpl $0x0, 0x7ac(%rbx) jne 0x5c103 testb $0x2, 0x7d8(%rbx) jne 0x5c103 testb %al, %al jne 0x5c062 leaq 0x8f0(%rbx), %r14 movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x5c157 movq %r14, %rdi callq 0x291c0 movq %rbx, %rdi callq 0x67098 movq 0x798(%rbx), %rdi callq 0xa00ee leaq 0x8f0(%rbx), %r14 movq 0x930(%rbx), %rdi testq %rdi, %rdi je 0x5c0a1 leaq 0x329f80(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x930(%rbx) movq %r14, %rdi callq 0x290c0 leaq 0x9b8(%rbx), %r14 movq 0x9f8(%rbx), %rdi testq %rdi, %rdi je 0x5c0d4 leaq 0x329f4d(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x9f8(%rbx) movq %r14, %rdi callq 0x290c0 leaq 0x980(%rbx), %r14 movq 0x9b0(%rbx), %rdi testq %rdi, %rdi jne 0x5c13d movq %r14, %rdi callq 0x29260 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0xa00ee testb %al, %al je 0x5c10c popq %rbx popq %r14 popq %rbp retq movq 0x930(%rbx), %rdi addq $0x8f0, %rbx # imm = 0x8F0 testq %rdi, %rdi jne 0x5c12b movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x291c0 leaq 0x329ede(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x5c11f leaq 0x329ecc(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0x9b0(%rbx) jmp 0x5c0ef leaq 0x329eb2(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x5c05a
free_maria_share: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov al, [rdi+7E2h] cmp dword ptr [rdi+7A8h], 0 jnz loc_5C103 cmp dword ptr [rbx+7ACh], 0 jnz loc_5C103 test byte ptr [rbx+7D8h], 2 jnz loc_5C103 test al, al jnz short loc_5C062 lea r14, [rbx+8F0h] mov rdi, [rbx+930h] test rdi, rdi jnz loc_5C157 loc_5C05A: mov rdi, r14 call _pthread_mutex_unlock loc_5C062: mov rdi, rbx call ma_crypt_free mov rdi, [rbx+798h] call my_free lea r14, [rbx+8F0h] mov rdi, [rbx+930h] test rdi, rdi jz short loc_5C0A1 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+930h], 0 loc_5C0A1: mov rdi, r14 call _pthread_mutex_destroy lea r14, [rbx+9B8h] mov rdi, [rbx+9F8h] test rdi, rdi jz short loc_5C0D4 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+9F8h], 0 loc_5C0D4: mov rdi, r14 call _pthread_mutex_destroy lea r14, [rbx+980h] mov rdi, [rbx+9B0h] test rdi, rdi jnz short loc_5C13D loc_5C0EF: mov rdi, r14 call _pthread_cond_destroy mov rdi, rbx pop rbx pop r14 pop rbp jmp my_free loc_5C103: test al, al jz short loc_5C10C pop rbx pop r14 pop rbp retn loc_5C10C: mov rdi, [rbx+930h] add rbx, 8F0h test rdi, rdi jnz short loc_5C12B loc_5C11F: mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_5C12B: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_5C11F loc_5C13D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+9B0h], 0 jmp short loc_5C0EF loc_5C157: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_5C05A
char free_maria_share(long long a1) { char result; // al result = *(_BYTE *)(a1 + 2018); if ( *(_DWORD *)(a1 + 1960) || *(_DWORD *)(a1 + 1964) || (*(_BYTE *)(a1 + 2008) & 2) != 0 ) { if ( !result ) { if ( *(_QWORD *)(a1 + 2352) ) PSI_server[44](); return pthread_mutex_unlock(a1 + 2288); } } else { if ( !result ) { if ( *(_QWORD *)(a1 + 2352) ) PSI_server[44](); pthread_mutex_unlock(a1 + 2288); } ma_crypt_free(a1); my_free(*(_QWORD *)(a1 + 1944)); if ( *(_QWORD *)(a1 + 2352) ) { PSI_server[9](); *(_QWORD *)(a1 + 2352) = 0LL; } pthread_mutex_destroy(a1 + 2288); if ( *(_QWORD *)(a1 + 2552) ) { PSI_server[9](); *(_QWORD *)(a1 + 2552) = 0LL; } pthread_mutex_destroy(a1 + 2488); if ( *(_QWORD *)(a1 + 2480) ) { PSI_server[13](); *(_QWORD *)(a1 + 2480) = 0LL; } pthread_cond_destroy(a1 + 2432); return my_free(a1); } return result; }
free_maria_share: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV AL,byte ptr [RDI + 0x7e2] CMP dword ptr [RDI + 0x7a8],0x0 JNZ 0x0015c103 CMP dword ptr [RBX + 0x7ac],0x0 JNZ 0x0015c103 TEST byte ptr [RBX + 0x7d8],0x2 JNZ 0x0015c103 TEST AL,AL JNZ 0x0015c062 LEA R14,[RBX + 0x8f0] MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x0015c157 LAB_0015c05a: MOV RDI,R14 CALL 0x001291c0 LAB_0015c062: MOV RDI,RBX CALL 0x00167098 MOV RDI,qword ptr [RBX + 0x798] CALL 0x001a00ee LEA R14,[RBX + 0x8f0] MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JZ 0x0015c0a1 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x930],0x0 LAB_0015c0a1: MOV RDI,R14 CALL 0x001290c0 LEA R14,[RBX + 0x9b8] MOV RDI,qword ptr [RBX + 0x9f8] TEST RDI,RDI JZ 0x0015c0d4 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x9f8],0x0 LAB_0015c0d4: MOV RDI,R14 CALL 0x001290c0 LEA R14,[RBX + 0x980] MOV RDI,qword ptr [RBX + 0x9b0] TEST RDI,RDI JNZ 0x0015c13d LAB_0015c0ef: MOV RDI,R14 CALL 0x00129260 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001a00ee LAB_0015c103: TEST AL,AL JZ 0x0015c10c POP RBX POP R14 POP RBP RET LAB_0015c10c: MOV RDI,qword ptr [RBX + 0x930] ADD RBX,0x8f0 TEST RDI,RDI JNZ 0x0015c12b LAB_0015c11f: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001291c0 LAB_0015c12b: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0015c11f LAB_0015c13d: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0x9b0],0x0 JMP 0x0015c0ef LAB_0015c157: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0015c05a
void free_maria_share(long param_1) { if (((*(int *)(param_1 + 0x7a8) == 0) && (*(int *)(param_1 + 0x7ac) == 0)) && ((*(byte *)(param_1 + 0x7d8) & 2) == 0)) { if (*(char *)(param_1 + 0x7e2) == '\0') { if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x8f0)); } ma_crypt_free(param_1); my_free(*(int8 *)(param_1 + 0x798)); if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(param_1 + 0x930) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x8f0)); if (*(long *)(param_1 + 0x9f8) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(param_1 + 0x9f8) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x9b8)); if (*(long *)(param_1 + 0x9b0) != 0) { (**(code **)(PSI_server + 0x68))(); *(int8 *)(param_1 + 0x9b0) = 0; } pthread_cond_destroy((pthread_cond_t *)(param_1 + 0x980)); my_free(param_1); return; } if (*(char *)(param_1 + 0x7e2) != '\0') { return; } if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x8f0)); return; }