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
49,100
set_process_priority(ggml_sched_priority)
monkey531[P]llama/common/common.cpp
bool set_process_priority(enum ggml_sched_priority prio) { if (prio == GGML_SCHED_PRIO_NORMAL) { return true; } int p = 0; switch (prio) { case GGML_SCHED_PRIO_NORMAL: p = 0; break; case GGML_SCHED_PRIO_MEDIUM: p = -5; break; case GGML_SCHED_PRIO_HIGH: p = -10; break; case GGML_SCHED_PRIO_REALTIME: p = -20; break; } if (!setpriority(PRIO_PROCESS, 0, p)) { LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno); return false; } return true; }
O3
cpp
set_process_priority(ggml_sched_priority): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx cmpl $0x3, %edi ja 0x711fd movl %ebx, %eax leaq 0x7c546(%rip), %rcx # 0xed720 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x71253 movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x711ff movl $0xffffffec, %edx # imm = 0xFFFFFFEC jmp 0x711ff movl $0xfffffffb, %edx # imm = 0xFFFFFFFB jmp 0x711ff xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x1a1f0 testl %eax, %eax setne %bpl jne 0x71253 leaq 0xbb1f1(%rip), %rax # 0x12c408 cmpl $0x0, (%rax) js 0x71253 callq 0xcb95b movq %rax, %r14 callq 0x1a060 movq %rax, %r15 movl (%rax), %edi callq 0x1a2b0 movl (%r15), %r9d leaq 0x7c8e9(%rip), %rdx # 0xedb26 xorl %ebp, %ebp movq %r14, %rdi movl $0x3, %esi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0xcb9f8 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20set_process_priority19ggml_sched_priority: push rbp push r15 push r14 push rbx push rax mov ebx, edi cmp edi, 3; switch 4 cases ja short def_711E1; jumptable 00000000000711E1 default case mov eax, ebx lea rcx, jpt_711E1 movsxd rax, ds:(jpt_711E1 - 0ED720h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_711E3: mov bpl, 1; jumptable 00000000000711E1 case 0 jmp short loc_71253 loc_711E8: mov edx, 0FFFFFFF6h; jumptable 00000000000711E1 case 2 jmp short loc_711FF loc_711EF: mov edx, 0FFFFFFECh; jumptable 00000000000711E1 case 3 jmp short loc_711FF loc_711F6: mov edx, 0FFFFFFFBh; jumptable 00000000000711E1 case 1 jmp short loc_711FF def_711E1: xor edx, edx; jumptable 00000000000711E1 default case loc_711FF: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_71253 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_71253 call _Z15common_log_mainv; common_log_main(void) mov r14, rax call ___errno_location mov r15, rax mov edi, [rax] call _strerror mov r9d, [r15] lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... xor ebp, ebp mov rdi, r14 mov esi, 3 mov ecx, ebx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_71253: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long set_process_priority(int a1, double a2) { char v2; // al unsigned int v3; // ebp long long v4; // rdx int v5; // eax int v6; // r14d unsigned int *v7; // r15 int v8; // eax char v10; // [rsp-8h] [rbp-28h] v10 = v2; switch ( a1 ) { case 0: LOBYTE(v3) = 1; return v3; case 1: v4 = 4294967291LL; goto LABEL_7; case 2: v4 = 4294967286LL; goto LABEL_7; case 3: v4 = 4294967276LL; goto LABEL_7; default: v4 = 0LL; LABEL_7: v5 = setpriority(0LL, 0LL, v4); LOBYTE(v3) = v5 != 0; if ( !v5 && common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v7 = (unsigned int *)__errno_location(a2); v8 = strerror(*v7); v3 = 0; common_log_add(v6, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v8, *v7, v10); } return v3; } }
set_process_priority: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CMP EDI,0x3 JA 0x001711fd MOV EAX,EBX LEA RCX,[0x1ed720] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x00171253 caseD_2: MOV EDX,0xfffffff6 JMP 0x001711ff caseD_3: MOV EDX,0xffffffec JMP 0x001711ff caseD_1: MOV EDX,0xfffffffb JMP 0x001711ff default: XOR EDX,EDX LAB_001711ff: XOR EDI,EDI XOR ESI,ESI CALL 0x0011a1f0 TEST EAX,EAX SETNZ BPL JNZ 0x00171253 LEA RAX,[0x22c408] CMP dword ptr [RAX],0x0 JS 0x00171253 CALL 0x001cb95b MOV R14,RAX CALL 0x0011a060 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x0011a2b0 MOV R9D,dword ptr [R15] LEA RDX,[0x1edb26] XOR EBP,EBP MOV RDI,R14 MOV ESI,0x3 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x001cb9f8 LAB_00171253: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* set_process_priority(ggml_sched_priority) */ ulong set_process_priority(int4 param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int8 unaff_RBP; int7 uVar6; ulong uVar5; uVar6 = (int7)((ulong)unaff_RBP >> 8); switch(param_1) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_00171253; case 1: iVar1 = -5; break; case 2: iVar1 = -10; break; case 3: iVar1 = -0x14; break; default: iVar1 = 0; } iVar1 = setpriority(PRIO_PROCESS,0,iVar1); uVar5 = CONCAT71(uVar6,iVar1 != 0); if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); uVar5 = 0; common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3); } LAB_00171253: return uVar5 & 0xffffffff; }
49,101
mi_state_info_read_dsk
eloqsql/storage/myisam/mi_open.c
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead) { uchar buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE]; if (!myisam_single_user) { if (pRead) { if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP))) return 1; } else if (mysql_file_read(file, buff, state->state_length, MYF(MY_NABP))) return 1; mi_state_info_read(buff, state); } return 0; }
O3
c
mi_state_info_read_dsk: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2388, %rsp # imm = 0x2388 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0xb7f362(%rip), %rcx # 0xbff49a xorl %eax, %eax cmpb $0x0, (%rcx) jne 0x801f0 movq %rsi, %rbx movl %edi, %r15d movl 0xf8(%rsi), %r14d leaq 0x305eb9(%rip), %r13 # 0x386010 testb %dl, %dl je 0x80199 movq (%r13), %rax leaq -0x23a8(%rbp), %rdi movl %r15d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x80215 leaq -0x2360(%rbp), %rsi movl $0x4, %r8d movl %r15d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa0770 jmp 0x801d2 movq (%r13), %rax leaq -0x23a8(%rbp), %rdi movl %r15d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x8025b leaq -0x2360(%rbp), %rsi movl $0x4, %ecx movl %r15d, %edi movq %r14, %rdx callq 0xa0ab0 movq %rax, %r15 movl $0x1, %eax testq %r15, %r15 jne 0x801f0 leaq -0x2360(%rbp), %rdi movq %rbx, %rsi callq 0x7f33f xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x802af addq $0x2388, %rsp # imm = 0x2388 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 movq (%r13), %rax leaq 0x5b951(%rip), %rdx # 0xdbb74 movq %r12, %rdi movq %r14, %rsi movl $0x418, %ecx # imm = 0x418 callq *0x210(%rax) leaq -0x2360(%rbp), %rsi movl $0x4, %r8d movl %r15d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa0770 movq %rax, %r15 testq %rax, %rax movl $0x0, %esi jmp 0x80299 movq %rax, %r12 movq (%r13), %rax leaq 0x5b90b(%rip), %rdx # 0xdbb74 movq %r12, %rdi movq %r14, %rsi movl $0x41b, %ecx # imm = 0x41B callq *0x210(%rax) leaq -0x2360(%rbp), %rsi movl $0x4, %ecx movl %r15d, %edi movq %r14, %rdx callq 0xa0ab0 movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmoveq %r14, %rsi movq (%r13), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x801d5 callq 0x29250
mi_state_info_read_dsk: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2388h mov rax, fs:28h mov [rbp+var_30], rax lea rcx, myisam_single_user xor eax, eax cmp byte ptr [rcx], 0 jnz loc_801F0 mov rbx, rsi mov r15d, edi mov r14d, [rsi+0F8h] lea r13, PSI_server test dl, dl jz short loc_80199 mov rax, [r13+0] lea rdi, [rbp+var_23A8] mov esi, r15d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_80215 lea rsi, [rbp+var_2360] mov r8d, 4 mov edi, r15d mov rdx, r14 xor ecx, ecx call my_pread jmp short loc_801D2 loc_80199: mov rax, [r13+0] lea rdi, [rbp+var_23A8] mov esi, r15d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_8025B lea rsi, [rbp+var_2360] mov ecx, 4 mov edi, r15d mov rdx, r14 call my_read loc_801D2: mov r15, rax loc_801D5: mov eax, 1 test r15, r15 jnz short loc_801F0 lea rdi, [rbp+var_2360] mov rsi, rbx call mi_state_info_read xor eax, eax loc_801F0: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_802AF add rsp, 2388h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_80215: mov r12, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, r14 mov ecx, 418h call qword ptr [rax+210h] lea rsi, [rbp+var_2360] mov r8d, 4 mov edi, r15d mov rdx, r14 xor ecx, ecx call my_pread mov r15, rax test rax, rax mov esi, 0 jmp short loc_80299 loc_8025B: mov r12, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, r14 mov ecx, 41Bh call qword ptr [rax+210h] lea rsi, [rbp+var_2360] mov ecx, 4 mov edi, r15d mov rdx, r14 call my_read mov r15, rax xor esi, esi test rax, rax loc_80299: cmovz rsi, r14 mov rax, [r13+0] mov rdi, r12 call qword ptr [rax+218h] jmp loc_801D5 loc_802AF: call ___stack_chk_fail
long long mi_state_info_read_dsk(unsigned int a1, long long a2, char a3) { long long result; // rax long long v5; // r14 long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // r15 long long v10; // r12 bool v11; // zf long long v12; // rsi _BYTE v13[72]; // [rsp+8h] [rbp-23A8h] BYREF _BYTE v14[9008]; // [rsp+50h] [rbp-2360h] BYREF unsigned long long v15; // [rsp+2380h] [rbp-30h] v15 = __readfsqword(0x28u); result = 0LL; if ( !myisam_single_user ) { v5 = *(unsigned int *)(a2 + 248); if ( a3 ) { v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, a1, 6LL); if ( !v6 ) { v7 = my_pread(a1, v14, v5, 0LL, 4LL); LABEL_7: v9 = v7; LABEL_8: result = 1LL; if ( !v9 ) { mi_state_info_read((long long)v14, a2); return 0LL; } return result; } v10 = v6; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v6, v5, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 1048LL); v9 = my_pread(a1, v14, v5, 0LL, 4LL); v11 = v9 == 0; v12 = 0LL; } else { v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, a1, 6LL); if ( !v8 ) { v7 = my_read(a1, v14, v5, 4LL); goto LABEL_7; } v10 = v8; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v8, v5, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 1051LL); v9 = my_read(a1, v14, v5, 4LL); v12 = 0LL; v11 = v9 == 0; } if ( v11 ) v12 = v5; ((void ( *)(long long, long long))PSI_server[67])(v10, v12); goto LABEL_8; } return result; }
mi_state_info_read_dsk: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2388 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RCX,[0xcff49a] XOR EAX,EAX CMP byte ptr [RCX],0x0 JNZ 0x001801f0 MOV RBX,RSI MOV R15D,EDI MOV R14D,dword ptr [RSI + 0xf8] LEA R13,[0x486010] TEST DL,DL JZ 0x00180199 MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x23a8] MOV ESI,R15D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00180215 LEA RSI,[RBP + -0x2360] MOV R8D,0x4 MOV EDI,R15D MOV RDX,R14 XOR ECX,ECX CALL 0x001a0770 JMP 0x001801d2 LAB_00180199: MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x23a8] MOV ESI,R15D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0018025b LEA RSI,[RBP + -0x2360] MOV ECX,0x4 MOV EDI,R15D MOV RDX,R14 CALL 0x001a0ab0 LAB_001801d2: MOV R15,RAX LAB_001801d5: MOV EAX,0x1 TEST R15,R15 JNZ 0x001801f0 LEA RDI,[RBP + -0x2360] MOV RSI,RBX CALL 0x0017f33f XOR EAX,EAX LAB_001801f0: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001802af ADD RSP,0x2388 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00180215: MOV R12,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1dbb74] MOV RDI,R12 MOV RSI,R14 MOV ECX,0x418 CALL qword ptr [RAX + 0x210] LEA RSI,[RBP + -0x2360] MOV R8D,0x4 MOV EDI,R15D MOV RDX,R14 XOR ECX,ECX CALL 0x001a0770 MOV R15,RAX TEST RAX,RAX MOV ESI,0x0 JMP 0x00180299 LAB_0018025b: MOV R12,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1dbb74] MOV RDI,R12 MOV RSI,R14 MOV ECX,0x41b CALL qword ptr [RAX + 0x210] LEA RSI,[RBP + -0x2360] MOV ECX,0x4 MOV EDI,R15D MOV RDX,R14 CALL 0x001a0ab0 MOV R15,RAX XOR ESI,ESI TEST RAX,RAX LAB_00180299: CMOVZ RSI,R14 MOV RAX,qword ptr [R13] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x001801d5 LAB_001802af: CALL 0x00129250
int8 mi_state_info_read_dsk(int4 param_1,long param_2,char param_3) { int4 uVar1; long lVar2; long lVar3; int8 uVar4; int4 uVar5; long in_FS_OFFSET; int1 local_23b0 [72]; int1 local_2368 [9008]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = 0; if (myisam_single_user != '\0') goto LAB_001801f0; uVar1 = *(int4 *)(param_2 + 0xf8); if (param_3 == '\0') { lVar2 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,6); if (lVar2 != 0) { (**(code **)(PSI_server + 0x210)) (lVar2,uVar1,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x41b); lVar3 = my_read(param_1,local_2368,uVar1,4); goto LAB_00180299; } lVar3 = my_read(param_1,local_2368,uVar1,4); } else { lVar2 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,6); if (lVar2 == 0) { lVar3 = my_pread(param_1,local_2368,uVar1,0,4); } else { (**(code **)(PSI_server + 0x210)) (lVar2,uVar1,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x418); lVar3 = my_pread(param_1,local_2368,uVar1,0,4); LAB_00180299: uVar5 = 0; if (lVar3 == 0) { uVar5 = uVar1; } (**(code **)(PSI_server + 0x218))(lVar2,uVar5); } } uVar4 = 1; if (lVar3 == 0) { mi_state_info_read(local_2368,param_2); uVar4 = 0; } LAB_001801f0: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
49,102
char* fmt::v8::detail::write_significand<char, unsigned long, 0>(char*, unsigned long, int, int, char)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/format.h
inline auto write_significand(Char* out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> Char* { if (!decimal_point) return format_decimal(out, significand, significand_size).end; auto end = format_decimal(out + 1, significand, significand_size).end; if (integral_size == 1) { out[0] = out[1]; } else { std::uninitialized_copy_n(out + 1, integral_size, make_checked(out, to_unsigned(integral_size))); } out[integral_size] = decimal_point; return end; }
O0
c
char* fmt::v8::detail::write_significand<char, unsigned long, 0>(char*, unsigned long, int, int, char): subq $0x68, %rsp movb %r8b, %al movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) movl %edx, 0x4c(%rsp) movl %ecx, 0x48(%rsp) movb %al, 0x47(%rsp) cmpb $0x0, 0x47(%rsp) jne 0xa27b0 movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rsi movl 0x4c(%rsp), %edx callq 0x9af10 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x60(%rsp) jmp 0xa2854 movq 0x58(%rsp), %rdi addq $0x1, %rdi movq 0x50(%rsp), %rsi movl 0x4c(%rsp), %edx callq 0x9af10 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x28(%rsp) cmpl $0x1, 0x48(%rsp) jne 0xa27f3 movq 0x58(%rsp), %rax movb 0x1(%rax), %cl movq 0x58(%rsp), %rax movb %cl, (%rax) jmp 0xa2839 movq 0x58(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) movl 0x48(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x58(%rsp), %rax movq %rax, (%rsp) movl 0x48(%rsp), %edi callq 0x9d680 movq (%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0x99420 movq 0x8(%rsp), %rdi movl 0x14(%rsp), %esi movq %rax, %rdx callq 0x1b2c0 movb 0x47(%rsp), %dl movq 0x58(%rsp), %rax movslq 0x48(%rsp), %rcx movb %dl, (%rax,%rcx) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax addq $0x68, %rsp retq nop
_ZN3fmt2v86detail17write_significandIcmTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_: sub rsp, 68h mov al, r8b mov [rsp+68h+var_10], rdi mov [rsp+68h+var_18], rsi mov [rsp+68h+var_1C], edx mov [rsp+68h+var_20], ecx mov [rsp+68h+var_21], al cmp [rsp+68h+var_21], 0 jnz short loc_A27B0 mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_18] mov edx, [rsp+68h+var_1C] call _ZN3fmt2v86detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v8::detail::format_decimal<char,ulong>(char *,ulong,int) mov [rsp+68h+var_38], rax mov [rsp+68h+var_30], rdx mov rax, [rsp+68h+var_30] mov [rsp+68h+var_8], rax jmp loc_A2854 loc_A27B0: mov rdi, [rsp+68h+var_10] add rdi, 1 mov rsi, [rsp+68h+var_18] mov edx, [rsp+68h+var_1C] call _ZN3fmt2v86detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v8::detail::format_decimal<char,ulong>(char *,ulong,int) mov [rsp+68h+var_50], rax mov [rsp+68h+var_48], rdx mov rax, [rsp+68h+var_48] mov [rsp+68h+var_40], rax cmp [rsp+68h+var_20], 1 jnz short loc_A27F3 mov rax, [rsp+68h+var_10] mov cl, [rax+1] mov rax, [rsp+68h+var_10] mov [rax], cl jmp short loc_A2839 loc_A27F3: mov rax, [rsp+68h+var_10] add rax, 1 mov [rsp+68h+var_60], rax mov eax, [rsp+68h+var_20] mov [rsp+68h+var_54], eax mov rax, [rsp+68h+var_10] mov [rsp+68h+var_68], rax mov edi, [rsp+68h+var_20] call _ZN3fmt2v86detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v8::detail::to_unsigned<int>(int) mov rdi, [rsp+68h+var_68] mov eax, eax mov esi, eax call _ZN3fmt2v86detail12make_checkedIcEEPT_S4_m; fmt::v8::detail::make_checked<char>(char *,ulong) mov rdi, [rsp+68h+var_60] mov esi, [rsp+68h+var_54] mov rdx, rax call __ZSt20uninitialized_copy_nIPciS0_ET1_T_T0_S1_; std::uninitialized_copy_n<char *,int,char *>(char *,int,char *) loc_A2839: mov dl, [rsp+68h+var_21] mov rax, [rsp+68h+var_10] movsxd rcx, [rsp+68h+var_20] mov [rax+rcx], dl mov rax, [rsp+68h+var_40] mov [rsp+68h+var_8], rax loc_A2854: mov rax, [rsp+68h+var_8] add rsp, 68h retn
long long ZN3fmt2v86detail17write_significandIcmTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_( _BYTE *a1, fmt::v8::detail *a2, int a3, unsigned int a4, char a5) { long long v5; // rdx long long v6; // rdx long long v7; // rax long long v9; // [rsp+28h] [rbp-40h] if ( a5 ) { fmt::v8::detail::format_decimal<char,unsigned long>((long long)(a1 + 1), a2, a3); v9 = v6; if ( a4 == 1 ) { *a1 = a1[1]; } else { fmt::v8::detail::to_unsigned<int>(a4); v7 = fmt::v8::detail::make_checked<char>((long long)a1); std::uninitialized_copy_n<char *,int,char *>(a1 + 1, a4, v7); } a1[a4] = a5; return v9; } else { fmt::v8::detail::format_decimal<char,unsigned long>((long long)a1, a2, a3); return v5; } }
_ZN3fmt2v86detail17write_significandIcmTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_: SUB RSP,0x68 MOV AL,R8B MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x50],RSI MOV dword ptr [RSP + 0x4c],EDX MOV dword ptr [RSP + 0x48],ECX MOV byte ptr [RSP + 0x47],AL CMP byte ptr [RSP + 0x47],0x0 JNZ 0x001a27b0 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x4c] CALL 0x0019af10 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x60],RAX JMP 0x001a2854 LAB_001a27b0: MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x1 MOV RSI,qword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x4c] CALL 0x0019af10 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x28],RAX CMP dword ptr [RSP + 0x48],0x1 JNZ 0x001a27f3 MOV RAX,qword ptr [RSP + 0x58] MOV CL,byte ptr [RAX + 0x1] MOV RAX,qword ptr [RSP + 0x58] MOV byte ptr [RAX],CL JMP 0x001a2839 LAB_001a27f3: MOV RAX,qword ptr [RSP + 0x58] ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP],RAX MOV EDI,dword ptr [RSP + 0x48] CALL 0x0019d680 MOV RDI,qword ptr [RSP] MOV EAX,EAX MOV ESI,EAX CALL 0x00199420 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x14] MOV RDX,RAX CALL 0x0011b2c0 LAB_001a2839: MOV DL,byte ptr [RSP + 0x47] MOV RAX,qword ptr [RSP + 0x58] MOVSXD RCX,dword ptr [RSP + 0x48] MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x60],RAX LAB_001a2854: MOV RAX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int8 _ZN3fmt2v86detail17write_significandIcmTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_ (char *param_1,ulong param_2,int param_3,int param_4,char param_5) { uint uVar1; char *pcVar2; int8 extraout_RDX; int8 extraout_RDX_00; int8 local_8; if (param_5 == '\0') { fmt::v8::detail::format_decimal<char,unsigned_long>(param_1,param_2,param_3); local_8 = extraout_RDX; } else { fmt::v8::detail::format_decimal<char,unsigned_long>(param_1 + 1,param_2,param_3); if (param_4 == 1) { *param_1 = param_1[1]; } else { uVar1 = fmt::v8::detail::to_unsigned<int>(param_4); pcVar2 = fmt::v8::detail::make_checked<char>(param_1,(ulong)uVar1); std::uninitialized_copy_n<char*,int,char*>(param_1 + 1,param_4,pcVar2); } param_1[param_4] = param_5; local_8 = extraout_RDX_00; } return local_8; }
49,103
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_create_directory_with_parents(const std::string & path) { #ifdef _WIN32 std::wstring_convert<std::codecvt_utf8<wchar_t>> converter; std::wstring wpath = converter.from_bytes(path); // if the path already exists, check whether it's a directory const DWORD attributes = GetFileAttributesW(wpath.c_str()); if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) { return true; } size_t pos_slash = 0; // process path from front to back, procedurally creating directories while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) { const std::wstring subpath = wpath.substr(0, pos_slash); const wchar_t * test = subpath.c_str(); const bool success = CreateDirectoryW(test, NULL); if (!success) { const DWORD error = GetLastError(); // if the path already exists, ensure that it's a directory if (error == ERROR_ALREADY_EXISTS) { const DWORD attributes = GetFileAttributesW(subpath.c_str()); if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) { return false; } } else { return false; } } pos_slash += 1; } return true; #else // if the path already exists, check whether it's a directory struct stat info; if (stat(path.c_str(), &info) == 0) { return S_ISDIR(info.st_mode); } size_t pos_slash = 1; // skip leading slashes for directory creation // process path from front to back, procedurally creating directories while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) { const std::string subpath = path.substr(0, pos_slash); struct stat info; // if the path already exists, ensure that it's a directory if (stat(subpath.c_str(), &info) == 0) { if (!S_ISDIR(info.st_mode)) { return false; } } else { // create parent directories const int ret = mkdir(subpath.c_str(), 0755); if (ret != 0) { return false; } } pos_slash += 1; } return true; #endif // _WIN32 }
O3
cpp
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x148, %rsp # imm = 0x148 movq %rdi, %rbx movq (%rdi), %rdi leaq 0xb8(%rsp), %rsi callq 0x1b830 testl %eax, %eax je 0x797d7 movl $0x1, %r14d leaq 0x8(%rsp), %r15 leaq 0x28(%rsp), %r12 movq %rbx, %rdi movl $0x2f, %esi movq %r14, %rdx callq 0x1bb60 cmpq $-0x1, %rax sete %bpl je 0x797ec movq %rax, %r14 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x1b960 movq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x1b830 testl %eax, %eax je 0x79798 movq 0x8(%rsp), %rdi movl $0x1ed, %esi # imm = 0x1ED callq 0x1b430 testl %eax, %eax je 0x797aa xorl %r13d, %r13d jmp 0x797b0 movl 0x40(%rsp), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax cmpl $0x4000, %eax # imm = 0x4000 jne 0x79793 incq %r14 movb $0x1, %r13b movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x797cc movq 0x18(%rsp), %rsi incq %rsi callq 0x1b910 testb %r13b, %r13b jne 0x7973e jmp 0x797ec movl $0xf000, %eax # imm = 0xF000 andl 0xd0(%rsp), %eax cmpl $0x4000, %eax # imm = 0x4000 sete %bpl movl %ebp, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov rbx, rdi mov rdi, [rdi] lea rsi, [rsp+178h+var_C0] call _stat test eax, eax jz loc_797D7 mov r14d, 1 lea r15, [rsp+178h+var_170] lea r12, [rsp+178h+var_150] loc_7973E: mov rdi, rbx mov esi, 2Fh ; '/' mov rdx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh setz bpl jz loc_797EC mov r14, rax mov rdi, r15 mov rsi, rbx xor edx, edx mov rcx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+178h+var_170] mov rsi, r12 call _stat test eax, eax jz short loc_79798 mov rdi, [rsp+178h+var_170] mov esi, 1EDh call _mkdir test eax, eax jz short loc_797AA loc_79793: xor r13d, r13d jmp short loc_797B0 loc_79798: mov eax, [rsp+178h+var_138] mov ecx, 0F000h and eax, ecx cmp eax, 4000h jnz short loc_79793 loc_797AA: inc r14 mov r13b, 1 loc_797B0: mov rdi, [rsp+178h+var_170]; void * lea rax, [rsp+178h+var_160] cmp rdi, rax jz short loc_797CC mov rsi, [rsp+178h+var_160] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_797CC: test r13b, r13b jnz loc_7973E jmp short loc_797EC loc_797D7: mov eax, 0F000h and eax, [rsp+178h+var_A8] cmp eax, 4000h setz bpl loc_797EC: mov eax, ebp add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long fs_create_directory_with_parents(_QWORD *a1) { unsigned int v1; // ebp long long v2; // r14 long long v3; // rax char v4; // r13 void *v6; // [rsp+8h] [rbp-170h] BYREF long long v7; // [rsp+18h] [rbp-160h] BYREF _BYTE v8[24]; // [rsp+28h] [rbp-150h] BYREF int v9; // [rsp+40h] [rbp-138h] _BYTE v10[24]; // [rsp+B8h] [rbp-C0h] BYREF int v11; // [rsp+D0h] [rbp-A8h] if ( (unsigned int)stat(*a1, v10) ) { v2 = 1LL; while ( 1 ) { v3 = std::string::find(a1, 47LL, v2); LOBYTE(v1) = v3 == -1; if ( v3 == -1 ) return v1; v2 = v3; std::string::substr(&v6, a1, 0LL, v3); if ( (unsigned int)stat(v6, v8) ) { if ( !(unsigned int)mkdir(v6, 493LL) ) goto LABEL_8; } else if ( (v9 & 0xF000) == 0x4000 ) { LABEL_8: ++v2; v4 = 1; goto LABEL_9; } v4 = 0; LABEL_9: if ( v6 != &v7 ) operator delete(v6, v7 + 1); if ( !v4 ) return v1; } } LOBYTE(v1) = (v11 & 0xF000) == 0x4000; return v1; }
fs_create_directory_with_parents: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV RBX,RDI MOV RDI,qword ptr [RDI] LEA RSI,[RSP + 0xb8] CALL 0x0011b830 TEST EAX,EAX JZ 0x001797d7 MOV R14D,0x1 LEA R15,[RSP + 0x8] LEA R12,[RSP + 0x28] LAB_0017973e: MOV RDI,RBX MOV ESI,0x2f MOV RDX,R14 CALL 0x0011bb60 CMP RAX,-0x1 SETZ BPL JZ 0x001797ec MOV R14,RAX MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX MOV RCX,RAX CALL 0x0011b960 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x0011b830 TEST EAX,EAX JZ 0x00179798 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1ed CALL 0x0011b430 TEST EAX,EAX JZ 0x001797aa LAB_00179793: XOR R13D,R13D JMP 0x001797b0 LAB_00179798: MOV EAX,dword ptr [RSP + 0x40] MOV ECX,0xf000 AND EAX,ECX CMP EAX,0x4000 JNZ 0x00179793 LAB_001797aa: INC R14 MOV R13B,0x1 LAB_001797b0: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001797cc MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b910 LAB_001797cc: TEST R13B,R13B JNZ 0x0017973e JMP 0x001797ec LAB_001797d7: MOV EAX,0xf000 AND EAX,dword ptr [RSP + 0xd0] CMP EAX,0x4000 SETZ BPL LAB_001797ec: MOV EAX,EBP ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* fs_create_directory_with_parents(std::__cxx11::string const&) */ ulong fs_create_directory_with_parents(string *param_1) { bool bVar1; int iVar2; long lVar3; ulong unaff_RBP; long *local_170 [2]; long local_160 [2]; stat local_150; stat local_c0; iVar2 = stat(*(char **)param_1,&local_c0); if (iVar2 == 0) { unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),(local_c0.st_mode & 0xf000) == 0x4000); } else { do { lVar3 = std::__cxx11::string::find((char)param_1,0x2f); unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),lVar3 == -1); if (lVar3 == -1) break; std::__cxx11::string::substr((ulong)local_170,(ulong)param_1); iVar2 = stat((char *)local_170[0],&local_150); if (iVar2 == 0) { if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_00179793; LAB_001797aa: bVar1 = true; } else { iVar2 = mkdir((char *)local_170[0],0x1ed); if (iVar2 == 0) goto LAB_001797aa; LAB_00179793: bVar1 = false; } if (local_170[0] != local_160) { operator_delete(local_170[0],local_160[0] + 1); } } while (bVar1); } return unaff_RBP & 0xffffffff; }
49,104
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) cmpq $0x0, (%rax) jne 0x193bda leaq 0x99947(%rip), %rdi # 0x22d507 movl $0x1491, %esi # imm = 0x1491 leaq 0x93109(%rip), %rdx # 0x226cd5 leaq 0x9efd0(%rip), %rcx # 0x232ba3 movb $0x0, %al callq 0x5ef80 movq 0x10(%rsp), %rax movq (%rax), %rdi callq 0x141bc0 movzbl %al, %ecx movq %rcx, 0x8(%rsp) subb $0x9, %al ja 0x193c5c movq 0x8(%rsp), %rax leaq 0x9c73d(%rip), %rcx # 0x23033c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x10(%rsp), %rcx movq 0x20(%rcx), %rax cmpq 0x28(%rcx), %rax je 0x193c39 movq 0x10(%rsp), %rax movq %rax, %rdi addq $0x30, %rdi movq 0x20(%rax), %rsi callq 0x193da0 movq 0x10(%rsp), %rax movq 0x20(%rax), %rcx movq %rcx, 0x28(%rax) movq 0x10(%rsp), %rax addq $0x30, %rax movq %rax, 0x20(%rsp) jmp 0x193c6a movq 0x10(%rsp), %rdi callq 0x193de0 movq %rax, 0x20(%rsp) jmp 0x193c6a jmp 0x193c5c movq 0x10(%rsp), %rax addq $0x50, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: sub rsp, 28h mov qword ptr [rsp+28h+var_10], rdi; __int64 mov rax, qword ptr [rsp+28h+var_10] mov qword ptr [rsp+28h+var_18], rax; __int16 cmp qword ptr [rax], 0 jnz short loc_193BDA lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1491h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov al, 0 call _ggml_abort loc_193BDA: mov rax, qword ptr [rsp+28h+var_18] mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4typeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type(void) movzx ecx, al mov qword ptr [rsp+28h+var_20], rcx; int sub al, 9; switch 10 cases ja short def_193C06; jumptable 0000000000193C06 default case mov rax, qword ptr [rsp+28h+var_20] lea rcx, jpt_193C06 movsxd rax, ds:(jpt_193C06 - 23033Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_193C08: mov rcx, qword ptr [rsp+28h+var_18]; jumptable 0000000000193C06 case 2 mov rax, [rcx+20h] cmp rax, [rcx+28h] jz short loc_193C39 mov rax, qword ptr [rsp+28h+var_18] mov rdi, rax add rdi, 30h ; '0' mov rsi, [rax+20h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, qword ptr [rsp+28h+var_18] mov rcx, [rax+20h] mov [rax+28h], rcx loc_193C39: mov rax, qword ptr [rsp+28h+var_18] add rax, 30h ; '0' mov [rsp+28h+var_8], rax jmp short loc_193C6A loc_193C49: mov rdi, qword ptr [rsp+28h+var_18]; jumptable 0000000000193C06 case 1 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void) mov [rsp+28h+var_8], rax jmp short loc_193C6A loc_193C5A: jmp short $+2; jumptable 0000000000193C06 cases 0,3-9 def_193C06: mov rax, qword ptr [rsp+28h+var_18]; jumptable 0000000000193C06 default case add rax, 50h ; 'P' mov [rsp+28h+var_8], rax loc_193C6A: mov rax, [rsp+28h+var_8] add rsp, 28h retn
49,105
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0x89266 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0x89254 cmpl $0x2, %eax jne 0x8925d movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0x8924e leaq 0x30(%rbx), %rdi callq 0x8bb4b movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0x89261 movq %rbx, %rdi popq %rbx jmp 0x7354e addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x32cea(%rip), %rdi # 0xbbf57 leaq 0x2c87c(%rip), %rdx # 0xb5af0 leaq 0x37f1d(%rip), %rcx # 0xc1198 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x24f20 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_89266 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_89254 cmp eax, 2 jnz short loc_8925D mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_8924E lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_8924E: add rbx, 30h ; '0' jmp short loc_89261 loc_89254: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void) loc_8925D: add rbx, 50h ; 'P' loc_89261: mov rax, rbx pop rbx retn loc_89266: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::operator++("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00189266 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x00189254 CMP EAX,0x2 JNZ 0x0018925d MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x0018924e LEA RDI,[RBX + 0x30] CALL 0x0018bb4b MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_0018924e: ADD RBX,0x30 JMP 0x00189261 LAB_00189254: MOV RDI,RBX POP RBX JMP 0x0017354e LAB_0018925d: ADD RBX,0x50 LAB_00189261: MOV RAX,RBX POP RBX RET LAB_00189266: LEA RDI,[0x1bbf57] LEA RDX,[0x1b5af0] LEA RCX,[0x1c1198] MOV ESI,0x1491 XOR EAX,EAX CALL 0x00124f20
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)this); return piVar2; }
49,106
ftxui::separatorVSelector(float, float, ftxui::Color, ftxui::Color)::Impl::Render(ftxui::Screen&)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/separator.cpp
void Render(Screen& screen) override { if (box_.x_max < box_.x_min) { return; } // This are the two location with an empty demi-cell. const int demi_cell_up = int(up_ * 2 - 1); const int demi_cell_down = int(down_ * 2 + 2); const int x = box_.x_min; for (int y = box_.y_min; y <= box_.y_max; ++y) { Pixel& pixel = screen.PixelAt(x, y); const int a = (y - box_.y_min) * 2; const int b = a + 1; const bool a_empty = demi_cell_up == a || demi_cell_down == a; const bool b_empty = demi_cell_up == b || demi_cell_down == b; if (!a_empty && !b_empty) { pixel.character = "│"; pixel.automerge = true; } else { pixel.character = a_empty ? "╷" : "╵"; // NOLINT pixel.automerge = false; } if (demi_cell_up <= a && b <= demi_cell_down) { pixel.foreground_color = selected_color_; } else { pixel.foreground_color = unselected_color_; } } }
O2
cpp
ftxui::separatorVSelector(float, float, ftxui::Color, ftxui::Color)::Impl::Render(ftxui::Screen&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, 0x18(%rsp) movl 0x4c(%rdi), %eax movl %eax, 0x14(%rsp) cmpl %eax, 0x50(%rdi) jge 0x1fe38 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdi, %r14 movsd 0x5c(%rdi), %xmm0 addps %xmm0, %xmm0 addps 0x13fd6(%rip), %xmm0 # 0x33e20 cvttps2dq %xmm0, %xmm0 movd %xmm0, %r12d pshufd $0x55, %xmm0, %xmm1 # xmm1 = xmm0[1,1,1,1] movd %xmm1, %eax movl 0x54(%rdi), %r15d leal (%r15,%r15), %ebp movl %eax, 0xc(%rsp) negl %eax movl %eax, 0x8(%rsp) movl %r12d, 0x10(%rsp) negl %r12d pshufd $0x50, %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1] movdqa %xmm0, 0x20(%rsp) cmpl 0x58(%r14), %r15d jg 0x1fe29 movq 0x18(%rsp), %rdi movl 0x14(%rsp), %esi movl %r15d, %edx callq 0x303fa movq %rax, %r13 movl 0x54(%r14), %eax addl %eax, %eax movl %ebp, %ebx subl %eax, %ebx movl %ebx, %eax leaq 0x13f8a(%rip), %rsi # 0x33e38 addl %r12d, %eax je 0x1fee3 movl %ebx, %eax leaq 0x13f7c(%rip), %rsi # 0x33e38 addl 0x8(%rsp), %eax je 0x1fee3 leal 0x1(%rbx), %eax movd %eax, %xmm0 pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] pcmpeqd 0x20(%rsp), %xmm0 movmskpd %xmm0, %eax leaq 0x13f5d(%rip), %rsi # 0x33e3c testl %eax, %eax je 0x1fef7 movq %r13, %rdi addq $0x8, %rdi callq 0xc870 movb (%r13), %al andb $0x7f, %al jmp 0x1ff10 movq %r13, %rdi addq $0x8, %rdi leaq 0x13bc9(%rip), %rsi # 0x33ace callq 0xc870 movb (%r13), %al orb $-0x80, %al movb %al, (%r13) cmpl 0x10(%rsp), %ebx setge %al cmpl 0xc(%rsp), %ebx setl %cl andb %al, %cl movzbl %cl, %eax movl 0x64(%r14,%rax,4), %eax movl %eax, 0x2c(%r13) incl %r15d addl $0x2, %ebp jmp 0x1fe81 nop
_ZZN5ftxui18separatorVSelectorEffNS_5ColorES0_EN4Impl6RenderERNS_6ScreenE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rsp+68h+var_50], rsi mov eax, [rdi+4Ch] mov [rsp+68h+var_54], eax cmp [rdi+50h], eax jge short loc_1FE38 loc_1FE29: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1FE38: mov r14, rdi movsd xmm0, qword ptr [rdi+5Ch] addps xmm0, xmm0 addps xmm0, cs:xmmword_33E20 cvttps2dq xmm0, xmm0 movd r12d, xmm0 pshufd xmm1, xmm0, 55h ; 'U' movd eax, xmm1 mov r15d, [rdi+54h] lea ebp, [r15+r15] mov [rsp+68h+var_5C], eax neg eax mov [rsp+68h+var_60], eax mov [rsp+68h+var_58], r12d neg r12d pshufd xmm0, xmm0, 50h ; 'P' movdqa [rsp+68h+var_48], xmm0 loc_1FE81: cmp r15d, [r14+58h] jg short loc_1FE29 mov rdi, [rsp+68h+var_50]; this mov esi, [rsp+68h+var_54]; int mov edx, r15d; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r13, rax mov eax, [r14+54h] add eax, eax mov ebx, ebp sub ebx, eax mov eax, ebx lea rsi, unk_33E38 add eax, r12d jz short loc_1FEE3 mov eax, ebx lea rsi, unk_33E38 add eax, [rsp+68h+var_60] jz short loc_1FEE3 lea eax, [rbx+1] movd xmm0, eax pshufd xmm0, xmm0, 0 pcmpeqd xmm0, [rsp+68h+var_48] movmskpd eax, xmm0 lea rsi, unk_33E3C test eax, eax jz short loc_1FEF7 loc_1FEE3: mov rdi, r13 add rdi, 8 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) mov al, [r13+0] and al, 7Fh jmp short loc_1FF10 loc_1FEF7: mov rdi, r13 add rdi, 8 lea rsi, unk_33ACE call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) mov al, [r13+0] or al, 80h loc_1FF10: mov [r13+0], al cmp ebx, [rsp+68h+var_58] setnl al cmp ebx, [rsp+68h+var_5C] setl cl and cl, al movzx eax, cl mov eax, [r14+rax*4+64h] mov [r13+2Ch], eax inc r15d add ebp, 2 jmp loc_1FE81
long long ftxui::separatorVSelector(float,float,ftxui::Color,ftxui::Color)::Impl::Render( long long a1, ftxui::Screen *a2) { long long result; // rax __m128i v3; // xmm0 int v4; // r15d int v5; // ebp long long v6; // r13 int v7; // ebx void *v8; // rsi char v9; // al int v10; // [rsp+Ch] [rbp-5Ch] int v11; // [rsp+10h] [rbp-58h] int v12; // [rsp+14h] [rbp-54h] __m128i v14; // [rsp+20h] [rbp-48h] result = *(unsigned int *)(a1 + 76); v12 = result; if ( *(_DWORD *)(a1 + 80) >= (int)result ) { v3 = _mm_cvttps_epi32( _mm_add_ps( _mm_add_ps((__m128)*(unsigned long long *)(a1 + 92), (__m128)*(unsigned long long *)(a1 + 92)), (__m128)xmmword_33E20)); v4 = *(_DWORD *)(a1 + 84); v5 = 2 * v4; v10 = _mm_cvtsi128_si32(_mm_shuffle_epi32(v3, 85)); result = (unsigned int)-v10; v11 = _mm_cvtsi128_si32(v3); v14 = _mm_shuffle_epi32(v3, 80); while ( v4 <= *(_DWORD *)(a1 + 88) ) { v6 = ftxui::Screen::PixelAt(a2, v12, v4); v7 = v5 - 2 * *(_DWORD *)(a1 + 84); v8 = &unk_33E38; if ( v7 == v11 || (v8 = &unk_33E38, v7 == v10) || (v8 = &unk_33E3C, _mm_movemask_pd((__m128d)_mm_cmpeq_epi32(_mm_shuffle_epi32(_mm_cvtsi32_si128(v7 + 1), 0), v14))) ) { std::string::assign(v6 + 8, v8); v9 = *(_BYTE *)v6 & 0x7F; } else { std::string::assign(v6 + 8, &unk_33ACE); v9 = *(_BYTE *)v6 | 0x80; } *(_BYTE *)v6 = v9; result = *(unsigned int *)(a1 + 4LL * ((v7 >= v11) & (unsigned __int8)(v7 < v10)) + 100); *(_DWORD *)(v6 + 44) = result; ++v4; v5 += 2; } } return result; }
Screen&): PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RSP + 0x18],RSI MOV EAX,dword ptr [RDI + 0x4c] MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RDI + 0x50],EAX JGE 0x0011fe38 LAB_0011fe29: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011fe38: MOV R14,RDI MOVSD XMM0,qword ptr [RDI + 0x5c] ADDPS XMM0,XMM0 ADDPS XMM0,xmmword ptr [0x00133e20] CVTTPS2DQ XMM0,XMM0 MOVD R12D,XMM0 PSHUFD XMM1,XMM0,0x55 MOVD EAX,XMM1 MOV R15D,dword ptr [RDI + 0x54] LEA EBP,[R15 + R15*0x1] MOV dword ptr [RSP + 0xc],EAX NEG EAX MOV dword ptr [RSP + 0x8],EAX MOV dword ptr [RSP + 0x10],R12D NEG R12D PSHUFD XMM0,XMM0,0x50 MOVDQA xmmword ptr [RSP + 0x20],XMM0 LAB_0011fe81: CMP R15D,dword ptr [R14 + 0x58] JG 0x0011fe29 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x14] MOV EDX,R15D CALL 0x001303fa MOV R13,RAX MOV EAX,dword ptr [R14 + 0x54] ADD EAX,EAX MOV EBX,EBP SUB EBX,EAX MOV EAX,EBX LEA RSI,[0x133e38] ADD EAX,R12D JZ 0x0011fee3 MOV EAX,EBX LEA RSI,[0x133e38] ADD EAX,dword ptr [RSP + 0x8] JZ 0x0011fee3 LEA EAX,[RBX + 0x1] MOVD XMM0,EAX PSHUFD XMM0,XMM0,0x0 PCMPEQD XMM0,xmmword ptr [RSP + 0x20] MOVMSKPD EAX,XMM0 LEA RSI,[0x133e3c] TEST EAX,EAX JZ 0x0011fef7 LAB_0011fee3: MOV RDI,R13 ADD RDI,0x8 CALL 0x0010c870 MOV AL,byte ptr [R13] AND AL,0x7f JMP 0x0011ff10 LAB_0011fef7: MOV RDI,R13 ADD RDI,0x8 LEA RSI,[0x133ace] CALL 0x0010c870 MOV AL,byte ptr [R13] OR AL,0x80 LAB_0011ff10: MOV byte ptr [R13],AL CMP EBX,dword ptr [RSP + 0x10] SETGE AL CMP EBX,dword ptr [RSP + 0xc] SETL CL AND CL,AL MOVZX EAX,CL MOV EAX,dword ptr [R14 + RAX*0x4 + 0x64] MOV dword ptr [R13 + 0x2c],EAX INC R15D ADD EBP,0x2 JMP 0x0011fe81
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ftxui::separatorVSelector(float, float, ftxui::Color, ftxui::Color)::Impl::Render(ftxui::Screen&) */ void ftxui::separatorVSelector(float,float,ftxui::Color,ftxui::Color)::Impl::Render(ftxui::Screen__ (long param_1,Screen *param_2) { int iVar1; float fVar2; byte bVar3; int iVar4; byte *pbVar5; int iVar6; int iVar7; int iVar8; float fVar9; int iVar10; int iVar12; int1 auVar11 [16]; iVar1 = *(int *)(param_1 + 0x4c); if (iVar1 <= *(int *)(param_1 + 0x50)) { fVar9 = (float)*(int8 *)(param_1 + 0x5c); fVar2 = (float)((ulong)*(int8 *)(param_1 + 0x5c) >> 0x20); iVar10 = (int)(fVar9 + fVar9 + _DAT_00133e20); iVar12 = (int)(fVar2 + fVar2 + _UNK_00133e24); iVar8 = *(int *)(param_1 + 0x54); iVar7 = iVar8 * 2; for (; iVar8 <= *(int *)(param_1 + 0x58); iVar8 = iVar8 + 1) { pbVar5 = (byte *)Screen::PixelAt(param_2,iVar1,iVar8); iVar6 = iVar7 + *(int *)(param_1 + 0x54) * -2; if ((iVar6 == iVar10) || (iVar6 == iVar12)) { LAB_0011fee3: std::__cxx11::string::assign((char *)(pbVar5 + 8)); bVar3 = *pbVar5 & 0x7f; } else { iVar4 = iVar6 + 1; auVar11._0_4_ = -(uint)(iVar4 == iVar10); auVar11._4_4_ = -(uint)(iVar4 == iVar10); auVar11._8_4_ = -(uint)(iVar4 == iVar12); auVar11._12_4_ = -(uint)(iVar4 == iVar12); iVar4 = movmskpd(iVar4,auVar11); if (iVar4 != 0) goto LAB_0011fee3; std::__cxx11::string::assign((char *)(pbVar5 + 8)); bVar3 = *pbVar5 | 0x80; } *pbVar5 = bVar3; *(int4 *)(pbVar5 + 0x2c) = *(int4 *)(param_1 + 100 + (ulong)(iVar6 < iVar12 && iVar10 <= iVar6) * 4); iVar7 = iVar7 + 2; } } return; }
49,107
mi_nommap_pread
eloqsql/storage/myisam/mi_dynrec.c
size_t mi_nommap_pread(MI_INFO *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { return mysql_file_pread(info->dfile, Buffer, Count, offset, MyFlags); }
O3
c
mi_nommap_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x30(%rbp) movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 movl 0x1c0(%rdi), %ebx leaq 0x310289(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x77e79 movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r8 callq 0xa158c movq %rax, %rbx movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x31023d(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq 0x6500d(%rip), %rdx # 0xdce9a movq %r15, %rdi movq %r14, %rsi movl $0xca, %ecx callq *0x210(%rax) movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r12 movq %r12, %r8 callq 0xa158c movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %r14 cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r12b cmovneq %r14, %rsi leaq 0x3101e8(%rip), %rax # 0x3880c0 movq (%rax), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x77e67
mi_nommap_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], r8 mov r12, rcx mov r14, rdx mov r13, rsi mov ebx, [rdi+1C0h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_77E79 mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r8, [rbp+var_30] call my_pread mov rbx, rax loc_77E67: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_77E79: mov r15, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r14 mov ecx, 0CAh call qword ptr [rax+210h] mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r12, [rbp+var_30] mov r8, r12 call my_pread mov rbx, rax xor esi, esi test rax, rax cmovnz r14, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r12b, 6 cmovnz rsi, r14 lea rax, PSI_server mov rax, [rax] mov rdi, r15 call qword ptr [rax+218h] jmp short loc_77E67
long long mi_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v7; // ebx long long v8; // rax long long v9; // rbx long long v11; // r15 _BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF long long v13; // [rsp+50h] [rbp-30h] v13 = a5; v7 = *(_DWORD *)(a1 + 448); v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL); if ( !v8 ) return my_pread(v7, a2, a3, a4, v13); v11 = v8; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v8, a3, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 202LL); v9 = my_pread(v7, a2, a3, a4, v13); ((void ( *)(long long))PSI_server[67])(v11); return v9; }
mi_nommap_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],R8 MOV R12,RCX MOV R14,RDX MOV R13,RSI MOV EBX,dword ptr [RDI + 0x1c0] LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00177e79 MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R8,qword ptr [RBP + -0x30] CALL 0x001a158c MOV RBX,RAX LAB_00177e67: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00177e79: MOV R15,RAX LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dce9a] MOV RDI,R15 MOV RSI,R14 MOV ECX,0xca CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R12,qword ptr [RBP + -0x30] MOV R8,R12 CALL 0x001a158c MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ R14,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R12B,0x6 CMOVNZ RSI,R14 LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x00177e67
long mi_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; long lVar4; long lVar5; int1 local_80 [72]; ulong local_38; uVar1 = *(int4 *)(param_1 + 0x1c0); local_38 = param_5; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6); if (lVar3 == 0) { lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); } else { (**(code **)(PSI_server + 0x210)) (lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0xca); uVar2 = local_38; lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); if (lVar4 != 0) { param_3 = 0; } lVar5 = 0; if (lVar4 != -1) { lVar5 = lVar4; } if ((uVar2 & 6) != 0) { lVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,lVar5); } return lVar4; }
49,108
get_plugin_nr
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
static int get_plugin_nr(uint type) { uint i= 0; for(; valid_plugins[i][1]; i++) if (valid_plugins[i][0] == type) return i; return -1; }
O0
c
get_plugin_nr: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x2f2e6(%rip), %rax # 0x7fdd0 cmpl $0x0, 0x4(%rax,%rcx,8) je 0x50b1a movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x2f2d3(%rip), %rax # 0x7fdd0 movl (%rax,%rcx,8), %eax cmpl -0x8(%rbp), %eax jne 0x50b0d movl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x50b21 jmp 0x50b0f movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x50ade movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
get_plugin_nr: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_C], 0 loc_50ADE: mov eax, [rbp+var_C] mov ecx, eax lea rax, valid_plugins cmp dword ptr [rax+rcx*8+4], 0 jz short loc_50B1A mov eax, [rbp+var_C] mov ecx, eax lea rax, valid_plugins mov eax, [rax+rcx*8] cmp eax, [rbp+var_8] jnz short loc_50B0D mov eax, [rbp+var_C] mov [rbp+var_4], eax jmp short loc_50B21 loc_50B0D: jmp short $+2 loc_50B0F: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_50ADE loc_50B1A: mov [rbp+var_4], 0FFFFFFFFh loc_50B21: mov eax, [rbp+var_4] pop rbp retn
long long get_plugin_nr(int a1) { unsigned int i; // [rsp+0h] [rbp-Ch] for ( i = 0; valid_plugins[2 * i + 1]; ++i ) { if ( valid_plugins[2 * i] == a1 ) return i; } return (unsigned int)-1; }
get_plugin_nr: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],0x0 LAB_00150ade: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x17fdd0] CMP dword ptr [RAX + RCX*0x8 + 0x4],0x0 JZ 0x00150b1a MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x17fdd0] MOV EAX,dword ptr [RAX + RCX*0x8] CMP EAX,dword ptr [RBP + -0x8] JNZ 0x00150b0d MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX JMP 0x00150b21 LAB_00150b0d: JMP 0x00150b0f LAB_00150b0f: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00150ade LAB_00150b1a: MOV dword ptr [RBP + -0x4],0xffffffff LAB_00150b21: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint get_plugin_nr(int param_1) { uint local_14; local_14 = 0; while( true ) { if (*(int *)(valid_plugins + (ulong)local_14 * 8 + 4) == 0) { return 0xffffffff; } if (*(int *)(valid_plugins + (ulong)local_14 * 8) == param_1) break; local_14 = local_14 + 1; } return local_14; }
49,109
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const
llama.cpp/common/json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O3
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0xce14b testq %rax, %rax je 0xce1a9 movzbl (%rax), %eax cmpl $0x2, %eax je 0xce12b cmpl $0x1, %eax jne 0xce135 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0xce13d movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0xce13d movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x20640 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x4c57f(%rip), %rsi # 0x11a6e7 leaq 0x4c5a8(%rip), %rdx # 0x11a717 leaq 0x8(%rsp), %rdi callq 0x2801a movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0xbd224 xorl %ebp, %ebp leaq 0x91e66(%rip), %rsi # 0x160000 leaq -0x58491(%rip), %rdx # 0x75d10 movq %rbx, %rdi callq 0x20a40 leaq 0x4b548(%rip), %rdi # 0x1196f8 leaq 0x44044(%rip), %rdx # 0x1121fb leaq 0x5188a(%rip), %rcx # 0x11fa48 movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x20e60 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0xce1e4 movq 0x18(%rsp), %rsi incq %rsi callq 0x20170 testb %bpl, %bpl jne 0xce1ee jmp 0xce1f6 movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20ae0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: push rbp; void * push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_CE14B test rax, rax jz loc_CE1A9 movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_CE12B cmp eax, 1 jnz short loc_CE135 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_CE13D loc_CE12B: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_CE13D loc_CE135: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_CE13D: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_CE14B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_CE1A9: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_CE1E4 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CE1E4: test bpl, bpl jnz short loc_CE1EE jmp short loc_CE1F6 mov r14, rax loc_CE1EE: mov rdi, rbx; void * call ___cxa_free_exception loc_CE1F6: mov rdi, r14 call __Unwind_Resume
bool ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_( unsigned __int8 **a1, unsigned __int8 **a2) { void *v2; // rbx char v3; // bp void *v4; // r15 unsigned __int8 *v5; // rax int v6; // eax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx long long v10; // rax long long v11; // r14 void *v12[2]; // [rsp+8h] [rbp-40h] BYREF long long v13; // [rsp+18h] [rbp-30h] BYREF v5 = *a1; if ( *a1 != *a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v12[0] = &v13; std::string::_M_construct<char const*>( (long long)v12, "cannot compare iterators of different containers", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 212, v12); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( !v5 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 13346LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); v11 = v10; if ( v12[0] != v4 ) operator delete(v12[0], v13 + 1); if ( v3 ) __cxa_free_exception(v2); _Unwind_Resume(v11); } v6 = *v5; if ( v6 == 2 ) return a1[2] == a2[2]; if ( v6 == 1 ) return a1[1] == a2[1]; return a1[3] == a2[3]; }
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x001ce14b TEST RAX,RAX JZ 0x001ce1a9 MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x001ce12b CMP EAX,0x1 JNZ 0x001ce135 MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x001ce13d LAB_001ce12b: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x001ce13d LAB_001ce135: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_001ce13d: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_001ce14b: MOV EDI,0x20 CALL 0x00120640 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_001ce161: LEA RSI,[0x21a6e7] LEA RDX,[0x21a717] LEA RDI,[RSP + 0x8] CALL 0x0012801a MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_001ce17f: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x001bd224 XOR EBP,EBP LEA RSI,[0x260000] LEA RDX,[0x175d10] MOV RDI,RBX CALL 0x00120a40 LAB_001ce1a9: LEA RDI,[0x2196f8] LEA RDX,[0x2121fb] LEA RCX,[0x21fa48] MOV ESI,0x3422 XOR EAX,EAX CALL 0x00120e60
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 != (char *)*param_2) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 001ce161 to 001ce178 has its CatchHandler @ 001ce1eb */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 001ce17f to 001ce1a8 has its CatchHandler @ 001ce1ca */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
49,110
iputs(std::ostream&, int, char const*)
Pyarmor-Static-Unpack-1shot/pycdas.cpp
static void iputs(std::ostream& pyc_output, int indent, const char* text) { for (int i=0; i<indent; i++) pyc_output << " "; pyc_output << text; }
O3
cpp
iputs(std::ostream&, int, char const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx testl %esi, %esi jle 0xaac2 movl %esi, %r15d leaq 0x2abb1(%rip), %r12 # 0x3565e movl $0x4, %edx movq %rbx, %rdi movq %r12, %rsi callq 0x7290 decl %r15d jne 0xaaad testq %r14, %r14 je 0xaae5 movq %r14, %rdi callq 0x7100 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x7290 movq (%rbx), %rax movq -0x18(%rax), %rax leaq (%rbx,%rax), %rdi movl 0x20(%rbx,%rax), %esi orl $0x1, %esi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x7400
_ZL5iputsRSoiPKc: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov rbx, rdi test esi, esi jle short loc_AAC2 mov r15d, esi lea r12, asc_3565E; " " loc_AAAD: mov edx, 4 mov rdi, rbx mov rsi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) dec r15d jnz short loc_AAAD loc_AAC2: test r14, r14 jz short loc_AAE5 mov rdi, r14 call _strlen mov rdi, rbx mov rsi, r14 mov rdx, rax pop rbx pop r12 pop r14 pop r15 pop rbp jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_AAE5: mov rax, [rbx] mov rax, [rax-18h] lea rdi, [rbx+rax] mov esi, [rbx+rax+20h] or esi, 1 pop rbx pop r12 pop r14 pop r15 pop rbp jmp __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
long long iputs(std::ostream *a1, int a2, const char *a3) { int v4; // r15d long long v5; // rax if ( a2 > 0 ) { v4 = a2; do { std::__ostream_insert<char,std::char_traits<char>>(a1, " ", 4LL); --v4; } while ( v4 ); } if ( !a3 ) return std::ios::clear( (char *)a1 + *(_QWORD *)(*(_QWORD *)a1 - 24LL), *(_DWORD *)((char *)a1 + *(_QWORD *)(*(_QWORD *)a1 - 24LL) + 32) | 1u); v5 = strlen(a3); return std::__ostream_insert<char,std::char_traits<char>>(a1, a3, v5); }
iputs: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV RBX,RDI TEST ESI,ESI JLE 0x0010aac2 MOV R15D,ESI LEA R12,[0x13565e] LAB_0010aaad: MOV EDX,0x4 MOV RDI,RBX MOV RSI,R12 CALL 0x00107290 DEC R15D JNZ 0x0010aaad LAB_0010aac2: TEST R14,R14 JZ 0x0010aae5 MOV RDI,R14 CALL 0x00107100 MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00107290 LAB_0010aae5: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[RBX + RAX*0x1] MOV ESI,dword ptr [RBX + RAX*0x1 + 0x20] OR ESI,0x1 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00107400
/* iputs(std::ostream&, int, char const*) */ void iputs(ostream *param_1,int param_2,char *param_3) { size_t sVar1; if (0 < param_2) { do { std::__ostream_insert<char,std::char_traits<char>>(param_1," ",4); param_2 = param_2 + -1; } while (param_2 != 0); } if (param_3 == (char *)0x0) { std::ios::clear(param_1 + *(long *)(*(long *)param_1 + -0x18), *(uint *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x20) | 1); return; } sVar1 = strlen(param_3); std::__ostream_insert<char,std::char_traits<char>>(param_1,param_3,sVar1); return; }
49,111
ma_get_key
eloqsql/storage/maria/ma_search.c
uchar *_ma_get_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; uchar *page; DBUG_ENTER("_ma_get_key"); page= ma_page->buff; page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos, keyinfo->keylength+nod_flag); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+= keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ while (page <= keypos) { if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, key->data_length + key->ref_length)); DBUG_RETURN(page); }
O3
c
ma_get_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r15 movq 0x8(%rdi), %r13 movl 0x28(%rsi), %r14d movl 0x2c(%rsi), %r12d testb $0x28, 0xa2(%r13) sete %al testb $0x2, %r12b sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x70da2 movq (%r15), %rdi movzwl 0xaa(%r13), %edx addl %r14d, %edx movq %rbx, %rsi callq 0x2a130 movq (%r13), %rax movl 0x740(%rax), %eax movl %eax, 0x14(%r15) movzwl 0xaa(%r13), %ecx subl %eax, %ecx movl %ecx, 0x10(%r15) movl $0x0, 0x18(%r15) movzwl 0xaa(%r13), %eax addq %r14, %rbx addq %rax, %rbx movq %rbx, %rax jmp 0x70df1 movq (%r13), %rax movl 0x744(%rax), %eax addl %r14d, %eax addq 0x10(%rsi), %rax leaq -0x30(%rbp), %rcx movq %rax, (%rcx) movq (%r15), %rax movb $0x0, (%rax) movq -0x30(%rbp), %rax cmpq %rbx, %rax ja 0x70df1 movq %r15, %rdi movl %r12d, %esi movl %r14d, %edx leaq -0x30(%rbp), %rcx callq *0xe0(%r13) testl %eax, %eax jne 0x70dc0 movq (%r13), %rdi movl $0x7e, %esi callq 0x42bd2 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_get_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r15, rdi mov r13, [rdi+8] mov r14d, [rsi+28h] mov r12d, [rsi+2Ch] test byte ptr [r13+0A2h], 28h setz al test r12b, 2 setz cl and cl, al cmp cl, 1 jnz short loc_70DA2 mov rdi, [r15] movzx edx, word ptr [r13+0AAh] add edx, r14d mov rsi, rbx call _memmove mov rax, [r13+0] mov eax, [rax+740h] mov [r15+14h], eax movzx ecx, word ptr [r13+0AAh] sub ecx, eax mov [r15+10h], ecx mov dword ptr [r15+18h], 0 movzx eax, word ptr [r13+0AAh] add rbx, r14 add rbx, rax mov rax, rbx jmp short loc_70DF1 loc_70DA2: mov rax, [r13+0] mov eax, [rax+744h] add eax, r14d add rax, [rsi+10h] lea rcx, [rbp+var_30] mov [rcx], rax mov rax, [r15] mov byte ptr [rax], 0 loc_70DC0: mov rax, [rbp+var_30] cmp rax, rbx ja short loc_70DF1 mov rdi, r15 mov esi, r12d mov edx, r14d lea rcx, [rbp+var_30] call qword ptr [r13+0E0h] test eax, eax jnz short loc_70DC0 mov rdi, [r13+0] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share xor eax, eax loc_70DF1: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_get_key(long long a1, long long a2, unsigned long long a3) { long long v3; // rax unsigned __int16 *v5; // r13 long long v6; // r14 unsigned int v7; // r12d int v8; // eax long long result; // rax long long v10; // rdx long long v11; // rcx long long v12; // r8 int v13; // r9d _QWORD v14[6]; // [rsp+0h] [rbp-30h] BYREF v14[0] = v3; v5 = *(unsigned __int16 **)(a1 + 8); v6 = *(unsigned int *)(a2 + 40); v7 = *(_DWORD *)(a2 + 44); if ( (v5[81] & 0x28) == 0 && (v7 & 2) == 0 ) { memmove(*(_QWORD *)a1, a3, (unsigned int)v6 + v5[85]); v8 = *(_DWORD *)(*(_QWORD *)v5 + 1856LL); *(_DWORD *)(a1 + 20) = v8; *(_DWORD *)(a1 + 16) = v5[85] - v8; *(_DWORD *)(a1 + 24) = 0; return v5[85] + v6 + a3; } else { v14[0] = *(_QWORD *)(a2 + 16) + (unsigned int)(v6 + *(_DWORD *)(*(_QWORD *)v5 + 1860LL)); **(_BYTE **)a1 = 0; while ( 1 ) { result = v14[0]; if ( v14[0] > a3 ) break; if ( !(*((unsigned int ( **)(long long, _QWORD, _QWORD, _QWORD *))v5 + 28))(a1, v7, (unsigned int)v6, v14) ) { ma_set_fatal_error_with_share(*(_QWORD *)v5, 126, v10, v11, v12, v13); return 0LL; } } } return result; }
_ma_get_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R15,RDI MOV R13,qword ptr [RDI + 0x8] MOV R14D,dword ptr [RSI + 0x28] MOV R12D,dword ptr [RSI + 0x2c] TEST byte ptr [R13 + 0xa2],0x28 SETZ AL TEST R12B,0x2 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x00170da2 MOV RDI,qword ptr [R15] MOVZX EDX,word ptr [R13 + 0xaa] ADD EDX,R14D MOV RSI,RBX CALL 0x0012a130 MOV RAX,qword ptr [R13] MOV EAX,dword ptr [RAX + 0x740] MOV dword ptr [R15 + 0x14],EAX MOVZX ECX,word ptr [R13 + 0xaa] SUB ECX,EAX MOV dword ptr [R15 + 0x10],ECX MOV dword ptr [R15 + 0x18],0x0 MOVZX EAX,word ptr [R13 + 0xaa] ADD RBX,R14 ADD RBX,RAX MOV RAX,RBX JMP 0x00170df1 LAB_00170da2: MOV RAX,qword ptr [R13] MOV EAX,dword ptr [RAX + 0x744] ADD EAX,R14D ADD RAX,qword ptr [RSI + 0x10] LEA RCX,[RBP + -0x30] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [R15] MOV byte ptr [RAX],0x0 LAB_00170dc0: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,RBX JA 0x00170df1 MOV RDI,R15 MOV ESI,R12D MOV EDX,R14D LEA RCX,[RBP + -0x30] CALL qword ptr [R13 + 0xe0] TEST EAX,EAX JNZ 0x00170dc0 MOV RDI,qword ptr [R13] MOV ESI,0x7e CALL 0x00142bd2 XOR EAX,EAX LAB_00170df1: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void * _ma_get_key(int8 *param_1,long param_2,void *param_3) { uint uVar1; uint uVar2; long *plVar3; int iVar4; void *local_38; plVar3 = (long *)param_1[1]; uVar1 = *(uint *)(param_2 + 0x28); uVar2 = *(uint *)(param_2 + 0x2c); if ((uVar2 & 2) == 0 && (*(byte *)((long)plVar3 + 0xa2) & 0x28) == 0) { memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)plVar3 + 0xaa) + uVar1)); iVar4 = *(int *)(*plVar3 + 0x740); *(int *)((long)param_1 + 0x14) = iVar4; *(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar3 + 0xaa) - iVar4; *(int4 *)(param_1 + 3) = 0; param_3 = (void *)((long)param_3 + (ulong)*(ushort *)((long)plVar3 + 0xaa) + (ulong)uVar1); } else { local_38 = (void *)((ulong)(*(int *)(*plVar3 + 0x744) + uVar1) + *(long *)(param_2 + 0x10)); *(int1 *)*param_1 = 0; do { if (param_3 < local_38) { return local_38; } iVar4 = (*(code *)plVar3[0x1c])(param_1,uVar2,uVar1,&local_38); } while (iVar4 != 0); _ma_set_fatal_error_with_share(*plVar3,0x7e); param_3 = (void *)0x0; } return param_3; }
49,112
my_longlong10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *e; long long_val; uint sign= 0; ulonglong uval = (ulonglong)val; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; *dst++= '-'; len--; sign= 1; } } e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (uval == 0) { *--p= '0'; len= 1; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p = '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } len= MY_MIN(len, (size_t) (e-p)); cnv: memcpy(dst, p, len); return len+sign; }
O0
c
my_longlong10_to_str_8bit: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq %rdx, -0x68(%rbp) movl %ecx, -0x6c(%rbp) movq %r8, -0x78(%rbp) movl $0x0, -0x94(%rbp) movq -0x78(%rbp), %rax movq %rax, -0xa0(%rbp) cmpl $0x0, -0x6c(%rbp) jge 0x42bc7 cmpq $0x0, -0x78(%rbp) jge 0x42bc5 xorl %eax, %eax subq -0xa0(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movb $0x2d, (%rax) movq -0x68(%rbp), %rax addq $-0x1, %rax movq %rax, -0x68(%rbp) movl $0x1, -0x94(%rbp) jmp 0x42bc7 leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x80(%rbp) movq %rax, -0x88(%rbp) movq -0x80(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xa0(%rbp) jne 0x42c0b movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x30, -0x1(%rax) movq $0x1, -0x68(%rbp) jmp 0x42d2b jmp 0x42c0d movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0xa0(%rbp) jbe 0x42c7d movq -0xa0(%rbp), %rax movl $0xa, %ecx xorl %edx, %edx divq %rcx movq %rax, -0xa8(%rbp) movq -0xa0(%rbp), %rax imulq $0xa, -0xa8(%rbp), %rcx subq %rcx, %rax movl %eax, -0xac(%rbp) movl -0xac(%rbp), %eax addl $0x30, %eax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xa8(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x42c0d movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) cmpq $0x0, -0x90(%rbp) je 0x42ce7 movq -0x90(%rbp), %rax movl $0xa, %ecx cqto idivq %rcx movq %rax, -0xb8(%rbp) movq -0x90(%rbp), %rax imulq $0xa, -0xb8(%rbp), %rcx subq %rcx, %rax addq $0x30, %rax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xb8(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x42c8b movq -0x68(%rbp), %rax movq -0x88(%rbp), %rcx movq -0x80(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax jae 0x42d0b movq -0x68(%rbp), %rax movq %rax, -0xc0(%rbp) jmp 0x42d20 movq -0x88(%rbp), %rax movq -0x80(%rbp), %rcx subq %rcx, %rax movq %rax, -0xc0(%rbp) movq -0xc0(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x68(%rbp), %rdx callq 0x241f0 movq -0x68(%rbp), %rax movl -0x94(%rbp), %ecx addq %rcx, %rax movq %rax, -0xc8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x42d72 movq -0xc8(%rbp), %rax addq $0xd0, %rsp popq %rbp retq callq 0x242a0 nopw (%rax,%rax)
my_longlong10_to_str_8bit: push rbp mov rbp, rsp sub rsp, 0D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx mov [rbp+var_6C], ecx mov [rbp+var_78], r8 mov [rbp+var_94], 0 mov rax, [rbp+var_78] mov [rbp+var_A0], rax cmp [rbp+var_6C], 0 jge short loc_42BC7 cmp [rbp+var_78], 0 jge short loc_42BC5 xor eax, eax sub rax, [rbp+var_A0] mov [rbp+var_A0], rax mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx mov byte ptr [rax], 2Dh ; '-' mov rax, [rbp+var_68] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_68], rax mov [rbp+var_94], 1 loc_42BC5: jmp short $+2 loc_42BC7: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_80], rax mov [rbp+var_88], rax mov rax, [rbp+var_80] mov byte ptr [rax], 0 cmp [rbp+var_A0], 0 jnz short loc_42C0B mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 30h ; '0' mov [rbp+var_68], 1 jmp loc_42D2B loc_42C0B: jmp short $+2 loc_42C0D: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_A0], rax jbe short loc_42C7D mov rax, [rbp+var_A0] mov ecx, 0Ah xor edx, edx div rcx mov [rbp+var_A8], rax mov rax, [rbp+var_A0] imul rcx, [rbp+var_A8], 0Ah sub rax, rcx mov [rbp+var_AC], eax mov eax, [rbp+var_AC] add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_A8] mov [rbp+var_A0], rax jmp short loc_42C0D loc_42C7D: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_42C8B: cmp [rbp+var_90], 0 jz short loc_42CE7 mov rax, [rbp+var_90] mov ecx, 0Ah cqo idiv rcx mov [rbp+var_B8], rax mov rax, [rbp+var_90] imul rcx, [rbp+var_B8], 0Ah sub rax, rcx add rax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_B8] mov [rbp+var_90], rax jmp short loc_42C8B loc_42CE7: mov rax, [rbp+var_68] mov rcx, [rbp+var_88] mov rdx, [rbp+var_80] sub rcx, rdx cmp rax, rcx jnb short loc_42D0B mov rax, [rbp+var_68] mov [rbp+var_C0], rax jmp short loc_42D20 loc_42D0B: mov rax, [rbp+var_88] mov rcx, [rbp+var_80] sub rax, rcx mov [rbp+var_C0], rax loc_42D20: mov rax, [rbp+var_C0] mov [rbp+var_68], rax loc_42D2B: mov rdi, [rbp+var_60] mov rsi, [rbp+var_80] mov rdx, [rbp+var_68] call _memcpy mov rax, [rbp+var_68] mov ecx, [rbp+var_94] add rax, rcx mov [rbp+var_C8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_42D72 mov rax, [rbp+var_C8] add rsp, 0D0h pop rbp retn loc_42D72: call ___stack_chk_fail
long long my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, long long a5) { char *v5; // rax char *v6; // rax _BYTE *v8; // [rsp+10h] [rbp-C0h] unsigned long long v9; // [rsp+30h] [rbp-A0h] unsigned int v10; // [rsp+3Ch] [rbp-94h] signed long long i; // [rsp+40h] [rbp-90h] char *v12; // [rsp+50h] [rbp-80h] _BYTE *v13; // [rsp+68h] [rbp-68h] long long v14; // [rsp+68h] [rbp-68h] _BYTE *v15; // [rsp+70h] [rbp-60h] char v16; // [rsp+BFh] [rbp-11h] BYREF _BYTE v17[8]; // [rsp+C0h] [rbp-10h] BYREF unsigned long long v18; // [rsp+C8h] [rbp-8h] v18 = __readfsqword(0x28u); v15 = a2; v13 = a3; v10 = 0; v9 = a5; if ( a4 < 0 && a5 < 0 ) { v9 = -a5; v15 = a2 + 1; *a2 = 45; v13 = a3 - 1; v10 = 1; } v12 = v17; v17[0] = 0; if ( v9 ) { while ( v9 > 0x7FFFFFFFFFFFFFFFLL ) { v5 = v12--; *(v5 - 1) = v9 % 0xA + 48; v9 /= 0xAuLL; } for ( i = v9; i; i /= 10LL ) { v6 = v12--; *(v6 - 1) = i % 10 + 48; } if ( (unsigned long long)v13 >= v17 - v12 ) v8 = (_BYTE *)(v17 - v12); else v8 = v13; v14 = (long long)v8; } else { v12 = &v16; v16 = 48; v14 = 1LL; } memcpy(v15, v12, v14); return v10 + v14; }
my_longlong10_to_str_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x68],RDX MOV dword ptr [RBP + -0x6c],ECX MOV qword ptr [RBP + -0x78],R8 MOV dword ptr [RBP + -0x94],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xa0],RAX CMP dword ptr [RBP + -0x6c],0x0 JGE 0x00142bc7 CMP qword ptr [RBP + -0x78],0x0 JGE 0x00142bc5 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RAX],0x2d MOV RAX,qword ptr [RBP + -0x68] ADD RAX,-0x1 MOV qword ptr [RBP + -0x68],RAX MOV dword ptr [RBP + -0x94],0x1 LAB_00142bc5: JMP 0x00142bc7 LAB_00142bc7: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x80],RAX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xa0],0x0 JNZ 0x00142c0b MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x30 MOV qword ptr [RBP + -0x68],0x1 JMP 0x00142d2b LAB_00142c0b: JMP 0x00142c0d LAB_00142c0d: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0xa0],RAX JBE 0x00142c7d MOV RAX,qword ptr [RBP + -0xa0] MOV ECX,0xa XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa0] IMUL RCX,qword ptr [RBP + -0xa8],0xa SUB RAX,RCX MOV dword ptr [RBP + -0xac],EAX MOV EAX,dword ptr [RBP + -0xac] ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xa0],RAX JMP 0x00142c0d LAB_00142c7d: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_00142c8b: CMP qword ptr [RBP + -0x90],0x0 JZ 0x00142ce7 MOV RAX,qword ptr [RBP + -0x90] MOV ECX,0xa CQO IDIV RCX MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x90] IMUL RCX,qword ptr [RBP + -0xb8],0xa SUB RAX,RCX ADD RAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0x90],RAX JMP 0x00142c8b LAB_00142ce7: MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RBP + -0x80] SUB RCX,RDX CMP RAX,RCX JNC 0x00142d0b MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0xc0],RAX JMP 0x00142d20 LAB_00142d0b: MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x80] SUB RAX,RCX MOV qword ptr [RBP + -0xc0],RAX LAB_00142d20: MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0x68],RAX LAB_00142d2b: MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x68] CALL 0x001241f0 MOV RAX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RBP + -0x94] ADD RAX,RCX MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00142d72 MOV RAX,qword ptr [RBP + -0xc8] ADD RSP,0xd0 POP RBP RET LAB_00142d72: CALL 0x001242a0
long my_longlong10_to_str_8bit (int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5) { char *pcVar1; long in_FS_OFFSET; ulong local_c8; ulong local_a8; uint local_9c; ulong local_98; char *local_88; size_t local_70; int1 *local_68; char local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_9c = 0; local_a8 = param_5; local_70 = param_3; local_68 = param_2; if (param_4 < 0) { if ((long)param_5 < 0) { local_a8 = -param_5; local_68 = param_2 + 1; *param_2 = 0x2d; local_70 = param_3 - 1; } local_9c = (uint)((long)param_5 < 0); } pcVar1 = local_19 + 1; local_19[1] = 0; local_88 = pcVar1; if (local_a8 == 0) { local_88 = local_19; local_19[0] = '0'; local_70 = 1; } else { while (0x7fffffffffffffff < local_a8) { local_88[-1] = (char)local_a8 + (char)(local_a8 / 10) * -10 + '0'; local_a8 = local_a8 / 10; local_88 = local_88 + -1; } local_98 = local_a8; while (local_98 != 0) { local_88[-1] = (char)local_98 + (char)((long)local_98 / 10) * -10 + '0'; local_98 = (long)local_98 / 10; local_88 = local_88 + -1; } if (local_70 < (ulong)((long)pcVar1 - (long)local_88)) { local_c8 = local_70; } else { local_c8 = (long)pcVar1 - (long)local_88; } local_70 = local_c8; } memcpy(local_68,local_88,local_70); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_70 + local_9c; }
49,113
ggml_threadpool_params_from_cpu_params(cpu_params const&)
monkey531[P]llama/common/common.cpp
struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) { struct ggml_threadpool_params tpp; ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults if (params.mask_valid) { std::memcpy(&tpp.cpumask, &params.cpumask, GGML_MAX_N_THREADS); } tpp.prio = params.priority; tpp.poll = params.poll; tpp.strict_cpu = params.strict_cpu; return tpp; }
O2
cpp
ggml_threadpool_params_from_cpu_params(cpu_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl (%rsi), %esi callq 0x237c0 cmpb $0x1, 0x204(%r14) jne 0x56b6c leaq 0x4(%r14), %rsi movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi callq 0x23730 movl 0x208(%r14), %eax movl %eax, 0x204(%rbx) movl 0x210(%r14), %eax movl %eax, 0x208(%rbx) movb 0x20c(%r14), %al movb %al, 0x20c(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov esi, [rsi] call _ggml_threadpool_params_init cmp byte ptr [r14+204h], 1 jnz short loc_56B6C lea rsi, [r14+4] mov edx, 200h mov rdi, rbx call _memcpy loc_56B6C: mov eax, [r14+208h] mov [rbx+204h], eax mov eax, [r14+210h] mov [rbx+208h], eax mov al, [r14+20Ch] mov [rbx+20Ch], al mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2) { ggml_threadpool_params_init(a1, *a2); if ( *((_BYTE *)a2 + 516) == 1 ) memcpy(a1, a2 + 1, 512LL); *(_DWORD *)(a1 + 516) = a2[130]; *(_DWORD *)(a1 + 520) = a2[132]; *(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524); return a1; }
ggml_threadpool_params_from_cpu_params: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI] CALL 0x001237c0 CMP byte ptr [R14 + 0x204],0x1 JNZ 0x00156b6c LEA RSI,[R14 + 0x4] MOV EDX,0x200 MOV RDI,RBX CALL 0x00123730 LAB_00156b6c: MOV EAX,dword ptr [R14 + 0x208] MOV dword ptr [RBX + 0x204],EAX MOV EAX,dword ptr [R14 + 0x210] MOV dword ptr [RBX + 0x208],EAX MOV AL,byte ptr [R14 + 0x20c] MOV byte ptr [RBX + 0x20c],AL MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */ cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1) { int4 *in_RSI; ggml_threadpool_params_init(param_1,*in_RSI); if (*(char *)(in_RSI + 0x81) == '\x01') { memcpy(param_1,in_RSI + 1,0x200); } *(int4 *)(param_1 + 0x204) = in_RSI[0x82]; *(int4 *)(param_1 + 0x208) = in_RSI[0x84]; param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83); return param_1; }
49,114
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
llama.cpp/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const std::string & help, void (*handler)(common_params & params, const std::string &) ) : args(args), value_hint(value_hint), help(help), handler_string(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl $0x0, (%rsi) leaq 0x3(%rsp), %rcx leaq 0x2(%rsp), %r8 movl $0x1, %edx callq 0x83678 leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r13 movq (%rbp), %rsi movq 0x8(%rbp), %rdx leaq 0x1(%rsp), %rcx movq %r13, %rdi callq 0x836fa movq %r12, 0x78(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x27ffe movb $0x0, 0xb0(%rbx) movq $0x0, 0xb8(%rbx) movq %r14, 0xc0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc8(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r13), %rdi testq %rdi, %rdi je 0x63edc movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x21170 jmp 0x63edc movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x83740 movq %rbx, %rdi callq 0x83740 movq %r14, %rdi callq 0x21af0 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov rbp, rsi mov rbx, rdi lea rsi, [rsp+38h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_35] lea r8, [rsp+38h+var_36] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r13, [rbx+60h] mov rsi, [rbp+0] mov rdx, [rbp+8] lea rcx, [rsp+38h+var_37] mov rdi, r13 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r12 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 mov qword ptr [rbx+0B8h], 0 mov [rbx+0C0h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C8h], xmm0 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r13+0]; void * test rdi, rdi jz short loc_63EDC mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_63EDC mov r14, rax loc_63EDC: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5) { int v5; // eax long long result; // rax int v10; // [rsp+0h] [rbp-38h] BYREF _DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF v10 = v5; v11[0] = 0; std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1); *(_QWORD *)(a1 + 120) = a3; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 192) = a5; *(_OWORD *)(a1 + 200) = 0LL; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBP,RSI MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x3] LEA R8,[RSP + 0x2] MOV EDX,0x1 CALL 0x00183678 LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R13,[RBX + 0x60] MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] LAB_00163e4e: LEA RCX,[RSP + 0x1] MOV RDI,R13 CALL 0x001836fa MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_00163e88: CALL 0x00127ffe LAB_00163e8d: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],0x0 MOV qword ptr [RBX + 0xc0],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,string *param_3, _func_void_common_params_ptr_string_ptr *param_4) { int4 in_EAX; int8 in_R9; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9 ,in_EAX); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00163e4e to 00163e5a has its CatchHandler @ 00163ed9 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9); *(char **)(this + 0x78) = param_2; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 00163e88 to 00163e8c has its CatchHandler @ 00163ebf */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
49,115
nglog::InstallFailureSignalHandler()
ng-log[P]ng-log/src/signalhandler.cc
void InstallFailureSignalHandler() { #ifdef HAVE_SIGACTION // Build the sigaction struct. struct sigaction sig_action; memset(&sig_action, 0, sizeof(sig_action)); sigemptyset(&sig_action.sa_mask); sig_action.sa_flags |= SA_SIGINFO; sig_action.sa_sigaction = &FailureSignalHandler; for (auto kFailureSignal : kFailureSignals) { CHECK_ERR(sigaction(kFailureSignal.number, &sig_action, nullptr)); } kFailureSignalHandlerInstalled = true; #elif defined(NGLOG_OS_WINDOWS) for (size_t i = 0; i < ARRAYSIZE(kFailureSignals); ++i) { CHECK_NE(signal(kFailureSignals[i].number, &FailureSignalHandler), SIG_ERR); } kFailureSignalHandlerInstalled = true; #endif // HAVE_SIGACTION }
O1
cpp
nglog::InstallFailureSignalHandler(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 leaq 0x80(%rsp), %rbx xorl %r13d, %r13d movl $0x98, %edx movq %rbx, %rdi xorl %esi, %esi callq 0x72b0 leaq 0x88(%rsp), %r14 movq %r14, %rdi callq 0x76d0 orb $0x4, 0x80(%r14) leaq -0x88(%rip), %rax # 0x1f869 movq %rax, -0x8(%r14) leaq 0xf3a4(%rip), %rbp # 0x2eca0 leaq 0x4380(%rip), %r14 # 0x23c83 leaq 0x20(%rsp), %r15 leaq 0x43c1(%rip), %r12 # 0x23cd0 movl (%r13,%rbp), %edi movq %rbx, %rsi xorl %edx, %edx callq 0x76e0 cmpl $-0x1, %eax je 0x1f92f addq $0x10, %r13 cmpq $0x60, %r13 jne 0x1f90f jmp 0x1f987 leaq -0x158e4(%rip), %rax # 0xa052 movq %rax, 0x10(%rsp) movq $0x0, 0x18(%rsp) movups 0x10(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movl $0x18b, %edx # imm = 0x18B movl $0x3, %ecx xorl %r8d, %r8d callq 0xb0f6 movq %r15, %rdi callq 0xa516 movl $0x36, %edx movq %rax, %rdi movq %r12, %rsi callq 0x7610 movq %r15, %rdi callq 0xb160 jmp 0x1f923 addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xb160 movq %rbx, %rdi callq 0x7980 movq %rax, %rdi callq 0x924d
_ZN5nglog27InstallFailureSignalHandlerEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h lea rbx, [rsp+148h+var_C8] xor r13d, r13d mov edx, 98h mov rdi, rbx xor esi, esi call _memset lea r14, [rsp+148h+var_C0] mov rdi, r14 call _sigemptyset or byte ptr [r14+80h], 4 lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *) mov [r14-8], rax lea rbp, _ZN5nglog12_GLOBAL__N_115kFailureSignalsE; nglog::`anonymous namespace'::kFailureSignals lea r14, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea r15, [rsp+148h+var_128] lea r12, aSigactionKfail; "sigaction(kFailureSignal.number, &sig_a"... loc_1F90F: mov edi, [r13+rbp+0] mov rsi, rbx xor edx, edx call _sigaction cmp eax, 0FFFFFFFFh jz short loc_1F92F loc_1F923: add r13, 10h cmp r13, 60h ; '`' jnz short loc_1F90F jmp short loc_1F987 loc_1F92F: lea rax, _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void) mov qword ptr [rsp+148h+var_138], rax mov qword ptr [rsp+148h+var_138+8], 0 movups xmm0, [rsp+148h+var_138] movups [rsp+148h+var_148], xmm0 mov rdi, r15 mov rsi, r14 mov edx, 18Bh mov ecx, 3 xor r8d, r8d call _ZN5nglog15ErrnoLogMessageC2EPKciNS_11LogSeverityElMNS_10LogMessageEFvvE; nglog::ErrnoLogMessage::ErrnoLogMessage(char const*,int,nglog::LogSeverity,long,void (nglog::LogMessage::*)(void)) mov rdi, r15; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov edx, 36h ; '6' mov rdi, rax mov rsi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r15; this call _ZN5nglog15ErrnoLogMessageD2Ev; nglog::ErrnoLogMessage::~ErrnoLogMessage() jmp short loc_1F923 loc_1F987: add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_18]; this call _ZN5nglog15ErrnoLogMessageD2Ev; nglog::ErrnoLogMessage::~ErrnoLogMessage() mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::InstallFailureSignalHandler(nglog *this) { long long v1; // r13 long long v2; // r9 long long v3; // rax _QWORD v4[12]; // [rsp+20h] [rbp-128h] BYREF long long ( *v5)(int, long long, long long); // [rsp+80h] [rbp-C8h] BYREF _BYTE v6[128]; // [rsp+88h] [rbp-C0h] BYREF char v7; // [rsp+108h] [rbp-40h] v1 = 0LL; memset(&v5, 0LL, 152LL); sigemptyset(v6); v7 |= 4u; v5 = nglog::`anonymous namespace'::FailureSignalHandler; do { if ( (unsigned int)sigaction( *(unsigned int *)((char *)&nglog::`anonymous namespace'::kFailureSignals + v1), &v5, 0LL) == -1 ) { nglog::ErrnoLogMessage::ErrnoLogMessage( v4, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/signalhandler.cc", 395, 3u, 0LL, v2, (long long)nglog::LogMessage::SendToLog, 0LL); v3 = nglog::LogMessage::stream((nglog::LogMessage *)v4); std::__ostream_insert<char,std::char_traits<char>>( v3, "sigaction(kFailureSignal.number, &sig_action, nullptr)", 54LL); nglog::ErrnoLogMessage::~ErrnoLogMessage((nglog::ErrnoLogMessage *)v4); } v1 += 16LL; } while ( v1 != 96 ); }
InstallFailureSignalHandler: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 LEA RBX,[RSP + 0x80] XOR R13D,R13D MOV EDX,0x98 MOV RDI,RBX XOR ESI,ESI CALL 0x001072b0 LEA R14,[RSP + 0x88] MOV RDI,R14 CALL 0x001076d0 OR byte ptr [R14 + 0x80],0x4 LEA RAX,[0x11f869] MOV qword ptr [R14 + -0x8],RAX LEA RBP,[0x12eca0] LEA R14,[0x123c83] LEA R15,[RSP + 0x20] LEA R12,[0x123cd0] LAB_0011f90f: MOV EDI,dword ptr [R13 + RBP*0x1] MOV RSI,RBX XOR EDX,EDX CALL 0x001076e0 CMP EAX,-0x1 JZ 0x0011f92f LAB_0011f923: ADD R13,0x10 CMP R13,0x60 JNZ 0x0011f90f JMP 0x0011f987 LAB_0011f92f: LEA RAX,[0x10a052] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],0x0 MOVUPS XMM0,xmmword ptr [RSP + 0x10] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV EDX,0x18b MOV ECX,0x3 XOR R8D,R8D CALL 0x0010b0f6 LAB_0011f965: MOV RDI,R15 CALL 0x0010a516 MOV EDX,0x36 MOV RDI,RAX MOV RSI,R12 CALL 0x00107610 LAB_0011f97d: MOV RDI,R15 CALL 0x0010b160 JMP 0x0011f923 LAB_0011f987: ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::InstallFailureSignalHandler() */ void nglog::InstallFailureSignalHandler(void) { int iVar1; ostream *poVar2; int8 in_R9; long lVar3; LogMessage local_128 [96]; sigaction local_c8; lVar3 = 0; memset(&local_c8,0,0x98); sigemptyset(&local_c8.sa_mask); local_c8.sa_flags._0_1_ = (byte)local_c8.sa_flags | 4; local_c8.__sigaction_handler.sa_handler = (anonymous_namespace)::FailureSignalHandler; do { iVar1 = sigaction(*(int *)((long)&(anonymous_namespace)::kFailureSignals + lVar3),&local_c8, (sigaction *)0x0); if (iVar1 == -1) { ErrnoLogMessage::ErrnoLogMessage ((ErrnoLogMessage *)local_128, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/signalhandler.cc", 0x18b,3,0,in_R9,0x10a052,0); /* try { // try from 0011f965 to 0011f97c has its CatchHandler @ 0011f999 */ poVar2 = (ostream *)LogMessage::stream(local_128); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"sigaction(kFailureSignal.number, &sig_action, nullptr)",0x36); ErrnoLogMessage::~ErrnoLogMessage((ErrnoLogMessage *)local_128); } lVar3 = lVar3 + 0x10; } while (lVar3 != 0x60); return; }
49,116
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 0x9bb4f jmp 0x9bb51 jmp 0x9bb53 movq -0x58(%rbp), %rdi xorl %esi, %esi callq 0x487a0 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 0x2a2c0 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 0x9be49 jmp 0x9bd2e 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 0x9bd7a movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF movq %rax, -0x130(%rbp) jmp 0x9bd90 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 0x33e80 cmpb $0x0, %al je 0x9be47 movl $0x1, -0xa0(%rbp) jmp 0x9be49 cmpb $0x0, -0x61(%rbp) je 0x9be65 movl $0x4, -0xa4(%rbp) movl $0x2, -0xa8(%rbp) jmp 0x9be79 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 0x40730 cmpb $0x0, %al je 0x9bf05 movl $0x1, -0xa0(%rbp) cmpb $0x0, -0x61(%rbp) je 0x9bf33 movl $0x6, -0x90(%rbp) movb $0x1, -0x88(%rbp) movq -0x58(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x98(%rbp), %rsi callq 0xdc6b0 jmp 0x9bf35 movl -0xa0(%rbp), %eax movl %eax, -0x134(%rbp) movq %fs:0x28, %rax movq -0x18(%rbp), %rcx cmpq %rcx, %rax jne 0x9bf65 movl -0x134(%rbp), %eax addq $0x160, %rsp # imm = 0x160 popq %rbx popq %r14 popq %rbp retq callq 0x2a270 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_9BB4F: jmp short $+2 loc_9BB51: jmp short $+2 loc_9BB53: 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_9BE49 jmp short $+2 loc_9BD2E: 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_9BD7A mov rax, 0FFFFFFFFFFh mov [rbp+var_130], rax jmp short loc_9BD90 loc_9BD7A: mov rax, [rbp+var_70] mov ecx, [rbp+var_9C] xor edx, edx div rcx mov [rbp+var_130], rax loc_9BD90: 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_9BE47 mov [rbp+var_A0], 1 loc_9BE47: jmp short $+2 loc_9BE49: cmp [rbp+var_61], 0 jz short loc_9BE65 mov [rbp+var_A4], 4 mov [rbp+var_A8], 2 jmp short loc_9BE79 loc_9BE65: mov [rbp+var_A4], 2 mov [rbp+var_A8], 0 loc_9BE79: 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_9BF05 mov [rbp+var_A0], 1 loc_9BF05: cmp [rbp+var_61], 0 jz short loc_9BF33 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_9BF33: jmp short $+2 loc_9BF35: 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_9BF65 mov eax, [rbp+var_134] add rsp, 160h pop rbx pop r14 pop rbp retn loc_9BF65: 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 0x0019bb4f LAB_0019bb4f: JMP 0x0019bb51 LAB_0019bb51: JMP 0x0019bb53 LAB_0019bb53: MOV RDI,qword ptr [RBP + -0x58] XOR ESI,ESI CALL 0x001487a0 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 0x0012a2c0 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 0x0019be49 JMP 0x0019bd2e LAB_0019bd2e: 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 0x0019bd7a MOV RAX,0xffffffffff MOV qword ptr [RBP + -0x130],RAX JMP 0x0019bd90 LAB_0019bd7a: MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RBP + -0x9c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x130],RAX LAB_0019bd90: 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 0x00133e80 CMP AL,0x0 JZ 0x0019be47 MOV dword ptr [RBP + -0xa0],0x1 LAB_0019be47: JMP 0x0019be49 LAB_0019be49: CMP byte ptr [RBP + -0x61],0x0 JZ 0x0019be65 MOV dword ptr [RBP + -0xa4],0x4 MOV dword ptr [RBP + -0xa8],0x2 JMP 0x0019be79 LAB_0019be65: MOV dword ptr [RBP + -0xa4],0x2 MOV dword ptr [RBP + -0xa8],0x0 LAB_0019be79: 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 0x00140730 CMP AL,0x0 JZ 0x0019bf05 MOV dword ptr [RBP + -0xa0],0x1 LAB_0019bf05: CMP byte ptr [RBP + -0x61],0x0 JZ 0x0019bf33 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 0x001dc6b0 LAB_0019bf33: JMP 0x0019bf35 LAB_0019bf35: 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 0x0019bf65 MOV EAX,dword ptr [RBP + -0x134] ADD RSP,0x160 POP RBX POP R14 POP RBP RET LAB_0019bf65: CALL 0x0012a270
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; }
49,117
pick_seeds
eloqsql/storage/maria/ma_rt_split.c
static void pick_seeds(SplitStruct *node, int n_entries, SplitStruct **seed_a, SplitStruct **seed_b, int n_dim) { SplitStruct *cur1; SplitStruct *lim1= node + (n_entries - 1); SplitStruct *cur2; SplitStruct *lim2= node + n_entries; double max_d= -DBL_MAX; double d; for (cur1= node; cur1 < lim1; cur1++) { for (cur2=cur1 + 1; cur2 < lim2; cur2++) { d= mbr_join_square(cur1->coords, cur2->coords, n_dim) - cur1->square - cur2->square; if (d > max_d) { max_d= d; *seed_a= cur1; *seed_b= cur2; } } } }
O0
c
pick_seeds: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movsd 0xd0142(%rip), %xmm0 # 0x15a2d0 movsd %xmm0, -0x50(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x8a23b movq -0x30(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x8a228 movq -0x30(%rbp), %rax movq 0x18(%rax), %rdi movq -0x40(%rbp), %rax movq 0x18(%rax), %rsi movl -0x24(%rbp), %edx callq 0x8a4b0 movq -0x30(%rbp), %rax subsd (%rax), %xmm0 movq -0x40(%rbp), %rax subsd (%rax), %xmm0 movsd %xmm0, -0x58(%rbp) movsd -0x58(%rbp), %xmm0 ucomisd -0x50(%rbp), %xmm0 jbe 0x8a218 movsd -0x58(%rbp), %xmm0 movsd %xmm0, -0x50(%rbp) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x40(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) jmp 0x8a21a movq -0x40(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) jmp 0x8a1b5 jmp 0x8a22a movq -0x30(%rbp), %rax addq $0x20, %rax movq %rax, -0x30(%rbp) jmp 0x8a19b addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pick_seeds: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov rax, [rbp+var_8] mov ecx, [rbp+var_C] sub ecx, 1 movsxd rcx, ecx shl rcx, 5 add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] shl rcx, 5 add rax, rcx mov [rbp+var_48], rax movsd xmm0, cs:qword_15A2D0 movsd [rbp+var_50], xmm0 mov rax, [rbp+var_8] mov [rbp+var_30], rax loc_8A19B: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb loc_8A23B mov rax, [rbp+var_30] add rax, 20h ; ' ' mov [rbp+var_40], rax loc_8A1B5: mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jnb short loc_8A228 mov rax, [rbp+var_30] mov rdi, [rax+18h] mov rax, [rbp+var_40] mov rsi, [rax+18h] mov edx, [rbp+var_24] call mbr_join_square mov rax, [rbp+var_30] subsd xmm0, qword ptr [rax] mov rax, [rbp+var_40] subsd xmm0, qword ptr [rax] movsd [rbp+var_58], xmm0 movsd xmm0, [rbp+var_58] ucomisd xmm0, [rbp+var_50] jbe short loc_8A218 movsd xmm0, [rbp+var_58] movsd [rbp+var_50], xmm0 mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_20] mov [rax], rcx loc_8A218: jmp short $+2 loc_8A21A: mov rax, [rbp+var_40] add rax, 20h ; ' ' mov [rbp+var_40], rax jmp short loc_8A1B5 loc_8A228: jmp short $+2 loc_8A22A: mov rax, [rbp+var_30] add rax, 20h ; ' ' mov [rbp+var_30], rax jmp loc_8A19B loc_8A23B: add rsp, 60h pop rbp retn
unsigned long long pick_seeds( unsigned long long a1, int a2, unsigned long long *a3, unsigned long long *a4, unsigned int a5) { unsigned long long result; // rax double v6; // [rsp+8h] [rbp-58h] double v7; // [rsp+10h] [rbp-50h] unsigned long long j; // [rsp+20h] [rbp-40h] unsigned long long i; // [rsp+30h] [rbp-30h] v7 = -1.797693134862316e308; for ( i = a1; ; i += 32LL ) { result = i; if ( i >= 32LL * (a2 - 1) + a1 ) break; for ( j = i + 32; j < 32LL * a2 + a1; j += 32LL ) { v6 = mbr_join_square(*(_QWORD *)(i + 24), *(_QWORD *)(j + 24), a5) - *(double *)i - *(double *)j; if ( v6 > v7 ) { v7 = v6; *a3 = i; *a4 = j; } } } return result; }
pick_seeds: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOVSD XMM0,qword ptr [0x0025a2d0] MOVSD qword ptr [RBP + -0x50],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX LAB_0018a19b: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0018a23b MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX LAB_0018a1b5: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JNC 0x0018a228 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x18] MOV EDX,dword ptr [RBP + -0x24] CALL 0x0018a4b0 MOV RAX,qword ptr [RBP + -0x30] SUBSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] SUBSD XMM0,qword ptr [RAX] MOVSD qword ptr [RBP + -0x58],XMM0 MOVSD XMM0,qword ptr [RBP + -0x58] UCOMISD XMM0,qword ptr [RBP + -0x50] JBE 0x0018a218 MOVSD XMM0,qword ptr [RBP + -0x58] MOVSD qword ptr [RBP + -0x50],XMM0 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX LAB_0018a218: JMP 0x0018a21a LAB_0018a21a: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX JMP 0x0018a1b5 LAB_0018a228: JMP 0x0018a22a LAB_0018a22a: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x20 MOV qword ptr [RBP + -0x30],RAX JMP 0x0018a19b LAB_0018a23b: ADD RSP,0x60 POP RBP RET
void pick_seeds(double *param_1,int param_2,int8 *param_3,int8 *param_4, int4 param_5) { double *pdVar1; double dVar2; double local_58; double *local_48; double *local_38; local_58 = DAT_0025a2d0; for (local_38 = param_1; pdVar1 = local_38, local_38 < param_1 + (long)(param_2 + -1) * 4; local_38 = local_38 + 4) { while (local_48 = pdVar1 + 4, local_48 < param_1 + (long)param_2 * 4) { dVar2 = (double)mbr_join_square(local_38[3],pdVar1[7],param_5); dVar2 = (dVar2 - *local_38) - *local_48; pdVar1 = local_48; if (local_58 < dVar2) { *param_3 = local_38; *param_4 = local_48; local_58 = dVar2; } } } return; }
49,118
nglog::tools::SafeFNMatch_(char const*, unsigned long, char const*, unsigned long)
ng-log[P]ng-log/src/vlog_is_on.cc
NGLOG_NO_EXPORT bool SafeFNMatch_(const char* pattern, size_t patt_len, const char* str, size_t str_len) { size_t p = 0; size_t s = 0; while (true) { if (p == patt_len && s == str_len) return true; if (p == patt_len) return false; if (s == str_len) return p + 1 == patt_len && pattern[p] == '*'; if (pattern[p] == str[s] || pattern[p] == '?') { p += 1; s += 1; continue; } if (pattern[p] == '*') { if (p + 1 == patt_len) return true; do { if (SafeFNMatch_(pattern + (p + 1), patt_len - (p + 1), str + s, str_len - s)) { return true; } s += 1; } while (s != str_len); return false; } return false; } }
O0
cpp
nglog::tools::SafeFNMatch_(char const*, unsigned long, char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq $0x0, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0x4c0e5 movq -0x38(%rbp), %rax cmpq -0x28(%rbp), %rax jne 0x4c0e5 movb $0x1, -0x1(%rbp) jmp 0x4c207 movq -0x30(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0x4c0f8 movb $0x0, -0x1(%rbp) jmp 0x4c207 movq -0x38(%rbp), %rax cmpq -0x28(%rbp), %rax jne 0x4c137 movq -0x30(%rbp), %rcx addq $0x1, %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x39(%rbp) jne 0x4c12a movq -0x10(%rbp), %rax movq -0x30(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2a, %eax sete %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x4c207 movq -0x10(%rbp), %rax movq -0x30(%rbp), %rcx movsbl (%rax,%rcx), %eax movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rdx movsbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x4c164 movq -0x10(%rbp), %rax movq -0x30(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x3f, %eax jne 0x4c181 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x4c0c8 movq -0x10(%rbp), %rax movq -0x30(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2a, %eax jne 0x4c203 movq -0x30(%rbp), %rax addq $0x1, %rax cmpq -0x18(%rbp), %rax jne 0x4c1a6 movb $0x1, -0x1(%rbp) jmp 0x4c207 jmp 0x4c1a8 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rax addq $0x1, %rax addq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rax addq $0x1, %rax subq %rax, %rsi movq -0x20(%rbp), %rdx addq -0x38(%rbp), %rdx movq -0x28(%rbp), %rcx subq -0x38(%rbp), %rcx callq 0x4c0a0 testb $0x1, %al jne 0x4c1e1 jmp 0x4c1e7 movb $0x1, -0x1(%rbp) jmp 0x4c207 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax cmpq -0x28(%rbp), %rax jne 0x4c1a8 movb $0x0, -0x1(%rbp) jmp 0x4c207 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5nglog5tools12SafeFNMatch_EPKcmS2_m: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], 0 mov [rbp+var_38], 0 loc_4C0C8: mov rax, [rbp+var_30] cmp rax, [rbp+var_18] jnz short loc_4C0E5 mov rax, [rbp+var_38] cmp rax, [rbp+var_28] jnz short loc_4C0E5 mov [rbp+var_1], 1 jmp loc_4C207 loc_4C0E5: mov rax, [rbp+var_30] cmp rax, [rbp+var_18] jnz short loc_4C0F8 mov [rbp+var_1], 0 jmp loc_4C207 loc_4C0F8: mov rax, [rbp+var_38] cmp rax, [rbp+var_28] jnz short loc_4C137 mov rcx, [rbp+var_30] add rcx, 1 xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_39], al jnz short loc_4C12A mov rax, [rbp+var_10] mov rcx, [rbp+var_30] movsx eax, byte ptr [rax+rcx] cmp eax, 2Ah ; '*' setz al mov [rbp+var_39], al loc_4C12A: mov al, [rbp+var_39] and al, 1 mov [rbp+var_1], al jmp loc_4C207 loc_4C137: mov rax, [rbp+var_10] mov rcx, [rbp+var_30] movsx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_20] mov rdx, [rbp+var_38] movsx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_4C164 mov rax, [rbp+var_10] mov rcx, [rbp+var_30] movsx eax, byte ptr [rax+rcx] cmp eax, 3Fh ; '?' jnz short loc_4C181 loc_4C164: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp loc_4C0C8 loc_4C181: mov rax, [rbp+var_10] mov rcx, [rbp+var_30] movsx eax, byte ptr [rax+rcx] cmp eax, 2Ah ; '*' jnz short loc_4C203 mov rax, [rbp+var_30] add rax, 1 cmp rax, [rbp+var_18] jnz short loc_4C1A6 mov [rbp+var_1], 1 jmp short loc_4C207 loc_4C1A6: jmp short $+2 loc_4C1A8: mov rdi, [rbp+var_10] mov rax, [rbp+var_30] add rax, 1 add rdi, rax; this mov rsi, [rbp+var_18] mov rax, [rbp+var_30] add rax, 1 sub rsi, rax; char * mov rdx, [rbp+var_20] add rdx, [rbp+var_38]; unsigned __int64 mov rcx, [rbp+var_28] sub rcx, [rbp+var_38]; char * call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong) test al, 1 jnz short loc_4C1E1 jmp short loc_4C1E7 loc_4C1E1: mov [rbp+var_1], 1 jmp short loc_4C207 loc_4C1E7: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax mov rax, [rbp+var_38] cmp rax, [rbp+var_28] jnz short loc_4C1A8 mov [rbp+var_1], 0 jmp short loc_4C207 loc_4C203: mov [rbp+var_1], 0 loc_4C207: mov al, [rbp+var_1] and al, 1 add rsp, 40h pop rbp retn
char nglog::tools::SafeFNMatch_( nglog::tools *this, const char *a2, long long a3, const char *a4, unsigned long long a5) { bool v6; // [rsp+7h] [rbp-39h] const char *i; // [rsp+8h] [rbp-38h] const char *v8; // [rsp+10h] [rbp-30h] v8 = 0LL; for ( i = 0LL; ; ++i ) { if ( v8 == a2 && i == a4 ) return 1; if ( v8 == a2 ) return 0; if ( i == a4 ) { v6 = 0; if ( v8 + 1 == a2 ) return v8[(_QWORD)this] == 42; return v6; } if ( v8[(_QWORD)this] != i[a3] && v8[(_QWORD)this] != 63 ) break; ++v8; } if ( v8[(_QWORD)this] != 42 ) return 0; if ( v8 + 1 == a2 ) return 1; do { if ( (nglog::tools::SafeFNMatch_( (nglog::tools *)((char *)this + (_QWORD)(v8 + 1)), (const char *)(a2 - (v8 + 1)), (unsigned long long)&i[a3], (const char *)(a4 - i), a5) & 1) != 0 ) return 1; ++i; } while ( i != a4 ); return 0; }
SafeFNMatch_: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],0x0 MOV qword ptr [RBP + -0x38],0x0 LAB_0014c0c8: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0014c0e5 MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0014c0e5 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c207 LAB_0014c0e5: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0014c0f8 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014c207 LAB_0014c0f8: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0014c137 MOV RCX,qword ptr [RBP + -0x30] ADD RCX,0x1 XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x39],AL JNZ 0x0014c12a MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2a SETZ AL MOV byte ptr [RBP + -0x39],AL LAB_0014c12a: MOV AL,byte ptr [RBP + -0x39] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0014c207 LAB_0014c137: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x38] MOVSX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x0014c164 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3f JNZ 0x0014c181 LAB_0014c164: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x0014c0c8 LAB_0014c181: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2a JNZ 0x0014c203 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0014c1a6 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c207 LAB_0014c1a6: JMP 0x0014c1a8 LAB_0014c1a8: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 SUB RSI,RAX MOV RDX,qword ptr [RBP + -0x20] ADD RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] SUB RCX,qword ptr [RBP + -0x38] CALL 0x0014c0a0 TEST AL,0x1 JNZ 0x0014c1e1 JMP 0x0014c1e7 LAB_0014c1e1: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c207 LAB_0014c1e7: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0014c1a8 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014c207 LAB_0014c203: MOV byte ptr [RBP + -0x1],0x0 LAB_0014c207: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x40 POP RBP RET
/* nglog::tools::SafeFNMatch_(char const*, unsigned long, char const*, unsigned long) */ bool nglog::tools::SafeFNMatch_(char *param_1,ulong param_2,char *param_3,ulong param_4) { ulong uVar1; bool local_41; ulong local_40; ulong local_38; bool local_9; local_38 = 0; local_40 = 0; while( true ) { if ((local_38 == param_2) && (local_40 == param_4)) { return true; } if (local_38 == param_2) { return false; } if (local_40 == param_4) break; if ((param_1[local_38] != param_3[local_40]) && (param_1[local_38] != '?')) { if (param_1[local_38] == '*') { if (local_38 + 1 == param_2) { local_9 = true; } else { do { uVar1 = SafeFNMatch_(param_1 + local_38 + 1,param_2 - (local_38 + 1),param_3 + local_40, param_4 - local_40); if ((uVar1 & 1) != 0) { return true; } local_40 = local_40 + 1; } while (local_40 != param_4); local_9 = false; } } else { local_9 = false; } return local_9; } local_38 = local_38 + 1; local_40 = local_40 + 1; } local_41 = false; if (local_38 + 1 == param_2) { local_41 = param_1[local_38] == '*'; } return local_41; }
49,119
nglog::tools::SafeFNMatch_(char const*, unsigned long, char const*, unsigned long)
ng-log[P]ng-log/src/vlog_is_on.cc
NGLOG_NO_EXPORT bool SafeFNMatch_(const char* pattern, size_t patt_len, const char* str, size_t str_len) { size_t p = 0; size_t s = 0; while (true) { if (p == patt_len && s == str_len) return true; if (p == patt_len) return false; if (s == str_len) return p + 1 == patt_len && pattern[p] == '*'; if (pattern[p] == str[s] || pattern[p] == '?') { p += 1; s += 1; continue; } if (pattern[p] == '*') { if (p + 1 == patt_len) return true; do { if (SafeFNMatch_(pattern + (p + 1), patt_len - (p + 1), str + s, str_len - s)) { return true; } s += 1; } while (s != str_len); return false; } return false; } }
O1
cpp
nglog::tools::SafeFNMatch_(char const*, unsigned long, char const*, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testq %rcx, %rcx sete %al testq %rsi, %rsi sete %r8b je 0x21707 movq %rcx, %r14 movq %rdx, %rbx leaq -0x1(%rsi), %rcx leaq -0x1(%r14), %rdx xorl %r15d, %r15d testb $0x1, %al jne 0x2170c movb (%rdi,%r15), %al cmpb $0x3f, %al je 0x216ee cmpb (%rbx,%r15), %al jne 0x2171b cmpq %r15, %rcx sete %r8b cmpq %r15, %rdx leaq 0x1(%r15), %r9 sete %al movq %r9, %r15 cmpq %r9, %rsi jne 0x216dc andb %r8b, %al jmp 0x21762 cmpq %r15, %rcx jne 0x21760 cmpb $0x2a, (%rdi,%r15) sete %al jmp 0x21762 cmpb $0x2a, %al jne 0x21760 movb $0x1, %al cmpq %r15, %rcx je 0x21762 addq %r15, %rbx subq %r15, %r14 leaq (%rdi,%r15), %r12 incq %r12 notq %r15 addq %rsi, %r15 movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x216b4 testb %al, %al jne 0x21762 leaq -0x1(%r14), %rcx incq %rbx cmpq $0x1, %r14 movq %rcx, %r14 jne 0x21739 jmp 0x21762 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5nglog5tools12SafeFNMatch_EPKcmS2_m: push r15 push r14 push r12 push rbx push rax test rcx, rcx setz al test rsi, rsi setz r8b; unsigned __int64 jz short loc_21707 mov r14, rcx mov rbx, rdx lea rcx, [rsi-1] lea rdx, [r14-1] xor r15d, r15d loc_216DC: test al, 1 jnz short loc_2170C mov al, [rdi+r15] cmp al, 3Fh ; '?' jz short loc_216EE cmp al, [rbx+r15] jnz short loc_2171B loc_216EE: cmp rcx, r15 setz r8b cmp rdx, r15 lea r9, [r15+1] setz al mov r15, r9 cmp rsi, r9 jnz short loc_216DC loc_21707: and al, r8b jmp short loc_21762 loc_2170C: cmp rcx, r15 jnz short loc_21760 cmp byte ptr [rdi+r15], 2Ah ; '*' setz al jmp short loc_21762 loc_2171B: cmp al, 2Ah ; '*' jnz short loc_21760 mov al, 1 cmp rcx, r15 jz short loc_21762 add rbx, r15 sub r14, r15 lea r12, [rdi+r15] inc r12 not r15 add r15, rsi loc_21739: mov rdi, r12; this mov rsi, r15; char * mov rdx, rbx; unsigned __int64 mov rcx, r14; char * call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong) test al, al jnz short loc_21762 lea rcx, [r14-1] inc rbx cmp r14, 1 mov r14, rcx jnz short loc_21739 jmp short loc_21762 loc_21760: xor eax, eax loc_21762: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
char nglog::tools::SafeFNMatch_( nglog::tools *this, const char *a2, long long a3, const char *a4, unsigned long long a5) { bool v5; // al const char *v7; // rcx const char *v8; // r15 char v9; // al char result; // al unsigned long long v11; // rbx const char *v12; // r14 nglog::tools *v13; // r12 const char *v14; // r15 v5 = a4 == 0LL; LOBYTE(a5) = a2 == 0LL; if ( !a2 ) return a5 & v5; v7 = a2 - 1; v8 = 0LL; while ( 1 ) { if ( v5 ) { if ( v7 == v8 ) return v8[(_QWORD)this] == 42; return 0; } v9 = v8[(_QWORD)this]; if ( v9 != 63 && v9 != v8[a3] ) break; LOBYTE(a5) = v7 == v8; v5 = a4 - 1 == v8++; if ( a2 == v8 ) return a5 & v5; } if ( v9 != 42 ) return 0; result = 1; if ( v7 != v8 ) { v11 = (unsigned long long)&v8[a3]; v12 = (const char *)(a4 - v8); v13 = (nglog::tools *)&v8[(_QWORD)this + 1]; v14 = &a2[~(unsigned long long)v8]; do { result = nglog::tools::SafeFNMatch_(v13, v14, v11, v12, a5); if ( result ) break; ++v11; --v12; } while ( v12 ); } return result; }
SafeFNMatch_: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST RCX,RCX SETZ AL TEST RSI,RSI SETZ R8B JZ 0x00121707 MOV R14,RCX MOV RBX,RDX LEA RCX,[RSI + -0x1] LEA RDX,[R14 + -0x1] XOR R15D,R15D LAB_001216dc: TEST AL,0x1 JNZ 0x0012170c MOV AL,byte ptr [RDI + R15*0x1] CMP AL,0x3f JZ 0x001216ee CMP AL,byte ptr [RBX + R15*0x1] JNZ 0x0012171b LAB_001216ee: CMP RCX,R15 SETZ R8B CMP RDX,R15 LEA R9,[R15 + 0x1] SETZ AL MOV R15,R9 CMP RSI,R9 JNZ 0x001216dc LAB_00121707: AND AL,R8B JMP 0x00121762 LAB_0012170c: CMP RCX,R15 JNZ 0x00121760 CMP byte ptr [RDI + R15*0x1],0x2a SETZ AL JMP 0x00121762 LAB_0012171b: CMP AL,0x2a JNZ 0x00121760 MOV AL,0x1 CMP RCX,R15 JZ 0x00121762 ADD RBX,R15 SUB R14,R15 LEA R12,[RDI + R15*0x1] INC R12 NOT R15 ADD R15,RSI LAB_00121739: MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX MOV RCX,R14 CALL 0x001216b4 TEST AL,AL JNZ 0x00121762 LEA RCX,[R14 + -0x1] INC RBX CMP R14,0x1 MOV R14,RCX JNZ 0x00121739 JMP 0x00121762 LAB_00121760: XOR EAX,EAX LAB_00121762: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* nglog::tools::SafeFNMatch_(char const*, unsigned long, char const*, unsigned long) */ bool nglog::tools::SafeFNMatch_(char *param_1,ulong param_2,char *param_3,ulong param_4) { char cVar1; char *pcVar2; ulong uVar3; ulong uVar4; bool bVar5; bool bVar6; bVar5 = param_4 == 0; bVar6 = param_2 == 0; if (!bVar6) { uVar3 = param_2 - 1; uVar4 = 0; do { if (bVar5) { if (uVar3 != uVar4) { return false; } return param_1[uVar4] == '*'; } cVar1 = param_1[uVar4]; if ((cVar1 != '?') && (cVar1 != param_3[uVar4])) { if (cVar1 != '*') { return false; } if (uVar3 != uVar4) { pcVar2 = param_3 + uVar4; uVar3 = param_4 - uVar4; do { cVar1 = SafeFNMatch_(param_1 + uVar4 + 1,~uVar4 + param_2,pcVar2,uVar3); if (cVar1 != '\0') { return (bool)cVar1; } pcVar2 = pcVar2 + 1; bVar5 = uVar3 != 1; uVar3 = uVar3 - 1; } while (bVar5); return false; } return true; } bVar6 = uVar3 == uVar4; bVar5 = param_4 - 1 == uVar4; uVar4 = uVar4 + 1; } while (param_2 != uVar4); } return (bool)(bVar5 & bVar6); }
49,120
mi_cmp_dynamic_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_cmp_dynamic_record(register MI_INFO *info, register const uchar *record) { uint flag,reclength,b_type; my_off_t filepos; uchar *buffer; MI_BLOCK_INFO block_info; DBUG_ENTER("_mi_cmp_dynamic_record"); if (info->opt_flag & WRITE_CACHE_USED) { info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK); if (flush_io_cache(&info->rec_cache)) DBUG_RETURN(-1); } info->rec_cache.seek_not_done=1; /* If nobody have touched the database we don't have to test rec */ buffer=info->rec_buff; if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ if (info->s->base.blobs) { if (!(buffer=(uchar*) my_alloca(info->s->base.pack_reclength+ _mi_calc_total_blob_length(info,record)))) DBUG_RETURN(-1); } reclength=_mi_rec_pack(info,buffer,record); record= buffer; filepos=info->lastpos; flag=block_info.second_read=0; block_info.next_filepos=filepos; while (reclength > 0) { if ((b_type=_mi_get_block_info(&block_info,info->dfile, block_info.next_filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_CHANGED; goto err; } if (flag == 0) /* First block */ { flag=1; if (reclength != block_info.rec_len) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } } else if (reclength < block_info.data_len) { my_errno=HA_ERR_WRONG_IN_RECORD; goto err; } reclength-=block_info.data_len; if (_mi_cmp_buffer(info->dfile,record,block_info.filepos, block_info.data_len)) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } flag=1; record+=block_info.data_len; } } my_errno=0; err: if (buffer != info->rec_buff) my_afree((uchar*) buffer); DBUG_RETURN(my_errno); }
O3
c
mi_cmp_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20e8, %rsp # imm = 0x20E8 movq %rsi, %r14 movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x1c8(%rdi), %eax testb $0x10, %al je 0x7ab2c andb $-0xa, 0x1d1(%r12) leaq 0x220(%r12), %rdi movl $0x1, %esi callq 0x97479 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x7aeaa movl 0x1c8(%r12), %eax movl $0x1, 0x300(%r12) movq 0x120(%r12), %rbx xorl %r15d, %r15d testb $0x4, %al je 0x7ae89 movq (%r12), %rax cmpl $0x0, 0x188(%rax) je 0x7ab85 movq 0x148(%rax), %rbx movq %r12, %rdi movq %r14, %rsi callq 0x79028 addq %rax, %rbx xorl %edi, %edi movq %rbx, %rsi xorl %edx, %edx callq 0xa46f9 movq %rax, %rbx testq %rax, %rax je 0x7aecb movq %r12, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x786ee movl %eax, %r14d movq 0x170(%r12), %rax movl $0x0, -0x2038(%rbp) movq %rax, -0x2048(%rbp) testl %r14d, %r14d je 0x7ae89 movb $0x1, %r15b leaq -0x2088(%rbp), %rdi movq %rbx, %r13 movq %r12, -0x2098(%rbp) movq %rbx, -0x2090(%rbp) movl 0x1c0(%r12), %esi movq -0x2048(%rbp), %rdx callq 0x79a0f cmpl $0x4, %eax jae 0x7aed2 movl %r14d, %eax testb $0x1, %r15b je 0x7ac0f cmpq %rax, -0x2070(%rbp) jne 0x7aee6 movq -0x2068(%rbp), %rdx jmp 0x7ac1f movq -0x2068(%rbp), %rdx cmpq %rax, %rdx ja 0x7aede movl %r14d, -0x209c(%rbp) movl 0x1c0(%r12), %ebx movq -0x2050(%rbp), %r14 cmpl $0x2001, %edx # imm = 0x2001 movq %r13, -0x20b8(%rbp) movq %rdx, -0x20b0(%rbp) jb 0x7ad67 movl %r14d, %ecx andl $0xfff, %ecx # imm = 0xFFF movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movq %r13, %r15 movl %edx, %r13d movq %r15, -0x20c0(%rbp) movl %eax, %r12d leaq 0x311752(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq -0x2108(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7acf6 movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa4f3c movq %rax, %r15 testq %r15, %r15 movq -0x20c0(%rbp), %r15 jne 0x7ae75 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r12, %rdx callq 0x2a560 testl %eax, %eax jne 0x7ae75 addq %r12, %r14 addq %r12, %r15 subl %r12d, %r13d movl $0x2000, %eax # imm = 0x2000 cmpl $0x2000, %r13d # imm = 0x2000 ja 0x7ac65 jmp 0x7ad6d movq %rax, %rcx leaq 0x3116c8(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq %rcx, -0x20a8(%rbp) movq %rcx, %rdi movq %r12, %rsi leaq 0x64c94(%rip), %rdx # 0xdf9ab movl $0x67e, %ecx # imm = 0x67E callq *0x210(%rax) movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa4f3c movq %rax, %r15 testq %rax, %rax movl $0x0, %esi cmoveq %r12, %rsi leaq 0x311676(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq -0x20a8(%rbp), %rdi callq *0x218(%rax) jmp 0x7acaf movq %r13, %r15 movl %edx, %r13d movl %r13d, %r13d leaq 0x311651(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq -0x2108(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7ae0f movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %r14, %rcx callq 0xa4f3c movq %rax, %rbx testq %rbx, %rbx jne 0x7ae75 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r13, %rdx callq 0x2a560 testl %eax, %eax jne 0x7ae75 movq -0x20b8(%rbp), %r13 addq -0x2068(%rbp), %r13 xorl %r15d, %r15d movl -0x209c(%rbp), %r14d subl -0x20b0(%rbp), %r14d movq -0x2098(%rbp), %r12 movq -0x2090(%rbp), %rbx leaq -0x2088(%rbp), %rdi jne 0x7abd3 jmp 0x7ae89 movq %rax, %r12 leaq 0x3115af(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq %r12, %rdi movq %r13, %rsi leaq 0x64b82(%rip), %rdx # 0xdf9ab movl $0x686, %ecx # imm = 0x686 callq *0x210(%rax) movl $0x4, %r8d movl %ebx, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %r14, %rcx callq 0xa4f3c movq %rax, %rbx testq %rax, %rax movl $0x0, %esi cmoveq %r13, %rsi leaq 0x311564(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x7adb0 movl $0x7b, %r15d movq -0x2098(%rbp), %r12 movq -0x2090(%rbp), %rbx callq 0xa63fe movl %r15d, (%rax) cmpq 0x120(%r12), %rbx je 0x7aea3 movq %rbx, %rdi callq 0xa4926 callq 0xa63fe movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x7aeee addq $0x20e8, %rsp # imm = 0x20E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x7aeaa movl $0x7b, %r15d testb $0x14, %al jne 0x7ae89 jmp 0x7ae91 movl $0x7f, %r15d jmp 0x7ae89 movl $0x7b, %r15d jmp 0x7ae89 callq 0x2a240
_mi_cmp_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 20E8h mov r14, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov eax, [rdi+1C8h] test al, 10h jz short loc_7AB2C and byte ptr [r12+1D1h], 0F6h lea rdi, [r12+220h] mov esi, 1 call my_b_flush_io_cache mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz loc_7AEAA mov eax, [r12+1C8h] loc_7AB2C: mov dword ptr [r12+300h], 1 mov rbx, [r12+120h] xor r15d, r15d test al, 4 jz loc_7AE89 mov rax, [r12] cmp dword ptr [rax+188h], 0 jz short loc_7AB85 mov rbx, [rax+148h] mov rdi, r12 mov rsi, r14 call _mi_calc_total_blob_length add rbx, rax xor edi, edi mov rsi, rbx xor edx, edx call my_malloc mov rbx, rax test rax, rax jz loc_7AECB loc_7AB85: mov rdi, r12 mov rsi, rbx mov rdx, r14 call _mi_rec_pack mov r14d, eax mov rax, [r12+170h] mov [rbp+var_2038], 0 mov [rbp+var_2048], rax test r14d, r14d jz loc_7AE89 mov r15b, 1 lea rdi, [rbp+var_2088] mov r13, rbx mov [rbp+var_2098], r12 mov [rbp+var_2090], rbx loc_7ABD3: mov esi, [r12+1C0h] mov rdx, [rbp+var_2048] call _mi_get_block_info cmp eax, 4 jnb loc_7AED2 mov eax, r14d test r15b, 1 jz short loc_7AC0F cmp [rbp+var_2070], rax jnz loc_7AEE6 mov rdx, [rbp+var_2068] jmp short loc_7AC1F loc_7AC0F: mov rdx, [rbp+var_2068] cmp rdx, rax ja loc_7AEDE loc_7AC1F: mov [rbp+var_209C], r14d mov ebx, [r12+1C0h] mov r14, [rbp+var_2050] cmp edx, 2001h mov [rbp+var_20B8], r13 mov [rbp+var_20B0], rdx jb loc_7AD67 mov ecx, r14d and ecx, 0FFFh mov eax, 2000h sub eax, ecx mov r15, r13 mov r13d, edx loc_7AC65: mov [rbp+var_20C0], r15 mov r12d, eax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2108] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_7ACF6 mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, r14 call my_pread mov r15, rax loc_7ACAF: test r15, r15 mov r15, [rbp+var_20C0] jnz loc_7AE75 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r12 call _bcmp test eax, eax jnz loc_7AE75 add r14, r12 add r15, r12 sub r13d, r12d mov eax, 2000h cmp r13d, 2000h ja loc_7AC65 jmp short loc_7AD6D loc_7ACF6: mov rcx, rax lea rax, PSI_server mov rax, [rax] mov [rbp+var_20A8], rcx mov rdi, rcx mov rsi, r12 lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 67Eh call qword ptr [rax+210h] mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, r14 call my_pread mov r15, rax test rax, rax mov esi, 0 cmovz rsi, r12 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_20A8] call qword ptr [rax+218h] jmp loc_7ACAF loc_7AD67: mov r15, r13 mov r13d, edx loc_7AD6D: mov r13d, r13d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2108] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_7AE0F mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, r14 call my_pread mov rbx, rax loc_7ADB0: test rbx, rbx jnz loc_7AE75 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r13 call _bcmp test eax, eax jnz loc_7AE75 mov r13, [rbp+var_20B8] add r13, [rbp+var_2068] xor r15d, r15d mov r14d, [rbp+var_209C] sub r14d, dword ptr [rbp+var_20B0] mov r12, [rbp+var_2098] mov rbx, [rbp+var_2090] lea rdi, [rbp+var_2088] jnz loc_7ABD3 jmp short loc_7AE89 loc_7AE0F: mov r12, rax lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov rsi, r13 lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 686h call qword ptr [rax+210h] mov r8d, 4 mov edi, ebx lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, r14 call my_pread mov rbx, rax test rax, rax mov esi, 0 cmovz rsi, r13 lea rax, PSI_server mov rax, [rax] mov rdi, r12 call qword ptr [rax+218h] jmp loc_7ADB0 loc_7AE75: mov r15d, 7Bh ; '{' mov r12, [rbp+var_2098] mov rbx, [rbp+var_2090] loc_7AE89: call _my_thread_var mov [rax], r15d loc_7AE91: cmp rbx, [r12+120h] jz short loc_7AEA3 mov rdi, rbx call my_free loc_7AEA3: call _my_thread_var mov eax, [rax] loc_7AEAA: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_7AEEE add rsp, 20E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7AECB: mov eax, 0FFFFFFFFh jmp short loc_7AEAA loc_7AED2: mov r15d, 7Bh ; '{' test al, 14h jnz short loc_7AE89 jmp short loc_7AE91 loc_7AEDE: mov r15d, 7Fh jmp short loc_7AE89 loc_7AEE6: mov r15d, 7Bh ; '{' jmp short loc_7AE89 loc_7AEEE: call ___stack_chk_fail
long long mi_cmp_dynamic_record(unsigned long long a1, unsigned long long a2) { char *v2; // r14 long long v3; // r12 int v4; // eax int v5; // ecx long long result; // rax _BYTE *v7; // rbx int v8; // r15d long long v9; // rbx long long v10; // rax unsigned int v11; // r14d long long v12; // rax _BYTE *v13; // r13 unsigned int block_info; // eax unsigned long long v15; // rdx unsigned int v16; // ebx long long v17; // r14 unsigned int v18; // eax _BYTE *v19; // r15 unsigned int v20; // r13d unsigned long long v21; // r12 long long v22; // rax long long v23; // r15 bool v24; // zf _BYTE *v25; // r15 long long v26; // rax long long v27; // rbx _BYTE *v28; // r12 _BYTE v29[72]; // [rsp+8h] [rbp-2108h] BYREF _BYTE *v30; // [rsp+50h] [rbp-20C0h] _BYTE *v31; // [rsp+58h] [rbp-20B8h] unsigned long long v32; // [rsp+60h] [rbp-20B0h] _BYTE *v33; // [rsp+68h] [rbp-20A8h] unsigned int v34; // [rsp+74h] [rbp-209Ch] long long v35; // [rsp+78h] [rbp-2098h] _BYTE *v36; // [rsp+80h] [rbp-2090h] _BYTE v37[24]; // [rsp+88h] [rbp-2088h] BYREF long long v38; // [rsp+A0h] [rbp-2070h] unsigned long long v39; // [rsp+A8h] [rbp-2068h] long long v40; // [rsp+C0h] [rbp-2050h] long long v41; // [rsp+C8h] [rbp-2048h] int v42; // [rsp+D8h] [rbp-2038h] _BYTE v43[8192]; // [rsp+E0h] [rbp-2030h] BYREF unsigned long long v44; // [rsp+20E0h] [rbp-30h] v2 = (char *)a2; v3 = a1; v44 = __readfsqword(0x28u); v4 = *(_DWORD *)(a1 + 456); if ( (v4 & 0x10) != 0 ) { *(_BYTE *)(a1 + 465) &= 0xF6u; a1 += 544LL; a2 = 1LL; v5 = my_b_flush_io_cache(a1, 1LL); result = 0xFFFFFFFFLL; if ( v5 ) return result; v4 = *(_DWORD *)(v3 + 456); } *(_DWORD *)(v3 + 768) = 1; v7 = *(_BYTE **)(v3 + 288); v8 = 0; if ( (v4 & 4) == 0 ) goto LABEL_36; if ( *(_DWORD *)(*(_QWORD *)v3 + 392LL) ) { v9 = *(_QWORD *)(*(_QWORD *)v3 + 328LL); v10 = mi_calc_total_blob_length((_QWORD *)v3, (long long)v2); v7 = (_BYTE *)my_malloc(0LL, v10 + v9, 0LL); if ( !v7 ) return 0xFFFFFFFFLL; } a1 = v3; a2 = (unsigned long long)v7; v11 = mi_rec_pack(v3, v7, v2); v12 = *(_QWORD *)(v3 + 368); v42 = 0; v41 = v12; if ( v11 ) { LOBYTE(v8) = 1; a1 = (unsigned long long)v37; v13 = v7; v35 = v3; v36 = v7; while ( 1 ) { a2 = *(unsigned int *)(v3 + 448); block_info = mi_get_block_info((long long)v37, a2, v41); if ( block_info >= 4 ) break; if ( (v8 & 1) != 0 ) { if ( v38 != v11 ) { v8 = 123; goto LABEL_36; } v15 = v39; } else { v15 = v39; if ( v39 > v11 ) { v8 = 127; goto LABEL_36; } } v34 = v11; v16 = *(_DWORD *)(v3 + 448); v17 = v40; v31 = v13; v32 = v15; if ( (unsigned int)v15 >= 0x2001 ) { v18 = 0x2000 - (v40 & 0xFFF); v19 = v13; v20 = v15; while ( 1 ) { v30 = v19; v21 = v18; v22 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v29, v16, 6LL); if ( v22 ) { v33 = (_BYTE *)v22; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v22, v21, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 1662LL); v23 = my_pread(v16, v43, v21, v17, 4LL); a2 = 0LL; if ( !v23 ) a2 = v21; a1 = (unsigned long long)v33; ((void ( *)(_BYTE *, unsigned long long))PSI_server[67])(v33, a2); } else { a1 = v16; a2 = (unsigned long long)v43; v23 = my_pread(v16, v43, v21, v17, 4LL); } v24 = v23 == 0; v25 = v30; if ( !v24 ) break; a1 = (unsigned long long)v30; a2 = (unsigned long long)v43; if ( (unsigned int)bcmp(v30, v43, v21) ) break; v17 += v21; v19 = &v25[v21]; v20 -= v21; v18 = 0x2000; if ( v20 <= 0x2000 ) goto LABEL_26; } LABEL_35: v8 = 123; v3 = v35; v7 = v36; goto LABEL_36; } v19 = v13; v20 = v15; LABEL_26: v26 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v29, v16, 6LL); if ( v26 ) { v28 = (_BYTE *)v26; ((void ( *)(long long, _QWORD, const char *, long long))PSI_server[66])( v26, v20, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 1670LL); v27 = my_pread(v16, v43, v20, v17, 4LL); a2 = 0LL; if ( !v27 ) a2 = v20; a1 = (unsigned long long)v28; ((void ( *)(_BYTE *, unsigned long long))PSI_server[67])(v28, a2); } else { a1 = v16; a2 = (unsigned long long)v43; v27 = my_pread(v16, v43, v20, v17, 4LL); } if ( v27 ) goto LABEL_35; a1 = (unsigned long long)v19; a2 = (unsigned long long)v43; if ( (unsigned int)bcmp(v19, v43, v20) ) goto LABEL_35; v13 = &v31[v39]; v8 = 0; v11 = v34 - v32; v3 = v35; v7 = v36; a1 = (unsigned long long)v37; if ( v34 == (_DWORD)v32 ) goto LABEL_36; } v8 = 123; if ( (block_info & 0x14) != 0 ) goto LABEL_36; } else { LABEL_36: *(_DWORD *)my_thread_var(a1, (const char *)a2) = v8; } if ( v7 != *(_BYTE **)(v3 + 288) ) { a1 = (unsigned long long)v7; my_free(v7); } return *(unsigned int *)my_thread_var(a1, (const char *)a2); }
_mi_cmp_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20e8 MOV R14,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RDI + 0x1c8] TEST AL,0x10 JZ 0x0017ab2c AND byte ptr [R12 + 0x1d1],0xf6 LEA RDI,[R12 + 0x220] MOV ESI,0x1 CALL 0x00197479 MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x0017aeaa MOV EAX,dword ptr [R12 + 0x1c8] LAB_0017ab2c: MOV dword ptr [R12 + 0x300],0x1 MOV RBX,qword ptr [R12 + 0x120] XOR R15D,R15D TEST AL,0x4 JZ 0x0017ae89 MOV RAX,qword ptr [R12] CMP dword ptr [RAX + 0x188],0x0 JZ 0x0017ab85 MOV RBX,qword ptr [RAX + 0x148] MOV RDI,R12 MOV RSI,R14 CALL 0x00179028 ADD RBX,RAX XOR EDI,EDI MOV RSI,RBX XOR EDX,EDX CALL 0x001a46f9 MOV RBX,RAX TEST RAX,RAX JZ 0x0017aecb LAB_0017ab85: MOV RDI,R12 MOV RSI,RBX MOV RDX,R14 CALL 0x001786ee MOV R14D,EAX MOV RAX,qword ptr [R12 + 0x170] MOV dword ptr [RBP + -0x2038],0x0 MOV qword ptr [RBP + -0x2048],RAX TEST R14D,R14D JZ 0x0017ae89 MOV R15B,0x1 LEA RDI,[RBP + -0x2088] MOV R13,RBX MOV qword ptr [RBP + -0x2098],R12 MOV qword ptr [RBP + -0x2090],RBX LAB_0017abd3: MOV ESI,dword ptr [R12 + 0x1c0] MOV RDX,qword ptr [RBP + -0x2048] CALL 0x00179a0f CMP EAX,0x4 JNC 0x0017aed2 MOV EAX,R14D TEST R15B,0x1 JZ 0x0017ac0f CMP qword ptr [RBP + -0x2070],RAX JNZ 0x0017aee6 MOV RDX,qword ptr [RBP + -0x2068] JMP 0x0017ac1f LAB_0017ac0f: MOV RDX,qword ptr [RBP + -0x2068] CMP RDX,RAX JA 0x0017aede LAB_0017ac1f: MOV dword ptr [RBP + -0x209c],R14D MOV EBX,dword ptr [R12 + 0x1c0] MOV R14,qword ptr [RBP + -0x2050] CMP EDX,0x2001 MOV qword ptr [RBP + -0x20b8],R13 MOV qword ptr [RBP + -0x20b0],RDX JC 0x0017ad67 MOV ECX,R14D AND ECX,0xfff MOV EAX,0x2000 SUB EAX,ECX MOV R15,R13 MOV R13D,EDX LAB_0017ac65: MOV qword ptr [RBP + -0x20c0],R15 MOV R12D,EAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2108] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017acf6 MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,R14 CALL 0x001a4f3c MOV R15,RAX LAB_0017acaf: TEST R15,R15 MOV R15,qword ptr [RBP + -0x20c0] JNZ 0x0017ae75 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R12 CALL 0x0012a560 TEST EAX,EAX JNZ 0x0017ae75 ADD R14,R12 ADD R15,R12 SUB R13D,R12D MOV EAX,0x2000 CMP R13D,0x2000 JA 0x0017ac65 JMP 0x0017ad6d LAB_0017acf6: MOV RCX,RAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20a8],RCX MOV RDI,RCX MOV RSI,R12 LEA RDX,[0x1df9ab] MOV ECX,0x67e CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,R14 CALL 0x001a4f3c MOV R15,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R12 LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x20a8] CALL qword ptr [RAX + 0x218] JMP 0x0017acaf LAB_0017ad67: MOV R15,R13 MOV R13D,EDX LAB_0017ad6d: MOV R13D,R13D LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2108] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017ae0f MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,R14 CALL 0x001a4f3c MOV RBX,RAX LAB_0017adb0: TEST RBX,RBX JNZ 0x0017ae75 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R13 CALL 0x0012a560 TEST EAX,EAX JNZ 0x0017ae75 MOV R13,qword ptr [RBP + -0x20b8] ADD R13,qword ptr [RBP + -0x2068] XOR R15D,R15D MOV R14D,dword ptr [RBP + -0x209c] SUB R14D,dword ptr [RBP + -0x20b0] MOV R12,qword ptr [RBP + -0x2098] MOV RBX,qword ptr [RBP + -0x2090] LEA RDI,[RBP + -0x2088] JNZ 0x0017abd3 JMP 0x0017ae89 LAB_0017ae0f: MOV R12,RAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV RSI,R13 LEA RDX,[0x1df9ab] MOV ECX,0x686 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,EBX LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,R14 CALL 0x001a4f3c MOV RBX,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R13 LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x0017adb0 LAB_0017ae75: MOV R15D,0x7b MOV R12,qword ptr [RBP + -0x2098] MOV RBX,qword ptr [RBP + -0x2090] LAB_0017ae89: CALL 0x001a63fe MOV dword ptr [RAX],R15D LAB_0017ae91: CMP RBX,qword ptr [R12 + 0x120] JZ 0x0017aea3 MOV RDI,RBX CALL 0x001a4926 LAB_0017aea3: CALL 0x001a63fe MOV EAX,dword ptr [RAX] LAB_0017aeaa: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0017aeee ADD RSP,0x20e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017aecb: MOV EAX,0xffffffff JMP 0x0017aeaa LAB_0017aed2: MOV R15D,0x7b TEST AL,0x14 JNZ 0x0017ae89 JMP 0x0017ae91 LAB_0017aede: MOV R15D,0x7f JMP 0x0017ae89 LAB_0017aee6: MOV R15D,0x7b JMP 0x0017ae89 LAB_0017aeee: CALL 0x0012a240
int4 _mi_cmp_dynamic_record(long *param_1,int8 param_2) { int iVar1; uint uVar2; uint uVar3; long lVar4; void *pvVar5; int4 *puVar6; void *pvVar7; ulong uVar8; ulong uVar9; ulong uVar10; long lVar11; bool bVar12; int4 uVar13; long in_FS_OFFSET; int1 local_2110 [72]; void *local_20c8; void *local_20c0; ulong local_20b8; long local_20b0; uint local_20a4; long *local_20a0; void *local_2098; int1 local_2090 [24]; ulong local_2078; ulong local_2070; long local_2058; long local_2050; int4 local_2040; int1 local_2038 [8192]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = *(uint *)(param_1 + 0x39); if ((uVar2 & 0x10) != 0) { *(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xf6; iVar1 = my_b_flush_io_cache(param_1 + 0x44,1); uVar13 = 0xffffffff; if (iVar1 != 0) goto LAB_0017aeaa; uVar2 = *(uint *)(param_1 + 0x39); } *(int4 *)(param_1 + 0x60) = 1; pvVar5 = (void *)param_1[0x24]; uVar13 = 0; pvVar7 = pvVar5; if ((uVar2 & 4) != 0) { if (*(int *)(*param_1 + 0x188) != 0) { lVar11 = *(long *)(*param_1 + 0x148); lVar4 = _mi_calc_total_blob_length(param_1,param_2); pvVar5 = (void *)my_malloc(0,lVar11 + lVar4,0); if (pvVar5 == (void *)0x0) { uVar13 = 0xffffffff; goto LAB_0017aeaa; } } uVar2 = _mi_rec_pack(param_1,pvVar5,param_2); local_2050 = param_1[0x2e]; local_2040 = 0; pvVar7 = pvVar5; if (uVar2 != 0) { bVar12 = true; local_20a0 = param_1; local_2098 = pvVar5; do { pvVar7 = local_2098; param_1 = local_20a0; uVar3 = _mi_get_block_info(local_2090,(int)local_20a0[0x38],local_2050); if (3 < uVar3) { uVar13 = 0x7b; if ((uVar3 & 0x14) == 0) goto LAB_0017ae91; break; } if (bVar12) { if (local_2078 != uVar2) { uVar13 = 0x7b; break; } } else if (uVar2 < local_2070) { uVar13 = 0x7f; break; } uVar13 = (int4)param_1[0x38]; uVar3 = (uint)local_2070; local_20b8 = local_2070; lVar11 = local_2058; local_20c0 = pvVar5; local_20a4 = uVar2; if (0x2000 < uVar3) { uVar2 = 0x2000 - ((uint)local_2058 & 0xfff); uVar10 = local_2070 & 0xffffffff; do { uVar9 = (ulong)uVar2; local_20c8 = pvVar5; lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6); if (lVar4 == 0) { lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4); } else { local_20b0 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,uVar9, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x67e ); lVar4 = my_pread(uVar13,local_2038,uVar9,lVar11,4); uVar8 = 0; if (lVar4 == 0) { uVar8 = uVar9; } (**(code **)(PSI_server + 0x218))(local_20b0,uVar8); } pvVar5 = local_20c8; if ((lVar4 != 0) || (iVar1 = bcmp(local_20c8,local_2038,uVar9), iVar1 != 0)) goto LAB_0017ae75; lVar11 = lVar11 + uVar9; pvVar5 = (void *)((long)pvVar5 + uVar9); uVar3 = (int)uVar10 - uVar2; uVar10 = (ulong)uVar3; uVar2 = 0x2000; } while (0x2000 < uVar3); } uVar10 = (ulong)uVar3; lVar4 = (**(code **)(PSI_server + 0x158))(local_2110,uVar13,6); if (lVar4 == 0) { lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4); } else { (**(code **)(PSI_server + 0x210)) (lVar4,uVar10, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x686); lVar11 = my_pread(uVar13,local_2038,uVar10,lVar11,4); uVar9 = 0; if (lVar11 == 0) { uVar9 = uVar10; } (**(code **)(PSI_server + 0x218))(lVar4,uVar9); } if ((lVar11 != 0) || (iVar1 = bcmp(pvVar5,local_2038,uVar10), iVar1 != 0)) { LAB_0017ae75: uVar13 = 0x7b; pvVar7 = local_2098; param_1 = local_20a0; break; } pvVar5 = (void *)((long)local_20c0 + local_2070); bVar12 = false; uVar13 = 0; uVar2 = local_20a4 - (int)local_20b8; pvVar7 = local_2098; param_1 = local_20a0; } while (uVar2 != 0); } } puVar6 = (int4 *)_my_thread_var(); *puVar6 = uVar13; LAB_0017ae91: if (pvVar7 != (void *)param_1[0x24]) { my_free(pvVar7); } puVar6 = (int4 *)_my_thread_var(); uVar13 = *puVar6; LAB_0017aeaa: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar13; }
49,121
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
monkey531[P]llama/common/common.cpp
bool parse_cpu_mask(const std::string & mask, bool (&boolmask)[GGML_MAX_N_THREADS]) { // Discard potential 0x prefix size_t start_i = 0; if (mask.length() >= 2 && mask.substr(0, 2) == "0x") { start_i = 2; } size_t num_digits = mask.length() - start_i; if (num_digits > 128) num_digits = 128; size_t end_i = num_digits + start_i; for (size_t i = start_i, n = (num_digits*4 - 1); i < end_i; i++, n-=4) { char c = mask.at(i); int8_t id = c; if ((c >= '0' && c <= '9')) { id -= '0'; } else if (c >= 'a' && c <= 'f') { id -= 'a' - 10; } else if (c >= 'A' && c <= 'F') { id -= 'A' - 10; } else { LOG_ERR("Invalid hex character '%c' at position %d\n", c, int32_t(i)); return false; } boolmask[ n ] = boolmask[ n ] || ((id & 8) != 0); boolmask[n - 1] = boolmask[n - 1] || ((id & 4) != 0); boolmask[n - 2] = boolmask[n - 2] || ((id & 2) != 0); boolmask[n - 3] = boolmask[n - 3] || ((id & 1) != 0); } return true; }
O0
cpp
parse_cpu_mask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]): subq $0x98, %rsp movq %rdi, 0x88(%rsp) movq %rsi, 0x80(%rsp) movq $0x0, 0x78(%rsp) movq 0x88(%rsp), %rdi callq 0x5a9f0 movq %rax, %rcx movb $0x0, 0x57(%rsp) xorl %eax, %eax cmpq $0x2, %rcx movb %al, 0x1d(%rsp) jb 0xeb507 movq 0x88(%rsp), %rsi xorl %eax, %eax movl %eax, %edx leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x2, %ecx callq 0x5b100 movq 0x10(%rsp), %rdi movb $0x1, 0x57(%rsp) leaq 0x12dd8b(%rip), %rsi # 0x21927d callq 0x8b980 movb %al, 0x1c(%rsp) jmp 0xeb4fd movb 0x1c(%rsp), %al movb %al, 0x1d(%rsp) jmp 0xeb507 movb 0x1d(%rsp), %al movb %al, 0xf(%rsp) testb $0x1, 0x57(%rsp) jne 0xeb518 jmp 0xeb522 leaq 0x58(%rsp), %rdi callq 0x5b528 movb 0xf(%rsp), %al testb $0x1, %al jne 0xeb52c jmp 0xeb55d movq $0x2, 0x78(%rsp) jmp 0xeb55d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) testb $0x1, 0x57(%rsp) jne 0xeb54e jmp 0xeb558 leaq 0x58(%rsp), %rdi callq 0x5b528 jmp 0xeb7f0 movq 0x88(%rsp), %rdi callq 0x5a9f0 subq 0x78(%rsp), %rax movq %rax, 0x38(%rsp) cmpq $0x80, 0x38(%rsp) jbe 0xeb588 movq $0x80, 0x38(%rsp) movq 0x38(%rsp), %rax addq 0x78(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rax shlq $0x2, %rax subq $0x1, %rax movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rax cmpq 0x30(%rsp), %rax jae 0xeb7d7 movq 0x88(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x5ade0 movb (%rax), %al movb %al, 0x1f(%rsp) movb 0x1f(%rsp), %al movb %al, 0x1e(%rsp) movsbl 0x1f(%rsp), %eax cmpl $0x30, %eax jl 0xeb608 movsbl 0x1f(%rsp), %eax cmpl $0x39, %eax jg 0xeb608 movsbl 0x1e(%rsp), %eax subl $0x30, %eax movb %al, 0x1e(%rsp) jmp 0xeb696 movsbl 0x1f(%rsp), %eax cmpl $0x61, %eax jl 0xeb62a movsbl 0x1f(%rsp), %eax cmpl $0x66, %eax jg 0xeb62a movsbl 0x1e(%rsp), %eax subl $0x57, %eax movb %al, 0x1e(%rsp) jmp 0xeb694 movsbl 0x1f(%rsp), %eax cmpl $0x41, %eax jl 0xeb64c movsbl 0x1f(%rsp), %eax cmpl $0x46, %eax jg 0xeb64c movsbl 0x1e(%rsp), %eax subl $0x37, %eax movb %al, 0x1e(%rsp) jmp 0xeb692 jmp 0xeb64e xorl %eax, %eax leaq 0x1b7f91(%rip), %rcx # 0x2a35e8 cmpl (%rcx), %eax jg 0xeb683 callq 0x1be200 movq %rax, %rdi movsbl 0x1f(%rsp), %ecx movq 0x28(%rsp), %rax movl %eax, %r8d movl $0x4, %esi leaq 0x12401a(%rip), %rdx # 0x20f696 movb $0x0, %al callq 0x1be2f0 jmp 0xeb685 movb $0x0, 0x97(%rsp) jmp 0xeb7df jmp 0xeb694 jmp 0xeb696 movq 0x80(%rsp), %rcx movq 0x20(%rsp), %rdx movb $0x1, %al testb $0x1, (%rcx,%rdx) movb %al, 0xe(%rsp) jne 0xeb6c1 movsbl 0x1e(%rsp), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, 0xe(%rsp) movb 0xe(%rsp), %dl movq 0x80(%rsp), %rax movq 0x20(%rsp), %rcx andb $0x1, %dl movb %dl, (%rax,%rcx) movq 0x80(%rsp), %rcx movq 0x20(%rsp), %rdx subq $0x1, %rdx movb $0x1, %al testb $0x1, (%rcx,%rdx) movb %al, 0xd(%rsp) jne 0xeb707 movsbl 0x1e(%rsp), %eax andl $0x4, %eax cmpl $0x0, %eax setne %al movb %al, 0xd(%rsp) movb 0xd(%rsp), %dl movq 0x80(%rsp), %rax movq 0x20(%rsp), %rcx subq $0x1, %rcx andb $0x1, %dl movb %dl, (%rax,%rcx) movq 0x80(%rsp), %rcx movq 0x20(%rsp), %rdx subq $0x2, %rdx movb $0x1, %al testb $0x1, (%rcx,%rdx) movb %al, 0xc(%rsp) jne 0xeb751 movsbl 0x1e(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax setne %al movb %al, 0xc(%rsp) movb 0xc(%rsp), %dl movq 0x80(%rsp), %rax movq 0x20(%rsp), %rcx subq $0x2, %rcx andb $0x1, %dl movb %dl, (%rax,%rcx) movq 0x80(%rsp), %rcx movq 0x20(%rsp), %rdx subq $0x3, %rdx movb $0x1, %al testb $0x1, (%rcx,%rdx) movb %al, 0xb(%rsp) jne 0xeb79b movsbl 0x1e(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax setne %al movb %al, 0xb(%rsp) movb 0xb(%rsp), %dl movq 0x80(%rsp), %rax movq 0x20(%rsp), %rcx subq $0x3, %rcx andb $0x1, %dl movb %dl, (%rax,%rcx) movq 0x28(%rsp), %rax addq $0x1, %rax movq %rax, 0x28(%rsp) movq 0x20(%rsp), %rax subq $0x4, %rax movq %rax, 0x20(%rsp) jmp 0xeb5b3 movb $0x1, 0x97(%rsp) movb 0x97(%rsp), %al andb $0x1, %al addq $0x98, %rsp retq movq 0x48(%rsp), %rdi callq 0x5aba0 nopw (%rax,%rax)
_Z14parse_cpu_maskRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b: sub rsp, 98h mov [rsp+98h+var_10], rdi mov [rsp+98h+var_18], rsi mov [rsp+98h+var_20], 0 mov rdi, [rsp+98h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rcx, rax mov [rsp+98h+var_41], 0 xor eax, eax cmp rcx, 2 mov [rsp+98h+var_7B], al jb short loc_EB507 mov rsi, [rsp+98h+var_10] xor eax, eax mov edx, eax lea rdi, [rsp+98h+var_40] mov [rsp+98h+var_88], rdi mov ecx, 2 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+98h+var_88] mov [rsp+98h+var_41], 1 lea rsi, aInvalidByte0x+0Eh; "0x" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rsp+98h+var_7C], al jmp short $+2 loc_EB4FD: mov al, [rsp+98h+var_7C] mov [rsp+98h+var_7B], al jmp short $+2 loc_EB507: mov al, [rsp+98h+var_7B] mov [rsp+98h+var_89], al test [rsp+98h+var_41], 1 jnz short loc_EB518 jmp short loc_EB522 loc_EB518: lea rdi, [rsp+98h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EB522: mov al, [rsp+98h+var_89] test al, 1 jnz short loc_EB52C jmp short loc_EB55D loc_EB52C: mov [rsp+98h+var_20], 2 jmp short loc_EB55D mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax test [rsp+arg_4F], 1 jnz short loc_EB54E jmp short loc_EB558 loc_EB54E: lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_EB558: jmp loc_EB7F0 loc_EB55D: mov rdi, [rsp+98h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) sub rax, [rsp+98h+var_20] mov [rsp+98h+var_60], rax cmp [rsp+98h+var_60], 80h jbe short loc_EB588 mov [rsp+98h+var_60], 80h loc_EB588: mov rax, [rsp+98h+var_60] add rax, [rsp+98h+var_20] mov [rsp+98h+var_68], rax mov rax, [rsp+98h+var_20] mov [rsp+98h+var_70], rax mov rax, [rsp+98h+var_60] shl rax, 2 sub rax, 1 mov [rsp+98h+var_78], rax loc_EB5B3: mov rax, [rsp+98h+var_70] cmp rax, [rsp+98h+var_68] jnb loc_EB7D7 mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm; std::string::at(ulong) mov al, [rax] mov [rsp+98h+var_79], al mov al, [rsp+98h+var_79] mov [rsp+98h+var_7A], al movsx eax, [rsp+98h+var_79] cmp eax, 30h ; '0' jl short loc_EB608 movsx eax, [rsp+98h+var_79] cmp eax, 39h ; '9' jg short loc_EB608 movsx eax, [rsp+98h+var_7A] sub eax, 30h ; '0' mov [rsp+98h+var_7A], al jmp loc_EB696 loc_EB608: movsx eax, [rsp+98h+var_79] cmp eax, 61h ; 'a' jl short loc_EB62A movsx eax, [rsp+98h+var_79] cmp eax, 66h ; 'f' jg short loc_EB62A movsx eax, [rsp+98h+var_7A] sub eax, 57h ; 'W' mov [rsp+98h+var_7A], al jmp short loc_EB694 loc_EB62A: movsx eax, [rsp+98h+var_79] cmp eax, 41h ; 'A' jl short loc_EB64C movsx eax, [rsp+98h+var_79] cmp eax, 46h ; 'F' jg short loc_EB64C movsx eax, [rsp+98h+var_7A] sub eax, 37h ; '7' mov [rsp+98h+var_7A], al jmp short loc_EB692 loc_EB64C: jmp short $+2 loc_EB64E: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EB683 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax movsx ecx, [rsp+98h+var_79] mov rax, [rsp+98h+var_70] mov r8d, eax mov esi, 4 lea rdx, aInvalidHexChar; "Invalid hex character '%c' at position "... mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EB683: jmp short $+2 loc_EB685: mov [rsp+98h+var_1], 0 jmp loc_EB7DF loc_EB692: jmp short $+2 loc_EB694: jmp short $+2 loc_EB696: mov rcx, [rsp+98h+var_18] mov rdx, [rsp+98h+var_78] mov al, 1 test byte ptr [rcx+rdx], 1 mov [rsp+98h+var_8A], al jnz short loc_EB6C1 movsx eax, [rsp+98h+var_7A] and eax, 8 cmp eax, 0 setnz al mov [rsp+98h+var_8A], al loc_EB6C1: mov dl, [rsp+98h+var_8A] mov rax, [rsp+98h+var_18] mov rcx, [rsp+98h+var_78] and dl, 1 mov [rax+rcx], dl mov rcx, [rsp+98h+var_18] mov rdx, [rsp+98h+var_78] sub rdx, 1 mov al, 1 test byte ptr [rcx+rdx], 1 mov [rsp+98h+var_8B], al jnz short loc_EB707 movsx eax, [rsp+98h+var_7A] and eax, 4 cmp eax, 0 setnz al mov [rsp+98h+var_8B], al loc_EB707: mov dl, [rsp+98h+var_8B] mov rax, [rsp+98h+var_18] mov rcx, [rsp+98h+var_78] sub rcx, 1 and dl, 1 mov [rax+rcx], dl mov rcx, [rsp+98h+var_18] mov rdx, [rsp+98h+var_78] sub rdx, 2 mov al, 1 test byte ptr [rcx+rdx], 1 mov [rsp+98h+var_8C], al jnz short loc_EB751 movsx eax, [rsp+98h+var_7A] and eax, 2 cmp eax, 0 setnz al mov [rsp+98h+var_8C], al loc_EB751: mov dl, [rsp+98h+var_8C] mov rax, [rsp+98h+var_18] mov rcx, [rsp+98h+var_78] sub rcx, 2 and dl, 1 mov [rax+rcx], dl mov rcx, [rsp+98h+var_18] mov rdx, [rsp+98h+var_78] sub rdx, 3 mov al, 1 test byte ptr [rcx+rdx], 1 mov [rsp+98h+var_8D], al jnz short loc_EB79B movsx eax, [rsp+98h+var_7A] and eax, 1 cmp eax, 0 setnz al mov [rsp+98h+var_8D], al loc_EB79B: mov dl, [rsp+98h+var_8D] mov rax, [rsp+98h+var_18] mov rcx, [rsp+98h+var_78] sub rcx, 3 and dl, 1 mov [rax+rcx], dl mov rax, [rsp+98h+var_70] add rax, 1 mov [rsp+98h+var_70], rax mov rax, [rsp+98h+var_78] sub rax, 4 mov [rsp+98h+var_78], rax jmp loc_EB5B3 loc_EB7D7: mov [rsp+98h+var_1], 1 loc_EB7DF: mov al, [rsp+98h+var_1] and al, 1 add rsp, 98h retn loc_EB7F0: mov rdi, [rsp+arg_40] call __Unwind_Resume
char parse_cpu_mask(long long a1, long long a2) { long long v2; // rax int v3; // eax int v4; // r9d bool v6; // [rsp+Bh] [rbp-8Dh] bool v7; // [rsp+Ch] [rbp-8Ch] bool v8; // [rsp+Dh] [rbp-8Bh] bool v9; // [rsp+Eh] [rbp-8Ah] bool v10; // [rsp+1Dh] [rbp-7Bh] char v11; // [rsp+1Eh] [rbp-7Ah] char v12; // [rsp+1Fh] [rbp-79h] long long i; // [rsp+20h] [rbp-78h] unsigned long long v14; // [rsp+28h] [rbp-70h] unsigned long long v15; // [rsp+30h] [rbp-68h] long long v16; // [rsp+38h] [rbp-60h] char v17; // [rsp+57h] [rbp-41h] _BYTE v18[32]; // [rsp+58h] [rbp-40h] BYREF long long v19; // [rsp+78h] [rbp-20h] long long v20; // [rsp+80h] [rbp-18h] long long v21; // [rsp+88h] [rbp-10h] v21 = a1; v20 = a2; v19 = 0LL; v17 = 0; v10 = 0; if ( (unsigned long long)std::string::length(a1) >= 2 ) { std::string::substr(v18, v21, 0LL, 2LL); v17 = 1; v10 = std::operator==<char>((long long)v18, (long long)"0x"); } if ( (v17 & 1) != 0 ) std::string::~string(v18); if ( v10 ) v19 = 2LL; v2 = std::string::length(v21); v16 = v2 - v19; if ( (unsigned long long)(v2 - v19) > 0x80 ) v16 = 128LL; v15 = v19 + v16; v14 = v19; for ( i = 4 * v16 - 1; ; i -= 4LL ) { if ( v14 >= v15 ) return 1; v12 = *(_BYTE *)std::string::at(v21, v14); if ( v12 >= 48 && v12 <= 57 ) { v11 = v12 - 48; goto LABEL_23; } if ( v12 >= 97 && v12 <= 102 ) { v11 = v12 - 87; goto LABEL_23; } if ( v12 < 65 || v12 > 70 ) break; v11 = v12 - 55; LABEL_23: v9 = 1; if ( (*(_BYTE *)(v20 + i) & 1) == 0 ) v9 = (v11 & 8) != 0; *(_BYTE *)(v20 + i) = v9; v8 = 1; if ( (*(_BYTE *)(v20 + i - 1) & 1) == 0 ) v8 = (v11 & 4) != 0; *(_BYTE *)(v20 + i - 1) = v8; v7 = 1; if ( (*(_BYTE *)(v20 + i - 2) & 1) == 0 ) v7 = (v11 & 2) != 0; *(_BYTE *)(v20 + i - 2) = v7; v6 = 1; if ( (*(_BYTE *)(v20 + i - 3) & 1) == 0 ) v6 = (v11 & 1) != 0; *(_BYTE *)(v20 + i - 3) = v6; ++v14; } if ( common_log_verbosity_thold >= 0 ) { v3 = common_log_main(); common_log_add(v3, 4, (unsigned int)"Invalid hex character '%c' at position %d\n", v12, v14, v4); } return 0; }
parse_cpu_mask: SUB RSP,0x98 MOV qword ptr [RSP + 0x88],RDI MOV qword ptr [RSP + 0x80],RSI MOV qword ptr [RSP + 0x78],0x0 MOV RDI,qword ptr [RSP + 0x88] CALL 0x0015a9f0 MOV RCX,RAX MOV byte ptr [RSP + 0x57],0x0 XOR EAX,EAX CMP RCX,0x2 MOV byte ptr [RSP + 0x1d],AL JC 0x001eb507 MOV RSI,qword ptr [RSP + 0x88] XOR EAX,EAX MOV EDX,EAX LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI MOV ECX,0x2 CALL 0x0015b100 MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x57],0x1 LAB_001eb4eb: LEA RSI,[0x31927d] CALL 0x0018b980 LAB_001eb4f7: MOV byte ptr [RSP + 0x1c],AL JMP 0x001eb4fd LAB_001eb4fd: MOV AL,byte ptr [RSP + 0x1c] MOV byte ptr [RSP + 0x1d],AL JMP 0x001eb507 LAB_001eb507: MOV AL,byte ptr [RSP + 0x1d] MOV byte ptr [RSP + 0xf],AL TEST byte ptr [RSP + 0x57],0x1 JNZ 0x001eb518 JMP 0x001eb522 LAB_001eb518: LEA RDI,[RSP + 0x58] CALL 0x0015b528 LAB_001eb522: MOV AL,byte ptr [RSP + 0xf] TEST AL,0x1 JNZ 0x001eb52c JMP 0x001eb55d LAB_001eb52c: MOV qword ptr [RSP + 0x78],0x2 JMP 0x001eb55d LAB_001eb55d: MOV RDI,qword ptr [RSP + 0x88] CALL 0x0015a9f0 SUB RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x80 JBE 0x001eb588 MOV qword ptr [RSP + 0x38],0x80 LAB_001eb588: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x38] SHL RAX,0x2 SUB RAX,0x1 MOV qword ptr [RSP + 0x20],RAX LAB_001eb5b3: MOV RAX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RSP + 0x30] JNC 0x001eb7d7 MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0015ade0 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x1f],AL MOV AL,byte ptr [RSP + 0x1f] MOV byte ptr [RSP + 0x1e],AL MOVSX EAX,byte ptr [RSP + 0x1f] CMP EAX,0x30 JL 0x001eb608 MOVSX EAX,byte ptr [RSP + 0x1f] CMP EAX,0x39 JG 0x001eb608 MOVSX EAX,byte ptr [RSP + 0x1e] SUB EAX,0x30 MOV byte ptr [RSP + 0x1e],AL JMP 0x001eb696 LAB_001eb608: MOVSX EAX,byte ptr [RSP + 0x1f] CMP EAX,0x61 JL 0x001eb62a MOVSX EAX,byte ptr [RSP + 0x1f] CMP EAX,0x66 JG 0x001eb62a MOVSX EAX,byte ptr [RSP + 0x1e] SUB EAX,0x57 MOV byte ptr [RSP + 0x1e],AL JMP 0x001eb694 LAB_001eb62a: MOVSX EAX,byte ptr [RSP + 0x1f] CMP EAX,0x41 JL 0x001eb64c MOVSX EAX,byte ptr [RSP + 0x1f] CMP EAX,0x46 JG 0x001eb64c MOVSX EAX,byte ptr [RSP + 0x1e] SUB EAX,0x37 MOV byte ptr [RSP + 0x1e],AL JMP 0x001eb692 LAB_001eb64c: JMP 0x001eb64e LAB_001eb64e: XOR EAX,EAX LEA RCX,[0x3a35e8] CMP EAX,dword ptr [RCX] JG 0x001eb683 CALL 0x002be200 MOV RDI,RAX MOVSX ECX,byte ptr [RSP + 0x1f] MOV RAX,qword ptr [RSP + 0x28] MOV R8D,EAX MOV ESI,0x4 LEA RDX,[0x30f696] MOV AL,0x0 CALL 0x002be2f0 LAB_001eb683: JMP 0x001eb685 LAB_001eb685: MOV byte ptr [RSP + 0x97],0x0 JMP 0x001eb7df LAB_001eb692: JMP 0x001eb694 LAB_001eb694: JMP 0x001eb696 LAB_001eb696: MOV RCX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x20] MOV AL,0x1 TEST byte ptr [RCX + RDX*0x1],0x1 MOV byte ptr [RSP + 0xe],AL JNZ 0x001eb6c1 MOVSX EAX,byte ptr [RSP + 0x1e] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RSP + 0xe],AL LAB_001eb6c1: MOV DL,byte ptr [RSP + 0xe] MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x20] AND DL,0x1 MOV byte ptr [RAX + RCX*0x1],DL MOV RCX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x20] SUB RDX,0x1 MOV AL,0x1 TEST byte ptr [RCX + RDX*0x1],0x1 MOV byte ptr [RSP + 0xd],AL JNZ 0x001eb707 MOVSX EAX,byte ptr [RSP + 0x1e] AND EAX,0x4 CMP EAX,0x0 SETNZ AL MOV byte ptr [RSP + 0xd],AL LAB_001eb707: MOV DL,byte ptr [RSP + 0xd] MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x20] SUB RCX,0x1 AND DL,0x1 MOV byte ptr [RAX + RCX*0x1],DL MOV RCX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x20] SUB RDX,0x2 MOV AL,0x1 TEST byte ptr [RCX + RDX*0x1],0x1 MOV byte ptr [RSP + 0xc],AL JNZ 0x001eb751 MOVSX EAX,byte ptr [RSP + 0x1e] AND EAX,0x2 CMP EAX,0x0 SETNZ AL MOV byte ptr [RSP + 0xc],AL LAB_001eb751: MOV DL,byte ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x20] SUB RCX,0x2 AND DL,0x1 MOV byte ptr [RAX + RCX*0x1],DL MOV RCX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x20] SUB RDX,0x3 MOV AL,0x1 TEST byte ptr [RCX + RDX*0x1],0x1 MOV byte ptr [RSP + 0xb],AL JNZ 0x001eb79b MOVSX EAX,byte ptr [RSP + 0x1e] AND EAX,0x1 CMP EAX,0x0 SETNZ AL MOV byte ptr [RSP + 0xb],AL LAB_001eb79b: MOV DL,byte ptr [RSP + 0xb] MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x20] SUB RCX,0x3 AND DL,0x1 MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x1 MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x20] SUB RAX,0x4 MOV qword ptr [RSP + 0x20],RAX JMP 0x001eb5b3 LAB_001eb7d7: MOV byte ptr [RSP + 0x97],0x1 LAB_001eb7df: MOV AL,byte ptr [RSP + 0x97] AND AL,0x1 ADD RSP,0x98 RET
/* parse_cpu_mask(std::__cxx11::string const&, bool (&) [512]) */ int1 parse_cpu_mask(string *param_1,bool *param_2) { char cVar1; ulong uVar2; long lVar3; char *pcVar4; int8 uVar5; bool local_8d; bool local_8c; bool local_8b; bool local_8a; bool local_7b; byte local_7a; long local_78; ulong local_70; ulong local_60; string local_40 [32]; ulong local_20; bool *local_18; string *local_10; local_20 = 0; local_18 = param_2; local_10 = param_1; uVar2 = std::__cxx11::string::length(); local_7b = false; if (1 < uVar2) { std::__cxx11::string::substr((ulong)local_40,(ulong)local_10); /* try { // try from 001eb4eb to 001eb4f6 has its CatchHandler @ 001eb537 */ local_7b = std::operator==(local_40,"0x"); std::__cxx11::string::~string(local_40); } if (local_7b != false) { local_20 = 2; } lVar3 = std::__cxx11::string::length(); local_60 = lVar3 - local_20; if (0x80 < local_60) { local_60 = 0x80; } uVar2 = local_60 + local_20; local_70 = local_20; local_78 = local_60 * 4 + -1; do { if (uVar2 <= local_70) { return 1; } pcVar4 = (char *)std::__cxx11::string::at((ulong)local_10); cVar1 = *pcVar4; if ((cVar1 < '0') || ('9' < cVar1)) { if ((cVar1 < 'a') || ('f' < cVar1)) { if ((cVar1 < 'A') || ('F' < cVar1)) { if (-1 < common_log_verbosity_thold) { uVar5 = common_log_main(); common_log_add(uVar5,4,"Invalid hex character \'%c\' at position %d\n",(int)cVar1, local_70 & 0xffffffff); } return 0; } local_7a = cVar1 - 0x37; } else { local_7a = cVar1 + 0xa9; } } else { local_7a = cVar1 - 0x30; } local_8a = (local_18[local_78] & 1U) != 0 || (local_7a & 8) != 0; local_18[local_78] = local_8a; local_8b = (local_18[local_78 + -1] & 1U) != 0 || (local_7a & 4) != 0; local_18[local_78 + -1] = local_8b; local_8c = (local_18[local_78 + -2] & 1U) != 0 || (local_7a & 2) != 0; local_18[local_78 + -2] = local_8c; local_8d = (local_18[local_78 + -3] & 1U) != 0 || (local_7a & 1) != 0; local_18[local_78 + -3] = local_8d; local_70 = local_70 + 1; local_78 = local_78 + -4; } while( true ); }
49,122
my_strnxfrm_simple_internal
eloqsql/strings/ctype-simple.c
size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs, uchar *dst, size_t dstlen, uint *nweights, const uchar *src, size_t srclen) { const uchar *map= cs->sort_order; uchar *d0= dst; uint frmlen; if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen) frmlen= (uint)srclen; if (dst != src) { const uchar *end; for (end= src + frmlen; src < end;) *dst++= map[*src++]; } else { const uchar *end; for (end= dst + frmlen; dst < end; dst++) *dst= map[(uchar) *dst]; } *nweights-= frmlen; return dst - d0; }
O0
c
my_strnxfrm_simple_internal: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq -0x20(%rbp), %rcx movl (%rcx), %ecx cmpq %rcx, %rax jae 0x426e9 movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x426f3 movq -0x20(%rbp), %rax movl (%rax), %eax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl %eax, -0x44(%rbp) movl %eax, %eax cmpq -0x30(%rbp), %rax jbe 0x42709 movq -0x30(%rbp), %rax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax cmpq -0x28(%rbp), %rax je 0x42759 movq -0x28(%rbp), %rax movl -0x44(%rbp), %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax cmpq -0x50(%rbp), %rax jae 0x42757 movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x42721 jmp 0x42795 movq -0x10(%rbp), %rax movl -0x44(%rbp), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax cmpq -0x58(%rbp), %rax jae 0x42793 movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x42767 jmp 0x42795 movl -0x44(%rbp), %edx movq -0x20(%rbp), %rax movl (%rax), %ecx subl %edx, %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax popq %rbp retq nop
my_strnxfrm_simple_internal: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_20] mov ecx, [rcx] cmp rax, rcx jnb short loc_426E9 mov rax, [rbp+var_18] mov [rbp+var_60], rax jmp short loc_426F3 loc_426E9: mov rax, [rbp+var_20] mov eax, [rax] mov [rbp+var_60], rax loc_426F3: mov rax, [rbp+var_60] mov [rbp+var_44], eax mov eax, eax cmp rax, [rbp+var_30] jbe short loc_42709 mov rax, [rbp+var_30] mov [rbp+var_44], eax loc_42709: mov rax, [rbp+var_10] cmp rax, [rbp+var_28] jz short loc_42759 mov rax, [rbp+var_28] mov ecx, [rbp+var_44] add rax, rcx mov [rbp+var_50], rax loc_42721: mov rax, [rbp+var_28] cmp rax, [rbp+var_50] jnb short loc_42757 mov rax, [rbp+var_38] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_42721 loc_42757: jmp short loc_42795 loc_42759: mov rax, [rbp+var_10] mov ecx, [rbp+var_44] add rax, rcx mov [rbp+var_58], rax loc_42767: mov rax, [rbp+var_10] cmp rax, [rbp+var_58] jnb short loc_42793 mov rax, [rbp+var_38] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_42767 loc_42793: jmp short $+2 loc_42795: mov edx, [rbp+var_44] mov rax, [rbp+var_20] mov ecx, [rax] sub ecx, edx mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rbp+var_40] sub rax, rcx pop rbp retn
_BYTE * my_strnxfrm_simple_internal( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned int *a4, unsigned __int8 *a5, unsigned long long a6) { unsigned __int8 *v6; // rcx unsigned __int8 *v7; // rax unsigned int v9; // [rsp+0h] [rbp-60h] int v10; // [rsp+1Ch] [rbp-44h] long long v11; // [rsp+28h] [rbp-38h] unsigned __int8 *v12; // [rsp+38h] [rbp-28h] unsigned __int8 *v14; // [rsp+50h] [rbp-10h] v14 = a2; v12 = a5; v11 = *(_QWORD *)(a1 + 88); if ( a3 >= *a4 ) v9 = *a4; else v9 = a3; v10 = v9; if ( v9 > a6 ) v10 = a6; if ( a2 == a5 ) { while ( v14 < &a2[v10] ) { *v14 = *(_BYTE *)(v11 + *v14); ++v14; } } else { while ( v12 < &a5[v10] ) { v6 = v12++; v7 = v14++; *v7 = *(_BYTE *)(v11 + *v6); } } *a4 -= v10; return (_BYTE *)(v14 - a2); }
my_strnxfrm_simple_internal: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x001426e9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX JMP 0x001426f3 LAB_001426e9: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX LAB_001426f3: MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x44],EAX MOV EAX,EAX CMP RAX,qword ptr [RBP + -0x30] JBE 0x00142709 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x44],EAX LAB_00142709: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x28] JZ 0x00142759 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_00142721: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x50] JNC 0x00142757 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x00142721 LAB_00142757: JMP 0x00142795 LAB_00142759: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX LAB_00142767: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x58] JNC 0x00142793 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00142767 LAB_00142793: JMP 0x00142795 LAB_00142795: MOV EDX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX] SUB ECX,EDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX POP RBP RET
long my_strnxfrm_simple_internal (long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6) { long lVar1; ulong local_68; uint local_4c; byte *local_30; byte *local_18; lVar1 = *(long *)(param_1 + 0x58); local_68 = param_3; if (*param_4 <= param_3) { local_68 = (ulong)*param_4; } local_4c = (uint)local_68; if (param_6 < (local_68 & 0xffffffff)) { local_4c = (uint)param_6; } if (param_2 == param_5) { for (local_18 = param_2; local_18 < param_2 + local_4c; local_18 = local_18 + 1) { *local_18 = *(byte *)(lVar1 + (ulong)*local_18); } } else { local_30 = param_5; local_18 = param_2; while (local_30 < param_5 + local_4c) { *local_18 = *(byte *)(lVar1 + (ulong)*local_30); local_30 = local_30 + 1; local_18 = local_18 + 1; } } *param_4 = *param_4 - local_4c; return (long)local_18 - (long)param_2; }
49,123
google::protobuf::io::FileInputStream::~FileInputStream()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.h
class PROTOBUF_EXPORT FileInputStream PROTOBUF_FUTURE_FINAL : public ZeroCopyInputStream { public: // Creates a stream that reads from the given Unix file descriptor. // If a block_size is given, it specifies the number of bytes that // should be read and returned with each call to Next(). Otherwise, // a reasonable default is used. explicit FileInputStream(int file_descriptor, int block_size = -1); // Flushes any buffers and closes the underlying file. Returns false if // an error occurs during the process; use GetErrno() to examine the error. // Even if an error occurs, the file descriptor is closed when this returns. bool Close(); // By default, the file descriptor is not closed when the stream is // destroyed. Call SetCloseOnDelete(true) to change that. WARNING: // This leaves no way for the caller to detect if close() fails. If // detecting close() errors is important to you, you should arrange // to close the descriptor yourself. void SetCloseOnDelete(bool value) { copying_input_.SetCloseOnDelete(value); } // If an I/O error has occurred on this file descriptor, this is the // errno from that error. Otherwise, this is zero. Once an error // occurs, the stream is broken and all subsequent operations will // fail. int GetErrno() const { return copying_input_.GetErrno(); } // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingFileInputStream PROTOBUF_FUTURE_FINAL : public CopyingInputStream { public: CopyingFileInputStream(int file_descriptor); ~CopyingFileInputStream() override; bool Close(); void SetCloseOnDelete(bool value) { close_on_delete_ = value; } int GetErrno() const { return errno_; } // implements CopyingInputStream --------------------------------- int Read(void* buffer, int size) override; int Skip(int count) override; private: // The file descriptor. const int file_; bool close_on_delete_; bool is_closed_; // The errno of the I/O error, if one has occurred. Otherwise, zero. int errno_; // Did we try to seek once and fail? If so, we assume this file descriptor // doesn't support seeking and won't try again. bool previous_seek_failed_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileInputStream); }
O0
c
google::protobuf::io::FileInputStream::~FileInputStream(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x39900 movq 0x8(%rsp), %rdi callq 0x21620 addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN6google8protobuf2io15FileInputStreamD0Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi call _ZN6google8protobuf2io15FileInputStreamD2Ev; google::protobuf::io::FileInputStream::~FileInputStream() mov rdi, [rsp+18h+var_10]; void * call __ZdlPv; operator delete(void *) add rsp, 18h retn
void google::protobuf::io::FileInputStream::~FileInputStream(google::protobuf::io::FileInputStream *this) { google::protobuf::io::FileInputStream::~FileInputStream(this); operator delete(this); }
49,124
google::protobuf::io::FileInputStream::~FileInputStream()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.h
class PROTOBUF_EXPORT FileInputStream PROTOBUF_FUTURE_FINAL : public ZeroCopyInputStream { public: // Creates a stream that reads from the given Unix file descriptor. // If a block_size is given, it specifies the number of bytes that // should be read and returned with each call to Next(). Otherwise, // a reasonable default is used. explicit FileInputStream(int file_descriptor, int block_size = -1); // Flushes any buffers and closes the underlying file. Returns false if // an error occurs during the process; use GetErrno() to examine the error. // Even if an error occurs, the file descriptor is closed when this returns. bool Close(); // By default, the file descriptor is not closed when the stream is // destroyed. Call SetCloseOnDelete(true) to change that. WARNING: // This leaves no way for the caller to detect if close() fails. If // detecting close() errors is important to you, you should arrange // to close the descriptor yourself. void SetCloseOnDelete(bool value) { copying_input_.SetCloseOnDelete(value); } // If an I/O error has occurred on this file descriptor, this is the // errno from that error. Otherwise, this is zero. Once an error // occurs, the stream is broken and all subsequent operations will // fail. int GetErrno() const { return copying_input_.GetErrno(); } // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingFileInputStream PROTOBUF_FUTURE_FINAL : public CopyingInputStream { public: CopyingFileInputStream(int file_descriptor); ~CopyingFileInputStream() override; bool Close(); void SetCloseOnDelete(bool value) { close_on_delete_ = value; } int GetErrno() const { return errno_; } // implements CopyingInputStream --------------------------------- int Read(void* buffer, int size) override; int Skip(int count) override; private: // The file descriptor. const int file_; bool close_on_delete_; bool is_closed_; // The errno of the I/O error, if one has occurred. Otherwise, zero. int errno_; // Did we try to seek once and fail? If so, we assume this file descriptor // doesn't support seeking and won't try again. bool previous_seek_failed_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileInputStream); }
O3
c
google::protobuf::io::FileInputStream::~FileInputStream(): pushq %rbx movq %rdi, %rbx leaq 0x17f31d(%rip), %rax # 0x27b4b0 movq %rax, (%rdi) addq $0x20, %rdi callq 0xfc8a0 leaq 0x8(%rbx), %rdi callq 0xfb960 movq %rbx, %rdi popq %rbx jmp 0x1f4a0 nop
_ZN6google8protobuf2io15FileInputStreamD0Ev: push rbx mov rbx, rdi lea rax, off_27B4B0 mov [rdi], rax add rdi, 20h ; ' '; this call _ZN6google8protobuf2io25CopyingInputStreamAdaptorD2Ev; google::protobuf::io::CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor() lea rdi, [rbx+8]; this call _ZN6google8protobuf2io15FileInputStream22CopyingFileInputStreamD2Ev; google::protobuf::io::FileInputStream::CopyingFileInputStream::~CopyingFileInputStream() mov rdi, rbx; void * pop rbx jmp __ZdlPv; operator delete(void *)
void google::protobuf::io::FileInputStream::~FileInputStream( google::protobuf::io::FileInputStream *this, long long a2) { *(_QWORD *)this = off_27B4B0; google::protobuf::io::CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor((google::protobuf::io::FileInputStream *)((char *)this + 32)); google::protobuf::io::FileInputStream::CopyingFileInputStream::~CopyingFileInputStream( (google::protobuf::io::FileInputStream *)((char *)this + 8), a2); operator delete(this); }
~FileInputStream: PUSH RBX MOV RBX,RDI LEA RAX,[0x37b4b0] MOV qword ptr [RDI],RAX ADD RDI,0x20 CALL 0x001fc8a0 LEA RDI,[RBX + 0x8] CALL 0x001fb960 MOV RDI,RBX POP RBX JMP 0x0011f4a0
/* google::protobuf::io::FileInputStream::~FileInputStream() */ void __thiscall google::protobuf::io::FileInputStream::~FileInputStream(FileInputStream *this) { *(int ***)this = &PTR__FileInputStream_0037b4b0; CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor((CopyingInputStreamAdaptor *)(this + 0x20)); CopyingFileInputStream::~CopyingFileInputStream((CopyingFileInputStream *)(this + 8)); operator_delete(this); return; }
49,125
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long)
llama.cpp/common/json.hpp
void dump_integer(NumberType x) { static constexpr std::array<std::array<char, 2>, 100> digits_to_99 { { {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, } }; // special case for "0" if (x == 0) { o->write_character('0'); return; } // use a pointer to fill the buffer auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) number_unsigned_t abs_value; unsigned int n_chars{}; if (is_negative_number(x)) { *buffer_ptr = '-'; abs_value = remove_sign(static_cast<number_integer_t>(x)); // account one more byte for the minus sign n_chars = 1 + count_digits(abs_value); } else { abs_value = static_cast<number_unsigned_t>(x); n_chars = count_digits(abs_value); } // spare 1 byte for '\0' JSON_ASSERT(n_chars < number_buffer.size() - 1); // jump to the end to generate the string from backward, // so we later avoid reversing the result buffer_ptr += n_chars; // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu // See: https://www.youtube.com/watch?v=o4-CwDo2zpg while (abs_value >= 100) { const auto digits_index = static_cast<unsigned>((abs_value % 100)); abs_value /= 100; *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } if (abs_value >= 10) { const auto digits_index = static_cast<unsigned>(abs_value); *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } else { *(--buffer_ptr) = static_cast<char>('0' + abs_value); } o->write_characters(number_buffer.data(), n_chars); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<long, 0>(long): pushq %rbx testq %rsi, %rsi je 0xcfd9f movq %rsi, %rcx leaq 0x10(%rdi), %rsi testq %rcx, %rcx js 0xcfdb0 cmpq $0xa, %rcx jae 0xcfe19 leaq 0x11(%rdi), %r9 movl $0x1, %r8d jmp 0xcfef2 movq (%rdi), %rdi movq (%rdi), %rax movq (%rax), %rax movl $0x30, %esi popq %rbx jmpq *%rax movb $0x2d, (%rsi) negq %rcx movl $0x1, %r9d cmpq $0xa, %rcx jb 0xcfe78 movl $0x4, %r9d movabsq $0x346dc5d63886594b, %r10 # imm = 0x346DC5D63886594B movq %rcx, %r8 cmpq $0x63, %r8 jbe 0xcfe6f cmpq $0x3e7, %r8 # imm = 0x3E7 jbe 0xcfe75 cmpq $0x2710, %r8 # imm = 0x2710 jb 0xcfe78 movq %r8, %rax mulq %r10 shrq $0xb, %rdx addl $0x4, %r9d cmpq $0x1869f, %r8 # imm = 0x1869F movq %rdx, %r8 ja 0xcfdd9 addl $-0x3, %r9d jmp 0xcfe78 movl $0x4, %r9d movabsq $0x346dc5d63886594b, %r10 # imm = 0x346DC5D63886594B movq %rcx, %r8 cmpq $0x63, %r8 jbe 0xcfe64 cmpq $0x3e7, %r8 # imm = 0x3E7 jbe 0xcfe6a cmpq $0x2710, %r8 # imm = 0x2710 jb 0xcfe7b movq %r8, %rax mulq %r10 shrq $0xb, %rdx addl $0x4, %r9d cmpq $0x1869f, %r8 # imm = 0x1869F movq %rdx, %r8 ja 0xcfe2c addl $-0x3, %r9d jmp 0xcfe7b addl $-0x2, %r9d jmp 0xcfe7b decl %r9d jmp 0xcfe7b addl $-0x2, %r9d jmp 0xcfe78 decl %r9d incl %r9d cmpl $0x3f, %r9d jae 0xcff09 movl %r9d, %r8d leaq (%rsi,%r8), %r9 cmpq $0x64, %rcx jb 0xcfed4 movabsq $0x28f5c28f5c28f5c3, %r10 # imm = 0x28F5C28F5C28F5C3 leaq 0x54ece(%rip), %r11 # 0x124d71 movq %rcx, %rax shrq $0x2, %rax mulq %r10 shrq $0x2, %rdx imull $0x64, %edx, %eax movl %ecx, %ebx subl %eax, %ebx movzwl (%r11,%rbx,2), %eax movw %ax, -0x2(%r9) addq $-0x2, %r9 cmpq $0x270f, %rcx # imm = 0x270F movq %rdx, %rcx ja 0xcfea3 jmp 0xcfed7 movq %rcx, %rdx cmpq $0xa, %rdx jb 0xcfeef leaq 0x54e8d(%rip), %rax # 0x124d71 movzwl (%rax,%rdx,2), %eax movw %ax, -0x2(%r9) jmp 0xcfef9 movq %rdx, %rcx orb $0x30, %cl movb %cl, -0x1(%r9) movq (%rdi), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax movq %r8, %rdx popq %rbx jmpq *%rax leaq 0x4b602(%rip), %rdi # 0x11b512 leaq 0x4421a(%rip), %rdx # 0x114131 leaq 0x4c9ed(%rip), %rcx # 0x11c90b movl $0x4952, %esi # imm = 0x4952 xorl %eax, %eax callq 0x21e60
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: push rbx test rsi, rsi jz short loc_CFD9F mov rcx, rsi lea rsi, [rdi+10h] test rcx, rcx js short loc_CFDB0 cmp rcx, 0Ah jnb loc_CFE19 lea r9, [rdi+11h] mov r8d, 1 jmp loc_CFEF2 loc_CFD9F: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax] mov esi, 30h ; '0' pop rbx jmp rax loc_CFDB0: mov byte ptr [rsi], 2Dh ; '-' neg rcx mov r9d, 1 cmp rcx, 0Ah jb loc_CFE78 mov r9d, 4 mov r10, 346DC5D63886594Bh mov r8, rcx loc_CFDD9: cmp r8, 63h ; 'c' jbe loc_CFE6F cmp r8, 3E7h jbe loc_CFE75 cmp r8, 2710h jb short loc_CFE78 mov rax, r8 mul r10 shr rdx, 0Bh add r9d, 4 cmp r8, 1869Fh mov r8, rdx ja short loc_CFDD9 add r9d, 0FFFFFFFDh jmp short loc_CFE78 loc_CFE19: mov r9d, 4 mov r10, 346DC5D63886594Bh mov r8, rcx loc_CFE2C: cmp r8, 63h ; 'c' jbe short loc_CFE64 cmp r8, 3E7h jbe short loc_CFE6A cmp r8, 2710h jb short loc_CFE7B mov rax, r8 mul r10 shr rdx, 0Bh add r9d, 4 cmp r8, 1869Fh mov r8, rdx ja short loc_CFE2C add r9d, 0FFFFFFFDh jmp short loc_CFE7B loc_CFE64: add r9d, 0FFFFFFFEh jmp short loc_CFE7B loc_CFE6A: dec r9d jmp short loc_CFE7B loc_CFE6F: add r9d, 0FFFFFFFEh jmp short loc_CFE78 loc_CFE75: dec r9d loc_CFE78: inc r9d loc_CFE7B: cmp r9d, 3Fh ; '?' jnb loc_CFF09 mov r8d, r9d lea r9, [rsi+r8] cmp rcx, 64h ; 'd' jb short loc_CFED4 mov r10, 28F5C28F5C28F5C3h lea r11, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 loc_CFEA3: mov rax, rcx shr rax, 2 mul r10 shr rdx, 2 imul eax, edx, 64h ; 'd' mov ebx, ecx sub ebx, eax movzx eax, word ptr [r11+rbx*2] mov [r9-2], ax add r9, 0FFFFFFFFFFFFFFFEh cmp rcx, 270Fh mov rcx, rdx ja short loc_CFEA3 jmp short loc_CFED7 loc_CFED4: mov rdx, rcx loc_CFED7: cmp rdx, 0Ah jb short loc_CFEEF lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 movzx eax, word ptr [rax+rdx*2] mov [r9-2], ax jmp short loc_CFEF9 loc_CFEEF: mov rcx, rdx loc_CFEF2: or cl, 30h mov [r9-1], cl loc_CFEF9: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax+8] mov rdx, r8 pop rbx jmp rax loc_CFF09: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNCharsNumberBu; "n_chars < number_buffer.size() - 1" mov esi, 4952h xor eax, eax call _ggml_abort
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( _QWORD *a1, unsigned long long a2) { unsigned long long v2; // rcx _BYTE *v3; // rsi char *v4; // r9 long long v5; // r8 int v7; // r9d unsigned long long v8; // r8 bool v9; // cc unsigned int v10; // r9d unsigned long long v11; // r8 unsigned long long v12; // rdx double v13; // xmm0_8 if ( !a2 ) return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL); v2 = a2; v3 = a1 + 2; if ( (v2 & 0x8000000000000000LL) != 0LL ) { *v3 = 45; v2 = -(long long)v2; v7 = 1; if ( v2 >= 0xA ) { v7 = 4; v8 = v2; while ( 1 ) { if ( v8 <= 0x63 ) { v7 -= 2; goto LABEL_23; } if ( v8 <= 0x3E7 ) break; if ( v8 < 0x2710 ) goto LABEL_23; v7 += 4; v9 = v8 <= 0x1869F; v8 /= 0x2710uLL; if ( v9 ) { v7 -= 3; goto LABEL_23; } } --v7; } LABEL_23: v10 = v7 + 1; } else { if ( v2 < 0xA ) { v4 = (char *)a1 + 17; v5 = 1LL; goto LABEL_32; } v10 = 4; v11 = v2; while ( 1 ) { if ( v11 <= 0x63 ) { v10 -= 2; goto LABEL_24; } if ( v11 <= 0x3E7 ) break; if ( v11 < 0x2710 ) goto LABEL_24; v10 += 4; v9 = v11 <= 0x1869F; v11 /= 0x2710uLL; if ( v9 ) { v10 -= 3; goto LABEL_24; } } --v10; } LABEL_24: if ( v10 < 0x3F ) { v5 = v10; v4 = &v3[v10]; if ( v2 < 0x64 ) { v12 = v2; } else { do { v12 = v2 / 0x64; *((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[v2 % 0x64]; v4 -= 2; v9 = v2 <= 0x270F; v2 /= 0x64uLL; } while ( !v9 ); } if ( v12 >= 0xA ) { *((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[v12]; return (*(long long ( **)(_QWORD, _BYTE *, long long, unsigned long long))(*(_QWORD *)*a1 + 8LL))( *a1, v3, v5, v2); } v2 = v12; LABEL_32: LOBYTE(v2) = v2 | 0x30; *(v4 - 1) = v2; return (*(long long ( **)(_QWORD, _BYTE *, long long, unsigned long long))(*(_QWORD *)*a1 + 8LL))( *a1, v3, v5, v2); } v13 = ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 18770LL, "GGML_ASSERT(%s) failed", "n_chars < number_buffer.size() - 1"); return nlohmann::json_abi_v3_11_3::detail::serializer<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_float( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v13); }
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: PUSH RBX TEST RSI,RSI JZ 0x001cfd9f MOV RCX,RSI LEA RSI,[RDI + 0x10] TEST RCX,RCX JS 0x001cfdb0 CMP RCX,0xa JNC 0x001cfe19 LEA R9,[RDI + 0x11] MOV R8D,0x1 JMP 0x001cfef2 LAB_001cfd9f: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX] MOV ESI,0x30 POP RBX JMP RAX LAB_001cfdb0: MOV byte ptr [RSI],0x2d NEG RCX MOV R9D,0x1 CMP RCX,0xa JC 0x001cfe78 MOV R9D,0x4 MOV R10,0x346dc5d63886594b MOV R8,RCX LAB_001cfdd9: CMP R8,0x63 JBE 0x001cfe6f CMP R8,0x3e7 JBE 0x001cfe75 CMP R8,0x2710 JC 0x001cfe78 MOV RAX,R8 MUL R10 SHR RDX,0xb ADD R9D,0x4 CMP R8,0x1869f MOV R8,RDX JA 0x001cfdd9 ADD R9D,-0x3 JMP 0x001cfe78 LAB_001cfe19: MOV R9D,0x4 MOV R10,0x346dc5d63886594b MOV R8,RCX LAB_001cfe2c: CMP R8,0x63 JBE 0x001cfe64 CMP R8,0x3e7 JBE 0x001cfe6a CMP R8,0x2710 JC 0x001cfe7b MOV RAX,R8 MUL R10 SHR RDX,0xb ADD R9D,0x4 CMP R8,0x1869f MOV R8,RDX JA 0x001cfe2c ADD R9D,-0x3 JMP 0x001cfe7b LAB_001cfe64: ADD R9D,-0x2 JMP 0x001cfe7b LAB_001cfe6a: DEC R9D JMP 0x001cfe7b LAB_001cfe6f: ADD R9D,-0x2 JMP 0x001cfe78 LAB_001cfe75: DEC R9D LAB_001cfe78: INC R9D LAB_001cfe7b: CMP R9D,0x3f JNC 0x001cff09 MOV R8D,R9D LEA R9,[RSI + R8*0x1] CMP RCX,0x64 JC 0x001cfed4 MOV R10,0x28f5c28f5c28f5c3 LEA R11,[0x224d71] LAB_001cfea3: MOV RAX,RCX SHR RAX,0x2 MUL R10 SHR RDX,0x2 IMUL EAX,EDX,0x64 MOV EBX,ECX SUB EBX,EAX MOVZX EAX,word ptr [R11 + RBX*0x2] MOV word ptr [R9 + -0x2],AX ADD R9,-0x2 CMP RCX,0x270f MOV RCX,RDX JA 0x001cfea3 JMP 0x001cfed7 LAB_001cfed4: MOV RDX,RCX LAB_001cfed7: CMP RDX,0xa JC 0x001cfeef LEA RAX,[0x224d71] MOVZX EAX,word ptr [RAX + RDX*0x2] MOV word ptr [R9 + -0x2],AX JMP 0x001cfef9 LAB_001cfeef: MOV RCX,RDX LAB_001cfef2: OR CL,0x30 MOV byte ptr [R9 + -0x1],CL LAB_001cfef9: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,R8 POP RBX JMP RAX LAB_001cff09: LEA RDI,[0x21b512] LEA RDX,[0x214131] LEA RCX,[0x21c90b] MOV ESI,0x4952 XOR EAX,EAX CALL 0x00121e60
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_ (int8 *param_1,ulong param_2) { int8 *puVar1; bool bVar2; int iVar3; ulong uVar4; ulong uVar5; int iVar6; int1 *puVar7; if (param_2 == 0) { /* WARNING: Could not recover jumptable at 0x001cfdae. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30); return; } puVar1 = param_1 + 2; if ((long)param_2 < 0) { *(int1 *)puVar1 = 0x2d; param_2 = -param_2; iVar6 = 1; if (9 < param_2) { uVar5 = param_2; iVar3 = 4; do { iVar6 = iVar3; if (uVar5 < 100) { iVar6 = iVar6 + -2; goto LAB_001cfe78; } if (uVar5 < 1000) { iVar6 = iVar6 + -1; goto LAB_001cfe78; } if (uVar5 < 10000) goto LAB_001cfe78; bVar2 = 99999 < uVar5; uVar5 = uVar5 / 10000; iVar3 = iVar6 + 4; } while (bVar2); iVar6 = iVar6 + 1; } LAB_001cfe78: uVar5 = (ulong)(iVar6 + 1); LAB_001cfe7b: if (0x3e < (uint)uVar5) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x4952, "GGML_ASSERT(%s) failed","n_chars < number_buffer.size() - 1"); } puVar7 = (int1 *)((long)puVar1 + uVar5); if (99 < param_2) { do { uVar4 = param_2 / 100; *(int2 *)(puVar7 + -2) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + (ulong)(uint)((int)param_2 + (int)uVar4 * -100) * 2); puVar7 = puVar7 + -2; bVar2 = 9999 < param_2; param_2 = uVar4; } while (bVar2); } if (9 < param_2) { *(int2 *)(puVar7 + -2) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + param_2 * 2); goto LAB_001cfef9; } } else { if (9 < param_2) { uVar5 = 4; uVar4 = param_2; do { iVar6 = (int)uVar5; if (uVar4 < 100) { uVar5 = (ulong)(iVar6 - 2); goto LAB_001cfe7b; } if (uVar4 < 1000) { uVar5 = (ulong)(iVar6 - 1); goto LAB_001cfe7b; } if (uVar4 < 10000) goto LAB_001cfe7b; uVar5 = (ulong)(iVar6 + 4); bVar2 = 99999 < uVar4; uVar4 = uVar4 / 10000; } while (bVar2); uVar5 = (ulong)(iVar6 + 1); goto LAB_001cfe7b; } puVar7 = (int1 *)((long)param_1 + 0x11); uVar5 = 1; } puVar7[-1] = (byte)param_2 | 0x30; LAB_001cfef9: /* WARNING: Could not recover jumptable at 0x001cff07. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)*param_1 + 8))((long *)*param_1,puVar1,uVar5); return; }
49,126
create_printer(output_formats)
monkey531[P]llama/examples/llama-bench/llama-bench.cpp
static std::unique_ptr<printer> create_printer(output_formats format) { switch (format) { case NONE: return nullptr; case CSV: return std::unique_ptr<printer>(new csv_printer()); case JSON: return std::unique_ptr<printer>(new json_printer()); case JSONL: return std::unique_ptr<printer>(new jsonl_printer()); case MARKDOWN: return std::unique_ptr<printer>(new markdown_printer()); case SQL: return std::unique_ptr<printer>(new sql_printer()); } GGML_ABORT("fatal error"); }
O0
cpp
create_printer(output_formats): subq $0x58, %rsp movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x50(%rsp) movl %esi, 0x4c(%rsp) movl 0x4c(%rsp), %eax movq %rax, 0x40(%rsp) subq $0x5, %rax ja 0x61d3b movq 0x40(%rsp), %rax leaq 0x18140b(%rip), %rcx # 0x1e3004 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x30(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xa4cf0 jmp 0x61d55 movl $0x10, %edi callq 0x56220 movq %rax, %rdi movq %rdi, 0x28(%rsp) xorl %esi, %esi movl $0x10, %edx callq 0x564b0 movq 0x28(%rsp), %rdi callq 0xa4d30 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0xa4d60 jmp 0x61d55 movl $0x18, %edi callq 0x56220 movq %rax, %rdi movq %rdi, 0x20(%rsp) xorl %esi, %esi movl $0x18, %edx callq 0x564b0 movq 0x20(%rsp), %rdi callq 0xa4d90 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0xa4d60 jmp 0x61d55 movl $0x10, %edi callq 0x56220 movq %rax, %rdi movq %rdi, 0x18(%rsp) xorl %esi, %esi movl $0x10, %edx callq 0x564b0 movq 0x18(%rsp), %rdi callq 0xa4dd0 movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0xa4d60 jmp 0x61d55 movl $0x28, %edi callq 0x56220 movq %rax, %rdi movq %rdi, 0x10(%rsp) xorl %esi, %esi movl $0x28, %edx callq 0x564b0 movq 0x10(%rsp), %rdi callq 0xa4e00 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0xa4d60 jmp 0x61d55 movl $0x10, %edi callq 0x56220 movq %rax, %rdi movq %rdi, 0x8(%rsp) xorl %esi, %esi movl $0x10, %edx callq 0x564b0 movq 0x8(%rsp), %rdi callq 0xa4e40 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0xa4d60 jmp 0x61d55 leaq 0x181892(%rip), %rdi # 0x1e35d4 movl $0x5d2, %esi # imm = 0x5D2 leaq 0x182a51(%rip), %rdx # 0x1e479f movb $0x0, %al callq 0x56d30 movq 0x38(%rsp), %rax addq $0x58, %rsp retq nop
_ZL14create_printer14output_formats: sub rsp, 58h mov [rsp+58h+var_28], rdi mov rax, rdi mov [rsp+58h+var_20], rax mov [rsp+58h+var_8], rdi mov [rsp+58h+var_C], esi mov eax, [rsp+58h+var_C] mov [rsp+58h+var_18], rax sub rax, 5; switch 6 cases ja def_61C00; jumptable 0000000000061C00 default case mov rax, [rsp+58h+var_18] lea rcx, jpt_61C00 movsxd rax, ds:(jpt_61C00 - 1E3004h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_61C02: mov rdi, [rsp+58h+var_28]; jumptable 0000000000061C00 case 0 xor eax, eax mov esi, eax call _ZNSt10unique_ptrI7printerSt14default_deleteIS0_EEC2IS2_vEEDn; std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(decltype(nullptr)) jmp loc_61D55 loc_61C15: mov edi, 10h; jumptable 0000000000061C00 case 1 call __Znwm; operator new(ulong) mov rdi, rax mov [rsp+58h+var_30], rdi xor esi, esi mov edx, 10h call _memset mov rdi, [rsp+58h+var_30]; this call _ZN11csv_printerC2Ev; csv_printer::csv_printer(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_30] call _ZNSt10unique_ptrI7printerSt14default_deleteIS0_EEC2IS2_vEEPS0_; std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(printer*) jmp loc_61D55 loc_61C51: mov edi, 18h; jumptable 0000000000061C00 case 2 call __Znwm; operator new(ulong) mov rdi, rax mov [rsp+58h+var_38], rdi xor esi, esi mov edx, 18h call _memset mov rdi, [rsp+58h+var_38]; this call _ZN12json_printerC2Ev; json_printer::json_printer(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_38] call _ZNSt10unique_ptrI7printerSt14default_deleteIS0_EEC2IS2_vEEPS0_; std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(printer*) jmp loc_61D55 loc_61C8D: mov edi, 10h; jumptable 0000000000061C00 case 3 call __Znwm; operator new(ulong) mov rdi, rax mov [rsp+58h+var_40], rdi xor esi, esi mov edx, 10h call _memset mov rdi, [rsp+58h+var_40]; this call _ZN13jsonl_printerC2Ev; jsonl_printer::jsonl_printer(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_40] call _ZNSt10unique_ptrI7printerSt14default_deleteIS0_EEC2IS2_vEEPS0_; std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(printer*) jmp loc_61D55 loc_61CC9: mov edi, 28h ; '('; jumptable 0000000000061C00 case 4 call __Znwm; operator new(ulong) mov rdi, rax mov [rsp+58h+var_48], rdi xor esi, esi mov edx, 28h ; '(' call _memset mov rdi, [rsp+58h+var_48]; this call _ZN16markdown_printerC2Ev; markdown_printer::markdown_printer(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_48] call _ZNSt10unique_ptrI7printerSt14default_deleteIS0_EEC2IS2_vEEPS0_; std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(printer*) jmp short loc_61D55 loc_61D02: mov edi, 10h; jumptable 0000000000061C00 case 5 call __Znwm; operator new(ulong) mov rdi, rax mov [rsp+58h+var_50], rdi xor esi, esi mov edx, 10h call _memset mov rdi, [rsp+58h+var_50]; this call _ZN11sql_printerC2Ev; sql_printer::sql_printer(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_50] call _ZNSt10unique_ptrI7printerSt14default_deleteIS0_EEC2IS2_vEEPS0_; std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(printer*) jmp short loc_61D55 def_61C00: lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000061C00 default case mov esi, 5D2h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_61D55: mov rax, [rsp+58h+var_20] add rsp, 58h retn
long long create_printer(long long a1, int a2) { sql_printer *v3; // [rsp+8h] [rbp-50h] markdown_printer *v4; // [rsp+10h] [rbp-48h] jsonl_printer *v5; // [rsp+18h] [rbp-40h] json_printer *v6; // [rsp+20h] [rbp-38h] csv_printer *v7; // [rsp+28h] [rbp-30h] switch ( a2 ) { case 0: std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(a1, 0LL); break; case 1: v7 = (csv_printer *)operator new(0x10uLL); memset(v7, 0LL, 16LL); csv_printer::csv_printer(v7); std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(a1, v7); break; case 2: v6 = (json_printer *)operator new(0x18uLL); memset(v6, 0LL, 24LL); json_printer::json_printer(v6); std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(a1, v6); break; case 3: v5 = (jsonl_printer *)operator new(0x10uLL); memset(v5, 0LL, 16LL); jsonl_printer::jsonl_printer(v5); std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(a1, v5); break; case 4: v4 = (markdown_printer *)operator new(0x28uLL); memset(v4, 0LL, 40LL); markdown_printer::markdown_printer(v4); std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(a1, v4); break; case 5: v3 = (sql_printer *)operator new(0x10uLL); memset(v3, 0LL, 16LL); sql_printer::sql_printer(v3); std::unique_ptr<printer>::unique_ptr<std::default_delete<printer>,void>(a1, v3); break; default: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/llama-bench/llama-bench.cpp", 1490LL, "fatal error"); break; } return a1; }
create_printer: SUB RSP,0x58 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ESI MOV EAX,dword ptr [RSP + 0x4c] MOV qword ptr [RSP + 0x40],RAX SUB RAX,0x5 JA 0x00161d3b MOV RAX,qword ptr [RSP + 0x40] LEA RCX,[0x2e3004] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RDI,qword ptr [RSP + 0x30] XOR EAX,EAX MOV ESI,EAX CALL 0x001a4cf0 JMP 0x00161d55 caseD_1: MOV EDI,0x10 CALL 0x00156220 MOV RDI,RAX MOV qword ptr [RSP + 0x28],RDI XOR ESI,ESI MOV EDX,0x10 CALL 0x001564b0 MOV RDI,qword ptr [RSP + 0x28] CALL 0x001a4d30 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001a4d60 JMP 0x00161d55 caseD_2: MOV EDI,0x18 CALL 0x00156220 MOV RDI,RAX MOV qword ptr [RSP + 0x20],RDI XOR ESI,ESI MOV EDX,0x18 CALL 0x001564b0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001a4d90 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x20] CALL 0x001a4d60 JMP 0x00161d55 caseD_3: MOV EDI,0x10 CALL 0x00156220 MOV RDI,RAX MOV qword ptr [RSP + 0x18],RDI XOR ESI,ESI MOV EDX,0x10 CALL 0x001564b0 MOV RDI,qword ptr [RSP + 0x18] CALL 0x001a4dd0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001a4d60 JMP 0x00161d55 caseD_4: MOV EDI,0x28 CALL 0x00156220 MOV RDI,RAX MOV qword ptr [RSP + 0x10],RDI XOR ESI,ESI MOV EDX,0x28 CALL 0x001564b0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x001a4e00 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x10] CALL 0x001a4d60 JMP 0x00161d55 caseD_5: MOV EDI,0x10 CALL 0x00156220 MOV RDI,RAX MOV qword ptr [RSP + 0x8],RDI XOR ESI,ESI MOV EDX,0x10 CALL 0x001564b0 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001a4e40 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] CALL 0x001a4d60 JMP 0x00161d55 default: LEA RDI,[0x2e35d4] MOV ESI,0x5d2 LEA RDX,[0x2e479f] MOV AL,0x0 CALL 0x00156d30 LAB_00161d55: MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x58 RET
/* create_printer(output_formats) */ unique_ptr<printer,std::default_delete<printer>> * create_printer(unique_ptr<printer,std::default_delete<printer>> *param_1,int4 param_2) { csv_printer *this; json_printer *this_00; jsonl_printer *this_01; markdown_printer *this_02; sql_printer *this_03; switch(param_2) { case 0: std::unique_ptr<printer,std::default_delete<printer>>:: unique_ptr<std::default_delete<printer>,void>((_func_decltype_nullptr *)param_1); break; case 1: this = (csv_printer *)operator_new(0x10); memset(this,0,0x10); csv_printer::csv_printer(this); std::unique_ptr<printer,std::default_delete<printer>>:: unique_ptr<std::default_delete<printer>,void>(param_1,(printer *)this); break; case 2: this_00 = (json_printer *)operator_new(0x18); memset(this_00,0,0x18); json_printer::json_printer(this_00); std::unique_ptr<printer,std::default_delete<printer>>:: unique_ptr<std::default_delete<printer>,void>(param_1,(printer *)this_00); break; case 3: this_01 = (jsonl_printer *)operator_new(0x10); memset(this_01,0,0x10); jsonl_printer::jsonl_printer(this_01); std::unique_ptr<printer,std::default_delete<printer>>:: unique_ptr<std::default_delete<printer>,void>(param_1,(printer *)this_01); break; case 4: this_02 = (markdown_printer *)operator_new(0x28); memset(this_02,0,0x28); markdown_printer::markdown_printer(this_02); std::unique_ptr<printer,std::default_delete<printer>>:: unique_ptr<std::default_delete<printer>,void>(param_1,(printer *)this_02); break; case 5: this_03 = (sql_printer *)operator_new(0x10); memset(this_03,0,0x10); sql_printer::sql_printer(this_03); std::unique_ptr<printer,std::default_delete<printer>>:: unique_ptr<std::default_delete<printer>,void>(param_1,(printer *)this_03); break; default: ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/llama-bench/llama-bench.cpp" ,0x5d2,"fatal error"); } return param_1; }
49,127
my_coll_parser_scan_reset_sequence
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_reset_sequence(MY_COLL_RULE_PARSER *p) { my_coll_rule_reset(&p->rule); /* Scan "[before x]" option, if exists */ if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION) my_coll_parser_scan_reset_before(p); /* Try logical reset position */ if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION) { if (!my_coll_parser_scan_logical_position(p, p->rule.base, 1)) return 0; } else { /* Scan single reset character or expansion */ if (!my_coll_parser_scan_character_list(p, p->rule.base, MY_UCA_MAX_EXPANSION, "Expansion")) return 0; } return 1; }
O0
c
my_coll_parser_scan_reset_sequence: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi addq $0x50, %rdi callq 0x4eb00 movq -0x10(%rbp), %rdi callq 0x4e000 cmpl $0x7, (%rax) jne 0x4e860 movq -0x10(%rbp), %rdi callq 0x4eb30 movq -0x10(%rbp), %rdi callq 0x4e000 cmpl $0x7, (%rax) jne 0x4e894 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x50, %rsi movl $0x1, %edx callq 0x4eca0 cmpl $0x0, %eax jne 0x4e892 movl $0x0, -0x4(%rbp) jmp 0x4e8c8 jmp 0x4e8c1 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x50, %rsi movl $0xa, %edx leaq 0x2d079(%rip), %rcx # 0x7b925 callq 0x4efc0 cmpl $0x0, %eax jne 0x4e8bf movl $0x0, -0x4(%rbp) jmp 0x4e8c8 jmp 0x4e8c1 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_scan_reset_sequence: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] add rdi, 50h ; 'P' call my_coll_rule_reset mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 7 jnz short loc_4E860 mov rdi, [rbp+var_10] call my_coll_parser_scan_reset_before loc_4E860: mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 7 jnz short loc_4E894 mov rdi, [rbp+var_10] mov rsi, [rbp+var_10] add rsi, 50h ; 'P' mov edx, 1 call my_coll_parser_scan_logical_position cmp eax, 0 jnz short loc_4E892 mov [rbp+var_4], 0 jmp short loc_4E8C8 loc_4E892: jmp short loc_4E8C1 loc_4E894: mov rdi, [rbp+var_10] mov rsi, [rbp+var_10] add rsi, 50h ; 'P' mov edx, 0Ah lea rcx, aExpansion; "Expansion" call my_coll_parser_scan_character_list cmp eax, 0 jnz short loc_4E8BF mov [rbp+var_4], 0 jmp short loc_4E8C8 loc_4E8BF: jmp short $+2 loc_4E8C1: mov [rbp+var_4], 1 loc_4E8C8: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
_BOOL8 my_coll_parser_scan_reset_sequence(long long a1) { my_coll_rule_reset(a1 + 80); if ( *(_DWORD *)my_coll_parser_curr(a1) == 7 ) my_coll_parser_scan_reset_before(a1); if ( *(_DWORD *)my_coll_parser_curr(a1) != 7 ) return (unsigned int)my_coll_parser_scan_character_list(a1, a1 + 80, 10LL, "Expansion") != 0; return (unsigned int)my_coll_parser_scan_logical_position(a1, a1 + 80, 1LL) != 0; }
my_coll_parser_scan_reset_sequence: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 CALL 0x0014eb00 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014e000 CMP dword ptr [RAX],0x7 JNZ 0x0014e860 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014eb30 LAB_0014e860: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014e000 CMP dword ptr [RAX],0x7 JNZ 0x0014e894 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x50 MOV EDX,0x1 CALL 0x0014eca0 CMP EAX,0x0 JNZ 0x0014e892 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014e8c8 LAB_0014e892: JMP 0x0014e8c1 LAB_0014e894: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x50 MOV EDX,0xa LEA RCX,[0x17b925] CALL 0x0014efc0 CMP EAX,0x0 JNZ 0x0014e8bf MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014e8c8 LAB_0014e8bf: JMP 0x0014e8c1 LAB_0014e8c1: MOV dword ptr [RBP + -0x4],0x1 LAB_0014e8c8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 my_coll_parser_scan_reset_sequence(long param_1) { int iVar1; int *piVar2; my_coll_rule_reset(param_1 + 0x50); piVar2 = (int *)my_coll_parser_curr(param_1); if (*piVar2 == 7) { my_coll_parser_scan_reset_before(param_1); } piVar2 = (int *)my_coll_parser_curr(param_1); if (*piVar2 == 7) { iVar1 = my_coll_parser_scan_logical_position(param_1,param_1 + 0x50,1); if (iVar1 == 0) { return 0; } } else { iVar1 = my_coll_parser_scan_character_list(param_1,param_1 + 0x50,10,"Expansion"); if (iVar1 == 0) { return 0; } } return 1; }
49,128
open_cached_file
eloqsql/mysys/mf_cache.c
my_bool open_cached_file(IO_CACHE *cache, const char* dir, const char *prefix, size_t cache_size, myf cache_myflags) { DBUG_ENTER("open_cached_file"); cache->dir= dir; if (prefix) { DBUG_ASSERT(strlen(prefix) == 2); memcpy(cache->prefix, prefix, 3); } else cache->prefix[0]= 0; cache->file_name=0; cache->buffer=0; /* Mark that not open */ if (!init_io_cache(cache, -1, cache_size, WRITE_CACHE, 0L, 0, MYF(cache_myflags | MY_NABP))) { DBUG_RETURN(0); } DBUG_RETURN(1); }
O0
c
open_cached_file: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc8(%rax) cmpq $0x0, -0x20(%rbp) je 0x102df3 jmp 0x102dd4 jmp 0x102dd6 movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx movw (%rcx), %dx movw %dx, 0xd0(%rax) movb 0x2(%rcx), %cl movb %cl, 0xd2(%rax) jmp 0x102dfe movq -0x10(%rbp), %rax movb $0x0, 0xd0(%rax) movq -0x10(%rbp), %rax movq $0x0, 0xc0(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rax orq $0x4, %rax movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl $0x2, %ecx xorl %r8d, %r8d xorl %r9d, %r9d movq %rax, (%rsp) callq 0xe0550 cmpl $0x0, %eax jne 0x102e4f jmp 0x102e49 movb $0x0, -0x1(%rbp) jmp 0x102e55 jmp 0x102e51 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nop
open_cached_file: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+0C8h], rcx cmp [rbp+var_20], 0 jz short loc_102DF3 jmp short $+2 loc_102DD4: jmp short $+2 loc_102DD6: mov rax, [rbp+var_10] mov rcx, [rbp+var_20] mov dx, [rcx] mov [rax+0D0h], dx mov cl, [rcx+2] mov [rax+0D2h], cl jmp short loc_102DFE loc_102DF3: mov rax, [rbp+var_10] mov byte ptr [rax+0D0h], 0 loc_102DFE: mov rax, [rbp+var_10] mov qword ptr [rax+0C0h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rdi, [rbp+var_10] mov rdx, [rbp+var_28] mov rax, [rbp+var_30] or rax, 4 mov esi, 0FFFFFFFFh mov ecx, 2 xor r8d, r8d xor r9d, r9d mov [rsp+40h+var_40], rax call init_io_cache cmp eax, 0 jnz short loc_102E4F jmp short $+2 loc_102E49: mov [rbp+var_1], 0 jmp short loc_102E55 loc_102E4F: jmp short $+2 loc_102E51: mov [rbp+var_1], 1 loc_102E55: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool open_cached_file(long long a1, long long a2, long long a3, unsigned long long a4, long long a5) { *(_QWORD *)(a1 + 200) = a2; if ( a3 ) { *(_WORD *)(a1 + 208) = *(_WORD *)a3; *(_BYTE *)(a1 + 210) = *(_BYTE *)(a3 + 2); } else { *(_BYTE *)(a1 + 208) = 0; } *(_QWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; return (unsigned int)init_io_cache(a1, -1, a4, 2, 0LL, 0, a5 | 4) != 0; }
49,129
open_cached_file
eloqsql/mysys/mf_cache.c
my_bool open_cached_file(IO_CACHE *cache, const char* dir, const char *prefix, size_t cache_size, myf cache_myflags) { DBUG_ENTER("open_cached_file"); cache->dir= dir; if (prefix) { DBUG_ASSERT(strlen(prefix) == 2); memcpy(cache->prefix, prefix, 3); } else cache->prefix[0]= 0; cache->file_name=0; cache->buffer=0; /* Mark that not open */ if (!init_io_cache(cache, -1, cache_size, WRITE_CACHE, 0L, 0, MYF(cache_myflags | MY_NABP))) { DBUG_RETURN(0); } DBUG_RETURN(1); }
O3
c
open_cached_file: movq %rsi, 0xc8(%rdi) leaq 0xd0(%rdi), %rax testq %rdx, %rdx je 0xa8b17 movb 0x2(%rdx), %sil movb %sil, 0x2(%rax) movzwl (%rdx), %edx movw %dx, (%rax) jmp 0xa8b1a movb $0x0, (%rax) pushq %rbp movq %rsp, %rbp subq $0x10, %rsp xorl %eax, %eax movq %rax, 0xc0(%rdi) movq %rax, 0x20(%rdi) orq $0x4, %r8 movq %r8, (%rsp) movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rcx, %rdx movl $0x2, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x951da testl %eax, %eax setne %al addq $0x10, %rsp popq %rbp retq
open_cached_file: mov [rdi+0C8h], rsi lea rax, [rdi+0D0h] test rdx, rdx jz short loc_A8B17 mov sil, [rdx+2] mov [rax+2], sil movzx edx, word ptr [rdx] mov [rax], dx jmp short loc_A8B1A loc_A8B17: mov byte ptr [rax], 0 loc_A8B1A: push rbp mov rbp, rsp sub rsp, 10h xor eax, eax mov [rdi+0C0h], rax mov [rdi+20h], rax or r8, 4 mov [rsp+18h+var_18], r8 mov esi, 0FFFFFFFFh mov rdx, rcx mov ecx, 2 xor r8d, r8d xor r9d, r9d call init_io_cache test eax, eax setnz al add rsp, 10h pop rbp retn
bool open_cached_file(long long a1, long long a2, long long a3, unsigned long long a4, long long a5) { _WORD *v5; // rax *(_QWORD *)(a1 + 200) = a2; v5 = (_WORD *)(a1 + 208); if ( a3 ) { *(_BYTE *)(a1 + 210) = *(_BYTE *)(a3 + 2); *v5 = *(_WORD *)a3; } else { *(_BYTE *)v5 = 0; } *(_QWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; return (unsigned int)init_io_cache(a1, (const char *)0xFFFFFFFFLL, a4, 2, 0LL, 0, a5 | 4) != 0; }
open_cached_file: MOV qword ptr [RDI + 0xc8],RSI LEA RAX,[RDI + 0xd0] TEST RDX,RDX JZ 0x001a8b17 MOV SIL,byte ptr [RDX + 0x2] MOV byte ptr [RAX + 0x2],SIL MOVZX EDX,word ptr [RDX] MOV word ptr [RAX],DX JMP 0x001a8b1a LAB_001a8b17: MOV byte ptr [RAX],0x0 LAB_001a8b1a: PUSH RBP MOV RBP,RSP SUB RSP,0x10 XOR EAX,EAX MOV qword ptr [RDI + 0xc0],RAX MOV qword ptr [RDI + 0x20],RAX OR R8,0x4 MOV qword ptr [RSP],R8 MOV ESI,0xffffffff MOV RDX,RCX MOV ECX,0x2 XOR R8D,R8D XOR R9D,R9D CALL 0x001951da TEST EAX,EAX SETNZ AL ADD RSP,0x10 POP RBP RET
bool open_cached_file(long param_1,int8 param_2,int2 *param_3,int8 param_4, ulong param_5) { int iVar1; *(int8 *)(param_1 + 200) = param_2; if (param_3 == (int2 *)0x0) { *(int1 *)(param_1 + 0xd0) = 0; } else { *(int1 *)(param_1 + 0xd2) = *(int1 *)(param_3 + 1); *(int2 *)(param_1 + 0xd0) = *param_3; } *(int8 *)(param_1 + 0xc0) = 0; *(int8 *)(param_1 + 0x20) = 0; iVar1 = init_io_cache(param_1,0xffffffff,param_4,2,0,0,param_5 | 4); return iVar1 != 0; }
49,130
CLI::ExcludesError::ExcludesError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp
ExcludesError(std::string curname, std::string subname) : ExcludesError(curname + " excludes " + subname, ExitCodes::ExcludesError) {}
O1
cpp
CLI::ExcludesError::ExcludesError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movl %edx, %ebp movq %rsi, %r15 movq %rdi, %r14 leaq 0x30(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x10d65(%rip), %rsi # 0x37a07 leaq 0x10d6b(%rip), %rdx # 0x37a14 leaq 0x20(%rsp), %rdi callq 0x12040 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq (%r15), %rcx leaq 0x10(%r15), %rax cmpq %rax, %rcx je 0x26cd7 movq %rcx, (%rsp) movq (%rax), %rcx movq %rcx, 0x10(%rsp) jmp 0x26cdf movups (%rax), %xmm0 movups %xmm0, (%r12) movq 0x8(%r15), %rcx movq %rsp, %rdx movq %rcx, 0x8(%rdx) movq %rax, (%r15) movq $0x0, 0x8(%r15) movb $0x0, 0x10(%r15) leaq 0x20(%rsp), %rsi movq %r14, %rdi movl %ebp, %ecx callq 0x161b0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x26d1f movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 movq 0x20(%rsp), %rdi cmpq %rbx, %rdi je 0x26d36 movq 0x30(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x22a13(%rip), %rax # 0x49750 movq %rax, (%r14) addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x26d66 movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x20(%rsp), %rdi movq %rbx, %rsi callq 0x7b57 movq %r14, %rdi callq 0x7780 nop
_ZN3CLI13ExcludesErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9ExitCodesE: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov ebp, edx mov r15, rsi mov r14, rdi lea rbx, [rsp+68h+var_38] mov [rbx-10h], rbx lea rsi, aExcludeserror; "ExcludesError" lea rdx, aExcludeserror+0Dh; "" lea rdi, [rsp+68h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rcx, [r15] lea rax, [r15+10h] cmp rcx, rax jz short loc_26CD7 mov [rsp+68h+var_68], rcx mov rcx, [rax] mov [rsp+68h+var_58], rcx jmp short loc_26CDF loc_26CD7: movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 loc_26CDF: mov rcx, [r15+8] mov rdx, rsp mov [rdx+8], rcx mov [r15], rax mov qword ptr [r15+8], 0 mov byte ptr [r15+10h], 0 lea rsi, [rsp+68h+var_48] mov rdi, r14; int mov ecx, ebp call _ZN3CLI10ParseErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_9ExitCodesE; CLI::ParseError::ParseError(std::string,std::string,CLI::ExitCodes) mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_26D1F mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_26D1F: mov rdi, [rsp+68h+var_48]; void * cmp rdi, rbx jz short loc_26D36 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_26D36: lea rax, off_49750 mov [r14], rax add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rsp+0]; void * cmp rdi, r12 jz short loc_26D66 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_26D66: lea rdi, [rsp+arg_18] mov rsi, rbx call _ZN3CLI13ExcludesErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9ExitCodesE_cold_1; CLI::ExcludesError::ExcludesError(std::string,CLI::ExitCodes) [clone] mov rdi, r14 call __Unwind_Resume
void ( ** CLI::ExcludesError::ExcludesError( _QWORD *a1, long long a2, int a3))(CLI::Error *__hidden this) { int v4; // r8d int v5; // r9d __int128 *v6; // rax void ( **result)(CLI::Error *__hidden); // rax void *v8[2]; // [rsp+0h] [rbp-68h] BYREF __int128 v9; // [rsp+10h] [rbp-58h] BYREF void *v10[2]; // [rsp+20h] [rbp-48h] BYREF _QWORD v11[7]; // [rsp+30h] [rbp-38h] BYREF v10[0] = v11; std::string::_M_construct<char const*>(v10, "ExcludesError", (long long)""); v8[0] = &v9; v6 = (__int128 *)(a2 + 16); if ( *(_QWORD *)a2 == a2 + 16 ) { v9 = *v6; } else { v8[0] = *(void **)a2; *(_QWORD *)&v9 = *(_QWORD *)v6; } v8[1] = *(void **)(a2 + 8); *(_QWORD *)a2 = v6; *(_QWORD *)(a2 + 8) = 0LL; *(_BYTE *)(a2 + 16) = 0; CLI::ParseError::ParseError(a1, (long long)v10, (long long)v8, a3, v4, v5); if ( v8[0] != &v9 ) operator delete(v8[0], v9 + 1); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); result = off_49750; *a1 = off_49750; return result; }
ExcludesError: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV EBP,EDX MOV R15,RSI MOV R14,RDI LEA RBX,[RSP + 0x30] MOV qword ptr [RBX + -0x10],RBX LEA RSI,[0x137a07] LEA RDX,[0x137a14] LEA RDI,[RSP + 0x20] CALL 0x00112040 LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RCX,qword ptr [R15] LEA RAX,[R15 + 0x10] CMP RCX,RAX JZ 0x00126cd7 MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RCX JMP 0x00126cdf LAB_00126cd7: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 LAB_00126cdf: MOV RCX,qword ptr [R15 + 0x8] MOV RDX,RSP MOV qword ptr [RDX + 0x8],RCX MOV qword ptr [R15],RAX MOV qword ptr [R15 + 0x8],0x0 MOV byte ptr [R15 + 0x10],0x0 LAB_00126cfa: LEA RSI,[RSP + 0x20] MOV RDI,R14 MOV ECX,EBP CALL 0x001161b0 LAB_00126d09: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x00126d1f MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00107430 LAB_00126d1f: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,RBX JZ 0x00126d36 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00107430 LAB_00126d36: LEA RAX,[0x149750] MOV qword ptr [R14],RAX ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* CLI::ExcludesError::ExcludesError(std::__cxx11::string, CLI::ExitCodes) */ void __thiscall CLI::ExcludesError::ExcludesError(ExcludesError *this,long *param_2,int4 param_3) { long *plVar1; long *local_68; long local_60; long local_58; int4 uStack_50; int4 uStack_4c; long *local_48 [2]; long local_38 [2]; local_48[0] = local_38; std::__cxx11::string::_M_construct<char_const*>(local_48,"ExcludesError",""); plVar1 = param_2 + 2; if ((long *)*param_2 == plVar1) { local_58 = *plVar1; uStack_50 = (int4)param_2[3]; uStack_4c = *(int4 *)((long)param_2 + 0x1c); local_68 = &local_58; } else { local_58 = *plVar1; local_68 = (long *)*param_2; } local_60 = param_2[1]; *param_2 = (long)plVar1; param_2[1] = 0; *(int1 *)(param_2 + 2) = 0; /* try { // try from 00126cfa to 00126d08 has its CatchHandler @ 00126d4d */ ParseError::ParseError((ParseError *)this,local_48,&local_68,param_3); if (local_68 != &local_58) { operator_delete(local_68,local_58 + 1); } if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } *(int ***)this = &PTR__Error_00149750; return; }
49,131
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { // https://jinja.palletsprojects.com/en/3.0.x/templates/#for if (!iterable) throw std::runtime_error("ForNode.iterable is null"); if (!body) throw std::runtime_error("ForNode.body is null"); auto iterable_value = iterable->evaluate(context); Value::CallableType loop_function; std::function<void(Value&)> visit = [&](Value& iter) { auto filtered_items = Value::array(); if (!iter.is_null()) { if (!iterable_value.is_iterable()) { throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump()); } iterable_value.for_each([&](Value & item) { destructuring_assign(var_names, context, item); if (!condition || condition->evaluate(context).to_bool()) { filtered_items.push_back(item); } }); } if (filtered_items.empty()) { if (else_body) { else_body->render(out, context); } } else { auto loop = recursive ? Value::callable(loop_function) : Value::object(); loop.set("length", (int64_t) filtered_items.size()); size_t cycle_index = 0; loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.empty() || !args.kwargs.empty()) { throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg"); } auto item = args.args[cycle_index]; cycle_index = (cycle_index + 1) % args.args.size(); return item; })); auto loop_context = Context::make(Value::object(), context); loop_context->set("loop", loop); for (size_t i = 0, n = filtered_items.size(); i < n; ++i) { auto & item = filtered_items.at(i); destructuring_assign(var_names, loop_context, item); loop.set("index", (int64_t) i + 1); loop.set("index0", (int64_t) i); loop.set("revindex", (int64_t) (n - i)); loop.set("revindex0", (int64_t) (n - i - 1)); loop.set("length", (int64_t) n); loop.set("first", i == 0); loop.set("last", i == (n - 1)); loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value()); loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value()); try { body->render(out, loop_context); } catch (const LoopControlException & e) { if (e.control_type == LoopControlType::Break) break; if (e.control_type == LoopControlType::Continue) continue; } } } }; if (recursive) { loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) { throw std::runtime_error("loop() expects exactly 1 positional iterable argument"); } auto & items = args.args[0]; visit(items); return Value(); }; } visit(iterable_value); }
O1
cpp
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq 0x38(%rdi), %rsi testq %rsi, %rsi je 0x9b6b9 movq %rdi, %rbx cmpq $0x0, 0x58(%rdi) je 0x9b6d7 movq %rdx, %r15 leaq 0x48(%rsp), %r12 movq %r12, %rdi callq 0x86b3e xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movl $0x28, %edi callq 0x1b8a0 movq %r12, (%rax) movq %rbx, 0x8(%rax) movq %r15, 0x10(%rax) movq %r14, 0x18(%rax) leaq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq %rax, (%rsp) leaq 0x32f(%rip), %rax # 0x9b8ea movq %rax, 0x18(%rsp) leaq 0x32b(%rip), %rax # 0x9b8f2 movq %rax, 0x10(%rsp) cmpb $0x1, 0x68(%rbx) jne 0x9b5e7 movq %rsp, %rax leaq 0x40(%rsp), %rsi movq %rax, (%rsi) leaq 0x20(%rsp), %rdi callq 0x9b866 cmpq $0x0, 0x10(%rsp) je 0x9b709 movq %rsp, %rdi leaq 0x48(%rsp), %rsi callq *0x18(%rdi) movq 0x10(%rsp), %rax testq %rax, %rax je 0x9b615 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0x9b62e leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x88(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5869e movq %rbx, %rdi callq 0x5de8a movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x9b656 callq 0x6d7f6 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x9b665 callq 0x6d7f6 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x9b674 callq 0x6d7f6 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x9b6aa movq 0x948fb(%rip), %rax # 0x12ff80 cmpb $0x0, (%rax) je 0x9b695 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9b69f movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9b6aa movq (%rdi), %rax callq *0x18(%rax) addq $0x98, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x1b440 movq %rax, %r14 leaq 0x592d5(%rip), %rsi # 0xf49a2 movq %rax, %rdi callq 0x1b320 jmp 0x9b6f3 movl $0x10, %edi callq 0x1b440 movq %rax, %r14 leaq 0x592d0(%rip), %rsi # 0xf49bb movq %rax, %rdi callq 0x1b320 movq 0x948ee(%rip), %rsi # 0x12ffe8 movq 0x9484f(%rip), %rdx # 0x12ff50 movq %r14, %rdi callq 0x1bf00 callq 0x1b310 jmp 0x9b710 movq %rax, %rbx movq %r14, %rdi callq 0x1b660 jmp 0x9b763 jmp 0x9b76d jmp 0x9b76d movq %rax, %rbx jmp 0x9b740 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x9b740 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0x9b759 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x48(%rsp), %rdi callq 0x86e34 movq %rbx, %rdi callq 0x1bf90 jmp 0x9b76d movq %rax, %rdi callq 0x21597 nop
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 98h mov r14, rsi mov rsi, [rdi+38h] test rsi, rsi jz loc_9B6B9 mov rbx, rdi cmp qword ptr [rdi+58h], 0 jz loc_9B6D7 mov r15, rdx lea r12, [rsp+0B8h+var_70] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) xorps xmm0, xmm0 movaps [rsp+0B8h+var_88], xmm0 movaps [rsp+0B8h+var_98], xmm0 movaps [rsp+0B8h+var_A8], xmm0 movaps [rsp+0B8h+var_B8], xmm0 mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], r12 mov [rax+8], rbx mov [rax+10h], r15 mov [rax+18h], r14 lea rcx, [rsp+0B8h+var_98] mov [rax+20h], rcx mov qword ptr [rsp+0B8h+var_B8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov qword ptr [rsp+0B8h+var_A8+8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSJ_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov qword ptr [rsp+0B8h+var_A8], rax cmp byte ptr [rbx+68h], 1 jnz short loc_9B5E7 mov rax, rsp lea rsi, [rsp+0B8h+var_78] mov [rsi], rax lea rdi, [rsp+0B8h+var_98] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_ loc_9B5E7: cmp qword ptr [rsp+0B8h+var_A8], 0 jz loc_9B709 mov rdi, rsp lea rsi, [rsp+0B8h+var_70] call qword ptr [rdi+18h] mov rax, qword ptr [rsp+0B8h+var_A8] test rax, rax jz short loc_9B615 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_9B615: mov rax, qword ptr [rsp+0B8h+var_88] test rax, rax jz short loc_9B62E lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_9B62E: lea rbx, [rsp+0B8h+var_30] mov rdi, rbx 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, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_9B656 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B656: mov rdi, [rsp+0B8h+var_48] test rdi, rdi jz short loc_9B665 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B665: mov rdi, [rsp+0B8h+var_58] test rdi, rdi jz short loc_9B674 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B674: mov rdi, [rsp+0B8h+var_68] test rdi, rdi jz short loc_9B6AA mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9B695 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9B69F loc_9B695: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9B69F: cmp eax, 1 jnz short loc_9B6AA mov rax, [rdi] call qword ptr [rax+18h] loc_9B6AA: add rsp, 98h pop rbx pop r12 pop r14 pop r15 retn loc_9B6B9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeIterabl; "ForNode.iterable is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_9B6F3 loc_9B6D7: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeBodyIsN; "ForNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_9B6F3: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_9B709: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short $+2 loc_9B710: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_9B763 jmp short loc_9B76D jmp short loc_9B76D mov rbx, rax jmp short loc_9B740 mov rbx, rax mov rax, qword ptr [rsp+0B8h+var_A8] test rax, rax jz short loc_9B740 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_9B740: mov rax, qword ptr [rsp+0B8h+var_88] test rax, rax jz short loc_9B759 lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_9B759: lea rdi, [rsp+0B8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_9B763: mov rdi, rbx call __Unwind_Resume jmp short $+2 loc_9B76D: mov rdi, rax call __clang_call_terminate
long long minja::ForNode::do_render(long long a1, long long a2, long long a3) { void (***v4)(void); // rsi _QWORD *v6; // rax long long result; // rax long long v8; // rdi std::runtime_error *exception; // r14 __int128 v10; // [rsp+0h] [rbp-B8h] BYREF long long ( *v11)(); // [rsp+10h] [rbp-A8h] long long ( *v12)(); // [rsp+18h] [rbp-A0h] __int128 v13; // [rsp+20h] [rbp-98h] BYREF __int128 v14; // [rsp+30h] [rbp-88h] __int128 *v15; // [rsp+40h] [rbp-78h] _BYTE v16[8]; // [rsp+48h] [rbp-70h] BYREF long long v17; // [rsp+50h] [rbp-68h] volatile signed __int32 *v18; // [rsp+60h] [rbp-58h] volatile signed __int32 *v19; // [rsp+70h] [rbp-48h] volatile signed __int32 *v20; // [rsp+80h] [rbp-38h] char v21[48]; // [rsp+88h] [rbp-30h] BYREF v4 = *(void (****)(void))(a1 + 56); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.iterable is null"); goto LABEL_25; } if ( !*(_QWORD *)(a1 + 88) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.body is null"); LABEL_25: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v16, v4); v14 = 0LL; v13 = 0LL; v10 = 0LL; v6 = (_QWORD *)operator new(0x28uLL); *v6 = v16; v6[1] = a1; v6[2] = a3; v6[3] = a2; v6[4] = &v13; *(_QWORD *)&v10 = v6; v12 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke; v11 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager; if ( *(_BYTE *)(a1 + 104) == 1 ) { v15 = &v10; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(&v13); } if ( !v11 ) std::__throw_bad_function_call(); ((void ( *)(__int128 *, _BYTE *))v12)(&v10, v16); if ( v11 ) ((void ( *)(__int128 *, __int128 *, long long))v11)(&v10, &v10, 3LL); if ( (_QWORD)v14 ) ((void ( *)(__int128 *, __int128 *, long long))v14)(&v13, &v13, 3LL); 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(v21); result = 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(v21); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( v18 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); v8 = v17; if ( v17 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v17 + 12); *(_DWORD *)(v17 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL); } return result; }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RSI MOV RSI,qword ptr [RDI + 0x38] TEST RSI,RSI JZ 0x0019b6b9 MOV RBX,RDI CMP qword ptr [RDI + 0x58],0x0 JZ 0x0019b6d7 MOV R15,RDX LEA R12,[RSP + 0x48] MOV RDI,R12 CALL 0x00186b3e XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 LAB_0019b58e: MOV EDI,0x28 CALL 0x0011b8a0 MOV qword ptr [RAX],R12 MOV qword ptr [RAX + 0x8],RBX MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x18],R14 LEA RCX,[RSP + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV qword ptr [RSP],RAX LEA RAX,[0x19b8ea] MOV qword ptr [RSP + 0x18],RAX LEA RAX,[0x19b8f2] MOV qword ptr [RSP + 0x10],RAX CMP byte ptr [RBX + 0x68],0x1 JNZ 0x0019b5e7 MOV RAX,RSP LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],RAX LEA RDI,[RSP + 0x20] CALL 0x0019b866 LAB_0019b5e7: CMP qword ptr [RSP + 0x10],0x0 JZ 0x0019b709 LAB_0019b5f3: MOV RDI,RSP LEA RSI,[RSP + 0x48] CALL qword ptr [RDI + 0x18] MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0019b615 LAB_0019b608: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019b615: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x0019b62e LAB_0019b61f: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019b62e: LEA RBX,[RSP + 0x88] MOV RDI,RBX XOR ESI,ESI CALL 0x0015869e MOV RDI,RBX CALL 0x0015de8a MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x0019b656 CALL 0x0016d7f6 LAB_0019b656: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x0019b665 CALL 0x0016d7f6 LAB_0019b665: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x0019b674 CALL 0x0016d7f6 LAB_0019b674: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0019b6aa MOV RAX,qword ptr [0x0022ff80] CMP byte ptr [RAX],0x0 JZ 0x0019b695 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019b69f LAB_0019b695: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019b69f: CMP EAX,0x1 JNZ 0x0019b6aa MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019b6aa: ADD RSP,0x98 POP RBX POP R12 POP R14 POP R15 RET LAB_0019b6b9: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_0019b6c6: LEA RSI,[0x1f49a2] MOV RDI,RAX CALL 0x0011b320 LAB_0019b6d5: JMP 0x0019b6f3 LAB_0019b6d7: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_0019b6e4: LEA RSI,[0x1f49bb] MOV RDI,RAX CALL 0x0011b320 LAB_0019b6f3: MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R14 CALL 0x0011bf00 LAB_0019b709: CALL 0x0011b310
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int iVar2; runtime_error *this_00; int8 *local_b8; int8 uStack_b0; code *local_a8; code *pcStack_a0; int8 local_98; int8 uStack_90; code *local_88; int8 uStack_80; int1 *local_78; Expression local_70 [8]; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; data local_30 [16]; if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019b6c6 to 0019b6d4 has its CatchHandler @ 0019b710 */ std::runtime_error::runtime_error(this_00,"ForNode.iterable is null"); } else { if (*(long *)(this + 0x58) != 0) { Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38)); local_88 = (code *)0x0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; local_a8 = (code *)0x0; pcStack_a0 = (code *)0x0; local_b8 = (int8 *)0x0; uStack_b0 = 0; /* try { // try from 0019b58e to 0019b597 has its CatchHandler @ 0019b721 */ local_b8 = (int8 *)operator_new(0x28); *local_b8 = local_70; local_b8[1] = this; local_b8[2] = param_2; local_b8[3] = param_1; local_b8[4] = &local_98; pcStack_a0 = std:: _Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_invoke; local_a8 = std:: _Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_manager; if (this[0x68] == (ForNode)0x1) { local_78 = (int1 *)&local_b8; std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> *)&local_98, (_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *) &local_78); } if (local_a8 != (code *)0x0) { /* try { // try from 0019b5f3 to 0019b5fd has its CatchHandler @ 0019b726 */ (*pcStack_a0)(&local_b8,local_70); if (local_a8 != (code *)0x0) { /* try { // try from 0019b608 to 0019b614 has its CatchHandler @ 0019b71f */ (*local_a8)(&local_b8,&local_b8,3); } if (local_88 != (code *)0x0) { /* try { // try from 0019b61f to 0019b62d has its CatchHandler @ 0019b71d */ (*local_88)(&local_98,&local_98,3); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_30,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_30); 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); } if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_0022ff80 == '\0') { LOCK(); piVar1 = (int *)((long)local_68 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_68 + 0xc); *(int *)((long)local_68 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_68 + 0x18))(); } } return; } /* WARNING: Subroutine does not return */ /* try { // try from 0019b709 to 0019b70d has its CatchHandler @ 0019b726 */ std::__throw_bad_function_call(); } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019b6e4 to 0019b6f2 has its CatchHandler @ 0019b70e */ std::runtime_error::runtime_error(this_00,"ForNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); }
49,132
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { // https://jinja.palletsprojects.com/en/3.0.x/templates/#for if (!iterable) throw std::runtime_error("ForNode.iterable is null"); if (!body) throw std::runtime_error("ForNode.body is null"); auto iterable_value = iterable->evaluate(context); Value::CallableType loop_function; std::function<void(Value&)> visit = [&](Value& iter) { auto filtered_items = Value::array(); if (!iter.is_null()) { if (!iterable_value.is_iterable()) { throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump()); } iterable_value.for_each([&](Value & item) { destructuring_assign(var_names, context, item); if (!condition || condition->evaluate(context).to_bool()) { filtered_items.push_back(item); } }); } if (filtered_items.empty()) { if (else_body) { else_body->render(out, context); } } else { auto loop = recursive ? Value::callable(loop_function) : Value::object(); loop.set("length", (int64_t) filtered_items.size()); size_t cycle_index = 0; loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.empty() || !args.kwargs.empty()) { throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg"); } auto item = args.args[cycle_index]; cycle_index = (cycle_index + 1) % args.args.size(); return item; })); auto loop_context = Context::make(Value::object(), context); loop_context->set("loop", loop); for (size_t i = 0, n = filtered_items.size(); i < n; ++i) { auto & item = filtered_items.at(i); destructuring_assign(var_names, loop_context, item); loop.set("index", (int64_t) i + 1); loop.set("index0", (int64_t) i); loop.set("revindex", (int64_t) (n - i)); loop.set("revindex0", (int64_t) (n - i - 1)); loop.set("length", (int64_t) n); loop.set("first", i == 0); loop.set("last", i == (n - 1)); loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value()); loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value()); try { body->render(out, loop_context); } catch (const LoopControlException & e) { if (e.control_type == LoopControlType::Break) break; if (e.control_type == LoopControlType::Continue) continue; } } } }; if (recursive) { loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) { throw std::runtime_error("loop() expects exactly 1 positional iterable argument"); } auto & items = args.args[0]; visit(items); return Value(); }; } visit(iterable_value); }
O2
cpp
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rsi, %r14 movq 0x38(%rdi), %rsi testq %rsi, %rsi je 0x74262 movq %rdi, %rbx cmpq $0x0, 0x58(%rdi) je 0x7427e movq %rdx, %r15 leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x6371a xorps %xmm0, %xmm0 movq %rsp, %rax movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) leaq 0x40(%rsp), %rsi movq %r12, (%rsi) movq %rbx, 0x8(%rsi) movq %r15, 0x10(%rsi) movq %r14, 0x18(%rsi) movq %rax, 0x20(%rsi) leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x7434a cmpb $0x1, 0x68(%rbx) jne 0x74228 leaq 0x40(%rsp), %rsi movq %r14, (%rsi) movq %rsp, %rdi callq 0x74392 leaq 0x20(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x6e4f4 leaq 0x20(%rsp), %rdi callq 0x48930 movq %rsp, %rdi callq 0x48930 leaq 0x68(%rsp), %rdi callq 0x639aa addq $0xb8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 leaq 0x4270e(%rip), %rsi # 0xb6982 movq %rax, %rdi callq 0x24320 jmp 0x74298 pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r14 leaq 0x4270b(%rip), %rsi # 0xb699b movq %rax, %rdi callq 0x24320 movq 0x8cd51(%rip), %rsi # 0x100ff0 movq 0x8ccaa(%rip), %rdx # 0x100f50 movq %r14, %rdi callq 0x24ef0 jmp 0x742b0 movq %rax, %rbx movq %r14, %rdi callq 0x24680 jmp 0x742e1 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x48930 jmp 0x742cf movq %rax, %rbx movq %rsp, %rdi callq 0x48930 leaq 0x68(%rsp), %rdi callq 0x639aa movq %rbx, %rdi callq 0x24f80 nop
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0B8h mov r14, rsi mov rsi, [rdi+38h] test rsi, rsi jz loc_74262 mov rbx, rdi cmp qword ptr [rdi+58h], 0 jz loc_7427E mov r15, rdx lea r12, [rsp+0D8h+var_70] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) xorps xmm0, xmm0 mov rax, rsp movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax], xmm0 lea rsi, [rsp+0D8h+var_98] mov [rsi], r12 mov [rsi+8], rbx mov [rsi+10h], r15 mov [rsi+18h], r14 mov [rsi+20h], rax lea r14, [rsp+0D8h+var_B8] mov rdi, r14 call _ZNSt8functionIFvRN5minja5ValueEEEC2IZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_vEEOT_; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1} &&) cmp byte ptr [rbx+68h], 1 jnz short loc_74228 lea rsi, [rsp+0D8h+var_98] mov [rsi], r14 mov rdi, rsp call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_ loc_74228: lea rdi, [rsp+0D8h+var_B8] lea rsi, [rsp+0D8h+var_70] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) lea rdi, [rsp+0D8h+var_B8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+0D8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add rsp, 0B8h pop rbx pop r12 pop r14 pop r15 retn loc_74262: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeIterabl; "ForNode.iterable is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_74298 loc_7427E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeBodyIsN; "ForNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_74298: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short $+2 loc_742B0: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_742E1 mov rbx, rax lea rdi, [rsp+0D8h+var_B8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_742CF mov rbx, rax loc_742CF: mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+0D8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_742E1: mov rdi, rbx call __Unwind_Resume
void minja::ForNode::do_render(long long a1, long long a2, long long a3) { void (***v4)(void); // rsi long long v6; // rdx long long v7; // rcx long long v8; // r8 long long v9; // r9 std::runtime_error *exception; // r14 _BYTE v11[32]; // [rsp+0h] [rbp-D8h] BYREF _BYTE v12[32]; // [rsp+20h] [rbp-B8h] BYREF _QWORD v13[5]; // [rsp+40h] [rbp-98h] BYREF _BYTE v14[112]; // [rsp+68h] [rbp-70h] BYREF v4 = *(void (****)(void))(a1 + 56); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.iterable is null"); goto LABEL_8; } if ( !*(_QWORD *)(a1 + 88) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.body is null"); LABEL_8: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v14, v4); v13[0] = v14; v13[1] = a1; v13[2] = a3; v13[3] = a2; v13[4] = v11; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>( v12, v13, v6, v7, v8, v9, 0LL, 0LL, 0LL, 0LL); if ( *(_BYTE *)(a1 + 104) == 1 ) { v13[0] = v12; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(v11); } std::function<void ()(minja::Value &)>::operator()((long long)v12); std::_Function_base::~_Function_base((std::_Function_base *)v12); std::_Function_base::~_Function_base((std::_Function_base *)v11); minja::Value::~Value((minja::Value *)v14); }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RSI MOV RSI,qword ptr [RDI + 0x38] TEST RSI,RSI JZ 0x00174262 MOV RBX,RDI CMP qword ptr [RDI + 0x58],0x0 JZ 0x0017427e MOV R15,RDX LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x0016371a XORPS XMM0,XMM0 MOV RAX,RSP MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX],XMM0 LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],R12 MOV qword ptr [RSI + 0x8],RBX MOV qword ptr [RSI + 0x10],R15 MOV qword ptr [RSI + 0x18],R14 MOV qword ptr [RSI + 0x20],RAX LAB_00174205: LEA R14,[RSP + 0x20] MOV RDI,R14 CALL 0x0017434a CMP byte ptr [RBX + 0x68],0x1 JNZ 0x00174228 LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],R14 MOV RDI,RSP CALL 0x00174392 LAB_00174228: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x68] CALL 0x0016e4f4 LAB_00174237: LEA RDI,[RSP + 0x20] CALL 0x00148930 MOV RDI,RSP CALL 0x00148930 LEA RDI,[RSP + 0x68] CALL 0x001639aa ADD RSP,0xb8 POP RBX POP R12 POP R14 POP R15 RET LAB_00174262: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_0017426d: LEA RSI,[0x1b6982] MOV RDI,RAX CALL 0x00124320 LAB_0017427c: JMP 0x00174298 LAB_0017427e: PUSH 0x10 POP RDI CALL 0x00124460 MOV R14,RAX LAB_00174289: LEA RSI,[0x1b699b] MOV RDI,RAX CALL 0x00124320 LAB_00174298: MOV RSI,qword ptr [0x00200ff0] MOV RDX,qword ptr [0x00200f50] MOV RDI,R14 CALL 0x00124ef0
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2) { runtime_error *this_00; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; _lambda_minja__Value___1_ local_b8 [32]; Expression *local_98; ForNode *local_90; shared_ptr *local_88; ostringstream *local_80; int1 *local_78; Expression local_70 [80]; if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017426d to 0017427b has its CatchHandler @ 001742b0 */ std::runtime_error::runtime_error(this_00,"ForNode.iterable is null"); } else { if (*(long *)(this + 0x58) != 0) { Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38)); local_c8 = 0; uStack_c0 = 0; local_d8 = 0; uStack_d0 = 0; /* try { // try from 00174205 to 00174211 has its CatchHandler @ 001742cc */ local_98 = local_70; local_90 = this; local_88 = param_2; local_80 = param_1; local_78 = (int1 *)&local_d8; std::function<void(minja::Value&)>:: function<minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::_lambda(minja::Value&)_1_,void> (local_b8); if (this[0x68] == (ForNode)0x1) { local_98 = (Expression *)local_b8; std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> *)&local_d8, (_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *) &local_98); } /* try { // try from 00174228 to 00174236 has its CatchHandler @ 001742bd */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)local_b8,(Value *)local_70); std::_Function_base::~_Function_base((_Function_base *)local_b8); std::_Function_base::~_Function_base((_Function_base *)&local_d8); Value::~Value((Value *)local_70); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00174289 to 00174297 has its CatchHandler @ 001742ae */ std::runtime_error::runtime_error(this_00,"ForNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50); }
49,133
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { // https://jinja.palletsprojects.com/en/3.0.x/templates/#for if (!iterable) throw std::runtime_error("ForNode.iterable is null"); if (!body) throw std::runtime_error("ForNode.body is null"); auto iterable_value = iterable->evaluate(context); Value::CallableType loop_function; std::function<void(Value&)> visit = [&](Value& iter) { auto filtered_items = Value::array(); if (!iter.is_null()) { if (!iterable_value.is_iterable()) { throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump()); } iterable_value.for_each([&](Value & item) { destructuring_assign(var_names, context, item); if (!condition || condition->evaluate(context).to_bool()) { filtered_items.push_back(item); } }); } if (filtered_items.empty()) { if (else_body) { else_body->render(out, context); } } else { auto loop = recursive ? Value::callable(loop_function) : Value::object(); loop.set("length", (int64_t) filtered_items.size()); size_t cycle_index = 0; loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.empty() || !args.kwargs.empty()) { throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg"); } auto item = args.args[cycle_index]; cycle_index = (cycle_index + 1) % args.args.size(); return item; })); auto loop_context = Context::make(Value::object(), context); loop_context->set("loop", loop); for (size_t i = 0, n = filtered_items.size(); i < n; ++i) { auto & item = filtered_items.at(i); destructuring_assign(var_names, loop_context, item); loop.set("index", (int64_t) i + 1); loop.set("index0", (int64_t) i); loop.set("revindex", (int64_t) (n - i)); loop.set("revindex0", (int64_t) (n - i - 1)); loop.set("length", (int64_t) n); loop.set("first", i == 0); loop.set("last", i == (n - 1)); loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value()); loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value()); try { body->render(out, loop_context); } catch (const LoopControlException & e) { if (e.control_type == LoopControlType::Break) break; if (e.control_type == LoopControlType::Continue) continue; } } } }; if (recursive) { loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) { throw std::runtime_error("loop() expects exactly 1 positional iterable argument"); } auto & items = args.args[0]; visit(items); return Value(); }; } visit(iterable_value); }
O3
cpp
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq 0x38(%rdi), %rsi testq %rsi, %rsi je 0x9af92 movq %rdi, %rbx cmpq $0x0, 0x58(%rdi) je 0x9afb0 movq %rdx, %r15 leaq 0x48(%rsp), %r12 movq %r12, %rdi callq 0x86670 xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movq $0x0, 0x8(%rsp) movl $0x28, %edi callq 0x1b8a0 movq %r12, (%rax) movq %rbx, 0x8(%rax) movq %r15, 0x10(%rax) movq %r14, 0x18(%rax) leaq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq %rax, (%rsp) leaq 0x323(%rip), %rax # 0x9b1b4 movq %rax, 0x18(%rsp) leaq 0x31f(%rip), %rcx # 0x9b1bc movq %rcx, 0x10(%rsp) cmpb $0x0, 0x68(%rbx) je 0x9aecd movq %rsp, %rbx leaq 0x40(%rsp), %rsi movq %rbx, (%rsi) leaq 0x20(%rsp), %rdi callq 0x9b13e cmpq $0x0, 0x10(%rbx) je 0x9afe2 movq 0x18(%rsp), %rax movq %rsp, %rdi leaq 0x48(%rsp), %rsi callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0x9aeee movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0x9af07 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x88(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x590b4 movq %rbx, %rdi callq 0x5e5a2 movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x9af2f callq 0x6dfc6 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x9af3e callq 0x6dfc6 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x9af4d callq 0x6dfc6 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x9af83 movq 0x93022(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0x9af6e movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9af78 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9af83 movq (%rdi), %rax callq *0x18(%rax) addq $0x98, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x1b440 movq %rax, %r14 leaq 0x579ec(%rip), %rsi # 0xf2992 movq %rax, %rdi callq 0x1b320 jmp 0x9afcc movl $0x10, %edi callq 0x1b440 movq %rax, %r14 leaq 0x579e7(%rip), %rsi # 0xf29ab movq %rax, %rdi callq 0x1b320 movq 0x93015(%rip), %rsi # 0x12dfe8 movq 0x92f76(%rip), %rdx # 0x12df50 movq %r14, %rdi callq 0x1bf00 callq 0x1b310 jmp 0x9afe9 movq %rax, %rbx movq %r14, %rdi callq 0x1b660 jmp 0x9b03c jmp 0x9b046 jmp 0x9b046 movq %rax, %rbx jmp 0x9b019 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x9b019 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0x9b032 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x48(%rsp), %rdi callq 0x86962 movq %rbx, %rdi callq 0x1bf90 jmp 0x9b046 movq %rax, %rdi callq 0x21535
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 98h mov r14, rsi mov rsi, [rdi+38h] test rsi, rsi jz loc_9AF92 mov rbx, rdi cmp qword ptr [rdi+58h], 0 jz loc_9AFB0 mov r15, rdx lea r12, [rsp+0B8h+var_70] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) xorps xmm0, xmm0 movaps [rsp+0B8h+var_88], xmm0 movaps [rsp+0B8h+var_98], xmm0 mov [rsp+0B8h+var_B0], 0 mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], r12 mov [rax+8], rbx mov [rax+10h], r15 mov [rax+18h], r14 lea rcx, [rsp+0B8h+var_98] mov [rax+20h], rcx mov [rsp+0B8h+var_B8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov [rsp+0B8h+var_A0], rax lea rcx, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSJ_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+0B8h+var_A8], rcx cmp byte ptr [rbx+68h], 0 jz short loc_9AECD mov rbx, rsp lea rsi, [rsp+0B8h+var_78] mov [rsi], rbx lea rdi, [rsp+0B8h+var_98] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_ cmp qword ptr [rbx+10h], 0 jz loc_9AFE2 mov rax, [rsp+0B8h+var_A0] loc_9AECD: mov rdi, rsp lea rsi, [rsp+0B8h+var_70] call rax ; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &); std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov rax, [rsp+0B8h+var_A8] test rax, rax jz short loc_9AEEE mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_9AEEE: mov rax, qword ptr [rsp+0B8h+var_88] test rax, rax jz short loc_9AF07 lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_9AF07: lea rbx, [rsp+0B8h+var_30] mov rdi, rbx 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, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_9AF2F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9AF2F: mov rdi, [rsp+0B8h+var_48] test rdi, rdi jz short loc_9AF3E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9AF3E: mov rdi, [rsp+0B8h+var_58] test rdi, rdi jz short loc_9AF4D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9AF4D: mov rdi, [rsp+0B8h+var_68] test rdi, rdi jz short loc_9AF83 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9AF6E mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9AF78 loc_9AF6E: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9AF78: cmp eax, 1 jnz short loc_9AF83 mov rax, [rdi] call qword ptr [rax+18h] loc_9AF83: add rsp, 98h pop rbx pop r12 pop r14 pop r15 retn loc_9AF92: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeIterabl; "ForNode.iterable is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_9AFCC loc_9AFB0: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeBodyIsN; "ForNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_9AFCC: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_9AFE2: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short $+2 loc_9AFE9: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_9B03C jmp short loc_9B046 jmp short loc_9B046 mov rbx, rax jmp short loc_9B019 mov rbx, rax mov rax, [rsp+0B8h+var_A8] test rax, rax jz short loc_9B019 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_9B019: mov rax, qword ptr [rsp+0B8h+var_88] test rax, rax jz short loc_9B032 lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_9B032: lea rdi, [rsp+0B8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_9B03C: mov rdi, rbx call __Unwind_Resume jmp short $+2 loc_9B046: mov rdi, rax call __clang_call_terminate
long long minja::ForNode::do_render(long long a1, long long a2, long long a3) { void (***v4)(void); // rsi _QWORD *v6; // rax void ( *v7)(_QWORD *, _BYTE *); // rax long long result; // rax long long v9; // rdi std::runtime_error *exception; // r14 _QWORD v11[2]; // [rsp+0h] [rbp-B8h] BYREF long long ( *v12)(); // [rsp+10h] [rbp-A8h] void ( *v13)(_QWORD *, _BYTE *); // [rsp+18h] [rbp-A0h] __int128 v14; // [rsp+20h] [rbp-98h] BYREF __int128 v15; // [rsp+30h] [rbp-88h] _QWORD *v16; // [rsp+40h] [rbp-78h] _BYTE v17[8]; // [rsp+48h] [rbp-70h] BYREF long long v18; // [rsp+50h] [rbp-68h] volatile signed __int32 *v19; // [rsp+60h] [rbp-58h] volatile signed __int32 *v20; // [rsp+70h] [rbp-48h] volatile signed __int32 *v21; // [rsp+80h] [rbp-38h] char v22[48]; // [rsp+88h] [rbp-30h] BYREF v4 = *(void (****)(void))(a1 + 56); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.iterable is null"); goto LABEL_25; } if ( !*(_QWORD *)(a1 + 88) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.body is null"); LABEL_25: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v17, v4); v15 = 0LL; v14 = 0LL; v11[1] = 0LL; v6 = (_QWORD *)operator new(0x28uLL); *v6 = v17; v6[1] = a1; v6[2] = a3; v6[3] = a2; v6[4] = &v14; v11[0] = v6; v7 = (void ( *)(_QWORD *, _BYTE *))std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke; v13 = (void ( *)(_QWORD *, _BYTE *))std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke; v12 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager; if ( *(_BYTE *)(a1 + 104) ) { v16 = v11; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(&v14); if ( !v12 ) std::__throw_bad_function_call(); v7 = v13; } v7(v11, v17); if ( v12 ) ((void ( *)(_QWORD *, _QWORD *, long long))v12)(v11, v11, 3LL); if ( (_QWORD)v15 ) ((void ( *)(__int128 *, __int128 *, long long))v15)(&v14, &v14, 3LL); 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(v22); result = 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(v22); if ( v21 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); v9 = v18; if ( v18 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v18 + 12); *(_DWORD *)(v18 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } return result; }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RSI MOV RSI,qword ptr [RDI + 0x38] TEST RSI,RSI JZ 0x0019af92 MOV RBX,RDI CMP qword ptr [RDI + 0x58],0x0 JZ 0x0019afb0 MOV R15,RDX LEA R12,[RSP + 0x48] MOV RDI,R12 CALL 0x00186670 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x8],0x0 LAB_0019ae64: MOV EDI,0x28 CALL 0x0011b8a0 MOV qword ptr [RAX],R12 MOV qword ptr [RAX + 0x8],RBX MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x18],R14 LEA RCX,[RSP + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV qword ptr [RSP],RAX LEA RAX,[0x19b1b4] MOV qword ptr [RSP + 0x18],RAX LEA RCX,[0x19b1bc] MOV qword ptr [RSP + 0x10],RCX CMP byte ptr [RBX + 0x68],0x0 JZ 0x0019aecd MOV RBX,RSP LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],RBX LEA RDI,[RSP + 0x20] CALL 0x0019b13e CMP qword ptr [RBX + 0x10],0x0 JZ 0x0019afe2 MOV RAX,qword ptr [RSP + 0x18] LAB_0019aecd: MOV RDI,RSP LEA RSI,[RSP + 0x48] CALL RAX MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0019aeee LAB_0019aee1: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019aeee: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x0019af07 LAB_0019aef8: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019af07: LEA RBX,[RSP + 0x88] MOV RDI,RBX XOR ESI,ESI CALL 0x001590b4 MOV RDI,RBX CALL 0x0015e5a2 MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x0019af2f CALL 0x0016dfc6 LAB_0019af2f: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x0019af3e CALL 0x0016dfc6 LAB_0019af3e: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x0019af4d CALL 0x0016dfc6 LAB_0019af4d: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0019af83 MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x0019af6e MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019af78 LAB_0019af6e: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019af78: CMP EAX,0x1 JNZ 0x0019af83 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019af83: ADD RSP,0x98 POP RBX POP R12 POP R14 POP R15 RET LAB_0019af92: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_0019af9f: LEA RSI,[0x1f2992] MOV RDI,RAX CALL 0x0011b320 LAB_0019afae: JMP 0x0019afcc LAB_0019afb0: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_0019afbd: LEA RSI,[0x1f29ab] MOV RDI,RAX CALL 0x0011b320 LAB_0019afcc: MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,R14 CALL 0x0011bf00 LAB_0019afe2: CALL 0x0011b310
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int iVar2; runtime_error *this_00; int8 *local_b8; int8 local_b0; code *local_a8; code *local_a0; int8 local_98; int8 uStack_90; code *local_88; int8 uStack_80; int1 *local_78; Expression local_70 [8]; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; data local_30 [16]; if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019af9f to 0019afad has its CatchHandler @ 0019afe9 */ std::runtime_error::runtime_error(this_00,"ForNode.iterable is null"); } else { if (*(long *)(this + 0x58) != 0) { Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38)); local_88 = (code *)0x0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; local_b0 = 0; /* try { // try from 0019ae64 to 0019ae6d has its CatchHandler @ 0019affa */ local_b8 = (int8 *)operator_new(0x28); *local_b8 = local_70; local_b8[1] = this; local_b8[2] = param_2; local_b8[3] = param_1; local_b8[4] = &local_98; local_a0 = std:: _Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_invoke; local_a8 = std:: _Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_manager; if ((this[0x68] != (ForNode)0x0) && (local_78 = (int1 *)&local_b8, std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> *)&local_98, (_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *) &local_78), local_a8 == (code *)0x0)) { /* WARNING: Subroutine does not return */ /* try { // try from 0019afe2 to 0019afe6 has its CatchHandler @ 0019afff */ std::__throw_bad_function_call(); } /* try { // try from 0019aecd to 0019aed6 has its CatchHandler @ 0019afff */ (*local_a0)(&local_b8,local_70); if (local_a8 != (code *)0x0) { /* try { // try from 0019aee1 to 0019aeed has its CatchHandler @ 0019aff8 */ (*local_a8)(&local_b8,&local_b8,3); } if (local_88 != (code *)0x0) { /* try { // try from 0019aef8 to 0019af06 has its CatchHandler @ 0019aff6 */ (*local_88)(&local_98,&local_98,3); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_30,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_30); 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); } if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_68 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_68 + 0xc); *(int *)((long)local_68 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_68 + 0x18))(); } } return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019afbd to 0019afcb has its CatchHandler @ 0019afe7 */ std::runtime_error::runtime_error(this_00,"ForNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); }
49,134
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0xcbfc3 movq 0x78(%rdi), %r15 movq %rbx, %r12 movq %rbx, %r14 leaq -0x30(%rbp), %rdi movq %r12, %rsi callq 0xcf307 testl %eax, %eax je 0xcbfc3 movl %eax, %r13d movq -0x30(%rbp), %rdi cmpq (%r15), %rdi ja 0xcbfa4 movq 0x8(%r15), %rax movq %rdi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0xcbfa4 movzbl %dil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %edi movq %rdi, -0x30(%rbp) movq %r14, %rsi callq 0xcf423 testl %eax, %eax je 0xcbfc3 movl %r13d, %ecx movl %eax, %eax addq %rax, %r14 cmpb $0x0, (%r12,%rcx) leaq (%r12,%rcx), %r12 jne 0xcbf65 movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz short loc_CBFC3 mov r15, [rdi+78h] mov r12, rbx mov r14, rbx loc_CBF65: lea rdi, [rbp+var_30] mov rsi, r12 call my_mb_wc_utf8mb4_no_range test eax, eax jz short loc_CBFC3 mov r13d, eax mov rdi, [rbp+var_30] cmp rdi, [r15] ja short loc_CBFA4 mov rax, [r15+8] mov rcx, rdi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_CBFA4 movzx ecx, dil lea rcx, [rcx+rcx*2] mov edi, [rax+rcx*4] mov [rbp+var_30], rdi loc_CBFA4: mov rsi, r14 call my_wc_mb_utf8mb4_no_range test eax, eax jz short loc_CBFC3 mov ecx, r13d mov eax, eax add r14, rax cmp byte ptr [r12+rcx], 0 lea r12, [r12+rcx] jnz short loc_CBF65 loc_CBFC3: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_str_utf8mb4(long long a1, _BYTE *a2) { long long v2; // rax _BYTE *v3; // r14 _QWORD *v4; // r15 _BYTE *v5; // r12 unsigned int v6; // eax unsigned int v7; // r13d long long v8; // rdi long long v9; // rax unsigned int v10; // eax bool v11; // zf _QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF v13[0] = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD **)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_mb_wc_utf8mb4_no_range(v13, v5); if ( !v6 ) break; v7 = v6; v8 = v13[0]; if ( v13[0] <= *v4 ) { v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8)); if ( v9 ) { v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0])); v13[0] = v8; } } v10 = my_wc_mb_utf8mb4_no_range(v8, v3); if ( !v10 ) break; v3 += v10; v11 = v5[v7] == 0; v5 += v7; } while ( !v11 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x001cbfc3 MOV R15,qword ptr [RDI + 0x78] MOV R12,RBX MOV R14,RBX LAB_001cbf65: LEA RDI,[RBP + -0x30] MOV RSI,R12 CALL 0x001cf307 TEST EAX,EAX JZ 0x001cbfc3 MOV R13D,EAX MOV RDI,qword ptr [RBP + -0x30] CMP RDI,qword ptr [R15] JA 0x001cbfa4 MOV RAX,qword ptr [R15 + 0x8] MOV RCX,RDI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001cbfa4 MOVZX ECX,DIL LEA RCX,[RCX + RCX*0x2] MOV EDI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x30],RDI LAB_001cbfa4: MOV RSI,R14 CALL 0x001cf423 TEST EAX,EAX JZ 0x001cbfc3 MOV ECX,R13D MOV EAX,EAX ADD R14,RAX CMP byte ptr [R12 + RCX*0x1],0x0 LEA R12,[R12 + RCX*0x1] JNZ 0x001cbf65 LAB_001cbfc3: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { char *pcVar1; ulong *puVar2; long lVar3; uint uVar4; uint uVar5; ulong in_RAX; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { puVar2 = *(ulong **)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6); if (uVar4 == 0) break; if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0)) { local_38 = (ulong)*(uint *)(lVar3 + (local_38 & 0xff) * 0xc); } uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7); if (uVar5 == 0) break; pcVar7 = pcVar7 + uVar5; pcVar1 = pcVar6 + uVar4; pcVar6 = pcVar6 + uVar4; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
49,135
my_once_alloc
eloqsql/mysys/my_once.c
void* my_once_alloc(size_t Size, myf MyFlags) { size_t get_size, max_left; uchar* point; reg1 USED_MEM *next; reg2 USED_MEM **prev; Size= ALIGN_SIZE(Size); prev= &my_once_root_block; max_left=0; for (next=my_once_root_block ; next && next->left < Size ; next= next->next) { if (next->left > max_left) max_left=next->left; prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= Size+ALIGN_SIZE(sizeof(USED_MEM)); if (max_left*4 < my_once_extra && get_size < my_once_extra) get_size=my_once_extra; /* Normal alloc */ if ((next = (USED_MEM*) malloc(get_size)) == 0) { my_errno=errno; if (MyFlags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size); return((uchar*) 0); } DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size)); next->next= 0; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; } point= (uchar*) ((char*) next+ (next->size-next->left)); next->left-= Size; if (MyFlags & MY_ZEROFILL) bzero(point, Size); return((void*) point); }
O0
c
my_once_alloc: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movq %rax, -0x10(%rbp) leaq 0x36a045(%rip), %rax # 0x3a1510 movq %rax, -0x40(%rbp) movq $0x0, -0x28(%rbp) leaq 0x36a032(%rip), %rax # 0x3a1510 movq (%rax), %rax movq %rax, -0x38(%rbp) xorl %eax, %eax cmpq $0x0, -0x38(%rbp) movb %al, -0x41(%rbp) je 0x37503 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x10(%rbp), %rax setb %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x3750c jmp 0x3753b movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x28(%rbp), %rax jbe 0x37526 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x374e5 cmpq $0x0, -0x38(%rbp) jne 0x37614 movq -0x10(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax shlq $0x2, %rax leaq 0x1aa15f(%rip), %rcx # 0x1e16c0 movl (%rcx), %ecx cmpq %rcx, %rax jae 0x37587 movq -0x20(%rbp), %rax leaq 0x1aa14d(%rip), %rcx # 0x1e16c0 movl (%rcx), %ecx cmpq %rcx, %rax jae 0x37587 leaq 0x1aa13f(%rip), %rax # 0x1e16c0 movl (%rax), %eax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x25450 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x375de callq 0x25040 movl (%rax), %eax movl %eax, -0x48(%rbp) callq 0x38f00 movl -0x48(%rbp), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x375d1 movq -0x20(%rbp), %rdx movl $0x5, %edi movl $0x1004, %esi # imm = 0x1004 movb $0x0, %al callq 0x31c20 movq $0x0, -0x8(%rbp) jmp 0x37667 jmp 0x375e0 jmp 0x375e2 movq -0x38(%rbp), %rax movq $0x0, (%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx subq $0x18, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movq -0x38(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x38(%rbp), %rdx subq 0x8(%rdx), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdx movq -0x38(%rbp), %rax movq 0x8(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rax andq $0x20, %rax cmpq $0x0, %rax je 0x3765f movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x251d0 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_once_alloc: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_10], rax lea rax, my_once_root_block mov [rbp+var_40], rax mov [rbp+var_28], 0 lea rax, my_once_root_block mov rax, [rax] mov [rbp+var_38], rax loc_374E5: xor eax, eax cmp [rbp+var_38], 0 mov [rbp+var_41], al jz short loc_37503 mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_10] setb al mov [rbp+var_41], al loc_37503: mov al, [rbp+var_41] test al, 1 jnz short loc_3750C jmp short loc_3753B loc_3750C: mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_28] jbe short loc_37526 mov rax, [rbp+var_38] mov rax, [rax+8] mov [rbp+var_28], rax loc_37526: mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_374E5 loc_3753B: cmp [rbp+var_38], 0 jnz loc_37614 mov rax, [rbp+var_10] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_28] shl rax, 2 lea rcx, my_once_extra mov ecx, [rcx] cmp rax, rcx jnb short loc_37587 mov rax, [rbp+var_20] lea rcx, my_once_extra mov ecx, [rcx] cmp rax, rcx jnb short loc_37587 lea rax, my_once_extra mov eax, [rax] mov [rbp+var_20], rax loc_37587: mov rdi, [rbp+var_20] call _malloc mov [rbp+var_38], rax cmp rax, 0 jnz short loc_375DE call ___errno_location mov eax, [rax] mov [rbp+var_48], eax call _my_thread_var mov ecx, [rbp+var_48] mov [rax], ecx mov rax, [rbp+var_18] and rax, 18h cmp rax, 0 jz short loc_375D1 mov rdx, [rbp+var_20] mov edi, 5 mov esi, 1004h mov al, 0 call my_error loc_375D1: mov [rbp+var_8], 0 jmp loc_37667 loc_375DE: jmp short $+2 loc_375E0: jmp short $+2 loc_375E2: mov rax, [rbp+var_38] mov qword ptr [rax], 0 mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax+10h], rcx mov rcx, [rbp+var_20] sub rcx, 18h mov rax, [rbp+var_38] mov [rax+8], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_40] mov [rax], rcx loc_37614: mov rax, [rbp+var_38] mov rcx, [rbp+var_38] mov rcx, [rcx+10h] mov rdx, [rbp+var_38] sub rcx, [rdx+8] add rax, rcx mov [rbp+var_30], rax mov rdx, [rbp+var_10] mov rax, [rbp+var_38] mov rcx, [rax+8] sub rcx, rdx mov [rax+8], rcx mov rax, [rbp+var_18] and rax, 20h cmp rax, 0 jz short loc_3765F mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] xor esi, esi call _memset loc_3765F: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_37667: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
char * my_once_alloc(long long a1, char a2) { int v3; // [rsp+8h] [rbp-48h] bool v4; // [rsp+Fh] [rbp-41h] _QWORD *v5; // [rsp+10h] [rbp-40h] _QWORD *i; // [rsp+18h] [rbp-38h] char *v7; // [rsp+20h] [rbp-30h] unsigned long long v8; // [rsp+28h] [rbp-28h] unsigned long long v9; // [rsp+30h] [rbp-20h] unsigned long long v10; // [rsp+40h] [rbp-10h] v10 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL; v5 = &my_once_root_block; v8 = 0LL; for ( i = (_QWORD *)my_once_root_block; ; i = (_QWORD *)*i ) { v4 = 0; if ( i ) v4 = i[1] < v10; if ( !v4 ) break; if ( i[1] > v8 ) v8 = i[1]; v5 = i; } if ( !i ) { v9 = v10 + 24; if ( 4 * v8 < my_once_extra && v9 < my_once_extra ) v9 = my_once_extra; i = (_QWORD *)malloc(v9); if ( !i ) { v3 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v3; if ( (a2 & 0x18) != 0 ) my_error(5u, 4100LL, v9); return 0LL; } *i = 0LL; i[2] = v9; i[1] = v9 - 24; *v5 = i; } v7 = (char *)i + i[2] - i[1]; i[1] -= v10; if ( (a2 & 0x20) != 0 ) memset(v7, 0LL, v10); return v7; }
my_once_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV qword ptr [RBP + -0x10],RAX LEA RAX,[0x4a1510] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x28],0x0 LEA RAX,[0x4a1510] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_001374e5: XOR EAX,EAX CMP qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x41],AL JZ 0x00137503 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x10] SETC AL MOV byte ptr [RBP + -0x41],AL LAB_00137503: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0013750c JMP 0x0013753b LAB_0013750c: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x28] JBE 0x00137526 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX LAB_00137526: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x001374e5 LAB_0013753b: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00137614 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x2 LEA RCX,[0x2e16c0] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x00137587 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x2e16c0] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x00137587 LEA RAX,[0x2e16c0] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_00137587: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00125450 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x001375de CALL 0x00125040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x48],EAX CALL 0x00138f00 MOV ECX,dword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x18 CMP RAX,0x0 JZ 0x001375d1 MOV RDX,qword ptr [RBP + -0x20] MOV EDI,0x5 MOV ESI,0x1004 MOV AL,0x0 CALL 0x00131c20 LAB_001375d1: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00137667 LAB_001375de: JMP 0x001375e0 LAB_001375e0: JMP 0x001375e2 LAB_001375e2: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX LAB_00137614: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x38] SUB RCX,qword ptr [RDX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x8] SUB RCX,RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x20 CMP RAX,0x0 JZ 0x0013765f MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x001251d0 LAB_0013765f: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00137667: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
void * my_once_alloc(long param_1,ulong param_2) { int iVar1; ulong __n; int *piVar2; void *__s; bool bVar3; int8 *local_48; int8 *local_40; ulong local_30; size_t local_28; __n = param_1 + 7U & 0xfffffffffffffff8; local_48 = &my_once_root_block; local_30 = 0; local_40 = my_once_root_block; while( true ) { bVar3 = false; if (local_40 != (int8 *)0x0) { bVar3 = (ulong)local_40[1] < __n; } if (!bVar3) break; if (local_30 < (ulong)local_40[1]) { local_30 = local_40[1]; } local_48 = local_40; local_40 = (int8 *)*local_40; } if (local_40 == (int8 *)0x0) { local_28 = __n + 0x18; if ((local_30 << 2 < (ulong)my_once_extra) && (local_28 < my_once_extra)) { local_28 = (size_t)my_once_extra; } local_40 = (int8 *)malloc(local_28); if (local_40 == (int8 *)0x0) { piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((param_2 & 0x18) != 0) { my_error(5,0x1004,local_28); } return (void *)0x0; } *local_40 = 0; local_40[2] = local_28; local_40[1] = local_28 - 0x18; *local_48 = local_40; } __s = (void *)((long)local_40 + (local_40[2] - local_40[1])); local_40[1] = local_40[1] - __n; if ((param_2 & 0x20) != 0) { memset(__s,0,__n); } return __s; }
49,136
my_once_alloc
eloqsql/mysys/my_once.c
void* my_once_alloc(size_t Size, myf MyFlags) { size_t get_size, max_left; uchar* point; reg1 USED_MEM *next; reg2 USED_MEM **prev; Size= ALIGN_SIZE(Size); prev= &my_once_root_block; max_left=0; for (next=my_once_root_block ; next && next->left < Size ; next= next->next) { if (next->left > max_left) max_left=next->left; prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= Size+ALIGN_SIZE(sizeof(USED_MEM)); if (max_left*4 < my_once_extra && get_size < my_once_extra) get_size=my_once_extra; /* Normal alloc */ if ((next = (USED_MEM*) malloc(get_size)) == 0) { my_errno=errno; if (MyFlags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size); return((uchar*) 0); } DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size)); next->next= 0; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; } point= (uchar*) ((char*) next+ (next->size-next->left)); next->left-= Size; if (MyFlags & MY_ZEROFILL) bzero(point, Size); return((void*) point); }
O3
c
my_once_alloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 addq $0x7, %r14 andq $-0x8, %r14 leaq 0x349481(%rip), %r13 # 0x379960 movq (%r13), %rcx xorl %eax, %eax testq %rcx, %rcx je 0x3050a movq %rcx, %r13 movq 0x8(%rcx), %rcx cmpq %r14, %rcx jae 0x30553 cmpq %rax, %rcx cmovaq %rcx, %rax movq (%r13), %rcx testq %rcx, %rcx jne 0x304ea shlq $0x2, %rax leaq 0x18(%r14), %rcx leaq 0x2ca17b(%rip), %rdx # 0x2fa690 movl (%rdx), %edx cmpq %rdx, %rcx movq %rdx, %r15 cmovaq %rcx, %r15 cmpq %rdx, %rax cmovaeq %rcx, %r15 movq %r15, %rdi callq 0x244b0 testq %rax, %rax je 0x30584 movq $0x0, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r13) movq 0x8(%rax), %rcx movq %rax, %r13 movq 0x10(%r13), %r12 subq %rcx, %r12 addq %r13, %r12 subq %r14, %rcx movq %rcx, 0x8(%r13) testb $0x20, %bl je 0x305b0 movq %r12, %rdi xorl %esi, %esi movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x241e0 callq 0x24050 movl (%rax), %r14d callq 0x3193e movl %r14d, (%rax) xorl %r12d, %r12d testb $0x18, %bl je 0x305b0 movl $0x1004, %esi # imm = 0x1004 movl $0x5, %edi movq %r15, %rdx xorl %eax, %eax callq 0x2cce7 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_once_alloc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h lea r13, my_once_root_block mov rcx, [r13+0] xor eax, eax test rcx, rcx jz short loc_3050A loc_304EA: mov r13, rcx mov rcx, [rcx+8] cmp rcx, r14 jnb short loc_30553 cmp rcx, rax cmova rax, rcx mov rcx, [r13+0] test rcx, rcx jnz short loc_304EA shl rax, 2 loc_3050A: lea rcx, [r14+18h] lea rdx, my_once_extra mov edx, [rdx] cmp rcx, rdx mov r15, rdx cmova r15, rcx cmp rax, rdx cmovnb r15, rcx mov rdi, r15 call _malloc test rax, rax jz short loc_30584 mov qword ptr [rax], 0 mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r13+0], rax mov rcx, [rax+8] mov r13, rax loc_30553: mov r12, [r13+10h] sub r12, rcx add r12, r13 sub rcx, r14 mov [r13+8], rcx test bl, 20h jz short loc_305B0 mov rdi, r12 xor esi, esi mov rdx, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset loc_30584: call ___errno_location mov r14d, [rax] call _my_thread_var mov [rax], r14d xor r12d, r12d test bl, 18h jz short loc_305B0 mov esi, 1004h mov edi, 5 mov rdx, r15 xor eax, eax call my_error loc_305B0: mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_once_alloc(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // r13 _QWORD *v4; // rcx unsigned long long v5; // rax unsigned long long v6; // rcx unsigned long long v7; // r15 _QWORD *v8; // rax char *v9; // r12 int v11; // r14d long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 v2 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = &my_once_root_block; v4 = (_QWORD *)my_once_root_block; v5 = 0LL; if ( my_once_root_block ) { while ( 1 ) { v3 = v4; v6 = v4[1]; if ( v6 >= v2 ) break; if ( v6 > v5 ) v5 = v6; v4 = (_QWORD *)*v3; if ( !*v3 ) { v5 *= 4LL; goto LABEL_7; } } } else { LABEL_7: v7 = my_once_extra; if ( v2 + 24 > my_once_extra ) v7 = v2 + 24; if ( v5 >= my_once_extra ) v7 = v2 + 24; v8 = (_QWORD *)malloc(v7); if ( !v8 ) { v11 = *(_DWORD *)__errno_location(v7); *(_DWORD *)my_thread_var(v7, a2, v12, v13, v14, v15) = v11; v9 = 0LL; if ( (a2 & 0x18) != 0 ) my_error(5u, 4100LL, v7); return (long long)v9; } *v8 = 0LL; v8[2] = v7; v8[1] = v7 - 24; *v3 = v8; v6 = v8[1]; v3 = v8; } v9 = (char *)v3 + v3[2] - v6; v3[1] = v6 - v2; if ( (a2 & 0x20) != 0 ) return memset(v9, 0LL, v2); return (long long)v9; }
my_once_alloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI ADD R14,0x7 AND R14,-0x8 LEA R13,[0x479960] MOV RCX,qword ptr [R13] XOR EAX,EAX TEST RCX,RCX JZ 0x0013050a LAB_001304ea: MOV R13,RCX MOV RCX,qword ptr [RCX + 0x8] CMP RCX,R14 JNC 0x00130553 CMP RCX,RAX CMOVA RAX,RCX MOV RCX,qword ptr [R13] TEST RCX,RCX JNZ 0x001304ea SHL RAX,0x2 LAB_0013050a: LEA RCX,[R14 + 0x18] LEA RDX,[0x3fa690] MOV EDX,dword ptr [RDX] CMP RCX,RDX MOV R15,RDX CMOVA R15,RCX CMP RAX,RDX CMOVNC R15,RCX MOV RDI,R15 CALL 0x001244b0 TEST RAX,RAX JZ 0x00130584 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R13],RAX MOV RCX,qword ptr [RAX + 0x8] MOV R13,RAX LAB_00130553: MOV R12,qword ptr [R13 + 0x10] SUB R12,RCX ADD R12,R13 SUB RCX,R14 MOV qword ptr [R13 + 0x8],RCX TEST BL,0x20 JZ 0x001305b0 MOV RDI,R12 XOR ESI,ESI MOV RDX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001241e0 LAB_00130584: CALL 0x00124050 MOV R14D,dword ptr [RAX] CALL 0x0013193e MOV dword ptr [RAX],R14D XOR R12D,R12D TEST BL,0x18 JZ 0x001305b0 MOV ESI,0x1004 MOV EDI,0x5 MOV RDX,R15 XOR EAX,EAX CALL 0x0012cce7 LAB_001305b0: MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void * my_once_alloc(long param_1,ulong param_2) { int iVar1; int8 *puVar2; ulong uVar3; int8 *puVar4; int *piVar5; ulong uVar6; ulong uVar7; void *pvVar8; int8 *puVar9; ulong __n; ulong __size; __n = param_1 + 7U & 0xfffffffffffffff8; uVar3 = 0; puVar2 = my_once_root_block; puVar9 = &my_once_root_block; if (my_once_root_block != (int8 *)0x0) { do { puVar4 = puVar2; uVar6 = puVar4[1]; if (__n <= uVar6) goto LAB_00130553; if (uVar3 < uVar6) { uVar3 = uVar6; } puVar2 = (int8 *)*puVar4; } while ((int8 *)*puVar4 != (int8 *)0x0); uVar3 = uVar3 << 2; puVar9 = puVar4; } uVar6 = __n + 0x18; uVar7 = (ulong)my_once_extra; __size = uVar7; if (uVar7 < uVar6) { __size = uVar6; } if (uVar7 <= uVar3) { __size = uVar6; } puVar4 = (int8 *)malloc(__size); if (puVar4 == (int8 *)0x0) { piVar5 = __errno_location(); iVar1 = *piVar5; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; pvVar8 = (void *)0x0; if ((param_2 & 0x18) != 0) { my_error(5,0x1004,__size); } } else { *puVar4 = 0; puVar4[2] = __size; puVar4[1] = __size - 0x18; *puVar9 = puVar4; uVar6 = puVar4[1]; LAB_00130553: pvVar8 = (void *)((puVar4[2] - uVar6) + (long)puVar4); puVar4[1] = uVar6 - __n; if ((param_2 & 0x20) != 0) { pvVar8 = memset(pvVar8,0,__n); return pvVar8; } } return pvVar8; }
49,137
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GatherControlVertexIndices(int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/regularPatchBuilder.cpp
int RegularPatchBuilder::GatherControlVertexIndices(Index cvIndices[]) const { if (_isQuad) { if (_isBoundary) { gatherBoundaryPatchPoints4(cvIndices); } else { gatherInteriorPatchPoints4(cvIndices); } } else { if (_isBoundary) { gatherBoundaryPatchPoints3(cvIndices); } else { gatherInteriorPatchPoints3(cvIndices); } } return _patchSize; }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GatherControlVertexIndices(int*) const: pushq %rbx movq %rdi, %rbx movb 0x8(%rdi), %al testb $0x1, %al jne 0xa34c8 testb $0x2, %al jne 0xa34d3 callq 0x523d0 jmp 0xa34df testb $0x2, %al jne 0xa34da callq 0x555c0 jmp 0xa34df callq 0x4f5d0 jmp 0xa34df callq 0x53040 movl 0x10(%rbx), %eax popq %rbx retq
_ZNK10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder26GatherControlVertexIndicesEPi: push rbx mov rbx, rdi mov al, [rdi+8] test al, 1 jnz short loc_A34C8 test al, 2 jnz short loc_A34D3 call __ZNK10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder26gatherInteriorPatchPoints3EPi; OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherInteriorPatchPoints3(int *) jmp short loc_A34DF loc_A34C8: test al, 2 jnz short loc_A34DA call __ZNK10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder26gatherInteriorPatchPoints4EPi; OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherInteriorPatchPoints4(int *) jmp short loc_A34DF loc_A34D3: call __ZNK10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder26gatherBoundaryPatchPoints3EPi; OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherBoundaryPatchPoints3(int *) jmp short loc_A34DF loc_A34DA: call __ZNK10OpenSubdiv6v3_6_03Bfr19RegularPatchBuilder26gatherBoundaryPatchPoints4EPi; OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherBoundaryPatchPoints4(int *) loc_A34DF: mov eax, [rbx+10h] pop rbx retn
long long OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GatherControlVertexIndices( OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder *this, int *a2) { char v2; // al v2 = *((_BYTE *)this + 8); if ( (v2 & 1) != 0 ) { if ( (v2 & 2) != 0 ) OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherBoundaryPatchPoints4(this, a2); else OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherInteriorPatchPoints4(this, a2); } else if ( (v2 & 2) != 0 ) { OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherBoundaryPatchPoints3(this, a2); } else { OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::gatherInteriorPatchPoints3(this, a2); } return *((unsigned int *)this + 4); }
GatherControlVertexIndices: PUSH RBX MOV RBX,RDI MOV AL,byte ptr [RDI + 0x8] TEST AL,0x1 JNZ 0x001a34c8 TEST AL,0x2 JNZ 0x001a34d3 CALL 0x001523d0 JMP 0x001a34df LAB_001a34c8: TEST AL,0x2 JNZ 0x001a34da CALL 0x001555c0 JMP 0x001a34df LAB_001a34d3: CALL 0x0014f5d0 JMP 0x001a34df LAB_001a34da: CALL 0x00153040 LAB_001a34df: MOV EAX,dword ptr [RBX + 0x10] POP RBX RET
/* OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GatherControlVertexIndices(int*) const */ int4 __thiscall OpenSubdiv::v3_6_0::Bfr::RegularPatchBuilder::GatherControlVertexIndices (RegularPatchBuilder *this,int *param_1) { RegularPatchBuilder RVar1; RVar1 = this[8]; if (((byte)RVar1 & 1) == 0) { if (((byte)RVar1 & 2) == 0) { gatherInteriorPatchPoints3(this,param_1); } else { gatherBoundaryPatchPoints3(this,param_1); } } else if (((byte)RVar1 & 2) == 0) { gatherInteriorPatchPoints4(this,param_1); } else { gatherBoundaryPatchPoints4(this,param_1); } return *(int4 *)(this + 0x10); }
49,138
evmone::instr::core::keccak256(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result keccak256(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { const auto& index = stack.pop(); auto& size = stack.top(); if (!check_memory(gas_left, state.memory, index, size)) return {EVMC_OUT_OF_GAS, gas_left}; const auto i = static_cast<size_t>(index); const auto s = static_cast<size_t>(size); const auto w = num_words(s); const auto cost = w * 6; if ((gas_left -= cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; auto data = s != 0 ? &state.memory[i] : nullptr; size = intx::be::load<uint256>(ethash::keccak256(data, s)); return {EVMC_SUCCESS, gas_left}; }
O0
cpp
evmone::instr::core::keccak256(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) leaq -0x18(%rbp), %rdi callq 0x611b0 movq %rax, -0x30(%rbp) leaq -0x18(%rbp), %rdi callq 0x611d0 movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rsi addq $0x8, %rsi movq -0x30(%rbp), %rdx movq -0x38(%rbp), %rcx leaq -0x20(%rbp), %rdi callq 0x68460 testb $0x1, %al jne 0x68362 movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x68448 movq -0x30(%rbp), %rdi callq 0x68550 movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rdi callq 0x68550 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rdi callq 0x68570 movq %rax, -0x50(%rbp) imulq $0x6, -0x50(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jge 0x683bb movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x68448 cmpq $0x0, -0x48(%rbp) je 0x683dc movq -0x28(%rbp), %rdi addq $0x8, %rdi movq -0x40(%rbp), %rsi callq 0x60120 movq %rax, -0xa8(%rbp) jmp 0x683e7 xorl %eax, %eax movq %rax, -0xa8(%rbp) jmp 0x683e7 movq -0xa8(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rsi movq -0x48(%rbp), %rdx leaq -0xa0(%rbp), %rdi callq 0x685c0 leaq -0x80(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x68590 movq -0x38(%rbp), %rax movq -0x80(%rbp), %rcx movq %rcx, (%rax) movq -0x78(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x70(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x18(%rax) movl $0x0, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0xb0, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN6evmone5instr4core9keccak256ENS_8StackTopElRNS_14ExecutionStateE: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void) mov [rbp+var_30], rax lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void) mov [rbp+var_38], rax mov rsi, [rbp+var_28] add rsi, 8; unsigned __int64 mov rdx, [rbp+var_30] mov rcx, [rbp+var_38] lea rdi, [rbp+var_20] call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, 1 jnz short loc_68362 mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp loc_68448 loc_68362: mov rdi, [rbp+var_30] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov [rbp+var_40], rax mov rdi, [rbp+var_38] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov [rbp+var_48], rax mov rdi, [rbp+var_48]; this call _ZN6evmone9num_wordsEm; evmone::num_words(ulong) mov [rbp+var_50], rax imul rax, [rbp+var_50], 6 mov [rbp+var_58], rax mov rcx, [rbp+var_58] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax cmp rax, 0 jge short loc_683BB mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp loc_68448 loc_683BB: cmp [rbp+var_48], 0 jz short loc_683DC mov rdi, [rbp+var_28] add rdi, 8 mov rsi, [rbp+var_40] call _ZN6evmone6MemoryixEm; evmone::Memory::operator[](ulong) mov [rbp+var_A8], rax jmp short loc_683E7 loc_683DC: xor eax, eax mov [rbp+var_A8], rax jmp short $+2 loc_683E7: mov rax, [rbp+var_A8] mov [rbp+var_60], rax mov rsi, [rbp+var_60]; unsigned __int8 * mov rdx, [rbp+var_48]; unsigned __int64 lea rdi, [rbp+var_A0]; this call _ZN6ethash9keccak256EPKhm; ethash::keccak256(uchar const*,ulong) lea rdi, [rbp+var_80] lea rsi, [rbp+var_A0] call _ZN4intx2be4loadINS_4uintILj256EEE14ethash_hash256EET_RKT0_; intx::be::load<intx::uint<256u>,ethash_hash256>(ethash_hash256 const&) mov rax, [rbp+var_38] mov rcx, [rbp+var_80] mov [rax], rcx mov rcx, [rbp+var_78] mov [rax+8], rcx mov rcx, [rbp+var_70] mov [rax+10h], rcx mov rcx, [rbp+var_68] mov [rax+18h], rcx mov [rbp+var_10], 0 mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_68448: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 0B0h pop rbp retn
long long evmone::instr::core::keccak256(long long a1, long long a2, long long a3) { _QWORD *v3; // rax const unsigned __int8 *v5; // [rsp+8h] [rbp-A8h] _BYTE v6[32]; // [rsp+10h] [rbp-A0h] BYREF _QWORD v7[6]; // [rsp+30h] [rbp-80h] BYREF long long v8; // [rsp+60h] [rbp-50h] evmone *v9; // [rsp+68h] [rbp-48h] long long v10; // [rsp+70h] [rbp-40h] _QWORD *v11; // [rsp+78h] [rbp-38h] long long v12; // [rsp+80h] [rbp-30h] long long v13; // [rsp+88h] [rbp-28h] long long v14; // [rsp+90h] [rbp-20h] BYREF long long v15; // [rsp+98h] [rbp-18h] BYREF unsigned int v16; // [rsp+A0h] [rbp-10h] long long v17; // [rsp+A8h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = evmone::StackTop::pop((evmone::StackTop *)&v15); v11 = (_QWORD *)evmone::StackTop::top((evmone::StackTop *)&v15); if ( (evmone::check_memory(&v14, v13 + 8, v12, v11) & 1) != 0 ) { v10 = intx::uint<256u>::operator unsigned long<unsigned long,void>(v12); v9 = (evmone *)intx::uint<256u>::operator unsigned long<unsigned long,void>(v11); v8 = evmone::num_words(v9, v13 + 8); v7[5] = 6 * v8; v14 -= 6 * v8; if ( v14 >= 0 ) { if ( v9 ) v5 = (const unsigned __int8 *)evmone::Memory::operator[](v13 + 8, v10); else v5 = 0LL; v7[4] = v5; ethash::keccak256((ethash *)v6, v5, (unsigned long long)v9); intx::be::load<intx::uint<256u>,ethash_hash256>(v7, v6); v3 = v11; *v11 = v7[0]; v3[1] = v7[1]; v3[2] = v7[2]; v3[3] = v7[3]; v16 = 0; v17 = v14; } else { v16 = 3; v17 = v14; } } else { v16 = 3; v17 = v14; } return v16; }
keccak256: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX LEA RDI,[RBP + -0x18] CALL 0x001611b0 MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x18] CALL 0x001611d0 MOV qword ptr [RBP + -0x38],RAX MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x8 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] LEA RDI,[RBP + -0x20] CALL 0x00168460 TEST AL,0x1 JNZ 0x00168362 MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x00168448 LAB_00168362: MOV RDI,qword ptr [RBP + -0x30] CALL 0x00168550 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x38] CALL 0x00168550 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x48] CALL 0x00168570 MOV qword ptr [RBP + -0x50],RAX IMUL RAX,qword ptr [RBP + -0x50],0x6 MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JGE 0x001683bb MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x00168448 LAB_001683bb: CMP qword ptr [RBP + -0x48],0x0 JZ 0x001683dc MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x40] CALL 0x00160120 MOV qword ptr [RBP + -0xa8],RAX JMP 0x001683e7 LAB_001683dc: XOR EAX,EAX MOV qword ptr [RBP + -0xa8],RAX JMP 0x001683e7 LAB_001683e7: MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x60],RAX MOV RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x48] LEA RDI,[RBP + -0xa0] CALL 0x001685c0 LEA RDI,[RBP + -0x80] LEA RSI,[RBP + -0xa0] CALL 0x00168590 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00168448: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0xb0 POP RBP RET
/* evmone::instr::core::keccak256(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::keccak256(int8 param_1,long param_2,long param_3) { ulong uVar1; int1 auVar2 [16]; uchar *local_b0; ethash local_a8 [32]; int8 local_88; int8 local_80; int8 local_78; int8 local_70; uchar *local_68; long local_60; long local_58; ulong local_50; ulong local_48; uint *local_40; uint *local_38; long local_30; long local_28; int8 local_20; uint local_18; long local_10; local_30 = param_3; local_28 = param_2; local_20 = param_1; local_38 = (uint *)StackTop::pop((StackTop *)&local_20); local_40 = (uint *)StackTop::top((StackTop *)&local_20); uVar1 = check_memory(&local_28,(Memory *)(local_30 + 8),local_38,local_40); if ((uVar1 & 1) == 0) { local_18 = 3; local_10 = local_28; } else { local_48 = intx::uint::operator_cast_to_unsigned_long(local_38); local_50 = intx::uint::operator_cast_to_unsigned_long(local_40); local_58 = num_words(local_50); local_60 = local_58 * 6; local_28 = local_28 + local_58 * -6; if (local_28 < 0) { local_18 = 3; local_10 = local_28; } else { if (local_50 == 0) { local_b0 = (uchar *)0x0; } else { local_b0 = (uchar *)Memory::operator[]((Memory *)(local_30 + 8),local_48); } local_68 = local_b0; ethash::keccak256(local_a8,local_b0,local_50); intx::be::load<intx::uint<256u>,ethash_hash256>((be *)&local_88,(ethash_hash256 *)local_a8); *(int8 *)local_40 = local_88; *(int8 *)(local_40 + 8) = local_80; *(int8 *)(local_40 + 0x10) = local_78; *(int8 *)(local_40 + 0x18) = local_70; local_18 = 0; local_10 = local_28; } } auVar2._4_4_ = 0; auVar2._0_4_ = local_18; auVar2._8_8_ = local_10; return auVar2; }
49,139
lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char>>)
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
bool SVGRect::parse(std::string_view input) { Rect value; stripLeadingAndTrailingSpaces(input); if(!parseNumber(input, value.x) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.y) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.w) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.h) || !input.empty()) { return false; } if(value.w < 0.f || value.h < 0.f) return false; m_value = value; return true; }
O0
cpp
lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char>>): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rsi, -0x18(%rbp) movq %rdx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x30(%rbp), %rdi callq 0x2eca0 leaq -0x18(%rbp), %rdi callq 0x32fd0 leaq -0x30(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0x339b0 testb $0x1, %al jne 0x4a151 jmp 0x4a1d0 leaq -0x18(%rbp), %rdi callq 0x33f70 testb $0x1, %al jne 0x4a160 jmp 0x4a1d0 leaq -0x30(%rbp), %rsi addq $0x4, %rsi leaq -0x18(%rbp), %rdi callq 0x339b0 testb $0x1, %al jne 0x4a177 jmp 0x4a1d0 leaq -0x18(%rbp), %rdi callq 0x33f70 testb $0x1, %al jne 0x4a186 jmp 0x4a1d0 leaq -0x30(%rbp), %rsi addq $0x8, %rsi leaq -0x18(%rbp), %rdi callq 0x339b0 testb $0x1, %al jne 0x4a19d jmp 0x4a1d0 leaq -0x18(%rbp), %rdi callq 0x33f70 testb $0x1, %al jne 0x4a1ac jmp 0x4a1d0 leaq -0x30(%rbp), %rsi addq $0xc, %rsi leaq -0x18(%rbp), %rdi callq 0x339b0 testb $0x1, %al jne 0x4a1c3 jmp 0x4a1d0 leaq -0x18(%rbp), %rdi callq 0x20620 testb $0x1, %al jne 0x4a1d6 movb $0x0, -0x1(%rbp) jmp 0x4a206 xorps %xmm0, %xmm0 ucomiss -0x28(%rbp), %xmm0 ja 0x4a1e8 xorps %xmm0, %xmm0 ucomiss -0x24(%rbp), %xmm0 jbe 0x4a1ee movb $0x0, -0x1(%rbp) jmp 0x4a206 movq -0x38(%rbp), %rax movq -0x30(%rbp), %rcx movq %rcx, 0xc(%rax) movq -0x28(%rbp), %rcx movq %rcx, 0x14(%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7lunasvg7SVGRect5parseESt17basic_string_viewIcSt11char_traitsIcEE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_18], rsi mov [rbp+var_10], rdx mov [rbp+var_20], rdi mov rax, [rbp+var_20] mov [rbp+var_38], rax lea rdi, [rbp+var_30]; this call _ZN7lunasvg4RectC2Ev; lunasvg::Rect::Rect(void) lea rdi, [rbp+var_18] call _ZN7lunasvg29stripLeadingAndTrailingSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::stripLeadingAndTrailingSpaces(std::string_view &) lea rsi, [rbp+var_30] lea rdi, [rbp+var_18] call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, 1 jnz short loc_4A151 jmp short loc_4A1D0 loc_4A151: lea rdi, [rbp+var_18] call _ZN7lunasvg25skipOptionalSpacesOrCommaERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpacesOrComma(std::string_view &) test al, 1 jnz short loc_4A160 jmp short loc_4A1D0 loc_4A160: lea rsi, [rbp+var_30] add rsi, 4 lea rdi, [rbp+var_18] call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, 1 jnz short loc_4A177 jmp short loc_4A1D0 loc_4A177: lea rdi, [rbp+var_18] call _ZN7lunasvg25skipOptionalSpacesOrCommaERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpacesOrComma(std::string_view &) test al, 1 jnz short loc_4A186 jmp short loc_4A1D0 loc_4A186: lea rsi, [rbp+var_30] add rsi, 8 lea rdi, [rbp+var_18] call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, 1 jnz short loc_4A19D jmp short loc_4A1D0 loc_4A19D: lea rdi, [rbp+var_18] call _ZN7lunasvg25skipOptionalSpacesOrCommaERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpacesOrComma(std::string_view &) test al, 1 jnz short loc_4A1AC jmp short loc_4A1D0 loc_4A1AC: lea rsi, [rbp+var_30] add rsi, 0Ch lea rdi, [rbp+var_18] call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, 1 jnz short loc_4A1C3 jmp short loc_4A1D0 loc_4A1C3: lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void) test al, 1 jnz short loc_4A1D6 loc_4A1D0: mov [rbp+var_1], 0 jmp short loc_4A206 loc_4A1D6: xorps xmm0, xmm0 ucomiss xmm0, dword ptr [rbp+var_28] ja short loc_4A1E8 xorps xmm0, xmm0 ucomiss xmm0, dword ptr [rbp+var_28+4] jbe short loc_4A1EE loc_4A1E8: mov [rbp+var_1], 0 jmp short loc_4A206 loc_4A1EE: mov rax, [rbp+var_38] mov rcx, [rbp+var_30] mov [rax+0Ch], rcx mov rcx, [rbp+var_28] mov [rax+14h], rcx mov [rbp+var_1], 1 loc_4A206: mov al, [rbp+var_1] and al, 1 add rsp, 40h pop rbp retn
char lunasvg::SVGRect::parse(long long a1, long long a2, long long a3) { long long v4; // [rsp+10h] [rbp-30h] BYREF _QWORD v5[2]; // [rsp+18h] [rbp-28h] BYREF _QWORD v6[2]; // [rsp+28h] [rbp-18h] BYREF v6[0] = a2; v6[1] = a3; v5[1] = a1; lunasvg::Rect::Rect((lunasvg::Rect *)&v4); lunasvg::stripLeadingAndTrailingSpaces((long long)v6); if ( !lunasvg::parseNumber<float>(v6, (float *)&v4) || (lunasvg::skipOptionalSpacesOrComma((long long)v6) & 1) == 0 || !lunasvg::parseNumber<float>(v6, (float *)&v4 + 1) || (lunasvg::skipOptionalSpacesOrComma((long long)v6) & 1) == 0 || !lunasvg::parseNumber<float>(v6, (float *)v5) || (lunasvg::skipOptionalSpacesOrComma((long long)v6) & 1) == 0 || !lunasvg::parseNumber<float>(v6, (float *)v5 + 1) || !std::string_view::empty(v6) ) { return 0; } if ( *(float *)v5 < 0.0 || *((float *)v5 + 1) < 0.0 ) return 0; *(_QWORD *)(a1 + 12) = v4; *(_QWORD *)(a1 + 20) = v5[0]; return 1; }
parse: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RBP + -0x20],RDI MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x30] CALL 0x0012eca0 LEA RDI,[RBP + -0x18] CALL 0x00132fd0 LEA RSI,[RBP + -0x30] LEA RDI,[RBP + -0x18] CALL 0x001339b0 TEST AL,0x1 JNZ 0x0014a151 JMP 0x0014a1d0 LAB_0014a151: LEA RDI,[RBP + -0x18] CALL 0x00133f70 TEST AL,0x1 JNZ 0x0014a160 JMP 0x0014a1d0 LAB_0014a160: LEA RSI,[RBP + -0x30] ADD RSI,0x4 LEA RDI,[RBP + -0x18] CALL 0x001339b0 TEST AL,0x1 JNZ 0x0014a177 JMP 0x0014a1d0 LAB_0014a177: LEA RDI,[RBP + -0x18] CALL 0x00133f70 TEST AL,0x1 JNZ 0x0014a186 JMP 0x0014a1d0 LAB_0014a186: LEA RSI,[RBP + -0x30] ADD RSI,0x8 LEA RDI,[RBP + -0x18] CALL 0x001339b0 TEST AL,0x1 JNZ 0x0014a19d JMP 0x0014a1d0 LAB_0014a19d: LEA RDI,[RBP + -0x18] CALL 0x00133f70 TEST AL,0x1 JNZ 0x0014a1ac JMP 0x0014a1d0 LAB_0014a1ac: LEA RSI,[RBP + -0x30] ADD RSI,0xc LEA RDI,[RBP + -0x18] CALL 0x001339b0 TEST AL,0x1 JNZ 0x0014a1c3 JMP 0x0014a1d0 LAB_0014a1c3: LEA RDI,[RBP + -0x18] CALL 0x00120620 TEST AL,0x1 JNZ 0x0014a1d6 LAB_0014a1d0: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014a206 LAB_0014a1d6: XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RBP + -0x28] JA 0x0014a1e8 XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RBP + -0x24] JBE 0x0014a1ee LAB_0014a1e8: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014a206 LAB_0014a1ee: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0xc],RCX MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x14],RCX MOV byte ptr [RBP + -0x1],0x1 LAB_0014a206: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x40 POP RBP RET
/* lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char> >) */ int1 lunasvg::SVGRect::parse(long param_1,int8 param_2,int8 param_3) { bool bVar1; ulong uVar2; int8 local_38; float local_30; float fStack_2c; long local_28; int8 local_20; int8 local_18; int1 local_9; local_28 = param_1; local_20 = param_2; local_18 = param_3; Rect::Rect((Rect *)&local_38); stripLeadingAndTrailingSpaces((basic_string_view *)&local_20); bVar1 = parseNumber<float>((basic_string_view *)&local_20,(float *)&local_38); if (((((bVar1) && (uVar2 = skipOptionalSpacesOrComma((basic_string_view *)&local_20), (uVar2 & 1) != 0)) && (bVar1 = parseNumber<float>((basic_string_view *)&local_20,(float *)((long)&local_38 + 4)), bVar1)) && ((uVar2 = skipOptionalSpacesOrComma((basic_string_view *)&local_20), (uVar2 & 1) != 0 && (bVar1 = parseNumber<float>((basic_string_view *)&local_20,&local_30), bVar1)))) && ((uVar2 = skipOptionalSpacesOrComma((basic_string_view *)&local_20), (uVar2 & 1) != 0 && ((bVar1 = parseNumber<float>((basic_string_view *)&local_20,&fStack_2c), bVar1 && (uVar2 = std::basic_string_view<char,std::char_traits<char>>::empty ((basic_string_view<char,std::char_traits<char>> *)&local_20), (uVar2 & 1) != 0)))))) { if ((local_30 < 0.0) || (fStack_2c < 0.0)) { local_9 = 0; } else { *(int8 *)(param_1 + 0xc) = local_38; *(ulong *)(param_1 + 0x14) = CONCAT44(fStack_2c,local_30); local_9 = 1; } } else { local_9 = 0; } return local_9; }
49,140
lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char>>)
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
bool SVGRect::parse(std::string_view input) { Rect value; stripLeadingAndTrailingSpaces(input); if(!parseNumber(input, value.x) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.y) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.w) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.h) || !input.empty()) { return false; } if(value.w < 0.f || value.h < 0.f) return false; m_value = value; return true; }
O1
cpp
lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char>>): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq %rsp, %r14 movq %rsi, (%r14) movq %rdx, 0x8(%r14) xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi callq 0x171df movq %r14, %rdi movq %r15, %rsi callq 0x172e2 testb %al, %al je 0x1ff0c movq %rsp, %rdi movl $0x2c, %esi callq 0x176d5 testb %al, %al je 0x1ff0c leaq 0x14(%rsp), %rsi movq %rsp, %rdi callq 0x172e2 testb %al, %al je 0x1ff0c movq %rsp, %rdi movl $0x2c, %esi callq 0x176d5 testb %al, %al je 0x1ff0c leaq 0x18(%rsp), %rsi movq %rsp, %rdi callq 0x172e2 testb %al, %al je 0x1ff0c movq %rsp, %rdi movl $0x2c, %esi callq 0x176d5 testb %al, %al je 0x1ff0c leaq 0x1c(%rsp), %rsi movq %rsp, %rdi callq 0x172e2 movl %eax, %ecx xorl %eax, %eax testb %cl, %cl je 0x1ff0e cmpq $0x0, (%rsp) jne 0x1ff0e xorl %eax, %eax xorps %xmm0, %xmm0 ucomiss 0x18(%rsp), %xmm0 ja 0x1ff0e ucomiss 0x1c(%rsp), %xmm0 ja 0x1ff0e movaps 0x10(%rsp), %xmm0 movups %xmm0, 0xc(%rbx) movb $0x1, %al jmp 0x1ff0e xorl %eax, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN7lunasvg7SVGRect5parseESt17basic_string_viewIcSt11char_traitsIcEE: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi mov r14, rsp mov [r14], rsi mov [r14+8], rdx xorps xmm0, xmm0 lea r15, [rsp+38h+var_28] movaps xmmword ptr [r15], xmm0 mov rdi, r14 call _ZN7lunasvg29stripLeadingAndTrailingSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::stripLeadingAndTrailingSpaces(std::string_view &) mov rdi, r14 mov rsi, r15 call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, al jz loc_1FF0C mov rdi, rsp mov esi, 2Ch ; ',' call _ZN7lunasvg29skipOptionalSpacesOrDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipOptionalSpacesOrDelimiter(std::string_view &,char) test al, al jz loc_1FF0C lea rsi, [rsp+38h+var_28+4] mov rdi, rsp call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, al jz short loc_1FF0C mov rdi, rsp mov esi, 2Ch ; ',' call _ZN7lunasvg29skipOptionalSpacesOrDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipOptionalSpacesOrDelimiter(std::string_view &,char) test al, al jz short loc_1FF0C lea rsi, [rsp+38h+var_28+8] mov rdi, rsp call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, al jz short loc_1FF0C mov rdi, rsp mov esi, 2Ch ; ',' call _ZN7lunasvg29skipOptionalSpacesOrDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipOptionalSpacesOrDelimiter(std::string_view &,char) test al, al jz short loc_1FF0C lea rsi, [rsp+38h+var_28+0Ch] mov rdi, rsp call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) mov ecx, eax xor eax, eax test cl, cl jz short loc_1FF0E cmp [rsp+38h+var_38], 0 jnz short loc_1FF0E xor eax, eax xorps xmm0, xmm0 ucomiss xmm0, dword ptr [rsp+38h+var_28+8] ja short loc_1FF0E ucomiss xmm0, dword ptr [rsp+38h+var_28+0Ch] ja short loc_1FF0E movaps xmm0, [rsp+38h+var_28] movups xmmword ptr [rbx+0Ch], xmm0 mov al, 1 jmp short loc_1FF0E loc_1FF0C: xor eax, eax loc_1FF0E: add rsp, 20h pop rbx pop r14 pop r15 retn
char lunasvg::SVGRect::parse(long long a1, long long a2, long long a3) { char v3; // cl char result; // al long long v5[2]; // [rsp+0h] [rbp-38h] BYREF float v6[10]; // [rsp+10h] [rbp-28h] BYREF v5[0] = a2; v5[1] = a3; *(_OWORD *)v6 = 0LL; lunasvg::stripLeadingAndTrailingSpaces(v5); if ( !lunasvg::parseNumber<float>(v5, v6) || !lunasvg::skipOptionalSpacesOrDelimiter(v5, 44) || !lunasvg::parseNumber<float>(v5, &v6[1]) || !lunasvg::skipOptionalSpacesOrDelimiter(v5, 44) || !lunasvg::parseNumber<float>(v5, &v6[2]) || !lunasvg::skipOptionalSpacesOrDelimiter(v5, 44) ) { return 0; } v3 = lunasvg::parseNumber<float>(v5, &v6[3]); result = 0; if ( v3 ) { if ( !v5[0] ) { result = 0; if ( v6[2] >= 0.0 && v6[3] >= 0.0 ) { *(_OWORD *)(a1 + 12) = *(_OWORD *)v6; return 1; } } } return result; }
parse: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV R14,RSP MOV qword ptr [R14],RSI MOV qword ptr [R14 + 0x8],RDX XORPS XMM0,XMM0 LEA R15,[RSP + 0x10] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 CALL 0x001171df MOV RDI,R14 MOV RSI,R15 CALL 0x001172e2 TEST AL,AL JZ 0x0011ff0c MOV RDI,RSP MOV ESI,0x2c CALL 0x001176d5 TEST AL,AL JZ 0x0011ff0c LEA RSI,[RSP + 0x14] MOV RDI,RSP CALL 0x001172e2 TEST AL,AL JZ 0x0011ff0c MOV RDI,RSP MOV ESI,0x2c CALL 0x001176d5 TEST AL,AL JZ 0x0011ff0c LEA RSI,[RSP + 0x18] MOV RDI,RSP CALL 0x001172e2 TEST AL,AL JZ 0x0011ff0c MOV RDI,RSP MOV ESI,0x2c CALL 0x001176d5 TEST AL,AL JZ 0x0011ff0c LEA RSI,[RSP + 0x1c] MOV RDI,RSP CALL 0x001172e2 MOV ECX,EAX XOR EAX,EAX TEST CL,CL JZ 0x0011ff0e CMP qword ptr [RSP],0x0 JNZ 0x0011ff0e XOR EAX,EAX XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RSP + 0x18] JA 0x0011ff0e UCOMISS XMM0,dword ptr [RSP + 0x1c] JA 0x0011ff0e MOVAPS XMM0,xmmword ptr [RSP + 0x10] MOVUPS xmmword ptr [RBX + 0xc],XMM0 MOV AL,0x1 JMP 0x0011ff0e LAB_0011ff0c: XOR EAX,EAX LAB_0011ff0e: ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char> >) */ int8 lunasvg::SVGRect::parse(long param_1,long param_2,int8 param_3) { bool bVar1; char cVar2; long local_38; int8 local_30; int8 local_28; int8 uStack_20; local_28 = 0; uStack_20 = 0; local_38 = param_2; local_30 = param_3; stripLeadingAndTrailingSpaces((basic_string_view *)&local_38); bVar1 = parseNumber<float>((basic_string_view *)&local_38,(float *)&local_28); if ((((!bVar1) || (cVar2 = skipOptionalSpacesOrDelimiter((basic_string_view *)&local_38,','), cVar2 == '\0')) || (bVar1 = parseNumber<float>((basic_string_view *)&local_38,(float *)((long)&local_28 + 4)), !bVar1)) || (((cVar2 = skipOptionalSpacesOrDelimiter((basic_string_view *)&local_38,','), cVar2 == '\0' || (bVar1 = parseNumber<float>((basic_string_view *)&local_38,(float *)&uStack_20), !bVar1)) || (cVar2 = skipOptionalSpacesOrDelimiter((basic_string_view *)&local_38,','), cVar2 == '\0')))) { return 0; } bVar1 = parseNumber<float>((basic_string_view *)&local_38,(float *)((long)&uStack_20 + 4)); if (!bVar1) { return 0; } if (local_38 != 0) { return 0; } if ((float)uStack_20 < 0.0) { return 0; } if (uStack_20._4_4_ < 0.0) { return 0; } *(int8 *)(param_1 + 0xc) = local_28; *(int8 *)(param_1 + 0x14) = uStack_20; return 1; }
49,141
lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char>>)
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
bool SVGRect::parse(std::string_view input) { Rect value; stripLeadingAndTrailingSpaces(input); if(!parseNumber(input, value.x) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.y) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.w) || !skipOptionalSpacesOrComma(input) || !parseNumber(input, value.h) || !input.empty()) { return false; } if(value.w < 0.f || value.h < 0.f) return false; m_value = value; return true; }
O3
cpp
lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char>>): pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq %rsi, (%rsp) movq %rdx, 0x8(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) testq %rsi, %rsi je 0x1fdd5 leaq (%rdx,%rsi), %rdi movq %rsi, %rax negq %rax movabsq $0x100002600, %rcx # imm = 0x100002600 movq %rdx, %r8 movzbl (%r8), %r9d cmpq $0x20, %r9 ja 0x1fd9c btq %r9, %rcx jae 0x1fd9c incq %r8 incq %rax jne 0x1fd75 movq %rdi, 0x8(%rsp) movq $0x0, (%rsp) jmp 0x1fdd5 movq %r8, 0x8(%rsp) addq %rdx, %rsi decq %rsi leaq 0x1(%rax), %rdi xorl %edx, %edx movzbl (%rsi,%rdx), %r8d cmpq $0x20, %r8 ja 0x1fdce btq %r8, %rcx jae 0x1fdce leaq -0x1(%rdx), %r8 cmpq %rdx, %rdi movq %r8, %rdx jne 0x1fdad xorl %edx, %edx jmp 0x1fdd1 subq %rax, %rdx movq %rdx, (%rsp) movq %rsp, %rdi leaq 0x10(%rsp), %rsi callq 0x16bbd testb %al, %al je 0x1fe7f movq %rsp, %rdi movl $0x2c, %esi callq 0x16f85 testb %al, %al je 0x1fe7f leaq 0x14(%rsp), %rsi movq %rsp, %rdi callq 0x16bbd testb %al, %al je 0x1fe7f movq %rsp, %rdi movl $0x2c, %esi callq 0x16f85 testb %al, %al je 0x1fe7f leaq 0x18(%rsp), %rsi movq %rsp, %rdi callq 0x16bbd testb %al, %al je 0x1fe7f movq %rsp, %rdi movl $0x2c, %esi callq 0x16f85 testb %al, %al je 0x1fe7f leaq 0x1c(%rsp), %rsi movq %rsp, %rdi callq 0x16bbd movl %eax, %ecx xorl %eax, %eax testb %cl, %cl je 0x1fe81 cmpq $0x0, (%rsp) jne 0x1fe81 xorl %eax, %eax xorps %xmm0, %xmm0 ucomiss 0x18(%rsp), %xmm0 ja 0x1fe81 ucomiss 0x1c(%rsp), %xmm0 ja 0x1fe81 movaps 0x10(%rsp), %xmm0 movups %xmm0, 0xc(%rbx) movb $0x1, %al jmp 0x1fe81 xorl %eax, %eax addq $0x20, %rsp popq %rbx retq nop
_ZN7lunasvg7SVGRect5parseESt17basic_string_viewIcSt11char_traitsIcEE: push rbx sub rsp, 20h mov rbx, rdi mov [rsp+28h+var_28], rsi mov [rsp+28h+var_20], rdx xorps xmm0, xmm0 movaps [rsp+28h+var_18], xmm0 test rsi, rsi jz short loc_1FDD5 lea rdi, [rdx+rsi] mov rax, rsi neg rax mov rcx, 100002600h mov r8, rdx loc_1FD75: movzx r9d, byte ptr [r8] cmp r9, 20h ; ' ' ja short loc_1FD9C bt rcx, r9 jnb short loc_1FD9C inc r8 inc rax jnz short loc_1FD75 mov [rsp+28h+var_20], rdi mov [rsp+28h+var_28], 0 jmp short loc_1FDD5 loc_1FD9C: mov [rsp+28h+var_20], r8 add rsi, rdx dec rsi lea rdi, [rax+1] xor edx, edx loc_1FDAD: movzx r8d, byte ptr [rsi+rdx] cmp r8, 20h ; ' ' ja short loc_1FDCE bt rcx, r8 jnb short loc_1FDCE lea r8, [rdx-1] cmp rdi, rdx mov rdx, r8 jnz short loc_1FDAD xor edx, edx jmp short loc_1FDD1 loc_1FDCE: sub rdx, rax loc_1FDD1: mov [rsp+28h+var_28], rdx loc_1FDD5: mov rdi, rsp lea rsi, [rsp+28h+var_18] call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, al jz loc_1FE7F mov rdi, rsp mov esi, 2Ch ; ',' call _ZN7lunasvg29skipOptionalSpacesOrDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipOptionalSpacesOrDelimiter(std::string_view &,char) test al, al jz loc_1FE7F lea rsi, [rsp+28h+var_18+4] mov rdi, rsp call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, al jz short loc_1FE7F mov rdi, rsp mov esi, 2Ch ; ',' call _ZN7lunasvg29skipOptionalSpacesOrDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipOptionalSpacesOrDelimiter(std::string_view &,char) test al, al jz short loc_1FE7F lea rsi, [rsp+28h+var_18+8] mov rdi, rsp call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, al jz short loc_1FE7F mov rdi, rsp mov esi, 2Ch ; ',' call _ZN7lunasvg29skipOptionalSpacesOrDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipOptionalSpacesOrDelimiter(std::string_view &,char) test al, al jz short loc_1FE7F lea rsi, [rsp+28h+var_18+0Ch] mov rdi, rsp call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) mov ecx, eax xor eax, eax test cl, cl jz short loc_1FE81 cmp [rsp+28h+var_28], 0 jnz short loc_1FE81 xor eax, eax xorps xmm0, xmm0 ucomiss xmm0, dword ptr [rsp+28h+var_18+8] ja short loc_1FE81 ucomiss xmm0, dword ptr [rsp+28h+var_18+0Ch] ja short loc_1FE81 movaps xmm0, [rsp+28h+var_18] movups xmmword ptr [rbx+0Ch], xmm0 mov al, 1 jmp short loc_1FE81 loc_1FE7F: xor eax, eax loc_1FE81: add rsp, 20h pop rbx retn
char lunasvg::SVGRect::parse(long long a1, long long a2, unsigned __int8 *a3) { long long v3; // rax long long v4; // rcx unsigned __int8 *v5; // r8 unsigned long long v6; // r9 long long v7; // rsi long long v8; // rdx unsigned long long v9; // r8 long long v11; // rdx char v12; // cl char result; // al long long v14; // [rsp+0h] [rbp-28h] BYREF unsigned __int8 *v15; // [rsp+8h] [rbp-20h] __int128 v16; // [rsp+10h] [rbp-18h] BYREF v14 = a2; v15 = a3; v16 = 0LL; if ( a2 ) { v3 = -a2; v4 = 0x100002600LL; v5 = a3; while ( 1 ) { v6 = *v5; if ( v6 > 0x20 || !_bittest64(&v4, v6) ) break; ++v5; if ( !++v3 ) { v15 = &a3[a2]; v14 = 0LL; goto LABEL_14; } } v15 = v5; v7 = (long long)&a3[a2 - 1]; v8 = 0LL; while ( 1 ) { v9 = *(unsigned __int8 *)(v7 + v8); if ( v9 > 0x20 || !_bittest64(&v4, v9) ) break; if ( v3 + 1 == v8-- ) { v11 = 0LL; goto LABEL_13; } } v11 = v8 - v3; LABEL_13: v14 = v11; } LABEL_14: if ( !lunasvg::parseNumber<float>((unsigned long long *)&v14, (float *)&v16) || !lunasvg::skipOptionalSpacesOrDelimiter(&v14, 44) || !lunasvg::parseNumber<float>((unsigned long long *)&v14, (float *)&v16 + 1) || !lunasvg::skipOptionalSpacesOrDelimiter(&v14, 44) || !lunasvg::parseNumber<float>((unsigned long long *)&v14, (float *)&v16 + 2) || !lunasvg::skipOptionalSpacesOrDelimiter(&v14, 44) ) { return 0; } v12 = lunasvg::parseNumber<float>((unsigned long long *)&v14, (float *)&v16 + 3); result = 0; if ( v12 ) { if ( !v14 ) { result = 0; if ( *((float *)&v16 + 2) >= 0.0 && *((float *)&v16 + 3) >= 0.0 ) { *(_OWORD *)(a1 + 12) = v16; return 1; } } } return result; }
parse: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV qword ptr [RSP],RSI MOV qword ptr [RSP + 0x8],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 TEST RSI,RSI JZ 0x0011fdd5 LEA RDI,[RDX + RSI*0x1] MOV RAX,RSI NEG RAX MOV RCX,0x100002600 MOV R8,RDX LAB_0011fd75: MOVZX R9D,byte ptr [R8] CMP R9,0x20 JA 0x0011fd9c BT RCX,R9 JNC 0x0011fd9c INC R8 INC RAX JNZ 0x0011fd75 MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP],0x0 JMP 0x0011fdd5 LAB_0011fd9c: MOV qword ptr [RSP + 0x8],R8 ADD RSI,RDX DEC RSI LEA RDI,[RAX + 0x1] XOR EDX,EDX LAB_0011fdad: MOVZX R8D,byte ptr [RSI + RDX*0x1] CMP R8,0x20 JA 0x0011fdce BT RCX,R8 JNC 0x0011fdce LEA R8,[RDX + -0x1] CMP RDI,RDX MOV RDX,R8 JNZ 0x0011fdad XOR EDX,EDX JMP 0x0011fdd1 LAB_0011fdce: SUB RDX,RAX LAB_0011fdd1: MOV qword ptr [RSP],RDX LAB_0011fdd5: MOV RDI,RSP LEA RSI,[RSP + 0x10] CALL 0x00116bbd TEST AL,AL JZ 0x0011fe7f MOV RDI,RSP MOV ESI,0x2c CALL 0x00116f85 TEST AL,AL JZ 0x0011fe7f LEA RSI,[RSP + 0x14] MOV RDI,RSP CALL 0x00116bbd TEST AL,AL JZ 0x0011fe7f MOV RDI,RSP MOV ESI,0x2c CALL 0x00116f85 TEST AL,AL JZ 0x0011fe7f LEA RSI,[RSP + 0x18] MOV RDI,RSP CALL 0x00116bbd TEST AL,AL JZ 0x0011fe7f MOV RDI,RSP MOV ESI,0x2c CALL 0x00116f85 TEST AL,AL JZ 0x0011fe7f LEA RSI,[RSP + 0x1c] MOV RDI,RSP CALL 0x00116bbd MOV ECX,EAX XOR EAX,EAX TEST CL,CL JZ 0x0011fe81 CMP qword ptr [RSP],0x0 JNZ 0x0011fe81 XOR EAX,EAX XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RSP + 0x18] JA 0x0011fe81 UCOMISS XMM0,dword ptr [RSP + 0x1c] JA 0x0011fe81 MOVAPS XMM0,xmmword ptr [RSP + 0x10] MOVUPS xmmword ptr [RBX + 0xc],XMM0 MOV AL,0x1 JMP 0x0011fe81 LAB_0011fe7f: XOR EAX,EAX LAB_0011fe81: ADD RSP,0x20 POP RBX RET
/* lunasvg::SVGRect::parse(std::basic_string_view<char, std::char_traits<char> >) */ int8 lunasvg::SVGRect::parse(long param_1,long param_2,byte *param_3) { bool bVar1; char cVar2; long lVar3; int8 uVar4; long local_28; byte *local_20; int8 local_18; int8 uStack_10; local_18 = 0; uStack_10 = 0; local_28 = param_2; local_20 = param_3; if (param_2 != 0) { lVar3 = -param_2; local_20 = param_3; do { if ((0x20 < (ulong)*local_20) || ((0x100002600U >> ((ulong)*local_20 & 0x3f) & 1) == 0)) { local_28 = 0; goto LAB_0011fdad; } local_20 = local_20 + 1; lVar3 = lVar3 + 1; } while (lVar3 != 0); local_28 = 0; local_20 = param_3 + param_2; } goto LAB_0011fdd5; while (bVar1 = lVar3 + 1 != local_28, local_28 = local_28 + -1, bVar1) { LAB_0011fdad: if ((0x20 < (ulong)param_3[local_28 + param_2 + -1]) || ((0x100002600U >> ((ulong)param_3[local_28 + param_2 + -1] & 0x3f) & 1) == 0)) { local_28 = local_28 - lVar3; goto LAB_0011fdd5; } } local_28 = 0; LAB_0011fdd5: bVar1 = parseNumber<float>((basic_string_view *)&local_28,(float *)&local_18); if (((((bVar1) && (cVar2 = skipOptionalSpacesOrDelimiter((basic_string_view *)&local_28,','), cVar2 != '\0')) && (bVar1 = parseNumber<float>((basic_string_view *)&local_28,(float *)((long)&local_18 + 4)) , bVar1)) && ((cVar2 = skipOptionalSpacesOrDelimiter((basic_string_view *)&local_28,','), cVar2 != '\0' && (bVar1 = parseNumber<float>((basic_string_view *)&local_28,(float *)&uStack_10), bVar1)))) && (cVar2 = skipOptionalSpacesOrDelimiter((basic_string_view *)&local_28,','), cVar2 != '\0')) { bVar1 = parseNumber<float>((basic_string_view *)&local_28,(float *)((long)&uStack_10 + 4)); uVar4 = 0; if ((bVar1) && (local_28 == 0)) { uVar4 = 0; if ((0.0 <= (float)uStack_10) && (uVar4 = 0, 0.0 <= uStack_10._4_4_)) { *(int8 *)(param_1 + 0xc) = local_18; *(int8 *)(param_1 + 0x14) = uStack_10; uVar4 = 1; } } } else { uVar4 = 0; } return uVar4; }
49,142
hi0bits
eloqsql/strings/dtoa.c
static int hi0bits(register ULong x) { register int k= 0; if (!(x & 0xffff0000)) { k= 16; x<<= 16; } if (!(x & 0xff000000)) { k+= 8; x<<= 8; } if (!(x & 0xf0000000)) { k+= 4; x<<= 4; } if (!(x & 0xc0000000)) { k+= 2; x<<= 2; } if (!(x & 0x80000000)) { k++; if (!(x & 0x40000000)) return 32; } return k; }
O3
c
hi0bits: pushq %rbp movq %rsp, %rbp movl %edi, %eax shll $0x10, %eax xorl %ecx, %ecx cmpl $0x10000, %edi # imm = 0x10000 setb %cl cmovael %edi, %eax shll $0x4, %ecx movl %eax, %edx shll $0x8, %edx cmpl $0x1000000, %eax # imm = 0x1000000 cmovael %eax, %edx leal 0x8(%rcx), %eax cmovael %ecx, %eax movl %edx, %ecx shll $0x4, %ecx cmpl $0x10000000, %edx # imm = 0x10000000 cmovael %edx, %ecx leal 0x4(%rax), %edx cmovael %eax, %edx leal (,%rcx,4), %esi movl $0x40000000, %eax # imm = 0x40000000 cmpl %eax, %ecx cmovael %ecx, %esi leal 0x2(%rdx), %ecx cmovael %edx, %ecx leal 0x1(%rcx), %edx cmpl %eax, %esi movl $0x20, %eax cmovael %edx, %eax testl %esi, %esi cmovsl %ecx, %eax popq %rbp retq
hi0bits: push rbp mov rbp, rsp mov eax, edi shl eax, 10h xor ecx, ecx cmp edi, 10000h setb cl cmovnb eax, edi shl ecx, 4 mov edx, eax shl edx, 8 cmp eax, 1000000h cmovnb edx, eax lea eax, [rcx+8] cmovnb eax, ecx mov ecx, edx shl ecx, 4 cmp edx, 10000000h cmovnb ecx, edx lea edx, [rax+4] cmovnb edx, eax lea esi, ds:0[rcx*4] mov eax, 40000000h cmp ecx, eax cmovnb esi, ecx lea ecx, [rdx+2] cmovnb ecx, edx lea edx, [rcx+1] cmp esi, eax mov eax, 20h ; ' ' cmovnb eax, edx test esi, esi cmovs eax, ecx pop rbp retn
long long hi0bits(unsigned int a1) { unsigned int v1; // eax unsigned int v2; // edx bool v3; // cf int v4; // eax unsigned int v5; // ecx bool v6; // cf int v7; // edx int v8; // esi bool v9; // cf unsigned int v10; // ecx long long result; // rax v1 = a1 << 16; if ( a1 >= 0x10000 ) v1 = a1; v2 = v1 << 8; v3 = v1 < 0x1000000; if ( v1 >= 0x1000000 ) v2 = v1; v4 = 16 * (a1 < 0x10000) + 8; if ( !v3 ) v4 = 16 * (a1 < 0x10000); v5 = 16 * v2; v6 = v2 < 0x10000000; if ( v2 >= 0x10000000 ) v5 = v2; v7 = v4 + 4; if ( !v6 ) v7 = v4; v8 = 4 * v5; v9 = v5 < 0x40000000; if ( v5 >= 0x40000000 ) v8 = v5; v10 = v7 + 2; if ( !v9 ) v10 = v7; result = 32LL; if ( (unsigned int)v8 >= 0x40000000 ) result = v10 + 1; if ( v8 < 0 ) return v10; return result; }
hi0bits: PUSH RBP MOV RBP,RSP MOV EAX,EDI SHL EAX,0x10 XOR ECX,ECX CMP EDI,0x10000 SETC CL CMOVNC EAX,EDI SHL ECX,0x4 MOV EDX,EAX SHL EDX,0x8 CMP EAX,0x1000000 CMOVNC EDX,EAX LEA EAX,[RCX + 0x8] CMOVNC EAX,ECX MOV ECX,EDX SHL ECX,0x4 CMP EDX,0x10000000 CMOVNC ECX,EDX LEA EDX,[RAX + 0x4] CMOVNC EDX,EAX LEA ESI,[RCX*0x4] MOV EAX,0x40000000 CMP ECX,EAX CMOVNC ESI,ECX LEA ECX,[RDX + 0x2] CMOVNC ECX,EDX LEA EDX,[RCX + 0x1] CMP ESI,EAX MOV EAX,0x20 CMOVNC EAX,EDX TEST ESI,ESI CMOVS EAX,ECX POP RBP RET
int hi0bits(uint param_1) { uint uVar1; uint uVar2; int iVar3; int iVar4; uVar2 = param_1 << 0x10; if (param_1 >= 0x10000) { uVar2 = param_1; } iVar4 = (uint)(param_1 < 0x10000) * 0x10; uVar1 = uVar2 << 8; if (0xffffff < uVar2) { uVar1 = uVar2; } iVar3 = iVar4 + 8; if (0xffffff < uVar2) { iVar3 = iVar4; } uVar2 = uVar1 << 4; if (0xfffffff < uVar1) { uVar2 = uVar1; } iVar4 = iVar3 + 4; if (0xfffffff < uVar1) { iVar4 = iVar3; } uVar1 = uVar2 * 4; if (0x3fffffff < uVar2) { uVar1 = uVar2; } iVar3 = iVar4 + 2; if (0x3fffffff < uVar2) { iVar3 = iVar4; } iVar4 = 0x20; if (0x3fffffff < uVar1) { iVar4 = iVar3 + 1; } if ((int)uVar1 < 0) { iVar4 = iVar3; } return iVar4; }
49,143
tree_search_key
eloqsql/mysys/tree.c
void *tree_search_key(TREE *tree, const void *key, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; TREE_ELEMENT **last_left_step_parent= NULL, **last_right_step_parent= NULL; TREE_ELEMENT **last_equal_element= NULL; /* TODO: support for HA_READ_KEY_OR_PREV, HA_READ_PREFIX flags if needed. */ *parents = &null_element; while (element != &null_element) { *++parents= element; if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), key)) == 0) { switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_KEY_OR_NEXT: case HA_READ_BEFORE_KEY: case HA_READ_KEY_OR_PREV: last_equal_element= parents; cmp= 1; break; case HA_READ_AFTER_KEY: cmp= -1; break; case HA_READ_PREFIX_LAST: case HA_READ_PREFIX_LAST_OR_PREV: last_equal_element= parents; cmp= -1; break; default: return NULL; } } if (cmp < 0) /* element < key */ { last_right_step_parent= parents; element= element->right; } else { last_left_step_parent= parents; element= element->left; } } switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_PREFIX_LAST: *last_pos= last_equal_element; break; case HA_READ_KEY_OR_NEXT: *last_pos= last_equal_element ? last_equal_element : last_left_step_parent; break; case HA_READ_AFTER_KEY: *last_pos= last_left_step_parent; break; case HA_READ_PREFIX_LAST_OR_PREV: *last_pos= last_equal_element ? last_equal_element : last_right_step_parent; break; case HA_READ_BEFORE_KEY: *last_pos= last_right_step_parent; break; case HA_READ_KEY_OR_PREV: *last_pos= last_equal_element ? last_equal_element : last_right_step_parent; break; default: return NULL; } return *last_pos ? ELEMENT_KEY(tree, **last_pos) : NULL; }
O0
c
tree_search_key: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq $0x0, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq $0x0, -0x60(%rbp) movq -0x20(%rbp), %rax leaq 0x1c467f(%rip), %rcx # 0x2bfc60 movq %rcx, (%rax) leaq 0x1c4675(%rip), %rax # 0x2bfc60 cmpq %rax, -0x48(%rbp) je 0xfb709 movq -0x48(%rbp), %rcx movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x20(%rbp) movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq 0x228(%rax), %rax movq %rax, -0x70(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x208(%rax) je 0xfb647 movq -0x48(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x208(%rcx), %ecx addq %rcx, %rax movq %rax, -0x78(%rbp) jmp 0xfb653 movq -0x48(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x78(%rbp) movq -0x70(%rbp), %rax movq -0x68(%rbp), %rdi movq -0x78(%rbp), %rsi movq -0x18(%rbp), %rdx callq *%rax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax jne 0xfb6d5 movl -0x2c(%rbp), %eax movl %eax, -0x7c(%rbp) subl $0x3, %eax jb 0xfb69b jmp 0xfb67a movl -0x7c(%rbp), %eax subl $0x3, %eax je 0xfb6ac jmp 0xfb684 movl -0x7c(%rbp), %eax subl $0x4, %eax je 0xfb69b jmp 0xfb68e movl -0x7c(%rbp), %eax addl $-0x6, %eax subl $0x2, %eax jb 0xfb6b5 jmp 0xfb6c6 movq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) movl $0x1, -0x3c(%rbp) jmp 0xfb6d3 movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF jmp 0xfb6d3 movq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF jmp 0xfb6d3 movq $0x0, -0x8(%rbp) jmp 0xfb86a jmp 0xfb6d5 cmpl $0x0, -0x3c(%rbp) jge 0xfb6f1 movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x48(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x48(%rbp) jmp 0xfb704 movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) jmp 0xfb5e4 movl -0x2c(%rbp), %eax movq %rax, -0x88(%rbp) subq $0x7, %rax ja 0xfb7ee movq -0x88(%rbp), %rax leaq 0x5e159(%rip), %rcx # 0x159884 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x60(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xfb7f8 cmpq $0x0, -0x60(%rbp) je 0xfb758 movq -0x60(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xfb763 movq -0x50(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xfb7f8 movq -0x50(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xfb7f8 cmpq $0x0, -0x60(%rbp) je 0xfb797 movq -0x60(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xfb7a2 movq -0x58(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xfb7f8 movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xfb7f8 cmpq $0x0, -0x60(%rbp) je 0xfb7d3 movq -0x60(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xfb7de movq -0x58(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0xa0(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xfb7f8 movq $0x0, -0x8(%rbp) jmp 0xfb86a movq -0x28(%rbp), %rax cmpq $0x0, (%rax) je 0xfb854 movq -0x10(%rbp), %rax cmpl $0x0, 0x208(%rax) je 0xfb82f movq -0x28(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movl 0x208(%rcx), %ecx addq %rcx, %rax movq %rax, -0xa8(%rbp) jmp 0xfb844 movq -0x28(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0xb0(%rbp) jmp 0xfb85f xorl %eax, %eax movq %rax, -0xb0(%rbp) jmp 0xfb85f movq -0xb0(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xb0, %rsp popq %rbp retq nopw (%rax,%rax)
tree_search_key: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_38], r9 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax mov [rbp+var_50], 0 mov [rbp+var_58], 0 mov [rbp+var_60], 0 mov rax, [rbp+var_20] lea rcx, null_element mov [rax], rcx loc_FB5E4: lea rax, null_element cmp [rbp+var_48], rax jz loc_FB709 mov rcx, [rbp+var_48] mov rax, [rbp+var_20] mov rdx, rax add rdx, 8 mov [rbp+var_20], rdx mov [rax+8], rcx mov rax, [rbp+var_10] mov rax, [rax+228h] mov [rbp+var_70], rax mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rax, [rbp+var_10] cmp dword ptr [rax+208h], 0 jz short loc_FB647 mov rax, [rbp+var_48] mov rcx, [rbp+var_10] mov ecx, [rcx+208h] add rax, rcx mov [rbp+var_78], rax jmp short loc_FB653 loc_FB647: mov rax, [rbp+var_48] mov rax, [rax+18h] mov [rbp+var_78], rax loc_FB653: mov rax, [rbp+var_70] mov rdi, [rbp+var_68] mov rsi, [rbp+var_78] mov rdx, [rbp+var_18] call rax mov [rbp+var_3C], eax cmp eax, 0 jnz short loc_FB6D5 mov eax, [rbp+var_2C] mov [rbp+var_7C], eax sub eax, 3 jb short loc_FB69B jmp short $+2 loc_FB67A: mov eax, [rbp+var_7C] sub eax, 3 jz short loc_FB6AC jmp short $+2 loc_FB684: mov eax, [rbp+var_7C] sub eax, 4 jz short loc_FB69B jmp short $+2 loc_FB68E: mov eax, [rbp+var_7C] add eax, 0FFFFFFFAh sub eax, 2 jb short loc_FB6B5 jmp short loc_FB6C6 loc_FB69B: mov rax, [rbp+var_20] mov [rbp+var_60], rax mov [rbp+var_3C], 1 jmp short loc_FB6D3 loc_FB6AC: mov [rbp+var_3C], 0FFFFFFFFh jmp short loc_FB6D3 loc_FB6B5: mov rax, [rbp+var_20] mov [rbp+var_60], rax mov [rbp+var_3C], 0FFFFFFFFh jmp short loc_FB6D3 loc_FB6C6: mov [rbp+var_8], 0 jmp loc_FB86A loc_FB6D3: jmp short $+2 loc_FB6D5: cmp [rbp+var_3C], 0 jge short loc_FB6F1 mov rax, [rbp+var_20] mov [rbp+var_58], rax mov rax, [rbp+var_48] mov rax, [rax+8] mov [rbp+var_48], rax jmp short loc_FB704 loc_FB6F1: mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rax, [rbp+var_48] mov rax, [rax] mov [rbp+var_48], rax loc_FB704: jmp loc_FB5E4 loc_FB709: mov eax, [rbp+var_2C] mov [rbp+var_88], rax sub rax, 7; switch 8 cases ja def_FB732; jumptable 00000000000FB732 default case, case 5 mov rax, [rbp+var_88] lea rcx, jpt_FB732 movsxd rax, ds:(jpt_FB732 - 159884h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_FB734: mov rcx, [rbp+var_60]; jumptable 00000000000FB732 cases 0,6 mov rax, [rbp+var_28] mov [rax], rcx jmp loc_FB7F8 loc_FB744: cmp [rbp+var_60], 0; jumptable 00000000000FB732 case 1 jz short loc_FB758 mov rax, [rbp+var_60] mov [rbp+var_90], rax jmp short loc_FB763 loc_FB758: mov rax, [rbp+var_50] mov [rbp+var_90], rax loc_FB763: mov rcx, [rbp+var_90] mov rax, [rbp+var_28] mov [rax], rcx jmp loc_FB7F8 loc_FB776: mov rcx, [rbp+var_50]; jumptable 00000000000FB732 case 3 mov rax, [rbp+var_28] mov [rax], rcx jmp short loc_FB7F8 loc_FB783: cmp [rbp+var_60], 0; jumptable 00000000000FB732 case 7 jz short loc_FB797 mov rax, [rbp+var_60] mov [rbp+var_98], rax jmp short loc_FB7A2 loc_FB797: mov rax, [rbp+var_58] mov [rbp+var_98], rax loc_FB7A2: mov rcx, [rbp+var_98] mov rax, [rbp+var_28] mov [rax], rcx jmp short loc_FB7F8 loc_FB7B2: mov rcx, [rbp+var_58]; jumptable 00000000000FB732 case 4 mov rax, [rbp+var_28] mov [rax], rcx jmp short loc_FB7F8 loc_FB7BF: cmp [rbp+var_60], 0; jumptable 00000000000FB732 case 2 jz short loc_FB7D3 mov rax, [rbp+var_60] mov [rbp+var_A0], rax jmp short loc_FB7DE loc_FB7D3: mov rax, [rbp+var_58] mov [rbp+var_A0], rax loc_FB7DE: mov rcx, [rbp+var_A0] mov rax, [rbp+var_28] mov [rax], rcx jmp short loc_FB7F8 def_FB732: mov [rbp+var_8], 0; jumptable 00000000000FB732 default case, case 5 jmp short loc_FB86A loc_FB7F8: mov rax, [rbp+var_28] cmp qword ptr [rax], 0 jz short loc_FB854 mov rax, [rbp+var_10] cmp dword ptr [rax+208h], 0 jz short loc_FB82F mov rax, [rbp+var_28] mov rax, [rax] mov rax, [rax] mov rcx, [rbp+var_10] mov ecx, [rcx+208h] add rax, rcx mov [rbp+var_A8], rax jmp short loc_FB844 loc_FB82F: mov rax, [rbp+var_28] mov rax, [rax] mov rax, [rax] mov rax, [rax+18h] mov [rbp+var_A8], rax loc_FB844: mov rax, [rbp+var_A8] mov [rbp+var_B0], rax jmp short loc_FB85F loc_FB854: xor eax, eax mov [rbp+var_B0], rax jmp short $+2 loc_FB85F: mov rax, [rbp+var_B0] mov [rbp+var_8], rax loc_FB86A: mov rax, [rbp+var_8] add rsp, 0B0h pop rbp retn
long long tree_search_key(long long ***a1, long long a2, _QWORD *a3, long long a4, unsigned int a5, long long a6) { _QWORD *v6; // rax int v7; // eax long long v9; // [rsp+0h] [rbp-B0h] long long v10; // [rsp+8h] [rbp-A8h] _QWORD *v11; // [rsp+10h] [rbp-A0h] _QWORD *v12; // [rsp+18h] [rbp-98h] _QWORD *v13; // [rsp+20h] [rbp-90h] long long *v14; // [rsp+40h] [rbp-70h] _QWORD *v15; // [rsp+50h] [rbp-60h] _QWORD *v16; // [rsp+58h] [rbp-58h] _QWORD *v17; // [rsp+60h] [rbp-50h] long long **v18; // [rsp+68h] [rbp-48h] int v19; // [rsp+74h] [rbp-3Ch] _QWORD *v23; // [rsp+90h] [rbp-20h] long long v24; // [rsp+A8h] [rbp-8h] v23 = a3; v18 = *a1; v17 = 0LL; v16 = 0LL; v15 = 0LL; *a3 = &null_element; while ( v18 != (long long **)&null_element ) { v6 = v23++; v6[1] = v18; v14 = (long long *)a1[69]; if ( *((_DWORD *)a1 + 130) ) v7 = ((long long ( *)(long long, char *, long long))v14)(a6, (char *)v18 + *((unsigned int *)a1 + 130), a2); else v7 = ((long long ( *)(long long, long long *, long long))v14)(a6, v18[3], a2); v19 = v7; if ( !v7 ) { if ( a5 < 3 ) goto LABEL_12; if ( a5 == 3 ) { v19 = -1; goto LABEL_15; } if ( a5 == 4 ) { LABEL_12: v15 = v23; v19 = 1; } else { if ( a5 - 6 >= 2 ) return 0LL; v15 = v23; v19 = -1; } } LABEL_15: if ( v19 >= 0 ) { v17 = v23; v18 = (long long **)*v18; } else { v16 = v23; v18 = (long long **)v18[1]; } } switch ( a5 ) { case 0u: case 6u: *(_QWORD *)a4 = v15; goto LABEL_35; case 1u: if ( v15 ) v13 = v15; else v13 = v17; *(_QWORD *)a4 = v13; goto LABEL_35; case 2u: if ( v15 ) v11 = v15; else v11 = v16; *(_QWORD *)a4 = v11; goto LABEL_35; case 3u: *(_QWORD *)a4 = v17; goto LABEL_35; case 4u: *(_QWORD *)a4 = v16; goto LABEL_35; case 7u: if ( v15 ) v12 = v15; else v12 = v16; *(_QWORD *)a4 = v12; LABEL_35: if ( *(_QWORD *)a4 ) { if ( *((_DWORD *)a1 + 130) ) v10 = *((unsigned int *)a1 + 130) + **(_QWORD **)a4; else v10 = *(_QWORD *)(**(_QWORD **)a4 + 24LL); v9 = v10; } else { v9 = 0LL; } v24 = v9; break; default: v24 = 0LL; break; } return v24; }
tree_search_key: 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 qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV qword ptr [RBP + -0x60],0x0 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x3bfc60] MOV qword ptr [RAX],RCX LAB_001fb5e4: LEA RAX,[0x3bfc60] CMP qword ptr [RBP + -0x48],RAX JZ 0x001fb709 MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x228] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x208],0x0 JZ 0x001fb647 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x208] ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX JMP 0x001fb653 LAB_001fb647: MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x78],RAX LAB_001fb653: MOV RAX,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RBP + -0x68] MOV RSI,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x18] CALL RAX MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JNZ 0x001fb6d5 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x7c],EAX SUB EAX,0x3 JC 0x001fb69b JMP 0x001fb67a LAB_001fb67a: MOV EAX,dword ptr [RBP + -0x7c] SUB EAX,0x3 JZ 0x001fb6ac JMP 0x001fb684 LAB_001fb684: MOV EAX,dword ptr [RBP + -0x7c] SUB EAX,0x4 JZ 0x001fb69b JMP 0x001fb68e LAB_001fb68e: MOV EAX,dword ptr [RBP + -0x7c] ADD EAX,-0x6 SUB EAX,0x2 JC 0x001fb6b5 JMP 0x001fb6c6 LAB_001fb69b: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX MOV dword ptr [RBP + -0x3c],0x1 JMP 0x001fb6d3 LAB_001fb6ac: MOV dword ptr [RBP + -0x3c],0xffffffff JMP 0x001fb6d3 LAB_001fb6b5: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX MOV dword ptr [RBP + -0x3c],0xffffffff JMP 0x001fb6d3 LAB_001fb6c6: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001fb86a LAB_001fb6d3: JMP 0x001fb6d5 LAB_001fb6d5: CMP dword ptr [RBP + -0x3c],0x0 JGE 0x001fb6f1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RAX JMP 0x001fb704 LAB_001fb6f1: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_001fb704: JMP 0x001fb5e4 LAB_001fb709: MOV EAX,dword ptr [RBP + -0x2c] MOV qword ptr [RBP + -0x88],RAX SUB RAX,0x7 JA 0x001fb7ee MOV RAX,qword ptr [RBP + -0x88] LEA RCX,[0x259884] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x001fb7f8 caseD_1: CMP qword ptr [RBP + -0x60],0x0 JZ 0x001fb758 MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x90],RAX JMP 0x001fb763 LAB_001fb758: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x90],RAX LAB_001fb763: MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x001fb7f8 caseD_3: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x001fb7f8 caseD_7: CMP qword ptr [RBP + -0x60],0x0 JZ 0x001fb797 MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x98],RAX JMP 0x001fb7a2 LAB_001fb797: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x98],RAX LAB_001fb7a2: MOV RCX,qword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x001fb7f8 caseD_4: MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x001fb7f8 caseD_2: CMP qword ptr [RBP + -0x60],0x0 JZ 0x001fb7d3 MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001fb7de LAB_001fb7d3: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0xa0],RAX LAB_001fb7de: MOV RCX,qword ptr [RBP + -0xa0] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX JMP 0x001fb7f8 caseD_5: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001fb86a LAB_001fb7f8: MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX],0x0 JZ 0x001fb854 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x208],0x0 JZ 0x001fb82f MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x208] ADD RAX,RCX MOV qword ptr [RBP + -0xa8],RAX JMP 0x001fb844 LAB_001fb82f: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0xa8],RAX LAB_001fb844: MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xb0],RAX JMP 0x001fb85f LAB_001fb854: XOR EAX,EAX MOV qword ptr [RBP + -0xb0],RAX JMP 0x001fb85f LAB_001fb85f: MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x8],RAX LAB_001fb86a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xb0 POP RBP RET
long tree_search_key(int8 *param_1,int8 param_2,int8 *param_3,long *param_4, uint param_5,int8 param_6) { int8 *puVar1; long local_b8; long local_b0; int8 *local_a8; int8 *local_a0; int8 *local_98; long local_80; int8 *local_68; int8 *local_60; int8 *local_58; int8 *local_50; int local_44; int8 *local_28; local_50 = (int8 *)*param_1; local_58 = (int8 *)0x0; local_60 = (int8 *)0x0; local_68 = (int8 *)0x0; *param_3 = null_element; local_28 = param_3; do { if (local_50 == (int8 *)null_element) { switch(param_5) { case 0: case 6: *param_4 = (long)local_68; break; case 1: if (local_68 == (int8 *)0x0) { local_98 = local_58; } else { local_98 = local_68; } *param_4 = (long)local_98; break; case 2: if (local_68 == (int8 *)0x0) { local_a8 = local_60; } else { local_a8 = local_68; } *param_4 = (long)local_a8; break; case 3: *param_4 = (long)local_58; break; case 4: *param_4 = (long)local_60; break; default: return 0; case 7: if (local_68 == (int8 *)0x0) { local_a0 = local_60; } else { local_a0 = local_68; } *param_4 = (long)local_a0; } if (*param_4 == 0) { local_b8 = 0; } else { if (*(int *)(param_1 + 0x41) == 0) { local_b0 = *(long *)(*(long *)*param_4 + 0x18); } else { local_b0 = *(long *)*param_4 + (ulong)*(uint *)(param_1 + 0x41); } local_b8 = local_b0; } return local_b8; } puVar1 = local_28 + 1; local_28[1] = local_50; if (*(int *)(param_1 + 0x41) == 0) { local_80 = local_50[3]; } else { local_80 = (long)local_50 + (ulong)*(uint *)(param_1 + 0x41); } local_44 = (*(code *)param_1[0x45])(param_6,local_80,param_2); if (local_44 == 0) { if (param_5 < 3) { LAB_001fb69b: local_44 = 1; local_68 = puVar1; } else if (param_5 == 3) { local_44 = -1; } else { if (param_5 == 4) goto LAB_001fb69b; if (1 < param_5 - 6) { return 0; } local_44 = -1; local_68 = puVar1; } } local_28 = puVar1; if (local_44 < 0) { local_50 = (int8 *)local_50[1]; local_60 = puVar1; } else { local_50 = (int8 *)*local_50; local_58 = puVar1; } } while( true ); }
49,144
tree_search_key
eloqsql/mysys/tree.c
void *tree_search_key(TREE *tree, const void *key, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; TREE_ELEMENT **last_left_step_parent= NULL, **last_right_step_parent= NULL; TREE_ELEMENT **last_equal_element= NULL; /* TODO: support for HA_READ_KEY_OR_PREV, HA_READ_PREFIX flags if needed. */ *parents = &null_element; while (element != &null_element) { *++parents= element; if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), key)) == 0) { switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_KEY_OR_NEXT: case HA_READ_BEFORE_KEY: case HA_READ_KEY_OR_PREV: last_equal_element= parents; cmp= 1; break; case HA_READ_AFTER_KEY: cmp= -1; break; case HA_READ_PREFIX_LAST: case HA_READ_PREFIX_LAST_OR_PREV: last_equal_element= parents; cmp= -1; break; default: return NULL; } } if (cmp < 0) /* element < key */ { last_right_step_parent= parents; element= element->right; } else { last_left_step_parent= parents; element= element->left; } } switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_PREFIX_LAST: *last_pos= last_equal_element; break; case HA_READ_KEY_OR_NEXT: *last_pos= last_equal_element ? last_equal_element : last_left_step_parent; break; case HA_READ_AFTER_KEY: *last_pos= last_left_step_parent; break; case HA_READ_PREFIX_LAST_OR_PREV: *last_pos= last_equal_element ? last_equal_element : last_right_step_parent; break; case HA_READ_BEFORE_KEY: *last_pos= last_right_step_parent; break; case HA_READ_KEY_OR_PREV: *last_pos= last_equal_element ? last_equal_element : last_right_step_parent; break; default: return NULL; } return *last_pos ? ELEMENT_KEY(tree, **last_pos) : NULL; }
O3
c
tree_search_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, -0x50(%rbp) movl %r8d, -0x2c(%rbp) movq %rcx, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %rdi, %r8 movq (%rdi), %r14 leaq 0x2e0d71(%rip), %rax # 0x385bc0 movq %rax, (%rdx) cmpq %rax, %r14 je 0xa4f1c movq %rdx, %r13 addq $0x8, %r13 xorl %edx, %edx xorl %r15d, %r15d xorl %r12d, %r12d movq %r14, (%r13) movl 0x208(%r8), %esi testq %rsi, %rsi movq %rdx, -0x38(%rbp) je 0xa4e83 addq %r14, %rsi jmp 0xa4e87 movq 0x18(%r14), %rsi movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx movq %r8, %rbx callq *0x228(%r8) testl %eax, %eax je 0xa4ea6 movq -0x38(%rbp), %rcx movq %rbx, %r8 jmp 0xa4ef0 movl -0x2c(%rbp), %ecx cmpl $0x7, %ecx ja 0xa4f79 movq %rbx, %r8 movl $0x1, %eax movl $0x17, %edx btl %ecx, %edx movq %r13, %rcx jb 0xa4ef0 movl -0x2c(%rbp), %eax movl $0xc0, %ecx btl %eax, %ecx jae 0xa4ede movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %r13, %rcx jmp 0xa4ef0 cmpl $0x3, %eax jne 0xa4f79 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq -0x38(%rbp), %rcx movl %eax, %edx shrl $0x1f, %edx testl %eax, %eax cmovnsq %r13, %r12 cmovsq %r13, %r15 movq (%r14,%rdx,8), %r14 addq $0x8, %r13 movq %rcx, %rdx leaq 0x2e0caf(%rip), %rax # 0x385bc0 cmpq %rax, %r14 jne 0xa4e6a jmp 0xa4f24 xorl %r12d, %r12d xorl %r15d, %r15d xorl %ecx, %ecx xorl %eax, %eax movl -0x2c(%rbp), %edx cmpl $0x7, %edx ja 0xa4f81 movl %edx, %edx leaq 0x3cf05(%rip), %rsi # 0xe1e3c movslq (%rsi,%rdx,4), %rdx addq %rsi, %rdx jmpq *%rdx movq %rcx, %r12 jmp 0xa4f58 testq %rcx, %rcx cmovneq %rcx, %r15 movq %r15, %r12 jmp 0xa4f58 testq %rcx, %rcx cmovneq %rcx, %r12 movq -0x40(%rbp), %rax movq %r12, (%rax) testq %r12, %r12 je 0xa4f79 movl 0x208(%r8), %ecx movq (%r12), %rax testq %rcx, %rcx je 0xa4f7d addq %rcx, %rax jmp 0xa4f81 xorl %eax, %eax jmp 0xa4f81 movq 0x18(%rax), %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tree_search_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_50], r9 mov [rbp+var_2C], r8d mov [rbp+var_40], rcx mov [rbp+var_48], rsi mov r8, rdi mov r14, [rdi] lea rax, null_element mov [rdx], rax cmp r14, rax jz loc_A4F1C mov r13, rdx add r13, 8 xor edx, edx xor r15d, r15d xor r12d, r12d loc_A4E6A: mov [r13+0], r14 mov esi, [r8+208h] test rsi, rsi mov [rbp+var_38], rdx jz short loc_A4E83 add rsi, r14 jmp short loc_A4E87 loc_A4E83: mov rsi, [r14+18h] loc_A4E87: mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] mov rbx, r8 call qword ptr [r8+228h] test eax, eax jz short loc_A4EA6 mov rcx, [rbp+var_38] mov r8, rbx jmp short loc_A4EF0 loc_A4EA6: mov ecx, [rbp+var_2C] cmp ecx, 7 ja loc_A4F79 mov r8, rbx mov eax, 1 mov edx, 17h bt edx, ecx mov rcx, r13 jb short loc_A4EF0 mov eax, [rbp+var_2C] mov ecx, 0C0h bt ecx, eax jnb short loc_A4EDE mov eax, 0FFFFFFFFh mov rcx, r13 jmp short loc_A4EF0 loc_A4EDE: cmp eax, 3 jnz loc_A4F79 mov eax, 0FFFFFFFFh mov rcx, [rbp+var_38] loc_A4EF0: mov edx, eax shr edx, 1Fh test eax, eax cmovns r12, r13 cmovs r15, r13 mov r14, [r14+rdx*8] add r13, 8 mov rdx, rcx lea rax, null_element cmp r14, rax jnz loc_A4E6A jmp short loc_A4F24 loc_A4F1C: xor r12d, r12d xor r15d, r15d xor ecx, ecx loc_A4F24: xor eax, eax mov edx, [rbp+var_2C] cmp edx, 7; switch 8 cases ja short def_A4F3E; jumptable 00000000000A4F3E default case, case 5 mov edx, edx lea rsi, jpt_A4F3E movsxd rdx, ds:(jpt_A4F3E - 0E1E3Ch)[rsi+rdx*4] add rdx, rsi jmp rdx; switch jump loc_A4F40: mov r12, rcx; jumptable 00000000000A4F3E cases 0,6 jmp short loc_A4F58; jumptable 00000000000A4F3E case 3 loc_A4F45: test rcx, rcx; jumptable 00000000000A4F3E cases 2,7 cmovnz r15, rcx loc_A4F4C: mov r12, r15; jumptable 00000000000A4F3E case 4 jmp short loc_A4F58; jumptable 00000000000A4F3E case 3 loc_A4F51: test rcx, rcx; jumptable 00000000000A4F3E case 1 cmovnz r12, rcx loc_A4F58: mov rax, [rbp+var_40]; jumptable 00000000000A4F3E case 3 mov [rax], r12 test r12, r12 jz short loc_A4F79 mov ecx, [r8+208h] mov rax, [r12] test rcx, rcx jz short loc_A4F7D add rax, rcx jmp short def_A4F3E; jumptable 00000000000A4F3E default case, case 5 loc_A4F79: xor eax, eax jmp short def_A4F3E; jumptable 00000000000A4F3E default case, case 5 loc_A4F7D: mov rax, [rax+18h] def_A4F3E: add rsp, 28h; jumptable 00000000000A4F3E default case, case 5 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long tree_search_key(_QWORD *a1, long long a2, _QWORD *a3, long long **a4, unsigned int a5, long long a6) { _QWORD *v6; // r8 long long v7; // r14 _QWORD *v8; // r13 _QWORD *v9; // rdx long long *v10; // r15 long long *v11; // r12 long long v12; // rsi _QWORD *v13; // rbx int v14; // eax _QWORD *v15; // rcx int v16; // edx int v17; // ecx long long result; // rax long long v19; // rax _QWORD *v23; // [rsp+18h] [rbp-38h] v6 = a1; v7 = *a1; *a3 = &null_element; if ( (_UNKNOWN *)v7 != &null_element ) { v8 = a3 + 1; v9 = 0LL; v10 = 0LL; v11 = 0LL; while ( 1 ) { *v8 = v7; v23 = v9; if ( *((_DWORD *)v6 + 130) ) v12 = v7 + *((unsigned int *)v6 + 130); else v12 = *(_QWORD *)(v7 + 24); v13 = v6; v14 = ((long long ( *)(long long, long long, long long))v6[69])(a6, v12, a2); if ( v14 ) { v15 = v23; v6 = v13; } else { if ( a5 > 7 ) return 0LL; v6 = v13; v14 = 1; v16 = 23; v15 = v8; if ( !_bittest(&v16, a5) ) { v17 = 192; if ( _bittest(&v17, a5) ) { v14 = -1; v15 = v8; } else { if ( a5 != 3 ) return 0LL; v14 = -1; v15 = v23; } } } if ( v14 < 0 ) v10 = v8; else v11 = v8; v7 = *(_QWORD *)(v7 + 8LL * ((unsigned int)v14 >> 31)); ++v8; v9 = v15; if ( (_UNKNOWN *)v7 == &null_element ) goto LABEL_20; } } v11 = 0LL; v10 = 0LL; v15 = 0LL; LABEL_20: result = 0LL; switch ( a5 ) { case 0u: case 6u: v11 = v15; goto LABEL_27; case 1u: if ( v15 ) v11 = v15; goto LABEL_27; case 2u: case 7u: if ( v15 ) v10 = v15; goto LABEL_24; case 3u: goto LABEL_27; case 4u: LABEL_24: v11 = v10; LABEL_27: *a4 = v11; if ( !v11 ) return 0LL; v19 = *v11; if ( *((_DWORD *)v6 + 130) ) result = *((unsigned int *)v6 + 130) + v19; else result = *(_QWORD *)(v19 + 24); break; default: return result; } return result; }
tree_search_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [RBP + -0x2c],R8D MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RBP + -0x48],RSI MOV R8,RDI MOV R14,qword ptr [RDI] LEA RAX,[0x485bc0] MOV qword ptr [RDX],RAX CMP R14,RAX JZ 0x001a4f1c MOV R13,RDX ADD R13,0x8 XOR EDX,EDX XOR R15D,R15D XOR R12D,R12D LAB_001a4e6a: MOV qword ptr [R13],R14 MOV ESI,dword ptr [R8 + 0x208] TEST RSI,RSI MOV qword ptr [RBP + -0x38],RDX JZ 0x001a4e83 ADD RSI,R14 JMP 0x001a4e87 LAB_001a4e83: MOV RSI,qword ptr [R14 + 0x18] LAB_001a4e87: MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV RBX,R8 CALL qword ptr [R8 + 0x228] TEST EAX,EAX JZ 0x001a4ea6 MOV RCX,qword ptr [RBP + -0x38] MOV R8,RBX JMP 0x001a4ef0 LAB_001a4ea6: MOV ECX,dword ptr [RBP + -0x2c] CMP ECX,0x7 JA 0x001a4f79 MOV R8,RBX MOV EAX,0x1 MOV EDX,0x17 BT EDX,ECX MOV RCX,R13 JC 0x001a4ef0 MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,0xc0 BT ECX,EAX JNC 0x001a4ede MOV EAX,0xffffffff MOV RCX,R13 JMP 0x001a4ef0 LAB_001a4ede: CMP EAX,0x3 JNZ 0x001a4f79 MOV EAX,0xffffffff MOV RCX,qword ptr [RBP + -0x38] LAB_001a4ef0: MOV EDX,EAX SHR EDX,0x1f TEST EAX,EAX CMOVNS R12,R13 CMOVS R15,R13 MOV R14,qword ptr [R14 + RDX*0x8] ADD R13,0x8 MOV RDX,RCX LEA RAX,[0x485bc0] CMP R14,RAX JNZ 0x001a4e6a JMP 0x001a4f24 LAB_001a4f1c: XOR R12D,R12D XOR R15D,R15D XOR ECX,ECX LAB_001a4f24: XOR EAX,EAX MOV EDX,dword ptr [RBP + -0x2c] CMP EDX,0x7 JA 0x001a4f81 MOV EDX,EDX LEA RSI,[0x1e1e3c] MOVSXD RDX,dword ptr [RSI + RDX*0x4] ADD RDX,RSI switchD: JMP RDX caseD_0: MOV R12,RCX JMP 0x001a4f58 caseD_2: TEST RCX,RCX CMOVNZ R15,RCX caseD_4: MOV R12,R15 JMP 0x001a4f58 caseD_1: TEST RCX,RCX CMOVNZ R12,RCX caseD_3: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R12 TEST R12,R12 JZ 0x001a4f79 MOV ECX,dword ptr [R8 + 0x208] MOV RAX,qword ptr [R12] TEST RCX,RCX JZ 0x001a4f7d ADD RAX,RCX JMP 0x001a4f81 LAB_001a4f79: XOR EAX,EAX JMP 0x001a4f81 LAB_001a4f7d: MOV RAX,qword ptr [RAX + 0x18] caseD_5: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long tree_search_key(long *param_1,int8 param_2,int8 *param_3,int8 *param_4, uint param_5,int8 param_6) { uint uVar1; long lVar2; long *plVar3; long *plVar4; int1 *puVar5; long *plVar6; long *plVar7; int1 *puVar8; long *plVar9; puVar8 = (int1 *)*param_1; *param_3 = null_element; if (puVar8 == null_element) { plVar6 = (long *)0x0; plVar9 = (long *)0x0; plVar3 = (long *)0x0; } else { plVar7 = param_3 + 1; plVar9 = (long *)0x0; plVar6 = (long *)0x0; plVar4 = (long *)0x0; do { *plVar7 = (long)puVar8; if ((ulong)*(uint *)(param_1 + 0x41) == 0) { puVar5 = *(int1 **)(puVar8 + 0x18); } else { puVar5 = puVar8 + *(uint *)(param_1 + 0x41); } uVar1 = (*(code *)param_1[0x45])(param_6,puVar5,param_2); plVar3 = plVar4; if (uVar1 == 0) { if (7 < param_5) goto LAB_001a4f79; uVar1 = 1; plVar3 = plVar7; if ((0x17U >> (param_5 & 0x1f) & 1) == 0) { if ((0xc0U >> (param_5 & 0x1f) & 1) == 0) { if (param_5 != 3) goto LAB_001a4f79; uVar1 = 0xffffffff; plVar3 = plVar4; } else { uVar1 = 0xffffffff; } } } plVar4 = plVar7; if ((int)uVar1 < 0) { plVar9 = plVar7; plVar4 = plVar6; } plVar6 = plVar4; puVar8 = *(int1 **)(puVar8 + (ulong)(uVar1 >> 0x1f) * 8); plVar7 = plVar7 + 1; plVar4 = plVar3; } while (puVar8 != null_element); } lVar2 = 0; switch(param_5) { case 0: case 6: plVar6 = plVar3; break; case 1: if (plVar3 != (long *)0x0) { plVar6 = plVar3; } break; case 2: case 7: if (plVar3 != (long *)0x0) { plVar9 = plVar3; } case 4: plVar6 = plVar9; break; case 3: break; default: goto switchD_001a4f3e_caseD_5; } *param_4 = plVar6; if (plVar6 == (long *)0x0) { LAB_001a4f79: lVar2 = 0; } else if ((ulong)*(uint *)(param_1 + 0x41) == 0) { lVar2 = *(long *)(*plVar6 + 0x18); } else { lVar2 = *plVar6 + (ulong)*(uint *)(param_1 + 0x41); } switchD_001a4f3e_caseD_5: return lVar2; }
49,145
js_async_function_resume
bluesky950520[P]quickjs/quickjs.c
static void js_async_function_resume(JSContext *ctx, JSAsyncFunctionData *s) { JSValue func_ret, ret2; func_ret = async_func_resume(ctx, &s->func_state); if (JS_IsException(func_ret)) { JSValue error; fail: error = JS_GetException(ctx); ret2 = JS_Call(ctx, s->resolving_funcs[1], JS_UNDEFINED, 1, &error); JS_FreeValue(ctx, error); js_async_function_terminate(ctx->rt, s); JS_FreeValue(ctx, ret2); /* XXX: what to do if exception ? */ } else { JSValue value; value = s->func_state.frame.cur_sp[-1]; s->func_state.frame.cur_sp[-1] = JS_UNDEFINED; if (JS_IsUndefined(func_ret)) { /* function returned */ ret2 = JS_Call(ctx, s->resolving_funcs[0], JS_UNDEFINED, 1, &value); JS_FreeValue(ctx, ret2); /* XXX: what to do if exception ? */ JS_FreeValue(ctx, value); js_async_function_terminate(ctx->rt, s); } else { JSValue promise, resolving_funcs[2], resolving_funcs1[2]; int i, res; /* await */ JS_FreeValue(ctx, func_ret); /* not used */ promise = js_promise_resolve(ctx, ctx->promise_ctor, 1, &value, 0); JS_FreeValue(ctx, value); if (JS_IsException(promise)) goto fail; if (js_async_function_resolve_create(ctx, s, resolving_funcs)) { JS_FreeValue(ctx, promise); goto fail; } /* Note: no need to create 'thrownawayCapability' as in the spec */ for(i = 0; i < 2; i++) resolving_funcs1[i] = JS_UNDEFINED; res = perform_promise_then(ctx, promise, resolving_funcs, resolving_funcs1); JS_FreeValue(ctx, promise); for(i = 0; i < 2; i++) JS_FreeValue(ctx, resolving_funcs[i]); if (res) goto fail; } } }
O0
c
js_async_function_resume: subq $0x148, %rsp # imm = 0x148 movq %rdi, 0x140(%rsp) movq %rsi, 0x138(%rsp) movq 0x140(%rsp), %rdi movq 0x138(%rsp), %rsi addq $0x40, %rsi callq 0x71060 movq %rax, 0x108(%rsp) movq %rdx, 0x110(%rsp) movq 0x108(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x110(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x128(%rsp), %rdi movq 0x130(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x914fb jmp 0x913e0 movq 0x140(%rsp), %rdi callq 0x2bcb0 movq %rax, 0xe8(%rsp) movq %rdx, 0xf0(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0xf0(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x140(%rsp), %rdi movq 0x138(%rsp), %rax movl $0x0, 0xc8(%rsp) movq $0x3, 0xd0(%rsp) movq 0x28(%rax), %rsi movq 0x30(%rax), %rdx movq 0xc8(%rsp), %rcx movq 0xd0(%rsp), %r8 movl $0x1, %r9d leaq 0xf8(%rsp), %rax movq %rax, (%rsp) callq 0x38d90 movq %rax, 0xd8(%rsp) movq %rdx, 0xe0(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x118(%rsp) movq 0xe0(%rsp), %rax movq %rax, 0x120(%rsp) movq 0x140(%rsp), %rdi movq 0xf8(%rsp), %rsi movq 0x100(%rsp), %rdx callq 0x229d0 movq 0x140(%rsp), %rax movq 0x18(%rax), %rdi movq 0x138(%rsp), %rsi callq 0x909e0 movq 0x140(%rsp), %rdi movq 0x118(%rsp), %rsi movq 0x120(%rsp), %rdx callq 0x229d0 jmp 0x91826 movq 0x138(%rsp), %rax movq 0xa0(%rax), %rax movq -0x10(%rax), %rcx movq %rcx, 0xb8(%rsp) movq -0x8(%rax), %rax movq %rax, 0xc0(%rsp) movq 0x138(%rsp), %rax movq 0xa0(%rax), %rax movl $0x0, 0xa8(%rsp) movq $0x3, 0xb0(%rsp) movq 0xa8(%rsp), %rcx movq %rcx, -0x10(%rax) movq 0xb0(%rsp), %rcx movq %rcx, -0x8(%rax) movq 0x128(%rsp), %rdi movq 0x130(%rsp), %rsi callq 0x2cfa0 cmpl $0x0, %eax je 0x9165c movq 0x140(%rsp), %rdi movq 0x138(%rsp), %rax movl $0x0, 0x88(%rsp) movq $0x3, 0x90(%rsp) movq 0x18(%rax), %rsi movq 0x20(%rax), %rdx movq 0x88(%rsp), %rcx movq 0x90(%rsp), %r8 movl $0x1, %r9d leaq 0xb8(%rsp), %rax movq %rax, (%rsp) callq 0x38d90 movq %rax, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x118(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x120(%rsp) movq 0x140(%rsp), %rdi movq 0x118(%rsp), %rsi movq 0x120(%rsp), %rdx callq 0x229d0 movq 0x140(%rsp), %rdi movq 0xb8(%rsp), %rsi movq 0xc0(%rsp), %rdx callq 0x229d0 movq 0x140(%rsp), %rax movq 0x18(%rax), %rdi movq 0x138(%rsp), %rsi callq 0x909e0 jmp 0x91824 movq 0x140(%rsp), %rdi movq 0x128(%rsp), %rsi movq 0x130(%rsp), %rdx callq 0x229d0 movq 0x140(%rsp), %rdi movq 0x140(%rsp), %rax movq 0x88(%rax), %rsi movq 0x90(%rax), %rdx movl $0x1, %ecx leaq 0xb8(%rsp), %r8 xorl %r9d, %r9d callq 0x91830 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x140(%rsp), %rdi movq 0xb8(%rsp), %rsi movq 0xc0(%rsp), %rdx callq 0x229d0 movq 0x78(%rsp), %rdi movq 0x80(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x91706 jmp 0x913e0 movq 0x140(%rsp), %rdi movq 0x138(%rsp), %rsi leaq 0x50(%rsp), %rdx callq 0x91ba0 cmpl $0x0, %eax je 0x91744 movq 0x140(%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x229d0 jmp 0x913e0 movl $0x0, 0x2c(%rsp) cmpl $0x2, 0x2c(%rsp) jge 0x91793 movslq 0x2c(%rsp), %rcx leaq 0x30(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x8(%rsp) movq $0x3, 0x10(%rsp) movq 0x8(%rsp), %rcx movq %rcx, (%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x9174c movq 0x140(%rsp), %rdi leaq 0x50(%rsp), %rcx leaq 0x30(%rsp), %r8 movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x737a0 movl %eax, 0x28(%rsp) movq 0x140(%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x229d0 movl $0x0, 0x2c(%rsp) cmpl $0x2, 0x2c(%rsp) jge 0x91816 movq 0x140(%rsp), %rdi movslq 0x2c(%rsp), %rcx leaq 0x50(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x229d0 movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x917dd cmpl $0x0, 0x28(%rsp) je 0x91822 jmp 0x913e0 jmp 0x91824 jmp 0x91826 addq $0x148, %rsp # imm = 0x148 retq nop
js_async_function_resume: sub rsp, 148h mov [rsp+148h+var_8], rdi mov [rsp+148h+var_10], rsi mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_10] add rsi, 40h ; '@' call async_func_resume mov [rsp+148h+var_40], rax mov [rsp+148h+var_38], rdx mov rax, [rsp+148h+var_40] mov [rsp+148h+var_20], rax mov rax, [rsp+148h+var_38] mov [rsp+148h+var_18], rax mov rdi, [rsp+148h+var_20] mov rsi, [rsp+148h+var_18] call JS_IsException_1 cmp eax, 0 jz loc_914FB jmp short $+2 loc_913E0: mov rdi, [rsp+148h+var_8] call JS_GetException mov [rsp+148h+var_60], rax mov [rsp+148h+var_58], rdx mov rax, [rsp+148h+var_60] mov [rsp+148h+var_50], rax mov rax, [rsp+148h+var_58] mov [rsp+148h+var_48], rax mov rdi, [rsp+148h+var_8] mov rax, [rsp+148h+var_10] mov dword ptr [rsp+148h+var_80], 0 mov [rsp+148h+var_78], 3 mov rsi, [rax+28h] mov rdx, [rax+30h] mov rcx, [rsp+148h+var_80] mov r8, [rsp+148h+var_78] mov r9d, 1 lea rax, [rsp+148h+var_50] mov [rsp+148h+var_148], rax call JS_Call mov [rsp+148h+var_70], rax mov [rsp+148h+var_68], rdx mov rax, [rsp+148h+var_70] mov [rsp+148h+var_30], rax mov rax, [rsp+148h+var_68] mov [rsp+148h+var_28], rax mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_50] mov rdx, [rsp+148h+var_48] call JS_FreeValue mov rax, [rsp+148h+var_8] mov rdi, [rax+18h] mov rsi, [rsp+148h+var_10] call js_async_function_terminate mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_30] mov rdx, [rsp+148h+var_28] call JS_FreeValue jmp loc_91826 loc_914FB: mov rax, [rsp+148h+var_10] mov rax, [rax+0A0h] mov rcx, [rax-10h] mov [rsp+148h+var_90], rcx mov rax, [rax-8] mov [rsp+148h+var_88], rax mov rax, [rsp+148h+var_10] mov rax, [rax+0A0h] mov dword ptr [rsp+148h+var_A0], 0 mov [rsp+148h+var_98], 3 mov rcx, [rsp+148h+var_A0] mov [rax-10h], rcx mov rcx, [rsp+148h+var_98] mov [rax-8], rcx mov rdi, [rsp+148h+var_20] mov rsi, [rsp+148h+var_18] call JS_IsUndefined_0 cmp eax, 0 jz loc_9165C mov rdi, [rsp+148h+var_8] mov rax, [rsp+148h+var_10] mov dword ptr [rsp+148h+var_C0], 0 mov [rsp+148h+var_B8], 3 mov rsi, [rax+18h] mov rdx, [rax+20h] mov rcx, [rsp+148h+var_C0] mov r8, [rsp+148h+var_B8] mov r9d, 1 lea rax, [rsp+148h+var_90] mov [rsp+148h+var_148], rax call JS_Call mov [rsp+148h+var_B0], rax mov [rsp+148h+var_A8], rdx mov rax, [rsp+148h+var_B0] mov [rsp+148h+var_30], rax mov rax, [rsp+148h+var_A8] mov [rsp+148h+var_28], rax mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_30] mov rdx, [rsp+148h+var_28] call JS_FreeValue mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_90] mov rdx, [rsp+148h+var_88] call JS_FreeValue mov rax, [rsp+148h+var_8] mov rdi, [rax+18h] mov rsi, [rsp+148h+var_10] call js_async_function_terminate jmp loc_91824 loc_9165C: mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_20] mov rdx, [rsp+148h+var_18] call JS_FreeValue mov rdi, [rsp+148h+var_8] mov rax, [rsp+148h+var_8] mov rsi, [rax+88h] mov rdx, [rax+90h] mov ecx, 1 lea r8, [rsp+148h+var_90] xor r9d, r9d call js_promise_resolve mov [rsp+148h+var_130], rax mov [rsp+148h+var_128], rdx mov rax, [rsp+148h+var_130] mov [rsp+148h+var_D0], rax mov rax, [rsp+148h+var_128] mov [rsp+148h+var_C8], rax mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_90] mov rdx, [rsp+148h+var_88] call JS_FreeValue mov rdi, [rsp+148h+var_D0] mov rsi, [rsp+148h+var_C8] call JS_IsException_1 cmp eax, 0 jz short loc_91706 jmp loc_913E0 loc_91706: mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_10] lea rdx, [rsp+148h+var_F8] call js_async_function_resolve_create cmp eax, 0 jz short loc_91744 mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_D0] mov rdx, [rsp+148h+var_C8] call JS_FreeValue jmp loc_913E0 loc_91744: mov [rsp+148h+var_11C], 0 loc_9174C: cmp [rsp+148h+var_11C], 2 jge short loc_91793 movsxd rcx, [rsp+148h+var_11C] lea rax, [rsp+148h+var_118] shl rcx, 4 add rax, rcx mov dword ptr [rsp+148h+var_140], 0 mov [rsp+148h+var_138], 3 mov rcx, [rsp+148h+var_140] mov [rax], rcx mov rcx, [rsp+148h+var_138] mov [rax+8], rcx mov eax, [rsp+148h+var_11C] add eax, 1 mov [rsp+148h+var_11C], eax jmp short loc_9174C loc_91793: mov rdi, [rsp+148h+var_8] lea rcx, [rsp+148h+var_F8] lea r8, [rsp+148h+var_118] mov rsi, [rsp+148h+var_D0] mov rdx, [rsp+148h+var_C8] call perform_promise_then mov [rsp+148h+var_120], eax mov rdi, [rsp+148h+var_8] mov rsi, [rsp+148h+var_D0] mov rdx, [rsp+148h+var_C8] call JS_FreeValue mov [rsp+148h+var_11C], 0 loc_917DD: cmp [rsp+148h+var_11C], 2 jge short loc_91816 mov rdi, [rsp+148h+var_8] movsxd rcx, [rsp+148h+var_11C] lea rax, [rsp+148h+var_F8] shl rcx, 4 add rax, rcx mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov eax, [rsp+148h+var_11C] add eax, 1 mov [rsp+148h+var_11C], eax jmp short loc_917DD loc_91816: cmp [rsp+148h+var_120], 0 jz short loc_91822 jmp loc_913E0 loc_91822: jmp short $+2 loc_91824: jmp short $+2 loc_91826: add rsp, 148h retn
long long js_async_function_resume( long long *a1, _QWORD *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rdx long long v11; // rdx long long v12; // rdx long long result; // rax long long v14; // rax long long v15; // rax long long v16; // rdx long long v17; // rdx _QWORD *v18; // rax long long v19; // [rsp+8h] [rbp-140h] int v20; // [rsp+28h] [rbp-120h] int i; // [rsp+2Ch] [rbp-11Ch] int j; // [rsp+2Ch] [rbp-11Ch] _OWORD v23[2]; // [rsp+30h] [rbp-118h] BYREF _QWORD v24[5]; // [rsp+50h] [rbp-F8h] BYREF long long v25; // [rsp+78h] [rbp-D0h] long long v26; // [rsp+80h] [rbp-C8h] long long v27; // [rsp+88h] [rbp-C0h] long long v28; // [rsp+90h] [rbp-B8h] long long v29; // [rsp+98h] [rbp-B0h] long long v30; // [rsp+A0h] [rbp-A8h] long long v31; // [rsp+A8h] [rbp-A0h] long long v32; // [rsp+B0h] [rbp-98h] long long v33; // [rsp+B8h] [rbp-90h] BYREF long long v34; // [rsp+C0h] [rbp-88h] long long v35; // [rsp+C8h] [rbp-80h] long long v36; // [rsp+D0h] [rbp-78h] long long v37; // [rsp+D8h] [rbp-70h] long long v38; // [rsp+E0h] [rbp-68h] long long Exception; // [rsp+E8h] [rbp-60h] long long v40; // [rsp+F0h] [rbp-58h] long long v41; // [rsp+F8h] [rbp-50h] BYREF long long v42; // [rsp+100h] [rbp-48h] long long v43; // [rsp+108h] [rbp-40h] long long v44; // [rsp+110h] [rbp-38h] long long v45; // [rsp+118h] [rbp-30h] long long v46; // [rsp+120h] [rbp-28h] long long v47; // [rsp+128h] [rbp-20h] long long v48; // [rsp+130h] [rbp-18h] _QWORD *v49; // [rsp+138h] [rbp-10h] long long *v50; // [rsp+140h] [rbp-8h] v50 = a1; v49 = a2; v43 = async_func_resume((long long)a1, (long long)(a2 + 8), a3, a4, a5, a6, a7, a8, a9, a10); v44 = v10; v47 = v43; v48 = v10; if ( JS_IsException_1(v43, v10) ) goto LABEL_2; v14 = v49[20]; v33 = *(_QWORD *)(v14 - 16); v34 = *(_QWORD *)(v14 - 8); v15 = v49[20]; LODWORD(v31) = 0; v32 = 3LL; *(_QWORD *)(v15 - 16) = v31; *(_QWORD *)(v15 - 8) = v32; if ( JS_IsUndefined_0(v47, v48) ) { LODWORD(v27) = 0; v28 = 3LL; v29 = JS_Call((int)v50, v49[3], v49[4], 0, 3, 1, (long long)&v33); v30 = v16; v45 = v29; v46 = v16; JS_FreeValue((long long)v50, v29, v16); JS_FreeValue((long long)v50, v33, v34); return js_async_function_terminate(v50[3], (long long)v49); } JS_FreeValue((long long)v50, v47, v48); v25 = js_promise_resolve(v50, v50[17], v50[18], 1LL, &v33, 0LL); v26 = v17; JS_FreeValue((long long)v50, v33, v34); if ( JS_IsException_1(v25, v26) ) { LABEL_2: Exception = JS_GetException((long long)v50); v40 = v11; v41 = Exception; v42 = v11; LODWORD(v35) = 0; v36 = 3LL; v37 = JS_Call((int)v50, v49[5], v49[6], 0, 3, 1, (long long)&v41); v38 = v12; v45 = v37; v46 = v12; JS_FreeValue((long long)v50, v41, v42); js_async_function_terminate(v50[3], (long long)v49); return JS_FreeValue((long long)v50, v45, v46); } if ( (unsigned int)js_async_function_resolve_create(v50, v49, v24) ) { JS_FreeValue((long long)v50, v25, v26); goto LABEL_2; } for ( i = 0; i < 2; ++i ) { v18 = &v23[i]; LODWORD(v19) = 0; *v18 = v19; v18[1] = 3LL; } v20 = perform_promise_then((long long)v50, v25, v26, (long long)v24, (long long)v23); result = JS_FreeValue((long long)v50, v25, v26); for ( j = 0; j < 2; ++j ) { JS_FreeValue((long long)v50, v24[2 * j], v24[2 * j + 1]); result = (unsigned int)(j + 1); } if ( v20 ) goto LABEL_2; return result; }
js_async_function_resume: SUB RSP,0x148 MOV qword ptr [RSP + 0x140],RDI MOV qword ptr [RSP + 0x138],RSI MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x138] ADD RSI,0x40 CALL 0x00171060 MOV qword ptr [RSP + 0x108],RAX MOV qword ptr [RSP + 0x110],RDX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x110] MOV qword ptr [RSP + 0x130],RAX MOV RDI,qword ptr [RSP + 0x128] MOV RSI,qword ptr [RSP + 0x130] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001914fb JMP 0x001913e0 LAB_001913e0: MOV RDI,qword ptr [RSP + 0x140] CALL 0x0012bcb0 MOV qword ptr [RSP + 0xe8],RAX MOV qword ptr [RSP + 0xf0],RDX MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x100],RAX MOV RDI,qword ptr [RSP + 0x140] MOV RAX,qword ptr [RSP + 0x138] MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x3 MOV RSI,qword ptr [RAX + 0x28] MOV RDX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RSP + 0xc8] MOV R8,qword ptr [RSP + 0xd0] MOV R9D,0x1 LEA RAX,[RSP + 0xf8] MOV qword ptr [RSP],RAX CALL 0x00138d90 MOV qword ptr [RSP + 0xd8],RAX MOV qword ptr [RSP + 0xe0],RDX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x118],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0x120],RAX MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x100] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x140] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x138] CALL 0x001909e0 MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x120] CALL 0x001229d0 JMP 0x00191826 LAB_001914fb: MOV RAX,qword ptr [RSP + 0x138] MOV RAX,qword ptr [RAX + 0xa0] MOV RCX,qword ptr [RAX + -0x10] MOV qword ptr [RSP + 0xb8],RCX MOV RAX,qword ptr [RAX + -0x8] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x138] MOV RAX,qword ptr [RAX + 0xa0] MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x3 MOV RCX,qword ptr [RSP + 0xa8] MOV qword ptr [RAX + -0x10],RCX MOV RCX,qword ptr [RSP + 0xb0] MOV qword ptr [RAX + -0x8],RCX MOV RDI,qword ptr [RSP + 0x128] MOV RSI,qword ptr [RSP + 0x130] CALL 0x0012cfa0 CMP EAX,0x0 JZ 0x0019165c MOV RDI,qword ptr [RSP + 0x140] MOV RAX,qword ptr [RSP + 0x138] MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x3 MOV RSI,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x88] MOV R8,qword ptr [RSP + 0x90] MOV R9D,0x1 LEA RAX,[RSP + 0xb8] MOV qword ptr [RSP],RAX CALL 0x00138d90 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x118],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x120],RAX MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x120] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x140] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x138] CALL 0x001909e0 JMP 0x00191824 LAB_0019165c: MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x128] MOV RDX,qword ptr [RSP + 0x130] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x140] MOV RAX,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RAX + 0x88] MOV RDX,qword ptr [RAX + 0x90] MOV ECX,0x1 LEA R8,[RSP + 0xb8] XOR R9D,R9D CALL 0x00191830 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x80] CALL 0x00122a00 CMP EAX,0x0 JZ 0x00191706 JMP 0x001913e0 LAB_00191706: MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x138] LEA RDX,[RSP + 0x50] CALL 0x00191ba0 CMP EAX,0x0 JZ 0x00191744 MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x001229d0 JMP 0x001913e0 LAB_00191744: MOV dword ptr [RSP + 0x2c],0x0 LAB_0019174c: CMP dword ptr [RSP + 0x2c],0x2 JGE 0x00191793 MOVSXD RCX,dword ptr [RSP + 0x2c] LEA RAX,[RSP + 0x30] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x3 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x0019174c LAB_00191793: MOV RDI,qword ptr [RSP + 0x140] LEA RCX,[RSP + 0x50] LEA R8,[RSP + 0x30] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x001737a0 MOV dword ptr [RSP + 0x28],EAX MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x001229d0 MOV dword ptr [RSP + 0x2c],0x0 LAB_001917dd: CMP dword ptr [RSP + 0x2c],0x2 JGE 0x00191816 MOV RDI,qword ptr [RSP + 0x140] MOVSXD RCX,dword ptr [RSP + 0x2c] LEA RAX,[RSP + 0x50] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001229d0 MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001917dd LAB_00191816: CMP dword ptr [RSP + 0x28],0x0 JZ 0x00191822 JMP 0x001913e0 LAB_00191822: JMP 0x00191824 LAB_00191824: JMP 0x00191826 LAB_00191826: ADD RSP,0x148 RET
void js_async_function_resume(long param_1,long param_2) { long lVar1; int iVar2; uint uStack_13c; int local_11c; long local_118 [4]; long local_f8; int8 auStack_f0 [4]; int1 local_d0 [16]; int4 local_c0; uint uStack_bc; int8 local_b8; int1 local_b0 [16]; int4 local_a0; uint uStack_9c; int8 local_98; int8 local_90; int8 local_88; int4 local_80; uint uStack_7c; int8 local_78; int1 local_70 [16]; int1 local_60 [16]; int1 local_50 [16]; int1 local_40 [16]; int1 local_30 [16]; int1 local_20 [16]; long local_10; long local_8; local_10 = param_2; local_8 = param_1; local_40 = async_func_resume(param_1,param_2 + 0x40); local_20 = local_40; iVar2 = JS_IsException(local_40._0_8_,local_40._8_8_); if (iVar2 == 0) { local_90 = *(int8 *)(*(long *)(local_10 + 0xa0) + -0x10); local_88 = *(int8 *)(*(long *)(local_10 + 0xa0) + -8); lVar1 = *(long *)(local_10 + 0xa0); local_a0 = 0; local_98 = 3; *(ulong *)(lVar1 + -0x10) = (ulong)uStack_9c << 0x20; *(int8 *)(lVar1 + -8) = 3; iVar2 = JS_IsUndefined(local_20._0_8_,local_20._8_8_); if (iVar2 != 0) { local_c0 = 0; local_b8 = 3; local_b0 = JS_Call(local_8,*(int8 *)(local_10 + 0x18),*(int8 *)(local_10 + 0x20), (ulong)uStack_bc << 0x20,3,1,&local_90); local_30 = local_b0; JS_FreeValue(local_8,local_b0._0_8_,local_b0._8_8_); JS_FreeValue(local_8,local_90,local_88); js_async_function_terminate(*(int8 *)(local_8 + 0x18),local_10); return; } JS_FreeValue(local_8,local_20._0_8_,local_20._8_8_); local_d0 = js_promise_resolve(local_8,*(int8 *)(local_8 + 0x88), *(int8 *)(local_8 + 0x90),1,&local_90,0); JS_FreeValue(local_8,local_90,local_88); iVar2 = JS_IsException(local_d0._0_8_,local_d0._8_8_); if (iVar2 == 0) { iVar2 = js_async_function_resolve_create(local_8,local_10,local_118 + 4); if (iVar2 == 0) { for (local_11c = 0; local_11c < 2; local_11c = local_11c + 1) { local_118[(long)local_11c * 2] = (ulong)uStack_13c << 0x20; local_118[(long)local_11c * 2 + 1] = 3; } iVar2 = perform_promise_then(local_8,local_d0._0_8_,local_d0._8_8_,local_118 + 4,local_118); JS_FreeValue(local_8,local_d0._0_8_,local_d0._8_8_); for (local_11c = 0; local_11c < 2; local_11c = local_11c + 1) { JS_FreeValue(local_8,local_118[(long)local_11c * 2 + 4], *(int8 *)(local_d0 + (long)local_11c * 0x10 + -0x20)); } if (iVar2 == 0) { return; } } else { JS_FreeValue(local_8,local_d0._0_8_,local_d0._8_8_); } } } local_60 = JS_GetException(local_8); local_80 = 0; local_78 = 3; local_50 = local_60; local_70 = JS_Call(local_8,*(int8 *)(local_10 + 0x28),*(int8 *)(local_10 + 0x30), (ulong)uStack_7c << 0x20,3,1,local_50); local_30 = local_70; JS_FreeValue(local_8,local_50._0_8_,local_50._8_8_); js_async_function_terminate(*(int8 *)(local_8 + 0x18),local_10); JS_FreeValue(local_8,local_30._0_8_,local_30._8_8_); return; }
49,146
test_conc490
eloqsql/libmariadb/unittest/libmariadb/connection.c
static int test_conc490(MYSQL *my __attribute__((unused))) { MYSQL *mysql= mysql_init(NULL); if (!my_test_connect(mysql, hostname, username, password, NULL, port, socketname, CLIENT_CONNECT_WITH_DB)) { diag("error: %s\n", mysql_error(mysql)); return FAIL; } mysql_close(mysql); return OK; }
O3
c
test_conc490: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx xorl %ebx, %ebx xorl %edi, %edi callq 0x1efb5 movq %rax, %r14 movq 0x3c288(%rip), %rsi # 0x52640 movq 0x3c289(%rip), %rdx # 0x52648 movq 0x3c28a(%rip), %rcx # 0x52650 movl 0x3c293(%rip), %r9d # 0x52660 movq %rax, %rdi xorl %r8d, %r8d pushq $0x8 pushq 0x3c28d(%rip) # 0x52668 callq 0x1422d addq $0x10, %rsp movq %r14, %rdi testq %rax, %rax je 0x163f3 callq 0x20d0c jmp 0x1640e callq 0x23312 leaq 0x25ac7(%rip), %rdi # 0x3bec6 movq %rax, %rsi xorl %eax, %eax callq 0x1bb8f movl $0x1, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %rbp retq
test_conc490: push rbp mov rbp, rsp push r14 push rbx xor ebx, ebx xor edi, edi call mysql_init mov r14, rax mov rsi, cs:hostname mov rdx, cs:username mov rcx, cs:password mov r9d, cs:port mov rdi, rax xor r8d, r8d push 8 push cs:socketname call my_test_connect add rsp, 10h mov rdi, r14 test rax, rax jz short loc_163F3 call mysql_close jmp short loc_1640E loc_163F3: call mysql_error lea rdi, aErrorS_1; "error: %s\n" mov rsi, rax xor eax, eax call diag mov ebx, 1 loc_1640E: mov eax, ebx pop rbx pop r14 pop rbp retn
long long test_conc490() { unsigned int v0; // ebx long long v1; // rdi int v2; // eax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d v0 = 0; v1 = mysql_init(0LL); if ( my_test_connect(v1, hostname, username, password, 0, port, socketname, 8LL) ) { mysql_close(v1); } else { v2 = mysql_error(v1); diag((unsigned int)"error: %s\n", v2, v3, v4, v5, v6); return 1; } return v0; }
test_conc490: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX XOR EBX,EBX XOR EDI,EDI CALL 0x0011efb5 MOV R14,RAX MOV RSI,qword ptr [0x00152640] MOV RDX,qword ptr [0x00152648] MOV RCX,qword ptr [0x00152650] MOV R9D,dword ptr [0x00152660] MOV RDI,RAX XOR R8D,R8D PUSH 0x8 PUSH qword ptr [0x00152668] CALL 0x0011422d ADD RSP,0x10 MOV RDI,R14 TEST RAX,RAX JZ 0x001163f3 CALL 0x00120d0c JMP 0x0011640e LAB_001163f3: CALL 0x00123312 LEA RDI,[0x13bec6] MOV RSI,RAX XOR EAX,EAX CALL 0x0011bb8f MOV EBX,0x1 LAB_0011640e: MOV EAX,EBX POP RBX POP R14 POP RBP RET
bool test_conc490(void) { int8 uVar1; long lVar2; uVar1 = mysql_init(0); lVar2 = my_test_connect(uVar1,hostname,username,password,0,port,socketname,8); if (lVar2 == 0) { uVar1 = mysql_error(uVar1); diag("error: %s\n",uVar1); } else { mysql_close(); } return lVar2 == 0; }
49,147
stbi_write_jpg
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h
STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality) { stbi__write_context s = { 0 }; if (stbi__start_write_file(&s,filename)) { int r = stbi_write_jpg_core(&s, x, y, comp, data, quality); stbi__end_write_file(&s); return r; } else return 0; }
O0
c
stbi_write_jpg: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) leaq -0x88(%rbp), %rdi xorl %esi, %esi movl $0x58, %edx callq 0xb1d0 movq -0x10(%rbp), %rsi leaq -0x88(%rbp), %rdi callq 0x7e4d0 cmpl $0x0, %eax je 0x65af2 movl -0x14(%rbp), %esi movl -0x18(%rbp), %edx movl -0x1c(%rbp), %ecx movq -0x28(%rbp), %r8 movl -0x2c(%rbp), %r9d leaq -0x88(%rbp), %rdi callq 0x7e520 movl %eax, -0x8c(%rbp) leaq -0x88(%rbp), %rdi callq 0x7f610 movl -0x8c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x65af9 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
stbi_write_jpg: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d lea rdi, [rbp+var_88] xor esi, esi mov edx, 58h ; 'X' call _memset mov rsi, [rbp+var_10] lea rdi, [rbp+var_88] call stbi__start_write_file cmp eax, 0 jz short loc_65AF2 mov esi, [rbp+var_14] mov edx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8, [rbp+var_28] mov r9d, [rbp+var_2C] lea rdi, [rbp+var_88] call stbi_write_jpg_core mov [rbp+var_8C], eax lea rdi, [rbp+var_88] call stbi__end_write_file mov eax, [rbp+var_8C] mov [rbp+var_4], eax jmp short loc_65AF9 loc_65AF2: mov [rbp+var_4], 0 loc_65AF9: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long stbi_write_jpg( long long a1, unsigned int a2, unsigned int a3, unsigned int a4, long long a5, unsigned int a6) { unsigned int v7; // [rsp+4h] [rbp-8Ch] _BYTE v8[92]; // [rsp+8h] [rbp-88h] BYREF unsigned int v9; // [rsp+64h] [rbp-2Ch] long long v10; // [rsp+68h] [rbp-28h] unsigned int v11; // [rsp+74h] [rbp-1Ch] unsigned int v12; // [rsp+78h] [rbp-18h] unsigned int v13; // [rsp+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v10 = a5; v9 = a6; memset(v8, 0LL, 88LL); if ( (unsigned int)stbi__start_write_file(v8, v14) ) { v7 = stbi_write_jpg_core(v8, v13, v12, v11, v10, v9); stbi__end_write_file(v8); return v7; } else { return 0; } }
stbi_write_jpg: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D LEA RDI,[RBP + -0x88] XOR ESI,ESI MOV EDX,0x58 CALL 0x0010b1d0 MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x88] CALL 0x0017e4d0 CMP EAX,0x0 JZ 0x00165af2 MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8,qword ptr [RBP + -0x28] MOV R9D,dword ptr [RBP + -0x2c] LEA RDI,[RBP + -0x88] CALL 0x0017e520 MOV dword ptr [RBP + -0x8c],EAX LEA RDI,[RBP + -0x88] CALL 0x0017f610 MOV EAX,dword ptr [RBP + -0x8c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00165af9 LAB_00165af2: MOV dword ptr [RBP + -0x4],0x0 LAB_00165af9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 stbi_write_jpg(int8 param_1,int4 param_2,int4 param_3,int4 param_4, int8 param_5,int4 param_6) { int iVar1; int4 uVar2; int1 local_90 [92]; int4 local_34; int8 local_30; int4 local_24; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_34 = param_6; local_30 = param_5; local_24 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; memset(local_90,0,0x58); iVar1 = stbi__start_write_file(local_90,local_18); if (iVar1 == 0) { local_c = 0; } else { uVar2 = stbi_write_jpg_core(local_90,local_1c,local_20,local_24,local_30,local_34); stbi__end_write_file(local_90); local_c = uVar2; } return local_c; }
49,148
nglog::CapturedStream::Capture()
ng-log[P]ng-log/src/googletest.h
void Capture() { // Keep original stream for later CHECK(!uncaptured_fd_) << ", Stream " << fd_ << " already captured!"; uncaptured_fd_.reset(dup(fd_)); CHECK(uncaptured_fd_); // Open file to save stream to FileDescriptor cap_fd{open(filename_.c_str(), O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR)}; CHECK(cap_fd); // Send stdout/stderr to this file fflush(nullptr); CHECK(dup2(cap_fd.get(), fd_) != -1); CHECK(cap_fd.close() != -1); }
O1
c
nglog::CapturedStream::Capture(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdi, %r14 cmpl $-0x1, 0x4(%rdi) jne 0xa04c leaq 0x4(%r14), %rbx movl (%r14), %edi callq 0x7890 movl %eax, %ebp cmpl $-0x1, 0x4(%r14) je 0x9fec movq %rbx, %rdi callq 0x9c5e movl %ebp, (%rbx) cmpl $-0x1, %ebp je 0xa0b9 movq 0x8(%r14), %rdi movl $0x241, %esi # imm = 0x241 movl $0x180, %edx # imm = 0x180 xorl %eax, %eax callq 0x73b0 movl %eax, %ebp cmpl $-0x1, %eax je 0xa0f8 xorl %edi, %edi callq 0x7640 movl (%r14), %esi movl %ebp, %edi callq 0x74c0 cmpl $-0x1, %eax je 0xa139 movl %ebp, %edi callq 0x7a60 cmpl $-0x1, %eax je 0xa17a addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x19124(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x146, %edx # imm = 0x146 callq 0xf05c movq %rbx, %rdi callq 0xb7ce movq %rax, %r15 leaq 0x191d0(%rip), %rsi # 0x23247 movl $0x1e, %edx movq %rax, %rdi callq 0x7600 leaq 0x191db(%rip), %rsi # 0x23266 movl $0x9, %edx movq %r15, %rdi callq 0x7600 movl (%r14), %esi movq %r15, %rdi callq 0x7990 leaq 0x191c6(%rip), %rsi # 0x23270 movl $0x12, %edx movq %rax, %rdi callq 0x7600 jmp 0xa0ee leaq 0x190b7(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x148, %edx # imm = 0x148 callq 0xf05c movq %rbx, %rdi callq 0xb7ce leaq 0x191a2(%rip), %rsi # 0x23283 movl $0x1d, %edx movq %rax, %rdi callq 0x7600 leaq 0x8(%rsp), %rdi callq 0xf0a0 leaq 0x19078(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rdi movl $0x14d, %edx # imm = 0x14D callq 0xf05c leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0xb7ce leaq 0x1917f(%rip), %rsi # 0x232a1 movl $0x15, %edx movq %rax, %rdi callq 0x7600 leaq 0x8(%rsp), %rdi callq 0xf0a0 leaq 0x19037(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rdi movl $0x151, %edx # imm = 0x151 callq 0xf05c leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0xb7ce leaq 0x19154(%rip), %rsi # 0x232b7 movl $0x2c, %edx movq %rax, %rdi callq 0x7600 leaq 0x8(%rsp), %rdi callq 0xf0a0 leaq 0x18ff6(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rdi movl $0x152, %edx # imm = 0x152 callq 0xf05c leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0xb7ce leaq 0x19140(%rip), %rsi # 0x232e4 movl $0x23, %edx movq %rax, %rdi callq 0x7600 leaq 0x8(%rsp), %rdi callq 0xf0a0 jmp 0xa1f2 jmp 0xa1ea jmp 0xa1ea jmp 0xa1ea movq %rax, %rbx movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0xa1d2 jmp 0xa1cf movq %rax, %rbx cmpl $-0x1, %ebp je 0xa1de movl %ebp, %edi callq 0x7a60 movq %rbx, %rdi callq 0x79b0 jmp 0xa1f2 jmp 0xa1ea movq %rbx, %rdi callq 0xf0a0 movq %rax, %rdi callq 0x9923
_ZN5nglog14CapturedStream7CaptureEv: push rbp push r15 push r14 push rbx sub rsp, 68h mov r14, rdi cmp dword ptr [rdi+4], 0FFFFFFFFh jnz short loc_A04C lea rbx, [r14+4] mov edi, [r14] call _dup mov ebp, eax cmp dword ptr [r14+4], 0FFFFFFFFh jz short loc_9FEC mov rdi, rbx; this call _ZN5nglog5tools14FileDescriptor12unsafe_closeEv; nglog::tools::FileDescriptor::unsafe_close(void) loc_9FEC: mov [rbx], ebp cmp ebp, 0FFFFFFFFh jz loc_A0B9 mov rdi, [r14+8] mov esi, 241h mov edx, 180h xor eax, eax call _open mov ebp, eax cmp eax, 0FFFFFFFFh jz loc_A0F8 xor edi, edi call _fflush mov esi, [r14] mov edi, ebp call _dup2 cmp eax, 0FFFFFFFFh jz loc_A139 mov edi, ebp call _close cmp eax, 0FFFFFFFFh jz loc_A17A add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_A04C: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rbx, [rsp+88h+var_80] mov rdi, rbx; this mov edx, 146h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov r15, rax lea rsi, aCheckFailedUnc; "Check failed: !uncaptured_fd_ " mov edx, 1Eh mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aStream; ", Stream " mov edx, 9 mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14] mov rdi, r15 call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aAlreadyCapture; " already captured!" mov edx, 12h mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_A0EE loc_A0B9: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rbx, [rsp+88h+var_80] mov rdi, rbx; this mov edx, 148h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedUnc_0; "Check failed: uncaptured_fd_ " mov edx, 1Dh mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_A0EE: lea rdi, [rsp+88h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_A0F8: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+88h+var_80]; this mov edx, 14Dh; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) lea rbx, [rsp+88h+var_80] mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedCap_0; "Check failed: cap_fd " mov edx, 15h mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+88h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_A139: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+88h+var_80]; this mov edx, 151h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) lea rbx, [rsp+88h+var_80] mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedDup; "Check failed: dup2(cap_fd.get(), fd_) !"... mov edx, 2Ch ; ',' mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+88h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_A17A: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+88h+var_80]; this mov edx, 152h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) lea rbx, [rsp+88h+var_80] mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedCap_1; "Check failed: cap_fd.close() != -1 " mov edx, 23h ; '#' mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+88h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() jmp short loc_A1F2 jmp short loc_A1EA jmp short loc_A1EA jmp short loc_A1EA mov rbx, rax mov ebp, 0FFFFFFFFh jmp short loc_A1D2 jmp short $+2 loc_A1CF: mov rbx, rax loc_A1D2: cmp ebp, 0FFFFFFFFh jz short loc_A1DE mov edi, ebp call _close loc_A1DE: mov rdi, rbx call __Unwind_Resume jmp short loc_A1F2 jmp short $+2 loc_A1EA: mov rdi, rbx; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_A1F2: mov rdi, rax call __clang_call_terminate
long long nglog::CapturedStream::Capture(nglog::CapturedStream *this) { int v1; // ebp unsigned int v2; // ebp long long result; // rax long long v4; // r15 long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rax _BYTE v10[128]; // [rsp+8h] [rbp-80h] BYREF if ( *((_DWORD *)this + 1) != -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v10, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 326); v4 = nglog::LogMessage::stream((nglog::LogMessage *)v10); std::__ostream_insert<char,std::char_traits<char>>(v4, "Check failed: !uncaptured_fd_ ", 30LL); std::__ostream_insert<char,std::char_traits<char>>(v4, ", Stream ", 9LL); v5 = std::ostream::operator<<(v4, *(unsigned int *)this); std::__ostream_insert<char,std::char_traits<char>>(v5, " already captured!", 18LL); goto LABEL_11; } v1 = dup(*(unsigned int *)this); if ( *((_DWORD *)this + 1) != -1 ) nglog::tools::FileDescriptor::unsafe_close((nglog::CapturedStream *)((char *)this + 4)); *((_DWORD *)this + 1) = v1; if ( v1 == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v10, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 328); v6 = nglog::LogMessage::stream((nglog::LogMessage *)v10); std::__ostream_insert<char,std::char_traits<char>>(v6, "Check failed: uncaptured_fd_ ", 29LL); LABEL_11: nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10); } v2 = open(*((_QWORD *)this + 1), 577LL, 384LL); if ( v2 == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v10, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 333); v7 = nglog::LogMessage::stream((nglog::LogMessage *)v10); std::__ostream_insert<char,std::char_traits<char>>(v7, "Check failed: cap_fd ", 21LL); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10); } fflush(0LL); if ( (unsigned int)dup2(v2, *(unsigned int *)this) == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v10, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 337); v8 = nglog::LogMessage::stream((nglog::LogMessage *)v10); std::__ostream_insert<char,std::char_traits<char>>(v8, "Check failed: dup2(cap_fd.get(), fd_) != -1 ", 44LL); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10); } result = close(v2); if ( (_DWORD)result == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v10, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 338); v9 = nglog::LogMessage::stream((nglog::LogMessage *)v10); std::__ostream_insert<char,std::char_traits<char>>(v9, "Check failed: cap_fd.close() != -1 ", 35LL); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v10); } return result; }
Capture: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RDI CMP dword ptr [RDI + 0x4],-0x1 JNZ 0x0010a04c LEA RBX,[R14 + 0x4] MOV EDI,dword ptr [R14] CALL 0x00107890 MOV EBP,EAX CMP dword ptr [R14 + 0x4],-0x1 JZ 0x00109fec MOV RDI,RBX CALL 0x00109c5e LAB_00109fec: MOV dword ptr [RBX],EBP CMP EBP,-0x1 JZ 0x0010a0b9 MOV RDI,qword ptr [R14 + 0x8] MOV ESI,0x241 MOV EDX,0x180 XOR EAX,EAX CALL 0x001073b0 MOV EBP,EAX CMP EAX,-0x1 JZ 0x0010a0f8 XOR EDI,EDI CALL 0x00107640 MOV ESI,dword ptr [R14] MOV EDI,EBP CALL 0x001074c0 CMP EAX,-0x1 JZ 0x0010a139 LAB_0010a031: MOV EDI,EBP CALL 0x00107a60 LAB_0010a038: CMP EAX,-0x1 JZ 0x0010a17a ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_0010a04c: LEA RSI,[0x123177] LEA RBX,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x146 CALL 0x0010f05c LAB_0010a065: MOV RDI,RBX CALL 0x0010b7ce MOV R15,RAX LEA RSI,[0x123247] MOV EDX,0x1e MOV RDI,RAX CALL 0x00107600 LEA RSI,[0x123266] MOV EDX,0x9 MOV RDI,R15 CALL 0x00107600 MOV ESI,dword ptr [R14] MOV RDI,R15 CALL 0x00107990 LEA RSI,[0x123270] MOV EDX,0x12 MOV RDI,RAX CALL 0x00107600 LAB_0010a0b7: JMP 0x0010a0ee LAB_0010a0b9: LEA RSI,[0x123177] LEA RBX,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x148 CALL 0x0010f05c LAB_0010a0d2: MOV RDI,RBX CALL 0x0010b7ce LEA RSI,[0x123283] MOV EDX,0x1d MOV RDI,RAX CALL 0x00107600 LAB_0010a0ee: LEA RDI,[RSP + 0x8] CALL 0x0010f0a0 LAB_0010a0f8: LEA RSI,[0x123177] LEA RDI,[RSP + 0x8] MOV EDX,0x14d CALL 0x0010f05c LAB_0010a10e: LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x0010b7ce LEA RSI,[0x1232a1] MOV EDX,0x15 MOV RDI,RAX CALL 0x00107600 LAB_0010a12f: LEA RDI,[RSP + 0x8] CALL 0x0010f0a0 LAB_0010a139: LEA RSI,[0x123177] LEA RDI,[RSP + 0x8] MOV EDX,0x151 CALL 0x0010f05c LAB_0010a14f: LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x0010b7ce LEA RSI,[0x1232b7] MOV EDX,0x2c MOV RDI,RAX CALL 0x00107600 LAB_0010a170: LEA RDI,[RSP + 0x8] CALL 0x0010f0a0 LAB_0010a17a: LEA RSI,[0x123177] LEA RDI,[RSP + 0x8] MOV EDX,0x152 CALL 0x0010f05c LAB_0010a190: LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x0010b7ce LEA RSI,[0x1232e4] MOV EDX,0x23 MOV RDI,RAX CALL 0x00107600 LAB_0010a1b1: LEA RDI,[RSP + 0x8] CALL 0x0010f0a0 LAB_0010a1bb: JMP 0x0010a1f2 LAB_0010a1f2: MOV RDI,RAX CALL 0x00109923
/* nglog::CapturedStream::Capture() */ void __thiscall nglog::CapturedStream::Capture(CapturedStream *this) { int iVar1; int iVar2; ostream *poVar3; int8 uVar4; LogMessageFatal local_80 [96]; if (*(int *)(this + 4) == -1) { iVar1 = dup(*(int *)this); if (*(int *)(this + 4) != -1) { tools::FileDescriptor::unsafe_close((FileDescriptor *)(this + 4)); } *(int *)(this + 4) = iVar1; if (iVar1 == -1) { LogMessageFatal::LogMessageFatal (local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h" ,0x148); /* try { // try from 0010a0d2 to 0010a0ed has its CatchHandler @ 0010a1e8 */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>> (poVar3,"Check failed: uncaptured_fd_ ",0x1d); goto LAB_0010a0ee; } iVar1 = open(*(char **)(this + 8),0x241,0x180); if (iVar1 == -1) goto LAB_0010a0f8; fflush((FILE *)0x0); iVar2 = dup2(iVar1,*(int *)this); if (iVar2 != -1) { /* try { // try from 0010a031 to 0010a037 has its CatchHandler @ 0010a1bb */ iVar1 = close(iVar1); if (iVar1 != -1) { return; } goto LAB_0010a17a; } } else { LogMessageFatal::LogMessageFatal (local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 0x146); /* try { // try from 0010a065 to 0010a0b6 has its CatchHandler @ 0010a1ea */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Check failed: !uncaptured_fd_ ",0x1e) ; std::__ostream_insert<char,std::char_traits<char>>(poVar3,", Stream ",9); poVar3 = (ostream *)std::ostream::operator<<(poVar3,*(int *)this); std::__ostream_insert<char,std::char_traits<char>>(poVar3," already captured!",0x12); LAB_0010a0ee: LogMessageFatal::~LogMessageFatal(local_80); LAB_0010a0f8: /* try { // try from 0010a0f8 to 0010a10d has its CatchHandler @ 0010a1cf */ LogMessageFatal::LogMessageFatal (local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 0x14d); /* try { // try from 0010a10e to 0010a12e has its CatchHandler @ 0010a1c1 */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Check failed: cap_fd ",0x15); /* try { // try from 0010a12f to 0010a138 has its CatchHandler @ 0010a1cf */ LogMessageFatal::~LogMessageFatal(local_80); } /* try { // try from 0010a139 to 0010a14e has its CatchHandler @ 0010a1cd */ LogMessageFatal::LogMessageFatal (local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 0x151); /* try { // try from 0010a14f to 0010a16f has its CatchHandler @ 0010a1bf */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>> (poVar3,"Check failed: dup2(cap_fd.get(), fd_) != -1 ",0x2c); /* try { // try from 0010a170 to 0010a179 has its CatchHandler @ 0010a1cd */ LogMessageFatal::~LogMessageFatal(local_80); LAB_0010a17a: /* try { // try from 0010a17a to 0010a18f has its CatchHandler @ 0010a1c3 */ LogMessageFatal::LogMessageFatal (local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 0x152); /* try { // try from 0010a190 to 0010a1b0 has its CatchHandler @ 0010a1bd */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>> (poVar3,"Check failed: cap_fd.close() != -1 ",0x23); /* try { // try from 0010a1b1 to 0010a1ba has its CatchHandler @ 0010a1c3 */ uVar4 = LogMessageFatal::~LogMessageFatal(local_80); /* catch(type#1 @ 00000000) { ... } // from try @ 0010a031 with catch @ 0010a1bb */ /* catch(type#1 @ 00000000) { ... } // from try @ 0010a1ea with catch @ 0010a1f2 */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar4); }
49,149
nglog::CapturedStream::Capture()
ng-log[P]ng-log/src/googletest.h
void Capture() { // Keep original stream for later CHECK(!uncaptured_fd_) << ", Stream " << fd_ << " already captured!"; uncaptured_fd_.reset(dup(fd_)); CHECK(uncaptured_fd_); // Open file to save stream to FileDescriptor cap_fd{open(filename_.c_str(), O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR)}; CHECK(cap_fd); // Send stdout/stderr to this file fflush(nullptr); CHECK(dup2(cap_fd.get(), fd_) != -1); CHECK(cap_fd.close() != -1); }
O3
c
nglog::CapturedStream::Capture(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdi, %r14 cmpl $-0x1, 0x4(%rdi) jne 0x9eae leaq 0x4(%r14), %rbx movl (%r14), %edi callq 0x7890 movl %eax, %ebp cmpl $-0x1, 0x4(%r14) je 0x9e4e movq %rbx, %rdi callq 0x9ab6 movl %ebp, (%rbx) cmpl $-0x1, %ebp je 0x9f1e movq 0x8(%r14), %rdi movl $0x241, %esi # imm = 0x241 movl $0x180, %edx # imm = 0x180 xorl %eax, %eax callq 0x73b0 cmpl $-0x1, %eax je 0x9f58 movl %eax, %ebp xorl %edi, %edi callq 0x7640 movl (%r14), %esi movl %ebp, %edi callq 0x74c0 cmpl $-0x1, %eax je 0x9f8f movl %ebp, %edi callq 0x7a60 cmpl $-0x1, %eax je 0x9fd0 addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x192c2(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x146, %edx # imm = 0x146 callq 0xee3a movq %rbx, %rdi callq 0xb5b2 movq %rax, %r15 leaq 0x1936e(%rip), %rsi # 0x23247 movl $0x1e, %edx movq %rax, %rdi callq 0x7600 leaq 0x19379(%rip), %rsi # 0x23266 movl $0x9, %edx movq %r15, %rdi callq 0x7600 movl (%r14), %esi movq %r15, %rdi callq 0x7990 leaq 0x19364(%rip), %rsi # 0x23270 movl $0x12, %edx movq %rax, %rdi callq 0x7600 jmp 0xa005 leaq 0x19252(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x148, %edx # imm = 0x148 callq 0xee3a movq %rbx, %rdi callq 0xb5b2 leaq 0x1933d(%rip), %rsi # 0x23283 movl $0x1d, %edx movq %rax, %rdi callq 0x7600 jmp 0xa005 leaq 0x19218(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x14d, %edx # imm = 0x14D callq 0xee3a movq %rbx, %rdi callq 0xb5b2 leaq 0x19321(%rip), %rsi # 0x232a1 movl $0x15, %edx movq %rax, %rdi callq 0x7600 jmp 0xa005 leaq 0x191e1(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rdi movl $0x151, %edx # imm = 0x151 callq 0xee3a leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0xb5b2 leaq 0x192fe(%rip), %rsi # 0x232b7 movl $0x2c, %edx movq %rax, %rdi callq 0x7600 leaq 0x8(%rsp), %rdi callq 0xee7e leaq 0x191a0(%rip), %rsi # 0x23177 leaq 0x8(%rsp), %rbx movq %rbx, %rdi movl $0x152, %edx # imm = 0x152 callq 0xee3a movq %rbx, %rdi callq 0xb5b2 leaq 0x192ec(%rip), %rsi # 0x232e4 movl $0x23, %edx movq %rax, %rdi callq 0x7600 leaq 0x8(%rsp), %rdi callq 0xee7e jmp 0xa035 jmp 0xa02d movq %rax, %rbx movl %ebp, %edi callq 0x7a60 movq %rbx, %rdi callq 0x79b0 jmp 0xa035 jmp 0xa02d jmp 0xa02d jmp 0xa02d movq %rbx, %rdi callq 0xee7e movq %rax, %rdi callq 0x9777 nop
_ZN5nglog14CapturedStream7CaptureEv: push rbp push r15 push r14 push rbx sub rsp, 68h mov r14, rdi cmp dword ptr [rdi+4], 0FFFFFFFFh jnz short loc_9EAE lea rbx, [r14+4] mov edi, [r14] call _dup mov ebp, eax cmp dword ptr [r14+4], 0FFFFFFFFh jz short loc_9E4E mov rdi, rbx; this call _ZN5nglog5tools14FileDescriptor12unsafe_closeEv; nglog::tools::FileDescriptor::unsafe_close(void) loc_9E4E: mov [rbx], ebp cmp ebp, 0FFFFFFFFh jz loc_9F1E mov rdi, [r14+8] mov esi, 241h mov edx, 180h xor eax, eax call _open cmp eax, 0FFFFFFFFh jz loc_9F58 mov ebp, eax xor edi, edi call _fflush mov esi, [r14] mov edi, ebp call _dup2 cmp eax, 0FFFFFFFFh jz loc_9F8F mov edi, ebp call _close cmp eax, 0FFFFFFFFh jz loc_9FD0 add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_9EAE: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rbx, [rsp+88h+var_80] mov rdi, rbx; this mov edx, 146h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov r15, rax lea rsi, aCheckFailedUnc; "Check failed: !uncaptured_fd_ " mov edx, 1Eh mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aStream; ", Stream " mov edx, 9 mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14] mov rdi, r15 call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aAlreadyCapture; " already captured!" mov edx, 12h mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp loc_A005 loc_9F1E: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rbx, [rsp+88h+var_80] mov rdi, rbx; this mov edx, 148h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedUnc_0; "Check failed: uncaptured_fd_ " mov edx, 1Dh mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp loc_A005 loc_9F58: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rbx, [rsp+88h+var_80] mov rdi, rbx; this mov edx, 14Dh; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedCap_0; "Check failed: cap_fd " mov edx, 15h mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_A005 loc_9F8F: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+88h+var_80]; this mov edx, 151h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) lea rbx, [rsp+88h+var_80] mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedDup; "Check failed: dup2(cap_fd.get(), fd_) !"... mov edx, 2Ch ; ',' mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+88h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_9FD0: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rbx, [rsp+88h+var_80] mov rdi, rbx; this mov edx, 152h; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, rbx; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) lea rsi, aCheckFailedCap_1; "Check failed: cap_fd.close() != -1 " mov edx, 23h ; '#' mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_A005: lea rdi, [rsp+88h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() jmp short loc_A035 jmp short loc_A02D mov rbx, rax mov edi, ebp call _close mov rdi, rbx call __Unwind_Resume jmp short loc_A035 jmp short loc_A02D jmp short loc_A02D jmp short $+2 loc_A02D: mov rdi, rbx; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_A035: mov rdi, rax call __clang_call_terminate
long long nglog::CapturedStream::Capture(nglog::CapturedStream *this) { int v1; // ebp unsigned int v2; // eax unsigned int v3; // ebp long long result; // rax long long v5; // r15 long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax _BYTE v11[128]; // [rsp+8h] [rbp-80h] BYREF if ( *((_DWORD *)this + 1) != -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v11, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 326); v5 = nglog::LogMessage::stream((nglog::LogMessage *)v11); std::__ostream_insert<char,std::char_traits<char>>(v5, "Check failed: !uncaptured_fd_ ", 30LL); std::__ostream_insert<char,std::char_traits<char>>(v5, ", Stream ", 9LL); v6 = std::ostream::operator<<(v5, *(unsigned int *)this); std::__ostream_insert<char,std::char_traits<char>>(v6, " already captured!", 18LL); goto LABEL_14; } v1 = dup(*(unsigned int *)this); if ( *((_DWORD *)this + 1) != -1 ) nglog::tools::FileDescriptor::unsafe_close((nglog::CapturedStream *)((char *)this + 4)); *((_DWORD *)this + 1) = v1; if ( v1 == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v11, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 328); v7 = nglog::LogMessage::stream((nglog::LogMessage *)v11); std::__ostream_insert<char,std::char_traits<char>>(v7, "Check failed: uncaptured_fd_ ", 29LL); goto LABEL_14; } v2 = open(*((_QWORD *)this + 1), 577LL, 384LL); if ( v2 == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v11, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 333); v8 = nglog::LogMessage::stream((nglog::LogMessage *)v11); std::__ostream_insert<char,std::char_traits<char>>(v8, "Check failed: cap_fd ", 21LL); goto LABEL_14; } v3 = v2; fflush(0LL); if ( (unsigned int)dup2(v3, *(unsigned int *)this) == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v11, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 337); v9 = nglog::LogMessage::stream((nglog::LogMessage *)v11); std::__ostream_insert<char,std::char_traits<char>>(v9, "Check failed: dup2(cap_fd.get(), fd_) != -1 ", 44LL); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v11); } result = close(v3); if ( (_DWORD)result == -1 ) { nglog::LogMessageFatal::LogMessageFatal( (nglog::LogMessageFatal *)v11, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 338); v10 = nglog::LogMessage::stream((nglog::LogMessage *)v11); std::__ostream_insert<char,std::char_traits<char>>(v10, "Check failed: cap_fd.close() != -1 ", 35LL); LABEL_14: nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v11); } return result; }
Capture: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RDI CMP dword ptr [RDI + 0x4],-0x1 JNZ 0x00109eae LEA RBX,[R14 + 0x4] MOV EDI,dword ptr [R14] CALL 0x00107890 MOV EBP,EAX CMP dword ptr [R14 + 0x4],-0x1 JZ 0x00109e4e MOV RDI,RBX CALL 0x00109ab6 LAB_00109e4e: MOV dword ptr [RBX],EBP CMP EBP,-0x1 JZ 0x00109f1e MOV RDI,qword ptr [R14 + 0x8] MOV ESI,0x241 MOV EDX,0x180 XOR EAX,EAX CALL 0x001073b0 CMP EAX,-0x1 JZ 0x00109f58 MOV EBP,EAX XOR EDI,EDI CALL 0x00107640 MOV ESI,dword ptr [R14] MOV EDI,EBP CALL 0x001074c0 CMP EAX,-0x1 JZ 0x00109f8f LAB_00109e93: MOV EDI,EBP CALL 0x00107a60 LAB_00109e9a: CMP EAX,-0x1 JZ 0x00109fd0 ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_00109eae: LEA RSI,[0x123177] LEA RBX,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x146 CALL 0x0010ee3a LAB_00109ec7: MOV RDI,RBX CALL 0x0010b5b2 MOV R15,RAX LEA RSI,[0x123247] MOV EDX,0x1e MOV RDI,RAX CALL 0x00107600 LEA RSI,[0x123266] MOV EDX,0x9 MOV RDI,R15 CALL 0x00107600 MOV ESI,dword ptr [R14] MOV RDI,R15 CALL 0x00107990 LEA RSI,[0x123270] MOV EDX,0x12 MOV RDI,RAX CALL 0x00107600 LAB_00109f19: JMP 0x0010a005 LAB_00109f1e: LEA RSI,[0x123177] LEA RBX,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x148 CALL 0x0010ee3a LAB_00109f37: MOV RDI,RBX CALL 0x0010b5b2 LEA RSI,[0x123283] MOV EDX,0x1d MOV RDI,RAX CALL 0x00107600 LAB_00109f53: JMP 0x0010a005 LAB_00109f58: LEA RSI,[0x123177] LEA RBX,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x14d CALL 0x0010ee3a LAB_00109f71: MOV RDI,RBX CALL 0x0010b5b2 LEA RSI,[0x1232a1] MOV EDX,0x15 MOV RDI,RAX CALL 0x00107600 JMP 0x0010a005 LAB_00109f8f: LEA RSI,[0x123177] LEA RDI,[RSP + 0x8] MOV EDX,0x151 CALL 0x0010ee3a LAB_00109fa5: LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x0010b5b2 LEA RSI,[0x1232b7] MOV EDX,0x2c MOV RDI,RAX CALL 0x00107600 LAB_00109fc6: LEA RDI,[RSP + 0x8] CALL 0x0010ee7e LAB_00109fd0: LEA RSI,[0x123177] LEA RBX,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x152 CALL 0x0010ee3a LAB_00109fe9: MOV RDI,RBX CALL 0x0010b5b2 LEA RSI,[0x1232e4] MOV EDX,0x23 MOV RDI,RAX CALL 0x00107600 LAB_0010a005: LEA RDI,[RSP + 0x8] CALL 0x0010ee7e LAB_0010a00f: JMP 0x0010a035 LAB_0010a035: MOV RDI,RAX CALL 0x00109777
/* nglog::CapturedStream::Capture() */ void __thiscall nglog::CapturedStream::Capture(CapturedStream *this) { int iVar1; int iVar2; ostream *poVar3; int8 uVar4; LogMessageFatal local_80 [96]; if (*(int *)(this + 4) == -1) { iVar1 = dup(*(int *)this); if (*(int *)(this + 4) != -1) { tools::FileDescriptor::unsafe_close((FileDescriptor *)(this + 4)); } *(int *)(this + 4) = iVar1; if (iVar1 == -1) { LogMessageFatal::LogMessageFatal (local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h" ,0x148); /* try { // try from 00109f37 to 00109f52 has its CatchHandler @ 0010a02b */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>> (poVar3,"Check failed: uncaptured_fd_ ",0x1d); } else { iVar1 = open(*(char **)(this + 8),0x241,0x180); if (iVar1 == -1) { LogMessageFatal::LogMessageFatal (local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",0x14d) ; /* try { // try from 00109f71 to 00109f8c has its CatchHandler @ 0010a029 */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Check failed: cap_fd ",0x15); } else { fflush((FILE *)0x0); iVar2 = dup2(iVar1,*(int *)this); if (iVar2 == -1) { /* try { // try from 00109f8f to 00109fa4 has its CatchHandler @ 0010a013 */ LogMessageFatal::LogMessageFatal (local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 0x151); /* try { // try from 00109fa5 to 00109fc5 has its CatchHandler @ 0010a011 */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>> (poVar3,"Check failed: dup2(cap_fd.get(), fd_) != -1 ",0x2c); /* try { // try from 00109fc6 to 00109fcf has its CatchHandler @ 0010a013 */ LogMessageFatal::~LogMessageFatal(local_80); } else { /* try { // try from 00109e93 to 00109e99 has its CatchHandler @ 0010a00f */ iVar1 = close(iVar1); if (iVar1 != -1) { return; } } LogMessageFatal::LogMessageFatal (local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h",0x152) ; /* try { // try from 00109fe9 to 0010a004 has its CatchHandler @ 0010a027 */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>> (poVar3,"Check failed: cap_fd.close() != -1 ",0x23); } } } else { LogMessageFatal::LogMessageFatal (local_80,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/googletest.h", 0x146); /* try { // try from 00109ec7 to 00109f18 has its CatchHandler @ 0010a02d */ poVar3 = (ostream *)LogMessage::stream((LogMessage *)local_80); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Check failed: !uncaptured_fd_ ",0x1e) ; std::__ostream_insert<char,std::char_traits<char>>(poVar3,", Stream ",9); poVar3 = (ostream *)std::ostream::operator<<(poVar3,*(int *)this); std::__ostream_insert<char,std::char_traits<char>>(poVar3," already captured!",0x12); } uVar4 = LogMessageFatal::~LogMessageFatal(local_80); /* catch(type#1 @ 00000000) { ... } // from try @ 00109e93 with catch @ 0010a00f */ /* catch(type#1 @ 00000000) { ... } // from try @ 0010a02d with catch @ 0010a035 */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar4); }
49,150
nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*)
ng-log[P]ng-log/src/utilities.cc
void AlsoErrorWrite(LogSeverity severity, const char* tag, const char* message) noexcept { #if defined(NGLOG_OS_WINDOWS) (void)severity; (void)tag; // On Windows, also output to the debugger ::OutputDebugStringA(message); #elif defined(NGLOG_OS_ANDROID) constexpr int android_log_levels[] = { ANDROID_LOG_INFO, ANDROID_LOG_WARN, ANDROID_LOG_ERROR, ANDROID_LOG_FATAL, }; __android_log_write(android_log_levels[severity], tag, message); #else (void)severity; (void)tag; (void)message; #endif }
O3
cpp
nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*): retq
_ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_: retn
void nglog::tools::AlsoErrorWrite() { ; }
AlsoErrorWrite: RET
/* nglog::tools::AlsoErrorWrite(nglog::LogSeverity, char const*, char const*) */ void nglog::tools::AlsoErrorWrite(void) { return; }
49,151
my_coll_parser_scan_character_list
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_character_list(MY_COLL_RULE_PARSER *p, my_wc_t *pwc, size_t limit, const char *name) { if (my_coll_parser_curr(p)->term != MY_COLL_LEXEM_CHAR) return my_coll_parser_expected_error(p, MY_COLL_LEXEM_CHAR); if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_CHAR)) return 0; while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CHAR) { if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); my_coll_parser_scan(p); } return 1; }
O3
c
my_coll_parser_scan_character_list: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x5, (%rdi) jne 0x8bca5 movq %rcx, %r14 movq %rdx, %r12 testq %rdx, %rdx je 0x8bc87 movq %rsi, %r13 movslq 0x24(%rbx), %rax xorl %ecx, %ecx cmpq $0x0, (%r13,%rcx,8) je 0x8bcde incq %rcx cmpq %rcx, %r12 jne 0x8bc77 addq $0xf8, %rbx leaq 0x24c92(%rip), %rdx # 0xb0927 xorl %r15d, %r15d movl $0x80, %esi movq %rbx, %rdi movq %r14, %rcx jmp 0x8bcc5 addq $0xf8, %rbx leaq 0x24c83(%rip), %rdx # 0xb0936 leaq 0x24c92(%rip), %rcx # 0xb094c xorl %r15d, %r15d movl $0x80, %esi movq %rbx, %rdi xorl %eax, %eax callq 0xa570a movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, (%r13,%rcx,8) movq %rbx, %rdi movl $0x5, %esi callq 0x8b9b1 testl %eax, %eax je 0x8bd54 movl $0x1, %r15d cmpl $0x5, (%rbx) jne 0x8bccc leaq 0x28(%rbx), %rdx movslq 0x24(%rbx), %rax xorl %ecx, %ecx cmpq $0x0, (%r13,%rcx,8) je 0x8bd1e incq %rcx cmpq %rcx, %r12 jne 0x8bd09 jmp 0x8bc87 movq %rax, (%r13,%rcx,8) movq 0x20(%rdx), %rax movq %rax, 0x20(%rbx) movups (%rdx), %xmm0 movups 0x10(%rdx), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) movq %rdx, -0x30(%rbp) movq -0x30(%rbp), %rdi callq 0x8b753 movq -0x30(%rbp), %rdx cmpl $0x5, (%rbx) je 0x8bd03 jmp 0x8bccc xorl %r15d, %r15d jmp 0x8bccc
my_coll_parser_scan_character_list: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp dword ptr [rdi], 5 jnz short loc_8BCA5 mov r14, rcx mov r12, rdx test rdx, rdx jz short loc_8BC87 mov r13, rsi movsxd rax, dword ptr [rbx+24h] xor ecx, ecx loc_8BC77: cmp qword ptr [r13+rcx*8+0], 0 jz short loc_8BCDE inc rcx cmp r12, rcx jnz short loc_8BC77 loc_8BC87: add rbx, 0F8h lea rdx, aSIsTooLong; "%s is too long" xor r15d, r15d mov esi, 80h mov rdi, rbx mov rcx, r14 jmp short loc_8BCC5 loc_8BCA5: add rbx, 0F8h lea rdx, aSExpected; "%s expected" lea rcx, aCharacter; "Character" xor r15d, r15d mov esi, 80h mov rdi, rbx loc_8BCC5: xor eax, eax call my_snprintf loc_8BCCC: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8BCDE: mov [r13+rcx*8+0], rax mov rdi, rbx mov esi, 5 call my_coll_parser_scan_term test eax, eax jz short loc_8BD54 mov r15d, 1 cmp dword ptr [rbx], 5 jnz short loc_8BCCC lea rdx, [rbx+28h] loc_8BD03: movsxd rax, dword ptr [rbx+24h] xor ecx, ecx loc_8BD09: cmp qword ptr [r13+rcx*8+0], 0 jz short loc_8BD1E inc rcx cmp r12, rcx jnz short loc_8BD09 jmp loc_8BC87 loc_8BD1E: mov [r13+rcx*8+0], rax mov rax, [rdx+20h] mov [rbx+20h], rax movups xmm0, xmmword ptr [rdx] movups xmm1, xmmword ptr [rdx+10h] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 mov [rbp+var_30], rdx mov rdi, [rbp+var_30] call my_coll_lexem_next mov rdx, [rbp+var_30] cmp dword ptr [rbx], 5 jz short loc_8BD03 jmp loc_8BCCC loc_8BD54: xor r15d, r15d jmp loc_8BCCC
long long my_coll_parser_scan_character_list(long long a1, long long a2, long long a3, int a4, int a5, int a6) { long long v8; // rcx const char *v9; // rdx unsigned int v10; // r15d int v11; // edi const char *v12; // rcx long long v14; // rdx long long v15; // rcx __int128 v16; // xmm0 long long v17; // [rsp+0h] [rbp-30h] if ( *(_DWORD *)a1 != 5 ) { v9 = "%s expected"; v12 = "Character"; v10 = 0; v11 = a1 + 248; goto LABEL_8; } if ( !a3 ) { LABEL_6: v9 = "%s is too long"; v10 = 0; v11 = a1 + 248; LODWORD(v12) = a4; LABEL_8: my_snprintf(v11, 128, (_DWORD)v9, (_DWORD)v12, a5, a6); return v10; } v8 = 0LL; while ( *(_QWORD *)(a2 + 8 * v8) ) { if ( a3 == ++v8 ) goto LABEL_6; } *(_QWORD *)(a2 + 8 * v8) = *(int *)(a1 + 36); if ( (unsigned int)my_coll_parser_scan_term(a1, 5) ) { v10 = 1; if ( *(_DWORD *)a1 == 5 ) { v14 = a1 + 40; do { v15 = 0LL; while ( *(_QWORD *)(a2 + 8 * v15) ) { if ( a3 == ++v15 ) goto LABEL_6; } *(_QWORD *)(a2 + 8 * v15) = *(int *)(a1 + 36); *(_QWORD *)(a1 + 32) = *(_QWORD *)(v14 + 32); v16 = *(_OWORD *)v14; *(_OWORD *)(a1 + 16) = *(_OWORD *)(v14 + 16); *(_OWORD *)a1 = v16; v17 = v14; my_coll_lexem_next(v14); v14 = v17; } while ( *(_DWORD *)a1 == 5 ); } } else { return 0; } return v10; }
my_coll_parser_scan_character_list: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI],0x5 JNZ 0x0018bca5 MOV R14,RCX MOV R12,RDX TEST RDX,RDX JZ 0x0018bc87 MOV R13,RSI MOVSXD RAX,dword ptr [RBX + 0x24] XOR ECX,ECX LAB_0018bc77: CMP qword ptr [R13 + RCX*0x8],0x0 JZ 0x0018bcde INC RCX CMP R12,RCX JNZ 0x0018bc77 LAB_0018bc87: ADD RBX,0xf8 LEA RDX,[0x1b0927] XOR R15D,R15D MOV ESI,0x80 MOV RDI,RBX MOV RCX,R14 JMP 0x0018bcc5 LAB_0018bca5: ADD RBX,0xf8 LEA RDX,[0x1b0936] LEA RCX,[0x1b094c] XOR R15D,R15D MOV ESI,0x80 MOV RDI,RBX LAB_0018bcc5: XOR EAX,EAX CALL 0x001a570a LAB_0018bccc: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018bcde: MOV qword ptr [R13 + RCX*0x8],RAX MOV RDI,RBX MOV ESI,0x5 CALL 0x0018b9b1 TEST EAX,EAX JZ 0x0018bd54 MOV R15D,0x1 CMP dword ptr [RBX],0x5 JNZ 0x0018bccc LEA RDX,[RBX + 0x28] LAB_0018bd03: MOVSXD RAX,dword ptr [RBX + 0x24] XOR ECX,ECX LAB_0018bd09: CMP qword ptr [R13 + RCX*0x8],0x0 JZ 0x0018bd1e INC RCX CMP R12,RCX JNZ 0x0018bd09 JMP 0x0018bc87 LAB_0018bd1e: MOV qword ptr [R13 + RCX*0x8],RAX MOV RAX,qword ptr [RDX + 0x20] MOV qword ptr [RBX + 0x20],RAX MOVUPS XMM0,xmmword ptr [RDX] MOVUPS XMM1,xmmword ptr [RDX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBP + -0x30],RDX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0018b753 MOV RDX,qword ptr [RBP + -0x30] CMP dword ptr [RBX],0x5 JZ 0x0018bd03 JMP 0x0018bccc LAB_0018bd54: XOR R15D,R15D JMP 0x0018bccc
int8 my_coll_parser_scan_character_list(int *param_1,long param_2,long param_3,char *param_4) { int iVar1; long lVar2; char *pcVar3; if (*param_1 == 5) { if (param_3 != 0) { lVar2 = 0; do { if (*(long *)(param_2 + lVar2 * 8) == 0) { *(long *)(param_2 + lVar2 * 8) = (long)param_1[9]; iVar1 = my_coll_parser_scan_term(param_1,5); if (iVar1 == 0) { return 0; } if (*param_1 != 5) { return 1; } do { lVar2 = 0; while (*(long *)(param_2 + lVar2 * 8) != 0) { lVar2 = lVar2 + 1; if (param_3 == lVar2) goto LAB_0018bc87; } *(long *)(param_2 + lVar2 * 8) = (long)param_1[9]; *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12); param_1[4] = param_1[0xe]; param_1[5] = param_1[0xf]; param_1[6] = param_1[0x10]; param_1[7] = param_1[0x11]; *param_1 = param_1[10]; param_1[1] = param_1[0xb]; param_1[2] = param_1[0xc]; param_1[3] = param_1[0xd]; my_coll_lexem_next(param_1 + 10); if (*param_1 != 5) { return 1; } } while( true ); } lVar2 = lVar2 + 1; } while (param_3 != lVar2); } LAB_0018bc87: pcVar3 = "%s is too long"; } else { pcVar3 = "%s expected"; param_4 = "Character"; } my_snprintf(param_1 + 0x3e,0x80,pcVar3,param_4); return 0; }
49,152
csv_printer::print_test(test const&)
monkey531[P]llama/examples/llama-bench/llama-bench.cpp
void print_test(const test & t) override { std::vector<std::string> values = t.get_values(); std::transform(values.begin(), values.end(), values.begin(), escape_csv); fprintf(fout, "%s\n", join(values, ",").c_str()); }
O2
cpp
csv_printer::print_test(test const&): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x392a8 movq (%r14), %rdi movq 0x8(%r14), %rsi leaq 0xa1d(%rip), %rcx # 0x39776 movq %rdi, %rdx callq 0x3971e movq 0x8(%rbx), %rbx leaq 0x62a7c(%rip), %rsi # 0x9b7e8 leaq 0x28(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x29014 leaq 0x48(%rsp), %rdi leaq 0x10(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x27c81 leaq 0x48(%rsp), %r14 movq (%r14), %rdx leaq 0x64621(%rip), %rsi # 0x9d3bf movq %rbx, %rdi xorl %eax, %eax callq 0x22b40 movq %r14, %rdi callq 0x22f98 leaq 0x28(%rsp), %rdi callq 0x22f98 leaq 0x10(%rsp), %rdi callq 0x2922e addq $0x68, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x22f98 jmp 0x38de0 jmp 0x38ddd movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x2922e movq %rbx, %rdi callq 0x22da0
_ZN11csv_printer10print_testERK4test: push r14 push rbx sub rsp, 68h mov rbx, rdi lea r14, [rsp+78h+var_68] mov rdi, r14 call _ZNK4test10get_valuesB5cxx11Ev; test::get_values(void) mov rdi, [r14] mov rsi, [r14+8] lea rcx, _ZN11csv_printer10escape_csvERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; csv_printer::escape_csv(std::string const&) mov rdx, rdi call _ZSt9transformIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEESC_PFS7_RKS7_EET0_T_SI_SH_T1_; std::transform<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::string (*)(std::string const&)>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::string (*)(std::string const&)) mov rbx, [rbx+8] lea rsi, aSamplesNsS_0+14h; "," lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_69] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+78h+var_30] lea rsi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_50] call _ZL4joinINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEES5_RKSt6vectorIT_SaIS7_EERKS5_; join<std::string>(std::vector<std::string> const&,std::string const&) lea r14, [rsp+78h+var_30] mov rdx, [r14] lea rsi, aSFailedToApply_0+1Eh; "%s\n" mov rdi, rbx xor eax, eax call _fprintf mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_68]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 68h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_38DE0 jmp short $+2 loc_38DDD: mov rbx, rax loc_38DE0: lea rdi, [rsp+arg_8]; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx call __Unwind_Resume
void csv_printer::print_test(csv_printer *this, const test *a2) { long long v2; // rbx void *v3[3]; // [rsp+10h] [rbp-68h] BYREF _QWORD v4[4]; // [rsp+28h] [rbp-50h] BYREF const char *v5[6]; // [rsp+48h] [rbp-30h] BYREF test::get_values[abi:cxx11](v3, a2); std::transform<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::string (*)(std::string const&)>( v3[0], v3[1], v3[0], csv_printer::escape_csv); v2 = *((_QWORD *)this + 1); std::string::basic_string<std::allocator<char>>(v4, (long long)","); join<std::string>((long long)v5, v3, (long long)v4); fprintf(v2, "%s\n", v5[0]); std::string::~string(v5); std::string::~string(v4); std::vector<std::string>::~vector(v3); }
print_test: PUSH R14 PUSH RBX SUB RSP,0x68 MOV RBX,RDI LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x001392a8 MOV RDI,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] LAB_00138d52: LEA RCX,[0x139776] MOV RDX,RDI CALL 0x0013971e MOV RBX,qword ptr [RBX + 0x8] LAB_00138d65: LEA RSI,[0x19b7e8] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0xf] CALL 0x00129014 LAB_00138d7b: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x28] CALL 0x00127c81 LAB_00138d8f: LEA R14,[RSP + 0x48] MOV RDX,qword ptr [R14] LEA RSI,[0x19d3bf] MOV RDI,RBX XOR EAX,EAX CALL 0x00122b40 MOV RDI,R14 CALL 0x00122f98 LEA RDI,[RSP + 0x28] CALL 0x00122f98 LEA RDI,[RSP + 0x10] CALL 0x0012922e ADD RSP,0x68 POP RBX POP R14 RET
/* csv_printer::print_test(test const&) */ void csv_printer::print_test(test *param_1) { FILE *__stream; allocator local_69; int8 local_68; int8 local_60; string local_50 [32]; int8 local_30 [4]; test::get_values_abi_cxx11_(); /* try { // try from 00138d52 to 00138d60 has its CatchHandler @ 00138ddd */ std:: transform<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::__cxx11::string(*)(std::__cxx11::string_const&)> (local_68,local_60,local_68,escape_csv); __stream = *(FILE **)(param_1 + 8); /* try { // try from 00138d65 to 00138d7a has its CatchHandler @ 00138ddb */ std::__cxx11::string::string<std::allocator<char>>(local_50,",",&local_69); /* try { // try from 00138d7b to 00138d8e has its CatchHandler @ 00138dcc */ join<std::__cxx11::string>((vector *)local_30,(string *)&local_68); fprintf(__stream,"%s\n",local_30[0]); std::__cxx11::string::~string((string *)local_30); std::__cxx11::string::~string(local_50); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68); return; }
49,153
js_array_indexOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_indexOf(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, val; int64_t len, n; JSValue *arrp; uint32_t count; obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; if (len > 0) { n = 0; if (argc > 1) { if (JS_ToInt64Clamp(ctx, &n, argv[1], 0, len, len)) goto exception; } if (js_get_fast_array(ctx, obj, &arrp, &count)) { for (; n < count; n++) { if (js_strict_eq2(ctx, js_dup(argv[0]), js_dup(arrp[n]), JS_EQ_STRICT)) { goto done; } } } for (; n < len; n++) { int present = JS_TryGetPropertyInt64(ctx, obj, n, &val); if (present < 0) goto exception; if (present) { if (js_strict_eq2(ctx, js_dup(argv[0]), val, JS_EQ_STRICT)) { goto done; } } } } n = -1; done: JS_FreeValue(ctx, obj); return js_int64(n); exception: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O2
c
js_array_indexOf: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r12 movl %ecx, %r13d movq %rdi, %rbx callq 0x24742 movq %rax, %r15 movq %rdx, %r14 leaq 0x30(%rsp), %rsi movq %rbx, %rdi movq %rax, %rdx movq %r14, %rcx callq 0x207f3 testl %eax, %eax je 0x66c25 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1bbce pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x66d6a movq 0x30(%rsp), %rax pushq $-0x1 popq %rbp movq %rax, 0x18(%rsp) testq %rax, %rax jle 0x66d54 andq $0x0, 0x20(%rsp) cmpl $0x2, %r13d jl 0x66c75 movq 0x10(%r12), %rdx movq 0x18(%r12), %rcx movq 0x18(%rsp), %r9 movq %r9, (%rsp) leaq 0x20(%rsp), %rsi movq %rbx, %rdi xorl %r8d, %r8d callq 0x25067 testl %eax, %eax jne 0x66c0d movq 0x20(%rsp), %r13 jmp 0x66c78 xorl %r13d, %r13d leaq 0x28(%rsp), %rdx leaq 0xc(%rsp), %rcx movq %r15, %rdi movq %r14, %rsi callq 0x3de1c testl %eax, %eax je 0x66cf2 movq %r14, 0x10(%rsp) movl 0xc(%rsp), %ebp movq 0x28(%rsp), %rax movq %r13, %rcx shlq $0x4, %rcx leaq (%rcx,%rax), %r14 addq $0x8, %r14 cmpq %rbp, %r13 jge 0x66cea movq (%r12), %rsi movq 0x8(%r12), %rdx cmpl $-0x9, %edx jb 0x66cc3 incl (%rsi) movq -0x8(%r14), %rcx movq (%r14), %r8 cmpl $-0x9, %r8d jb 0x66cd2 incl (%rcx) movq %rbx, %rdi xorl %r9d, %r9d callq 0x36e42 testl %eax, %eax jne 0x66d47 incq %r13 addq $0x10, %r14 jmp 0x66cae movq 0x10(%rsp), %r14 pushq $-0x1 popq %rbp cmpq 0x18(%rsp), %r13 jge 0x66d54 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movq %r13, %rcx leaq 0x38(%rsp), %r8 callq 0x46238 testl %eax, %eax js 0x66c0d je 0x66d42 movq (%r12), %rsi movq 0x8(%r12), %rdx cmpl $-0x9, %edx jb 0x66d29 incl (%rsi) movq 0x38(%rsp), %rcx movq 0x40(%rsp), %r8 movq %rbx, %rdi xorl %r9d, %r9d callq 0x36e42 testl %eax, %eax jne 0x66d51 incq %r13 jmp 0x66cf2 movq %r13, %rbp movq 0x10(%rsp), %r14 jmp 0x66d54 movq %r13, %rbp movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1bbce movq %rbp, %rdi callq 0x245bb addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_array_indexOf: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r12, r8 mov r13d, ecx mov rbx, rdi call JS_ToObject mov r15, rax mov r14, rdx lea rsi, [rsp+78h+var_48] mov rdi, rbx mov rdx, rax mov rcx, r14 call js_get_length64 test eax, eax jz short loc_66C25 loc_66C0D: mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue push 6 pop rdx xor eax, eax jmp loc_66D6A loc_66C25: mov rax, [rsp+78h+var_48] push 0FFFFFFFFFFFFFFFFh pop rbp mov [rsp+78h+var_60], rax test rax, rax jle loc_66D54 and [rsp+78h+var_58], 0 cmp r13d, 2 jl short loc_66C75 mov rdx, [r12+10h] mov rcx, [r12+18h] mov r9, [rsp+78h+var_60] mov [rsp+78h+var_78], r9 lea rsi, [rsp+78h+var_58] mov rdi, rbx xor r8d, r8d call JS_ToInt64Clamp test eax, eax jnz short loc_66C0D mov r13, [rsp+78h+var_58] jmp short loc_66C78 loc_66C75: xor r13d, r13d loc_66C78: lea rdx, [rsp+78h+var_50] lea rcx, [rsp+78h+var_6C] mov rdi, r15 mov rsi, r14 call js_get_fast_array test eax, eax jz short loc_66CF2 mov [rsp+78h+var_68], r14 mov ebp, [rsp+78h+var_6C] mov rax, [rsp+78h+var_50] mov rcx, r13 shl rcx, 4 lea r14, [rcx+rax] add r14, 8 loc_66CAE: cmp r13, rbp jge short loc_66CEA mov rsi, [r12] mov rdx, [r12+8] cmp edx, 0FFFFFFF7h jb short loc_66CC3 inc dword ptr [rsi] loc_66CC3: mov rcx, [r14-8] mov r8, [r14] cmp r8d, 0FFFFFFF7h jb short loc_66CD2 inc dword ptr [rcx] loc_66CD2: mov rdi, rbx xor r9d, r9d call js_strict_eq2 test eax, eax jnz short loc_66D47 inc r13 add r14, 10h jmp short loc_66CAE loc_66CEA: mov r14, [rsp+78h+var_68] push 0FFFFFFFFFFFFFFFFh pop rbp loc_66CF2: cmp r13, [rsp+78h+var_60] jge short loc_66D54 mov rdi, rbx mov rsi, r15 mov rdx, r14 mov rcx, r13 lea r8, [rsp+78h+var_40] call JS_TryGetPropertyInt64 test eax, eax js loc_66C0D jz short loc_66D42 mov rsi, [r12] mov rdx, [r12+8] cmp edx, 0FFFFFFF7h jb short loc_66D29 inc dword ptr [rsi] loc_66D29: mov rcx, [rsp+78h+var_40] mov r8, [rsp+78h+var_38] mov rdi, rbx xor r9d, r9d call js_strict_eq2 test eax, eax jnz short loc_66D51 loc_66D42: inc r13 jmp short loc_66CF2 loc_66D47: mov rbp, r13 mov r14, [rsp+78h+var_68] jmp short loc_66D54 loc_66D51: mov rbp, r13 loc_66D54: mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue mov rdi, rbp call js_int64 loc_66D6A: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_array_indexOf( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v15; // r13d long long v16; // r15 long long v17; // rdx long long v18; // r14 long long v20; // rbp signed long long v21; // r13 signed long long v22; // rbp long long *v23; // r14 _DWORD *v24; // rsi long long v25; // rdx _DWORD *v26; // rcx long long v27; // r8 int PropertyInt64; // eax _DWORD *v29; // rsi long long v30; // rdx unsigned int v31; // [rsp+Ch] [rbp-6Ch] BYREF long long v32; // [rsp+10h] [rbp-68h] long long v33; // [rsp+18h] [rbp-60h] signed long long v34; // [rsp+20h] [rbp-58h] BYREF long long v35; // [rsp+28h] [rbp-50h] BYREF long long v36; // [rsp+30h] [rbp-48h] BYREF long long v37[8]; // [rsp+38h] [rbp-40h] BYREF v15 = a4; v16 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; if ( (unsigned int)js_get_length64(a1, &v36, v16, v17) ) goto LABEL_2; v20 = -1LL; v33 = v36; if ( v36 > 0 ) { v34 = 0LL; if ( v15 < 2 ) { v21 = 0LL; } else { if ( (unsigned int)JS_ToInt64Clamp( a1, (unsigned long long *)&v34, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24), 0LL, v33, v33) ) { LABEL_2: JS_FreeValue(a1, v16, v18); return 0LL; } v21 = v34; } if ( !(unsigned int)js_get_fast_array(v16, v18, &v35, &v31) ) goto LABEL_18; v32 = v18; v22 = v31; v23 = (long long *)(16 * v21 + v35 + 8); while ( v21 < v22 ) { v24 = *(_DWORD **)a5; v25 = *(_QWORD *)(a5 + 8); if ( (unsigned int)v25 >= 0xFFFFFFF7 ) ++*v24; v26 = (_DWORD *)*(v23 - 1); v27 = *v23; if ( (unsigned int)*v23 >= 0xFFFFFFF7 ) ++*v26; if ( (unsigned int)js_strict_eq2(a1, (long long)v24, v25, (long long)v26, v27, 0, (__m128d)a7) ) { v20 = v21; v18 = v32; goto LABEL_27; } ++v21; v23 += 2; } v18 = v32; v20 = -1LL; LABEL_18: while ( v21 < v33 ) { PropertyInt64 = JS_TryGetPropertyInt64(a1, v16, v18, v21, (long long)v37); if ( PropertyInt64 < 0 ) goto LABEL_2; if ( PropertyInt64 ) { v29 = *(_DWORD **)a5; v30 = *(_QWORD *)(a5 + 8); if ( (unsigned int)v30 >= 0xFFFFFFF7 ) ++*v29; if ( (unsigned int)js_strict_eq2(a1, (long long)v29, v30, v37[0], v37[1], 0, (__m128d)a7) ) { v20 = v21; break; } } ++v21; } } LABEL_27: JS_FreeValue(a1, v16, v18); return js_int64(v20); }
js_array_indexOf: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,R8 MOV R13D,ECX MOV RBX,RDI CALL 0x00124742 MOV R15,RAX MOV R14,RDX LEA RSI,[RSP + 0x30] MOV RDI,RBX MOV RDX,RAX MOV RCX,R14 CALL 0x001207f3 TEST EAX,EAX JZ 0x00166c25 LAB_00166c0d: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011bbce PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x00166d6a LAB_00166c25: MOV RAX,qword ptr [RSP + 0x30] PUSH -0x1 POP RBP MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX JLE 0x00166d54 AND qword ptr [RSP + 0x20],0x0 CMP R13D,0x2 JL 0x00166c75 MOV RDX,qword ptr [R12 + 0x10] MOV RCX,qword ptr [R12 + 0x18] MOV R9,qword ptr [RSP + 0x18] MOV qword ptr [RSP],R9 LEA RSI,[RSP + 0x20] MOV RDI,RBX XOR R8D,R8D CALL 0x00125067 TEST EAX,EAX JNZ 0x00166c0d MOV R13,qword ptr [RSP + 0x20] JMP 0x00166c78 LAB_00166c75: XOR R13D,R13D LAB_00166c78: LEA RDX,[RSP + 0x28] LEA RCX,[RSP + 0xc] MOV RDI,R15 MOV RSI,R14 CALL 0x0013de1c TEST EAX,EAX JZ 0x00166cf2 MOV qword ptr [RSP + 0x10],R14 MOV EBP,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,R13 SHL RCX,0x4 LEA R14,[RCX + RAX*0x1] ADD R14,0x8 LAB_00166cae: CMP R13,RBP JGE 0x00166cea MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] CMP EDX,-0x9 JC 0x00166cc3 INC dword ptr [RSI] LAB_00166cc3: MOV RCX,qword ptr [R14 + -0x8] MOV R8,qword ptr [R14] CMP R8D,-0x9 JC 0x00166cd2 INC dword ptr [RCX] LAB_00166cd2: MOV RDI,RBX XOR R9D,R9D CALL 0x00136e42 TEST EAX,EAX JNZ 0x00166d47 INC R13 ADD R14,0x10 JMP 0x00166cae LAB_00166cea: MOV R14,qword ptr [RSP + 0x10] PUSH -0x1 POP RBP LAB_00166cf2: CMP R13,qword ptr [RSP + 0x18] JGE 0x00166d54 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV RCX,R13 LEA R8,[RSP + 0x38] CALL 0x00146238 TEST EAX,EAX JS 0x00166c0d JZ 0x00166d42 MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] CMP EDX,-0x9 JC 0x00166d29 INC dword ptr [RSI] LAB_00166d29: MOV RCX,qword ptr [RSP + 0x38] MOV R8,qword ptr [RSP + 0x40] MOV RDI,RBX XOR R9D,R9D CALL 0x00136e42 TEST EAX,EAX JNZ 0x00166d51 LAB_00166d42: INC R13 JMP 0x00166cf2 LAB_00166d47: MOV RBP,R13 MOV R14,qword ptr [RSP + 0x10] JMP 0x00166d54 LAB_00166d51: MOV RBP,R13 LAB_00166d54: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011bbce MOV RDI,RBP CALL 0x001245bb LAB_00166d6a: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 js_array_indexOf(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int *piVar1; int8 uVar2; int iVar3; int8 uVar4; int8 uVar5; long lVar6; long lVar7; int8 *puVar8; int1 auVar9 [16]; uint local_6c; int8 local_68; long local_60; long local_58; long local_50; long local_48; int8 local_40; int8 local_38; auVar9 = JS_ToObject(); uVar5 = auVar9._8_8_; uVar4 = auVar9._0_8_; iVar3 = js_get_length64(param_1,&local_48,uVar4,uVar5); if (iVar3 == 0) { local_60 = local_48; lVar6 = -1; if (0 < local_48) { local_58 = 0; if ((1 < param_4) && (iVar3 = JS_ToInt64Clamp(param_1,&local_58,param_5[2],param_5[3],0,local_48,local_48), iVar3 != 0)) goto LAB_00166c0d; lVar7 = local_58; iVar3 = js_get_fast_array(uVar4,uVar5,&local_50,&local_6c); if (iVar3 != 0) { puVar8 = (int8 *)(lVar7 * 0x10 + local_50 + 8); local_68 = uVar5; for (; uVar5 = local_68, lVar7 < (long)(ulong)local_6c; lVar7 = lVar7 + 1) { if (0xfffffff6 < (uint)param_5[1]) { *(int *)*param_5 = *(int *)*param_5 + 1; } if (0xfffffff6 < (uint)*puVar8) { *(int *)puVar8[-1] = *(int *)puVar8[-1] + 1; } iVar3 = js_strict_eq2(param_1); lVar6 = lVar7; uVar5 = local_68; if (iVar3 != 0) goto LAB_00166d54; puVar8 = puVar8 + 2; } } for (; lVar6 = -1, lVar7 < local_60; lVar7 = lVar7 + 1) { iVar3 = JS_TryGetPropertyInt64(param_1,uVar4,uVar5,lVar7,&local_40); if (iVar3 < 0) goto LAB_00166c0d; if (iVar3 != 0) { piVar1 = (int *)*param_5; uVar2 = param_5[1]; if (0xfffffff6 < (uint)uVar2) { *piVar1 = *piVar1 + 1; } iVar3 = js_strict_eq2(param_1,piVar1,uVar2,local_40,local_38,0); lVar6 = lVar7; if (iVar3 != 0) break; } } } LAB_00166d54: JS_FreeValue(param_1,uVar4,uVar5); uVar5 = js_int64(lVar6); } else { LAB_00166c0d: JS_FreeValue(param_1,uVar4,uVar5); uVar5 = 0; } return uVar5; }
49,154
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa3bc0 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x113ea8 jmp 0x113f84 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x50540 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xa16e0 movq %rax, 0x90(%rsp) leaq 0xa6823(%rip), %rsi # 0x1ba6fb leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x11c470 jmp 0x113eef movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xbcae0 jmp 0x113f0d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x1211f7(%rip), %rsi # 0x235118 leaq -0x72798(%rip), %rdx # 0xa1790 callq 0x508f0 jmp 0x114115 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x113f69 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x510d0 testb $0x1, 0x83(%rsp) jne 0x113f75 jmp 0x113f7f movq 0x18(%rsp), %rdi callq 0x50c40 jmp 0x114108 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x11e460 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xa3a00 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xbc730 testb $0x1, %al jne 0x113fcd jmp 0x1140de movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x50540 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x50d70 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x55710 jmp 0x114012 leaq 0xa6712(%rip), %rsi # 0x1ba72b leaq 0xa6711(%rip), %rcx # 0x1ba731 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x11d690 jmp 0x114031 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0xba670 jmp 0x11404b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x1211a5(%rip), %rsi # 0x235200 leaq -0x5a3e2(%rip), %rdx # 0xb9c80 callq 0x508f0 jmp 0x114115 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x1140c0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x1140b6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x510d0 leaq 0x30(%rsp), %rdi callq 0x510d0 leaq 0x2f(%rsp), %rdi callq 0x510b0 testb $0x1, 0x2e(%rsp) jne 0x1140d3 jmp 0x1140dc movq (%rsp), %rdi callq 0x50c40 jmp 0x114108 leaq 0x78(%rsp), %rdi callq 0xbc930 movq 0x20(%rsp), %rdi movq %rax, %rsi addq $0x20, %rsi movq $-0x1, %rdx callq 0x11c350 addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_113EA8 jmp loc_113F84 loc_113EA8: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_113EEF: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_113F0D: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_114115 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_113F69 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_113F69: test [rsp+arg_7B], 1 jnz short loc_113F75 jmp short loc_113F7F loc_113F75: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_113F7F: jmp loc_114108 loc_113F84: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_113FCD jmp loc_1140DE loc_113FCD: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_114012: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_114031: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_11404B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_114115 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_1140C0 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_1140B6 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1140B6: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1140C0: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_1140D3 jmp short loc_1140DC loc_1140D3: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_1140DC: jmp short loc_114108 loc_1140DE: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+0C8h+var_A8] mov rsi, rax add rsi, 20h ; ' ' mov rdx, 0FFFFFFFFFFFFFFFFh call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; 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>::set_parent(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>&,ulong) add rsp, 0C8h retn loc_114108: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_114115: nop word ptr [rax+rax+00000000h] nop
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { int v2; // ecx int v3; // r8d int v4; // r9d long long v5; // rdx int v6; // r8d int v7; // r9d long long v8; // rax int v10; // [rsp+0h] [rbp-C8h] void *v11; // [rsp+0h] [rbp-C8h] nlohmann::json_abi_v3_11_3::detail::out_of_range *v12; // [rsp+0h] [rbp-C8h] void *v13; // [rsp+8h] [rbp-C0h] long long v14; // [rsp+8h] [rbp-C0h] int v15; // [rsp+10h] [rbp-B8h] int v16; // [rsp+18h] [rbp-B0h] void *exception; // [rsp+18h] [rbp-B0h] nlohmann::json_abi_v3_11_3::detail::type_error *v18; // [rsp+18h] [rbp-B0h] long long v19; // [rsp+20h] [rbp-A8h] char v20; // [rsp+2Fh] [rbp-99h] BYREF _BYTE v21[32]; // [rsp+30h] [rbp-98h] BYREF int v22[8]; // [rsp+50h] [rbp-78h] BYREF char v23[8]; // [rsp+70h] [rbp-58h] BYREF int v24[2]; // [rsp+78h] [rbp-50h] BYREF char v25; // [rsp+83h] [rbp-45h] char v26[8]; // [rsp+90h] [rbp-38h] BYREF int v27[8]; // [rsp+98h] [rbp-30h] BYREF int v28[2]; // [rsp+B8h] [rbp-10h] long long v29; // [rsp+C0h] [rbp-8h] v29 = a1; *(_QWORD *)v28 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)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>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (int)v27, (int)"cannot use at() with ", (int)v26, v2, v3, v4, v10, v13, v15, (long long)exception); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v18, 304LL, (long long)v27, a1); v25 = 0; __cxa_throw( v18, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v24 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(_QWORD *)v28); *(_QWORD *)v23 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v24, (long long)v23) ) { v11 = __cxa_allocate_exception(0x20uLL); v14 = *(_QWORD *)v28; std::allocator<char>::allocator(&v20, v23, v5); std::string::basic_string<std::allocator<char>>((long long)v21, v14, (long long)&v20); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (int)v22, (int)"key '", (int)v21, (int)"' not found", v6, v7, v11, v14, (int)&v20, v16, a1); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v12, 403LL, (long long)v22, v19); __cxa_throw( v12, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } v8 = __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)v24); 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>::set_parent( a1, v8 + 32, -1LL); }
49,155
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10])
monkey531[P]llama/common/json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x690e4 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x690c9 movq %rbx, %rdi movq %r15, %rsi callq 0x18190 testl %eax, %eax je 0x690c6 addq $0x30, %rbx jmp 0x690a7 movq %rbx, %rax movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x69140 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18350 movq %rax, %rbx movq %r14, %rdi callq 0x3e11c leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x44b2d(%rip), %rsi # 0xadc35 movq %rsp, %rdi callq 0x6efb7 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x4a102 xorl %ebp, %ebp leaq 0x73199(%rip), %rsi # 0xdc2c8 leaq -0x1c9b2(%rip), %rdx # 0x4c784 movq %rbx, %rdi callq 0x18b30 jmp 0x691b9 movl $0x20, %edi callq 0x18350 movq %rax, %rbx leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x18300 leaq (%rax,%r15), %rdx leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x1c80a leaq 0x44aee(%rip), %rsi # 0xadc65 leaq 0x44aed(%rip), %rcx # 0xadc6b movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x6f5c0 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x4935a xorl %ebp, %ebp leaq 0x73206(%rip), %rsi # 0xdc3b0 leaq -0x1ca2d(%rip), %rdx # 0x4c784 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x691df movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x691df movq %rax, %r14 movb $0x1, %bpl movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0x69218 movq 0x30(%rsp), %rsi jmp 0x69208 jmp 0x69212 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69218 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x69218 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x69225 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18ba0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_690E4 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] loc_690A7: mov rax, [r12+8] cmp rbx, rax jz short loc_690C9 mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_690C6 add rbx, 30h ; '0' jmp short loc_690A7 loc_690C6: mov rax, rbx loc_690C9: mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_69140 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_690E4: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_48] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_691B9 loc_69140: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_38] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] lea rdi, [rsp+68h+var_48] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_691B9: mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_691DF mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_691DF mov r14, rax mov bpl, 1 loc_691DF: mov rdi, [rsp+68h+var_48] cmp rdi, r12 jz short loc_69218 mov rsi, [rsp+68h+var_38] jmp short loc_69208 jmp short loc_69212 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69218 mov rsi, [rsp+68h+var_58] loc_69208: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_69218 loc_69212: mov r14, rax mov bpl, 1 loc_69218: test bpl, bpl jz short loc_69225 mov rdi, rbx; void * call ___cxa_free_exception loc_69225: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, _BYTE *a2) { long long *v2; // r12 long long i; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax _QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF long long v11; // [rsp+30h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v9, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, v9); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(long long **)(a1 + 8); for ( i = *v2; ; i += 48LL ) { v4 = v2[1]; if ( i == v4 ) break; if ( !(unsigned int)std::string::compare(i, a2) ) { v4 = i; break; } } if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v10[0] = &v11; v8 = strlen(a2); std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v9, "key '", v10, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v7, 403, v9); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001690e4 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] LAB_001690a7: MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001690c9 MOV RDI,RBX MOV RSI,R15 CALL 0x00118190 TEST EAX,EAX JZ 0x001690c6 ADD RBX,0x30 JMP 0x001690a7 LAB_001690c6: MOV RAX,RBX LAB_001690c9: MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x00169140 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001690e4: MOV EDI,0x20 CALL 0x00118350 MOV RBX,RAX MOV RDI,R14 CALL 0x0013e11c LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_00169101: LEA RSI,[0x1adc35] MOV RDI,RSP CALL 0x0016efb7 MOV BPL,0x1 LAB_00169113: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0014a102 XOR EBP,EBP LEA RSI,[0x1dc2c8] LEA RDX,[0x14c784] MOV RDI,RBX CALL 0x00118b30 LAB_00169140: MOV EDI,0x20 CALL 0x00118350 MOV RBX,RAX LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00118300 LEA RDX,[RAX + R15*0x1] LAB_00169163: LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x0011c80a LAB_00169170: LEA RSI,[0x1adc65] LEA RCX,[0x1adc6b] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x0016f5c0 MOV BPL,0x1 LAB_0016918e: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0014935a XOR EBP,EBP LEA RSI,[0x1dc3b0] LEA RDX,[0x14c784] MOV RDI,RBX CALL 0x00118b30
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { int8 *puVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; detail adStack_68 [32]; char *local_48 [2]; char local_38 [16]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00169101 to 0016910f has its CatchHandler @ 00169212 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (adStack_68,"cannot use at() with ",local_48); /* try { // try from 00169113 to 0016913d has its CatchHandler @ 001691f2 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x130,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } puVar1 = *(int8 **)(param_1 + 8); pcVar6 = (char *)*puVar1; while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 && (iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) { pcVar6 = pcVar6 + 0x30; } if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) { uVar4 = __cxa_allocate_exception(0x20); local_48[0] = local_38; sVar5 = strlen(param_2); /* try { // try from 00169163 to 0016916f has its CatchHandler @ 001691f0 */ std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5); /* try { // try from 00169170 to 0016918a has its CatchHandler @ 001691d9 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (adStack_68,"key \'",(string *)local_48,"\' not found"); /* try { // try from 0016918e to 001691b8 has its CatchHandler @ 001691b9 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x193,adStack_68,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
49,156
ma_compact_keypage
eloqsql/storage/maria/ma_page.c
my_bool _ma_compact_keypage(MARIA_PAGE *ma_page, TrID min_read_from) { MARIA_HA *info= ma_page->info; MARIA_SHARE *share= info->s; MARIA_KEY key; uchar *page, *endpos, *start_of_empty_space; uint page_flag, nod_flag, saved_space; my_bool page_has_transid; DBUG_ENTER("_ma_compact_keypage"); page_flag= ma_page->flag; if (!(page_flag & KEYPAGE_FLAG_HAS_TRANSID)) DBUG_RETURN(0); /* No transaction id on page */ nod_flag= ma_page->node; page= ma_page->buff; endpos= page + ma_page->size; key.data= info->lastkey_buff; key.keyinfo= (MARIA_KEYDEF*) ma_page->keyinfo; page_has_transid= 0; page+= share->keypage_header + nod_flag; key.data[0]= 0; /* safety */ start_of_empty_space= 0; saved_space= 0; do { if (!(page= (*ma_page->keyinfo->skip_key)(&key, 0, 0, page))) { DBUG_PRINT("error",("Couldn't find last key: page_pos: %p", page)); _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(1); } if (key_has_transid(page-1)) { uint transid_length; transid_length= transid_packed_length(page); if (min_read_from == ~(TrID) 0 || min_read_from < transid_get_packed(share, page)) { page[-1]&= 254; /* Remove transid marker */ transid_length= transid_packed_length(page); if (start_of_empty_space) { /* Move block before the transid up in page */ uint copy_length= (uint) (page - start_of_empty_space) - saved_space; memmove(start_of_empty_space, start_of_empty_space + saved_space, copy_length); start_of_empty_space+= copy_length; } else start_of_empty_space= page; saved_space+= transid_length; } else page_has_transid= 1; /* At least one id left */ page+= transid_length; } page+= nod_flag; } while (page < endpos); DBUG_ASSERT(page == endpos); if (start_of_empty_space) { /* Move last block down This is always true if any transid was removed */ uint copy_length= (uint) (endpos - start_of_empty_space) - saved_space; if (copy_length) memmove(start_of_empty_space, start_of_empty_space + saved_space, copy_length); ma_page->size= (uint) (start_of_empty_space + copy_length - ma_page->buff); page_store_size(share, ma_page); } if (!page_has_transid) { ma_page->flag&= ~KEYPAGE_FLAG_HAS_TRANSID; _ma_store_keypage_flag(share, ma_page->buff, ma_page->flag); /* Clear packed transid (in case of zerofill) */ bzero(ma_page->buff + LSN_STORE_SIZE, TRANSID_SIZE); } if (share->now_transactional) { if (_ma_log_compact_keypage(ma_page, min_read_from)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O0
c
ma_compact_keypage: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x70d29 jmp 0x70d20 movb $0x0, -0x1(%rbp) jmp 0x7104a movq -0x10(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x20(%rcx), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rax movq 0x388(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movb $0x0, -0x6d(%rbp) movq -0x28(%rbp), %rax movl 0x744(%rax), %ecx addl -0x68(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax movb $0x0, (%rax) movq $0x0, -0x60(%rbp) movl $0x0, -0x6c(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0xe8(%rax), %rax movq -0x50(%rbp), %rcx leaq -0x48(%rbp), %rdi xorl %edx, %edx movl %edx, %esi callq *%rax movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0x70de2 jmp 0x70dc9 jmp 0x70dcb movq -0x20(%rbp), %rdi movl $0x7e, %esi callq 0x30500 movb $0x1, -0x1(%rbp) jmp 0x7104a movq -0x50(%rbp), %rax movzbl -0x1(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x70f0e movq -0x50(%rbp), %rax movzbl (%rax), %eax cmpl $0xf3, %eax jge 0x70e11 movl $0x1, %eax movl %eax, -0x84(%rbp) jmp 0x70e23 movq -0x50(%rbp), %rax movzbl (%rax), %eax subl $0xf8, %eax movl %eax, -0x84(%rbp) movl -0x84(%rbp), %eax movl %eax, -0x74(%rbp) cmpq $-0x1, -0x18(%rbp) je 0x70e5e movq -0x18(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x28(%rbp), %rdi movq -0x50(%rbp), %rsi callq 0x30770 movq %rax, %rcx movq -0x90(%rbp), %rax cmpq %rcx, %rax jae 0x70efa movq -0x50(%rbp), %rax movzbl -0x1(%rax), %ecx andl $0xfe, %ecx movb %cl, -0x1(%rax) movq -0x50(%rbp), %rax movzbl (%rax), %eax cmpl $0xf3, %eax jge 0x70e8a movl $0x1, %eax movl %eax, -0x94(%rbp) jmp 0x70e9c movq -0x50(%rbp), %rax movzbl (%rax), %eax subl $0xf8, %eax movl %eax, -0x94(%rbp) movl -0x94(%rbp), %eax movl %eax, -0x74(%rbp) cmpq $0x0, -0x60(%rbp) je 0x70ee7 movq -0x50(%rbp), %rax movq -0x60(%rbp), %rcx subq %rcx, %rax subl -0x6c(%rbp), %eax movl %eax, -0x78(%rbp) movq -0x60(%rbp), %rdi movq -0x60(%rbp), %rsi movl -0x6c(%rbp), %eax addq %rax, %rsi movl -0x78(%rbp), %eax movl %eax, %edx callq 0x2a140 movl -0x78(%rbp), %ecx movq -0x60(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) jmp 0x70eef movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movl -0x74(%rbp), %eax addl -0x6c(%rbp), %eax movl %eax, -0x6c(%rbp) jmp 0x70efe movb $0x1, -0x6d(%rbp) movl -0x74(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x68(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jb 0x70da0 jmp 0x70f2e jmp 0x70f30 cmpq $0x0, -0x60(%rbp) je 0x70fcb movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx subq %rcx, %rax subl -0x6c(%rbp), %eax movl %eax, -0x7c(%rbp) cmpl $0x0, -0x7c(%rbp) je 0x70f6a movq -0x60(%rbp), %rdi movq -0x60(%rbp), %rsi movl -0x6c(%rbp), %eax addq %rax, %rsi movl -0x7c(%rbp), %eax movl %eax, %edx callq 0x2a140 movq -0x60(%rbp), %rax movl -0x7c(%rbp), %ecx addq %rcx, %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x10(%rbp), %rax movl 0x20(%rax), %eax movl %eax, -0x80(%rbp) movl -0x80(%rbp), %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x1(%rax,%rcx) movl -0x80(%rbp), %eax shrl $0x8, %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx movb %dl, -0x2(%rax,%rcx) cmpb $0x0, -0x6d(%rbp) jne 0x7101c movq -0x10(%rbp), %rax movl 0x2c(%rax), %ecx andl $-0x3, %ecx movl %ecx, 0x2c(%rax) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movb %al, %dl movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx subl $0x2, %ecx subl $0x1, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi addq $0x7, %rdi xorl %esi, %esi movl $0x6, %edx callq 0x2a2c0 movq -0x28(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x71044 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x71060 cmpb $0x0, %al je 0x71042 jmp 0x7103c movb $0x1, -0x1(%rbp) jmp 0x7104a jmp 0x71044 jmp 0x71046 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_compact_keypage: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov [rbp+var_64], eax mov eax, [rbp+var_64] and eax, 2 cmp eax, 0 jnz short loc_70D29 jmp short $+2 loc_70D20: mov [rbp+var_1], 0 jmp loc_7104A loc_70D29: mov rax, [rbp+var_10] mov eax, [rax+28h] mov [rbp+var_68], eax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_10] mov ecx, [rcx+20h] add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_20] mov rax, [rax+388h] mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_40], rax mov [rbp+var_6D], 0 mov rax, [rbp+var_28] mov ecx, [rax+744h] add ecx, [rbp+var_68] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_48] mov byte ptr [rax], 0 mov [rbp+var_60], 0 mov [rbp+var_6C], 0 loc_70DA0: mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+0E8h] mov rcx, [rbp+var_50] lea rdi, [rbp+var_48] xor edx, edx mov esi, edx call rax mov [rbp+var_50], rax cmp rax, 0 jnz short loc_70DE2 jmp short $+2 loc_70DC9: jmp short $+2 loc_70DCB: mov rdi, [rbp+var_20] mov esi, 7Eh ; '~' call _ma_set_fatal_error mov [rbp+var_1], 1 jmp loc_7104A loc_70DE2: mov rax, [rbp+var_50] movzx eax, byte ptr [rax-1] and eax, 1 cmp eax, 0 jz loc_70F0E mov rax, [rbp+var_50] movzx eax, byte ptr [rax] cmp eax, 0F3h jge short loc_70E11 mov eax, 1 mov [rbp+var_84], eax jmp short loc_70E23 loc_70E11: mov rax, [rbp+var_50] movzx eax, byte ptr [rax] sub eax, 0F8h mov [rbp+var_84], eax loc_70E23: mov eax, [rbp+var_84] mov [rbp+var_74], eax cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jz short loc_70E5E mov rax, [rbp+var_18] mov [rbp+var_90], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_50] call transid_get_packed mov rcx, rax mov rax, [rbp+var_90] cmp rax, rcx jnb loc_70EFA loc_70E5E: mov rax, [rbp+var_50] movzx ecx, byte ptr [rax-1] and ecx, 0FEh mov [rax-1], cl mov rax, [rbp+var_50] movzx eax, byte ptr [rax] cmp eax, 0F3h jge short loc_70E8A mov eax, 1 mov [rbp+var_94], eax jmp short loc_70E9C loc_70E8A: mov rax, [rbp+var_50] movzx eax, byte ptr [rax] sub eax, 0F8h mov [rbp+var_94], eax loc_70E9C: mov eax, [rbp+var_94] mov [rbp+var_74], eax cmp [rbp+var_60], 0 jz short loc_70EE7 mov rax, [rbp+var_50] mov rcx, [rbp+var_60] sub rax, rcx sub eax, [rbp+var_6C] mov [rbp+var_78], eax mov rdi, [rbp+var_60] mov rsi, [rbp+var_60] mov eax, [rbp+var_6C] add rsi, rax mov eax, [rbp+var_78] mov edx, eax call _memmove mov ecx, [rbp+var_78] mov rax, [rbp+var_60] mov ecx, ecx add rax, rcx mov [rbp+var_60], rax jmp short loc_70EEF loc_70EE7: mov rax, [rbp+var_50] mov [rbp+var_60], rax loc_70EEF: mov eax, [rbp+var_74] add eax, [rbp+var_6C] mov [rbp+var_6C], eax jmp short loc_70EFE loc_70EFA: mov [rbp+var_6D], 1 loc_70EFE: mov ecx, [rbp+var_74] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax loc_70F0E: mov ecx, [rbp+var_68] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jb loc_70DA0 jmp short $+2 loc_70F2E: jmp short $+2 loc_70F30: cmp [rbp+var_60], 0 jz loc_70FCB mov rax, [rbp+var_58] mov rcx, [rbp+var_60] sub rax, rcx sub eax, [rbp+var_6C] mov [rbp+var_7C], eax cmp [rbp+var_7C], 0 jz short loc_70F6A mov rdi, [rbp+var_60] mov rsi, [rbp+var_60] mov eax, [rbp+var_6C] add rsi, rax mov eax, [rbp+var_7C] mov edx, eax call _memmove loc_70F6A: mov rax, [rbp+var_60] mov ecx, [rbp+var_7C] add rax, rcx mov rcx, [rbp+var_10] mov rcx, [rcx+10h] sub rax, rcx mov ecx, eax mov rax, [rbp+var_10] mov [rax+20h], ecx mov rax, [rbp+var_10] mov eax, [rax+20h] mov [rbp+var_80], eax mov eax, [rbp+var_80] mov dl, al mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] mov [rax+rcx-1], dl mov eax, [rbp+var_80] shr eax, 8 mov dl, al mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] mov [rax+rcx-2], dl loc_70FCB: cmp [rbp+var_6D], 0 jnz short loc_7101C mov rax, [rbp+var_10] mov ecx, [rax+2Ch] and ecx, 0FFFFFFFDh mov [rax+2Ch], ecx mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov dl, al mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] sub ecx, 2 sub ecx, 1 mov ecx, ecx mov [rax+rcx], dl mov rax, [rbp+var_10] mov rdi, [rax+10h] add rdi, 7 xor esi, esi mov edx, 6 call _memset loc_7101C: mov rax, [rbp+var_28] cmp byte ptr [rax+7E7h], 0 jz short loc_71044 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _ma_log_compact_keypage cmp al, 0 jz short loc_71042 jmp short $+2 loc_7103C: mov [rbp+var_1], 1 jmp short loc_7104A loc_71042: jmp short $+2 loc_71044: jmp short $+2 loc_71046: mov [rbp+var_1], 0 loc_7104A: mov al, [rbp+var_1] add rsp, 0A0h pop rbp retn
bool ma_compact_keypage(long long a1, unsigned long long a2) { long long v2; // rdx long long v3; // rcx long long v4; // r8 int v5; // r9d int v7; // [rsp+Ch] [rbp-94h] unsigned long long v8; // [rsp+10h] [rbp-90h] int v9; // [rsp+1Ch] [rbp-84h] int v10; // [rsp+20h] [rbp-80h] unsigned int v11; // [rsp+2Ch] [rbp-74h] char v12; // [rsp+33h] [rbp-6Dh] int v13; // [rsp+34h] [rbp-6Ch] int v14; // [rsp+38h] [rbp-68h] unsigned __int8 *v15; // [rsp+40h] [rbp-60h] unsigned long long v16; // [rsp+48h] [rbp-58h] long long v17; // [rsp+50h] [rbp-50h] unsigned __int8 *v18; // [rsp+50h] [rbp-50h] unsigned __int8 *v19; // [rsp+50h] [rbp-50h] _QWORD v20[4]; // [rsp+58h] [rbp-48h] BYREF long long v21; // [rsp+78h] [rbp-28h] _DWORD *v22; // [rsp+80h] [rbp-20h] unsigned long long v23; // [rsp+88h] [rbp-18h] long long v24; // [rsp+90h] [rbp-10h] v24 = a1; v23 = a2; v22 = *(_DWORD **)a1; v21 = *(_QWORD *)v22; if ( (*(_DWORD *)(a1 + 44) & 2) == 0 ) return 0; v14 = *(_DWORD *)(v24 + 40); v17 = *(_QWORD *)(v24 + 16); v16 = *(unsigned int *)(v24 + 32) + v17; v20[0] = *((_QWORD *)v22 + 113); v20[1] = *(_QWORD *)(v24 + 8); v12 = 0; v18 = (unsigned __int8 *)((unsigned int)(v14 + *(_DWORD *)(v21 + 1860)) + v17); *(_BYTE *)v20[0] = 0; v15 = 0LL; v13 = 0; do { v19 = (unsigned __int8 *)(*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned __int8 *))(*(_QWORD *)(v24 + 8) + 232LL))( v20, 0LL, 0LL, v18); if ( !v19 ) { ma_set_fatal_error(v22, 126, v2, v3, v4, v5); return 1; } if ( (*(v19 - 1) & 1) != 0 ) { if ( *v19 >= 0xF3u ) v9 = *v19 - 248; else v9 = 1; v11 = v9; if ( v23 == -1LL || (v8 = v23, v8 < transid_get_packed(v21, v19)) ) { *(v19 - 1) &= ~1u; if ( *v19 >= 0xF3u ) v7 = *v19 - 248; else v7 = 1; v11 = v7; if ( v15 ) { memmove(v15, &v15[v13], (unsigned int)((_DWORD)v19 - (_DWORD)v15 - v13)); v15 += (unsigned int)((_DWORD)v19 - (_DWORD)v15 - v13); } else { v15 = v19; } v13 += v7; } else { v12 = 1; } v19 += v11; } v18 = &v19[v14]; } while ( (unsigned long long)v18 < v16 ); if ( v15 ) { if ( (_DWORD)v16 - (_DWORD)v15 != v13 ) memmove(v15, &v15[v13], (unsigned int)(v16 - (_DWORD)v15 - v13)); *(_DWORD *)(v24 + 32) = v16 - v13 - *(_QWORD *)(v24 + 16); v10 = *(_DWORD *)(v24 + 32); *(_BYTE *)(*(_QWORD *)(v24 + 16) + *(unsigned int *)(v21 + 1860) - 1LL) = v10; *(_BYTE *)(*(_QWORD *)(v24 + 16) + *(unsigned int *)(v21 + 1860) - 2LL) = BYTE1(v10); } if ( !v12 ) { *(_DWORD *)(v24 + 44) &= ~2u; *(_BYTE *)(*(_QWORD *)(v24 + 16) + (unsigned int)(*(_DWORD *)(v21 + 1860) - 3)) = *(_DWORD *)(v24 + 44); memset(*(_QWORD *)(v24 + 16) + 7LL, 0LL, 6LL); } return *(_BYTE *)(v21 + 2023) && (unsigned __int8)ma_log_compact_keypage(v24, v23); }
_ma_compact_keypage: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x64],EAX MOV EAX,dword ptr [RBP + -0x64] AND EAX,0x2 CMP EAX,0x0 JNZ 0x00170d29 JMP 0x00170d20 LAB_00170d20: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0017104a LAB_00170d29: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x68],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x388] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX MOV byte ptr [RBP + -0x6d],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x744] ADD ECX,dword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] MOV byte ptr [RAX],0x0 MOV qword ptr [RBP + -0x60],0x0 MOV dword ptr [RBP + -0x6c],0x0 LAB_00170da0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xe8] MOV RCX,qword ptr [RBP + -0x50] LEA RDI,[RBP + -0x48] XOR EDX,EDX MOV ESI,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x00170de2 JMP 0x00170dc9 LAB_00170dc9: JMP 0x00170dcb LAB_00170dcb: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x7e CALL 0x00130500 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017104a LAB_00170de2: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX + -0x1] AND EAX,0x1 CMP EAX,0x0 JZ 0x00170f0e MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] CMP EAX,0xf3 JGE 0x00170e11 MOV EAX,0x1 MOV dword ptr [RBP + -0x84],EAX JMP 0x00170e23 LAB_00170e11: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] SUB EAX,0xf8 MOV dword ptr [RBP + -0x84],EAX LAB_00170e23: MOV EAX,dword ptr [RBP + -0x84] MOV dword ptr [RBP + -0x74],EAX CMP qword ptr [RBP + -0x18],-0x1 JZ 0x00170e5e MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x50] CALL 0x00130770 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x90] CMP RAX,RCX JNC 0x00170efa LAB_00170e5e: MOV RAX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RAX + -0x1] AND ECX,0xfe MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] CMP EAX,0xf3 JGE 0x00170e8a MOV EAX,0x1 MOV dword ptr [RBP + -0x94],EAX JMP 0x00170e9c LAB_00170e8a: MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX] SUB EAX,0xf8 MOV dword ptr [RBP + -0x94],EAX LAB_00170e9c: MOV EAX,dword ptr [RBP + -0x94] MOV dword ptr [RBP + -0x74],EAX CMP qword ptr [RBP + -0x60],0x0 JZ 0x00170ee7 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x60] SUB RAX,RCX SUB EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x78],EAX MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x6c] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x78] MOV EDX,EAX CALL 0x0012a140 MOV ECX,dword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x60] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX JMP 0x00170eef LAB_00170ee7: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX LAB_00170eef: MOV EAX,dword ptr [RBP + -0x74] ADD EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x6c],EAX JMP 0x00170efe LAB_00170efa: MOV byte ptr [RBP + -0x6d],0x1 LAB_00170efe: MOV ECX,dword ptr [RBP + -0x74] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_00170f0e: MOV ECX,dword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JC 0x00170da0 JMP 0x00170f2e LAB_00170f2e: JMP 0x00170f30 LAB_00170f30: CMP qword ptr [RBP + -0x60],0x0 JZ 0x00170fcb MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] SUB RAX,RCX SUB EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x7c],EAX CMP dword ptr [RBP + -0x7c],0x0 JZ 0x00170f6a MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x6c] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x7c] MOV EDX,EAX CALL 0x0012a140 LAB_00170f6a: MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RBP + -0x7c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x20],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x80],EAX MOV EAX,dword ptr [RBP + -0x80] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x1],DL MOV EAX,dword ptr [RBP + -0x80] SHR EAX,0x8 MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x2],DL LAB_00170fcb: CMP byte ptr [RBP + -0x6d],0x0 JNZ 0x0017101c MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2c] AND ECX,0xfffffffd MOV dword ptr [RAX + 0x2c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x2 SUB ECX,0x1 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] ADD RDI,0x7 XOR ESI,ESI MOV EDX,0x6 CALL 0x0012a2c0 LAB_0017101c: MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x00171044 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00171060 CMP AL,0x0 JZ 0x00171042 JMP 0x0017103c LAB_0017103c: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017104a LAB_00171042: JMP 0x00171044 LAB_00171044: JMP 0x00171046 LAB_00171046: MOV byte ptr [RBP + -0x1],0x0 LAB_0017104a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xa0 POP RBP RET
int1 _ma_compact_keypage(long *param_1,ulong param_2) { bool bVar1; long lVar2; ulong uVar3; byte *pbVar4; char cVar5; uint uVar6; uint uVar7; byte *pbVar8; ulong uVar9; uint local_9c; uint local_8c; uint local_7c; uint local_74; byte *local_68; byte *local_58; int1 *local_50; long local_48; long local_30; long *local_28; ulong local_20; long *local_18; int1 local_9; local_28 = (long *)*param_1; local_30 = *local_28; if ((*(uint *)((long)param_1 + 0x2c) & 2) == 0) { local_9 = 0; } else { uVar7 = *(uint *)(param_1 + 5); pbVar8 = (byte *)(param_1[2] + (ulong)*(uint *)(param_1 + 4)); local_50 = (int1 *)local_28[0x71]; local_48 = param_1[1]; bVar1 = false; local_58 = (byte *)(param_1[2] + (ulong)(*(int *)(local_30 + 0x744) + uVar7)); *local_50 = 0; local_68 = (byte *)0x0; local_74 = 0; local_20 = param_2; local_18 = param_1; do { local_58 = (byte *)(**(code **)(local_18[1] + 0xe8))(&local_50,0,0,local_58); uVar3 = local_20; if (local_58 == (byte *)0x0) { _ma_set_fatal_error(local_28,0x7e); return 1; } if ((local_58[-1] & 1) != 0) { if (*local_58 < 0xf3) { local_8c = 1; } else { local_8c = *local_58 - 0xf8; } local_7c = local_8c; if ((local_20 == 0xffffffffffffffff) || (uVar9 = transid_get_packed(local_30), uVar3 < uVar9)) { local_58[-1] = local_58[-1] & 0xfe; if (*local_58 < 0xf3) { local_9c = 1; } else { local_9c = *local_58 - 0xf8; } local_7c = local_9c; pbVar4 = local_58; if (local_68 != (byte *)0x0) { uVar6 = ((int)local_58 - (int)local_68) - local_74; memmove(local_68,local_68 + local_74,(ulong)uVar6); pbVar4 = local_68 + uVar6; } local_68 = pbVar4; local_74 = local_9c + local_74; } else { bVar1 = true; } local_58 = local_58 + local_7c; } local_58 = local_58 + uVar7; } while (local_58 < pbVar8); if (local_68 != (byte *)0x0) { uVar7 = ((int)pbVar8 - (int)local_68) - local_74; if (uVar7 != 0) { memmove(local_68,local_68 + local_74,(ulong)uVar7); } *(uint *)(local_18 + 4) = ((int)local_68 + uVar7) - (int)local_18[2]; lVar2 = local_18[4]; *(char *)(local_18[2] + -1 + (ulong)*(uint *)(local_30 + 0x744)) = (char)(int)lVar2; *(char *)(local_18[2] + -2 + (ulong)*(uint *)(local_30 + 0x744)) = (char)((uint)(int)lVar2 >> 8); } if (!bVar1) { *(uint *)((long)local_18 + 0x2c) = *(uint *)((long)local_18 + 0x2c) & 0xfffffffd; *(char *)(local_18[2] + (ulong)(*(int *)(local_30 + 0x744) - 3)) = (char)*(int4 *)((long)local_18 + 0x2c); memset((void *)(local_18[2] + 7),0,6); } if ((*(char *)(local_30 + 0x7e7) == '\0') || (cVar5 = _ma_log_compact_keypage(local_18,local_20), cVar5 == '\0')) { local_9 = 0; } else { local_9 = 1; } } return local_9; }
49,157
testing::internal::StreamingListener::SocketWriter::Send(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
void Send(const std::string& message) override { GTEST_CHECK_(sockfd_ != -1) << "Send() can be called only when there is a connection."; const auto len = static_cast<size_t>(message.length()); if (write(sockfd_, message.c_str(), len) != static_cast<ssize_t>(len)) { GTEST_LOG_(WARNING) << "stream_result_to: failed to stream to " << host_name_ << ":" << port_num_; } }
O3
c
testing::internal::StreamingListener::SocketWriter::Send(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0x8(%rdi), %edi cmpl $-0x1, %edi jne 0x3c1b2 leaq 0x8325(%rip), %rdx # 0x44486 leaq 0x4(%rsp), %rdi movl $0x3, %esi movl $0x43f, %ecx # imm = 0x43F callq 0x1ae3c movq 0x1de6c(%rip), %rdi # 0x59fe8 leaq 0x84f6(%rip), %rsi # 0x44679 movl $0x20, %edx callq 0x95a0 movq 0x1de54(%rip), %rdi # 0x59fe8 leaq 0x84ff(%rip), %rsi # 0x4469a movl $0x35, %edx callq 0x95a0 leaq 0x4(%rsp), %rdi callq 0x1af7e movl 0x8(%rbx), %edi movq (%r14), %rsi movq 0x8(%r14), %r14 movq %r14, %rdx callq 0x91b0 cmpq %r14, %rax je 0x3c23a leaq 0x82b9(%rip), %rdx # 0x44486 movq %rsp, %rdi movl $0x1, %esi movl $0x444, %ecx # imm = 0x444 callq 0x1ae3c movq 0x1de02(%rip), %rdi # 0x59fe8 leaq 0x84e3(%rip), %rsi # 0x446d0 movl $0x26, %edx callq 0x95a0 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movq 0x1dde2(%rip), %rdi # 0x59fe8 callq 0x95a0 movq %rax, %r14 leaq 0x7937(%rip), %rsi # 0x43b4c movl $0x1, %edx movq %rax, %rdi callq 0x95a0 movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rdx movq %r14, %rdi callq 0x95a0 movq %rsp, %rdi callq 0x1af7e addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x4(%rsp), %rdi jmp 0x3c252 movq %rax, %rbx movq %rsp, %rdi callq 0x1af7e movq %rbx, %rdi callq 0x99a0 nop
_ZN7testing8internal17StreamingListener12SocketWriter4SendERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov edi, [rdi+8] cmp edi, 0FFFFFFFFh jnz short loc_3C1B2 lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+18h+var_14] mov esi, 3 mov ecx, 43Fh call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aConditionSockf_0; "Condition sockfd_ != -1 failed. " mov edx, 20h ; ' ' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aSendCanBeCalle; "Send() can be called only when there is"... mov edx, 35h ; '5' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+18h+var_14]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() mov edi, [rbx+8] loc_3C1B2: mov rsi, [r14] mov r14, [r14+8] mov rdx, r14 call _write cmp rax, r14 jz short loc_3C23A lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... mov rdi, rsp mov esi, 1 mov ecx, 444h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aStreamResultTo_2; "stream_result_to: failed to stream to " mov edx, 26h ; '&' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov rdi, cs:_ZSt4cerr_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax lea rsi, aTrace+6; ":" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx+30h] mov rdx, [rbx+38h] mov rdi, 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 rdi, rsp; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_3C23A: add rsp, 8 pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+4] jmp short loc_3C252 mov rbx, rax mov rdi, rsp; this loc_3C252: call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() mov rdi, rbx call __Unwind_Resume
void testing::internal::StreamingListener::SocketWriter::Send(long long a1, _QWORD *a2) { long long v2; // rax long long v4; // rdi long long v5; // r14 long long v6; // r14 _QWORD v7[3]; // [rsp-4h] [rbp-18h] BYREF v7[0] = v2; v4 = *(unsigned int *)(a1 + 8); if ( (_DWORD)v4 == -1 ) { testing::internal::GTestLog::GTestLog( (_DWORD *)v7 + 1, 3, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/" "gtest-internal-inl.h", 1087); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Condition sockfd_ != -1 failed. ", 32LL); std::__ostream_insert<char,std::char_traits<char>>( &std::cerr, "Send() can be called only when there is a connection.", 53LL); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)((char *)v7 + 4)); v4 = *(unsigned int *)(a1 + 8); } v5 = a2[1]; if ( write(v4, *a2, v5) != v5 ) { testing::internal::GTestLog::GTestLog( v7, 1, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/" "gtest-internal-inl.h", 1092); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "stream_result_to: failed to stream to ", 38LL); v6 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); std::__ostream_insert<char,std::char_traits<char>>(v6, ":", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v6, *(_QWORD *)(a1 + 48), *(_QWORD *)(a1 + 56)); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v7); } }
Send: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV EDI,dword ptr [RDI + 0x8] CMP EDI,-0x1 JNZ 0x0013c1b2 LEA RDX,[0x144486] LEA RDI,[RSP + 0x4] MOV ESI,0x3 MOV ECX,0x43f CALL 0x0011ae3c LAB_0013c175: MOV RDI,qword ptr [0x00159fe8] LEA RSI,[0x144679] MOV EDX,0x20 CALL 0x001095a0 MOV RDI,qword ptr [0x00159fe8] LEA RSI,[0x14469a] MOV EDX,0x35 CALL 0x001095a0 LAB_0013c1a5: LEA RDI,[RSP + 0x4] CALL 0x0011af7e MOV EDI,dword ptr [RBX + 0x8] LAB_0013c1b2: MOV RSI,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] MOV RDX,R14 CALL 0x001091b0 CMP RAX,R14 JZ 0x0013c23a LEA RDX,[0x144486] MOV RDI,RSP MOV ESI,0x1 MOV ECX,0x444 CALL 0x0011ae3c LAB_0013c1df: MOV RDI,qword ptr [0x00159fe8] LEA RSI,[0x1446d0] MOV EDX,0x26 CALL 0x001095a0 MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RDI,qword ptr [0x00159fe8] CALL 0x001095a0 MOV R14,RAX LEA RSI,[0x143b4c] MOV EDX,0x1 MOV RDI,RAX CALL 0x001095a0 MOV RSI,qword ptr [RBX + 0x30] MOV RDX,qword ptr [RBX + 0x38] MOV RDI,R14 CALL 0x001095a0 LAB_0013c232: MOV RDI,RSP CALL 0x0011af7e LAB_0013c23a: ADD RSP,0x8 POP RBX POP R14 RET
/* testing::internal::StreamingListener::SocketWriter::Send(std::__cxx11::string const&) */ void __thiscall testing::internal::StreamingListener::SocketWriter::Send(SocketWriter *this,string *param_1) { size_t __n; size_t sVar1; ostream *poVar2; int __fd; GTestLog aGStack_18 [4]; GTestLog local_14 [4]; __fd = *(int *)(this + 8); if (__fd == -1) { GTestLog::GTestLog(local_14,3, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h" ,0x43f); /* try { // try from 0013c175 to 0013c1a4 has its CatchHandler @ 0013c242 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00159fe8,"Condition sockfd_ != -1 failed. ",0x20); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00159fe8,"Send() can be called only when there is a connection.", 0x35); GTestLog::~GTestLog(local_14); __fd = *(int *)(this + 8); } __n = *(size_t *)(param_1 + 8); sVar1 = write(__fd,*(void **)param_1,__n); if (sVar1 != __n) { GTestLog::GTestLog(aGStack_18,1, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h" ,0x444); /* try { // try from 0013c1df to 0013c231 has its CatchHandler @ 0013c24c */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00159fe8,"stream_result_to: failed to stream to ",0x26); poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00159fe8,*(char **)(this + 0x10),*(long *)(this + 0x18)) ; std::__ostream_insert<char,std::char_traits<char>>(poVar2,":",1); std::__ostream_insert<char,std::char_traits<char>> (poVar2,*(char **)(this + 0x30),*(long *)(this + 0x38)); GTestLog::~GTestLog(aGStack_18); } return; }
49,158
ntt_fft
bluesky950520[P]quickjs/libbf.c
static no_inline int ntt_fft(BFNTTState *s, NTTLimb *out_buf, NTTLimb *in_buf, NTTLimb *tmp_buf, int fft_len_log2, int inverse, int m_idx) { limb_t nb_blocks, fft_per_block, p, k, n, stride_in, i, j, m, m2; NTTLimb *tab_in, *tab_out, *tmp, a0, a1, b0, b1, c, *trig, c_inv; int l; m = ntt_mods[m_idx]; m2 = 2 * m; n = (limb_t)1 << fft_len_log2; nb_blocks = n; fft_per_block = 1; stride_in = n / 2; tab_in = in_buf; tab_out = tmp_buf; l = fft_len_log2; while (nb_blocks != 2) { nb_blocks >>= 1; p = 0; k = 0; trig = get_trig(s, l, inverse, m_idx); if (!trig) return -1; for(i = 0; i < nb_blocks; i++) { c = trig[0]; c_inv = trig[1]; trig += 2; for(j = 0; j < fft_per_block; j++) { a0 = tab_in[k + j]; a1 = tab_in[k + j + stride_in]; b0 = add_mod(a0, a1, m2); b1 = a0 - a1 + m2; b1 = mul_mod_fast3(b1, c, m, c_inv); tab_out[p + j] = b0; tab_out[p + j + fft_per_block] = b1; } k += fft_per_block; p += 2 * fft_per_block; } fft_per_block <<= 1; l--; tmp = tab_in; tab_in = tab_out; tab_out = tmp; } /* no twiddle in last step */ tab_out = out_buf; for(k = 0; k < stride_in; k++) { a0 = tab_in[k]; a1 = tab_in[k + stride_in]; b0 = add_mod(a0, a1, m2); b1 = sub_mod(a0, a1, m2); tab_out[k] = b0; tab_out[k + stride_in] = b1; } return 0; }
O2
c
ntt_fft: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, 0x10(%rsp) movl %r8d, %r15d movq %rcx, %r12 movq %rsi, 0x20(%rsp) movq %rdi, 0x38(%rsp) movslq 0xb0(%rsp), %rcx leaq 0xea72(%rip), %rax # 0x89fa0 movq %rcx, 0x30(%rsp) movq (%rax,%rcx,8), %rbx leaq (%rbx,%rbx), %r14 pushq $0x1 popq %rbp movq %rbp, %rax movl %r15d, %ecx shlq %cl, %rax movq %rax, 0x8(%rsp) shrq %rax movq %rax, 0x18(%rsp) leaq (,%rax,8), %rax movq %rax, 0x28(%rsp) movq %rdx, %r13 cmpq $0x2, 0x8(%rsp) je 0x7b690 movq 0x38(%rsp), %rdi movl %r15d, %esi movl 0x10(%rsp), %edx movq 0x30(%rsp), %rcx callq 0x7b788 testq %rax, %rax je 0x7b6e8 movq %rax, %rcx movl %r15d, 0x14(%rsp) shrq 0x8(%rsp) leaq (,%rbp,2), %rax movq %rax, 0x40(%rsp) movq 0x28(%rsp), %rax leaq (%rax,%r13), %r8 leaq (,%rbp,8), %rax movq %rax, 0x60(%rsp) leaq (%r12,%rbp,8), %r10 movq %rbp, %rax shlq $0x4, %rax movq %rax, 0x58(%rsp) movq %r12, 0x50(%rsp) movq %r13, %rax movq %r12, %r13 movq %rax, 0x48(%rsp) movq %rax, %r12 xorl %edx, %edx cmpq 0x8(%rsp), %rdx je 0x7b674 movq %rdx, 0x68(%rsp) movq (%rcx), %r15 movq %rcx, 0x70(%rsp) movq 0x8(%rcx), %r9 xorl %r11d, %r11d cmpq %r11, %rbp je 0x7b648 movq (%r12,%r11,8), %rsi movq (%r8,%r11,8), %rax leaq (%rax,%rsi), %rdi cmpq %r14, %rdi movl $0x0, %ecx cmovaeq %r14, %rcx subq %rax, %rsi addq %r14, %rsi movq %rsi, %rax mulq %r9 subq %rcx, %rdi imulq %r15, %rsi imulq %rbx, %rdx subq %rdx, %rsi movq %rdi, (%r13,%r11,8) movq %rsi, (%r10,%r11,8) incq %r11 jmp 0x7b603 movq 0x70(%rsp), %rcx addq $0x10, %rcx movq 0x68(%rsp), %rdx incq %rdx movq 0x60(%rsp), %rax addq %rax, %r8 addq %rax, %r12 movq 0x58(%rsp), %rax addq %rax, %r10 addq %rax, %r13 jmp 0x7b5e4 movl 0x14(%rsp), %r15d decl %r15d movq 0x50(%rsp), %rdx movq 0x48(%rsp), %r12 movq 0x40(%rsp), %rbp jmp 0x7b561 movq 0x20(%rsp), %r10 movq 0x18(%rsp), %rbx leaq (%r10,%rbx,8), %r11 leaq (,%rbx,8), %rcx addq %r13, %rcx xorl %eax, %eax xorl %edx, %edx cmpq %rdx, %rbx je 0x7b6eb movq (%r13,%rdx,8), %rsi movq (%rcx,%rdx,8), %rdi leaq (%rdi,%rsi), %r8 cmpq %r14, %r8 movq %r14, %r9 cmovbq %rax, %r9 subq %r9, %r8 subq %rdi, %rsi movl $0x0, %edi cmovbq %r14, %rdi addq %rdi, %rsi movq %r8, (%r10,%rdx,8) movq %rsi, (%r11,%rdx,8) incq %rdx jmp 0x7b6ad pushq $-0x1 popq %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ntt_fft: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov [rsp+0A8h+var_98], r9d mov r15d, r8d mov r12, rcx mov [rsp+0A8h+var_88], rsi mov [rsp+0A8h+var_70], rdi movsxd rcx, [rsp+0A8h+arg_0] lea rax, ntt_mods mov [rsp+0A8h+var_78], rcx mov rbx, [rax+rcx*8] lea r14, [rbx+rbx] push 1 pop rbp mov rax, rbp mov ecx, r15d shl rax, cl mov [rsp+0A8h+var_A0], rax shr rax, 1 mov [rsp+0A8h+var_90], rax lea rax, ds:0[rax*8] mov [rsp+0A8h+var_80], rax loc_7B561: mov r13, rdx cmp [rsp+0A8h+var_A0], 2 jz loc_7B690 mov rdi, [rsp+0A8h+var_70] mov esi, r15d mov edx, [rsp+0A8h+var_98] mov rcx, [rsp+0A8h+var_78] call get_trig test rax, rax jz loc_7B6E8 mov rcx, rax mov [rsp+0A8h+var_94], r15d shr [rsp+0A8h+var_A0], 1 lea rax, ds:0[rbp*2] mov [rsp+0A8h+var_68], rax mov rax, [rsp+0A8h+var_80] lea r8, [rax+r13] lea rax, ds:0[rbp*8] mov [rsp+0A8h+var_48], rax lea r10, [r12+rbp*8] mov rax, rbp shl rax, 4 mov [rsp+0A8h+var_50], rax mov [rsp+0A8h+var_58], r12 mov rax, r13 mov r13, r12 mov [rsp+0A8h+var_60], rax mov r12, rax xor edx, edx loc_7B5E4: cmp rdx, [rsp+0A8h+var_A0] jz loc_7B674 mov [rsp+0A8h+var_40], rdx mov r15, [rcx] mov [rsp+0A8h+var_38], rcx mov r9, [rcx+8] xor r11d, r11d loc_7B603: cmp rbp, r11 jz short loc_7B648 mov rsi, [r12+r11*8] mov rax, [r8+r11*8] lea rdi, [rax+rsi] cmp rdi, r14 mov ecx, 0 cmovnb rcx, r14 sub rsi, rax add rsi, r14 mov rax, rsi mul r9 sub rdi, rcx imul rsi, r15 imul rdx, rbx sub rsi, rdx mov [r13+r11*8+0], rdi mov [r10+r11*8], rsi inc r11 jmp short loc_7B603 loc_7B648: mov rcx, [rsp+0A8h+var_38] add rcx, 10h mov rdx, [rsp+0A8h+var_40] inc rdx mov rax, [rsp+0A8h+var_48] add r8, rax add r12, rax mov rax, [rsp+0A8h+var_50] add r10, rax add r13, rax jmp loc_7B5E4 loc_7B674: mov r15d, [rsp+0A8h+var_94] dec r15d mov rdx, [rsp+0A8h+var_58] mov r12, [rsp+0A8h+var_60] mov rbp, [rsp+0A8h+var_68] jmp loc_7B561 loc_7B690: mov r10, [rsp+0A8h+var_88] mov rbx, [rsp+0A8h+var_90] lea r11, [r10+rbx*8] lea rcx, ds:0[rbx*8] add rcx, r13 xor eax, eax xor edx, edx loc_7B6AD: cmp rbx, rdx jz short loc_7B6EB mov rsi, [r13+rdx*8+0] mov rdi, [rcx+rdx*8] lea r8, [rdi+rsi] cmp r8, r14 mov r9, r14 cmovb r9, rax sub r8, r9 sub rsi, rdi mov edi, 0 cmovb rdi, r14 add rsi, rdi mov [r10+rdx*8], r8 mov [r11+rdx*8], rsi inc rdx jmp short loc_7B6AD loc_7B6E8: push 0FFFFFFFFFFFFFFFFh pop rax loc_7B6EB: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ntt_fft(long long a1, long long a2, long long a3, long long a4, unsigned int a5, unsigned int a6, int a7) { unsigned int v7; // r15d long long v9; // rbx unsigned long long v10; // r14 long long v11; // rbp long long v12; // r13 long long trig; // rax _QWORD *v14; // rcx long long v15; // r8 long long v16; // r10 long long v17; // rax long long v18; // r13 long long v19; // r12 long long v20; // rdx long long v21; // r15 unsigned long long v22; // r9 long long i; // r11 long long v24; // rsi long long v25; // rax long long v26; // rcx long long v27; // rcx long long result; // rax long long j; // rdx unsigned long long v30; // rsi unsigned long long v31; // rdi long long v32; // r9 long long v33; // r8 bool v34; // cf unsigned long long v35; // rsi long long v36; // rdi unsigned long long v37; // [rsp+8h] [rbp-A0h] unsigned int v39; // [rsp+14h] [rbp-94h] unsigned long long v40; // [rsp+18h] [rbp-90h] long long v42; // [rsp+48h] [rbp-60h] long long v43; // [rsp+50h] [rbp-58h] long long v44; // [rsp+58h] [rbp-50h] long long v45; // [rsp+60h] [rbp-48h] _QWORD *v46; // [rsp+70h] [rbp-38h] v7 = a5; v9 = ntt_mods[a7]; v10 = 2 * v9; v11 = 1LL; v37 = 1LL << a5; v40 = (unsigned long long)(1LL << a5) >> 1; while ( 1 ) { v12 = a3; if ( v37 == 2 ) break; trig = get_trig(a1, v7, a6, a7); if ( !trig ) return -1LL; v14 = (_QWORD *)trig; v39 = v7; v37 >>= 1; v15 = 8 * v40 + v12; v45 = 8 * v11; v16 = a4 + 8 * v11; v44 = 16 * v11; v43 = a4; v17 = v12; v18 = a4; v42 = v17; v19 = v17; v20 = 0LL; while ( v20 != v37 ) { v21 = *v14; v46 = v14; v22 = v14[1]; for ( i = 0LL; v11 != i; ++i ) { v24 = *(_QWORD *)(v19 + 8 * i); v25 = *(_QWORD *)(v15 + 8 * i); v26 = 0LL; if ( v25 + v24 >= v10 ) v26 = 2 * v9; *(_QWORD *)(v18 + 8 * i) = v25 + v24 - v26; *(_QWORD *)(v16 + 8 * i) = v21 * (v10 + v24 - v25) - v9 * ((v22 * (unsigned __int128)(v10 + v24 - v25)) >> 64); } v14 = v46 + 2; ++v20; v15 += v45; v19 += v45; v16 += v44; v18 += v44; } v7 = v39 - 1; a3 = v43; a4 = v42; v11 *= 2LL; } v27 = a3 + 8 * v40; result = 0LL; for ( j = 0LL; v40 != j; ++j ) { v30 = *(_QWORD *)(v12 + 8 * j); v31 = *(_QWORD *)(v27 + 8 * j); v32 = 2 * v9; if ( v31 + v30 < v10 ) v32 = 0LL; v33 = v31 + v30 - v32; v34 = v30 < v31; v35 = v30 - v31; v36 = 0LL; if ( v34 ) v36 = 2 * v9; *(_QWORD *)(a2 + 8 * j) = v33; *(_QWORD *)(a2 + 8 * v40 + 8 * j) = v36 + v35; } return result; }
ntt_fft: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV dword ptr [RSP + 0x10],R9D MOV R15D,R8D MOV R12,RCX MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x38],RDI MOVSXD RCX,dword ptr [RSP + 0xb0] LEA RAX,[0x189fa0] MOV qword ptr [RSP + 0x30],RCX MOV RBX,qword ptr [RAX + RCX*0x8] LEA R14,[RBX + RBX*0x1] PUSH 0x1 POP RBP MOV RAX,RBP MOV ECX,R15D SHL RAX,CL MOV qword ptr [RSP + 0x8],RAX SHR RAX,0x1 MOV qword ptr [RSP + 0x18],RAX LEA RAX,[RAX*0x8] MOV qword ptr [RSP + 0x28],RAX LAB_0017b561: MOV R13,RDX CMP qword ptr [RSP + 0x8],0x2 JZ 0x0017b690 MOV RDI,qword ptr [RSP + 0x38] MOV ESI,R15D MOV EDX,dword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x30] CALL 0x0017b788 TEST RAX,RAX JZ 0x0017b6e8 MOV RCX,RAX MOV dword ptr [RSP + 0x14],R15D SHR qword ptr [RSP + 0x8],0x1 LEA RAX,[RBP*0x2] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x28] LEA R8,[RAX + R13*0x1] LEA RAX,[RBP*0x8] MOV qword ptr [RSP + 0x60],RAX LEA R10,[R12 + RBP*0x8] MOV RAX,RBP SHL RAX,0x4 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x50],R12 MOV RAX,R13 MOV R13,R12 MOV qword ptr [RSP + 0x48],RAX MOV R12,RAX XOR EDX,EDX LAB_0017b5e4: CMP RDX,qword ptr [RSP + 0x8] JZ 0x0017b674 MOV qword ptr [RSP + 0x68],RDX MOV R15,qword ptr [RCX] MOV qword ptr [RSP + 0x70],RCX MOV R9,qword ptr [RCX + 0x8] XOR R11D,R11D LAB_0017b603: CMP RBP,R11 JZ 0x0017b648 MOV RSI,qword ptr [R12 + R11*0x8] MOV RAX,qword ptr [R8 + R11*0x8] LEA RDI,[RAX + RSI*0x1] CMP RDI,R14 MOV ECX,0x0 CMOVNC RCX,R14 SUB RSI,RAX ADD RSI,R14 MOV RAX,RSI MUL R9 SUB RDI,RCX IMUL RSI,R15 IMUL RDX,RBX SUB RSI,RDX MOV qword ptr [R13 + R11*0x8],RDI MOV qword ptr [R10 + R11*0x8],RSI INC R11 JMP 0x0017b603 LAB_0017b648: MOV RCX,qword ptr [RSP + 0x70] ADD RCX,0x10 MOV RDX,qword ptr [RSP + 0x68] INC RDX MOV RAX,qword ptr [RSP + 0x60] ADD R8,RAX ADD R12,RAX MOV RAX,qword ptr [RSP + 0x58] ADD R10,RAX ADD R13,RAX JMP 0x0017b5e4 LAB_0017b674: MOV R15D,dword ptr [RSP + 0x14] DEC R15D MOV RDX,qword ptr [RSP + 0x50] MOV R12,qword ptr [RSP + 0x48] MOV RBP,qword ptr [RSP + 0x40] JMP 0x0017b561 LAB_0017b690: MOV R10,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x18] LEA R11,[R10 + RBX*0x8] LEA RCX,[RBX*0x8] ADD RCX,R13 XOR EAX,EAX XOR EDX,EDX LAB_0017b6ad: CMP RBX,RDX JZ 0x0017b6eb MOV RSI,qword ptr [R13 + RDX*0x8] MOV RDI,qword ptr [RCX + RDX*0x8] LEA R8,[RDI + RSI*0x1] CMP R8,R14 MOV R9,R14 CMOVC R9,RAX SUB R8,R9 SUB RSI,RDI MOV EDI,0x0 CMOVC RDI,R14 ADD RSI,RDI MOV qword ptr [R10 + RDX*0x8],R8 MOV qword ptr [R11 + RDX*0x8],RSI INC RDX JMP 0x0017b6ad LAB_0017b6e8: PUSH -0x1 POP RAX LAB_0017b6eb: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ntt_fft(int8 param_1,long param_2,long param_3,long param_4,int param_5,int4 param_6, int param_7) { ulong uVar1; long lVar2; long lVar3; ulong uVar4; long lVar5; long lVar6; int1 auVar7 [16]; int1 auVar8 [16]; ulong uVar9; ulong uVar10; long *plVar11; ulong uVar12; long lVar13; ulong uVar14; long lVar15; ulong uVar16; long lVar17; long lVar18; long lVar19; long lVar20; long lVar21; ulong local_a0; lVar2 = (&ntt_mods)[param_7]; uVar9 = lVar2 * 2; local_a0 = 1L << ((byte)param_5 & 0x3f); uVar10 = local_a0 >> 1; lVar15 = 1; while( true ) { lVar13 = param_3; if (local_a0 == 2) { for (uVar14 = 0; uVar10 != uVar14; uVar14 = uVar14 + 1) { uVar4 = *(ulong *)(lVar13 + uVar14 * 8); uVar1 = *(ulong *)(uVar10 * 8 + lVar13 + uVar14 * 8); uVar12 = uVar9; if (uVar1 + uVar4 < uVar9) { uVar12 = 0; } uVar16 = 0; if (uVar4 < uVar1) { uVar16 = uVar9; } *(ulong *)(param_2 + uVar14 * 8) = (uVar1 + uVar4) - uVar12; *(ulong *)(param_2 + uVar10 * 8 + uVar14 * 8) = (uVar4 - uVar1) + uVar16; } return 0; } plVar11 = (long *)get_trig(param_1,param_5,param_6,(long)param_7); if (plVar11 == (long *)0x0) break; local_a0 = local_a0 >> 1; lVar17 = uVar10 * 8 + lVar13; lVar18 = param_4 + lVar15 * 8; lVar20 = lVar13; lVar21 = param_4; for (uVar14 = 0; uVar14 != local_a0; uVar14 = uVar14 + 1) { lVar3 = *plVar11; uVar4 = plVar11[1]; for (lVar19 = 0; lVar15 != lVar19; lVar19 = lVar19 + 1) { lVar5 = *(long *)(lVar20 + lVar19 * 8); lVar6 = *(long *)(lVar17 + lVar19 * 8); uVar1 = lVar6 + lVar5; uVar12 = 0; if (uVar9 <= uVar1) { uVar12 = uVar9; } uVar16 = (lVar5 - lVar6) + uVar9; auVar7._8_8_ = 0; auVar7._0_8_ = uVar16; auVar8._8_8_ = 0; auVar8._0_8_ = uVar4; *(ulong *)(lVar21 + lVar19 * 8) = uVar1 - uVar12; *(ulong *)(lVar18 + lVar19 * 8) = uVar16 * lVar3 - SUB168(auVar7 * auVar8,8) * lVar2; } plVar11 = plVar11 + 2; lVar17 = lVar17 + lVar15 * 8; lVar20 = lVar20 + lVar15 * 8; lVar18 = lVar18 + lVar15 * 0x10; lVar21 = lVar21 + lVar15 * 0x10; } param_5 = param_5 + -1; param_3 = param_4; lVar15 = lVar15 * 2; param_4 = lVar13; } return 0xffffffffffffffff; }
49,159
MNN::CreateDetectionPostProcessParam(flatbuffers::FlatBufferBuilder&, MNN::DetectionPostProcessParamT const*, std::__1::function<unsigned long (void*)> const*)
mnn-tts/MNN/schema/current/TensorflowOp_generated.h
inline flatbuffers::Offset<DetectionPostProcessParam> CreateDetectionPostProcessParam(flatbuffers::FlatBufferBuilder &_fbb, const DetectionPostProcessParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DetectionPostProcessParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _maxDetections = _o->maxDetections; auto _maxClassesPerDetection = _o->maxClassesPerDetection; auto _detectionsPerClass = _o->detectionsPerClass; auto _nmsScoreThreshold = _o->nmsScoreThreshold; auto _iouThreshold = _o->iouThreshold; auto _numClasses = _o->numClasses; auto _useRegularNMS = _o->useRegularNMS; auto _centerSizeEncoding = _o->centerSizeEncoding.size() ? _fbb.CreateVector(_o->centerSizeEncoding) : 0; return MNN::CreateDetectionPostProcessParam( _fbb, _maxDetections, _maxClassesPerDetection, _detectionsPerClass, _nmsScoreThreshold, _iouThreshold, _numClasses, _useRegularNMS, _centerSizeEncoding); }
O0
c
MNN::CreateDetectionPostProcessParam(flatbuffers::FlatBufferBuilder&, MNN::DetectionPostProcessParamT const*, std::__1::function<unsigned long (void*)> const*): subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) movq %rdx, 0x48(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x50(%rsp), %rax movl (%rax), %eax movl %eax, 0x2c(%rsp) movq 0x50(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x28(%rsp) movq 0x50(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0x24(%rsp) movq 0x50(%rsp), %rax movss 0xc(%rax), %xmm0 movss %xmm0, 0x20(%rsp) movq 0x50(%rsp), %rax movss 0x10(%rax), %xmm0 movss %xmm0, 0x1c(%rsp) movq 0x50(%rsp), %rax movl 0x14(%rax), %eax movl %eax, 0x18(%rsp) movq 0x50(%rsp), %rax movb 0x18(%rax), %al andb $0x1, %al movb %al, 0x17(%rsp) movq 0x50(%rsp), %rdi addq $0x20, %rdi callq 0xea20 cmpq $0x0, %rax je 0x46e8b movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rsi addq $0x20, %rsi callq 0x3b540 movl %eax, 0x10(%rsp) jmp 0x46e97 leaq 0x10(%rsp), %rdi xorl %esi, %esi callq 0x3b590 movq 0x58(%rsp), %rdi movl 0x2c(%rsp), %esi movl 0x28(%rsp), %edx movl 0x24(%rsp), %ecx movss 0x20(%rsp), %xmm0 movss 0x1c(%rsp), %xmm1 movl 0x18(%rsp), %r8d movb 0x17(%rsp), %r9b movl 0x10(%rsp), %eax movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax andb $0x1, %r9b movzbl %r9b, %r9d movl %eax, (%rsp) callq 0x564c0 movl %eax, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw (%rax,%rax)
_ZN3MNN31CreateDetectionPostProcessParamERN11flatbuffers17FlatBufferBuilderEPKNS_26DetectionPostProcessParamTEPKNSt3__18functionIFmPvEEE: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_18], rsi mov [rsp+68h+var_20], rdx mov rax, [rsp+68h+var_10] mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_18] mov [rsp+68h+var_30], rax mov rax, [rsp+68h+var_20] mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_18] mov eax, [rax] mov [rsp+68h+var_3C], eax mov rax, [rsp+68h+var_18] mov eax, [rax+4] mov [rsp+68h+var_40], eax mov rax, [rsp+68h+var_18] mov eax, [rax+8] mov [rsp+68h+var_44], eax mov rax, [rsp+68h+var_18] movss xmm0, dword ptr [rax+0Ch] movss [rsp+68h+var_48], xmm0 mov rax, [rsp+68h+var_18] movss xmm0, dword ptr [rax+10h] movss [rsp+68h+var_4C], xmm0 mov rax, [rsp+68h+var_18] mov eax, [rax+14h] mov [rsp+68h+var_50], eax mov rax, [rsp+68h+var_18] mov al, [rax+18h] and al, 1 mov [rsp+68h+var_51], al mov rdi, [rsp+68h+var_18] add rdi, 20h ; ' ' call _ZNKSt3__16vectorIfNS_9allocatorIfEEE4sizeB8nn200100Ev; std::vector<float>::size(void) cmp rax, 0 jz short loc_46E8B mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_18] add rsi, 20h ; ' ' call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorIfEENS_6OffsetINS_6VectorIT_EEEERKNSt3__16vectorIS4_NS7_9allocatorIS4_EEEE; flatbuffers::FlatBufferBuilder::CreateVector<float>(std::vector<float> const&) mov [rsp+68h+var_58], eax jmp short loc_46E97 loc_46E8B: lea rdi, [rsp+68h+var_58] xor esi, esi call _ZN11flatbuffers6OffsetINS_6VectorIfEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<float>>::Offset(uint) loc_46E97: mov rdi, [rsp+68h+var_10] mov esi, [rsp+68h+var_3C] mov edx, [rsp+68h+var_40] mov ecx, [rsp+68h+var_44] movss xmm0, [rsp+68h+var_48] movss xmm1, [rsp+68h+var_4C] mov r8d, [rsp+68h+var_50] mov r9b, [rsp+68h+var_51] mov eax, [rsp+68h+var_58] mov [rsp+68h+var_5C], eax mov eax, [rsp+68h+var_5C] and r9b, 1 movzx r9d, r9b mov [rsp+68h+var_68], eax call _ZN3MNN31CreateDetectionPostProcessParamERN11flatbuffers17FlatBufferBuilderEiiiffibNS0_6OffsetINS0_6VectorIfEEEE; MNN::CreateDetectionPostProcessParam(flatbuffers::FlatBufferBuilder &,int,int,int,float,float,int,bool,flatbuffers::Offset<flatbuffers::Vector<float>>) mov [rsp+68h+var_4], eax mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long MNN::CreateDetectionPostProcessParam(long long a1, int *a2, long long a3) { int v4; // [rsp+10h] [rbp-58h] BYREF char v5; // [rsp+17h] [rbp-51h] int v6; // [rsp+18h] [rbp-50h] int v7; // [rsp+1Ch] [rbp-4Ch] int v8; // [rsp+20h] [rbp-48h] int v9; // [rsp+24h] [rbp-44h] int v10; // [rsp+28h] [rbp-40h] int v11; // [rsp+2Ch] [rbp-3Ch] long long v12; // [rsp+30h] [rbp-38h] int *v13; // [rsp+38h] [rbp-30h] long long v14; // [rsp+40h] [rbp-28h] long long v15; // [rsp+48h] [rbp-20h] int *v16; // [rsp+50h] [rbp-18h] long long v17; // [rsp+58h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v12 = a1; v13 = a2; v14 = a3; v11 = *a2; v10 = a2[1]; v9 = a2[2]; v8 = a2[3]; v7 = a2[4]; v6 = a2[5]; v5 = a2[6] & 1; if ( std::vector<float>::size[abi:nn200100]((_QWORD *)a2 + 4) ) v4 = flatbuffers::FlatBufferBuilder::CreateVector<float>(v17, (_QWORD *)v16 + 4); else flatbuffers::Offset<flatbuffers::Vector<float>>::Offset(&v4, 0); return (unsigned int)MNN::CreateDetectionPostProcessParam(v17, v11, v10, v9, v6, v5 & 1, v4); }
CreateDetectionPostProcessParam: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x2c],EAX MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x28],EAX MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x50] MOVSS XMM0,dword ptr [RAX + 0xc] MOVSS dword ptr [RSP + 0x20],XMM0 MOV RAX,qword ptr [RSP + 0x50] MOVSS XMM0,dword ptr [RAX + 0x10] MOVSS dword ptr [RSP + 0x1c],XMM0 MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RSP + 0x18],EAX MOV RAX,qword ptr [RSP + 0x50] MOV AL,byte ptr [RAX + 0x18] AND AL,0x1 MOV byte ptr [RSP + 0x17],AL MOV RDI,qword ptr [RSP + 0x50] ADD RDI,0x20 CALL 0x0010ea20 CMP RAX,0x0 JZ 0x00146e8b MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x50] ADD RSI,0x20 CALL 0x0013b540 MOV dword ptr [RSP + 0x10],EAX JMP 0x00146e97 LAB_00146e8b: LEA RDI,[RSP + 0x10] XOR ESI,ESI CALL 0x0013b590 LAB_00146e97: MOV RDI,qword ptr [RSP + 0x58] MOV ESI,dword ptr [RSP + 0x2c] MOV EDX,dword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x24] MOVSS XMM0,dword ptr [RSP + 0x20] MOVSS XMM1,dword ptr [RSP + 0x1c] MOV R8D,dword ptr [RSP + 0x18] MOV R9B,byte ptr [RSP + 0x17] MOV EAX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0xc] AND R9B,0x1 MOVZX R9D,R9B MOV dword ptr [RSP],EAX CALL 0x001564c0 MOV dword ptr [RSP + 0x64],EAX MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
/* MNN::CreateDetectionPostProcessParam(flatbuffers::FlatBufferBuilder&, MNN::DetectionPostProcessParamT const*, std::function<unsigned long (void*)> const*) */ int4 MNN::CreateDetectionPostProcessParam (FlatBufferBuilder *param_1,DetectionPostProcessParamT *param_2,function *param_3) { int4 uVar1; long lVar2; int4 local_58; byte local_51; int4 local_50; int4 local_4c; int4 local_48; int4 local_44; int4 local_40; int4 local_3c; FlatBufferBuilder *local_38; DetectionPostProcessParamT *local_30; function *local_28; function *local_20; DetectionPostProcessParamT *local_18; FlatBufferBuilder *local_10; local_3c = *(int4 *)param_2; local_40 = *(int4 *)(param_2 + 4); local_44 = *(int4 *)(param_2 + 8); local_48 = *(int4 *)(param_2 + 0xc); local_4c = *(int4 *)(param_2 + 0x10); local_50 = *(int4 *)(param_2 + 0x14); local_51 = (byte)param_2[0x18] & 1; local_38 = param_1; local_30 = param_2; local_28 = param_3; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar2 = std::vector<float,std::allocator<float>>::size_abi_nn200100_ ((vector<float,std::allocator<float>> *)(param_2 + 0x20)); if (lVar2 == 0) { flatbuffers::Offset<flatbuffers::Vector<float>>::Offset ((Offset<flatbuffers::Vector<float>> *)&local_58,0); } else { local_58 = flatbuffers::FlatBufferBuilder::CreateVector<float> (local_10,(vector *)(local_18 + 0x20)); } uVar1 = CreateDetectionPostProcessParam (local_48,local_4c,local_10,local_3c,local_40,local_44,local_50,local_51 & 1, local_58); return uVar1; }
49,160
mi_delete
eloqsql/storage/myisam/mi_delete.c
int mi_delete(MI_INFO *info,const uchar *record) { uint i; uchar *old_key; int save_errno; char lastpos[8]; MYISAM_SHARE *share=info->s; DBUG_ENTER("mi_delete"); /* Test if record is in datafile */ DBUG_EXECUTE_IF("myisam_pretend_crashed_table_on_usage", mi_print_error(info->s, HA_ERR_CRASHED); DBUG_RETURN(my_errno= HA_ERR_CRASHED);); DBUG_EXECUTE_IF("my_error_test_undefined_error", mi_print_error(info->s, INT_MAX); DBUG_RETURN(my_errno= INT_MAX);); if (!(info->update & HA_STATE_AKTIV)) { DBUG_RETURN(my_errno=HA_ERR_KEY_NOT_FOUND); /* No database read */ } if (share->options & HA_OPTION_READ_ONLY_DATA) { DBUG_RETURN(my_errno=EACCES); } if (_mi_readinfo(info,F_WRLCK,1)) DBUG_RETURN(my_errno); if (info->s->calc_checksum) info->checksum=(*info->s->calc_checksum)(info,record); if ((*share->compare_record)(info,record)) goto err; /* Error on read-check */ if (_mi_mark_file_changed(info)) goto err; /* Remove all keys from the .ISAM file */ old_key=info->lastkey2; for (i=0 ; i < share->base.keys ; i++ ) { if (mi_is_key_active(info->s->state.key_map, i)) { info->s->keyinfo[i].version++; if (info->s->keyinfo[i].flag & HA_FULLTEXT ) { if (_mi_ft_del(info,i, old_key,record,info->lastpos)) goto err; } else { if (info->s->keyinfo[i].ck_delete(info,i,old_key, _mi_make_key(info,i,old_key,record,info->lastpos))) goto err; } /* The above changed info->lastkey2. Inform mi_rnext_same(). */ info->update&= ~HA_STATE_RNEXT_SAME; } } if ((*share->delete_record)(info)) goto err; /* Remove record from database */ info->state->checksum-=info->checksum; info->update= HA_STATE_CHANGED+HA_STATE_DELETED+HA_STATE_ROW_CHANGED; info->state->records--; mi_sizestore(lastpos,info->lastpos); myisam_log_command(MI_LOG_DELETE,info,(uchar*) lastpos,sizeof(lastpos),0); (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE); if (info->invalidator != 0) { DBUG_PRINT("info", ("invalidator... '%s' (delete)", info->filename)); (*info->invalidator)(info->filename); info->invalidator=0; } DBUG_RETURN(0); err: save_errno=my_errno; mi_sizestore(lastpos,info->lastpos); myisam_log_command(MI_LOG_DELETE,info,(uchar*) lastpos, sizeof(lastpos),0); if (save_errno != HA_ERR_RECORD_CHANGED) { mi_print_error(info->s, HA_ERR_CRASHED); mi_mark_crashed(info); /* mark table crashed */ } (void) _mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE); info->update|=HA_STATE_WRITTEN; /* Buffer changed */ my_errno=save_errno; if (save_errno == HA_ERR_KEY_NOT_FOUND) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; } DBUG_RETURN(my_errno); }
O3
c
mi_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testb $0x2, 0x1d0(%rdi) jne 0x79d0d callq 0xa8ec2 movl $0x78, (%rax) movl $0x78, %r14d jmp 0x79f21 movq %rdi, %rbx movq (%rdi), %r13 testb $0x1, 0x31a(%r13) jne 0x79f10 movq %rsi, %r14 movq %rbx, %rdi movl $0x1, %esi movl $0x1, %edx callq 0x81ae7 testl %eax, %eax jne 0x79f06 movq (%rbx), %rax movq 0x2c8(%rax), %rax testq %rax, %rax je 0x79d5b movq %rbx, %rdi movq %r14, %rsi callq *%rax movl %eax, 0x1a8(%rbx) movq %rbx, %rdi movq %r14, %rsi callq *0x2c0(%r13) testl %eax, %eax jne 0x79e50 movq %rbx, %rdi callq 0x81cc6 testl %eax, %eax jne 0x79e50 movl 0x180(%r13), %eax testl %eax, %eax je 0x79e3e movq 0x110(%rbx), %rcx movq %rcx, -0x40(%rbp) xorl %r15d, %r15d xorl %r12d, %r12d movq (%rbx), %rcx movq 0xc0(%rcx), %rdx btq %r12, %rdx jae 0x79e2c movq 0x218(%rcx), %rax incl 0x1c(%rax,%r15) movq (%rbx), %rax movq 0x218(%rax), %rax testb $-0x80, 0xa(%rax,%r15) jne 0x79e01 movq 0x68(%rax,%r15), %rax movq %rax, -0x48(%rbp) movq 0x170(%rbx), %r8 movq %rbx, %rdi movl %r12d, %esi movq -0x40(%rbp), %rdx movq %r14, %rcx callq 0x80248 movq %rbx, %rdi movl %r12d, %esi movq -0x40(%rbp), %rdx movl %eax, %ecx callq *-0x48(%rbp) jmp 0x79e1a movq 0x170(%rbx), %r8 movq %rbx, %rdi movl %r12d, %esi movq -0x40(%rbp), %rdx movq %r14, %rcx callq 0x79a80 testl %eax, %eax jne 0x79e50 andb $-0x11, 0x1d1(%rbx) movl 0x180(%r13), %eax incq %r12 movl %eax, %ecx addq $0x70, %r15 cmpq %rcx, %r12 jb 0x79da0 movq %rbx, %rdi callq *0x2b0(%r13) testl %eax, %eax je 0x79f46 callq 0xa8ec2 movl (%rax), %r14d movq 0x170(%rbx), %rax bswapq %rax movq %rax, -0x38(%rbp) leaq 0x315f33(%rip), %rax # 0x38fda0 cmpl $0x0, (%rax) js 0x79e8b leaq -0x38(%rbp), %rdx movl $0x3, %edi movq %rbx, %rsi movl $0x8, %ecx xorl %r8d, %r8d callq 0x8222a cmpl $0x7b, %r14d je 0x79ec5 movq (%rbx), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x80212 movq (%rbx), %rax orb $0x2, 0xf0(%rax) leaq 0x69fcf(%rip), %rdx # 0xe3e85 movq %rbx, %rdi xorl %esi, %esi movl $0x79, %ecx callq 0x32b27 movq %rbx, %rdi movl $0x1, %esi callq 0x81bda orb $0x4, 0x1d0(%rbx) callq 0xa8ec2 movl %r14d, (%rax) cmpl $0x78, %r14d jne 0x79f06 movq (%rbx), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x80212 callq 0xa8ec2 movl $0x7e, (%rax) callq 0xa8ec2 movl (%rax), %r14d jmp 0x79f21 callq 0xa8ec2 movl $0xd, (%rax) movl $0xd, %r14d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x79fd0 movl %r14d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x1a8(%rbx), %eax movq 0x8(%rbx), %rcx subl %eax, 0x30(%rcx) movl $0x409, 0x1d0(%rbx) # imm = 0x409 movq 0x8(%rbx), %rax decq (%rax) movq 0x170(%rbx), %rax bswapq %rax movq %rax, -0x38(%rbp) leaq 0x315e27(%rip), %rax # 0x38fda0 cmpl $0x0, (%rax) js 0x79f97 leaq -0x38(%rbp), %rdx movl $0x3, %edi movq %rbx, %rsi movl $0x8, %ecx xorl %r8d, %r8d callq 0x8222a movq %rbx, %rdi movl $0x1, %esi callq 0x81bda movq 0x148(%rbx), %rax xorl %r14d, %r14d testq %rax, %rax je 0x79f21 movq 0xf8(%rbx), %rdi callq *%rax movq $0x0, 0x148(%rbx) jmp 0x79f21 callq 0x2a240
mi_delete: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rax, fs:28h mov [rbp+var_30], rax test byte ptr [rdi+1D0h], 2 jnz short loc_79D0D call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov r14d, 78h ; 'x' jmp loc_79F21 loc_79D0D: mov rbx, rdi mov r13, [rdi] test byte ptr [r13+31Ah], 1 jnz loc_79F10 mov r14, rsi mov rdi, rbx mov esi, 1 mov edx, 1 call _mi_readinfo test eax, eax jnz loc_79F06 mov rax, [rbx] mov rax, [rax+2C8h] test rax, rax jz short loc_79D5B mov rdi, rbx mov rsi, r14 call rax mov [rbx+1A8h], eax loc_79D5B: mov rdi, rbx mov rsi, r14 call qword ptr [r13+2C0h] test eax, eax jnz loc_79E50 mov rdi, rbx call _mi_mark_file_changed test eax, eax jnz loc_79E50 mov eax, [r13+180h] test eax, eax jz loc_79E3E mov rcx, [rbx+110h] mov [rbp+var_40], rcx xor r15d, r15d xor r12d, r12d loc_79DA0: mov rcx, [rbx] mov rdx, [rcx+0C0h] bt rdx, r12 jnb short loc_79E2C mov rax, [rcx+218h] inc dword ptr [rax+r15+1Ch] mov rax, [rbx] mov rax, [rax+218h] test byte ptr [rax+r15+0Ah], 80h jnz short loc_79E01 mov rax, [rax+r15+68h] mov [rbp+var_48], rax mov r8, [rbx+170h] mov rdi, rbx mov esi, r12d mov rdx, [rbp+var_40] mov rcx, r14 call _mi_make_key mov rdi, rbx mov esi, r12d mov rdx, [rbp+var_40] mov ecx, eax call [rbp+var_48] jmp short loc_79E1A loc_79E01: mov r8, [rbx+170h] mov rdi, rbx mov esi, r12d mov rdx, [rbp+var_40] mov rcx, r14 call _mi_ft_del loc_79E1A: test eax, eax jnz short loc_79E50 and byte ptr [rbx+1D1h], 0EFh mov eax, [r13+180h] loc_79E2C: inc r12 mov ecx, eax add r15, 70h ; 'p' cmp r12, rcx jb loc_79DA0 loc_79E3E: mov rdi, rbx call qword ptr [r13+2B0h] test eax, eax jz loc_79F46 loc_79E50: call _my_thread_var mov r14d, [rax] mov rax, [rbx+170h] bswap rax mov [rbp+var_38], rax lea rax, myisam_log_file cmp dword ptr [rax], 0 js short loc_79E8B lea rdx, [rbp+var_38] mov edi, 3 mov rsi, rbx mov ecx, 8 xor r8d, r8d call _myisam_log_command loc_79E8B: cmp r14d, 7Bh ; '{' jz short loc_79EC5 mov rax, [rbx] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error mov rax, [rbx] or byte ptr [rax+0F0h], 2 lea rdx, aWorkspaceLlm4b_43; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx xor esi, esi mov ecx, 79h ; 'y' call _mi_report_crashed loc_79EC5: mov rdi, rbx mov esi, 1 call _mi_writeinfo or byte ptr [rbx+1D0h], 4 call _my_thread_var mov [rax], r14d cmp r14d, 78h ; 'x' jnz short loc_79F06 mov rax, [rbx] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' loc_79F06: call _my_thread_var mov r14d, [rax] jmp short loc_79F21 loc_79F10: call _my_thread_var mov dword ptr [rax], 0Dh mov r14d, 0Dh loc_79F21: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_79FD0 mov eax, r14d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_79F46: mov eax, [rbx+1A8h] mov rcx, [rbx+8] sub [rcx+30h], eax mov dword ptr [rbx+1D0h], 409h mov rax, [rbx+8] dec qword ptr [rax] mov rax, [rbx+170h] bswap rax mov [rbp+var_38], rax lea rax, myisam_log_file cmp dword ptr [rax], 0 js short loc_79F97 lea rdx, [rbp+var_38] mov edi, 3 mov rsi, rbx mov ecx, 8 xor r8d, r8d call _myisam_log_command loc_79F97: mov rdi, rbx mov esi, 1 call _mi_writeinfo mov rax, [rbx+148h] xor r14d, r14d test rax, rax jz loc_79F21 mov rdi, [rbx+0F8h] call rax mov qword ptr [rbx+148h], 0 jmp loc_79F21 loc_79FD0: call ___stack_chk_fail
long long mi_delete(_BYTE *a1, long long a2, __m128i a3) { unsigned int v3; // r14d _BYTE *v4; // rbx long long v5; // r13 long long ( *v6)(_BYTE *, long long); // rax unsigned int v7; // eax long long v8; // r15 unsigned long long i; // r12 long long v10; // rdx long long v11; // rax unsigned int key; // eax int v13; // eax int v14; // r14d void ( *v16)(_QWORD); // rax long long ( *v17)(_BYTE *, _QWORD, long long, _QWORD); // [rsp+8h] [rbp-48h] long long v18; // [rsp+10h] [rbp-40h] _QWORD v19[7]; // [rsp+18h] [rbp-38h] BYREF v19[1] = __readfsqword(0x28u); if ( (a1[464] & 2) == 0 ) { *(_DWORD *)my_thread_var(a1) = 120; return 120; } v4 = a1; v5 = *(_QWORD *)a1; if ( (*(_BYTE *)(*(_QWORD *)a1 + 794LL) & 1) != 0 ) { *(_DWORD *)my_thread_var(a1) = 13; return 13; } if ( (unsigned int)mi_readinfo(a1, 1LL, 1LL) ) return *(unsigned int *)my_thread_var(a1); v6 = *(long long ( **)(_BYTE *, long long))(*(_QWORD *)a1 + 712LL); if ( v6 ) *((_DWORD *)a1 + 106) = v6(a1, a2); if ( (*(unsigned int ( **)(_BYTE *, long long))(v5 + 704))(a1, a2) || (unsigned int)mi_mark_file_changed(a1) ) goto LABEL_19; v7 = *(_DWORD *)(v5 + 384); if ( v7 ) { v18 = *((_QWORD *)a1 + 34); v8 = 0LL; for ( i = 0LL; i < v7; ++i ) { v10 = *(_QWORD *)(*(_QWORD *)v4 + 192LL); if ( _bittest64(&v10, i) ) { ++*(_DWORD *)(*(_QWORD *)(*(_QWORD *)v4 + 536LL) + v8 + 28); v11 = *(_QWORD *)(*(_QWORD *)v4 + 536LL); if ( *(char *)(v11 + v8 + 10) < 0 ) { a1 = v4; v13 = mi_ft_del(v4, i, v18, a2, *((_QWORD *)v4 + 46), a3); } else { v17 = *(long long ( **)(_BYTE *, _QWORD, long long, _QWORD))(v11 + v8 + 104); key = mi_make_key(v4, (unsigned int)i, v18, a2, *((_QWORD *)v4 + 46)); a1 = v4; v13 = v17(v4, (unsigned int)i, v18, key); } if ( v13 ) goto LABEL_19; v4[465] &= ~0x10u; v7 = *(_DWORD *)(v5 + 384); } v8 += 112LL; } } a1 = v4; if ( (*(unsigned int ( **)(_BYTE *))(v5 + 688))(v4) ) { LABEL_19: v14 = *(_DWORD *)my_thread_var(a1); v19[0] = _byteswap_uint64(*((_QWORD *)v4 + 46)); if ( myisam_log_file >= 0 ) myisam_log_command(3LL, v4, v19, 8LL, 0LL); if ( v14 != 123 ) { mi_report_error(126LL, *(_QWORD *)(*(_QWORD *)v4 + 616LL)); *(_BYTE *)(*(_QWORD *)v4 + 240LL) |= 2u; mi_report_crashed(); } a1 = v4; mi_writeinfo(v4, 1LL); v4[464] |= 4u; *(_DWORD *)my_thread_var(v4) = v14; if ( v14 == 120 ) { a1 = (_BYTE *)(&dword_7C + 2); mi_report_error(126LL, *(_QWORD *)(*(_QWORD *)v4 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; } return *(unsigned int *)my_thread_var(a1); } *(_DWORD *)(*((_QWORD *)v4 + 1) + 48LL) -= *((_DWORD *)v4 + 106); *((_DWORD *)v4 + 116) = 1033; --**((_QWORD **)v4 + 1); v19[0] = _byteswap_uint64(*((_QWORD *)v4 + 46)); if ( myisam_log_file >= 0 ) myisam_log_command(3LL, v4, v19, 8LL, 0LL); mi_writeinfo(v4, 1LL); v16 = (void ( *)(_QWORD))*((_QWORD *)v4 + 41); v3 = 0; if ( v16 ) { v16(*((_QWORD *)v4 + 31)); *((_QWORD *)v4 + 41) = 0LL; } return v3; }
mi_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST byte ptr [RDI + 0x1d0],0x2 JNZ 0x00179d0d CALL 0x001a8ec2 MOV dword ptr [RAX],0x78 MOV R14D,0x78 JMP 0x00179f21 LAB_00179d0d: MOV RBX,RDI MOV R13,qword ptr [RDI] TEST byte ptr [R13 + 0x31a],0x1 JNZ 0x00179f10 MOV R14,RSI MOV RDI,RBX MOV ESI,0x1 MOV EDX,0x1 CALL 0x00181ae7 TEST EAX,EAX JNZ 0x00179f06 MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x2c8] TEST RAX,RAX JZ 0x00179d5b MOV RDI,RBX MOV RSI,R14 CALL RAX MOV dword ptr [RBX + 0x1a8],EAX LAB_00179d5b: MOV RDI,RBX MOV RSI,R14 CALL qword ptr [R13 + 0x2c0] TEST EAX,EAX JNZ 0x00179e50 MOV RDI,RBX CALL 0x00181cc6 TEST EAX,EAX JNZ 0x00179e50 MOV EAX,dword ptr [R13 + 0x180] TEST EAX,EAX JZ 0x00179e3e MOV RCX,qword ptr [RBX + 0x110] MOV qword ptr [RBP + -0x40],RCX XOR R15D,R15D XOR R12D,R12D LAB_00179da0: MOV RCX,qword ptr [RBX] MOV RDX,qword ptr [RCX + 0xc0] BT RDX,R12 JNC 0x00179e2c MOV RAX,qword ptr [RCX + 0x218] INC dword ptr [RAX + R15*0x1 + 0x1c] MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x218] TEST byte ptr [RAX + R15*0x1 + 0xa],0x80 JNZ 0x00179e01 MOV RAX,qword ptr [RAX + R15*0x1 + 0x68] MOV qword ptr [RBP + -0x48],RAX MOV R8,qword ptr [RBX + 0x170] MOV RDI,RBX MOV ESI,R12D MOV RDX,qword ptr [RBP + -0x40] MOV RCX,R14 CALL 0x00180248 MOV RDI,RBX MOV ESI,R12D MOV RDX,qword ptr [RBP + -0x40] MOV ECX,EAX CALL qword ptr [RBP + -0x48] JMP 0x00179e1a LAB_00179e01: MOV R8,qword ptr [RBX + 0x170] MOV RDI,RBX MOV ESI,R12D MOV RDX,qword ptr [RBP + -0x40] MOV RCX,R14 CALL 0x00179a80 LAB_00179e1a: TEST EAX,EAX JNZ 0x00179e50 AND byte ptr [RBX + 0x1d1],0xef MOV EAX,dword ptr [R13 + 0x180] LAB_00179e2c: INC R12 MOV ECX,EAX ADD R15,0x70 CMP R12,RCX JC 0x00179da0 LAB_00179e3e: MOV RDI,RBX CALL qword ptr [R13 + 0x2b0] TEST EAX,EAX JZ 0x00179f46 LAB_00179e50: CALL 0x001a8ec2 MOV R14D,dword ptr [RAX] MOV RAX,qword ptr [RBX + 0x170] BSWAP RAX MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x48fda0] CMP dword ptr [RAX],0x0 JS 0x00179e8b LEA RDX,[RBP + -0x38] MOV EDI,0x3 MOV RSI,RBX MOV ECX,0x8 XOR R8D,R8D CALL 0x0018222a LAB_00179e8b: CMP R14D,0x7b JZ 0x00179ec5 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00180212 MOV RAX,qword ptr [RBX] OR byte ptr [RAX + 0xf0],0x2 LEA RDX,[0x1e3e85] MOV RDI,RBX XOR ESI,ESI MOV ECX,0x79 CALL 0x00132b27 LAB_00179ec5: MOV RDI,RBX MOV ESI,0x1 CALL 0x00181bda OR byte ptr [RBX + 0x1d0],0x4 CALL 0x001a8ec2 MOV dword ptr [RAX],R14D CMP R14D,0x78 JNZ 0x00179f06 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00180212 CALL 0x001a8ec2 MOV dword ptr [RAX],0x7e LAB_00179f06: CALL 0x001a8ec2 MOV R14D,dword ptr [RAX] JMP 0x00179f21 LAB_00179f10: CALL 0x001a8ec2 MOV dword ptr [RAX],0xd MOV R14D,0xd LAB_00179f21: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00179fd0 MOV EAX,R14D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00179f46: MOV EAX,dword ptr [RBX + 0x1a8] MOV RCX,qword ptr [RBX + 0x8] SUB dword ptr [RCX + 0x30],EAX MOV dword ptr [RBX + 0x1d0],0x409 MOV RAX,qword ptr [RBX + 0x8] DEC qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x170] BSWAP RAX MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x48fda0] CMP dword ptr [RAX],0x0 JS 0x00179f97 LEA RDX,[RBP + -0x38] MOV EDI,0x3 MOV RSI,RBX MOV ECX,0x8 XOR R8D,R8D CALL 0x0018222a LAB_00179f97: MOV RDI,RBX MOV ESI,0x1 CALL 0x00181bda MOV RAX,qword ptr [RBX + 0x148] XOR R14D,R14D TEST RAX,RAX JZ 0x00179f21 MOV RDI,qword ptr [RBX + 0xf8] CALL RAX MOV qword ptr [RBX + 0x148],0x0 JMP 0x00179f21 LAB_00179fd0: CALL 0x0012a240
int4 mi_delete(long *param_1,int8 param_2) { long lVar1; long lVar2; code *pcVar3; int iVar4; int4 uVar5; uint uVar6; int4 *puVar7; int *piVar8; ulong uVar9; long lVar10; long in_FS_OFFSET; ulong local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if ((*(byte *)(param_1 + 0x3a) & 2) == 0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x78; uVar5 = 0x78; } else { lVar1 = *param_1; if ((*(byte *)(lVar1 + 0x31a) & 1) == 0) { iVar4 = _mi_readinfo(param_1,1,1); if (iVar4 == 0) { if (*(code **)(*param_1 + 0x2c8) != (code *)0x0) { uVar5 = (**(code **)(*param_1 + 0x2c8))(param_1,param_2); *(int4 *)(param_1 + 0x35) = uVar5; } iVar4 = (**(code **)(lVar1 + 0x2c0))(param_1,param_2); if (iVar4 == 0) { iVar4 = _mi_mark_file_changed(param_1); if (iVar4 == 0) { uVar6 = *(uint *)(lVar1 + 0x180); if (uVar6 != 0) { lVar2 = param_1[0x22]; lVar10 = 0; uVar9 = 0; do { if ((*(ulong *)(*param_1 + 0xc0) >> (uVar9 & 0x3f) & 1) != 0) { piVar8 = (int *)(*(long *)(*param_1 + 0x218) + 0x1c + lVar10); *piVar8 = *piVar8 + 1; if ((*(byte *)(*(long *)(*param_1 + 0x218) + 10 + lVar10) & 0x80) == 0) { pcVar3 = *(code **)(*(long *)(*param_1 + 0x218) + 0x68 + lVar10); uVar5 = _mi_make_key(param_1,uVar9 & 0xffffffff,lVar2,param_2,param_1[0x2e]); iVar4 = (*pcVar3)(param_1,uVar9 & 0xffffffff,lVar2,uVar5); } else { iVar4 = _mi_ft_del(param_1,uVar9 & 0xffffffff,lVar2,param_2,param_1[0x2e]); } if (iVar4 != 0) goto LAB_00179e50; *(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) & 0xef; uVar6 = *(uint *)(lVar1 + 0x180); } uVar9 = uVar9 + 1; lVar10 = lVar10 + 0x70; } while (uVar9 < uVar6); } iVar4 = (**(code **)(lVar1 + 0x2b0))(param_1); if (iVar4 == 0) { *(int *)(param_1[1] + 0x30) = *(int *)(param_1[1] + 0x30) - (int)param_1[0x35]; *(int4 *)(param_1 + 0x3a) = 0x409; *(long *)param_1[1] = *(long *)param_1[1] + -1; uVar9 = param_1[0x2e]; local_40 = uVar9 >> 0x38 | (uVar9 & 0xff000000000000) >> 0x28 | (uVar9 & 0xff0000000000) >> 0x18 | (uVar9 & 0xff00000000) >> 8 | (uVar9 & 0xff000000) << 8 | (uVar9 & 0xff0000) << 0x18 | (uVar9 & 0xff00) << 0x28 | uVar9 << 0x38; if (-1 < myisam_log_file) { _myisam_log_command(3,param_1,&local_40,8,0); } _mi_writeinfo(param_1,1); uVar5 = 0; if ((code *)param_1[0x29] != (code *)0x0) { (*(code *)param_1[0x29])(param_1[0x1f]); param_1[0x29] = 0; } goto LAB_00179f21; } } } LAB_00179e50: piVar8 = (int *)_my_thread_var(); iVar4 = *piVar8; uVar9 = param_1[0x2e]; local_40 = uVar9 >> 0x38 | (uVar9 & 0xff000000000000) >> 0x28 | (uVar9 & 0xff0000000000) >> 0x18 | (uVar9 & 0xff00000000) >> 8 | (uVar9 & 0xff000000) << 8 | (uVar9 & 0xff0000) << 0x18 | (uVar9 & 0xff00) << 0x28 | uVar9 << 0x38; if (-1 < myisam_log_file) { _myisam_log_command(3,param_1,&local_40,8,0); } if (iVar4 != 0x7b) { mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); *(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 2; _mi_report_crashed(param_1,0, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_delete.c", 0x79); } _mi_writeinfo(param_1,1); *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 4; piVar8 = (int *)_my_thread_var(); *piVar8 = iVar4; if (iVar4 == 0x78) { mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x7e; } } puVar7 = (int4 *)_my_thread_var(); uVar5 = *puVar7; } else { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0xd; uVar5 = 0xd; } } LAB_00179f21: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,161
my_pread
eloqsql/mysys/my_pread.c
size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { size_t readbytes, save_count= 0; DBUG_ENTER("my_pread"); DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %lu", Filedes, (ulonglong)offset, Buffer, (ulong)Count, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; for (;;) { errno= 0; /* Linux, Windows don't reset this on EOF/success */ #ifdef _WIN32 readbytes= my_win_pread(Filedes, Buffer, Count, offset); #else readbytes= pread(Filedes, Buffer, Count, offset); #endif if (readbytes != Count) { /* We should never read with wrong file descriptor! */ DBUG_ASSERT(readbytes != (size_t)-1 || errno != EBADF); my_errno= errno; if (errno == 0 || (readbytes != (size_t) -1 && (MyFlags & (MY_NABP | MY_FNABP)))) my_errno= HA_ERR_FILE_TOO_SHORT; DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d", (int) readbytes, (uint) Count,Filedes,my_errno)); if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR) { DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d", (int) readbytes)); continue; /* Interrupted */ } /* Do a read retry if we didn't get enough data on first read */ if (readbytes != (size_t) -1 && readbytes != 0 && (MyFlags & MY_FULL_IO)) { Buffer+= readbytes; Count-= readbytes; save_count+= readbytes; offset+= readbytes; continue; } if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (readbytes == (size_t) -1) my_error(EE_READ, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); } if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP))) DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) readbytes= 0; /* Read went ok; Return 0 */ else readbytes+= save_count; DBUG_RETURN(readbytes); } }
O3
c
my_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, -0x58(%rbp) movq %rdx, -0x38(%rbp) movq %rsi, -0x50(%rbp) movl %edi, -0x2c(%rbp) movq $0x0, -0x40(%rbp) movl $0x0, %r15d testb $0x1a, %r8b jne 0x30936 leaq 0x348b65(%rip), %rax # 0x379498 movq (%rax), %r15 orq %r8, %r15 callq 0x24050 movq %rax, %r14 movq %r15, -0x48(%rbp) movl $0x0, (%r14) movl -0x2c(%rbp), %edi movq -0x50(%rbp), %rsi movq -0x38(%rbp), %rbx movq %rbx, %rdx movq -0x58(%rbp), %rcx callq 0x24630 subq %rax, %rbx je 0x30a2d movq %rax, %r12 testb $0x6, %r15b sete %r13b movl (%r14), %r15d callq 0x3193e movl %r15d, (%rax) cmpq $-0x1, %r12 sete %al cmpl $0x0, (%r14) je 0x30994 orb %r13b, %al jne 0x3099f callq 0x3193e movl $0xaf, (%rax) leaq 0x1(%r12), %rax cmpq $0x1, %rax ja 0x309b6 cmpl $0x4, (%r14) movq -0x48(%rbp), %r15 je 0x30945 jmp 0x309de movq -0x48(%rbp), %r15 btl $0x9, %r15d jae 0x309d6 addq %r12, -0x50(%rbp) addq %r12, -0x40(%rbp) addq %r12, -0x58(%rbp) movq %rbx, -0x38(%rbp) jmp 0x30945 movq $0x0, -0x40(%rbp) testb $0x1a, %r15b je 0x30a14 cmpq $-0x1, %r12 je 0x30a41 testb $0x6, %r15b je 0x30a14 andl $0x440, %r15d # imm = 0x440 orq $0x4, %r15 movl -0x2c(%rbp), %edi callq 0x367dc movq %rax, %rbx callq 0x3193e movl (%rax), %ecx movl $0x9, %edi jmp 0x30a63 movq $-0x1, %rax cmpq $-0x1, %r12 je 0x30a77 movl %r15d, %ecx movq %r12, -0x38(%rbp) andl $0x6, %ecx jne 0x30a77 movq -0x40(%rbp), %rcx addq -0x38(%rbp), %rcx xorl %eax, %eax testb $0x6, %r15b cmoveq %rcx, %rax jmp 0x30a77 andl $0x440, %r15d # imm = 0x440 orq $0x4, %r15 movl -0x2c(%rbp), %edi callq 0x367dc movq %rax, %rbx callq 0x3193e movl (%rax), %ecx movl $0x2, %edi movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x2cce7 movq $-0x1, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_58], rcx mov [rbp+var_38], rdx mov [rbp+var_50], rsi mov [rbp+var_2C], edi mov [rbp+var_40], 0 mov r15d, 0 test r8b, 1Ah jnz short loc_30936 lea rax, my_global_flags mov r15, [rax] loc_30936: or r15, r8 call ___errno_location mov r14, rax mov [rbp+var_48], r15 loc_30945: mov dword ptr [r14], 0 mov edi, [rbp+var_2C] mov rsi, [rbp+var_50] mov rbx, [rbp+var_38] mov rdx, rbx mov rcx, [rbp+var_58] call _pread64 sub rbx, rax jz loc_30A2D mov r12, rax test r15b, 6 setz r13b mov r15d, [r14] call _my_thread_var mov [rax], r15d cmp r12, 0FFFFFFFFFFFFFFFFh setz al cmp dword ptr [r14], 0 jz short loc_30994 or al, r13b jnz short loc_3099F loc_30994: call _my_thread_var mov dword ptr [rax], 0AFh loc_3099F: lea rax, [r12+1] cmp rax, 1 ja short loc_309B6 cmp dword ptr [r14], 4 mov r15, [rbp+var_48] jz short loc_30945 jmp short loc_309DE loc_309B6: mov r15, [rbp+var_48] bt r15d, 9 jnb short loc_309D6 add [rbp+var_50], r12 add [rbp+var_40], r12 add [rbp+var_58], r12 mov [rbp+var_38], rbx jmp loc_30945 loc_309D6: mov [rbp+var_40], 0 loc_309DE: test r15b, 1Ah jz short loc_30A14 cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_30A41 test r15b, 6 jz short loc_30A14 and r15d, 440h or r15, 4 mov edi, [rbp+var_2C] call my_filename mov rbx, rax call _my_thread_var mov ecx, [rax] mov edi, 9 jmp short loc_30A63 loc_30A14: mov rax, 0FFFFFFFFFFFFFFFFh cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_30A77 mov ecx, r15d mov [rbp+var_38], r12 and ecx, 6 jnz short loc_30A77 loc_30A2D: mov rcx, [rbp+var_40] add rcx, [rbp+var_38] xor eax, eax test r15b, 6 cmovz rax, rcx jmp short loc_30A77 loc_30A41: and r15d, 440h or r15, 4 mov edi, [rbp+var_2C] call my_filename mov rbx, rax call _my_thread_var mov ecx, [rax] mov edi, 2 loc_30A63: mov rsi, r15 mov rdx, rbx xor eax, eax call my_error mov rax, 0FFFFFFFFFFFFFFFFh loc_30A77: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_pread(long long a1, long long a2, long long a3, long long a4, __int16 a5) { __int16 v5; // r15 __int16 v6; // r15 int *v7; // r14 long long v8; // rax long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 long long v13; // rbx long long v14; // r12 bool v15; // r13 int v16; // r15d long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 long long v21; // r15 long long v22; // rbx long long v23; // rdx long long v24; // rcx long long v25; // r8 long long v26; // r9 long long v27; // rcx unsigned int v28; // edi long long result; // rax long long v30; // rdx long long v31; // rcx long long v32; // r8 long long v33; // r9 __int16 v36; // [rsp+18h] [rbp-48h] long long v37; // [rsp+20h] [rbp-40h] v37 = 0LL; v5 = 0; if ( (a5 & 0x1A) == 0 ) v5 = my_global_flags; v6 = a5 | v5; v7 = (int *)__errno_location(a1); v36 = v6; while ( 1 ) { while ( 1 ) { *v7 = 0; v8 = pread64((unsigned int)a1, a2, a3, a4); v13 = a3 - v8; if ( a3 == v8 ) goto LABEL_20; v14 = v8; v15 = (v6 & 6) == 0; v16 = *v7; *(_DWORD *)my_thread_var((unsigned int)a1, a2, v9, v10, v11, v12) = v16; if ( !*v7 || !v15 && v14 != -1 ) *(_DWORD *)my_thread_var((unsigned int)a1, a2, v17, v18, v19, v20) = 175; if ( (unsigned long long)(v14 + 1) > 1 ) break; v6 = v36; if ( *v7 != 4 ) goto LABEL_14; } v6 = v36; if ( (v36 & 0x200) == 0 ) break; a2 += v14; v37 += v14; a4 += v14; a3 = v13; } v37 = 0LL; LABEL_14: if ( (v6 & 0x1A) != 0 ) { if ( v14 == -1 ) { v21 = v6 & 0x440 | 4LL; v22 = my_filename((unsigned int)a1); v27 = *(unsigned int *)my_thread_var((unsigned int)a1, a2, v30, v31, v32, v33); v28 = 2; goto LABEL_24; } if ( (v6 & 6) != 0 ) { v21 = v6 & 0x440 | 4LL; v22 = my_filename((unsigned int)a1); v27 = *(unsigned int *)my_thread_var((unsigned int)a1, a2, v23, v24, v25, v26); v28 = 9; LABEL_24: my_error(v28, v21, v22, v27); return -1LL; } } result = -1LL; if ( v14 != -1 ) { a3 = v14; if ( (v6 & 6) == 0 ) { LABEL_20: result = 0LL; if ( (v6 & 6) == 0 ) return a3 + v37; } } return result; }
my_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x58],RCX MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x50],RSI MOV dword ptr [RBP + -0x2c],EDI MOV qword ptr [RBP + -0x40],0x0 MOV R15D,0x0 TEST R8B,0x1a JNZ 0x00130936 LEA RAX,[0x479498] MOV R15,qword ptr [RAX] LAB_00130936: OR R15,R8 CALL 0x00124050 MOV R14,RAX MOV qword ptr [RBP + -0x48],R15 LAB_00130945: MOV dword ptr [R14],0x0 MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RBP + -0x50] MOV RBX,qword ptr [RBP + -0x38] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x58] CALL 0x00124630 SUB RBX,RAX JZ 0x00130a2d MOV R12,RAX TEST R15B,0x6 SETZ R13B MOV R15D,dword ptr [R14] CALL 0x0013193e MOV dword ptr [RAX],R15D CMP R12,-0x1 SETZ AL CMP dword ptr [R14],0x0 JZ 0x00130994 OR AL,R13B JNZ 0x0013099f LAB_00130994: CALL 0x0013193e MOV dword ptr [RAX],0xaf LAB_0013099f: LEA RAX,[R12 + 0x1] CMP RAX,0x1 JA 0x001309b6 CMP dword ptr [R14],0x4 MOV R15,qword ptr [RBP + -0x48] JZ 0x00130945 JMP 0x001309de LAB_001309b6: MOV R15,qword ptr [RBP + -0x48] BT R15D,0x9 JNC 0x001309d6 ADD qword ptr [RBP + -0x50],R12 ADD qword ptr [RBP + -0x40],R12 ADD qword ptr [RBP + -0x58],R12 MOV qword ptr [RBP + -0x38],RBX JMP 0x00130945 LAB_001309d6: MOV qword ptr [RBP + -0x40],0x0 LAB_001309de: TEST R15B,0x1a JZ 0x00130a14 CMP R12,-0x1 JZ 0x00130a41 TEST R15B,0x6 JZ 0x00130a14 AND R15D,0x440 OR R15,0x4 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x001367dc MOV RBX,RAX CALL 0x0013193e MOV ECX,dword ptr [RAX] MOV EDI,0x9 JMP 0x00130a63 LAB_00130a14: MOV RAX,-0x1 CMP R12,-0x1 JZ 0x00130a77 MOV ECX,R15D MOV qword ptr [RBP + -0x38],R12 AND ECX,0x6 JNZ 0x00130a77 LAB_00130a2d: MOV RCX,qword ptr [RBP + -0x40] ADD RCX,qword ptr [RBP + -0x38] XOR EAX,EAX TEST R15B,0x6 CMOVZ RAX,RCX JMP 0x00130a77 LAB_00130a41: AND R15D,0x440 OR R15,0x4 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x001367dc MOV RBX,RAX CALL 0x0013193e MOV ECX,dword ptr [RAX] MOV EDI,0x2 LAB_00130a63: MOV RSI,R15 MOV RDX,RBX XOR EAX,EAX CALL 0x0012cce7 MOV RAX,-0x1 LAB_00130a77: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_pread(int param_1,void *param_2,size_t param_3,long param_4,ulong param_5) { int iVar1; int4 uVar2; int *piVar3; size_t sVar4; int *piVar5; int4 *puVar6; int8 uVar7; long lVar8; int8 uVar9; ulong uVar10; long local_60; void *local_58; long local_48; size_t local_40; local_48 = 0; uVar10 = 0; if ((param_5 & 0x1a) == 0) { uVar10 = my_global_flags; } uVar10 = uVar10 | param_5; piVar3 = __errno_location(); local_60 = param_4; local_58 = param_2; local_40 = param_3; do { while( true ) { *piVar3 = 0; sVar4 = pread64(param_1,local_58,local_40,local_60); if (local_40 - sVar4 == 0) goto LAB_00130a2d; iVar1 = *piVar3; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; if ((*piVar3 == 0) || (sVar4 != 0xffffffffffffffff && (uVar10 & 6) != 0)) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0xaf; } if (sVar4 + 1 < 2) break; if (((uint)uVar10 >> 9 & 1) == 0) { local_48 = 0; goto LAB_001309de; } local_58 = (void *)((long)local_58 + sVar4); local_48 = local_48 + sVar4; local_60 = local_60 + sVar4; local_40 = local_40 - sVar4; } } while (*piVar3 == 4); LAB_001309de: if ((uVar10 & 0x1a) == 0) { LAB_00130a14: lVar8 = -1; if ((sVar4 != 0xffffffffffffffff) && (local_40 = sVar4, (uVar10 & 6) == 0)) { LAB_00130a2d: lVar8 = 0; if ((uVar10 & 6) == 0) { lVar8 = local_48 + local_40; } } } else { if (sVar4 == 0xffffffffffffffff) { uVar7 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); uVar2 = *puVar6; uVar9 = 2; } else { if ((uVar10 & 6) == 0) goto LAB_00130a14; uVar7 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); uVar2 = *puVar6; uVar9 = 9; } my_error(uVar9,(uint)uVar10 & 0x440 | 4,uVar7,uVar2); lVar8 = -1; } return lVar8; }
49,162
TinyEncoder::init_params(ggml_context*)
7CodeWizard[P]stablediffusion/tae.hpp
void init_params(ggml_context* ctx) { conv_input_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, in_channels, channels); conv_input_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, channels); initial_block.init_params(ctx); conv_1_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, channels); conv_2_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, channels); conv_3_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, channels); conv_final_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, z_channels); conv_final_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, z_channels); for (int i = 0; i < num_blocks; i++) { input_blocks[i].init_params(ctx); middle_blocks[i].init_params(ctx); output_blocks[i].init_params(ctx); } }
O0
cpp
TinyEncoder::init_params(ggml_context*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rdi movslq (%rax), %r8 movslq 0x8(%rax), %r9 movl $0x1, %esi movl $0x3, %ecx movq %rcx, %rdx callq 0x11c960 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq 0x8(%rsp), %rdi movq %rax, 0x18(%rdi) addq $0x20, %rdi movq 0x18(%rsp), %rsi callq 0x6bf10 movq 0x8(%rsp), %rax movq 0x18(%rsp), %rdi movslq 0x8(%rax), %r8 movslq 0x8(%rax), %r9 movl $0x1, %esi movl $0x3, %ecx movq %rcx, %rdx callq 0x11c960 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x60(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %r8 movslq 0x8(%rax), %r9 movl $0x1, %esi movl $0x3, %ecx movq %rcx, %rdx callq 0x11c960 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x128(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %r8 movslq 0x8(%rax), %r9 movl $0x1, %esi movl $0x3, %ecx movq %rcx, %rdx callq 0x11c960 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x1f0(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %r8 movslq 0x4(%rax), %r9 movl $0x1, %esi movl $0x3, %ecx movq %rcx, %rdx callq 0x11c960 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x2b8(%rax) movq 0x18(%rsp), %rdi movslq 0x4(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x2c0(%rax) movl $0x0, 0x14(%rsp) movq 0x8(%rsp), %rcx movl 0x14(%rsp), %eax cmpl 0xc(%rcx), %eax jge 0x6bf08 movq 0x8(%rsp), %rdi addq $0x68, %rdi movslq 0x14(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi movq 0x18(%rsp), %rsi callq 0x6bf10 movq 0x8(%rsp), %rdi addq $0x130, %rdi # imm = 0x130 movslq 0x14(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi movq 0x18(%rsp), %rsi callq 0x6bf10 movq 0x8(%rsp), %rdi addq $0x1f8, %rdi # imm = 0x1F8 movslq 0x14(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi movq 0x18(%rsp), %rsi callq 0x6bf10 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x6be8a addq $0x28, %rsp retq nopl (%rax)
_ZN11TinyEncoder11init_paramsEP12ggml_context: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_10] movsxd r8, dword ptr [rax] movsxd r9, dword ptr [rax+8] mov esi, 1 mov ecx, 3 mov rdx, rcx call ggml_new_tensor_4d mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax+10h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rdi, [rsp+28h+var_20] mov [rdi+18h], rax add rdi, 20h ; ' ' mov rsi, [rsp+28h+var_10] call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) mov rax, [rsp+28h+var_20] mov rdi, [rsp+28h+var_10] movsxd r8, dword ptr [rax+8] movsxd r9, dword ptr [rax+8] mov esi, 1 mov ecx, 3 mov rdx, rcx call ggml_new_tensor_4d mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax+60h], rcx mov rdi, [rsp+28h+var_10] movsxd r8, dword ptr [rax+8] movsxd r9, dword ptr [rax+8] mov esi, 1 mov ecx, 3 mov rdx, rcx call ggml_new_tensor_4d mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax+128h], rcx mov rdi, [rsp+28h+var_10] movsxd r8, dword ptr [rax+8] movsxd r9, dword ptr [rax+8] mov esi, 1 mov ecx, 3 mov rdx, rcx call ggml_new_tensor_4d mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax+1F0h], rcx mov rdi, [rsp+28h+var_10] movsxd r8, dword ptr [rax+8] movsxd r9, dword ptr [rax+4] mov esi, 1 mov ecx, 3 mov rdx, rcx call ggml_new_tensor_4d mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax+2B8h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+4] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_20] mov [rax+2C0h], rcx mov [rsp+28h+var_14], 0 loc_6BE8A: mov rcx, [rsp+28h+var_20] mov eax, [rsp+28h+var_14] cmp eax, [rcx+0Ch] jge short loc_6BF08 mov rdi, [rsp+28h+var_20] add rdi, 68h ; 'h' movsxd rax, [rsp+28h+var_14] shl rax, 6 add rdi, rax mov rsi, [rsp+28h+var_10] call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) mov rdi, [rsp+28h+var_20] add rdi, 130h movsxd rax, [rsp+28h+var_14] shl rax, 6 add rdi, rax mov rsi, [rsp+28h+var_10] call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) mov rdi, [rsp+28h+var_20] add rdi, 1F8h movsxd rax, [rsp+28h+var_14] shl rax, 6 add rdi, rax mov rsi, [rsp+28h+var_10] call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) mov eax, [rsp+28h+var_14] add eax, 1 mov [rsp+28h+var_14], eax jmp short loc_6BE8A loc_6BF08: add rsp, 28h retn
long long TinyEncoder::init_params(int *a1, long long a2) { long long result; // rax int i; // [rsp+14h] [rbp-14h] *((_QWORD *)a1 + 2) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, *a1, a1[2]); *((_QWORD *)a1 + 3) = ggml_new_tensor_1d(a2, 0LL, a1[2]); TAEBlock::init_params(a1 + 8, a2); *((_QWORD *)a1 + 12) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[2]); *((_QWORD *)a1 + 37) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[2]); *((_QWORD *)a1 + 62) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[2]); *((_QWORD *)a1 + 87) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[1]); *((_QWORD *)a1 + 88) = ggml_new_tensor_1d(a2, 0LL, a1[1]); for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= a1[3] ) break; TAEBlock::init_params(&a1[16 * (long long)i + 26], a2); TAEBlock::init_params(&a1[16 * (long long)i + 76], a2); TAEBlock::init_params(&a1[16 * (long long)i + 126], a2); } return result; }
init_params: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x18] MOVSXD R8,dword ptr [RAX] MOVSXD R9,dword ptr [RAX + 0x8] MOV ESI,0x1 MOV ECX,0x3 MOV RDX,RCX CALL 0x0021c960 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RDI + 0x18],RAX ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0x18] CALL 0x0016bf10 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x18] MOVSXD R8,dword ptr [RAX + 0x8] MOVSXD R9,dword ptr [RAX + 0x8] MOV ESI,0x1 MOV ECX,0x3 MOV RDX,RCX CALL 0x0021c960 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x60],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD R8,dword ptr [RAX + 0x8] MOVSXD R9,dword ptr [RAX + 0x8] MOV ESI,0x1 MOV ECX,0x3 MOV RDX,RCX CALL 0x0021c960 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x128],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD R8,dword ptr [RAX + 0x8] MOVSXD R9,dword ptr [RAX + 0x8] MOV ESI,0x1 MOV ECX,0x3 MOV RDX,RCX CALL 0x0021c960 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x1f0],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD R8,dword ptr [RAX + 0x8] MOVSXD R9,dword ptr [RAX + 0x4] MOV ESI,0x1 MOV ECX,0x3 MOV RDX,RCX CALL 0x0021c960 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x2b8],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x4] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x2c0],RCX MOV dword ptr [RSP + 0x14],0x0 LAB_0016be8a: MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x14] CMP EAX,dword ptr [RCX + 0xc] JGE 0x0016bf08 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x68 MOVSXD RAX,dword ptr [RSP + 0x14] SHL RAX,0x6 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x18] CALL 0x0016bf10 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x130 MOVSXD RAX,dword ptr [RSP + 0x14] SHL RAX,0x6 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x18] CALL 0x0016bf10 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x1f8 MOVSXD RAX,dword ptr [RSP + 0x14] SHL RAX,0x6 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x18] CALL 0x0016bf10 MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x0016be8a LAB_0016bf08: ADD RSP,0x28 RET
/* TinyEncoder::init_params(ggml_context*) */ void __thiscall TinyEncoder::init_params(TinyEncoder *this,ggml_context *param_1) { int8 uVar1; int local_14; uVar1 = ggml_new_tensor_4d(param_1,1,3,3,(long)*(int *)this,(long)*(int *)(this + 8)); *(int8 *)(this + 0x10) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x18) = uVar1; TAEBlock::init_params((TAEBlock *)(this + 0x20),param_1); uVar1 = ggml_new_tensor_4d(param_1,1,3,3,(long)*(int *)(this + 8),(long)*(int *)(this + 8)); *(int8 *)(this + 0x60) = uVar1; uVar1 = ggml_new_tensor_4d(param_1,1,3,3,(long)*(int *)(this + 8),(long)*(int *)(this + 8)); *(int8 *)(this + 0x128) = uVar1; uVar1 = ggml_new_tensor_4d(param_1,1,3,3,(long)*(int *)(this + 8),(long)*(int *)(this + 8)); *(int8 *)(this + 0x1f0) = uVar1; uVar1 = ggml_new_tensor_4d(param_1,1,3,3,(long)*(int *)(this + 8),(long)*(int *)(this + 4)); *(int8 *)(this + 0x2b8) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 4)); *(int8 *)(this + 0x2c0) = uVar1; for (local_14 = 0; local_14 < *(int *)(this + 0xc); local_14 = local_14 + 1) { TAEBlock::init_params((TAEBlock *)(this + (long)local_14 * 0x40 + 0x68),param_1); TAEBlock::init_params((TAEBlock *)(this + (long)local_14 * 0x40 + 0x130),param_1); TAEBlock::init_params((TAEBlock *)(this + (long)local_14 * 0x40 + 0x1f8),param_1); } return; }
49,163
TinyEncoder::init_params(ggml_context*)
7CodeWizard[P]stablediffusion/tae.hpp
void init_params(ggml_context* ctx) { conv_input_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, in_channels, channels); conv_input_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, channels); initial_block.init_params(ctx); conv_1_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, channels); conv_2_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, channels); conv_3_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, channels); conv_final_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 3, 3, channels, z_channels); conv_final_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, z_channels); for (int i = 0; i < num_blocks; i++) { input_blocks[i].init_params(ctx); middle_blocks[i].init_params(ctx); output_blocks[i].init_params(ctx); } }
O1
cpp
TinyEncoder::init_params(ggml_context*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movslq (%rdi), %r8 movslq 0x8(%rdi), %r9 movl $0x3, %edx movl $0x3, %ecx movq %rsi, %rdi movl $0x1, %esi callq 0x8eca5 movq %rax, 0x10(%r14) movslq 0x8(%r14), %rdx movq %rbx, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x18(%r14) leaq 0x20(%r14), %rdi movq %rbx, %rsi callq 0x49e4c movslq 0x8(%r14), %r8 movl $0x3, %edx movl $0x3, %ecx movq %rbx, %rdi movl $0x1, %esi movq %r8, %r9 callq 0x8eca5 movq %rax, 0x60(%r14) movslq 0x8(%r14), %r8 movl $0x3, %edx movl $0x3, %ecx movq %rbx, %rdi movl $0x1, %esi movq %r8, %r9 callq 0x8eca5 movq %rax, 0x128(%r14) movslq 0x8(%r14), %r8 movl $0x3, %edx movl $0x3, %ecx movq %rbx, %rdi movl $0x1, %esi movq %r8, %r9 callq 0x8eca5 movq %rax, 0x1f0(%r14) movslq 0x8(%r14), %r8 movslq 0x4(%r14), %r9 movl $0x3, %edx movl $0x3, %ecx movq %rbx, %rdi movl $0x1, %esi callq 0x8eca5 movq %rax, 0x2b8(%r14) movslq 0x4(%r14), %rdx movq %rbx, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x2c0(%r14) cmpl $0x0, 0xc(%r14) jle 0x49e3f leaq 0x1f8(%r14), %r15 xorl %r12d, %r12d leaq -0x190(%r15), %rdi movq %rbx, %rsi callq 0x49e4c leaq -0xc8(%r15), %rdi movq %rbx, %rsi callq 0x49e4c movq %r15, %rdi movq %rbx, %rsi callq 0x49e4c incq %r12 movslq 0xc(%r14), %rax addq $0x40, %r15 cmpq %rax, %r12 jl 0x49e06 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN11TinyEncoder11init_paramsEP12ggml_context: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi movsxd r8, dword ptr [rdi] movsxd r9, dword ptr [rdi+8] mov edx, 3 mov ecx, 3 mov rdi, rsi mov esi, 1 call ggml_new_tensor_4d mov [r14+10h], rax movsxd rdx, dword ptr [r14+8] mov rdi, rbx xor esi, esi call ggml_new_tensor_1d mov [r14+18h], rax lea rdi, [r14+20h] mov rsi, rbx call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) movsxd r8, dword ptr [r14+8] mov edx, 3 mov ecx, 3 mov rdi, rbx mov esi, 1 mov r9, r8 call ggml_new_tensor_4d mov [r14+60h], rax movsxd r8, dword ptr [r14+8] mov edx, 3 mov ecx, 3 mov rdi, rbx mov esi, 1 mov r9, r8 call ggml_new_tensor_4d mov [r14+128h], rax movsxd r8, dword ptr [r14+8] mov edx, 3 mov ecx, 3 mov rdi, rbx mov esi, 1 mov r9, r8 call ggml_new_tensor_4d mov [r14+1F0h], rax movsxd r8, dword ptr [r14+8] movsxd r9, dword ptr [r14+4] mov edx, 3 mov ecx, 3 mov rdi, rbx mov esi, 1 call ggml_new_tensor_4d mov [r14+2B8h], rax movsxd rdx, dword ptr [r14+4] mov rdi, rbx xor esi, esi call ggml_new_tensor_1d mov [r14+2C0h], rax cmp dword ptr [r14+0Ch], 0 jle short loc_49E3F lea r15, [r14+1F8h] xor r12d, r12d loc_49E06: lea rdi, [r15-190h] mov rsi, rbx call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) lea rdi, [r15-0C8h] mov rsi, rbx call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) mov rdi, r15 mov rsi, rbx call _ZN8TAEBlock11init_paramsEP12ggml_context; TAEBlock::init_params(ggml_context *) inc r12 movsxd rax, dword ptr [r14+0Ch] add r15, 40h ; '@' cmp r12, rax jl short loc_49E06 loc_49E3F: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long TinyEncoder::init_params(int *a1, long long a2) { long long result; // rax int *v3; // r15 long long v4; // r12 *((_QWORD *)a1 + 2) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, *a1, a1[2]); *((_QWORD *)a1 + 3) = ggml_new_tensor_1d(a2, 0LL, a1[2]); TAEBlock::init_params(a1 + 8, a2); *((_QWORD *)a1 + 12) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[2]); *((_QWORD *)a1 + 37) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[2]); *((_QWORD *)a1 + 62) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[2]); *((_QWORD *)a1 + 87) = ggml_new_tensor_4d(a2, 1LL, 3LL, 3LL, a1[2], a1[1]); result = ggml_new_tensor_1d(a2, 0LL, a1[1]); *((_QWORD *)a1 + 88) = result; if ( a1[3] > 0 ) { v3 = a1 + 126; v4 = 0LL; do { TAEBlock::init_params(v3 - 100, a2); TAEBlock::init_params(v3 - 50, a2); TAEBlock::init_params(v3, a2); ++v4; result = a1[3]; v3 += 16; } while ( v4 < result ); } return result; }
49,164
my_hrtime
eloqsql/mysys/my_getsystime.c
my_hrtime_t my_hrtime() { my_hrtime_t hrtime; #if defined(_WIN32) ulonglong newtime; GetSystemTimePreciseAsFileTime((FILETIME*)&newtime); hrtime.val= (newtime - OFFSET_TO_EPOC)/10; #elif defined(HAVE_CLOCK_GETTIME) struct timespec tp; clock_gettime(CLOCK_REALTIME, &tp); hrtime.val= tp.tv_sec*1000000ULL+tp.tv_nsec/1000ULL; #else struct timeval t; /* The following loop is here because gettimeofday may fail */ while (gettimeofday(&t, NULL) != 0) {} hrtime.val= t.tv_sec*1000000ULL + t.tv_usec; #endif DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;); DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;); return hrtime; }
O3
c
my_hrtime: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp leaq -0x18(%rbp), %rbx xorl %edi, %edi movq %rbx, %rsi callq 0x28350 imulq $0xf4240, (%rbx), %rcx # imm = 0xF4240 movq 0x8(%rbx), %rax shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF mulq %rdx shrq $0x4, %rdx addq %rdx, %rcx movq %rcx, %rax addq $0x18, %rsp popq %rbx popq %rbp retq
my_hrtime: push rbp mov rbp, rsp push rbx sub rsp, 18h lea rbx, [rbp+var_18] xor edi, edi mov rsi, rbx call _clock_gettime imul rcx, [rbx], 0F4240h mov rax, [rbx+8] shr rax, 3 mov rdx, 20C49BA5E353F7CFh mul rdx shr rdx, 4 add rcx, rdx mov rax, rcx add rsp, 18h pop rbx pop rbp retn
unsigned long long my_hrtime() { long long v1; // [rsp+8h] [rbp-18h] BYREF unsigned long long v2; // [rsp+10h] [rbp-10h] clock_gettime(0LL, &v1); return v2 / 0x3E8 + 1000000 * v1; }
my_hrtime: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 LEA RBX,[RBP + -0x18] XOR EDI,EDI MOV RSI,RBX CALL 0x00128350 IMUL RCX,qword ptr [RBX],0xf4240 MOV RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV RDX,0x20c49ba5e353f7cf MUL RDX SHR RDX,0x4 ADD RCX,RDX MOV RAX,RCX ADD RSP,0x18 POP RBX POP RBP RET
long my_hrtime(void) { timespec local_20; clock_gettime(0,&local_20); return local_20.tv_sec * 1000000 + (ulong)local_20.tv_nsec / 1000; }
49,165
js_dataview_setValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_setValue(JSContext *ctx, JSValue this_obj, int argc, JSValue *argv, int class_id) { JSTypedArray *ta; JSArrayBuffer *abuf; BOOL littleEndian, is_swap; int size; uint8_t *ptr; uint64_t v64; uint32_t v; uint64_t pos; JSValue val; ta = JS_GetOpaque2(ctx, this_obj, JS_CLASS_DATAVIEW); if (!ta) return JS_EXCEPTION; size = 1 << typed_array_size_log2(class_id); if (JS_ToIndex(ctx, &pos, argv[0])) return JS_EXCEPTION; val = argv[1]; v = 0; /* avoid warning */ v64 = 0; /* avoid warning */ if (class_id <= JS_CLASS_UINT32_ARRAY) { if (JS_ToUint32(ctx, &v, val)) return JS_EXCEPTION; } else if (class_id <= JS_CLASS_BIG_UINT64_ARRAY) { if (JS_ToBigInt64(ctx, (int64_t *)&v64, val)) return JS_EXCEPTION; } else { double d; if (JS_ToFloat64(ctx, &d, val)) return JS_EXCEPTION; if (class_id == JS_CLASS_FLOAT16_ARRAY) { v = tofp16(d); } else if (class_id == JS_CLASS_FLOAT32_ARRAY) { union { float f; uint32_t i; } u; u.f = d; v = u.i; } else { JSFloat64Union u; u.d = d; v64 = u.u64; } } littleEndian = argc > 2 && JS_ToBool(ctx, argv[2]); is_swap = littleEndian ^ !is_be(); abuf = ta->buffer->u.array_buffer; if (abuf->detached) return JS_ThrowTypeErrorDetachedArrayBuffer(ctx); // order matters: this check should come before the next one if ((pos + size) > ta->length) return JS_ThrowRangeError(ctx, "out of bound"); // test262 expects a TypeError for this and V8, in its infinite wisdom, // throws a "detached array buffer" exception, but IMO that doesn't make // sense because the buffer is not in fact detached, it's still there if ((int64_t)ta->offset + ta->length > abuf->byte_length) return JS_ThrowTypeError(ctx, "out of bound"); ptr = abuf->data + ta->offset + pos; switch(class_id) { case JS_CLASS_INT8_ARRAY: case JS_CLASS_UINT8_ARRAY: *ptr = v; break; case JS_CLASS_INT16_ARRAY: case JS_CLASS_UINT16_ARRAY: case JS_CLASS_FLOAT16_ARRAY: if (is_swap) v = bswap16(v); put_u16(ptr, v); break; case JS_CLASS_INT32_ARRAY: case JS_CLASS_UINT32_ARRAY: case JS_CLASS_FLOAT32_ARRAY: if (is_swap) v = bswap32(v); put_u32(ptr, v); break; case JS_CLASS_BIG_INT64_ARRAY: case JS_CLASS_BIG_UINT64_ARRAY: case JS_CLASS_FLOAT64_ARRAY: if (is_swap) v64 = bswap64(v64); put_u64(ptr, v64); break; default: abort(); } return JS_UNDEFINED; }
O1
c
js_dataview_setValue: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r9d, %r15d movq %r8, %r13 movl %ecx, %ebp movq %rdi, %r14 movl $0x21, %ecx callq 0x275b5 movl $0x6, %ebx testq %rax, %rax je 0x83f98 movq %rax, %r12 movl %ebp, 0x1c(%rsp) movslq %r15d, %rax leaq 0x19b51(%rip), %rcx # 0x9d8df movb -0x15(%rax,%rcx), %cl movl $0x1, %ebp shll %cl, %ebp movq (%r13), %rdx movq 0x8(%r13), %rcx leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x27a6f testl %eax, %eax jne 0x83f98 movq 0x10(%r13), %rdx movq 0x18(%r13), %rcx movl $0x0, 0x4(%rsp) movq $0x0, 0x10(%rsp) cmpl $0x1b, %r15d jg 0x83df5 movq %rdx, 0x8(%rsp) cmpl $-0x9, %ecx jb 0x83de6 movq 0x8(%rsp), %rax incl (%rax) leaq 0x4(%rsp), %rsi movq %r14, %rdi callq 0x279c3 jmp 0x83e19 cmpl $0x1d, %r15d jg 0x83e50 movq %rdx, 0x8(%rsp) cmpl $-0x9, %ecx jb 0x83e0c movq 0x8(%rsp), %rax incl (%rax) leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x283d8 testl %eax, %eax jne 0x83f98 cmpl $0x3, 0x1c(%rsp) jl 0x83e8d movq 0x20(%r13), %rsi movq 0x28(%r13), %rdx movq %rsi, 0x8(%rsp) cmpl $-0x9, %edx jb 0x83e41 movq 0x8(%rsp), %rax incl (%rax) movq %r14, %rdi callq 0x22d0d testl %eax, %eax setne %dl jmp 0x83e8f leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x27681 testl %eax, %eax jne 0x83f98 cmpl $0x1f, %r15d je 0x83f39 cmpl $0x1e, %r15d jne 0x83f4a movsd 0x8(%rsp), %xmm0 callq 0x3dc9e movzwl %ax, %eax movl %eax, 0x4(%rsp) jmp 0x83e21 xorl %edx, %edx movq 0x18(%r12), %rax movq 0x30(%rax), %rsi cmpb $0x0, 0x8(%rsi) je 0x83eb4 leaq 0x1e554(%rip), %rsi # 0xa23f9 movq %r14, %rdi xorl %eax, %eax callq 0x22567 jmp 0x83f98 movq 0x20(%rsp), %rax movslq %ebp, %rcx addq %rax, %rcx movl 0x24(%r12), %edi cmpq %rdi, %rcx jbe 0x83edf leaq 0x1e888(%rip), %rsi # 0xa2758 movq %r14, %rdi xorl %eax, %eax callq 0x20add jmp 0x83f98 movl 0x20(%r12), %ecx addq %rcx, %rdi movslq (%rsi), %r8 cmpq %r8, %rdi jle 0x83ef8 leaq 0x1e862(%rip), %rsi # 0xa2758 jmp 0x83ea5 addl $-0x16, %r15d cmpl $0xa, %r15d ja 0x83fac addq 0x10(%rsi), %rcx leaq 0x19917(%rip), %rsi # 0x9d828 movslq (%rsi,%r15,4), %rdi addq %rsi, %rdi jmpq *%rdi testb %dl, %dl jne 0x83f2e movzwl 0x4(%rsp), %edx rolw $0x8, %dx movzwl %dx, %edx movl %edx, 0x4(%rsp) movzwl 0x4(%rsp), %edx movw %dx, (%rcx,%rax) jmp 0x83f93 cvtsd2ss 0x8(%rsp), %xmm0 movss %xmm0, 0x4(%rsp) jmp 0x83e21 movq 0x8(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0x83e21 testb %dl, %dl jne 0x83f6a movq 0x10(%rsp), %rdx bswapq %rdx movq %rdx, 0x10(%rsp) movq 0x10(%rsp), %rdx movq %rdx, (%rcx,%rax) jmp 0x83f93 testb %dl, %dl jne 0x83f83 movl 0x4(%rsp), %edx bswapl %edx movl %edx, 0x4(%rsp) movl 0x4(%rsp), %edx movl %edx, (%rcx,%rax) jmp 0x83f93 movb 0x4(%rsp), %dl movb %dl, (%rcx,%rax) movl $0x3, %ebx xorl %eax, %eax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xe090
js_dataview_setValue: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15d, r9d mov r13, r8 mov ebp, ecx mov r14, rdi mov ecx, 21h ; '!' call JS_GetOpaque2 mov ebx, 6 test rax, rax jz loc_83F98 mov r12, rax mov [rsp+58h+var_3C], ebp movsxd rax, r15d lea rcx, typed_array_size_log2 mov cl, [rax+rcx-15h] mov ebp, 1 shl ebp, cl mov rdx, [r13+0] mov rcx, [r13+8] lea rsi, [rsp+58h+var_38] mov rdi, r14 call JS_ToIndex test eax, eax jnz loc_83F98 mov rdx, [r13+10h] mov rcx, [r13+18h] mov [rsp+58h+var_54], 0 mov [rsp+58h+var_48], 0 cmp r15d, 1Bh jg short loc_83DF5 mov [rsp+58h+var_50], rdx cmp ecx, 0FFFFFFF7h jb short loc_83DE6 mov rax, [rsp+58h+var_50] inc dword ptr [rax] loc_83DE6: lea rsi, [rsp+58h+var_54] mov rdi, r14 call JS_ToInt32Free jmp short loc_83E19 loc_83DF5: cmp r15d, 1Dh jg short loc_83E50 mov [rsp+58h+var_50], rdx cmp ecx, 0FFFFFFF7h jb short loc_83E0C mov rax, [rsp+58h+var_50] inc dword ptr [rax] loc_83E0C: lea rsi, [rsp+58h+var_48] mov rdi, r14 call JS_ToBigInt64Free loc_83E19: test eax, eax jnz loc_83F98 loc_83E21: cmp [rsp+58h+var_3C], 3 jl short loc_83E8D mov rsi, [r13+20h] mov rdx, [r13+28h] mov [rsp+58h+var_50], rsi cmp edx, 0FFFFFFF7h jb short loc_83E41 mov rax, [rsp+58h+var_50] inc dword ptr [rax] loc_83E41: mov rdi, r14 call JS_ToBoolFree test eax, eax setnz dl jmp short loc_83E8F loc_83E50: lea rsi, [rsp+58h+var_50] mov rdi, r14 call JS_ToFloat64 test eax, eax jnz loc_83F98 cmp r15d, 1Fh jz loc_83F39 cmp r15d, 1Eh jnz loc_83F4A movsd xmm0, [rsp+58h+var_50] call tofp16 movzx eax, ax mov [rsp+58h+var_54], eax jmp short loc_83E21 loc_83E8D: xor edx, edx loc_83E8F: mov rax, [r12+18h] mov rsi, [rax+30h] cmp byte ptr [rsi+8], 0 jz short loc_83EB4 lea rsi, aArraybufferIsD; "ArrayBuffer is detached" loc_83EA5: mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp loc_83F98 loc_83EB4: mov rax, [rsp+58h+var_38] movsxd rcx, ebp add rcx, rax mov edi, [r12+24h] cmp rcx, rdi jbe short loc_83EDF lea rsi, aOutOfBound; "out of bound" mov rdi, r14 xor eax, eax call JS_ThrowRangeError jmp loc_83F98 loc_83EDF: mov ecx, [r12+20h] add rdi, rcx movsxd r8, dword ptr [rsi] cmp rdi, r8 jle short loc_83EF8 lea rsi, aOutOfBound; "out of bound" jmp short loc_83EA5 loc_83EF8: add r15d, 0FFFFFFEAh; switch 11 cases cmp r15d, 0Ah ja def_83F18; jumptable 0000000000083F18 default case add rcx, [rsi+10h] lea rsi, jpt_83F18 movsxd rdi, ds:(jpt_83F18 - 9D828h)[rsi+r15*4] add rdi, rsi jmp rdi; switch jump loc_83F1A: test dl, dl; jumptable 0000000000083F18 cases 24,25,30 jnz short loc_83F2E movzx edx, word ptr [rsp+58h+var_54] rol dx, 8 movzx edx, dx mov [rsp+58h+var_54], edx loc_83F2E: movzx edx, word ptr [rsp+58h+var_54] mov [rcx+rax], dx jmp short loc_83F93 loc_83F39: cvtsd2ss xmm0, [rsp+58h+var_50] movss [rsp+58h+var_54], xmm0 jmp loc_83E21 loc_83F4A: mov rax, [rsp+58h+var_50] mov [rsp+58h+var_48], rax jmp loc_83E21 loc_83F59: test dl, dl; jumptable 0000000000083F18 cases 28,29,32 jnz short loc_83F6A mov rdx, [rsp+58h+var_48] bswap rdx mov [rsp+58h+var_48], rdx loc_83F6A: mov rdx, [rsp+58h+var_48] mov [rcx+rax], rdx jmp short loc_83F93 loc_83F75: test dl, dl; jumptable 0000000000083F18 cases 26,27,31 jnz short loc_83F83 mov edx, [rsp+58h+var_54] bswap edx mov [rsp+58h+var_54], edx loc_83F83: mov edx, [rsp+58h+var_54] mov [rcx+rax], edx jmp short loc_83F93 loc_83F8C: mov dl, byte ptr [rsp+58h+var_54]; jumptable 0000000000083F18 cases 22,23 mov [rcx+rax], dl loc_83F93: mov ebx, 3 loc_83F98: xor eax, eax mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn def_83F18: call _abort; jumptable 0000000000083F18 default case
long long js_dataview_setValue( long long a1, long long a2, int a3, int a4, long long *a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long Opaque2; // rax double v19; // xmm4_8 double v20; // xmm5_8 long long v21; // r12 int v22; // ebp _DWORD *v23; // rdx long long v24; // rcx int v25; // eax long long v26; // rcx long long v27; // r8 long long v28; // r9 __m128 v29; // xmm4 __m128 v30; // xmm5 long long v31; // rsi long long v32; // rdx long long v33; // rdx int *v34; // rsi const char *v35; // rsi unsigned long long v36; // rcx unsigned long long v37; // rdi const char *v38; // rdi long long v39; // rcx char v41; // [rsp+0h] [rbp-58h] unsigned int v42; // [rsp+4h] [rbp-54h] BYREF _DWORD *v43; // [rsp+8h] [rbp-50h] BYREF _DWORD *v44; // [rsp+10h] [rbp-48h] BYREF int v45; // [rsp+1Ch] [rbp-3Ch] unsigned long long v46[7]; // [rsp+20h] [rbp-38h] BYREF Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x21u); if ( !Opaque2 ) return 0LL; v21 = Opaque2; v45 = a4; v22 = 1 << typed_array_size_log2[a6 - 21]; if ( (unsigned int)JS_ToIndex(a1, v46, *a5, a5[1], a7, a8, a9, a10, v19, v20, a13, a14) ) return 0LL; v23 = *((_DWORD **)a5 + 2); v24 = a5[3]; v42 = 0; v44 = 0LL; if ( a6 <= 27 ) { v43 = v23; if ( (unsigned int)v24 >= 0xFFFFFFF7 ) ++*v43; v25 = JS_ToInt32Free(a1, (int *)&v42, (unsigned long long)v23, v24); goto LABEL_11; } if ( a6 <= 29 ) { v43 = v23; if ( (unsigned int)v24 >= 0xFFFFFFF7 ) ++*v43; v25 = JS_ToBigInt64Free(a1, &v44); LABEL_11: if ( v25 ) return 0LL; goto LABEL_12; } if ( (unsigned int)JS_ToFloat64(a1, (double *)&v43, v23, v24) ) return 0LL; if ( a6 == 31 ) { a7.m128_f32[0] = *(double *)&v43; v42 = a7.m128_i32[0]; } else if ( a6 == 30 ) { a7 = (__m128)(unsigned long long)v43; v42 = (unsigned __int16)tofp16(*(double *)&v43); } else { v44 = v43; } LABEL_12: if ( v45 < 3 ) { v33 = 0LL; } else { v31 = a5[4]; v32 = a5[5]; v43 = (_DWORD *)v31; if ( (unsigned int)v32 >= 0xFFFFFFF7 ) ++*v43; LOBYTE(v33) = (unsigned int)JS_ToBoolFree(a1, v31, v32) != 0; } v34 = *(int **)(*(_QWORD *)(v21 + 24) + 48LL); if ( *((_BYTE *)v34 + 8) ) { v35 = "ArrayBuffer is detached"; LABEL_23: JS_ThrowTypeError(a1, (long long)v35, v33, v26, v27, v28, a7, a8, a9, a10, v29, v30, a13, a14, v41); return 0LL; } v36 = v46[0] + v22; v37 = *(unsigned int *)(v21 + 36); if ( v36 > v37 ) { JS_ThrowRangeError(a1, (long long)"out of bound", v33, v36, v27, v28, a7, a8, a9, a10, v29, v30, a13, a14, v41); return 0LL; } v26 = *(unsigned int *)(v21 + 32); v38 = (const char *)(v26 + v37); v27 = *v34; if ( (long long)v38 > v27 ) { v35 = "out of bound"; goto LABEL_23; } v39 = *((_QWORD *)v34 + 2) + v26; switch ( a6 ) { case 22: case 23: *(_BYTE *)(v39 + v46[0]) = v42; break; case 24: case 25: case 30: if ( !(_BYTE)v33 ) v42 = (unsigned __int16)__ROL2__(v42, 8); *(_WORD *)(v39 + v46[0]) = v42; break; case 26: case 27: case 31: if ( !(_BYTE)v33 ) v42 = _byteswap_ulong(v42); *(_DWORD *)(v39 + v46[0]) = v42; break; case 28: case 29: case 32: if ( !(_BYTE)v33 ) v44 = (_DWORD *)_byteswap_uint64((unsigned long long)v44); *(_QWORD *)(v39 + v46[0]) = v44; break; default: abort(v38, v34, v33, v39); } return 0LL; }
js_dataview_setValue: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15D,R9D MOV R13,R8 MOV EBP,ECX MOV R14,RDI MOV ECX,0x21 CALL 0x001275b5 MOV EBX,0x6 TEST RAX,RAX JZ 0x00183f98 MOV R12,RAX MOV dword ptr [RSP + 0x1c],EBP MOVSXD RAX,R15D LEA RCX,[0x19d8df] MOV CL,byte ptr [RAX + RCX*0x1 + -0x15] MOV EBP,0x1 SHL EBP,CL MOV RDX,qword ptr [R13] MOV RCX,qword ptr [R13 + 0x8] LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00127a6f TEST EAX,EAX JNZ 0x00183f98 MOV RDX,qword ptr [R13 + 0x10] MOV RCX,qword ptr [R13 + 0x18] MOV dword ptr [RSP + 0x4],0x0 MOV qword ptr [RSP + 0x10],0x0 CMP R15D,0x1b JG 0x00183df5 MOV qword ptr [RSP + 0x8],RDX CMP ECX,-0x9 JC 0x00183de6 MOV RAX,qword ptr [RSP + 0x8] INC dword ptr [RAX] LAB_00183de6: LEA RSI,[RSP + 0x4] MOV RDI,R14 CALL 0x001279c3 JMP 0x00183e19 LAB_00183df5: CMP R15D,0x1d JG 0x00183e50 MOV qword ptr [RSP + 0x8],RDX CMP ECX,-0x9 JC 0x00183e0c MOV RAX,qword ptr [RSP + 0x8] INC dword ptr [RAX] LAB_00183e0c: LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x001283d8 LAB_00183e19: TEST EAX,EAX JNZ 0x00183f98 LAB_00183e21: CMP dword ptr [RSP + 0x1c],0x3 JL 0x00183e8d MOV RSI,qword ptr [R13 + 0x20] MOV RDX,qword ptr [R13 + 0x28] MOV qword ptr [RSP + 0x8],RSI CMP EDX,-0x9 JC 0x00183e41 MOV RAX,qword ptr [RSP + 0x8] INC dword ptr [RAX] LAB_00183e41: MOV RDI,R14 CALL 0x00122d0d TEST EAX,EAX SETNZ DL JMP 0x00183e8f LAB_00183e50: LEA RSI,[RSP + 0x8] MOV RDI,R14 CALL 0x00127681 TEST EAX,EAX JNZ 0x00183f98 CMP R15D,0x1f JZ 0x00183f39 CMP R15D,0x1e JNZ 0x00183f4a MOVSD XMM0,qword ptr [RSP + 0x8] CALL 0x0013dc9e MOVZX EAX,AX MOV dword ptr [RSP + 0x4],EAX JMP 0x00183e21 LAB_00183e8d: XOR EDX,EDX LAB_00183e8f: MOV RAX,qword ptr [R12 + 0x18] MOV RSI,qword ptr [RAX + 0x30] CMP byte ptr [RSI + 0x8],0x0 JZ 0x00183eb4 LEA RSI,[0x1a23f9] LAB_00183ea5: MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 JMP 0x00183f98 LAB_00183eb4: MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,EBP ADD RCX,RAX MOV EDI,dword ptr [R12 + 0x24] CMP RCX,RDI JBE 0x00183edf LEA RSI,[0x1a2758] MOV RDI,R14 XOR EAX,EAX CALL 0x00120add JMP 0x00183f98 LAB_00183edf: MOV ECX,dword ptr [R12 + 0x20] ADD RDI,RCX MOVSXD R8,dword ptr [RSI] CMP RDI,R8 JLE 0x00183ef8 LEA RSI,[0x1a2758] JMP 0x00183ea5 LAB_00183ef8: ADD R15D,-0x16 CMP R15D,0xa JA 0x00183fac ADD RCX,qword ptr [RSI + 0x10] LEA RSI,[0x19d828] MOVSXD RDI,dword ptr [RSI + R15*0x4] ADD RDI,RSI switchD: JMP RDI caseD_18: TEST DL,DL JNZ 0x00183f2e MOVZX EDX,word ptr [RSP + 0x4] ROL DX,0x8 MOVZX EDX,DX MOV dword ptr [RSP + 0x4],EDX LAB_00183f2e: MOVZX EDX,word ptr [RSP + 0x4] MOV word ptr [RCX + RAX*0x1],DX JMP 0x00183f93 LAB_00183f39: CVTSD2SS XMM0,qword ptr [RSP + 0x8] MOVSS dword ptr [RSP + 0x4],XMM0 JMP 0x00183e21 LAB_00183f4a: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x00183e21 caseD_1c: TEST DL,DL JNZ 0x00183f6a MOV RDX,qword ptr [RSP + 0x10] BSWAP RDX MOV qword ptr [RSP + 0x10],RDX LAB_00183f6a: MOV RDX,qword ptr [RSP + 0x10] MOV qword ptr [RCX + RAX*0x1],RDX JMP 0x00183f93 caseD_1a: TEST DL,DL JNZ 0x00183f83 MOV EDX,dword ptr [RSP + 0x4] BSWAP EDX MOV dword ptr [RSP + 0x4],EDX LAB_00183f83: MOV EDX,dword ptr [RSP + 0x4] MOV dword ptr [RCX + RAX*0x1],EDX JMP 0x00183f93 caseD_16: MOV DL,byte ptr [RSP + 0x4] MOV byte ptr [RCX + RAX*0x1],DL LAB_00183f93: MOV EBX,0x3 LAB_00183f98: XOR EAX,EAX MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183fac: CALL 0x0010e090
int1 [16] js_dataview_setValue (int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5, int param_6) { byte bVar1; int *piVar2; int1 auVar3 [16]; ushort uVar4; int iVar5; long lVar6; ulong uVar7; char *pcVar8; bool bVar9; float local_54; int *local_50; int *local_48; int local_3c; long local_38; lVar6 = JS_GetOpaque2(); uVar7 = 6; if (lVar6 == 0) goto LAB_00183f98; bVar1 = "toSorted"[(long)param_6 + 6]; local_3c = param_4; iVar5 = JS_ToIndex(param_1,&local_38,*param_5,param_5[1]); if (iVar5 != 0) goto LAB_00183f98; piVar2 = (int *)param_5[2]; local_54 = 0.0; local_48 = (int *)0x0; if (param_6 < 0x1c) { if (0xfffffff6 < (uint)param_5[3]) { *piVar2 = *piVar2 + 1; } local_50 = piVar2; iVar5 = JS_ToInt32Free(param_1,&local_54); LAB_00183e19: if (iVar5 != 0) goto LAB_00183f98; } else { if (param_6 < 0x1e) { if (0xfffffff6 < (uint)param_5[3]) { *piVar2 = *piVar2 + 1; } local_50 = piVar2; iVar5 = JS_ToBigInt64Free(param_1,&local_48); goto LAB_00183e19; } iVar5 = JS_ToFloat64(param_1,&local_50); if (iVar5 != 0) goto LAB_00183f98; if (param_6 == 0x1f) { local_54 = (float)(double)local_50; } else if (param_6 == 0x1e) { uVar4 = tofp16(local_50); local_54 = (float)(uint)uVar4; } else { local_48 = local_50; } } if (local_3c < 3) { bVar9 = false; } else { local_50 = (int *)param_5[4]; if (0xfffffff6 < (uint)param_5[5]) { *local_50 = *local_50 + 1; } iVar5 = JS_ToBoolFree(param_1); bVar9 = iVar5 != 0; } piVar2 = *(int **)(*(long *)(lVar6 + 0x18) + 0x30); if ((char)piVar2[2] == '\0') { if ((ulong)*(uint *)(lVar6 + 0x24) < (ulong)((1 << (bVar1 & 0x1f)) + local_38)) { JS_ThrowRangeError(param_1,"out of bound"); goto LAB_00183f98; } if ((long)((ulong)*(uint *)(lVar6 + 0x24) + (ulong)*(uint *)(lVar6 + 0x20)) <= (long)*piVar2) { if (10 < param_6 - 0x16U) { /* WARNING: Subroutine does not return */ abort(); } lVar6 = (ulong)*(uint *)(lVar6 + 0x20) + *(long *)(piVar2 + 4); switch(param_6) { case 0x16: case 0x17: *(int1 *)(lVar6 + local_38) = local_54._0_1_; break; default: if (!bVar9) { local_54 = (float)(uint)(ushort)(local_54._0_2_ << 8 | local_54._0_2_ >> 8); } *(ushort *)(lVar6 + local_38) = local_54._0_2_; break; case 0x1a: case 0x1b: case 0x1f: if (!bVar9) { local_54 = (float)((uint)local_54 >> 0x18 | ((uint)local_54 & 0xff0000) >> 8 | ((uint)local_54 & 0xff00) << 8 | (int)local_54 << 0x18); } *(float *)(lVar6 + local_38) = local_54; break; case 0x1c: case 0x1d: case 0x20: if (!bVar9) { local_48 = (int *)((ulong)local_48 >> 0x38 | ((ulong)local_48 & 0xff000000000000) >> 0x28 | ((ulong)local_48 & 0xff0000000000) >> 0x18 | ((ulong)local_48 & 0xff00000000) >> 8 | ((ulong)local_48 & 0xff000000) << 8 | ((ulong)local_48 & 0xff0000) << 0x18 | ((ulong)local_48 & 0xff00) << 0x28 | (long)local_48 << 0x38); } *(int **)(lVar6 + local_38) = local_48; } uVar7 = 3; goto LAB_00183f98; } pcVar8 = "out of bound"; } else { pcVar8 = "ArrayBuffer is detached"; } JS_ThrowTypeError(param_1,pcVar8); LAB_00183f98: auVar3._8_8_ = 0; auVar3._0_8_ = uVar7; return auVar3 << 0x40; }
49,166
qshell_cmd_run
navaro[P]qoraal-tictactoe/src/services/engine.c
int32_t qshell_cmd_run(SVC_SHELL_IF_T *pif, char **argv, int argc) { if (argc < 2) { return SVC_SHELL_CMD_E_PARMS; } int32_t res = engine_machine_start (argv[1], pif, starter_out, true, false); switch (res) { case E_NOTFOUND: svc_shell_print(pif, SVC_SHELL_OUT_STD, "terminal failure: unable to open file \"%s\" for read.\r\n", argv[1]); break; case E_NOMEM: svc_shell_print(pif, SVC_SHELL_OUT_STD, "terminal failure: out of memory.\r\n"); break; case E_FILE: svc_shell_print(pif, SVC_SHELL_OUT_STD, "terminal failure: unable to read file \"%s\".\r\n", argv[1]); break; default: if (res != EOK) { svc_shell_print(pif, SVC_SHELL_OUT_STD, "starting \"%s\" failed with %d\r\n\r\n", argv[1], (int)res); } break; } return res == EOK ? SVC_SHELL_CMD_E_OK : res; }
O3
c
qshell_cmd_run: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0xfffffffd, %r14d # imm = 0xFFFFFFFD cmpl $0x2, %edx jge 0x1210b movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rsi, %r15 movq %rdi, %rbx movq 0x8(%rsi), %rdi leaq 0x390(%rip), %rdx # 0x124ac movq %rbx, %rsi movl $0x1, %ecx xorl %r8d, %r8d callq 0x12370 movl %eax, %r14d cmpl $0xfffff6ff, %eax # imm = 0xFFFFF6FF jg 0x1216a cmpl $0xfffff6ec, %r14d # imm = 0xFFFFF6EC je 0x1219a cmpl $0xfffff6fc, %r14d # imm = 0xFFFFF6FC jne 0x12178 movq 0x8(%r15), %rcx leaq 0x14db5(%rip), %rdx # 0x26f08 movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x17c60 movl $0xfffff6fc, %r14d # imm = 0xFFFFF6FC jmp 0x120fd cmpl $0xfffff700, %r14d # imm = 0xFFFFF700 je 0x121bf testl %r14d, %r14d je 0x120fd movq 0x8(%r15), %rcx leaq 0x14e0d(%rip), %rdx # 0x26f90 movq %rbx, %rdi movl $0x1, %esi movl %r14d, %r8d xorl %eax, %eax callq 0x17c60 jmp 0x120fd movq 0x8(%r15), %rcx leaq 0x14dbd(%rip), %rdx # 0x26f62 movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x17c60 movl $0xfffff6ec, %r14d # imm = 0xFFFFF6EC jmp 0x120fd leaq 0x14d79(%rip), %rdx # 0x26f3f movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x17c60 movl $0xfffff700, %r14d # imm = 0xFFFFF700 jmp 0x120fd
qshell_cmd_run: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14d, 0FFFFFFFDh cmp edx, 2 jge short loc_1210B loc_120FD: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_1210B: mov r15, rsi mov rbx, rdi mov rdi, [rsi+8] lea rdx, starter_out mov rsi, rbx mov ecx, 1 xor r8d, r8d call engine_machine_start mov r14d, eax cmp eax, 0FFFFF6FFh jg short loc_1216A cmp r14d, 0FFFFF6ECh jz short loc_1219A cmp r14d, 0FFFFF6FCh jnz short loc_12178 mov rcx, [r15+8] lea rdx, aTerminalFailur; "terminal failure: unable to open file "... mov rdi, rbx mov esi, 1 xor eax, eax call svc_shell_print mov r14d, 0FFFFF6FCh jmp short loc_120FD loc_1216A: cmp r14d, 0FFFFF700h jz short loc_121BF test r14d, r14d jz short loc_120FD loc_12178: mov rcx, [r15+8] lea rdx, aStartingSFaile; "starting \"%s\" failed with %d\r\n\r\n" mov rdi, rbx mov esi, 1 mov r8d, r14d xor eax, eax call svc_shell_print jmp loc_120FD loc_1219A: mov rcx, [r15+8] lea rdx, aTerminalFailur_0; "terminal failure: unable to read file "... mov rdi, rbx mov esi, 1 xor eax, eax call svc_shell_print mov r14d, 0FFFFF6ECh jmp loc_120FD loc_121BF: lea rdx, aTerminalFailur_1; "terminal failure: out of memory.\r\n" mov rdi, rbx mov esi, 1 xor eax, eax call svc_shell_print mov r14d, 0FFFFF700h jmp loc_120FD
long long qshell_cmd_run(long long a1, long long a2, int a3) { char v3; // al unsigned int v4; // r14d int v6; // eax int v7; // ecx int v8; // r8d int v9; // r9d char v10; // [rsp-8h] [rbp-20h] v10 = v3; v4 = -3; if ( a3 < 2 ) return v4; v6 = engine_machine_start(*(_QWORD *)(a2 + 8), a1, starter_out, 1LL, 0LL); v4 = v6; if ( v6 <= -2305 ) { if ( v6 == -2324 ) { svc_shell_print(a1, 1, (unsigned int)aTerminalFailur_0, *(_QWORD *)(a2 + 8), v8, v9, v10); return (unsigned int)-2324; } if ( v6 == -2308 ) { svc_shell_print(a1, 1, (unsigned int)aTerminalFailur, *(_QWORD *)(a2 + 8), v8, v9, v10); return (unsigned int)-2308; } LABEL_9: svc_shell_print(a1, 1, (unsigned int)aStartingSFaile, *(_QWORD *)(a2 + 8), v6, v9, v10); return v4; } if ( v6 == -2304 ) { svc_shell_print(a1, 1, (unsigned int)aTerminalFailur_1, v7, v8, v9, v10); return (unsigned int)-2304; } if ( v6 ) goto LABEL_9; return v4; }
qshell_cmd_run: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,0xfffffffd CMP EDX,0x2 JGE 0x0011210b LAB_001120fd: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0011210b: MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RSI + 0x8] LEA RDX,[0x1124ac] MOV RSI,RBX MOV ECX,0x1 XOR R8D,R8D CALL 0x00112370 MOV R14D,EAX CMP EAX,0xfffff6ff JG 0x0011216a CMP R14D,0xfffff6ec JZ 0x0011219a CMP R14D,0xfffff6fc JNZ 0x00112178 MOV RCX,qword ptr [R15 + 0x8] LEA RDX,[0x126f08] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00117c60 MOV R14D,0xfffff6fc JMP 0x001120fd LAB_0011216a: CMP R14D,0xfffff700 JZ 0x001121bf TEST R14D,R14D JZ 0x001120fd LAB_00112178: MOV RCX,qword ptr [R15 + 0x8] LEA RDX,[0x126f90] MOV RDI,RBX MOV ESI,0x1 MOV R8D,R14D XOR EAX,EAX CALL 0x00117c60 JMP 0x001120fd LAB_0011219a: MOV RCX,qword ptr [R15 + 0x8] LEA RDX,[0x126f62] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00117c60 MOV R14D,0xfffff6ec JMP 0x001120fd LAB_001121bf: LEA RDX,[0x126f3f] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00117c60 MOV R14D,0xfffff700 JMP 0x001120fd
int qshell_cmd_run(int8 param_1,long param_2,int param_3) { int iVar1; if (param_3 < 2) { return -3; } iVar1 = engine_machine_start(*(int8 *)(param_2 + 8),param_1,starter_out,1,0); if (iVar1 < -0x900) { if (iVar1 == -0x914) { svc_shell_print(param_1,1,s_terminal_failure__unable_to_read_00126f62, *(int8 *)(param_2 + 8)); return -0x914; } if (iVar1 == -0x904) { svc_shell_print(param_1,1,s_terminal_failure__unable_to_open_00126f08, *(int8 *)(param_2 + 8)); return -0x904; } } else { if (iVar1 == -0x900) { svc_shell_print(param_1,1,s_terminal_failure__out_of_memory__00126f3f); return -0x900; } if (iVar1 == 0) { return 0; } } svc_shell_print(param_1,1,s_starting___s__failed_with__d_00126f90,*(int8 *)(param_2 + 8), iVar1); return iVar1; }
49,167
std::pair<coro::net::send_status, std::span<char const, 18446744073709551615ul>> coro::net::tcp::client::send<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/net/tcp/client.hpp
auto send(const buffer_type& buffer) -> std::pair<send_status, std::span<const char>> { // If the user requested zero bytes, just return. if (buffer.empty()) { return {send_status::ok, std::span<const char>{buffer.data(), buffer.size()}}; } auto bytes_sent = ::send(m_socket.native_handle(), buffer.data(), buffer.size(), 0); if (bytes_sent >= 0) { // Some or all of the bytes were written. return {send_status::ok, std::span<const char>{buffer.data() + bytes_sent, buffer.size() - bytes_sent}}; } else { // Due to the error none of the bytes were written. return {static_cast<send_status>(errno), std::span<const char>{buffer.data(), buffer.size()}}; } }
O3
cpp
std::pair<coro::net::send_status, std::span<char const, 18446744073709551615ul>> coro::net::tcp::client::send<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx movq 0x8(%rdx), %rdx testq %rdx, %rdx je 0xa88d2 movl 0x28(%rsi), %edi movq (%r14), %rsi xorl %ecx, %ecx callq 0x17430 testq %rax, %rax js 0xa88db movq (%r14), %rcx addq %rax, %rcx movq 0x8(%r14), %rdx subq %rax, %rdx xorl %eax, %eax jmp 0xa88ea movq (%r14), %rcx xorl %eax, %eax xorl %edx, %edx jmp 0xa88ea callq 0x17c60 movslq (%rax), %rax movq (%r14), %rcx movq 0x8(%r14), %rdx movq %rax, (%rbx) movq %rcx, 0x8(%rbx) movq %rdx, 0x10(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_: push r14 push rbx push rax mov r14, rdx mov rbx, rdi mov rdx, [rdx+8] test rdx, rdx jz short loc_A88D2 mov edi, [rsi+28h] mov rsi, [r14] xor ecx, ecx call _send test rax, rax js short loc_A88DB mov rcx, [r14] add rcx, rax mov rdx, [r14+8] sub rdx, rax xor eax, eax jmp short loc_A88EA loc_A88D2: mov rcx, [r14] xor eax, eax xor edx, edx jmp short loc_A88EA loc_A88DB: call ___errno_location movsxd rax, dword ptr [rax] mov rcx, [r14] mov rdx, [r14+8] loc_A88EA: mov [rbx], rax mov [rbx+8], rcx mov [rbx+10h], rdx mov rax, rbx add rsp, 8 pop rbx pop r14 retn
_QWORD * ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_( _QWORD *a1, long long a2, long long *a3) { long long v5; // rdx long long v6; // rdi long long v7; // rax long long v8; // rcx long long v9; // rdx long long v10; // rax v5 = a3[1]; if ( v5 ) { v6 = *(unsigned int *)(a2 + 40); v7 = send(v6, *a3, v5, 0LL); if ( v7 < 0 ) { v10 = *(int *)__errno_location(v6); v8 = *a3; v9 = a3[1]; } else { v8 = v7 + *a3; v9 = a3[1] - v7; v10 = 0LL; } } else { v8 = *a3; v10 = 0LL; v9 = 0LL; } *a1 = v10; a1[1] = v8; a1[2] = v9; return a1; }
_ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI MOV RDX,qword ptr [RDX + 0x8] TEST RDX,RDX JZ 0x001a88d2 MOV EDI,dword ptr [RSI + 0x28] MOV RSI,qword ptr [R14] XOR ECX,ECX CALL 0x00117430 TEST RAX,RAX JS 0x001a88db MOV RCX,qword ptr [R14] ADD RCX,RAX MOV RDX,qword ptr [R14 + 0x8] SUB RDX,RAX XOR EAX,EAX JMP 0x001a88ea LAB_001a88d2: MOV RCX,qword ptr [R14] XOR EAX,EAX XOR EDX,EDX JMP 0x001a88ea LAB_001a88db: CALL 0x00117c60 MOVSXD RAX,dword ptr [RAX] MOV RCX,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_001a88ea: MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RBX + 0x10],RDX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
long * _ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_ (long *param_1,long param_2,long *param_3) { ssize_t sVar1; int *piVar2; long lVar3; long lVar4; long lVar5; if (param_3[1] == 0) { lVar4 = *param_3; lVar3 = 0; lVar5 = 0; } else { sVar1 = send(*(int *)(param_2 + 0x28),(void *)*param_3,param_3[1],0); if (sVar1 < 0) { piVar2 = __errno_location(); lVar3 = (long)*piVar2; lVar4 = *param_3; lVar5 = param_3[1]; } else { lVar4 = *param_3 + sVar1; lVar5 = param_3[1] - sVar1; lVar3 = 0; } } *param_1 = lVar3; param_1[1] = lVar4; param_1[2] = lVar5; return param_1; }
49,168
compare_bin
eloqsql/mysys/my_compare.c
static int compare_bin(const uchar *a, uint a_length, const uchar *b, uint b_length, my_bool part_key, my_bool skip_end_space) { uint length= MY_MIN(a_length,b_length); const uchar *end= a+ length; int flag; while (a < end) if ((flag= (int) *a++ - (int) *b++)) return flag; if (part_key && b_length < a_length) return 0; if (skip_end_space && a_length != b_length) { int swap= 1; /* We are using space compression. We have to check if longer key has next character < ' ', in which case it's less than the shorter key that has an implicite space afterwards. This code is identical to the one in strings/ctype-simple.c:my_strnncollsp_simple */ if (a_length < b_length) { /* put shorter key in a */ a_length= b_length; a= b; swap= -1; /* swap sign of result */ } for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') return (*a < ' ') ? -swap : swap; } return 0; } return (int) (a_length-b_length); }
O0
c
compare_bin: pushq %rbp movq %rsp, %rbp movl %r8d, -0x58(%rbp) movl %ecx, %eax movl -0x58(%rbp), %ecx movl %eax, -0x54(%rbp) movq %rdx, %rax movl -0x54(%rbp), %edx movq %rax, -0x50(%rbp) movl %esi, %eax movq -0x50(%rbp), %rsi movl %eax, -0x44(%rbp) movq %rdi, %r8 movl -0x44(%rbp), %edi movb %r9b, %al movq %r8, -0x10(%rbp) movl %edi, -0x14(%rbp) movq %rsi, -0x20(%rbp) movl %edx, -0x24(%rbp) movb %cl, -0x25(%rbp) movb %al, -0x26(%rbp) movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0x1322e70 movl -0x14(%rbp), %eax movl %eax, -0x5c(%rbp) jmp 0x1322e76 movl -0x24(%rbp), %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x1322ecf movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movzbl (%rax), %eax movq -0x20(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movzbl (%rcx), %ecx subl %ecx, %eax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax je 0x1322ecd movl -0x3c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1322fa0 jmp 0x1322e8a movsbl -0x25(%rbp), %eax cmpl $0x0, %eax je 0x1322eec movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0x1322eec movl $0x0, -0x4(%rbp) jmp 0x1322fa0 movsbl -0x26(%rbp), %eax cmpl $0x0, %eax je 0x1322f97 movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax je 0x1322f97 movl $0x1, -0x40(%rbp) movl -0x14(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0x1322f29 movl -0x24(%rbp), %eax movl %eax, -0x14(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x10(%rbp) movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movl -0x14(%rbp), %ecx addq %rcx, %rax movl -0x2c(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x1322f8e movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax je 0x1322f7e movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0x1322f70 xorl %eax, %eax subl -0x40(%rbp), %eax movl %eax, -0x60(%rbp) jmp 0x1322f76 movl -0x40(%rbp), %eax movl %eax, -0x60(%rbp) movl -0x60(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1322fa0 jmp 0x1322f80 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x1322f44 movl $0x0, -0x4(%rbp) jmp 0x1322fa0 movl -0x14(%rbp), %eax subl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
compare_bin: push rbp mov rbp, rsp mov [rbp+var_58], r8d mov eax, ecx mov ecx, [rbp+var_58] mov [rbp+var_54], eax mov rax, rdx mov edx, [rbp+var_54] mov [rbp+var_50], rax mov eax, esi mov rsi, [rbp+var_50] mov [rbp+var_44], eax mov r8, rdi mov edi, [rbp+var_44] mov al, r9b mov [rbp+var_10], r8 mov [rbp+var_14], edi mov [rbp+var_20], rsi mov [rbp+var_24], edx mov [rbp+var_25], cl mov [rbp+var_26], al mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jnb short loc_1322E70 mov eax, [rbp+var_14] mov [rbp+var_5C], eax jmp short loc_1322E76 loc_1322E70: mov eax, [rbp+var_24] mov [rbp+var_5C], eax loc_1322E76: mov eax, [rbp+var_5C] mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov ecx, [rbp+var_2C] add rax, rcx mov [rbp+var_38], rax loc_1322E8A: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_1322ECF mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] mov rdx, rcx add rdx, 1 mov [rbp+var_20], rdx movzx ecx, byte ptr [rcx] sub eax, ecx mov [rbp+var_3C], eax cmp eax, 0 jz short loc_1322ECD mov eax, [rbp+var_3C] mov [rbp+var_4], eax jmp loc_1322FA0 loc_1322ECD: jmp short loc_1322E8A loc_1322ECF: movsx eax, [rbp+var_25] cmp eax, 0 jz short loc_1322EEC mov eax, [rbp+var_24] cmp eax, [rbp+var_14] jnb short loc_1322EEC mov [rbp+var_4], 0 jmp loc_1322FA0 loc_1322EEC: movsx eax, [rbp+var_26] cmp eax, 0 jz loc_1322F97 mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jz loc_1322F97 mov [rbp+var_40], 1 mov eax, [rbp+var_14] cmp eax, [rbp+var_24] jnb short loc_1322F29 mov eax, [rbp+var_24] mov [rbp+var_14], eax mov rax, [rbp+var_20] mov [rbp+var_10], rax mov [rbp+var_40], 0FFFFFFFFh loc_1322F29: mov rax, [rbp+var_10] mov ecx, [rbp+var_14] add rax, rcx mov ecx, [rbp+var_2C] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_38], rax loc_1322F44: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_1322F8E mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_1322F7E mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_1322F70 xor eax, eax sub eax, [rbp+var_40] mov [rbp+var_60], eax jmp short loc_1322F76 loc_1322F70: mov eax, [rbp+var_40] mov [rbp+var_60], eax loc_1322F76: mov eax, [rbp+var_60] mov [rbp+var_4], eax jmp short loc_1322FA0 loc_1322F7E: jmp short $+2 loc_1322F80: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_1322F44 loc_1322F8E: mov [rbp+var_4], 0 jmp short loc_1322FA0 loc_1322F97: mov eax, [rbp+var_14] sub eax, [rbp+var_24] mov [rbp+var_4], eax loc_1322FA0: mov eax, [rbp+var_4] pop rbp retn
long long compare_bin( unsigned __int8 *a1, unsigned int a2, unsigned __int8 *a3, unsigned int a4, char a5, char a6) { unsigned __int8 *v6; // rax unsigned __int8 *v7; // rcx unsigned int v10; // [rsp+4h] [rbp-5Ch] unsigned int v11; // [rsp+20h] [rbp-40h] unsigned __int8 *v12; // [rsp+28h] [rbp-38h] unsigned int v15; // [rsp+4Ch] [rbp-14h] unsigned __int8 *v16; // [rsp+50h] [rbp-10h] v16 = a1; v15 = a2; if ( a2 >= a4 ) v10 = a4; else v10 = a2; while ( v16 < &a1[v10] ) { v6 = v16++; v7 = a3++; if ( *v6 != *v7 ) return (unsigned int)(*v6 - *v7); } if ( a5 && a4 < a2 ) { return 0; } else if ( !a6 || a2 == a4 ) { return a2 - a4; } else { v11 = 1; if ( a2 < a4 ) { v15 = a4; v16 = a3; v11 = -1; } v12 = &v16[v15 - v10]; while ( 1 ) { if ( v16 >= v12 ) return 0; if ( *v16 != 32 ) break; ++v16; } if ( *v16 >= 0x20u ) return v11; else return -v11; } }
operator!=: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x01322ec0 XOR AL,0xff AND AL,0x1 ADD RSP,0x10 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* bool std::TEMPNAMEPLACEHOLDERVALUE(std::move_iterator<Pool<trx_t, TrxFactory, TrxPoolLock>**> const&, std::move_iterator<Pool<trx_t, TrxFactory, TrxPoolLock>**> const&) */ bool std::operator!=(move_iterator *param_1,move_iterator *param_2) { bool bVar1; bVar1 = operator==(param_1,param_2); return (bool)((bVar1 ^ 0xffU) & 1); }
49,169
my_uca_charcmp_onelevel
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp_onelevel(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2, uint level) { size_t length1, length2; const uint16 *weight1= my_char_weight_addr(&cs->uca->level[level], wc1); const uint16 *weight2= my_char_weight_addr(&cs->uca->level[level], wc2); if (!weight1 || !weight2) return wc1 != wc2; /* Quickly compare first weights */ if (weight1[0] != weight2[0]) return 1; /* Thoroughly compare all weights */ length1= cs->uca->level[level].lengths[wc1 >> MY_UCA_PSHIFT]; length2= cs->uca->level[level].lengths[wc2 >> MY_UCA_PSHIFT]; if (length1 > length2) return memcmp((const void*)weight1, (const void*)weight2, length2*2) ? 1: weight1[length2]; if (length1 < length2) return memcmp((const void*)weight1, (const void*)weight2, length1*2) ? 1 : weight2[length1]; return memcmp((const void*)weight1, (const void*)weight2, length1*2); }
O0
c
my_uca_charcmp_onelevel: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi movl -0x24(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdi movq -0x18(%rbp), %rax movl %eax, %esi callq 0xa1640 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi movl -0x24(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdi movq -0x20(%rbp), %rax movl %eax, %esi callq 0xa1640 movq %rax, -0x48(%rbp) cmpq $0x0, -0x40(%rbp) je 0xa1507 cmpq $0x0, -0x48(%rbp) jne 0xa151f movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0xa1628 movq -0x40(%rbp), %rax movzwl (%rax), %eax movq -0x48(%rbp), %rcx movzwl (%rcx), %ecx cmpl %ecx, %eax je 0xa153d movl $0x1, -0x4(%rbp) jmp 0xa1628 movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx shrq $0x8, %rcx movzbl (%rax,%rcx), %eax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq -0x20(%rbp), %rcx shrq $0x8, %rcx movzbl (%rax,%rcx), %eax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jbe 0xa15cd movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x38(%rbp), %rdx shlq %rdx callq 0x37b30 cmpl $0x0, %eax je 0xa15b6 movl $0x1, %eax movl %eax, -0x4c(%rbp) jmp 0xa15c5 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rcx movzwl (%rax,%rcx,2), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xa1628 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0xa1611 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x30(%rbp), %rdx shlq %rdx callq 0x37b30 cmpl $0x0, %eax je 0xa15fa movl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0xa1609 movq -0x48(%rbp), %rax movq -0x30(%rbp), %rcx movzwl (%rax,%rcx,2), %eax movl %eax, -0x50(%rbp) movl -0x50(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xa1628 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x30(%rbp), %rdx shlq %rdx callq 0x37b30 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_charcmp_onelevel: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov rax, [rbp+var_10] mov rdi, [rax+60h] mov eax, [rbp+var_24] imul rax, 38h ; '8' add rdi, rax mov rax, [rbp+var_18] mov esi, eax call my_char_weight_addr mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rdi, [rax+60h] mov eax, [rbp+var_24] imul rax, 38h ; '8' add rdi, rax mov rax, [rbp+var_20] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax cmp [rbp+var_40], 0 jz short loc_A1507 cmp [rbp+var_48], 0 jnz short loc_A151F loc_A1507: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_A1628 loc_A151F: mov rax, [rbp+var_40] movzx eax, word ptr [rax] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx] cmp eax, ecx jz short loc_A153D mov [rbp+var_4], 1 jmp loc_A1628 loc_A153D: mov rax, [rbp+var_10] mov rax, [rax+60h] mov ecx, [rbp+var_24] imul rcx, 38h ; '8' add rax, rcx mov rax, [rax+8] mov rcx, [rbp+var_18] shr rcx, 8 movzx eax, byte ptr [rax+rcx] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+60h] mov ecx, [rbp+var_24] imul rcx, 38h ; '8' add rax, rcx mov rax, [rax+8] mov rcx, [rbp+var_20] shr rcx, 8 movzx eax, byte ptr [rax+rcx] mov [rbp+var_38], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jbe short loc_A15CD mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_38] shl rdx, 1 call _memcmp cmp eax, 0 jz short loc_A15B6 mov eax, 1 mov [rbp+var_4C], eax jmp short loc_A15C5 loc_A15B6: mov rax, [rbp+var_40] mov rcx, [rbp+var_38] movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4C], eax loc_A15C5: mov eax, [rbp+var_4C] mov [rbp+var_4], eax jmp short loc_A1628 loc_A15CD: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb short loc_A1611 mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_30] shl rdx, 1 call _memcmp cmp eax, 0 jz short loc_A15FA mov eax, 1 mov [rbp+var_50], eax jmp short loc_A1609 loc_A15FA: mov rax, [rbp+var_48] mov rcx, [rbp+var_30] movzx eax, word ptr [rax+rcx*2] mov [rbp+var_50], eax loc_A1609: mov eax, [rbp+var_50] mov [rbp+var_4], eax jmp short loc_A1628 loc_A1611: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_30] shl rdx, 1 call _memcmp mov [rbp+var_4], eax loc_A1628: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_uca_charcmp_onelevel(long long a1, unsigned long long a2, unsigned long long a3, unsigned int a4) { unsigned __int16 *v7; // [rsp+8h] [rbp-48h] unsigned __int16 *v8; // [rsp+10h] [rbp-40h] unsigned long long v9; // [rsp+18h] [rbp-38h] unsigned long long v10; // [rsp+20h] [rbp-30h] v8 = (unsigned __int16 *)my_char_weight_addr(56LL * a4 + *(_QWORD *)(a1 + 96), (unsigned int)a2); v7 = (unsigned __int16 *)my_char_weight_addr(56LL * a4 + *(_QWORD *)(a1 + 96), (unsigned int)a3); if ( v8 && v7 ) { if ( *v8 == *v7 ) { v10 = *(unsigned __int8 *)(*(_QWORD *)(56LL * a4 + *(_QWORD *)(a1 + 96) + 8) + (a2 >> 8)); v9 = *(unsigned __int8 *)(*(_QWORD *)(56LL * a4 + *(_QWORD *)(a1 + 96) + 8) + (a3 >> 8)); if ( v10 <= v9 ) { if ( v10 >= v9 ) { return (unsigned int)memcmp(v8, v7, 2 * v10); } else if ( !(unsigned int)memcmp(v8, v7, 2 * v10) ) { return v7[v10]; } else { return 1; } } else if ( !(unsigned int)memcmp(v8, v7, 2 * v9) ) { return v8[v9]; } else { return 1; } } else { return 1; } } else { return a2 != a3; } }
my_uca_charcmp_onelevel: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] MOV EAX,dword ptr [RBP + -0x24] IMUL RAX,RAX,0x38 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV ESI,EAX CALL 0x001a1640 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] MOV EAX,dword ptr [RBP + -0x24] IMUL RAX,RAX,0x38 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x20] MOV ESI,EAX CALL 0x001a1640 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x40],0x0 JZ 0x001a1507 CMP qword ptr [RBP + -0x48],0x0 JNZ 0x001a151f LAB_001a1507: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x001a1628 LAB_001a151f: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX] CMP EAX,ECX JZ 0x001a153d MOV dword ptr [RBP + -0x4],0x1 JMP 0x001a1628 LAB_001a153d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x8 MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] SHR RCX,0x8 MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JBE 0x001a15cd MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x38] SHL RDX,0x1 CALL 0x00137b30 CMP EAX,0x0 JZ 0x001a15b6 MOV EAX,0x1 MOV dword ptr [RBP + -0x4c],EAX JMP 0x001a15c5 LAB_001a15b6: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4c],EAX LAB_001a15c5: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4],EAX JMP 0x001a1628 LAB_001a15cd: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x001a1611 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x30] SHL RDX,0x1 CALL 0x00137b30 CMP EAX,0x0 JZ 0x001a15fa MOV EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x001a1609 LAB_001a15fa: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x50],EAX LAB_001a1609: MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4],EAX JMP 0x001a1628 LAB_001a1611: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x30] SHL RDX,0x1 CALL 0x00137b30 MOV dword ptr [RBP + -0x4],EAX LAB_001a1628: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
uint my_uca_charcmp_onelevel(long param_1,ulong param_2,ulong param_3,uint param_4) { int iVar1; short *__s1; short *__s2; ulong uVar2; ulong uVar3; uint local_58; uint local_54; uint local_c; __s1 = (short *)my_char_weight_addr(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38, param_2 & 0xffffffff); __s2 = (short *)my_char_weight_addr(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38, param_3 & 0xffffffff); if ((__s1 == (short *)0x0) || (__s2 == (short *)0x0)) { local_c = (uint)(param_2 != param_3); } else if (*__s1 == *__s2) { uVar2 = (ulong)*(byte *)(*(long *)(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38 + 8) + (param_2 >> 8)); uVar3 = (ulong)*(byte *)(*(long *)(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38 + 8) + (param_3 >> 8)); if (uVar3 < uVar2) { iVar1 = memcmp(__s1,__s2,uVar3 << 1); if (iVar1 == 0) { local_54 = (uint)(ushort)__s1[uVar3]; } else { local_54 = 1; } local_c = local_54; } else if (uVar2 < uVar3) { iVar1 = memcmp(__s1,__s2,uVar2 << 1); if (iVar1 == 0) { local_58 = (uint)(ushort)__s2[uVar2]; } else { local_58 = 1; } local_c = local_58; } else { local_c = memcmp(__s1,__s2,uVar2 << 1); } } else { local_c = 1; } return local_c; }
49,170
expand_tilde
eloqsql/mysys/mf_pack.c
static char * expand_tilde(char **path) { if (path[0][0] == FN_LIBCHAR) return home_dir; /* ~/ expanded to home */ #ifdef HAVE_GETPWNAM { char *str,save; struct passwd *user_entry; if (!(str=strchr(*path,FN_LIBCHAR))) str=strend(*path); save= *str; *str= '\0'; user_entry=getpwnam(*path); *str=save; endpwent(); if (user_entry) { *path=str; return user_entry->pw_dir; } } #endif return (char *) 0; }
O0
c
expand_tilde: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x77a4e leaq 0x380cd6(%rip), %rax # 0x3f8718 movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0x77acf movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x2f, %esi callq 0x28110 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x77a79 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0xd6070 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x28280 movq %rax, -0x28(%rbp) movb -0x19(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, (%rax) callq 0x283b0 cmpq $0x0, -0x28(%rbp) je 0x77ac7 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x77acf movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
expand_tilde: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_77A4E lea rax, home_dir mov rax, [rax] mov [rbp+var_8], rax jmp loc_77ACF loc_77A4E: mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 2Fh ; '/' call _strchr mov [rbp+var_18], rax cmp rax, 0 jnz short loc_77A79 mov rax, [rbp+var_10] mov rdi, [rax] call strend mov [rbp+var_18], rax loc_77A79: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_19], al mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rdi, [rax] call _getpwnam mov [rbp+var_28], rax mov cl, [rbp+var_19] mov rax, [rbp+var_18] mov [rax], cl call _endpwent cmp [rbp+var_28], 0 jz short loc_77AC7 mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_28] mov rax, [rax+20h] mov [rbp+var_8], rax jmp short loc_77ACF loc_77AC7: mov [rbp+var_8], 0 loc_77ACF: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long expand_tilde(char **a1) { long long v2; // [rsp+8h] [rbp-28h] char v3; // [rsp+17h] [rbp-19h] char *v4; // [rsp+18h] [rbp-18h] if ( **a1 == 47 ) return home_dir; v4 = (char *)strchr(*a1, 47LL); if ( !v4 ) v4 = (char *)strend(*a1); v3 = *v4; *v4 = 0; v2 = getpwnam(*a1); *v4 = v3; endpwent(); if ( !v2 ) return 0LL; *a1 = v4; return *(_QWORD *)(v2 + 32); }
expand_tilde: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x00177a4e LEA RAX,[0x4f8718] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00177acf LAB_00177a4e: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x2f CALL 0x00128110 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00177a79 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001d6070 MOV qword ptr [RBP + -0x18],RAX LAB_00177a79: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00128280 MOV qword ptr [RBP + -0x28],RAX MOV CL,byte ptr [RBP + -0x19] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL CALL 0x001283b0 CMP qword ptr [RBP + -0x28],0x0 JZ 0x00177ac7 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x00177acf LAB_00177ac7: MOV qword ptr [RBP + -0x8],0x0 LAB_00177acf: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * expand_tilde(int8 *param_1) { char cVar1; passwd *ppVar2; char *local_20; char *local_10; if (*(char *)*param_1 == '/') { local_10 = home_dir; } else { local_20 = strchr((char *)*param_1,0x2f); if (local_20 == (char *)0x0) { local_20 = (char *)strend(*param_1); } cVar1 = *local_20; *local_20 = '\0'; ppVar2 = getpwnam((char *)*param_1); *local_20 = cVar1; endpwent(); if (ppVar2 == (passwd *)0x0) { local_10 = (char *)0x0; } else { *param_1 = local_20; local_10 = ppVar2->pw_dir; } } return local_10; }
49,171
pfs_start_table_io_wait_v1
eloqsql/storage/perfschema/pfs.cc
PSI_table_locker* pfs_start_table_io_wait_v1(PSI_table_locker_state *state, PSI_table *table, PSI_table_io_operation op, uint index, const char *src_file, uint src_line) { assert(static_cast<int> (op) >= 0); assert(static_cast<uint> (op) < array_elements(table_io_operation_map)); assert(state != NULL); PFS_table *pfs_table= reinterpret_cast<PFS_table*> (table); assert(pfs_table != NULL); assert(pfs_table->m_share != NULL); if (! pfs_table->m_io_enabled) return NULL; PFS_thread *pfs_thread= my_thread_get_THR_PFS(); uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) { if (pfs_thread == NULL) return NULL; if (! pfs_thread->m_enabled) return NULL; state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread); flags= STATE_FLAG_THREAD; if (pfs_table->m_io_timed) { timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer); state->m_timer_start= timer_start; flags|= STATE_FLAG_TIMED; } if (flag_events_waits_current) { if (unlikely(pfs_thread->m_events_waits_current >= & pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE])) { locker_lost++; return NULL; } PFS_events_waits *wait= pfs_thread->m_events_waits_current; state->m_wait= wait; flags|= STATE_FLAG_EVENT; PFS_events_waits *parent_event= wait - 1; wait->m_event_type= EVENT_TYPE_WAIT; wait->m_nesting_event_id= parent_event->m_event_id; wait->m_nesting_event_type= parent_event->m_event_type; PFS_table_share *share= pfs_table->m_share; wait->m_thread_internal_id= pfs_thread->m_thread_internal_id; wait->m_class= &global_table_io_class; wait->m_timer_start= timer_start; wait->m_timer_end= 0; wait->m_object_instance_addr= pfs_table->m_identity; wait->m_event_id= pfs_thread->m_event_id++; wait->m_end_event_id= 0; wait->m_operation= table_io_operation_map[static_cast<int> (op)]; wait->m_flags= 0; wait->m_object_type= share->get_object_type(); wait->m_weak_table_share= share; wait->m_weak_version= share->get_version(); wait->m_index= index; wait->m_source_file= src_file; wait->m_source_line= src_line; wait->m_wait_class= WAIT_CLASS_TABLE; pfs_thread->m_events_waits_current++; } } else { if (pfs_table->m_io_timed) { timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer); state->m_timer_start= timer_start; flags= STATE_FLAG_TIMED; } else { /* TODO: consider a shortcut here */ flags= 0; } } state->m_flags= flags; state->m_table= table; state->m_io_operation= op; state->m_index= index; return reinterpret_cast<PSI_table_locker*> (state); }
O0
cpp
pfs_start_table_io_wait_v1: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl %ecx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax testb $0x1, (%rax) jne 0x4f2bc movq $0x0, -0x8(%rbp) jmp 0x4f5af callq 0x4d760 movq %rax, -0x40(%rbp) movq $0x0, -0x50(%rbp) leaq 0x3bcd6c(%rip), %rax # 0x40c040 testb $0x1, (%rax) je 0x4f53c cmpq $0x0, -0x40(%rbp) jne 0x4f2f1 movq $0x0, -0x8(%rbp) jmp 0x4f5af movq -0x40(%rbp), %rax testb $0x1, 0x7e0(%rax) jne 0x4f30b movq $0x0, -0x8(%rbp) jmp 0x4f5af movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movl $0x2, -0x44(%rbp) movq -0x38(%rbp), %rax testb $0x1, 0x2(%rax) je 0x4f357 leaq 0x1c408d(%rip), %rax # 0x2133bc movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0x28, %rsi callq 0x4ada0 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movl -0x44(%rbp), %eax orl $0x1, %eax movl %eax, -0x44(%rbp) leaq 0x3bcbe2(%rip), %rax # 0x40bf40 testb $0x1, (%rax) je 0x4f53a movq -0x40(%rbp), %rax movq 0x7f0(%rax), %rax movq -0x40(%rbp), %rcx addq $0x878, %rcx # imm = 0x878 addq $0x420, %rcx # imm = 0x420 cmpq %rcx, %rax setae %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x4f3b9 leaq 0x3bcfed(%rip), %rax # 0x40c388 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3bcfdf(%rip), %rax # 0x40c388 movq %rcx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x4f5af movq -0x40(%rbp), %rax movq 0x7f0(%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movl -0x44(%rbp), %eax orl $0x4, %eax movl %eax, -0x44(%rbp) movq -0x58(%rbp), %rax addq $-0xb0, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movl $0x4, 0x18(%rax) movq -0x60(%rbp), %rax movq 0x8(%rax), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x60(%rbp), %rax movl 0x18(%rax), %ecx movq -0x58(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x38(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x68(%rbp) movq -0x40(%rbp), %rax movq 0x850(%rax), %rcx movq -0x58(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rax leaq 0x3bd543(%rip), %rcx # 0x40c980 movq %rcx, 0x30(%rax) movq -0x50(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x58(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x38(%rbp), %rax movq 0x28(%rax), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x40(%rbp), %rax movq 0x7f8(%rax), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, 0x7f8(%rax) movq -0x58(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x58(%rbp), %rax movq $0x0, 0x10(%rax) movslq -0x1c(%rbp), %rcx leaq 0x1c3f6c(%rip), %rax # 0x213410 movl (%rax,%rcx,4), %ecx movq -0x58(%rbp), %rax movl %ecx, 0x90(%rax) movq -0x58(%rbp), %rax movq $0x0, 0xa8(%rax) movq -0x68(%rbp), %rdi callq 0x56440 movl %eax, %ecx movq -0x58(%rbp), %rax movl %ecx, 0x5c(%rax) movq -0x68(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x68(%rbp), %rdi callq 0x56460 movl %eax, %ecx movq -0x58(%rbp), %rax movl %ecx, 0x80(%rax) movl -0x20(%rbp), %ecx movq -0x58(%rbp), %rax movl %ecx, 0xa0(%rax) movq -0x28(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x48(%rax) movl -0x2c(%rbp), %ecx movq -0x58(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x58(%rbp), %rax movl $0x4, 0x58(%rax) movq -0x40(%rbp), %rax movq 0x7f0(%rax), %rcx addq $0xb0, %rcx movq %rcx, 0x7f0(%rax) jmp 0x4f57e movq -0x38(%rbp), %rax testb $0x1, 0x2(%rax) je 0x4f575 leaq 0x1c3e6f(%rip), %rax # 0x2133bc movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0x28, %rsi callq 0x4ada0 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movl $0x1, -0x44(%rbp) jmp 0x4f57c movl $0x0, -0x44(%rbp) jmp 0x4f57e movl -0x44(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x20(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x38(%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopl (%rax)
pfs_start_table_io_wait_v1: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_20], ecx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d mov rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_38] test byte ptr [rax], 1 jnz short loc_4F2BC mov [rbp+var_8], 0 jmp loc_4F5AF loc_4F2BC: call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void) mov [rbp+var_40], rax mov [rbp+var_50], 0 lea rax, flag_thread_instrumentation test byte ptr [rax], 1 jz loc_4F53C cmp [rbp+var_40], 0 jnz short loc_4F2F1 mov [rbp+var_8], 0 jmp loc_4F5AF loc_4F2F1: mov rax, [rbp+var_40] test byte ptr [rax+7E0h], 1 jnz short loc_4F30B mov [rbp+var_8], 0 jmp loc_4F5AF loc_4F30B: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+18h], rcx mov [rbp+var_44], 2 mov rax, [rbp+var_38] test byte ptr [rax+2], 1 jz short loc_4F357 lea rax, wait_timer mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 28h ; '(' call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void)) mov [rbp+var_50], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_10] mov [rax+20h], rcx mov eax, [rbp+var_44] or eax, 1 mov [rbp+var_44], eax loc_4F357: lea rax, flag_events_waits_current test byte ptr [rax], 1 jz loc_4F53A mov rax, [rbp+var_40] mov rax, [rax+7F0h] mov rcx, [rbp+var_40] add rcx, 878h add rcx, 420h cmp rax, rcx setnb al and al, 1 movzx eax, al cmp eax, 0 jz short loc_4F3B9 lea rax, locker_lost mov rcx, [rax] add rcx, 1 lea rax, locker_lost mov [rax], rcx mov [rbp+var_8], 0 jmp loc_4F5AF loc_4F3B9: mov rax, [rbp+var_40] mov rax, [rax+7F0h] mov [rbp+var_58], rax mov rcx, [rbp+var_58] mov rax, [rbp+var_10] mov [rax+30h], rcx mov eax, [rbp+var_44] or eax, 4 mov [rbp+var_44], eax mov rax, [rbp+var_58] add rax, 0FFFFFFFFFFFFFF50h mov [rbp+var_60], rax mov rax, [rbp+var_58] mov dword ptr [rax+18h], 4 mov rax, [rbp+var_60] mov rcx, [rax+8] mov rax, [rbp+var_58] mov [rax+20h], rcx mov rax, [rbp+var_60] mov ecx, [rax+18h] mov rax, [rbp+var_58] mov [rax+28h], ecx mov rax, [rbp+var_38] mov rax, [rax+20h] mov [rbp+var_68], rax mov rax, [rbp+var_40] mov rcx, [rax+850h] mov rax, [rbp+var_58] mov [rax], rcx mov rax, [rbp+var_58] lea rcx, global_table_io_class mov [rax+30h], rcx mov rcx, [rbp+var_50] mov rax, [rbp+var_58] mov [rax+38h], rcx mov rax, [rbp+var_58] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_38] mov rcx, [rax+28h] mov rax, [rbp+var_58] mov [rax+88h], rcx mov rax, [rbp+var_40] mov rcx, [rax+7F8h] mov rdx, rcx add rdx, 1 mov [rax+7F8h], rdx mov rax, [rbp+var_58] mov [rax+8], rcx mov rax, [rbp+var_58] mov qword ptr [rax+10h], 0 movsxd rcx, [rbp+var_1C] lea rax, _ZL22table_io_operation_map; table_io_operation_map mov ecx, [rax+rcx*4] mov rax, [rbp+var_58] mov [rax+90h], ecx mov rax, [rbp+var_58] mov qword ptr [rax+0A8h], 0 mov rdi, [rbp+var_68]; this call _ZN15PFS_table_share15get_object_typeEv; PFS_table_share::get_object_type(void) mov ecx, eax mov rax, [rbp+var_58] mov [rax+5Ch], ecx mov rcx, [rbp+var_68] mov rax, [rbp+var_58] mov [rax+60h], rcx mov rdi, [rbp+var_68]; this call _ZN15PFS_table_share11get_versionEv; PFS_table_share::get_version(void) mov ecx, eax mov rax, [rbp+var_58] mov [rax+80h], ecx mov ecx, [rbp+var_20] mov rax, [rbp+var_58] mov [rax+0A0h], ecx mov rcx, [rbp+var_28] mov rax, [rbp+var_58] mov [rax+48h], rcx mov ecx, [rbp+var_2C] mov rax, [rbp+var_58] mov [rax+50h], ecx mov rax, [rbp+var_58] mov dword ptr [rax+58h], 4 mov rax, [rbp+var_40] mov rcx, [rax+7F0h] add rcx, 0B0h mov [rax+7F0h], rcx loc_4F53A: jmp short loc_4F57E loc_4F53C: mov rax, [rbp+var_38] test byte ptr [rax+2], 1 jz short loc_4F575 lea rax, wait_timer mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 28h ; '(' call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void)) mov [rbp+var_50], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_10] mov [rax+20h], rcx mov [rbp+var_44], 1 jmp short loc_4F57C loc_4F575: mov [rbp+var_44], 0 loc_4F57C: jmp short $+2 loc_4F57E: mov ecx, [rbp+var_44] mov rax, [rbp+var_10] mov [rax], ecx mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+8], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax+4], ecx mov ecx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+38h], ecx mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_4F5AF: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long pfs_start_table_io_wait_v1(long long a1, long long a2, int a3, int a4, long long a5, int a6) { long long v6; // rcx PFS_table_share *v8; // [rsp+8h] [rbp-68h] long long v9; // [rsp+18h] [rbp-58h] unsigned long long timer_raw_value_and_function; // [rsp+20h] [rbp-50h] int v11; // [rsp+2Ch] [rbp-44h] long long THR_PFS; // [rsp+30h] [rbp-40h] if ( (*(_BYTE *)a2 & 1) != 0 ) { THR_PFS = my_thread_get_THR_PFS(); timer_raw_value_and_function = 0LL; if ( (flag_thread_instrumentation & 1) != 0 ) { if ( !THR_PFS ) return 0LL; if ( (*(_BYTE *)(THR_PFS + 2016) & 1) == 0 ) return 0LL; *(_QWORD *)(a1 + 24) = THR_PFS; v11 = 2; if ( (*(_BYTE *)(a2 + 2) & 1) != 0 ) { timer_raw_value_and_function = get_timer_raw_value_and_function( (unsigned int)wait_timer, (unsigned long long (**)(void))(a1 + 40)); *(_QWORD *)(a1 + 32) = timer_raw_value_and_function; v11 = 3; } if ( (flag_events_waits_current & 1) != 0 ) { if ( *(_QWORD *)(THR_PFS + 2032) >= (unsigned long long)(THR_PFS + 3224) ) { ++locker_lost; return 0LL; } v9 = *(_QWORD *)(THR_PFS + 2032); *(_QWORD *)(a1 + 48) = v9; v11 |= 4u; *(_DWORD *)(v9 + 24) = 4; *(_QWORD *)(v9 + 32) = *(_QWORD *)(v9 - 176 + 8); *(_DWORD *)(v9 + 40) = *(_DWORD *)(v9 - 176 + 24); v8 = *(PFS_table_share **)(a2 + 32); *(_QWORD *)v9 = *(_QWORD *)(THR_PFS + 2128); *(_QWORD *)(v9 + 48) = global_table_io_class; *(_QWORD *)(v9 + 56) = timer_raw_value_and_function; *(_QWORD *)(v9 + 64) = 0LL; *(_QWORD *)(v9 + 136) = *(_QWORD *)(a2 + 40); v6 = *(_QWORD *)(THR_PFS + 2040); *(_QWORD *)(THR_PFS + 2040) = v6 + 1; *(_QWORD *)(v9 + 8) = v6; *(_QWORD *)(v9 + 16) = 0LL; *(_DWORD *)(v9 + 144) = table_io_operation_map[a3]; *(_QWORD *)(v9 + 168) = 0LL; *(_DWORD *)(v9 + 92) = PFS_table_share::get_object_type(v8); *(_QWORD *)(v9 + 96) = v8; *(_DWORD *)(v9 + 128) = PFS_table_share::get_version(v8); *(_DWORD *)(v9 + 160) = a4; *(_QWORD *)(v9 + 72) = a5; *(_DWORD *)(v9 + 80) = a6; *(_DWORD *)(v9 + 88) = 4; *(_QWORD *)(THR_PFS + 2032) += 176LL; } } else if ( (*(_BYTE *)(a2 + 2) & 1) != 0 ) { *(_QWORD *)(a1 + 32) = get_timer_raw_value_and_function( (unsigned int)wait_timer, (unsigned long long (**)(void))(a1 + 40)); v11 = 1; } else { v11 = 0; } *(_DWORD *)a1 = v11; *(_QWORD *)(a1 + 8) = a2; *(_DWORD *)(a1 + 4) = a3; *(_DWORD *)(a1 + 56) = a4; return a1; } return 0LL; }
pfs_start_table_io_wait_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x20],ECX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX],0x1 JNZ 0x0014f2bc MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014f5af LAB_0014f2bc: CALL 0x0014d760 MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x50],0x0 LEA RAX,[0x50c040] TEST byte ptr [RAX],0x1 JZ 0x0014f53c CMP qword ptr [RBP + -0x40],0x0 JNZ 0x0014f2f1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014f5af LAB_0014f2f1: MOV RAX,qword ptr [RBP + -0x40] TEST byte ptr [RAX + 0x7e0],0x1 JNZ 0x0014f30b MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014f5af LAB_0014f30b: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RBP + -0x44],0x2 MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX + 0x2],0x1 JZ 0x0014f357 LEA RAX,[0x3133bc] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 CALL 0x0014ada0 MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV EAX,dword ptr [RBP + -0x44] OR EAX,0x1 MOV dword ptr [RBP + -0x44],EAX LAB_0014f357: LEA RAX,[0x50bf40] TEST byte ptr [RAX],0x1 JZ 0x0014f53a MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x7f0] MOV RCX,qword ptr [RBP + -0x40] ADD RCX,0x878 ADD RCX,0x420 CMP RAX,RCX SETNC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0014f3b9 LEA RAX,[0x50c388] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x50c388] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014f5af LAB_0014f3b9: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x7f0] MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV EAX,dword ptr [RBP + -0x44] OR EAX,0x4 MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,-0xb0 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x18],0x4 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x850] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[0x50c980] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x7f8] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RAX + 0x7f8],RDX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x10],0x0 MOVSXD RCX,dword ptr [RBP + -0x1c] LEA RAX,[0x313410] MOV ECX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x90],ECX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0xa8],0x0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x00156440 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x5c],ECX MOV RCX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x60],RCX MOV RDI,qword ptr [RBP + -0x68] CALL 0x00156460 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x80],ECX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0xa0],ECX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x48],RCX MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX + 0x58],0x4 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x7f0] ADD RCX,0xb0 MOV qword ptr [RAX + 0x7f0],RCX LAB_0014f53a: JMP 0x0014f57e LAB_0014f53c: MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX + 0x2],0x1 JZ 0x0014f575 LEA RAX,[0x3133bc] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 CALL 0x0014ada0 MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV dword ptr [RBP + -0x44],0x1 JMP 0x0014f57c LAB_0014f575: MOV dword ptr [RBP + -0x44],0x0 LAB_0014f57c: JMP 0x0014f57e LAB_0014f57e: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x38],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0014f5af: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
uint * pfs_start_table_io_wait_v1 (uint *param_1,byte *param_2,uint param_3,uint param_4,int8 param_5, int4 param_6) { int8 *puVar1; PFS_table_share *this; long lVar2; int4 uVar3; long lVar4; int8 uVar5; bool bVar6; int8 local_58; uint local_4c; if ((*param_2 & 1) == 0) { return (uint *)0x0; } lVar4 = my_thread_get_THR_PFS(); local_58 = 0; if ((flag_thread_instrumentation & 1) == 0) { bVar6 = (param_2[2] & 1) != 0; if (bVar6) { uVar5 = get_timer_raw_value_and_function(wait_timer,param_1 + 10); *(int8 *)(param_1 + 8) = uVar5; } local_4c = (uint)bVar6; } else { if (lVar4 == 0) { return (uint *)0x0; } if ((*(byte *)(lVar4 + 0x7e0) & 1) == 0) { return (uint *)0x0; } *(long *)(param_1 + 6) = lVar4; local_4c = 2; if ((param_2[2] & 1) != 0) { local_58 = get_timer_raw_value_and_function(wait_timer,param_1 + 10); *(int8 *)(param_1 + 8) = local_58; local_4c = 3; } if ((flag_events_waits_current & 1) != 0) { if (lVar4 + 0xc98U <= *(ulong *)(lVar4 + 0x7f0)) { locker_lost = locker_lost + 1; return (uint *)0x0; } puVar1 = *(int8 **)(lVar4 + 0x7f0); *(int8 **)(param_1 + 0xc) = puVar1; local_4c = local_4c | 4; *(int4 *)(puVar1 + 3) = 4; puVar1[4] = puVar1[-0x15]; *(int4 *)(puVar1 + 5) = *(int4 *)(puVar1 + -0x13); this = *(PFS_table_share **)(param_2 + 0x20); *puVar1 = *(int8 *)(lVar4 + 0x850); puVar1[6] = global_table_io_class; puVar1[7] = local_58; puVar1[8] = 0; puVar1[0x11] = *(int8 *)(param_2 + 0x28); lVar2 = *(long *)(lVar4 + 0x7f8); *(long *)(lVar4 + 0x7f8) = lVar2 + 1; puVar1[1] = lVar2; puVar1[2] = 0; *(int4 *)(puVar1 + 0x12) = *(int4 *)(table_io_operation_map + (long)(int)param_3 * 4); puVar1[0x15] = 0; uVar3 = PFS_table_share::get_object_type(this); *(int4 *)((long)puVar1 + 0x5c) = uVar3; puVar1[0xc] = this; uVar3 = PFS_table_share::get_version(this); *(int4 *)(puVar1 + 0x10) = uVar3; *(uint *)(puVar1 + 0x14) = param_4; puVar1[9] = param_5; *(int4 *)(puVar1 + 10) = param_6; *(int4 *)(puVar1 + 0xb) = 4; *(long *)(lVar4 + 0x7f0) = *(long *)(lVar4 + 0x7f0) + 0xb0; } } *param_1 = local_4c; *(byte **)(param_1 + 2) = param_2; param_1[1] = param_3; param_1[0xe] = param_4; return param_1; }
49,172
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()); } }
O0
cpp
minja::Value::for_each(std::function<void (minja::Value&)> const&) const: subq $0x1e8, %rsp # imm = 0x1E8 movq %rdi, 0x1e0(%rsp) movq %rsi, 0x1d8(%rsp) movq 0x1e0(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0xa2830 testb $0x1, %al jne 0xdb41f jmp 0xdb47d movl $0x10, %edi callq 0x50540 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x28(%rsp) leaq 0xdcf1e(%rip), %rsi # 0x1b8359 callq 0x50340 jmp 0xdb442 movq 0x28(%rsp), %rdi movq 0x15bb62(%rip), %rsi # 0x236fb0 movq 0x15bb23(%rip), %rdx # 0x236f78 callq 0x508f0 movq 0x28(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) callq 0x50c40 jmp 0xdb8dc movq 0x30(%rsp), %rdi addq $0x10, %rdi callq 0xa11a0 testb $0x1, %al jne 0xdb494 jmp 0xdb52d movq 0x30(%rsp), %rdi addq $0x10, %rdi callq 0xa29c0 movq %rax, 0x1c0(%rsp) movq 0x1c0(%rsp), %rdi callq 0xcc5f0 movq %rax, 0x1b8(%rsp) movq 0x1c0(%rsp), %rdi callq 0xcc410 movq %rax, 0x1b0(%rsp) leaq 0x1b8(%rsp), %rdi leaq 0x1b0(%rsp), %rsi callq 0xda7d0 testb $0x1, %al jne 0xdb4ef jmp 0xdb528 leaq 0x1b8(%rsp), %rdi callq 0xcc9c0 movq %rax, 0x1a8(%rsp) movq 0x1d8(%rsp), %rdi movq 0x1a8(%rsp), %rsi callq 0xdbd10 leaq 0x1b8(%rsp), %rdi callq 0xdab30 jmp 0xdb4d4 jmp 0xdb8d4 movq 0x30(%rsp), %rdi addq $0x20, %rdi callq 0xa11c0 testb $0x1, %al jne 0xdb544 jmp 0xdb62c movq 0x30(%rsp), %rdi addq $0x20, %rdi callq 0xc7670 movq %rax, 0x1a0(%rsp) movq 0x1a0(%rsp), %rdi callq 0xa2a20 movq %rax, 0x198(%rsp) movq 0x1a0(%rsp), %rdi callq 0xa2a90 movq %rax, 0x190(%rsp) leaq 0x198(%rsp), %rdi leaq 0x190(%rsp), %rsi callq 0xa2a50 testb $0x1, %al jne 0xdb5a2 jmp 0xdb627 leaq 0x198(%rsp), %rdi callq 0xcb0f0 movq %rax, 0x188(%rsp) movq 0x188(%rsp), %rsi leaq 0x138(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xc7150 movq 0x20(%rsp), %rsi movq 0x1d8(%rsp), %rdi callq 0xdbd10 jmp 0xdb5e5 leaq 0x138(%rsp), %rdi callq 0xa0a10 leaq 0x198(%rsp), %rdi callq 0xa2e30 jmp 0xdb584 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0x138(%rsp), %rdi callq 0xa0a10 jmp 0xdb8dc jmp 0xdb8d2 movq 0x30(%rsp), %rdi callq 0xa2e70 testb $0x1, %al jne 0xdb63f jmp 0xdb7f0 movq 0x30(%rsp), %rsi addq $0x40, %rsi leaq 0x110(%rsp), %rdi callq 0xa5d60 leaq 0x110(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x130(%rsp), %rdi callq 0x506e0 movq %rax, 0x108(%rsp) movq 0x130(%rsp), %rdi callq 0x507a0 movq %rax, 0x100(%rsp) leaq 0x108(%rsp), %rdi leaq 0x100(%rsp), %rsi callq 0x88410 testb $0x1, %al jne 0xdb6ba leaq 0x110(%rsp), %rdi callq 0x510d0 jmp 0xdb7eb leaq 0x108(%rsp), %rdi callq 0x88450 movb (%rax), %al movb %al, 0xff(%rsp) movsbl 0xff(%rsp), %eax movl %eax, 0x14(%rsp) leaq 0x87(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x50d70 movl 0x14(%rsp), %edx movq 0x18(%rsp), %rcx leaq 0x88(%rsp), %rdi movl $0x1, %esi callq 0x6f120 jmp 0xdb70b leaq 0xa8(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xab1b0 jmp 0xdb722 leaq 0x88(%rsp), %rdi callq 0x510d0 leaq 0x87(%rsp), %rdi callq 0x510b0 movq 0x1d8(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0xdbd10 jmp 0xdb753 leaq 0xa8(%rsp), %rdi callq 0xa0a10 leaq 0x108(%rsp), %rdi callq 0x885f0 jmp 0xdb68f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) jmp 0xdb7a9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0x88(%rsp), %rdi callq 0x510d0 leaq 0x87(%rsp), %rdi callq 0x510b0 jmp 0xdb7d9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0xa8(%rsp), %rdi callq 0xa0a10 leaq 0x110(%rsp), %rdi callq 0x510d0 jmp 0xdb8dc jmp 0xdb8d0 movb $0x1, 0x3f(%rsp) movl $0x10, %edi callq 0x50540 movq 0x30(%rsp), %rsi movq %rax, 0x8(%rsp) leaq 0x40(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xa10d0 jmp 0xdb81c leaq 0xde680(%rip), %rsi # 0x1b9ea3 leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0x63460 jmp 0xdb834 movq 0x8(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x50390 jmp 0xdb845 movq 0x8(%rsp), %rdi movb $0x0, 0x3f(%rsp) movq 0x15b75a(%rip), %rsi # 0x236fb0 movq 0x15b71b(%rip), %rdx # 0x236f78 callq 0x508f0 jmp 0xdb8e9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) jmp 0xdb8bb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) jmp 0xdb8b1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1d0(%rsp) movl %eax, 0x1cc(%rsp) leaq 0x60(%rsp), %rdi callq 0x510d0 leaq 0x40(%rsp), %rdi callq 0x510d0 testb $0x1, 0x3f(%rsp) jne 0xdb8c4 jmp 0xdb8ce movq 0x8(%rsp), %rdi callq 0x50c40 jmp 0xdb8dc jmp 0xdb8d2 jmp 0xdb8d4 addq $0x1e8, %rsp # imm = 0x1E8 retq movq 0x1d0(%rsp), %rdi callq 0x50940 nopl (%rax)
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE: sub rsp, 1E8h mov [rsp+1E8h+var_8], rdi mov [rsp+1E8h+var_10], rsi mov rdi, [rsp+1E8h+var_8]; this mov [rsp+1E8h+var_1B8], rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, 1 jnz short loc_DB41F jmp short loc_DB47D loc_DB41F: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+1E8h+var_1C0], rax lea rsi, aUndefinedValue; "Undefined value or reference" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_DB442: mov rdi, [rsp+1E8h+var_1C0]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+1E8h+var_1C0]; void * mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax call ___cxa_free_exception jmp loc_DB8DC loc_DB47D: mov rdi, [rsp+1E8h+var_1B8] add rdi, 10h call _ZNKSt12__shared_ptrISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_DB494 jmp loc_DB52D loc_DB494: mov rdi, [rsp+1E8h+var_1B8] add rdi, 10h call _ZNKSt19__shared_ptr_accessISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov [rsp+1E8h+var_28], rax mov rdi, [rsp+1E8h+var_28] call _ZNSt6vectorIN5minja5ValueESaIS1_EE5beginEv; std::vector<minja::Value>::begin(void) mov [rsp+1E8h+var_30], rax mov rdi, [rsp+1E8h+var_28] call _ZNSt6vectorIN5minja5ValueESaIS1_EE3endEv; std::vector<minja::Value>::end(void) mov [rsp+1E8h+var_38], rax loc_DB4D4: lea rdi, [rsp+1E8h+var_30] lea rsi, [rsp+1E8h+var_38] call _ZN9__gnu_cxxneIPN5minja5ValueESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<minja::Value *,std::vector<minja::Value>>(__gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>> const&,__gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>> const&) test al, 1 jnz short loc_DB4EF jmp short loc_DB528 loc_DB4EF: lea rdi, [rsp+1E8h+var_30] call _ZNK9__gnu_cxx17__normal_iteratorIPN5minja5ValueESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator*(void) mov [rsp+1E8h+var_40], rax mov rdi, [rsp+1E8h+var_10] mov rsi, [rsp+1E8h+var_40] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) lea rdi, [rsp+1E8h+var_30] call _ZN9__gnu_cxx17__normal_iteratorIPN5minja5ValueESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator++(void) jmp short loc_DB4D4 loc_DB528: jmp loc_DB8D4 loc_DB52D: mov rdi, [rsp+1E8h+var_1B8] add rdi, 20h ; ' ' call _ZNKSt12__shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_DB544 jmp loc_DB62C loc_DB544: mov rdi, [rsp+1E8h+var_1B8] add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov [rsp+1E8h+var_48], rax mov rdi, [rsp+1E8h+var_48] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void) mov [rsp+1E8h+var_50], rax mov rdi, [rsp+1E8h+var_48] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void) mov [rsp+1E8h+var_58], rax loc_DB584: lea rdi, [rsp+1E8h+var_50] lea rsi, [rsp+1E8h+var_58] call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&) test al, 1 jnz short loc_DB5A2 jmp loc_DB627 loc_DB5A2: lea rdi, [rsp+1E8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator*(void) mov [rsp+1E8h+var_60], rax mov rsi, [rsp+1E8h+var_60] lea rdi, [rsp+1E8h+var_B0] mov [rsp+1E8h+var_1C8], rdi 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 rsi, [rsp+1E8h+var_1C8] mov rdi, [rsp+1E8h+var_10] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) jmp short $+2 loc_DB5E5: lea rdi, [rsp+1E8h+var_B0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+1E8h+var_50] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void) jmp short loc_DB584 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_B0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp loc_DB8DC loc_DB627: jmp loc_DB8D2 loc_DB62C: mov rdi, [rsp+1E8h+var_1B8]; this call _ZNK5minja5Value9is_stringEv; minja::Value::is_string(void) test al, 1 jnz short loc_DB63F jmp loc_DB7F0 loc_DB63F: mov rsi, [rsp+1E8h+var_1B8] add rsi, 40h ; '@'; __int64 lea rdi, [rsp+1E8h+var_D8]; void * call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3getIS9_S9_EEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS0_6detail12priority_tagILj4EEEEEEv lea rax, [rsp+1E8h+var_D8] mov [rsp+1E8h+var_B8], rax mov rdi, [rsp+1E8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+1E8h+var_E0], rax mov rdi, [rsp+1E8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+1E8h+var_E8], rax loc_DB68F: lea rdi, [rsp+1E8h+var_E0] lea rsi, [rsp+1E8h+var_E8] call _ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<char *,std::string>(__gnu_cxx::__normal_iterator<char *,std::string> const&,__gnu_cxx::__normal_iterator<char *,std::string> const&) test al, 1 jnz short loc_DB6BA lea rdi, [rsp+1E8h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_DB7EB loc_DB6BA: lea rdi, [rsp+1E8h+var_E0] call _ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char *,std::string>::operator*(void) mov al, [rax] mov [rsp+1E8h+var_E9], al movsx eax, [rsp+1E8h+var_E9] mov [rsp+1E8h+var_1D4], eax lea rdi, [rsp+1E8h+var_161] mov [rsp+1E8h+var_1D0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov edx, [rsp+1E8h+var_1D4] mov rcx, [rsp+1E8h+var_1D0] lea rdi, [rsp+1E8h+var_160] mov esi, 1 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&) jmp short $+2 loc_DB70B: lea rdi, [rsp+1E8h+var_140] lea rsi, [rsp+1E8h+var_160] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) jmp short $+2 loc_DB722: lea rdi, [rsp+1E8h+var_160]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1E8h+var_161] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+1E8h+var_10] lea rsi, [rsp+1E8h+var_140] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) jmp short $+2 loc_DB753: lea rdi, [rsp+1E8h+var_140]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+1E8h+var_E0] call _ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char *,std::string>::operator++(void) jmp loc_DB68F mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax jmp short loc_DB7A9 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_160]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DB7A9: lea rdi, [rsp+1E8h+var_161] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_DB7D9 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_140]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_DB7D9: lea rdi, [rsp+1E8h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_DB8DC loc_DB7EB: jmp loc_DB8D0 loc_DB7F0: mov [rsp+1E8h+var_1A9], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+1E8h+var_1B8] mov [rsp+1E8h+var_1E0], rax lea rdi, [rsp+1E8h+var_1A8] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_DB81C: lea rsi, aValueIsNotIter; "Value is not iterable: " lea rdi, [rsp+1E8h+var_188] lea rdx, [rsp+1E8h+var_1A8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_DB834: mov rdi, [rsp+1E8h+var_1E0] lea rsi, [rsp+1E8h+var_188] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_DB845: mov rdi, [rsp+1E8h+var_1E0]; void * mov [rsp+1E8h+var_1A9], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_DB8E9 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax jmp short loc_DB8BB mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax jmp short loc_DB8B1 mov rcx, rax mov eax, edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_1C], eax lea rdi, [rsp+1E8h+var_188]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DB8B1: lea rdi, [rsp+1E8h+var_1A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_DB8BB: test [rsp+1E8h+var_1A9], 1 jnz short loc_DB8C4 jmp short loc_DB8CE loc_DB8C4: mov rdi, [rsp+1E8h+var_1E0]; void * call ___cxa_free_exception loc_DB8CE: jmp short loc_DB8DC loc_DB8D0: jmp short $+2 loc_DB8D2: jmp short $+2 loc_DB8D4: add rsp, 1E8h retn loc_DB8DC: mov rdi, [rsp+1E8h+var_18] call __Unwind_Resume loc_DB8E9: nop dword ptr [rax+00000000h]
void minja::Value::for_each(minja::Value *a1, long long a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // rdx void *v7; // [rsp+8h] [rbp-1E0h] char v8; // [rsp+14h] [rbp-1D4h] std::runtime_error *exception; // [rsp+28h] [rbp-1C0h] _BYTE v10[32]; // [rsp+40h] [rbp-1A8h] BYREF _BYTE v11[39]; // [rsp+60h] [rbp-188h] BYREF char v12; // [rsp+87h] [rbp-161h] BYREF _BYTE v13[32]; // [rsp+88h] [rbp-160h] BYREF _BYTE v14[87]; // [rsp+A8h] [rbp-140h] BYREF char v15; // [rsp+FFh] [rbp-E9h] long long v16; // [rsp+100h] [rbp-E8h] BYREF long long v17; // [rsp+108h] [rbp-E0h] BYREF _BYTE v18[32]; // [rsp+110h] [rbp-D8h] BYREF _BYTE *v19; // [rsp+130h] [rbp-B8h] _BYTE v20[80]; // [rsp+138h] [rbp-B0h] BYREF _BYTE *v21; // [rsp+188h] [rbp-60h] long long v22; // [rsp+190h] [rbp-58h] BYREF long long v23; // [rsp+198h] [rbp-50h] BYREF long long v24; // [rsp+1A0h] [rbp-48h] long long v25; // [rsp+1A8h] [rbp-40h] long long v26; // [rsp+1B0h] [rbp-38h] BYREF long long v27; // [rsp+1B8h] [rbp-30h] BYREF long long v28; // [rsp+1C0h] [rbp-28h] long long v29; // [rsp+1D8h] [rbp-10h] minja::Value *v30; // [rsp+1E0h] [rbp-8h] v30 = a1; v29 = a2; if ( (minja::Value::is_null(a1) & 1) != 0 ) { 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 ( std::__shared_ptr<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)a1 + 2) ) { v28 = std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*((long long)a1 + 16); v27 = std::vector<minja::Value>::begin(v28); v26 = std::vector<minja::Value>::end(v28); while ( __gnu_cxx::operator!=<minja::Value *,std::vector<minja::Value>>((long long)&v27, (long long)&v26) ) { v25 = __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator*((long long)&v27); std::function<void ()(minja::Value &)>::operator()(v29, v25); __gnu_cxx::__normal_iterator<minja::Value *,std::vector<minja::Value>>::operator++(&v27); } } else if ( std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)a1 + 4) ) { v24 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*((long long)a1 + 32); v23 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(v24); v22 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(v24); while ( __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>( (long long)&v23, (long long)&v22) ) { v21 = (_BYTE *)__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator*((long long)&v23); minja::Value::Value((long long)v20, v21); std::function<void ()(minja::Value &)>::operator()(v29, v20); minja::Value::~Value((minja::Value *)v20); __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&v23); } } else { if ( !minja::Value::is_string(a1) ) { v7 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Value is not iterable: ", (long long)v10); std::runtime_error::runtime_error(v7, v11); __cxa_throw( v7, (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>::get<std::string,std::string>( v18, (long long)a1 + 64, v2, v3, v4, v5); v19 = v18; v17 = std::string::begin(v18); v16 = std::string::end(v19); while ( __gnu_cxx::operator!=<char *,std::string>((long long)&v17, (long long)&v16) ) { v15 = *(_BYTE *)__gnu_cxx::__normal_iterator<char *,std::string>::operator*((long long)&v17); v8 = v15; std::allocator<char>::allocator(&v12, &v16, v6); std::string::basic_string<std::allocator<char>>((long long)v13, 1LL, v8, (long long)&v12); minja::Value::Value((long long)v14, (long long)v13); std::string::~string(v13); std::allocator<char>::~allocator(&v12); std::function<void ()(minja::Value &)>::operator()(v29, v14); minja::Value::~Value((minja::Value *)v14); __gnu_cxx::__normal_iterator<char *,std::string>::operator++(&v17); } std::string::~string(v18); } }
for_each: SUB RSP,0x1e8 MOV qword ptr [RSP + 0x1e0],RDI MOV qword ptr [RSP + 0x1d8],RSI MOV RDI,qword ptr [RSP + 0x1e0] MOV qword ptr [RSP + 0x30],RDI CALL 0x001a2830 TEST AL,0x1 JNZ 0x001db41f JMP 0x001db47d LAB_001db41f: MOV EDI,0x10 CALL 0x00150540 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX LAB_001db434: LEA RSI,[0x2b8359] CALL 0x00150340 LAB_001db440: JMP 0x001db442 LAB_001db442: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [0x00336fb0] MOV RDX,qword ptr [0x00336f78] CALL 0x001508f0 LAB_001db47d: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x10 CALL 0x001a11a0 TEST AL,0x1 JNZ 0x001db494 JMP 0x001db52d LAB_001db494: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x10 CALL 0x001a29c0 MOV qword ptr [RSP + 0x1c0],RAX MOV RDI,qword ptr [RSP + 0x1c0] CALL 0x001cc5f0 MOV qword ptr [RSP + 0x1b8],RAX MOV RDI,qword ptr [RSP + 0x1c0] CALL 0x001cc410 MOV qword ptr [RSP + 0x1b0],RAX LAB_001db4d4: LEA RDI,[RSP + 0x1b8] LEA RSI,[RSP + 0x1b0] CALL 0x001da7d0 TEST AL,0x1 JNZ 0x001db4ef JMP 0x001db528 LAB_001db4ef: LEA RDI,[RSP + 0x1b8] CALL 0x001cc9c0 MOV qword ptr [RSP + 0x1a8],RAX MOV RDI,qword ptr [RSP + 0x1d8] MOV RSI,qword ptr [RSP + 0x1a8] CALL 0x001dbd10 LEA RDI,[RSP + 0x1b8] CALL 0x001dab30 JMP 0x001db4d4 LAB_001db528: JMP 0x001db8d4 LAB_001db52d: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x20 CALL 0x001a11c0 TEST AL,0x1 JNZ 0x001db544 JMP 0x001db62c LAB_001db544: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x20 CALL 0x001c7670 MOV qword ptr [RSP + 0x1a0],RAX MOV RDI,qword ptr [RSP + 0x1a0] CALL 0x001a2a20 MOV qword ptr [RSP + 0x198],RAX MOV RDI,qword ptr [RSP + 0x1a0] CALL 0x001a2a90 MOV qword ptr [RSP + 0x190],RAX LAB_001db584: LEA RDI,[RSP + 0x198] LEA RSI,[RSP + 0x190] CALL 0x001a2a50 TEST AL,0x1 JNZ 0x001db5a2 JMP 0x001db627 LAB_001db5a2: LEA RDI,[RSP + 0x198] CALL 0x001cb0f0 MOV qword ptr [RSP + 0x188],RAX MOV RSI,qword ptr [RSP + 0x188] LEA RDI,[RSP + 0x138] MOV qword ptr [RSP + 0x20],RDI CALL 0x001c7150 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x1d8] LAB_001db5de: CALL 0x001dbd10 LAB_001db5e3: JMP 0x001db5e5 LAB_001db5e5: LEA RDI,[RSP + 0x138] CALL 0x001a0a10 LEA RDI,[RSP + 0x198] CALL 0x001a2e30 JMP 0x001db584 LAB_001db627: JMP 0x001db8d2 LAB_001db62c: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001a2e70 TEST AL,0x1 JNZ 0x001db63f JMP 0x001db7f0 LAB_001db63f: MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x40 LEA RDI,[RSP + 0x110] CALL 0x001a5d60 LEA RAX,[RSP + 0x110] MOV qword ptr [RSP + 0x130],RAX MOV RDI,qword ptr [RSP + 0x130] CALL 0x001506e0 MOV qword ptr [RSP + 0x108],RAX MOV RDI,qword ptr [RSP + 0x130] CALL 0x001507a0 MOV qword ptr [RSP + 0x100],RAX LAB_001db68f: LEA RDI,[RSP + 0x108] LEA RSI,[RSP + 0x100] CALL 0x00188410 TEST AL,0x1 JNZ 0x001db6ba LEA RDI,[RSP + 0x110] CALL 0x001510d0 JMP 0x001db7eb LAB_001db6ba: LEA RDI,[RSP + 0x108] CALL 0x00188450 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0xff],AL MOVSX EAX,byte ptr [RSP + 0xff] MOV dword ptr [RSP + 0x14],EAX LEA RDI,[RSP + 0x87] MOV qword ptr [RSP + 0x18],RDI CALL 0x00150d70 MOV EDX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x18] LAB_001db6f7: LEA RDI,[RSP + 0x88] MOV ESI,0x1 CALL 0x0016f120 JMP 0x001db70b LAB_001db70b: LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0x88] CALL 0x001ab1b0 JMP 0x001db722 LAB_001db722: LEA RDI,[RSP + 0x88] CALL 0x001510d0 LEA RDI,[RSP + 0x87] CALL 0x001510b0 MOV RDI,qword ptr [RSP + 0x1d8] LAB_001db744: LEA RSI,[RSP + 0xa8] CALL 0x001dbd10 LAB_001db751: JMP 0x001db753 LAB_001db753: LEA RDI,[RSP + 0xa8] CALL 0x001a0a10 LEA RDI,[RSP + 0x108] CALL 0x001885f0 JMP 0x001db68f LAB_001db7eb: JMP 0x001db8d0 LAB_001db7f0: MOV byte ptr [RSP + 0x3f],0x1 MOV EDI,0x10 CALL 0x00150540 MOV RSI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX LAB_001db809: LEA RDI,[RSP + 0x40] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001a10d0 JMP 0x001db81c LAB_001db81c: LEA RSI,[0x2b9ea3] LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x40] CALL 0x00163460 JMP 0x001db834 LAB_001db834: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x60] CALL 0x00150390 JMP 0x001db845 LAB_001db845: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x3f],0x0 MOV RSI,qword ptr [0x00336fb0] MOV RDX,qword ptr [0x00336f78] CALL 0x001508f0 LAB_001db8d0: JMP 0x001db8d2 LAB_001db8d2: JMP 0x001db8d4 LAB_001db8d4: ADD RSP,0x1e8 RET
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */ void __thiscall minja::Value::for_each(Value *this,function *param_1) { char cVar1; bool bVar2; ulong uVar3; char *pcVar4; runtime_error *prVar5; int1 local_1a8 [32]; string local_188 [39]; allocator local_161; string local_160 [32]; Value local_140 [87]; char local_e9; int8 local_e8; int8 local_e0; string local_d8 [32]; string *local_b8; Value local_b0 [80]; basic_json *local_60; int8 local_58; int8 local_50; vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>> *local_48; Value *local_40; int8 local_38; int8 local_30; vector<minja::Value,std::allocator<minja::Value>> *local_28; function *local_10; Value *local_8; local_10 = param_1; local_8 = this; uVar3 = is_null(this); if ((uVar3 & 1) != 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001db434 to 001db43f has its CatchHandler @ 001db45a */ std::runtime_error::runtime_error(prVar5,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00336fb0,PTR__runtime_error_00336f78); } bVar2 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)(this + 0x10)); if (bVar2) { local_28 = (vector<minja::Value,std::allocator<minja::Value>> *) std:: __shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator*((__shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x10)); local_30 = std::vector<minja::Value,std::allocator<minja::Value>>::begin(local_28); local_38 = std::vector<minja::Value,std::allocator<minja::Value>>::end(local_28); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_30,(__normal_iterator *)&local_38), bVar2) { local_40 = (Value *)__gnu_cxx:: __normal_iterator<minja::Value*,std::vector<minja::Value,std::allocator<minja::Value>>> ::operator*((__normal_iterator<minja::Value*,std::vector<minja::Value,std::allocator<minja::Value>>> *)&local_30); std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)local_10,local_40); __gnu_cxx:: __normal_iterator<minja::Value*,std::vector<minja::Value,std::allocator<minja::Value>>>:: operator++((__normal_iterator<minja::Value*,std::vector<minja::Value,std::allocator<minja::Value>>> *)&local_30); } } else { bVar2 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)(this + 0x20)); if (bVar2) { local_48 = (vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>> *)std:: __shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator*((__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<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,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x20)); local_50 = std:: vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>> ::begin(local_48); local_58 = std:: vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>> ::end(local_48); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_50,(__normal_iterator *)&local_58), bVar2) { local_60 = (basic_json *) __gnu_cxx:: __normal_iterator<std::pair<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,minja::Value>*,std::vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>>> ::operator*((__normal_iterator<std::pair<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,minja::Value>*,std::vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>>> *)&local_50); Value(local_b0,local_60); /* try { // try from 001db5de to 001db5e2 has its CatchHandler @ 001db601 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)local_10,local_b0); ~Value(local_b0); __gnu_cxx:: __normal_iterator<std::pair<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,minja::Value>*,std::vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>>> ::operator++((__normal_iterator<std::pair<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,minja::Value>*,std::vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>>> *)&local_50); } } else { uVar3 = is_string(this); if ((uVar3 & 1) == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001db809 to 001db819 has its CatchHandler @ 001db867 */ dump_abi_cxx11_((int)local_1a8,SUB81(this,0)); /* try { // try from 001db81c to 001db831 has its CatchHandler @ 001db87d */ std::operator+((char *)local_188,(string *)"Value is not iterable: "); /* try { // try from 001db834 to 001db861 has its CatchHandler @ 001db893 */ std::runtime_error::runtime_error(prVar5,local_188); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00336fb0,PTR__runtime_error_00336f78); } 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> ::get<std::__cxx11::string,std::__cxx11::string>(); local_b8 = local_d8; local_e0 = std::__cxx11::string::begin(); local_e8 = std::__cxx11::string::end(); while (bVar2 = __gnu_cxx::operator!= ((__normal_iterator *)&local_e0,(__normal_iterator *)&local_e8), bVar2) { pcVar4 = (char *)__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>::operator* ((__normal_iterator<char*,std::__cxx11::string> *)&local_e0); cVar1 = *pcVar4; local_e9 = cVar1; std::allocator<char>::allocator(); /* try { // try from 001db6f7 to 001db708 has its CatchHandler @ 001db772 */ std::__cxx11::string::string<std::allocator<char>>(local_160,1,cVar1,&local_161); /* try { // try from 001db70b to 001db71f has its CatchHandler @ 001db788 */ Value(local_140,local_160); std::__cxx11::string::~string(local_160); std::allocator<char>::~allocator((allocator<char> *)&local_161); /* try { // try from 001db744 to 001db750 has its CatchHandler @ 001db7b8 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)local_10,local_140); ~Value(local_140); __gnu_cxx::__normal_iterator<char*,std::__cxx11::string>::operator++ ((__normal_iterator<char*,std::__cxx11::string> *)&local_e0); } std::__cxx11::string::~string(local_d8); } } return; }
49,173
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()); } }
O3
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, %r15 movq 0x10(%rdi), %rcx movq 0x20(%rdi), %rax movb 0x40(%rdi), %dl testq %rax, %rax jne 0x5439b testq %rcx, %rcx jne 0x5439b testb %dl, %dl jne 0x5439b cmpq $0x0, 0x30(%r15) je 0x54604 testq %rcx, %rcx je 0x543ca movq (%rcx), %r14 movq 0x8(%rcx), %r15 cmpq %r15, %r14 je 0x545e3 cmpq $0x0, 0x10(%rbx) je 0x545f5 movq %rbx, %rdi movq %r14, %rsi callq *0x18(%rbx) addq $0x50, %r14 jmp 0x543a7 testq %rax, %rax je 0x5449a movq (%rax), %r14 movq 0x8(%rax), %r13 cmpq %r13, %r14 je 0x545e3 leaq 0x88(%rsp), %r15 leaq 0x48(%rsp), %r12 movq 0x87ba1(%rip), %rbp # 0xdbf98 movq %r12, %rdi movq %r14, %rsi callq 0x4cc72 cmpq $0x0, 0x10(%rbx) je 0x545fa movq %rbx, %rdi movq %r12, %rsi callq *0x18(%rbx) movq %r15, %rdi xorl %esi, %esi callq 0x3ce3c movq %r15, %rdi callq 0x49a2a movq 0x80(%rsp), %rdi testq %rdi, %rdi je 0x5443a callq 0x2ef66 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x54449 callq 0x2ef66 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x54458 callq 0x2ef66 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x54488 cmpb $0x0, (%rbp) je 0x54473 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5447d movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x54488 movq (%rdi), %rax callq *0x18(%rax) addq $0x60, %r14 cmpq %r13, %r14 jne 0x543f7 jmp 0x545e3 cmpb $0x3, %dl jne 0x54636 addq $0x40, %r15 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x3ede4 movq (%r12), %r14 movq 0x8(%r12), %rbp testq %rbp, %rbp je 0x545c9 xorl %r15d, %r15d leaq 0x28(%rsp), %r12 movsbl (%r14,%r15), %edx leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movl $0x1, %esi movq %r12, %rdi callq 0x187a0 leaq 0x48(%rsp), %rdi movq %r12, %r13 movq %r12, %rsi callq 0x41a72 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x54519 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 cmpq $0x0, 0x10(%rbx) je 0x545ff movq %r14, %r12 movq %rbx, %rdi leaq 0x48(%rsp), %rsi callq *0x18(%rbx) leaq 0x88(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3ce3c movq %r14, %rdi callq 0x49a2a movq 0x80(%rsp), %rdi testq %rdi, %rdi je 0x5455e callq 0x2ef66 movq 0x70(%rsp), %rdi testq %rdi, %rdi movq %r12, %r14 je 0x54570 callq 0x2ef66 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x5457f callq 0x2ef66 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x545b5 movq 0x87a08(%rip), %rax # 0xdbf98 cmpb $0x0, (%rax) je 0x545a0 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x545aa movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x545b5 movq (%rdi), %rax callq *0x18(%rax) incq %r15 cmpq %r15, %rbp movq %r13, %r12 jne 0x544d1 movq 0x8(%rsp), %r14 leaq 0x18(%rsp), %rax cmpq %rax, %r14 je 0x545e3 movq 0x18(%rsp), %rsi incq %rsi movq %r14, %rdi callq 0x186a0 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x18250 callq 0x18250 callq 0x18250 movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x5529a(%rip), %rsi # 0xa98b2 movq %rax, %rdi callq 0x18260 movq 0x879c9(%rip), %rsi # 0xdbff0 movq 0x87942(%rip), %rdx # 0xdbf70 movq %r14, %rdi callq 0x18b30 movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x8(%rsp), %rdi movq %r15, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x3d172 leaq 0x56d6f(%rip), %rsi # 0xab3cd leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x2434d movb $0x1, %bpl leaq 0x48(%rsp), %rsi movq %r14, %rdi callq 0x18a80 xorl %ebp, %ebp movq 0x8796a(%rip), %rsi # 0xdbff0 movq 0x878e3(%rip), %rdx # 0xdbf70 movq %r14, %rdi callq 0x18b30 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x546b3 movq 0x58(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x546ce movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x546fd jmp 0x54768 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x546fd movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x546fd jmp 0x546fa movq %rax, %rbx movq %r14, %rdi callq 0x184f0 jmp 0x54768 movq %rax, %rbx jmp 0x5473c movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x5473c movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x5473c jmp 0x5472f movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x3cdb0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x54768 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x54768 jmp 0x5475b movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x3cdb0 movq %rbx, %rdi callq 0x18ba0
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rsi mov r15, rdi mov rcx, [rdi+10h] mov rax, [rdi+20h] mov dl, [rdi+40h] test rax, rax jnz short loc_5439B test rcx, rcx jnz short loc_5439B test dl, dl jnz short loc_5439B cmp qword ptr [r15+30h], 0 jz loc_54604 loc_5439B: test rcx, rcx jz short loc_543CA mov r14, [rcx] mov r15, [rcx+8] loc_543A7: cmp r14, r15 jz loc_545E3 cmp qword ptr [rbx+10h], 0 jz loc_545F5 mov rdi, rbx mov rsi, r14 call qword ptr [rbx+18h] add r14, 50h ; 'P' jmp short loc_543A7 loc_543CA: test rax, rax jz loc_5449A mov r14, [rax] mov r13, [rax+8] cmp r14, r13 jz loc_545E3 lea r15, [rsp+0C8h+var_40] lea r12, [rsp+0C8h+var_80] mov rbp, cs:__libc_single_threaded_ptr loc_543F7: mov rdi, r12 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&) cmp qword ptr [rbx+10h], 0 jz loc_545FA mov rdi, rbx mov rsi, r12 call qword ptr [rbx+18h] 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 rdi, [rsp+0C8h+var_48] test rdi, rdi jz short loc_5443A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5443A: mov rdi, [rsp+0C8h+var_58] test rdi, rdi jz short loc_54449 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_54449: mov rdi, [rsp+0C8h+var_68] test rdi, rdi jz short loc_54458 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_54458: mov rdi, [rsp+0C8h+var_78] test rdi, rdi jz short loc_54488 cmp byte ptr [rbp+0], 0 jz short loc_54473 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_5447D loc_54473: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5447D: cmp eax, 1 jnz short loc_54488 mov rax, [rdi] call qword ptr [rax+18h] loc_54488: add r14, 60h ; '`' cmp r14, r13 jnz loc_543F7 jmp loc_545E3 loc_5449A: cmp dl, 3 jnz loc_54636 add r15, 40h ; '@' lea r12, [rsp+0C8h+var_C0] mov rdi, r12 mov rsi, r15 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 r14, [r12] mov rbp, [r12+8] test rbp, rbp jz loc_545C9 xor r15d, r15d lea r12, [rsp+0C8h+var_A0] loc_544D1: movsx edx, byte ptr [r14+r15] lea rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_A0], rax mov esi, 1 mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea rdi, [rsp+0C8h+var_80] mov r13, r12 mov rsi, r12 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+0C8h+var_A0]; void * lea rax, [rsp+0C8h+var_90] cmp rdi, rax jz short loc_54519 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_54519: cmp qword ptr [rbx+10h], 0 jz loc_545FF mov r12, r14 mov rdi, rbx lea rsi, [rsp+0C8h+var_80] call qword ptr [rbx+18h] lea r14, [rsp+0C8h+var_40] 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, [rsp+0C8h+var_48] test rdi, rdi jz short loc_5455E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5455E: mov rdi, [rsp+0C8h+var_58] test rdi, rdi mov r14, r12 jz short loc_54570 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_54570: mov rdi, [rsp+0C8h+var_68] test rdi, rdi jz short loc_5457F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5457F: mov rdi, [rsp+0C8h+var_78] test rdi, rdi jz short loc_545B5 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_545A0 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_545AA loc_545A0: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_545AA: cmp eax, 1 jnz short loc_545B5 mov rax, [rdi] call qword ptr [rax+18h] loc_545B5: inc r15 cmp rbp, r15 mov r12, r13 jnz loc_544D1 mov r14, [rsp+0C8h+var_C0] loc_545C9: lea rax, [rsp+0C8h+var_B0] cmp r14, rax jz short loc_545E3 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) loc_545E3: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_545F5: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_545FA: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_545FF: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_54604: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, 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, r14; void * call ___cxa_throw loc_54636: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rdi, [rsp+0C8h+var_C0] mov rsi, r15 mov edx, 0FFFFFFFFh 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, r14 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, r14; void * call ___cxa_throw mov rbx, rax lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_546B3 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_546B3: lea rax, [rsp+0C8h+var_B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_546CE mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_546CE: test bpl, bpl jnz short loc_546FD jmp loc_54768 mov rbx, rax lea rax, [rsp+0C8h+var_B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_546FD mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_546FD jmp short $+2 loc_546FA: mov rbx, rax loc_546FD: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_54768 mov rbx, rax jmp short loc_5473C mov rbx, rax mov rdi, [rsp+0C8h+var_A0]; void * lea rax, [rsp+0C8h+var_90] cmp rdi, rax jz short loc_5473C mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5473C jmp short $+2 loc_5472F: mov rbx, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_5473C: lea rax, [rsp+0C8h+var_B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_54768 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_54768 jmp short $+2 loc_5475B: mov rbx, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_54768: mov rdi, rbx call __Unwind_Resume
void minja::Value::for_each(long long a1, long long a2, long long a3) { long long *v3; // rcx unsigned __int8 **v4; // rax long long v5; // r14 long long v6; // r15 unsigned __int8 *v7; // r14 unsigned __int8 *v8; // r13 long long v9; // rdi signed __int32 v10; // eax char *v11; // r14 long long v12; // rbp long long v13; // r15 long long v14; // rdx long long v15; // rdi signed __int32 v16; // eax std::runtime_error *exception; // r14 void *v18; // r14 char *v19; // [rsp+8h] [rbp-C0h] BYREF long long v20; // [rsp+10h] [rbp-B8h] long long v21; // [rsp+18h] [rbp-B0h] BYREF void *v22; // [rsp+28h] [rbp-A0h] BYREF _QWORD v23[2]; // [rsp+38h] [rbp-90h] BYREF __int128 v24; // [rsp+48h] [rbp-80h] BYREF volatile signed __int32 *v25; // [rsp+60h] [rbp-68h] volatile signed __int32 *v26; // [rsp+70h] [rbp-58h] volatile signed __int32 *v27; // [rsp+80h] [rbp-48h] void **v28[8]; // [rsp+88h] [rbp-40h] BYREF v3 = *(long long **)(a1 + 16); v4 = *(unsigned __int8 ***)(a1 + 32); LOBYTE(a3) = *(_BYTE *)(a1 + 64); if ( !v4 && !v3 && !(_BYTE)a3 && !*(_QWORD *)(a1 + 48) ) { 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 ( v3 ) { v5 = *v3; v6 = v3[1]; while ( v5 != v6 ) { if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, long long, long long))(a2 + 24))(a2, v5, a3); v5 += 80LL; } } else if ( v4 ) { v7 = *v4; v8 = v4[1]; if ( *v4 != v8 ) { do { minja::Value::Value((long long)&v24, v7); if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, __int128 *))(a2 + 24))(a2, &v24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v28); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v28); if ( v27 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27); if ( v26 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v26); if ( v25 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25); v9 = *((_QWORD *)&v24 + 1); if ( *((_QWORD *)&v24 + 1) ) { if ( _libc_single_threaded ) { v10 = *(_DWORD *)(*((_QWORD *)&v24 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v24 + 1) + 12LL) = v10 - 1; } else { v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v24 + 1) + 12LL), 0xFFFFFFFF); } if ( v10 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } v7 += 96; } while ( v7 != v8 ); } } else { if ( (_BYTE)a3 != 3 ) { v18 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)&v19, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)&v24, (long long)"Value is not iterable: ", (long long)&v19); std::runtime_error::runtime_error(v18, &v24); __cxa_throw( v18, (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)&v19, a1 + 64); v11 = v19; v12 = v20; if ( v20 ) { v13 = 0LL; do { v14 = (unsigned int)v11[v13]; v22 = v23; std::string::_M_construct(&v22, 1LL, v14); minja::Value::Value(&v24); if ( v22 != v23 ) operator delete(v22, v23[0] + 1LL); if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, __int128 *))(a2 + 24))(a2, &v24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v28); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v28); if ( v27 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27); if ( v26 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v26); if ( v25 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25); v15 = *((_QWORD *)&v24 + 1); if ( *((_QWORD *)&v24 + 1) ) { if ( _libc_single_threaded ) { v16 = *(_DWORD *)(*((_QWORD *)&v24 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v24 + 1) + 12LL) = v16 - 1; } else { v16 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v24 + 1) + 12LL), 0xFFFFFFFF); } if ( v16 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v15 + 24LL))(v15, 0LL); } ++v13; } while ( v12 != v13 ); v11 = v19; } if ( v11 != (char *)&v21 ) operator delete(v11, v21 + 1); } }
for_each: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RSI MOV R15,RDI MOV RCX,qword ptr [RDI + 0x10] MOV RAX,qword ptr [RDI + 0x20] MOV DL,byte ptr [RDI + 0x40] TEST RAX,RAX JNZ 0x0015439b TEST RCX,RCX JNZ 0x0015439b TEST DL,DL JNZ 0x0015439b CMP qword ptr [R15 + 0x30],0x0 JZ 0x00154604 LAB_0015439b: TEST RCX,RCX JZ 0x001543ca MOV R14,qword ptr [RCX] MOV R15,qword ptr [RCX + 0x8] LAB_001543a7: CMP R14,R15 JZ 0x001545e3 CMP qword ptr [RBX + 0x10],0x0 JZ 0x001545f5 MOV RDI,RBX MOV RSI,R14 CALL qword ptr [RBX + 0x18] ADD R14,0x50 JMP 0x001543a7 LAB_001543ca: TEST RAX,RAX JZ 0x0015449a MOV R14,qword ptr [RAX] MOV R13,qword ptr [RAX + 0x8] CMP R14,R13 JZ 0x001545e3 LEA R15,[RSP + 0x88] LEA R12,[RSP + 0x48] MOV RBP,qword ptr [0x001dbf98] LAB_001543f7: MOV RDI,R12 MOV RSI,R14 CALL 0x0014cc72 CMP qword ptr [RBX + 0x10],0x0 JZ 0x001545fa LAB_0015440d: MOV RDI,RBX MOV RSI,R12 CALL qword ptr [RBX + 0x18] LAB_00154416: MOV RDI,R15 XOR ESI,ESI CALL 0x0013ce3c MOV RDI,R15 CALL 0x00149a2a MOV RDI,qword ptr [RSP + 0x80] TEST RDI,RDI JZ 0x0015443a CALL 0x0012ef66 LAB_0015443a: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x00154449 CALL 0x0012ef66 LAB_00154449: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x00154458 CALL 0x0012ef66 LAB_00154458: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x00154488 CMP byte ptr [RBP],0x0 JZ 0x00154473 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0015447d LAB_00154473: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0015447d: CMP EAX,0x1 JNZ 0x00154488 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00154488: ADD R14,0x60 CMP R14,R13 JNZ 0x001543f7 JMP 0x001545e3 LAB_0015449a: CMP DL,0x3 JNZ 0x00154636 ADD R15,0x40 LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x0013ede4 MOV R14,qword ptr [R12] MOV RBP,qword ptr [R12 + 0x8] TEST RBP,RBP JZ 0x001545c9 XOR R15D,R15D LEA R12,[RSP + 0x28] LAB_001544d1: MOVSX EDX,byte ptr [R14 + R15*0x1] LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_001544e0: MOV ESI,0x1 MOV RDI,R12 CALL 0x001187a0 LAB_001544ed: LEA RDI,[RSP + 0x48] MOV R13,R12 MOV RSI,R12 CALL 0x00141a72 MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x00154519 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_00154519: CMP qword ptr [RBX + 0x10],0x0 JZ 0x001545ff LAB_00154524: MOV R12,R14 MOV RDI,RBX LEA RSI,[RSP + 0x48] CALL qword ptr [RBX + 0x18] LAB_00154532: LEA R14,[RSP + 0x88] MOV RDI,R14 XOR ESI,ESI CALL 0x0013ce3c MOV RDI,R14 CALL 0x00149a2a MOV RDI,qword ptr [RSP + 0x80] TEST RDI,RDI JZ 0x0015455e CALL 0x0012ef66 LAB_0015455e: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI MOV R14,R12 JZ 0x00154570 CALL 0x0012ef66 LAB_00154570: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x0015457f CALL 0x0012ef66 LAB_0015457f: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x001545b5 MOV RAX,qword ptr [0x001dbf98] CMP byte ptr [RAX],0x0 JZ 0x001545a0 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001545aa LAB_001545a0: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001545aa: CMP EAX,0x1 JNZ 0x001545b5 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001545b5: INC R15 CMP RBP,R15 MOV R12,R13 JNZ 0x001544d1 MOV R14,qword ptr [RSP + 0x8] LAB_001545c9: LEA RAX,[RSP + 0x18] CMP R14,RAX JZ 0x001545e3 MOV RSI,qword ptr [RSP + 0x18] INC RSI MOV RDI,R14 CALL 0x001186a0 LAB_001545e3: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001545f5: CALL 0x00118250 LAB_001545fa: CALL 0x00118250 LAB_001545ff: CALL 0x00118250 LAB_00154604: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_00154611: LEA RSI,[0x1a98b2] MOV RDI,RAX CALL 0x00118260 LAB_00154620: MOV RSI,qword ptr [0x001dbff0] MOV RDX,qword ptr [0x001dbf70] MOV RDI,R14 CALL 0x00118b30 LAB_00154636: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_00154643: LEA RDI,[RSP + 0x8] MOV RSI,R15 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0013d172 LAB_00154657: LEA RSI,[0x1ab3cd] LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] CALL 0x0012434d MOV BPL,0x1 LAB_00154670: LEA RSI,[RSP + 0x48] MOV RDI,R14 CALL 0x00118a80 XOR EBP,EBP MOV RSI,qword ptr [0x001dbff0] MOV RDX,qword ptr [0x001dbf70] MOV RDI,R14 CALL 0x00118b30
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */ void __thiscall minja::Value::for_each(Value *this,function *param_1) { int *piVar1; long *plVar2; long *plVar3; long lVar4; basic_json *pbVar5; int *puVar6; int iVar7; runtime_error *prVar8; long lVar9; basic_json *pbVar10; long *local_c0; long local_b8; long local_b0 [2]; long *local_a0 [2]; long local_90 [2]; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; puVar6 = PTR___libc_single_threaded_001dbf98; plVar2 = *(long **)(this + 0x10); plVar3 = *(long **)(this + 0x20); if ((((plVar3 == (long *)0x0) && (plVar2 == (long *)0x0)) && (this[0x40] == (Value)0x0)) && (*(long *)(this + 0x30) == 0)) { prVar8 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00154611 to 0015461f has its CatchHandler @ 001546fa */ std::runtime_error::runtime_error(prVar8,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar8,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70); } if (plVar2 == (long *)0x0) { if (plVar3 == (long *)0x0) { if (this[0x40] != (Value)0x3) { prVar8 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00154643 to 00154656 has its CatchHandler @ 001546f8 */ dump_abi_cxx11_((int)&local_c0,SUB81(this,0)); /* try { // try from 00154657 to 0015466c has its CatchHandler @ 001546d8 */ std::operator+((char *)local_80,(string *)"Value is not iterable: "); /* try { // try from 00154670 to 00154694 has its CatchHandler @ 00154695 */ std::runtime_error::runtime_error(prVar8,(string *)local_80); /* WARNING: Subroutine does not return */ __cxa_throw(prVar8,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70); } _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); if (local_b8 != 0) { lVar9 = 0; do { local_a0[0] = local_90; /* try { // try from 001544e0 to 001544ec has its CatchHandler @ 00154707 */ std::__cxx11::string::_M_construct((ulong)local_a0,'\x01'); /* try { // try from 001544ed to 001544fc has its CatchHandler @ 0015470c */ Value(local_80,(string *)local_a0); if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } if (*(long *)(param_1 + 0x10) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 001545ff to 00154603 has its CatchHandler @ 0015472f */ std::__throw_bad_function_call(); } /* try { // try from 00154524 to 00154531 has its CatchHandler @ 0015472d */ (**(code **)(param_1 + 0x18))(param_1,local_80); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001dbf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar7 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar7 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar7 + -1; } if (iVar7 == 1) { (**(code **)(*local_78 + 0x18))(); } } lVar9 = lVar9 + 1; } while (local_b8 != lVar9); } if (local_c0 != local_b0) { operator_delete(local_c0,local_b0[0] + 1); } } else { pbVar10 = (basic_json *)*plVar3; pbVar5 = (basic_json *)plVar3[1]; if (pbVar10 != pbVar5) { do { Value(local_80,pbVar10); if (*(long *)(param_1 + 0x10) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 001545fa to 001545fe has its CatchHandler @ 0015475b */ std::__throw_bad_function_call(); } /* try { // try from 0015440d to 00154415 has its CatchHandler @ 00154759 */ (**(code **)(param_1 + 0x18))(param_1,local_80); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*puVar6 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar7 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar7 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar7 + -1; } if (iVar7 == 1) { (**(code **)(*local_78 + 0x18))(); } } pbVar10 = pbVar10 + 0x60; } while (pbVar10 != pbVar5); } } } else { lVar4 = plVar2[1]; for (lVar9 = *plVar2; lVar9 != lVar4; lVar9 = lVar9 + 0x50) { if (*(long *)(param_1 + 0x10) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } (**(code **)(param_1 + 0x18))(param_1,lVar9); } } return; }
49,174
ma_decrypt
eloqsql/storage/maria/ma_crypt.c
static int ma_decrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data, const uchar *src, uchar *dst, uint size, uint pageno, LSN lsn, uint key_version) { int rc; uint32 dstlen= 0; /* Must be set because of error message */ rc= encryption_scheme_decrypt(src, size, dst, &dstlen, &crypt_data->scheme, key_version, crypt_data->space, pageno, lsn); DBUG_ASSERT(!my_assert_on_error || rc == MY_AES_OK); DBUG_ASSERT(!my_assert_on_error || dstlen == size); if (! (rc == MY_AES_OK && dstlen == size)) { my_errno= HA_ERR_DECRYPTION_FAILED; if (!share->silence_encryption_errors) my_printf_error(HA_ERR_DECRYPTION_FAILED, "failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", MYF(ME_FATAL|ME_ERROR_LOG), share->open_file_name.str, rc, dstlen, size); return 1; } return 0; }
O0
c
ma_decrypt: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x18(%rbp), %eax movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movl %r9d, -0x30(%rbp) movl $0x0, -0x38(%rbp) movq -0x20(%rbp), %rdi movl -0x2c(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x18(%rbp), %r8 movl 0x18(%rbp), %r9d movq -0x18(%rbp), %rax movl 0x60(%rax), %r11d movl -0x30(%rbp), %r10d movq 0x10(%rbp), %rax leaq -0x38(%rbp), %rcx movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x2b000 movl %eax, -0x34(%rbp) jmp 0x89ced jmp 0x89cef jmp 0x89cf1 cmpl $0x0, -0x34(%rbp) jne 0x89cff movl -0x38(%rbp), %eax cmpl -0x2c(%rbp), %eax je 0x89d51 callq 0xf6080 movl $0xc0, (%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x7ec(%rax) jne 0x89d48 movq -0x10(%rbp), %rax movq 0x5e0(%rax), %rcx movl -0x34(%rbp), %r8d movl -0x38(%rbp), %r9d movl -0x2c(%rbp), %eax movl $0xc0, %edi leaq 0xc8a40(%rip), %rsi # 0x152779 movl $0x1040, %edx # imm = 0x1040 movl %eax, (%rsp) movb $0x0, %al callq 0xefa00 movl $0x1, -0x4(%rbp) jmp 0x89d58 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_decrypt: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_30], r9d mov [rbp+var_38], 0 mov rdi, [rbp+var_20] mov esi, [rbp+var_2C] mov rdx, [rbp+var_28] mov r8, [rbp+var_18] mov r9d, [rbp+arg_8] mov rax, [rbp+var_18] mov r11d, [rax+60h] mov r10d, [rbp+var_30] mov rax, [rbp+arg_0] lea rcx, [rbp+var_38] mov [rsp+50h+var_50], r11d mov [rsp+50h+var_48], r10d mov [rsp+50h+var_40], rax call encryption_scheme_decrypt mov [rbp+var_34], eax jmp short $+2 loc_89CED: jmp short $+2 loc_89CEF: jmp short $+2 loc_89CF1: cmp [rbp+var_34], 0 jnz short loc_89CFF mov eax, [rbp+var_38] cmp eax, [rbp+var_2C] jz short loc_89D51 loc_89CFF: call _my_thread_var mov dword ptr [rax], 0C0h mov rax, [rbp+var_10] cmp byte ptr [rax+7ECh], 0 jnz short loc_89D48 mov rax, [rbp+var_10] mov rcx, [rax+5E0h] mov r8d, [rbp+var_34] mov r9d, [rbp+var_38] mov eax, [rbp+var_2C] mov edi, 0C0h lea rsi, aFailedToDecryp; "failed to decrypt '%s' rc: %d dstlen:"... mov edx, 1040h mov [rsp+50h+var_50], eax mov al, 0 call my_printf_error loc_89D48: mov [rbp+var_4], 1 jmp short loc_89D58 loc_89D51: mov [rbp+var_4], 0 loc_89D58: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ma_decrypt(long long a1, long long a2, long long a3, long long a4, unsigned int a5, int a6, long long a7) { const char *v8; // rsi long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 int v14; // [rsp+0h] [rbp-50h] int v16; // [rsp+1Ch] [rbp-34h] v8 = (const char *)a5; v14 = *(_DWORD *)(a2 + 96); v16 = encryption_scheme_decrypt(); if ( v16 || a5 ) { *(_DWORD *)my_thread_var(a3, v8, v9, v10, v11, v12, v14, a6, a7) = 192; if ( !*(_BYTE *)(a1 + 2028) ) my_printf_error( 192, (unsigned int)"failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", 4160, *(_QWORD *)(a1 + 1504), v16, 0); return 1; } else { return 0; } }
ma_decrypt: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x2c],R8D MOV dword ptr [RBP + -0x30],R9D MOV dword ptr [RBP + -0x38],0x0 MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x18] MOV R9D,dword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x18] MOV R11D,dword ptr [RAX + 0x60] MOV R10D,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + 0x10] LEA RCX,[RBP + -0x38] MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV qword ptr [RSP + 0x10],RAX CALL 0x0012b000 MOV dword ptr [RBP + -0x34],EAX JMP 0x00189ced LAB_00189ced: JMP 0x00189cef LAB_00189cef: JMP 0x00189cf1 LAB_00189cf1: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x00189cff MOV EAX,dword ptr [RBP + -0x38] CMP EAX,dword ptr [RBP + -0x2c] JZ 0x00189d51 LAB_00189cff: CALL 0x001f6080 MOV dword ptr [RAX],0xc0 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7ec],0x0 JNZ 0x00189d48 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x5e0] MOV R8D,dword ptr [RBP + -0x34] MOV R9D,dword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x2c] MOV EDI,0xc0 LEA RSI,[0x252779] MOV EDX,0x1040 MOV dword ptr [RSP],EAX MOV AL,0x0 CALL 0x001efa00 LAB_00189d48: MOV dword ptr [RBP + -0x4],0x1 JMP 0x00189d58 LAB_00189d51: MOV dword ptr [RBP + -0x4],0x0 LAB_00189d58: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 ma_decrypt(long param_1,long param_2,int8 param_3,int8 param_4,int param_5, int4 param_6,int8 param_7,int4 param_8) { int4 *puVar1; int local_40; int local_3c; int4 local_38; int local_34; int8 local_30; int8 local_28; long local_20; long local_18; int4 local_c; local_40 = 0; local_38 = param_6; local_34 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_3c = encryption_scheme_decrypt (param_3,param_5,param_4,&local_40,param_2,param_8, *(int4 *)(param_2 + 0x60),param_6,param_7); if ((local_3c == 0) && (local_40 == local_34)) { local_c = 0; } else { puVar1 = (int4 *)_my_thread_var(); *puVar1 = 0xc0; if (*(char *)(local_18 + 0x7ec) == '\0') { my_printf_error(0xc0,"failed to decrypt \'%s\' rc: %d dstlen: %u size: %u\n",0x1040, *(int8 *)(local_18 + 0x5e0),local_3c,local_40,local_34); } local_c = 1; } return local_c; }
49,175
my_instr_mb
eloqsql/strings/ctype-mb.c
uint my_instr_mb(CHARSET_INFO *cs, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const char *end, *b0; int res= 0; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } b0= b; end= b+b_length-s_length+1; while (b < end) { int mb_len; if (!my_ci_strnncoll(cs, (const uchar *) b, s_length, (const uchar *) s, s_length, 0)) { if (nmatch) { match[0].beg= 0; match[0].end= (uint) (b-b0); match[0].mb_len= res; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= 0; /* Not computed */ } } return 2; } mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1; b+= mb_len; b_length-= mb_len; res++; } } return 0; }
O3
c
my_instr_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, -0x40(%rbp) xorl %eax, %eax cmpq %rdx, %r8 ja 0xb35ab movq %r8, %r14 testq %r8, %r8 je 0xb353e movq %rdx, %r13 addq %rsi, %r13 subq %r14, %r13 incq %r13 cmpq %rsi, %r13 jbe 0xb35ab movq %rdi, %rbx movq %r9, -0x38(%rbp) xorl %r12d, %r12d movq %rsi, -0x30(%rbp) movq %rsi, %r15 movq 0xc0(%rbx), %rax movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movq -0x40(%rbp), %rcx movq %r14, %r8 xorl %r9d, %r9d callq *0x8(%rax) testl %eax, %eax je 0xb356b movq 0xb8(%rbx), %rax movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x2, %eax movl $0x1, %ecx cmovbl %ecx, %eax cmovll %ecx, %eax cltq addq %rax, %r15 incl %r12d cmpq %r13, %r15 jb 0xb34e8 xorl %eax, %eax jmp 0xb35ab cmpl $0x0, 0x10(%rbp) je 0xb35a6 movl $0x0, (%r9) movl $0x1, %eax movl $0x8, %ecx xorl %r14d, %r14d movl $0x4, %edx movl %r14d, (%r9,%rdx) movl $0x0, (%r9,%rcx) jmp 0xb35ab movl $0x2, %eax movl 0x10(%rbp), %ecx testl %ecx, %ecx je 0xb35ab movq -0x38(%rbp), %r9 movl $0x0, (%r9) subl -0x30(%rbp), %r15d movl %r15d, 0x4(%r9) movl %r12d, 0x8(%r9) cmpl $0x1, %ecx je 0xb35ab movl %r15d, 0xc(%r9) addl %r15d, %r14d movl $0x14, %ecx movl $0x10, %edx jmp 0xb355d movl $0x1, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_instr_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rcx xor eax, eax cmp r8, rdx ja loc_B35AB mov r14, r8 test r8, r8 jz short loc_B353E mov r13, rdx add r13, rsi sub r13, r14 inc r13 cmp r13, rsi jbe loc_B35AB mov rbx, rdi mov [rbp+var_38], r9 xor r12d, r12d mov [rbp+var_30], rsi mov r15, rsi loc_B34E8: mov rax, [rbx+0C0h] mov rdi, rbx mov rsi, r15 mov rdx, r14 mov rcx, [rbp+var_40] mov r8, r14 xor r9d, r9d call qword ptr [rax+8] test eax, eax jz short loc_B356B mov rax, [rbx+0B8h] mov rdi, rbx mov rsi, r15 mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 2 mov ecx, 1 cmovb eax, ecx cmovl eax, ecx cdqe add r15, rax inc r12d cmp r15, r13 jb short loc_B34E8 xor eax, eax jmp short loc_B35AB loc_B353E: cmp [rbp+arg_0], 0 jz short loc_B35A6 mov dword ptr [r9], 0 mov eax, 1 mov ecx, 8 xor r14d, r14d mov edx, 4 loc_B355D: mov [r9+rdx], r14d mov dword ptr [r9+rcx], 0 jmp short loc_B35AB loc_B356B: mov eax, 2 mov ecx, [rbp+arg_0] test ecx, ecx jz short loc_B35AB mov r9, [rbp+var_38] mov dword ptr [r9], 0 sub r15d, dword ptr [rbp+var_30] mov [r9+4], r15d mov [r9+8], r12d cmp ecx, 1 jz short loc_B35AB mov [r9+0Ch], r15d add r14d, r15d mov ecx, 14h mov edx, 10h jmp short loc_B355D loc_B35A6: mov eax, 1 loc_B35AB: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_instr_mb( long long a1, unsigned long long a2, unsigned long long a3, long long a4, unsigned long long a5, _DWORD *a6, int a7) { long long result; // rax unsigned long long v9; // r13 int v10; // r12d unsigned long long v11; // r15 int v12; // eax bool v13; // cc long long v14; // rcx int v15; // r14d long long v16; // rdx int v17; // r15d _DWORD *v19; // [rsp+8h] [rbp-38h] result = 0LL; if ( a5 <= a3 ) { if ( a5 ) { v9 = a2 + a3 - a5 + 1; if ( v9 > a2 ) { v19 = a6; v10 = 0; v11 = a2; while ( (*(unsigned int ( **)(long long, unsigned long long, unsigned long long, long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 192) + 8LL))( a1, v11, a5, a4, a5, 0LL) ) { v12 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v11, v9); v13 = v12 < 2; if ( (unsigned int)v12 < 2 ) v12 = 1; if ( v13 ) v12 = 1; v11 += v12; ++v10; if ( v11 >= v9 ) return 0LL; } result = 2LL; if ( a7 ) { a6 = v19; *v19 = 0; v17 = v11 - a2; v19[1] = v17; v19[2] = v10; if ( a7 != 1 ) { v19[3] = v17; v15 = v17 + a5; v14 = 5LL; v16 = 4LL; goto LABEL_14; } } } } else { if ( a7 ) { *a6 = 0; result = 1LL; v14 = 2LL; v15 = 0; v16 = 1LL; LABEL_14: a6[v16] = v15; a6[v14] = 0; return result; } return 1LL; } } return result; }
my_instr_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RCX XOR EAX,EAX CMP R8,RDX JA 0x001b35ab MOV R14,R8 TEST R8,R8 JZ 0x001b353e MOV R13,RDX ADD R13,RSI SUB R13,R14 INC R13 CMP R13,RSI JBE 0x001b35ab MOV RBX,RDI MOV qword ptr [RBP + -0x38],R9 XOR R12D,R12D MOV qword ptr [RBP + -0x30],RSI MOV R15,RSI LAB_001b34e8: MOV RAX,qword ptr [RBX + 0xc0] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x40] MOV R8,R14 XOR R9D,R9D CALL qword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x001b356b MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 MOV ECX,0x1 CMOVC EAX,ECX CMOVL EAX,ECX CDQE ADD R15,RAX INC R12D CMP R15,R13 JC 0x001b34e8 XOR EAX,EAX JMP 0x001b35ab LAB_001b353e: CMP dword ptr [RBP + 0x10],0x0 JZ 0x001b35a6 MOV dword ptr [R9],0x0 MOV EAX,0x1 MOV ECX,0x8 XOR R14D,R14D MOV EDX,0x4 LAB_001b355d: MOV dword ptr [R9 + RDX*0x1],R14D MOV dword ptr [R9 + RCX*0x1],0x0 JMP 0x001b35ab LAB_001b356b: MOV EAX,0x2 MOV ECX,dword ptr [RBP + 0x10] TEST ECX,ECX JZ 0x001b35ab MOV R9,qword ptr [RBP + -0x38] MOV dword ptr [R9],0x0 SUB R15D,dword ptr [RBP + -0x30] MOV dword ptr [R9 + 0x4],R15D MOV dword ptr [R9 + 0x8],R12D CMP ECX,0x1 JZ 0x001b35ab MOV dword ptr [R9 + 0xc],R15D ADD R14D,R15D MOV ECX,0x14 MOV EDX,0x10 JMP 0x001b355d LAB_001b35a6: MOV EAX,0x1 LAB_001b35ab: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_instr_mb(long param_1,ulong param_2,ulong param_3,int8 param_4,ulong param_5, int4 *param_6,int param_7) { int iVar1; uint uVar2; uint uVar3; int8 uVar4; long lVar5; long lVar6; int iVar7; ulong uVar8; ulong uVar9; int local_38; uVar4 = 0; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 == 0) { uVar4 = 1; } else { *param_6 = 0; uVar4 = 1; lVar5 = 8; local_38 = 0; lVar6 = 4; LAB_001b355d: *(int *)((long)param_6 + lVar6) = local_38; *(int4 *)((long)param_6 + lVar5) = 0; } } else { uVar8 = ((param_3 + param_2) - param_5) + 1; if (param_2 < uVar8) { iVar7 = 0; uVar9 = param_2; do { iVar1 = (**(code **)(*(long *)(param_1 + 0xc0) + 8)) (param_1,uVar9,param_5,param_4,param_5,0); if (iVar1 == 0) { uVar4 = 2; if (param_7 == 0) { return 2; } *param_6 = 0; local_38 = (int)param_2; local_38 = (int)uVar9 - local_38; param_6[1] = local_38; param_6[2] = iVar7; if (param_7 == 1) { return 2; } param_6[3] = local_38; local_38 = (int)param_5 + local_38; lVar5 = 0x14; lVar6 = 0x10; goto LAB_001b355d; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar9,uVar8); uVar3 = uVar2; if (uVar2 < 2) { uVar3 = 1; } if ((int)uVar2 < 2) { uVar3 = 1; } uVar9 = uVar9 + (long)(int)uVar3; iVar7 = iVar7 + 1; } while (uVar9 < uVar8); uVar4 = 0; } } } return uVar4; }
49,176
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&)
llama.cpp/common/minja/minja.hpp
SetNode(const Location & loc, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v) : TemplateNode(loc), ns(ns), var_names(vns), value(std::move(v)) {}
O3
cpp
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdi, %rbx leaq 0x6e86f(%rip), %r13 # 0x161510 addq $0x10, %r13 movq %r13, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0xf2cd1 movq 0x6f2d5(%rip), %rcx # 0x161f98 cmpb $0x0, (%rcx) je 0xf2ccd incl 0x8(%rax) jmp 0xf2cd1 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x6ea98(%rip), %rax # 0x161778 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %r12 leaq 0x30(%rbx), %rbp movq %rbp, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x2875c leaq 0x40(%rbx), %rdi movq %r15, %rsi callq 0x651e4 xorl %eax, %eax movq %rax, 0x60(%rbx) movups (%r14), %xmm0 movq %rax, 0x8(%r14) movups %xmm0, 0x58(%rbx) movq %rax, (%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r12), %rdi cmpq %rbp, %rdi je 0xf2d52 movq (%rbp), %rsi incq %rsi callq 0x20180 jmp 0xf2d52 movq %rax, %r14 movq %r13, (%rbx) addq $0x10, %rbx movq %rbx, %rdi callq 0x70982 movq %r14, %rdi callq 0x20ae0 nop
_ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov rbx, rdi lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add r13, 10h mov [rdi], r13 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_F2CD1 mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rcx], 0 jz short loc_F2CCD inc dword ptr [rax+8] jmp short loc_F2CD1 loc_F2CCD: lock inc dword ptr [rax+8] loc_F2CD1: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode add rax, 10h mov [rbx], rax lea r12, [rbx+20h] lea rbp, [rbx+30h] mov [rbx+20h], rbp mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rbx+40h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) xor eax, eax mov [rbx+60h], rax movups xmm0, xmmword ptr [r14] mov [r14+8], rax movups xmmword ptr [rbx+58h], xmm0 mov [r14], rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r12]; void * cmp rdi, rbp jz short loc_F2D52 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F2D52 mov r14, rax loc_F2D52: mov [rbx], r13 add rbx, 10h mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5) { long long v7; // rax long long result; // rax __int128 v9; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v7 = a2[1]; *(_QWORD *)(a1 + 16) = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v7 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v7 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::SetNode + 2; *(_QWORD *)(a1 + 32) = a1 + 48; std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); std::vector<std::string>::vector(a1 + 64, a4); result = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v9 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v9; *(_QWORD *)a5 = 0LL; return result; }
SetNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV RBX,RDI LEA R13,[0x261510] ADD R13,0x10 MOV qword ptr [RDI],R13 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x001f2cd1 MOV RCX,qword ptr [0x00261f98] CMP byte ptr [RCX],0x0 JZ 0x001f2ccd INC dword ptr [RAX + 0x8] JMP 0x001f2cd1 LAB_001f2ccd: INC.LOCK dword ptr [RAX + 0x8] LAB_001f2cd1: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x261778] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA R12,[RBX + 0x20] LEA RBP,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RBP MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_001f2cfd: MOV RDI,R12 CALL 0x0012875c LEA RDI,[RBX + 0x40] LAB_001f2d09: MOV RSI,R15 CALL 0x001651e4 LAB_001f2d11: XOR EAX,EAX MOV qword ptr [RBX + 0x60],RAX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV qword ptr [R14],RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SetNode::SetNode (SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_00261520; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00261f98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_00261788; *(SetNode **)(this + 0x20) = this + 0x30; /* try { // try from 001f2cfd to 001f2d04 has its CatchHandler @ 001f2d4f */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); /* try { // try from 001f2d09 to 001f2d10 has its CatchHandler @ 001f2d35 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), param_3); *(int8 *)(this + 0x60) = 0; uVar2 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x58) = *(int8 *)param_4; *(int8 *)(this + 0x60) = uVar2; *(int8 *)param_4 = 0; return; }
49,177
coro::net::tls::client::tls_info::operator=(coro::net::tls::client::tls_info&&)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/net/tls/client.hpp
auto operator=(tls_info&& other) noexcept -> tls_info& { if (std::addressof(other) != this) { m_tls_connection_type = std::exchange(other.m_tls_connection_type, tls_connection_type::connect); m_tls_ptr = std::move(other.m_tls_ptr); m_tls_error = std::exchange(other.m_tls_error, false); m_tls_connection_status = std::move(other.m_tls_connection_status); } return *this; }
O3
cpp
coro::net::tls::client::tls_info::operator=(coro::net::tls::client::tls_info&&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpq %rdi, %rsi je 0xcd37c movq %rsi, %r14 movl (%rsi), %eax movl $0x0, (%rsi) movl %eax, (%rbx) leaq 0x8(%rbx), %rdi movq 0x8(%rsi), %rsi movq $0x0, 0x8(%r14) callq 0xcd3d4 movb 0x10(%r14), %al movb $0x0, 0x10(%r14) movb %al, 0x10(%rbx) movq 0x14(%r14), %rax movq %rax, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN4coro3net3tls6client8tls_infoaSEOS3_: push r14 push rbx push rax mov rbx, rdi cmp rsi, rdi jz short loc_CD37C mov r14, rsi mov eax, [rsi] mov dword ptr [rsi], 0 mov [rbx], eax lea rdi, [rbx+8] mov rsi, [rsi+8] mov qword ptr [r14+8], 0 call _ZNSt15__uniq_ptr_implI6ssl_stN4coro3net3tls6client11tls_deleterEE5resetEPS0_; std::__uniq_ptr_impl<ssl_st,coro::net::tls::client::tls_deleter>::reset(ssl_st*) mov al, [r14+10h] mov byte ptr [r14+10h], 0 mov [rbx+10h], al mov rax, [r14+14h] mov [rbx+14h], rax loc_CD37C: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long coro::net::tls::client::tls_info::operator=(long long a1, int *a2) { int v3; // eax long long v4; // rsi char v5; // al if ( a2 != (int *)a1 ) { v3 = *a2; *a2 = 0; *(_DWORD *)a1 = v3; v4 = *((_QWORD *)a2 + 1); *((_QWORD *)a2 + 1) = 0LL; std::__uniq_ptr_impl<ssl_st,coro::net::tls::client::tls_deleter>::reset(a1 + 8, v4); v5 = *((_BYTE *)a2 + 16); *((_BYTE *)a2 + 16) = 0; *(_BYTE *)(a1 + 16) = v5; *(_QWORD *)(a1 + 20) = *(_QWORD *)(a2 + 5); } return a1; }
operator=: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP RSI,RDI JZ 0x001cd37c MOV R14,RSI MOV EAX,dword ptr [RSI] MOV dword ptr [RSI],0x0 MOV dword ptr [RBX],EAX LEA RDI,[RBX + 0x8] MOV RSI,qword ptr [RSI + 0x8] MOV qword ptr [R14 + 0x8],0x0 CALL 0x001cd3d4 MOV AL,byte ptr [R14 + 0x10] MOV byte ptr [R14 + 0x10],0x0 MOV byte ptr [RBX + 0x10],AL MOV RAX,qword ptr [R14 + 0x14] MOV qword ptr [RBX + 0x14],RAX LAB_001cd37c: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* coro::net::tls::client::tls_info::TEMPNAMEPLACEHOLDERVALUE(coro::net::tls::client::tls_info&&) */ tls_info * __thiscall coro::net::tls::client::tls_info::operator=(tls_info *this,tls_info *param_1) { tls_info tVar1; int4 uVar2; ssl_st *psVar3; if (param_1 != this) { uVar2 = *(int4 *)param_1; *(int4 *)param_1 = 0; *(int4 *)this = uVar2; psVar3 = *(ssl_st **)(param_1 + 8); *(int8 *)(param_1 + 8) = 0; std::__uniq_ptr_impl<ssl_st,coro::net::tls::client::tls_deleter>::reset ((__uniq_ptr_impl<ssl_st,coro::net::tls::client::tls_deleter> *)(this + 8),psVar3); tVar1 = param_1[0x10]; param_1[0x10] = (tls_info)0x0; this[0x10] = tVar1; *(int8 *)(this + 0x14) = *(int8 *)(param_1 + 0x14); } return this; }
49,178
mjr_textActual
aimrt_mujoco_sim/_deps/mujoco-src/src/render/render_gl2.c
void mjr_textActual(int font, const char* txt, const mjrContext* con, float x, float y, float z, float r, float g, float b) { // return if font is not installed if (!con->rangeFont) { return; } // shadow text if (font == mjFONT_SHADOW) { // blend shadow with black glListBase(con->baseFontShadow); glColor4f(0, 0, 0, 0.5); glRasterPos3f(x, y, z); glCallLists((GLsizei)strlen(txt), GL_UNSIGNED_BYTE, txt); // render text glListBase(con->baseFontNormal); glColor4f(r, g, b, 1); glRasterPos3f(x, y, z); glCallLists((GLsizei)strlen(txt), GL_UNSIGNED_BYTE, txt); } // regular text (normal or big) else { glListBase(font == mjFONT_BIG ? con->baseFontBig : con->baseFontNormal); glColor4f(r, g, b, 1); glRasterPos3f(x, y, z); glCallLists((GLsizei)strlen(txt), GL_UNSIGNED_BYTE, txt); } }
O0
c
mjr_textActual: subq $0x58, %rsp movl %edi, 0x54(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) vmovss %xmm0, 0x3c(%rsp) vmovss %xmm1, 0x38(%rsp) vmovss %xmm2, 0x34(%rsp) vmovss %xmm3, 0x30(%rsp) vmovss %xmm4, 0x2c(%rsp) vmovss %xmm5, 0x28(%rsp) movq 0x40(%rsp), %rax cmpl $0x0, 0x4c0(%rax) jne 0x480399 jmp 0x480566 cmpl $0x1, 0x54(%rsp) jne 0x4804b4 leaq 0x18fded(%rip), %rax # 0x610198 movq (%rax), %rax movq 0x40(%rsp), %rcx movl 0x4a8(%rcx), %edi callq *%rax vxorps %xmm2, %xmm2, %xmm2 vmovss 0xcc3fd(%rip), %xmm3 # 0x54c7c4 leaq 0x18f93a(%rip), %rax # 0x60fd08 vmovaps %xmm2, %xmm0 vmovaps %xmm2, %xmm1 callq *(%rax) leaq 0x190121(%rip), %rax # 0x610500 movq (%rax), %rax vmovss 0x3c(%rsp), %xmm0 vmovss 0x38(%rsp), %xmm1 vmovss 0x34(%rsp), %xmm2 callq *%rax leaq 0x18f823(%rip), %rax # 0x60fc20 movq (%rax), %rax movq %rax, 0x18(%rsp) movq 0x48(%rsp), %rdi callq 0x4a0e0 movq %rax, %rcx movq 0x18(%rsp), %rax movl %ecx, %edi movq 0x48(%rsp), %rdx movl $0x1401, %esi # imm = 0x1401 callq *%rax leaq 0x18fd6c(%rip), %rax # 0x610198 movq (%rax), %rax movq 0x40(%rsp), %rcx movl 0x4a4(%rcx), %edi callq *%rax leaq 0x18f8c5(%rip), %rax # 0x60fd08 movq (%rax), %rax vmovss 0x30(%rsp), %xmm0 vmovss 0x2c(%rsp), %xmm1 vmovss 0x28(%rsp), %xmm2 vmovss 0xcc360(%rip), %xmm3 # 0x54c7c0 callq *%rax leaq 0x190097(%rip), %rax # 0x610500 movq (%rax), %rax vmovss 0x3c(%rsp), %xmm0 vmovss 0x38(%rsp), %xmm1 vmovss 0x34(%rsp), %xmm2 callq *%rax leaq 0x18f799(%rip), %rax # 0x60fc20 movq (%rax), %rax movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rdi callq 0x4a0e0 movq %rax, %rcx movq 0x20(%rsp), %rax movl %ecx, %edi movq 0x48(%rsp), %rdx movl $0x1401, %esi # imm = 0x1401 callq *%rax jmp 0x480566 leaq 0x18fcdd(%rip), %rax # 0x610198 movq (%rax), %rax movq %rax, 0x10(%rsp) cmpl $0x2, 0x54(%rsp) jne 0x4804db movq 0x40(%rsp), %rax movl 0x4ac(%rax), %eax movl %eax, 0xc(%rsp) jmp 0x4804ea movq 0x40(%rsp), %rax movl 0x4a4(%rax), %eax movl %eax, 0xc(%rsp) movq 0x10(%rsp), %rax movl 0xc(%rsp), %edi callq *%rax leaq 0x18f80c(%rip), %rax # 0x60fd08 movq (%rax), %rax vmovss 0x30(%rsp), %xmm0 vmovss 0x2c(%rsp), %xmm1 vmovss 0x28(%rsp), %xmm2 vmovss 0xcc2a7(%rip), %xmm3 # 0x54c7c0 callq *%rax leaq 0x18ffde(%rip), %rax # 0x610500 movq (%rax), %rax vmovss 0x3c(%rsp), %xmm0 vmovss 0x38(%rsp), %xmm1 vmovss 0x34(%rsp), %xmm2 callq *%rax leaq 0x18f6e0(%rip), %rax # 0x60fc20 movq (%rax), %rax movq %rax, (%rsp) movq 0x48(%rsp), %rdi callq 0x4a0e0 movq %rax, %rcx movq (%rsp), %rax movl %ecx, %edi movq 0x48(%rsp), %rdx movl $0x1401, %esi # imm = 0x1401 callq *%rax addq $0x58, %rsp retq nopl (%rax,%rax)
mjr_textActual: sub rsp, 58h mov [rsp+58h+var_4], edi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx vmovss [rsp+58h+var_1C], xmm0 vmovss [rsp+58h+var_20], xmm1 vmovss [rsp+58h+var_24], xmm2 vmovss [rsp+58h+var_28], xmm3 vmovss [rsp+58h+var_2C], xmm4 vmovss [rsp+58h+var_30], xmm5 mov rax, [rsp+58h+var_18] cmp dword ptr [rax+4C0h], 0 jnz short loc_480399 jmp loc_480566 loc_480399: cmp [rsp+58h+var_4], 1 jnz loc_4804B4 lea rax, mjGlad_glListBase mov rax, [rax] mov rcx, [rsp+58h+var_18] mov edi, [rcx+4A8h] call rax vxorps xmm2, xmm2, xmm2 vmovss xmm3, cs:dword_54C7C4 lea rax, mjGlad_glColor4f vmovaps xmm0, xmm2 vmovaps xmm1, xmm2 call qword ptr [rax] lea rax, mjGlad_glRasterPos3f mov rax, [rax] vmovss xmm0, [rsp+58h+var_1C] vmovss xmm1, [rsp+58h+var_20] vmovss xmm2, [rsp+58h+var_24] call rax lea rax, mjGlad_glCallLists mov rax, [rax] mov [rsp+58h+var_40], rax mov rdi, [rsp+58h+var_10] call _strlen mov rcx, rax mov rax, [rsp+58h+var_40] mov edi, ecx mov rdx, [rsp+58h+var_10] mov esi, 1401h call rax lea rax, mjGlad_glListBase mov rax, [rax] mov rcx, [rsp+58h+var_18] mov edi, [rcx+4A4h] call rax lea rax, mjGlad_glColor4f mov rax, [rax] vmovss xmm0, [rsp+58h+var_28] vmovss xmm1, [rsp+58h+var_2C] vmovss xmm2, [rsp+58h+var_30] vmovss xmm3, cs:dword_54C7C0 call rax lea rax, mjGlad_glRasterPos3f mov rax, [rax] vmovss xmm0, [rsp+58h+var_1C] vmovss xmm1, [rsp+58h+var_20] vmovss xmm2, [rsp+58h+var_24] call rax lea rax, mjGlad_glCallLists mov rax, [rax] mov [rsp+58h+var_38], rax mov rdi, [rsp+58h+var_10] call _strlen mov rcx, rax mov rax, [rsp+58h+var_38] mov edi, ecx mov rdx, [rsp+58h+var_10] mov esi, 1401h call rax jmp loc_480566 loc_4804B4: lea rax, mjGlad_glListBase mov rax, [rax] mov [rsp+58h+var_48], rax cmp [rsp+58h+var_4], 2 jnz short loc_4804DB mov rax, [rsp+58h+var_18] mov eax, [rax+4ACh] mov [rsp+58h+var_4C], eax jmp short loc_4804EA loc_4804DB: mov rax, [rsp+58h+var_18] mov eax, [rax+4A4h] mov [rsp+58h+var_4C], eax loc_4804EA: mov rax, [rsp+58h+var_48] mov edi, [rsp+58h+var_4C] call rax lea rax, mjGlad_glColor4f mov rax, [rax] vmovss xmm0, [rsp+58h+var_28] vmovss xmm1, [rsp+58h+var_2C] vmovss xmm2, [rsp+58h+var_30] vmovss xmm3, cs:dword_54C7C0 call rax lea rax, mjGlad_glRasterPos3f mov rax, [rax] vmovss xmm0, [rsp+58h+var_1C] vmovss xmm1, [rsp+58h+var_20] vmovss xmm2, [rsp+58h+var_24] call rax lea rax, mjGlad_glCallLists mov rax, [rax] mov [rsp+58h+var_58], rax mov rdi, [rsp+58h+var_10] call _strlen mov rcx, rax mov rax, [rsp+58h+var_58] mov edi, ecx mov rdx, [rsp+58h+var_10] mov esi, 1401h call rax loc_480566: add rsp, 58h retn
long long mjr_textActual( int a1, long long a2, unsigned int *a3, __m128 _XMM0, __m128 _XMM1, __m128 _XMM2, __m128 _XMM3, __m128 _XMM4, __m128 _XMM5) { long long result; // rax unsigned int v17; // eax unsigned int v25; // eax unsigned int v33; // eax long long ( *v34)(_QWORD, long long, long long); // [rsp+0h] [rbp-58h] unsigned int v35; // [rsp+Ch] [rbp-4Ch] void ( *v36)(_QWORD, long long, long long); // [rsp+18h] [rbp-40h] long long ( *v37)(_QWORD, long long, long long); // [rsp+20h] [rbp-38h] __asm { vmovss [rsp+58h+var_1C], xmm0 vmovss [rsp+58h+var_20], xmm1 vmovss [rsp+58h+var_24], xmm2 vmovss [rsp+58h+var_28], xmm3 vmovss [rsp+58h+var_2C], xmm4 vmovss [rsp+58h+var_30], xmm5 } result = (long long)a3; if ( a3[304] ) { if ( a1 == 1 ) { mjGlad_glListBase(a3[298]); __asm { vxorps xmm2, xmm2, xmm2 vmovss xmm3, cs:dword_54C7C4 vmovaps xmm0, xmm2 vmovaps xmm1, xmm2 } mjGlad_glColor4f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, *(double *)&_XMM3); __asm { vmovss xmm0, [rsp+58h+var_1C] vmovss xmm1, [rsp+58h+var_20] vmovss xmm2, [rsp+58h+var_24] } mjGlad_glRasterPos3f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2); v36 = (void ( *)(_QWORD, long long, long long))mjGlad_glCallLists; v17 = strlen(a2, a2); v36(v17, 5121LL, a2); mjGlad_glListBase(a3[297]); __asm { vmovss xmm0, [rsp+58h+var_28] vmovss xmm1, [rsp+58h+var_2C] vmovss xmm2, [rsp+58h+var_30] vmovss xmm3, cs:dword_54C7C0 } mjGlad_glColor4f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, *(double *)&_XMM3); __asm { vmovss xmm0, [rsp+58h+var_1C] vmovss xmm1, [rsp+58h+var_20] vmovss xmm2, [rsp+58h+var_24] } mjGlad_glRasterPos3f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2); v37 = (long long ( *)(_QWORD, long long, long long))mjGlad_glCallLists; v25 = strlen(a2, 5121LL); return v37(v25, 5121LL, a2); } else { if ( a1 == 2 ) v35 = a3[299]; else v35 = a3[297]; mjGlad_glListBase(v35); __asm { vmovss xmm0, [rsp+58h+var_28] vmovss xmm1, [rsp+58h+var_2C] vmovss xmm2, [rsp+58h+var_30] vmovss xmm3, cs:dword_54C7C0 } mjGlad_glColor4f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, *(double *)&_XMM3); __asm { vmovss xmm0, [rsp+58h+var_1C] vmovss xmm1, [rsp+58h+var_20] vmovss xmm2, [rsp+58h+var_24] } mjGlad_glRasterPos3f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2); v34 = (long long ( *)(_QWORD, long long, long long))mjGlad_glCallLists; v33 = strlen(a2, a2); return v34(v33, 5121LL, a2); } } return result; }
~new_allocator: MOV qword ptr [RSP + -0x8],RDI RET
/* __gnu_cxx::new_allocator<char const*>::~new_allocator() */ void __thiscall __gnu_cxx::new_allocator<char_const*>::~new_allocator(new_allocator<char_const*> *this) { return; }
49,179
mjr_textActual
aimrt_mujoco_sim/_deps/mujoco-src/src/render/render_gl2.c
void mjr_textActual(int font, const char* txt, const mjrContext* con, float x, float y, float z, float r, float g, float b) { // return if font is not installed if (!con->rangeFont) { return; } // shadow text if (font == mjFONT_SHADOW) { // blend shadow with black glListBase(con->baseFontShadow); glColor4f(0, 0, 0, 0.5); glRasterPos3f(x, y, z); glCallLists((GLsizei)strlen(txt), GL_UNSIGNED_BYTE, txt); // render text glListBase(con->baseFontNormal); glColor4f(r, g, b, 1); glRasterPos3f(x, y, z); glCallLists((GLsizei)strlen(txt), GL_UNSIGNED_BYTE, txt); } // regular text (normal or big) else { glListBase(font == mjFONT_BIG ? con->baseFontBig : con->baseFontNormal); glColor4f(r, g, b, 1); glRasterPos3f(x, y, z); glCallLists((GLsizei)strlen(txt), GL_UNSIGNED_BYTE, txt); } }
O3
c
mjr_textActual: cmpl $0x0, 0x4c0(%rdx) je 0x16f656 pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movq %rsi, %rbx vmovss %xmm3, 0xc(%rsp) vmovss %xmm4, 0x10(%rsp) vmovss %xmm5, 0x14(%rsp) vmovss %xmm0, (%rsp) vmovss %xmm1, 0x4(%rsp) vmovss %xmm2, 0x8(%rsp) leaq 0x116ab3(%rip), %r15 # 0x286098 movq (%r15), %rax cmpl $0x1, %edi jne 0x16f657 movl 0x4a8(%r14), %edi callq *%rax leaq 0x11660b(%rip), %rax # 0x285c08 vmovss 0x4e05f(%rip), %xmm3 # 0x1bd664 vxorps %xmm0, %xmm0, %xmm0 vxorps %xmm1, %xmm1, %xmm1 vxorps %xmm2, %xmm2, %xmm2 callq *(%rax) leaq 0x116de6(%rip), %rax # 0x286400 vmovss (%rsp), %xmm0 vmovss 0x4(%rsp), %xmm1 vmovss 0x8(%rsp), %xmm2 callq *(%rax) leaq 0x1164ec(%rip), %rax # 0x285b20 movq (%rax), %r12 movq %rbx, %rdi callq 0x2de60 movl %eax, %edi movl $0x1401, %esi # imm = 0x1401 movq %rbx, %rdx callq *%r12 movq (%r15), %rax movl $0x4a4, %ecx # imm = 0x4A4 jmp 0x16f667 retq xorl %ecx, %ecx cmpl $0x2, %edi sete %cl leaq 0x4a4(,%rcx,8), %rcx movl (%r14,%rcx), %edi callq *%rax leaq 0x116594(%rip), %rax # 0x285c08 vmovss 0x4dfd4(%rip), %xmm3 # 0x1bd650 vmovss 0xc(%rsp), %xmm0 vmovss 0x10(%rsp), %xmm1 vmovss 0x14(%rsp), %xmm2 callq *(%rax) leaq 0x116d69(%rip), %rax # 0x286400 vmovss (%rsp), %xmm0 vmovss 0x4(%rsp), %xmm1 vmovss 0x8(%rsp), %xmm2 callq *(%rax) leaq 0x11646f(%rip), %rax # 0x285b20 movq (%rax), %r14 movq %rbx, %rdi callq 0x2de60 movl %eax, %edi movl $0x1401, %esi # imm = 0x1401 movq %rbx, %rdx movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rax
mjr_textActual: cmp dword ptr [rdx+4C0h], 0 jz locret_16F656 push r15 push r14 push r12 push rbx sub rsp, 18h mov r14, rdx mov rbx, rsi vmovss [rsp+38h+var_2C], xmm3 vmovss [rsp+38h+var_28], xmm4 vmovss [rsp+38h+var_24], xmm5 vmovss [rsp+38h+var_38], xmm0 vmovss [rsp+38h+var_34], xmm1 vmovss [rsp+38h+var_30], xmm2 lea r15, mjGlad_glListBase mov rax, [r15] cmp edi, 1 jnz short loc_16F657 mov edi, [r14+4A8h] call rax lea rax, mjGlad_glColor4f vmovss xmm3, cs:dword_1BD664 vxorps xmm0, xmm0, xmm0 vxorps xmm1, xmm1, xmm1 vxorps xmm2, xmm2, xmm2 call qword ptr [rax] lea rax, mjGlad_glRasterPos3f vmovss xmm0, [rsp+38h+var_38] vmovss xmm1, [rsp+38h+var_34] vmovss xmm2, [rsp+38h+var_30] call qword ptr [rax] lea rax, mjGlad_glCallLists mov r12, [rax] mov rdi, rbx call _strlen mov edi, eax mov esi, 1401h mov rdx, rbx call r12 mov rax, [r15] mov ecx, 4A4h jmp short loc_16F667 locret_16F656: retn loc_16F657: xor ecx, ecx cmp edi, 2 setz cl lea rcx, ds:4A4h[rcx*8] loc_16F667: mov edi, [r14+rcx] call rax lea rax, mjGlad_glColor4f vmovss xmm3, cs:dword_1BD650 vmovss xmm0, [rsp+38h+var_2C] vmovss xmm1, [rsp+38h+var_28] vmovss xmm2, [rsp+38h+var_24] call qword ptr [rax] lea rax, mjGlad_glRasterPos3f vmovss xmm0, [rsp+38h+var_38] vmovss xmm1, [rsp+38h+var_34] vmovss xmm2, [rsp+38h+var_30] call qword ptr [rax] lea rax, mjGlad_glCallLists mov r14, [rax] mov rdi, rbx call _strlen mov edi, eax mov esi, 1401h mov rdx, rbx mov rax, r14 add rsp, 18h pop rbx pop r12 pop r14 pop r15 jmp rax
void mjr_textActual( int a1, long long a2, unsigned int *a3, __m128 _XMM0, __m128 _XMM1, __m128 _XMM2, __m128 _XMM3, __m128 _XMM4, __m128 _XMM5, double a10, double a11) { double v16; // xmm4_8 double v17; // xmm5_8 void ( *v21)(_QWORD, long long, long long); // r12 unsigned int v22; // eax double v23; // xmm4_8 double v24; // xmm5_8 void ( *v32)(_QWORD, long long, long long); // r14 unsigned int v33; // eax double v34; // [rsp+0h] [rbp-38h] double v37; // [rsp+8h] [rbp-30h] if ( a3[304] ) { __asm { vmovss [rsp+38h+var_2C], xmm3 vmovss [rsp+38h+var_28], xmm4 vmovss [rsp+38h+var_24], xmm5 vmovss [rsp+38h+var_38], xmm0 vmovss [rsp+38h+var_34], xmm1 vmovss [rsp+38h+var_30], xmm2 } if ( a1 == 1 ) { *(double *)_XMM0.m128_u64 = mjGlad_glListBase(a3[298]); __asm { vmovss xmm3, cs:dword_1BD664 vxorps xmm0, xmm0, xmm0 vxorps xmm1, xmm1, xmm1 vxorps xmm2, xmm2, xmm2 } mjGlad_glColor4f( *(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, *(double *)&_XMM3, v16, v17, a10, a11, v34, v37); __asm { vmovss xmm0, [rsp+38h+var_38] vmovss xmm1, [rsp+38h+var_34] vmovss xmm2, [rsp+38h+var_30] } mjGlad_glRasterPos3f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2); v21 = (void ( *)(_QWORD, long long, long long))mjGlad_glCallLists; v22 = strlen(a2); v21(v22, 5121LL, a2); mjGlad_glListBase(a3[297]); } else { mjGlad_glListBase(a3[2 * (a1 == 2) + 297]); } __asm { vmovss xmm3, cs:dword_1BD650 vmovss xmm0, [rsp+38h+var_2C] vmovss xmm1, [rsp+38h+var_28] vmovss xmm2, [rsp+38h+var_24] } mjGlad_glColor4f( *(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, *(double *)&_XMM3, v23, v24, a10, a11, v34, v37); __asm { vmovss xmm0, [rsp+38h+var_38] vmovss xmm1, [rsp+38h+var_34] vmovss xmm2, [rsp+38h+var_30] } mjGlad_glRasterPos3f(*(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2); v32 = (void ( *)(_QWORD, long long, long long))mjGlad_glCallLists; v33 = strlen(a2); v32(v33, 5121LL, a2); } }
49,180
convert_to_printable(char*, unsigned long, char const*, unsigned long, charset_info_st const*, unsigned long)
eloqsql/sql/sql_string.cc
uint convert_to_printable(char *to, size_t to_len, const char *from, size_t from_len, CHARSET_INFO *from_cs, size_t nbytes /*= 0*/) { /* needs at least 8 bytes for '\xXX...' and zero byte */ DBUG_ASSERT(to_len >= 8); char *t= to; char *t_end= to + to_len - 1; // '- 1' is for the '\0' at the end const char *f= from; const char *f_end= from + (nbytes ? MY_MIN(from_len, nbytes) : from_len); char *dots= to; // last safe place to append '...' if (!f || t == t_end) return 0; for (; t < t_end && f < f_end; f++) { /* If the source string is ASCII compatible (mbminlen==1) and the source character is in ASCII printable range (0x20..0x7F), then display the character as is. Otherwise, if the source string is not ASCII compatible (e.g. UCS2), or the source character is not in the printable range, then print the character using HEX notation. */ if (((unsigned char) *f) >= 0x20 && ((unsigned char) *f) <= 0x7F && from_cs->mbminlen == 1) { *t++= *f; } else { if (t_end - t < 4) // \xXX break; *t++= '\\'; *t++= 'x'; APPEND_HEX(t, *f); } if (t_end - t >= 3) // '...' dots= t; } if (f < from + from_len) memcpy(dots, STRING_WITH_LEN("...\0")); else *t= '\0'; return (uint) (t - to); }
O3
cpp
convert_to_printable(char*, unsigned long, char const*, unsigned long, charset_info_st const*, unsigned long): addq %rdi, %rsi decq %rsi cmpq %r9, %rcx movq %r9, %r10 cmovbq %rcx, %r10 testq %r9, %r9 cmoveq %rcx, %r10 testq %rdx, %rdx sete %r9b cmpq %rdi, %rsi sete %r11b xorl %eax, %eax orb %r9b, %r11b jne 0x72a2f pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx cmpq %rdi, %rsi setbe %al testq %r10, %r10 setle %r9b orb %al, %r9b movq %rdi, %rax movq %rdx, %r11 movq %rdi, %r9 jne 0x72a13 addq %rdx, %r10 leaq 0x33c930(%rip), %rbx # 0x3af2d0 movq %rdi, %r9 movq %rdx, %r11 movq %rdi, %rax movb (%r11), %r14b cmpb $0x20, %r14b jl 0x729c4 cmpl $0x1, 0x98(%r8) jne 0x729c4 movb %r14b, (%rax) incq %rax jmp 0x729f8 movq %rsi, %r14 subq %rax, %r14 cmpq $0x4, %r14 jl 0x72a13 movw $0x785c, (%rax) # imm = 0x785C movzbl (%r11), %r14d movl %r14d, %r15d shrl $0x4, %r15d movb (%rbx,%r15), %r15b movb %r15b, 0x2(%rax) andl $0xf, %r14d movb (%rbx,%r14), %r14b movb %r14b, 0x3(%rax) addq $0x4, %rax movq %rsi, %r14 subq %rax, %r14 cmpq $0x3, %r14 cmovgeq %rax, %r9 incq %r11 cmpq %rax, %rsi jbe 0x72a13 cmpq %r10, %r11 jb 0x729a9 addq %rcx, %rdx cmpq %rdx, %r11 jae 0x72a24 movl $0x2e2e2e, (%r9) # imm = 0x2E2E2E jmp 0x72a27 movb $0x0, (%rax) subl %edi, %eax popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20convert_to_printablePcmPKcmPK15charset_info_stm: add rsi, rdi dec rsi cmp rcx, r9 mov r10, r9 cmovb r10, rcx test r9, r9 cmovz r10, rcx test rdx, rdx setz r9b cmp rsi, rdi setz r11b xor eax, eax or r11b, r9b jnz locret_72A2F push rbp mov rbp, rsp push r15 push r14 push rbx cmp rsi, rdi setbe al test r10, r10 setle r9b or r9b, al mov rax, rdi mov r11, rdx mov r9, rdi jnz short loc_72A13 add r10, rdx lea rbx, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov r9, rdi mov r11, rdx mov rax, rdi loc_729A9: mov r14b, [r11] cmp r14b, 20h ; ' ' jl short loc_729C4 cmp dword ptr [r8+98h], 1 jnz short loc_729C4 mov [rax], r14b inc rax jmp short loc_729F8 loc_729C4: mov r14, rsi sub r14, rax cmp r14, 4 jl short loc_72A13 mov word ptr [rax], 785Ch movzx r14d, byte ptr [r11] mov r15d, r14d shr r15d, 4 mov r15b, [rbx+r15] mov [rax+2], r15b and r14d, 0Fh mov r14b, [rbx+r14] mov [rax+3], r14b add rax, 4 loc_729F8: mov r14, rsi sub r14, rax cmp r14, 3 cmovge r9, rax inc r11 cmp rsi, rax jbe short loc_72A13 cmp r11, r10 jb short loc_729A9 loc_72A13: add rdx, rcx cmp r11, rdx jnb short loc_72A24 mov dword ptr [r9], offset unk_2E2E2E jmp short loc_72A27 loc_72A24: mov byte ptr [rax], 0 loc_72A27: sub eax, edi pop rbx pop r14 pop r15 pop rbp locret_72A2F: retn
long long convert_to_printable( _BYTE *a1, long long a2, _BYTE *a3, unsigned long long a4, long long a5, unsigned long long a6) { unsigned long long v6; // rsi long long v7; // r10 long long result; // rax _BYTE *v9; // rax _BYTE *v10; // r11 _DWORD *v11; // r9 unsigned long long v12; // r10 char v13; // r14 v6 = (unsigned long long)&a1[a2 - 1]; v7 = a6; if ( a4 < a6 ) v7 = a4; if ( !a6 ) v7 = a4; result = 0LL; if ( a3 != 0LL && v6 != (_QWORD)a1 ) { v9 = a1; v10 = a3; v11 = a1; if ( v6 > (unsigned long long)a1 && v7 > 0 ) { v12 = (unsigned long long)&a3[v7]; v11 = a1; v10 = a3; v9 = a1; do { if ( (char)*v10 >= 32 && *(_DWORD *)(a5 + 152) == 1 ) { *v9++ = *v10; } else { if ( (long long)(v6 - (_QWORD)v9) < 4 ) break; *(_WORD *)v9 = 30812; v13 = *v10; v9[2] = dig_vec_upper[(unsigned __int8)*v10 >> 4]; v9[3] = dig_vec_upper[v13 & 0xF]; v9 += 4; } if ( (long long)(v6 - (_QWORD)v9) >= 3 ) v11 = v9; ++v10; } while ( v6 > (unsigned long long)v9 && (unsigned long long)v10 < v12 ); } if ( v10 >= &a3[a4] ) *v9 = 0; else *v11 = (_DWORD)&unk_2E2E2E; return (unsigned int)((_DWORD)v9 - (_DWORD)a1); } return result; }
convert_to_printable: ADD RSI,RDI DEC RSI CMP RCX,R9 MOV R10,R9 CMOVC R10,RCX TEST R9,R9 CMOVZ R10,RCX TEST RDX,RDX SETZ R9B CMP RSI,RDI SETZ R11B XOR EAX,EAX OR R11B,R9B JNZ 0x00172a2f PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX CMP RSI,RDI SETBE AL TEST R10,R10 SETLE R9B OR R9B,AL MOV RAX,RDI MOV R11,RDX MOV R9,RDI JNZ 0x00172a13 ADD R10,RDX LEA RBX,[0x4af2d0] MOV R9,RDI MOV R11,RDX MOV RAX,RDI LAB_001729a9: MOV R14B,byte ptr [R11] CMP R14B,0x20 JL 0x001729c4 CMP dword ptr [R8 + 0x98],0x1 JNZ 0x001729c4 MOV byte ptr [RAX],R14B INC RAX JMP 0x001729f8 LAB_001729c4: MOV R14,RSI SUB R14,RAX CMP R14,0x4 JL 0x00172a13 MOV word ptr [RAX],0x785c MOVZX R14D,byte ptr [R11] MOV R15D,R14D SHR R15D,0x4 MOV R15B,byte ptr [RBX + R15*0x1] MOV byte ptr [RAX + 0x2],R15B AND R14D,0xf MOV R14B,byte ptr [RBX + R14*0x1] MOV byte ptr [RAX + 0x3],R14B ADD RAX,0x4 LAB_001729f8: MOV R14,RSI SUB R14,RAX CMP R14,0x3 CMOVGE R9,RAX INC R11 CMP RSI,RAX JBE 0x00172a13 CMP R11,R10 JC 0x001729a9 LAB_00172a13: ADD RDX,RCX CMP R11,RDX JNC 0x00172a24 MOV dword ptr [R9],0x2e2e2e JMP 0x00172a27 LAB_00172a24: MOV byte ptr [RAX],0x0 LAB_00172a27: SUB EAX,EDI POP RBX POP R14 POP R15 POP RBP LAB_00172a2f: RET
/* convert_to_printable(char*, unsigned long, char const*, unsigned long, charset_info_st const*, unsigned long) */ int convert_to_printable (char *param_1,ulong param_2,char *param_3,ulong param_4,charset_info_st *param_5, ulong param_6) { byte bVar1; int iVar2; byte *pbVar3; int iVar4; byte *pbVar5; ulong uVar6; byte *pbVar7; iVar4 = (int)param_1; pbVar3 = (byte *)(param_1 + (param_2 - 1)); uVar6 = param_6; if (param_4 < param_6) { uVar6 = param_4; } if (param_6 == 0) { uVar6 = param_4; } iVar2 = 0; if (pbVar3 != (byte *)param_1 && param_3 != (char *)0x0) { pbVar5 = (byte *)param_1; pbVar7 = (byte *)param_3; if (0 < (long)uVar6 && param_1 < pbVar3) { do { if (((char)*pbVar7 < ' ') || (*(int *)(param_5 + 0x98) != 1)) { if ((long)pbVar3 - (long)param_1 < 4) break; ((byte *)param_1)[0] = 0x5c; ((byte *)param_1)[1] = 0x78; bVar1 = *pbVar7; ((byte *)param_1)[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[bVar1 >> 4]; ((byte *)param_1)[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[bVar1 & 0xf]; param_1 = (char *)((byte *)param_1 + 4); } else { *param_1 = *pbVar7; param_1 = (char *)((byte *)param_1 + 1); } if (2 < (long)pbVar3 - (long)param_1) { pbVar5 = (byte *)param_1; } pbVar7 = pbVar7 + 1; if ((pbVar3 <= param_1) || (param_3 + uVar6 <= pbVar7)) break; } while( true ); } if (pbVar7 < param_3 + param_4) { pbVar5[0] = 0x2e; pbVar5[1] = 0x2e; pbVar5[2] = 0x2e; pbVar5[3] = 0; } else { *param_1 = 0; } iVar2 = (int)param_1 - iVar4; } return iVar2; }
49,181
mysql_stmt_fetch_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_fetch_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_fetch, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_fetch(stmt); return 0; }) }
O0
c
mysql_stmt_fetch_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x4cab8 movq -0x18(%rbp), %rdi callq 0x17630 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x4cbc9 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x4cbe0 leaq -0x30(%rbp), %rdx callq 0x4eeb0 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0x4cb26 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x4cbc9 cmpl $0x0, -0x1c(%rbp) jge 0x4cbb5 jmp 0x4cb32 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x16546(%rip), %rax # 0x630a0 movq (%rax), %rsi movl $0x5, %edx callq 0x172e0 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x16524(%rip), %rax # 0x630b0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x172e0 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x4cbc2 movq -0x28(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_fetch_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_4CAB8 mov rdi, [rbp+var_18] call _mysql_stmt_fetch@libmariadbclient_18 mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_4CBC9 loc_4CAB8: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_fetch_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_4CB26 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_4CBC9 loc_4CB26: cmp [rbp+var_1C], 0 jge loc_4CBB5 jmp short $+2 loc_4CB32: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_4CBC2 loc_4CBB5: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_4CBC2: mov [rbp+var_4], 0 loc_4CBC9: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_fetch_start(_DWORD *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF unsigned int *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] _DWORD *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_fetch_start_internal, &v3); *((_BYTE *)v4 + 21) = 0; *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[2]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } } else { *v7 = mysql_stmt_fetch_libmariadbclient_18(v6); return 0; } }
mysql_stmt_fetch_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0014cab8 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00117630 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014cbc9 LAB_0014cab8: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x14cbe0] LEA RDX,[RBP + -0x30] CALL 0x0014eeb0 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x0014cb26 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014cbc9 LAB_0014cb26: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x0014cbb5 JMP 0x0014cb32 LAB_0014cb32: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x1630a0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x001172e0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x1630b0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x001172e0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x0014cbc2 LAB_0014cbb5: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_0014cbc2: MOV dword ptr [RBP + -0x4],0x0 LAB_0014cbc9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_fetch_start(int4 *param_1,long param_2) { int4 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int4 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_fetch(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_fetch_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_001630f0, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_30[2]; } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
49,182
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O0
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp subq $0x50, %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) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x28(%rbp), %r8 movq -0x28(%rbp), %r9 addq -0x30(%rbp), %r9 leaq -0x1c(%rbp), %rcx callq 0x630d0 addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x633f1 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x63451 cmpl $0x0, -0x1c(%rbp) je 0x63451 movl 0x10(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x63451 movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax imull $0x3, -0x1c(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x63434 imull $0x3, -0x1c(%rbp), %eax movl %eax, %eax movq %rax, -0x48(%rbp) jmp 0x63436 movq -0x10(%rbp), %rdi movq -0x48(%rbp), %rdx xorl %esi, %esi callq 0x24170 movq -0x48(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl 0x10(%rbp), %edx xorl %ecx, %ecx callq 0x445d0 movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x63498 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x63498 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x24170 movq -0x40(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp sub rsp, 50h 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 rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_40] mov r8, [rbp+var_28] mov r9, [rbp+var_28] add r9, [rbp+var_30] lea rcx, [rbp+var_1C] call my_strnxfrm_unicode_full_bin_internal add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short $+2 loc_633F1: mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_63451 cmp [rbp+var_1C], 0 jz short loc_63451 mov eax, [rbp+arg_0] and eax, 40h cmp eax, 0 jz short loc_63451 mov rax, [rbp+var_40] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_48] imul ecx, [rbp+var_1C], 3 mov ecx, ecx cmp rax, rcx jbe short loc_63434 imul eax, [rbp+var_1C], 3 mov eax, eax mov [rbp+var_48], rax loc_63434: jmp short $+2 loc_63436: mov rdi, [rbp+var_10] mov rdx, [rbp+var_48] xor esi, esi call _memset mov rax, [rbp+var_48] add rax, [rbp+var_10] mov [rbp+var_10], rax loc_63451: mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+arg_0] xor ecx, ecx call my_strxfrm_desc_and_reverse mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_63498 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_63498 mov rdi, [rbp+var_10] mov rdx, [rbp+var_40] mov rax, [rbp+var_10] sub rdx, rax xor esi, esi call _memset mov rax, [rbp+var_40] mov [rbp+var_10], rax loc_63498: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 50h pop rbp retn
unsigned long long my_strnxfrm_unicode_full_nopad_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { _BYTE *v7; // rax unsigned long long v9; // [rsp+8h] [rbp-48h] unsigned long long v10; // [rsp+10h] [rbp-40h] int v11; // [rsp+34h] [rbp-1Ch] BYREF long long v12; // [rsp+38h] [rbp-18h] unsigned long long v13; // [rsp+40h] [rbp-10h] long long v14; // [rsp+48h] [rbp-8h] v14 = a1; v13 = (unsigned long long)a2; v12 = a3; v11 = a4; v10 = (unsigned long long)&a2[a3]; v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v11, a5, a6 + a5); v13 += (unsigned long long)v7; if ( v13 < v10 && v11 && (a7 & 0x40) != 0 ) { v9 = v10 - v13; if ( v10 - v13 > (unsigned int)(3 * v11) ) v9 = (unsigned int)(3 * v11); memset(v13, 0LL, v9); v13 += v9; } my_strxfrm_desc_and_reverse(a2, v13, a7, 0); if ( (a7 & 0x80) != 0 && v13 < v10 ) { memset(v13, 0LL, v10 - v13); v13 = v10; } return v13 - (_QWORD)a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x28] ADD R9,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x1c] CALL 0x001630d0 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x001633f1 LAB_001633f1: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00163451 CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00163451 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x40 CMP EAX,0x0 JZ 0x00163451 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] IMUL ECX,dword ptr [RBP + -0x1c],0x3 MOV ECX,ECX CMP RAX,RCX JBE 0x00163434 IMUL EAX,dword ptr [RBP + -0x1c],0x3 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX LAB_00163434: JMP 0x00163436 LAB_00163436: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x48] XOR ESI,ESI CALL 0x00124170 MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX LAB_00163451: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + 0x10] XOR ECX,ECX CALL 0x001445d0 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x00163498 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00163498 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX XOR ESI,ESI CALL 0x00124170 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x10],RAX LAB_00163498: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x50 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; size_t local_50; int local_24; long local_20; void *local_18; int8 local_10; pvVar1 = (void *)(param_2 + param_3); local_24 = param_4; local_20 = param_3; local_18 = (void *)param_2; local_10 = param_1; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_24,param_5,param_5 + param_6); local_18 = (void *)(lVar2 + (long)local_18); if (((local_18 < pvVar1) && (local_24 != 0)) && ((param_7 & 0x40) != 0)) { local_50 = (long)pvVar1 - (long)local_18; if ((uint)(local_24 * 3) < local_50) { local_50 = (size_t)(uint)(local_24 * 3); } memset(local_18,0,local_50); local_18 = (void *)(local_50 + (long)local_18); } my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0); if (((param_7 & 0x80) != 0) && (local_18 < pvVar1)) { memset(local_18,0,(long)pvVar1 - (long)local_18); local_18 = pvVar1; } return (long)local_18 - param_2; }
49,183
js_std_file_get
bluesky950520[P]quickjs/quickjs-libc.c
static FILE *js_std_file_get(JSContext *ctx, JSValue obj) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSSTDFile *s = JS_GetOpaque2(ctx, obj, ts->std_file_class_id); if (!s) return NULL; if (!s->f) { JS_ThrowTypeError(ctx, "invalid file handle"); return NULL; } return s->f; }
O0
c
js_std_file_get: subq $0x48, %rsp movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0x27f00 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi callq 0x115d0 movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rdi movq 0x18(%rsp), %rax movl 0x78(%rax), %ecx movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x383b0 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x13ae5 movq $0x0, 0x40(%rsp) jmp 0x13b24 movq 0x10(%rsp), %rax cmpq $0x0, (%rax) jne 0x13b17 movq 0x28(%rsp), %rdi leaq 0xf6124(%rip), %rsi # 0x109c20 movb $0x0, %al callq 0x2d300 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq $0x0, 0x40(%rsp) jmp 0x13b24 movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nop
js_std_file_get: sub rsp, 48h mov [rsp+48h+var_18], rsi mov [rsp+48h+var_10], rdx mov [rsp+48h+var_20], rdi mov rdi, [rsp+48h+var_20] call JS_GetRuntime mov [rsp+48h+var_28], rax mov rdi, [rsp+48h+var_28] call js_get_thread_state mov [rsp+48h+var_30], rax mov rdi, [rsp+48h+var_20] mov rax, [rsp+48h+var_30] mov ecx, [rax+78h] mov rsi, [rsp+48h+var_18] mov rdx, [rsp+48h+var_10] call JS_GetOpaque2 mov [rsp+48h+var_38], rax cmp [rsp+48h+var_38], 0 jnz short loc_13AE5 mov [rsp+48h+var_8], 0 jmp short loc_13B24 loc_13AE5: mov rax, [rsp+48h+var_38] cmp qword ptr [rax], 0 jnz short loc_13B17 mov rdi, [rsp+48h+var_20] lea rsi, aInvalidFileHan; "invalid file handle" mov al, 0 call JS_ThrowTypeError mov [rsp+48h+var_48], rax mov [rsp+48h+var_40], rdx mov [rsp+48h+var_8], 0 jmp short loc_13B24 loc_13B17: mov rax, [rsp+48h+var_38] mov rax, [rax] mov [rsp+48h+var_8], rax loc_13B24: mov rax, [rsp+48h+var_8] add rsp, 48h retn
long long js_std_file_get(long long a1, long long a2, long long a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long Opaque2; // [rsp+10h] [rbp-38h] long long thread_state; // [rsp+18h] [rbp-30h] int Runtime; // [rsp+20h] [rbp-28h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v3, v4, v5, v6); Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 120)); if ( !Opaque2 ) return 0LL; if ( *(_QWORD *)Opaque2 ) return *(_QWORD *)Opaque2; JS_ThrowTypeError(a1, (unsigned int)"invalid file handle", v7, v8, v9, v10); return 0LL; }
js_std_file_get: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x28],RDI MOV RDI,qword ptr [RSP + 0x28] CALL 0x00127f00 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x001115d0 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RAX + 0x78] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x001383b0 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x00113ae5 MOV qword ptr [RSP + 0x40],0x0 JMP 0x00113b24 LAB_00113ae5: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX],0x0 JNZ 0x00113b17 MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x209c20] MOV AL,0x0 CALL 0x0012d300 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x40],0x0 JMP 0x00113b24 LAB_00113b17: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x40],RAX LAB_00113b24: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
long js_std_file_get(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; long *plVar3; long local_8; uVar1 = JS_GetRuntime(param_1); lVar2 = js_get_thread_state(uVar1); plVar3 = (long *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar2 + 0x78)); if (plVar3 == (long *)0x0) { local_8 = 0; } else if (*plVar3 == 0) { JS_ThrowTypeError(param_1,"invalid file handle"); local_8 = 0; } else { local_8 = *plVar3; } return local_8; }
49,184
js_std_file_get
bluesky950520[P]quickjs/quickjs-libc.c
static FILE *js_std_file_get(JSContext *ctx, JSValue obj) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSSTDFile *s = JS_GetOpaque2(ctx, obj, ts->std_file_class_id); if (!s) return NULL; if (!s->f) { JS_ThrowTypeError(ctx, "invalid file handle"); return NULL; } return s->f; }
O2
c
js_std_file_get: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x1a185 movq %rax, %rdi callq 0x1028a movl 0x78(%rax), %ecx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x21207 testq %rax, %rax je 0x11415 movq (%rax), %r14 testq %r14, %r14 jne 0x11418 leaq 0x716ae(%rip), %rsi # 0x82ab4 xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d jmp 0x11418 xorl %r14d, %r14d movq %r14, %rax popq %rbx popq %r14 popq %r15 retq
js_std_file_get: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi call JS_GetRuntime mov rdi, rax call js_get_thread_state mov ecx, [rax+78h] mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_GetOpaque2 test rax, rax jz short loc_11415 mov r14, [rax] test r14, r14 jnz short loc_11418 lea rsi, aInvalidFileHan; "invalid file handle" xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_11418 loc_11415: xor r14d, r14d loc_11418: mov rax, r14 pop rbx pop r14 pop r15 retn
long long js_std_file_get(long long a1, long long a2, long long a3) { int Runtime; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long thread_state; // rax long long *Opaque2; // rax int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d long long v15; // r14 char v17; // [rsp+0h] [rbp-18h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8, v17); Opaque2 = (long long *)JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 120)); if ( !Opaque2 ) return 0LL; v15 = *Opaque2; if ( !*Opaque2 ) { v15 = 0LL; JS_ThrowTypeError(a1, (unsigned int)"invalid file handle", v11, v12, v13, v14); } return v15; }
js_std_file_get: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI CALL 0x0011a185 MOV RDI,RAX CALL 0x0011028a MOV ECX,dword ptr [RAX + 0x78] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00121207 TEST RAX,RAX JZ 0x00111415 MOV R14,qword ptr [RAX] TEST R14,R14 JNZ 0x00111418 LEA RSI,[0x182ab4] XOR R14D,R14D MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d JMP 0x00111418 LAB_00111415: XOR R14D,R14D LAB_00111418: MOV RAX,R14 POP RBX POP R14 POP R15 RET
long js_std_file_get(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; long *plVar3; uVar1 = JS_GetRuntime(); lVar2 = js_get_thread_state(uVar1); plVar3 = (long *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar2 + 0x78)); if (plVar3 == (long *)0x0) { lVar2 = 0; } else { lVar2 = *plVar3; if (lVar2 == 0) { lVar2 = 0; JS_ThrowTypeError(param_1,"invalid file handle"); } } return lVar2; }
49,185
linenoiseEditFeed
monkey531[P]llama/examples/run/linenoise.cpp/linenoise.cpp
const char *linenoiseEditFeed(struct linenoiseState *l) { /* Not a TTY, pass control to line reading without character * count limits. */ if (!isatty(l->ifd)) return linenoiseNoTTY(); char c; int nread; char seq[3]; nread = read(l->ifd,&c,1); if (nread <= 0) return NULL; /* Only autocomplete when the callback is set. It returns < 0 when * there was an error reading from fd. Otherwise it will return the * character that should be handled next. */ if ((l->in_completion || c == 9) && completionCallback != NULL) { c = completeLine(l,c); /* Read next character when 0 */ if (c == 0) return linenoiseEditMore; } switch(c) { case ENTER: /* enter */ history_len--; free(history[history_len]); if (mlmode) linenoiseEditMoveEnd(l); if (hintsCallback) { /* Force a refresh without hints to leave the previous * line as the user typed it after a newline. */ linenoiseHintsCallback *hc = hintsCallback; hintsCallback = NULL; refreshLine(l); hintsCallback = hc; } return strdup(l->buf); case CTRL_C: /* ctrl-c */ errno = EAGAIN; return NULL; case BACKSPACE: /* backspace */ case 8: /* ctrl-h */ linenoiseEditBackspace(l); break; case CTRL_D: /* ctrl-d, remove char at right of cursor, or if the line is empty, act as end-of-file. */ if (l->len > 0) { linenoiseEditDelete(l); } else { history_len--; free(history[history_len]); errno = ENOENT; return NULL; } break; case CTRL_T: /* ctrl-t, swaps current character with previous. */ if (l->pos > 0 && l->pos < l->len) { int aux = l->buf[l->pos-1]; l->buf[l->pos-1] = l->buf[l->pos]; l->buf[l->pos] = aux; if (l->pos != l->len-1) l->pos++; refreshLine(l); } break; case CTRL_B: /* ctrl-b */ linenoiseEditMoveLeft(l); break; case CTRL_F: /* ctrl-f */ linenoiseEditMoveRight(l); break; case CTRL_P: /* ctrl-p */ linenoiseEditHistoryNext(l, LINENOISE_HISTORY_PREV); break; case CTRL_N: /* ctrl-n */ linenoiseEditHistoryNext(l, LINENOISE_HISTORY_NEXT); break; case ESC: /* escape sequence */ /* Read the next two bytes representing the escape sequence. * Use two calls to handle slow terminals returning the two * chars at different times. */ if (read(l->ifd,seq,1) == -1) break; if (read(l->ifd,seq+1,1) == -1) break; /* ESC [ sequences. */ if (seq[0] == '[') { if (seq[1] >= '0' && seq[1] <= '9') { /* Extended escape, read additional byte. */ if (read(l->ifd,seq+2,1) == -1) break; if (seq[2] == '~') { switch(seq[1]) { case '3': /* Delete key. */ linenoiseEditDelete(l); break; } } } else { switch(seq[1]) { case 'A': /* Up */ linenoiseEditHistoryNext(l, LINENOISE_HISTORY_PREV); break; case 'B': /* Down */ linenoiseEditHistoryNext(l, LINENOISE_HISTORY_NEXT); break; case 'C': /* Right */ linenoiseEditMoveRight(l); break; case 'D': /* Left */ linenoiseEditMoveLeft(l); break; case 'H': /* Home */ linenoiseEditMoveHome(l); break; case 'F': /* End*/ linenoiseEditMoveEnd(l); break; } } } /* ESC O sequences. */ else if (seq[0] == 'O') { switch(seq[1]) { case 'H': /* Home */ linenoiseEditMoveHome(l); break; case 'F': /* End*/ linenoiseEditMoveEnd(l); break; } } break; default: if (linenoiseEditInsert(l,c)) return NULL; break; case CTRL_U: /* Ctrl+u, delete the whole line. */ l->buf[0] = '\0'; l->pos = l->len = 0; refreshLine(l); break; case CTRL_K: /* Ctrl+k, delete from current to end of line. */ l->buf[l->pos] = '\0'; l->len = l->pos; refreshLine(l); break; case CTRL_A: /* Ctrl+a, go to the start of the line */ linenoiseEditMoveHome(l); break; case CTRL_E: /* ctrl+e, go to the end of the line */ linenoiseEditMoveEnd(l); break; case CTRL_L: /* ctrl+l, clear screen */ linenoiseClearScreen(); refreshLine(l); break; case CTRL_W: /* ctrl+w, delete previous word */ linenoiseEditDeletePrevWord(l); break; } return linenoiseEditMore; }
O0
cpp
linenoiseEditFeed: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq 0x38(%rsp), %rax movl 0x10(%rax), %edi callq 0x52f10 cmpl $0x0, %eax jne 0xdf2aa callq 0xdf7c0 movq %rax, 0x40(%rsp) jmp 0xdf7a9 movq 0x38(%rsp), %rax movl 0x10(%rax), %edi leaq 0x37(%rsp), %rsi movl $0x1, %edx callq 0x52c50 movl %eax, 0x30(%rsp) cmpl $0x0, 0x30(%rsp) jg 0xdf2da movq $0x0, 0x40(%rsp) jmp 0xdf7a9 movq 0x38(%rsp), %rax cmpl $0x0, (%rax) jne 0xdf2ee movsbl 0x37(%rsp), %eax cmpl $0x9, %eax jne 0xdf328 cmpq $0x0, 0x188bf2(%rip) # 0x267ee8 je 0xdf328 movq 0x38(%rsp), %rdi movsbl 0x37(%rsp), %esi callq 0xdf8e0 movb %al, 0x37(%rsp) movsbl 0x37(%rsp), %eax cmpl $0x0, %eax jne 0xdf326 movq 0x188724(%rip), %rax # 0x267a40 movq %rax, 0x40(%rsp) jmp 0xdf7a9 jmp 0xdf328 movsbl 0x37(%rsp), %eax decl %eax movl %eax, %ecx movq %rcx, 0x10(%rsp) subl $0x7e, %eax ja 0xdf6dd movq 0x10(%rsp), %rax leaq 0xff56d(%rip), %rcx # 0x1de8b8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x188ba6(%rip), %eax # 0x267f00 addl $-0x1, %eax movl %eax, 0x188b9d(%rip) # 0x267f00 movq 0x188b9e(%rip), %rax # 0x267f08 movslq 0x188b8f(%rip), %rcx # 0x267f00 movq (%rax,%rcx,8), %rdi callq 0x533f0 cmpl $0x0, 0x188b63(%rip) # 0x267ee4 je 0xdf38d movq 0x38(%rsp), %rdi callq 0xdfaf0 cmpq $0x0, 0x188b5b(%rip) # 0x267ef0 je 0xdf3c4 movq 0x188b52(%rip), %rax # 0x267ef0 movq %rax, 0x20(%rsp) movq $0x0, 0x188b42(%rip) # 0x267ef0 movq 0x38(%rsp), %rdi callq 0xdfb30 movq 0x20(%rsp), %rax movq %rax, 0x188b2c(%rip) # 0x267ef0 movq 0x38(%rsp), %rax movq 0x18(%rax), %rdi callq 0x52050 movq %rax, 0x40(%rsp) jmp 0xdf7a9 callq 0x53070 movl $0xb, (%rax) movq $0x0, 0x40(%rsp) jmp 0xdf7a9 movq 0x38(%rsp), %rdi callq 0xdfb50 jmp 0xdf79d movq 0x38(%rsp), %rax cmpq $0x0, 0x48(%rax) jbe 0xdf41c movq 0x38(%rsp), %rdi callq 0xdfbf0 jmp 0xdf45b movl 0x188ade(%rip), %eax # 0x267f00 addl $-0x1, %eax movl %eax, 0x188ad5(%rip) # 0x267f00 movq 0x188ad6(%rip), %rax # 0x267f08 movslq 0x188ac7(%rip), %rcx # 0x267f00 movq (%rax,%rcx,8), %rdi callq 0x533f0 callq 0x53070 movl $0x2, (%rax) movq $0x0, 0x40(%rsp) jmp 0xdf7a9 jmp 0xdf79d movq 0x38(%rsp), %rax cmpq $0x0, 0x38(%rax) jbe 0xdf525 movq 0x38(%rsp), %rax movq 0x38(%rax), %rax movq 0x38(%rsp), %rcx cmpq 0x48(%rcx), %rax jae 0xdf525 movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx movq 0x38(%rcx), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax movl %eax, 0x1c(%rsp) movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx movq 0x38(%rcx), %rcx movb (%rax,%rcx), %dl movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx movq 0x38(%rcx), %rcx subq $0x1, %rcx movb %dl, (%rax,%rcx) movl 0x1c(%rsp), %eax movb %al, %dl movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx movq 0x38(%rcx), %rcx movb %dl, (%rax,%rcx) movq 0x38(%rsp), %rax movq 0x38(%rax), %rax movq 0x38(%rsp), %rcx movq 0x48(%rcx), %rcx subq $0x1, %rcx cmpq %rcx, %rax je 0xdf51b movq 0x38(%rsp), %rax movq 0x38(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x38(%rax) movq 0x38(%rsp), %rdi callq 0xdfb30 jmp 0xdf79d movq 0x38(%rsp), %rdi callq 0xdfc80 jmp 0xdf79d movq 0x38(%rsp), %rdi callq 0xdfcb0 jmp 0xdf79d movq 0x38(%rsp), %rdi movl $0x1, %esi callq 0xdfcf0 jmp 0xdf79d movq 0x38(%rsp), %rdi xorl %esi, %esi callq 0xdfcf0 jmp 0xdf79d movq 0x38(%rsp), %rax movl 0x10(%rax), %edi leaq 0x2d(%rsp), %rsi movl $0x1, %edx callq 0x52c50 cmpq $-0x1, %rax jne 0xdf58f jmp 0xdf79d movq 0x38(%rsp), %rax movl 0x10(%rax), %edi leaq 0x2d(%rsp), %rsi addq $0x1, %rsi movl $0x1, %edx callq 0x52c50 cmpq $-0x1, %rax jne 0xdf5b5 jmp 0xdf79d movsbl 0x2d(%rsp), %eax cmpl $0x5b, %eax jne 0xdf699 movsbl 0x2e(%rsp), %eax cmpl $0x30, %eax jl 0xdf61f movsbl 0x2e(%rsp), %eax cmpl $0x39, %eax jg 0xdf61f movq 0x38(%rsp), %rax movl 0x10(%rax), %edi leaq 0x2d(%rsp), %rsi addq $0x2, %rsi movl $0x1, %edx callq 0x52c50 cmpq $-0x1, %rax jne 0xdf5fd jmp 0xdf79d movsbl 0x2f(%rsp), %eax cmpl $0x7e, %eax jne 0xdf61d movb 0x2e(%rsp), %al subb $0x33, %al jne 0xdf61b jmp 0xdf611 movq 0x38(%rsp), %rdi callq 0xdfbf0 jmp 0xdf61d jmp 0xdf697 movsbl 0x2e(%rsp), %eax addl $-0x41, %eax movl %eax, %ecx movq %rcx, 0x8(%rsp) subl $0x7, %eax ja 0xdf695 movq 0x8(%rsp), %rax leaq 0xff475(%rip), %rcx # 0x1deab4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x38(%rsp), %rdi movl $0x1, %esi callq 0xdfcf0 jmp 0xdf695 movq 0x38(%rsp), %rdi xorl %esi, %esi callq 0xdfcf0 jmp 0xdf695 movq 0x38(%rsp), %rdi callq 0xdfcb0 jmp 0xdf695 movq 0x38(%rsp), %rdi callq 0xdfc80 jmp 0xdf695 movq 0x38(%rsp), %rdi callq 0xdfe40 jmp 0xdf695 movq 0x38(%rsp), %rdi callq 0xdfaf0 jmp 0xdf697 jmp 0xdf6d8 movsbl 0x2d(%rsp), %eax cmpl $0x4f, %eax jne 0xdf6d6 movsbl 0x2e(%rsp), %eax movl %eax, 0x4(%rsp) subl $0x46, %eax je 0xdf6ca jmp 0xdf6b3 movl 0x4(%rsp), %eax subl $0x48, %eax jne 0xdf6d4 jmp 0xdf6be movq 0x38(%rsp), %rdi callq 0xdfe40 jmp 0xdf6d4 movq 0x38(%rsp), %rdi callq 0xdfaf0 jmp 0xdf6d6 jmp 0xdf6d8 jmp 0xdf79d movq 0x38(%rsp), %rdi movsbl 0x37(%rsp), %esi callq 0xdfe70 cmpl $0x0, %eax je 0xdf6ff movq $0x0, 0x40(%rsp) jmp 0xdf7a9 jmp 0xdf79d movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movb $0x0, (%rax) movq 0x38(%rsp), %rax movq $0x0, 0x48(%rax) movq 0x38(%rsp), %rax movq $0x0, 0x38(%rax) movq 0x38(%rsp), %rdi callq 0xdfb30 jmp 0xdf79d movq 0x38(%rsp), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx movq 0x38(%rcx), %rcx movb $0x0, (%rax,%rcx) movq 0x38(%rsp), %rax movq 0x38(%rax), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x48(%rax) movq 0x38(%rsp), %rdi callq 0xdfb30 jmp 0xdf79d movq 0x38(%rsp), %rdi callq 0xdfe40 jmp 0xdf79d movq 0x38(%rsp), %rdi callq 0xdfaf0 jmp 0xdf79d callq 0xde0c0 movq 0x38(%rsp), %rdi callq 0xdfb30 jmp 0xdf79d movq 0x38(%rsp), %rdi callq 0xe0040 movq 0x18829c(%rip), %rax # 0x267a40 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
linenoiseEditFeed: sub rsp, 48h mov [rsp+48h+var_10], rdi mov rax, [rsp+48h+var_10] mov edi, [rax+10h] call _isatty cmp eax, 0 jnz short loc_DF2AA call _ZL14linenoiseNoTTYv; linenoiseNoTTY(void) mov [rsp+48h+var_8], rax jmp loc_DF7A9 loc_DF2AA: mov rax, [rsp+48h+var_10] mov edi, [rax+10h] lea rsi, [rsp+48h+var_11] mov edx, 1 call _read mov [rsp+48h+var_18], eax cmp [rsp+48h+var_18], 0 jg short loc_DF2DA mov [rsp+48h+var_8], 0 jmp loc_DF7A9 loc_DF2DA: mov rax, [rsp+48h+var_10] cmp dword ptr [rax], 0 jnz short loc_DF2EE movsx eax, [rsp+48h+var_11] cmp eax, 9 jnz short loc_DF328 loc_DF2EE: cmp cs:_ZL18completionCallback, 0; completionCallback jz short loc_DF328 mov rdi, [rsp+48h+var_10] movsx esi, [rsp+48h+var_11] call _ZL12completeLineP14linenoiseStatei; completeLine(linenoiseState *,int) mov [rsp+48h+var_11], al movsx eax, [rsp+48h+var_11] cmp eax, 0 jnz short loc_DF326 mov rax, cs:linenoiseEditMore mov [rsp+48h+var_8], rax jmp loc_DF7A9 loc_DF326: jmp short $+2 loc_DF328: movsx eax, [rsp+48h+var_11] dec eax; switch 127 cases mov ecx, eax mov [rsp+48h+var_38], rcx sub eax, 7Eh ja def_DF352; jumptable 00000000000DF352 default case, cases 7,9,10,15,17-19,22,24-26,28-126 mov rax, [rsp+48h+var_38] lea rcx, jpt_DF352 movsxd rax, ds:(jpt_DF352 - 1DE8B8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_DF354: mov eax, cs:_ZL11history_len; jumptable 00000000000DF352 case 13 add eax, 0FFFFFFFFh mov cs:_ZL11history_len, eax; history_len mov rax, cs:_ZL7history; history movsxd rcx, cs:_ZL11history_len; history_len mov rdi, [rax+rcx*8] call free cmp cs:_ZL6mlmode, 0; mlmode jz short loc_DF38D mov rdi, [rsp+48h+var_10] call _ZL20linenoiseEditMoveEndP14linenoiseState; linenoiseEditMoveEnd(linenoiseState *) loc_DF38D: cmp cs:_ZL13hintsCallback, 0; hintsCallback jz short loc_DF3C4 mov rax, cs:_ZL13hintsCallback; hintsCallback mov [rsp+48h+var_28], rax mov cs:_ZL13hintsCallback, 0; hintsCallback mov rdi, [rsp+48h+var_10] call _ZL11refreshLineP14linenoiseState; refreshLine(linenoiseState *) mov rax, [rsp+48h+var_28] mov cs:_ZL13hintsCallback, rax; hintsCallback loc_DF3C4: mov rax, [rsp+48h+var_10] mov rdi, [rax+18h] call _strdup mov [rsp+48h+var_8], rax jmp loc_DF7A9 loc_DF3DC: call ___errno_location; jumptable 00000000000DF352 case 3 mov dword ptr [rax], 0Bh mov [rsp+48h+var_8], 0 jmp loc_DF7A9 loc_DF3F5: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 cases 8,127 call _ZL22linenoiseEditBackspaceP14linenoiseState; linenoiseEditBackspace(linenoiseState *) jmp loc_DF79D loc_DF404: mov rax, [rsp+48h+var_10]; jumptable 00000000000DF352 case 4 cmp qword ptr [rax+48h], 0 jbe short loc_DF41C mov rdi, [rsp+48h+var_10] call _ZL19linenoiseEditDeleteP14linenoiseState; linenoiseEditDelete(linenoiseState *) jmp short loc_DF45B loc_DF41C: mov eax, cs:_ZL11history_len; history_len add eax, 0FFFFFFFFh mov cs:_ZL11history_len, eax; history_len mov rax, cs:_ZL7history; history movsxd rcx, cs:_ZL11history_len; history_len mov rdi, [rax+rcx*8] call free call ___errno_location mov dword ptr [rax], 2 mov [rsp+48h+var_8], 0 jmp loc_DF7A9 loc_DF45B: jmp loc_DF79D loc_DF460: mov rax, [rsp+48h+var_10]; jumptable 00000000000DF352 case 20 cmp qword ptr [rax+38h], 0 jbe loc_DF525 mov rax, [rsp+48h+var_10] mov rax, [rax+38h] mov rcx, [rsp+48h+var_10] cmp rax, [rcx+48h] jnb loc_DF525 mov rax, [rsp+48h+var_10] mov rax, [rax+18h] mov rcx, [rsp+48h+var_10] mov rcx, [rcx+38h] sub rcx, 1 movsx eax, byte ptr [rax+rcx] mov [rsp+48h+var_2C], eax mov rax, [rsp+48h+var_10] mov rax, [rax+18h] mov rcx, [rsp+48h+var_10] mov rcx, [rcx+38h] mov dl, [rax+rcx] mov rax, [rsp+48h+var_10] mov rax, [rax+18h] mov rcx, [rsp+48h+var_10] mov rcx, [rcx+38h] sub rcx, 1 mov [rax+rcx], dl mov eax, [rsp+48h+var_2C] mov dl, al mov rax, [rsp+48h+var_10] mov rax, [rax+18h] mov rcx, [rsp+48h+var_10] mov rcx, [rcx+38h] mov [rax+rcx], dl mov rax, [rsp+48h+var_10] mov rax, [rax+38h] mov rcx, [rsp+48h+var_10] mov rcx, [rcx+48h] sub rcx, 1 cmp rax, rcx jz short loc_DF51B mov rax, [rsp+48h+var_10] mov rcx, [rax+38h] add rcx, 1 mov [rax+38h], rcx loc_DF51B: mov rdi, [rsp+48h+var_10] call _ZL11refreshLineP14linenoiseState; refreshLine(linenoiseState *) loc_DF525: jmp loc_DF79D loc_DF52A: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 case 2 call _ZL21linenoiseEditMoveLeftP14linenoiseState; linenoiseEditMoveLeft(linenoiseState *) jmp loc_DF79D loc_DF539: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 case 6 call _ZL22linenoiseEditMoveRightP14linenoiseState; linenoiseEditMoveRight(linenoiseState *) jmp loc_DF79D loc_DF548: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 case 16 mov esi, 1 call _ZL24linenoiseEditHistoryNextP14linenoiseStatei; linenoiseEditHistoryNext(linenoiseState *,int) jmp loc_DF79D loc_DF55C: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 case 14 xor esi, esi call _ZL24linenoiseEditHistoryNextP14linenoiseStatei; linenoiseEditHistoryNext(linenoiseState *,int) jmp loc_DF79D loc_DF56D: mov rax, [rsp+48h+var_10]; jumptable 00000000000DF352 case 27 mov edi, [rax+10h] lea rsi, [rsp+48h+var_1B] mov edx, 1 call _read cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_DF58F jmp loc_DF79D loc_DF58F: mov rax, [rsp+48h+var_10] mov edi, [rax+10h] lea rsi, [rsp+48h+var_1B] add rsi, 1 mov edx, 1 call _read cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_DF5B5 jmp loc_DF79D loc_DF5B5: movsx eax, [rsp+48h+var_1B] cmp eax, 5Bh ; '[' jnz loc_DF699 movsx eax, [rsp+48h+var_1A] cmp eax, 30h ; '0' jl short loc_DF61F movsx eax, [rsp+48h+var_1A] cmp eax, 39h ; '9' jg short loc_DF61F mov rax, [rsp+48h+var_10] mov edi, [rax+10h] lea rsi, [rsp+48h+var_1B] add rsi, 2 mov edx, 1 call _read cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_DF5FD jmp loc_DF79D loc_DF5FD: movsx eax, [rsp+48h+var_19] cmp eax, 7Eh ; '~' jnz short loc_DF61D mov al, [rsp+48h+var_1A] sub al, 33h ; '3' jnz short loc_DF61B jmp short $+2 loc_DF611: mov rdi, [rsp+48h+var_10] call _ZL19linenoiseEditDeleteP14linenoiseState; linenoiseEditDelete(linenoiseState *) loc_DF61B: jmp short $+2 loc_DF61D: jmp short loc_DF697 loc_DF61F: movsx eax, [rsp+48h+var_1A] add eax, 0FFFFFFBFh; switch 8 cases mov ecx, eax mov [rsp+48h+var_40], rcx sub eax, 7 ja short def_DF646; jumptable 00000000000DF646 default case, cases 69,71 mov rax, [rsp+48h+var_40] lea rcx, jpt_DF646 movsxd rax, ds:(jpt_DF646 - 1DEAB4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_DF648: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF646 case 65 mov esi, 1 call _ZL24linenoiseEditHistoryNextP14linenoiseStatei; linenoiseEditHistoryNext(linenoiseState *,int) jmp short def_DF646; jumptable 00000000000DF646 default case, cases 69,71 loc_DF659: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF646 case 66 xor esi, esi call _ZL24linenoiseEditHistoryNextP14linenoiseStatei; linenoiseEditHistoryNext(linenoiseState *,int) jmp short def_DF646; jumptable 00000000000DF646 default case, cases 69,71 loc_DF667: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF646 case 67 call _ZL22linenoiseEditMoveRightP14linenoiseState; linenoiseEditMoveRight(linenoiseState *) jmp short def_DF646; jumptable 00000000000DF646 default case, cases 69,71 loc_DF673: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF646 case 68 call _ZL21linenoiseEditMoveLeftP14linenoiseState; linenoiseEditMoveLeft(linenoiseState *) jmp short def_DF646; jumptable 00000000000DF646 default case, cases 69,71 loc_DF67F: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF646 case 72 call _ZL21linenoiseEditMoveHomeP14linenoiseState; linenoiseEditMoveHome(linenoiseState *) jmp short def_DF646; jumptable 00000000000DF646 default case, cases 69,71 loc_DF68B: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF646 case 70 call _ZL20linenoiseEditMoveEndP14linenoiseState; linenoiseEditMoveEnd(linenoiseState *) def_DF646: jmp short $+2; jumptable 00000000000DF646 default case, cases 69,71 loc_DF697: jmp short loc_DF6D8 loc_DF699: movsx eax, [rsp+48h+var_1B] cmp eax, 4Fh ; 'O' jnz short loc_DF6D6 movsx eax, [rsp+48h+var_1A] mov [rsp+48h+var_44], eax sub eax, 46h ; 'F' jz short loc_DF6CA jmp short $+2 loc_DF6B3: mov eax, [rsp+48h+var_44] sub eax, 48h ; 'H' jnz short loc_DF6D4 jmp short $+2 loc_DF6BE: mov rdi, [rsp+48h+var_10] call _ZL21linenoiseEditMoveHomeP14linenoiseState; linenoiseEditMoveHome(linenoiseState *) jmp short loc_DF6D4 loc_DF6CA: mov rdi, [rsp+48h+var_10] call _ZL20linenoiseEditMoveEndP14linenoiseState; linenoiseEditMoveEnd(linenoiseState *) loc_DF6D4: jmp short $+2 loc_DF6D6: jmp short $+2 loc_DF6D8: jmp loc_DF79D def_DF352: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 default case, cases 7,9,10,15,17-19,22,24-26,28-126 movsx esi, [rsp+48h+var_11] call _ZL19linenoiseEditInsertP14linenoiseStatec; linenoiseEditInsert(linenoiseState *,char) cmp eax, 0 jz short loc_DF6FF mov [rsp+48h+var_8], 0 jmp loc_DF7A9 loc_DF6FF: jmp loc_DF79D loc_DF704: mov rax, [rsp+48h+var_10]; jumptable 00000000000DF352 case 21 mov rax, [rax+18h] mov byte ptr [rax], 0 mov rax, [rsp+48h+var_10] mov qword ptr [rax+48h], 0 mov rax, [rsp+48h+var_10] mov qword ptr [rax+38h], 0 mov rdi, [rsp+48h+var_10] call _ZL11refreshLineP14linenoiseState; refreshLine(linenoiseState *) jmp short loc_DF79D loc_DF736: mov rax, [rsp+48h+var_10]; jumptable 00000000000DF352 case 11 mov rax, [rax+18h] mov rcx, [rsp+48h+var_10] mov rcx, [rcx+38h] mov byte ptr [rax+rcx], 0 mov rax, [rsp+48h+var_10] mov rcx, [rax+38h] mov rax, [rsp+48h+var_10] mov [rax+48h], rcx mov rdi, [rsp+48h+var_10] call _ZL11refreshLineP14linenoiseState; refreshLine(linenoiseState *) jmp short loc_DF79D loc_DF76A: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 case 1 call _ZL21linenoiseEditMoveHomeP14linenoiseState; linenoiseEditMoveHome(linenoiseState *) jmp short loc_DF79D loc_DF776: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 case 5 call _ZL20linenoiseEditMoveEndP14linenoiseState; linenoiseEditMoveEnd(linenoiseState *) jmp short loc_DF79D loc_DF782: call linenoiseClearScreen; jumptable 00000000000DF352 case 12 mov rdi, [rsp+48h+var_10] call _ZL11refreshLineP14linenoiseState; refreshLine(linenoiseState *) jmp short loc_DF79D loc_DF793: mov rdi, [rsp+48h+var_10]; jumptable 00000000000DF352 case 23 call _ZL27linenoiseEditDeletePrevWordP14linenoiseState; linenoiseEditDeletePrevWord(linenoiseState *) loc_DF79D: mov rax, cs:linenoiseEditMore mov [rsp+48h+var_8], rax loc_DF7A9: mov rax, [rsp+48h+var_8] add rsp, 48h retn
char * linenoiseEditFeed(long long a1) { int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d char v6; // [rsp+1Ch] [rbp-2Ch] long long v7; // [rsp+20h] [rbp-28h] char v8; // [rsp+2Dh] [rbp-1Bh] BYREF char v9; // [rsp+2Eh] [rbp-1Ah] BYREF char v10; // [rsp+2Fh] [rbp-19h] BYREF int v11; // [rsp+30h] [rbp-18h] char v12; // [rsp+37h] [rbp-11h] BYREF long long v13; // [rsp+38h] [rbp-10h] char *v14; // [rsp+40h] [rbp-8h] v13 = a1; if ( !(unsigned int)isatty(*(unsigned int *)(a1 + 16)) ) return (char *)linenoiseNoTTY(); v11 = read(*(unsigned int *)(v13 + 16), &v12, 1LL); if ( v11 <= 0 ) return 0LL; if ( *(_DWORD *)v13 || v12 == 9 ) { if ( completionCallback ) { v12 = completeLine(v13, v12, v1, v2, v3, v4); if ( !v12 ) return linenoiseEditMore; } } switch ( v12 ) { case 1: linenoiseEditMoveHome(v13); goto LABEL_63; case 2: linenoiseEditMoveLeft(v13); goto LABEL_63; case 3: *(_DWORD *)__errno_location() = 11; return 0LL; case 4: if ( *(_QWORD *)(v13 + 72) ) { linenoiseEditDelete(v13); LABEL_63: v14 = linenoiseEditMore; } else { free(*(_QWORD *)(history + 8LL * --history_len)); *(_DWORD *)__errno_location() = 2; v14 = 0LL; } break; case 5: linenoiseEditMoveEnd(v13); goto LABEL_63; case 6: linenoiseEditMoveRight(v13); goto LABEL_63; case 8: case 127: linenoiseEditBackspace(v13); goto LABEL_63; case 11: *(_BYTE *)(*(_QWORD *)(v13 + 24) + *(_QWORD *)(v13 + 56)) = 0; *(_QWORD *)(v13 + 72) = *(_QWORD *)(v13 + 56); refreshLine(v13); goto LABEL_63; case 12: linenoiseClearScreen(); refreshLine(v13); goto LABEL_63; case 13: free(*(_QWORD *)(history + 8LL * --history_len)); if ( mlmode ) linenoiseEditMoveEnd(v13); if ( hintsCallback ) { v7 = hintsCallback; hintsCallback = 0LL; refreshLine(v13); hintsCallback = v7; } return (char *)strdup(*(_QWORD *)(v13 + 24)); case 14: linenoiseEditHistoryNext(v13, 0LL); goto LABEL_63; case 16: linenoiseEditHistoryNext(v13, 1LL); goto LABEL_63; case 20: if ( *(_QWORD *)(v13 + 56) && *(_QWORD *)(v13 + 56) < *(_QWORD *)(v13 + 72) ) { v6 = *(_BYTE *)(*(_QWORD *)(v13 + 24) + *(_QWORD *)(v13 + 56) - 1LL); *(_BYTE *)(*(_QWORD *)(v13 + 24) + *(_QWORD *)(v13 + 56) - 1LL) = *(_BYTE *)(*(_QWORD *)(v13 + 24) + *(_QWORD *)(v13 + 56)); *(_BYTE *)(*(_QWORD *)(v13 + 24) + *(_QWORD *)(v13 + 56)) = v6; if ( *(_QWORD *)(v13 + 56) != *(_QWORD *)(v13 + 72) - 1LL ) ++*(_QWORD *)(v13 + 56); refreshLine(v13); } goto LABEL_63; case 21: **(_BYTE **)(v13 + 24) = 0; *(_QWORD *)(v13 + 72) = 0LL; *(_QWORD *)(v13 + 56) = 0LL; refreshLine(v13); goto LABEL_63; case 23: linenoiseEditDeletePrevWord(v13); goto LABEL_63; case 27: if ( read(*(unsigned int *)(v13 + 16), &v8, 1LL) != -1 && read(*(unsigned int *)(v13 + 16), &v9, 1LL) != -1 ) { if ( v8 == 91 ) { if ( v9 < 48 || v9 > 57 ) { switch ( v9 ) { case 'A': linenoiseEditHistoryNext(v13, 1LL); break; case 'B': linenoiseEditHistoryNext(v13, 0LL); break; case 'C': linenoiseEditMoveRight(v13); break; case 'D': linenoiseEditMoveLeft(v13); break; case 'F': linenoiseEditMoveEnd(v13); break; case 'H': goto LABEL_51; default: goto LABEL_63; } } else if ( read(*(unsigned int *)(v13 + 16), &v10, 1LL) != -1 && v10 == 126 && v9 == 51 ) { linenoiseEditDelete(v13); } } else if ( v8 == 79 ) { if ( v9 == 70 ) { linenoiseEditMoveEnd(v13); } else if ( v9 == 72 ) { LABEL_51: linenoiseEditMoveHome(v13); } } } goto LABEL_63; default: if ( !(unsigned int)linenoiseEditInsert(v13, (unsigned int)v12) ) goto LABEL_63; v14 = 0LL; break; } return v14; }
linenoiseEditFeed: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV RAX,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RAX + 0x10] CALL 0x00152f10 CMP EAX,0x0 JNZ 0x001df2aa CALL 0x001df7c0 MOV qword ptr [RSP + 0x40],RAX JMP 0x001df7a9 LAB_001df2aa: MOV RAX,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RAX + 0x10] LEA RSI,[RSP + 0x37] MOV EDX,0x1 CALL 0x00152c50 MOV dword ptr [RSP + 0x30],EAX CMP dword ptr [RSP + 0x30],0x0 JG 0x001df2da MOV qword ptr [RSP + 0x40],0x0 JMP 0x001df7a9 LAB_001df2da: MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX],0x0 JNZ 0x001df2ee MOVSX EAX,byte ptr [RSP + 0x37] CMP EAX,0x9 JNZ 0x001df328 LAB_001df2ee: CMP qword ptr [0x00367ee8],0x0 JZ 0x001df328 MOV RDI,qword ptr [RSP + 0x38] MOVSX ESI,byte ptr [RSP + 0x37] CALL 0x001df8e0 MOV byte ptr [RSP + 0x37],AL MOVSX EAX,byte ptr [RSP + 0x37] CMP EAX,0x0 JNZ 0x001df326 MOV RAX,qword ptr [0x00367a40] MOV qword ptr [RSP + 0x40],RAX JMP 0x001df7a9 LAB_001df326: JMP 0x001df328 LAB_001df328: MOVSX EAX,byte ptr [RSP + 0x37] DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x10],RCX SUB EAX,0x7e JA 0x001df6dd MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x2de8b8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_d: MOV EAX,dword ptr [0x00367f00] ADD EAX,-0x1 MOV dword ptr [0x00367f00],EAX MOV RAX,qword ptr [0x00367f08] MOVSXD RCX,dword ptr [0x00367f00] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001533f0 CMP dword ptr [0x00367ee4],0x0 JZ 0x001df38d MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfaf0 LAB_001df38d: CMP qword ptr [0x00367ef0],0x0 JZ 0x001df3c4 MOV RAX,qword ptr [0x00367ef0] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [0x00367ef0],0x0 MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfb30 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [0x00367ef0],RAX LAB_001df3c4: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RAX + 0x18] CALL 0x00152050 MOV qword ptr [RSP + 0x40],RAX JMP 0x001df7a9 caseD_3: CALL 0x00153070 MOV dword ptr [RAX],0xb MOV qword ptr [RSP + 0x40],0x0 JMP 0x001df7a9 caseD_8: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfb50 JMP 0x001df79d caseD_4: MOV RAX,qword ptr [RSP + 0x38] CMP qword ptr [RAX + 0x48],0x0 JBE 0x001df41c MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfbf0 JMP 0x001df45b LAB_001df41c: MOV EAX,dword ptr [0x00367f00] ADD EAX,-0x1 MOV dword ptr [0x00367f00],EAX MOV RAX,qword ptr [0x00367f08] MOVSXD RCX,dword ptr [0x00367f00] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001533f0 CALL 0x00153070 MOV dword ptr [RAX],0x2 MOV qword ptr [RSP + 0x40],0x0 JMP 0x001df7a9 LAB_001df45b: JMP 0x001df79d caseD_14: MOV RAX,qword ptr [RSP + 0x38] CMP qword ptr [RAX + 0x38],0x0 JBE 0x001df525 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RCX + 0x48] JNC 0x001df525 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x38] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0x1c],EAX MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x38] MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x38] SUB RCX,0x1 MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RSP + 0x1c] MOV DL,AL MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x38] MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x48] SUB RCX,0x1 CMP RAX,RCX JZ 0x001df51b MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RAX + 0x38] ADD RCX,0x1 MOV qword ptr [RAX + 0x38],RCX LAB_001df51b: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfb30 LAB_001df525: JMP 0x001df79d caseD_2: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfc80 JMP 0x001df79d caseD_6: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfcb0 JMP 0x001df79d caseD_10: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x1 CALL 0x001dfcf0 JMP 0x001df79d caseD_e: MOV RDI,qword ptr [RSP + 0x38] XOR ESI,ESI CALL 0x001dfcf0 JMP 0x001df79d caseD_1b: MOV RAX,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RAX + 0x10] LEA RSI,[RSP + 0x2d] MOV EDX,0x1 CALL 0x00152c50 CMP RAX,-0x1 JNZ 0x001df58f JMP 0x001df79d LAB_001df58f: MOV RAX,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RAX + 0x10] LEA RSI,[RSP + 0x2d] ADD RSI,0x1 MOV EDX,0x1 CALL 0x00152c50 CMP RAX,-0x1 JNZ 0x001df5b5 JMP 0x001df79d LAB_001df5b5: MOVSX EAX,byte ptr [RSP + 0x2d] CMP EAX,0x5b JNZ 0x001df699 MOVSX EAX,byte ptr [RSP + 0x2e] CMP EAX,0x30 JL 0x001df61f MOVSX EAX,byte ptr [RSP + 0x2e] CMP EAX,0x39 JG 0x001df61f MOV RAX,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RAX + 0x10] LEA RSI,[RSP + 0x2d] ADD RSI,0x2 MOV EDX,0x1 CALL 0x00152c50 CMP RAX,-0x1 JNZ 0x001df5fd JMP 0x001df79d LAB_001df5fd: MOVSX EAX,byte ptr [RSP + 0x2f] CMP EAX,0x7e JNZ 0x001df61d MOV AL,byte ptr [RSP + 0x2e] SUB AL,0x33 JNZ 0x001df61b JMP 0x001df611 LAB_001df611: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfbf0 LAB_001df61b: JMP 0x001df61d LAB_001df61d: JMP 0x001df697 LAB_001df61f: MOVSX EAX,byte ptr [RSP + 0x2e] ADD EAX,-0x41 MOV ECX,EAX MOV qword ptr [RSP + 0x8],RCX SUB EAX,0x7 JA 0x001df695 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x2deab4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_41: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x1 CALL 0x001dfcf0 JMP 0x001df695 caseD_42: MOV RDI,qword ptr [RSP + 0x38] XOR ESI,ESI CALL 0x001dfcf0 JMP 0x001df695 caseD_43: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfcb0 JMP 0x001df695 caseD_44: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfc80 JMP 0x001df695 caseD_48: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfe40 JMP 0x001df695 caseD_46: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfaf0 caseD_45: JMP 0x001df697 LAB_001df697: JMP 0x001df6d8 LAB_001df699: MOVSX EAX,byte ptr [RSP + 0x2d] CMP EAX,0x4f JNZ 0x001df6d6 MOVSX EAX,byte ptr [RSP + 0x2e] MOV dword ptr [RSP + 0x4],EAX SUB EAX,0x46 JZ 0x001df6ca JMP 0x001df6b3 LAB_001df6b3: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x48 JNZ 0x001df6d4 JMP 0x001df6be LAB_001df6be: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfe40 JMP 0x001df6d4 LAB_001df6ca: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfaf0 LAB_001df6d4: JMP 0x001df6d6 LAB_001df6d6: JMP 0x001df6d8 LAB_001df6d8: JMP 0x001df79d caseD_7: MOV RDI,qword ptr [RSP + 0x38] MOVSX ESI,byte ptr [RSP + 0x37] CALL 0x001dfe70 CMP EAX,0x0 JZ 0x001df6ff MOV qword ptr [RSP + 0x40],0x0 JMP 0x001df7a9 LAB_001df6ff: JMP 0x001df79d caseD_15: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x38],0x0 MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfb30 JMP 0x001df79d caseD_b: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x38] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x48],RCX MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfb30 JMP 0x001df79d caseD_1: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfe40 JMP 0x001df79d caseD_5: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfaf0 JMP 0x001df79d caseD_c: CALL 0x001de0c0 MOV RDI,qword ptr [RSP + 0x38] CALL 0x001dfb30 JMP 0x001df79d caseD_17: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001e0040 LAB_001df79d: MOV RAX,qword ptr [0x00367a40] MOV qword ptr [RSP + 0x40],RAX LAB_001df7a9: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
char * linenoiseEditFeed(linenoiseState *param_1) { int1 uVar1; long lVar2; int iVar3; char *pcVar4; ssize_t sVar5; int *piVar6; char local_1b; char local_1a; char local_19; int local_18; char local_11; linenoiseState *local_10; local_10 = param_1; iVar3 = isatty(*(int *)(param_1 + 0x10)); if (iVar3 == 0) { pcVar4 = (char *)linenoiseNoTTY(); return pcVar4; } sVar5 = read(*(int *)(local_10 + 0x10),&local_11,1); local_18 = (int)sVar5; if (0 < local_18) { if ((((*(int *)local_10 != 0) || (local_11 == '\t')) && (completionCallback != 0)) && (local_11 = completeLine(local_10,(int)local_11), local_11 == '\0')) { return linenoiseEditMore; } switch(local_11) { case '\x01': linenoiseEditMoveHome(local_10); break; case '\x02': linenoiseEditMoveLeft(local_10); break; case '\x03': piVar6 = __errno_location(); *piVar6 = 0xb; return (char *)0x0; case '\x04': if (*(long *)(local_10 + 0x48) == 0) { history_len = history_len + -1; free(*(void **)(history + (long)history_len * 8)); piVar6 = __errno_location(); *piVar6 = 2; return (char *)0x0; } linenoiseEditDelete(local_10); break; case '\x05': linenoiseEditMoveEnd(local_10); break; case '\x06': linenoiseEditMoveRight(local_10); break; default: iVar3 = linenoiseEditInsert(local_10,local_11); if (iVar3 != 0) { return (char *)0x0; } break; case '\b': case '\x7f': linenoiseEditBackspace(local_10); break; case '\v': *(int1 *)(*(long *)(local_10 + 0x18) + *(long *)(local_10 + 0x38)) = 0; *(int8 *)(local_10 + 0x48) = *(int8 *)(local_10 + 0x38); refreshLine(local_10); break; case '\f': linenoiseClearScreen(); refreshLine(local_10); break; case '\r': history_len = history_len + -1; free(*(void **)(history + (long)history_len * 8)); if (mlmode != 0) { linenoiseEditMoveEnd(local_10); } lVar2 = hintsCallback; if (hintsCallback != 0) { hintsCallback = 0; refreshLine(local_10); } hintsCallback = lVar2; pcVar4 = strdup(*(char **)(local_10 + 0x18)); return pcVar4; case '\x0e': linenoiseEditHistoryNext(local_10,0); break; case '\x10': linenoiseEditHistoryNext(local_10,1); break; case '\x14': if ((*(long *)(local_10 + 0x38) != 0) && (*(ulong *)(local_10 + 0x38) < *(ulong *)(local_10 + 0x48))) { uVar1 = *(int1 *)(*(long *)(local_10 + 0x18) + *(long *)(local_10 + 0x38) + -1); *(int1 *)(*(long *)(local_10 + 0x18) + *(long *)(local_10 + 0x38) + -1) = *(int1 *)(*(long *)(local_10 + 0x18) + *(long *)(local_10 + 0x38)); *(int1 *)(*(long *)(local_10 + 0x18) + *(long *)(local_10 + 0x38)) = uVar1; if (*(long *)(local_10 + 0x38) != *(long *)(local_10 + 0x48) + -1) { *(long *)(local_10 + 0x38) = *(long *)(local_10 + 0x38) + 1; } refreshLine(local_10); } break; case '\x15': **(int1 **)(local_10 + 0x18) = 0; *(int8 *)(local_10 + 0x48) = 0; *(int8 *)(local_10 + 0x38) = 0; refreshLine(local_10); break; case '\x17': linenoiseEditDeletePrevWord(local_10); break; case '\x1b': sVar5 = read(*(int *)(local_10 + 0x10),&local_1b,1); if ((sVar5 != -1) && (sVar5 = read(*(int *)(local_10 + 0x10),&local_1a,1), sVar5 != -1)) { if (local_1b == '[') { if ((local_1a < '0') || ('9' < local_1a)) { switch(local_1a) { case 'A': linenoiseEditHistoryNext(local_10,1); break; case 'B': linenoiseEditHistoryNext(local_10,0); break; case 'C': linenoiseEditMoveRight(local_10); break; case 'D': linenoiseEditMoveLeft(local_10); break; case 'F': linenoiseEditMoveEnd(local_10); break; case 'H': linenoiseEditMoveHome(local_10); } } else { sVar5 = read(*(int *)(local_10 + 0x10),&local_19,1); if (((sVar5 != -1) && (local_19 == '~')) && (local_1a == '3')) { linenoiseEditDelete(local_10); } } } else if (local_1b == 'O') { if (local_1a == 'F') { linenoiseEditMoveEnd(local_10); } else if (local_1a == 'H') { linenoiseEditMoveHome(local_10); } } } } return linenoiseEditMore; } return (char *)0x0; }
49,186
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O0
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp subq $0x60, %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) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x566de movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x566e6 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x24200 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x567d0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0x56723 movl -0x1c(%rbp), %eax movq %rax, -0x18(%rbp) jmp 0x56725 jmp 0x56727 movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x56739 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x5673b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x38(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax subq -0x38(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x50d90 movq %rax, -0x38(%rbp) movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x567bf movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x567bf movq -0x40(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x8(%rbp), %rax movzbl 0xb0(%rax), %ecx callq 0x56970 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_tis620: push rbp mov rbp, rsp sub rsp, 60h 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 rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp rax, [rbp+var_30] jnb short loc_566DE mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_566E6 loc_566DE: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_566E6: mov rax, [rbp+var_50] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _memcpy mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] call thai2sortable mov [rbp+var_38], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_56723 mov eax, [rbp+var_1C] mov [rbp+var_18], rax loc_56723: jmp short $+2 loc_56725: jmp short $+2 loc_56727: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jbe short loc_56739 mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_56739: jmp short $+2 loc_5673B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_38] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov rax, [rbp+var_18] sub rax, [rbp+var_38] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+60h+var_60], 0 call my_strxfrm_pad_desc_and_reverse mov [rbp+var_38], rax mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_567BF mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb short loc_567BF mov rax, [rbp+var_40] sub rax, [rbp+var_38] mov [rbp+var_48], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, [rbp+var_38] mov rdx, [rbp+var_48] mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+0B0h] call my_ci_fill_2 mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_567BF: mov rax, [rbp+var_38] add rsp, 60h pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v8; // [rsp+10h] [rbp-50h] unsigned long long v10; // [rsp+28h] [rbp-38h] unsigned long long v11; // [rsp+28h] [rbp-38h] unsigned long long v13; // [rsp+48h] [rbp-18h] v13 = a3; if ( a3 >= a6 ) v8 = a6; else v8 = a3; memcpy(a2, a5, v8); v10 = thai2sortable(a2, v8); if ( v13 > a4 ) v13 = a4; if ( v10 > v13 ) v10 = v13; v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0); if ( (a7 & 0x80) != 0 && v11 < a3 ) { my_ci_fill_2(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176)); return a3; } return v11; }
my_strnxfrm_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001566de MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x001566e6 LAB_001566de: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX LAB_001566e6: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00124200 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001567d0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] CMP RAX,RCX JBE 0x00156723 MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x18],RAX LAB_00156723: JMP 0x00156725 LAB_00156725: JMP 0x00156727 LAB_00156727: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JBE 0x00156739 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX LAB_00156739: JMP 0x0015673b LAB_0015673b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RBP + -0x38] MOV R8D,EAX MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x00150d90 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x001567bf MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001567bf MOV RAX,qword ptr [RBP + -0x40] SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0xb0] CALL 0x00156970 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_001567bf: MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x60 POP RBP RET
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,uint param_7) { size_t local_58; ulong local_40; ulong local_20; local_58 = param_6; if (param_3 < param_6) { local_58 = param_3; } memcpy(param_2,param_5,local_58); local_40 = thai2sortable(param_2,local_58); local_20 = param_3; if (param_4 < param_3) { local_20 = (ulong)param_4; } if (local_20 < local_40) { local_40 = local_20; } local_40 = my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20, (int)local_20 - (int)local_40,param_7,0); if (((param_7 & 0x80) != 0) && (local_40 < param_3)) { my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0)); local_40 = param_3; } return local_40; }
49,187
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O3
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movl %ecx, %r12d movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpq %r9, %rdx cmovbq %rdx, %r13 movq %rsi, %rdi movq %r8, %rsi movq %r13, %rdx callq 0x24210 movq %r14, %rdi movq %r13, %rsi callq 0x43227 movl %r12d, %r8d cmpq %rbx, %r8 cmovaeq %rbx, %r8 cmpq %r8, %r13 cmovaeq %r8, %r13 leaq (%r14,%r13), %rdx leaq (%r14,%r8), %rcx subl %r13d, %r8d movl $0x0, (%rsp) movq %r15, %rdi movq %r14, %rsi movl 0x10(%rbp), %r12d movl %r12d, %r9d callq 0x3ff90 testb %r12b, %r12b jns 0x43218 movq %rbx, %rdx subq %rax, %rdx jbe 0x43218 addq %rax, %r14 movzbl 0xb0(%r15), %ecx movq 0xb8(%r15), %rax movq %r15, %rdi movq %r14, %rsi callq *0x78(%rax) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_tis620: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov r12d, ecx mov rbx, rdx mov r14, rsi mov r15, rdi cmp rdx, r9 cmovb r13, rdx mov rdi, rsi mov rsi, r8 mov rdx, r13 call _memcpy mov rdi, r14 mov rsi, r13 call thai2sortable mov r8d, r12d cmp r8, rbx cmovnb r8, rbx cmp r13, r8 cmovnb r13, r8 lea rdx, [r14+r13] lea rcx, [r14+r8] sub r8d, r13d mov [rsp+30h+var_30], 0 mov rdi, r15 mov rsi, r14 mov r12d, [rbp+arg_0] mov r9d, r12d call my_strxfrm_pad_desc_and_reverse test r12b, r12b jns short loc_43218 mov rdx, rbx sub rdx, rax jbe short loc_43218 add r14, rax movzx ecx, byte ptr [r15+0B0h] mov rax, [r15+0B8h] mov rdi, r15 mov rsi, r14 call qword ptr [rax+78h] mov rax, rbx loc_43218: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v7; // r13 unsigned long long v10; // r8 unsigned long long result; // rax v7 = a6; if ( a3 < a6 ) v7 = a3; memcpy(a2, a5, v7); thai2sortable(a2, v7); v10 = a4; if ( a4 >= a3 ) v10 = a3; if ( v7 >= v10 ) v7 = v10; result = my_strxfrm_pad_desc_and_reverse(a1, a2, a2 + v7, a2 + v10, (int)v10 - (int)v7, a7, 0); if ( (a7 & 0x80u) != 0 && a3 > result ) { (*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, result + a2, a3 - result, *(unsigned __int8 *)(a1 + 176)); return a3; } return result; }
my_strnxfrm_tis620: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV R12D,ECX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP RDX,R9 CMOVC R13,RDX MOV RDI,RSI MOV RSI,R8 MOV RDX,R13 CALL 0x00124210 MOV RDI,R14 MOV RSI,R13 CALL 0x00143227 MOV R8D,R12D CMP R8,RBX CMOVNC R8,RBX CMP R13,R8 CMOVNC R13,R8 LEA RDX,[R14 + R13*0x1] LEA RCX,[R14 + R8*0x1] SUB R8D,R13D MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R14 MOV R12D,dword ptr [RBP + 0x10] MOV R9D,R12D CALL 0x0013ff90 TEST R12B,R12B JNS 0x00143218 MOV RDX,RBX SUB RDX,RAX JBE 0x00143218 ADD R14,RAX MOVZX ECX,byte ptr [R15 + 0xb0] MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RSI,R14 CALL qword ptr [RAX + 0x78] MOV RAX,RBX LAB_00143218: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; ulong uVar1; uint uVar2; uVar2 = (uint)((ulong)in_RAX >> 0x20); if (param_3 < param_6) { param_6 = param_3; } memcpy(param_2,param_5,param_6); thai2sortable(param_2,param_6); uVar1 = (ulong)param_4; if (param_3 <= param_4) { uVar1 = param_3; } if (uVar1 <= param_6) { param_6 = uVar1; } uVar1 = my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + param_6,(long)param_2 + uVar1, (int)uVar1 - (int)param_6,param_7,(ulong)uVar2 << 0x20); if (((char)param_7 < '\0') && (uVar1 <= param_3 && param_3 - uVar1 != 0)) { (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,(long)param_2 + uVar1,param_3 - uVar1,*(int1 *)(param_1 + 0xb0)); uVar1 = param_3; } return uVar1; }
49,188
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O0
c
get_charset: pushq %rbp movq %rsp, %rbp subq $0x320, %rsp # imm = 0x320 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x2fc(%rbp) movq %rsi, -0x308(%rbp) movq $0x0, -0x310(%rbp) movl -0x2fc(%rbp), %eax leaq 0x1a286b(%rip), %rcx # 0x1d1868 movq (%rcx), %rcx cmpl (%rcx), %eax jne 0x2f01a leaq 0x1a285d(%rip), %rax # 0x1d1868 movq (%rax), %rax movq %rax, -0x2f8(%rbp) jmp 0x2f0ec leaq 0x3624d3(%rip), %rdi # 0x3914f4 leaq -0x548(%rip), %rsi # 0x2eae0 callq 0x242d0 cmpl $0x800, -0x2fc(%rbp) # imm = 0x800 jae 0x2f065 leaq -0xb8(%rbp), %rdi callq 0x2e100 movl -0x2fc(%rbp), %esi movq -0x308(%rbp), %rdx leaq -0xb8(%rbp), %rdi callq 0x2f130 movq %rax, -0x310(%rbp) cmpq $0x0, -0x310(%rbp) jne 0x2f0de movq -0x308(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x2f0de leaq -0x2d0(%rbp), %rdi callq 0x2e7a0 movq %rax, %rdi leaq 0x4d8e1(%rip), %rsi # 0x7c977 callq 0x24320 movb $0x23, -0x2f0(%rbp) movl -0x2fc(%rbp), %eax movl %eax, %edi leaq -0x2f0(%rbp), %rsi addq $0x1, %rsi movl $0xa, %edx callq 0x76410 leaq -0x2f0(%rbp), %rdx leaq -0x2d0(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x27d80 movq -0x310(%rbp), %rax movq %rax, -0x2f8(%rbp) movq -0x2f8(%rbp), %rax movq %rax, -0x318(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2f11c movq -0x318(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq callq 0x24370 nopw %cs:(%rax,%rax)
get_charset: push rbp mov rbp, rsp sub rsp, 320h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2FC], edi mov [rbp+var_308], rsi mov [rbp+var_310], 0 mov eax, [rbp+var_2FC] lea rcx, default_charset_info mov rcx, [rcx] cmp eax, [rcx] jnz short loc_2F01A lea rax, default_charset_info mov rax, [rax] mov [rbp+var_2F8], rax jmp loc_2F0EC loc_2F01A: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_2FC], 800h jnb short loc_2F065 lea rdi, [rbp+var_B8] call my_charset_loader_init_mysys mov esi, [rbp+var_2FC] mov rdx, [rbp+var_308] lea rdi, [rbp+var_B8] call get_internal_charset mov [rbp+var_310], rax loc_2F065: cmp [rbp+var_310], 0 jnz short loc_2F0DE mov rax, [rbp+var_308] and rax, 10h cmp rax, 0 jz short loc_2F0DE lea rdi, [rbp+var_2D0] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov [rbp+var_2F0], 23h ; '#' mov eax, [rbp+var_2FC] mov edi, eax lea rsi, [rbp+var_2F0] add rsi, 1 mov edx, 0Ah call int10_to_str lea rdx, [rbp+var_2F0] lea rcx, [rbp+var_2D0] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_2F0DE: mov rax, [rbp+var_310] mov [rbp+var_2F8], rax loc_2F0EC: mov rax, [rbp+var_2F8] mov [rbp+var_318], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2F11C mov rax, [rbp+var_318] add rsp, 320h pop rbp retn loc_2F11C: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { _BYTE *charsets_dir; // rax long long internal_charset; // [rsp+10h] [rbp-310h] char v6; // [rsp+30h] [rbp-2F0h] BYREF _BYTE v7[7]; // [rsp+31h] [rbp-2EFh] BYREF _BYTE v8[536]; // [rsp+50h] [rbp-2D0h] BYREF _BYTE v9[176]; // [rsp+268h] [rbp-B8h] BYREF unsigned long long v10; // [rsp+318h] [rbp-8h] v10 = __readfsqword(0x28u); internal_charset = 0LL; if ( a1 == *(_DWORD *)default_charset_info ) return default_charset_info; pthread_once(&charsets_initialized, init_available_charsets); if ( a1 < 0x800 ) { my_charset_loader_init_mysys((long long)v9); internal_charset = get_internal_charset(v9, a1, a2); } if ( !internal_charset && (a2 & 0x10) != 0 ) { charsets_dir = get_charsets_dir(v8); stpcpy(charsets_dir, "Index.xml"); v6 = 35; int10_to_str(a1, v7, 10LL); my_error(0x16u, 4LL, &v6, v8); } return (void *)internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x320 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x2fc],EDI MOV qword ptr [RBP + -0x308],RSI MOV qword ptr [RBP + -0x310],0x0 MOV EAX,dword ptr [RBP + -0x2fc] LEA RCX,[0x2d1868] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX] JNZ 0x0012f01a LEA RAX,[0x2d1868] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2f8],RAX JMP 0x0012f0ec LAB_0012f01a: LEA RDI,[0x4914f4] LEA RSI,[0x12eae0] CALL 0x001242d0 CMP dword ptr [RBP + -0x2fc],0x800 JNC 0x0012f065 LEA RDI,[RBP + -0xb8] CALL 0x0012e100 MOV ESI,dword ptr [RBP + -0x2fc] MOV RDX,qword ptr [RBP + -0x308] LEA RDI,[RBP + -0xb8] CALL 0x0012f130 MOV qword ptr [RBP + -0x310],RAX LAB_0012f065: CMP qword ptr [RBP + -0x310],0x0 JNZ 0x0012f0de MOV RAX,qword ptr [RBP + -0x308] AND RAX,0x10 CMP RAX,0x0 JZ 0x0012f0de LEA RDI,[RBP + -0x2d0] CALL 0x0012e7a0 MOV RDI,RAX LEA RSI,[0x17c977] CALL 0x00124320 MOV byte ptr [RBP + -0x2f0],0x23 MOV EAX,dword ptr [RBP + -0x2fc] MOV EDI,EAX LEA RSI,[RBP + -0x2f0] ADD RSI,0x1 MOV EDX,0xa CALL 0x00176410 LEA RDX,[RBP + -0x2f0] LEA RCX,[RBP + -0x2d0] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x00127d80 LAB_0012f0de: MOV RAX,qword ptr [RBP + -0x310] MOV qword ptr [RBP + -0x2f8],RAX LAB_0012f0ec: MOV RAX,qword ptr [RBP + -0x2f8] MOV qword ptr [RBP + -0x318],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012f11c MOV RAX,qword ptr [RBP + -0x318] ADD RSP,0x320 POP RBP RET LAB_0012f11c: CALL 0x00124370
int * get_charset(uint param_1,ulong param_2) { char *__dest; long in_FS_OFFSET; int *local_318; int *local_300; int1 local_2f8; int1 auStack_2f7 [31]; int1 local_2d8 [536]; int1 local_c0 [176]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_318 = (int *)0x0; if (param_1 == *(uint *)default_charset_info) { local_300 = default_charset_info; } else { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { my_charset_loader_init_mysys(local_c0); local_318 = (int *)get_internal_charset(local_c0,param_1,param_2); } if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_2d8); stpcpy(__dest,"Index.xml"); local_2f8 = 0x23; int10_to_str(param_1,auStack_2f7,10); my_error(0x16,4,&local_2f8,local_2d8); } local_300 = local_318; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_300; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,189
do_foo() (.resume)
corofx/tests/test_task_move.cpp
auto do_foo() -> task<int> { co_return marker0; }
O3
cpp
do_foo() (.resume): endbr64 pushq %rbp movq %rsp, %rbp movq 0x18(%rdi), %rax movabsq $0x100000012, %rcx # imm = 0x100000012 movq %rcx, (%rax) movq $0x0, (%rdi) movb $0x1, 0x28(%rdi) movq 0x10(%rdi), %rax testq %rax, %rax leaq 0x275f(%rip), %rdi # 0x4010 cmovneq %rax, %rdi popq %rbp jmpq *(%rdi)
_Z6do_foov_resume: endbr64 push rbp mov rbp, rsp mov rax, [rdi+18h] mov rcx, 100000012h mov [rax], rcx mov qword ptr [rdi], 0 mov byte ptr [rdi+28h], 1 mov rax, [rdi+10h] test rax, rax lea rdi, _ZNSt7__n486116coroutine_handleINS_22noop_coroutine_promiseEE5_S_frE; std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise>::_S_fr cmovnz rdi, rax pop rbp jmp qword ptr [rdi]
long long do_foo(long long a1) { long long (**v1)(void); // rax long long (**v2)(void); // rdi **(_QWORD **)(a1 + 24) = 0x100000012LL; *(_QWORD *)a1 = 0LL; *(_BYTE *)(a1 + 40) = 1; v1 = *(long long (***)(void))(a1 + 16); v2 = std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise>::_S_fr; if ( v1 ) v2 = v1; return (*v2)(); }
do_foo: ENDBR64 PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x18] MOV RCX,0x100000012 MOV qword ptr [RAX],RCX MOV qword ptr [RDI],0x0 MOV byte ptr [RDI + 0x28],0x1 MOV RAX,qword ptr [RDI + 0x10] TEST RAX,RAX LEA RDI,[0x104010] CMOVNZ RDI,RAX POP RBP JMP qword ptr [RDI]
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* do_foo() [clone .resume] */ void do_foo(void) { int8 *in_RDI; int8 *puVar1; *(int8 *)in_RDI[3] = 0x100000012; *in_RDI = 0; *(int1 *)(in_RDI + 5) = 1; puVar1 = (int8 *)std::__n4861::coroutine_handle<std::__n4861::noop_coroutine_promise>::_S_fr ; if ((int8 *)in_RDI[2] != (int8 *)0x0) { puVar1 = (int8 *)in_RDI[2]; } /* WARNING: Could not recover jumptable at 0x001018b6. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)*puVar1)(); return; }
49,190
my_convert_fix
eloqsql/strings/ctype.c
size_t my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length, CHARSET_INFO *from_cs, const char *from, size_t from_length, size_t nchars, MY_STRCOPY_STATUS *copy_status, MY_STRCONV_STATUS *conv_status) { int cnvres; my_wc_t wc; my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb; const uchar *from_end= (const uchar*) from + from_length; uchar *to_end= (uchar*) to + to_length; char *to_start= to; DBUG_ASSERT(to_cs != &my_charset_bin); DBUG_ASSERT(from_cs != &my_charset_bin); copy_status->m_well_formed_error_pos= NULL; conv_status->m_cannot_convert_error_pos= NULL; for ( ; nchars; nchars--) { const char *from_prev= from; if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0) from+= cnvres; else if (cnvres == MY_CS_ILSEQ) { if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } else if (cnvres > MY_CS_TOOSMALL) { /* A correct multibyte sequence detected But it doesn't have Unicode mapping. */ if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from; from+= (-cnvres); wc= '?'; } else { if ((uchar *) from >= from_end) break; // End of line // Incomplete byte sequence if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } outp: if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) to+= cnvres; else if (cnvres == MY_CS_ILUNI && wc != '?') { if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from_prev; wc= '?'; goto outp; } else { from= from_prev; break; } } copy_status->m_source_end_pos= from; return to - to_start; }
O3
c
my_convert_fix: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movq %rdx, %r12 movq %rdi, %r13 movq 0x20(%rbp), %rdi movq 0x18(%rbp), %rdx movq 0x10(%rbp), %r8 movq %rcx, -0x60(%rbp) movq 0xb8(%rcx), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq 0xb8(%r13), %rax movq 0x30(%rax), %rax movq %rax, -0x40(%rbp) xorl %eax, %eax movq %rax, 0x8(%rdx) movq %rax, (%rdi) testq %r8, %r8 movq %rsi, -0x48(%rbp) je 0x35657 movq %r8, -0x50(%rbp) addq %r14, %r9 movq %r9, -0x38(%rbp) addq %rsi, %r12 movq %rsi, %rbx movq -0x60(%rbp), %rdi leaq -0x30(%rbp), %rsi movq %r14, %rdx movq -0x38(%rbp), %rcx callq *-0x58(%rbp) movl %eax, %r15d testl %eax, %eax jle 0x355cf movl %r15d, %r15d addq %r14, %r15 movq -0x30(%rbp), %rsi jmp 0x35607 je 0x355f2 cmpl $-0x64, %r15d jb 0x355ec movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x355e4 movq %r14, (%rax) negl %r15d addq %r14, %r15 jmp 0x3562f cmpq -0x38(%rbp), %r14 jae 0x35652 movq 0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x35601 movq %r14, 0x8(%rax) leaq 0x1(%r14), %r15 jmp 0x3562f movq %r13, %rdi movq %rbx, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jg 0x3563e testl %eax, %eax jne 0x35652 cmpq $0x3f, -0x30(%rbp) je 0x35652 movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x3562f movq %r14, (%rax) movq $0x3f, -0x30(%rbp) movl $0x3f, %esi jmp 0x35607 movl %eax, %eax addq %rax, %rbx movq %r15, %r14 decq -0x50(%rbp) jne 0x355aa jmp 0x3565d movq %r14, %r15 jmp 0x3565d movq %r14, %r15 movq %rsi, %rbx movq 0x18(%rbp), %rax movq %r15, (%rax) subq -0x48(%rbp), %rbx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_convert_fix: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov r12, rdx mov r13, rdi mov rdi, [rbp+arg_10] mov rdx, [rbp+arg_8] mov r8, [rbp+arg_0] mov [rbp+var_60], rcx mov rax, [rcx+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [r13+0B8h] mov rax, [rax+30h] mov [rbp+var_40], rax xor eax, eax mov [rdx+8], rax mov [rdi], rax test r8, r8 mov [rbp+var_48], rsi jz loc_35657 mov [rbp+var_50], r8 add r9, r14 mov [rbp+var_38], r9 add r12, rsi mov rbx, rsi loc_355AA: mov rdi, [rbp+var_60] lea rsi, [rbp+var_30] mov rdx, r14 mov rcx, [rbp+var_38] call [rbp+var_58] mov r15d, eax test eax, eax jle short loc_355CF mov r15d, r15d add r15, r14 mov rsi, [rbp+var_30] jmp short loc_35607 loc_355CF: jz short loc_355F2 cmp r15d, 0FFFFFF9Ch jb short loc_355EC mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_355E4 mov [rax], r14 loc_355E4: neg r15d add r15, r14 jmp short loc_3562F loc_355EC: cmp r14, [rbp+var_38] jnb short loc_35652 loc_355F2: mov rax, [rbp+arg_8] cmp qword ptr [rax+8], 0 jnz short loc_35601 mov [rax+8], r14 loc_35601: lea r15, [r14+1] jmp short loc_3562F loc_35607: mov rdi, r13 mov rdx, rbx mov rcx, r12 call [rbp+var_40] test eax, eax jg short loc_3563E test eax, eax jnz short loc_35652 cmp [rbp+var_30], 3Fh ; '?' jz short loc_35652 mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_3562F mov [rax], r14 loc_3562F: mov [rbp+var_30], 3Fh ; '?' mov esi, 3Fh ; '?' jmp short loc_35607 loc_3563E: mov eax, eax add rbx, rax mov r14, r15 dec [rbp+var_50] jnz loc_355AA jmp short loc_3565D loc_35652: mov r15, r14 jmp short loc_3565D loc_35657: mov r15, r14 mov rbx, rsi loc_3565D: mov rax, [rbp+arg_8] mov [rax], r15 sub rbx, [rbp+var_48] mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_convert_fix( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, long long a6, long long a7, unsigned long long *a8, unsigned long long *a9) { unsigned long long v9; // r14 long long v10; // r12 long long v11; // rbx int v12; // eax unsigned long long v13; // r15 long long v14; // rsi int v15; // eax long long ( *v18)(long long, long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] long long v19; // [rsp+10h] [rbp-50h] long long ( *v21)(long long, long long, long long, long long); // [rsp+20h] [rbp-40h] unsigned long long v22; // [rsp+28h] [rbp-38h] long long v23[6]; // [rsp+30h] [rbp-30h] BYREF v9 = a5; v18 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a4 + 184) + 40LL); v21 = *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL); a8[1] = 0LL; *a9 = 0LL; if ( a7 ) { v19 = a7; v22 = a5 + a6; v10 = a2 + a3; v11 = a2; while ( 1 ) { v12 = v18(a4, v23, v9, v22); if ( v12 > 0 ) { v13 = v9 + (unsigned int)v12; v14 = v23[0]; goto LABEL_14; } if ( !v12 ) goto LABEL_11; if ( (unsigned int)v12 < 0xFFFFFF9C ) break; if ( !*a9 ) *a9 = v9; v13 = v9 + (unsigned int)-v12; LABEL_19: while ( 1 ) { v23[0] = 63LL; v14 = 63LL; LABEL_14: v15 = v21(a1, v14, v11, v10); if ( v15 > 0 ) break; if ( v15 || v23[0] == 63 ) goto LABEL_22; if ( !*a9 ) *a9 = v9; } v11 += (unsigned int)v15; v9 = v13; if ( !--v19 ) goto LABEL_24; } if ( v9 < v22 ) { LABEL_11: if ( !a8[1] ) a8[1] = v9; v13 = v9 + 1; goto LABEL_19; } LABEL_22: v13 = v9; } else { v13 = a5; v11 = a2; } LABEL_24: *a8 = v13; return v11 - a2; }
my_convert_fix: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV R12,RDX MOV R13,RDI MOV RDI,qword ptr [RBP + 0x20] MOV RDX,qword ptr [RBP + 0x18] MOV R8,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x60],RCX MOV RAX,qword ptr [RCX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [R13 + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x40],RAX XOR EAX,EAX MOV qword ptr [RDX + 0x8],RAX MOV qword ptr [RDI],RAX TEST R8,R8 MOV qword ptr [RBP + -0x48],RSI JZ 0x00135657 MOV qword ptr [RBP + -0x50],R8 ADD R9,R14 MOV qword ptr [RBP + -0x38],R9 ADD R12,RSI MOV RBX,RSI LAB_001355aa: MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x30] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x58] MOV R15D,EAX TEST EAX,EAX JLE 0x001355cf MOV R15D,R15D ADD R15,R14 MOV RSI,qword ptr [RBP + -0x30] JMP 0x00135607 LAB_001355cf: JZ 0x001355f2 CMP R15D,-0x64 JC 0x001355ec MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x001355e4 MOV qword ptr [RAX],R14 LAB_001355e4: NEG R15D ADD R15,R14 JMP 0x0013562f LAB_001355ec: CMP R14,qword ptr [RBP + -0x38] JNC 0x00135652 LAB_001355f2: MOV RAX,qword ptr [RBP + 0x18] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x00135601 MOV qword ptr [RAX + 0x8],R14 LAB_00135601: LEA R15,[R14 + 0x1] JMP 0x0013562f LAB_00135607: MOV RDI,R13 MOV RDX,RBX MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JG 0x0013563e TEST EAX,EAX JNZ 0x00135652 CMP qword ptr [RBP + -0x30],0x3f JZ 0x00135652 MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x0013562f MOV qword ptr [RAX],R14 LAB_0013562f: MOV qword ptr [RBP + -0x30],0x3f MOV ESI,0x3f JMP 0x00135607 LAB_0013563e: MOV EAX,EAX ADD RBX,RAX MOV R14,R15 DEC qword ptr [RBP + -0x50] JNZ 0x001355aa JMP 0x0013565d LAB_00135652: MOV R15,R14 JMP 0x0013565d LAB_00135657: MOV R15,R14 MOV RBX,RSI LAB_0013565d: MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX],R15 SUB RBX,qword ptr [RBP + -0x48] MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_convert_fix(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6, long param_7,ulong *param_8,ulong *param_9) { code *pcVar1; code *pcVar2; uint uVar3; long lVar4; ulong uVar5; ulong uVar6; long local_58; long local_38; pcVar1 = *(code **)(*(long *)(param_4 + 0xb8) + 0x28); pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); param_8[1] = 0; *param_9 = 0; lVar4 = param_2; uVar5 = param_5; if (param_7 != 0) { local_58 = param_7; while( true ) { uVar3 = (*pcVar1)(param_4,&local_38,uVar5,param_6 + param_5); if ((int)uVar3 < 1) break; uVar6 = uVar3 + uVar5; while (uVar3 = (*pcVar2)(param_1,local_38,lVar4,param_3 + param_2), (int)uVar3 < 1) { if ((uVar3 != 0) || (local_38 == 0x3f)) goto LAB_0013565d; if (*param_9 == 0) { *param_9 = uVar5; } LAB_0013562f: local_38 = 0x3f; } lVar4 = lVar4 + (ulong)uVar3; local_58 = local_58 + -1; uVar5 = uVar6; if (local_58 == 0) goto LAB_0013565d; } if (uVar3 != 0) { if (0xffffff9b < uVar3) { if (*param_9 == 0) { *param_9 = uVar5; } uVar6 = -uVar3 + uVar5; goto LAB_0013562f; } if (param_6 + param_5 <= uVar5) goto LAB_0013565d; } if (param_8[1] == 0) { param_8[1] = uVar5; } uVar6 = uVar5 + 1; goto LAB_0013562f; } LAB_0013565d: *param_8 = uVar5; return lVar4 - param_2; }
49,191
ma_kpointer
eloqsql/storage/maria/ma_search.c
void _ma_kpointer(register MARIA_HA *info, register uchar *buff, my_off_t pos) { pos/=maria_block_size; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O0
c
ma_kpointer: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x227b65(%rip), %rax # 0x2bd210 movq (%rax), %rcx movq -0x18(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x3e4(%rax), %eax decl %eax movl %eax, %ecx movq %rcx, -0x68(%rbp) subl $0x6, %eax ja 0x95901 movq -0x68(%rbp), %rax leaq 0xc39b0(%rip), %rcx # 0x159094 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x20(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x20(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x20(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x28(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x28(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x28(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x95906 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x30(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x30(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x30(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x38(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x38(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x95906 movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x40(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x40(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x40(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x48(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x95906 movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x95906 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x58(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x58(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x95906 movq -0x18(%rbp), %rax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movl -0x5c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x95906 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x95906 callq 0x2a5c0 addq $0x70, %rsp popq %rbp retq nopl (%rax)
_ma_kpointer: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, maria_block_size mov rcx, [rax] mov rax, [rbp+var_18] xor edx, edx div rcx mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+3E4h] dec eax; switch 7 cases mov ecx, eax mov [rbp+var_68], rcx sub eax, 6 ja def_956EB; jumptable 00000000000956EB default case mov rax, [rbp+var_68] lea rcx, jpt_956EB movsxd rax, ds:(jpt_956EB - 159094h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_956ED: mov rax, [rbp+var_18]; jumptable 00000000000956EB case 7 mov [rbp+var_20], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_28], rax mov rax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_20] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_20] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_20] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_28] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_28] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_28] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_95906 loc_95774: mov rax, [rbp+var_18]; jumptable 00000000000956EB case 6 mov [rbp+var_30], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_38], rax mov rax, [rbp+var_30] mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_30] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_30] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_30] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_38] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_38] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_95906 loc_957EA: mov rax, [rbp+var_18]; jumptable 00000000000956EB case 5 mov [rbp+var_40], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_48], rax mov rax, [rbp+var_40] mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_40] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_40] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_40] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_48] mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_95906 loc_9584F: mov rax, [rbp+var_18]; jumptable 00000000000956EB case 4 mov [rbp+var_50], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_95906 loc_95898: mov rax, [rbp+var_18]; jumptable 00000000000956EB case 3 mov [rbp+var_58], rax mov rax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_58] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_58] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_95906 loc_958D0: mov rax, [rbp+var_18]; jumptable 00000000000956EB case 2 mov [rbp+var_5C], eax mov eax, [rbp+var_5C] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov eax, [rbp+var_5C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_95906 loc_958F3: mov rax, [rbp+var_18]; jumptable 00000000000956EB case 1 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_95906 def_956EB: call _abort; jumptable 00000000000956EB default case loc_95906: add rsp, 70h pop rbp retn
_BYTE * ma_kpointer(long long a1, _BYTE *a2, unsigned long long a3) { unsigned long long v3; // rdx _BYTE *result; // rax unsigned long long v6; // [rsp+58h] [rbp-18h] v3 = a3 % *(_QWORD *)&maria_block_size; v6 = a3 / *(_QWORD *)&maria_block_size; switch ( *(_DWORD *)(*(_QWORD *)a1 + 996LL) ) { case 1: result = a2; *a2 = v6; break; case 2: a2[1] = v6; result = a2; *a2 = BYTE1(v6); break; case 3: a2[2] = v6; a2[1] = BYTE1(v6); result = a2; *a2 = BYTE2(v6); break; case 4: a2[3] = v6; a2[2] = BYTE1(v6); a2[1] = BYTE2(v6); result = a2; *a2 = BYTE3(v6); break; case 5: a2[4] = v6; a2[3] = BYTE1(v6); a2[2] = BYTE2(v6); a2[1] = BYTE3(v6); result = a2; *a2 = BYTE4(v6); break; case 6: a2[5] = v6; a2[4] = BYTE1(v6); a2[3] = BYTE2(v6); a2[2] = BYTE3(v6); a2[1] = BYTE4(v6); result = a2; *a2 = BYTE5(v6); break; case 7: a2[6] = v6; a2[5] = BYTE1(v6); a2[4] = BYTE2(v6); a2[3] = BYTE3(v6); a2[2] = BYTE4(v6); a2[1] = BYTE5(v6); result = a2; *a2 = BYTE6(v6); break; default: abort(a1, a2, v3); } return result; }
_ma_kpointer: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3bd210] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x3e4] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x68],RCX SUB EAX,0x6 JA 0x00195901 MOV RAX,qword ptr [RBP + -0x68] LEA RCX,[0x259094] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x28] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x00195906 caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x38] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x00195906 caseD_5: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x00195906 caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x00195906 caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x00195906 caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x5c],EAX MOV EAX,dword ptr [RBP + -0x5c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x5c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x00195906 caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x00195906 default: CALL 0x0012a5c0 LAB_00195906: ADD RSP,0x70 POP RBP RET
void _ma_kpointer(long *param_1,int1 *param_2,ulong param_3) { int1 uVar1; int1 uVar2; int1 uVar3; int1 uVar4; int1 uVar5; int1 uVar6; param_3 = param_3 / maria_block_size; uVar1 = (int1)param_3; uVar2 = (int1)(param_3 >> 8); uVar3 = (int1)(param_3 >> 0x10); uVar4 = (int1)(param_3 >> 0x18); uVar5 = (int1)(param_3 >> 0x20); uVar6 = (int1)(param_3 >> 0x28); switch(*(int4 *)(*param_1 + 0x3e4)) { case 1: *param_2 = uVar1; break; case 2: param_2[1] = uVar1; *param_2 = uVar2; break; case 3: param_2[2] = uVar1; param_2[1] = uVar2; *param_2 = uVar3; break; case 4: param_2[3] = uVar1; param_2[2] = uVar2; param_2[1] = uVar3; *param_2 = uVar4; break; case 5: param_2[4] = uVar1; param_2[3] = uVar2; param_2[2] = uVar3; param_2[1] = uVar4; *param_2 = uVar5; break; case 6: param_2[5] = uVar1; param_2[4] = uVar2; param_2[3] = uVar3; param_2[2] = uVar4; param_2[1] = uVar5; *param_2 = uVar6; break; case 7: param_2[6] = uVar1; param_2[5] = uVar2; param_2[4] = uVar3; param_2[3] = uVar4; param_2[2] = uVar5; param_2[1] = uVar6; *param_2 = (char)(param_3 >> 0x30); break; default: /* WARNING: Subroutine does not return */ abort(); } return; }
49,192
ggml_compute_forward_exp
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_exp( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_exp_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_exp: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax testl %eax, %eax jne 0x3911a jmp 0x3910b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x3ad90 jmp 0x39134 leaq 0x3aa41(%rip), %rdi # 0x73b62 movl $0x1ad8, %esi # imm = 0x1AD8 leaq 0x3ac90(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_compute_forward_exp: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax] test eax, eax jnz short loc_3911A jmp short $+2 loc_3910B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_exp_f32 jmp short loc_39134 loc_3911A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1AD8h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_39134: add rsp, 20h pop rbp retn
double ggml_compute_forward_exp(long long a1, long long a2) { double result; // xmm0_8 if ( **(_DWORD **)(a2 + 152) ) return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 6872LL, "fatal error"); ggml_compute_forward_exp_f32(a1, a2); return result; }
ggml_compute_forward_exp: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] TEST EAX,EAX JNZ 0x0013911a JMP 0x0013910b LAB_0013910b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0013ad90 JMP 0x00139134 LAB_0013911a: LEA RDI,[0x173b62] MOV ESI,0x1ad8 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00139134: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_exp(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_exp_f32(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1ad8,"fatal error"); } return; }
49,193
my_charset_file_tailoring_realloc
eloqsql/strings/ctype.c
static int my_charset_file_tailoring_realloc(MY_CHARSET_FILE *i, size_t newlen) { if (i->tailoring_alloced_length > newlen || (i->tailoring= i->loader->realloc(i->tailoring, (i->tailoring_alloced_length= (newlen + 32*1024))))) { return MY_XML_OK; } return MY_XML_ERROR; }
O0
c
my_charset_file_tailoring_realloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x698(%rax), %rax cmpq -0x18(%rbp), %rax ja 0xa27c7 movq -0x10(%rbp), %rax movq 0x7a8(%rax), %rax movq 0x90(%rax), %rax movq -0x10(%rbp), %rcx movq 0x688(%rcx), %rdi movq -0x18(%rbp), %rsi addq $0x8000, %rsi # imm = 0x8000 movq -0x10(%rbp), %rcx movq %rsi, 0x698(%rcx) callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x688(%rcx) cmpq $0x0, %rax je 0xa27d0 movl $0x0, -0x4(%rbp) jmp 0xa27d7 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq
my_charset_file_tailoring_realloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+698h] cmp rax, [rbp+var_18] ja short loc_A27C7 mov rax, [rbp+var_10] mov rax, [rax+7A8h] mov rax, [rax+90h] mov rcx, [rbp+var_10] mov rdi, [rcx+688h] mov rsi, [rbp+var_18] add rsi, 8000h mov rcx, [rbp+var_10] mov [rcx+698h], rsi call rax mov rcx, [rbp+var_10] mov [rcx+688h], rax cmp rax, 0 jz short loc_A27D0 loc_A27C7: mov [rbp+var_4], 0 jmp short loc_A27D7 loc_A27D0: mov [rbp+var_4], 1 loc_A27D7: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_charset_file_tailoring_realloc(_QWORD *a1, unsigned long long a2) { long long ( *v2)(long long); // rax long long v3; // rdi long long v4; // rax unsigned int v7; // [rsp+1Ch] [rbp-4h] v7 = 0; if ( a1[211] <= a2 ) { v2 = *(long long ( **)(long long))(a1[245] + 144LL); v3 = a1[209]; a1[211] = a2 + 0x8000; v4 = v2(v3); a1[209] = v4; if ( !v4 ) return 1; } return v7; }
my_charset_file_tailoring_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x698] CMP RAX,qword ptr [RBP + -0x18] JA 0x001a27c7 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x7a8] MOV RAX,qword ptr [RAX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x688] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x8000 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x698],RSI CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x688],RAX CMP RAX,0x0 JZ 0x001a27d0 LAB_001a27c7: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a27d7 LAB_001a27d0: MOV dword ptr [RBP + -0x4],0x1 LAB_001a27d7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_charset_file_tailoring_realloc(long param_1,ulong param_2) { code *pcVar1; long lVar2; if (*(ulong *)(param_1 + 0x698) <= param_2) { pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90); *(ulong *)(param_1 + 0x698) = param_2 + 0x8000; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688)); *(long *)(param_1 + 0x688) = lVar2; if (lVar2 == 0) { return 1; } } return 0; }
49,194
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O3
c
my_thread_global_init: cmpb $0x0, 0x33fbd1(%rip) # 0x366978 je 0x26dac xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movb $0x1, 0x33fbbf(%rip) # 0x366978 leaq 0x33f8f4(%rip), %rbx # 0x3666b4 cmpb $0x0, (%rbx) je 0x26de3 movb $0x1, (%rbx) callq 0x26bfb callq 0x26e1d movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x26e16 callq 0x26a6e xorl %eax, %eax jmp 0x26e16 leaq 0x33fb92(%rip), %rdi # 0x36697c xorl %esi, %esi callq 0x24670 testl %eax, %eax je 0x26dc5 movq 0x2c81dc(%rip), %rcx # 0x2eefd8 movq (%rcx), %rdi leaq 0x35857(%rip), %rdx # 0x5c65d movl $0x1, %esi movl %eax, %ecx xorl %eax, %eax callq 0x246d0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %rbp retq
my_thread_global_init: cmp cs:my_thread_global_init_done, 0 jz short loc_26DAC xor eax, eax retn loc_26DAC: push rbp mov rbp, rsp push rbx push rax mov cs:my_thread_global_init_done, 1 lea rbx, my_thr_key_mysys_exists cmp byte ptr [rbx], 0 jz short loc_26DE3 loc_26DC5: mov byte ptr [rbx], 1 call my_thread_init_internal_mutex call my_thread_init mov ecx, eax mov al, 1 test cl, cl jnz short loc_26E16 call my_thread_init_common_mutex xor eax, eax jmp short loc_26E16 loc_26DE3: lea rdi, THR_KEY_mysys xor esi, esi call _pthread_key_create test eax, eax jz short loc_26DC5 mov rcx, cs:stderr_ptr mov rdi, [rcx] lea rdx, aCanTInitialize; "Can't initialize threads: error %d\n" mov esi, 1 mov ecx, eax xor eax, eax call ___fprintf_chk mov al, 1 loc_26E16: add rsp, 8 pop rbx pop rbp retn
char my_thread_global_init(void *a1) { char result; // al char v2; // cl int v3; // eax if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (a1 = &THR_KEY_mysys, (v3 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0) ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); v2 = my_thread_init(a1); result = 1; if ( !v2 ) { my_thread_init_common_mutex(); return 0; } } else { __fprintf_chk(stderr, 1LL, "Can't initialize threads: error %d\n", v3); return 1; } return result; }
my_thread_global_init: CMP byte ptr [0x00466978],0x0 JZ 0x00126dac XOR EAX,EAX RET LAB_00126dac: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV byte ptr [0x00466978],0x1 LEA RBX,[0x4666b4] CMP byte ptr [RBX],0x0 JZ 0x00126de3 LAB_00126dc5: MOV byte ptr [RBX],0x1 CALL 0x00126bfb CALL 0x00126e1d MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00126e16 CALL 0x00126a6e XOR EAX,EAX JMP 0x00126e16 LAB_00126de3: LEA RDI,[0x46697c] XOR ESI,ESI CALL 0x00124670 TEST EAX,EAX JZ 0x00126dc5 MOV RCX,qword ptr [0x003eefd8] MOV RDI,qword ptr [RCX] LEA RDX,[0x15c65d] MOV ESI,0x1 MOV ECX,EAX XOR EAX,EAX CALL 0x001246d0 MOV AL,0x1 LAB_00126e16: ADD RSP,0x8 POP RBX POP RBP RET
bool my_thread_global_init(void) { char cVar1; int iVar2; if (my_thread_global_init_done != '\0') { return false; } my_thread_global_init_done = 1; if ((my_thr_key_mysys_exists == '\0') && (iVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), iVar2 != 0)) { __fprintf_chk(*(int8 *)PTR_stderr_003eefd8,1,"Can\'t initialize threads: error %d\n",iVar2 ); return true; } my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); } return cVar1 != '\0'; }
49,195
js_os_remove
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_remove(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *filename; int ret; filename = JS_ToCString(ctx, argv[0]); if (!filename) return JS_EXCEPTION; #if defined(_WIN32) { struct stat st; if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) { ret = rmdir(filename); } else { ret = unlink(filename); } } #else ret = remove(filename); #endif ret = js_get_errno(ret); JS_FreeCString(ctx, filename); return JS_NewInt32(ctx, ret); }
O0
c
js_os_remove: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x147e0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x186a2 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x18704 movq 0x8(%rsp), %rdi callq 0xe0d0 movl %eax, 0x4(%rsp) movslq 0x4(%rsp), %rdi callq 0x13a50 movl %eax, 0x4(%rsp) movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x29e50 movq 0x20(%rsp), %rcx movl 0x4(%rsp), %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax movl %eax, 0x58(%rsp) movq $0x0, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
js_os_remove: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rax, [rsp+68h+var_58] mov rsi, [rax] mov rdx, [rax+8] call JS_ToCString mov [rsp+68h+var_60], rax cmp [rsp+68h+var_60], 0 jnz short loc_186A2 mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 loc_186A0: jmp short loc_18704 loc_186A2: mov rdi, [rsp+68h+var_60] call _remove mov [rsp+68h+var_64], eax movsxd rdi, [rsp+68h+var_64] call js_get_errno mov [rsp+68h+var_64], eax mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_60] call JS_FreeCString mov rcx, [rsp+68h+var_48] mov eax, [rsp+68h+var_64] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 0 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_18704: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_os_remove(long long a1, long long a2, long long a3, long long a4, long long *a5) { int v5; // eax int errno; // [rsp+4h] [rbp-64h] long long v8; // [rsp+8h] [rbp-60h] long long v9; // [rsp+38h] [rbp-30h] long long v10; // [rsp+58h] [rbp-10h] v8 = JS_ToCString(a1, *a5, a5[1]); if ( v8 ) { v5 = remove(v8); errno = js_get_errno(v5); JS_FreeCString(a1, v8); LODWORD(v10) = errno; return v10; } else { LODWORD(v9) = 0; } return v9; }
js_os_remove: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001147e0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x001186a2 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x00118704 LAB_001186a2: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010e0d0 MOV dword ptr [RSP + 0x4],EAX MOVSXD RDI,dword ptr [RSP + 0x4] CALL 0x00113a50 MOV dword ptr [RSP + 0x4],EAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00129e50 MOV RCX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x4] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x0 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_00118704: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_os_remove(int8 param_1) { int1 auVar1 [16]; int iVar2; char *__filename; int8 *in_R8; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; __filename = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]); if (__filename == (char *)0x0) { local_30 = 0; local_28 = 6; } else { iVar2 = remove(__filename); local_30 = js_get_errno((long)iVar2); JS_FreeCString(param_1,__filename); uStack_2c = uStack_c; local_28 = 0; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
49,196
js_os_remove
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_remove(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *filename; int ret; filename = JS_ToCString(ctx, argv[0]); if (!filename) return JS_EXCEPTION; #if defined(_WIN32) { struct stat st; if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) { ret = rmdir(filename); } else { ret = unlink(filename); } } #else ret = remove(filename); #endif ret = js_get_errno(ret); JS_FreeCString(ctx, filename); return JS_NewInt32(ctx, ret); }
O1
c
js_os_remove: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx xorl %r15d, %r15d xorl %esi, %esi xorl %r8d, %r8d callq 0x20bf7 testq %rax, %rax je 0x18cf4 movq %rax, %r14 movq %rax, %rdi callq 0xe0d0 movl %eax, %ebp cmpl $-0x1, %eax jne 0x18ce2 callq 0xe0b0 xorl %ebp, %ebp subl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x20edd movl %ebp, %r15d xorl %edx, %edx jmp 0x18cf9 movl $0x6, %edx movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_os_remove: push rbp push r15 push r14 push rbx push rax mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] xor r15d, r15d xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_18CF4 mov r14, rax mov rdi, rax call _remove mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_18CE2 call ___errno_location xor ebp, ebp sub ebp, [rax] loc_18CE2: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov r15d, ebp xor edx, edx jmp short loc_18CF9 loc_18CF4: mov edx, 6 loc_18CF9: mov rax, r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_os_remove(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v6; // r15 long long v7; // rax long long v8; // r14 long long v9; // rdi unsigned int v10; // ebp v6 = 0LL; v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( v7 ) { v8 = v7; v9 = v7; v10 = remove(v7); if ( v10 == -1 ) v10 = -*(_DWORD *)__errno_location(v9); JS_FreeCString(a1, v8); return v10; } return v6; }
js_os_remove: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] XOR R15D,R15D XOR ESI,ESI XOR R8D,R8D CALL 0x00120bf7 TEST RAX,RAX JZ 0x00118cf4 MOV R14,RAX MOV RDI,RAX CALL 0x0010e0d0 MOV EBP,EAX CMP EAX,-0x1 JNZ 0x00118ce2 CALL 0x0010e0b0 XOR EBP,EBP SUB EBP,dword ptr [RAX] LAB_00118ce2: MOV RDI,RBX MOV RSI,R14 CALL 0x00120edd MOV R15D,EBP XOR EDX,EDX JMP 0x00118cf9 LAB_00118cf4: MOV EDX,0x6 LAB_00118cf9: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int js_os_remove(int8 param_1) { int iVar1; char *__filename; int *piVar2; int8 *in_R8; iVar1 = 0; __filename = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); if (__filename != (char *)0x0) { iVar1 = remove(__filename); if (iVar1 == -1) { piVar2 = __errno_location(); iVar1 = -*piVar2; } JS_FreeCString(param_1,__filename); } return iVar1; }
49,197
js_os_remove
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_remove(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *filename; int ret; filename = JS_ToCString(ctx, argv[0]); if (!filename) return JS_EXCEPTION; #if defined(_WIN32) { struct stat st; if (stat(filename, &st) == 0 && S_ISDIR(st.st_mode)) { ret = rmdir(filename); } else { ret = unlink(filename); } } #else ret = remove(filename); #endif ret = js_get_errno(ret); JS_FreeCString(ctx, filename); return JS_NewInt32(ctx, ret); }
O2
c
js_os_remove: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x11a6c testq %rax, %rax je 0x13983 movq %rax, %r14 movq %rax, %rdi callq 0xe0d0 movslq %eax, %rdi callq 0x113ab movq %rax, %r15 movq %rbx, %rdi movq %r14, %rsi callq 0x1b057 movl %r15d, %eax xorl %edx, %edx jmp 0x13988 pushq $0x6 popq %rdx xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
js_os_remove: push r15 push r14 push rbx mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToCString test rax, rax jz short loc_13983 mov r14, rax mov rdi, rax call _remove movsxd rdi, eax call js_get_errno mov r15, rax mov rdi, rbx mov rsi, r14 call JS_FreeCString mov eax, r15d xor edx, edx jmp short loc_13988 loc_13983: push 6 pop rdx xor eax, eax loc_13988: pop rbx pop r14 pop r15 retn
long long js_os_remove(long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v5; // rax long long v6; // r14 int v7; // eax unsigned int errno; // r15d v5 = JS_ToCString(a1, *a5, a5[1]); if ( !v5 ) return 0LL; v6 = v5; v7 = remove(v5); errno = js_get_errno(v7); JS_FreeCString(a1, v6); return errno; }
js_os_remove: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x00111a6c TEST RAX,RAX JZ 0x00113983 MOV R14,RAX MOV RDI,RAX CALL 0x0010e0d0 MOVSXD RDI,EAX CALL 0x001113ab MOV R15,RAX MOV RDI,RBX MOV RSI,R14 CALL 0x0011b057 MOV EAX,R15D XOR EDX,EDX JMP 0x00113988 LAB_00113983: PUSH 0x6 POP RDX XOR EAX,EAX LAB_00113988: POP RBX POP R14 POP R15 RET
int4 js_os_remove(int8 param_1) { int iVar1; int4 uVar2; char *__filename; int8 *in_R8; __filename = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]); if (__filename == (char *)0x0) { uVar2 = 0; } else { iVar1 = remove(__filename); uVar2 = js_get_errno((long)iVar1); JS_FreeCString(param_1,__filename); } return uVar2; }
49,198
js_weakref_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_weakref_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { if (JS_IsUndefined(new_target)) return JS_ThrowTypeError(ctx, "constructor requires 'new'"); JSValue arg = argv[0]; if (!is_valid_weakref_target(arg)) return JS_ThrowTypeError(ctx, "invalid target"); // TODO(saghul): short-circuit if the refcount is 1? JSValue obj = js_create_from_ctor(ctx, new_target, JS_CLASS_WEAK_REF); if (JS_IsException(obj)) return JS_EXCEPTION; JSWeakRefData *wrd = js_malloc(ctx, sizeof(*wrd)); if (!wrd) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } JSWeakRefRecord *wr = js_malloc(ctx, sizeof(*wr)); if (!wr) { JS_FreeValue(ctx, obj); js_free(ctx, wrd); return JS_EXCEPTION; } wrd->target = arg; wrd->obj = obj; wr->kind = JS_WEAK_REF_KIND_WEAK_REF; wr->u.weak_ref_data = wrd; insert_weakref_record(arg, wr); JS_SetOpaqueInternal(obj, wrd); return obj; }
O1
c
js_weakref_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r15 cmpl $0x3, %edx jne 0x3a38b leaq 0x678b7(%rip), %rsi # 0xa1c40 jmp 0x3a3ba movq (%r8), %rbp movq 0x8(%r8), %r13 movq %rbp, (%rsp) cmpl $-0x1, %r13d je 0x3a3c8 cmpl $-0x8, %r13d jne 0x3a3b3 movq (%rsp), %rax movq 0x4(%rax), %rax shrq $0x3e, %rax cmpl $0x2, %eax jne 0x3a3c8 leaq 0x683f8(%rip), %rsi # 0xa27b2 xorl %ebx, %ebx movq %r15, %rdi xorl %eax, %eax callq 0x22567 jmp 0x3a3e0 movq %r15, %rdi movl $0x3a, %ecx callq 0x36d56 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x3a3fb xorl %ebx, %ebx movl $0x6, %r14d movq %rbx, %rax movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movl $0x20, %esi movq %r15, %rdi callq 0xede6 testq %rax, %rax jne 0x3a421 movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1d8c6 jmp 0x3a3de movq %rax, %r12 movl $0x18, %esi movq %r15, %rdi callq 0xede6 testq %rax, %rax je 0x3a46d movq %rbp, (%r12) movq %r13, 0x8(%r12) movq %rbx, 0x10(%r12) movq %r14, 0x18(%r12) movl $0x1, (%rax) movq %r12, 0x10(%rax) movq %rbp, (%rsp) cmpl $-0x8, %r13d je 0x3a4a8 cmpl $-0x1, %r13d jne 0x3a4c3 movq (%rsp), %rcx addq $0x28, %rcx jmp 0x3a4b0 movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1d8c6 movq 0x18(%r15), %rbx decq 0x28(%rbx) movq %r12, %rdi callq *0x20(%rbx) movq 0x30(%rbx), %rcx movq 0x40(%rbx), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%rbx) movq %r12, %rsi callq *0x10(%rbx) jmp 0x3a3de movq (%rsp), %rcx addq $0x10, %rcx movq (%rcx), %rdx movq %rdx, 0x8(%rax) movq %rax, (%rcx) movq %r12, 0x30(%rbx) jmp 0x3a3e6 callq 0xe090
js_weakref_constructor: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdi cmp edx, 3 jnz short loc_3A38B lea rsi, aConstructorReq; "constructor requires 'new'" jmp short loc_3A3BA loc_3A38B: mov rbp, [r8] mov r13, [r8+8] mov [rsp+38h+var_38], rbp cmp r13d, 0FFFFFFFFh jz short loc_3A3C8 cmp r13d, 0FFFFFFF8h jnz short loc_3A3B3 mov rax, [rsp+38h+var_38] mov rax, [rax+4] shr rax, 3Eh cmp eax, 2 jnz short loc_3A3C8 loc_3A3B3: lea rsi, aInvalidTarget; "invalid target" loc_3A3BA: xor ebx, ebx mov rdi, r15 xor eax, eax call JS_ThrowTypeError jmp short loc_3A3E0 loc_3A3C8: mov rdi, r15 mov ecx, 3Ah ; ':' call js_create_from_ctor mov r14, rdx cmp r14d, 6 jnz short loc_3A3FB loc_3A3DE: xor ebx, ebx loc_3A3E0: mov r14d, 6 loc_3A3E6: mov rax, rbx mov rdx, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3A3FB: mov rbx, rax mov esi, 20h ; ' ' mov rdi, r15 call js_malloc test rax, rax jnz short loc_3A421 mov rdi, [r15+18h] mov rsi, rbx mov rdx, r14 call JS_FreeValueRT jmp short loc_3A3DE loc_3A421: mov r12, rax mov esi, 18h mov rdi, r15 call js_malloc test rax, rax jz short loc_3A46D mov [r12], rbp mov [r12+8], r13 mov [r12+10h], rbx mov [r12+18h], r14 mov dword ptr [rax], 1 mov [rax+10h], r12 mov [rsp+38h+var_38], rbp cmp r13d, 0FFFFFFF8h jz short loc_3A4A8 cmp r13d, 0FFFFFFFFh jnz short loc_3A4C3 mov rcx, [rsp+38h+var_38] add rcx, 28h ; '(' jmp short loc_3A4B0 loc_3A46D: mov rdi, [r15+18h] mov rsi, rbx mov rdx, r14 call JS_FreeValueRT mov rbx, [r15+18h] dec qword ptr [rbx+28h] mov rdi, r12 call qword ptr [rbx+20h] mov rcx, [rbx+30h] mov rdi, [rbx+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rcx mov rsi, r12 call qword ptr [rbx+10h] jmp loc_3A3DE loc_3A4A8: mov rcx, [rsp+38h+var_38] add rcx, 10h loc_3A4B0: mov rdx, [rcx] mov [rax+8], rdx mov [rcx], rax mov [rbx+30h], r12 jmp loc_3A3E6 loc_3A4C3: call _abort
unsigned long long js_weakref_constructor( 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) { char v14; // al const char *v15; // rsi long long v16; // rbp long long v17; // r13 unsigned long long v18; // rbx unsigned long long v19; // rax long long v20; // rdx long long v21; // r14 long long v23; // rax _QWORD *v24; // r12 long long v25; // rax long long *v26; // rcx long long v27; // rbx long long v28; // rax long long v29; // rdi long long v30; // [rsp+0h] [rbp-38h] LOBYTE(v30) = v14; if ( (_DWORD)a3 == 3 ) { v15 = "constructor requires 'new'"; LABEL_7: v18 = 0LL; JS_ThrowTypeError(a1, (long long)v15, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v30); return v18; } v16 = *a5; v17 = a5[1]; v30 = *a5; if ( (_DWORD)v17 != -1 && ((_DWORD)v17 != -8 || *(_QWORD *)(v30 + 4) >> 62 == 2) ) { v15 = "invalid target"; goto LABEL_7; } v19 = js_create_from_ctor(a1, a2, a3, 58); v21 = v20; if ( (_DWORD)v20 == 6 ) return 0LL; v18 = v19; v23 = js_malloc(a1, 32LL); if ( !v23 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v18, v21); return 0LL; } v24 = (_QWORD *)v23; v25 = js_malloc(a1, 24LL); if ( !v25 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v18, v21); v27 = *(_QWORD *)(a1 + 24); --*(_QWORD *)(v27 + 40); v28 = (*(long long ( **)(_QWORD *))(v27 + 32))(v24); v29 = *(_QWORD *)(v27 + 64); *(_QWORD *)(v27 + 48) = *(_QWORD *)(v27 + 48) - v28 - 8; (*(void ( **)(long long, _QWORD *))(v27 + 16))(v29, v24); return 0LL; } *v24 = v16; v24[1] = v17; v24[2] = v18; v24[3] = v21; *(_DWORD *)v25 = 1; *(_QWORD *)(v25 + 16) = v24; if ( (_DWORD)v17 == -8 ) v26 = (long long *)(v16 + 16); else v26 = (long long *)(v16 + 40); *(_QWORD *)(v25 + 8) = *v26; *v26 = v25; *(_QWORD *)(v18 + 48) = v24; return v18; }
49,199
js_weakref_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_weakref_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { if (JS_IsUndefined(new_target)) return JS_ThrowTypeError(ctx, "constructor requires 'new'"); JSValue arg = argv[0]; if (!is_valid_weakref_target(arg)) return JS_ThrowTypeError(ctx, "invalid target"); // TODO(saghul): short-circuit if the refcount is 1? JSValue obj = js_create_from_ctor(ctx, new_target, JS_CLASS_WEAK_REF); if (JS_IsException(obj)) return JS_EXCEPTION; JSWeakRefData *wrd = js_malloc(ctx, sizeof(*wrd)); if (!wrd) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } JSWeakRefRecord *wr = js_malloc(ctx, sizeof(*wr)); if (!wr) { JS_FreeValue(ctx, obj); js_free(ctx, wrd); return JS_EXCEPTION; } wrd->target = arg; wrd->obj = obj; wr->kind = JS_WEAK_REF_KIND_WEAK_REF; wr->u.weak_ref_data = wrd; insert_weakref_record(arg, wr); JS_SetOpaqueInternal(obj, wrd); return obj; }
O2
c
js_weakref_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r15 cmpl $0x3, %ebx jne 0x33490 leaq 0x556ef(%rip), %rsi # 0x88b7a jmp 0x3352a movq %rsi, %r14 movq (%r8), %r12 movq 0x8(%r8), %r13 movq %r12, %rdi movq %r13, %rsi callq 0x3d7f0 testl %eax, %eax je 0x33523 pushq $0x3a popq %rcx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x3045a pushq $0x6 popq %r14 cmpl $0x6, %edx je 0x33567 movq %rax, %rbx movq %rdx, (%rsp) pushq $0x20 popq %rsi movq %r15, %rdi callq 0x17214 testq %rax, %rax je 0x3353c movq %rax, %rbp pushq $0x18 popq %rsi movq %r15, %rdi callq 0x17214 testq %rax, %rax je 0x3354d movq %r12, (%rbp) movq %r13, 0x8(%rbp) movq %rbx, 0x10(%rbp) movq (%rsp), %r14 movq %r14, 0x18(%rbp) movl $0x1, (%rax) movq %rbp, 0x10(%rax) movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x3dae3 movq %rbp, 0x30(%rbx) jmp 0x33569 leaq 0x561c2(%rip), %rsi # 0x896ec xorl %ebx, %ebx movq %r15, %rdi xorl %eax, %eax callq 0x1c64d pushq $0x6 popq %r14 jmp 0x33569 movq %r15, %rdi movq %rbx, %rsi movq (%rsp), %rdx callq 0x1801e jmp 0x33567 movq %r15, %rdi movq %rbx, %rsi movq (%rsp), %rdx callq 0x1801e movq %r15, %rdi movq %rbp, %rsi callq 0x1726e xorl %ebx, %ebx movq %rbx, %rax movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_weakref_constructor: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r15, rdi cmp ebx, 3 jnz short loc_33490 lea rsi, aConstructorReq; "constructor requires 'new'" jmp loc_3352A loc_33490: mov r14, rsi mov r12, [r8] mov r13, [r8+8] mov rdi, r12 mov rsi, r13 call is_valid_weakref_target test eax, eax jz short loc_33523 push 3Ah ; ':' pop rcx mov rdi, r15 mov rsi, r14 mov rdx, rbx call js_create_from_ctor push 6 pop r14 cmp edx, 6 jz loc_33567 mov rbx, rax mov [rsp+38h+var_38], rdx push 20h ; ' ' pop rsi mov rdi, r15 call js_malloc test rax, rax jz short loc_3353C mov rbp, rax push 18h pop rsi mov rdi, r15 call js_malloc test rax, rax jz short loc_3354D mov [rbp+0], r12 mov [rbp+8], r13 mov [rbp+10h], rbx mov r14, [rsp+38h+var_38] mov [rbp+18h], r14 mov dword ptr [rax], 1 mov [rax+10h], rbp mov rdi, r12 mov rsi, r13 mov rdx, rax call insert_weakref_record mov [rbx+30h], rbp jmp short loc_33569 loc_33523: lea rsi, aInvalidTarget; "invalid target" loc_3352A: xor ebx, ebx mov rdi, r15 xor eax, eax call JS_ThrowTypeError push 6 pop r14 jmp short loc_33569 loc_3353C: mov rdi, r15 mov rsi, rbx mov rdx, [rsp+38h+var_38] call JS_FreeValue jmp short loc_33567 loc_3354D: mov rdi, r15 mov rsi, rbx mov rdx, [rsp+38h+var_38] call JS_FreeValue mov rdi, r15 mov rsi, rbp call js_free loc_33567: xor ebx, ebx loc_33569: mov rax, rbx mov rdx, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_weakref_constructor( long long a1, long long a2, long long a3, long long a4, _QWORD *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al const char *v16; // rsi long long v17; // r12 long long v18; // r13 unsigned long long v19; // rax long long v20; // rdx long long v21; // rbx long long v22; // rax _QWORD *v23; // rbp long long v24; // rax char v26; // [rsp+0h] [rbp-38h] long long v27; // [rsp+0h] [rbp-38h] v26 = v14; if ( (_DWORD)a3 == 3 ) { v16 = "constructor requires 'new'"; LABEL_9: v21 = 0LL; JS_ThrowTypeError(a1, (long long)v16, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v26); return v21; } v17 = *a5; v18 = a5[1]; if ( !(unsigned int)is_valid_weakref_target(*a5, v18) ) { v16 = "invalid target"; goto LABEL_9; } v19 = js_create_from_ctor(a1, a2, a3, 58); if ( (_DWORD)v20 == 6 ) return 0LL; v21 = v19; v27 = v20; v22 = js_malloc(a1, 32LL); if ( !v22 ) { JS_FreeValue(a1, v21, v27); return 0LL; } v23 = (_QWORD *)v22; v24 = js_malloc(a1, 24LL); if ( !v24 ) { JS_FreeValue(a1, v21, v27); js_free(a1, (long long)v23); return 0LL; } *v23 = v17; v23[1] = v18; v23[2] = v21; v23[3] = v27; *(_DWORD *)v24 = 1; *(_QWORD *)(v24 + 16) = v23; insert_weakref_record(v17, v18, v24); *(_QWORD *)(v21 + 48) = v23; return v21; }
js_weakref_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R15,RDI CMP EBX,0x3 JNZ 0x00133490 LEA RSI,[0x188b7a] JMP 0x0013352a LAB_00133490: MOV R14,RSI MOV R12,qword ptr [R8] MOV R13,qword ptr [R8 + 0x8] MOV RDI,R12 MOV RSI,R13 CALL 0x0013d7f0 TEST EAX,EAX JZ 0x00133523 PUSH 0x3a POP RCX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0013045a PUSH 0x6 POP R14 CMP EDX,0x6 JZ 0x00133567 MOV RBX,RAX MOV qword ptr [RSP],RDX PUSH 0x20 POP RSI MOV RDI,R15 CALL 0x00117214 TEST RAX,RAX JZ 0x0013353c MOV RBP,RAX PUSH 0x18 POP RSI MOV RDI,R15 CALL 0x00117214 TEST RAX,RAX JZ 0x0013354d MOV qword ptr [RBP],R12 MOV qword ptr [RBP + 0x8],R13 MOV qword ptr [RBP + 0x10],RBX MOV R14,qword ptr [RSP] MOV qword ptr [RBP + 0x18],R14 MOV dword ptr [RAX],0x1 MOV qword ptr [RAX + 0x10],RBP MOV RDI,R12 MOV RSI,R13 MOV RDX,RAX CALL 0x0013dae3 MOV qword ptr [RBX + 0x30],RBP JMP 0x00133569 LAB_00133523: LEA RSI,[0x1896ec] LAB_0013352a: XOR EBX,EBX MOV RDI,R15 XOR EAX,EAX CALL 0x0011c64d PUSH 0x6 POP R14 JMP 0x00133569 LAB_0013353c: MOV RDI,R15 MOV RSI,RBX MOV RDX,qword ptr [RSP] CALL 0x0011801e JMP 0x00133567 LAB_0013354d: MOV RDI,R15 MOV RSI,RBX MOV RDX,qword ptr [RSP] CALL 0x0011801e MOV RDI,R15 MOV RSI,RBP CALL 0x0011726e LAB_00133567: XOR EBX,EBX LAB_00133569: MOV RAX,RBX MOV RDX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_weakref_constructor (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int8 uVar1; int8 uVar2; int iVar3; long lVar4; int8 *puVar5; int4 *puVar6; char *pcVar7; int1 auVar8 [16]; if ((int)param_3 == 3) { pcVar7 = "constructor requires \'new\'"; } else { uVar1 = *param_5; uVar2 = param_5[1]; iVar3 = is_valid_weakref_target(uVar1,uVar2); if (iVar3 != 0) { auVar8 = js_create_from_ctor(param_1,param_2,param_3,0x3a); lVar4 = auVar8._0_8_; if (auVar8._8_4_ != 6) { puVar5 = (int8 *)js_malloc(param_1,0x20); if (puVar5 == (int8 *)0x0) { JS_FreeValue(param_1,lVar4,auVar8._8_8_); } else { puVar6 = (int4 *)js_malloc(param_1,0x18); if (puVar6 != (int4 *)0x0) { *puVar5 = uVar1; puVar5[1] = uVar2; *(int1 (*) [16])(puVar5 + 2) = auVar8; *puVar6 = 1; *(int8 **)(puVar6 + 4) = puVar5; insert_weakref_record(uVar1,uVar2,puVar6); *(int8 **)(lVar4 + 0x30) = puVar5; return auVar8; } JS_FreeValue(param_1,lVar4,auVar8._8_8_); js_free(param_1,puVar5); } } return ZEXT816(6) << 0x40; } pcVar7 = "invalid target"; } JS_ThrowTypeError(param_1,pcVar7); return ZEXT816(6) << 0x40; }