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
48,400
Transaction_state_tracker::calc_trx_state(THD*, thr_lock_type, bool)
eloqsql/sql/session_tracker.cc
enum_tx_state Transaction_state_tracker::calc_trx_state(THD *thd, thr_lock_type l, bool has_trx) { enum_tx_state s; bool read= (l < TL_FIRST_WRITE); if (read) s= has_trx ? TX_READ_TRX : TX_READ_UNSAFE; else s= has_trx ? TX_WRITE_TRX : TX_WRITE_UNSAFE; return s; }
O0
cpp
Transaction_state_tracker::calc_trx_state(THD*, thr_lock_type, bool): pushq %rbp movq %rsp, %rbp movb %cl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) andb $0x1, %al movb %al, -0x15(%rbp) cmpl $0x7, -0x14(%rbp) setl %al andb $0x1, %al movb %al, -0x1d(%rbp) testb $0x1, -0x1d(%rbp) je 0x8e3230 movb -0x15(%rbp), %dl movl $0x8, %eax movl $0x4, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x1c(%rbp) jmp 0x8e3246 movb -0x15(%rbp), %dl movl $0x20, %eax movl $0x10, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
_ZN25Transaction_state_tracker14calc_trx_stateEP3THD13thr_lock_typeb: push rbp mov rbp, rsp mov al, cl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx and al, 1 mov [rbp+var_15], al cmp [rbp+var_14], 7 setl al and al, 1 mov [rbp+var_1D], al test [rbp+var_1D], 1 jz short loc_8E3230 mov dl, [rbp+var_15] mov eax, 8 mov ecx, 4 test dl, 1 cmovnz eax, ecx mov [rbp+var_1C], eax jmp short loc_8E3246 loc_8E3230: mov dl, [rbp+var_15] mov eax, 20h ; ' ' mov ecx, 10h test dl, 1 cmovnz eax, ecx mov [rbp+var_1C], eax loc_8E3246: mov eax, [rbp+var_1C] pop rbp retn
long long Transaction_state_tracker::calc_trx_state(long long a1, long long a2, int a3, char a4) { unsigned int v4; // eax unsigned int v5; // eax if ( a3 >= 7 ) { v5 = 32; if ( (a4 & 1) != 0 ) return 16; return v5; } else { v4 = 8; if ( (a4 & 1) != 0 ) return 4; return v4; } }
__cxx_global_var_init.7: PUSH RBP MOV RBP,RSP LEA RDI,[0x271577c] MOV ESI,0x2000000 CALL 0x008fd530 POP RBP RET
void __cxx_global_var_init_7(void) { date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_INVALID_DATES,0x2000000); return; }
48,401
mysql_store_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_store_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_store_result, (parms->mysql), parms->mysql, MYSQL_RES *, r_ptr) }
O0
c
mysql_store_result_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x277b0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_store_result_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_store_result mov [rbp+var_18], rax mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+8], rcx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_store_result_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_QWORD *)(v2 + 8) = mysql_store_result(*a1); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_store_result_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001277b0 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_store_result_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_store_result(*param_1); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
48,402
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 0xa1988 movq -0x18(%rbp), %rdi callq 0x8e290 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0xa1a99 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 # 0xa1ab0 leaq -0x30(%rbp), %rdx callq 0xa3d80 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 0xa19f6 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0xa1a99 cmpl $0x0, -0x1c(%rbp) jge 0xa1a85 jmp 0xa1a02 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 0x25f956(%rip), %rax # 0x301380 movq (%rax), %rsi movl $0x5, %edx callq 0x60180 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x25f934(%rip), %rax # 0x301390 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x60180 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0xa1a92 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_A1988 mov rdi, [rbp+var_18] call mysql_stmt_fetch mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_A1A99 loc_A1988: 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_A19F6 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_A1A99 loc_A19F6: cmp [rbp+var_1C], 0 jge loc_A1A85 jmp short $+2 loc_A1A02: 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_A1A92 loc_A1A85: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_A1A92: mov [rbp+var_4], 0 loc_A1A99: 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(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 0x001a1988 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0018e290 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a1a99 LAB_001a1988: 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,[0x1a1ab0] LEA RDX,[RBP + -0x30] CALL 0x001a3d80 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 0x001a19f6 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 0x001a1a99 LAB_001a19f6: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x001a1a85 JMP 0x001a1a02 LAB_001a1a02: 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,[0x401380] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00160180 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,[0x401390] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00160180 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 0x001a1a92 LAB_001a1a85: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_001a1a92: MOV dword ptr [RBP + -0x4],0x0 LAB_001a1a99: 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_004013d0, 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; }
48,403
void rapidjson::SkipWhitespace<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&)
mnn-tts/MNN/3rd_party/rapidjson/reader.h
void SkipWhitespace(InputStream& is) { internal::StreamLocalCopy<InputStream> copy(is); InputStream& s(copy.s); typename InputStream::Ch c; while ((c = s.Peek()) == ' ' || c == '\n' || c == '\r' || c == '\t') s.Take(); }
O0
c
void rapidjson::SkipWhitespace<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rsi leaq 0x18(%rsp), %rdi callq 0x16620 leaq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi callq 0x163c0 movb %al, 0xf(%rsp) movsbl %al, %ecx movb $0x1, %al cmpl $0x20, %ecx movb %al, 0xe(%rsp) je 0x165ed movsbl 0xf(%rsp), %ecx movb $0x1, %al cmpl $0xa, %ecx movb %al, 0xe(%rsp) je 0x165ed movsbl 0xf(%rsp), %ecx movb $0x1, %al cmpl $0xd, %ecx movb %al, 0xe(%rsp) je 0x165ed movsbl 0xf(%rsp), %eax cmpl $0x9, %eax sete %al movb %al, 0xe(%rsp) movb 0xe(%rsp), %al testb $0x1, %al jne 0x165f7 jmp 0x16603 movq 0x10(%rsp), %rdi callq 0x16650 jmp 0x165a2 leaq 0x18(%rsp), %rdi callq 0x16670 addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN9rapidjson14SkipWhitespaceINS_19GenericStringStreamINS_4UTF8IcEEEEEEvRT_: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rsi, [rsp+38h+var_8] lea rdi, [rsp+38h+var_20] call _ZN9rapidjson8internal15StreamLocalCopyINS_19GenericStringStreamINS_4UTF8IcEEEELi1EEC2ERS5_; rapidjson::internal::StreamLocalCopy<rapidjson::GenericStringStream<rapidjson::UTF8<char>>,1>::StreamLocalCopy(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&) lea rax, [rsp+38h+var_20] mov [rsp+38h+var_28], rax loc_165A2: mov rdi, [rsp+38h+var_28] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4PeekEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek(void) mov [rsp+38h+var_29], al movsx ecx, al mov al, 1 cmp ecx, 20h ; ' ' mov [rsp+38h+var_2A], al jz short loc_165ED movsx ecx, [rsp+38h+var_29] mov al, 1 cmp ecx, 0Ah mov [rsp+38h+var_2A], al jz short loc_165ED movsx ecx, [rsp+38h+var_29] mov al, 1 cmp ecx, 0Dh mov [rsp+38h+var_2A], al jz short loc_165ED movsx eax, [rsp+38h+var_29] cmp eax, 9 setz al mov [rsp+38h+var_2A], al loc_165ED: mov al, [rsp+38h+var_2A] test al, 1 jnz short loc_165F7 jmp short loc_16603 loc_165F7: mov rdi, [rsp+38h+var_28] call _ZN9rapidjson19GenericStringStreamINS_4UTF8IcEEE4TakeEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Take(void) jmp short loc_165A2 loc_16603: lea rdi, [rsp+38h+var_20] call _ZN9rapidjson8internal15StreamLocalCopyINS_19GenericStringStreamINS_4UTF8IcEEEELi1EED2Ev; rapidjson::internal::StreamLocalCopy<rapidjson::GenericStringStream<rapidjson::UTF8<char>>,1>::~StreamLocalCopy() add rsp, 38h retn
long long rapidjson::SkipWhitespace<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(long long a1) { bool v2; // [rsp+Eh] [rbp-2Ah] char v3; // [rsp+Fh] [rbp-29h] _BYTE v4[24]; // [rsp+18h] [rbp-20h] BYREF long long v5; // [rsp+30h] [rbp-8h] v5 = a1; rapidjson::internal::StreamLocalCopy<rapidjson::GenericStringStream<rapidjson::UTF8<char>>,1>::StreamLocalCopy(v4, a1); while ( 1 ) { v3 = rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek((long long)v4); v2 = 1; if ( v3 != 32 ) { v2 = 1; if ( v3 != 10 ) { v2 = 1; if ( v3 != 13 ) v2 = v3 == 9; } } if ( !v2 ) break; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Take(v4); } return rapidjson::internal::StreamLocalCopy<rapidjson::GenericStringStream<rapidjson::UTF8<char>>,1>::~StreamLocalCopy(v4); }
SkipWhitespace<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x18] CALL 0x00116620 LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX LAB_001165a2: MOV RDI,qword ptr [RSP + 0x10] CALL 0x001163c0 MOV byte ptr [RSP + 0xf],AL MOVSX ECX,AL MOV AL,0x1 CMP ECX,0x20 MOV byte ptr [RSP + 0xe],AL JZ 0x001165ed MOVSX ECX,byte ptr [RSP + 0xf] MOV AL,0x1 CMP ECX,0xa MOV byte ptr [RSP + 0xe],AL JZ 0x001165ed MOVSX ECX,byte ptr [RSP + 0xf] MOV AL,0x1 CMP ECX,0xd MOV byte ptr [RSP + 0xe],AL JZ 0x001165ed MOVSX EAX,byte ptr [RSP + 0xf] CMP EAX,0x9 SETZ AL MOV byte ptr [RSP + 0xe],AL LAB_001165ed: MOV AL,byte ptr [RSP + 0xe] TEST AL,0x1 JNZ 0x001165f7 JMP 0x00116603 LAB_001165f7: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00116650 JMP 0x001165a2 LAB_00116603: LEA RDI,[RSP + 0x18] CALL 0x00116670 ADD RSP,0x38 RET
/* void rapidjson::SkipWhitespace<rapidjson::GenericStringStream<rapidjson::UTF8<char> > >(rapidjson::GenericStringStream<rapidjson::UTF8<char> >&) */ void rapidjson::SkipWhitespace<rapidjson::GenericStringStream<rapidjson::UTF8<char>>> (GenericStringStream *param_1) { char cVar1; bool bVar2; StreamLocalCopy<rapidjson::GenericStringStream<rapidjson::UTF8<char>>,1> local_20 [24]; GenericStringStream *local_8; local_8 = param_1; internal::StreamLocalCopy<rapidjson::GenericStringStream<rapidjson::UTF8<char>>,1>:: StreamLocalCopy(local_20,param_1); while( true ) { cVar1 = GenericStringStream<rapidjson::UTF8<char>>::Peek ((GenericStringStream<rapidjson::UTF8<char>> *)local_20); bVar2 = true; if (((cVar1 != ' ') && (bVar2 = true, cVar1 != '\n')) && (bVar2 = true, cVar1 != '\r')) { bVar2 = cVar1 == '\t'; } if (!bVar2) break; GenericStringStream<rapidjson::UTF8<char>>::Take ((GenericStringStream<rapidjson::UTF8<char>> *)local_20); } internal::StreamLocalCopy<rapidjson::GenericStringStream<rapidjson::UTF8<char>>,1>:: ~StreamLocalCopy(local_20); return; }
48,404
my_hash_sort_utf16_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_bin(CHARSET_INFO *cs, const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { size_t lengthsp= my_ci_lengthsp(cs, (const char *) pos, len); my_hash_sort_utf16_nopad_bin(cs, pos, lengthsp, nr1, nr2); }
O3
c
my_hash_sort_utf16_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rsi, %r15 movq 0xb8(%rdi), %rax callq *0x18(%rax) movq (%r14), %rcx movq (%rbx), %rdx testq %rax, %rax jle 0x8526d addq %r15, %rax movl %ecx, %esi andl $0x3f, %esi addq %rdx, %rsi movzbl (%r15), %edi imulq %rsi, %rdi movq %rcx, %rsi shlq $0x8, %rsi addq %rdi, %rsi xorq %rsi, %rcx addq $0x3, %rdx incq %r15 cmpq %rax, %r15 jb 0x85244 movq %rcx, (%r14) movq %rdx, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_sort_utf16_bin: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, r8 mov r14, rcx mov r15, rsi mov rax, [rdi+0B8h] call qword ptr [rax+18h] mov rcx, [r14] mov rdx, [rbx] test rax, rax jle short loc_8526D add rax, r15 loc_85244: mov esi, ecx and esi, 3Fh add rsi, rdx movzx edi, byte ptr [r15] imul rdi, rsi mov rsi, rcx shl rsi, 8 add rsi, rdi xor rcx, rsi add rdx, 3 inc r15 cmp r15, rax jb short loc_85244 loc_8526D: mov [r14], rcx mov [rbx], rdx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_sort_utf16_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { unsigned __int8 *v7; // r15 long long result; // rax long long v9; // rcx long long v10; // rdx v7 = a2; result = (*(long long ( **)(long long))(*(_QWORD *)(a1 + 184) + 24LL))(a1); v9 = *a4; v10 = *a5; if ( result > 0 ) { result += (long long)a2; do { v9 ^= (v10 + (v9 & 0x3F)) * *v7 + (v9 << 8); v10 += 3LL; ++v7; } while ( (unsigned long long)v7 < result ); } *a4 = v9; *a5 = v10; return result; }
my_hash_sort_utf16_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RSI MOV RAX,qword ptr [RDI + 0xb8] CALL qword ptr [RAX + 0x18] MOV RCX,qword ptr [R14] MOV RDX,qword ptr [RBX] TEST RAX,RAX JLE 0x0018526d ADD RAX,R15 LAB_00185244: MOV ESI,ECX AND ESI,0x3f ADD RSI,RDX MOVZX EDI,byte ptr [R15] IMUL RDI,RSI MOV RSI,RCX SHL RSI,0x8 ADD RSI,RDI XOR RCX,RSI ADD RDX,0x3 INC R15 CMP R15,RAX JC 0x00185244 LAB_0018526d: MOV qword ptr [R14],RCX MOV qword ptr [RBX],RDX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_sort_utf16_bin (long param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5) { long lVar1; byte *pbVar2; ulong uVar3; long lVar4; lVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x18))(); uVar3 = *param_4; lVar4 = *param_5; if (0 < lVar1) { pbVar2 = param_2 + lVar1; do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4); lVar4 = lVar4 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar3; *param_5 = lVar4; return; }
48,405
stbi__hdr_test_core(stbi__context*, char const*)
llama.cpp/examples/llava/../../common/stb_image.h
static int stbi__hdr_test_core(stbi__context *s, const char *signature) { int i; for (i=0; signature[i]; ++i) if (stbi__get8(s) != signature[i]) return 0; stbi__rewind(s); return 1; }
O3
c
stbi__hdr_test_core(stbi__context*, char const*): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movb (%rsi), %cl testb %cl, %cl je 0x361fe movq %rsi, %r14 movq 0xc0(%rbx), %rax incq %r14 cmpq 0xc8(%rbx), %rax jb 0x361d2 cmpl $0x0, 0x30(%rbx) je 0x361fa movq %rbx, %rdi callq 0x2f0a9 movq 0xc0(%rbx), %rax leaq 0x1(%rax), %rsi movq %rsi, 0xc0(%rbx) movzbl (%rax), %edx movb -0x1(%r14), %cl movq %rsi, %rax movsbl %cl, %ecx cmpl %ecx, %edx jne 0x36213 movb (%r14), %cl incq %r14 testb %cl, %cl jne 0x361b4 jmp 0x361fe xorl %edx, %edx jmp 0x361e7 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movl $0x1, %eax jmp 0x36215 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZL19stbi__hdr_test_coreP13stbi__contextPKc: push r14 push rbx push rax mov rbx, rdi mov cl, [rsi] test cl, cl jz short loc_361FE mov r14, rsi mov rax, [rbx+0C0h] inc r14 loc_361B4: cmp rax, [rbx+0C8h] jb short loc_361D2 cmp dword ptr [rbx+30h], 0 jz short loc_361FA mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C0h] loc_361D2: lea rsi, [rax+1] mov [rbx+0C0h], rsi movzx edx, byte ptr [rax] mov cl, [r14-1] mov rax, rsi loc_361E7: movsx ecx, cl cmp edx, ecx jnz short loc_36213 mov cl, [r14] inc r14 test cl, cl jnz short loc_361B4 jmp short loc_361FE loc_361FA: xor edx, edx jmp short loc_361E7 loc_361FE: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov eax, 1 jmp short loc_36215 loc_36213: xor eax, eax loc_36215: add rsp, 8 pop rbx pop r14 retn
long long stbi__hdr_test_core(long long a1, char *a2) { char v2; // cl unsigned __int8 *v3; // rax char *v4; // r14 int v5; // edx v2 = *a2; if ( !*a2 ) { LABEL_11: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return 1LL; } v3 = *(unsigned __int8 **)(a1 + 192); v4 = a2 + 1; while ( 1 ) { if ( (unsigned long long)v3 < *(_QWORD *)(a1 + 200) ) goto LABEL_6; if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v3 = *(unsigned __int8 **)(a1 + 192); LABEL_6: *(_QWORD *)(a1 + 192) = v3 + 1; v5 = *v3; v2 = *(v4 - 1); ++v3; goto LABEL_7; } v5 = 0; LABEL_7: if ( v5 != v2 ) return 0LL; v2 = *v4++; if ( !v2 ) goto LABEL_11; } }
stbi__hdr_test_core: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV CL,byte ptr [RSI] TEST CL,CL JZ 0x001361fe MOV R14,RSI MOV RAX,qword ptr [RBX + 0xc0] INC R14 LAB_001361b4: CMP RAX,qword ptr [RBX + 0xc8] JC 0x001361d2 CMP dword ptr [RBX + 0x30],0x0 JZ 0x001361fa MOV RDI,RBX CALL 0x0012f0a9 MOV RAX,qword ptr [RBX + 0xc0] LAB_001361d2: LEA RSI,[RAX + 0x1] MOV qword ptr [RBX + 0xc0],RSI MOVZX EDX,byte ptr [RAX] MOV CL,byte ptr [R14 + -0x1] MOV RAX,RSI LAB_001361e7: MOVSX ECX,CL CMP EDX,ECX JNZ 0x00136213 MOV CL,byte ptr [R14] INC R14 TEST CL,CL JNZ 0x001361b4 JMP 0x001361fe LAB_001361fa: XOR EDX,EDX JMP 0x001361e7 LAB_001361fe: MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV EAX,0x1 JMP 0x00136215 LAB_00136213: XOR EAX,EAX LAB_00136215: ADD RSP,0x8 POP RBX POP R14 RET
/* stbi__hdr_test_core(stbi__context*, char const*) */ int8 stbi__hdr_test_core(stbi__context *param_1,char *param_2) { byte *pbVar1; char cVar2; uint uVar3; char *pcVar4; cVar2 = *param_2; if (cVar2 != '\0') { pbVar1 = *(byte **)(param_1 + 0xc0); pcVar4 = param_2 + 1; do { if (pbVar1 < *(byte **)(param_1 + 200)) { LAB_001361d2: *(byte **)(param_1 + 0xc0) = pbVar1 + 1; uVar3 = (uint)*pbVar1; cVar2 = pcVar4[-1]; pbVar1 = pbVar1 + 1; } else { if (*(int *)(param_1 + 0x30) != 0) { stbi__refill_buffer(param_1); pbVar1 = *(byte **)(param_1 + 0xc0); goto LAB_001361d2; } uVar3 = 0; } if (uVar3 != (int)cVar2) { return 0; } cVar2 = *pcVar4; pcVar4 = pcVar4 + 1; } while (cVar2 != '\0'); } *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); return 1; }
48,406
my_error
eloqsql/mysys/my_error.c
void my_error(uint nr, myf MyFlags, ...) { const char *format; va_list args; char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno)); if (!(format = my_get_err_msg(nr))) (void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr); else { va_start(args,MyFlags); (void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff, sizeof(ebuff), format, args); va_end(args); } (*error_handler_hook)(nr, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_error: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x2e0, %rsp # imm = 0x2E0 movq %rsi, %rbx movl %edi, %r14d movq %rdx, -0x2e0(%rbp) movq %rcx, -0x2d8(%rbp) movq %r8, -0x2d0(%rbp) movq %r9, -0x2c8(%rbp) testb %al, %al je 0x9db73 movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x18(%rbp) callq 0x9dabc testq %rax, %rax je 0x9dbce leaq -0x2f0(%rbp), %rcx leaq -0x240(%rbp), %r8 movq %rcx, 0x10(%r8) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%r8) movabsq $0x3000000010, %rcx # imm = 0x3000000010 movq %rcx, (%r8) leaq 0x35a4a8(%rip), %rdi # 0x3f8060 leaq -0x220(%rbp), %rsi movl $0x200, %edx # imm = 0x200 movq %rax, %rcx callq 0xd547c jmp 0x9dbeb leaq 0x3d68a(%rip), %rdx # 0xdb25f leaq -0x220(%rbp), %rdi movl $0x200, %esi # imm = 0x200 movl %r14d, %ecx xorl %eax, %eax callq 0xd665e leaq 0x2e6f4e(%rip), %rax # 0x384b40 leaq -0x220(%rbp), %rsi movl %r14d, %edi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x9dc1c addq $0x2e0, %rsp # imm = 0x2E0 popq %rbx popq %r14 popq %rbp retq callq 0x29260
my_error: push rbp mov rbp, rsp push r14 push rbx sub rsp, 2E0h mov rbx, rsi mov r14d, edi mov [rbp+var_2E0], rdx mov [rbp+var_2D8], rcx mov [rbp+var_2D0], r8 mov [rbp+var_2C8], r9 test al, al jz short loc_9DB73 movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_9DB73: mov rax, fs:28h mov [rbp+var_18], rax call my_get_err_msg test rax, rax jz short loc_9DBCE lea rcx, [rbp+var_2F0] lea r8, [rbp+var_240] mov [r8+10h], rcx lea rcx, [rbp+arg_0] mov [r8+8], rcx mov rcx, 3000000010h mov [r8], rcx lea rdi, my_charset_utf8mb3_general_ci lea rsi, [rbp+var_220] mov edx, 200h mov rcx, rax call my_vsnprintf_ex jmp short loc_9DBEB loc_9DBCE: lea rdx, aUnknownErrorD; "Unknown error %d" lea rdi, [rbp+var_220] mov esi, 200h mov ecx, r14d xor eax, eax call my_snprintf loc_9DBEB: lea rax, error_handler_hook lea rsi, [rbp+var_220] mov edi, r14d mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_9DC1C add rsp, 2E0h pop rbx pop r14 pop rbp retn loc_9DC1C: call ___stack_chk_fail
unsigned long long my_error(unsigned int a1, long long a2, ...) { _BYTE *err_msg; // rax int v3; // r8d int v4; // r9d va_list va; // [rsp+B0h] [rbp-240h] BYREF _BYTE v7[520]; // [rsp+D0h] [rbp-220h] BYREF unsigned long long v8; // [rsp+2D8h] [rbp-18h] va_start(va, a2); va_arg(va, _QWORD); va_arg(va, _QWORD); va_arg(va, _QWORD); va_arg(va, _QWORD); va_end(va); v8 = __readfsqword(0x28u); err_msg = my_get_err_msg(a1); if ( err_msg ) { va_start(va, a2); my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v7, 512LL, err_msg, va); } else { my_snprintf((unsigned int)v7, 512, (unsigned int)"Unknown error %d", a1, v3, v4); } error_handler_hook(); return __readfsqword(0x28u); }
my_error: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x2e0 MOV RBX,RSI MOV R14D,EDI MOV qword ptr [RBP + -0x2e0],RDX MOV qword ptr [RBP + -0x2d8],RCX MOV qword ptr [RBP + -0x2d0],R8 MOV qword ptr [RBP + -0x2c8],R9 TEST AL,AL JZ 0x0019db73 MOVAPS xmmword ptr [RBP + -0x2c0],XMM0 MOVAPS xmmword ptr [RBP + -0x2b0],XMM1 MOVAPS xmmword ptr [RBP + -0x2a0],XMM2 MOVAPS xmmword ptr [RBP + -0x290],XMM3 MOVAPS xmmword ptr [RBP + -0x280],XMM4 MOVAPS xmmword ptr [RBP + -0x270],XMM5 MOVAPS xmmword ptr [RBP + -0x260],XMM6 MOVAPS xmmword ptr [RBP + -0x250],XMM7 LAB_0019db73: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX CALL 0x0019dabc TEST RAX,RAX JZ 0x0019dbce LEA RCX,[RBP + -0x2f0] LEA R8,[RBP + -0x240] MOV qword ptr [R8 + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [R8 + 0x8],RCX MOV RCX,0x3000000010 MOV qword ptr [R8],RCX LEA RDI,[0x4f8060] LEA RSI,[RBP + -0x220] MOV EDX,0x200 MOV RCX,RAX CALL 0x001d547c JMP 0x0019dbeb LAB_0019dbce: LEA RDX,[0x1db25f] LEA RDI,[RBP + -0x220] MOV ESI,0x200 MOV ECX,R14D XOR EAX,EAX CALL 0x001d665e LAB_0019dbeb: LEA RAX,[0x484b40] LEA RSI,[RBP + -0x220] MOV EDI,R14D MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0019dc1c ADD RSP,0x2e0 POP RBX POP R14 POP RBP RET LAB_0019dc1c: CALL 0x00129260
void my_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long lVar1; long in_FS_OFFSET; int1 local_2f8 [16]; int8 local_2e8; int8 local_2e0; int8 local_2d8; int8 local_2d0; int8 local_2c8; int8 local_2b8; int8 local_2a8; int8 local_298; int8 local_288; int8 local_278; int8 local_268; int8 local_258; int8 local_248; int1 *local_240; int1 *local_238; int1 local_228 [520]; long local_20; if (in_AL != '\0') { local_2c8 = param_1; local_2b8 = param_2; local_2a8 = param_3; local_298 = param_4; local_288 = param_5; local_278 = param_6; local_268 = param_7; local_258 = param_8; } local_20 = *(long *)(in_FS_OFFSET + 0x28); local_2e8 = param_11; local_2e0 = param_12; local_2d8 = param_13; local_2d0 = param_14; lVar1 = my_get_err_msg(); if (lVar1 == 0) { my_snprintf(local_228,0x200,"Unknown error %d",param_9); } else { local_238 = local_2f8; local_240 = &stack0x00000008; local_248 = 0x3000000010; my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_228,0x200,lVar1); } (*(code *)error_handler_hook)(param_9,local_228,param_10); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
48,407
testing::internal::PrintColorEncoded(char const*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
static void PrintColorEncoded(const char* str) { GTestColor color = GTestColor::kDefault; // The current color. // Conceptually, we split the string into segments divided by escape // sequences. Then we print one segment at a time. At the end of // each iteration, the str pointer advances to the beginning of the // next segment. for (;;) { const char* p = strchr(str, '@'); if (p == nullptr) { ColoredPrintf(color, "%s", str); return; } ColoredPrintf(color, "%s", std::string(str, p).c_str()); const char ch = p[1]; str = p + 2; if (ch == '@') { ColoredPrintf(color, "@"); } else if (ch == 'D') { color = GTestColor::kDefault; } else if (ch == 'R') { color = GTestColor::kRed; } else if (ch == 'G') { color = GTestColor::kGreen; } else if (ch == 'Y') { color = GTestColor::kYellow; } else { --str; } } }
O0
cpp
testing::internal::PrintColorEncoded(char const*): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movl $0x0, 0x6c(%rsp) movq 0x70(%rsp), %rdi movl $0x40, %esi callq 0x14240 movq %rax, 0x60(%rsp) cmpq $0x0, 0x60(%rsp) jne 0xe23d9 movl 0x6c(%rsp), %edi movq 0x70(%rsp), %rdx leaq 0x31e7e(%rip), %rsi # 0x11424b movb $0x0, %al callq 0xc83b0 addq $0x78, %rsp retq movl 0x6c(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x3f(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x14c90 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rcx leaq 0x40(%rsp), %rdi callq 0xe46d0 jmp 0xe241f leaq 0x40(%rsp), %rdi callq 0x1acc0 movl 0xc(%rsp), %edi movq %rax, %rdx leaq 0x31e14(%rip), %rsi # 0x11424b xorl %eax, %eax callq 0xc83b0 jmp 0xe2440 leaq 0x40(%rsp), %rdi callq 0x1aac0 leaq 0x3f(%rsp), %rdi callq 0x14750 movq 0x60(%rsp), %rax movb 0x1(%rax), %al movb %al, 0x2b(%rsp) movq 0x60(%rsp), %rax addq $0x2, %rax movq %rax, 0x70(%rsp) movsbl 0x2b(%rsp), %eax cmpl $0x40, %eax jne 0xe24c3 movl 0x6c(%rsp), %edi leaq 0x32bc5(%rip), %rsi # 0x115048 movb $0x0, %al callq 0xc83b0 jmp 0xe2529 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xe24b7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x40(%rsp), %rdi callq 0x1aac0 leaq 0x3f(%rsp), %rdi callq 0x14750 jmp 0xe252e movsbl 0x2b(%rsp), %eax cmpl $0x44, %eax jne 0xe24d7 movl $0x0, 0x6c(%rsp) jmp 0xe2527 movsbl 0x2b(%rsp), %eax cmpl $0x52, %eax jne 0xe24eb movl $0x1, 0x6c(%rsp) jmp 0xe2525 movsbl 0x2b(%rsp), %eax cmpl $0x47, %eax jne 0xe24ff movl $0x2, 0x6c(%rsp) jmp 0xe2523 movsbl 0x2b(%rsp), %eax cmpl $0x59, %eax jne 0xe2513 movl $0x3, 0x6c(%rsp) jmp 0xe2521 movq 0x70(%rsp), %rax addq $-0x1, %rax movq %rax, 0x70(%rsp) jmp 0xe2523 jmp 0xe2525 jmp 0xe2527 jmp 0xe2529 jmp 0xe23a1 movq 0x30(%rsp), %rdi callq 0x14c80 nopl (%rax,%rax)
_ZN7testing8internalL17PrintColorEncodedEPKc: sub rsp, 78h mov [rsp+78h+var_8], rdi mov [rsp+78h+var_C], 0 loc_E23A1: mov rdi, [rsp+78h+var_8] mov esi, 40h ; '@' call _strchr mov [rsp+78h+var_18], rax cmp [rsp+78h+var_18], 0 jnz short loc_E23D9 mov edi, [rsp+78h+var_C] mov rdx, [rsp+78h+var_8] lea rsi, aS_2+2; "%s" mov al, 0 call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) add rsp, 78h retn loc_E23D9: mov eax, [rsp+78h+var_C] mov [rsp+78h+var_6C], eax mov rax, [rsp+78h+var_8] mov [rsp+78h+var_68], rax mov rax, [rsp+78h+var_18] mov [rsp+78h+var_60], rax lea rdi, [rsp+78h+var_39] mov [rsp+78h+var_58], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+78h+var_68] mov rdx, [rsp+78h+var_60] mov rcx, [rsp+78h+var_58] lea rdi, [rsp+78h+var_38] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&) jmp short $+2 loc_E241F: lea rdi, [rsp+78h+var_38] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov edi, [rsp+78h+var_6C] mov rdx, rax lea rsi, aS_2+2; "%s" xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) jmp short $+2 loc_E2440: lea rdi, [rsp+78h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+78h+var_18] mov al, [rax+1] mov [rsp+78h+var_4D], al mov rax, [rsp+78h+var_18] add rax, 2 mov [rsp+78h+var_8], rax movsx eax, [rsp+78h+var_4D] cmp eax, 40h ; '@' jnz short loc_E24C3 mov edi, [rsp+78h+var_C] lea rsi, asc_115048; "@" mov al, 0 call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) jmp loc_E2529 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_E24B7 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_E24B7: lea rdi, [rsp+arg_37] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_E252E loc_E24C3: movsx eax, [rsp+78h+var_4D] cmp eax, 44h ; 'D' jnz short loc_E24D7 mov [rsp+78h+var_C], 0 jmp short loc_E2527 loc_E24D7: movsx eax, [rsp+78h+var_4D] cmp eax, 52h ; 'R' jnz short loc_E24EB mov [rsp+78h+var_C], 1 jmp short loc_E2525 loc_E24EB: movsx eax, [rsp+78h+var_4D] cmp eax, 47h ; 'G' jnz short loc_E24FF mov [rsp+78h+var_C], 2 jmp short loc_E2523 loc_E24FF: movsx eax, [rsp+78h+var_4D] cmp eax, 59h ; 'Y' jnz short loc_E2513 mov [rsp+78h+var_C], 3 jmp short loc_E2521 loc_E2513: mov rax, [rsp+78h+var_8] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+78h+var_8], rax loc_E2521: jmp short $+2 loc_E2523: jmp short $+2 loc_E2525: jmp short $+2 loc_E2527: jmp short $+2 loc_E2529: jmp loc_E23A1 loc_E252E: mov rdi, [rsp+arg_28] call __Unwind_Resume
__va_list_tag * testing::internal::PrintColorEncoded(testing::internal *this, const char *a2) { long long v2; // rdx int v4; // r8d int v5; // r9d const char *v6; // rax const char *v7; // rdx int v8; // [rsp+0h] [rbp-78h] long long v9; // [rsp+8h] [rbp-70h] int v10; // [rsp+10h] [rbp-68h] int v11; // [rsp+18h] [rbp-60h] char v12; // [rsp+2Bh] [rbp-4Dh] char v13; // [rsp+3Fh] [rbp-39h] BYREF _BYTE v14[32]; // [rsp+40h] [rbp-38h] BYREF long long v15; // [rsp+60h] [rbp-18h] unsigned int v16; // [rsp+6Ch] [rbp-Ch] const char *v17; // [rsp+70h] [rbp-8h] v17 = (const char *)this; v16 = 0; while ( 1 ) { v15 = strchr(v17, 64LL); if ( !v15 ) break; HIDWORD(v9) = v16; v10 = (int)v17; v11 = v15; std::allocator<char>::allocator(&v13, 64LL, v2); std::string::basic_string<char const*,void>((unsigned int)v14, v10, v11, (unsigned int)&v13, v4, v5, v8, v9); v6 = (const char *)std::string::c_str((long long)v14); testing::internal::ColoredPrintf(HIDWORD(v9), (long long)"%s", v6); std::string::~string(v14); std::allocator<char>::~allocator(&v13, "%s", v7); v12 = *(_BYTE *)(v15 + 1); v17 = (const char *)(v15 + 2); switch ( v12 ) { case '@': testing::internal::ColoredPrintf(v16, (long long)"@"); break; case 'D': v16 = 0; break; case 'R': v16 = 1; break; case 'G': v16 = 2; break; case 'Y': v16 = 3; break; default: --v17; break; } } return testing::internal::ColoredPrintf(v16, (long long)"%s", v17); }
PrintColorEncoded: SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV dword ptr [RSP + 0x6c],0x0 LAB_001e23a1: MOV RDI,qword ptr [RSP + 0x70] MOV ESI,0x40 CALL 0x00114240 MOV qword ptr [RSP + 0x60],RAX CMP qword ptr [RSP + 0x60],0x0 JNZ 0x001e23d9 MOV EDI,dword ptr [RSP + 0x6c] MOV RDX,qword ptr [RSP + 0x70] LEA RSI,[0x21424b] MOV AL,0x0 CALL 0x001c83b0 ADD RSP,0x78 RET LAB_001e23d9: MOV EAX,dword ptr [RSP + 0x6c] MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x3f] MOV qword ptr [RSP + 0x20],RDI CALL 0x00114c90 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] LAB_001e2413: LEA RDI,[RSP + 0x40] CALL 0x001e46d0 JMP 0x001e241f LAB_001e241f: LEA RDI,[RSP + 0x40] CALL 0x0011acc0 MOV EDI,dword ptr [RSP + 0xc] MOV RDX,RAX LAB_001e2430: LEA RSI,[0x21424b] XOR EAX,EAX CALL 0x001c83b0 LAB_001e243e: JMP 0x001e2440 LAB_001e2440: LEA RDI,[RSP + 0x40] CALL 0x0011aac0 LEA RDI,[RSP + 0x3f] CALL 0x00114750 MOV RAX,qword ptr [RSP + 0x60] MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RSP + 0x2b],AL MOV RAX,qword ptr [RSP + 0x60] ADD RAX,0x2 MOV qword ptr [RSP + 0x70],RAX MOVSX EAX,byte ptr [RSP + 0x2b] CMP EAX,0x40 JNZ 0x001e24c3 MOV EDI,dword ptr [RSP + 0x6c] LEA RSI,[0x215048] MOV AL,0x0 CALL 0x001c83b0 JMP 0x001e2529 LAB_001e24c3: MOVSX EAX,byte ptr [RSP + 0x2b] CMP EAX,0x44 JNZ 0x001e24d7 MOV dword ptr [RSP + 0x6c],0x0 JMP 0x001e2527 LAB_001e24d7: MOVSX EAX,byte ptr [RSP + 0x2b] CMP EAX,0x52 JNZ 0x001e24eb MOV dword ptr [RSP + 0x6c],0x1 JMP 0x001e2525 LAB_001e24eb: MOVSX EAX,byte ptr [RSP + 0x2b] CMP EAX,0x47 JNZ 0x001e24ff MOV dword ptr [RSP + 0x6c],0x2 JMP 0x001e2523 LAB_001e24ff: MOVSX EAX,byte ptr [RSP + 0x2b] CMP EAX,0x59 JNZ 0x001e2513 MOV dword ptr [RSP + 0x6c],0x3 JMP 0x001e2521 LAB_001e2513: MOV RAX,qword ptr [RSP + 0x70] ADD RAX,-0x1 MOV qword ptr [RSP + 0x70],RAX LAB_001e2521: JMP 0x001e2523 LAB_001e2523: JMP 0x001e2525 LAB_001e2525: JMP 0x001e2527 LAB_001e2527: JMP 0x001e2529 LAB_001e2529: JMP 0x001e23a1
/* testing::internal::PrintColorEncoded(char const*) */ void testing::internal::PrintColorEncoded(char *param_1) { char cVar1; int4 uVar2; char *pcVar3; char *pcVar4; int8 uVar5; allocator local_39; string local_38 [32]; char *local_18; int4 local_c; char *local_8; local_c = 0; local_8 = param_1; while (pcVar4 = strchr(local_8,0x40), pcVar3 = local_8, uVar2 = local_c, local_18 = pcVar4, pcVar4 != (char *)0x0) { std::allocator<char>::allocator(); /* try { // try from 001e2413 to 001e241c has its CatchHandler @ 001e248f */ std::__cxx11::string::string<char_const*,void>(local_38,pcVar3,pcVar4,&local_39); uVar5 = std::__cxx11::string::c_str(local_38); /* try { // try from 001e2430 to 001e243d has its CatchHandler @ 001e249f */ ColoredPrintf(uVar2,&DAT_0021424b,uVar5); std::__cxx11::string::~string(local_38); std::allocator<char>::~allocator((allocator<char> *)&local_39); cVar1 = local_18[1]; local_8 = local_18 + 2; if (cVar1 == '@') { ColoredPrintf(local_c,&DAT_00215048); } else if (cVar1 == 'D') { local_c = 0; } else if (cVar1 == 'R') { local_c = 1; } else if (cVar1 == 'G') { local_c = 2; } else if (cVar1 == 'Y') { local_c = 3; } else { local_8 = local_18 + 1; } } ColoredPrintf(local_c,&DAT_0021424b,local_8); return; }
48,408
ma_dynstr_append_quoted
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_dynstr_append_quoted(DYNAMIC_STRING *str, const char *append, size_t len, char quote) { size_t additional= str->alloc_increment; size_t lim= additional; uint i; if (ma_dynstr_realloc(str, len + additional + 2)) return TRUE; str->str[str->length++]= quote; for (i= 0; i < len; i++) { register char c= append[i]; if (c == quote || c == '\\') { if (!lim) { if (ma_dynstr_realloc(str, additional)) return TRUE; lim= additional; } lim--; str->str[str->length++]= '\\'; } str->str[str->length++]= c; } str->str[str->length++]= quote; return FALSE; }
O0
c
ma_dynstr_append_quoted: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq -0x30(%rbp), %rsi addq $0x2, %rsi callq 0x4c2f0 cmpb $0x0, %al je 0x4c4ff movb $0x1, -0x1(%rbp) jmp 0x4c5fa movb -0x21(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movl $0x0, -0x3c(%rbp) movl -0x3c(%rbp), %eax cmpq -0x20(%rbp), %rax jae 0x4c5d6 movq -0x18(%rbp), %rax movl -0x3c(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x3d(%rbp) movsbl -0x3d(%rbp), %eax movsbl -0x21(%rbp), %ecx cmpl %ecx, %eax je 0x4c555 movsbl -0x3d(%rbp), %eax cmpl $0x5c, %eax jne 0x4c5a8 cmpq $0x0, -0x38(%rbp) jne 0x4c57e movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0x4c2f0 cmpb $0x0, %al je 0x4c576 movb $0x1, -0x1(%rbp) jmp 0x4c5fa movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $-0x1, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rdx movq 0x8(%rdx), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, 0x8(%rdx) movb $0x5c, (%rax,%rcx) movb -0x3d(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x4c526 movb -0x21(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_dynstr_append_quoted: push rbp mov rbp, rsp sub rsp, 40h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_21], al mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, [rbp+var_30] add rsi, 2 call ma_dynstr_realloc cmp al, 0 jz short loc_4C4FF mov [rbp+var_1], 1 jmp loc_4C5FA loc_4C4FF: mov dl, [rbp+var_21] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov [rbp+var_3C], 0 loc_4C526: mov eax, [rbp+var_3C] cmp rax, [rbp+var_20] jnb loc_4C5D6 mov rax, [rbp+var_18] mov ecx, [rbp+var_3C] mov al, [rax+rcx] mov [rbp+var_3D], al movsx eax, [rbp+var_3D] movsx ecx, [rbp+var_21] cmp eax, ecx jz short loc_4C555 movsx eax, [rbp+var_3D] cmp eax, 5Ch ; '\' jnz short loc_4C5A8 loc_4C555: cmp [rbp+var_38], 0 jnz short loc_4C57E mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] call ma_dynstr_realloc cmp al, 0 jz short loc_4C576 mov [rbp+var_1], 1 jmp loc_4C5FA loc_4C576: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_4C57E: mov rax, [rbp+var_38] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax] mov rdx, [rbp+var_10] mov rcx, [rdx+8] mov rsi, rcx add rsi, 1 mov [rdx+8], rsi mov byte ptr [rax+rcx], 5Ch ; '\' loc_4C5A8: mov dl, [rbp+var_3D] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax jmp loc_4C526 loc_4C5D6: mov dl, [rbp+var_21] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov [rbp+var_1], 0 loc_4C5FA: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_dynstr_append_quoted(long long *a1, long long a2, unsigned long long a3, char a4) { long long v4; // rax long long v5; // rcx long long v6; // rax long long v7; // rcx long long v8; // rax long long v9; // rcx long long v10; // rax long long v11; // rcx char v13; // [rsp+3h] [rbp-3Dh] unsigned int i; // [rsp+4h] [rbp-3Ch] long long v15; // [rsp+8h] [rbp-38h] long long v16; // [rsp+10h] [rbp-30h] v16 = a1[3]; v15 = v16; if ( ma_dynstr_realloc(a1, v16 + a3 + 2) ) return 1; v4 = *a1; v5 = a1[1]; a1[1] = v5 + 1; *(_BYTE *)(v4 + v5) = a4; for ( i = 0; i < a3; ++i ) { v13 = *(_BYTE *)(a2 + i); if ( v13 == a4 || v13 == 92 ) { if ( !v15 ) { if ( ma_dynstr_realloc(a1, v16) ) return 1; v15 = v16; } --v15; v6 = *a1; v7 = a1[1]; a1[1] = v7 + 1; *(_BYTE *)(v6 + v7) = 92; } v8 = *a1; v9 = a1[1]; a1[1] = v9 + 1; *(_BYTE *)(v8 + v9) = v13; } v10 = *a1; v11 = a1[1]; a1[1] = v11 + 1; *(_BYTE *)(v10 + v11) = a4; return 0; }
ma_dynstr_append_quoted: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,qword ptr [RBP + -0x30] ADD RSI,0x2 CALL 0x0014c2f0 CMP AL,0x0 JZ 0x0014c4ff MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c5fa LAB_0014c4ff: MOV DL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV dword ptr [RBP + -0x3c],0x0 LAB_0014c526: MOV EAX,dword ptr [RBP + -0x3c] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0014c5d6 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x3c] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x3d],AL MOVSX EAX,byte ptr [RBP + -0x3d] MOVSX ECX,byte ptr [RBP + -0x21] CMP EAX,ECX JZ 0x0014c555 MOVSX EAX,byte ptr [RBP + -0x3d] CMP EAX,0x5c JNZ 0x0014c5a8 LAB_0014c555: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0014c57e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] CALL 0x0014c2f0 CMP AL,0x0 JZ 0x0014c576 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c5fa LAB_0014c576: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0014c57e: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,-0x1 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RDX + 0x8] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RDX + 0x8],RSI MOV byte ptr [RAX + RCX*0x1],0x5c LAB_0014c5a8: MOV DL,byte ptr [RBP + -0x3d] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x0014c526 LAB_0014c5d6: MOV DL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV byte ptr [RBP + -0x1],0x0 LAB_0014c5fa: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 ma_dynstr_append_quoted(long *param_1,long param_2,ulong param_3,char param_4) { long lVar1; long lVar2; char cVar3; char cVar4; uint local_44; long local_40; int1 local_9; lVar1 = param_1[3]; cVar3 = ma_dynstr_realloc(param_1,param_3 + lVar1 + 2); if (cVar3 == '\0') { lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(char *)(*param_1 + lVar2) = param_4; local_40 = lVar1; for (local_44 = 0; local_44 < param_3; local_44 = local_44 + 1) { cVar3 = *(char *)(param_2 + (ulong)local_44); if ((cVar3 == param_4) || (cVar3 == '\\')) { if ((local_40 == 0) && (cVar4 = ma_dynstr_realloc(param_1,lVar1), local_40 = lVar1, cVar4 != '\0')) { return 1; } local_40 = local_40 + -1; lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(int1 *)(*param_1 + lVar2) = 0x5c; } lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(char *)(*param_1 + lVar2) = cVar3; } lVar1 = param_1[1]; param_1[1] = lVar1 + 1; *(char *)(*param_1 + lVar1) = param_4; local_9 = 0; } else { local_9 = 1; } return local_9; }
48,409
my_like_range_win1250ch
eloqsql/strings/ctype-win1250ch.c
static my_bool my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str, char *max_str, size_t *min_length, size_t *max_length) { int only_min_found= 1; const char *end = ptr + ptr_length; char *min_org = min_str; char *min_end = min_str + res_length; /* return 1; */ for (; ptr != end && min_str != min_end ; ptr++) { if (*ptr == escape && ptr+1 != end) ptr++; /* Skip escape */ else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */ break; *min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)]; if (*min_str != min_sort_char) only_min_found= 0; min_str++; *max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)]; } if (cs->state & MY_CS_BINSORT) *min_length= (size_t) (min_str - min_org); else { /* 'a\0\0... is the smallest possible string */ *min_length= res_length; } /* a\ff\ff... is the biggest possible string */ *max_length= res_length; while (min_str != min_end) { *min_str++ = min_sort_char; *max_str++ = max_sort_char; } return (only_min_found); }
O3
c
my_like_range_win1250ch: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %r9d, -0x2c(%rbp) movl %r8d, -0x30(%rbp) movq %rdi, -0x38(%rbp) movq 0x20(%rbp), %r10 movq 0x18(%rbp), %r13 movq 0x10(%rbp), %r8 leaq (%r8,%r13), %r11 testq %rdx, %rdx sete %al testq %r8, %r8 sete %dil orb %al, %dil movb $0x1, %al jne 0x8c676 addq %rsi, %rdx leaq -0x1(%r8), %rbx movb $0x1, %al leaq 0x288cd1(%rip), %r12 # 0x3152d0 leaq 0x288dca(%rip), %rdi # 0x3153d0 movb (%rsi), %r14b cmpb %cl, %r14b setne %r9b leaq 0x1(%rsi), %r15 cmpq %rdx, %r15 sete %r8b orb %r9b, %r8b cmpb $0x1, %r8b jne 0x8c633 cmpb -0x30(%rbp), %r14b je 0x8c676 movq %rsi, %r15 cmpb -0x2c(%rbp), %r14b je 0x8c676 movzbl (%r15), %esi cmpq $0x20, %rsi movb (%rsi,%r12), %sil movb %sil, (%r13) movzbl %al, %eax movl $0x0, %esi cmovnel %esi, %eax incq %r13 movzbl (%r15), %esi movb (%rsi,%rdi), %sil movb %sil, (%r10) incq %r10 movq %r15, %rsi incq %rsi cmpq %rdx, %rsi je 0x8c676 leaq -0x1(%rbx), %r8 testq %rbx, %rbx movq %r8, %rbx jne 0x8c606 movq %r13, %rcx subq 0x18(%rbp), %rcx movq -0x38(%rbp), %rdx testb $0x10, 0xc(%rdx) movq 0x10(%rbp), %rsi cmoveq %rsi, %rcx movq 0x28(%rbp), %rdx movq %rcx, (%rdx) movq 0x30(%rbp), %rcx movq %rsi, (%rcx) cmpq %r11, %r13 je 0x8c6b1 movb $0x20, (%r13) incq %r13 movb $-0x1, (%r10) incq %r10 jmp 0x8c69b popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_like_range_win1250ch: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov [rbp+var_2C], r9d mov [rbp+var_30], r8d mov [rbp+var_38], rdi mov r10, [rbp+arg_10] mov r13, [rbp+arg_8] mov r8, [rbp+arg_0] lea r11, [r8+r13] test rdx, rdx setz al test r8, r8 setz dil or dil, al mov al, 1 jnz loc_8C676 add rdx, rsi lea rbx, [r8-1] mov al, 1 lea r12, like_range_prefix_min_win1250ch lea rdi, like_range_prefix_max_win1250ch loc_8C606: mov r14b, [rsi] cmp r14b, cl setnz r9b lea r15, [rsi+1] cmp r15, rdx setz r8b or r8b, r9b cmp r8b, 1 jnz short loc_8C633 cmp r14b, byte ptr [rbp+var_30] jz short loc_8C676 mov r15, rsi cmp r14b, byte ptr [rbp+var_2C] jz short loc_8C676 loc_8C633: movzx esi, byte ptr [r15] cmp rsi, 20h ; ' ' mov sil, [rsi+r12] mov [r13+0], sil movzx eax, al mov esi, 0 cmovnz eax, esi inc r13 movzx esi, byte ptr [r15] mov sil, [rsi+rdi] mov [r10], sil inc r10 mov rsi, r15 inc rsi cmp rsi, rdx jz short loc_8C676 lea r8, [rbx-1] test rbx, rbx mov rbx, r8 jnz short loc_8C606 loc_8C676: mov rcx, r13 sub rcx, [rbp+arg_8] mov rdx, [rbp+var_38] test byte ptr [rdx+0Ch], 10h mov rsi, [rbp+arg_0] cmovz rcx, rsi mov rdx, [rbp+arg_18] mov [rdx], rcx mov rcx, [rbp+arg_20] mov [rcx], rsi loc_8C69B: cmp r13, r11 jz short loc_8C6B1 mov byte ptr [r13+0], 20h ; ' ' inc r13 mov byte ptr [r10], 0FFh inc r10 jmp short loc_8C69B loc_8C6B1: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char my_like_range_win1250ch( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 a4, char a5, char a6, long long a7, long long a8, _BYTE *a9, long long *a10, _QWORD *a11) { _BYTE *v12; // r13 char result; // al unsigned __int8 *v14; // rdx long long v15; // rbx unsigned __int8 v16; // r14 unsigned __int8 *v17; // r15 long long v18; // rsi long long v20; // rcx v12 = (_BYTE *)a8; result = 1; if ( a3 != 0 && a7 != 0 ) { v14 = &a2[a3]; v15 = a7 - 1; result = 1; do { v16 = *a2; v17 = a2 + 1; if ( *a2 != a4 || a2 + 1 == v14 ) { if ( v16 == a5 ) break; v17 = a2; if ( v16 == a6 ) break; } v18 = *v17; *v12 = like_range_prefix_min_win1250ch[v18]; if ( v18 != 32 ) result = 0; ++v12; *a9++ = like_range_prefix_max_win1250ch[*v17]; a2 = v17 + 1; if ( v17 + 1 == v14 ) break; } while ( v15-- != 0 ); } v20 = (long long)&v12[-a8]; if ( (*(_BYTE *)(a1 + 12) & 0x10) == 0 ) v20 = a7; *a10 = v20; *a11 = a7; while ( v12 != (_BYTE *)(a7 + a8) ) { *v12++ = 32; *a9++ = -1; } return result; }
my_like_range_win1250ch: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [RBP + -0x2c],R9D MOV dword ptr [RBP + -0x30],R8D MOV qword ptr [RBP + -0x38],RDI MOV R10,qword ptr [RBP + 0x20] MOV R13,qword ptr [RBP + 0x18] MOV R8,qword ptr [RBP + 0x10] LEA R11,[R8 + R13*0x1] TEST RDX,RDX SETZ AL TEST R8,R8 SETZ DIL OR DIL,AL MOV AL,0x1 JNZ 0x0018c676 ADD RDX,RSI LEA RBX,[R8 + -0x1] MOV AL,0x1 LEA R12,[0x4152d0] LEA RDI,[0x4153d0] LAB_0018c606: MOV R14B,byte ptr [RSI] CMP R14B,CL SETNZ R9B LEA R15,[RSI + 0x1] CMP R15,RDX SETZ R8B OR R8B,R9B CMP R8B,0x1 JNZ 0x0018c633 CMP R14B,byte ptr [RBP + -0x30] JZ 0x0018c676 MOV R15,RSI CMP R14B,byte ptr [RBP + -0x2c] JZ 0x0018c676 LAB_0018c633: MOVZX ESI,byte ptr [R15] CMP RSI,0x20 MOV SIL,byte ptr [RSI + R12*0x1] MOV byte ptr [R13],SIL MOVZX EAX,AL MOV ESI,0x0 CMOVNZ EAX,ESI INC R13 MOVZX ESI,byte ptr [R15] MOV SIL,byte ptr [RSI + RDI*0x1] MOV byte ptr [R10],SIL INC R10 MOV RSI,R15 INC RSI CMP RSI,RDX JZ 0x0018c676 LEA R8,[RBX + -0x1] TEST RBX,RBX MOV RBX,R8 JNZ 0x0018c606 LAB_0018c676: MOV RCX,R13 SUB RCX,qword ptr [RBP + 0x18] MOV RDX,qword ptr [RBP + -0x38] TEST byte ptr [RDX + 0xc],0x10 MOV RSI,qword ptr [RBP + 0x10] CMOVZ RCX,RSI MOV RDX,qword ptr [RBP + 0x28] MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBP + 0x30] MOV qword ptr [RCX],RSI LAB_0018c69b: CMP R13,R11 JZ 0x0018c6b1 MOV byte ptr [R13],0x20 INC R13 MOV byte ptr [R10],0xff INC R10 JMP 0x0018c69b LAB_0018c6b1: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_like_range_win1250ch (long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6, long param_7,int1 *param_8,int1 *param_9,long *param_10,long *param_11) { byte bVar1; int8 uVar2; byte *pbVar3; long lVar4; int1 *puVar5; byte *pbVar6; uVar2 = 1; puVar5 = param_8; if (param_7 != 0 && param_3 != 0) { pbVar3 = param_2 + param_3; uVar2 = 1; lVar4 = param_7; while( true ) { lVar4 = lVar4 + -1; bVar1 = *param_2; pbVar6 = param_2 + 1; if ((param_2 + 1 == pbVar3 || bVar1 != param_4) && ((bVar1 == param_5 || (pbVar6 = param_2, bVar1 == param_6)))) break; bVar1 = *pbVar6; *puVar5 = like_range_prefix_min_win1250ch[bVar1]; if ((ulong)bVar1 != 0x20) { uVar2 = 0; } puVar5 = puVar5 + 1; *param_9 = like_range_prefix_max_win1250ch[*pbVar6]; param_9 = param_9 + 1; param_2 = pbVar6 + 1; if ((param_2 == pbVar3) || (lVar4 == 0)) break; } } lVar4 = (long)puVar5 - (long)param_8; if ((*(byte *)(param_1 + 0xc) & 0x10) == 0) { lVar4 = param_7; } *param_10 = lVar4; *param_11 = param_7; for (; puVar5 != param_8 + param_7; puVar5 = puVar5 + 1) { *puVar5 = 0x20; *param_9 = 0xff; param_9 = param_9 + 1; } return uVar2; }
48,410
tailoring_append
eloqsql/strings/ctype.c
static int tailoring_append(MY_XML_PARSER *st, const char *fmt, size_t len, const char *attr) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len, attr); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O3
c
tailoring_append: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r9 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x690(%rdi), %r13 leaq (%rdx,%r13), %rax addq $0x40, %rax cmpq %rax, 0x698(%rdi) jbe 0xd20a3 movq 0x688(%rbx), %rax jmp 0xd20e7 movq %r9, %r14 addq %r15, %r13 movq 0x688(%rbx), %rdi movq 0x7a8(%rbx), %rax movq 0x90(%rax), %rax addq $0x8040, %r13 # imm = 0x8040 movq %r13, 0x698(%rbx) movq %r13, %rsi callq *%rax movq %rax, 0x688(%rbx) testq %rax, %rax je 0xd212a movq 0x690(%rbx), %r13 movq %r14, %r9 addq %rax, %r13 xorl %r14d, %r14d movq %r13, %rdi movl $0x1, %esi movq $-0x1, %rdx movq %r12, %rcx movl %r15d, %r8d xorl %eax, %eax callq 0x29950 movq %r13, %rdi callq 0x29340 addq %rax, 0x690(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %r14d jmp 0xd2118
tailoring_append: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r9, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov r13, [rdi+690h] lea rax, [rdx+r13] add rax, 40h ; '@' cmp [rdi+698h], rax jbe short loc_D20A3 mov rax, [rbx+688h] jmp short loc_D20E7 loc_D20A3: mov r14, r9 add r13, r15 mov rdi, [rbx+688h] mov rax, [rbx+7A8h] mov rax, [rax+90h] add r13, 8040h mov [rbx+698h], r13 mov rsi, r13 call rax mov [rbx+688h], rax test rax, rax jz short loc_D212A mov r13, [rbx+690h] mov r9, r14 loc_D20E7: add r13, rax xor r14d, r14d mov rdi, r13 mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh mov rcx, r12 mov r8d, r15d xor eax, eax call ___sprintf_chk mov rdi, r13 call _strlen add [rbx+690h], rax loc_D2118: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D212A: mov r14d, 1 jmp short loc_D2118
long long tailoring_append(_QWORD *a1, const char *a2, long long a3, long long a4) { long long v4; // rax long long v5; // r9 unsigned int v6; // r15d long long v8; // r13 long long v9; // rax long long v11; // rdi long long ( *v12)(long long, long long); // rax long long v13; // r13 long long v14; // r13 unsigned int v15; // r14d long long v17; // [rsp-8h] [rbp-30h] v17 = v4; v5 = a4; v6 = a3; v8 = a1[210]; if ( a1[211] <= (unsigned long long)(a3 + v8 + 64) ) { v11 = a1[209]; v12 = *(long long ( **)(long long, long long))(a1[245] + 144LL); v13 = a3 + v8 + 32832; a1[211] = v13; v9 = v12(v11, v13); a1[209] = v9; if ( !v9 ) return 1; v8 = a1[210]; v5 = a4; } else { v9 = a1[209]; } v14 = v9 + v8; v15 = 0; __sprintf_chk(v14, 1LL, -1LL, a2, v6, v5, v17); a1[210] += strlen(v14); return v15; }
tailoring_append: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R9,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x690] LEA RAX,[RDX + R13*0x1] ADD RAX,0x40 CMP qword ptr [RDI + 0x698],RAX JBE 0x001d20a3 MOV RAX,qword ptr [RBX + 0x688] JMP 0x001d20e7 LAB_001d20a3: MOV R14,R9 ADD R13,R15 MOV RDI,qword ptr [RBX + 0x688] MOV RAX,qword ptr [RBX + 0x7a8] MOV RAX,qword ptr [RAX + 0x90] ADD R13,0x8040 MOV qword ptr [RBX + 0x698],R13 MOV RSI,R13 CALL RAX MOV qword ptr [RBX + 0x688],RAX TEST RAX,RAX JZ 0x001d212a MOV R13,qword ptr [RBX + 0x690] MOV R9,R14 LAB_001d20e7: ADD R13,RAX XOR R14D,R14D MOV RDI,R13 MOV ESI,0x1 MOV RDX,-0x1 MOV RCX,R12 MOV R8D,R15D XOR EAX,EAX CALL 0x00129950 MOV RDI,R13 CALL 0x00129340 ADD qword ptr [RBX + 0x690],RAX LAB_001d2118: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d212a: MOV R14D,0x1 JMP 0x001d2118
int8 tailoring_append(long param_1,int8 param_2,ulong param_3,int8 param_4) { code *pcVar1; long lVar2; size_t sVar3; long lVar4; lVar4 = *(long *)(param_1 + 0x690); if (param_3 + lVar4 + 0x40 < *(ulong *)(param_1 + 0x698)) { lVar2 = *(long *)(param_1 + 0x688); } else { pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90); lVar4 = lVar4 + param_3 + 0x8040; *(long *)(param_1 + 0x698) = lVar4; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688),lVar4); *(long *)(param_1 + 0x688) = lVar2; if (lVar2 == 0) { return 1; } lVar4 = *(long *)(param_1 + 0x690); } __sprintf_chk((char *)(lVar4 + lVar2),1,0xffffffffffffffff,param_2,param_3 & 0xffffffff,param_4); sVar3 = strlen((char *)(lVar4 + lVar2)); *(long *)(param_1 + 0x690) = *(long *)(param_1 + 0x690) + sVar3; return 0; }
48,411
ModbusTcpPort::write()
serhmarch[P]ModbusBridge/modbus/src/unix/ModbusTcpPort_unix.cpp
StatusCode ModbusTcpPort::write() { ModbusTcpPortPrivateUnix *d = d_unix(d_ptr); switch (d->state) { case STATE_BEGIN: case STATE_PREPARE_TO_WRITE: case STATE_WAIT_FOR_WRITE: case STATE_WAIT_FOR_WRITE_ALL: { ssize_t c = d->socket->send(reinterpret_cast<char*>(d->buff), d->sz, 0); if (c > 0) { d->state = STATE_BEGIN; return Status_Good; } else { close(); return d->setError(Status_BadTcpWrite, StringLiteral("TCP. Error while writing to '") + d->settings.host + StringLiteral(":") + toModbusString(d->settings.port) + StringLiteral("'. Error code: ") + toModbusString(errno) + StringLiteral(". ") + getLastErrorText()); } } break; default: break; } return Status_Processing; }
O0
cpp
ModbusTcpPort::write(): pushq %rbp movq %rsp, %rbp subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x180(%rbp) movq 0x8(%rax), %rdi callq 0x228a0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x174(%rbp) testl %eax, %eax je 0x21c6e jmp 0x21c5a movl -0x174(%rbp), %eax addl $-0x6, %eax subl $0x2, %eax ja 0x21fa2 jmp 0x21c6e movq -0x18(%rbp), %rax movq 0x180(%rax), %rdi movq -0x18(%rbp), %rsi addq $0x6c, %rsi movq -0x18(%rbp), %rax movzwl 0x178(%rax), %eax movl %eax, %edx xorl %ecx, %ecx callq 0x22c70 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jle 0x21cb7 movq -0x18(%rbp), %rax movl $0x0, 0x8(%rax) movl $0x0, -0x4(%rbp) jmp 0x21fab movq -0x180(%rbp), %rdi movq (%rdi), %rax movq 0x28(%rax), %rax callq *%rax movq -0x18(%rbp), %rdx movq %rdx, -0x190(%rbp) addq $0x40, %rdx leaq 0x6b1f(%rip), %rsi # 0x287fc leaq -0x100(%rbp), %rdi movq %rdi, -0x188(%rbp) callq 0x22a00 movq -0x188(%rbp), %rsi leaq 0x57e5(%rip), %rdx # 0x274e3 leaq -0xe0(%rbp), %rdi callq 0x229b0 jmp 0x21d0c movq -0x18(%rbp), %rax movzwl 0x60(%rax), %esi leaq -0x130(%rbp), %rdi callq 0x19f30 jmp 0x21d22 leaq -0xc0(%rbp), %rdi leaq -0xe0(%rbp), %rsi leaq -0x130(%rbp), %rdx callq 0x19e60 jmp 0x21d3e leaq 0x6a51(%rip), %rdx # 0x28796 leaq -0xa0(%rbp), %rdi leaq -0xc0(%rbp), %rsi callq 0x229b0 jmp 0x21d5a callq 0x6070 movl (%rax), %esi leaq -0x150(%rbp), %rdi callq 0x19f30 jmp 0x21d6f leaq -0x80(%rbp), %rdi leaq -0xa0(%rbp), %rsi leaq -0x150(%rbp), %rdx callq 0x19e60 jmp 0x21d88 leaq 0x6a17(%rip), %rdx # 0x287a6 leaq -0x60(%rbp), %rdi leaq -0x80(%rbp), %rsi callq 0x229b0 jmp 0x21d9e leaq -0x170(%rbp), %rdi callq 0x1ebc0 jmp 0x21dac leaq -0x40(%rbp), %rdi leaq -0x60(%rbp), %rsi leaq -0x170(%rbp), %rdx callq 0x19e60 jmp 0x21dc2 movq -0x190(%rbp), %rdi movl $0x1000503, %esi # imm = 0x1000503 leaq -0x40(%rbp), %rdx callq 0x11400 movl %eax, -0x194(%rbp) jmp 0x21ddf movl -0x194(%rbp), %eax movl %eax, -0x4(%rbp) leaq -0x40(%rbp), %rdi callq 0x62a0 leaq -0x170(%rbp), %rdi callq 0x62a0 leaq -0x60(%rbp), %rdi callq 0x62a0 leaq -0x80(%rbp), %rdi callq 0x62a0 leaq -0x150(%rbp), %rdi callq 0x62a0 leaq -0xa0(%rbp), %rdi callq 0x62a0 leaq -0xc0(%rbp), %rdi callq 0x62a0 leaq -0x130(%rbp), %rdi callq 0x62a0 leaq -0xe0(%rbp), %rdi callq 0x62a0 leaq -0x100(%rbp), %rdi callq 0x62a0 jmp 0x21fab movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f94 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f88 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f7c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f70 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f64 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f58 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f4f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f46 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) jmp 0x21f3a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x108(%rbp) movl %eax, -0x10c(%rbp) leaq -0x40(%rbp), %rdi callq 0x62a0 leaq -0x170(%rbp), %rdi callq 0x62a0 leaq -0x60(%rbp), %rdi callq 0x62a0 leaq -0x80(%rbp), %rdi callq 0x62a0 leaq -0x150(%rbp), %rdi callq 0x62a0 leaq -0xa0(%rbp), %rdi callq 0x62a0 leaq -0xc0(%rbp), %rdi callq 0x62a0 leaq -0x130(%rbp), %rdi callq 0x62a0 leaq -0xe0(%rbp), %rdi callq 0x62a0 leaq -0x100(%rbp), %rdi callq 0x62a0 jmp 0x21fb7 jmp 0x21fa4 movl $0x80000000, -0x4(%rbp) # imm = 0x80000000 movl -0x4(%rbp), %eax addq $0x1a0, %rsp # imm = 0x1A0 popq %rbp retq movq -0x108(%rbp), %rdi callq 0x6710 nopw %cs:(%rax,%rax)
_ZN13ModbusTcpPort5writeEv: push rbp mov rbp, rsp sub rsp, 1A0h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov [rbp+var_180], rax mov rdi, [rax+8]; ModbusPortPrivate * call _Z6d_unixP17ModbusPortPrivate; d_unix(ModbusPortPrivate *) mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_174], eax test eax, eax jz short loc_21C6E jmp short $+2 loc_21C5A: mov eax, [rbp+var_174] add eax, 0FFFFFFFAh sub eax, 2 ja loc_21FA2 jmp short $+2 loc_21C6E: mov rax, [rbp+var_18] mov rdi, [rax+180h]; this mov rsi, [rbp+var_18] add rsi, 6Ch ; 'l'; void * mov rax, [rbp+var_18] movzx eax, word ptr [rax+178h] mov edx, eax; unsigned __int64 xor ecx, ecx; int call _ZN15ModbusTcpSocket4sendEPKvmi; ModbusTcpSocket::send(void const*,ulong,int) mov [rbp+var_20], rax cmp [rbp+var_20], 0 jle short loc_21CB7 mov rax, [rbp+var_18] mov dword ptr [rax+8], 0 mov [rbp+var_4], 0 jmp loc_21FAB loc_21CB7: mov rdi, [rbp+var_180] mov rax, [rdi] mov rax, [rax+28h] call rax mov rdx, [rbp+var_18] mov [rbp+var_190], rdx add rdx, 40h ; '@' lea rsi, aTcpErrorWhileW; "TCP. Error while writing to '" lea rdi, [rbp+var_100] mov [rbp+var_188], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rsi, [rbp+var_188] lea rdx, asc_274E2+1; ":" lea rdi, [rbp+var_E0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_21D0C: mov rax, [rbp+var_18] movzx esi, word ptr [rax+60h] lea rdi, [rbp+var_130] call _ZN6Modbus14toModbusStringB5cxx11Ei; Modbus::toModbusString(int) jmp short $+2 loc_21D22: lea rdi, [rbp+var_C0] lea rsi, [rbp+var_E0] lea rdx, [rbp+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_21D3E: lea rdx, aErrorCode; "'. Error code: " lea rdi, [rbp+var_A0] lea rsi, [rbp+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_21D5A: call ___errno_location mov esi, [rax] lea rdi, [rbp+var_150] call _ZN6Modbus14toModbusStringB5cxx11Ei; Modbus::toModbusString(int) jmp short $+2 loc_21D6F: lea rdi, [rbp+var_80] lea rsi, [rbp+var_A0] lea rdx, [rbp+var_150] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_21D88: lea rdx, asc_287A6; ". " lea rdi, [rbp+var_60] lea rsi, [rbp+var_80] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_21D9E: lea rdi, [rbp+var_170] call _ZN6Modbus16getLastErrorTextB5cxx11Ev; Modbus::getLastErrorText(void) jmp short $+2 loc_21DAC: lea rdi, [rbp+var_40] lea rsi, [rbp+var_60] lea rdx, [rbp+var_170] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_21DC2: mov rdi, [rbp+var_190] mov esi, 1000503h lea rdx, [rbp+var_40] call _ZN17ModbusPortPrivate8setErrorEN6Modbus10StatusCodeEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ModbusPortPrivate::setError(Modbus::StatusCode,std::string &&) mov [rbp+var_194], eax jmp short $+2 loc_21DDF: mov eax, [rbp+var_194] mov [rbp+var_4], eax lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_170] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_150] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_130] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_21FAB mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp loc_21F94 mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp loc_21F88 mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp loc_21F7C mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp loc_21F70 mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp loc_21F64 mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp short loc_21F58 mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp short loc_21F4F mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp short loc_21F46 mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax jmp short loc_21F3A mov rcx, rax mov eax, edx mov [rbp+var_108], rcx mov [rbp+var_10C], eax lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F3A: lea rdi, [rbp+var_170] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F46: lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F4F: lea rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F58: lea rdi, [rbp+var_150] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F64: lea rdi, [rbp+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F70: lea rdi, [rbp+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F7C: lea rdi, [rbp+var_130] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F88: lea rdi, [rbp+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_21F94: lea rdi, [rbp+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_21FB7 loc_21FA2: jmp short $+2 loc_21FA4: mov [rbp+var_4], 80000000h loc_21FAB: mov eax, [rbp+var_4] add rsp, 1A0h pop rbp retn loc_21FB7: mov rdi, [rbp+var_108] call __Unwind_Resume
long long ModbusTcpPort::write(ModbusPortPrivate **this) { int *v1; // rax long long v3; // [rsp+10h] [rbp-190h] int v4; // [rsp+2Ch] [rbp-174h] _BYTE v5[32]; // [rsp+30h] [rbp-170h] BYREF _BYTE v6[32]; // [rsp+50h] [rbp-150h] BYREF _BYTE v7[36]; // [rsp+70h] [rbp-130h] BYREF _BYTE v8[32]; // [rsp+A0h] [rbp-100h] BYREF _BYTE v9[32]; // [rsp+C0h] [rbp-E0h] BYREF _BYTE v10[32]; // [rsp+E0h] [rbp-C0h] BYREF _BYTE v11[32]; // [rsp+100h] [rbp-A0h] BYREF _BYTE v12[32]; // [rsp+120h] [rbp-80h] BYREF _BYTE v13[32]; // [rsp+140h] [rbp-60h] BYREF _BYTE v14[32]; // [rsp+160h] [rbp-40h] BYREF long long v15; // [rsp+180h] [rbp-20h] long long v16; // [rsp+188h] [rbp-18h] ModbusPortPrivate **v17; // [rsp+190h] [rbp-10h] unsigned int v18; // [rsp+19Ch] [rbp-4h] v17 = this; v16 = d_unix(this[1]); v4 = *(_DWORD *)(v16 + 8); if ( v4 && (unsigned int)(v4 - 6) > 2 ) { return 0x80000000; } else { v15 = ModbusTcpSocket::send( *(ModbusTcpSocket **)(v16 + 384), (const void *)(v16 + 108), *(unsigned __int16 *)(v16 + 376), 0); if ( v15 <= 0 ) { (*((void ( **)(ModbusPortPrivate **))*this + 5))(this); v3 = v16; std::operator+<char>(v8, "TCP. Error while writing to '", v16 + 64); std::operator+<char>(v9, v8, ":"); Modbus::toModbusString[abi:cxx11]((std::__cxx11 *)v7, *(unsigned __int16 *)(v16 + 96)); std::operator+<char>((long long)v10, (long long)v9, (long long)v7); std::operator+<char>(v11, v10, "'. Error code: "); v1 = (int *)__errno_location(); Modbus::toModbusString[abi:cxx11]((std::__cxx11 *)v6, *v1); std::operator+<char>((long long)v12, (long long)v11, (long long)v6); std::operator+<char>(v13, v12, ". "); Modbus::getLastErrorText[abi:cxx11]((long long)v5, (long long)v12); std::operator+<char>((long long)v14, (long long)v13, (long long)v5); v18 = ModbusPortPrivate::setError(v3, 0x1000503u, (long long)v14); std::string::~string(v14); std::string::~string(v5); std::string::~string(v13); std::string::~string(v12); std::string::~string(v6); std::string::~string(v11); std::string::~string(v10); std::string::~string(v7); std::string::~string(v9); std::string::~string(v8); } else { *(_DWORD *)(v16 + 8) = 0; return 0; } } return v18; }
write: PUSH RBP MOV RBP,RSP SUB RSP,0x1a0 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x180],RAX MOV RDI,qword ptr [RAX + 0x8] CALL 0x001228a0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x174],EAX TEST EAX,EAX JZ 0x00121c6e JMP 0x00121c5a LAB_00121c5a: MOV EAX,dword ptr [RBP + -0x174] ADD EAX,-0x6 SUB EAX,0x2 JA 0x00121fa2 JMP 0x00121c6e LAB_00121c6e: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x180] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x6c MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x178] MOV EDX,EAX XOR ECX,ECX CALL 0x00122c70 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JLE 0x00121cb7 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x8],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00121fab LAB_00121cb7: MOV RDI,qword ptr [RBP + -0x180] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x28] CALL RAX MOV RDX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x190],RDX ADD RDX,0x40 LEA RSI,[0x1287fc] LEA RDI,[RBP + -0x100] MOV qword ptr [RBP + -0x188],RDI CALL 0x00122a00 MOV RSI,qword ptr [RBP + -0x188] LAB_00121cf7: LEA RDX,[0x1274e3] LEA RDI,[RBP + -0xe0] CALL 0x001229b0 JMP 0x00121d0c LAB_00121d0c: MOV RAX,qword ptr [RBP + -0x18] MOVZX ESI,word ptr [RAX + 0x60] LAB_00121d14: LEA RDI,[RBP + -0x130] CALL 0x00119f30 JMP 0x00121d22 LAB_00121d22: LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0xe0] LEA RDX,[RBP + -0x130] CALL 0x00119e60 JMP 0x00121d3e LAB_00121d3e: LEA RDX,[0x128796] LEA RDI,[RBP + -0xa0] LEA RSI,[RBP + -0xc0] CALL 0x001229b0 JMP 0x00121d5a LAB_00121d5a: CALL 0x00106070 MOV ESI,dword ptr [RAX] LAB_00121d61: LEA RDI,[RBP + -0x150] CALL 0x00119f30 JMP 0x00121d6f LAB_00121d6f: LEA RDI,[RBP + -0x80] LEA RSI,[RBP + -0xa0] LEA RDX,[RBP + -0x150] CALL 0x00119e60 JMP 0x00121d88 LAB_00121d88: LEA RDX,[0x1287a6] LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x80] CALL 0x001229b0 JMP 0x00121d9e LAB_00121d9e: LEA RDI,[RBP + -0x170] CALL 0x0011ebc0 JMP 0x00121dac LAB_00121dac: LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0x60] LEA RDX,[RBP + -0x170] CALL 0x00119e60 JMP 0x00121dc2 LAB_00121dc2: MOV RDI,qword ptr [RBP + -0x190] MOV ESI,0x1000503 LEA RDX,[RBP + -0x40] CALL 0x00111400 LAB_00121dd7: MOV dword ptr [RBP + -0x194],EAX JMP 0x00121ddf LAB_00121ddf: MOV EAX,dword ptr [RBP + -0x194] MOV dword ptr [RBP + -0x4],EAX LEA RDI,[RBP + -0x40] CALL 0x001062a0 LEA RDI,[RBP + -0x170] CALL 0x001062a0 LEA RDI,[RBP + -0x60] CALL 0x001062a0 LEA RDI,[RBP + -0x80] CALL 0x001062a0 LEA RDI,[RBP + -0x150] CALL 0x001062a0 LEA RDI,[RBP + -0xa0] CALL 0x001062a0 LEA RDI,[RBP + -0xc0] CALL 0x001062a0 LEA RDI,[RBP + -0x130] CALL 0x001062a0 LEA RDI,[RBP + -0xe0] CALL 0x001062a0 LEA RDI,[RBP + -0x100] CALL 0x001062a0 JMP 0x00121fab LAB_00121fa2: JMP 0x00121fa4 LAB_00121fa4: MOV dword ptr [RBP + -0x4],0x80000000 LAB_00121fab: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x1a0 POP RBP RET
/* ModbusTcpPort::write() */ int4 __thiscall ModbusTcpPort::write(ModbusTcpPort *this) { ModbusPortPrivate *pMVar1; int *piVar2; Modbus local_178 [32]; Modbus local_158 [32]; Modbus local_138 [48]; string local_108 [32]; string local_e8 [32]; string local_c8 [32]; string local_a8 [32]; string local_88 [32]; string local_68 [32]; string local_48 [32]; long local_28; ModbusPortPrivate *local_20; ModbusTcpPort *local_18; int4 local_c; local_18 = this; local_20 = (ModbusPortPrivate *)d_unix(*(ModbusPortPrivate **)(this + 8)); if ((*(int *)(local_20 + 8) == 0) || (*(int *)(local_20 + 8) - 6U < 3)) { local_28 = ModbusTcpSocket::send (*(ModbusTcpSocket **)(local_20 + 0x180),local_20 + 0x6c, (ulong)*(ushort *)(local_20 + 0x178),0); if (local_28 < 1) { (**(code **)(*(long *)this + 0x28))(); pMVar1 = local_20; std::operator+((char *)local_108,(string *)"TCP. Error while writing to \'"); /* try { // try from 00121cf7 to 00121d09 has its CatchHandler @ 00121e5c */ std::operator+(local_e8,(char *)local_108); /* try { // try from 00121d14 to 00121d1f has its CatchHandler @ 00121e73 */ Modbus::toModbusString_abi_cxx11_(local_138,(uint)*(ushort *)(local_20 + 0x60)); /* try { // try from 00121d22 to 00121d3b has its CatchHandler @ 00121e8a */ std::operator+(local_c8,local_e8); /* try { // try from 00121d3e to 00121d57 has its CatchHandler @ 00121ea1 */ std::operator+(local_a8,(char *)local_c8); piVar2 = __errno_location(); /* try { // try from 00121d61 to 00121d6c has its CatchHandler @ 00121eb8 */ Modbus::toModbusString_abi_cxx11_(local_158,*piVar2); /* try { // try from 00121d6f to 00121d85 has its CatchHandler @ 00121ecf */ std::operator+(local_88,local_a8); /* try { // try from 00121d88 to 00121d9b has its CatchHandler @ 00121ee3 */ std::operator+(local_68,(char *)local_88); /* try { // try from 00121d9e to 00121da9 has its CatchHandler @ 00121ef7 */ Modbus::getLastErrorText_abi_cxx11_(local_178); /* try { // try from 00121dac to 00121dbf has its CatchHandler @ 00121f0b */ std::operator+(local_48,local_68); /* try { // try from 00121dc2 to 00121dd6 has its CatchHandler @ 00121f1f */ local_c = ModbusPortPrivate::setError(pMVar1,0x1000503,local_48); std::__cxx11::string::~string(local_48); std::__cxx11::string::~string((string *)local_178); std::__cxx11::string::~string(local_68); std::__cxx11::string::~string(local_88); std::__cxx11::string::~string((string *)local_158); std::__cxx11::string::~string(local_a8); std::__cxx11::string::~string(local_c8); std::__cxx11::string::~string((string *)local_138); std::__cxx11::string::~string(local_e8); std::__cxx11::string::~string(local_108); } else { *(int4 *)(local_20 + 8) = 0; local_c = 0; } } else { local_c = 0x80000000; } return local_c; }
48,412
ma_unmap_file
eloqsql/storage/maria/ma_packrec.c
void _ma_unmap_file(MARIA_HA *info) { MARIA_SHARE *share= info->s; my_munmap((char*) share->file_map, (size_t) share->mmaped_length + MEMMAP_EXTRA_MARGIN); share->file_map= 0; share->file_read= _ma_nommap_pread; share->file_write= _ma_nommap_pwrite; info->opt_flag&= ~MEMMAP_USED; }
O0
c
ma_unmap_file: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x5f0(%rax), %rdi movq -0x10(%rbp), %rax movq 0xa00(%rax), %rsi addq $0x7, %rsi callq 0x29440 movq -0x10(%rbp), %rax movq $0x0, 0x5f0(%rax) movq -0x10(%rbp), %rax leaq 0x2ba0(%rip), %rcx # 0x498c0 movq %rcx, 0x6e0(%rax) movq -0x10(%rbp), %rax leaq 0x2d0e(%rip), %rcx # 0x49a40 movq %rcx, 0x6e8(%rax) movq -0x8(%rbp), %rax movl 0x61c(%rax), %ecx andl $-0x21, %ecx movl %ecx, 0x61c(%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_unmap_file: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, [rax+5F0h] mov rax, [rbp+var_10] mov rsi, [rax+0A00h] add rsi, 7 call _munmap mov rax, [rbp+var_10] mov qword ptr [rax+5F0h], 0 mov rax, [rbp+var_10] lea rcx, _ma_nommap_pread mov [rax+6E0h], rcx mov rax, [rbp+var_10] lea rcx, _ma_nommap_pwrite mov [rax+6E8h], rcx mov rax, [rbp+var_8] mov ecx, [rax+61Ch] and ecx, 0FFFFFFDFh mov [rax+61Ch], ecx add rsp, 10h pop rbp retn
_DWORD * ma_unmap_file(_DWORD *a1) { _DWORD *result; // rax _QWORD *v2; // [rsp+0h] [rbp-10h] v2 = *(_QWORD **)a1; munmap(*(_QWORD *)(*(_QWORD *)a1 + 1520LL), *(_QWORD *)(*(_QWORD *)a1 + 2560LL) + 7LL); v2[190] = 0LL; v2[220] = ma_nommap_pread; v2[221] = ma_nommap_pwrite; result = a1; a1[391] &= ~0x20u; return result; }
_ma_unmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x5f0] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0xa00] ADD RSI,0x7 CALL 0x00129440 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x5f0],0x0 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x1498c0] MOV qword ptr [RAX + 0x6e0],RCX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x149a40] MOV qword ptr [RAX + 0x6e8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x61c] AND ECX,0xffffffdf MOV dword ptr [RAX + 0x61c],ECX ADD RSP,0x10 POP RBP RET
void _ma_unmap_file(long *param_1) { long lVar1; lVar1 = *param_1; munmap(*(void **)(lVar1 + 0x5f0),*(long *)(lVar1 + 0xa00) + 7); *(int8 *)(lVar1 + 0x5f0) = 0; *(code **)(lVar1 + 0x6e0) = _ma_nommap_pread; *(code **)(lVar1 + 0x6e8) = _ma_nommap_pwrite; *(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffdf; return; }
48,413
LefDefParser::lefiPinAntennaModel::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
void lefiPinAntennaModel::Init() { numAntennaGateArea_ = 0; antennaGateAreaAllocated_ = 1; antennaGateArea_ = (double*) lefMalloc(sizeof(double)); antennaGateAreaLayer_ = (char**) lefMalloc(sizeof(char*)); numAntennaMaxAreaCar_ = 0; antennaMaxAreaCarAllocated_ = 1; antennaMaxAreaCar_ = (double*) lefMalloc(sizeof(double)); antennaMaxAreaCarLayer_ = (char**) lefMalloc(sizeof(char*)); numAntennaMaxSideAreaCar_ = 0; antennaMaxSideAreaCarAllocated_ = 1; antennaMaxSideAreaCar_ = (double*) lefMalloc(sizeof(double)); antennaMaxSideAreaCarLayer_ = (char**) lefMalloc(sizeof(char*)); numAntennaMaxCutCar_ = 0; antennaMaxCutCarAllocated_ = 1; antennaMaxCutCar_ = (double*) lefMalloc(sizeof(double)); antennaMaxCutCarLayer_ = (char**) lefMalloc(sizeof(char*)); oxide_ = 0; hasReturn_ = 0; }
O3
cpp
LefDefParser::lefiPinAntennaModel::Init(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movabsq $0x100000000, %r14 # imm = 0x100000000 movq %r14, 0xc(%rdi) movl $0x8, %edi callq 0x24985 movq %rax, 0x18(%rbx) movl $0x8, %edi callq 0x24985 movq %rax, 0x20(%rbx) movq %r14, 0x28(%rbx) movl $0x8, %edi callq 0x24985 movq %rax, 0x30(%rbx) movl $0x8, %edi callq 0x24985 movq %rax, 0x38(%rbx) movq %r14, 0x40(%rbx) movl $0x8, %edi callq 0x24985 movq %rax, 0x48(%rbx) movl $0x8, %edi callq 0x24985 movq %rax, 0x50(%rbx) movq %r14, 0x58(%rbx) movl $0x8, %edi callq 0x24985 movq %rax, 0x60(%rbx) movl $0x8, %edi callq 0x24985 movq %rax, 0x68(%rbx) movq $0x0, (%rbx) movl $0x0, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN12LefDefParser19lefiPinAntennaModel4InitEv: push r14 push rbx push rax mov rbx, rdi mov r14, 100000000h mov [rdi+0Ch], r14 mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+18h], rax mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+20h], rax mov [rbx+28h], r14 mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+30h], rax mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+38h], rax mov [rbx+40h], r14 mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+48h], rax mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+50h], rax mov [rbx+58h], r14 mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+60h], rax mov edi, offset byte_8; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rbx+68h], rax mov qword ptr [rbx], 0 mov dword ptr [rbx+8], 0 add rsp, 8 pop rbx pop r14 retn
long long LefDefParser::lefiPinAntennaModel::Init(LefDefParser::lefiPinAntennaModel *this) { long long result; // rax *(_QWORD *)((char *)this + 12) = 0x100000000LL; *((_QWORD *)this + 3) = LefDefParser::lefMalloc((LefDefParser *)&byte_8); *((_QWORD *)this + 4) = LefDefParser::lefMalloc((LefDefParser *)&byte_8); *((_QWORD *)this + 5) = 0x100000000LL; *((_QWORD *)this + 6) = LefDefParser::lefMalloc((LefDefParser *)&byte_8); *((_QWORD *)this + 7) = LefDefParser::lefMalloc((LefDefParser *)&byte_8); *((_QWORD *)this + 8) = 0x100000000LL; *((_QWORD *)this + 9) = LefDefParser::lefMalloc((LefDefParser *)&byte_8); *((_QWORD *)this + 10) = LefDefParser::lefMalloc((LefDefParser *)&byte_8); *((_QWORD *)this + 11) = 0x100000000LL; *((_QWORD *)this + 12) = LefDefParser::lefMalloc((LefDefParser *)&byte_8); result = LefDefParser::lefMalloc((LefDefParser *)&byte_8); *((_QWORD *)this + 13) = result; *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; return result; }
Init: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14,0x100000000 MOV qword ptr [RDI + 0xc],R14 MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x18],RAX MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x28],R14 MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x30],RAX MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x38],RAX MOV qword ptr [RBX + 0x40],R14 MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x48],RAX MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],R14 MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x60],RAX MOV EDI,0x8 CALL 0x00124985 MOV qword ptr [RBX + 0x68],RAX MOV qword ptr [RBX],0x0 MOV dword ptr [RBX + 0x8],0x0 ADD RSP,0x8 POP RBX POP R14 RET
/* LefDefParser::lefiPinAntennaModel::Init() */ void LefDefParser::lefiPinAntennaModel::Init(void) { int8 uVar1; ulong in_RSI; int8 *in_RDI; *(int8 *)((long)in_RDI + 0xc) = 0x100000000; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[3] = uVar1; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[4] = uVar1; in_RDI[5] = 0x100000000; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[6] = uVar1; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[7] = uVar1; in_RDI[8] = 0x100000000; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[9] = uVar1; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[10] = uVar1; in_RDI[0xb] = 0x100000000; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[0xc] = uVar1; uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI); in_RDI[0xd] = uVar1; *in_RDI = 0; *(int4 *)(in_RDI + 1) = 0; return; }
48,414
js_dataview_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { BOOL recompute_len = FALSE; BOOL track_rab = FALSE; JSArrayBuffer *abuf; uint64_t offset; uint32_t len; JSValue buffer; JSValue obj; JSTypedArray *ta; JSObject *p; buffer = argv[0]; abuf = js_get_array_buffer(ctx, buffer); if (!abuf) return JS_EXCEPTION; offset = 0; if (argc > 1) { if (JS_ToIndex(ctx, &offset, argv[1])) return JS_EXCEPTION; } if (abuf->detached) return JS_ThrowTypeErrorDetachedArrayBuffer(ctx); if (offset > abuf->byte_length) return JS_ThrowRangeError(ctx, "invalid byteOffset"); len = abuf->byte_length - offset; if (argc > 2 && !JS_IsUndefined(argv[2])) { uint64_t l; if (JS_ToIndex(ctx, &l, argv[2])) return JS_EXCEPTION; if (l > len) return JS_ThrowRangeError(ctx, "invalid byteLength"); len = l; } else { recompute_len = TRUE; track_rab = array_buffer_is_resizable(abuf); } obj = js_create_from_ctor(ctx, new_target, JS_CLASS_DATAVIEW); if (JS_IsException(obj)) return JS_EXCEPTION; if (abuf->detached) { /* could have been detached in js_create_from_ctor() */ JS_ThrowTypeErrorDetachedArrayBuffer(ctx); goto fail; } // RAB could have been resized in js_create_from_ctor() if (offset > abuf->byte_length) { goto out_of_bound; } else if (recompute_len) { len = abuf->byte_length - offset; } else if (offset + len > abuf->byte_length) { out_of_bound: JS_ThrowRangeError(ctx, "invalid byteOffset or byteLength"); goto fail; } ta = js_malloc(ctx, sizeof(*ta)); if (!ta) { fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; } p = JS_VALUE_GET_OBJ(obj); ta->obj = p; ta->buffer = JS_VALUE_GET_OBJ(js_dup(buffer)); ta->offset = offset; ta->length = len; ta->track_rab = track_rab; list_add_tail(&ta->link, &abuf->array_list); p->u.typed_array = ta; return obj; }
O0
c
js_dataview_constructor: subq $0xd8, %rsp movq %rsi, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) movq %rdi, 0xb0(%rsp) movl %ecx, 0xac(%rsp) movq %r8, 0xa0(%rsp) movl $0x0, 0x9c(%rsp) movl $0x0, 0x98(%rsp) movq 0xa0(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x70(%rsp) movq 0x8(%rax), %rax movq %rax, 0x78(%rsp) movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x580b0 movq %rax, 0x90(%rsp) cmpq $0x0, 0x90(%rsp) jne 0x591f3 movl $0x0, 0xc8(%rsp) movq $0x6, 0xd0(%rsp) jmp 0x595db movq $0x0, 0x88(%rsp) cmpl $0x1, 0xac(%rsp) jle 0x59251 movq 0xb0(%rsp), %rdi movq 0xa0(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x88(%rsp), %rsi callq 0x39140 cmpl $0x0, %eax je 0x5924f movl $0x0, 0xc8(%rsp) movq $0x6, 0xd0(%rsp) jmp 0x595db jmp 0x59251 movq 0x90(%rsp), %rax cmpb $0x0, 0x8(%rax) je 0x59281 movq 0xb0(%rsp), %rdi callq 0x58140 movq %rax, 0xc8(%rsp) movq %rdx, 0xd0(%rsp) jmp 0x595db movq 0x88(%rsp), %rax movq 0x90(%rsp), %rcx movslq (%rcx), %rcx cmpq %rcx, %rax jbe 0x592c4 movq 0xb0(%rsp), %rdi leaq 0xb8538(%rip), %rsi # 0x1117e0 movb $0x0, %al callq 0x29670 movq %rax, 0xc8(%rsp) movq %rdx, 0xd0(%rsp) jmp 0x595db movq 0x90(%rsp), %rax movslq (%rax), %rax subq 0x88(%rsp), %rax movl %eax, 0x84(%rsp) cmpl $0x2, 0xac(%rsp) jle 0x59397 movq 0xa0(%rsp), %rax movq 0x20(%rax), %rdi movq 0x28(%rax), %rsi callq 0x2e260 cmpl $0x0, %eax jne 0x59397 movq 0xb0(%rsp), %rdi movq 0xa0(%rsp), %rax movq 0x20(%rax), %rdx movq 0x28(%rax), %rcx leaq 0x48(%rsp), %rsi callq 0x39140 cmpl $0x0, %eax je 0x5934d movl $0x0, 0xc8(%rsp) movq $0x6, 0xd0(%rsp) jmp 0x595db movq 0x48(%rsp), %rax movl 0x84(%rsp), %ecx cmpq %rcx, %rax jbe 0x59389 movq 0xb0(%rsp), %rdi leaq 0xb8486(%rip), %rsi # 0x1117f3 movb $0x0, %al callq 0x29670 movq %rax, 0xc8(%rsp) movq %rdx, 0xd0(%rsp) jmp 0x595db movq 0x48(%rsp), %rax movl %eax, 0x84(%rsp) jmp 0x593b6 movl $0x1, 0x9c(%rsp) movq 0x90(%rsp), %rdi callq 0xda610 movl %eax, 0x98(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi movq 0xc0(%rsp), %rdx movl $0x21, %ecx callq 0x54e00 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x59426 movl $0x0, 0xc8(%rsp) movq $0x6, 0xd0(%rsp) jmp 0x595db movq 0x90(%rsp), %rax cmpb $0x0, 0x8(%rax) je 0x59450 movq 0xb0(%rsp), %rdi callq 0x58140 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) jmp 0x594fb movq 0x88(%rsp), %rax movq 0x90(%rsp), %rcx movslq (%rcx), %rcx cmpq %rcx, %rax jbe 0x5946a jmp 0x594b4 cmpl $0x0, 0x9c(%rsp) je 0x59490 movq 0x90(%rsp), %rax movslq (%rax), %rax subq 0x88(%rsp), %rax movl %eax, 0x84(%rsp) jmp 0x594d8 movq 0x88(%rsp), %rax movl 0x84(%rsp), %ecx addq %rcx, %rax movq 0x90(%rsp), %rcx movslq (%rcx), %rcx cmpq %rcx, %rax jbe 0x594d6 jmp 0x594b4 movq 0xb0(%rsp), %rdi leaq 0xb8343(%rip), %rsi # 0x111806 movb $0x0, %al callq 0x29670 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) jmp 0x594fb jmp 0x594d8 jmp 0x594da movq 0xb0(%rsp), %rdi movl $0x30, %esi callq 0x21cb0 movq %rax, 0x58(%rsp) cmpq $0x0, 0x58(%rsp) jne 0x5952e jmp 0x594fb movq 0xb0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 movl $0x0, 0xc8(%rsp) movq $0x6, 0xd0(%rsp) jmp 0x595db movq 0x60(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x216d0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rcx movq 0x58(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x88(%rsp), %rax movl %eax, %ecx movq 0x58(%rsp), %rax movl %ecx, 0x20(%rax) movl 0x84(%rsp), %ecx movq 0x58(%rsp), %rax movl %ecx, 0x24(%rax) movl 0x98(%rsp), %ecx movq 0x58(%rsp), %rax movl %ecx, 0x28(%rax) movq 0x58(%rsp), %rdi movq 0x90(%rsp), %rsi addq $0x18, %rsi callq 0x23a50 movq 0x58(%rsp), %rcx movq 0x50(%rsp), %rax movq %rcx, 0x30(%rax) movq 0x60(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xc8(%rsp), %rax movq 0xd0(%rsp), %rdx addq $0xd8, %rsp retq nopw %cs:(%rax,%rax)
js_dataview_constructor: sub rsp, 0D8h mov [rsp+0D8h+var_20], rsi mov [rsp+0D8h+var_18], rdx mov [rsp+0D8h+var_28], rdi mov [rsp+0D8h+var_2C], ecx mov [rsp+0D8h+var_38], r8 mov [rsp+0D8h+var_3C], 0 mov [rsp+0D8h+var_40], 0 mov rax, [rsp+0D8h+var_38] mov rcx, [rax] mov [rsp+0D8h+var_68], rcx mov rax, [rax+8] mov [rsp+0D8h+var_60], rax mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_68] mov rdx, [rsp+0D8h+var_60] call js_get_array_buffer mov [rsp+0D8h+var_48], rax cmp [rsp+0D8h+var_48], 0 jnz short loc_591F3 mov dword ptr [rsp+0D8h+var_10], 0 mov [rsp+0D8h+var_8], 6 jmp loc_595DB loc_591F3: mov [rsp+0D8h+var_50], 0 cmp [rsp+0D8h+var_2C], 1 jle short loc_59251 mov rdi, [rsp+0D8h+var_28] mov rax, [rsp+0D8h+var_38] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+0D8h+var_50] call JS_ToIndex cmp eax, 0 jz short loc_5924F mov dword ptr [rsp+0D8h+var_10], 0 mov [rsp+0D8h+var_8], 6 jmp loc_595DB loc_5924F: jmp short $+2 loc_59251: mov rax, [rsp+0D8h+var_48] cmp byte ptr [rax+8], 0 jz short loc_59281 mov rdi, [rsp+0D8h+var_28] call JS_ThrowTypeErrorDetachedArrayBuffer mov [rsp+0D8h+var_10], rax mov [rsp+0D8h+var_8], rdx jmp loc_595DB loc_59281: mov rax, [rsp+0D8h+var_50] mov rcx, [rsp+0D8h+var_48] movsxd rcx, dword ptr [rcx] cmp rax, rcx jbe short loc_592C4 mov rdi, [rsp+0D8h+var_28] lea rsi, aInvalidByteoff; "invalid byteOffset" mov al, 0 call JS_ThrowRangeError mov [rsp+0D8h+var_10], rax mov [rsp+0D8h+var_8], rdx jmp loc_595DB loc_592C4: mov rax, [rsp+0D8h+var_48] movsxd rax, dword ptr [rax] sub rax, [rsp+0D8h+var_50] mov [rsp+0D8h+var_54], eax cmp [rsp+0D8h+var_2C], 2 jle loc_59397 mov rax, [rsp+0D8h+var_38] mov rdi, [rax+20h] mov rsi, [rax+28h] call JS_IsUndefined_0 cmp eax, 0 jnz loc_59397 mov rdi, [rsp+0D8h+var_28] mov rax, [rsp+0D8h+var_38] mov rdx, [rax+20h] mov rcx, [rax+28h] lea rsi, [rsp+0D8h+var_90] call JS_ToIndex cmp eax, 0 jz short loc_5934D mov dword ptr [rsp+0D8h+var_10], 0 mov [rsp+0D8h+var_8], 6 jmp loc_595DB loc_5934D: mov rax, [rsp+0D8h+var_90] mov ecx, [rsp+0D8h+var_54] cmp rax, rcx jbe short loc_59389 mov rdi, [rsp+0D8h+var_28] lea rsi, aInvalidBytelen; "invalid byteLength" mov al, 0 call JS_ThrowRangeError mov [rsp+0D8h+var_10], rax mov [rsp+0D8h+var_8], rdx jmp loc_595DB loc_59389: mov rax, [rsp+0D8h+var_90] mov [rsp+0D8h+var_54], eax jmp short loc_593B6 loc_59397: mov [rsp+0D8h+var_3C], 1 mov rdi, [rsp+0D8h+var_48] call array_buffer_is_resizable mov [rsp+0D8h+var_40], eax loc_593B6: mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_20] mov rdx, [rsp+0D8h+var_18] mov ecx, 21h ; '!' call js_create_from_ctor mov [rsp+0D8h+var_A0], rax mov [rsp+0D8h+var_98], rdx mov rax, [rsp+0D8h+var_A0] mov [rsp+0D8h+var_78], rax mov rax, [rsp+0D8h+var_98] mov [rsp+0D8h+var_70], rax mov rdi, [rsp+0D8h+var_78] mov rsi, [rsp+0D8h+var_70] call JS_IsException_1 cmp eax, 0 jz short loc_59426 mov dword ptr [rsp+0D8h+var_10], 0 mov [rsp+0D8h+var_8], 6 jmp loc_595DB loc_59426: mov rax, [rsp+0D8h+var_48] cmp byte ptr [rax+8], 0 jz short loc_59450 mov rdi, [rsp+0D8h+var_28] call JS_ThrowTypeErrorDetachedArrayBuffer mov [rsp+0D8h+var_B0], rax mov [rsp+0D8h+var_A8], rdx jmp loc_594FB loc_59450: mov rax, [rsp+0D8h+var_50] mov rcx, [rsp+0D8h+var_48] movsxd rcx, dword ptr [rcx] cmp rax, rcx jbe short loc_5946A jmp short loc_594B4 loc_5946A: cmp [rsp+0D8h+var_3C], 0 jz short loc_59490 mov rax, [rsp+0D8h+var_48] movsxd rax, dword ptr [rax] sub rax, [rsp+0D8h+var_50] mov [rsp+0D8h+var_54], eax jmp short loc_594D8 loc_59490: mov rax, [rsp+0D8h+var_50] mov ecx, [rsp+0D8h+var_54] add rax, rcx mov rcx, [rsp+0D8h+var_48] movsxd rcx, dword ptr [rcx] cmp rax, rcx jbe short loc_594D6 jmp short $+2 loc_594B4: mov rdi, [rsp+0D8h+var_28] lea rsi, aInvalidByteoff_0; "invalid byteOffset or byteLength" mov al, 0 call JS_ThrowRangeError mov [rsp+0D8h+var_C0], rax mov [rsp+0D8h+var_B8], rdx jmp short loc_594FB loc_594D6: jmp short $+2 loc_594D8: jmp short $+2 loc_594DA: mov rdi, [rsp+0D8h+var_28] mov esi, 30h ; '0' call js_malloc mov [rsp+0D8h+var_80], rax cmp [rsp+0D8h+var_80], 0 jnz short loc_5952E jmp short $+2 loc_594FB: mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_78] mov rdx, [rsp+0D8h+var_70] call JS_FreeValue mov dword ptr [rsp+0D8h+var_10], 0 mov [rsp+0D8h+var_8], 6 jmp loc_595DB loc_5952E: mov rax, [rsp+0D8h+var_78] mov [rsp+0D8h+var_88], rax mov rcx, [rsp+0D8h+var_88] mov rax, [rsp+0D8h+var_80] mov [rax+10h], rcx mov rdi, [rsp+0D8h+var_68] mov rsi, [rsp+0D8h+var_60] call js_dup mov [rsp+0D8h+var_D0], rax mov [rsp+0D8h+var_C8], rdx mov rcx, [rsp+0D8h+var_D0] mov rax, [rsp+0D8h+var_80] mov [rax+18h], rcx mov rax, [rsp+0D8h+var_50] mov ecx, eax mov rax, [rsp+0D8h+var_80] mov [rax+20h], ecx mov ecx, [rsp+0D8h+var_54] mov rax, [rsp+0D8h+var_80] mov [rax+24h], ecx mov ecx, [rsp+0D8h+var_40] mov rax, [rsp+0D8h+var_80] mov [rax+28h], ecx mov rdi, [rsp+0D8h+var_80] mov rsi, [rsp+0D8h+var_48] add rsi, 18h call list_add_tail_0 mov rcx, [rsp+0D8h+var_80] mov rax, [rsp+0D8h+var_88] mov [rax+30h], rcx mov rax, [rsp+0D8h+var_78] mov [rsp+0D8h+var_10], rax mov rax, [rsp+0D8h+var_70] mov [rsp+0D8h+var_8], rax loc_595DB: mov rax, [rsp+0D8h+var_10] mov rdx, [rsp+0D8h+var_8] add rsp, 0D8h retn
long long js_dataview_constructor( long long a1, long long a2, long long a3, int a4, long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { unsigned long long *v13; // rsi long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 long long v20; // rdx unsigned long long v21; // rcx long long v22; // rdx double v23; // xmm4_8 double v24; // xmm5_8 long long v25; // rdx long long v26; // r8 long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rdx long long v31; // rdx long long v32; // rsi long long v33; // rdx long long v34; // rcx long long v35; // r8 long long v36; // r9 __m128 v37; // xmm4 __m128 v38; // xmm5 unsigned long long v39; // rcx char v41; // [rsp+0h] [rbp-D8h] _DWORD *v42; // [rsp+8h] [rbp-D0h] unsigned long long v43; // [rsp+48h] [rbp-90h] BYREF long long v44; // [rsp+50h] [rbp-88h] long long v45; // [rsp+58h] [rbp-80h] long long v46; // [rsp+60h] [rbp-78h] long long v47; // [rsp+68h] [rbp-70h] unsigned long long *v48; // [rsp+70h] [rbp-68h] long long v49; // [rsp+78h] [rbp-60h] unsigned int v50; // [rsp+84h] [rbp-54h] unsigned long long v51; // [rsp+88h] [rbp-50h] BYREF int *array_buffer; // [rsp+90h] [rbp-48h] int is_resizable; // [rsp+98h] [rbp-40h] int v54; // [rsp+9Ch] [rbp-3Ch] long long v55; // [rsp+A0h] [rbp-38h] int v56; // [rsp+ACh] [rbp-2Ch] long long v57; // [rsp+B0h] [rbp-28h] long long v58; // [rsp+B8h] [rbp-20h] long long v59; // [rsp+C0h] [rbp-18h] long long v60; // [rsp+C8h] [rbp-10h] long long v61; // [rsp+D0h] [rbp-8h] v58 = a2; v59 = a3; v57 = a1; v56 = a4; v55 = a5; v54 = 0; is_resizable = 0; v48 = *(unsigned long long **)a5; v49 = *(_QWORD *)(a5 + 8); v13 = v48; array_buffer = (int *)js_get_array_buffer(a1, (long long)v48, v49); if ( array_buffer ) { v51 = 0LL; if ( v56 > 1 ) { v13 = &v51; if ( (unsigned int)JS_ToIndex( v57, &v51, *(_DWORD **)(v55 + 16), *(_QWORD *)(v55 + 24), a6, a7, a8, a9, *(double *)v18.m128_u64, *(double *)v19.m128_u64, a12, a13) ) { LODWORD(v60) = 0; v61 = 6LL; return v60; } } if ( *((_BYTE *)array_buffer + 8) ) { v60 = JS_ThrowTypeErrorDetachedArrayBuffer( v57, a6, a7, a8, a9, v18, v19, a12, a13, (long long)v13, v14, v15, v16, v17); v61 = v20; return v60; } v21 = *array_buffer; if ( v51 > v21 ) { v60 = JS_ThrowRangeError( v57, (long long)"invalid byteOffset", v14, v21, v16, v17, a6, a7, a8, a9, v18, v19, a12, a13, v41); v61 = v22; return v60; } v50 = *array_buffer - v51; if ( v56 <= 2 || JS_IsUndefined_0(*(_QWORD *)(v55 + 32), *(_QWORD *)(v55 + 40)) ) { v54 = 1; is_resizable = array_buffer_is_resizable(array_buffer); } else { if ( (unsigned int)JS_ToIndex( v57, &v43, *(_DWORD **)(v55 + 32), *(_QWORD *)(v55 + 40), a6, a7, a8, a9, v23, v24, a12, a13) ) { LODWORD(v60) = 0; v61 = 6LL; return v60; } if ( v43 > v50 ) { v60 = JS_ThrowRangeError( v57, (long long)"invalid byteLength", v25, v50, v26, v27, a6, a7, a8, a9, v28, v29, a12, a13, v41); v61 = v30; return v60; } v50 = v43; } v46 = js_create_from_ctor(v57, v58, v59, 33); v47 = v31; v32 = v31; if ( JS_IsException_1(v46, v31) ) { LODWORD(v60) = 0; v61 = 6LL; return v60; } if ( *((_BYTE *)array_buffer + 8) ) { JS_ThrowTypeErrorDetachedArrayBuffer(v57, a6, a7, a8, a9, v37, v38, a12, a13, v32, v33, v34, v35, v36); LABEL_28: JS_FreeValue(v57, v46, v47); LODWORD(v60) = 0; v61 = 6LL; return v60; } v39 = *array_buffer; if ( v51 <= v39 ) { if ( v54 ) { v50 = *array_buffer - v51; goto LABEL_27; } v39 = *array_buffer; if ( v50 + v51 <= v39 ) { LABEL_27: v45 = js_malloc(v57, 48LL); if ( v45 ) { v44 = v46; *(_QWORD *)(v45 + 16) = v46; v42 = js_dup(v48, v49); *(_QWORD *)(v45 + 24) = v42; *(_DWORD *)(v45 + 32) = v51; *(_DWORD *)(v45 + 36) = v50; *(_DWORD *)(v45 + 40) = is_resizable; list_add_tail_0(v45, (_QWORD *)array_buffer + 3); *(_QWORD *)(v44 + 48) = v45; v60 = v46; v61 = v47; return v60; } goto LABEL_28; } } JS_ThrowRangeError( v57, (long long)"invalid byteOffset or byteLength", v33, v39, v35, v36, a6, a7, a8, a9, v37, v38, a12, a13, v41); goto LABEL_28; } LODWORD(v60) = 0; v61 = 6LL; return v60; }
js_dataview_constructor: SUB RSP,0xd8 MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xc0],RDX MOV qword ptr [RSP + 0xb0],RDI MOV dword ptr [RSP + 0xac],ECX MOV qword ptr [RSP + 0xa0],R8 MOV dword ptr [RSP + 0x9c],0x0 MOV dword ptr [RSP + 0x98],0x0 MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x70],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x001580b0 MOV qword ptr [RSP + 0x90],RAX CMP qword ptr [RSP + 0x90],0x0 JNZ 0x001591f3 MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x6 JMP 0x001595db LAB_001591f3: MOV qword ptr [RSP + 0x88],0x0 CMP dword ptr [RSP + 0xac],0x1 JLE 0x00159251 MOV RDI,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x88] CALL 0x00139140 CMP EAX,0x0 JZ 0x0015924f MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x6 JMP 0x001595db LAB_0015924f: JMP 0x00159251 LAB_00159251: MOV RAX,qword ptr [RSP + 0x90] CMP byte ptr [RAX + 0x8],0x0 JZ 0x00159281 MOV RDI,qword ptr [RSP + 0xb0] CALL 0x00158140 MOV qword ptr [RSP + 0xc8],RAX MOV qword ptr [RSP + 0xd0],RDX JMP 0x001595db LAB_00159281: MOV RAX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x90] MOVSXD RCX,dword ptr [RCX] CMP RAX,RCX JBE 0x001592c4 MOV RDI,qword ptr [RSP + 0xb0] LEA RSI,[0x2117e0] MOV AL,0x0 CALL 0x00129670 MOV qword ptr [RSP + 0xc8],RAX MOV qword ptr [RSP + 0xd0],RDX JMP 0x001595db LAB_001592c4: MOV RAX,qword ptr [RSP + 0x90] MOVSXD RAX,dword ptr [RAX] SUB RAX,qword ptr [RSP + 0x88] MOV dword ptr [RSP + 0x84],EAX CMP dword ptr [RSP + 0xac],0x2 JLE 0x00159397 MOV RAX,qword ptr [RSP + 0xa0] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RAX + 0x28] CALL 0x0012e260 CMP EAX,0x0 JNZ 0x00159397 MOV RDI,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x28] LEA RSI,[RSP + 0x48] CALL 0x00139140 CMP EAX,0x0 JZ 0x0015934d MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x6 JMP 0x001595db LAB_0015934d: MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x84] CMP RAX,RCX JBE 0x00159389 MOV RDI,qword ptr [RSP + 0xb0] LEA RSI,[0x2117f3] MOV AL,0x0 CALL 0x00129670 MOV qword ptr [RSP + 0xc8],RAX MOV qword ptr [RSP + 0xd0],RDX JMP 0x001595db LAB_00159389: MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x84],EAX JMP 0x001593b6 LAB_00159397: MOV dword ptr [RSP + 0x9c],0x1 MOV RDI,qword ptr [RSP + 0x90] CALL 0x001da610 MOV dword ptr [RSP + 0x98],EAX LAB_001593b6: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] MOV ECX,0x21 CALL 0x00154e00 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00159426 MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x6 JMP 0x001595db LAB_00159426: MOV RAX,qword ptr [RSP + 0x90] CMP byte ptr [RAX + 0x8],0x0 JZ 0x00159450 MOV RDI,qword ptr [RSP + 0xb0] CALL 0x00158140 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX JMP 0x001594fb LAB_00159450: MOV RAX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x90] MOVSXD RCX,dword ptr [RCX] CMP RAX,RCX JBE 0x0015946a JMP 0x001594b4 LAB_0015946a: CMP dword ptr [RSP + 0x9c],0x0 JZ 0x00159490 MOV RAX,qword ptr [RSP + 0x90] MOVSXD RAX,dword ptr [RAX] SUB RAX,qword ptr [RSP + 0x88] MOV dword ptr [RSP + 0x84],EAX JMP 0x001594d8 LAB_00159490: MOV RAX,qword ptr [RSP + 0x88] MOV ECX,dword ptr [RSP + 0x84] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x90] MOVSXD RCX,dword ptr [RCX] CMP RAX,RCX JBE 0x001594d6 JMP 0x001594b4 LAB_001594b4: MOV RDI,qword ptr [RSP + 0xb0] LEA RSI,[0x211806] MOV AL,0x0 CALL 0x00129670 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX JMP 0x001594fb LAB_001594d6: JMP 0x001594d8 LAB_001594d8: JMP 0x001594da LAB_001594da: MOV RDI,qword ptr [RSP + 0xb0] MOV ESI,0x30 CALL 0x00121cb0 MOV qword ptr [RSP + 0x58],RAX CMP qword ptr [RSP + 0x58],0x0 JNZ 0x0015952e JMP 0x001594fb LAB_001594fb: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x6 JMP 0x001595db LAB_0015952e: MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x50],RAX MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x001216d0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + 0x88] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x20],ECX MOV ECX,dword ptr [RSP + 0x84] MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x24],ECX MOV ECX,dword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX + 0x28],ECX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x90] ADD RSI,0x18 CALL 0x00123a50 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xc8],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xd0],RAX LAB_001595db: MOV RAX,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] ADD RSP,0xd8 RET
int1 [16] js_dataview_constructor (int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5) { int iVar1; int8 uVar2; int1 auVar3 [16]; ulong local_90; long local_88; long local_80; int1 local_78 [16]; int8 local_68; int8 local_60; uint local_54; ulong local_50; int *local_48; int4 local_40; int local_3c; int8 *local_38; int local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_3c = 0; local_40 = 0; local_68 = *param_5; local_60 = param_5[1]; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_48 = (int *)js_get_array_buffer(param_1,local_68,local_60); if (local_48 == (int *)0x0) { local_10 = 0; local_8 = 6; goto LAB_001595db; } local_50 = 0; if ((1 < local_2c) && (iVar1 = JS_ToIndex(local_28,&local_50,local_38[2],local_38[3]), iVar1 != 0) ) { local_10 = 0; local_8 = 6; goto LAB_001595db; } if ((char)local_48[2] != '\0') { auVar3 = JS_ThrowTypeErrorDetachedArrayBuffer(local_28); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; goto LAB_001595db; } if ((ulong)(long)*local_48 < local_50) { auVar3 = JS_ThrowRangeError(local_28,"invalid byteOffset"); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; goto LAB_001595db; } local_54 = *local_48 - (int)local_50; if ((local_2c < 3) || (iVar1 = JS_IsUndefined(local_38[4],local_38[5]), iVar1 != 0)) { local_3c = 1; local_40 = array_buffer_is_resizable(local_48); } else { iVar1 = JS_ToIndex(local_28,&local_90,local_38[4],local_38[5]); if (iVar1 != 0) { local_10 = 0; local_8 = 6; goto LAB_001595db; } if (local_54 < local_90) { auVar3 = JS_ThrowRangeError(local_28,"invalid byteLength"); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; goto LAB_001595db; } local_54 = (uint)local_90; } local_78 = js_create_from_ctor(local_28,local_20,local_18,0x21); iVar1 = JS_IsException(local_78._0_8_,local_78._8_8_); if (iVar1 != 0) { local_10 = 0; local_8 = 6; goto LAB_001595db; } if ((char)local_48[2] == '\0') { if ((ulong)(long)*local_48 < local_50) { LAB_001594b4: JS_ThrowRangeError(local_28,"invalid byteOffset or byteLength"); } else { if (local_3c == 0) { if ((ulong)(long)*local_48 < local_50 + local_54) goto LAB_001594b4; } else { local_54 = *local_48 - (int)local_50; } local_80 = js_malloc(local_28,0x30); if (local_80 != 0) { local_88 = local_78._0_8_; *(int8 *)(local_80 + 0x10) = local_78._0_8_; uVar2 = js_dup(local_68,local_60); *(int8 *)(local_80 + 0x18) = uVar2; *(int *)(local_80 + 0x20) = (int)local_50; *(uint *)(local_80 + 0x24) = local_54; *(int4 *)(local_80 + 0x28) = local_40; list_add_tail(local_80,local_48 + 6); *(long *)(local_88 + 0x30) = local_80; local_10 = local_78._0_4_; uStack_c = local_78._4_4_; local_8 = local_78._8_8_; goto LAB_001595db; } local_80 = 0; } } else { JS_ThrowTypeErrorDetachedArrayBuffer(local_28); } JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); local_10 = 0; local_8 = 6; LAB_001595db: auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
48,415
js_dataview_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { BOOL recompute_len = FALSE; BOOL track_rab = FALSE; JSArrayBuffer *abuf; uint64_t offset; uint32_t len; JSValue buffer; JSValue obj; JSTypedArray *ta; JSObject *p; buffer = argv[0]; abuf = js_get_array_buffer(ctx, buffer); if (!abuf) return JS_EXCEPTION; offset = 0; if (argc > 1) { if (JS_ToIndex(ctx, &offset, argv[1])) return JS_EXCEPTION; } if (abuf->detached) return JS_ThrowTypeErrorDetachedArrayBuffer(ctx); if (offset > abuf->byte_length) return JS_ThrowRangeError(ctx, "invalid byteOffset"); len = abuf->byte_length - offset; if (argc > 2 && !JS_IsUndefined(argv[2])) { uint64_t l; if (JS_ToIndex(ctx, &l, argv[2])) return JS_EXCEPTION; if (l > len) return JS_ThrowRangeError(ctx, "invalid byteLength"); len = l; } else { recompute_len = TRUE; track_rab = array_buffer_is_resizable(abuf); } obj = js_create_from_ctor(ctx, new_target, JS_CLASS_DATAVIEW); if (JS_IsException(obj)) return JS_EXCEPTION; if (abuf->detached) { /* could have been detached in js_create_from_ctor() */ JS_ThrowTypeErrorDetachedArrayBuffer(ctx); goto fail; } // RAB could have been resized in js_create_from_ctor() if (offset > abuf->byte_length) { goto out_of_bound; } else if (recompute_len) { len = abuf->byte_length - offset; } else if (offset + len > abuf->byte_length) { out_of_bound: JS_ThrowRangeError(ctx, "invalid byteOffset or byteLength"); goto fail; } ta = js_malloc(ctx, sizeof(*ta)); if (!ta) { fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; } p = JS_VALUE_GET_OBJ(obj); ta->obj = p; ta->buffer = JS_VALUE_GET_OBJ(js_dup(buffer)); ta->offset = offset; ta->length = len; ta->track_rab = track_rab; list_add_tail(&ta->link, &abuf->array_list); p->u.typed_array = ta; return obj; }
O1
c
js_dataview_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %rbp movl %ecx, %ebx movq %rdx, 0x8(%rsp) movq %rsi, 0x30(%rsp) movq %rdi, %r14 movq (%r8), %r12 movq 0x8(%r8), %r13 movq %r12, %rsi movq %r13, %rdx callq 0x38fcf movl $0x6, %edx testq %rax, %rax je 0x399f8 movq %rax, %r15 movq $0x0, 0x28(%rsp) cmpl $0x2, %ebx jl 0x399ff movq 0x10(%rbp), %rdx movq 0x18(%rbp), %rcx leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x27a6f movl $0x6, %edx testl %eax, %eax je 0x399ff xorl %ebp, %ebp jmp 0x39b4e cmpb $0x0, 0x8(%r15) je 0x39a1e leaq 0x689ec(%rip), %rsi # 0xa23f9 xorl %ebp, %ebp movq %r14, %rdi xorl %eax, %eax callq 0x22567 jmp 0x39b49 movq 0x28(%rsp), %rax movslq (%r15), %rdx cmpq %rdx, %rax jbe 0x39a43 leaq 0x68d33(%rip), %rsi # 0xa2765 xorl %ebp, %ebp movq %r14, %rdi xorl %eax, %eax callq 0x20add jmp 0x39b49 subl %eax, %edx cmpl $0x3, %ebx movq %rax, 0x18(%rsp) jl 0x39a58 movq 0x28(%rbp), %rcx cmpl $0x3, %ecx jne 0x39ab1 movq %rdx, (%rsp) movl 0x4(%r15), %ebp notl %ebp shrl $0x1f, %ebp xorl %ebx, %ebx movq %r14, %rdi movq 0x30(%rsp), %rsi movq 0x8(%rsp), %rdx movl $0x21, %ecx callq 0x36d56 movq %rax, 0x20(%rsp) cmpl $0x6, %edx je 0x39b47 movq %rax, 0x8(%rsp) cmpb $0x0, 0x8(%r15) je 0x39b03 movq %rdx, %rbx leaq 0x68957(%rip), %rsi # 0xa23f9 movq %r14, %rdi xorl %eax, %eax callq 0x22567 jmp 0x39b36 movq %rdx, %rbx movq 0x20(%rbp), %rdx leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x27a6f xorl %ebp, %ebp testl %eax, %eax jne 0x39aef movq 0x10(%rsp), %rax movq %rbx, %rcx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x39b60 leaq 0x68c93(%rip), %rsi # 0xa2778 movq %r14, %rdi xorl %eax, %eax callq 0x20add xorl %ecx, %ecx movq %rbx, %rax movb $0x1, %bl testb %cl, %cl je 0x39b49 movq %rax, (%rsp) jmp 0x39a67 movslq (%r15), %rax movq 0x18(%rsp), %rsi cmpq %rax, %rsi ja 0x39b22 testb %bl, %bl je 0x39b64 movl (%rsp), %ecx movq %rsi, %rdi addq %rcx, %rdi cmpq %rax, %rdi jbe 0x39b6a movq %rdx, %rbx leaq 0x68c5f(%rip), %rsi # 0xa278b movq %r14, %rdi xorl %eax, %eax callq 0x20add movq 0x18(%r14), %rdi movq 0x8(%rsp), %rsi movq %rbx, %rdx callq 0x1d8c6 xorl %ebp, %ebp movl $0x6, %edx movq %rbp, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb $0x1, %cl jmp 0x39af4 subl %esi, %eax movq %rax, (%rsp) movq %rdx, %rbx movl $0x30, %esi movq %r14, %rdi callq 0xede6 testq %rax, %rax je 0x39b36 movq 0x20(%rsp), %rcx movq %rcx, 0x10(%rax) movq %r12, 0x10(%rsp) cmpl $-0x9, %r13d jb 0x39b9a movq 0x10(%rsp), %rdx incl (%rdx) movq %r12, 0x18(%rax) movq 0x18(%rsp), %rdx movl %edx, 0x20(%rax) movq (%rsp), %rdx movl %edx, 0x24(%rax) movl %ebp, 0x28(%rax) movq %r15, %rdx addq $0x18, %rdx movq 0x18(%r15), %rsi movq %rax, 0x8(%rsi) movq %rsi, (%rax) movq %rdx, 0x8(%rax) movq %rax, 0x18(%r15) movq %rax, 0x30(%rcx) movq 0x20(%rsp), %rbp movq %rbx, %rdx jmp 0x39b4e
js_dataview_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbp, r8 mov ebx, ecx mov [rsp+68h+var_60], rdx mov [rsp+68h+var_38], rsi mov r14, rdi mov r12, [r8] mov r13, [r8+8] mov rsi, r12 mov rdx, r13 call js_get_array_buffer mov edx, 6 test rax, rax jz short loc_399F8 mov r15, rax mov [rsp+68h+var_40], 0 cmp ebx, 2 jl short loc_399FF mov rdx, [rbp+10h] mov rcx, [rbp+18h] lea rsi, [rsp+68h+var_40] mov rdi, r14 call JS_ToIndex mov edx, 6 test eax, eax jz short loc_399FF loc_399F8: xor ebp, ebp jmp loc_39B4E loc_399FF: cmp byte ptr [r15+8], 0 jz short loc_39A1E lea rsi, aArraybufferIsD; "ArrayBuffer is detached" xor ebp, ebp mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp loc_39B49 loc_39A1E: mov rax, [rsp+68h+var_40] movsxd rdx, dword ptr [r15] cmp rax, rdx jbe short loc_39A43 lea rsi, aInvalidByteoff; "invalid byteOffset" xor ebp, ebp mov rdi, r14 xor eax, eax call JS_ThrowRangeError jmp loc_39B49 loc_39A43: sub edx, eax cmp ebx, 3 mov [rsp+68h+var_50], rax jl short loc_39A58 mov rcx, [rbp+28h] cmp ecx, 3 jnz short loc_39AB1 loc_39A58: mov [rsp+68h+var_68], rdx mov ebp, [r15+4] not ebp shr ebp, 1Fh xor ebx, ebx loc_39A67: mov rdi, r14 mov rsi, [rsp+68h+var_38] mov rdx, [rsp+68h+var_60] mov ecx, 21h ; '!' call js_create_from_ctor mov [rsp+68h+var_48], rax cmp edx, 6 jz loc_39B47 mov [rsp+68h+var_60], rax cmp byte ptr [r15+8], 0 jz short loc_39B03 mov rbx, rdx lea rsi, aArraybufferIsD; "ArrayBuffer is detached" mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp loc_39B36 loc_39AB1: mov rbx, rdx mov rdx, [rbp+20h] lea rsi, [rsp+68h+var_58] mov rdi, r14 call JS_ToIndex xor ebp, ebp test eax, eax jnz short loc_39AEF mov rax, [rsp+68h+var_58] mov rcx, rbx mov ecx, ecx cmp rax, rcx jbe loc_39B60 lea rsi, aInvalidBytelen; "invalid byteLength" mov rdi, r14 xor eax, eax call JS_ThrowRangeError loc_39AEF: xor ecx, ecx mov rax, rbx loc_39AF4: mov bl, 1 test cl, cl jz short loc_39B49 mov [rsp+68h+var_68], rax jmp loc_39A67 loc_39B03: movsxd rax, dword ptr [r15] mov rsi, [rsp+68h+var_50] cmp rsi, rax ja short loc_39B22 test bl, bl jz short loc_39B64 mov ecx, dword ptr [rsp+68h+var_68] mov rdi, rsi add rdi, rcx cmp rdi, rax jbe short loc_39B6A loc_39B22: mov rbx, rdx lea rsi, aInvalidByteoff_0; "invalid byteOffset or byteLength" mov rdi, r14 xor eax, eax call JS_ThrowRangeError loc_39B36: mov rdi, [r14+18h] mov rsi, [rsp+68h+var_60] mov rdx, rbx call JS_FreeValueRT loc_39B47: xor ebp, ebp loc_39B49: mov edx, 6 loc_39B4E: mov rax, rbp add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39B60: mov cl, 1 jmp short loc_39AF4 loc_39B64: sub eax, esi mov [rsp+68h+var_68], rax loc_39B6A: mov rbx, rdx mov esi, 30h ; '0' mov rdi, r14 call js_malloc test rax, rax jz short loc_39B36 mov rcx, [rsp+68h+var_48] mov [rax+10h], rcx mov [rsp+68h+var_58], r12 cmp r13d, 0FFFFFFF7h jb short loc_39B9A mov rdx, [rsp+68h+var_58] inc dword ptr [rdx] loc_39B9A: mov [rax+18h], r12 mov rdx, [rsp+68h+var_50] mov [rax+20h], edx mov rdx, [rsp+68h+var_68] mov [rax+24h], edx mov [rax+28h], ebp mov rdx, r15 add rdx, 18h mov rsi, [r15+18h] mov [rsi+8], rax mov [rax], rsi mov [rax+8], rdx mov [r15+18h], rax mov [rcx+30h], rax mov rbp, [rsp+68h+var_48] mov rdx, rbx jmp loc_39B4E
unsigned long long js_dataview_constructor( long long a1, long long a2, long long a3, int a4, long long *a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { _DWORD *v15; // r12 long long v16; // r13 long long array_buffer; // rax long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 int *v23; // r15 long long v24; // rbp unsigned long long v25; // rdx unsigned int v26; // edx long long v27; // rcx char v28; // bl unsigned long long v29; // rax long long v30; // rdx long long v31; // rcx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 long long v36; // rbx unsigned int v37; // ebx int v38; // eax long long v39; // rdx long long v40; // r8 long long v41; // r9 __m128 v42; // xmm4 __m128 v43; // xmm5 unsigned int v44; // eax char v45; // cl unsigned long long v46; // rax long long v48; // rax unsigned long long v49; // rcx long long v50; // rsi char v51; // [rsp+0h] [rbp-68h] unsigned int v52; // [rsp+0h] [rbp-68h] _DWORD *v54; // [rsp+8h] [rbp-60h] _DWORD *v55; // [rsp+10h] [rbp-58h] BYREF unsigned long long v56; // [rsp+18h] [rbp-50h] unsigned long long v57; // [rsp+20h] [rbp-48h] unsigned long long v58; // [rsp+28h] [rbp-40h] BYREF long long v59; // [rsp+30h] [rbp-38h] v59 = a2; v15 = (_DWORD *)*a5; v16 = a5[1]; array_buffer = js_get_array_buffer(a1, *a5, v16, a6, a7, a8, a9, a10, a11, a12, a13); if ( !array_buffer ) return 0LL; v23 = (int *)array_buffer; v58 = 0LL; if ( a4 >= 2 ) { if ( (unsigned int)JS_ToIndex( a1, &v58, a5[2], a5[3], a6, a7, a8, a9, *(double *)v21.m128_u64, *(double *)v22.m128_u64, a12, a13) ) return 0LL; } if ( *((_BYTE *)v23 + 8) ) { v24 = 0LL; JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached", 6LL, v18, v19, v20, a6, a7, a8, a9, v21, v22, a12, a13, v51); return v24; } v25 = *v23; if ( v58 > v25 ) { v24 = 0LL; JS_ThrowRangeError(a1, (long long)"invalid byteOffset", v25, v18, v19, v20, a6, a7, a8, a9, v21, v22, a12, a13, v51); return v24; } v26 = v25 - v58; v56 = v58; if ( a4 < 3 || (v27 = a5[5], (_DWORD)v27 == 3) ) { v52 = v26; LODWORD(v24) = v23[1] >= 0; v28 = 0; goto LABEL_12; } v37 = v26; v38 = JS_ToIndex( a1, (unsigned long long *)&v55, a5[4], v27, a6, a7, a8, a9, *(double *)v21.m128_u64, *(double *)v22.m128_u64, a12, a13); v24 = 0LL; if ( !v38 ) { v44 = (unsigned int)v55; if ( (unsigned long long)v55 <= v37 ) { v45 = 1; goto LABEL_19; } JS_ThrowRangeError(a1, (long long)"invalid byteLength", v39, v37, v40, v41, a6, a7, a8, a9, v42, v43, a12, a13, v51); } v45 = 0; v44 = v37; LABEL_19: v28 = 1; if ( !v45 ) return v24; v52 = v44; LABEL_12: v29 = js_create_from_ctor(a1, v59, a3, 33); v57 = v29; if ( (_DWORD)v30 == 6 ) return 0LL; v54 = (_DWORD *)v29; if ( *((_BYTE *)v23 + 8) ) { v36 = v30; JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached", v30, v31, v32, v33, a6, a7, a8, a9, v34, v35, a12, a13, v52); LABEL_25: JS_FreeValueRT(*(_QWORD *)(a1 + 24), v54, v36); return 0LL; } v46 = *v23; if ( v56 > v46 ) { LABEL_24: v36 = v30; JS_ThrowRangeError( a1, (long long)"invalid byteOffset or byteLength", v30, v31, v32, v33, a6, a7, a8, a9, v34, v35, a12, a13, v52); goto LABEL_25; } if ( v28 ) { v31 = v52; if ( v52 + v56 > v46 ) goto LABEL_24; } else { v52 = v46 - v56; } v36 = v30; v48 = js_malloc(a1, 48LL); if ( !v48 ) goto LABEL_25; v49 = v57; *(_QWORD *)(v48 + 16) = v57; v55 = v15; if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*v55; *(_QWORD *)(v48 + 24) = v15; *(_DWORD *)(v48 + 32) = v56; *(_DWORD *)(v48 + 36) = v52; *(_DWORD *)(v48 + 40) = v24; v50 = *((_QWORD *)v23 + 3); *(_QWORD *)(v50 + 8) = v48; *(_QWORD *)v48 = v50; *(_QWORD *)(v48 + 8) = v23 + 6; *((_QWORD *)v23 + 3) = v48; *(_QWORD *)(v49 + 48) = v48; return v57; }
js_dataview_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBP,R8 MOV EBX,ECX MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x30],RSI MOV R14,RDI MOV R12,qword ptr [R8] MOV R13,qword ptr [R8 + 0x8] MOV RSI,R12 MOV RDX,R13 CALL 0x00138fcf MOV EDX,0x6 TEST RAX,RAX JZ 0x001399f8 MOV R15,RAX MOV qword ptr [RSP + 0x28],0x0 CMP EBX,0x2 JL 0x001399ff MOV RDX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RBP + 0x18] LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x00127a6f MOV EDX,0x6 TEST EAX,EAX JZ 0x001399ff LAB_001399f8: XOR EBP,EBP JMP 0x00139b4e LAB_001399ff: CMP byte ptr [R15 + 0x8],0x0 JZ 0x00139a1e LEA RSI,[0x1a23f9] XOR EBP,EBP MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 JMP 0x00139b49 LAB_00139a1e: MOV RAX,qword ptr [RSP + 0x28] MOVSXD RDX,dword ptr [R15] CMP RAX,RDX JBE 0x00139a43 LEA RSI,[0x1a2765] XOR EBP,EBP MOV RDI,R14 XOR EAX,EAX CALL 0x00120add JMP 0x00139b49 LAB_00139a43: SUB EDX,EAX CMP EBX,0x3 MOV qword ptr [RSP + 0x18],RAX JL 0x00139a58 MOV RCX,qword ptr [RBP + 0x28] CMP ECX,0x3 JNZ 0x00139ab1 LAB_00139a58: MOV qword ptr [RSP],RDX MOV EBP,dword ptr [R15 + 0x4] NOT EBP SHR EBP,0x1f XOR EBX,EBX LAB_00139a67: MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x8] MOV ECX,0x21 CALL 0x00136d56 MOV qword ptr [RSP + 0x20],RAX CMP EDX,0x6 JZ 0x00139b47 MOV qword ptr [RSP + 0x8],RAX CMP byte ptr [R15 + 0x8],0x0 JZ 0x00139b03 MOV RBX,RDX LEA RSI,[0x1a23f9] MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 JMP 0x00139b36 LAB_00139ab1: MOV RBX,RDX MOV RDX,qword ptr [RBP + 0x20] LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x00127a6f XOR EBP,EBP TEST EAX,EAX JNZ 0x00139aef MOV RAX,qword ptr [RSP + 0x10] MOV RCX,RBX MOV ECX,ECX CMP RAX,RCX JBE 0x00139b60 LEA RSI,[0x1a2778] MOV RDI,R14 XOR EAX,EAX CALL 0x00120add LAB_00139aef: XOR ECX,ECX MOV RAX,RBX LAB_00139af4: MOV BL,0x1 TEST CL,CL JZ 0x00139b49 MOV qword ptr [RSP],RAX JMP 0x00139a67 LAB_00139b03: MOVSXD RAX,dword ptr [R15] MOV RSI,qword ptr [RSP + 0x18] CMP RSI,RAX JA 0x00139b22 TEST BL,BL JZ 0x00139b64 MOV ECX,dword ptr [RSP] MOV RDI,RSI ADD RDI,RCX CMP RDI,RAX JBE 0x00139b6a LAB_00139b22: MOV RBX,RDX LEA RSI,[0x1a278b] MOV RDI,R14 XOR EAX,EAX CALL 0x00120add LAB_00139b36: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RBX CALL 0x0011d8c6 LAB_00139b47: XOR EBP,EBP LAB_00139b49: MOV EDX,0x6 LAB_00139b4e: MOV RAX,RBP ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00139b60: MOV CL,0x1 JMP 0x00139af4 LAB_00139b64: SUB EAX,ESI MOV qword ptr [RSP],RAX LAB_00139b6a: MOV RBX,RDX MOV ESI,0x30 MOV RDI,R14 CALL 0x0010ede6 TEST RAX,RAX JZ 0x00139b36 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RSP + 0x10],R12 CMP R13D,-0x9 JC 0x00139b9a MOV RDX,qword ptr [RSP + 0x10] INC dword ptr [RDX] LAB_00139b9a: MOV qword ptr [RAX + 0x18],R12 MOV RDX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x20],EDX MOV RDX,qword ptr [RSP] MOV dword ptr [RAX + 0x24],EDX MOV dword ptr [RAX + 0x28],EBP MOV RDX,R15 ADD RDX,0x18 MOV RSI,qword ptr [R15 + 0x18] MOV qword ptr [RSI + 0x8],RAX MOV qword ptr [RAX],RSI MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [R15 + 0x18],RAX MOV qword ptr [RCX + 0x30],RAX MOV RBP,qword ptr [RSP + 0x20] MOV RDX,RBX JMP 0x00139b4e
int1 [16] js_dataview_constructor (long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5) { int *piVar1; int8 uVar2; bool bVar3; bool bVar4; int iVar5; int *piVar6; long lVar7; long *plVar8; uint uVar9; int8 uVar10; uint uVar11; int1 auVar12 [16]; ulong local_68; ulong local_58; ulong local_50; long local_48; ulong local_40; int8 local_38; piVar1 = (int *)*param_5; uVar2 = param_5[1]; local_38 = param_2; piVar6 = (int *)js_get_array_buffer(param_1,piVar1,uVar2); if ((piVar6 == (int *)0x0) || ((local_40 = 0, 1 < param_4 && (iVar5 = JS_ToIndex(param_1,&local_40,param_5[2],param_5[3]), iVar5 != 0)))) { uVar10 = 6; local_48 = 0; goto LAB_00139b4e; } if ((char)piVar6[2] == '\0') { if ((ulong)(long)*piVar6 < local_40) { JS_ThrowRangeError(param_1,"invalid byteOffset"); } else { uVar9 = *piVar6 - (int)local_40; local_68 = (ulong)uVar9; local_50 = local_40; if ((param_4 < 3) || ((int)param_5[5] == 3)) { uVar11 = (uint)~piVar6[1] >> 0x1f; bVar4 = false; } else { iVar5 = JS_ToIndex(param_1,&local_58,param_5[4]); uVar11 = 0; if (iVar5 == 0) { if (uVar9 < local_58) { JS_ThrowRangeError(param_1,"invalid byteLength"); goto LAB_00139aef; } bVar3 = true; } else { LAB_00139aef: bVar3 = false; local_58 = local_68; } bVar4 = true; local_68 = local_58; if (!bVar3) goto LAB_00139b49; } auVar12 = js_create_from_ctor(param_1,local_38,param_3,0x21); uVar10 = auVar12._8_8_; lVar7 = auVar12._0_8_; if (auVar12._8_4_ != 6) { local_48 = lVar7; if ((char)piVar6[2] == '\0') { iVar5 = *piVar6; if ((ulong)(long)iVar5 < local_50) { LAB_00139b22: JS_ThrowRangeError(param_1,"invalid byteOffset or byteLength"); } else { if (bVar4) { if ((ulong)(long)iVar5 < local_50 + (local_68 & 0xffffffff)) goto LAB_00139b22; } else { local_68._0_4_ = iVar5 - (int)local_50; } plVar8 = (long *)js_malloc(param_1,0x30); if (plVar8 != (long *)0x0) { plVar8[2] = local_48; if (0xfffffff6 < (uint)uVar2) { *piVar1 = *piVar1 + 1; } plVar8[3] = (long)piVar1; *(int *)(plVar8 + 4) = (int)local_50; *(int *)((long)plVar8 + 0x24) = (int)local_68; *(uint *)(plVar8 + 5) = uVar11; lVar7 = *(long *)(piVar6 + 6); *(long **)(lVar7 + 8) = plVar8; *plVar8 = lVar7; plVar8[1] = (long)(piVar6 + 6); *(long **)(piVar6 + 6) = plVar8; *(long **)(local_48 + 0x30) = plVar8; goto LAB_00139b4e; } } } else { JS_ThrowTypeError(param_1,"ArrayBuffer is detached"); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar7,uVar10); } } } else { JS_ThrowTypeError(param_1,"ArrayBuffer is detached",6); } LAB_00139b49: local_48 = 0; uVar10 = 6; LAB_00139b4e: auVar12._8_8_ = uVar10; auVar12._0_8_ = local_48; return auVar12; }
48,416
read_from_proofer
corpus-core[P]colibri-stateless/src/cli/verifier.c
static bytes_t read_from_proofer(char* url, char* method, char* args, chain_id_t chain_id) { buffer_t payload = {0}; buffer_t response_buffer = {0}; bprintf(&payload, "{\"method\":\"%s\",\"params\":%s}", method, args); CURL* curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload.data.data); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, payload.data.len); struct curl_slist* headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response_buffer); curl_easy_perform(curl); curl_easy_cleanup(curl); if (response_buffer.data.len == 0) { fprintf(stderr, "proofer returned empty response\n"); exit(EXIT_FAILURE); } if (response_buffer.data.data[0] == '{') { json_t json = json_parse((char*) response_buffer.data.data); json_t error = json_get(json, "error"); if (error.type == JSON_TYPE_STRING) { fprintf(stderr, "proofer returned error: %s\n", json_new_string(error)); } exit(EXIT_FAILURE); } return response_buffer.data; }
O0
c
read_from_proofer: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) movl %ecx, -0x2c(%rbp) leaq -0x48(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x231c0 leaq -0x60(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x231c0 movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x48(%rbp), %rdi leaq 0xb72e3(%rip), %rsi # 0xdc270 movb $0x0, %al callq 0x9ebf0 callq 0x234d0 movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rdi movq -0x18(%rbp), %rdx movl $0x2712, %esi # imm = 0x2712 movb $0x0, %al callq 0x23420 movq -0x68(%rbp), %rdi movq -0x40(%rbp), %rdx movl $0x271f, %esi # imm = 0x271F movb $0x0, %al callq 0x23420 movq -0x68(%rbp), %rdi movl -0x48(%rbp), %edx movl $0x3c, %esi movb $0x0, %al callq 0x23420 movq $0x0, -0x70(%rbp) movq -0x70(%rbp), %rdi leaq 0xb72a1(%rip), %rsi # 0xdc28c callq 0x23330 movq %rax, -0x70(%rbp) movq -0x68(%rbp), %rdi movq -0x70(%rbp), %rdx movl $0x2727, %esi # imm = 0x2727 movb $0x0, %al callq 0x23420 movq -0x68(%rbp), %rdi movl $0x4e2b, %esi # imm = 0x4E2B leaq 0x128(%rip), %rdx # 0x25140 movb $0x0, %al callq 0x23420 movq -0x68(%rbp), %rdi movl $0x2711, %esi # imm = 0x2711 leaq -0x60(%rbp), %rdx movb $0x0, %al callq 0x23420 movq -0x68(%rbp), %rdi callq 0x23360 movq -0x68(%rbp), %rdi callq 0x230e0 cmpl $0x0, -0x60(%rbp) jne 0x2506d movq 0x113f76(%rip), %rax # 0x138fc8 movq (%rax), %rdi leaq 0xb724f(%rip), %rsi # 0xdc2ab movb $0x0, %al callq 0x23160 movl $0x1, %edi callq 0x23350 movq -0x58(%rbp), %rax movzbl (%rax), %eax cmpl $0x7b, %eax jne 0x25121 movq -0x58(%rbp), %rsi leaq -0x88(%rbp), %rdi callq 0xa51e0 leaq -0xa0(%rbp), %rdi leaq -0x88(%rbp), %rax leaq 0xb8757(%rip), %rsi # 0xdd7f9 movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa59b0 cmpl $0x1, -0x90(%rbp) jne 0x25117 movq 0x113ef8(%rip), %rax # 0x138fc8 movq (%rax), %rax movq %rax, -0xa8(%rbp) leaq -0xa0(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa6130 movq -0xa8(%rbp), %rdi movq %rax, %rdx leaq 0xb71bc(%rip), %rsi # 0xdc2cc movb $0x0, %al callq 0x23160 movl $0x1, %edi callq 0x23350 movups -0x60(%rbp), %xmm0 movaps %xmm0, -0x10(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0xc0, %rsp popq %rbp retq nopl (%rax)
read_from_proofer: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov [rbp+var_2C], ecx lea rdi, [rbp+var_48] xor esi, esi mov edx, 18h call _memset lea rdi, [rbp+var_60] xor esi, esi mov edx, 18h call _memset mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] lea rdi, [rbp+var_48] lea rsi, aMethodSParamsS; "{\"method\":\"%s\",\"params\":%s}" mov al, 0 call bprintf call _curl_easy_init mov [rbp+var_68], rax mov rdi, [rbp+var_68] mov rdx, [rbp+var_18] mov esi, 2712h mov al, 0 call _curl_easy_setopt mov rdi, [rbp+var_68] mov rdx, [rbp+var_40] mov esi, 271Fh mov al, 0 call _curl_easy_setopt mov rdi, [rbp+var_68] mov edx, [rbp+var_48] mov esi, 3Ch ; '<' mov al, 0 call _curl_easy_setopt mov [rbp+var_70], 0 mov rdi, [rbp+var_70] lea rsi, aContentTypeApp; "Content-Type: application/json" call _curl_slist_append mov [rbp+var_70], rax mov rdi, [rbp+var_68] mov rdx, [rbp+var_70] mov esi, 2727h mov al, 0 call _curl_easy_setopt mov rdi, [rbp+var_68] mov esi, 4E2Bh lea rdx, write_data mov al, 0 call _curl_easy_setopt mov rdi, [rbp+var_68] mov esi, 2711h lea rdx, [rbp+var_60] mov al, 0 call _curl_easy_setopt mov rdi, [rbp+var_68] call _curl_easy_perform mov rdi, [rbp+var_68] call _curl_easy_cleanup cmp dword ptr [rbp+var_60], 0 jnz short loc_2506D mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aProoferReturne; "proofer returned empty response\n" mov al, 0 call _fprintf mov edi, 1 call _exit loc_2506D: mov rax, qword ptr [rbp+var_60+8] movzx eax, byte ptr [rax] cmp eax, 7Bh ; '{' jnz loc_25121 mov rsi, qword ptr [rbp+var_60+8] lea rdi, [rbp+var_88] call json_parse lea rdi, [rbp+var_A0] lea rax, [rbp+var_88] lea rsi, aInternalError+9; "error" mov rcx, [rax] mov [rsp+0C0h+var_C0], rcx mov rcx, [rax+8] mov [rsp+0C0h+var_B8], rcx mov rax, [rax+10h] mov [rsp+0C0h+var_B0], rax call json_get cmp [rbp+var_90], 1 jnz short loc_25117 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_A8], rax lea rax, [rbp+var_A0] mov rcx, [rax] mov [rsp+0C0h+var_C0], rcx mov rcx, [rax+8] mov [rsp+0C0h+var_B8], rcx mov rax, [rax+10h] mov [rsp+0C0h+var_B0], rax call json_new_string mov rdi, [rbp+var_A8] mov rdx, rax lea rsi, aProoferReturne_0; "proofer returned error: %s\n" mov al, 0 call _fprintf loc_25117: mov edi, 1 call _exit loc_25121: movups xmm0, [rbp+var_60] movaps [rbp+var_10], xmm0 mov eax, dword ptr [rbp+var_10] mov rdx, qword ptr [rbp+var_10+8] add rsp, 0C0h pop rbp retn
long long read_from_proofer(long long a1, long long a2, long long a3, int a4) { int v4; // r8d int v5; // r9d int v6; // edx int v7; // r8d int v8; // r9d int v9; // edx int v10; // r8d int v11; // r9d const char *v12; // rax long long v14; // [rsp+18h] [rbp-A8h] long long v15; // [rsp+20h] [rbp-A0h] BYREF long long v16; // [rsp+28h] [rbp-98h] long long v17; // [rsp+30h] [rbp-90h] char v18[8]; // [rsp+38h] [rbp-88h] BYREF int v19; // [rsp+40h] [rbp-80h] long long v20; // [rsp+50h] [rbp-70h] long long v21; // [rsp+58h] [rbp-68h] unsigned int v22; // [rsp+60h] [rbp-60h] BYREF _BYTE *v23; // [rsp+68h] [rbp-58h] unsigned int v24; // [rsp+78h] [rbp-48h] BYREF long long v25; // [rsp+80h] [rbp-40h] int v26; // [rsp+94h] [rbp-2Ch] long long v27; // [rsp+98h] [rbp-28h] long long v28; // [rsp+A0h] [rbp-20h] long long v29; // [rsp+A8h] [rbp-18h] v29 = a1; v28 = a2; v27 = a3; v26 = a4; memset(&v24, 0LL, 24LL); memset(&v22, 0LL, 24LL); bprintf((unsigned int)&v24, (unsigned int)"{\"method\":\"%s\",\"params\":%s}", v28, v27, v4, v5); v21 = curl_easy_init(); curl_easy_setopt(v21, 10002LL, v29); curl_easy_setopt(v21, 10015LL, v25); curl_easy_setopt(v21, 60LL, v24); v20 = curl_slist_append(0LL, "Content-Type: application/json"); curl_easy_setopt(v21, 10023LL, v20); curl_easy_setopt(v21, 20011LL, write_data); curl_easy_setopt(v21, 10001LL, &v22); curl_easy_perform(v21); curl_easy_cleanup(v21); if ( !v22 ) { fprintf(stderr, "proofer returned empty response\n"); exit(1LL); } if ( *v23 == 123 ) { json_parse(v18, v23); json_get((unsigned int)&v15, (unsigned int)"error", v6, v19, v7, v8, v18[0]); if ( (_DWORD)v17 == 1 ) { v14 = stderr; v12 = (const char *)json_new_string((unsigned int)&v15, (unsigned int)"error", v9, v16, v10, v11, v15, v16, v17); fprintf(v14, "proofer returned error: %s\n", v12); } exit(1LL); } return v22; }
read_from_proofer: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x2c],ECX LEA RDI,[RBP + -0x48] XOR ESI,ESI MOV EDX,0x18 CALL 0x001231c0 LEA RDI,[RBP + -0x60] XOR ESI,ESI MOV EDX,0x18 CALL 0x001231c0 MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x48] LEA RSI,[0x1dc270] MOV AL,0x0 CALL 0x0019ebf0 CALL 0x001234d0 MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x18] MOV ESI,0x2712 MOV AL,0x0 CALL 0x00123420 MOV RDI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x40] MOV ESI,0x271f MOV AL,0x0 CALL 0x00123420 MOV RDI,qword ptr [RBP + -0x68] MOV EDX,dword ptr [RBP + -0x48] MOV ESI,0x3c MOV AL,0x0 CALL 0x00123420 MOV qword ptr [RBP + -0x70],0x0 MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[0x1dc28c] CALL 0x00123330 MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x70] MOV ESI,0x2727 MOV AL,0x0 CALL 0x00123420 MOV RDI,qword ptr [RBP + -0x68] MOV ESI,0x4e2b LEA RDX,[0x125140] MOV AL,0x0 CALL 0x00123420 MOV RDI,qword ptr [RBP + -0x68] MOV ESI,0x2711 LEA RDX,[RBP + -0x60] MOV AL,0x0 CALL 0x00123420 MOV RDI,qword ptr [RBP + -0x68] CALL 0x00123360 MOV RDI,qword ptr [RBP + -0x68] CALL 0x001230e0 CMP dword ptr [RBP + -0x60],0x0 JNZ 0x0012506d MOV RAX,qword ptr [0x00238fc8] MOV RDI,qword ptr [RAX] LEA RSI,[0x1dc2ab] MOV AL,0x0 CALL 0x00123160 MOV EDI,0x1 CALL 0x00123350 LAB_0012506d: MOV RAX,qword ptr [RBP + -0x58] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7b JNZ 0x00125121 MOV RSI,qword ptr [RBP + -0x58] LEA RDI,[RBP + -0x88] CALL 0x001a51e0 LEA RDI,[RBP + -0xa0] LEA RAX,[RBP + -0x88] LEA RSI,[0x1dd7f9] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a59b0 CMP dword ptr [RBP + -0x90],0x1 JNZ 0x00125117 MOV RAX,qword ptr [0x00238fc8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa8],RAX LEA RAX,[RBP + -0xa0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a6130 MOV RDI,qword ptr [RBP + -0xa8] MOV RDX,RAX LEA RSI,[0x1dc2cc] MOV AL,0x0 CALL 0x00123160 LAB_00125117: MOV EDI,0x1 CALL 0x00123350 LAB_00125121: MOVUPS XMM0,xmmword ptr [RBP + -0x60] MOVAPS xmmword ptr [RBP + -0x10],XMM0 MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0xc0 POP RBP RET
int1 [16] read_from_proofer(int8 param_1,int8 param_2,int8 param_3,int4 param_4) { FILE *__stream; int8 uVar1; int1 auVar2 [16]; int1 local_a8 [16]; int local_98; int1 local_90 [24]; int8 local_78; int8 local_70; uint local_68 [2]; char *pcStack_60; int4 local_50 [2]; int8 local_48; int4 local_34; int8 local_30; int8 local_28; int8 local_20; local_34 = param_4; local_30 = param_3; local_28 = param_2; local_20 = param_1; memset(local_50,0,0x18); memset(local_68,0,0x18); bprintf(local_50,"{\"method\":\"%s\",\"params\":%s}",local_28,local_30); local_70 = curl_easy_init(); curl_easy_setopt(local_70,0x2712,local_20); curl_easy_setopt(local_70,0x271f,local_48); curl_easy_setopt(local_70,0x3c,local_50[0]); local_78 = 0; local_78 = curl_slist_append(0,"Content-Type: application/json"); curl_easy_setopt(local_70,0x2727,local_78); curl_easy_setopt(local_70,0x4e2b,write_data); curl_easy_setopt(local_70,0x2711,local_68); curl_easy_perform(local_70); curl_easy_cleanup(local_70); if (local_68[0] == 0) { fprintf(*(FILE **)PTR_stderr_00238fc8,"proofer returned empty response\n"); /* WARNING: Subroutine does not return */ exit(1); } if (*pcStack_60 == '{') { json_parse(local_90,pcStack_60); json_get(local_a8,"error"); if (local_98 == 1) { __stream = *(FILE **)PTR_stderr_00238fc8; uVar1 = json_new_string(); fprintf(__stream,"proofer returned error: %s\n",uVar1); } /* WARNING: Subroutine does not return */ exit(1); } auVar2._4_4_ = 0; auVar2._0_4_ = local_68[0]; auVar2._8_8_ = pcStack_60; return auVar2; }
48,417
read_from_proofer
corpus-core[P]colibri-stateless/src/cli/verifier.c
static bytes_t read_from_proofer(char* url, char* method, char* args, chain_id_t chain_id) { buffer_t payload = {0}; buffer_t response_buffer = {0}; bprintf(&payload, "{\"method\":\"%s\",\"params\":%s}", method, args); CURL* curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload.data.data); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, payload.data.len); struct curl_slist* headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response_buffer); curl_easy_perform(curl); curl_easy_cleanup(curl); if (response_buffer.data.len == 0) { fprintf(stderr, "proofer returned empty response\n"); exit(EXIT_FAILURE); } if (response_buffer.data.data[0] == '{') { json_t json = json_parse((char*) response_buffer.data.data); json_t error = json_get(json, "error"); if (error.type == JSON_TYPE_STRING) { fprintf(stderr, "proofer returned error: %s\n", json_new_string(error)); } exit(EXIT_FAILURE); } return response_buffer.data; }
O3
c
read_from_proofer: pushq %rbx subq $0x20, %rsp movq 0x9ea2d(%rip), %rax # 0xc0fc8 movq (%rax), %rbx movq 0x10(%rdi), %rax movq %rax, 0x10(%rsp) movups (%rdi), %xmm0 movups %xmm0, (%rsp) callq 0x57bee leaq 0x5ec74(%rip), %rsi # 0x8122e movq %rbx, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x22140 addq $0x20, %rsp popq %rbx retq
main_cold_3: push rbx sub rsp, 20h mov rax, cs:stderr_ptr mov rbx, [rax] mov rax, [rdi+10h] mov [rsp+28h+var_18], rax movups xmm0, xmmword ptr [rdi] movups [rsp+28h+var_28], xmm0 call json_new_string lea rsi, aProoferReturne; "proofer returned error: %s\n" mov rdi, rbx mov rdx, rax xor eax, eax call _fprintf add rsp, 20h pop rbx retn
long long main_cold_3(long long a1, int a2, int a3, int a4, int a5, int a6) { long long v6; // rbx const char *v7; // rax v6 = stderr; v7 = (const char *)json_new_string(a1, a2, a3, a4, a5, a6, *(_OWORD *)a1, *(_QWORD *)(a1 + 8)); return fprintf(v6, "proofer returned error: %s\n", v7); }
main.cold.3: PUSH RBX SUB RSP,0x20 MOV RAX,qword ptr [0x001c0fc8] MOV RBX,qword ptr [RAX] MOV RAX,qword ptr [RDI + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RDI] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00157bee LEA RSI,[0x18122e] MOV RDI,RBX MOV RDX,RAX XOR EAX,EAX CALL 0x00122140 ADD RSP,0x20 POP RBX RET
void main_cold_3(void) { FILE *__stream; int8 uVar1; __stream = *(FILE **)PTR_stderr_001c0fc8; uVar1 = json_new_string(); fprintf(__stream,"proofer returned error: %s\n",uVar1); return; }
48,418
google::protobuf::Symbol::parent_number_key() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
std::pair<const void*, int> parent_number_key() const { switch (type()) { case FIELD: return {field_descriptor()->containing_type(), field_descriptor()->number()}; case ENUM_VALUE: return {enum_value_descriptor()->type(), enum_value_descriptor()->number()}; case QUERY_KEY: return query_key()->parent_number_key(); default: GOOGLE_CHECK(false); } return {}; }
O0
cpp
google::protobuf::Symbol::parent_number_key() const: subq $0xb8, %rsp movq %rdi, 0xa0(%rsp) movq 0xa0(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x799a0 movl %eax, %ecx movl %ecx, 0x24(%rsp) subl $0x2, %eax je 0x7f77b jmp 0x7f75e movl 0x24(%rsp), %eax subl $0x5, %eax je 0x7f7d0 jmp 0x7f769 movl 0x24(%rsp), %eax subl $0xb, %eax je 0x7f825 jmp 0x7f85a movq 0x18(%rsp), %rdi callq 0x73450 movq %rax, %rdi callq 0x73400 movq 0x18(%rsp), %rdi movq %rax, 0x98(%rsp) callq 0x73450 movq %rax, %rdi callq 0x73db0 movl %eax, 0x94(%rsp) leaq 0xa8(%rsp), %rdi leaq 0x98(%rsp), %rsi leaq 0x94(%rsp), %rdx callq 0x7f900 jmp 0x7f8d6 movq 0x18(%rsp), %rdi callq 0x74730 movq %rax, %rdi callq 0x73e00 movq 0x18(%rsp), %rdi movq %rax, 0x88(%rsp) callq 0x74730 movq %rax, %rdi callq 0x73e30 movl %eax, 0x84(%rsp) leaq 0xa8(%rsp), %rdi leaq 0x88(%rsp), %rsi leaq 0x84(%rsp), %rdx callq 0x7f930 jmp 0x7f8d6 movq 0x18(%rsp), %rdi callq 0x7e110 movq %rax, %rdi callq 0x7f960 movl %edx, 0x78(%rsp) movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movl 0x78(%rsp), %eax movl %eax, 0xb0(%rsp) jmp 0x7f8d6 leaq 0x16dc73(%rip), %rdx # 0x1ed4d4 leaq 0x38(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0x311, %ecx # imm = 0x311 callq 0x237e0 movq 0x8(%rsp), %rdi leaq 0x170522(%rip), %rsi # 0x1efda8 callq 0x230a0 movq %rax, 0x10(%rsp) jmp 0x7f892 movq 0x10(%rsp), %rsi leaq 0x2b(%rsp), %rdi callq 0x23250 jmp 0x7f8a3 leaq 0x38(%rsp), %rdi callq 0x23820 leaq 0xa8(%rsp), %rdi callq 0x7f990 jmp 0x7f8d6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0x23820 jmp 0x7f8ed movq 0xa8(%rsp), %rax movl 0xb0(%rsp), %edx addq $0xb8, %rsp retq movq 0x30(%rsp), %rdi callq 0x13750 nopw (%rax,%rax)
_ZNK6google8protobuf6Symbol17parent_number_keyEv: sub rsp, 0B8h mov [rsp+0B8h+var_18], rdi mov rdi, [rsp+0B8h+var_18]; this mov [rsp+0B8h+var_A0], rdi call _ZNK6google8protobuf6Symbol4typeEv; google::protobuf::Symbol::type(void) mov ecx, eax mov [rsp+0B8h+var_94], ecx sub eax, 2 jz short loc_7F77B jmp short $+2 loc_7F75E: mov eax, [rsp+0B8h+var_94] sub eax, 5 jz short loc_7F7D0 jmp short $+2 loc_7F769: mov eax, [rsp+0B8h+var_94] sub eax, 0Bh jz loc_7F825 jmp loc_7F85A loc_7F77B: mov rdi, [rsp+0B8h+var_A0]; this call _ZNK6google8protobuf6Symbol16field_descriptorEv; google::protobuf::Symbol::field_descriptor(void) mov rdi, rax; this call _ZNK6google8protobuf15FieldDescriptor15containing_typeEv; google::protobuf::FieldDescriptor::containing_type(void) mov rdi, [rsp+0B8h+var_A0]; this mov [rsp+0B8h+var_20], rax call _ZNK6google8protobuf6Symbol16field_descriptorEv; google::protobuf::Symbol::field_descriptor(void) mov rdi, rax; this call _ZNK6google8protobuf15FieldDescriptor6numberEv; google::protobuf::FieldDescriptor::number(void) mov [rsp+0B8h+var_24], eax lea rdi, [rsp+0B8h+var_10] lea rsi, [rsp+0B8h+var_20] lea rdx, [rsp+0B8h+var_24] call _ZNSt4pairIPKviEC2IPKN6google8protobuf10DescriptorEiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_ jmp loc_7F8D6 loc_7F7D0: mov rdi, [rsp+0B8h+var_A0]; this call _ZNK6google8protobuf6Symbol21enum_value_descriptorEv; google::protobuf::Symbol::enum_value_descriptor(void) mov rdi, rax; this call _ZNK6google8protobuf19EnumValueDescriptor4typeEv; google::protobuf::EnumValueDescriptor::type(void) mov rdi, [rsp+0B8h+var_A0]; this mov [rsp+0B8h+var_30], rax call _ZNK6google8protobuf6Symbol21enum_value_descriptorEv; google::protobuf::Symbol::enum_value_descriptor(void) mov rdi, rax; this call _ZNK6google8protobuf19EnumValueDescriptor6numberEv; google::protobuf::EnumValueDescriptor::number(void) mov [rsp+0B8h+var_34], eax lea rdi, [rsp+0B8h+var_10] lea rsi, [rsp+0B8h+var_30] lea rdx, [rsp+0B8h+var_34] call _ZNSt4pairIPKviEC2IPKN6google8protobuf14EnumDescriptorEiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_ jmp loc_7F8D6 loc_7F825: mov rdi, [rsp+0B8h+var_A0]; this call _ZNK6google8protobuf6Symbol9query_keyEv; google::protobuf::Symbol::query_key(void) mov rdi, rax; this call _ZNK6google8protobuf6Symbol8QueryKey17parent_number_keyEv; google::protobuf::Symbol::QueryKey::parent_number_key(void) mov [rsp+0B8h+var_40], edx mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_10], rax mov eax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_8], eax jmp short loc_7F8D6 loc_7F85A: lea rdx, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+0B8h+var_80] mov [rsp+0B8h+var_B0], rdi mov esi, 3 mov ecx, 311h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+0B8h+var_B0] lea rsi, aCheckFailedFal_0; "CHECK failed: false: " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+0B8h+var_A8], rax jmp short $+2 loc_7F892: mov rsi, [rsp+0B8h+var_A8] lea rdi, [rsp+0B8h+var_8D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_7F8A3: lea rdi, [rsp+0B8h+var_80]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() lea rdi, [rsp+0B8h+var_10] call _ZNSt4pairIPKviEC2IS1_iTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv jmp short loc_7F8D6 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() jmp short loc_7F8ED loc_7F8D6: mov rax, [rsp+0B8h+var_10] mov edx, [rsp+0B8h+var_8] add rsp, 0B8h retn loc_7F8ED: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long google::protobuf::Symbol::parent_number_key(google::protobuf::Symbol *this) { google::protobuf::FieldDescriptor *v1; // rax google::protobuf::FieldDescriptor *v2; // rax google::protobuf::EnumValueDescriptor *v3; // rax google::protobuf::EnumValueDescriptor *v4; // rax google::protobuf::Symbol::QueryKey *key; // rax long long v6; // rax int v7; // edx google::protobuf::internal::LogMessage *v8; // rsi int v10; // [rsp+24h] [rbp-94h] _BYTE v11[13]; // [rsp+2Bh] [rbp-8Dh] BYREF _BYTE v12[56]; // [rsp+38h] [rbp-80h] BYREF long long v13; // [rsp+70h] [rbp-48h] int v14; // [rsp+78h] [rbp-40h] int v15; // [rsp+84h] [rbp-34h] BYREF long long v16; // [rsp+88h] [rbp-30h] BYREF int v17; // [rsp+94h] [rbp-24h] BYREF _QWORD v18[2]; // [rsp+98h] [rbp-20h] BYREF long long v19; // [rsp+A8h] [rbp-10h] BYREF int v20; // [rsp+B0h] [rbp-8h] v18[1] = this; v10 = google::protobuf::Symbol::type(this); switch ( v10 ) { case 2: v1 = (google::protobuf::FieldDescriptor *)google::protobuf::Symbol::field_descriptor(this); v18[0] = google::protobuf::FieldDescriptor::containing_type(v1); v2 = (google::protobuf::FieldDescriptor *)google::protobuf::Symbol::field_descriptor(this); v17 = google::protobuf::FieldDescriptor::number(v2); ZNSt4pairIPKviEC2IPKN6google8protobuf10DescriptorEiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_( &v19, v18, &v17); break; case 5: v3 = (google::protobuf::EnumValueDescriptor *)google::protobuf::Symbol::enum_value_descriptor(this); v16 = google::protobuf::EnumValueDescriptor::type(v3); v4 = (google::protobuf::EnumValueDescriptor *)google::protobuf::Symbol::enum_value_descriptor(this); v15 = google::protobuf::EnumValueDescriptor::number(v4); ZNSt4pairIPKviEC2IPKN6google8protobuf14EnumDescriptorEiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_( &v19, &v16, &v15); break; case 11: key = (google::protobuf::Symbol::QueryKey *)google::protobuf::Symbol::query_key(this); v6 = google::protobuf::Symbol::QueryKey::parent_number_key(key); v14 = v7; v13 = v6; v19 = v6; v20 = v7; break; default: google::protobuf::internal::LogMessage::LogMessage( (long long)v12, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 785); v8 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v12, (long long)"CHECK failed: false: "); google::protobuf::internal::LogFinisher::operator=((long long)v11, v8); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v12); ZNSt4pairIPKviEC2IS1_iTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv(&v19); break; } return v19; }
parent_number_key: SUB RSP,0xb8 MOV qword ptr [RSP + 0xa0],RDI MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x18],RDI CALL 0x001799a0 MOV ECX,EAX MOV dword ptr [RSP + 0x24],ECX SUB EAX,0x2 JZ 0x0017f77b JMP 0x0017f75e LAB_0017f75e: MOV EAX,dword ptr [RSP + 0x24] SUB EAX,0x5 JZ 0x0017f7d0 JMP 0x0017f769 LAB_0017f769: MOV EAX,dword ptr [RSP + 0x24] SUB EAX,0xb JZ 0x0017f825 JMP 0x0017f85a LAB_0017f77b: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00173450 MOV RDI,RAX CALL 0x00173400 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x98],RAX CALL 0x00173450 MOV RDI,RAX CALL 0x00173db0 MOV dword ptr [RSP + 0x94],EAX LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0x98] LEA RDX,[RSP + 0x94] CALL 0x0017f900 JMP 0x0017f8d6 LAB_0017f7d0: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00174730 MOV RDI,RAX CALL 0x00173e00 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x88],RAX CALL 0x00174730 MOV RDI,RAX CALL 0x00173e30 MOV dword ptr [RSP + 0x84],EAX LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0x88] LEA RDX,[RSP + 0x84] CALL 0x0017f930 JMP 0x0017f8d6 LAB_0017f825: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0017e110 MOV RDI,RAX CALL 0x0017f960 MOV dword ptr [RSP + 0x78],EDX MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xa8],RAX MOV EAX,dword ptr [RSP + 0x78] MOV dword ptr [RSP + 0xb0],EAX JMP 0x0017f8d6 LAB_0017f85a: LEA RDX,[0x2ed4d4] LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x8],RDI MOV ESI,0x3 MOV ECX,0x311 CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x8] LAB_0017f87f: LEA RSI,[0x2efda8] CALL 0x001230a0 MOV qword ptr [RSP + 0x10],RAX JMP 0x0017f892 LAB_0017f892: MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x2b] CALL 0x00123250 LAB_0017f8a1: JMP 0x0017f8a3 LAB_0017f8a3: LEA RDI,[RSP + 0x38] CALL 0x00123820 LEA RDI,[RSP + 0xa8] CALL 0x0017f990 JMP 0x0017f8d6 LAB_0017f8d6: MOV RAX,qword ptr [RSP + 0xa8] MOV EDX,dword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
/* google::protobuf::Symbol::parent_number_key() const */ int1 [16] __thiscall google::protobuf::Symbol::parent_number_key(Symbol *this) { int iVar1; FieldDescriptor *pFVar2; EnumValueDescriptor *pEVar3; QueryKey *this_00; LogMessage *pLVar4; int1 auVar5 [16]; int1 auVar6 [12]; LogFinisher local_8d [13]; LogMessage local_80 [76]; int4 local_34; int8 local_30; int4 local_24; int8 local_20; Symbol *local_18; int8 local_10; int4 local_8; local_18 = this; iVar1 = type(this); if (iVar1 == 2) { pFVar2 = (FieldDescriptor *)field_descriptor(this); local_20 = FieldDescriptor::containing_type(pFVar2); pFVar2 = (FieldDescriptor *)field_descriptor(this); local_24 = FieldDescriptor::number(pFVar2); _ZNSt4pairIPKviEC2IPKN6google8protobuf10DescriptorEiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_ (&local_10,&local_20,&local_24); auVar6._8_4_ = local_8; auVar6._0_8_ = local_10; } else if (iVar1 == 5) { pEVar3 = (EnumValueDescriptor *)enum_value_descriptor(this); local_30 = EnumValueDescriptor::type(pEVar3); pEVar3 = (EnumValueDescriptor *)enum_value_descriptor(this); local_34 = EnumValueDescriptor::number(pEVar3); _ZNSt4pairIPKviEC2IPKN6google8protobuf14EnumDescriptorEiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISA_SB_EEEbE4typeELb1EEEOSA_OSB_ (&local_10,&local_30,&local_34); auVar6._8_4_ = local_8; auVar6._0_8_ = local_10; } else if (iVar1 == 0xb) { this_00 = (QueryKey *)query_key(this); auVar6 = QueryKey::parent_number_key(this_00); } else { internal::LogMessage::LogMessage (local_80,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x311); /* try { // try from 0017f87f to 0017f8a0 has its CatchHandler @ 0017f8bc */ pLVar4 = (LogMessage *)internal::LogMessage::operator<<(local_80,"CHECK failed: false: "); internal::LogFinisher::operator=(local_8d,pLVar4); internal::LogMessage::~LogMessage(local_80); _ZNSt4pairIPKviEC2IS1_iTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES5_IT0_EEE5valueEbE4typeELb1EEEv (&local_10); auVar6._8_4_ = local_8; auVar6._0_8_ = local_10; } auVar5._12_4_ = 0; auVar5._0_12_ = auVar6; return auVar5; }
48,419
POINTonE2_Deserialize_BE
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c
static BLST_ERROR POINTonE2_Deserialize_BE(POINTonE2_affine *out, const unsigned char in[192]) { POINTonE2_affine ret; vec384 temp; limbs_from_be_bytes(ret.X[1], in, sizeof(ret.X[1])); limbs_from_be_bytes(ret.X[0], in + 48, sizeof(ret.X[0])); limbs_from_be_bytes(ret.Y[1], in + 96, sizeof(ret.Y[1])); limbs_from_be_bytes(ret.Y[0], in + 144, sizeof(ret.Y[0])); /* clear top 3 bits in case caller was conveying some information there */ ret.X[1][sizeof(ret.X[1])/sizeof(limb_t)-1] &= ((limb_t)0-1) >> 3; add_fp(temp, ret.X[1], ZERO_384); /* less than modulus? */ if (!vec_is_equal(temp, ret.X[1], sizeof(temp))) return BLST_BAD_ENCODING; add_fp(temp, ret.X[0], ZERO_384); /* less than modulus? */ if (!vec_is_equal(temp, ret.X[0], sizeof(temp))) return BLST_BAD_ENCODING; add_fp(temp, ret.Y[1], ZERO_384); /* less than modulus? */ if (!vec_is_equal(temp, ret.Y[1], sizeof(temp))) return BLST_BAD_ENCODING; add_fp(temp, ret.Y[0], ZERO_384); /* less than modulus? */ if (!vec_is_equal(temp, ret.Y[0], sizeof(temp))) return BLST_BAD_ENCODING; mul_fp(ret.X[0], ret.X[0], BLS12_381_RR); mul_fp(ret.X[1], ret.X[1], BLS12_381_RR); mul_fp(ret.Y[0], ret.Y[0], BLS12_381_RR); mul_fp(ret.Y[1], ret.Y[1], BLS12_381_RR); if (!POINTonE2_affine_on_curve(&ret)) return BLST_POINT_NOT_ON_CURVE; vec_copy(out, &ret, sizeof(ret)); return BLST_SUCCESS; }
O0
c
POINTonE2_Deserialize_BE: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq -0xd8(%rbp), %rdi addq $0x30, %rdi movq -0x18(%rbp), %rsi movl $0x30, %edx callq 0x30ea0 leaq -0xd8(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x30, %rsi movl $0x30, %edx callq 0x30ea0 leaq -0xd8(%rbp), %rdi addq $0x60, %rdi addq $0x30, %rdi movq -0x18(%rbp), %rsi addq $0x60, %rsi movl $0x30, %edx callq 0x30ea0 leaq -0xd8(%rbp), %rdi addq $0x60, %rdi movq -0x18(%rbp), %rsi addq $0x90, %rsi movl $0x30, %edx callq 0x30ea0 movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF andq -0x80(%rbp), %rax movq %rax, -0x80(%rbp) leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi addq $0x30, %rsi leaq 0x1e747(%rip), %rdx # 0x54d28 addq $0x30, %rdx callq 0x2a930 leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi addq $0x30, %rsi movl $0x30, %edx callq 0x26010 cmpq $0x0, %rax jne 0x36618 movl $0x1, -0x4(%rbp) jmp 0x367c7 leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi leaq 0x1e6fb(%rip), %rdx # 0x54d28 addq $0x30, %rdx callq 0x2a930 leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi movl $0x30, %edx callq 0x26010 cmpq $0x0, %rax jne 0x36660 movl $0x1, -0x4(%rbp) jmp 0x367c7 leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi addq $0x60, %rsi addq $0x30, %rsi leaq 0x1e6ab(%rip), %rdx # 0x54d28 addq $0x30, %rdx callq 0x2a930 leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi addq $0x60, %rsi addq $0x30, %rsi movl $0x30, %edx callq 0x26010 cmpq $0x0, %rax jne 0x366b8 movl $0x1, -0x4(%rbp) jmp 0x367c7 leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi addq $0x60, %rsi leaq 0x1e657(%rip), %rdx # 0x54d28 addq $0x30, %rdx callq 0x2a930 leaq -0x110(%rbp), %rdi leaq -0xd8(%rbp), %rsi addq $0x60, %rsi movl $0x30, %edx callq 0x26010 cmpq $0x0, %rax jne 0x36708 movl $0x1, -0x4(%rbp) jmp 0x367c7 leaq -0xd8(%rbp), %rdi leaq -0xd8(%rbp), %rsi leaq 0x1e853(%rip), %rdx # 0x54f70 callq 0x30bd0 leaq -0xd8(%rbp), %rdi addq $0x30, %rdi leaq -0xd8(%rbp), %rsi addq $0x30, %rsi leaq 0x1e831(%rip), %rdx # 0x54f70 callq 0x30bd0 leaq -0xd8(%rbp), %rdi addq $0x60, %rdi leaq -0xd8(%rbp), %rsi addq $0x60, %rsi leaq 0x1e80f(%rip), %rdx # 0x54f70 callq 0x30bd0 leaq -0xd8(%rbp), %rdi addq $0x60, %rdi addq $0x30, %rdi leaq -0xd8(%rbp), %rsi addq $0x60, %rsi addq $0x30, %rsi leaq 0x1e7e5(%rip), %rdx # 0x54f70 callq 0x30bd0 leaq -0xd8(%rbp), %rdi callq 0x267c0 cmpq $0x0, %rax jne 0x367ab movl $0x2, -0x4(%rbp) jmp 0x367c7 movq -0x10(%rbp), %rdi leaq -0xd8(%rbp), %rsi movl $0xc0, %edx callq 0x23620 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
POINTonE2_Deserialize_BE: push rbp mov rbp, rsp sub rsp, 110h mov [rbp+var_10], rdi mov [rbp+var_18], rsi lea rdi, [rbp+var_D8] add rdi, 30h ; '0' mov rsi, [rbp+var_18] mov edx, 30h ; '0' call limbs_from_be_bytes lea rdi, [rbp+var_D8] mov rsi, [rbp+var_18] add rsi, 30h ; '0' mov edx, 30h ; '0' call limbs_from_be_bytes lea rdi, [rbp+var_D8] add rdi, 60h ; '`' add rdi, 30h ; '0' mov rsi, [rbp+var_18] add rsi, 60h ; '`' mov edx, 30h ; '0' call limbs_from_be_bytes lea rdi, [rbp+var_D8] add rdi, 60h ; '`' mov rsi, [rbp+var_18] add rsi, 90h mov edx, 30h ; '0' call limbs_from_be_bytes mov rax, 1FFFFFFFFFFFFFFFh and rax, [rbp+var_80] mov [rbp+var_80], rax lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] add rsi, 30h ; '0' lea rdx, BLS12_381_Rx add rdx, 30h ; '0' call add_fp lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] add rsi, 30h ; '0' mov edx, 30h ; '0' call vec_is_equal cmp rax, 0 jnz short loc_36618 mov [rbp+var_4], 1 jmp loc_367C7 loc_36618: lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] lea rdx, BLS12_381_Rx add rdx, 30h ; '0' call add_fp lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] mov edx, 30h ; '0' call vec_is_equal cmp rax, 0 jnz short loc_36660 mov [rbp+var_4], 1 jmp loc_367C7 loc_36660: lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] add rsi, 60h ; '`' add rsi, 30h ; '0' lea rdx, BLS12_381_Rx add rdx, 30h ; '0' call add_fp lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] add rsi, 60h ; '`' add rsi, 30h ; '0' mov edx, 30h ; '0' call vec_is_equal cmp rax, 0 jnz short loc_366B8 mov [rbp+var_4], 1 jmp loc_367C7 loc_366B8: lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] add rsi, 60h ; '`' lea rdx, BLS12_381_Rx add rdx, 30h ; '0' call add_fp lea rdi, [rbp+var_110] lea rsi, [rbp+var_D8] add rsi, 60h ; '`' mov edx, 30h ; '0' call vec_is_equal cmp rax, 0 jnz short loc_36708 mov [rbp+var_4], 1 jmp loc_367C7 loc_36708: lea rdi, [rbp+var_D8] lea rsi, [rbp+var_D8] lea rdx, BLS12_381_RR call mul_fp lea rdi, [rbp+var_D8] add rdi, 30h ; '0' lea rsi, [rbp+var_D8] add rsi, 30h ; '0' lea rdx, BLS12_381_RR call mul_fp lea rdi, [rbp+var_D8] add rdi, 60h ; '`' lea rsi, [rbp+var_D8] add rsi, 60h ; '`' lea rdx, BLS12_381_RR call mul_fp lea rdi, [rbp+var_D8] add rdi, 60h ; '`' add rdi, 30h ; '0' lea rsi, [rbp+var_D8] add rsi, 60h ; '`' add rsi, 30h ; '0' lea rdx, BLS12_381_RR call mul_fp lea rdi, [rbp+var_D8] call POINTonE2_affine_on_curve cmp rax, 0 jnz short loc_367AB mov [rbp+var_4], 2 jmp short loc_367C7 loc_367AB: mov rdi, [rbp+var_10] lea rsi, [rbp+var_D8] mov edx, 0C0h call vec_copy mov [rbp+var_4], 0 loc_367C7: mov eax, [rbp+var_4] add rsp, 110h pop rbp retn
long long POINTonE2_Deserialize_BE(long long a1, unsigned __int8 *a2) { _BYTE v3[56]; // [rsp+0h] [rbp-110h] BYREF _BYTE v4[48]; // [rsp+38h] [rbp-D8h] BYREF _BYTE v5[40]; // [rsp+68h] [rbp-A8h] BYREF long long v6; // [rsp+90h] [rbp-80h] _BYTE v7[48]; // [rsp+98h] [rbp-78h] BYREF _BYTE v8[48]; // [rsp+C8h] [rbp-48h] BYREF unsigned __int8 *v9; // [rsp+F8h] [rbp-18h] long long v10; // [rsp+100h] [rbp-10h] v10 = a1; v9 = a2; limbs_from_be_bytes((long long)v5, a2, 0x30uLL); limbs_from_be_bytes((long long)v4, v9 + 48, 0x30uLL); limbs_from_be_bytes((long long)v8, v9 + 96, 0x30uLL); limbs_from_be_bytes((long long)v7, v9 + 144, 0x30uLL); v6 &= 0x1FFFFFFFFFFFFFFFuLL; add_fp((long long)v3, (long long)v5, (long long)&BLS12_381_Rx + 48); if ( vec_is_equal((long long)v3, (long long)v5, 0x30uLL) ) { add_fp((long long)v3, (long long)v4, (long long)&BLS12_381_Rx + 48); if ( vec_is_equal((long long)v3, (long long)v4, 0x30uLL) ) { add_fp((long long)v3, (long long)v8, (long long)&BLS12_381_Rx + 48); if ( vec_is_equal((long long)v3, (long long)v8, 0x30uLL) ) { add_fp((long long)v3, (long long)v7, (long long)&BLS12_381_Rx + 48); if ( vec_is_equal((long long)v3, (long long)v7, 0x30uLL) ) { mul_fp((long long)v4, (long long)v4, (long long)&BLS12_381_RR); mul_fp((long long)v5, (long long)v5, (long long)&BLS12_381_RR); mul_fp((long long)v7, (long long)v7, (long long)&BLS12_381_RR); mul_fp((long long)v8, (long long)v8, (long long)&BLS12_381_RR); if ( POINTonE2_affine_on_curve((long long)v4) ) { vec_copy(v10, (long long)v4, 0xC0uLL); return 0; } else { return 2; } } else { return 1; } } else { return 1; } } else { return 1; } } else { return 1; } }
POINTonE2_Deserialize_BE: PUSH RBP MOV RBP,RSP SUB RSP,0x110 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LEA RDI,[RBP + -0xd8] ADD RDI,0x30 MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x30 CALL 0x00130ea0 LEA RDI,[RBP + -0xd8] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x30 MOV EDX,0x30 CALL 0x00130ea0 LEA RDI,[RBP + -0xd8] ADD RDI,0x60 ADD RDI,0x30 MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x60 MOV EDX,0x30 CALL 0x00130ea0 LEA RDI,[RBP + -0xd8] ADD RDI,0x60 MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x90 MOV EDX,0x30 CALL 0x00130ea0 MOV RAX,0x1fffffffffffffff AND RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x80],RAX LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] ADD RSI,0x30 LEA RDX,[0x154d28] ADD RDX,0x30 CALL 0x0012a930 LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] ADD RSI,0x30 MOV EDX,0x30 CALL 0x00126010 CMP RAX,0x0 JNZ 0x00136618 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001367c7 LAB_00136618: LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] LEA RDX,[0x154d28] ADD RDX,0x30 CALL 0x0012a930 LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] MOV EDX,0x30 CALL 0x00126010 CMP RAX,0x0 JNZ 0x00136660 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001367c7 LAB_00136660: LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] ADD RSI,0x60 ADD RSI,0x30 LEA RDX,[0x154d28] ADD RDX,0x30 CALL 0x0012a930 LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] ADD RSI,0x60 ADD RSI,0x30 MOV EDX,0x30 CALL 0x00126010 CMP RAX,0x0 JNZ 0x001366b8 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001367c7 LAB_001366b8: LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] ADD RSI,0x60 LEA RDX,[0x154d28] ADD RDX,0x30 CALL 0x0012a930 LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0xd8] ADD RSI,0x60 MOV EDX,0x30 CALL 0x00126010 CMP RAX,0x0 JNZ 0x00136708 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001367c7 LAB_00136708: LEA RDI,[RBP + -0xd8] LEA RSI,[RBP + -0xd8] LEA RDX,[0x154f70] CALL 0x00130bd0 LEA RDI,[RBP + -0xd8] ADD RDI,0x30 LEA RSI,[RBP + -0xd8] ADD RSI,0x30 LEA RDX,[0x154f70] CALL 0x00130bd0 LEA RDI,[RBP + -0xd8] ADD RDI,0x60 LEA RSI,[RBP + -0xd8] ADD RSI,0x60 LEA RDX,[0x154f70] CALL 0x00130bd0 LEA RDI,[RBP + -0xd8] ADD RDI,0x60 ADD RDI,0x30 LEA RSI,[RBP + -0xd8] ADD RSI,0x60 ADD RSI,0x30 LEA RDX,[0x154f70] CALL 0x00130bd0 LEA RDI,[RBP + -0xd8] CALL 0x001267c0 CMP RAX,0x0 JNZ 0x001367ab MOV dword ptr [RBP + -0x4],0x2 JMP 0x001367c7 LAB_001367ab: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0xd8] MOV EDX,0xc0 CALL 0x00123620 MOV dword ptr [RBP + -0x4],0x0 LAB_001367c7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x110 POP RBP RET
int4 POINTonE2_Deserialize_BE(int8 param_1,long param_2) { long lVar1; int1 local_118 [56]; int1 local_e0 [48]; int1 auStack_b0 [40]; ulong local_88; int1 auStack_80 [48]; int1 auStack_50 [48]; long local_20; int8 local_18; int4 local_c; local_20 = param_2; local_18 = param_1; limbs_from_be_bytes(auStack_b0,param_2,0x30); limbs_from_be_bytes(local_e0,local_20 + 0x30,0x30); limbs_from_be_bytes(auStack_50,local_20 + 0x60,0x30); limbs_from_be_bytes(auStack_80,local_20 + 0x90,0x30); local_88 = local_88 & 0x1fffffffffffffff; add_fp(local_118,auStack_b0,0x154d58); lVar1 = vec_is_equal(local_118,auStack_b0,0x30); if (lVar1 == 0) { local_c = 1; } else { add_fp(local_118,local_e0,0x154d58); lVar1 = vec_is_equal(local_118,local_e0,0x30); if (lVar1 == 0) { local_c = 1; } else { add_fp(local_118,auStack_50,0x154d58); lVar1 = vec_is_equal(local_118,auStack_50,0x30); if (lVar1 == 0) { local_c = 1; } else { add_fp(local_118,auStack_80,0x154d58); lVar1 = vec_is_equal(local_118,auStack_80,0x30); if (lVar1 == 0) { local_c = 1; } else { mul_fp(local_e0,local_e0,BLS12_381_RR); mul_fp(auStack_b0,auStack_b0,BLS12_381_RR); mul_fp(auStack_80,auStack_80,BLS12_381_RR); mul_fp(auStack_50,auStack_50,BLS12_381_RR); lVar1 = POINTonE2_affine_on_curve(local_e0); if (lVar1 == 0) { local_c = 2; } else { vec_copy(local_18,local_e0,0xc0); local_c = 0; } } } } } return local_c; }
48,420
lfqueue_deq
xtate/src/util-data/lfqueue.c
void *lfqueue_deq(lfqueue_t *lfqueue) { void *v; if ( //__LFQ_ADD_AND_FETCH(&lfqueue->size, 0) && (v = _dequeue(lfqueue))) { __LFQ_FETCH_AND_ADD(&lfqueue->size, -1); return v; } return NULL; }
O3
c
lfqueue_deq: pushq %rbx movq %rdi, %rbx callq 0x50c08 testq %rax, %rax je 0x50b6e lock decq 0x20(%rbx) popq %rbx retq
lfqueue_deq: push rbx mov rbx, rdi call _dequeue test rax, rax jz short loc_50B6E lock dec qword ptr [rbx+20h] loc_50B6E: pop rbx retn
long long lfqueue_deq(long long a1) { long long result; // rax result = dequeue(a1); if ( result ) _InterlockedDecrement64((volatile signed long long *)(a1 + 32)); return result; }
lfqueue_deq: PUSH RBX MOV RBX,RDI CALL 0x00150c08 TEST RAX,RAX JZ 0x00150b6e DEC.LOCK qword ptr [RBX + 0x20] LAB_00150b6e: POP RBX RET
void lfqueue_deq(long param_1) { long lVar1; lVar1 = _dequeue(); if (lVar1 != 0) { LOCK(); *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1; UNLOCK(); } return; }
48,421
r3d_frustum_is_sphere_in
r3d/src/details/r3d_frustum.c
bool r3d_frustum_is_sphere_in(const r3d_frustum_t* frustum, Vector3 position, float radius) { for (int i = 0; i < R3D_PLANE_COUNT; i++) { if (r3d_frustum_distance_to_plane(frustum->planes[i], position) < -radius) { return false; } } return true; }
O3
c
r3d_frustum_is_sphere_in: pushq %rbp movq %rsp, %rbp xorps 0x1b0b(%rip), %xmm2 # 0xe32e0 movsd (%rdi), %xmm3 movsd 0x8(%rdi), %xmm4 movaps %xmm3, %xmm5 mulps %xmm0, %xmm5 shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1] mulss %xmm0, %xmm3 addss %xmm5, %xmm3 movaps %xmm4, %xmm5 mulss %xmm1, %xmm5 addss %xmm3, %xmm5 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] addss %xmm5, %xmm4 ucomiss %xmm4, %xmm2 jbe 0xe180c xorl %eax, %eax jmp 0xe185d addq $0x18, %rdi xorl %ecx, %ecx movq %rcx, %rax cmpq $0x5, %rcx je 0xe1856 movsd -0x8(%rdi), %xmm3 movsd (%rdi), %xmm4 movaps %xmm3, %xmm5 mulps %xmm0, %xmm5 shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1] mulss %xmm0, %xmm3 addss %xmm5, %xmm3 movaps %xmm4, %xmm5 mulss %xmm1, %xmm5 addss %xmm3, %xmm5 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] addss %xmm5, %xmm4 addq $0x10, %rdi leaq 0x1(%rax), %rcx ucomiss %xmm4, %xmm2 jbe 0xe1812 cmpq $0x5, %rax setae %al popq %rbp retq
r3d_frustum_is_sphere_in: push rbp mov rbp, rsp xorps xmm2, cs:xmmword_E32E0 movsd xmm3, qword ptr [rdi] movsd xmm4, qword ptr [rdi+8] movaps xmm5, xmm3 mulps xmm5, xmm0 shufps xmm5, xmm5, 55h ; 'U' mulss xmm3, xmm0 addss xmm3, xmm5 movaps xmm5, xmm4 mulss xmm5, xmm1 addss xmm5, xmm3 shufps xmm4, xmm4, 55h ; 'U' addss xmm4, xmm5 ucomiss xmm2, xmm4 jbe short loc_E180C xor eax, eax jmp short loc_E185D loc_E180C: add rdi, 18h xor ecx, ecx loc_E1812: mov rax, rcx cmp rcx, 5 jz short loc_E1856 movsd xmm3, qword ptr [rdi-8] movsd xmm4, qword ptr [rdi] movaps xmm5, xmm3 mulps xmm5, xmm0 shufps xmm5, xmm5, 55h ; 'U' mulss xmm3, xmm0 addss xmm3, xmm5 movaps xmm5, xmm4 mulss xmm5, xmm1 addss xmm5, xmm3 shufps xmm4, xmm4, 55h ; 'U' addss xmm4, xmm5 add rdi, 10h lea rcx, [rax+1] ucomiss xmm2, xmm4 jbe short loc_E1812 loc_E1856: cmp rax, 5 setnb al loc_E185D: pop rbp retn
bool r3d_frustum_is_sphere_in(unsigned long long *a1, __m128 a2, float a3, float a4) { float v4; // xmm2_4 __m128 v5; // xmm5 unsigned long long *v7; // rdi unsigned long long v8; // rcx unsigned long long v9; // rax __m128 v10; // xmm5 float v11; // xmm4_4 v4 = -a4; v5 = _mm_mul_ps((__m128)*a1, a2); if ( v4 > (float)(_mm_shuffle_ps((__m128)a1[1], (__m128)a1[1], 85).m128_f32[0] + (float)((float)(COERCE_FLOAT(a1[1]) * a3) + (float)((float)(COERCE_FLOAT(*a1) * a2.m128_f32[0]) + _mm_shuffle_ps(v5, v5, 85).m128_f32[0]))) ) return 0; v7 = a1 + 3; v8 = 0LL; do { v9 = v8; if ( v8 == 5 ) break; v10 = _mm_mul_ps((__m128)*(v7 - 1), a2); v11 = _mm_shuffle_ps((__m128)*v7, (__m128)*v7, 85).m128_f32[0] + (float)((float)(COERCE_FLOAT(*v7) * a3) + (float)((float)(COERCE_FLOAT(*(v7 - 1)) * a2.m128_f32[0]) + _mm_shuffle_ps(v10, v10, 85).m128_f32[0])); v7 += 2; ++v8; } while ( v4 <= v11 ); return v9 >= 5; }
r3d_frustum_is_sphere_in: PUSH RBP MOV RBP,RSP XORPS XMM2,xmmword ptr [0x001e32e0] MOVSD XMM3,qword ptr [RDI] MOVSD XMM4,qword ptr [RDI + 0x8] MOVAPS XMM5,XMM3 MULPS XMM5,XMM0 SHUFPS XMM5,XMM5,0x55 MULSS XMM3,XMM0 ADDSS XMM3,XMM5 MOVAPS XMM5,XMM4 MULSS XMM5,XMM1 ADDSS XMM5,XMM3 SHUFPS XMM4,XMM4,0x55 ADDSS XMM4,XMM5 UCOMISS XMM2,XMM4 JBE 0x001e180c XOR EAX,EAX JMP 0x001e185d LAB_001e180c: ADD RDI,0x18 XOR ECX,ECX LAB_001e1812: MOV RAX,RCX CMP RCX,0x5 JZ 0x001e1856 MOVSD XMM3,qword ptr [RDI + -0x8] MOVSD XMM4,qword ptr [RDI] MOVAPS XMM5,XMM3 MULPS XMM5,XMM0 SHUFPS XMM5,XMM5,0x55 MULSS XMM3,XMM0 ADDSS XMM3,XMM5 MOVAPS XMM5,XMM4 MULSS XMM5,XMM1 ADDSS XMM5,XMM3 SHUFPS XMM4,XMM4,0x55 ADDSS XMM4,XMM5 ADD RDI,0x10 LEA RCX,[RAX + 0x1] UCOMISS XMM2,XMM4 JBE 0x001e1812 LAB_001e1856: CMP RAX,0x5 SETNC AL LAB_001e185d: POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 r3d_frustum_is_sphere_in(int8 param_1,float param_2,uint param_3,int8 *param_4) { int8 *puVar1; ulong uVar2; int8 uVar3; ulong uVar4; float fVar5; fVar5 = (float)((ulong)param_1 >> 0x20); if ((float)(param_3 ^ _DAT_001e32e0) <= (float)((ulong)param_4[1] >> 0x20) + (float)param_4[1] * param_2 + (float)*param_4 * (float)param_1 + (float)((ulong)*param_4 >> 0x20) * fVar5) { param_4 = param_4 + 3; uVar2 = 0; do { uVar4 = uVar2; if (uVar4 == 5) break; puVar1 = param_4 + -1; uVar3 = *param_4; param_4 = param_4 + 2; uVar2 = uVar4 + 1; } while ((float)(param_3 ^ _DAT_001e32e0) <= (float)((ulong)uVar3 >> 0x20) + (float)uVar3 * param_2 + (float)*puVar1 * (float)param_1 + (float)((ulong)*puVar1 >> 0x20) * fVar5); uVar3 = CONCAT71((int7)(uVar4 >> 8),4 < uVar4); } else { uVar3 = 0; } return uVar3; }
48,422
cpu_count_math_cpus(int)
monkey531[P]llama/common/common.cpp
static int cpu_count_math_cpus(int n_cpu) { int result = 0; for (int cpu = 0; cpu < n_cpu; ++cpu) { if (pin_cpu(cpu)) { return -1; } if (is_running_on_efficiency_core()) { continue; // efficiency cores harm lockstep threading } ++cpu; // hyperthreading isn't useful for linear algebra ++result; } return result; }
O0
cpp
cpu_count_math_cpus(int): subq $0x18, %rsp movl %edi, 0x10(%rsp) movl $0x0, 0xc(%rsp) movl $0x0, 0x8(%rsp) movl 0x8(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0xf315a movl 0x8(%rsp), %edi callq 0xfc940 cmpl $0x0, %eax je 0xf312a movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF jmp 0xf3162 callq 0xfc9e0 testb $0x1, %al jne 0xf3135 jmp 0xf3137 jmp 0xf314d movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) jmp 0xf3108 movl 0xc(%rsp), %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax,%rax)
_ZL19cpu_count_math_cpusi: sub rsp, 18h mov [rsp+18h+var_8], edi mov [rsp+18h+var_C], 0 mov [rsp+18h+var_10], 0 loc_F3108: mov eax, [rsp+18h+var_10] cmp eax, [rsp+18h+var_8] jge short loc_F315A mov edi, [rsp+18h+var_10]; int call _ZL7pin_cpui; pin_cpu(int) cmp eax, 0 jz short loc_F312A mov [rsp+18h+var_4], 0FFFFFFFFh jmp short loc_F3162 loc_F312A: call _ZL29is_running_on_efficiency_corev; is_running_on_efficiency_core(void) test al, 1 jnz short loc_F3135 jmp short loc_F3137 loc_F3135: jmp short loc_F314D loc_F3137: mov eax, [rsp+18h+var_10] add eax, 1 mov [rsp+18h+var_10], eax mov eax, [rsp+18h+var_C] add eax, 1 mov [rsp+18h+var_C], eax loc_F314D: mov eax, [rsp+18h+var_10] add eax, 1 mov [rsp+18h+var_10], eax jmp short loc_F3108 loc_F315A: mov eax, [rsp+18h+var_C] mov [rsp+18h+var_4], eax loc_F3162: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long cpu_count_math_cpus(int a1) { int i; // [rsp+8h] [rbp-10h] unsigned int v3; // [rsp+Ch] [rbp-Ch] v3 = 0; for ( i = 0; i < a1; ++i ) { if ( (unsigned int)pin_cpu(i) ) return (unsigned int)-1; if ( (is_running_on_efficiency_core() & 1) == 0 ) { ++i; ++v3; } } return v3; }
cpu_count_math_cpus: SUB RSP,0x18 MOV dword ptr [RSP + 0x10],EDI MOV dword ptr [RSP + 0xc],0x0 MOV dword ptr [RSP + 0x8],0x0 LAB_001f3108: MOV EAX,dword ptr [RSP + 0x8] CMP EAX,dword ptr [RSP + 0x10] JGE 0x001f315a MOV EDI,dword ptr [RSP + 0x8] CALL 0x001fc940 CMP EAX,0x0 JZ 0x001f312a MOV dword ptr [RSP + 0x14],0xffffffff JMP 0x001f3162 LAB_001f312a: CALL 0x001fc9e0 TEST AL,0x1 JNZ 0x001f3135 JMP 0x001f3137 LAB_001f3135: JMP 0x001f314d LAB_001f3137: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX LAB_001f314d: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x001f3108 LAB_001f315a: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x14],EAX LAB_001f3162: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* cpu_count_math_cpus(int) */ int cpu_count_math_cpus(int param_1) { int iVar1; ulong uVar2; int local_10; int local_c; local_c = 0; local_10 = 0; while( true ) { if (param_1 <= local_10) { return local_c; } iVar1 = pin_cpu(local_10); if (iVar1 != 0) break; uVar2 = is_running_on_efficiency_core(); if ((uVar2 & 1) == 0) { local_10 = local_10 + 1; local_c = local_c + 1; } local_10 = local_10 + 1; } return -1; }
48,423
ft_simple_get_word
eloqsql/storage/myisam/ft_parser.c
uchar ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end, FT_WORD *word, my_bool skip_stopwords) { uchar *doc= *start; uint mwc, length; int mbl; int ctype; DBUG_ENTER("ft_simple_get_word"); do { for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { if (doc >= end) DBUG_RETURN(0); mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) break; } mwc= length= 0; for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) mwc= 0; else if (!misc_word_char(*doc) || mwc) break; else mwc++; } word->len= (uint)(doc-word->pos) - mwc; if (skip_stopwords == FALSE || (length >= ft_min_word_len && length < ft_max_word_len && !is_stopword((char*) word->pos, word->len))) { *start= doc; DBUG_RETURN(1); } } while (doc < end); DBUG_RETURN(0); }
O3
c
ft_simple_get_word: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq %rdx, %r12 movq %rdi, %r13 movq %rsi, -0x40(%rbp) movq (%rsi), %r15 leaq -0x2c(%rbp), %rbx movl $0x1, %r14d cmpq %r12, %r15 jae 0x78ece movq 0xb8(%r13), %rax movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x78e26 cmpb $0x5f, (%r15) je 0x78e26 movl %eax, %ecx negl %ecx testl %eax, %eax cmovel %r14d, %ecx cmovgl %eax, %ecx addq %rcx, %r15 jmp 0x78de9 movq -0x38(%rbp), %rax movq %r15, (%rax) xorl %r14d, %r14d cmpq %r12, %r15 jae 0x78e77 movq 0xb8(%r13), %rax movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x78e57 cmpb $0x5f, (%r15) jne 0x78e7e incl %r14d movl %eax, %ecx negl %ecx testl %eax, %eax movl $0x1, %edx cmovel %edx, %ecx cmovgl %eax, %ecx addq %rcx, %r15 cmpq %r12, %r15 jb 0x78e35 xorl %ecx, %ecx jmp 0x78e80 movq %r15, %rdi xorl %ecx, %ecx jmp 0x78e8a movb $0x1, %cl movq -0x38(%rbp), %rax movq (%rax), %rdi movl %r14d, %r14d movl %r15d, %esi subl %edi, %esi movq %rsi, 0x10(%rax) cmpb $0x0, -0x30(%rbp) je 0x78edf leaq 0x316170(%rip), %rax # 0x38f010 cmpq %r14, (%rax) ja 0x78ec0 leaq 0x31616c(%rip), %rax # 0x38f018 cmpq %r14, (%rax) jbe 0x78ec0 movq %rcx, %r14 callq 0x76a1d movq %r14, %rcx testl %eax, %eax je 0x78edf testb %cl, %cl movl $0x1, %r14d jne 0x78de9 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x40(%rbp), %rax movq %r15, (%rax) movb $0x1, %al jmp 0x78ed0
ft_simple_get_word: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], r8d mov [rbp+var_38], rcx mov r12, rdx mov r13, rdi mov [rbp+var_40], rsi mov r15, [rsi] lea rbx, [rbp+var_2C] mov r14d, 1 loc_78DE9: cmp r15, r12 jnb loc_78ECE mov rax, [r13+0B8h] mov rdi, r13 mov rsi, rbx mov rdx, r15 mov rcx, r12 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz short loc_78E26 cmp byte ptr [r15], 5Fh ; '_' jz short loc_78E26 mov ecx, eax neg ecx test eax, eax cmovz ecx, r14d cmovg ecx, eax add r15, rcx jmp short loc_78DE9 loc_78E26: mov rax, [rbp+var_38] mov [rax], r15 xor r14d, r14d cmp r15, r12 jnb short loc_78E77 loc_78E35: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, rbx mov rdx, r15 mov rcx, r12 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz short loc_78E57 cmp byte ptr [r15], 5Fh ; '_' jnz short loc_78E7E loc_78E57: inc r14d mov ecx, eax neg ecx test eax, eax mov edx, 1 cmovz ecx, edx cmovg ecx, eax add r15, rcx cmp r15, r12 jb short loc_78E35 xor ecx, ecx jmp short loc_78E80 loc_78E77: mov rdi, r15 xor ecx, ecx jmp short loc_78E8A loc_78E7E: mov cl, 1 loc_78E80: mov rax, [rbp+var_38] mov rdi, [rax] mov r14d, r14d loc_78E8A: mov esi, r15d sub esi, edi mov [rax+10h], rsi cmp byte ptr [rbp+var_30], 0 jz short loc_78EDF lea rax, ft_min_word_len cmp [rax], r14 ja short loc_78EC0 lea rax, ft_max_word_len cmp [rax], r14 jbe short loc_78EC0 mov r14, rcx call is_stopword mov rcx, r14 test eax, eax jz short loc_78EDF loc_78EC0: test cl, cl mov r14d, 1 jnz loc_78DE9 loc_78ECE: xor eax, eax loc_78ED0: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_78EDF: mov rax, [rbp+var_40] mov [rax], r15 mov al, 1 jmp short loc_78ED0
char ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long *a4, char a5) { _BYTE *v7; // r15 int v8; // eax long long v9; // rcx long long *v10; // rax unsigned long long v11; // r14 int v12; // eax long long v13; // rcx char v14; // cl long long v15; // rdi long long v16; // rsi char v17; // r14 BOOL v18; // eax _BYTE v23[44]; // [rsp+14h] [rbp-2Ch] BYREF v7 = *a2; while ( 1 ) { while ( 1 ) { if ( (unsigned long long)v7 >= a3 ) return 0; v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v7, a3); if ( (v23[0] & 7) != 0 || *v7 == 95 ) break; v9 = (unsigned int)-v8; if ( !v8 ) v9 = 1LL; if ( v8 > 0 ) v9 = (unsigned int)v8; v7 += v9; } v10 = a4; *a4 = (long long)v7; v11 = 0LL; if ( (unsigned long long)v7 >= a3 ) { v15 = (long long)v7; v14 = 0; } else { while ( 1 ) { v12 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v7, a3); if ( (v23[0] & 7) == 0 && *v7 != 95 ) break; LODWORD(v11) = v11 + 1; v13 = (unsigned int)-v12; if ( !v12 ) v13 = 1LL; if ( v12 > 0 ) v13 = (unsigned int)v12; v7 += v13; if ( (unsigned long long)v7 >= a3 ) { v14 = 0; goto LABEL_21; } } v14 = 1; LABEL_21: v10 = a4; v15 = *a4; v11 = (unsigned int)v11; } v16 = (unsigned int)((_DWORD)v7 - v15); v10[2] = v16; if ( !a5 ) break; if ( ft_min_word_len <= v11 && ft_max_word_len > v11 ) { v17 = v14; v18 = is_stopword(v15, v16); v14 = v17; if ( !v18 ) break; } if ( !v14 ) return 0; } *a2 = v7; return 1; }
ft_simple_get_word: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x30],R8D MOV qword ptr [RBP + -0x38],RCX MOV R12,RDX MOV R13,RDI MOV qword ptr [RBP + -0x40],RSI MOV R15,qword ptr [RSI] LEA RBX,[RBP + -0x2c] MOV R14D,0x1 LAB_00178de9: CMP R15,R12 JNC 0x00178ece MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x00178e26 CMP byte ptr [R15],0x5f JZ 0x00178e26 MOV ECX,EAX NEG ECX TEST EAX,EAX CMOVZ ECX,R14D CMOVG ECX,EAX ADD R15,RCX JMP 0x00178de9 LAB_00178e26: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R15 XOR R14D,R14D CMP R15,R12 JNC 0x00178e77 LAB_00178e35: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x00178e57 CMP byte ptr [R15],0x5f JNZ 0x00178e7e LAB_00178e57: INC R14D MOV ECX,EAX NEG ECX TEST EAX,EAX MOV EDX,0x1 CMOVZ ECX,EDX CMOVG ECX,EAX ADD R15,RCX CMP R15,R12 JC 0x00178e35 XOR ECX,ECX JMP 0x00178e80 LAB_00178e77: MOV RDI,R15 XOR ECX,ECX JMP 0x00178e8a LAB_00178e7e: MOV CL,0x1 LAB_00178e80: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX] MOV R14D,R14D LAB_00178e8a: MOV ESI,R15D SUB ESI,EDI MOV qword ptr [RAX + 0x10],RSI CMP byte ptr [RBP + -0x30],0x0 JZ 0x00178edf LEA RAX,[0x48f010] CMP qword ptr [RAX],R14 JA 0x00178ec0 LEA RAX,[0x48f018] CMP qword ptr [RAX],R14 JBE 0x00178ec0 MOV R14,RCX CALL 0x00176a1d MOV RCX,R14 TEST EAX,EAX JZ 0x00178edf LAB_00178ec0: TEST CL,CL MOV R14D,0x1 JNZ 0x00178de9 LAB_00178ece: XOR EAX,EAX LAB_00178ed0: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00178edf: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R15 MOV AL,0x1 JMP 0x00178ed0
int8 ft_simple_get_word(long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5) { bool bVar1; uint uVar2; int iVar3; ulong uVar4; ulong uVar5; uint uVar6; char *pcVar7; char *pcVar8; byte local_34 [4]; pcVar7 = (char *)*param_2; do { while( true ) { if (param_3 <= pcVar7) { return 0; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7); if (((local_34[0] & 7) != 0) || (*pcVar7 == '_')) break; uVar4 = (ulong)-uVar2; if (uVar2 == 0) { uVar4 = 1; } if (0 < (int)uVar2) { uVar4 = (ulong)uVar2; } pcVar7 = pcVar7 + uVar4; } *param_4 = pcVar7; uVar4 = 0; if (pcVar7 < param_3) { do { uVar6 = (uint)uVar4; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7,param_3); if (((local_34[0] & 7) == 0) && (*pcVar7 != '_')) { bVar1 = true; pcVar8 = pcVar7; goto LAB_00178e80; } uVar6 = uVar6 + 1; uVar4 = (ulong)uVar6; uVar5 = (ulong)-uVar2; if (uVar2 == 0) { uVar5 = 1; } if (0 < (int)uVar2) { uVar5 = (ulong)uVar2; } pcVar7 = pcVar7 + uVar5; } while (pcVar7 < param_3); bVar1 = false; pcVar8 = pcVar7; LAB_00178e80: pcVar7 = (char *)*param_4; uVar4 = (ulong)uVar6; } else { bVar1 = false; pcVar8 = pcVar7; } param_4[2] = (ulong)(uint)((int)pcVar8 - (int)pcVar7); if ((param_5 == '\0') || (((ft_min_word_len <= uVar4 && (uVar4 < ft_max_word_len)) && (iVar3 = is_stopword(), iVar3 == 0)))) { *param_2 = pcVar8; return 1; } pcVar7 = pcVar8; if (!bVar1) { return 0; } } while( true ); }
48,424
PFS_buffer_scalable_container<PFS_mutex, 1024, 1024, PFS_buffer_default_array<PFS_mutex>, PFS_buffer_default_allocator<PFS_mutex>>::sanitize(PFS_mutex*)
eloqsql/storage/perfschema/pfs_buffer_container.h
value_type *sanitize(value_type *unsafe) { intptr offset; uint i; array_type *page; value_type *pfs; value_type *pfs_last; for (i=0 ; i < PFS_PAGE_COUNT; i++) { page= m_pages[i]; if (page != NULL) { pfs= page->get_first(); pfs_last= page->get_last(); if ((pfs <= unsafe) && (unsafe < pfs_last)) { offset= ((intptr) unsafe - (intptr) pfs) % sizeof(value_type); if (offset == 0) return unsafe; } } } return NULL; }
O0
c
PFS_buffer_scalable_container<PFS_mutex, 1024, 1024, PFS_buffer_default_array<PFS_mutex>, PFS_buffer_default_allocator<PFS_mutex>>::sanitize(PFS_mutex*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movl $0x0, -0x24(%rbp) cmpl $0x400, -0x24(%rbp) # imm = 0x400 jae 0x3837c movq -0x48(%rbp), %rax movl -0x24(%rbp), %ecx movq 0xa8(%rax,%rcx,8), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x3836c movq -0x30(%rbp), %rdi callq 0x38390 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi callq 0x383b0 movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax ja 0x3836a movq -0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x3836a movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax andq $0x7f, %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x38368 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x38384 jmp 0x3836a jmp 0x3836c jmp 0x3836e movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x382ef movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nop
_ZN29PFS_buffer_scalable_containerI9PFS_mutexLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE8sanitizeEPS0_: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_48], rax mov [rbp+var_24], 0 loc_382EF: cmp [rbp+var_24], 400h jnb loc_3837C mov rax, [rbp+var_48] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8+0A8h] mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_3836C mov rdi, [rbp+var_30] call _ZN24PFS_buffer_default_arrayI9PFS_mutexE9get_firstEv; PFS_buffer_default_array<PFS_mutex>::get_first(void) mov [rbp+var_38], rax mov rdi, [rbp+var_30] call _ZN24PFS_buffer_default_arrayI9PFS_mutexE8get_lastEv; PFS_buffer_default_array<PFS_mutex>::get_last(void) mov [rbp+var_40], rax mov rax, [rbp+var_38] cmp rax, [rbp+var_18] ja short loc_3836A mov rax, [rbp+var_18] cmp rax, [rbp+var_40] jnb short loc_3836A mov rax, [rbp+var_18] mov rcx, [rbp+var_38] sub rax, rcx and rax, 7Fh mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_38368 mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_38384 loc_38368: jmp short $+2 loc_3836A: jmp short $+2 loc_3836C: jmp short $+2 loc_3836E: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_382EF loc_3837C: mov [rbp+var_8], 0 loc_38384: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
unsigned long long PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>>::sanitize( long long a1, unsigned long long a2) { unsigned long long last; // [rsp+10h] [rbp-40h] unsigned long long first; // [rsp+18h] [rbp-38h] long long v5; // [rsp+20h] [rbp-30h] unsigned int i; // [rsp+2Ch] [rbp-24h] for ( i = 0; i < 0x400; ++i ) { v5 = *(_QWORD *)(a1 + 8LL * i + 168); if ( v5 ) { first = PFS_buffer_default_array<PFS_mutex>::get_first(v5); last = PFS_buffer_default_array<PFS_mutex>::get_last(v5); if ( first <= a2 && a2 < last && (((_BYTE)a2 - (_BYTE)first) & 0x7F) == 0 ) return a2; } } return 0LL; }
sanitize: 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] MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_001382ef: CMP dword ptr [RBP + -0x24],0x400 JNC 0x0013837c MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8 + 0xa8] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0013836c MOV RDI,qword ptr [RBP + -0x30] CALL 0x00138390 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x001383b0 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JA 0x0013836a MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0013836a MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX AND RAX,0x7f MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00138368 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x00138384 LAB_00138368: JMP 0x0013836a LAB_0013836a: JMP 0x0013836c LAB_0013836c: JMP 0x0013836e LAB_0013836e: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001382ef LAB_0013837c: MOV qword ptr [RBP + -0x8],0x0 LAB_00138384: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
/* PFS_buffer_scalable_container<PFS_mutex, 1024, 1024, PFS_buffer_default_array<PFS_mutex>, PFS_buffer_default_allocator<PFS_mutex> >::sanitize(PFS_mutex*) */ PFS_mutex * __thiscall PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> ::sanitize(PFS_buffer_scalable_container<PFS_mutex,1024,1024,PFS_buffer_default_array<PFS_mutex>,PFS_buffer_default_allocator<PFS_mutex>> *this,PFS_mutex *param_1) { PFS_buffer_default_array<PFS_mutex> *this_00; PFS_mutex *pPVar1; PFS_mutex *pPVar2; uint local_2c; local_2c = 0; do { if (0x3ff < local_2c) { return (PFS_mutex *)0x0; } this_00 = *(PFS_buffer_default_array<PFS_mutex> **)(this + (ulong)local_2c * 8 + 0xa8); if (this_00 != (PFS_buffer_default_array<PFS_mutex> *)0x0) { pPVar1 = (PFS_mutex *)PFS_buffer_default_array<PFS_mutex>::get_first(this_00); pPVar2 = (PFS_mutex *)PFS_buffer_default_array<PFS_mutex>::get_last(this_00); if (((pPVar1 <= param_1) && (param_1 < pPVar2)) && (((long)param_1 - (long)pPVar1 & 0x7fU) == 0)) { return param_1; } } local_2c = local_2c + 1; } while( true ); }
48,425
free_root
eloqsql/mysys/my_alloc.c
void free_root(MEM_ROOT *root, myf MyFlags) { reg1 USED_MEM *next,*old; DBUG_ENTER("free_root"); DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) /* There is no point in using mark_blocks_free when using valgrind as it will not reclaim any memory */ if (MyFlags & MY_MARK_BLOCKS_FREE) { mark_blocks_free(root); DBUG_VOID_RETURN; } #endif if (!(MyFlags & MY_KEEP_PREALLOC)) root->pre_alloc=0; for (next=root->used; next ;) { old=next; next= next->next ; if (old != root->pre_alloc) my_free(old); } for (next=root->free ; next ;) { old=next; next= next->next; if (old != root->pre_alloc) my_free(old); } root->used=root->free=0; if (root->pre_alloc) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM)); TRASH_MEM(root->pre_alloc); root->free->next=0; } root->block_num= 4; root->first_block_usage= 0; DBUG_VOID_RETURN; }
O0
c
free_root: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x43082 movq -0x10(%rbp), %rax andq $0x2, %rax cmpq $0x0, %rax je 0x4309e movq -0x8(%rbp), %rdi callq 0x431c0 jmp 0x431ad movq -0x10(%rbp), %rax andq $0x1, %rax cmpq $0x0, %rax jne 0x430b8 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x430f7 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x430f5 movq -0x20(%rbp), %rdi callq 0x30e80 jmp 0x430c4 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x43135 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x43133 movq -0x20(%rbp), %rdi callq 0x30e80 jmp 0x43102 movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x43195 movq -0x8(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rcx subq $0x18, %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) jmp 0x43183 jmp 0x43185 jmp 0x43187 movq -0x8(%rbp), %rax movq (%rax), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movl $0x4, 0x28(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x2c(%rax) jmp 0x431ad addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
free_root: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_43082: mov rax, [rbp+var_10] and rax, 2 cmp rax, 0 jz short loc_4309E mov rdi, [rbp+var_8] call mark_blocks_free jmp loc_431AD loc_4309E: mov rax, [rbp+var_10] and rax, 1 cmp rax, 0 jnz short loc_430B8 mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_430B8: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax loc_430C4: cmp [rbp+var_18], 0 jz short loc_430F7 mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_430F5 mov rdi, [rbp+var_20] call my_free loc_430F5: jmp short loc_430C4 loc_430F7: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax loc_43102: cmp [rbp+var_18], 0 jz short loc_43135 mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_43133 mov rdi, [rbp+var_20] call my_free loc_43133: jmp short loc_43102 loc_43135: mov rax, [rbp+var_8] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_43195 mov rax, [rbp+var_8] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rax+10h] sub rcx, 18h mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx jmp short $+2 loc_43183: jmp short $+2 loc_43185: jmp short $+2 loc_43187: mov rax, [rbp+var_8] mov rax, [rax] mov qword ptr [rax], 0 loc_43195: mov rax, [rbp+var_8] mov dword ptr [rax+28h], 4 mov rax, [rbp+var_8] mov dword ptr [rax+2Ch], 0 jmp short $+2 loc_431AD: add rsp, 20h pop rbp retn
long long free_root(long long a1, char a2) { long long result; // rax long long v3; // [rsp+0h] [rbp-20h] long long v4; // [rsp+0h] [rbp-20h] _QWORD *v5; // [rsp+8h] [rbp-18h] _QWORD *v6; // [rsp+8h] [rbp-18h] if ( (a2 & 2) != 0 ) return mark_blocks_free(a1); if ( (a2 & 1) == 0 ) *(_QWORD *)(a1 + 16) = 0LL; v5 = *(_QWORD **)(a1 + 8); while ( v5 ) { v3 = (long long)v5; v5 = (_QWORD *)*v5; if ( v3 != *(_QWORD *)(a1 + 16) ) my_free(v3); } v6 = *(_QWORD **)a1; while ( v6 ) { v4 = (long long)v6; v6 = (_QWORD *)*v6; if ( v4 != *(_QWORD *)(a1 + 16) ) my_free(v4); } *(_QWORD *)a1 = 0LL; *(_QWORD *)(a1 + 8) = 0LL; if ( *(_QWORD *)(a1 + 16) ) { *(_QWORD *)a1 = *(_QWORD *)(a1 + 16); *(_QWORD *)(*(_QWORD *)a1 + 8LL) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 16LL) - 24LL; **(_QWORD **)a1 = 0LL; } *(_DWORD *)(a1 + 40) = 4; result = a1; *(_DWORD *)(a1 + 44) = 0; return result; }
free_root: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00143082 LAB_00143082: MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x2 CMP RAX,0x0 JZ 0x0014309e MOV RDI,qword ptr [RBP + -0x8] CALL 0x001431c0 JMP 0x001431ad LAB_0014309e: MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x1 CMP RAX,0x0 JNZ 0x001430b8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_001430b8: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX LAB_001430c4: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001430f7 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x001430f5 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00130e80 LAB_001430f5: JMP 0x001430c4 LAB_001430f7: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_00143102: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00143135 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x00143133 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00130e80 LAB_00143133: JMP 0x00143102 LAB_00143135: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00143195 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX JMP 0x00143183 LAB_00143183: JMP 0x00143185 LAB_00143185: JMP 0x00143187 LAB_00143187: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],0x0 LAB_00143195: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x2c],0x0 JMP 0x001431ad LAB_001431ad: ADD RSP,0x20 POP RBP RET
void free_root(long *param_1,ulong param_2) { int8 *puVar1; int8 *local_20; if ((param_2 & 2) == 0) { if ((param_2 & 1) == 0) { param_1[2] = 0; } puVar1 = (int8 *)param_1[1]; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { my_free(local_20); } } puVar1 = (int8 *)*param_1; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { my_free(local_20); } } *param_1 = 0; param_1[1] = 0; if (param_1[2] != 0) { *param_1 = param_1[2]; *(long *)(*param_1 + 8) = *(long *)(param_1[2] + 0x10) + -0x18; *(int8 *)*param_1 = 0; } *(int4 *)(param_1 + 5) = 4; *(int4 *)((long)param_1 + 0x2c) = 0; } else { mark_blocks_free(param_1); } return; }
48,426
ma_init
eloqsql/libmariadb/libmariadb/ma_init.c
void ma_init(void) { if (ma_init_done) return; ma_init_done=1; { #ifdef _WIN32 my_win_init(); #endif return; } }
O0
c
ma_init: pushq %rbp movq %rsp, %rbp leaq 0x3f100e(%rip), %rax # 0x43b6e9 cmpb $0x0, (%rax) je 0x4a6e2 jmp 0x4a6ec leaq 0x3f1000(%rip), %rax # 0x43b6e9 movb $0x1, (%rax) popq %rbp retq nop
ma_init: push rbp mov rbp, rsp lea rax, ma_init_done cmp byte ptr [rax], 0 jz short loc_4A6E2 jmp short loc_4A6EC loc_4A6E2: lea rax, ma_init_done mov byte ptr [rax], 1 loc_4A6EC: pop rbp retn
void *ma_init() { void *result; // rax result = &ma_init_done; if ( !ma_init_done ) { result = &ma_init_done; ma_init_done = 1; } return result; }
ma_init: PUSH RBP MOV RBP,RSP LEA RAX,[0x53b6e9] CMP byte ptr [RAX],0x0 JZ 0x0014a6e2 JMP 0x0014a6ec LAB_0014a6e2: LEA RAX,[0x53b6e9] MOV byte ptr [RAX],0x1 LAB_0014a6ec: POP RBP RET
void ma_init(void) { if (ma_init_done == '\0') { ma_init_done = '\x01'; } return; }
48,427
prepare_resize_simple_key_cache
eloqsql/mysys/mf_keycache.c
static int prepare_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, my_bool release_lock) { int res= 0; DBUG_ENTER("prepare_resize_simple_key_cache"); keycache_pthread_mutex_lock(&keycache->cache_lock); /* We may need to wait for another thread which is doing a resize already. This cannot happen in the MySQL server though. It allows one resizer only. In set_var.cc keycache->in_init is used to block multiple attempts. */ while (keycache->in_resize) { /* purecov: begin inspected */ wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); /* purecov: end */ } /* Mark the operation in progress. This blocks other threads from doing a resize in parallel. It prohibits new blocks to enter the cache. Read/write requests can bypass the cache during the flush phase. */ keycache->in_resize= 1; /* Need to flush only if keycache is enabled. */ if (keycache->can_be_used && keycache->disk_blocks != -1) { /* Start the flush phase. */ keycache->resize_in_flush= 1; if (flush_all_key_blocks(keycache)) { /* TODO: if this happens, we should write a warning in the log file ! */ keycache->resize_in_flush= 0; keycache->can_be_used= 0; res= 1; goto finish; } DBUG_SLOW_ASSERT(cache_empty(keycache)); /* End the flush phase. */ keycache->resize_in_flush= 0; } /* Some direct read/write operations (bypassing the cache) may still be unfinished. Wait until they are done. If the key cache can be used, direct I/O is done in increments of key_cache_block_size. That is, every block is checked if it is in the cache. We need to wait for pending I/O before re-initializing the cache, because we may change the block size. Otherwise they could check for blocks at file positions where the new block division has none. We do also want to wait for I/O done when (if) the cache was disabled. It must not run in parallel with normal cache operation. */ while (keycache->cnt_for_resize_op) wait_on_queue(&keycache->waiting_for_resize_cnt, &keycache->cache_lock); end_simple_key_cache(keycache, 0); finish: if (release_lock) keycache_pthread_mutex_unlock(&keycache->cache_lock); DBUG_RETURN(res); }
O0
c
prepare_resize_simple_key_cache: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movl $0x0, -0x10(%rbp) movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x72cd3(%rip), %rsi # 0x15de5e movl $0x2a9, %edx # imm = 0x2A9 callq 0xe79b0 movq -0x8(%rbp), %rax cmpb $0x0, 0x1(%rax) je 0xeb1bc movq -0x8(%rbp), %rdi addq $0x108, %rdi # imm = 0x108 movq -0x8(%rbp), %rsi addq $0xc0, %rsi callq 0xe7a20 jmp 0xeb195 movq -0x8(%rbp), %rax movb $0x1, 0x1(%rax) movq -0x8(%rbp), %rax movsbl 0x3(%rax), %eax cmpl $0x0, %eax je 0xeb216 movq -0x8(%rbp), %rax cmpl $-0x1, 0x48(%rax) je 0xeb216 movq -0x8(%rbp), %rax movb $0x1, 0x2(%rax) movq -0x8(%rbp), %rdi callq 0xeb2c0 cmpl $0x0, %eax je 0xeb20a movq -0x8(%rbp), %rax movb $0x0, 0x2(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x3(%rax) movl $0x1, -0x10(%rbp) jmp 0xeb24b jmp 0xeb20c jmp 0xeb20e movq -0x8(%rbp), %rax movb $0x0, 0x2(%rax) jmp 0xeb218 movq -0x8(%rbp), %rax cmpq $0x0, 0x70(%rax) je 0xeb240 movq -0x8(%rbp), %rdi addq $0x110, %rdi # imm = 0x110 movq -0x8(%rbp), %rsi addq $0xc0, %rsi callq 0xe7a20 jmp 0xeb218 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0xeaeb0 cmpb $0x0, -0x9(%rbp) je 0xeb261 movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe83d0 jmp 0xeb263 movl -0x10(%rbp), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
prepare_resize_simple_key_cache: push rbp mov rbp, rsp sub rsp, 20h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov [rbp+var_10], 0 mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 2A9h call inline_mysql_mutex_lock_24 loc_EB195: mov rax, [rbp+var_8] cmp byte ptr [rax+1], 0 jz short loc_EB1BC mov rdi, [rbp+var_8] add rdi, 108h mov rsi, [rbp+var_8] add rsi, 0C0h call wait_on_queue jmp short loc_EB195 loc_EB1BC: mov rax, [rbp+var_8] mov byte ptr [rax+1], 1 mov rax, [rbp+var_8] movsx eax, byte ptr [rax+3] cmp eax, 0 jz short loc_EB216 mov rax, [rbp+var_8] cmp dword ptr [rax+48h], 0FFFFFFFFh jz short loc_EB216 mov rax, [rbp+var_8] mov byte ptr [rax+2], 1 mov rdi, [rbp+var_8] call flush_all_key_blocks cmp eax, 0 jz short loc_EB20A mov rax, [rbp+var_8] mov byte ptr [rax+2], 0 mov rax, [rbp+var_8] mov byte ptr [rax+3], 0 mov [rbp+var_10], 1 jmp short loc_EB24B loc_EB20A: jmp short $+2 loc_EB20C: jmp short $+2 loc_EB20E: mov rax, [rbp+var_8] mov byte ptr [rax+2], 0 loc_EB216: jmp short $+2 loc_EB218: mov rax, [rbp+var_8] cmp qword ptr [rax+70h], 0 jz short loc_EB240 mov rdi, [rbp+var_8] add rdi, 110h mov rsi, [rbp+var_8] add rsi, 0C0h call wait_on_queue jmp short loc_EB218 loc_EB240: mov rdi, [rbp+var_8] xor esi, esi call end_simple_key_cache loc_EB24B: cmp [rbp+var_9], 0 jz short loc_EB261 mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 loc_EB261: jmp short $+2 loc_EB263: mov eax, [rbp+var_10] mov [rbp+var_14], eax mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long prepare_resize_simple_key_cache(long long a1, char a2) { unsigned int v3; // [rsp+10h] [rbp-10h] v3 = 0; inline_mysql_mutex_lock_24(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x2A9u); while ( *(_BYTE *)(a1 + 1) ) wait_on_queue((long long *)(a1 + 264), (const char *)(a1 + 192)); *(_BYTE *)(a1 + 1) = 1; if ( !*(_BYTE *)(a1 + 3) || *(_DWORD *)(a1 + 72) == -1 ) { LABEL_9: while ( *(_QWORD *)(a1 + 112) ) wait_on_queue((long long *)(a1 + 272), (const char *)(a1 + 192)); end_simple_key_cache(a1, 0); goto LABEL_12; } *(_BYTE *)(a1 + 2) = 1; if ( !(unsigned int)flush_all_key_blocks(a1) ) { *(_BYTE *)(a1 + 2) = 0; goto LABEL_9; } *(_BYTE *)(a1 + 2) = 0; *(_BYTE *)(a1 + 3) = 0; v3 = 1; LABEL_12: if ( a2 ) inline_mysql_mutex_unlock_25(a1 + 192); return v3; }
prepare_resize_simple_key_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV dword ptr [RBP + -0x10],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x25de5e] MOV EDX,0x2a9 CALL 0x001e79b0 LAB_001eb195: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x1],0x0 JZ 0x001eb1bc MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x108 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc0 CALL 0x001e7a20 JMP 0x001eb195 LAB_001eb1bc: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x1],0x1 MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x3] CMP EAX,0x0 JZ 0x001eb216 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x48],-0x1 JZ 0x001eb216 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],0x1 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001eb2c0 CMP EAX,0x0 JZ 0x001eb20a MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x3],0x0 MOV dword ptr [RBP + -0x10],0x1 JMP 0x001eb24b LAB_001eb20a: JMP 0x001eb20c LAB_001eb20c: JMP 0x001eb20e LAB_001eb20e: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],0x0 LAB_001eb216: JMP 0x001eb218 LAB_001eb218: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x70],0x0 JZ 0x001eb240 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x110 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc0 CALL 0x001e7a20 JMP 0x001eb218 LAB_001eb240: MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x001eaeb0 LAB_001eb24b: CMP byte ptr [RBP + -0x9],0x0 JZ 0x001eb261 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e83d0 LAB_001eb261: JMP 0x001eb263 LAB_001eb263: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x20 POP RBP RET
int4 prepare_resize_simple_key_cache(long param_1,char param_2) { int iVar1; int4 local_18; local_18 = 0; inline_mysql_mutex_lock (param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x2a9); while (*(char *)(param_1 + 1) != '\0') { wait_on_queue(param_1 + 0x108); } *(int1 *)(param_1 + 1) = 1; if ((*(char *)(param_1 + 3) != '\0') && (*(int *)(param_1 + 0x48) != -1)) { *(int1 *)(param_1 + 2) = 1; iVar1 = flush_all_key_blocks(param_1); if (iVar1 != 0) { *(int1 *)(param_1 + 2) = 0; *(int1 *)(param_1 + 3) = 0; local_18 = 1; goto LAB_001eb24b; } *(int1 *)(param_1 + 2) = 0; } while (*(long *)(param_1 + 0x70) != 0) { wait_on_queue(param_1 + 0x110); } end_simple_key_cache(param_1,0); LAB_001eb24b: if (param_2 != '\0') { inline_mysql_mutex_unlock(param_1 + 0xc0); } return local_18; }
48,428
table_session_status::rnd_init(bool)
eloqsql/storage/perfschema/table_session_status.cc
int table_session_status::rnd_init(bool scan) { /* Build a cache of all status variables for this thread. */ m_status_cache.materialize_all(current_thd); /* Record the current number of status variables to detect subsequent changes. */ ulonglong status_version= m_status_cache.get_status_array_version(); /* The table context holds the current version of the global status array. If scan == true, then allocate a new context from mem_root and store in TLS. If scan == false, then restore from TLS. */ m_context= (table_session_status_context *)current_thd->alloc(sizeof(table_session_status_context)); new(m_context) table_session_status_context(status_version, !scan); return 0; }
O0
cpp
table_session_status::rnd_init(bool): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) andb $0x1, %al movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) addq $0x28, %rax movq %rax, -0x28(%rbp) callq 0x4936d0 movq -0x28(%rbp), %rdi movq %rax, %rsi callq 0xcff000 movq -0x20(%rbp), %rdi addq $0x28, %rdi callq 0xcfc680 movq %rax, -0x18(%rbp) callq 0x4936d0 movq %rax, %rdi addq $0x18, %rdi movl $0x38, %esi callq 0x4a51d0 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x548(%rax) movq 0x548(%rax), %rdi movq -0x18(%rbp), %rsi movb -0x9(%rbp), %al xorb $-0x1, %al movzbl %al, %edx andl $0x1, %edx callq 0xcff060 xorl %eax, %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN20table_session_status8rnd_initEb: push rbp mov rbp, rsp sub rsp, 30h mov al, sil mov [rbp+var_8], rdi and al, 1 mov [rbp+var_9], al mov rax, [rbp+var_8] mov [rbp+var_20], rax add rax, 28h ; '(' mov [rbp+var_28], rax call _current_thd mov rdi, [rbp+var_28] mov rsi, rax call _ZN18PFS_variable_cacheI15Status_variableE15materialize_allEP3THD; PFS_variable_cache<Status_variable>::materialize_all(THD *) mov rdi, [rbp+var_20] add rdi, 28h ; '('; this call _ZN25PFS_status_variable_cache24get_status_array_versionEv; PFS_status_variable_cache::get_status_array_version(void) mov [rbp+var_18], rax call _current_thd mov rdi, rax add rdi, 18h; this mov esi, 38h ; '8'; unsigned __int64 call _ZN11Query_arena5allocEm; Query_arena::alloc(ulong) mov rcx, rax mov rax, [rbp+var_20] mov [rax+548h], rcx mov rdi, [rax+548h]; this mov rsi, [rbp+var_18]; unsigned __int64 mov al, [rbp+var_9] xor al, 0FFh movzx edx, al and edx, 1; bool call _ZN28table_session_status_contextC2Eyb; table_session_status_context::table_session_status_context(ulong long,bool) xor eax, eax add rsp, 30h pop rbp retn
long long table_session_status::rnd_init(table_session_status *this, long long a2, long long a3) { long long v3; // rsi PFS_status_variable_cache *v4; // rdi long long v5; // rdx long long v6; // rax long long status_array_version; // [rsp+18h] [rbp-18h] char v10; // [rsp+27h] [rbp-9h] v10 = a2 & 1; v3 = current_thd(this, a2, a3); PFS_variable_cache<Status_variable>::materialize_all((char *)this + 40, v3); v4 = (table_session_status *)((char *)this + 40); status_array_version = PFS_status_variable_cache::get_status_array_version(v4); v6 = current_thd(v4, v3, v5); *((_QWORD *)this + 169) = Query_arena::alloc((Query_arena *)(v6 + 24), 56LL); table_session_status_context::table_session_status_context( *((table_session_status_context **)this + 169), status_array_version, (v10 & 1) == 0); return 0LL; }
list_add: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00cfec0e LAB_00cfec0e: CMP qword ptr [RBP + -0x8],0x0 JZ 0x00cfec49 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x00cfec2e MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX LAB_00cfec2e: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX JMP 0x00cfec54 LAB_00cfec49: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 LAB_00cfec54: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
long * list_add(long *param_1,long *param_2) { if (param_1 == (long *)0x0) { *param_2 = 0; } else { if (*param_1 != 0) { *(long **)(*param_1 + 8) = param_2; } *param_2 = *param_1; *param_1 = (long)param_2; } param_2[1] = (long)param_1; return param_2; }
48,429
mysql_server_init
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) { #ifdef _WIN32 BOOL ret = InitOnceExecuteOnce(&init_once, win_init_once, NULL, NULL); return ret? 0: 1; #else return pthread_once(&init_once, mysql_once_init); #endif }
O3
c
mysql_server_init: pushq %rbp movq %rsp, %rbp leaq 0x3e8c9e(%rip), %rdi # 0x45e658 leaq 0x4a33(%rip), %rsi # 0x7a3f4 popq %rbp jmp 0x5f2f0
mysql_server_init: push rbp mov rbp, rsp lea rdi, init_once lea rsi, mysql_once_init pop rbp jmp _pthread_once
long long mysql_server_init() { return pthread_once(&init_once, mysql_once_init); }
mysql_server_init: PUSH RBP MOV RBP,RSP LEA RDI,[0x55e658] LEA RSI,[0x17a3f4] POP RBP JMP 0x0015f2f0
void mysql_server_init(void) { pthread_once(&init_once,mysql_once_init); return; }
48,430
psi_cond_timedwait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex, const struct timespec *abstime, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line); int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); if (psi_likely(locker)) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O3
c
psi_cond_timedwait: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r8d, %r9d movq %rcx, %r8 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 leaq 0x2c9e3e(%rip), %r13 # 0x2ee820 movq (%r13), %rax movq 0x30(%rdi), %rsi movq 0x40(%r15), %rdx leaq -0x60(%rbp), %rdi pushq $0x1 popq %rcx callq *0x1c0(%rax) movq %rax, %rbx movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x244c0 movl %eax, %r14d testq %rbx, %rbx jne 0x24a26 movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r13), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1c8(%rax) jmp 0x24a14
psi_cond_timedwait: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r9d, r8d mov r8, rcx mov r14, rdx mov r15, rsi mov r12, rdi lea r13, PSI_server mov rax, [r13+0] mov rsi, [rdi+30h] mov rdx, [r15+40h] lea rdi, [rbp+var_60] push 1 pop rcx call qword ptr [rax+1C0h] mov rbx, rax mov rdi, r12 mov rsi, r15 mov rdx, r14 call _pthread_cond_timedwait mov r14d, eax test rbx, rbx jnz short loc_24A26 loc_24A14: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_24A26: mov rax, [r13+0] mov rdi, rbx mov esi, r14d call qword ptr [rax+1C8h] jmp short loc_24A14
long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v6; // rbx unsigned int v7; // r14d _BYTE v9[96]; // [rsp+0h] [rbp-60h] BYREF v6 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server[0] + 56))( v9, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 1LL, a4, a5); v7 = pthread_cond_timedwait(a1, a2, a3); if ( v6 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 57))(v6, v7); return v7; }
psi_cond_timedwait: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R9D,R8D MOV R8,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI LEA R13,[0x3ee820] MOV RAX,qword ptr [R13] MOV RSI,qword ptr [RDI + 0x30] MOV RDX,qword ptr [R15 + 0x40] LEA RDI,[RBP + -0x60] PUSH 0x1 POP RCX CALL qword ptr [RAX + 0x1c0] MOV RBX,RAX MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x001244c0 MOV R14D,EAX TEST RBX,RBX JNZ 0x00124a26 LAB_00124a14: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00124a26: MOV RAX,qword ptr [R13] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1c8] JMP 0x00124a14
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3, int8 param_4,int4 param_5) { int iVar1; long lVar2; int1 local_68 [56]; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4, param_5); iVar1 = pthread_cond_timedwait(param_1,param_2,param_3); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
48,431
mi_keyseg_read
eloqsql/storage/myisam/mi_open.c
uchar *mi_keyseg_read(uchar *ptr, HA_KEYSEG *keyseg) { keyseg->type = *ptr++; keyseg->language = *ptr++; keyseg->null_bit = *ptr++; keyseg->bit_start = *ptr++; keyseg->language += ((uint16) (*ptr++)) << 8; keyseg->bit_length = *ptr++; keyseg->flag = mi_uint2korr(ptr); ptr +=2; keyseg->length = mi_uint2korr(ptr); ptr +=2; keyseg->start = mi_uint4korr(ptr); ptr +=4; keyseg->null_pos = mi_uint4korr(ptr); ptr +=4; keyseg->charset=0; /* Will be filled in later */ if (keyseg->null_bit) /* We adjust bit_pos if null_bit is last in the byte */ keyseg->bit_pos= (uint16)(keyseg->null_pos + (keyseg->null_bit == (1 << 7))); else { keyseg->bit_pos= (uint16)keyseg->null_pos; keyseg->null_pos= 0; } return ptr; }
O0
c
mi_keyseg_read: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x18(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movzbl (%rax), %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x16(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x19(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x1a(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movzbl (%rax), %eax movzwl %ax, %edx shll $0x8, %edx movq -0x10(%rbp), %rax movzwl 0x16(%rax), %ecx addl %edx, %ecx movw %cx, 0x16(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x1b(%rax) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x12(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x14(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shll $0x8, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax shll $0x10, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl (%rax), %eax shll $0x18, %eax orl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax addq $0x4, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shll $0x8, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax shll $0x10, %eax orl %eax, %ecx movq -0x8(%rbp), %rax movzbl (%rax), %eax shll $0x18, %eax orl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rax addq $0x4, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0xb65a5 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movq -0x10(%rbp), %rcx movzbl 0x19(%rcx), %ecx cmpl $0x80, %ecx sete %cl andb $0x1, %cl movzbl %cl, %ecx addl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x10(%rax) jmp 0xb65c2 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0xc(%rax) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
mi_keyseg_read: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+18h], cl mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movzx eax, byte ptr [rax] mov cx, ax mov rax, [rbp+var_10] mov [rax+16h], cx mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+19h], cl mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+1Ah], cl mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movzx eax, byte ptr [rax] movzx edx, ax shl edx, 8 mov rax, [rbp+var_10] movzx ecx, word ptr [rax+16h] add ecx, edx mov [rax+16h], cx mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+1Bh], cl mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+12h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+14h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl eax, 8 or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] shl eax, 10h or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax] shl eax, 18h or ecx, eax mov rax, [rbp+var_10] mov [rax+8], ecx mov rax, [rbp+var_8] add rax, 4 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl eax, 8 or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] shl eax, 10h or ecx, eax mov rax, [rbp+var_8] movzx eax, byte ptr [rax] shl eax, 18h or ecx, eax mov rax, [rbp+var_10] mov [rax+0Ch], ecx mov rax, [rbp+var_8] add rax, 4 mov [rbp+var_8], rax mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov rax, [rbp+var_10] cmp byte ptr [rax+19h], 0 jz short loc_B65A5 mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+19h] cmp ecx, 80h setz cl and cl, 1 movzx ecx, cl add eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+10h], cx jmp short loc_B65C2 loc_B65A5: mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov cx, ax mov rax, [rbp+var_10] mov [rax+10h], cx mov rax, [rbp+var_10] mov dword ptr [rax+0Ch], 0 loc_B65C2: mov rax, [rbp+var_8] pop rbp retn
long long mi_keyseg_read(long long a1, long long a2) { *(_BYTE *)(a2 + 24) = *(_BYTE *)a1; *(_WORD *)(a2 + 22) = *(unsigned __int8 *)(a1 + 1); *(_BYTE *)(a2 + 25) = *(_BYTE *)(a1 + 2); *(_BYTE *)(a2 + 26) = *(_BYTE *)(a1 + 3); *(_WORD *)(a2 + 22) += *(unsigned __int8 *)(a1 + 4) << 8; *(_BYTE *)(a2 + 27) = *(_BYTE *)(a1 + 5); *(_WORD *)(a2 + 18) = _byteswap_ushort(*(_WORD *)(a1 + 6)); *(_WORD *)(a2 + 20) = _byteswap_ushort(*(_WORD *)(a1 + 8)); *(_DWORD *)(a2 + 8) = _byteswap_ulong(*(_DWORD *)(a1 + 10)); *(_DWORD *)(a2 + 12) = _byteswap_ulong(*(_DWORD *)(a1 + 14)); *(_QWORD *)a2 = 0LL; if ( *(_BYTE *)(a2 + 25) ) { *(_WORD *)(a2 + 16) = (*(unsigned __int8 *)(a2 + 25) == 128) + (unsigned __int16)*(_DWORD *)(a2 + 12); } else { *(_WORD *)(a2 + 16) = *(_DWORD *)(a2 + 12); *(_DWORD *)(a2 + 12) = 0; } return a1 + 18; }
mi_keyseg_read: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x18],CL MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVZX EAX,byte ptr [RAX] MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x16],CX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x19],CL MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1a],CL MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVZX EAX,byte ptr [RAX] MOVZX EDX,AX SHL EDX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX + 0x16] ADD ECX,EDX MOV word ptr [RAX + 0x16],CX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1b],CL MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x12],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x14],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x10 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] SHL EAX,0x18 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL EAX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x10 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] SHL EAX,0x18 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x19],0x0 JZ 0x001b65a5 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x19] CMP ECX,0x80 SETZ CL AND CL,0x1 MOVZX ECX,CL ADD EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x10],CX JMP 0x001b65c2 LAB_001b65a5: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0x10],CX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],0x0 LAB_001b65c2: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * mi_keyseg_read(int1 *param_1,int8 *param_2) { *(int1 *)(param_2 + 3) = *param_1; *(ushort *)((long)param_2 + 0x16) = (ushort)(byte)param_1[1]; *(int1 *)((long)param_2 + 0x19) = param_1[2]; *(int1 *)((long)param_2 + 0x1a) = param_1[3]; *(ushort *)((long)param_2 + 0x16) = *(short *)((long)param_2 + 0x16) + (ushort)(byte)param_1[4] * 0x100; *(int1 *)((long)param_2 + 0x1b) = param_1[5]; *(ushort *)((long)param_2 + 0x12) = CONCAT11(param_1[6],param_1[7]); *(ushort *)((long)param_2 + 0x14) = CONCAT11(param_1[8],param_1[9]); *(uint *)(param_2 + 1) = CONCAT13(param_1[10],CONCAT12(param_1[0xb],CONCAT11(param_1[0xc],param_1[0xd]))); *(uint *)((long)param_2 + 0xc) = CONCAT13(param_1[0xe],CONCAT12(param_1[0xf],CONCAT11(param_1[0x10],param_1[0x11]))); *param_2 = 0; if (*(char *)((long)param_2 + 0x19) == '\0') { *(short *)(param_2 + 2) = (short)*(int4 *)((long)param_2 + 0xc); *(int4 *)((long)param_2 + 0xc) = 0; } else { *(ushort *)(param_2 + 2) = (short)*(int4 *)((long)param_2 + 0xc) + (ushort)(*(char *)((long)param_2 + 0x19) == -0x80); } return param_1 + 0x12; }
48,432
ggml_compute_forward_get_rows_bf16
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_get_rows_bf16( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; const struct ggml_tensor * src1 = dst->src[1]; GGML_TENSOR_BINARY_OP_LOCALS const int64_t nc = ne00; const int64_t nr = ggml_nelements(src1); assert(ne0 == nc); assert(ne02 == ne11); assert(nb00 == sizeof(ggml_bf16_t)); assert(ggml_nrows(dst) == nr); const int ith = params->ith; const int nth = params->nth; // rows per thread const int dr = (nr + nth - 1)/nth; // row range for this thread const int ir0 = dr*ith; const int ir1 = MIN(ir0 + dr, nr); for (int64_t i = ir0; i < ir1; ++i) { const int64_t i12 = i/(ne11*ne10); const int64_t i11 = (i - i12*ne11*ne10)/ne10; const int64_t i10 = (i - i12*ne11*ne10 - i11*ne10); const int64_t i01 = *(int32_t *) ((char *) src1->data + i10*nb10 + i11*nb11 + i12*nb12); GGML_ASSERT(i01 >= 0 && i01 < ne01); ggml_bf16_to_fp32_row( (const void *) ((char *) src0->data + i01*nb01 + i11*nb02 + i12*nb03), (float *) ((char *) dst->data + i10*nb1 + i11*nb2 + i12*nb3), nc); } }
O0
c
ggml_compute_forward_get_rows_bf16: pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x68(%rbp) movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x70(%rbp) movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x78(%rbp) movq -0x20(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x80(%rbp) movq -0x20(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x88(%rbp) movq -0x20(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x90(%rbp) movq -0x20(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x98(%rbp) movq -0x20(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0xa0(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0xa8(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0xb0(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0xb8(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0xc0(%rbp) movq -0x10(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0xc8(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0xd0(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0xd8(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0xe0(%rbp) movq -0x28(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0x20(%rbp), %rdi callq 0xdb10 movq %rax, -0xf0(%rbp) movq -0xa8(%rbp), %rax cmpq -0xe8(%rbp), %rax jne 0x2d192 jmp 0x2d1b1 leaq 0x47e6e(%rip), %rdi # 0x75007 leaq 0x469c2(%rip), %rsi # 0x73b62 movl $0x20ca, %edx # imm = 0x20CA leaq 0x47f5f(%rip), %rcx # 0x7510b callq 0xd690 movq -0x38(%rbp), %rax cmpq -0x70(%rbp), %rax jne 0x2d1bd jmp 0x2d1dc leaq 0x47eac(%rip), %rdi # 0x75070 leaq 0x46997(%rip), %rsi # 0x73b62 movl $0x20cb, %edx # imm = 0x20CB leaq 0x47f34(%rip), %rcx # 0x7510b callq 0xd690 cmpq $0x2, -0x48(%rbp) jne 0x2d1e5 jmp 0x2d204 leaq 0x47256(%rip), %rdi # 0x74442 leaq 0x4696f(%rip), %rsi # 0x73b62 movl $0x20cc, %edx # imm = 0x20CC leaq 0x47f0c(%rip), %rcx # 0x7510b callq 0xd690 movq -0x10(%rbp), %rdi callq 0xdc20 cmpq -0xf0(%rbp), %rax jne 0x2d218 jmp 0x2d237 leaq 0x47e5e(%rip), %rdi # 0x7507d leaq 0x4693c(%rip), %rsi # 0x73b62 movl $0x20cd, %edx # imm = 0x20CD leaq 0x47ed9(%rip), %rcx # 0x7510b callq 0xd690 movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, -0xf4(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0xf8(%rbp) movq -0xf0(%rbp), %rax movslq -0xf8(%rbp), %rcx addq %rcx, %rax subq $0x1, %rax movslq -0xf8(%rbp), %rcx cqto idivq %rcx movl %eax, -0xfc(%rbp) movl -0xfc(%rbp), %eax imull -0xf4(%rbp), %eax movl %eax, -0x100(%rbp) movl -0x100(%rbp), %eax addl -0xfc(%rbp), %eax cltq cmpq -0xf0(%rbp), %rax jge 0x2d2b8 movl -0x100(%rbp), %eax addl -0xfc(%rbp), %eax cltq movq %rax, -0x138(%rbp) jmp 0x2d2c6 movq -0xf0(%rbp), %rax movq %rax, -0x138(%rbp) movq -0x138(%rbp), %rax movl %eax, -0x104(%rbp) movslq -0x100(%rbp), %rax movq %rax, -0x110(%rbp) movq -0x110(%rbp), %rax movslq -0x104(%rbp), %rcx cmpq %rcx, %rax jge 0x2d48a movq -0x110(%rbp), %rax movq -0x70(%rbp), %rcx imulq -0x68(%rbp), %rcx cqto idivq %rcx movq %rax, -0x118(%rbp) movq -0x110(%rbp), %rax movq -0x118(%rbp), %rcx imulq -0x70(%rbp), %rcx imulq -0x68(%rbp), %rcx subq %rcx, %rax cqto idivq -0x68(%rbp) movq %rax, -0x120(%rbp) movq -0x110(%rbp), %rax movq -0x118(%rbp), %rcx imulq -0x70(%rbp), %rcx imulq -0x68(%rbp), %rcx subq %rcx, %rax movq -0x120(%rbp), %rcx imulq -0x68(%rbp), %rcx subq %rcx, %rax movq %rax, -0x128(%rbp) movq -0x20(%rbp), %rax movq 0xf8(%rax), %rax movq -0x128(%rbp), %rcx imulq -0x88(%rbp), %rcx addq %rcx, %rax movq -0x120(%rbp), %rcx imulq -0x90(%rbp), %rcx addq %rcx, %rax movq -0x118(%rbp), %rcx imulq -0x98(%rbp), %rcx movslq (%rax,%rcx), %rax movq %rax, -0x130(%rbp) cmpq $0x0, -0x130(%rbp) jl 0x2d3cd movq -0x130(%rbp), %rax cmpq -0x30(%rbp), %rax jl 0x2d3ee leaq 0x4678e(%rip), %rdi # 0x73b62 movl $0x20df, %esi # imm = 0x20DF leaq 0x467e1(%rip), %rdx # 0x73bc1 leaq 0x47cac(%rip), %rcx # 0x75093 movb $0x0, %al callq 0xe270 movq -0x18(%rbp), %rax movq 0xf8(%rax), %rdi movq -0x130(%rbp), %rax imulq -0x50(%rbp), %rax addq %rax, %rdi movq -0x120(%rbp), %rax imulq -0x58(%rbp), %rax addq %rax, %rdi movq -0x118(%rbp), %rax imulq -0x60(%rbp), %rax addq %rax, %rdi movq -0x10(%rbp), %rax movq 0xf8(%rax), %rsi movq -0x128(%rbp), %rax imulq -0xd0(%rbp), %rax addq %rax, %rsi movq -0x120(%rbp), %rax imulq -0xd8(%rbp), %rax addq %rax, %rsi movq -0x118(%rbp), %rax imulq -0xe0(%rbp), %rax addq %rax, %rsi movq -0xe8(%rbp), %rdx callq 0xd1b0 movq -0x110(%rbp), %rax addq $0x1, %rax movq %rax, -0x110(%rbp) jmp 0x2d2e1 addq $0x140, %rsp # imm = 0x140 popq %rbp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_get_rows_bf16: push rbp mov rbp, rsp sub rsp, 140h 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_10] mov rax, [rax+0A0h] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+30h] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rbp+var_50], rax mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rax, [rax+48h] mov [rbp+var_60], rax mov rax, [rbp+var_20] mov rax, [rax+10h] mov [rbp+var_68], rax mov rax, [rbp+var_20] mov rax, [rax+18h] mov [rbp+var_70], rax mov rax, [rbp+var_20] mov rax, [rax+20h] mov [rbp+var_78], rax mov rax, [rbp+var_20] mov rax, [rax+28h] mov [rbp+var_80], rax mov rax, [rbp+var_20] mov rax, [rax+30h] mov [rbp+var_88], rax mov rax, [rbp+var_20] mov rax, [rax+38h] mov [rbp+var_90], rax mov rax, [rbp+var_20] mov rax, [rax+40h] mov [rbp+var_98], rax mov rax, [rbp+var_20] mov rax, [rax+48h] mov [rbp+var_A0], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_A8], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_B0], rax mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_B8], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_C0], rax mov rax, [rbp+var_10] mov rax, [rax+30h] mov [rbp+var_C8], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_D0], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov [rbp+var_D8], rax mov rax, [rbp+var_10] mov rax, [rax+48h] mov [rbp+var_E0], rax mov rax, [rbp+var_28] mov [rbp+var_E8], rax mov rdi, [rbp+var_20] call _ggml_nelements mov [rbp+var_F0], rax mov rax, [rbp+var_A8] cmp rax, [rbp+var_E8] jnz short loc_2D192 jmp short loc_2D1B1 loc_2D192: lea rdi, aNe0Nc; "ne0 == nc" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 20CAh lea rcx, aVoidGgmlComput_17; "void ggml_compute_forward_get_rows_bf16"... call ___assert_fail loc_2D1B1: mov rax, [rbp+var_38] cmp rax, [rbp+var_70] jnz short loc_2D1BD jmp short loc_2D1DC loc_2D1BD: lea rdi, aNe02Ne11; "ne02 == ne11" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 20CBh lea rcx, aVoidGgmlComput_17; "void ggml_compute_forward_get_rows_bf16"... call ___assert_fail loc_2D1DC: cmp [rbp+var_48], 2 jnz short loc_2D1E5 jmp short loc_2D204 loc_2D1E5: lea rdi, aNb00SizeofGgml_0; "nb00 == sizeof(ggml_bf16_t)" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 20CCh lea rcx, aVoidGgmlComput_17; "void ggml_compute_forward_get_rows_bf16"... call ___assert_fail loc_2D204: mov rdi, [rbp+var_10] call _ggml_nrows cmp rax, [rbp+var_F0] jnz short loc_2D218 jmp short loc_2D237 loc_2D218: lea rdi, aGgmlNrowsDstNr; "ggml_nrows(dst) == nr" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 20CDh lea rcx, aVoidGgmlComput_17; "void ggml_compute_forward_get_rows_bf16"... call ___assert_fail loc_2D237: mov rax, [rbp+var_8] mov eax, [rax] mov [rbp+var_F4], eax mov rax, [rbp+var_8] mov eax, [rax+4] mov [rbp+var_F8], eax mov rax, [rbp+var_F0] movsxd rcx, [rbp+var_F8] add rax, rcx sub rax, 1 movsxd rcx, [rbp+var_F8] cqo idiv rcx mov [rbp+var_FC], eax mov eax, [rbp+var_FC] imul eax, [rbp+var_F4] mov [rbp+var_100], eax mov eax, [rbp+var_100] add eax, [rbp+var_FC] cdqe cmp rax, [rbp+var_F0] jge short loc_2D2B8 mov eax, [rbp+var_100] add eax, [rbp+var_FC] cdqe mov [rbp+var_138], rax jmp short loc_2D2C6 loc_2D2B8: mov rax, [rbp+var_F0] mov [rbp+var_138], rax loc_2D2C6: mov rax, [rbp+var_138] mov [rbp+var_104], eax movsxd rax, [rbp+var_100] mov [rbp+var_110], rax loc_2D2E1: mov rax, [rbp+var_110] movsxd rcx, [rbp+var_104] cmp rax, rcx jge loc_2D48A mov rax, [rbp+var_110] mov rcx, [rbp+var_70] imul rcx, [rbp+var_68] cqo idiv rcx mov [rbp+var_118], rax mov rax, [rbp+var_110] mov rcx, [rbp+var_118] imul rcx, [rbp+var_70] imul rcx, [rbp+var_68] sub rax, rcx cqo idiv [rbp+var_68] mov [rbp+var_120], rax mov rax, [rbp+var_110] mov rcx, [rbp+var_118] imul rcx, [rbp+var_70] imul rcx, [rbp+var_68] sub rax, rcx mov rcx, [rbp+var_120] imul rcx, [rbp+var_68] sub rax, rcx mov [rbp+var_128], rax mov rax, [rbp+var_20] mov rax, [rax+0F8h] mov rcx, [rbp+var_128] imul rcx, [rbp+var_88] add rax, rcx mov rcx, [rbp+var_120] imul rcx, [rbp+var_90] add rax, rcx mov rcx, [rbp+var_118] imul rcx, [rbp+var_98] movsxd rax, dword ptr [rax+rcx] mov [rbp+var_130], rax cmp [rbp+var_130], 0 jl short loc_2D3CD mov rax, [rbp+var_130] cmp rax, [rbp+var_30] jl short loc_2D3EE loc_2D3CD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 20DFh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aI010I01Ne01; "i01 >= 0 && i01 < ne01" mov al, 0 call _ggml_abort loc_2D3EE: mov rax, [rbp+var_18] mov rdi, [rax+0F8h] mov rax, [rbp+var_130] imul rax, [rbp+var_50] add rdi, rax mov rax, [rbp+var_120] imul rax, [rbp+var_58] add rdi, rax mov rax, [rbp+var_118] imul rax, [rbp+var_60] add rdi, rax mov rax, [rbp+var_10] mov rsi, [rax+0F8h] mov rax, [rbp+var_128] imul rax, [rbp+var_D0] add rsi, rax mov rax, [rbp+var_120] imul rax, [rbp+var_D8] add rsi, rax mov rax, [rbp+var_118] imul rax, [rbp+var_E0] add rsi, rax mov rdx, [rbp+var_E8] call _ggml_bf16_to_fp32_row mov rax, [rbp+var_110] add rax, 1 mov [rbp+var_110], rax jmp loc_2D2E1 loc_2D48A: add rsp, 140h pop rbp retn
long long ggml_compute_forward_get_rows_bf16(_DWORD *a1, _QWORD *a2) { long long result; // rax int v3; // [rsp+8h] [rbp-138h] long long v4; // [rsp+10h] [rbp-130h] long long v5; // [rsp+20h] [rbp-120h] long long i; // [rsp+30h] [rbp-110h] int v7; // [rsp+40h] [rbp-100h] int v8; // [rsp+44h] [rbp-FCh] long long v9; // [rsp+50h] [rbp-F0h] long long v10; // [rsp+58h] [rbp-E8h] long long v11; // [rsp+60h] [rbp-E0h] long long v12; // [rsp+68h] [rbp-D8h] long long v13; // [rsp+70h] [rbp-D0h] long long v14; // [rsp+98h] [rbp-A8h] long long v15; // [rsp+A8h] [rbp-98h] long long v16; // [rsp+B0h] [rbp-90h] long long v17; // [rsp+B8h] [rbp-88h] long long v18; // [rsp+D0h] [rbp-70h] long long v19; // [rsp+D8h] [rbp-68h] long long v20; // [rsp+E0h] [rbp-60h] long long v21; // [rsp+E8h] [rbp-58h] long long v22; // [rsp+F0h] [rbp-50h] long long v23; // [rsp+F8h] [rbp-48h] long long v24; // [rsp+108h] [rbp-38h] long long v25; // [rsp+110h] [rbp-30h] _QWORD *v26; // [rsp+120h] [rbp-20h] _QWORD *v27; // [rsp+128h] [rbp-18h] v27 = (_QWORD *)a2[19]; v26 = (_QWORD *)a2[20]; v25 = v27[3]; v24 = v27[4]; v23 = v27[6]; v22 = v27[7]; v21 = v27[8]; v20 = v27[9]; v19 = v26[2]; v18 = v26[3]; v17 = v26[6]; v16 = v26[7]; v15 = v26[8]; v14 = a2[2]; v13 = a2[7]; v12 = a2[8]; v11 = a2[9]; v10 = v27[2]; v9 = ggml_nelements(v26); if ( v14 != v10 ) __assert_fail( "ne0 == nc", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8394LL, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)"); if ( v24 != v18 ) __assert_fail( "ne02 == ne11", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8395LL, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)"); if ( v23 != 2 ) __assert_fail( "nb00 == sizeof(ggml_bf16_t)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8396LL, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)"); if ( ggml_nrows(a2) != v9 ) __assert_fail( "ggml_nrows(dst) == nr", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8397LL, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)"); v8 = ((int)a1[1] + v9 - 1) / (int)a1[1]; v7 = *a1 * v8; if ( v8 + v7 >= v9 ) v3 = v9; else v3 = v8 + v7; for ( i = v7; ; ++i ) { result = i; if ( i >= v3 ) break; v4 = *(int *)(v16 * ((i - v19 * v18 * (i / (v19 * v18))) / v19) + v17 * ((i - v19 * v18 * (i / (v19 * v18))) % v19) + v26[31] + v15 * (i / (v19 * v18))); if ( v4 < 0 || v4 >= v25 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8415LL, "GGML_ASSERT(%s) failed", "i01 >= 0 && i01 < ne01"); v5 = (i - v19 * v18 * (i / (v19 * v18))) / v19; ggml_bf16_to_fp32_row( v20 * (i / (v19 * v18)) + v21 * v5 + v22 * v4 + v27[31], v11 * (i / (v19 * v18)) + v12 * v5 + v13 * ((i - v19 * v18 * (i / (v19 * v18))) % v19) + a2[31], v10); } return result; }
ggml_compute_forward_get_rows_bf16: PUSH RBP MOV RBP,RSP SUB RSP,0x140 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 + -0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0xe0],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0xe8],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010db10 MOV qword ptr [RBP + -0xf0],RAX MOV RAX,qword ptr [RBP + -0xa8] CMP RAX,qword ptr [RBP + -0xe8] JNZ 0x0012d192 JMP 0x0012d1b1 LAB_0012d192: LEA RDI,[0x175007] LEA RSI,[0x173b62] MOV EDX,0x20ca LEA RCX,[0x17510b] CALL 0x0010d690 LAB_0012d1b1: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x70] JNZ 0x0012d1bd JMP 0x0012d1dc LAB_0012d1bd: LEA RDI,[0x175070] LEA RSI,[0x173b62] MOV EDX,0x20cb LEA RCX,[0x17510b] CALL 0x0010d690 LAB_0012d1dc: CMP qword ptr [RBP + -0x48],0x2 JNZ 0x0012d1e5 JMP 0x0012d204 LAB_0012d1e5: LEA RDI,[0x174442] LEA RSI,[0x173b62] MOV EDX,0x20cc LEA RCX,[0x17510b] CALL 0x0010d690 LAB_0012d204: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010dc20 CMP RAX,qword ptr [RBP + -0xf0] JNZ 0x0012d218 JMP 0x0012d237 LAB_0012d218: LEA RDI,[0x17507d] LEA RSI,[0x173b62] MOV EDX,0x20cd LEA RCX,[0x17510b] CALL 0x0010d690 LAB_0012d237: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xf4],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0xf8],EAX MOV RAX,qword ptr [RBP + -0xf0] MOVSXD RCX,dword ptr [RBP + -0xf8] ADD RAX,RCX SUB RAX,0x1 MOVSXD RCX,dword ptr [RBP + -0xf8] CQO IDIV RCX MOV dword ptr [RBP + -0xfc],EAX MOV EAX,dword ptr [RBP + -0xfc] IMUL EAX,dword ptr [RBP + -0xf4] MOV dword ptr [RBP + -0x100],EAX MOV EAX,dword ptr [RBP + -0x100] ADD EAX,dword ptr [RBP + -0xfc] CDQE CMP RAX,qword ptr [RBP + -0xf0] JGE 0x0012d2b8 MOV EAX,dword ptr [RBP + -0x100] ADD EAX,dword ptr [RBP + -0xfc] CDQE MOV qword ptr [RBP + -0x138],RAX JMP 0x0012d2c6 LAB_0012d2b8: MOV RAX,qword ptr [RBP + -0xf0] MOV qword ptr [RBP + -0x138],RAX LAB_0012d2c6: MOV RAX,qword ptr [RBP + -0x138] MOV dword ptr [RBP + -0x104],EAX MOVSXD RAX,dword ptr [RBP + -0x100] MOV qword ptr [RBP + -0x110],RAX LAB_0012d2e1: MOV RAX,qword ptr [RBP + -0x110] MOVSXD RCX,dword ptr [RBP + -0x104] CMP RAX,RCX JGE 0x0012d48a MOV RAX,qword ptr [RBP + -0x110] MOV RCX,qword ptr [RBP + -0x70] IMUL RCX,qword ptr [RBP + -0x68] CQO IDIV RCX MOV qword ptr [RBP + -0x118],RAX MOV RAX,qword ptr [RBP + -0x110] MOV RCX,qword ptr [RBP + -0x118] IMUL RCX,qword ptr [RBP + -0x70] IMUL RCX,qword ptr [RBP + -0x68] SUB RAX,RCX CQO IDIV qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x120],RAX MOV RAX,qword ptr [RBP + -0x110] MOV RCX,qword ptr [RBP + -0x118] IMUL RCX,qword ptr [RBP + -0x70] IMUL RCX,qword ptr [RBP + -0x68] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x120] IMUL RCX,qword ptr [RBP + -0x68] SUB RAX,RCX MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RBP + -0x128] IMUL RCX,qword ptr [RBP + -0x88] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x120] IMUL RCX,qword ptr [RBP + -0x90] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x118] IMUL RCX,qword ptr [RBP + -0x98] MOVSXD RAX,dword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x130],RAX CMP qword ptr [RBP + -0x130],0x0 JL 0x0012d3cd MOV RAX,qword ptr [RBP + -0x130] CMP RAX,qword ptr [RBP + -0x30] JL 0x0012d3ee LAB_0012d3cd: LEA RDI,[0x173b62] MOV ESI,0x20df LEA RDX,[0x173bc1] LEA RCX,[0x175093] MOV AL,0x0 CALL 0x0010e270 LAB_0012d3ee: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0xf8] MOV RAX,qword ptr [RBP + -0x130] IMUL RAX,qword ptr [RBP + -0x50] ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x120] IMUL RAX,qword ptr [RBP + -0x58] ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x118] IMUL RAX,qword ptr [RBP + -0x60] ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0xf8] MOV RAX,qword ptr [RBP + -0x128] IMUL RAX,qword ptr [RBP + -0xd0] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x120] IMUL RAX,qword ptr [RBP + -0xd8] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x118] IMUL RAX,qword ptr [RBP + -0xe0] ADD RSI,RAX MOV RDX,qword ptr [RBP + -0xe8] CALL 0x0010d1b0 MOV RAX,qword ptr [RBP + -0x110] ADD RAX,0x1 MOV qword ptr [RBP + -0x110],RAX JMP 0x0012d2e1 LAB_0012d48a: ADD RSP,0x140 POP RBP RET
void ggml_compute_forward_get_rows_bf16(int *param_1,long param_2) { long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; long lVar8; long lVar9; long lVar10; long lVar11; long lVar12; long lVar13; long lVar14; long lVar15; int iVar16; int iVar17; long lVar18; long lVar19; long lVar20; long lVar21; long local_140; long local_118; lVar1 = *(long *)(param_2 + 0x98); lVar2 = *(long *)(param_2 + 0xa0); lVar3 = *(long *)(lVar1 + 0x10); lVar4 = *(long *)(lVar1 + 0x18); lVar18 = *(long *)(lVar1 + 0x20); lVar19 = *(long *)(lVar1 + 0x30); lVar5 = *(long *)(lVar1 + 0x38); lVar6 = *(long *)(lVar1 + 0x40); lVar7 = *(long *)(lVar1 + 0x48); lVar8 = *(long *)(lVar2 + 0x10); lVar9 = *(long *)(lVar2 + 0x18); lVar10 = *(long *)(lVar2 + 0x30); lVar11 = *(long *)(lVar2 + 0x38); lVar12 = *(long *)(lVar2 + 0x40); lVar20 = *(long *)(param_2 + 0x10); lVar13 = *(long *)(param_2 + 0x38); lVar14 = *(long *)(param_2 + 0x40); lVar15 = *(long *)(param_2 + 0x48); local_140 = ggml_nelements(lVar2); if (lVar20 != lVar3) { /* WARNING: Subroutine does not return */ __assert_fail("ne0 == nc", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x20ca, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)" ); } if (lVar18 != lVar9) { /* WARNING: Subroutine does not return */ __assert_fail("ne02 == ne11", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x20cb, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)" ); } if (lVar19 != 2) { /* WARNING: Subroutine does not return */ __assert_fail("nb00 == sizeof(ggml_bf16_t)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x20cc, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)" ); } lVar18 = ggml_nrows(param_2); if (lVar18 != local_140) { /* WARNING: Subroutine does not return */ __assert_fail("ggml_nrows(dst) == nr", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x20cd, "void ggml_compute_forward_get_rows_bf16(const struct ggml_compute_params *, struct ggml_tensor *)" ); } iVar16 = (int)((local_140 + param_1[1] + -1) / (long)param_1[1]); iVar17 = iVar16 * *param_1; if (iVar17 + iVar16 < local_140) { local_140 = (long)(iVar17 + iVar16); } for (local_118 = (long)iVar17; local_118 < (int)local_140; local_118 = local_118 + 1) { lVar18 = local_118 / (lVar9 * lVar8); lVar19 = (local_118 - lVar18 * lVar9 * lVar8) / lVar8; lVar20 = (local_118 - lVar18 * lVar9 * lVar8) - lVar19 * lVar8; lVar21 = (long)*(int *)(*(long *)(lVar2 + 0xf8) + lVar20 * lVar10 + lVar19 * lVar11 + lVar18 * lVar12); if ((lVar21 < 0) || (lVar4 <= lVar21)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x20df,"GGML_ASSERT(%s) failed","i01 >= 0 && i01 < ne01"); } ggml_bf16_to_fp32_row (*(long *)(lVar1 + 0xf8) + lVar21 * lVar5 + lVar19 * lVar6 + lVar18 * lVar7, *(long *)(param_2 + 0xf8) + lVar20 * lVar13 + lVar19 * lVar14 + lVar18 * lVar15,lVar3 ); } return; }
48,433
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/./minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O0
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: subq $0xe8, %rsp movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xe0(%rsp) movq %rsi, 0xd8(%rsp) movq %rdx, 0xd0(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x18(%rsp) movb $0x0, 0xcf(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0xb0(%rsp) movq $0x0, 0xc0(%rsp) leaq 0xb0(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0xcb0f0 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0xcd710 jmp 0xcd3ab leaq 0xb0(%rsp), %rdi callq 0xcb220 movq 0x18(%rsp), %rax addq $0x20, %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rdi callq 0xcd800 movq %rax, 0x90(%rsp) movq 0x98(%rsp), %rdi callq 0xcd830 movq %rax, 0x88(%rsp) leaq 0x90(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xcd860 testb $0x1, %al jne 0xcd411 jmp 0xcd54e leaq 0x90(%rsp), %rdi callq 0xcd8a0 movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rdi callq 0x77a80 testb $0x1, %al jne 0xcd4dd movl $0x10, %edi callq 0x50540 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x8(%rsp) leaq 0x1040bb(%rip), %rsi # 0x1d1512 callq 0x50340 jmp 0xcd45e movq 0x8(%rsp), %rdi movq 0x186b46(%rip), %rsi # 0x253fb0 movq 0x186b07(%rip), %rdx # 0x253f78 callq 0x508f0 jmp 0xcd58e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) leaq 0xb0(%rsp), %rdi callq 0xcb220 jmp 0xcd581 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) callq 0x50c40 jmp 0xcd577 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) jmp 0xcd577 movq 0x80(%rsp), %rdi callq 0x9f2f0 movq %rax, %rsi movq 0xd0(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x9f300 jmp 0xcd501 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xcd8b0 jmp 0xcd512 leaq 0x30(%rsp), %rdi callq 0x9f7a0 leaq 0x90(%rsp), %rdi callq 0xcd9e0 jmp 0xcd3f3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) leaq 0x30(%rsp), %rdi callq 0x9f7a0 jmp 0xcd577 movb $0x1, 0xcf(%rsp) testb $0x1, 0xcf(%rsp) jne 0xcd56a movq 0x20(%rsp), %rdi callq 0x9f7a0 movq 0x10(%rsp), %rax addq $0xe8, %rsp retq movq 0x20(%rsp), %rdi callq 0x9f7a0 movq 0xa8(%rsp), %rdi callq 0x50940 nop
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: sub rsp, 0E8h mov [rsp+0E8h+var_C8], rdi mov rax, rdi mov [rsp+0E8h+var_D8], rax mov [rsp+0E8h+var_8], rdi mov [rsp+0E8h+var_10], rsi mov [rsp+0E8h+var_18], rdx mov rax, [rsp+0E8h+var_10] mov [rsp+0E8h+var_D0], rax mov [rsp+0E8h+var_19], 0 xorps xmm0, xmm0 movaps [rsp+0E8h+var_38], xmm0 mov [rsp+0E8h+var_28], 0 lea rdi, [rsp+0E8h+var_38] mov [rsp+0E8h+var_C0], rdi call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2Ev; std::vector<minja::Value>::vector(void) mov rdi, [rsp+0E8h+var_C8] mov rsi, [rsp+0E8h+var_C0] call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) jmp short $+2 loc_CD3AB: lea rdi, [rsp+0E8h+var_38] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov rax, [rsp+0E8h+var_D0] add rax, 20h ; ' ' mov [rsp+0E8h+var_50], rax mov rdi, [rsp+0E8h+var_50] call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE5beginEv; std::vector<std::shared_ptr<minja::Expression>>::begin(void) mov [rsp+0E8h+var_58], rax mov rdi, [rsp+0E8h+var_50] call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE3endEv; std::vector<std::shared_ptr<minja::Expression>>::end(void) mov [rsp+0E8h+var_60], rax loc_CD3F3: lea rdi, [rsp+0E8h+var_58] lea rsi, [rsp+0E8h+var_60] call _ZN9__gnu_cxxneIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_; __gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&) test al, 1 jnz short loc_CD411 jmp loc_CD54E loc_CD411: lea rdi, [rsp+0E8h+var_58] call _ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(void) mov [rsp+0E8h+var_68], rax mov rdi, [rsp+0E8h+var_68] call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz loc_CD4DD mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0E8h+var_E0], rax lea rsi, aArrayElementIs; "Array element is null" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_CD45E: mov rdi, [rsp+0E8h+var_E0]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_CD58E mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax lea rdi, [rsp+arg_A8] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp loc_CD581 mov rdi, [rsp+arg_0]; void * mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax call ___cxa_free_exception jmp loc_CD577 mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax jmp loc_CD577 loc_CD4DD: mov rdi, [rsp+0E8h+var_68] call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, rax mov rdx, [rsp+0E8h+var_18] lea rdi, [rsp+0E8h+var_B8] call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) jmp short $+2 loc_CD501: mov rdi, [rsp+0E8h+var_C8]; this lea rsi, [rsp+0E8h+var_B8]; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) jmp short $+2 loc_CD512: lea rdi, [rsp+0E8h+var_B8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+0E8h+var_58] call _ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(void) jmp loc_CD3F3 mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax lea rdi, [rsp+arg_28]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_CD577 loc_CD54E: mov [rsp+0E8h+var_19], 1 test [rsp+0E8h+var_19], 1 jnz short loc_CD56A mov rdi, [rsp+0E8h+var_C8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_CD56A: mov rax, [rsp+0E8h+var_D8] add rsp, 0E8h retn loc_CD577: mov rdi, [rsp+arg_18]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_CD581: mov rdi, [rsp+arg_A0] call __Unwind_Resume loc_CD58E: xchg ax, ax
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *a1, long long a2, long long a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d void (***v7)(void); // rax std::runtime_error *exception; // [rsp+8h] [rbp-E0h] _BYTE v10[80]; // [rsp+30h] [rbp-B8h] BYREF _QWORD *v11; // [rsp+80h] [rbp-68h] long long v12; // [rsp+88h] [rbp-60h] BYREF _QWORD v13[4]; // [rsp+90h] [rbp-58h] BYREF __int128 v14; // [rsp+B0h] [rbp-38h] BYREF long long v15; // [rsp+C0h] [rbp-28h] char v16; // [rsp+CFh] [rbp-19h] long long v17; // [rsp+D0h] [rbp-18h] long long v18; // [rsp+D8h] [rbp-10h] minja::Value *v19; // [rsp+E0h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = 0; v14 = 0LL; v15 = 0LL; std::vector<minja::Value>::vector((long long)&v14); minja::Value::array((_DWORD)a1, (unsigned int)&v14, v3, v4, v5, v6); std::vector<minja::Value>::~vector((long long *)&v14); v13[1] = a2 + 32; v13[0] = std::vector<std::shared_ptr<minja::Expression>>::begin(a2 + 32); v12 = std::vector<std::shared_ptr<minja::Expression>>::end(a2 + 32); while ( (__gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>( v13, &v12) & 1) != 0 ) { v11 = (_QWORD *)__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(v13); if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v11) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v7 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v11); minja::Expression::evaluate((long long)v10, v7); minja::Value::push_back(a1, (const minja::Value *)v10); minja::Value::~Value((minja::Value *)v10); __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(v13); } return a1; }
do_evaluate: SUB RSP,0xe8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0xe0],RDI MOV qword ptr [RSP + 0xd8],RSI MOV qword ptr [RSP + 0xd0],RDX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x18],RAX MOV byte ptr [RSP + 0xcf],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xb0],XMM0 MOV qword ptr [RSP + 0xc0],0x0 LEA RDI,[RSP + 0xb0] MOV qword ptr [RSP + 0x28],RDI CALL 0x001cb0f0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] LAB_001cd3a4: CALL 0x001cd710 LAB_001cd3a9: JMP 0x001cd3ab LAB_001cd3ab: LEA RDI,[RSP + 0xb0] CALL 0x001cb220 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x20 MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0x98] CALL 0x001cd800 MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x98] CALL 0x001cd830 MOV qword ptr [RSP + 0x88],RAX LAB_001cd3f3: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x88] CALL 0x001cd860 TEST AL,0x1 JNZ 0x001cd411 JMP 0x001cd54e LAB_001cd411: LEA RDI,[RSP + 0x90] CALL 0x001cd8a0 MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x00177a80 TEST AL,0x1 JNZ 0x001cd4dd MOV EDI,0x10 CALL 0x00150540 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX LAB_001cd450: LEA RSI,[0x2d1512] CALL 0x00150340 JMP 0x001cd45e LAB_001cd45e: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [0x00353fb0] MOV RDX,qword ptr [0x00353f78] CALL 0x001508f0 LAB_001cd4dd: MOV RDI,qword ptr [RSP + 0x80] CALL 0x0019f2f0 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0xd0] LAB_001cd4f5: LEA RDI,[RSP + 0x30] CALL 0x0019f300 JMP 0x001cd501 LAB_001cd501: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x30] CALL 0x001cd8b0 LAB_001cd510: JMP 0x001cd512 LAB_001cd512: LEA RDI,[RSP + 0x30] CALL 0x0019f7a0 LEA RDI,[RSP + 0x90] CALL 0x001cd9e0 JMP 0x001cd3f3 LAB_001cd54e: MOV byte ptr [RSP + 0xcf],0x1 TEST byte ptr [RSP + 0xcf],0x1 JNZ 0x001cd56a MOV RDI,qword ptr [RSP + 0x20] CALL 0x0019f7a0 LAB_001cd56a: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0xe8 RET
/* WARNING: Removing unreachable block (ram,0x001cd560) */ /* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::ArrayExpr::do_evaluate(shared_ptr *param_1) { bool bVar1; runtime_error *this; long in_RSI; shared_ptr local_b8 [80]; __shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *local_68; int8 local_60; int8 local_58; vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *local_50; int8 local_38; int8 uStack_30; int8 local_28; int1 local_19; shared_ptr *local_8; local_19 = 0; local_38 = 0; uStack_30 = 0; local_28 = 0; local_8 = param_1; std::vector<minja::Value,std::allocator<minja::Value>>::vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_38); /* try { // try from 001cd3a4 to 001cd3a8 has its CatchHandler @ 001cd47b */ Value::array((Value *)param_1,(vector<minja::Value,std::allocator<minja::Value>> *)&local_38); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_38); local_50 = (vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)(in_RSI + 0x20); local_58 = std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::begin(local_50); local_60 = std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::end(local_50); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_58,(__normal_iterator *)&local_60); if (!bVar1) { return param_1; } local_68 = (__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *) __gnu_cxx:: __normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> ::operator*((__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> *)&local_58); bVar1 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)local_68); if (!bVar1) break; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator-> (local_68); /* try { // try from 001cd4f5 to 001cd4fe has its CatchHandler @ 001cd4c4 */ Expression::evaluate(local_b8); /* try { // try from 001cd501 to 001cd50f has its CatchHandler @ 001cd52e */ Value::push_back((Value *)param_1,(Value *)local_b8); Value::~Value((Value *)local_b8); __gnu_cxx:: __normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> ::operator++((__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> *)&local_58); } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001cd450 to 001cd45b has its CatchHandler @ 001cd4a1 */ std::runtime_error::runtime_error(this,"Array element is null"); /* try { // try from 001cd45e to 001cd475 has its CatchHandler @ 001cd4c4 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78); }
48,434
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/./minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O2
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) andq $0x0, 0x10(%rsi) callq 0x4a008 movq %rsp, %rdi callq 0x4982a movq 0x20(%r15), %r12 movq 0x28(%r15), %r13 leaq 0x20(%rsp), %r15 cmpq %r13, %r12 je 0x49f52 movq (%r12), %rsi testq %rsi, %rsi je 0x49f63 movq %r15, %rdi movq %r14, %rdx callq 0x3b08c movq %rbx, %rdi movq %r15, %rsi callq 0x4a074 movq %r15, %rdi callq 0x3b31c addq $0x10, %r12 jmp 0x49f20 movq %rbx, %rax addq $0x70, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x20390 movq %rax, %r15 leaq 0x5415d(%rip), %rsi # 0x9e0d2 movq %rax, %rdi callq 0x20280 movq 0x98064(%rip), %rsi # 0xe1fe8 movq 0x97fe5(%rip), %rdx # 0xe1f70 movq %r15, %rdi callq 0x20b30 movq %rax, %r14 movq %rsp, %rdi callq 0x4982a jmp 0x49fc9 jmp 0x49faf movq %rax, %r14 movq %r15, %rdi callq 0x20520 jmp 0x49fc1 movq %rax, %r14 jmp 0x49fc1 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x3b31c movq %rbx, %rdi callq 0x3b31c movq %r14, %rdi callq 0x20b90 nop
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 70h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov r12, [r15+20h] mov r13, [r15+28h] lea r15, [rsp+98h+var_78] loc_49F20: cmp r12, r13 jz short loc_49F52 mov rsi, [r12] test rsi, rsi jz short loc_49F63 mov rdi, r15 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r15; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r12, 10h jmp short loc_49F20 loc_49F52: mov rax, rbx add rsp, 70h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_49F63: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aArrayElementIs; "Array element is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov r14, rax mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_49FC9 jmp short loc_49FAF mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_49FC1 loc_49FAF: mov r14, rax jmp short loc_49FC1 mov r14, rax lea rdi, [rsp+98h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_49FC1: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_49FC9: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2, int a3, int a4, int a5, int a6) { void (****v6)(void); // r12 void (****v7)(void); // r13 std::runtime_error *exception; // r15 _BYTE v10[32]; // [rsp+0h] [rbp-98h] BYREF _BYTE v11[120]; // [rsp+20h] [rbp-78h] BYREF minja::Value::array((_DWORD)this, (unsigned int)v10, a3, a4, a5, a6, 0LL, 0LL, 0LL); std::vector<minja::Value>::~vector((long long)v10); v6 = *(void (*****)(void))(a2 + 32); v7 = *(void (*****)(void))(a2 + 40); while ( v6 != v7 ) { if ( !*v6 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v11, *v6); minja::Value::push_back(this, (const minja::Value *)v11); minja::Value::~Value((minja::Value *)v11); v6 += 2; } return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x70 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_00149f06: CALL 0x0014a008 MOV RDI,RSP CALL 0x0014982a MOV R12,qword ptr [R15 + 0x20] MOV R13,qword ptr [R15 + 0x28] LEA R15,[RSP + 0x20] LAB_00149f20: CMP R12,R13 JZ 0x00149f52 MOV RSI,qword ptr [R12] TEST RSI,RSI JZ 0x00149f63 LAB_00149f2e: MOV RDI,R15 MOV RDX,R14 CALL 0x0013b08c LAB_00149f39: MOV RDI,RBX MOV RSI,R15 CALL 0x0014a074 LAB_00149f44: MOV RDI,R15 CALL 0x0013b31c ADD R12,0x10 JMP 0x00149f20 LAB_00149f52: MOV RAX,RBX ADD RSP,0x70 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00149f63: PUSH 0x10 POP RDI CALL 0x00120390 MOV R15,RAX LAB_00149f6e: LEA RSI,[0x19e0d2] MOV RDI,RAX CALL 0x00120280 LAB_00149f7d: MOV RSI,qword ptr [0x001e1fe8] MOV RDX,qword ptr [0x001e1f70] MOV RDI,R15 CALL 0x00120b30
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1) { int8 *puVar1; runtime_error *this_00; int8 *puVar2; int8 local_98; int8 uStack_90; int8 local_88; Expression local_78 [80]; local_98 = 0; uStack_90 = 0; local_88 = 0; /* try { // try from 00149f06 to 00149f0a has its CatchHandler @ 00149f93 */ Value::array(); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_98); puVar2 = *(int8 **)(param_1 + 0x20); puVar1 = *(int8 **)(param_1 + 0x28); while( true ) { if (puVar2 == puVar1) { return this; } if ((shared_ptr *)*puVar2 == (shared_ptr *)0x0) break; /* try { // try from 00149f2e to 00149f38 has its CatchHandler @ 00149faf */ Expression::evaluate(local_78,(shared_ptr *)*puVar2); /* try { // try from 00149f39 to 00149f43 has its CatchHandler @ 00149fb4 */ Value::push_back((Value *)this,(Value *)local_78); Value::~Value((Value *)local_78); puVar2 = puVar2 + 2; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00149f6e to 00149f7c has its CatchHandler @ 00149fa2 */ std::runtime_error::runtime_error(this_00,"Array element is null"); /* try { // try from 00149f7d to 00149f92 has its CatchHandler @ 00149fa0 */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70); }
48,435
lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
void SVGClipPathElement::applyClipPath(SVGRenderState& state) const { auto currentTransform = state.currentTransform() * localTransform(); if(m_clipPathUnits.value() == Units::ObjectBoundingBox) { auto bbox = state.fillBoundingBox(); currentTransform.translate(bbox.x, bbox.y); currentTransform.scale(bbox.w, bbox.h); } for(const auto& child : children()) { auto element = toSVGElement(child); if(element == nullptr || element->isDisplayNone()) continue; Transform clipTransform(currentTransform); auto shapeElement = toSVGGeometryElement(element); if(shapeElement == nullptr) { if(element->id() != ElementID::Use) continue; clipTransform.multiply(element->localTransform()); shapeElement = toSVGGeometryElement(element->firstChild()); } if(shapeElement == nullptr || !shapeElement->isRenderable()) continue; state->clipPath(shapeElement->path(), shapeElement->clip_rule(), clipTransform * shapeElement->localTransform()); return; } state->clipRect(Rect::Empty, FillRule::NonZero, Transform::Identity); }
O0
cpp
lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0x10(%rbp), %rdi callq 0x20eb0 movq -0xe8(%rbp), %rsi movq %rax, -0xf0(%rbp) leaq -0x40(%rbp), %rdi callq 0x20db0 movq -0xf0(%rbp), %rsi leaq -0x28(%rbp), %rdi leaq -0x40(%rbp), %rdx callq 0x11850 movq -0xe8(%rbp), %rdi addq $0x98, %rdi callq 0x215f0 cmpb $0x1, %al jne 0x1ce22 movq -0x10(%rbp), %rdi callq 0x21650 movlpd %xmm0, -0x50(%rbp) movlpd %xmm1, -0x48(%rbp) movss -0x50(%rbp), %xmm0 movss -0x4c(%rbp), %xmm1 leaq -0x28(%rbp), %rdi callq 0x11910 movss -0x48(%rbp), %xmm0 movss -0x44(%rbp), %xmm1 leaq -0x28(%rbp), %rdi callq 0x119b0 movq -0xe8(%rbp), %rdi callq 0xe950 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi callq 0xe970 movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rdi callq 0xe9a0 movq %rax, -0x68(%rbp) leaq -0x60(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0xe9d0 testb $0x1, %al jne 0x1ce62 jmp 0x1cfd2 leaq -0x60(%rbp), %rdi callq 0xea00 movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rdi callq 0x1fda0 movq %rax, -0x78(%rbp) cmpq $0x0, -0x78(%rbp) je 0x1ce92 movq -0x78(%rbp), %rdi callq 0x20470 testb $0x1, %al jne 0x1ce92 jmp 0x1ce97 jmp 0x1cfc4 movq -0x28(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rdi callq 0x216e0 movq %rax, -0x98(%rbp) cmpq $0x0, -0x98(%rbp) jne 0x1cf1d movq -0x78(%rbp), %rdi callq 0x1fe70 cmpb $0x18, %al je 0x1cee1 jmp 0x1cfc4 movq -0x78(%rbp), %rsi movq (%rsi), %rax leaq -0xb0(%rbp), %rdi callq *0x50(%rax) leaq -0x90(%rbp), %rdi leaq -0xb0(%rbp), %rsi callq 0x118e0 movq -0x78(%rbp), %rdi callq 0x191e0 movq %rax, %rdi callq 0x216e0 movq %rax, -0x98(%rbp) cmpq $0x0, -0x98(%rbp) je 0x1cf37 movq -0x98(%rbp), %rdi callq 0x21720 testb $0x1, %al jne 0x1cf3c jmp 0x1cfc4 movq -0x10(%rbp), %rdi callq 0x20750 movq %rax, -0x108(%rbp) movq -0x98(%rbp), %rdi callq 0x21780 movq %rax, -0x100(%rbp) movq -0x98(%rbp), %rdi callq 0x217a0 movb %al, -0xf1(%rbp) movq -0x98(%rbp), %rsi movq (%rsi), %rax leaq -0xe0(%rbp), %rdi callq *0x50(%rax) leaq -0xc8(%rbp), %rdi leaq -0x90(%rbp), %rsi leaq -0xe0(%rbp), %rdx callq 0x11850 movq -0x108(%rbp), %rdi movq -0x100(%rbp), %rsi movb -0xf1(%rbp), %al leaq -0xc8(%rbp), %rcx movzbl %al, %edx callq 0x13e40 jmp 0x1cff3 leaq -0x60(%rbp), %rdi callq 0xea90 jmp 0x1ce4c movq -0x10(%rbp), %rdi callq 0x20750 movq %rax, %rdi leaq 0x6f173(%rip), %rsi # 0x8c158 xorl %edx, %edx leaq 0xa89ba(%rip), %rcx # 0xc59a8 callq 0x13ef0 addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopl (%rax)
_ZNK7lunasvg18SVGClipPathElement13applyClipPathERNS_14SVGRenderStateE: push rbp mov rbp, rsp sub rsp, 110h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_E8], rax mov rdi, [rbp+var_10]; this call _ZNK7lunasvg14SVGRenderState16currentTransformEv; lunasvg::SVGRenderState::currentTransform(void) mov rsi, [rbp+var_E8] mov [rbp+var_F0], rax lea rdi, [rbp+var_40]; this call _ZNK7lunasvg18SVGGraphicsElement14localTransformEv; lunasvg::SVGGraphicsElement::localTransform(void) mov rsi, [rbp+var_F0] lea rdi, [rbp+var_28] lea rdx, [rbp+var_40] call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) mov rdi, [rbp+var_E8] add rdi, 98h call _ZNK7lunasvg14SVGEnumerationINS_5UnitsEE5valueEv; lunasvg::SVGEnumeration<lunasvg::Units>::value(void) cmp al, 1 jnz short loc_1CE22 mov rdi, [rbp+var_10]; this call _ZNK7lunasvg14SVGRenderState15fillBoundingBoxEv; lunasvg::SVGRenderState::fillBoundingBox(void) movlpd qword ptr [rbp+var_50], xmm0 movlpd qword ptr [rbp+var_48], xmm1 movss xmm0, [rbp+var_50]; float movss xmm1, [rbp+var_50+4]; float lea rdi, [rbp+var_28]; this call _ZN7lunasvg9Transform9translateEff; lunasvg::Transform::translate(float,float) movss xmm0, [rbp+var_48]; float movss xmm1, [rbp+var_48+4]; float lea rdi, [rbp+var_28]; this call _ZN7lunasvg9Transform5scaleEff; lunasvg::Transform::scale(float,float) loc_1CE22: mov rdi, [rbp+var_E8] call _ZNK7lunasvg10SVGElement8childrenB5cxx11Ev; lunasvg::SVGElement::children(void) mov [rbp+var_58], rax mov rdi, [rbp+var_58] call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE5beginEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::begin(void) mov [rbp+var_60], rax mov rdi, [rbp+var_58] call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE3endEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::end(void) mov [rbp+var_68], rax loc_1CE4C: lea rdi, [rbp+var_60] lea rsi, [rbp+var_68]; lunasvg::SVGNode * call _ZStneRKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEES8_; std::operator!=(std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&,std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&) test al, 1 jnz short loc_1CE62 jmp loc_1CFD2 loc_1CE62: lea rdi, [rbp+var_60] call _ZNKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEdeEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(void) mov [rbp+var_70], rax mov rdi, [rbp+var_70] call _ZN7lunasvg12toSVGElementERKSt10unique_ptrINS_7SVGNodeESt14default_deleteIS1_EE; lunasvg::toSVGElement(std::unique_ptr<lunasvg::SVGNode> const&) mov [rbp+var_78], rax cmp [rbp+var_78], 0 jz short loc_1CE92 mov rdi, [rbp+var_78]; this call _ZNK7lunasvg10SVGElement13isDisplayNoneEv; lunasvg::SVGElement::isDisplayNone(void) test al, 1 jnz short loc_1CE92 jmp short loc_1CE97 loc_1CE92: jmp loc_1CFC4 loc_1CE97: mov rax, [rbp+var_28] mov [rbp+var_90], rax mov rax, [rbp+var_20] mov [rbp+var_88], rax mov rax, [rbp+var_18] mov [rbp+var_80], rax mov rdi, [rbp+var_78]; this call _ZN7lunasvg20toSVGGeometryElementEPKNS_7SVGNodeE; lunasvg::toSVGGeometryElement(lunasvg::SVGNode const*) mov [rbp+var_98], rax cmp [rbp+var_98], 0 jnz short loc_1CF1D mov rdi, [rbp+var_78]; this call _ZNK7lunasvg10SVGElement2idEv; lunasvg::SVGElement::id(void) cmp al, 18h jz short loc_1CEE1 jmp loc_1CFC4 loc_1CEE1: mov rsi, [rbp+var_78] mov rax, [rsi] lea rdi, [rbp+var_B0] call qword ptr [rax+50h] lea rdi, [rbp+var_90]; this lea rsi, [rbp+var_B0]; lunasvg::SVGNode * call _ZN7lunasvg9Transform8multiplyERKS0_; lunasvg::Transform::multiply(lunasvg::Transform const&) mov rdi, [rbp+var_78]; this call _ZNK7lunasvg10SVGElement10firstChildEv; lunasvg::SVGElement::firstChild(void) mov rdi, rax; this call _ZN7lunasvg20toSVGGeometryElementEPKNS_7SVGNodeE; lunasvg::toSVGGeometryElement(lunasvg::SVGNode const*) mov [rbp+var_98], rax loc_1CF1D: cmp [rbp+var_98], 0 jz short loc_1CF37 mov rdi, [rbp+var_98]; this call _ZNK7lunasvg18SVGGeometryElement12isRenderableEv; lunasvg::SVGGeometryElement::isRenderable(void) test al, 1 jnz short loc_1CF3C loc_1CF37: jmp loc_1CFC4 loc_1CF3C: mov rdi, [rbp+var_10] call _ZNK7lunasvg14SVGRenderStateptEv; lunasvg::SVGRenderState::operator->(void) mov [rbp+var_108], rax mov rdi, [rbp+var_98]; this call _ZNK7lunasvg18SVGGeometryElement4pathEv; lunasvg::SVGGeometryElement::path(void) mov [rbp+var_100], rax mov rdi, [rbp+var_98]; this call _ZNK7lunasvg18SVGGeometryElement9clip_ruleEv; lunasvg::SVGGeometryElement::clip_rule(void) mov [rbp+var_F1], al mov rsi, [rbp+var_98] mov rax, [rsi] lea rdi, [rbp+var_E0] call qword ptr [rax+50h] lea rdi, [rbp+var_C8] lea rsi, [rbp+var_90] lea rdx, [rbp+var_E0] call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) mov rdi, [rbp+var_108] mov rsi, [rbp+var_100] mov al, [rbp+var_F1] lea rcx, [rbp+var_C8] movzx edx, al call _ZN7lunasvg6Canvas8clipPathERKNS_4PathENS_8FillRuleERKNS_9TransformE; lunasvg::Canvas::clipPath(lunasvg::Path const&,lunasvg::FillRule,lunasvg::Transform const&) jmp short loc_1CFF3 loc_1CFC4: lea rdi, [rbp+var_60] call _ZNSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEppEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(void) jmp loc_1CE4C loc_1CFD2: mov rdi, [rbp+var_10] call _ZNK7lunasvg14SVGRenderStateptEv; lunasvg::SVGRenderState::operator->(void) mov rdi, rax lea rsi, _ZN7lunasvg4Rect5EmptyE; lunasvg::Rect::Empty xor edx, edx lea rcx, _ZN7lunasvg9Transform8IdentityE; lunasvg::Transform::Identity call _ZN7lunasvg6Canvas8clipRectERKNS_4RectENS_8FillRuleERKNS_9TransformE; lunasvg::Canvas::clipRect(lunasvg::Rect const&,lunasvg::FillRule,lunasvg::Transform const&) loc_1CFF3: add rsp, 110h pop rbp retn
long long lunasvg::SVGClipPathElement::applyClipPath( lunasvg::SVGClipPathElement *this, lunasvg::SVGRenderState *a2, double a3, double a4) { lunasvg *Child; // rax long long v6; // rax long long v7; // [rsp+8h] [rbp-108h] lunasvg::Path *v8; // [rsp+10h] [rbp-100h] unsigned __int8 v9; // [rsp+1Fh] [rbp-F1h] long long v10; // [rsp+20h] [rbp-F0h] _BYTE v11[24]; // [rsp+30h] [rbp-E0h] BYREF _BYTE v12[24]; // [rsp+48h] [rbp-C8h] BYREF _BYTE v13[24]; // [rsp+60h] [rbp-B0h] BYREF lunasvg::SVGGeometryElement *v14; // [rsp+78h] [rbp-98h] _QWORD v15[3]; // [rsp+80h] [rbp-90h] BYREF lunasvg::SVGElement *v16; // [rsp+98h] [rbp-78h] long long v17; // [rsp+A0h] [rbp-70h] long long v18; // [rsp+A8h] [rbp-68h] BYREF _QWORD *v19; // [rsp+B0h] [rbp-60h] BYREF _QWORD *v20; // [rsp+B8h] [rbp-58h] _QWORD v21[2]; // [rsp+C0h] [rbp-50h] _BYTE v22[24]; // [rsp+D0h] [rbp-40h] BYREF _QWORD v23[3]; // [rsp+E8h] [rbp-28h] BYREF lunasvg::SVGRenderState *v24; // [rsp+100h] [rbp-10h] lunasvg::SVGClipPathElement *v25; // [rsp+108h] [rbp-8h] v25 = this; v24 = a2; v10 = lunasvg::SVGRenderState::currentTransform(a2); lunasvg::SVGGraphicsElement::localTransform((lunasvg::SVGGraphicsElement *)v22); lunasvg::Transform::operator*((long long)v23, v10, (long long)v22); if ( (unsigned __int8)lunasvg::SVGEnumeration<lunasvg::Units>::value((char *)this + 152) == 1 ) { lunasvg::SVGRenderState::fillBoundingBox(v24); *(double *)v21 = a3; *(double *)&v21[1] = a4; lunasvg::Transform::translate((lunasvg::Transform *)v23, *(float *)&a3, *((float *)&a3 + 1)); lunasvg::Transform::scale((lunasvg::Transform *)v23, *(float *)&a4, *((float *)&a4 + 1)); } v20 = (_QWORD *)lunasvg::SVGElement::children[abi:cxx11]((long long)this); v19 = (_QWORD *)std::list<std::unique_ptr<lunasvg::SVGNode>>::begin(v20); v18 = std::list<std::unique_ptr<lunasvg::SVGNode>>::end((long long)v20); while ( std::operator!=(&v19, &v18) ) { v17 = std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(&v19); v16 = (lunasvg::SVGElement *)lunasvg::toSVGElement(v17); if ( v16 && (lunasvg::SVGElement::isDisplayNone(v16) & 1) == 0 ) { v15[0] = v23[0]; v15[1] = v23[1]; v15[2] = v23[2]; v14 = (lunasvg::SVGGeometryElement *)lunasvg::toSVGGeometryElement(v16, (const lunasvg::SVGNode *)&v18); if ( !v14 ) { if ( (unsigned __int8)lunasvg::SVGElement::id(v16) != 24 ) goto LABEL_15; (*(void ( **)(_BYTE *))(*(_QWORD *)v16 + 80LL))(v13); lunasvg::Transform::multiply((lunasvg::Transform *)v15, (const lunasvg::Transform *)v13); Child = (lunasvg *)lunasvg::SVGElement::firstChild(v16); v14 = (lunasvg::SVGGeometryElement *)lunasvg::toSVGGeometryElement(Child, (const lunasvg::SVGNode *)v13); } if ( v14 && (lunasvg::SVGGeometryElement::isRenderable(v14) & 1) != 0 ) { v7 = lunasvg::SVGRenderState::operator->(v24); v8 = (lunasvg::Path *)lunasvg::SVGGeometryElement::path(v14); v9 = lunasvg::SVGGeometryElement::clip_rule(v14); (*(void ( **)(_BYTE *))(*(_QWORD *)v14 + 80LL))(v11); lunasvg::Transform::operator*((long long)v12, (long long)v15, (long long)v11); return lunasvg::Canvas::clipPath(v7, v8, v9, (lunasvg::Transform *)v12); } } LABEL_15: std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(&v19); } v6 = lunasvg::SVGRenderState::operator->(v24); return lunasvg::Canvas::clipRect( v6, (float *)&lunasvg::Rect::Empty, 0, (lunasvg::Transform *)lunasvg::Transform::Identity); }
applyClipPath: PUSH RBP MOV RBP,RSP SUB RSP,0x110 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xe8],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00120eb0 MOV RSI,qword ptr [RBP + -0xe8] MOV qword ptr [RBP + -0xf0],RAX LEA RDI,[RBP + -0x40] CALL 0x00120db0 MOV RSI,qword ptr [RBP + -0xf0] LEA RDI,[RBP + -0x28] LEA RDX,[RBP + -0x40] CALL 0x00111850 MOV RDI,qword ptr [RBP + -0xe8] ADD RDI,0x98 CALL 0x001215f0 CMP AL,0x1 JNZ 0x0011ce22 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00121650 MOVLPD qword ptr [RBP + -0x50],XMM0 MOVLPD qword ptr [RBP + -0x48],XMM1 MOVSS XMM0,dword ptr [RBP + -0x50] MOVSS XMM1,dword ptr [RBP + -0x4c] LEA RDI,[RBP + -0x28] CALL 0x00111910 MOVSS XMM0,dword ptr [RBP + -0x48] MOVSS XMM1,dword ptr [RBP + -0x44] LEA RDI,[RBP + -0x28] CALL 0x001119b0 LAB_0011ce22: MOV RDI,qword ptr [RBP + -0xe8] CALL 0x0010e950 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] CALL 0x0010e970 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x58] CALL 0x0010e9a0 MOV qword ptr [RBP + -0x68],RAX LAB_0011ce4c: LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x68] CALL 0x0010e9d0 TEST AL,0x1 JNZ 0x0011ce62 JMP 0x0011cfd2 LAB_0011ce62: LEA RDI,[RBP + -0x60] CALL 0x0010ea00 MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x70] CALL 0x0011fda0 MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x78],0x0 JZ 0x0011ce92 MOV RDI,qword ptr [RBP + -0x78] CALL 0x00120470 TEST AL,0x1 JNZ 0x0011ce92 JMP 0x0011ce97 LAB_0011ce92: JMP 0x0011cfc4 LAB_0011ce97: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x78] CALL 0x001216e0 MOV qword ptr [RBP + -0x98],RAX CMP qword ptr [RBP + -0x98],0x0 JNZ 0x0011cf1d MOV RDI,qword ptr [RBP + -0x78] CALL 0x0011fe70 CMP AL,0x18 JZ 0x0011cee1 JMP 0x0011cfc4 LAB_0011cee1: MOV RSI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RSI] LEA RDI,[RBP + -0xb0] CALL qword ptr [RAX + 0x50] LEA RDI,[RBP + -0x90] LEA RSI,[RBP + -0xb0] CALL 0x001118e0 MOV RDI,qword ptr [RBP + -0x78] CALL 0x001191e0 MOV RDI,RAX CALL 0x001216e0 MOV qword ptr [RBP + -0x98],RAX LAB_0011cf1d: CMP qword ptr [RBP + -0x98],0x0 JZ 0x0011cf37 MOV RDI,qword ptr [RBP + -0x98] CALL 0x00121720 TEST AL,0x1 JNZ 0x0011cf3c LAB_0011cf37: JMP 0x0011cfc4 LAB_0011cf3c: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00120750 MOV qword ptr [RBP + -0x108],RAX MOV RDI,qword ptr [RBP + -0x98] CALL 0x00121780 MOV qword ptr [RBP + -0x100],RAX MOV RDI,qword ptr [RBP + -0x98] CALL 0x001217a0 MOV byte ptr [RBP + -0xf1],AL MOV RSI,qword ptr [RBP + -0x98] MOV RAX,qword ptr [RSI] LEA RDI,[RBP + -0xe0] CALL qword ptr [RAX + 0x50] LEA RDI,[RBP + -0xc8] LEA RSI,[RBP + -0x90] LEA RDX,[RBP + -0xe0] CALL 0x00111850 MOV RDI,qword ptr [RBP + -0x108] MOV RSI,qword ptr [RBP + -0x100] MOV AL,byte ptr [RBP + -0xf1] LEA RCX,[RBP + -0xc8] MOVZX EDX,AL CALL 0x00113e40 JMP 0x0011cff3 LAB_0011cfc4: LEA RDI,[RBP + -0x60] CALL 0x0010ea90 JMP 0x0011ce4c LAB_0011cfd2: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00120750 MOV RDI,RAX LEA RSI,[0x18c158] XOR EDX,EDX LEA RCX,[0x1c59a8] CALL 0x00113ef0 LAB_0011cff3: ADD RSP,0x110 POP RBP RET
/* lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const */ void lunasvg::SVGClipPathElement::applyClipPath(SVGRenderState *param_1) { char cVar1; int1 uVar2; Transform *pTVar3; ulong uVar4; SVGNode *pSVar5; int8 uVar6; Canvas *pCVar7; SVGRenderState *in_RSI; float in_XMM1_Da; float in_XMM1_Db; int1 local_e8 [24]; Transform local_d0 [24]; Transform local_b8 [24]; SVGGeometryElement *local_a0; int8 local_98; int8 local_90; int8 local_88; SVGNode *local_80; unique_ptr *local_78; int8 local_70; int8 local_68; list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> *local_60; int8 local_58; float local_50; float fStack_4c; int8 local_30; int8 local_28; int8 local_20; SVGRenderState *local_18; SVGRenderState *local_10; local_18 = in_RSI; local_10 = param_1; pTVar3 = (Transform *)SVGRenderState::currentTransform(in_RSI); SVGGraphicsElement::localTransform(); Transform::operator*((Transform *)&local_30,pTVar3); cVar1 = SVGEnumeration<lunasvg::Units>::value((SVGEnumeration<lunasvg::Units> *)(param_1 + 0x98)); if (cVar1 == '\x01') { local_58 = SVGRenderState::fillBoundingBox(); local_50 = in_XMM1_Da; fStack_4c = in_XMM1_Db; Transform::translate((Transform *)&local_30,(float)local_58,(float)((ulong)local_58 >> 0x20)); Transform::scale((Transform *)&local_30,local_50,fStack_4c); } local_60 = (list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> *)SVGElement::children_abi_cxx11_((SVGElement *)param_1); local_68 = std::__cxx11:: list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::begin(local_60); local_70 = std::__cxx11:: list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>> ::end(local_60); do { uVar4 = std::operator!=((_List_const_iterator *)&local_68,(_List_const_iterator *)&local_70); if ((uVar4 & 1) == 0) { pCVar7 = (Canvas *)SVGRenderState::operator->(local_18); Canvas::clipRect(pCVar7,&Rect::Empty,0,&Transform::Identity); return; } local_78 = (unique_ptr *) std:: _List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>> ::operator*((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>> *)&local_68); local_80 = (SVGNode *)toSVGElement(local_78); if ((local_80 != (SVGNode *)0x0) && (uVar4 = SVGElement::isDisplayNone((SVGElement *)local_80), (uVar4 & 1) == 0)) { local_98 = local_30; local_90 = local_28; local_88 = local_20; local_a0 = (SVGGeometryElement *)toSVGGeometryElement(local_80); if (local_a0 == (SVGGeometryElement *)0x0) { cVar1 = SVGElement::id((SVGElement *)local_80); if (cVar1 != '\x18') goto LAB_0011cfc4; (**(code **)(*(long *)local_80 + 0x50))(local_b8); Transform::multiply((Transform *)&local_98,local_b8); pSVar5 = (SVGNode *)SVGElement::firstChild((SVGElement *)local_80); local_a0 = (SVGGeometryElement *)toSVGGeometryElement(pSVar5); } if ((local_a0 != (SVGGeometryElement *)0x0) && (uVar4 = SVGGeometryElement::isRenderable(local_a0), (uVar4 & 1) != 0)) { pCVar7 = (Canvas *)SVGRenderState::operator->(local_18); uVar6 = SVGGeometryElement::path(local_a0); uVar2 = SVGGeometryElement::clip_rule(local_a0); (**(code **)(*(long *)local_a0 + 0x50))(local_e8); Transform::operator*(local_d0,(Transform *)&local_98); Canvas::clipPath(pCVar7,uVar6,uVar2,local_d0); return; } } LAB_0011cfc4: std:: _List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>:: operator++((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>> *)&local_68); } while( true ); }
48,436
lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
void SVGClipPathElement::applyClipPath(SVGRenderState& state) const { auto currentTransform = state.currentTransform() * localTransform(); if(m_clipPathUnits.value() == Units::ObjectBoundingBox) { auto bbox = state.fillBoundingBox(); currentTransform.translate(bbox.x, bbox.y); currentTransform.scale(bbox.w, bbox.h); } for(const auto& child : children()) { auto element = toSVGElement(child); if(element == nullptr || element->isDisplayNone()) continue; Transform clipTransform(currentTransform); auto shapeElement = toSVGGeometryElement(element); if(shapeElement == nullptr) { if(element->id() != ElementID::Use) continue; clipTransform.multiply(element->localTransform()); shapeElement = toSVGGeometryElement(element->firstChild()); } if(shapeElement == nullptr || !shapeElement->isRenderable()) continue; state->clipPath(shapeElement->path(), shapeElement->clip_rule(), clipTransform * shapeElement->localTransform()); return; } state->clipRect(Rect::Empty, FillRule::NonZero, Transform::Identity); }
O1
cpp
lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq %rdi, %r14 addq $0x10, %rsi movq 0x8c(%rdi), %rax movq %rsp, %rdx movq %rax, 0x10(%rdx) movups 0x7c(%rdi), %xmm0 movaps %xmm0, (%rdx) leaq 0x18(%rsp), %rdi callq 0xc91a cmpb $0x1, 0xa1(%r14) jne 0x1231d movq (%rbx), %rdi movq (%rdi), %rax callq *0x58(%rax) movaps %xmm1, 0x30(%rsp) movaps %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1] leaq 0x18(%rsp), %r15 movq %r15, %rdi callq 0xc996 movaps 0x30(%rsp), %xmm0 movaps %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1] movq %r15, %rdi callq 0xc9ea movq 0x58(%r14), %r12 addq $0x58, %r14 cmpq %r14, %r12 je 0x12405 leaq 0x48(%rsp), %r15 movq 0x10(%r12), %r13 testq %r13, %r13 je 0x1234b movq (%r13), %rax movq %r13, %rdi callq *0x18(%rax) testb %al, %al jne 0x1234e xorl %r13d, %r13d testq %r13, %r13 je 0x123dd cmpb $0x1, 0x40(%r13) je 0x123dd movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x18(%rsp), %xmm0 movaps %xmm0, (%rsp) movq (%r13), %rax movq %r13, %rdi callq *0x30(%rax) testb %al, %al movl $0x0, %ebp cmovneq %r13, %rbp testq %rbp, %rbp je 0x123ab testq %rbp, %rbp je 0x123dd cmpq $0x0, 0x98(%rbp) je 0x123dd cmpb $0x1, 0x40(%rbp) je 0x123dd cmpb $0x0, 0x42(%rbp) jne 0x123dd jmp 0x1242d cmpb $0x18, 0x43(%r13) jne 0x123dd movq (%r13), %rax movq %r15, %rdi movq %r13, %rsi callq *0x50(%rax) movq %rsp, %rdi movq %r15, %rsi callq 0xc964 movq 0x58(%r13), %rax addq $0x58, %r13 cmpq %r13, %rax je 0x123ec movq 0x10(%rax), %rbp jmp 0x123ee movq (%r12), %r12 cmpq %r14, %r12 jne 0x12333 jmp 0x12405 xorl %ebp, %ebp testq %rbp, %rbp je 0x12401 movq (%rbp), %rax movq %rbp, %rdi callq *0x30(%rax) testb %al, %al jne 0x1238b xorl %ebp, %ebp jmp 0x1238b movq 0x30(%rbx), %rdi leaq 0x30d6c(%rip), %rsi # 0x4317c leaq 0x49f51(%rip), %rcx # 0x5c368 xorl %edx, %edx callq 0xde34 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x98(%rbp), %r14 movq 0x30(%rbx), %rbx movzbl 0x111(%rbp), %r15d movq (%rbp), %rax leaq 0x60(%rsp), %r12 movq %r12, %rdi movq %rbp, %rsi callq *0x50(%rax) leaq 0x48(%rsp), %r13 movq %rsp, %rsi movq %r13, %rdi movq %r12, %rdx callq 0xc91a movq %rbx, %rdi movq %r14, %rsi movl %r15d, %edx movq %r13, %rcx callq 0xddce jmp 0x1241e
_ZNK7lunasvg18SVGClipPathElement13applyClipPathERNS_14SVGRenderStateE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rsi mov r14, rdi add rsi, 10h mov rax, [rdi+8Ch] mov rdx, rsp mov [rdx+10h], rax movups xmm0, xmmword ptr [rdi+7Ch] movaps xmmword ptr [rdx], xmm0 lea rdi, [rsp+0A8h+var_90] call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) cmp byte ptr [r14+0A1h], 1 jnz short loc_1231D mov rdi, [rbx] mov rax, [rdi] call qword ptr [rax+58h] movaps xmmword ptr [rsp+0A8h+var_78], xmm1 movaps xmm1, xmm0 shufps xmm1, xmm0, 55h ; 'U'; float lea r15, [rsp+0A8h+var_90] mov rdi, r15; this call _ZN7lunasvg9Transform9translateEff; lunasvg::Transform::translate(float,float) movaps xmm0, xmmword ptr [rsp+0A8h+var_78]; float movaps xmm1, xmm0 shufps xmm1, xmm0, 55h ; 'U'; float mov rdi, r15; this call _ZN7lunasvg9Transform5scaleEff; lunasvg::Transform::scale(float,float) loc_1231D: mov r12, [r14+58h] add r14, 58h ; 'X' cmp r12, r14 jz loc_12405 lea r15, [rsp+0A8h+var_60] loc_12333: mov r13, [r12+10h] test r13, r13 jz short loc_1234B mov rax, [r13+0] mov rdi, r13 call qword ptr [rax+18h] test al, al jnz short loc_1234E loc_1234B: xor r13d, r13d loc_1234E: test r13, r13 jz loc_123DD cmp byte ptr [r13+40h], 1 jz short loc_123DD mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_98], rax movups xmm0, [rsp+0A8h+var_90] movaps [rsp+0A8h+var_A8], xmm0 mov rax, [r13+0] mov rdi, r13 call qword ptr [rax+30h] test al, al mov ebp, 0 cmovnz rbp, r13 test rbp, rbp jz short loc_123AB loc_1238B: test rbp, rbp jz short loc_123DD cmp qword ptr [rbp+98h], 0 jz short loc_123DD cmp byte ptr [rbp+40h], 1 jz short loc_123DD cmp byte ptr [rbp+42h], 0 jnz short loc_123DD jmp loc_1242D loc_123AB: cmp byte ptr [r13+43h], 18h jnz short loc_123DD mov rax, [r13+0] mov rdi, r15 mov rsi, r13 call qword ptr [rax+50h] mov rdi, rsp; this mov rsi, r15; lunasvg::Transform * call _ZN7lunasvg9Transform8multiplyERKS0_; lunasvg::Transform::multiply(lunasvg::Transform const&) mov rax, [r13+58h] add r13, 58h ; 'X' cmp rax, r13 jz short loc_123EC mov rbp, [rax+10h] jmp short loc_123EE loc_123DD: mov r12, [r12] cmp r12, r14 jnz loc_12333 jmp short loc_12405 loc_123EC: xor ebp, ebp loc_123EE: test rbp, rbp jz short loc_12401 mov rax, [rbp+0] mov rdi, rbp call qword ptr [rax+30h] test al, al jnz short loc_1238B loc_12401: xor ebp, ebp jmp short loc_1238B loc_12405: mov rdi, [rbx+30h] lea rsi, _ZN7lunasvg4Rect5EmptyE; lunasvg::Rect::Empty lea rcx, _ZN7lunasvg9Transform8IdentityE; lunasvg::Transform::Identity xor edx, edx call _ZN7lunasvg6Canvas8clipRectERKNS_4RectENS_8FillRuleERKNS_9TransformE; lunasvg::Canvas::clipRect(lunasvg::Rect const&,lunasvg::FillRule,lunasvg::Transform const&) loc_1241E: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1242D: lea r14, [rbp+98h] mov rbx, [rbx+30h] movzx r15d, byte ptr [rbp+111h] mov rax, [rbp+0] lea r12, [rsp+0A8h+var_48] mov rdi, r12 mov rsi, rbp call qword ptr [rax+50h] lea r13, [rsp+0A8h+var_60] mov rsi, rsp mov rdi, r13 mov rdx, r12 call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) mov rdi, rbx mov rsi, r14 mov edx, r15d mov rcx, r13 call _ZN7lunasvg6Canvas8clipPathERKNS_4PathENS_8FillRuleERKNS_9TransformE; lunasvg::Canvas::clipPath(lunasvg::Path const&,lunasvg::FillRule,lunasvg::Transform const&) jmp short loc_1241E
long long lunasvg::SVGClipPathElement::applyClipPath( lunasvg::SVGClipPathElement *this, lunasvg::SVGRenderState *a2, double a3, __m128 a4) { char *v5; // rsi __m128 v6; // xmm0 long long v7; // rdx long long v8; // rcx long long v9; // r8 long long v10; // r9 _QWORD *i; // r12 long long v12; // r13 long long v13; // rbp long long v14; // rax long long v15; // rbx unsigned int v16; // r15d __m128 v18; // [rsp+0h] [rbp-A8h] BYREF long long v19; // [rsp+10h] [rbp-98h] _QWORD v20[2]; // [rsp+18h] [rbp-90h] BYREF long long v21; // [rsp+28h] [rbp-80h] __m128 v22; // [rsp+30h] [rbp-78h] _BYTE v23[24]; // [rsp+48h] [rbp-60h] BYREF _BYTE v24[72]; // [rsp+60h] [rbp-48h] BYREF v5 = (char *)a2 + 16; v19 = *(_QWORD *)((char *)this + 140); v6 = *(__m128 *)((char *)this + 124); v18 = v6; lunasvg::Transform::operator*((long long)v20, (long long)v5, (long long)&v18); if ( *((_BYTE *)this + 161) == 1 ) { *(double *)v6.m128_u64 = (*(double ( **)(_QWORD))(**(_QWORD **)a2 + 88LL))(*(_QWORD *)a2); v22 = a4; lunasvg::Transform::translate((lunasvg::Transform *)v20, v6.m128_f32[0], _mm_shuffle_ps(v6, v6, 85).m128_f32[0]); lunasvg::Transform::scale((lunasvg::Transform *)v20, v22.m128_f32[0], _mm_shuffle_ps(v22, v22, 85).m128_f32[0]); } for ( i = (_QWORD *)*((_QWORD *)this + 11); i != (_QWORD *)((char *)this + 88); i = (_QWORD *)*i ) { v12 = i[2]; if ( !v12 || !(*(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)v12 + 24LL))(i[2]) ) v12 = 0LL; if ( !v12 || *(_BYTE *)(v12 + 64) == 1 ) continue; v19 = v21; v13 = 0LL; if ( (*(unsigned __int8 ( **)(long long, char *, long long, long long, long long, long long, _QWORD, _QWORD, long long))(*(_QWORD *)v12 + 48LL))( v12, v5, v7, v8, v9, v10, v20[0], v20[1], v21) ) { v13 = v12; } if ( !v13 ) { if ( *(_BYTE *)(v12 + 67) != 24 ) continue; (*(void ( **)(_BYTE *, long long))(*(_QWORD *)v12 + 80LL))(v23, v12); v5 = v23; lunasvg::Transform::multiply((lunasvg::Transform *)&v18, (const lunasvg::Transform *)v23); v14 = *(_QWORD *)(v12 + 88); if ( v14 == v12 + 88 ) v13 = 0LL; else v13 = *(_QWORD *)(v14 + 16); if ( !v13 || !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)v13 + 48LL))(v13) ) v13 = 0LL; } if ( v13 && *(_QWORD *)(v13 + 152) && *(_BYTE *)(v13 + 64) != 1 && !*(_BYTE *)(v13 + 66) ) { v15 = *((_QWORD *)a2 + 6); v16 = *(unsigned __int8 *)(v13 + 273); (*(void ( **)(_BYTE *, long long))(*(_QWORD *)v13 + 80LL))(v24, v13); lunasvg::Transform::operator*((long long)v23, (long long)&v18, (long long)v24); return lunasvg::Canvas::clipPath(v15, (_QWORD *)(v13 + 152), v16, (long long)v23); } } return lunasvg::Canvas::clipRect(*((_QWORD *)a2 + 6), lunasvg::Rect::Empty, 0, (long long)&lunasvg::Transform::Identity); }
applyClipPath: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RSI MOV R14,RDI ADD RSI,0x10 MOV RAX,qword ptr [RDI + 0x8c] MOV RDX,RSP MOV qword ptr [RDX + 0x10],RAX MOVUPS XMM0,xmmword ptr [RDI + 0x7c] MOVAPS xmmword ptr [RDX],XMM0 LEA RDI,[RSP + 0x18] CALL 0x0010c91a CMP byte ptr [R14 + 0xa1],0x1 JNZ 0x0011231d MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x58] MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOVAPS XMM1,XMM0 SHUFPS XMM1,XMM0,0x55 LEA R15,[RSP + 0x18] MOV RDI,R15 CALL 0x0010c996 MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVAPS XMM1,XMM0 SHUFPS XMM1,XMM0,0x55 MOV RDI,R15 CALL 0x0010c9ea LAB_0011231d: MOV R12,qword ptr [R14 + 0x58] ADD R14,0x58 CMP R12,R14 JZ 0x00112405 LEA R15,[RSP + 0x48] LAB_00112333: MOV R13,qword ptr [R12 + 0x10] TEST R13,R13 JZ 0x0011234b MOV RAX,qword ptr [R13] MOV RDI,R13 CALL qword ptr [RAX + 0x18] TEST AL,AL JNZ 0x0011234e LAB_0011234b: XOR R13D,R13D LAB_0011234e: TEST R13,R13 JZ 0x001123dd CMP byte ptr [R13 + 0x40],0x1 JZ 0x001123dd MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x18] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R13] MOV RDI,R13 CALL qword ptr [RAX + 0x30] TEST AL,AL MOV EBP,0x0 CMOVNZ RBP,R13 TEST RBP,RBP JZ 0x001123ab LAB_0011238b: TEST RBP,RBP JZ 0x001123dd CMP qword ptr [RBP + 0x98],0x0 JZ 0x001123dd CMP byte ptr [RBP + 0x40],0x1 JZ 0x001123dd CMP byte ptr [RBP + 0x42],0x0 JNZ 0x001123dd JMP 0x0011242d LAB_001123ab: CMP byte ptr [R13 + 0x43],0x18 JNZ 0x001123dd MOV RAX,qword ptr [R13] MOV RDI,R15 MOV RSI,R13 CALL qword ptr [RAX + 0x50] MOV RDI,RSP MOV RSI,R15 CALL 0x0010c964 MOV RAX,qword ptr [R13 + 0x58] ADD R13,0x58 CMP RAX,R13 JZ 0x001123ec MOV RBP,qword ptr [RAX + 0x10] JMP 0x001123ee LAB_001123dd: MOV R12,qword ptr [R12] CMP R12,R14 JNZ 0x00112333 JMP 0x00112405 LAB_001123ec: XOR EBP,EBP LAB_001123ee: TEST RBP,RBP JZ 0x00112401 MOV RAX,qword ptr [RBP] MOV RDI,RBP CALL qword ptr [RAX + 0x30] TEST AL,AL JNZ 0x0011238b LAB_00112401: XOR EBP,EBP JMP 0x0011238b LAB_00112405: MOV RDI,qword ptr [RBX + 0x30] LEA RSI,[0x14317c] LEA RCX,[0x15c368] XOR EDX,EDX CALL 0x0010de34 LAB_0011241e: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011242d: LEA R14,[RBP + 0x98] MOV RBX,qword ptr [RBX + 0x30] MOVZX R15D,byte ptr [RBP + 0x111] MOV RAX,qword ptr [RBP] LEA R12,[RSP + 0x60] MOV RDI,R12 MOV RSI,RBP CALL qword ptr [RAX + 0x50] LEA R13,[RSP + 0x48] MOV RSI,RSP MOV RDI,R13 MOV RDX,R12 CALL 0x0010c91a MOV RDI,RBX MOV RSI,R14 MOV EDX,R15D MOV RCX,R13 CALL 0x0010ddce JMP 0x0011241e
/* lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const */ void lunasvg::SVGClipPathElement::applyClipPath(SVGRenderState *param_1) { int1 uVar1; Canvas *pCVar2; char cVar3; long *plVar4; int8 *in_RSI; SVGRenderState *pSVar5; long *plVar6; int8 uVar7; float in_XMM1_Da; float in_XMM1_Db; int8 local_a8; int8 uStack_a0; int8 local_98; int4 local_90; int4 uStack_8c; int4 uStack_88; int4 uStack_84; int8 local_80; float local_78; float fStack_74; Transform local_60 [24]; int1 local_48 [24]; local_98 = *(int8 *)(param_1 + 0x8c); local_a8 = *(int8 *)(param_1 + 0x7c); uStack_a0 = *(int8 *)(param_1 + 0x84); Transform::operator*((Transform *)&local_90,(Transform *)(in_RSI + 2)); if (param_1[0xa1] == (SVGRenderState)0x1) { uVar7 = (**(code **)(*(long *)*in_RSI + 0x58))(); local_78 = in_XMM1_Da; fStack_74 = in_XMM1_Db; Transform::translate((float)uVar7,(float)((ulong)uVar7 >> 0x20)); Transform::scale(local_78,fStack_74); } pSVar5 = *(SVGRenderState **)(param_1 + 0x58); if (pSVar5 != param_1 + 0x58) { do { plVar6 = *(long **)(pSVar5 + 0x10); if ((plVar6 == (long *)0x0) || (cVar3 = (**(code **)(*plVar6 + 0x18))(plVar6), cVar3 == '\0')) { plVar6 = (long *)0x0; } if ((plVar6 != (long *)0x0) && ((char)plVar6[8] != '\x01')) { local_98 = local_80; local_a8 = CONCAT44(uStack_8c,local_90); uStack_a0 = CONCAT44(uStack_84,uStack_88); cVar3 = (**(code **)(*plVar6 + 0x30))(plVar6); plVar4 = (long *)0x0; if (cVar3 != '\0') { plVar4 = plVar6; } if (plVar4 == (long *)0x0) { if (*(char *)((long)plVar6 + 0x43) != '\x18') goto LAB_001123dd; (**(code **)(*plVar6 + 0x50))(local_60,plVar6); Transform::multiply((Transform *)&local_a8,local_60); if ((long *)plVar6[0xb] == plVar6 + 0xb) { plVar4 = (long *)0x0; } else { plVar4 = (long *)((long *)plVar6[0xb])[2]; } if ((plVar4 == (long *)0x0) || (cVar3 = (**(code **)(*plVar4 + 0x30))(plVar4), cVar3 == '\0')) { plVar4 = (long *)0x0; } } if ((((plVar4 != (long *)0x0) && (plVar4[0x13] != 0)) && ((char)plVar4[8] != '\x01')) && (*(char *)((long)plVar4 + 0x42) == '\0')) { pCVar2 = (Canvas *)in_RSI[6]; uVar1 = *(int1 *)((long)plVar4 + 0x111); (**(code **)(*plVar4 + 0x50))(local_48,plVar4); Transform::operator*(local_60,(Transform *)&local_a8); Canvas::clipPath(pCVar2,plVar4 + 0x13,uVar1,local_60); return; } } LAB_001123dd: pSVar5 = *(SVGRenderState **)pSVar5; } while (pSVar5 != param_1 + 0x58); } Canvas::clipRect((Canvas *)in_RSI[6],&Rect::Empty,0,Transform::Identity); return; }
48,437
lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
void SVGClipPathElement::applyClipPath(SVGRenderState& state) const { auto currentTransform = state.currentTransform() * localTransform(); if(m_clipPathUnits.value() == Units::ObjectBoundingBox) { auto bbox = state.fillBoundingBox(); currentTransform.translate(bbox.x, bbox.y); currentTransform.scale(bbox.w, bbox.h); } for(const auto& child : children()) { auto element = toSVGElement(child); if(element == nullptr || element->isDisplayNone()) continue; Transform clipTransform(currentTransform); auto shapeElement = toSVGGeometryElement(element); if(shapeElement == nullptr) { if(element->id() != ElementID::Use) continue; clipTransform.multiply(element->localTransform()); shapeElement = toSVGGeometryElement(element->firstChild()); } if(shapeElement == nullptr || !shapeElement->isRenderable()) continue; state->clipPath(shapeElement->path(), shapeElement->clip_rule(), clipTransform * shapeElement->localTransform()); return; } state->clipRect(Rect::Empty, FillRule::NonZero, Transform::Identity); }
O3
cpp
lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq %rdi, %r14 addq $0x10, %rsi movq 0x8c(%rdi), %rax movq %rsp, %rdx movq %rax, 0x10(%rdx) movups 0x7c(%rdi), %xmm0 movaps %xmm0, (%rdx) leaq 0x18(%rsp), %rdi callq 0xc7ea cmpb $0x1, 0xa1(%r14) jne 0x11f89 movq (%rbx), %rdi movq (%rdi), %rax callq *0x58(%rax) movaps %xmm1, 0x30(%rsp) movaps %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1] leaq 0x18(%rsp), %r15 movq %r15, %rdi callq 0xc866 movaps 0x30(%rsp), %xmm0 movaps %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1] movq %r15, %rdi callq 0xc8ba movq 0x58(%r14), %rbp addq $0x58, %r14 cmpq %r14, %rbp je 0x12053 leaq 0x48(%rsp), %r15 movq %rsp, %r12 movq 0x10(%rbp), %r13 testq %r13, %r13 je 0x12046 movq (%r13), %rax movq %r13, %rdi callq *0x18(%rax) testb %al, %al je 0x12046 cmpb $0x1, 0x40(%r13) je 0x12046 movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x18(%rsp), %xmm0 movaps %xmm0, (%rsp) movq (%r13), %rax movq %r13, %rdi callq *0x30(%rax) testb %al, %al je 0x12003 cmpq $0x0, 0x98(%r13) je 0x12046 cmpb $0x1, 0x40(%r13) je 0x12046 cmpb $0x0, 0x42(%r13) jne 0x12046 jmp 0x1207b cmpb $0x18, 0x43(%r13) jne 0x12046 movq (%r13), %rax movq %r15, %rdi movq %r13, %rsi callq *0x50(%rax) movq %r12, %rdi movq %r15, %rsi callq 0xc834 movq 0x58(%r13), %rax addq $0x58, %r13 cmpq %r13, %rax je 0x12046 movq 0x10(%rax), %r13 testq %r13, %r13 je 0x12046 movq (%r13), %rax movq %r13, %rdi callq *0x30(%rax) testb %al, %al jne 0x11fe9 movq (%rbp), %rbp cmpq %r14, %rbp jne 0x11fa2 movq 0x30(%rbx), %rdi leaq 0x3111e(%rip), %rsi # 0x4317c leaq 0x4a2e3(%rip), %rcx # 0x5c348 xorl %edx, %edx callq 0xdd04 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x98(%r13), %r14 movq 0x30(%rbx), %rbx movzbl 0x111(%r13), %ebp movq (%r13), %rax leaq 0x60(%rsp), %r15 movq %r15, %rdi movq %r13, %rsi callq *0x50(%rax) leaq 0x48(%rsp), %r12 movq %rsp, %rsi movq %r12, %rdi movq %r15, %rdx callq 0xc7ea movq %rbx, %rdi movq %r14, %rsi movl %ebp, %edx movq %r12, %rcx callq 0xdc9e jmp 0x1206c nop
_ZNK7lunasvg18SVGClipPathElement13applyClipPathERNS_14SVGRenderStateE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rsi mov r14, rdi add rsi, 10h mov rax, [rdi+8Ch] mov rdx, rsp mov [rdx+10h], rax movups xmm0, xmmword ptr [rdi+7Ch] movaps xmmword ptr [rdx], xmm0 lea rdi, [rsp+0A8h+var_90] call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) cmp byte ptr [r14+0A1h], 1 jnz short loc_11F89 mov rdi, [rbx] mov rax, [rdi] call qword ptr [rax+58h] movaps xmmword ptr [rsp+0A8h+var_78], xmm1 movaps xmm1, xmm0 shufps xmm1, xmm0, 55h ; 'U'; float lea r15, [rsp+0A8h+var_90] mov rdi, r15; this call _ZN7lunasvg9Transform9translateEff; lunasvg::Transform::translate(float,float) movaps xmm0, xmmword ptr [rsp+0A8h+var_78]; float movaps xmm1, xmm0 shufps xmm1, xmm0, 55h ; 'U'; float mov rdi, r15; this call _ZN7lunasvg9Transform5scaleEff; lunasvg::Transform::scale(float,float) loc_11F89: mov rbp, [r14+58h] add r14, 58h ; 'X' cmp rbp, r14 jz loc_12053 lea r15, [rsp+0A8h+var_60] mov r12, rsp loc_11FA2: mov r13, [rbp+10h] test r13, r13 jz loc_12046 mov rax, [r13+0] mov rdi, r13 call qword ptr [rax+18h] test al, al jz loc_12046 cmp byte ptr [r13+40h], 1 jz short loc_12046 mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_98], rax movups xmm0, [rsp+0A8h+var_90] movaps [rsp+0A8h+var_A8], xmm0 mov rax, [r13+0] mov rdi, r13 call qword ptr [rax+30h] test al, al jz short loc_12003 loc_11FE9: cmp qword ptr [r13+98h], 0 jz short loc_12046 cmp byte ptr [r13+40h], 1 jz short loc_12046 cmp byte ptr [r13+42h], 0 jnz short loc_12046 jmp short loc_1207B loc_12003: cmp byte ptr [r13+43h], 18h jnz short loc_12046 mov rax, [r13+0] mov rdi, r15 mov rsi, r13 call qword ptr [rax+50h] mov rdi, r12; this mov rsi, r15; lunasvg::Transform * call _ZN7lunasvg9Transform8multiplyERKS0_; lunasvg::Transform::multiply(lunasvg::Transform const&) mov rax, [r13+58h] add r13, 58h ; 'X' cmp rax, r13 jz short loc_12046 mov r13, [rax+10h] test r13, r13 jz short loc_12046 mov rax, [r13+0] mov rdi, r13 call qword ptr [rax+30h] test al, al jnz short loc_11FE9 loc_12046: mov rbp, [rbp+0] cmp rbp, r14 jnz loc_11FA2 loc_12053: mov rdi, [rbx+30h] lea rsi, _ZN7lunasvg4Rect5EmptyE; lunasvg::Rect::Empty lea rcx, _ZN7lunasvg9Transform8IdentityE; lunasvg::Transform::Identity xor edx, edx call _ZN7lunasvg6Canvas8clipRectERKNS_4RectENS_8FillRuleERKNS_9TransformE; lunasvg::Canvas::clipRect(lunasvg::Rect const&,lunasvg::FillRule,lunasvg::Transform const&) loc_1206C: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1207B: lea r14, [r13+98h] mov rbx, [rbx+30h] movzx ebp, byte ptr [r13+111h] mov rax, [r13+0] lea r15, [rsp+0A8h+var_48] mov rdi, r15 mov rsi, r13 call qword ptr [rax+50h] lea r12, [rsp+0A8h+var_60] mov rsi, rsp mov rdi, r12 mov rdx, r15 call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) mov rdi, rbx mov rsi, r14 mov edx, ebp mov rcx, r12 call _ZN7lunasvg6Canvas8clipPathERKNS_4PathENS_8FillRuleERKNS_9TransformE; lunasvg::Canvas::clipPath(lunasvg::Path const&,lunasvg::FillRule,lunasvg::Transform const&) jmp short loc_1206C
long long lunasvg::SVGClipPathElement::applyClipPath( lunasvg::SVGClipPathElement *this, lunasvg::SVGRenderState *a2, double a3, __m128 a4) { char *v5; // rsi __m128 v6; // xmm0 _QWORD *v7; // rbp _BYTE *v8; // r13 long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 long long v13; // rax long long v14; // rbx unsigned int v15; // ebp __m128 v17; // [rsp+0h] [rbp-A8h] BYREF long long v18; // [rsp+10h] [rbp-98h] _QWORD v19[2]; // [rsp+18h] [rbp-90h] BYREF long long v20; // [rsp+28h] [rbp-80h] __m128 v21; // [rsp+30h] [rbp-78h] _BYTE v22[24]; // [rsp+48h] [rbp-60h] BYREF _BYTE v23[72]; // [rsp+60h] [rbp-48h] BYREF v5 = (char *)a2 + 16; v18 = *(_QWORD *)((char *)this + 140); v6 = *(__m128 *)((char *)this + 124); v17 = v6; lunasvg::Transform::operator*((long long)v19, (long long)v5, (long long)&v17); if ( *((_BYTE *)this + 161) == 1 ) { *(double *)v6.m128_u64 = (*(double ( **)(_QWORD))(**(_QWORD **)a2 + 88LL))(*(_QWORD *)a2); v21 = a4; lunasvg::Transform::translate((lunasvg::Transform *)v19, v6.m128_f32[0], _mm_shuffle_ps(v6, v6, 85).m128_f32[0]); lunasvg::Transform::scale((lunasvg::Transform *)v19, v21.m128_f32[0], _mm_shuffle_ps(v21, v21, 85).m128_f32[0]); } v7 = (_QWORD *)*((_QWORD *)this + 11); if ( v7 == (_QWORD *)((char *)this + 88) ) return lunasvg::Canvas::clipRect( *((_QWORD *)a2 + 6), lunasvg::Rect::Empty, 0, (long long)&lunasvg::Transform::Identity); while ( 1 ) { v8 = (_BYTE *)v7[2]; if ( v8 ) { if ( (*(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)v8 + 24LL))(v7[2]) ) { if ( v8[64] != 1 ) { v18 = v20; if ( (*(unsigned __int8 ( **)(_BYTE *, char *, long long, long long, long long, long long, _QWORD, _QWORD, long long))(*(_QWORD *)v8 + 48LL))( v8, v5, v9, v10, v11, v12, v19[0], v19[1], v20) || v8[67] == 24 && ((*(void ( **)(_BYTE *, _BYTE *))(*(_QWORD *)v8 + 80LL))(v22, v8), v5 = v22, lunasvg::Transform::multiply((lunasvg::Transform *)&v17, (const lunasvg::Transform *)v22), v13 = *((_QWORD *)v8 + 11), (_BYTE *)v13 != v8 + 88) && (v8 = *(_BYTE **)(v13 + 16)) != 0LL && (*(unsigned __int8 ( **)(_BYTE *))(*(_QWORD *)v8 + 48LL))(v8) ) { if ( *((_QWORD *)v8 + 19) && v8[64] != 1 && !v8[66] ) break; } } } } v7 = (_QWORD *)*v7; if ( v7 == (_QWORD *)((char *)this + 88) ) return lunasvg::Canvas::clipRect( *((_QWORD *)a2 + 6), lunasvg::Rect::Empty, 0, (long long)&lunasvg::Transform::Identity); } v14 = *((_QWORD *)a2 + 6); v15 = (unsigned __int8)v8[273]; (*(void ( **)(_BYTE *, _BYTE *))(*(_QWORD *)v8 + 80LL))(v23, v8); lunasvg::Transform::operator*((long long)v22, (long long)&v17, (long long)v23); return lunasvg::Canvas::clipPath(v14, (_QWORD *)v8 + 19, v15, (long long)v22); }
applyClipPath: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RSI MOV R14,RDI ADD RSI,0x10 MOV RAX,qword ptr [RDI + 0x8c] MOV RDX,RSP MOV qword ptr [RDX + 0x10],RAX MOVUPS XMM0,xmmword ptr [RDI + 0x7c] MOVAPS xmmword ptr [RDX],XMM0 LEA RDI,[RSP + 0x18] CALL 0x0010c7ea CMP byte ptr [R14 + 0xa1],0x1 JNZ 0x00111f89 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x58] MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOVAPS XMM1,XMM0 SHUFPS XMM1,XMM0,0x55 LEA R15,[RSP + 0x18] MOV RDI,R15 CALL 0x0010c866 MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVAPS XMM1,XMM0 SHUFPS XMM1,XMM0,0x55 MOV RDI,R15 CALL 0x0010c8ba LAB_00111f89: MOV RBP,qword ptr [R14 + 0x58] ADD R14,0x58 CMP RBP,R14 JZ 0x00112053 LEA R15,[RSP + 0x48] MOV R12,RSP LAB_00111fa2: MOV R13,qword ptr [RBP + 0x10] TEST R13,R13 JZ 0x00112046 MOV RAX,qword ptr [R13] MOV RDI,R13 CALL qword ptr [RAX + 0x18] TEST AL,AL JZ 0x00112046 CMP byte ptr [R13 + 0x40],0x1 JZ 0x00112046 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x18] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R13] MOV RDI,R13 CALL qword ptr [RAX + 0x30] TEST AL,AL JZ 0x00112003 LAB_00111fe9: CMP qword ptr [R13 + 0x98],0x0 JZ 0x00112046 CMP byte ptr [R13 + 0x40],0x1 JZ 0x00112046 CMP byte ptr [R13 + 0x42],0x0 JNZ 0x00112046 JMP 0x0011207b LAB_00112003: CMP byte ptr [R13 + 0x43],0x18 JNZ 0x00112046 MOV RAX,qword ptr [R13] MOV RDI,R15 MOV RSI,R13 CALL qword ptr [RAX + 0x50] MOV RDI,R12 MOV RSI,R15 CALL 0x0010c834 MOV RAX,qword ptr [R13 + 0x58] ADD R13,0x58 CMP RAX,R13 JZ 0x00112046 MOV R13,qword ptr [RAX + 0x10] TEST R13,R13 JZ 0x00112046 MOV RAX,qword ptr [R13] MOV RDI,R13 CALL qword ptr [RAX + 0x30] TEST AL,AL JNZ 0x00111fe9 LAB_00112046: MOV RBP,qword ptr [RBP] CMP RBP,R14 JNZ 0x00111fa2 LAB_00112053: MOV RDI,qword ptr [RBX + 0x30] LEA RSI,[0x14317c] LEA RCX,[0x15c348] XOR EDX,EDX CALL 0x0010dd04 LAB_0011206c: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011207b: LEA R14,[R13 + 0x98] MOV RBX,qword ptr [RBX + 0x30] MOVZX EBP,byte ptr [R13 + 0x111] MOV RAX,qword ptr [R13] LEA R15,[RSP + 0x60] MOV RDI,R15 MOV RSI,R13 CALL qword ptr [RAX + 0x50] LEA R12,[RSP + 0x48] MOV RSI,RSP MOV RDI,R12 MOV RDX,R15 CALL 0x0010c7ea MOV RDI,RBX MOV RSI,R14 MOV EDX,EBP MOV RCX,R12 CALL 0x0010dc9e JMP 0x0011206c
/* lunasvg::SVGClipPathElement::applyClipPath(lunasvg::SVGRenderState&) const */ void lunasvg::SVGClipPathElement::applyClipPath(SVGRenderState *param_1) { int1 uVar1; Canvas *pCVar2; char cVar3; SVGRenderState *pSVar4; int8 *in_RSI; long *plVar5; int8 uVar6; float in_XMM1_Da; float in_XMM1_Db; int8 local_a8; int8 uStack_a0; int8 local_98; int4 local_90; int4 uStack_8c; int4 uStack_88; int4 uStack_84; int8 local_80; float local_78; float fStack_74; Transform local_60 [24]; int1 local_48 [24]; local_98 = *(int8 *)(param_1 + 0x8c); local_a8 = *(int8 *)(param_1 + 0x7c); uStack_a0 = *(int8 *)(param_1 + 0x84); Transform::operator*((Transform *)&local_90,(Transform *)(in_RSI + 2)); if (param_1[0xa1] == (SVGRenderState)0x1) { uVar6 = (**(code **)(*(long *)*in_RSI + 0x58))(); local_78 = in_XMM1_Da; fStack_74 = in_XMM1_Db; Transform::translate((float)uVar6,(float)((ulong)uVar6 >> 0x20)); Transform::scale(local_78,fStack_74); } pSVar4 = *(SVGRenderState **)(param_1 + 0x58); if (pSVar4 != param_1 + 0x58) { do { plVar5 = *(long **)(pSVar4 + 0x10); if (((plVar5 != (long *)0x0) && (cVar3 = (**(code **)(*plVar5 + 0x18))(plVar5), cVar3 != '\0') ) && ((char)plVar5[8] != '\x01')) { local_98 = local_80; local_a8 = CONCAT44(uStack_8c,local_90); uStack_a0 = CONCAT44(uStack_84,uStack_88); cVar3 = (**(code **)(*plVar5 + 0x30))(plVar5); if (cVar3 == '\0') { if (*(char *)((long)plVar5 + 0x43) == '\x18') { (**(code **)(*plVar5 + 0x50))(local_60,plVar5); Transform::multiply((Transform *)&local_a8,local_60); if ((((long *)plVar5[0xb] != plVar5 + 0xb) && (plVar5 = (long *)((long *)plVar5[0xb])[2], plVar5 != (long *)0x0)) && (cVar3 = (**(code **)(*plVar5 + 0x30))(plVar5), cVar3 != '\0')) goto LAB_00111fe9; } } else { LAB_00111fe9: if (((plVar5[0x13] != 0) && ((char)plVar5[8] != '\x01')) && (*(char *)((long)plVar5 + 0x42) == '\0')) { pCVar2 = (Canvas *)in_RSI[6]; uVar1 = *(int1 *)((long)plVar5 + 0x111); (**(code **)(*plVar5 + 0x50))(local_48,plVar5); Transform::operator*(local_60,(Transform *)&local_a8); Canvas::clipPath(pCVar2,plVar5 + 0x13,uVar1,local_60); return; } } } pSVar4 = *(SVGRenderState **)pSVar4; } while (pSVar4 != param_1 + 0x58); } Canvas::clipRect((Canvas *)in_RSI[6],&Rect::Empty,0,Transform::Identity); return; }
48,438
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
llama.cpp/common/minja/minja.hpp
static std::string strip(const std::string & s, const std::string & chars = "", bool left = true, bool right = true) { auto charset = chars.empty() ? " \t\n\r" : chars; auto start = left ? s.find_first_not_of(charset) : 0; if (start == std::string::npos) return ""; auto end = right ? s.find_last_not_of(charset) : s.size() - 1; return s.substr(start, end - start + 1); }
O3
cpp
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %r9d, %ebp movl %r8d, %r15d movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) testq %rcx, %rcx je 0xc3983 addq %rdx, %rcx movq %rsp, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x2ca0a jmp 0xc3999 leaq 0x83666(%rip), %rsi # 0x146ff0 leaq 0x83663(%rip), %rdx # 0x146ff4 movq %rsp, %rdi callq 0x2cd14 testb %r15b, %r15b je 0xc39d5 movq (%rsp), %rsi movq 0x8(%rsp), %rcx movq %r14, %rdi xorl %edx, %edx callq 0x24290 movq %rax, %r15 cmpq $-0x1, %rax jne 0xc39d8 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x83228(%rip), %rdx # 0x146bf0 movq %rbx, %rdi movq %rdx, %rsi callq 0x2cd14 jmp 0xc3a15 xorl %r15d, %r15d testb %bpl, %bpl je 0xc39fa movq (%rsp), %rsi movq 0x8(%rsp), %rcx movq %r14, %rdi movq $-0x1, %rdx callq 0x23340 movq %rax, %rcx jmp 0xc3a01 movq 0x8(%r14), %rcx decq %rcx subq %r15, %rcx incq %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x24710 movq (%rsp), %rdi cmpq %r12, %rdi je 0xc3a2b movq 0x10(%rsp), %rsi incq %rsi callq 0x231f0 addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0xc3a3a movq %rax, %rbx movq (%rsp), %rdi cmpq %r12, %rdi je 0xc3a53 movq 0x10(%rsp), %rsi incq %rsi callq 0x231f0 movq %rbx, %rdi callq 0x23ee0
_ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_bb: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov ebp, r9d mov r15d, r8d mov r14, rsi mov rbx, rdi lea r12, [rsp+48h+var_38] mov [r12-10h], r12 test rcx, rcx jz short loc_C3983 add rcx, rdx mov rdi, rsp mov rsi, rdx mov rdx, rcx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) jmp short loc_C3999 loc_C3983: lea rsi, asc_146FF0; " \t\n\r" lea rdx, asc_146FF0+4; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_C3999: test r15b, r15b jz short loc_C39D5 mov rsi, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong) mov r15, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_C39D8 lea rax, [rbx+10h] mov [rbx], rax lea rdx, aExampleToolCal+1Dh; "" mov rdi, rbx mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) jmp short loc_C3A15 loc_C39D5: xor r15d, r15d loc_C39D8: test bpl, bpl jz short loc_C39FA mov rsi, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov rdi, r14 mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcmm; std::string::find_last_not_of(char const*,ulong,ulong) mov rcx, rax jmp short loc_C3A01 loc_C39FA: mov rcx, [r14+8] dec rcx loc_C3A01: sub rcx, r15 inc rcx mov rdi, rbx mov rsi, r14 mov rdx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) loc_C3A15: mov rdi, [rsp+48h+var_48]; void * cmp rdi, r12 jz short loc_C3A2B mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C3A2B: add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_C3A3A: mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r12 jz short loc_C3A53 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C3A53: mov rdi, rbx call __Unwind_Resume
void minja::strip(_QWORD *a1, long long a2, _BYTE *a3, long long a4, char a5, char a6) { long long first_not_of; // r15 long long last_not_of; // rcx void *v10; // [rsp+0h] [rbp-48h] BYREF long long v11; // [rsp+8h] [rbp-40h] _QWORD v12[7]; // [rsp+10h] [rbp-38h] BYREF v10 = v12; if ( a4 ) std::string::_M_construct<char *>((long long)&v10, a3, (long long)&a3[a4]); else std::string::_M_construct<char const*>((long long)&v10, " \t\n\r", (long long)""); if ( a5 ) { first_not_of = std::string::find_first_not_of(a2, v10, 0LL, v11); if ( first_not_of == -1 ) { *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "", (long long)""); goto LABEL_12; } } else { first_not_of = 0LL; } if ( a6 ) last_not_of = std::string::find_last_not_of(a2, v10, -1LL, v11); else last_not_of = *(_QWORD *)(a2 + 8) - 1LL; std::string::substr(a1, a2, first_not_of, last_not_of - first_not_of + 1); LABEL_12: if ( v10 != v12 ) operator delete(v10, v12[0] + 1LL); }
strip: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV EBP,R9D MOV R15D,R8D MOV R14,RSI MOV RBX,RDI LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 TEST RCX,RCX JZ 0x001c3983 ADD RCX,RDX MOV RDI,RSP MOV RSI,RDX MOV RDX,RCX CALL 0x0012ca0a JMP 0x001c3999 LAB_001c3983: LEA RSI,[0x246ff0] LEA RDX,[0x246ff4] MOV RDI,RSP CALL 0x0012cd14 LAB_001c3999: TEST R15B,R15B JZ 0x001c39d5 MOV RSI,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDI,R14 XOR EDX,EDX CALL 0x00124290 MOV R15,RAX CMP RAX,-0x1 JNZ 0x001c39d8 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_001c39c1: LEA RDX,[0x246bf0] MOV RDI,RBX MOV RSI,RDX CALL 0x0012cd14 JMP 0x001c3a15 LAB_001c39d5: XOR R15D,R15D LAB_001c39d8: TEST BPL,BPL JZ 0x001c39fa MOV RSI,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDI,R14 MOV RDX,-0x1 CALL 0x00123340 MOV RCX,RAX JMP 0x001c3a01 LAB_001c39fa: MOV RCX,qword ptr [R14 + 0x8] DEC RCX LAB_001c3a01: SUB RCX,R15 INC RCX LAB_001c3a07: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00124710 LAB_001c3a15: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001c3a2b MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001231f0 LAB_001c3a2b: ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* minja::strip(std::__cxx11::string const&, std::__cxx11::string const&, bool, bool) */ void minja::strip(string *param_1,string *param_2,bool param_3,bool param_4) { long lVar1; int7 in_register_00000009; int7 in_register_00000011; char in_R8B; char in_R9B; long *local_48 [2]; long local_38 [2]; local_48[0] = local_38; if (CONCAT71(in_register_00000009,param_4) == 0) { std::__cxx11::string::_M_construct<char_const*>(local_48,&DAT_00246ff0,&DAT_00246ff4); } else { std::__cxx11::string::_M_construct<char*> (local_48,CONCAT71(in_register_00000011,param_3), CONCAT71(in_register_00000009,param_4) + CONCAT71(in_register_00000011,param_3)); } if ((in_R8B == '\0') || (lVar1 = std::__cxx11::string::find_first_not_of((char *)param_2,(ulong)local_48[0],0), lVar1 != -1)) { if (in_R9B != '\0') { std::__cxx11::string::find_last_not_of((char *)param_2,(ulong)local_48[0],0xffffffffffffffff); } /* try { // try from 001c3a07 to 001c3a14 has its CatchHandler @ 001c3a3a */ std::__cxx11::string::substr((ulong)param_1,(ulong)param_2); } else { *(string **)param_1 = param_1 + 0x10; /* try { // try from 001c39c1 to 001c39d2 has its CatchHandler @ 001c3a38 */ std::__cxx11::string::_M_construct<char_const*>(param_1,""); } if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } return; }
48,439
js_std_add_helpers
bluesky950520[P]quickjs/quickjs-libc.c
void js_std_add_helpers(JSContext *ctx, int argc, char **argv) { JSValue global_obj, console, args; int i; /* XXX: should these global definitions be enumerable? */ global_obj = JS_GetGlobalObject(ctx); console = JS_NewObject(ctx); JS_SetPropertyStr(ctx, console, "log", JS_NewCFunction(ctx, js_print, "log", 1)); JS_SetPropertyStr(ctx, global_obj, "console", console); /* same methods as the mozilla JS shell */ if (argc >= 0) { args = JS_NewArray(ctx); for(i = 0; i < argc; i++) { JS_SetPropertyUint32(ctx, args, i, JS_NewString(ctx, argv[i])); } JS_SetPropertyStr(ctx, global_obj, "scriptArgs", args); } JS_SetPropertyStr(ctx, global_obj, "print", JS_NewCFunction(ctx, js_print, "print", 1)); JS_FreeValue(ctx, global_obj); }
O2
c
js_std_add_helpers: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 movl %esi, 0x4(%rsp) movq %rdi, %rbx callq 0x1c430 movq %rax, %r15 movq %rdx, %rbp movq %rbx, %rdi callq 0x1b2c9 movq %rax, %r14 movq %rdx, %r13 leaq 0x72a70(%rip), %rsi # 0x82918 movq %rbx, %rdi callq 0xffa5 movq %rdx, %r9 movq %rbx, %rdi movq %r14, %rsi movq %r13, %rdx leaq 0x72a55(%rip), %rcx # 0x82918 movq %rax, %r8 callq 0x1f151 leaq 0x72a4a(%rip), %rcx # 0x8291c movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx movq %r14, %r8 movl 0x4(%rsp), %r14d movq %r13, %r9 callq 0x1f151 testl %r14d, %r14d js 0xff60 movq %rbp, 0x8(%rsp) movq %r15, 0x10(%rsp) movq %rbx, %rdi callq 0x1b2bb movq %rax, %r13 movq %rdx, %rbp movl %r14d, %r15d xorl %r14d, %r14d cmpq %r14, %r15 je 0xff3b movq (%r12,%r14,8), %rsi movq %rbx, %rdi callq 0xf98d movq %rdx, %r9 movq %rbx, %rdi movq %r13, %rsi movq %rbp, %rdx movl %r14d, %ecx movq %rax, %r8 callq 0x1ece3 incq %r14 jmp 0xff0e leaq 0x729e2(%rip), %rcx # 0x82924 movq %rbx, %rdi movq 0x10(%rsp), %r15 movq %r15, %rsi movq 0x8(%rsp), %rdx movq %r13, %r8 movq %rbp, %r9 movq %rdx, %rbp callq 0x1f151 leaq 0x729c8(%rip), %r14 # 0x8292f movq %rbx, %rdi movq %r14, %rsi callq 0xffa5 movq %rdx, %r9 movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx movq %r14, %rcx movq %rax, %r8 callq 0x1f151 movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1801e
js_std_add_helpers: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx mov [rsp+48h+var_44], esi mov rbx, rdi call JS_GetGlobalObject mov r15, rax mov rbp, rdx mov rdi, rbx call JS_NewObject mov r14, rax mov r13, rdx lea rsi, aLog_0; "log" mov rdi, rbx call JS_NewCFunction mov r9, rdx mov rdi, rbx mov rsi, r14 mov rdx, r13 lea rcx, aLog_0; "log" mov r8, rax call JS_SetPropertyStr lea rcx, aConsole; "console" mov rdi, rbx mov rsi, r15 mov rdx, rbp mov r8, r14 mov r14d, [rsp+48h+var_44] mov r9, r13 call JS_SetPropertyStr test r14d, r14d js short loc_FF60 mov [rsp+48h+var_40], rbp mov [rsp+48h+var_38], r15 mov rdi, rbx call JS_NewArray mov r13, rax mov rbp, rdx mov r15d, r14d xor r14d, r14d loc_FF0E: cmp r15, r14 jz short loc_FF3B mov rsi, [r12+r14*8] mov rdi, rbx call JS_NewString mov r9, rdx mov rdi, rbx mov rsi, r13 mov rdx, rbp mov ecx, r14d mov r8, rax call JS_SetPropertyUint32 inc r14 jmp short loc_FF0E loc_FF3B: lea rcx, aScriptargs; "scriptArgs" mov rdi, rbx mov r15, [rsp+48h+var_38] mov rsi, r15 mov rdx, [rsp+48h+var_40] mov r8, r13 mov r9, rbp mov rbp, rdx call JS_SetPropertyStr loc_FF60: lea r14, aPrint; "print" mov rdi, rbx mov rsi, r14 call JS_NewCFunction mov r9, rdx mov rdi, rbx mov rsi, r15 mov rdx, rbp mov rcx, r14 mov r8, rax call JS_SetPropertyStr mov rdi, rbx mov rsi, r15 mov rdx, rbp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_FreeValue
long long js_std_add_helpers(long long a1, int a2, long long a3) { long long GlobalObject; // r15 long long v5; // rdx long long v6; // rbp long long v7; // r14 long long v8; // rdx long long v9; // r13 long long v10; // rax long long v11; // rdx long long v12; // r13 long long v13; // rdx long long v14; // rbp long long i; // r14 long long v16; // rax long long v17; // rdx long long v18; // r9 long long v19; // rax long long v20; // rdx long long v22; // [rsp+8h] [rbp-40h] GlobalObject = JS_GetGlobalObject(); v6 = v5; v7 = JS_NewObject(a1); v9 = v8; v10 = JS_NewCFunction(a1, "log"); JS_SetPropertyStr(a1, v7, v9, "log", v10, v11); JS_SetPropertyStr(a1, GlobalObject, v6, "console", v7, v9); if ( a2 >= 0 ) { v22 = v6; v12 = JS_NewArray(a1); v14 = v13; for ( i = 0LL; a2 != i; ++i ) { v16 = JS_NewString(a1, *(_QWORD *)(a3 + 8 * i)); JS_SetPropertyUint32(a1, v12, v14, (unsigned int)i, v16, v17); } v18 = v14; v6 = v22; JS_SetPropertyStr(a1, GlobalObject, v22, "scriptArgs", v12, v18); } v19 = JS_NewCFunction(a1, "print"); JS_SetPropertyStr(a1, GlobalObject, v6, "print", v19, v20); return JS_FreeValue(a1, GlobalObject, v6); }
js_std_add_helpers: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX MOV dword ptr [RSP + 0x4],ESI MOV RBX,RDI CALL 0x0011c430 MOV R15,RAX MOV RBP,RDX MOV RDI,RBX CALL 0x0011b2c9 MOV R14,RAX MOV R13,RDX LEA RSI,[0x182918] MOV RDI,RBX CALL 0x0010ffa5 MOV R9,RDX MOV RDI,RBX MOV RSI,R14 MOV RDX,R13 LEA RCX,[0x182918] MOV R8,RAX CALL 0x0011f151 LEA RCX,[0x18291c] MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP MOV R8,R14 MOV R14D,dword ptr [RSP + 0x4] MOV R9,R13 CALL 0x0011f151 TEST R14D,R14D JS 0x0010ff60 MOV qword ptr [RSP + 0x8],RBP MOV qword ptr [RSP + 0x10],R15 MOV RDI,RBX CALL 0x0011b2bb MOV R13,RAX MOV RBP,RDX MOV R15D,R14D XOR R14D,R14D LAB_0010ff0e: CMP R15,R14 JZ 0x0010ff3b MOV RSI,qword ptr [R12 + R14*0x8] MOV RDI,RBX CALL 0x0010f98d MOV R9,RDX MOV RDI,RBX MOV RSI,R13 MOV RDX,RBP MOV ECX,R14D MOV R8,RAX CALL 0x0011ece3 INC R14 JMP 0x0010ff0e LAB_0010ff3b: LEA RCX,[0x182924] MOV RDI,RBX MOV R15,qword ptr [RSP + 0x10] MOV RSI,R15 MOV RDX,qword ptr [RSP + 0x8] MOV R8,R13 MOV R9,RBP MOV RBP,RDX CALL 0x0011f151 LAB_0010ff60: LEA R14,[0x18292f] MOV RDI,RBX MOV RSI,R14 CALL 0x0010ffa5 MOV R9,RDX MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP MOV RCX,R14 MOV R8,RAX CALL 0x0011f151 MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011801e
void js_std_add_helpers(int8 param_1,uint param_2,long param_3) { int8 uVar1; int8 uVar2; ulong uVar3; int1 auVar4 [16]; int1 auVar5 [16]; auVar4 = JS_GetGlobalObject(); uVar2 = auVar4._8_8_; uVar1 = auVar4._0_8_; auVar4 = JS_NewObject(param_1); auVar5 = JS_NewCFunction(param_1,&DAT_00182918); JS_SetPropertyStr(param_1,auVar4._0_8_,auVar4._8_8_,&DAT_00182918,auVar5._0_8_,auVar5._8_8_); JS_SetPropertyStr(param_1,uVar1,uVar2,"console",auVar4._0_8_,auVar4._8_8_); if (-1 < (int)param_2) { auVar4 = JS_NewArray(param_1); for (uVar3 = 0; param_2 != uVar3; uVar3 = uVar3 + 1) { auVar5 = JS_NewString(param_1,*(int8 *)(param_3 + uVar3 * 8)); JS_SetPropertyUint32 (param_1,auVar4._0_8_,auVar4._8_8_,uVar3 & 0xffffffff,auVar5._0_8_,auVar5._8_8_); } JS_SetPropertyStr(param_1,uVar1,uVar2,"scriptArgs",auVar4._0_8_,auVar4._8_8_); } auVar4 = JS_NewCFunction(param_1,"print"); JS_SetPropertyStr(param_1,uVar1,uVar2,"print",auVar4._0_8_,auVar4._8_8_); JS_FreeValue(param_1,uVar1,uVar2); return; }
48,440
IndexPurge::purge()
eloqsql/storage/innobase/row/row0import.cc
dberr_t IndexPurge::purge() noexcept { btr_pcur_store_position(&m_pcur, &m_mtr); dberr_t err= purge_pessimistic_delete(); m_mtr.start(); m_mtr.set_log_mode(MTR_LOG_NO_REDO); if (err == DB_SUCCESS) err= (m_pcur.restore_position(BTR_MODIFY_LEAF, &m_mtr) == btr_pcur_t::CORRUPTED) ? DB_CORRUPTION : DB_SUCCESS; return err; }
O3
cpp
IndexPurge::purge(): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 leaq 0x498(%rdi), %rbx leaq 0x8(%rdi), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0xc8338a movl $0x20a, %esi # imm = 0x20A movq %rbx, %rdi movq %r14, %rdx callq 0xc8370c cmpl $0x3, %eax jne 0xc1375e movl $0x25, -0x24(%rbp) jmp 0xc13774 leaq -0x24(%rbp), %rdi xorl %esi, %esi movq %rbx, %rdx xorl %ecx, %ecx xorl %r8d, %r8d movq %r14, %r9 callq 0xc7ec27 movq %r14, %rdi callq 0xbefaf4 movl -0x24(%rbp), %r12d movq %r14, %rdi callq 0xbefa60 orb $0x3, 0x12(%r15) testl %r12d, %r12d jne 0xc137b1 movl $0x2, %esi movq %rbx, %rdi movq %r14, %rdx callq 0xc8370c xorl %ecx, %ecx cmpl $0x3, %eax movl $0x25, %r12d cmovnel %ecx, %r12d movl %r12d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0xc137c3 movq %rax, %rdi callq 0x6da8ee nop
_ZN10IndexPurge5purgeEv: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15, rdi lea rbx, [rdi+498h] lea r14, [rdi+8] mov rdi, rbx mov rsi, r14 call _Z23btr_pcur_store_positionP10btr_pcur_tP5mtr_t; btr_pcur_store_position(btr_pcur_t *,mtr_t *) mov esi, 20Ah; unsigned __int64 mov rdi, rbx; this mov rdx, r14; mtr_t * call _ZN10btr_pcur_t16restore_positionEmP5mtr_t; btr_pcur_t::restore_position(ulong,mtr_t *) cmp eax, 3 jnz short loc_C1375E mov [rbp+var_24], 25h ; '%' jmp short loc_C13774 loc_C1375E: lea rdi, [rbp+var_24] xor esi, esi mov rdx, rbx xor ecx, ecx xor r8d, r8d mov r9, r14 call _Z26btr_cur_pessimistic_deleteP7dberr_tmP9btr_cur_tmbP5mtr_t; btr_cur_pessimistic_delete(dberr_t *,ulong,btr_cur_t *,ulong,bool,mtr_t *) loc_C13774: mov rdi, r14; this call _ZN5mtr_t6commitEv; mtr_t::commit(void) mov r12d, [rbp+var_24] mov rdi, r14; this call _ZN5mtr_t5startEv; mtr_t::start(void) or byte ptr [r15+12h], 3 test r12d, r12d jnz short loc_C137B1 mov esi, 2; unsigned __int64 mov rdi, rbx; this mov rdx, r14; mtr_t * call _ZN10btr_pcur_t16restore_positionEmP5mtr_t; btr_pcur_t::restore_position(ulong,mtr_t *) xor ecx, ecx cmp eax, 3 mov r12d, 25h ; '%' cmovnz r12d, ecx loc_C137B1: mov eax, r12d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_C137C3: mov rdi, rax call __clang_call_terminate
long long IndexPurge::purge(IndexPurge *this) { btr_pcur_t *v1; // rbx mtr_t *v2; // r14 unsigned int v3; // r12d int v5[9]; // [rsp+Ch] [rbp-24h] BYREF v1 = (IndexPurge *)((char *)this + 1176); v2 = (IndexPurge *)((char *)this + 8); btr_pcur_store_position((IndexPurge *)((char *)this + 1176), (IndexPurge *)((char *)this + 8)); if ( (unsigned int)btr_pcur_t::restore_position( (IndexPurge *)((char *)this + 1176), 0x20AuLL, (IndexPurge *)((char *)this + 8)) == 3 ) v5[0] = 37; else btr_cur_pessimistic_delete(v5, 0LL, v1, 0LL, 0LL, v2); mtr_t::commit(v2); v3 = v5[0]; mtr_t::start(v2); *((_BYTE *)this + 18) |= 3u; if ( !v3 ) { v3 = 37; if ( (unsigned int)btr_pcur_t::restore_position(v1, 2uLL, v2) != 3 ) return 0; } return v3; }
table_events_waits_summary_by_instance: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[0x160d288] CALL 0x00c233ce LEA RAX,[0x15cafd8] MOV qword ptr [RBX],RAX MOV byte ptr [RBX + 0x78],0x0 ADD RSP,0x8 POP RBX POP RBP RET
/* table_events_waits_summary_by_instance::table_events_waits_summary_by_instance() */ void __thiscall table_events_waits_summary_by_instance::table_events_waits_summary_by_instance (table_events_waits_summary_by_instance *this) { table_all_instr::table_all_instr((table_all_instr *)this,(PFS_engine_table_share *)m_share); *(int ***)this = &PTR_rnd_init_015cafd8; this[0x78] = (table_events_waits_summary_by_instance)0x0; return; }
48,441
dirname_length
eloqsql/mysys/mf_dirname.c
size_t dirname_length(const char *name) { register char *pos, *gpos; #ifdef BASKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif #ifdef FN_DEVCHAR if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0) #endif pos=(char*) name-1; gpos= pos++; for ( ; *pos ; pos++) /* Find last FN_LIBCHAR */ { #ifdef BASKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3))) { pos+= l - 1; continue; } #endif if (*pos == FN_LIBCHAR || *pos == '/') gpos=pos; } return (size_t) (gpos+1-(char*) name); }
O3
c
dirname_length: pushq %rbp movq %rsp, %rbp leaq -0x1(%rdi), %rax movq %rdi, %rcx movzbl (%rcx), %edx cmpl $0x2f, %edx je 0x94919 testl %edx, %edx jne 0x9491c jmp 0x94921 movq %rcx, %rax incq %rcx jmp 0x9490b subq %rdi, %rax incq %rax popq %rbp retq
dirname_length: push rbp mov rbp, rsp lea rax, [rdi-1] mov rcx, rdi loc_9490B: movzx edx, byte ptr [rcx] cmp edx, 2Fh ; '/' jz short loc_94919 test edx, edx jnz short loc_9491C jmp short loc_94921 loc_94919: mov rax, rcx loc_9491C: inc rcx jmp short loc_9490B loc_94921: sub rax, rdi inc rax pop rbp retn
long long dirname_length(_BYTE *a1) { _BYTE *v1; // rax _BYTE *i; // rcx v1 = a1 - 1; for ( i = a1; *i == 47; ++i ) { v1 = i; LABEL_6: ; } if ( *i ) goto LABEL_6; return v1 - a1 + 1; }
dirname_length: PUSH RBP MOV RBP,RSP LEA RAX,[RDI + -0x1] MOV RCX,RDI LAB_0019490b: MOVZX EDX,byte ptr [RCX] CMP EDX,0x2f JZ 0x00194919 TEST EDX,EDX JNZ 0x0019491c JMP 0x00194921 LAB_00194919: MOV RAX,RCX LAB_0019491c: INC RCX JMP 0x0019490b LAB_00194921: SUB RAX,RDI INC RAX POP RBP RET
char * dirname_length(char *param_1) { char *pcVar1; char *pcVar2; char *pcVar3; pcVar1 = param_1 + -1; for (pcVar3 = param_1; (pcVar2 = pcVar3, *pcVar3 == '/' || (pcVar2 = pcVar1, *pcVar3 != '\0')); pcVar3 = pcVar3 + 1) { pcVar1 = pcVar2; } return pcVar1 + (1 - (long)param_1); }
48,442
ma_init_block_record_data
eloqsql/storage/maria/ma_blockrec.c
void _ma_init_block_record_data(void) { uint i; bzero(total_header_size, sizeof(total_header_size)); total_header_size[0]= FLAG_SIZE; /* Flag uchar */ for (i= 1; i < array_elements(total_header_size); i++) { uint size= FLAG_SIZE, j, bit; for (j= 0; (bit= (1 << j)) <= i; j++) { if (i & bit) size+= header_sizes[j]; } total_header_size[i]= size; } }
O3
c
ma_init_block_record_data: pushq %rbp movq %rsp, %rbp xorps %xmm0, %xmm0 movaps %xmm0, 0xba3c82(%rip) # 0xbff810 movb $0x1, 0xba3c7b(%rip) # 0xbff810 movl $0x1, %eax leaq 0xba3c6f(%rip), %rdx # 0xbff810 leaq 0x85978(%rip), %rsi # 0xe1520 movb $0x1, %dil xorl %ecx, %ecx movl $0x1, %r8d testl %eax, %r8d je 0x5bbbf movl %ecx, %r8d addb (%r8,%rsi), %dil incl %ecx movl $0x1, %r8d shll %cl, %r8d cmpq %r8, %rax jae 0x5bbb3 movb %dil, (%rax,%rdx) incq %rax cmpq $0x10, %rax jne 0x5bba8 popq %rbp retq
_ma_init_block_record_data: push rbp mov rbp, rsp xorps xmm0, xmm0 movaps cs:total_header_size, xmm0 mov byte ptr cs:total_header_size, 1 mov eax, 1 lea rdx, total_header_size lea rsi, header_sizes loc_5BBA8: mov dil, 1 xor ecx, ecx mov r8d, 1 loc_5BBB3: test r8d, eax jz short loc_5BBBF mov r8d, ecx add dil, [r8+rsi] loc_5BBBF: inc ecx mov r8d, 1 shl r8d, cl cmp rax, r8 jnb short loc_5BBB3 mov [rax+rdx], dil inc rax cmp rax, 10h jnz short loc_5BBA8 pop rbp retn
unsigned long long ma_init_block_record_data() { unsigned long long result; // rax char v1; // di int v2; // ecx unsigned long long v3; // r8 total_header_size = 0LL; LOBYTE(total_header_size) = 1; for ( result = 1LL; result != 16; ++result ) { v1 = 1; v2 = 0; LODWORD(v3) = 1; do { if ( ((unsigned int)result & (unsigned int)v3) != 0 ) v1 += header_sizes[v2]; v3 = (unsigned int)(1 << ++v2); } while ( result >= v3 ); *((_BYTE *)&total_header_size + result) = v1; } return result; }
_ma_init_block_record_data: PUSH RBP MOV RBP,RSP XORPS XMM0,XMM0 MOVAPS xmmword ptr [0x00cff810],XMM0 MOV byte ptr [0x00cff810],0x1 MOV EAX,0x1 LEA RDX,[0xcff810] LEA RSI,[0x1e1520] LAB_0015bba8: MOV DIL,0x1 XOR ECX,ECX MOV R8D,0x1 LAB_0015bbb3: TEST R8D,EAX JZ 0x0015bbbf MOV R8D,ECX ADD DIL,byte ptr [R8 + RSI*0x1] LAB_0015bbbf: INC ECX MOV R8D,0x1 SHL R8D,CL CMP RAX,R8 JNC 0x0015bbb3 MOV byte ptr [RAX + RDX*0x1],DIL INC RAX CMP RAX,0x10 JNZ 0x0015bba8 POP RBP RET
void _ma_init_block_record_data(void) { ulong uVar1; uint uVar2; ulong uVar3; char cVar4; ulong uVar5; total_header_size._8_8_ = 0; total_header_size._0_8_ = 1; uVar1 = 1; do { cVar4 = '\x01'; uVar3 = 0; uVar5 = 1; do { if (((uint)uVar5 & (uint)uVar1) != 0) { cVar4 = cVar4 + (&header_sizes)[uVar3]; } uVar2 = (int)uVar3 + 1; uVar3 = (ulong)uVar2; uVar5 = (ulong)(uint)(1 << ((byte)uVar2 & 0x1f)); } while (uVar5 <= uVar1); total_header_size[uVar1] = cVar4; uVar1 = uVar1 + 1; } while (uVar1 != 0x10); return; }
48,443
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/common/json.hpp
iterator find(const key_type& key) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0xf2f3 movq %r14, %rdi movq %rbx, %rsi callq 0x8322 testb %al, %al jne 0xf2f0 addq $0x30, %r14 jmp 0xf2d2 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_F2D2: mov rax, [r15+8] cmp r14, rax jz short loc_F2F3 mov rdi, r14 mov rsi, rbx call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, al jnz short loc_F2F0 add r14, 30h ; '0' jmp short loc_F2D2 loc_F2F0: mov rax, r14 loc_F2F3: pop rbx pop r14 pop r15 retn
_QWORD * nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find( long long a1, _QWORD *a2) { _QWORD *i; // r14 _QWORD *result; // rax for ( i = *(_QWORD **)a1; ; i += 6 ) { result = *(_QWORD **)(a1 + 8); if ( i == result ) break; if ( std::operator==<char>(i, a2) ) return i; } return result; }
find: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_0010f2d2: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x0010f2f3 MOV RDI,R14 MOV RSI,RBX CALL 0x00108322 TEST AL,AL JNZ 0x0010f2f0 ADD R14,0x30 JMP 0x0010f2d2 LAB_0010f2f0: MOV RAX,R14 LAB_0010f2f3: POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::find(std::__cxx11::string const&) */ string * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::find(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,string *param_1) { char cVar1; string *psVar2; string *psVar3; psVar3 = *(string **)this; while ((psVar2 = *(string **)(this + 8), psVar3 != *(string **)(this + 8) && (cVar1 = std::operator==(psVar3,param_1), psVar2 = psVar3, cVar1 == '\0'))) { psVar3 = psVar3 + 0x30; } return psVar2; }
48,444
asn1_get_tagged_int
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/asn1parse.c
static int asn1_get_tagged_int(unsigned char **p, const unsigned char *end, int tag, int *val) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t len; if ((ret = mbedtls_asn1_get_tag(p, end, &len, tag)) != 0) { return ret; } /* * len==0 is malformed (0 must be represented as 020100 for INTEGER, * or 0A0100 for ENUMERATED tags */ if (len == 0) { return MBEDTLS_ERR_ASN1_INVALID_LENGTH; } /* This is a cryptography library. Reject negative integers. */ if ((**p & 0x80) != 0) { return MBEDTLS_ERR_ASN1_INVALID_LENGTH; } /* Skip leading zeros. */ while (len > 0 && **p == 0) { ++(*p); --len; } /* Reject integers that don't fit in an int. This code assumes that * the int type has no padding bit. */ if (len > sizeof(int)) { return MBEDTLS_ERR_ASN1_INVALID_LENGTH; } if (len == sizeof(int) && (**p & 0x80) != 0) { return MBEDTLS_ERR_ASN1_INVALID_LENGTH; } *val = 0; while (len-- > 0) { *val = (*val << 8) | **p; (*p)++; } return 0; }
O3
c
asn1_get_tagged_int: pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq (%rdi), %rcx movq %rsi, %rax subq %rcx, %rax testq %rax, %rax jle 0x96ab1 movq %rdi, %r14 movzbl (%rcx), %edi movl $0xffffff9e, %eax # imm = 0xFFFFFF9E cmpl %edx, %edi jne 0x96ab6 incq %rcx movq %rcx, (%r14) movq %rsp, %rdx movq %r14, %rdi callq 0x9688c testl %eax, %eax jne 0x96ab6 movq (%rsp), %rcx movl $0xffffff9c, %eax # imm = 0xFFFFFF9C testq %rcx, %rcx je 0x96ab6 movq (%r14), %rdx cmpb $0x0, (%rdx) js 0x96ab6 movb $0x1, %sil jne 0x96a7d incq %rdx movq %rdx, (%r14) cmpq $0x1, %rcx je 0x96abe leaq 0x1(%rdx), %rdi decq %rcx cmpb $0x0, (%rdx) movq %rdi, %rdx je 0x96a5b setns %sil decq %rdi movq %rdi, %rdx cmpq $0x4, %rcx setne %dil ja 0x96ab6 orb %sil, %dil je 0x96ab6 movl $0x0, (%rbx) incq %rdx xorl %eax, %eax xorl %esi, %esi shll $0x8, %esi movzbl -0x1(%rdx), %edi orl %edi, %esi movl %esi, (%rbx) movq %rdx, (%r14) incq %rdx decq %rcx jne 0x96a99 jmp 0x96ab6 movl $0xffffffa0, %eax # imm = 0xFFFFFFA0 addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x0, (%rbx) xorl %eax, %eax jmp 0x96ab6
asn1_get_tagged_int: push r14 push rbx push rax mov rbx, rcx mov rcx, [rdi] mov rax, rsi sub rax, rcx test rax, rax jle loc_96AB1 mov r14, rdi movzx edi, byte ptr [rcx] mov eax, 0FFFFFF9Eh cmp edi, edx jnz loc_96AB6 inc rcx mov [r14], rcx mov rdx, rsp mov rdi, r14 call mbedtls_asn1_get_len test eax, eax jnz short loc_96AB6 mov rcx, [rsp+18h+var_18] mov eax, 0FFFFFF9Ch test rcx, rcx jz short loc_96AB6 mov rdx, [r14] cmp byte ptr [rdx], 0 js short loc_96AB6 mov sil, 1 jnz short loc_96A7D inc rdx loc_96A5B: mov [r14], rdx cmp rcx, 1 jz short loc_96ABE lea rdi, [rdx+1] dec rcx cmp byte ptr [rdx], 0 mov rdx, rdi jz short loc_96A5B setns sil dec rdi mov rdx, rdi loc_96A7D: cmp rcx, 4 setnz dil ja short loc_96AB6 or dil, sil jz short loc_96AB6 mov dword ptr [rbx], 0 inc rdx xor eax, eax xor esi, esi loc_96A99: shl esi, 8 movzx edi, byte ptr [rdx-1] or esi, edi mov [rbx], esi mov [r14], rdx inc rdx dec rcx jnz short loc_96A99 jmp short loc_96AB6 loc_96AB1: mov eax, 0FFFFFFA0h loc_96AB6: add rsp, 8 pop rbx pop r14 retn loc_96ABE: mov dword ptr [rbx], 0 xor eax, eax jmp short loc_96AB6
long long asn1_get_tagged_int(unsigned __int8 **a1, long long a2, int a3, int *a4) { unsigned long long v4; // rax unsigned __int8 *v6; // rcx long long result; // rax unsigned long long v9; // rcx unsigned __int8 *v10; // rdx bool v11; // si char *v12; // rdx char *v13; // rdi bool v14; // zf bool v15; // sf unsigned __int8 *v16; // rdx int v17; // esi unsigned long long v18[3]; // [rsp+0h] [rbp-18h] BYREF v18[0] = v4; v6 = *a1; if ( a2 - (long long)*a1 <= 0 ) return 4294967200LL; result = 4294967198LL; if ( *v6 == a3 ) { *a1 = v6 + 1; result = mbedtls_asn1_get_len(a1, a2, v18); if ( !(_DWORD)result ) { v9 = v18[0]; result = 4294967196LL; if ( v18[0] ) { v10 = *a1; if ( (**a1 & 0x80u) == 0 ) { v11 = 1; if ( **a1 ) { LABEL_11: if ( v9 <= 4 && (v11 || v9 != 4) ) { *a4 = 0; v16 = v10 + 1; result = 0LL; v17 = 0; do { v17 = *(v16 - 1) | (v17 << 8); *a4 = v17; *a1 = v16++; --v9; } while ( v9 ); } } else { v12 = (char *)(v10 + 1); while ( 1 ) { *a1 = (unsigned __int8 *)v12; if ( v9 == 1 ) break; v13 = v12 + 1; --v9; v14 = *v12 == 0; v15 = *v12++ < 0; if ( !v14 ) { v11 = !v15; v10 = (unsigned __int8 *)(v13 - 1); goto LABEL_11; } } *a4 = 0; return 0LL; } } } } } return result; }
asn1_get_tagged_int: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV RCX,qword ptr [RDI] MOV RAX,RSI SUB RAX,RCX TEST RAX,RAX JLE 0x00196ab1 MOV R14,RDI MOVZX EDI,byte ptr [RCX] MOV EAX,0xffffff9e CMP EDI,EDX JNZ 0x00196ab6 INC RCX MOV qword ptr [R14],RCX MOV RDX,RSP MOV RDI,R14 CALL 0x0019688c TEST EAX,EAX JNZ 0x00196ab6 MOV RCX,qword ptr [RSP] MOV EAX,0xffffff9c TEST RCX,RCX JZ 0x00196ab6 MOV RDX,qword ptr [R14] CMP byte ptr [RDX],0x0 JS 0x00196ab6 MOV SIL,0x1 JNZ 0x00196a7d INC RDX LAB_00196a5b: MOV qword ptr [R14],RDX CMP RCX,0x1 JZ 0x00196abe LEA RDI,[RDX + 0x1] DEC RCX CMP byte ptr [RDX],0x0 MOV RDX,RDI JZ 0x00196a5b SETNS SIL DEC RDI MOV RDX,RDI LAB_00196a7d: CMP RCX,0x4 SETNZ DIL JA 0x00196ab6 OR DIL,SIL JZ 0x00196ab6 MOV dword ptr [RBX],0x0 INC RDX XOR EAX,EAX XOR ESI,ESI LAB_00196a99: SHL ESI,0x8 MOVZX EDI,byte ptr [RDX + -0x1] OR ESI,EDI MOV dword ptr [RBX],ESI MOV qword ptr [R14],RDX INC RDX DEC RCX JNZ 0x00196a99 JMP 0x00196ab6 LAB_00196ab1: MOV EAX,0xffffffa0 LAB_00196ab6: ADD RSP,0x8 POP RBX POP R14 RET LAB_00196abe: MOV dword ptr [RBX],0x0 XOR EAX,EAX JMP 0x00196ab6
int8 asn1_get_tagged_int(int8 *param_1,byte *param_2,uint param_3,uint *param_4) { byte bVar1; ulong in_RAX; int8 uVar2; byte *pbVar3; uint uVar4; bool bVar5; ulong local_18; pbVar3 = (byte *)*param_1; if (param_2 == pbVar3 || (long)param_2 - (long)pbVar3 < 0) { uVar2 = 0xffffffa0; } else { uVar2 = 0xffffff9e; if (*pbVar3 == param_3) { *param_1 = pbVar3 + 1; local_18 = in_RAX; uVar2 = mbedtls_asn1_get_len(param_1,param_2,&local_18); if (((int)uVar2 == 0) && (uVar2 = 0xffffff9c, local_18 != 0)) { pbVar3 = (byte *)*param_1; bVar1 = *pbVar3; if (-1 < (char)bVar1) { bVar5 = true; while (bVar1 == 0) { pbVar3 = pbVar3 + 1; *param_1 = pbVar3; if (local_18 == 1) { *param_4 = 0; return 0; } local_18 = local_18 - 1; bVar1 = *pbVar3; bVar5 = -1 < (char)bVar1; } if ((local_18 < 5) && ((bool)(local_18 != 4 | bVar5))) { *param_4 = 0; uVar2 = 0; uVar4 = 0; do { uVar4 = uVar4 << 8 | (uint)*pbVar3; *param_4 = uVar4; *param_1 = pbVar3 + 1; local_18 = local_18 - 1; pbVar3 = pbVar3 + 1; } while (local_18 != 0); } } } } } return uVar2; }
48,445
pfs_end_file_wait_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_end_file_wait_v1(PSI_file_locker *locker, size_t byte_count) { PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); assert(state != NULL); PFS_file *file= reinterpret_cast<PFS_file *> (state->m_file); PFS_file_class *klass= reinterpret_cast<PFS_file_class *> (state->m_class); PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_byte_stat *byte_stat; uint flags= state->m_flags; size_t bytes= ((int)byte_count > -1 ? byte_count : 0); PFS_file_stat *file_stat; if (file != NULL) { file_stat= & file->m_file_stat; } else { file_stat= & klass->m_file_stat; } switch (state->m_operation) { /* Group read operations */ case PSI_FILE_READ: byte_stat= &file_stat->m_io_stat.m_read; break; /* Group write operations */ case PSI_FILE_WRITE: byte_stat= &file_stat->m_io_stat.m_write; break; /* Group remaining operations as miscellaneous */ case PSI_FILE_CREATE: case PSI_FILE_CREATE_TMP: case PSI_FILE_OPEN: case PSI_FILE_STREAM_OPEN: case PSI_FILE_STREAM_CLOSE: case PSI_FILE_SEEK: case PSI_FILE_TELL: case PSI_FILE_FLUSH: case PSI_FILE_FSTAT: case PSI_FILE_CHSIZE: case PSI_FILE_DELETE: case PSI_FILE_RENAME: case PSI_FILE_SYNC: case PSI_FILE_STAT: case PSI_FILE_CLOSE: byte_stat= &file_stat->m_io_stat.m_misc; break; default: assert(false); byte_stat= NULL; break; } /* Aggregation for EVENTS_WAITS_SUMMARY_BY_INSTANCE */ if (flags & STATE_FLAG_TIMED) { timer_end= state->m_timer(); wait_time= timer_end - state->m_timer_start; /* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (timed) */ byte_stat->aggregate(wait_time, bytes); } else { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (counted) */ byte_stat->aggregate_counted(bytes); } if (flags & STATE_FLAG_THREAD) { assert(thread != NULL); PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); uint index= klass->m_event_name_index; if (flags & STATE_FLAG_TIMED) { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (timed) */ event_name_array[index].aggregate_value(wait_time); } else { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (counted) */ event_name_array[index].aggregate_counted(); } if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_number_of_bytes= bytes; wait->m_end_event_id= thread->m_event_id; wait->m_object_instance_addr= file; wait->m_weak_file= file; wait->m_weak_version= (file ? file->get_version() : 0); if (thread->m_flag_events_waits_history) insert_events_waits_history(thread, wait); if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; assert(wait == thread->m_events_waits_current); } } }
O0
cpp
pfs_end_file_wait_v1: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x4c(%rbp) movq -0x10(%rbp), %rax cmpl $-0x1, %eax jle 0x4ce0b movq -0x10(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x4ce13 xorl %eax, %eax movq %rax, -0x80(%rbp) jmp 0x4ce13 movq -0x80(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x20(%rbp) je 0x4ce32 movq -0x20(%rbp), %rax addq $0x228, %rax # imm = 0x228 movq %rax, -0x60(%rbp) jmp 0x4ce40 movq -0x28(%rbp), %rax addq $0xa0, %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x84(%rbp) subl $0x6, %eax jb 0x4ce9e jmp 0x4ce54 movl -0x84(%rbp), %eax subl $0x6, %eax je 0x4ce7e jmp 0x4ce61 movl -0x84(%rbp), %eax subl $0x7, %eax je 0x4ce8c jmp 0x4ce6e movl -0x84(%rbp), %eax addl $-0x8, %eax subl $0x9, %eax jb 0x4ce9e jmp 0x4ceb0 movq -0x60(%rbp), %rax addq $0x8, %rax movq %rax, -0x48(%rbp) jmp 0x4ceb8 movq -0x60(%rbp), %rax addq $0x8, %rax addq $0x28, %rax movq %rax, -0x48(%rbp) jmp 0x4ceb8 movq -0x60(%rbp), %rax addq $0x8, %rax addq $0x50, %rax movq %rax, -0x48(%rbp) jmp 0x4ceb8 movq $0x0, -0x48(%rbp) movl -0x4c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4cef1 movq -0x18(%rbp), %rax callq *0x38(%rax) movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx subq 0x30(%rcx), %rax movq %rax, -0x40(%rbp) movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x58(%rbp), %rdx callq 0x51c70 jmp 0x4cefe movq -0x48(%rbp), %rdi movq -0x58(%rbp), %rsi callq 0x51cb0 movl -0x4c(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x4d03f movq -0x30(%rbp), %rdi callq 0x409d0 movq %rax, -0x68(%rbp) movq -0x28(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x6c(%rbp) movl -0x4c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4cf48 movq -0x68(%rbp), %rdi movl -0x6c(%rbp), %eax shlq $0x5, %rax addq %rax, %rdi movq -0x40(%rbp), %rsi callq 0x51b50 jmp 0x4cf5b movq -0x68(%rbp), %rdi movl -0x6c(%rbp), %eax shlq $0x5, %rax addq %rax, %rdi callq 0x51a90 movq -0x18(%rbp), %rax movl (%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x4d03d movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x78(%rbp) movq -0x38(%rbp), %rcx movq -0x78(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x58(%rbp), %rcx movq -0x78(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x30(%rbp), %rax movq 0x7f8(%rax), %rcx movq -0x78(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx movq -0x78(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x20(%rbp), %rcx movq -0x78(%rbp), %rax movq %rcx, 0x68(%rax) cmpq $0x0, -0x20(%rbp) je 0x4cfda movq -0x20(%rbp), %rdi callq 0x51af0 movl %eax, -0x88(%rbp) jmp 0x4cfe4 xorl %eax, %eax movl %eax, -0x88(%rbp) jmp 0x4cfe4 movl -0x88(%rbp), %ecx movq -0x78(%rbp), %rax movl %ecx, 0x80(%rax) movq -0x30(%rbp), %rax testb $0x1, 0x7e2(%rax) je 0x4d00e movq -0x30(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x581a0 movq -0x30(%rbp), %rax testb $0x1, 0x7e3(%rax) je 0x4d024 movq -0x78(%rbp), %rdi callq 0x58270 movq -0x30(%rbp), %rax movq 0x7f0(%rax), %rcx addq $-0xb0, %rcx movq %rcx, 0x7f0(%rax) jmp 0x4d03f addq $0x90, %rsp popq %rbp retq nopl (%rax,%rax)
pfs_end_file_wait_v1: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax+18h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_30], rax mov [rbp+var_38], 0 mov [rbp+var_40], 0 mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_4C], eax mov rax, [rbp+var_10] cmp eax, 0FFFFFFFFh jle short loc_4CE0B mov rax, [rbp+var_10] mov [rbp+var_80], rax jmp short loc_4CE13 loc_4CE0B: xor eax, eax mov [rbp+var_80], rax jmp short $+2 loc_4CE13: mov rax, [rbp+var_80] mov [rbp+var_58], rax cmp [rbp+var_20], 0 jz short loc_4CE32 mov rax, [rbp+var_20] add rax, 228h mov [rbp+var_60], rax jmp short loc_4CE40 loc_4CE32: mov rax, [rbp+var_28] add rax, 0A0h mov [rbp+var_60], rax loc_4CE40: mov rax, [rbp+var_18] mov eax, [rax+4] mov [rbp+var_84], eax sub eax, 6 jb short loc_4CE9E jmp short $+2 loc_4CE54: mov eax, [rbp+var_84] sub eax, 6 jz short loc_4CE7E jmp short $+2 loc_4CE61: mov eax, [rbp+var_84] sub eax, 7 jz short loc_4CE8C jmp short $+2 loc_4CE6E: mov eax, [rbp+var_84] add eax, 0FFFFFFF8h sub eax, 9 jb short loc_4CE9E jmp short loc_4CEB0 loc_4CE7E: mov rax, [rbp+var_60] add rax, 8 mov [rbp+var_48], rax jmp short loc_4CEB8 loc_4CE8C: mov rax, [rbp+var_60] add rax, 8 add rax, 28h ; '(' mov [rbp+var_48], rax jmp short loc_4CEB8 loc_4CE9E: mov rax, [rbp+var_60] add rax, 8 add rax, 50h ; 'P' mov [rbp+var_48], rax jmp short loc_4CEB8 loc_4CEB0: mov [rbp+var_48], 0 loc_4CEB8: mov eax, [rbp+var_4C] and eax, 1 cmp eax, 0 jz short loc_4CEF1 mov rax, [rbp+var_18] call qword ptr [rax+38h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_18] sub rax, [rcx+30h] mov [rbp+var_40], rax mov rdi, [rbp+var_48]; this mov rsi, [rbp+var_40]; unsigned __int64 mov rdx, [rbp+var_58]; unsigned __int64 call _ZN13PFS_byte_stat9aggregateEyy; PFS_byte_stat::aggregate(ulong long,ulong long) jmp short loc_4CEFE loc_4CEF1: mov rdi, [rbp+var_48]; this mov rsi, [rbp+var_58]; unsigned __int64 call _ZN13PFS_byte_stat17aggregate_countedEy; PFS_byte_stat::aggregate_counted(ulong long) loc_4CEFE: mov eax, [rbp+var_4C] and eax, 2 cmp eax, 0 jz loc_4D03F mov rdi, [rbp+var_30]; this call _ZN20PFS_connection_slice29write_instr_class_waits_statsEv; PFS_connection_slice::write_instr_class_waits_stats(void) mov [rbp+var_68], rax mov rax, [rbp+var_28] mov eax, [rax+10h] mov [rbp+var_6C], eax mov eax, [rbp+var_4C] and eax, 1 cmp eax, 0 jz short loc_4CF48 mov rdi, [rbp+var_68] mov eax, [rbp+var_6C] shl rax, 5 add rdi, rax; this mov rsi, [rbp+var_40]; unsigned __int64 call _ZN15PFS_single_stat15aggregate_valueEy; PFS_single_stat::aggregate_value(ulong long) jmp short loc_4CF5B loc_4CF48: mov rdi, [rbp+var_68] mov eax, [rbp+var_6C] shl rax, 5 add rdi, rax; this call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void) loc_4CF5B: mov rax, [rbp+var_18] mov eax, [rax] and eax, 4 cmp eax, 0 jz loc_4D03D mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_78], rax mov rcx, [rbp+var_38] mov rax, [rbp+var_78] mov [rax+40h], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_78] mov [rax+98h], rcx mov rax, [rbp+var_30] mov rcx, [rax+7F8h] mov rax, [rbp+var_78] mov [rax+10h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_78] mov [rax+88h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_78] mov [rax+68h], rcx cmp [rbp+var_20], 0 jz short loc_4CFDA mov rdi, [rbp+var_20]; this call _ZN8PFS_file11get_versionEv; PFS_file::get_version(void) mov [rbp+var_88], eax jmp short loc_4CFE4 loc_4CFDA: xor eax, eax mov [rbp+var_88], eax jmp short $+2 loc_4CFE4: mov ecx, [rbp+var_88] mov rax, [rbp+var_78] mov [rax+80h], ecx mov rax, [rbp+var_30] test byte ptr [rax+7E2h], 1 jz short loc_4D00E mov rdi, [rbp+var_30] mov rsi, [rbp+var_78] call _Z27insert_events_waits_historyP10PFS_threadP16PFS_events_waits; insert_events_waits_history(PFS_thread *,PFS_events_waits *) loc_4D00E: mov rax, [rbp+var_30] test byte ptr [rax+7E3h], 1 jz short loc_4D024 mov rdi, [rbp+var_78] call _Z32insert_events_waits_history_longP16PFS_events_waits; insert_events_waits_history_long(PFS_events_waits *) loc_4D024: mov rax, [rbp+var_30] mov rcx, [rax+7F0h] add rcx, 0FFFFFFFFFFFFFF50h mov [rax+7F0h], rcx loc_4D03D: jmp short $+2 loc_4D03F: add rsp, 90h pop rbp retn
PFS_connection_slice * pfs_end_file_wait_v1(int *a1, unsigned long long a2) { PFS_connection_slice *result; // rax int version; // [rsp+8h] [rbp-88h] unsigned int v4; // [rsp+Ch] [rbp-84h] unsigned long long v5; // [rsp+10h] [rbp-80h] long long v6; // [rsp+18h] [rbp-78h] unsigned int v7; // [rsp+24h] [rbp-6Ch] long long v8; // [rsp+28h] [rbp-68h] char *v9; // [rsp+30h] [rbp-60h] int v10; // [rsp+44h] [rbp-4Ch] PFS_byte_stat *v11; // [rsp+48h] [rbp-48h] unsigned long long v12; // [rsp+50h] [rbp-40h] long long v13; // [rsp+58h] [rbp-38h] PFS_connection_slice *v14; // [rsp+60h] [rbp-30h] long long v15; // [rsp+68h] [rbp-28h] PFS_file *v16; // [rsp+70h] [rbp-20h] v16 = (PFS_file *)*((_QWORD *)a1 + 1); v15 = *((_QWORD *)a1 + 3); v14 = (PFS_connection_slice *)*((_QWORD *)a1 + 4); v13 = 0LL; v12 = 0LL; v10 = *a1; if ( (int)a2 <= -1 ) v5 = 0LL; else v5 = a2; if ( v16 ) v9 = (char *)v16 + 552; else v9 = (char *)(v15 + 160); v4 = a1[1]; if ( v4 >= 6 ) { if ( v4 == 6 ) { v11 = (PFS_byte_stat *)(v9 + 8); goto LABEL_15; } if ( v4 == 7 ) { v11 = (PFS_byte_stat *)(v9 + 48); goto LABEL_15; } if ( v4 - 8 >= 9 ) { v11 = 0LL; goto LABEL_15; } } v11 = (PFS_byte_stat *)(v9 + 88); LABEL_15: if ( (v10 & 1) != 0 ) { v13 = (*((long long (**)(void))a1 + 7))(); v12 = v13 - *((_QWORD *)a1 + 6); PFS_byte_stat::aggregate(v11, v12, v5); } else { PFS_byte_stat::aggregate_counted(v11, v5); } result = (PFS_connection_slice *)(v10 & 2); if ( (v10 & 2) != 0 ) { v8 = PFS_connection_slice::write_instr_class_waits_stats(v14); v7 = *(_DWORD *)(v15 + 16); if ( (v10 & 1) != 0 ) PFS_single_stat::aggregate_value((PFS_single_stat *)(32LL * v7 + v8), v12); else PFS_single_stat::aggregate_counted((PFS_single_stat *)(32LL * v7 + v8)); result = (PFS_connection_slice *)(*a1 & 4); if ( (_DWORD)result ) { v6 = *((_QWORD *)a1 + 8); *(_QWORD *)(v6 + 64) = v13; *(_QWORD *)(v6 + 152) = v5; *(_QWORD *)(v6 + 16) = *((_QWORD *)v14 + 255); *(_QWORD *)(v6 + 136) = v16; *(_QWORD *)(v6 + 104) = v16; if ( v16 ) version = PFS_file::get_version(v16); else version = 0; *(_DWORD *)(v6 + 128) = version; if ( (*((_BYTE *)v14 + 2018) & 1) != 0 ) insert_events_waits_history(v14, v6); if ( (*((_BYTE *)v14 + 2019) & 1) != 0 ) insert_events_waits_history_long(v6); result = v14; *((_QWORD *)v14 + 254) -= 176LL; } } return result; }
pfs_end_file_wait_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 MOV qword ptr [RBP + -0x40],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x10] CMP EAX,-0x1 JLE 0x0014ce0b MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x80],RAX JMP 0x0014ce13 LAB_0014ce0b: XOR EAX,EAX MOV qword ptr [RBP + -0x80],RAX JMP 0x0014ce13 LAB_0014ce13: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0014ce32 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x228 MOV qword ptr [RBP + -0x60],RAX JMP 0x0014ce40 LAB_0014ce32: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0xa0 MOV qword ptr [RBP + -0x60],RAX LAB_0014ce40: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x84],EAX SUB EAX,0x6 JC 0x0014ce9e JMP 0x0014ce54 LAB_0014ce54: MOV EAX,dword ptr [RBP + -0x84] SUB EAX,0x6 JZ 0x0014ce7e JMP 0x0014ce61 LAB_0014ce61: MOV EAX,dword ptr [RBP + -0x84] SUB EAX,0x7 JZ 0x0014ce8c JMP 0x0014ce6e LAB_0014ce6e: MOV EAX,dword ptr [RBP + -0x84] ADD EAX,-0x8 SUB EAX,0x9 JC 0x0014ce9e JMP 0x0014ceb0 LAB_0014ce7e: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x8 MOV qword ptr [RBP + -0x48],RAX JMP 0x0014ceb8 LAB_0014ce8c: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x8 ADD RAX,0x28 MOV qword ptr [RBP + -0x48],RAX JMP 0x0014ceb8 LAB_0014ce9e: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x8 ADD RAX,0x50 MOV qword ptr [RBP + -0x48],RAX JMP 0x0014ceb8 LAB_0014ceb0: MOV qword ptr [RBP + -0x48],0x0 LAB_0014ceb8: MOV EAX,dword ptr [RBP + -0x4c] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014cef1 MOV RAX,qword ptr [RBP + -0x18] CALL qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RCX + 0x30] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x58] CALL 0x00151c70 JMP 0x0014cefe LAB_0014cef1: MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x58] CALL 0x00151cb0 LAB_0014cefe: MOV EAX,dword ptr [RBP + -0x4c] AND EAX,0x2 CMP EAX,0x0 JZ 0x0014d03f MOV RDI,qword ptr [RBP + -0x30] CALL 0x001409d0 MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x6c],EAX MOV EAX,dword ptr [RBP + -0x4c] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014cf48 MOV RDI,qword ptr [RBP + -0x68] MOV EAX,dword ptr [RBP + -0x6c] SHL RAX,0x5 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x40] CALL 0x00151b50 JMP 0x0014cf5b LAB_0014cf48: MOV RDI,qword ptr [RBP + -0x68] MOV EAX,dword ptr [RBP + -0x6c] SHL RAX,0x5 ADD RDI,RAX CALL 0x00151a90 LAB_0014cf5b: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] AND EAX,0x4 CMP EAX,0x0 JZ 0x0014d03d MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x78],RAX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x7f8] MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x88],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x68],RCX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0014cfda MOV RDI,qword ptr [RBP + -0x20] CALL 0x00151af0 MOV dword ptr [RBP + -0x88],EAX JMP 0x0014cfe4 LAB_0014cfda: XOR EAX,EAX MOV dword ptr [RBP + -0x88],EAX JMP 0x0014cfe4 LAB_0014cfe4: MOV ECX,dword ptr [RBP + -0x88] MOV RAX,qword ptr [RBP + -0x78] MOV dword ptr [RAX + 0x80],ECX MOV RAX,qword ptr [RBP + -0x30] TEST byte ptr [RAX + 0x7e2],0x1 JZ 0x0014d00e MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x78] CALL 0x001581a0 LAB_0014d00e: MOV RAX,qword ptr [RBP + -0x30] TEST byte ptr [RAX + 0x7e3],0x1 JZ 0x0014d024 MOV RDI,qword ptr [RBP + -0x78] CALL 0x00158270 LAB_0014d024: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x7f0] ADD RCX,-0xb0 MOV qword ptr [RAX + 0x7f0],RCX LAB_0014d03d: JMP 0x0014d03f LAB_0014d03f: ADD RSP,0x90 POP RBP RET
void pfs_end_file_wait_v1(uint *param_1,ulonglong param_2) { uint uVar1; uint uVar2; PFS_file *this; long lVar3; PFS_connection_slice *this_00; PFS_events_waits *pPVar4; long lVar5; int4 local_90; ulonglong local_88; PFS_file *local_68; PFS_byte_stat *local_50; ulonglong local_48; long local_40; this = *(PFS_file **)(param_1 + 2); lVar3 = *(long *)(param_1 + 6); this_00 = *(PFS_connection_slice **)(param_1 + 8); local_40 = 0; local_48 = 0; uVar1 = *param_1; local_88 = param_2; if ((int)param_2 < 0) { local_88 = 0; } if (this == (PFS_file *)0x0) { local_68 = (PFS_file *)(lVar3 + 0xa0); } else { local_68 = this + 0x228; } uVar2 = param_1[1]; if (5 < uVar2) { if (uVar2 == 6) { local_50 = (PFS_byte_stat *)(local_68 + 8); goto LAB_0014ceb8; } if (uVar2 == 7) { local_50 = (PFS_byte_stat *)(local_68 + 0x30); goto LAB_0014ceb8; } if (8 < uVar2 - 8) { local_50 = (PFS_byte_stat *)0x0; goto LAB_0014ceb8; } } local_50 = (PFS_byte_stat *)(local_68 + 0x58); LAB_0014ceb8: if ((uVar1 & 1) == 0) { PFS_byte_stat::aggregate_counted(local_50,local_88); } else { local_40 = (**(code **)(param_1 + 0xe))(); local_48 = local_40 - *(long *)(param_1 + 0xc); PFS_byte_stat::aggregate(local_50,local_48,local_88); } if ((uVar1 & 2) != 0) { lVar5 = PFS_connection_slice::write_instr_class_waits_stats(this_00); uVar2 = *(uint *)(lVar3 + 0x10); if ((uVar1 & 1) == 0) { PFS_single_stat::aggregate_counted((PFS_single_stat *)(lVar5 + (ulong)uVar2 * 0x20)); } else { PFS_single_stat::aggregate_value((PFS_single_stat *)(lVar5 + (ulong)uVar2 * 0x20),local_48); } if ((*param_1 & 4) != 0) { pPVar4 = *(PFS_events_waits **)(param_1 + 0x10); *(long *)(pPVar4 + 0x40) = local_40; *(ulonglong *)(pPVar4 + 0x98) = local_88; *(int8 *)(pPVar4 + 0x10) = *(int8 *)(this_00 + 0x7f8); *(PFS_file **)(pPVar4 + 0x88) = this; *(PFS_file **)(pPVar4 + 0x68) = this; if (this == (PFS_file *)0x0) { local_90 = 0; } else { local_90 = PFS_file::get_version(this); } *(int4 *)(pPVar4 + 0x80) = local_90; if (((byte)this_00[0x7e2] & 1) != 0) { insert_events_waits_history((PFS_thread *)this_00,pPVar4); } if (((byte)this_00[0x7e3] & 1) != 0) { insert_events_waits_history_long(pPVar4); } *(long *)(this_00 + 0x7f0) = *(long *)(this_00 + 0x7f0) + -0xb0; } } return; }
48,446
minja::Parser::parseMathPow()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathPow() { auto left = parseMathPlusMinus(); if (!left) throw std::runtime_error("Expected left side of 'math pow' expression"); while (!consumeToken("**").empty()) { auto right = parseMathPlusMinus(); if (!right) throw std::runtime_error("Expected right side of 'math pow' expression"); left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul); } return left; }
O1
cpp
minja::Parser::parseMathPow(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x8970e cmpq $0x0, (%rbx) je 0x89660 leaq 0x30(%rsp), %rbp leaq 0x20(%rsp), %r13 leaq 0xa44b0(%rip), %rax # 0x12d988 addq $0x10, %rax movq %rax, 0x40(%rsp) movq %rbp, 0x20(%rsp) movq %r13, %rdi leaq 0x69b42(%rip), %rsi # 0xf3032 leaq 0x69b3d(%rip), %rdx # 0xf3034 callq 0x233d6 movq %rsp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x85926 movq (%rsp), %rdi movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8952f movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8e0 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x89546 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8e0 testq %r15, %r15 je 0x8961a movq %r13, %rdi movq %r14, %rsi callq 0x8970e cmpq $0x0, 0x20(%rsp) je 0x8962c movq (%r14), %rax movq %rax, (%rsp) movq 0x8(%r14), %rax movq %rax, 0x8(%rsp) testq %rax, %rax je 0x89590 movq 0xa5a06(%rip), %rcx # 0x12ef88 cmpb $0x0, (%rcx) je 0x8958c incl 0x8(%rax) jmp 0x89590 lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x10(%rsp) movl $0x58, %edi callq 0x1b8c0 movq %rax, %r15 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r15) movq 0x40(%rsp), %rax movq %rax, (%r15) movq %r15, %r12 addq $0x10, %r12 movq %r12, %rdi movq %rsp, %rsi movq %rbx, %rdx movq %r13, %rcx movl $0x4, %r8d callq 0x97676 movq %r12, (%rbx) movq 0x8(%rbx), %rdi movq %r15, 0x8(%rbx) testq %rdi, %rdi je 0x895f3 callq 0x6e5ca movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x89602 callq 0x6e5ca movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x894e1 callq 0x6e5ca jmp 0x894e1 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %r15 leaq 0x699f5(%rip), %rsi # 0xf3035 movq %rax, %rdi callq 0x1b330 movq 0xa59a1(%rip), %rsi # 0x12eff0 movq 0xa590a(%rip), %rdx # 0x12ef60 movq %r15, %rdi callq 0x1bf10 jmp 0x89692 movl $0x10, %edi callq 0x1b450 movq %rax, %r15 leaq 0x69992(%rip), %rsi # 0xf3006 movq %rax, %rdi callq 0x1b330 movq 0xa596d(%rip), %rsi # 0x12eff0 movq 0xa58d6(%rip), %rdx # 0x12ef60 movq %r15, %rdi callq 0x1bf10 jmp 0x896d8 movq %rax, %r14 movq %r15, %rdi callq 0x1b690 jmp 0x896f7 movq %rax, %r14 jmp 0x896c7 movq %rax, %r14 movq %r15, %rdi callq 0x1b690 jmp 0x896c7 jmp 0x896d8 movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x896c7 callq 0x6e5ca movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x896f7 callq 0x6e5ca jmp 0x896f7 movq %rax, %r14 jmp 0x896f7 movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %rbp, %rdi je 0x896f7 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8e0 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x89705 callq 0x6e5ca movq %r14, %rdi callq 0x1bf90 nop
_ZN5minja6Parser12parseMathPowEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp qword ptr [rbx], 0 jz loc_89660 lea rbp, [rsp+78h+var_48] lea r13, [rsp+78h+var_58] lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> add rax, 10h mov [rsp+78h+var_38], rax loc_894E1: mov [rsp+78h+var_58], rbp mov rdi, r13 lea rsi, asc_F3032; "**" lea rdx, asc_F3032+2; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rsp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+78h+var_78]; void * mov r15, [rsp+78h+var_70] lea rax, [rsp+78h+var_68] cmp rdi, rax jz short loc_8952F mov rsi, [rsp+78h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8952F: mov rdi, [rsp+78h+var_58]; void * cmp rdi, rbp jz short loc_89546 mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89546: test r15, r15 jz loc_8961A mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp [rsp+78h+var_58], 0 jz loc_8962C mov rax, [r14] mov [rsp+78h+var_78], rax mov rax, [r14+8] mov [rsp+78h+var_70], rax test rax, rax jz short loc_89590 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_8958C inc dword ptr [rax+8] jmp short loc_89590 loc_8958C: lock inc dword ptr [rax+8] loc_89590: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+78h+var_68], rax mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rax, 100000001h mov [r15+8], rax mov rax, [rsp+78h+var_38] mov [r15], rax mov r12, r15 add r12, 10h mov rdi, r12 mov rsi, rsp mov rdx, rbx mov rcx, r13 mov r8d, 4 call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbx], r12 mov rdi, [rbx+8] mov [rbx+8], r15 test rdi, rdi jz short loc_895F3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_895F3: mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_89602 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_89602: mov rdi, [rsp+78h+var_50] test rdi, rdi jz loc_894E1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_894E1 loc_8961A: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8962C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_89692 loc_89660: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_89692: jmp short loc_896D8 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_896F7 mov r14, rax jmp short loc_896C7 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_896C7 jmp short loc_896D8 mov r14, rax mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_896C7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_896C7: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_896F7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_896F7 loc_896D8: mov r14, rax jmp short loc_896F7 mov r14, rax mov rdi, [rsp+78h+var_58]; void * cmp rdi, rbp jz short loc_896F7 mov rsi, [rsp+78h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_896F7: mov rdi, [rbx+8] test rdi, rdi jz short loc_89705 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_89705: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseMathPow(volatile signed __int32 **this, long long a2) { volatile signed __int32 *v3; // r15 volatile signed __int32 *v4; // rax long long **v5; // r15 volatile signed __int32 *v6; // rdi std::runtime_error *v8; // r15 std::runtime_error *exception; // r15 void *v10; // [rsp+0h] [rbp-78h] BYREF volatile signed __int32 *v11; // [rsp+8h] [rbp-70h] long long v12; // [rsp+10h] [rbp-68h] BYREF void *v13; // [rsp+20h] [rbp-58h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-50h] _QWORD v15[2]; // [rsp+30h] [rbp-48h] BYREF long long *v16; // [rsp+40h] [rbp-38h] minja::Parser::parseMathPlusMinus((minja::Parser *)this); if ( !*this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v16 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> + 2; while ( 1 ) { v13 = v15; std::string::_M_construct<char const*>(&v13, "**", (long long)""); minja::Parser::consumeToken(&v10, a2, (_BYTE **)&v13, 1u); v3 = v11; if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( v13 != v15 ) operator delete(v13, v15[0] + 1LL); if ( !v3 ) break; minja::Parser::parseMathPlusMinus((minja::Parser *)&v13); if ( !v13 ) { v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v8, "Expected right side of 'math pow' expression"); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v10 = *(void **)a2; v4 = *(volatile signed __int32 **)(a2 + 8); v11 = v4; if ( v4 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v4 + 2); else _InterlockedIncrement(v4 + 2); } v12 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16); v5 = (long long **)operator new(0x58uLL); v5[1] = (long long *)0x100000001LL; *v5 = v16; minja::BinaryOpExpr::BinaryOpExpr(v5 + 2, &v10, this, &v13, 4LL); *this = (volatile signed __int32 *)(v5 + 2); v6 = this[1]; this[1] = (volatile signed __int32 *)v5; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); } return (minja::Parser *)this; }
parseMathPow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI CALL 0x0018970e CMP qword ptr [RBX],0x0 JZ 0x00189660 LEA RBP,[RSP + 0x30] LEA R13,[RSP + 0x20] LEA RAX,[0x22d988] ADD RAX,0x10 MOV qword ptr [RSP + 0x40],RAX LAB_001894e1: MOV qword ptr [RSP + 0x20],RBP LAB_001894e6: MOV RDI,R13 LEA RSI,[0x1f3032] LEA RDX,[0x1f3034] CALL 0x001233d6 LAB_001894fc: MOV RDI,RSP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x00185926 MOV RDI,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018952f MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011b8e0 LAB_0018952f: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,RBP JZ 0x00189546 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011b8e0 LAB_00189546: TEST R15,R15 JZ 0x0018961a LAB_0018954f: MOV RDI,R13 MOV RSI,R14 CALL 0x0018970e CMP qword ptr [RSP + 0x20],0x0 JZ 0x0018962c MOV RAX,qword ptr [R14] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x00189590 MOV RCX,qword ptr [0x0022ef88] CMP byte ptr [RCX],0x0 JZ 0x0018958c INC dword ptr [RAX + 0x8] JMP 0x00189590 LAB_0018958c: INC.LOCK dword ptr [RAX + 0x8] LAB_00189590: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_0018959d: MOV EDI,0x58 CALL 0x0011b8c0 LAB_001895a7: MOV R15,RAX MOV RAX,0x100000001 MOV qword ptr [R15 + 0x8],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [R15],RAX MOV R12,R15 ADD R12,0x10 MOV RDI,R12 MOV RSI,RSP MOV RDX,RBX MOV RCX,R13 MOV R8D,0x4 CALL 0x00197676 MOV qword ptr [RBX],R12 MOV RDI,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],R15 TEST RDI,RDI JZ 0x001895f3 CALL 0x0016e5ca LAB_001895f3: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00189602 CALL 0x0016e5ca LAB_00189602: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x001894e1 CALL 0x0016e5ca JMP 0x001894e1 LAB_0018961a: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018962c: MOV EDI,0x10 CALL 0x0011b450 MOV R15,RAX LAB_00189639: LEA RSI,[0x1f3035] MOV RDI,RAX CALL 0x0011b330 LAB_00189648: MOV RSI,qword ptr [0x0022eff0] MOV RDX,qword ptr [0x0022ef60] MOV RDI,R15 CALL 0x0011bf10 LAB_00189660: MOV EDI,0x10 CALL 0x0011b450 MOV R15,RAX LAB_0018966d: LEA RSI,[0x1f3006] MOV RDI,RAX CALL 0x0011b330 LAB_0018967c: MOV RSI,qword ptr [0x0022eff0] MOV RDX,qword ptr [0x0022ef60] MOV RDI,R15 CALL 0x0011bf10
/* minja::Parser::parseMathPow() */ void minja::Parser::parseMathPow(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int8 *puVar2; runtime_error *prVar3; int8 *in_RSI; long *in_RDI; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68 [2]; long *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; long local_48 [2]; int **local_38; parseMathPlusMinus(); if (*in_RDI == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018966d to 0018967b has its CatchHandler @ 00189694 */ std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression"); /* try { // try from 0018967c to 00189691 has its CatchHandler @ 00189692 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60); } local_38 = &PTR___Sp_counted_ptr_inplace_0022d998; while( true ) { local_58 = local_48; /* try { // try from 001894e6 to 001894fb has its CatchHandler @ 001896d8 */ std::__cxx11::string::_M_construct<char_const*>(&local_58,&DAT_001f3032,&DAT_001f3034); /* try { // try from 001894fc to 0018950e has its CatchHandler @ 001896dd */ consumeToken(&local_78); p_Var1 = local_70; if (local_78 != local_68) { operator_delete(local_78,local_68[0] + 1); } if (local_58 != local_48) { operator_delete(local_58,local_48[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break; /* try { // try from 0018954f to 00189559 has its CatchHandler @ 001896b3 */ parseMathPlusMinus(); if (local_58 == (long *)0x0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00189639 to 00189647 has its CatchHandler @ 001896a6 */ std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression"); /* try { // try from 00189648 to 0018965d has its CatchHandler @ 001896a1 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60); } local_78 = (long *)*in_RSI; local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022ef88 == '\0') { LOCK(); *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; UNLOCK(); } else { *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; } } local_68[0] = in_RSI[4] - in_RSI[2]; /* try { // try from 0018959d to 001895a6 has its CatchHandler @ 001896b5 */ puVar2 = (int8 *)operator_new(0x58); puVar2[1] = 0x100000001; *puVar2 = local_38; BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_78); *in_RDI = (long)(puVar2 + 2); p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar2; if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1); } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } } return; }
48,447
minja::Parser::parseMathPow()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathPow() { auto left = parseMathPlusMinus(); if (!left) throw std::runtime_error("Expected left side of 'math pow' expression"); while (!consumeToken("**").empty()) { auto right = parseMathPlusMinus(); if (!right) throw std::runtime_error("Expected right side of 'math pow' expression"); left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul); } return left; }
O2
cpp
minja::Parser::parseMathPow(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r15 movq %rdi, %rbx callq 0x64b66 cmpq $0x0, (%rbx) je 0x64aab leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r12 leaq 0x38(%rsp), %r13 movq %r14, %rdi leaq 0x4f658(%rip), %rsi # 0xb4022 movq %r12, %rdx callq 0x27c76 movq %r13, %rdi movq %r15, %rsi movq %r14, %rdx pushq $0x1 popq %rcx callq 0x615d0 movq 0x40(%rsp), %rbp movq %r13, %rdi callq 0x241c8 movq %r14, %rdi callq 0x241c8 testq %rbp, %rbp je 0x64a67 movq %r14, %rdi movq %r15, %rsi callq 0x64b66 cmpq $0x0, 0x8(%rsp) je 0x64a79 movq %r13, %rdi movq %r15, %rsi callq 0x60ba0 movl $0x4, 0x4(%rsp) movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r14, %rcx leaq 0x4(%rsp), %r8 callq 0x64b3f movq %rbx, %rdi movq %r12, %rsi callq 0x719a8 leaq 0x30(%rsp), %rdi callq 0x5011e leaq 0x40(%rsp), %rdi callq 0x5011e leaq 0x10(%rsp), %rdi callq 0x5011e jmp 0x649c0 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r15 leaq 0x4f59a(%rip), %rsi # 0xb4025 movq %rax, %rdi callq 0x23330 movq 0x99556(%rip), %rsi # 0xfdff0 movq 0x994b7(%rip), %rdx # 0xfdf58 movq %r15, %rdi callq 0x23f10 jmp 0x64adb pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r15 leaq 0x4f539(%rip), %rsi # 0xb3ff6 movq %rax, %rdi callq 0x23330 movq 0x99524(%rip), %rsi # 0xfdff0 movq 0x99485(%rip), %rdx # 0xfdf58 movq %r15, %rdi callq 0x23f10 jmp 0x64b19 movq %rax, %r14 movq %r15, %rdi callq 0x236b0 jmp 0x64b2b jmp 0x64af9 movq %rax, %r14 movq %r15, %rdi callq 0x236b0 jmp 0x64b0b movq %rax, %r14 jmp 0x64b0b movq %rax, %r14 leaq 0x40(%rsp), %rdi callq 0x5011e leaq 0x10(%rsp), %rdi callq 0x5011e jmp 0x64b2b jmp 0x64b19 movq %rax, %r14 jmp 0x64b2b movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x241c8 addq $0x8, %rbx movq %rbx, %rdi callq 0x5011e movq %r14, %rdi callq 0x23f90
_ZN5minja6Parser12parseMathPowEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rsi mov rbx, rdi call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp qword ptr [rbx], 0 jz loc_64AAB lea r14, [rsp+88h+var_80] lea r12, [rsp+88h+var_60] lea r13, [rsp+88h+var_50] loc_649C0: mov rdi, r14 lea rsi, asc_B4022; "**" mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r13 mov rsi, r15 mov rdx, r14 push 1 pop rcx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rbp, [rsp+88h+var_48] mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbp, rbp jz short loc_64A67 mov rdi, r14; this mov rsi, r15 call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp [rsp+88h+var_80], 0 jz short loc_64A79 mov rdi, r13; this mov rsi, r15 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov [rsp+88h+var_84], 4 mov rdi, r12 mov rsi, r13 mov rdx, rbx mov rcx, r14 lea r8, [rsp+88h+var_84] call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&) mov rdi, rbx mov rsi, r12 call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE lea rdi, [rsp+88h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp loc_649C0 loc_64A67: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_64A79: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_64ADB loc_64AAB: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_64ADB: jmp short loc_64B19 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_64B2B jmp short loc_64AF9 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_64B0B loc_64AF9: mov r14, rax jmp short loc_64B0B mov r14, rax lea rdi, [rsp+88h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_64B0B: lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_64B2B jmp short $+2 loc_64B19: mov r14, rax jmp short loc_64B2B mov r14, rax lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_64B2B: add rbx, 8 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
minja::Parser * minja::Parser::parseMathPow(minja::Parser *this, _QWORD *a2) { long long v2; // rbp std::runtime_error *v4; // r15 std::runtime_error *exception; // r15 int v6; // [rsp+4h] [rbp-84h] BYREF long long v7; // [rsp+8h] [rbp-80h] BYREF _QWORD v8[3]; // [rsp+10h] [rbp-78h] BYREF _BYTE v9[8]; // [rsp+28h] [rbp-60h] BYREF long long v10; // [rsp+30h] [rbp-58h] BYREF long long v11; // [rsp+38h] [rbp-50h] BYREF _QWORD v12[9]; // [rsp+40h] [rbp-48h] BYREF minja::Parser::parseMathPlusMinus(this); if ( !*(_QWORD *)this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } while ( 1 ) { std::string::basic_string<std::allocator<char>>(&v7, (long long)"**"); minja::Parser::consumeToken(&v11, (long long)a2, &v7, 1u); v2 = v12[0]; std::string::~string(&v11); std::string::~string(&v7); if ( !v2 ) break; minja::Parser::parseMathPlusMinus((minja::Parser *)&v7); if ( !v7 ) { v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v4, "Expected right side of 'math pow' expression"); __cxa_throw( v4, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::get_location((minja::Parser *)&v11, a2); v6 = 4; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>( v9, &v11, this, &v7, &v6); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v9); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8); } return this; }
parseMathPow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RSI MOV RBX,RDI CALL 0x00164b66 CMP qword ptr [RBX],0x0 JZ 0x00164aab LEA R14,[RSP + 0x8] LEA R12,[RSP + 0x28] LEA R13,[RSP + 0x38] LAB_001649c0: MOV RDI,R14 LEA RSI,[0x1b4022] MOV RDX,R12 CALL 0x00127c76 LAB_001649d2: MOV RDI,R13 MOV RSI,R15 MOV RDX,R14 PUSH 0x1 POP RCX CALL 0x001615d0 MOV RBP,qword ptr [RSP + 0x40] MOV RDI,R13 CALL 0x001241c8 MOV RDI,R14 CALL 0x001241c8 TEST RBP,RBP JZ 0x00164a67 LAB_001649fd: MOV RDI,R14 MOV RSI,R15 CALL 0x00164b66 CMP qword ptr [RSP + 0x8],0x0 JZ 0x00164a79 LAB_00164a10: MOV RDI,R13 MOV RSI,R15 CALL 0x00160ba0 MOV dword ptr [RSP + 0x4],0x4 LAB_00164a23: MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX MOV RCX,R14 LEA R8,[RSP + 0x4] CALL 0x00164b3f LAB_00164a39: MOV RDI,RBX MOV RSI,R12 CALL 0x001719a8 LEA RDI,[RSP + 0x30] CALL 0x0015011e LEA RDI,[RSP + 0x40] CALL 0x0015011e LEA RDI,[RSP + 0x10] CALL 0x0015011e JMP 0x001649c0 LAB_00164a67: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00164a79: PUSH 0x10 POP RDI CALL 0x00123470 MOV R15,RAX LAB_00164a84: LEA RSI,[0x1b4025] MOV RDI,RAX CALL 0x00123330 LAB_00164a93: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R15 CALL 0x00123f10 LAB_00164aab: PUSH 0x10 POP RDI CALL 0x00123470 MOV R15,RAX LAB_00164ab6: LEA RSI,[0x1b3ff6] MOV RDI,RAX CALL 0x00123330 LAB_00164ac5: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R15 CALL 0x00123f10
/* minja::Parser::parseMathPow() */ void minja::Parser::parseMathPow(void) { long lVar1; runtime_error *prVar2; __shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI; long local_80; __shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [24]; Location local_60 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8]; string local_50 [8]; long local_48 [3]; parseMathPlusMinus(); if (*(long *)in_RDI == 0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00164ab6 to 00164ac4 has its CatchHandler @ 00164add */ std::runtime_error::runtime_error(prVar2,"Expected left side of \'math pow\' expression"); /* try { // try from 00164ac5 to 00164ada has its CatchHandler @ 00164adb */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } while( true ) { /* try { // try from 001649c0 to 001649d1 has its CatchHandler @ 00164b19 */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_80,"**",(allocator *)local_60); /* try { // try from 001649d2 to 001649e2 has its CatchHandler @ 00164b1e */ consumeToken(local_50); lVar1 = local_48[0]; std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)&local_80); if (lVar1 == 0) { return; } /* try { // try from 001649fd to 00164a07 has its CatchHandler @ 00164b17 */ parseMathPlusMinus(); if (local_80 == 0) break; /* try { // try from 00164a10 to 00164a1a has its CatchHandler @ 00164af9 */ get_location(); /* try { // try from 00164a23 to 00164a38 has its CatchHandler @ 00164afe */ std:: make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op> (local_60,local_50,in_RDI,(Op *)&local_80); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator= (in_RDI,(__shared_ptr *)local_60); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78); } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00164a84 to 00164a92 has its CatchHandler @ 00164aec */ std::runtime_error::runtime_error(prVar2,"Expected right side of \'math pow\' expression"); /* try { // try from 00164a93 to 00164aa8 has its CatchHandler @ 00164aea */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
48,448
CLI::App::App(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/App.hpp
explicit App(std::string app_description = "", std::string app_name = "") : App(app_description, app_name, nullptr) { set_help_flag("-h,--help", "Print this help message and exit"); }
O1
cpp
CLI::App::App(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 %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x70(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx leaq 0x60(%rsp), %rdi movq %rax, %rsi callq 0x178c0 leaq 0x50(%rsp), %r12 movq %r12, -0x10(%r12) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx leaq 0x40(%rsp), %rdi callq 0x178c0 leaq 0x60(%rsp), %rsi leaq 0x40(%rsp), %rdx movq %rbx, %rdi xorl %ecx, %ecx callq 0x185ce movq 0x40(%rsp), %rdi cmpq %r12, %rdi je 0xbcc7 movq 0x50(%rsp), %rsi incq %rsi callq 0x7430 movq 0x60(%rsp), %rdi cmpq %r15, %rdi je 0xbcde movq 0x70(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x2b8c5(%rip), %rsi # 0x375b3 leaq 0x2b8c7(%rip), %rdx # 0x375bc movq %rsp, %rdi callq 0x12040 leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x2b8af(%rip), %rsi # 0x375bd leaq 0x2b8c8(%rip), %rdx # 0x375dd leaq 0x20(%rsp), %rdi callq 0x12040 movq 0x130(%rbx), %rsi testq %rsi, %rsi je 0xbd3e movq %rbx, %rdi callq 0x196c0 movq $0x0, 0x130(%rbx) movq 0x8(%rsp), %rdx testq %rdx, %rdx je 0xbdac leaq 0x90(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rsp), %rsi addq %rsi, %rdx leaq 0x80(%rsp), %rdi callq 0x178c0 leaq 0x80(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x197e2 movq %rax, 0x130(%rbx) movq 0x80(%rsp), %rdi cmpq %r13, %rdi je 0xbda1 movq 0x90(%rsp), %rsi incq %rsi callq 0x7430 movq 0x130(%rbx), %rax movb $0x0, 0x23(%rax) movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xbdc3 movq 0x30(%rsp), %rsi incq %rsi callq 0x7430 movq (%rsp), %rdi cmpq %r15, %rdi je 0xbdd9 movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 addq $0xa0, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq 0x80(%rsp), %rdi cmpq %r13, %rdi je 0xbe51 movq 0x90(%rsp), %rsi incq %rsi callq 0x7430 jmp 0xbe51 movq %rax, %r14 jmp 0xbe68 movq %rax, %r14 jmp 0xbe7e movq %rax, %r14 movq 0x40(%rsp), %rdi cmpq %r12, %rdi je 0xbe35 movq 0x50(%rsp), %rsi incq %rsi callq 0x7430 jmp 0xbe35 movq %rax, %r14 movq 0x60(%rsp), %rdi cmpq %r15, %rdi je 0xbe86 movq 0x70(%rsp), %rsi incq %rsi callq 0x7430 jmp 0xbe86 movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xbe68 movq 0x30(%rsp), %rsi incq %rsi callq 0x7430 movq (%rsp), %rdi cmpq %r15, %rdi je 0xbe7e movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rdi callq 0xc95e movq %r14, %rdi callq 0x7780
_ZN3CLI3AppC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: push r15 push r14 push r13 push r12 push rbx; __int64 sub rsp, 0A0h mov r14, rdx mov rbx, rdi lea r15, [rsp+0C8h+var_58] mov [r15-10h], r15 mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax lea rdi, [rsp+0C8h+var_68] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea r12, [rsp+0C8h+var_78] mov [r12-10h], r12 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi lea rdi, [rsp+0C8h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, [rsp+0C8h+var_68] lea rdx, [rsp+0C8h+var_88] mov rdi, rbx; this xor ecx, ecx call _ZN3CLI3AppC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_PS0_; CLI::App::App(std::string,std::string,CLI::App*) mov rdi, [rsp+0C8h+var_88]; void * cmp rdi, r12 jz short loc_BCC7 mov rsi, [rsp+0C8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BCC7: mov rdi, [rsp+0C8h+var_68]; void * cmp rdi, r15 jz short loc_BCDE mov rsi, [rsp+0C8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BCDE: lea r15, [rsp+0C8h+var_B8] mov [r15-10h], r15 lea rsi, aHHelp; "-h,--help" lea rdx, aHHelp+9; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rsp+0C8h+var_98] mov [r12-10h], r12 lea rsi, aPrintThisHelpM; "Print this help message and exit" lea rdx, aPrintThisHelpM+20h; "" lea rdi, [rsp+0C8h+var_A8] 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 rsi, [rbx+130h]; CLI::Option * test rsi, rsi jz short loc_BD3E mov rdi, rbx; this call _ZN3CLI3App13remove_optionEPNS_6OptionE; CLI::App::remove_option(CLI::Option *) mov qword ptr [rbx+130h], 0 loc_BD3E: mov rdx, [rsp+0C8h+var_C0] test rdx, rdx jz short loc_BDAC lea r13, [rsp+0C8h+var_38] mov [r13-10h], r13 mov rsi, [rsp+0C8h+var_C8] add rdx, rsi lea rdi, [rsp+0C8h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, [rsp+0C8h+var_48] lea rdx, [rsp+0C8h+var_A8] mov rdi, rbx call _ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_ mov [rbx+130h], rax mov rdi, [rsp+0C8h+var_48]; void * cmp rdi, r13 jz short loc_BDA1 mov rsi, [rsp+0C8h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BDA1: mov rax, [rbx+130h] mov byte ptr [rax+23h], 0 loc_BDAC: mov rdi, [rsp+0C8h+var_A8]; void * cmp rdi, r12 jz short loc_BDC3 mov rsi, [rsp+0C8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BDC3: mov rdi, [rsp+0C8h+var_C8]; void * cmp rdi, r15 jz short loc_BDD9 mov rsi, [rsp+0C8h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BDD9: add rsp, 0A0h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rsp+arg_78]; void * cmp rdi, r13 jz short loc_BE51 mov rsi, [rsp+arg_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BE51 mov r14, rax jmp short loc_BE68 mov r14, rax jmp short loc_BE7E mov r14, rax mov rdi, [rsp+arg_38]; void * cmp rdi, r12 jz short loc_BE35 mov rsi, [rsp+arg_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BE35 mov r14, rax loc_BE35: mov rdi, [rsp+arg_58]; void * cmp rdi, r15 jz short loc_BE86 mov rsi, [rsp+arg_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BE86 mov r14, rax loc_BE51: mov rdi, [rsp+arg_18]; void * cmp rdi, r12 jz short loc_BE68 mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BE68: mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_BE7E mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BE7E: mov rdi, rbx; this call _ZN3CLI3AppD2Ev; CLI::App::~App() loc_BE86: mov rdi, r14 call __Unwind_Resume
void CLI::App::App(CLI::Option **this, _QWORD *a2, _QWORD *a3) { CLI::Option *v4; // rsi void *v5; // [rsp+0h] [rbp-C8h] BYREF char *v6; // [rsp+8h] [rbp-C0h] _QWORD v7[2]; // [rsp+10h] [rbp-B8h] BYREF void *v8[2]; // [rsp+20h] [rbp-A8h] BYREF long long v9[2]; // [rsp+30h] [rbp-98h] BYREF void *v10[2]; // [rsp+40h] [rbp-88h] BYREF long long v11[2]; // [rsp+50h] [rbp-78h] BYREF void *v12[2]; // [rsp+60h] [rbp-68h] BYREF long long v13; // [rsp+70h] [rbp-58h] BYREF int v14; // [rsp+78h] [rbp-50h] void *v15; // [rsp+80h] [rbp-48h] BYREF int v16; // [rsp+88h] [rbp-40h] long long v17; // [rsp+90h] [rbp-38h] BYREF int v18; // [rsp+98h] [rbp-30h] long long v19; // [rsp+A0h] [rbp-28h] v12[0] = &v13; std::string::_M_construct<char *>(v12, *a2, *a2 + a2[1]); v10[0] = v11; std::string::_M_construct<char *>(v10, *a3, *a3 + a3[1]); CLI::App::App( (CLI::App *)this, (long long)v5, v6, v7[0], v7[1], (int)v8[0], (long long)v8[1], v9[0], v9[1], (long long)v10[0], (long long)v10[1], v11[0], v11[1], (long long)v12[0], (long long)v12[1], v13, v14, (long long)v15, v16, v17, v18, v19); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); v5 = v7; std::string::_M_construct<char const*>(&v5, "-h,--help", ""); v8[0] = v9; std::string::_M_construct<char const*>(v8, "Print this help message and exit", ""); v4 = this[38]; if ( v4 ) { CLI::App::remove_option((CLI::App *)this, v4); this[38] = 0LL; } if ( v6 ) { v15 = &v17; std::string::_M_construct<char *>(&v15, v5, &v6[(_QWORD)v5]); this[38] = (CLI::Option *)ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_( this, &v15, v8); if ( v15 != &v17 ) operator delete(v15, v17 + 1); *((_BYTE *)this[38] + 35) = 0; } if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1); if ( v5 != v7 ) operator delete(v5, v7[0] + 1LL); }
App: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV R14,RDX MOV RBX,RDI LEA R15,[RSP + 0x70] MOV qword ptr [R15 + -0x10],R15 MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX LEA RDI,[RSP + 0x60] MOV RSI,RAX CALL 0x001178c0 LEA R12,[RSP + 0x50] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI LAB_0010bc92: LEA RDI,[RSP + 0x40] CALL 0x001178c0 LAB_0010bc9c: LEA RSI,[RSP + 0x60] LEA RDX,[RSP + 0x40] MOV RDI,RBX XOR ECX,ECX CALL 0x001185ce MOV RDI,qword ptr [RSP + 0x40] CMP RDI,R12 JZ 0x0010bcc7 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x00107430 LAB_0010bcc7: MOV RDI,qword ptr [RSP + 0x60] CMP RDI,R15 JZ 0x0010bcde MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x00107430 LAB_0010bcde: LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_0010bce7: LEA RSI,[0x1375b3] LEA RDX,[0x1375bc] MOV RDI,RSP CALL 0x00112040 LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 LAB_0010bd07: LEA RSI,[0x1375bd] LEA RDX,[0x1375dd] LEA RDI,[RSP + 0x20] CALL 0x00112040 MOV RSI,qword ptr [RBX + 0x130] TEST RSI,RSI JZ 0x0010bd3e LAB_0010bd2b: MOV RDI,RBX CALL 0x001196c0 MOV qword ptr [RBX + 0x130],0x0 LAB_0010bd3e: MOV RDX,qword ptr [RSP + 0x8] TEST RDX,RDX JZ 0x0010bdac LEA R13,[RSP + 0x90] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [RSP] ADD RDX,RSI LEA RDI,[RSP + 0x80] CALL 0x001178c0 LAB_0010bd68: LEA RSI,[RSP + 0x80] LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x001197e2 LAB_0010bd7d: MOV qword ptr [RBX + 0x130],RAX MOV RDI,qword ptr [RSP + 0x80] CMP RDI,R13 JZ 0x0010bda1 MOV RSI,qword ptr [RSP + 0x90] INC RSI CALL 0x00107430 LAB_0010bda1: MOV RAX,qword ptr [RBX + 0x130] MOV byte ptr [RAX + 0x23],0x0 LAB_0010bdac: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R12 JZ 0x0010bdc3 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00107430 LAB_0010bdc3: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x0010bdd9 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00107430 LAB_0010bdd9: ADD RSP,0xa0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* CLI::App::App(std::__cxx11::string, std::__cxx11::string) */ void __thiscall CLI::App::App(App *this,long *param_2,long *param_3) { int8 uVar1; long *local_c8; long local_c0; long local_b8 [2]; long *local_a8 [2]; long local_98 [2]; long *local_88 [2]; long local_78 [2]; long *local_68 [2]; long local_58 [2]; long *local_48 [2]; long local_38 [2]; local_68[0] = local_58; std::__cxx11::string::_M_construct<char*>(local_68,*param_2,param_2[1] + *param_2); /* try { // try from 0010bc92 to 0010bc9b has its CatchHandler @ 0010be32 */ local_88[0] = local_78; std::__cxx11::string::_M_construct<char*>(local_88,*param_3,param_3[1] + *param_3); /* try { // try from 0010bc9c to 0010bcaf has its CatchHandler @ 0010be16 */ App(this,local_68,local_88,0); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } local_c8 = local_b8; /* try { // try from 0010bce7 to 0010bcfc has its CatchHandler @ 0010be11 */ std::__cxx11::string::_M_construct<char_const*>(&local_c8,&DAT_001375b3,&DAT_001375bc); /* try { // try from 0010bd07 to 0010bd1e has its CatchHandler @ 0010be0c */ local_a8[0] = local_98; std::__cxx11::string::_M_construct<char_const*>(local_a8,"Print this help message and exit",""); if (*(Option **)(this + 0x130) != (Option *)0x0) { /* try { // try from 0010bd2b to 0010bd67 has its CatchHandler @ 0010be4e */ remove_option(this,*(Option **)(this + 0x130)); *(int8 *)(this + 0x130) = 0; } if (local_c0 != 0) { local_48[0] = local_38; std::__cxx11::string::_M_construct<char*>(local_48,local_c8,local_c0 + (long)local_c8); /* try { // try from 0010bd68 to 0010bd7c has its CatchHandler @ 0010bdea */ uVar1 = _ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_ (this,local_48,local_a8); *(int8 *)(this + 0x130) = uVar1; if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } *(int1 *)(*(long *)(this + 0x130) + 0x23) = 0; } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (local_c8 != local_b8) { operator_delete(local_c8,local_b8[0] + 1); } return; }
48,449
testing::internal::FilePath::MakeFileName(testing::internal::FilePath const&, testing::internal::FilePath const&, int, char const*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-filepath.cc
FilePath FilePath::MakeFileName(const FilePath& directory, const FilePath& base_name, int number, const char* extension) { std::string file; if (number == 0) { file = base_name.string() + "." + extension; } else { file = base_name.string() + "_" + StreamableToString(number) + "." + extension; } return ConcatPaths(directory, FilePath(file)); }
O0
cpp
testing::internal::FilePath::MakeFileName(testing::internal::FilePath const&, testing::internal::FilePath const&, int, char const*): subq $0x1a8, %rsp # imm = 0x1A8 movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0x1a0(%rsp) movq %rsi, 0x198(%rsp) movq %rdx, 0x190(%rsp) movl %ecx, 0x18c(%rsp) movq %r8, 0x180(%rsp) leaq 0x160(%rsp), %rdi callq 0x20ad0 cmpl $0x0, 0x18c(%rsp) jne 0xb6d47 movq 0x190(%rsp), %rdi callq 0xe3480 movq %rax, 0x18(%rsp) jmp 0xb6c9a movq 0x18(%rsp), %rsi leaq 0x5d18e(%rip), %rdx # 0x113e34 leaq 0x120(%rsp), %rdi callq 0x8bfc0 jmp 0xb6cb5 movq 0x180(%rsp), %rdx leaq 0x140(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x39e60 jmp 0xb6cd4 leaq 0x160(%rsp), %rdi leaq 0x140(%rsp), %rsi callq 0x386f0 leaq 0x140(%rsp), %rdi callq 0x1aac0 leaq 0x120(%rsp), %rdi callq 0x1aac0 jmp 0xb6ec7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0xb6f7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) leaq 0x120(%rsp), %rdi callq 0x1aac0 jmp 0xb6f7b movq 0x190(%rsp), %rdi callq 0xe3480 movq %rax, 0x10(%rsp) jmp 0xb6d5b movq 0x10(%rsp), %rsi leaq 0x5be6c(%rip), %rdx # 0x112bd3 leaq 0x90(%rsp), %rdi callq 0x8bfc0 jmp 0xb6d76 leaq 0x70(%rsp), %rdi leaq 0x18c(%rsp), %rsi callq 0xe2830 jmp 0xb6d8a leaq 0xb0(%rsp), %rdi leaq 0x90(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x8bed0 jmp 0xb6da6 leaq 0x5d087(%rip), %rdx # 0x113e34 leaq 0xd0(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x39e60 jmp 0xb6dc4 movq 0x180(%rsp), %rdx leaq 0xf0(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0x39e60 jmp 0xb6de3 leaq 0x160(%rsp), %rdi leaq 0xf0(%rsp), %rsi callq 0x386f0 leaq 0xf0(%rsp), %rdi callq 0x1aac0 leaq 0xd0(%rsp), %rdi callq 0x1aac0 leaq 0xb0(%rsp), %rdi callq 0x1aac0 leaq 0x70(%rsp), %rdi callq 0x1aac0 leaq 0x90(%rsp), %rdi callq 0x1aac0 jmp 0xb6ec7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0xb6eb5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0xb6eab movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0xb6e9e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) leaq 0xd0(%rsp), %rdi callq 0x1aac0 leaq 0xb0(%rsp), %rdi callq 0x1aac0 leaq 0x70(%rsp), %rdi callq 0x1aac0 leaq 0x90(%rsp), %rdi callq 0x1aac0 jmp 0xb6f7b movq 0x198(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi leaq 0x160(%rsp), %rsi callq 0x39160 jmp 0xb6ee8 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xe3380 jmp 0xb6ef9 movq 0x8(%rsp), %rsi movq 0x20(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0xb6fa0 jmp 0xb6f0f leaq 0x50(%rsp), %rdi callq 0xe3490 leaq 0x30(%rsp), %rdi callq 0x1aac0 leaq 0x160(%rsp), %rdi callq 0x1aac0 movq 0x28(%rsp), %rax addq $0x1a8, %rsp # imm = 0x1A8 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) jmp 0xb6f71 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x118(%rsp) movl %eax, 0x114(%rsp) leaq 0x50(%rsp), %rdi callq 0xe3490 leaq 0x30(%rsp), %rdi callq 0x1aac0 leaq 0x160(%rsp), %rdi callq 0x1aac0 movq 0x118(%rsp), %rdi callq 0x14c80 nopw %cs:(%rax,%rax)
_ZN7testing8internal8FilePath12MakeFileNameERKS1_S3_iPKc: sub rsp, 1A8h mov [rsp+1A8h+var_188], rdi mov rax, rdi mov [rsp+1A8h+var_180], rax mov [rsp+1A8h+var_8], rdi mov [rsp+1A8h+var_10], rsi mov [rsp+1A8h+var_18], rdx mov [rsp+1A8h+var_1C], ecx mov [rsp+1A8h+var_28], r8 lea rdi, [rsp+1A8h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void) cmp [rsp+1A8h+var_1C], 0 jnz loc_B6D47 mov rdi, [rsp+1A8h+var_18] call _ZNK7testing8internal8FilePath6stringB5cxx11Ev; testing::internal::FilePath::string(void) mov [rsp+1A8h+var_190], rax; __int64 jmp short $+2 loc_B6C9A: mov rsi, [rsp+1A8h+var_190]; int lea rdx, asc_113E33+1; int lea rdi, [rsp+1A8h+var_88]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_B6CB5: mov rdx, [rsp+1A8h+var_28] lea rdi, [rsp+1A8h+var_68] lea rsi, [rsp+1A8h+var_88] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B6CD4: lea rdi, [rsp+1A8h+var_48] lea rsi, [rsp+1A8h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+1A8h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1A8h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_B6EC7 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp loc_B6F7B mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax lea rdi, [rsp+arg_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_B6F7B loc_B6D47: mov rdi, [rsp+1A8h+var_18] call _ZNK7testing8internal8FilePath6stringB5cxx11Ev; testing::internal::FilePath::string(void) mov qword ptr [rsp+1A8h+var_198], rax; int jmp short $+2 loc_B6D5B: mov rsi, qword ptr [rsp+1A8h+var_198]; int lea rdx, aIsValid+8; int lea rdi, [rsp+1A8h+var_118]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_B6D76: lea rdi, [rsp+1A8h+var_138] lea rsi, [rsp+1A8h+var_1C] call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&) jmp short $+2 loc_B6D8A: lea rdi, [rsp+1A8h+var_F8] lea rsi, [rsp+1A8h+var_118] lea rdx, [rsp+1A8h+var_138] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_B6DA6: lea rdx, asc_113E33+1; "." lea rdi, [rsp+1A8h+var_D8] lea rsi, [rsp+1A8h+var_F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B6DC4: mov rdx, [rsp+1A8h+var_28] lea rdi, [rsp+1A8h+var_B8] lea rsi, [rsp+1A8h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B6DE3: lea rdi, [rsp+1A8h+var_48] lea rsi, [rsp+1A8h+var_B8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+1A8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1A8h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1A8h+var_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1A8h+var_138]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1A8h+var_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_B6EC7 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_B6EB5 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_B6EAB mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_B6E9E mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B6E9E: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B6EAB: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B6EB5: lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_B6F7B loc_B6EC7: mov rax, [rsp+1A8h+var_10] mov [rsp+1A8h+var_1A0], rax lea rdi, [rsp+1A8h+var_178] lea rsi, [rsp+1A8h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_B6EE8: lea rdi, [rsp+1A8h+var_158] lea rsi, [rsp+1A8h+var_178] call _ZN7testing8internal8FilePathC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::FilePath::FilePath(std::string) jmp short $+2 loc_B6EF9: mov rsi, [rsp+1A8h+var_1A0]; testing::internal::FilePath * mov rdi, [rsp+1A8h+var_188]; this lea rdx, [rsp+1A8h+var_158]; testing::internal::FilePath * call _ZN7testing8internal8FilePath11ConcatPathsERKS1_S3_; testing::internal::FilePath::ConcatPaths(testing::internal::FilePath const&,testing::internal::FilePath const&) jmp short $+2 loc_B6F0F: lea rdi, [rsp+1A8h+var_158]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() lea rdi, [rsp+1A8h+var_178]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+1A8h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rsp+1A8h+var_180] add rsp, 1A8h retn mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax jmp short loc_B6F71 mov rcx, rax mov eax, edx mov [rsp+arg_110], rcx mov [rsp+arg_10C], eax lea rdi, [rsp+arg_48]; this call _ZN7testing8internal8FilePathD2Ev; testing::internal::FilePath::~FilePath() loc_B6F71: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B6F7B: lea rdi, [rsp+arg_158]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+arg_110] call __Unwind_Resume
testing::internal::FilePath * testing::internal::FilePath::MakeFileName( testing::internal::FilePath *this, const testing::internal::FilePath *a2, const testing::internal::FilePath *a3, int a4, const char *a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d testing::internal::FilePath *v14; // [rsp+8h] [rbp-1A0h] long long v15; // [rsp+10h] [rbp-198h] long long v16; // [rsp+18h] [rbp-190h] _QWORD v17[4]; // [rsp+30h] [rbp-178h] BYREF _BYTE v18[32]; // [rsp+50h] [rbp-158h] BYREF _BYTE v19[32]; // [rsp+70h] [rbp-138h] BYREF _QWORD v20[4]; // [rsp+90h] [rbp-118h] BYREF _BYTE v21[32]; // [rsp+B0h] [rbp-F8h] BYREF _BYTE v22[32]; // [rsp+D0h] [rbp-D8h] BYREF _QWORD v23[6]; // [rsp+F0h] [rbp-B8h] BYREF _QWORD v24[4]; // [rsp+120h] [rbp-88h] BYREF _QWORD v25[4]; // [rsp+140h] [rbp-68h] BYREF _QWORD v26[4]; // [rsp+160h] [rbp-48h] BYREF const char *v27; // [rsp+180h] [rbp-28h] int v28; // [rsp+18Ch] [rbp-1Ch] BYREF const testing::internal::FilePath *v29; // [rsp+190h] [rbp-18h] const testing::internal::FilePath *v30; // [rsp+198h] [rbp-10h] testing::internal::FilePath *v31; // [rsp+1A0h] [rbp-8h] v31 = this; v30 = a2; v29 = a3; v28 = a4; v27 = a5; std::string::basic_string(v26); if ( v28 ) { v15 = testing::internal::FilePath::string[abi:cxx11](v29); std::operator+<char>(v20, v15, (long long)"_"); testing::internal::StreamableToString<int>((unsigned int)v19, (unsigned int)&v28, v5, v6, v7, v8); std::operator+<char>((long long)v21, (long long)v20, (long long)v19); std::operator+<char>((long long)v22, (long long)v21, (long long)"."); std::operator+<char>((long long)v23, (long long)v22, (long long)v27); std::string::operator=(v26, v23); std::string::~string(v23); std::string::~string(v22); std::string::~string(v21); std::string::~string(v19); std::string::~string(v20); } else { v16 = testing::internal::FilePath::string[abi:cxx11](v29); std::operator+<char>(v24, v16, (long long)"."); std::operator+<char>((long long)v25, (long long)v24, (long long)v27); std::string::operator=(v26, v25); std::string::~string(v25); std::string::~string(v24); } v14 = v30; std::string::basic_string(v17, (long long)v26); testing::internal::FilePath::FilePath((unsigned int)v18, (unsigned int)v17, v9, v10, v11, v12); testing::internal::FilePath::ConcatPaths(this, v14, (const testing::internal::FilePath *)v18); testing::internal::FilePath::~FilePath((testing::internal::FilePath *)v18); std::string::~string(v17); std::string::~string(v26); return this; }
MakeFileName: SUB RSP,0x1a8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x1a0],RDI MOV qword ptr [RSP + 0x198],RSI MOV qword ptr [RSP + 0x190],RDX MOV dword ptr [RSP + 0x18c],ECX MOV qword ptr [RSP + 0x180],R8 LEA RDI,[RSP + 0x160] CALL 0x00120ad0 CMP dword ptr [RSP + 0x18c],0x0 JNZ 0x001b6d47 MOV RDI,qword ptr [RSP + 0x190] LAB_001b6c8e: CALL 0x001e3480 MOV qword ptr [RSP + 0x18],RAX JMP 0x001b6c9a LAB_001b6c9a: MOV RSI,qword ptr [RSP + 0x18] LEA RDX,[0x213e34] LEA RDI,[RSP + 0x120] CALL 0x0018bfc0 JMP 0x001b6cb5 LAB_001b6cb5: MOV RDX,qword ptr [RSP + 0x180] LAB_001b6cbd: LEA RDI,[RSP + 0x140] LEA RSI,[RSP + 0x120] CALL 0x00139e60 JMP 0x001b6cd4 LAB_001b6cd4: LEA RDI,[RSP + 0x160] LEA RSI,[RSP + 0x140] CALL 0x001386f0 LEA RDI,[RSP + 0x140] CALL 0x0011aac0 LEA RDI,[RSP + 0x120] CALL 0x0011aac0 JMP 0x001b6ec7 LAB_001b6d47: MOV RDI,qword ptr [RSP + 0x190] LAB_001b6d4f: CALL 0x001e3480 MOV qword ptr [RSP + 0x10],RAX JMP 0x001b6d5b LAB_001b6d5b: MOV RSI,qword ptr [RSP + 0x10] LEA RDX,[0x212bd3] LEA RDI,[RSP + 0x90] CALL 0x0018bfc0 JMP 0x001b6d76 LAB_001b6d76: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x18c] CALL 0x001e2830 JMP 0x001b6d8a LAB_001b6d8a: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x70] CALL 0x0018bed0 JMP 0x001b6da6 LAB_001b6da6: LEA RDX,[0x213e34] LEA RDI,[RSP + 0xd0] LEA RSI,[RSP + 0xb0] CALL 0x00139e60 JMP 0x001b6dc4 LAB_001b6dc4: MOV RDX,qword ptr [RSP + 0x180] LAB_001b6dcc: LEA RDI,[RSP + 0xf0] LEA RSI,[RSP + 0xd0] CALL 0x00139e60 JMP 0x001b6de3 LAB_001b6de3: LEA RDI,[RSP + 0x160] LEA RSI,[RSP + 0xf0] CALL 0x001386f0 LEA RDI,[RSP + 0xf0] CALL 0x0011aac0 LEA RDI,[RSP + 0xd0] CALL 0x0011aac0 LEA RDI,[RSP + 0xb0] CALL 0x0011aac0 LEA RDI,[RSP + 0x70] CALL 0x0011aac0 LEA RDI,[RSP + 0x90] CALL 0x0011aac0 JMP 0x001b6ec7 LAB_001b6ec7: MOV RAX,qword ptr [RSP + 0x198] MOV qword ptr [RSP + 0x8],RAX LAB_001b6ed4: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x160] CALL 0x00139160 JMP 0x001b6ee8 LAB_001b6ee8: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x30] CALL 0x001e3380 JMP 0x001b6ef9 LAB_001b6ef9: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x20] LEA RDX,[RSP + 0x50] CALL 0x001b6fa0 LAB_001b6f0d: JMP 0x001b6f0f LAB_001b6f0f: LEA RDI,[RSP + 0x50] CALL 0x001e3490 LEA RDI,[RSP + 0x30] CALL 0x0011aac0 LEA RDI,[RSP + 0x160] CALL 0x0011aac0 MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0x1a8 RET
/* testing::internal::FilePath::MakeFileName(testing::internal::FilePath const&, testing::internal::FilePath const&, int, char const*) */ FilePath * __thiscall testing::internal::FilePath::MakeFileName (FilePath *this,FilePath *param_1,FilePath *param_2,int param_3,char *param_4) { FilePath *pFVar1; char *pcVar2; string local_178 [32]; FilePath local_158 [32]; internal local_138 [32]; string local_118 [32]; string local_f8 [32]; string local_d8 [32]; string local_b8 [48]; string local_88 [32]; string local_68 [32]; string local_48 [32]; char *local_28; int local_1c; FilePath *local_18; FilePath *local_10; FilePath *local_8; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; std::__cxx11::string::string(local_48); if (local_1c == 0) { /* try { // try from 001b6c8e to 001b6cb2 has its CatchHandler @ 001b6d08 */ pcVar2 = (char *)string_abi_cxx11_(local_18); std::operator+(local_88,pcVar2); /* try { // try from 001b6cbd to 001b6cd1 has its CatchHandler @ 001b6d21 */ std::operator+(local_68,(char *)local_88); std::__cxx11::string::operator=(local_48,local_68); std::__cxx11::string::~string(local_68); std::__cxx11::string::~string(local_88); } else { /* try { // try from 001b6d4f to 001b6d73 has its CatchHandler @ 001b6d08 */ pcVar2 = (char *)string_abi_cxx11_(local_18); std::operator+(local_118,pcVar2); /* try { // try from 001b6d76 to 001b6d87 has its CatchHandler @ 001b6e3b */ StreamableToString<int>(local_138,&local_1c); /* try { // try from 001b6d8a to 001b6da3 has its CatchHandler @ 001b6e51 */ std::operator+(local_f8,local_118); /* try { // try from 001b6da6 to 001b6dc1 has its CatchHandler @ 001b6e67 */ std::operator+(local_d8,(char *)local_f8); /* try { // try from 001b6dcc to 001b6de0 has its CatchHandler @ 001b6e7d */ std::operator+(local_b8,(char *)local_d8); std::__cxx11::string::operator=(local_48,local_b8); std::__cxx11::string::~string(local_b8); std::__cxx11::string::~string(local_d8); std::__cxx11::string::~string(local_f8); std::__cxx11::string::~string((string *)local_138); std::__cxx11::string::~string(local_118); } pFVar1 = local_10; /* try { // try from 001b6ed4 to 001b6ee5 has its CatchHandler @ 001b6d08 */ std::__cxx11::string::string(local_178,local_48); /* try { // try from 001b6ee8 to 001b6ef6 has its CatchHandler @ 001b6f3d */ FilePath(local_158,local_178); /* try { // try from 001b6ef9 to 001b6f0c has its CatchHandler @ 001b6f53 */ ConcatPaths(this,pFVar1,local_158); ~FilePath(local_158); std::__cxx11::string::~string(local_178); std::__cxx11::string::~string(local_48); return this; }
48,450
mz_zip_reader_init
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint flags) { if ((!pZip) || (!pZip->m_pRead)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; pZip->m_zip_type = MZ_ZIP_TYPE_USER; pZip->m_archive_size = size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end_internal(pZip, MZ_FALSE); return MZ_FALSE; } return MZ_TRUE; }
O0
c
mz_zip_reader_init: subq $0x28, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movl %edx, 0x4(%rsp) cmpq $0x0, 0x10(%rsp) je 0xfdfe6 movq 0x10(%rsp), %rax cmpq $0x0, 0x48(%rax) jne 0xfe016 movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movl $0x18, 0x1c(%rsp) cmpq $0x0, 0x20(%rsp) je 0xfe00c movl 0x1c(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, 0x1c(%rax) movl $0x0, 0x18(%rsp) jmp 0xfe07d movq 0x10(%rsp), %rdi movl 0x4(%rsp), %esi callq 0xfe090 cmpl $0x0, %eax jne 0xfe033 movl $0x0, 0x18(%rsp) jmp 0xfe07d movq 0x10(%rsp), %rax movl $0x1, 0x18(%rax) movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, (%rax) movq 0x10(%rsp), %rdi movl 0x4(%rsp), %esi callq 0xfe270 cmpl $0x0, %eax jne 0xfe075 movq 0x10(%rsp), %rdi xorl %esi, %esi callq 0xfddc0 movl $0x0, 0x18(%rsp) jmp 0xfe07d movl $0x1, 0x18(%rsp) movl 0x18(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
mz_zip_reader_init: sub rsp, 28h mov [rsp+28h+var_18], rdi mov [rsp+28h+var_20], rsi mov [rsp+28h+var_24], edx cmp [rsp+28h+var_18], 0 jz short loc_FDFE6 mov rax, [rsp+28h+var_18] cmp qword ptr [rax+48h], 0 jnz short loc_FE016 loc_FDFE6: mov rax, [rsp+28h+var_18] mov [rsp+28h+var_8], rax mov [rsp+28h+var_C], 18h cmp [rsp+28h+var_8], 0 jz short loc_FE00C mov ecx, [rsp+28h+var_C] mov rax, [rsp+28h+var_8] mov [rax+1Ch], ecx loc_FE00C: mov [rsp+28h+var_10], 0 jmp short loc_FE07D loc_FE016: mov rdi, [rsp+28h+var_18] mov esi, [rsp+28h+var_24] call mz_zip_reader_init_internal cmp eax, 0 jnz short loc_FE033 mov [rsp+28h+var_10], 0 jmp short loc_FE07D loc_FE033: mov rax, [rsp+28h+var_18] mov dword ptr [rax+18h], 1 mov rcx, [rsp+28h+var_20] mov rax, [rsp+28h+var_18] mov [rax], rcx mov rdi, [rsp+28h+var_18] mov esi, [rsp+28h+var_24] call mz_zip_reader_read_central_dir cmp eax, 0 jnz short loc_FE075 mov rdi, [rsp+28h+var_18] xor esi, esi call mz_zip_reader_end_internal mov [rsp+28h+var_10], 0 jmp short loc_FE07D loc_FE075: mov [rsp+28h+var_10], 1 loc_FE07D: mov eax, [rsp+28h+var_10] add rsp, 28h retn
long long mz_zip_reader_init(long long a1, long long a2, unsigned int a3) { if ( a1 && *(_QWORD *)(a1 + 72) ) { if ( (unsigned int)mz_zip_reader_init_internal(a1, a3) ) { *(_DWORD *)(a1 + 24) = 1; *(_QWORD *)a1 = a2; if ( (unsigned int)mz_zip_reader_read_central_dir(a1, a3) ) { return 1; } else { mz_zip_reader_end_internal(a1, 0); return 0; } } else { return 0; } } else { if ( a1 ) *(_DWORD *)(a1 + 28) = 24; return 0; } }
mz_zip_reader_init: SUB RSP,0x28 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV dword ptr [RSP + 0x4],EDX CMP qword ptr [RSP + 0x10],0x0 JZ 0x001fdfe6 MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x001fe016 LAB_001fdfe6: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x1c],0x18 CMP qword ptr [RSP + 0x20],0x0 JZ 0x001fe00c MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX + 0x1c],ECX LAB_001fe00c: MOV dword ptr [RSP + 0x18],0x0 JMP 0x001fe07d LAB_001fe016: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0x4] CALL 0x001fe090 CMP EAX,0x0 JNZ 0x001fe033 MOV dword ptr [RSP + 0x18],0x0 JMP 0x001fe07d LAB_001fe033: MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x18],0x1 MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0x4] CALL 0x001fe270 CMP EAX,0x0 JNZ 0x001fe075 MOV RDI,qword ptr [RSP + 0x10] XOR ESI,ESI CALL 0x001fddc0 MOV dword ptr [RSP + 0x18],0x0 JMP 0x001fe07d LAB_001fe075: MOV dword ptr [RSP + 0x18],0x1 LAB_001fe07d: MOV EAX,dword ptr [RSP + 0x18] ADD RSP,0x28 RET
int4 mz_zip_reader_init(int8 *param_1,int8 param_2,int4 param_3) { int iVar1; int4 local_10; if ((param_1 == (int8 *)0x0) || (param_1[9] == 0)) { if (param_1 != (int8 *)0x0) { *(int4 *)((long)param_1 + 0x1c) = 0x18; } local_10 = 0; } else { iVar1 = mz_zip_reader_init_internal(param_1,param_3); if (iVar1 == 0) { local_10 = 0; } else { *(int4 *)(param_1 + 3) = 1; *param_1 = param_2; iVar1 = mz_zip_reader_read_central_dir(param_1,param_3); if (iVar1 == 0) { mz_zip_reader_end_internal(param_1,0); local_10 = 0; } else { local_10 = 1; } } } return local_10; }
48,451
mz_zip_reader_init
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint flags) { if ((!pZip) || (!pZip->m_pRead)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; pZip->m_zip_type = MZ_ZIP_TYPE_USER; pZip->m_archive_size = size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end_internal(pZip, MZ_FALSE); return MZ_FALSE; } return MZ_TRUE; }
O3
c
mz_zip_reader_init: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax xorl %ebx, %ebx testq %rdi, %rdi je 0x82603 movq %rdi, %r14 cmpq $0x0, 0x48(%rdi) je 0x825fb movl %edx, %ebp movq %rsi, %r15 movq %r14, %rdi movl %edx, %esi callq 0x82610 testl %eax, %eax je 0x82603 movl $0x1, 0x18(%r14) movq %r15, (%r14) movq %r14, %rdi movl %ebp, %esi callq 0x826e7 movl $0x1, %ebx testl %eax, %eax jne 0x82603 xorl %ebx, %ebx movq %r14, %rdi xorl %esi, %esi callq 0x824b0 jmp 0x82603 movl $0x18, 0x1c(%r14) movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mz_zip_reader_init: push rbp push r15 push r14 push rbx push rax xor ebx, ebx test rdi, rdi jz short loc_82603 mov r14, rdi cmp qword ptr [rdi+48h], 0 jz short loc_825FB mov ebp, edx mov r15, rsi mov rdi, r14 mov esi, edx call mz_zip_reader_init_internal test eax, eax jz short loc_82603 mov dword ptr [r14+18h], 1 mov [r14], r15 mov rdi, r14 mov esi, ebp call mz_zip_reader_read_central_dir mov ebx, 1 test eax, eax jnz short loc_82603 xor ebx, ebx mov rdi, r14 xor esi, esi call mz_zip_reader_end_internal jmp short loc_82603 loc_825FB: mov dword ptr [r14+1Ch], 18h loc_82603: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mz_zip_reader_init(long long a1, long long a2, unsigned int a3) { unsigned int v3; // ebx v3 = 0; if ( a1 ) { if ( *(_QWORD *)(a1 + 72) ) { if ( (unsigned int)mz_zip_reader_init_internal(a1, a3) ) { *(_DWORD *)(a1 + 24) = 1; *(_QWORD *)a1 = a2; v3 = 1; if ( !(unsigned int)mz_zip_reader_read_central_dir(a1, a3) ) { v3 = 0; mz_zip_reader_end_internal(a1, 0); } } } else { *(_DWORD *)(a1 + 28) = 24; } } return v3; }
48,452
mysql_stmt_attr_get
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) { switch (attr_type) { case STMT_ATTR_STATE: *(enum mysql_stmt_state *)value= stmt->state; break; case STMT_ATTR_UPDATE_MAX_LENGTH: *(my_bool *)value= stmt->update_max_length; break; case STMT_ATTR_CURSOR_TYPE: *(unsigned long *)value= stmt->flags; break; case STMT_ATTR_PREFETCH_ROWS: *(unsigned long *)value= stmt->prefetch_rows; break; case STMT_ATTR_PREBIND_PARAMS: *(unsigned int *)value= stmt->prebind_params; break; case STMT_ATTR_ARRAY_SIZE: *(unsigned int *)value= stmt->array_size; break; case STMT_ATTR_ROW_SIZE: *(size_t *)value= stmt->row_size; break; case STMT_ATTR_CB_USER_DATA: *((void **)value) = stmt->user_data; break; default: return(1); } return(0); }
O0
c
mysql_stmt_attr_get: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) testl %eax, %eax je 0x28ef8 jmp 0x28e7b movl -0x24(%rbp), %eax subl $0x1, %eax je 0x28f0a jmp 0x28e89 movl -0x24(%rbp), %eax subl $0x2, %eax je 0x28f1b jmp 0x28e97 movl -0x24(%rbp), %eax subl $0xc8, %eax je 0x28f2f jmp 0x28ea7 movl -0x24(%rbp), %eax subl $0xc9, %eax je 0x28f41 jmp 0x28eb7 movl -0x24(%rbp), %eax subl $0xca, %eax je 0x28f53 jmp 0x28ec7 movl -0x24(%rbp), %eax subl $0xcb, %eax je 0x28ee6 jmp 0x28ed3 movl -0x24(%rbp), %eax subl $0xcc, %eax je 0x28f67 jmp 0x28f7b movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) jmp 0x28f81 movq -0x10(%rbp), %rax movb 0x313(%rax), %cl movq -0x20(%rbp), %rax movb %cl, (%rax) jmp 0x28f81 movq -0x10(%rbp), %rax movq 0x48(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) jmp 0x28f81 movq -0x10(%rbp), %rax movq 0x318(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) jmp 0x28f81 movq -0x10(%rbp), %rax movl 0x378(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) jmp 0x28f81 movq -0x10(%rbp), %rax movl 0x368(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) jmp 0x28f81 movq -0x10(%rbp), %rax movq 0x370(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) jmp 0x28f81 movq -0x10(%rbp), %rax movq 0x380(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) jmp 0x28f81 movb $0x1, -0x1(%rbp) jmp 0x28f85 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopw (%rax,%rax)
mysql_stmt_attr_get: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov eax, [rbp+var_14] mov [rbp+var_24], eax test eax, eax jz short loc_28EF8 jmp short $+2 loc_28E7B: mov eax, [rbp+var_24] sub eax, 1 jz loc_28F0A jmp short $+2 loc_28E89: mov eax, [rbp+var_24] sub eax, 2 jz loc_28F1B jmp short $+2 loc_28E97: mov eax, [rbp+var_24] sub eax, 0C8h jz loc_28F2F jmp short $+2 loc_28EA7: mov eax, [rbp+var_24] sub eax, 0C9h jz loc_28F41 jmp short $+2 loc_28EB7: mov eax, [rbp+var_24] sub eax, 0CAh jz loc_28F53 jmp short $+2 loc_28EC7: mov eax, [rbp+var_24] sub eax, 0CBh jz short loc_28EE6 jmp short $+2 loc_28ED3: mov eax, [rbp+var_24] sub eax, 0CCh jz loc_28F67 jmp loc_28F7B loc_28EE6: mov rax, [rbp+var_10] mov ecx, [rax+50h] mov rax, [rbp+var_20] mov [rax], ecx jmp loc_28F81 loc_28EF8: mov rax, [rbp+var_10] mov cl, [rax+313h] mov rax, [rbp+var_20] mov [rax], cl jmp short loc_28F81 loc_28F0A: mov rax, [rbp+var_10] mov rcx, [rax+48h] mov rax, [rbp+var_20] mov [rax], rcx jmp short loc_28F81 loc_28F1B: mov rax, [rbp+var_10] mov rcx, [rax+318h] mov rax, [rbp+var_20] mov [rax], rcx jmp short loc_28F81 loc_28F2F: mov rax, [rbp+var_10] mov ecx, [rax+378h] mov rax, [rbp+var_20] mov [rax], ecx jmp short loc_28F81 loc_28F41: mov rax, [rbp+var_10] mov ecx, [rax+368h] mov rax, [rbp+var_20] mov [rax], ecx jmp short loc_28F81 loc_28F53: mov rax, [rbp+var_10] mov rcx, [rax+370h] mov rax, [rbp+var_20] mov [rax], rcx jmp short loc_28F81 loc_28F67: mov rax, [rbp+var_10] mov rcx, [rax+380h] mov rax, [rbp+var_20] mov [rax], rcx jmp short loc_28F81 loc_28F7B: mov [rbp+var_1], 1 jmp short loc_28F85 loc_28F81: mov [rbp+var_1], 0 loc_28F85: mov al, [rbp+var_1] pop rbp retn
char mysql_stmt_attr_get(long long a1, int a2, _BYTE *a3) { switch ( a2 ) { case 0: *a3 = *(_BYTE *)(a1 + 787); return 0; case 1: *(_QWORD *)a3 = *(_QWORD *)(a1 + 72); return 0; case 2: *(_QWORD *)a3 = *(_QWORD *)(a1 + 792); return 0; case 200: *(_DWORD *)a3 = *(_DWORD *)(a1 + 888); return 0; case 201: *(_DWORD *)a3 = *(_DWORD *)(a1 + 872); return 0; case 202: *(_QWORD *)a3 = *(_QWORD *)(a1 + 880); return 0; case 203: *(_DWORD *)a3 = *(_DWORD *)(a1 + 80); return 0; case 204: *(_QWORD *)a3 = *(_QWORD *)(a1 + 896); return 0; } return 1; }
mysql_stmt_attr_get: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX TEST EAX,EAX JZ 0x00128ef8 JMP 0x00128e7b LAB_00128e7b: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x1 JZ 0x00128f0a JMP 0x00128e89 LAB_00128e89: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x2 JZ 0x00128f1b JMP 0x00128e97 LAB_00128e97: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xc8 JZ 0x00128f2f JMP 0x00128ea7 LAB_00128ea7: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xc9 JZ 0x00128f41 JMP 0x00128eb7 LAB_00128eb7: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xca JZ 0x00128f53 JMP 0x00128ec7 LAB_00128ec7: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xcb JZ 0x00128ee6 JMP 0x00128ed3 LAB_00128ed3: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xcc JZ 0x00128f67 JMP 0x00128f7b LAB_00128ee6: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX JMP 0x00128f81 LAB_00128ef8: MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x313] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL JMP 0x00128f81 LAB_00128f0a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX JMP 0x00128f81 LAB_00128f1b: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x318] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX JMP 0x00128f81 LAB_00128f2f: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x378] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX JMP 0x00128f81 LAB_00128f41: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x368] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX JMP 0x00128f81 LAB_00128f53: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x370] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX JMP 0x00128f81 LAB_00128f67: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x380] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX JMP 0x00128f81 LAB_00128f7b: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00128f85 LAB_00128f81: MOV byte ptr [RBP + -0x1],0x0 LAB_00128f85: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 mysql_stmt_attr_get(long param_1,int param_2,int8 *param_3) { if (param_2 == 0) { *(int1 *)param_3 = *(int1 *)(param_1 + 0x313); } else if (param_2 == 1) { *param_3 = *(int8 *)(param_1 + 0x48); } else if (param_2 == 2) { *param_3 = *(int8 *)(param_1 + 0x318); } else if (param_2 == 200) { *(int4 *)param_3 = *(int4 *)(param_1 + 0x378); } else if (param_2 == 0xc9) { *(int4 *)param_3 = *(int4 *)(param_1 + 0x368); } else if (param_2 == 0xca) { *param_3 = *(int8 *)(param_1 + 0x370); } else if (param_2 == 0xcb) { *(int4 *)param_3 = *(int4 *)(param_1 + 0x50); } else { if (param_2 != 0xcc) { return 1; } *param_3 = *(int8 *)(param_1 + 0x380); } return 0; }
48,453
my_thread_destroy_common_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_common_mutex(void) { mysql_mutex_destroy(&THR_LOCK_open); mysql_mutex_destroy(&THR_LOCK_lock); mysql_mutex_destroy(&THR_LOCK_myisam); mysql_mutex_destroy(&THR_LOCK_myisam_mmap); mysql_mutex_destroy(&THR_LOCK_heap); mysql_mutex_destroy(&THR_LOCK_net); mysql_mutex_destroy(&THR_LOCK_charset); #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) mysql_mutex_destroy(&LOCK_localtime_r); #endif }
O3
c
my_thread_destroy_common_mutex: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x35c25f(%rip), %rbx # 0x3bf170 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x62f2f leaq 0x2daf87(%rip), %rax # 0x33dea8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x35c23a(%rip), %rdi # 0x3bf170 callq 0x360f0 leaq 0x35c276(%rip), %rbx # 0x3bf1b8 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x62f60 leaq 0x2daf56(%rip), %rax # 0x33dea8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x35c251(%rip), %rdi # 0x3bf1b8 callq 0x360f0 leaq 0x35c28d(%rip), %rbx # 0x3bf200 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x62f91 leaq 0x2daf25(%rip), %rax # 0x33dea8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x35c268(%rip), %rdi # 0x3bf200 callq 0x360f0 leaq 0x35c2a4(%rip), %rbx # 0x3bf248 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x62fc2 leaq 0x2daef4(%rip), %rax # 0x33dea8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x35c27f(%rip), %rdi # 0x3bf248 callq 0x360f0 leaq 0x35c2bb(%rip), %rbx # 0x3bf290 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x62ff3 leaq 0x2daec3(%rip), %rax # 0x33dea8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x35c296(%rip), %rdi # 0x3bf290 callq 0x360f0 leaq 0x35c2d2(%rip), %rbx # 0x3bf2d8 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x63024 leaq 0x2dae92(%rip), %rax # 0x33dea8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x35c2ad(%rip), %rdi # 0x3bf2d8 callq 0x360f0 leaq 0x35c2e9(%rip), %rbx # 0x3bf320 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x63055 leaq 0x2dae61(%rip), %rax # 0x33dea8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x35c2c4(%rip), %rdi # 0x3bf320 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x360f0
my_thread_destroy_common_mutex: push rbp mov rbp, rsp push rbx push rax lea rbx, THR_LOCK_open mov rdi, [rbx+40h] test rdi, rdi jz short loc_62F2F lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_62F2F: lea rdi, THR_LOCK_open call _pthread_mutex_destroy lea rbx, THR_LOCK_lock mov rdi, [rbx+40h] test rdi, rdi jz short loc_62F60 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_62F60: lea rdi, THR_LOCK_lock call _pthread_mutex_destroy lea rbx, THR_LOCK_myisam mov rdi, [rbx+40h] test rdi, rdi jz short loc_62F91 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_62F91: lea rdi, THR_LOCK_myisam call _pthread_mutex_destroy lea rbx, THR_LOCK_myisam_mmap mov rdi, [rbx+40h] test rdi, rdi jz short loc_62FC2 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_62FC2: lea rdi, THR_LOCK_myisam_mmap call _pthread_mutex_destroy lea rbx, THR_LOCK_heap mov rdi, [rbx+40h] test rdi, rdi jz short loc_62FF3 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_62FF3: lea rdi, THR_LOCK_heap call _pthread_mutex_destroy lea rbx, THR_LOCK_net mov rdi, [rbx+40h] test rdi, rdi jz short loc_63024 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_63024: lea rdi, THR_LOCK_net call _pthread_mutex_destroy lea rbx, THR_LOCK_charset mov rdi, [rbx+40h] test rdi, rdi jz short loc_63055 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_63055: lea rdi, THR_LOCK_charset add rsp, 8 pop rbx pop rbp jmp _pthread_mutex_destroy
long long my_thread_destroy_common_mutex() { long long v0; // rdi long long v1; // rdi long long v2; // rdi long long v3; // rdi long long v4; // rdi long long v5; // rdi long long v6; // rdi v0 = THR_LOCK_open[8]; if ( v0 ) { (*((void ( **)(long long))PSI_server + 9))(v0); THR_LOCK_open[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_open); v1 = THR_LOCK_lock[8]; if ( v1 ) { (*((void ( **)(long long))PSI_server + 9))(v1); THR_LOCK_lock[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_lock); v2 = THR_LOCK_myisam[8]; if ( v2 ) { (*((void ( **)(long long))PSI_server + 9))(v2); THR_LOCK_myisam[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_myisam); v3 = THR_LOCK_myisam_mmap[8]; if ( v3 ) { (*((void ( **)(long long))PSI_server + 9))(v3); THR_LOCK_myisam_mmap[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_myisam_mmap); v4 = THR_LOCK_heap[8]; if ( v4 ) { (*((void ( **)(long long))PSI_server + 9))(v4); THR_LOCK_heap[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_heap); v5 = THR_LOCK_net[8]; if ( v5 ) { (*((void ( **)(long long))PSI_server + 9))(v5); THR_LOCK_net[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_net); v6 = THR_LOCK_charset[8]; if ( v6 ) { (*((void ( **)(long long))PSI_server + 9))(v6); THR_LOCK_charset[8] = 0LL; } return pthread_mutex_destroy(THR_LOCK_charset); }
my_thread_destroy_common_mutex: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x4bf170] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00162f2f LEA RAX,[0x43dea8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00162f2f: LEA RDI,[0x4bf170] CALL 0x001360f0 LEA RBX,[0x4bf1b8] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00162f60 LEA RAX,[0x43dea8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00162f60: LEA RDI,[0x4bf1b8] CALL 0x001360f0 LEA RBX,[0x4bf200] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00162f91 LEA RAX,[0x43dea8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00162f91: LEA RDI,[0x4bf200] CALL 0x001360f0 LEA RBX,[0x4bf248] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00162fc2 LEA RAX,[0x43dea8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00162fc2: LEA RDI,[0x4bf248] CALL 0x001360f0 LEA RBX,[0x4bf290] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00162ff3 LEA RAX,[0x43dea8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00162ff3: LEA RDI,[0x4bf290] CALL 0x001360f0 LEA RBX,[0x4bf2d8] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00163024 LEA RAX,[0x43dea8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00163024: LEA RDI,[0x4bf2d8] CALL 0x001360f0 LEA RBX,[0x4bf320] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00163055 LEA RAX,[0x43dea8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00163055: LEA RDI,[0x4bf320] ADD RSP,0x8 POP RBX POP RBP JMP 0x001360f0
void my_thread_destroy_common_mutex(void) { if (THR_LOCK_open._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_open._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_open); if (THR_LOCK_lock._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_lock._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_lock); if (THR_LOCK_myisam._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_myisam._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam); if (THR_LOCK_myisam_mmap._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_myisam_mmap._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_myisam_mmap); if (THR_LOCK_heap._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_heap._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_heap); if (THR_LOCK_net._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_net._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_net); if (THR_LOCK_charset._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_charset._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_charset); return; }
48,454
lunasvg::parseDashArray(std::basic_string_view<char, std::char_traits<char>>)
dmazzella[P]pylunasvg/lunasvg/source/svglayoutstate.cpp
static LengthList parseDashArray(std::string_view input) { if(input.compare("none") == 0) return LengthList(); LengthList values; do { size_t count = 0; while(count < input.length() && input[count] != ',' && !IS_WS(input[count])) ++count; Length value(0, LengthUnits::None); if(!value.parse(input.substr(0, count), LengthNegativeMode::Forbid)) return LengthList(); input.remove_prefix(count); values.push_back(std::move(value)); } while(skipOptionalSpacesOrComma(input)); return values; }
O0
cpp
lunasvg::parseDashArray(std::basic_string_view<char, std::char_traits<char>>): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x78(%rbp) movq %rdi, %rax movq %rax, -0x70(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x10(%rbp) leaq -0x18(%rbp), %rdi leaq 0x5b2a7(%rip), %rsi # 0x8ca94 callq 0x33000 cmpl $0x0, %eax jne 0x31815 movq -0x78(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0xb1d0 movq -0x78(%rbp), %rdi callq 0x22f30 jmp 0x3199f leaq -0x30(%rbp), %rdi callq 0x22f30 movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x88(%rbp) leaq -0x18(%rbp), %rdi callq 0x23210 movq -0x88(%rbp), %rcx movq %rax, %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x79(%rbp) jae 0x31882 movq -0x38(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0x33e60 movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x2c, %ecx movb %al, -0x79(%rbp) je 0x31882 movq -0x38(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0x33e60 movsbl (%rax), %edi callq 0x33220 xorb $-0x1, %al movb %al, -0x79(%rbp) movb -0x79(%rbp), %al testb $0x1, %al jne 0x3188b jmp 0x31899 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x31826 leaq -0x40(%rbp), %rdi xorps %xmm0, %xmm0 xorl %esi, %esi callq 0x22d90 jmp 0x318a9 movq -0x38(%rbp), %rdx xorl %eax, %eax movl %eax, %esi leaq -0x18(%rbp), %rdi callq 0x20660 movq %rdx, -0x98(%rbp) movq %rax, -0x90(%rbp) jmp 0x318ca movq -0x98(%rbp), %rax movq -0x90(%rbp), %rcx movq %rcx, -0x60(%rbp) movq %rax, -0x58(%rbp) movq -0x60(%rbp), %rsi movq -0x58(%rbp), %rdx leaq -0x40(%rbp), %rdi movl $0x1, %ecx callq 0x49610 movb %al, -0x99(%rbp) jmp 0x318fe movb -0x99(%rbp), %al testb $0x1, %al jne 0x31943 jmp 0x3190a movq -0x78(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0xb1d0 movq -0x78(%rbp), %rdi callq 0x22f30 movl $0x1, -0x64(%rbp) jmp 0x31996 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x30(%rbp), %rdi callq 0x225d0 jmp 0x319ac movq -0x38(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0x231b0 leaq -0x30(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x33f40 jmp 0x3195f jmp 0x31961 leaq -0x18(%rbp), %rdi callq 0x33f70 movb %al, -0x9a(%rbp) jmp 0x31972 movb -0x9a(%rbp), %al testb $0x1, %al jne 0x3181e jmp 0x31982 movq -0x78(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x33fa0 movl $0x1, -0x64(%rbp) leaq -0x30(%rbp), %rdi callq 0x225d0 movq -0x70(%rbp), %rax addq $0xa0, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0xb6c0 nopw %cs:(%rax,%rax)
_ZN7lunasvgL14parseDashArrayESt17basic_string_viewIcSt11char_traitsIcEE: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_78], rdi mov rax, rdi mov [rbp+var_70], rax mov [rbp+var_8], rdi mov [rbp+var_18], rsi mov [rbp+var_10], rdx lea rdi, [rbp+var_18] lea rsi, aNone; "none" call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE7compareEPKc; std::string_view::compare(char const*) cmp eax, 0 jnz short loc_31815 mov rdi, [rbp+var_78] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_78] call _ZNSt6vectorIN7lunasvg6LengthESaIS1_EEC2Ev; std::vector<lunasvg::Length>::vector(void) jmp loc_3199F loc_31815: lea rdi, [rbp+var_30] call _ZNSt6vectorIN7lunasvg6LengthESaIS1_EEC2Ev; std::vector<lunasvg::Length>::vector(void) loc_3181E: mov qword ptr [rbp+var_38], 0 loc_31826: mov rax, qword ptr [rbp+var_38] mov [rbp+var_88], rax lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void) mov rcx, [rbp+var_88] mov rdx, rax xor eax, eax cmp rcx, rdx mov [rbp+var_79], al jnb short loc_31882 mov rsi, qword ptr [rbp+var_38] lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEEixEm; std::string_view::operator[](ulong) movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 2Ch ; ',' mov [rbp+var_79], al jz short loc_31882 mov rsi, qword ptr [rbp+var_38]; int lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEEixEm; std::string_view::operator[](ulong) movsx edi, byte ptr [rax]; this call _ZN7lunasvg5IS_WSEi; lunasvg::IS_WS(int) xor al, 0FFh mov [rbp+var_79], al loc_31882: mov al, [rbp+var_79] test al, 1 jnz short loc_3188B jmp short loc_31899 loc_3188B: mov rax, qword ptr [rbp+var_38] add rax, 1 mov qword ptr [rbp+var_38], rax jmp short loc_31826 loc_31899: lea rdi, [rbp+var_40] xorps xmm0, xmm0 xor esi, esi call _ZN7lunasvg6LengthC2EfNS_11LengthUnitsE; lunasvg::Length::Length(float,lunasvg::LengthUnits) jmp short $+2 loc_318A9: mov rdx, qword ptr [rbp+var_38] xor eax, eax mov esi, eax lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm; std::string_view::substr(ulong,ulong) mov [rbp+var_98], rdx mov [rbp+var_90], rax jmp short $+2 loc_318CA: mov rax, [rbp+var_98] mov rcx, [rbp+var_90] mov [rbp+var_60], rcx mov [rbp+var_58], rax mov rsi, [rbp+var_60] mov rdx, [rbp+var_58] lea rdi, [rbp+var_40] mov ecx, 1 call _ZN7lunasvg6Length5parseESt17basic_string_viewIcSt11char_traitsIcEENS_18LengthNegativeModeE; lunasvg::Length::parse(std::string_view,lunasvg::LengthNegativeMode) mov [rbp+var_99], al jmp short $+2 loc_318FE: mov al, [rbp+var_99] test al, 1 jnz short loc_31943 jmp short $+2 loc_3190A: mov rdi, [rbp+var_78] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_78] call _ZNSt6vectorIN7lunasvg6LengthESaIS1_EEC2Ev; std::vector<lunasvg::Length>::vector(void) mov [rbp+var_64], 1 jmp short loc_31996 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_30] call _ZNSt6vectorIN7lunasvg6LengthESaIS1_EED2Ev; std::vector<lunasvg::Length>::~vector() jmp short loc_319AC loc_31943: mov rsi, qword ptr [rbp+var_38] lea rdi, [rbp+var_18] call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong) lea rdi, [rbp+var_30] lea rsi, [rbp+var_40] call _ZNSt6vectorIN7lunasvg6LengthESaIS1_EE9push_backEOS1_; std::vector<lunasvg::Length>::push_back(lunasvg::Length&&) jmp short $+2 loc_3195F: jmp short $+2 loc_31961: lea rdi, [rbp+var_18] call _ZN7lunasvg25skipOptionalSpacesOrCommaERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpacesOrComma(std::string_view &) mov [rbp+var_9A], al jmp short $+2 loc_31972: mov al, [rbp+var_9A] test al, 1 jnz loc_3181E jmp short $+2 loc_31982: mov rdi, [rbp+var_78] lea rsi, [rbp+var_30] call _ZNSt6vectorIN7lunasvg6LengthESaIS1_EEC2EOS3_; std::vector<lunasvg::Length>::vector(std::vector<lunasvg::Length>&&) mov [rbp+var_64], 1 loc_31996: lea rdi, [rbp+var_30] call _ZNSt6vectorIN7lunasvg6LengthESaIS1_EED2Ev; std::vector<lunasvg::Length>::~vector() loc_3199F: mov rax, [rbp+var_70] add rsp, 0A0h pop rbp retn loc_319AC: mov rdi, [rbp+var_48] call __Unwind_Resume
long long lunasvg::parseDashArray(long long a1, long long a2, long long a3) { int v3; // esi char *v4; // rax long long v5; // rax long long v6; // rdx unsigned long long v8; // [rsp+18h] [rbp-88h] char v9; // [rsp+27h] [rbp-79h] _BYTE v10[8]; // [rsp+60h] [rbp-40h] BYREF int v11[2]; // [rsp+68h] [rbp-38h] long long v12[3]; // [rsp+70h] [rbp-30h] BYREF _QWORD v13[3]; // [rsp+88h] [rbp-18h] BYREF v13[2] = a1; v13[0] = a2; v13[1] = a3; if ( (unsigned int)std::string_view::compare(v13, "none") ) { std::vector<lunasvg::Length>::vector((long long)v12); do { for ( *(_QWORD *)v11 = 0LL; ; ++*(_QWORD *)v11 ) { v8 = *(_QWORD *)v11; v9 = 0; if ( v8 < std::string_view::length((long long)v13) ) { v9 = 0; if ( *(_BYTE *)std::string_view::operator[](v13, *(_QWORD *)v11) != 44 ) { v3 = v11[0]; v4 = (char *)std::string_view::operator[](v13, *(_QWORD *)v11); v9 = ~(unsigned __int8)lunasvg::IS_WS((lunasvg *)(unsigned int)*v4, v3); } } if ( (v9 & 1) == 0 ) break; } lunasvg::Length::Length((long long)v10, 0, 0.0); v5 = std::string_view::substr(v13, 0LL, *(long long *)v11); if ( (lunasvg::Length::parse(v10, v5, v6, 1LL) & 1) == 0 ) { memset(a1, 0LL, 24LL); std::vector<lunasvg::Length>::vector(a1); goto LABEL_14; } std::string_view::remove_prefix(v13, *(long long *)v11); std::vector<lunasvg::Length>::push_back(v12, v10); } while ( (lunasvg::skipOptionalSpacesOrComma(v13) & 1) != 0 ); std::vector<lunasvg::Length>::vector(a1, v12); LABEL_14: std::vector<lunasvg::Length>::~vector(v12); } else { memset(a1, 0LL, 24LL); std::vector<lunasvg::Length>::vector(a1); } return a1; }
parseDashArray: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x78],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x10],RDX LEA RDI,[RBP + -0x18] LEA RSI,[0x18ca94] CALL 0x00133000 CMP EAX,0x0 JNZ 0x00131815 MOV RDI,qword ptr [RBP + -0x78] XOR ESI,ESI MOV EDX,0x18 CALL 0x0010b1d0 MOV RDI,qword ptr [RBP + -0x78] CALL 0x00122f30 JMP 0x0013199f LAB_00131815: LEA RDI,[RBP + -0x30] CALL 0x00122f30 LAB_0013181e: MOV qword ptr [RBP + -0x38],0x0 LAB_00131826: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x88],RAX LEA RDI,[RBP + -0x18] CALL 0x00123210 MOV RCX,qword ptr [RBP + -0x88] MOV RDX,RAX XOR EAX,EAX CMP RCX,RDX MOV byte ptr [RBP + -0x79],AL JNC 0x00131882 MOV RSI,qword ptr [RBP + -0x38] LEA RDI,[RBP + -0x18] CALL 0x00133e60 MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x2c MOV byte ptr [RBP + -0x79],AL JZ 0x00131882 MOV RSI,qword ptr [RBP + -0x38] LEA RDI,[RBP + -0x18] CALL 0x00133e60 MOVSX EDI,byte ptr [RAX] CALL 0x00133220 XOR AL,0xff MOV byte ptr [RBP + -0x79],AL LAB_00131882: MOV AL,byte ptr [RBP + -0x79] TEST AL,0x1 JNZ 0x0013188b JMP 0x00131899 LAB_0013188b: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00131826 LAB_00131899: LEA RDI,[RBP + -0x40] XORPS XMM0,XMM0 XOR ESI,ESI CALL 0x00122d90 JMP 0x001318a9 LAB_001318a9: MOV RDX,qword ptr [RBP + -0x38] XOR EAX,EAX MOV ESI,EAX LEA RDI,[RBP + -0x18] CALL 0x00120660 MOV qword ptr [RBP + -0x98],RDX MOV qword ptr [RBP + -0x90],RAX JMP 0x001318ca LAB_001318ca: MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x60],RCX MOV qword ptr [RBP + -0x58],RAX MOV RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x58] LEA RDI,[RBP + -0x40] MOV ECX,0x1 CALL 0x00149610 LAB_001318f6: MOV byte ptr [RBP + -0x99],AL JMP 0x001318fe LAB_001318fe: MOV AL,byte ptr [RBP + -0x99] TEST AL,0x1 JNZ 0x00131943 JMP 0x0013190a LAB_0013190a: MOV RDI,qword ptr [RBP + -0x78] XOR ESI,ESI MOV EDX,0x18 CALL 0x0010b1d0 MOV RDI,qword ptr [RBP + -0x78] CALL 0x00122f30 MOV dword ptr [RBP + -0x64],0x1 JMP 0x00131996 LAB_00131943: MOV RSI,qword ptr [RBP + -0x38] LEA RDI,[RBP + -0x18] CALL 0x001231b0 LAB_00131950: LEA RDI,[RBP + -0x30] LEA RSI,[RBP + -0x40] CALL 0x00133f40 JMP 0x0013195f LAB_0013195f: JMP 0x00131961 LAB_00131961: LEA RDI,[RBP + -0x18] CALL 0x00133f70 LAB_0013196a: MOV byte ptr [RBP + -0x9a],AL JMP 0x00131972 LAB_00131972: MOV AL,byte ptr [RBP + -0x9a] TEST AL,0x1 JNZ 0x0013181e JMP 0x00131982 LAB_00131982: MOV RDI,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x30] CALL 0x00133fa0 MOV dword ptr [RBP + -0x64],0x1 LAB_00131996: LEA RDI,[RBP + -0x30] CALL 0x001225d0 LAB_0013199f: MOV RAX,qword ptr [RBP + -0x70] ADD RSP,0xa0 POP RBP RET
/* lunasvg::parseDashArray(std::basic_string_view<char, std::char_traits<char> >) */ vector<lunasvg::Length,std::allocator<lunasvg::Length>> * lunasvg::parseDashArray (vector<lunasvg::Length,std::allocator<lunasvg::Length>> *param_1,int8 param_2, int8 param_3) { ulong uVar1; byte bVar2; int iVar3; ulong uVar4; char *pcVar5; int1 auVar6 [16]; byte local_81; Length local_48 [8]; ulong local_40; vector<lunasvg::Length,std::allocator<lunasvg::Length>> local_38 [24]; int8 local_20; int8 local_18; vector<lunasvg::Length,std::allocator<lunasvg::Length>> *local_10; local_20 = param_2; local_18 = param_3; local_10 = param_1; iVar3 = std::basic_string_view<char,std::char_traits<char>>::compare ((basic_string_view<char,std::char_traits<char>> *)&local_20,"none"); if (iVar3 == 0) { memset(param_1,0,0x18); std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::vector(param_1); } else { std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::vector(local_38); do { local_40 = 0; while( true ) { uVar1 = local_40; uVar4 = std::basic_string_view<char,std::char_traits<char>>::length ((basic_string_view<char,std::char_traits<char>> *)&local_20); local_81 = 0; if (uVar1 < uVar4) { pcVar5 = (char *)std::basic_string_view<char,std::char_traits<char>>::operator[] ((basic_string_view<char,std::char_traits<char>> *)&local_20, local_40); local_81 = 0; if (*pcVar5 != ',') { pcVar5 = (char *)std::basic_string_view<char,std::char_traits<char>>::operator[] ((basic_string_view<char,std::char_traits<char>> *)&local_20, local_40); local_81 = IS_WS((int)*pcVar5); local_81 = local_81 ^ 0xff; } } if ((local_81 & 1) == 0) break; local_40 = local_40 + 1; } /* try { // try from 00131899 to 001318f5 has its CatchHandler @ 0013192c */ Length::Length((Length *)0x0,local_48,0); auVar6 = std::basic_string_view<char,std::char_traits<char>>::substr ((basic_string_view<char,std::char_traits<char>> *)&local_20,0,local_40); bVar2 = Length::parse(local_48,auVar6._0_8_,auVar6._8_8_,1); if ((bVar2 & 1) == 0) { memset(param_1,0,0x18); std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::vector(param_1); goto LAB_00131996; } std::basic_string_view<char,std::char_traits<char>>::remove_prefix ((basic_string_view<char,std::char_traits<char>> *)&local_20,local_40); /* try { // try from 00131950 to 00131969 has its CatchHandler @ 0013192c */ std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::push_back(local_38,local_48); bVar2 = skipOptionalSpacesOrComma((basic_string_view *)&local_20); } while ((bVar2 & 1) != 0); std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::vector(param_1,(vector *)local_38) ; LAB_00131996: std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::~vector(local_38); } return param_1; }
48,455
eval_tokens(llama_context*, std::vector<int, std::allocator<int>>, int, int*)
monkey531[P]llama/examples/llava/llava-cli.cpp
static bool eval_tokens(struct llama_context * ctx_llama, std::vector<llama_token> tokens, int n_batch, int * n_past) { int N = (int) tokens.size(); for (int i = 0; i < N; i += n_batch) { int n_eval = (int) tokens.size() - i; if (n_eval > n_batch) { n_eval = n_batch; } if (llama_decode(ctx_llama, llama_batch_get_one(&tokens[i], n_eval))) { LOG_ERR("%s : failed to eval. token %d/%d (batch size %d, n_past %d)\n", __func__, i, N, n_batch, *n_past); return false; } *n_past += n_eval; } return true; }
O3
cpp
eval_tokens(llama_context*, std::vector<int, std::allocator<int>>, int, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rcx, 0x48(%rsp) movq %rdi, 0x68(%rsp) movq 0x8(%rsi), %rax subq (%rsi), %rax shrq $0x2, %rax movq %rax, 0x40(%rsp) testl %eax, %eax jle 0x24179 movl %edx, %ebp movq %rsi, %r12 movslq %edx, %rcx movq 0x40(%rsp), %rax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF movq %rax, 0x58(%rsp) movq %rcx, 0x60(%rsp) leaq (,%rcx,4), %rax movq %rax, 0x50(%rsp) xorl %r15d, %r15d xorl %r14d, %r14d xorl %r13d, %r13d movq (%r12), %rsi movq 0x8(%r12), %rbx subq %rsi, %rbx shrq $0x2, %rbx addl %r15d, %ebx cmpl %ebp, %ebx cmovgel %ebp, %ebx addq %r14, %rsi leaq 0x70(%rsp), %rdi movl %ebx, %edx callq 0x1e100 movq 0xa0(%rsp), %rax movq %rax, 0x30(%rsp) movups 0x70(%rsp), %xmm0 movups 0x80(%rsp), %xmm1 movups 0x90(%rsp), %xmm2 movups %xmm2, 0x20(%rsp) movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq 0x68(%rsp), %rdi callq 0x1e400 testl %eax, %eax jne 0x24132 movq 0x48(%rsp), %rax addl %ebx, (%rax) addq 0x60(%rsp), %r13 addq 0x50(%rsp), %r14 subl %ebp, %r15d cmpq 0x58(%rsp), %r13 jl 0x240b0 jmp 0x24179 leaq 0x133767(%rip), %rax # 0x1578a0 cmpl $0x0, (%rax) js 0x24179 negl %r15d callq 0xef47b movq 0x48(%rsp), %rcx movl (%rcx), %ecx movl %ecx, 0x8(%rsp) movl %ebp, (%rsp) leaq 0xe552d(%rip), %rdx # 0x109688 leaq 0xe5563(%rip), %rcx # 0x1096c5 movq %rax, %rdi movl $0x4, %esi movl %r15d, %r8d movq 0x40(%rsp), %r9 xorl %eax, %eax callq 0xef518 addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZL11eval_tokensP13llama_contextSt6vectorIiSaIiEEiPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov [rsp+0D8h+var_90], rcx mov [rsp+0D8h+var_70], rdi mov rax, [rsi+8] sub rax, [rsi] shr rax, 2 mov [rsp+0D8h+var_98], rax test eax, eax jle loc_24179 mov ebp, edx mov r12, rsi movsxd rcx, edx mov rax, [rsp+0D8h+var_98] and eax, 7FFFFFFFh mov [rsp+0D8h+var_80], rax mov [rsp+0D8h+var_78], rcx lea rax, ds:0[rcx*4] mov [rsp+0D8h+var_88], rax xor r15d, r15d xor r14d, r14d xor r13d, r13d loc_240B0: mov rsi, [r12] mov rbx, [r12+8] sub rbx, rsi shr rbx, 2 add ebx, r15d cmp ebx, ebp cmovge ebx, ebp add rsi, r14 lea rdi, [rsp+0D8h+var_68] mov edx, ebx call _llama_batch_get_one mov rax, [rsp+0D8h+var_38] mov [rsp+0D8h+var_A8], rax movups xmm0, [rsp+0D8h+var_68] movups xmm1, [rsp+0D8h+var_58] movups xmm2, [rsp+0D8h+var_48] movups [rsp+0D8h+var_B8], xmm2 movups [rsp+0D8h+var_C8], xmm1 movups [rsp+0D8h+var_D8], xmm0 mov rdi, [rsp+0D8h+var_70] call _llama_decode test eax, eax jnz short loc_24132 mov rax, [rsp+0D8h+var_90] add [rax], ebx add r13, [rsp+0D8h+var_78] add r14, [rsp+0D8h+var_88] sub r15d, ebp cmp r13, [rsp+0D8h+var_80] jl short loc_240B0 jmp short loc_24179 loc_24132: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_24179 neg r15d call _Z15common_log_mainv; common_log_main(void) mov rcx, [rsp+0D8h+var_90] mov ecx, [rcx] mov dword ptr [rsp+0D8h+var_D8+8], ecx mov dword ptr [rsp+0D8h+var_D8], ebp lea rdx, aSFailedToEvalT; "%s : failed to eval. token %d/%d (batch"... lea rcx, aEvalTokens; "eval_tokens" mov rdi, rax mov esi, 4 mov r8d, r15d mov r9, [rsp+0D8h+var_98] xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_24179: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void * eval_tokens(long long a1, _QWORD *a2, int a3, _DWORD *a4) { void *result; // rax int v7; // r15d long long v8; // r14 long long v9; // r13 unsigned int v10; // ebx long long v11; // rsi long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 int v16; // eax int v17; // [rsp+40h] [rbp-98h] long long v19; // [rsp+50h] [rbp-88h] long long v20; // [rsp+60h] [rbp-78h] _QWORD v21[13]; // [rsp+70h] [rbp-68h] BYREF result = (void *)((a2[1] - *a2) >> 2); v17 = (int)result; if ( (int)result > 0 ) { v20 = a3; v19 = 4LL * a3; v7 = 0; v8 = 0LL; v9 = 0LL; while ( 1 ) { v10 = v7 + ((a2[1] - *a2) >> 2); if ( (int)v10 >= a3 ) v10 = a3; v11 = v8 + *a2; llama_batch_get_one(v21, v11, v10); if ( (unsigned int)llama_decode( a1, v11, v12, v13, v14, v15, v21[0], v21[1], v21[2], v21[3], v21[4], v21[5], v21[6]) ) break; result = a4; *a4 += v10; v9 += v20; v8 += v19; v7 -= a3; if ( v9 >= (v17 & 0x7FFFFFFFu) ) return result; } result = &common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v16 = common_log_main(); return (void *)common_log_add( v16, 4, (unsigned int)"%s : failed to eval. token %d/%d (batch size %d, n_past %d)\n", (unsigned int)"eval_tokens", -v7, v17, a3); } } return result; }
eval_tokens: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x68],RDI MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] SHR RAX,0x2 MOV qword ptr [RSP + 0x40],RAX TEST EAX,EAX JLE 0x00124179 MOV EBP,EDX MOV R12,RSI MOVSXD RCX,EDX MOV RAX,qword ptr [RSP + 0x40] AND EAX,0x7fffffff MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RCX LEA RAX,[RCX*0x4] MOV qword ptr [RSP + 0x50],RAX XOR R15D,R15D XOR R14D,R14D XOR R13D,R13D LAB_001240b0: MOV RSI,qword ptr [R12] MOV RBX,qword ptr [R12 + 0x8] SUB RBX,RSI SHR RBX,0x2 ADD EBX,R15D CMP EBX,EBP CMOVGE EBX,EBP ADD RSI,R14 LEA RDI,[RSP + 0x70] MOV EDX,EBX CALL 0x0011e100 MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x70] MOVUPS XMM1,xmmword ptr [RSP + 0x80] MOVUPS XMM2,xmmword ptr [RSP + 0x90] MOVUPS xmmword ptr [RSP + 0x20],XMM2 MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,qword ptr [RSP + 0x68] CALL 0x0011e400 TEST EAX,EAX JNZ 0x00124132 MOV RAX,qword ptr [RSP + 0x48] ADD dword ptr [RAX],EBX ADD R13,qword ptr [RSP + 0x60] ADD R14,qword ptr [RSP + 0x50] SUB R15D,EBP CMP R13,qword ptr [RSP + 0x58] JL 0x001240b0 JMP 0x00124179 LAB_00124132: LEA RAX,[0x2578a0] CMP dword ptr [RAX],0x0 JS 0x00124179 NEG R15D CALL 0x001ef47b MOV RCX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RCX] MOV dword ptr [RSP + 0x8],ECX MOV dword ptr [RSP],EBP LEA RDX,[0x209688] LEA RCX,[0x2096c5] MOV RDI,RAX MOV ESI,0x4 MOV R8D,R15D MOV R9,qword ptr [RSP + 0x40] XOR EAX,EAX CALL 0x001ef518 LAB_00124179: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* eval_tokens(llama_context*, std::vector<int, std::allocator<int> >, int, int*) */ void eval_tokens(int8 param_1,long *param_2,int param_3,int *param_4) { uint uVar1; int iVar2; ulong uVar3; int8 uVar4; int iVar5; long lVar6; long lVar7; int iVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 uVar12; int8 uVar13; int1 local_68 [16]; int4 local_58; int4 uStack_50; int4 local_48; int4 uStack_40; int8 local_38; uVar3 = (ulong)(param_2[1] - *param_2) >> 2; uVar1 = (uint)uVar3; if (0 < (int)uVar1) { iVar8 = 0; lVar7 = 0; lVar6 = 0; do { iVar5 = (int)((ulong)(param_2[1] - *param_2) >> 2) + iVar8; if (param_3 <= iVar5) { iVar5 = param_3; } llama_batch_get_one(local_68,*param_2 + lVar7,iVar5); uVar9 = local_58; uVar10 = uStack_50; uVar11 = local_48; uVar12 = uStack_40; uVar13 = local_38; iVar2 = llama_decode(param_1); if (iVar2 != 0) { if (common_log_verbosity_thold < 0) { return; } uVar4 = common_log_main(); common_log_add(uVar4,4,"%s : failed to eval. token %d/%d (batch size %d, n_past %d)\n", "eval_tokens",-iVar8,uVar3,param_3,*param_4,uVar9,uVar10,uVar11,uVar12,uVar13 ); return; } *param_4 = *param_4 + iVar5; lVar6 = lVar6 + param_3; lVar7 = lVar7 + (long)param_3 * 4; iVar8 = iVar8 - param_3; } while (lVar6 < (long)(ulong)(uVar1 & 0x7fffffff)); } return; }
48,456
my_caseup_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str) { register const uchar *map= cs->to_upper; char *str_orig= str; while ((*str= (char) map[(uchar) *str]) != 0) str++; return (size_t) (str - str_orig); }
O0
c
my_caseup_str_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movb (%rax,%rcx), %al movq -0x10(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0xa168a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xa1660 movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
my_caseup_str_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+50h] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_20], rax loc_A1660: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov al, [rax+rcx] mov rcx, [rbp+var_10] mov [rcx], al movsx eax, al cmp eax, 0 jz short loc_A168A mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_A1660 loc_A168A: mov rax, [rbp+var_10] mov rcx, [rbp+var_20] sub rax, rcx pop rbp retn
_BYTE * my_caseup_str_8bit(long long a1, _BYTE *a2) { char v2; // al long long v4; // [rsp+8h] [rbp-18h] _BYTE *v5; // [rsp+10h] [rbp-10h] v5 = a2; v4 = *(_QWORD *)(a1 + 80); while ( 1 ) { v2 = *(_BYTE *)(v4 + (unsigned __int8)*v5); *v5 = v2; if ( !v2 ) break; ++v5; } return (_BYTE *)(v5 - a2); }
my_caseup_str_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_001a1660: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV AL,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x001a168a MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001a1660 LAB_001a168a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX POP RBP RET
long my_caseup_str_8bit(long param_1,byte *param_2) { byte bVar1; long lVar2; byte *local_18; lVar2 = *(long *)(param_1 + 0x50); local_18 = param_2; while (bVar1 = *(byte *)(lVar2 + (ulong)*local_18), *local_18 = bVar1, bVar1 != 0) { local_18 = local_18 + 1; } return (long)local_18 - (long)param_2; }
48,457
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
monkey531[P]llama/common/common.cpp
bool common_chat_verify_template(const std::string & tmpl, bool use_jinja) { if (use_jinja) { try { auto chat_template = common_chat_template(tmpl, "<s>", "</s>"); common_chat_inputs inputs; inputs.messages = json::array({{ {"role", "user"}, {"content", "test"}, }}); common_chat_params_init(chat_template, inputs); return true; } catch (const std::exception & e) { LOG_ERR("%s: failed to apply template: %s\n", __func__, e.what()); return false; } } llama_chat_message chat[] = {{"user", "test"}}; const int res = llama_chat_apply_template(tmpl.c_str(), chat, 1, true, nullptr, 0); return res >= 0; }
O2
cpp
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x240, %rsp # imm = 0x240 movq %rdi, %rbx testl %esi, %esi je 0x72915 leaq 0x5dfd0(%rip), %rsi # 0xd0718 leaq 0xc0(%rsp), %rdi leaq 0x80(%rsp), %rdx callq 0x2b096 leaq 0x52996(%rip), %rsi # 0xc50fa leaq 0x8(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0x2b096 leaq 0x130(%rsp), %rdi leaq 0xc0(%rsp), %rdx leaq 0x8(%rsp), %rcx movq %rbx, %rsi callq 0x74b80 leaq 0x8(%rsp), %rdi callq 0x27998 leaq 0xc0(%rsp), %rdi callq 0x27998 leaq 0xc0(%rsp), %rdi callq 0x7811e leaq 0x5df61(%rip), %rsi # 0xd071c leaq 0x80(%rsp), %rdi callq 0x78176 leaq 0x98(%rsp), %rdi leaq 0x5df4a(%rip), %rsi # 0xd0721 callq 0x78176 leaq 0x8(%rsp), %r15 leaq 0x80(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x78186 leaq 0x20(%rsp), %r15 leaq 0x5df26(%rip), %rsi # 0xd0726 leaq 0x50(%rsp), %rdi callq 0x7819e leaq 0x68(%rsp), %rdi leaq 0x5df18(%rip), %rsi # 0xd072e callq 0x78176 leaq 0x50(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x78186 leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rsi pushq $0x2 popq %rdx callq 0x78186 leaq 0xb0(%rsp), %rdi leaq 0x38(%rsp), %rsi pushq $0x1 popq %rdx callq 0x78162 leaq 0xc0(%rsp), %rdi leaq 0xb0(%rsp), %rbx movq %rbx, %rsi callq 0x671e0 movq %rbx, %rdi callq 0x648ce leaq 0x38(%rsp), %rdi callq 0x648ce pushq $0x18 popq %rbx leaq (%rsp,%rbx), %rdi addq $0x8, %rdi callq 0x648ce addq $-0x18, %rbx cmpq $-0x18, %rbx jne 0x7287f pushq $0x18 popq %rbx leaq (%rsp,%rbx), %rdi addq $0x50, %rdi callq 0x648ce addq $-0x18, %rbx cmpq $-0x18, %rbx jne 0x72899 pushq $0x18 popq %rbx leaq (%rsp,%rbx), %rdi addq $0x80, %rdi callq 0x648ce addq $-0x18, %rbx cmpq $-0x18, %rbx jne 0x728b3 leaq 0x1b8(%rsp), %rdi leaq 0x130(%rsp), %rsi leaq 0xc0(%rsp), %rdx callq 0xb5962 leaq 0x1b8(%rsp), %rdi callq 0x781ae leaq 0xc0(%rsp), %rdi callq 0x781e4 leaq 0x130(%rsp), %rdi callq 0x78216 movb $0x1, %al jmp 0x72940 movaps 0xac904(%rip), %xmm0 # 0x11f220 leaq 0x130(%rsp), %rsi movaps %xmm0, (%rsi) movq (%rbx), %rdi pushq $0x1 popq %rdx pushq $0x1 popq %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x272e0 testl %eax, %eax setns %al addq $0x240, %rsp # imm = 0x240 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x72a29 movq %rdx, %r14 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x648ce jmp 0x7296d movq %rdx, %r14 movq %rax, %rbx pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x8, %rdi callq 0x648ce addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x72971 xorl %ebp, %ebp jmp 0x72995 movq %rdx, %r14 movq %rax, %rbx movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x50, %rdi callq 0x648ce addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x72999 jmp 0x729cf movq %rdx, %r14 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x648ce jmp 0x729cc jmp 0x729c6 movq %rdx, %r14 movq %rax, %rbx movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x80, %rdi callq 0x648ce addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x729d3 leaq 0x8(%rsp), %r12 cmpq %r15, %r12 setne %al andb %al, %bpl cmpb $0x1, %bpl jne 0x72a2f addq $-0x18, %r15 movq %r15, %rdi callq 0x648ce cmpq %r12, %r15 jne 0x72a01 jmp 0x72a2f movq %rdx, %r14 movq %rax, %rbx leaq 0x80(%rsp), %rdi callq 0x648ce jmp 0x72a2f movq %rdx, %r14 movq %rax, %rbx leaq 0xc0(%rsp), %rdi callq 0x781e4 leaq 0x130(%rsp), %rdi callq 0x78216 cmpl $0x1, %r14d jne 0x72aa9 movq %rbx, %rdi callq 0x26490 movq %rax, %r14 leaq 0xafe97(%rip), %rax # 0x1228f8 cmpl $0x0, (%rax) js 0x72a95 callq 0xb204e movq %rax, %rbx movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0x5dcb5(%rip), %rdx # 0xd0733 leaq 0x5dcd0(%rip), %rcx # 0xd0755 pushq $0x4 popq %rsi movq %rbx, %rdi movq %rax, %r8 xorl %eax, %eax callq 0xb20e6 callq 0x27480 xorl %eax, %eax jmp 0x72940 movq %rax, %rbx callq 0x27480 movq %rbx, %rdi callq 0x27660 movq %rax, %rdi callq 0x2b335 movq %rdx, %r14 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x27998 jmp 0x72ad1 movq %rdx, %r14 movq %rax, %rbx leaq 0xc0(%rsp), %rdi callq 0x27998 jmp 0x72a49 movq %rdx, %r14 movq %rax, %rbx jmp 0x72a49
_Z27common_chat_verify_templateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: push rbp; int push r15; int push r14; int push r12; char push rbx; int sub rsp, 240h mov rbx, rdi test esi, esi jz loc_72915 lea rsi, aS_2; "<s>" lea rdi, [rsp+268h+var_1A8] lea rdx, [rsp+268h+var_1E8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aS; "</s>" lea rdi, [rsp+268h+var_260] lea rdx, [rsp+268h+var_218] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+268h+var_138]; int lea rdx, [rsp+268h+var_1A8]; int lea rcx, [rsp+268h+var_260]; int mov rsi, rbx; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) lea rdi, [rsp+268h+var_260]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+268h+var_1A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+268h+var_1A8]; this call _ZN18common_chat_inputsC2Ev; common_chat_inputs::common_chat_inputs(void) lea rsi, aRole; "role" lea rdi, [rsp+268h+var_1E8] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+268h+var_1D0] lea rsi, aUser_0; "user" call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea r15, [rsp+268h+var_260] lea rsi, [rsp+268h+var_1E8] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea r15, [rsp+268h+var_248] lea rsi, aContent; "content" lea rdi, [rsp+268h+var_218] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+268h+var_200] lea rsi, aTest; "test" call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rsi, [rsp+268h+var_218] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea rdi, [rsp+268h+var_230] lea rsi, [rsp+268h+var_260] push 2 pop rdx call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea rdi, [rsp+268h+var_1B8] lea rsi, [rsp+268h+var_230] push 1 pop rdx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5arrayESt16initializer_listINS0_6detail8json_refISD_EEE; 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>::array(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea rdi, [rsp+268h+var_1A8] lea rbx, [rsp+268h+var_1B8] mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() lea rdi, [rsp+268h+var_230] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() push 18h pop rbx loc_7287F: lea rdi, [rsp+rbx+268h+var_268] add rdi, 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add rbx, 0FFFFFFFFFFFFFFE8h cmp rbx, 0FFFFFFFFFFFFFFE8h jnz short loc_7287F push 18h pop rbx loc_72899: lea rdi, [rsp+rbx+268h+var_268] add rdi, 50h ; 'P' call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add rbx, 0FFFFFFFFFFFFFFE8h cmp rbx, 0FFFFFFFFFFFFFFE8h jnz short loc_72899 push 18h pop rbx loc_728B3: lea rdi, [rsp+rbx+268h+var_268] add rdi, 80h call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add rbx, 0FFFFFFFFFFFFFFE8h cmp rbx, 0FFFFFFFFFFFFFFE8h jnz short loc_728B3 lea rdi, [rsp+268h+var_B0]; this lea rsi, [rsp+268h+var_138]; common_chat_inputs * lea rdx, [rsp+268h+var_1A8] call _Z23common_chat_params_initRKN5minja13chat_templateERK18common_chat_inputs; common_chat_params_init(minja::chat_template const&,common_chat_inputs const&) lea rdi, [rsp+268h+var_B0]; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() lea rdi, [rsp+268h+var_1A8]; this call _ZN18common_chat_inputsD2Ev; common_chat_inputs::~common_chat_inputs() lea rdi, [rsp+268h+var_138]; this call _ZN5minja13chat_templateD2Ev; minja::chat_template::~chat_template() mov al, 1 jmp short loc_72940 loc_72915: movaps xmm0, xmmword ptr cs:off_11F220; "user" lea rsi, [rsp+268h+var_138] movaps xmmword ptr [rsi], xmm0 mov rdi, [rbx] push 1 pop rdx push 1 pop rcx xor r8d, r8d xor r9d, r9d call _llama_chat_apply_template test eax, eax setns al loc_72940: add rsp, 240h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp loc_72A29 mov r14, rdx mov rbx, rax lea rdi, [rsp+268h+var_230] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_7296D mov r14, rdx mov rbx, rax loc_7296D: push 18h pop r12 loc_72971: lea rdi, [rsp+r12+268h+var_268] add rdi, 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_72971 xor ebp, ebp jmp short loc_72995 mov r14, rdx mov rbx, rax mov bpl, 1 loc_72995: push 18h pop r12 loc_72999: lea rdi, [rsp+r12+268h+var_268] add rdi, 50h ; 'P' call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_72999 jmp short loc_729CF mov r14, rdx mov rbx, rax lea rdi, [rsp+268h+var_218] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_729CC jmp short $+2 loc_729C6: mov r14, rdx mov rbx, rax loc_729CC: mov bpl, 1 loc_729CF: push 18h pop r12 loc_729D3: lea rdi, [rsp+r12+268h+var_268] add rdi, 80h call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_729D3 lea r12, [rsp+268h+var_260] cmp r12, r15 setnz al and bpl, al cmp bpl, 1 jnz short loc_72A2F loc_72A01: add r15, 0FFFFFFFFFFFFFFE8h mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() cmp r15, r12 jnz short loc_72A01 jmp short loc_72A2F mov r14, rdx mov rbx, rax lea rdi, [rsp+268h+var_1E8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_72A2F loc_72A29: mov r14, rdx mov rbx, rax loc_72A2F: lea rdi, [rsp+268h+var_1A8]; this call _ZN18common_chat_inputsD2Ev; common_chat_inputs::~common_chat_inputs() lea rdi, [rsp+268h+var_138]; this call _ZN5minja13chat_templateD2Ev; minja::chat_template::~chat_template() loc_72A49: cmp r14d, 1 jnz short loc_72AA9 mov rdi, rbx; void * call ___cxa_begin_catch mov r14, rax lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_72A95 call _Z15common_log_mainv; common_log_main(void) mov rbx, rax mov rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea rdx, aSFailedToApply_0; "%s: failed to apply template: %s\n" lea rcx, aCommonChatVeri; "common_chat_verify_template" push 4 pop rsi mov rdi, rbx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_72A95: call ___cxa_end_catch xor eax, eax jmp loc_72940 mov rbx, rax call ___cxa_end_catch loc_72AA9: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate mov r14, rdx mov rbx, rax lea rdi, [rsp+268h+var_260]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_72AD1 mov r14, rdx mov rbx, rax loc_72AD1: lea rdi, [rsp+268h+var_1A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_72A49 mov r14, rdx mov rbx, rax jmp loc_72A49
bool common_chat_verify_template(_QWORD *a1, int a2) { long long i; // rbx long long j; // rbx long long k; // rbx _QWORD v6[3]; // [rsp+8h] [rbp-260h] BYREF _BYTE v7[24]; // [rsp+20h] [rbp-248h] BYREF _BYTE v8[24]; // [rsp+38h] [rbp-230h] BYREF _BYTE v9[24]; // [rsp+50h] [rbp-218h] BYREF _BYTE v10[24]; // [rsp+68h] [rbp-200h] BYREF _BYTE v11[24]; // [rsp+80h] [rbp-1E8h] BYREF _BYTE v12[24]; // [rsp+98h] [rbp-1D0h] BYREF _BYTE v13[16]; // [rsp+B0h] [rbp-1B8h] BYREF _QWORD v14[14]; // [rsp+C0h] [rbp-1A8h] BYREF _OWORD v15[8]; // [rsp+130h] [rbp-138h] BYREF _BYTE v16[176]; // [rsp+1B8h] [rbp-B0h] BYREF if ( a2 ) { std::string::basic_string<std::allocator<char>>(v14, (long long)"<s>"); std::string::basic_string<std::allocator<char>>(v6, (long long)"</s>"); minja::chat_template::chat_template(v15, a1, v14, v6); std::string::~string(v6); std::string::~string(v14); common_chat_inputs::common_chat_inputs((common_chat_inputs *)v14); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_( v11, "role"); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_( v12, "user"); nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref( v6, v11, 2LL); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_( v9, "content"); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_( v10, "test"); nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref( v7, v9, 2LL); nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref( v8, v6, 2LL); 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>::array( v13, v8, 1LL); 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)v14, (long long)v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v8); for ( i = 3LL; i != -3; i -= 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>::~basic_json((long long)&v6[i]); for ( j = 24LL; j != -24; j -= 24LL ) nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v9[j]); for ( k = 24LL; k != -24; k -= 24LL ) nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v11[k]); common_chat_params_init((const minja::chat_template *)v16, (const common_chat_inputs *)v15); common_chat_params::~common_chat_params((common_chat_params *)v16); common_chat_inputs::~common_chat_inputs((common_chat_inputs *)v14); minja::chat_template::~chat_template((minja::chat_template *)v15); return 1; } else { v15[0] = *(_OWORD *)off_11F220; return (int)llama_chat_apply_template(*a1, v15, 1LL, 1LL, 0LL, 0LL) >= 0; } }
common_chat_verify_template: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x240 MOV RBX,RDI TEST ESI,ESI JZ 0x00172915 LAB_00172741: LEA RSI,[0x1d0718] LEA RDI,[RSP + 0xc0] LEA RDX,[RSP + 0x80] CALL 0x0012b096 LAB_0017275d: LEA RSI,[0x1c50fa] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x50] CALL 0x0012b096 LAB_00172773: LEA RDI,[RSP + 0x130] LEA RDX,[RSP + 0xc0] LEA RCX,[RSP + 0x8] MOV RSI,RBX CALL 0x00174b80 LEA RDI,[RSP + 0x8] CALL 0x00127998 LEA RDI,[RSP + 0xc0] CALL 0x00127998 LEA RDI,[RSP + 0xc0] CALL 0x0017811e LAB_001727b4: LEA RSI,[0x1d071c] LEA RDI,[RSP + 0x80] CALL 0x00178176 LEA RDI,[RSP + 0x98] LAB_001727d0: LEA RSI,[0x1d0721] CALL 0x00178176 LAB_001727dc: LEA R15,[RSP + 0x8] LEA RSI,[RSP + 0x80] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x00178186 LEA R15,[RSP + 0x20] LAB_001727f9: LEA RSI,[0x1d0726] LEA RDI,[RSP + 0x50] CALL 0x0017819e LEA RDI,[RSP + 0x68] LAB_0017280f: LEA RSI,[0x1d072e] CALL 0x00178176 LAB_0017281b: LEA RSI,[RSP + 0x50] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x00178186 LAB_0017282b: LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x8] PUSH 0x2 POP RDX CALL 0x00178186 LAB_0017283d: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x38] PUSH 0x1 POP RDX CALL 0x00178162 LEA RDI,[RSP + 0xc0] LEA RBX,[RSP + 0xb0] MOV RSI,RBX CALL 0x001671e0 MOV RDI,RBX CALL 0x001648ce LEA RDI,[RSP + 0x38] CALL 0x001648ce PUSH 0x18 POP RBX LAB_0017287f: LEA RDI,[RSP + RBX*0x1] ADD RDI,0x8 CALL 0x001648ce ADD RBX,-0x18 CMP RBX,-0x18 JNZ 0x0017287f PUSH 0x18 POP RBX LAB_00172899: LEA RDI,[RSP + RBX*0x1] ADD RDI,0x50 CALL 0x001648ce ADD RBX,-0x18 CMP RBX,-0x18 JNZ 0x00172899 PUSH 0x18 POP RBX LAB_001728b3: LEA RDI,[RSP + RBX*0x1] ADD RDI,0x80 CALL 0x001648ce ADD RBX,-0x18 CMP RBX,-0x18 JNZ 0x001728b3 LAB_001728cd: LEA RDI,[RSP + 0x1b8] LEA RSI,[RSP + 0x130] LEA RDX,[RSP + 0xc0] CALL 0x001b5962 LAB_001728ea: LEA RDI,[RSP + 0x1b8] CALL 0x001781ae LEA RDI,[RSP + 0xc0] CALL 0x001781e4 LEA RDI,[RSP + 0x130] CALL 0x00178216 MOV AL,0x1 JMP 0x00172940 LAB_00172915: MOVAPS XMM0,xmmword ptr [0x0021f220] LEA RSI,[RSP + 0x130] MOVAPS xmmword ptr [RSI],XMM0 MOV RDI,qword ptr [RBX] PUSH 0x1 POP RDX PUSH 0x1 POP RCX XOR R8D,R8D XOR R9D,R9D CALL 0x001272e0 TEST EAX,EAX SETNS AL LAB_00172940: ADD RSP,0x240 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* common_chat_verify_template(std::__cxx11::string const&, bool) */ bool common_chat_verify_template(string *param_1,bool param_2) { int iVar1; long lVar2; int7 in_register_00000031; bool bVar3; string local_260 [24]; int1 local_248 [24]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_230 [24]; allocator local_218 [24]; int1 local_200 [24]; allocator local_1e8 [24]; int1 local_1d0 [24]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_1b8 [16]; string local_1a8 [112]; int4 local_138; int4 uStack_134; int4 uStack_130; int4 uStack_12c; chat_template local_b0 [136]; if ((int)CONCAT71(in_register_00000031,param_2) == 0) { local_138 = PTR_DAT_0021f220._0_4_; uStack_134 = PTR_DAT_0021f220._4_4_; uStack_130 = PTR_DAT_0021f228._0_4_; uStack_12c = PTR_DAT_0021f228._4_4_; iVar1 = llama_chat_apply_template(*(int8 *)param_1,&local_138,1,1,0,0); bVar3 = -1 < iVar1; } else { /* try { // try from 00172741 to 0017275c has its CatchHandler @ 00172ae3 */ std::__cxx11::string::string<std::allocator<char>>(local_1a8,"<s>",local_1e8); /* try { // try from 0017275d to 00172772 has its CatchHandler @ 00172acb */ std::__cxx11::string::string<std::allocator<char>>(local_260,"</s>",local_218); /* try { // try from 00172773 to 0017278f has its CatchHandler @ 00172ab9 */ minja::chat_template::chat_template((chat_template *)&local_138,param_1,local_1a8,local_260); std::__cxx11::string::~string(local_260); std::__cxx11::string::~string(local_1a8); common_chat_inputs::common_chat_inputs((common_chat_inputs *)local_1a8); /* try { // try from 001727b4 to 001727c7 has its CatchHandler @ 00172a29 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_1e8,&DAT_001d071c); /* try { // try from 001727d0 to 001727db has its CatchHandler @ 00172a14 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_1d0,&DAT_001d0721); /* try { // try from 001727dc to 001727f3 has its CatchHandler @ 001729c6 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_ref(local_260,local_1e8,2); /* try { // try from 001727f9 to 00172809 has its CatchHandler @ 001729c4 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_218,"content"); /* try { // try from 0017280f to 0017281a has its CatchHandler @ 001729b2 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_200,&DAT_001d072e); /* try { // try from 0017281b to 0017282a has its CatchHandler @ 0017298c */ nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_ref(local_248,local_218,2); /* try { // try from 0017282b to 0017283c has its CatchHandler @ 00172967 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_ref(local_230,local_260,2); /* try { // try from 0017283d to 00172851 has its CatchHandler @ 00172955 */ 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> ::array(local_1b8,local_230,1); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_1a8,local_1b8); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_1b8); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_230); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(local_260 + lVar2)); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(local_218 + lVar2)); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(local_1e8 + lVar2)); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); /* try { // try from 001728cd to 001728e9 has its CatchHandler @ 00172950 */ common_chat_params_init(local_b0,(common_chat_inputs *)&local_138); common_chat_params::~common_chat_params((common_chat_params *)local_b0); common_chat_inputs::~common_chat_inputs((common_chat_inputs *)local_1a8); minja::chat_template::~chat_template((chat_template *)&local_138); bVar3 = true; } return bVar3; }
48,458
PycTuple::load(PycData*, PycModule*)
Pyarmor-Static-Unpack-1shot/pyc_sequence.cpp
void PycTuple::load(PycData* stream, PycModule* mod) { if (type() == TYPE_SMALL_TUPLE) m_size = stream->getByte(); else m_size = stream->get32(); m_values.resize(m_size); for (int i=0; i<m_size; i++) m_values[i] = LoadObject(stream, mod); }
O0
cpp
PycTuple::load(PycData*, PycModule*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x30(%rbp) callq 0xc340 cmpl $0x29, %eax jne 0x5b78b movq -0x10(%rbp), %rdi movq (%rdi), %rax callq *0x20(%rax) movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x10(%rax) jmp 0x5b79d movq -0x10(%rbp), %rdi callq 0x53b70 movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x30(%rbp), %rax movq %rax, %rdi addq $0x18, %rdi movslq 0x10(%rax), %rsi callq 0x5bd60 movl $0x0, -0x1c(%rbp) movq -0x30(%rbp), %rcx movl -0x1c(%rbp), %eax cmpl 0x10(%rcx), %eax jge 0x5b806 movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx leaq -0x28(%rbp), %rdi callq 0x5a560 movq -0x30(%rbp), %rdi addq $0x18, %rdi movslq -0x1c(%rbp), %rsi callq 0x3b4b0 movq %rax, %rdi leaq -0x28(%rbp), %rsi callq 0x5aa90 leaq -0x28(%rbp), %rdi callq 0xc700 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x5b7b8 addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN8PycTuple4loadEP7PycDataP9PycModule: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8]; this mov [rbp+var_30], rdi call _ZNK9PycObject4typeEv; PycObject::type(void) cmp eax, 29h ; ')' jnz short loc_5B78B mov rdi, [rbp+var_10] mov rax, [rdi] call qword ptr [rax+20h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+10h], ecx jmp short loc_5B79D loc_5B78B: mov rdi, [rbp+var_10]; this call _ZN7PycData5get32Ev; PycData::get32(void) mov ecx, eax mov rax, [rbp+var_30] mov [rax+10h], ecx loc_5B79D: mov rax, [rbp+var_30] mov rdi, rax add rdi, 18h movsxd rsi, dword ptr [rax+10h] call _ZNSt6vectorI6PycRefI9PycObjectESaIS2_EE6resizeEm; std::vector<PycRef<PycObject>>::resize(ulong) mov [rbp+var_1C], 0 loc_5B7B8: mov rcx, [rbp+var_30] mov eax, [rbp+var_1C] cmp eax, [rcx+10h] jge short loc_5B806 mov rsi, [rbp+var_10]; PycModule * mov rdx, [rbp+var_18] lea rdi, [rbp+var_28]; PycData * call _Z10LoadObjectP7PycDataP9PycModule; LoadObject(PycData *,PycModule *) mov rdi, [rbp+var_30] add rdi, 18h movsxd rsi, [rbp+var_1C] call _ZNSt6vectorI6PycRefI9PycObjectESaIS2_EEixEm; std::vector<PycRef<PycObject>>::operator[](ulong) mov rdi, rax lea rsi, [rbp+var_28] call _ZN6PycRefI9PycObjectEaSEOS1_; PycRef<PycObject>::operator=(PycRef<PycObject>&&) lea rdi, [rbp+var_28]; void * call _ZN6PycRefI9PycObjectED2Ev; PycRef<PycObject>::~PycRef() mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_5B7B8 loc_5B806: add rsp, 30h pop rbp retn
long long PycTuple::load(PycTuple *this, PycData *a2, PycModule *a3) { int v3; // ecx long long result; // rax _QWORD *v5; // rax PycObject *v6; // [rsp+8h] [rbp-28h] BYREF unsigned int i; // [rsp+14h] [rbp-1Ch] PycModule *v8; // [rsp+18h] [rbp-18h] PycData *v9; // [rsp+20h] [rbp-10h] PycObject *v10; // [rsp+28h] [rbp-8h] v10 = this; v9 = a2; v8 = a3; if ( (unsigned int)PycObject::type(this) == 41 ) v3 = (*(long long ( **)(PycData *))(*(_QWORD *)v9 + 32LL))(v9); else v3 = PycData::get32(v9); *((_DWORD *)this + 4) = v3; std::vector<PycRef<PycObject>>::resize((char *)this + 24, *((int *)this + 4)); for ( i = 0; ; ++i ) { result = i; if ( (signed int)i >= *((_DWORD *)this + 4) ) break; LoadObject(&v6, v9, (long long)v8); v5 = (_QWORD *)std::vector<PycRef<PycObject>>::operator[]((_QWORD *)this + 3, (int)i); PycRef<PycObject>::operator=(v5, &v6); PycRef<PycObject>::~PycRef(&v6); } return result; }
load: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RDI CALL 0x0010c340 CMP EAX,0x29 JNZ 0x0015b78b MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x20] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x10],ECX JMP 0x0015b79d LAB_0015b78b: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00153b70 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x10],ECX LAB_0015b79d: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,RAX ADD RDI,0x18 MOVSXD RSI,dword ptr [RAX + 0x10] CALL 0x0015bd60 MOV dword ptr [RBP + -0x1c],0x0 LAB_0015b7b8: MOV RCX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RCX + 0x10] JGE 0x0015b806 MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x28] CALL 0x0015a560 MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x18 MOVSXD RSI,dword ptr [RBP + -0x1c] CALL 0x0013b4b0 MOV RDI,RAX LEA RSI,[RBP + -0x28] CALL 0x0015aa90 LEA RDI,[RBP + -0x28] CALL 0x0010c700 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0015b7b8 LAB_0015b806: ADD RSP,0x30 POP RBP RET
/* PycTuple::load(PycData*, PycModule*) */ void __thiscall PycTuple::load(PycTuple *this,PycData *param_1,PycModule *param_2) { int iVar1; int4 uVar2; PycRef<PycObject> *this_00; PycData local_30 [12]; int local_24; PycModule *local_20; PycData *local_18; PycTuple *local_10; local_20 = param_2; local_18 = param_1; local_10 = this; iVar1 = PycObject::type((PycObject *)this); if (iVar1 == 0x29) { uVar2 = (**(code **)(*(long *)local_18 + 0x20))(); *(int4 *)(this + 0x10) = uVar2; } else { uVar2 = PycData::get32(local_18); *(int4 *)(this + 0x10) = uVar2; } std::vector<PycRef<PycObject>,std::allocator<PycRef<PycObject>>>::resize ((vector<PycRef<PycObject>,std::allocator<PycRef<PycObject>>> *)(this + 0x18), (long)*(int *)(this + 0x10)); for (local_24 = 0; local_24 < *(int *)(this + 0x10); local_24 = local_24 + 1) { LoadObject(local_30,(PycModule *)local_18); this_00 = (PycRef<PycObject> *) std::vector<PycRef<PycObject>,std::allocator<PycRef<PycObject>>>::operator[] ((vector<PycRef<PycObject>,std::allocator<PycRef<PycObject>>> *) (this + 0x18),(long)local_24); PycRef<PycObject>::operator=(this_00,(PycRef *)local_30); PycRef<PycObject>::~PycRef((PycRef<PycObject> *)local_30); } return; }
48,459
PycTuple::load(PycData*, PycModule*)
Pyarmor-Static-Unpack-1shot/pyc_sequence.cpp
void PycTuple::load(PycData* stream, PycModule* mod) { if (type() == TYPE_SMALL_TUPLE) m_size = stream->getByte(); else m_size = stream->get32(); m_values.resize(m_size); for (int i=0; i<m_size; i++) m_values[i] = LoadObject(stream, mod); }
O3
cpp
PycTuple::load(PycData*, PycModule*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpl $0x29, 0xc(%rdi) jne 0x33446 movq (%r14), %rax movq %r14, %rdi callq *0x20(%rax) jmp 0x3344e movq %r14, %rdi callq 0x2fab8 movl %eax, 0x10(%r15) leaq 0x18(%r15), %rdi movslq %eax, %rsi callq 0x337b6 cmpl $0x0, 0x10(%r15) jle 0x33492 xorl %r13d, %r13d leaq -0x30(%rbp), %r12 movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x32f4c movq 0x18(%r15), %rax movq -0x30(%rbp), %rcx movq %rcx, (%rax,%r13,8) incq %r13 movslq 0x10(%r15), %rax cmpq %rax, %r13 jl 0x3346c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8PycTuple4loadEP7PycDataP9PycModule: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi cmp dword ptr [rdi+0Ch], 29h ; ')' jnz short loc_33446 mov rax, [r14] mov rdi, r14 call qword ptr [rax+20h] jmp short loc_3344E loc_33446: mov rdi, r14; this call _ZN7PycData5get32Ev; PycData::get32(void) loc_3344E: mov [r15+10h], eax lea rdi, [r15+18h] movsxd rsi, eax call _ZNSt6vectorI6PycRefI9PycObjectESaIS2_EE6resizeEm; std::vector<PycRef<PycObject>>::resize(ulong) cmp dword ptr [r15+10h], 0 jle short loc_33492 xor r13d, r13d lea r12, [rbp+var_30] loc_3346C: mov rdi, r12; PycData * mov rsi, r14; PycModule * mov rdx, rbx call _Z10LoadObjectP7PycDataP9PycModule; LoadObject(PycData *,PycModule *) mov rax, [r15+18h] mov rcx, [rbp+var_30] mov [rax+r13*8], rcx inc r13 movsxd rax, dword ptr [r15+10h] cmp r13, rax jl short loc_3346C loc_33492: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long PycTuple::load(PycTuple *this, PycData *a2, PycModule *a3) { long long v3; // rax int v5; // eax long long result; // rax long long v7; // r13 _QWORD v8[6]; // [rsp+0h] [rbp-30h] BYREF v8[0] = v3; if ( *((_DWORD *)this + 3) == 41 ) v5 = (*(long long ( **)(PycData *))(*(_QWORD *)a2 + 32LL))(a2); else v5 = PycData::get32(a2); *((_DWORD *)this + 4) = v5; result = std::vector<PycRef<PycObject>>::resize((char *)this + 24, v5); if ( *((int *)this + 4) > 0 ) { v7 = 0LL; do { LoadObject((PycData *)v8, a2, (long long)a3); *(_QWORD *)(*((_QWORD *)this + 3) + 8 * v7++) = v8[0]; result = *((int *)this + 4); } while ( v7 < result ); } return result; }
load: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP dword ptr [RDI + 0xc],0x29 JNZ 0x00133446 MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x20] JMP 0x0013344e LAB_00133446: MOV RDI,R14 CALL 0x0012fab8 LAB_0013344e: MOV dword ptr [R15 + 0x10],EAX LEA RDI,[R15 + 0x18] MOVSXD RSI,EAX CALL 0x001337b6 CMP dword ptr [R15 + 0x10],0x0 JLE 0x00133492 XOR R13D,R13D LEA R12,[RBP + -0x30] LAB_0013346c: MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX CALL 0x00132f4c MOV RAX,qword ptr [R15 + 0x18] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + R13*0x8],RCX INC R13 MOVSXD RAX,dword ptr [R15 + 0x10] CMP R13,RAX JL 0x0013346c LAB_00133492: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* PycTuple::load(PycData*, PycModule*) */ void PycTuple::load(PycData *param_1,PycModule *param_2) { int iVar1; int8 in_RAX; long lVar2; int8 local_38; local_38 = in_RAX; if (*(int *)(param_1 + 0xc) == 0x29) { iVar1 = (**(code **)(*(long *)param_2 + 0x20))(param_2); } else { iVar1 = PycData::get32((PycData *)param_2); } *(int *)(param_1 + 0x10) = iVar1; std::vector<PycRef<PycObject>,std::allocator<PycRef<PycObject>>>::resize ((vector<PycRef<PycObject>,std::allocator<PycRef<PycObject>>> *)(param_1 + 0x18), (long)iVar1); if (0 < *(int *)(param_1 + 0x10)) { lVar2 = 0; do { LoadObject((PycData *)&local_38,param_2); *(int8 *)(*(long *)(param_1 + 0x18) + lVar2 * 8) = local_38; lVar2 = lVar2 + 1; } while (lVar2 < *(int *)(param_1 + 0x10)); } return; }
48,460
create_temp_file
eloqsql/mysys/mf_tempfile.c
File create_temp_file(char *to, const char *dir, const char *prefix, int mode, myf MyFlags) { File file= -1; DBUG_ENTER("create_temp_file"); DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir ? dir : "(null)", prefix)); DBUG_ASSERT((mode & (O_EXCL | O_TRUNC | O_CREAT | O_RDWR)) == 0); mode|= O_TRUNC | O_CREAT | O_RDWR; /* not O_EXCL, see Windows code below */ #ifdef _WIN32 { TCHAR path_buf[MAX_PATH-14]; /* Use GetTempPath to determine path for temporary files. This is because the documentation for GetTempFileName has the following to say about this parameter: "If this parameter is NULL, the function fails." */ if (!dir) { if(GetTempPath(sizeof(path_buf), path_buf) > 0) dir = path_buf; } /* Use GetTempFileName to generate a unique filename, create the file and release it's handle - uses up to the first three letters from prefix */ if (GetTempFileName(dir, prefix, 0, to) == 0) DBUG_RETURN(-1); DBUG_PRINT("info", ("name: %s", to)); if (MyFlags & MY_TEMPORARY) mode|= O_SHORT_LIVED | O_TEMPORARY; /* Open the file without O_EXCL flag since the file has already been created by GetTempFileName */ if ((file= my_open(to, mode, MyFlags)) < 0) { /* Open failed, remove the file created by GetTempFileName */ int tmp= my_errno; (void) my_delete(to, MYF(0)); my_errno= tmp; } } #elif defined(HAVE_MKSTEMP) if (!dir && ! (dir =getenv("TMPDIR"))) dir= DEFAULT_TMPDIR; #ifdef O_TMPFILE { static int O_TMPFILE_works= 1; if ((MyFlags & MY_TEMPORARY) && O_TMPFILE_works) { /* explictly don't use O_EXCL here has it has a different meaning with O_TMPFILE */ if ((file= open(dir, (mode & ~O_CREAT) | O_TMPFILE | O_CLOEXEC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) >= 0) { my_snprintf(to, FN_REFLEN, "%s/#sql/fd=%d", dir, file); file=my_register_filename(file, to, FILE_BY_O_TMPFILE, EE_CANTCREATEFILE, MyFlags); } else if (errno == EOPNOTSUPP || errno == EINVAL) { my_printf_error(EE_CANTCREATEFILE, "O_TMPFILE is not supported on %s " "(disabling future attempts)", MYF(ME_NOTE | ME_ERROR_LOG_ONLY), dir); O_TMPFILE_works= 0; } } } if (file == -1) #endif /* O_TMPFILE */ { char prefix_buff[30]; uint pfx_len; File org_file; pfx_len= (uint) (strmov(strnmov(prefix_buff, prefix ? prefix : "tmp.", sizeof(prefix_buff)-7),"XXXXXX") - prefix_buff); if (strlen(dir)+ pfx_len > FN_REFLEN-2) { errno=my_errno= ENAMETOOLONG; DBUG_RETURN(file); } strmov(convert_dirname(to,dir,NullS),prefix_buff); org_file=mkstemp(to); if (org_file >= 0 && (MyFlags & MY_TEMPORARY)) (void) my_delete(to, MYF(MY_WME)); file=my_register_filename(org_file, to, FILE_BY_MKSTEMP, EE_CANTCREATEFILE, MyFlags); /* If we didn't manage to register the name, remove the temp file */ if (org_file >= 0 && file < 0) { int tmp=my_errno; close(org_file); (void) my_delete(to, MYF(MY_WME)); my_errno=tmp; } } #else #error No implementation found for create_temp_file #endif if (file >= 0) statistic_increment(my_tmp_file_created,&THR_LOCK_open); DBUG_RETURN(file); }
O3
c
create_temp_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r14 movl %ecx, %r13d movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testq %rsi, %rsi jne 0xafa18 leaq 0x35b0a(%rip), %rdi # 0xe550f callq 0x2a690 testq %rax, %rax leaq 0x35b02(%rip), %r15 # 0xe5516 cmovneq %rax, %r15 testb $0x40, %r14b je 0xafacc testb $0x1, 0xb6262f(%rip) # 0xc12058 jne 0xafacc andl $0xffb6fdbd, %r13d # imm = 0xFFB6FDBD orl $0x490202, %r13d # imm = 0x490202 movq %r15, %rdi movl %r13d, %esi movl $0x1b0, %edx # imm = 0x1B0 xorl %eax, %eax callq 0x2aa70 movl %eax, %r13d testl %eax, %eax js 0xafa8f leaq 0x35abe(%rip), %rdx # 0xe551b movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movq %r15, %rcx movl %r13d, %r8d xorl %eax, %eax callq 0xdda0e movl %r13d, %edi movq %rbx, %rsi movl $0x5, %edx movl $0x1, %ecx movq %r14, %r8 callq 0xa6ada movl %eax, %r13d jmp 0xafac2 callq 0x2a820 movl (%rax), %eax cmpl $0x5f, %eax je 0xafaa0 cmpl $0x16, %eax jne 0xafac2 leaq 0x35a82(%rip), %rsi # 0xe5529 movl $0x480, %edx # imm = 0x480 movl $0x1, %edi movq %r15, %rcx xorl %eax, %eax callq 0xa1db5 movb $0x1, 0xb62596(%rip) # 0xc12058 cmpl $-0x1, %r13d jne 0xafbb5 testq %r12, %r12 leaq 0x35a90(%rip), %rsi # 0xe5566 cmovneq %r12, %rsi leaq -0x50(%rbp), %r12 movl $0x17, %edx movq %r12, %rdi callq 0xdde2c movq %rax, %r13 movl $0x58585858, (%rax) # imm = 0x58585858 movl $0x585858, 0x3(%rax) # imm = 0x585858 subl %r12d, %r13d addl $0x6, %r13d movq %r15, %rdi callq 0x2a360 addq %rax, %r13 cmpq $0x1fe, %r13 # imm = 0x1FE ja 0xafbc6 testb $0x40, %r14b sete %r12b movq %rbx, %rdi movq %r15, %rsi xorl %edx, %edx callq 0x98357 leaq -0x50(%rbp), %rsi movq %rax, %rdi callq 0x2a370 movq %rbx, %rdi movl $0x80000, %esi # imm = 0x80000 callq 0x2a5c0 movl %eax, %r15d testl %eax, %eax sets %al orb %r12b, %al jne 0xafb62 movl $0x10, %esi movq %rbx, %rdi callq 0xa1a24 testl %r15d, %r15d setns %r12b movl %r15d, %edi movq %rbx, %rsi movl $0x6, %edx movl $0x1, %ecx movq %r14, %r8 callq 0xa6ada movl %eax, %r13d testl %eax, %eax sets %al andb %r12b, %al cmpb $0x1, %al jne 0xafbb5 callq 0xa8156 movl (%rax), %r14d movl %r15d, %edi callq 0x2a1b0 movl $0x10, %esi movq %rbx, %rdi callq 0xa1a24 callq 0xa8156 movl %r14d, (%rax) testl %r13d, %r13d js 0xafbdf leaq 0xb61807(%rip), %rax # 0xc113c8 incq (%rax) jmp 0xafbdf callq 0xa8156 movl $0x24, %ebx movl %ebx, (%rax) callq 0x2a820 movl %ebx, (%rax) movl $0xffffffff, %r13d # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xafc00 movl %r13d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a270 nopl (%rax)
create_temp_file: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r8 mov r13d, ecx mov r12, rdx mov r15, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax test rsi, rsi jnz short loc_AFA18 lea rdi, aTmpdir; "TMPDIR" call _getenv test rax, rax lea r15, aTmp_0; "/tmp" cmovnz r15, rax loc_AFA18: test r14b, 40h jz loc_AFACC test cs:create_temp_file_O_TMPFILE_works, 1 jnz loc_AFACC and r13d, 0FFB6FDBDh or r13d, 490202h mov rdi, r15 mov esi, r13d mov edx, 1B0h xor eax, eax call _open64 mov r13d, eax test eax, eax js short loc_AFA8F lea rdx, aSSqlFdD; "%s/#sql/fd=%d" mov esi, 200h mov rdi, rbx mov rcx, r15 mov r8d, r13d xor eax, eax call my_snprintf mov edi, r13d mov rsi, rbx mov edx, 5 mov ecx, 1 mov r8, r14 call my_register_filename mov r13d, eax jmp short loc_AFAC2 loc_AFA8F: call ___errno_location mov eax, [rax] cmp eax, 5Fh ; '_' jz short loc_AFAA0 cmp eax, 16h jnz short loc_AFAC2 loc_AFAA0: lea rsi, aOTmpfileIsNotS; "O_TMPFILE is not supported on %s (disab"... mov edx, 480h mov edi, 1 mov rcx, r15 xor eax, eax call my_printf_error mov cs:create_temp_file_O_TMPFILE_works, 1 loc_AFAC2: cmp r13d, 0FFFFFFFFh jnz loc_AFBB5 loc_AFACC: test r12, r12 lea rsi, aTmp_1; "tmp." cmovnz rsi, r12 lea r12, [rbp+var_50] mov edx, 17h mov rdi, r12 call strnmov mov r13, rax mov dword ptr [rax], 58585858h mov dword ptr [rax+3], offset unk_585858 sub r13d, r12d add r13d, 6 mov rdi, r15 call _strlen add r13, rax cmp r13, 1FEh ja loc_AFBC6 test r14b, 40h setz r12b mov rdi, rbx mov rsi, r15 xor edx, edx call convert_dirname lea rsi, [rbp+var_50] mov rdi, rax call _strcpy mov rdi, rbx mov esi, 80000h call _mkostemp64 mov r15d, eax test eax, eax sets al or al, r12b jnz short loc_AFB62 mov esi, 10h mov rdi, rbx call my_delete loc_AFB62: test r15d, r15d setns r12b mov edi, r15d mov rsi, rbx mov edx, 6 mov ecx, 1 mov r8, r14 call my_register_filename mov r13d, eax test eax, eax sets al and al, r12b cmp al, 1 jnz short loc_AFBB5 call _my_thread_var mov r14d, [rax] mov edi, r15d call _close mov esi, 10h mov rdi, rbx call my_delete call _my_thread_var mov [rax], r14d loc_AFBB5: test r13d, r13d js short loc_AFBDF lea rax, my_tmp_file_created inc qword ptr [rax] jmp short loc_AFBDF loc_AFBC6: call _my_thread_var mov ebx, 24h ; '$' mov [rax], ebx call ___errno_location mov [rax], ebx mov r13d, 0FFFFFFFFh loc_AFBDF: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_AFC00 mov eax, r13d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_AFC00: call ___stack_chk_fail
long long create_temp_file( _WORD *a1, const char *a2, const char *a3, int a4, __int16 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { const char *v16; // r15 long long v17; // rax int v18; // eax int v19; // r9d int v20; // r13d int v21; // eax long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 const char *v26; // rsi _DWORD *v27; // rax _WORD *v28; // rax int v29; // r15d int v30; // r14d char v32[32]; // [rsp+0h] [rbp-50h] BYREF unsigned long long v33; // [rsp+20h] [rbp-30h] v16 = a2; v33 = __readfsqword(0x28u); if ( !a2 ) { v17 = getenv("TMPDIR"); v16 = "/tmp"; if ( v17 ) v16 = (const char *)v17; } if ( (a5 & 0x40) == 0 || (create_temp_file_O_TMPFILE_works & 1) != 0 ) goto LABEL_12; v18 = open64(v16, a4 & 0xFFB6FDBD | 0x490202, 432LL); v20 = v18; if ( v18 < 0 ) { v21 = *(_DWORD *)__errno_location(v16); if ( v21 == 95 || v21 == 22 ) { my_printf_error( 1, (long long)"O_TMPFILE is not supported on %s (disabling future attempts)", 1152, (long long)v16, v22, v23, a6, a7, a8, a9, v24, v25, a12, a13, v32[0]); create_temp_file_O_TMPFILE_works = 1; } } else { my_snprintf((_DWORD)a1, 512, (unsigned int)"%s/#sql/fd=%d", (_DWORD)v16, v18, v19); v20 = my_register_filename((unsigned int)v20, (long long)a1, 5, 1u, a5); } if ( v20 == -1 ) { LABEL_12: v26 = "tmp."; if ( a3 ) v26 = a3; v27 = (_DWORD *)strnmov(v32, v26, 23LL); *v27 = 1482184792; *(_DWORD *)((char *)v27 + 3) = (_DWORD)&unk_585858; if ( strlen(v16) + (unsigned long long)((unsigned int)v27 - (unsigned int)v32 + 6) > 0x1FE ) { *(_DWORD *)my_thread_var() = 36; *(_DWORD *)__errno_location(v16) = 36; return (unsigned int)-1; } v28 = convert_dirname(a1, (long long)v16, 0LL); strcpy(v28, v32); v29 = mkostemp64(a1, 0x80000LL); if ( (a5 & 0x40) != 0 && v29 >= 0 ) my_delete((long long)a1, 16LL); v20 = my_register_filename((unsigned int)v29, (long long)a1, 6, 1u, a5); if ( v29 >= 0 && v20 < 0 ) { v30 = *(_DWORD *)my_thread_var(); close((unsigned int)v29); my_delete((long long)a1, 16LL); *(_DWORD *)my_thread_var() = v30; } } if ( v20 >= 0 ) ++my_tmp_file_created; return (unsigned int)v20; }
create_temp_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R8 MOV R13D,ECX MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST RSI,RSI JNZ 0x001afa18 LEA RDI,[0x1e550f] CALL 0x0012a690 TEST RAX,RAX LEA R15,[0x1e5516] CMOVNZ R15,RAX LAB_001afa18: TEST R14B,0x40 JZ 0x001afacc TEST byte ptr [0x00d12058],0x1 JNZ 0x001afacc AND R13D,0xffb6fdbd OR R13D,0x490202 MOV RDI,R15 MOV ESI,R13D MOV EDX,0x1b0 XOR EAX,EAX CALL 0x0012aa70 MOV R13D,EAX TEST EAX,EAX JS 0x001afa8f LEA RDX,[0x1e551b] MOV ESI,0x200 MOV RDI,RBX MOV RCX,R15 MOV R8D,R13D XOR EAX,EAX CALL 0x001dda0e MOV EDI,R13D MOV RSI,RBX MOV EDX,0x5 MOV ECX,0x1 MOV R8,R14 CALL 0x001a6ada MOV R13D,EAX JMP 0x001afac2 LAB_001afa8f: CALL 0x0012a820 MOV EAX,dword ptr [RAX] CMP EAX,0x5f JZ 0x001afaa0 CMP EAX,0x16 JNZ 0x001afac2 LAB_001afaa0: LEA RSI,[0x1e5529] MOV EDX,0x480 MOV EDI,0x1 MOV RCX,R15 XOR EAX,EAX CALL 0x001a1db5 MOV byte ptr [0x00d12058],0x1 LAB_001afac2: CMP R13D,-0x1 JNZ 0x001afbb5 LAB_001afacc: TEST R12,R12 LEA RSI,[0x1e5566] CMOVNZ RSI,R12 LEA R12,[RBP + -0x50] MOV EDX,0x17 MOV RDI,R12 CALL 0x001dde2c MOV R13,RAX MOV dword ptr [RAX],0x58585858 MOV dword ptr [RAX + 0x3],0x585858 SUB R13D,R12D ADD R13D,0x6 MOV RDI,R15 CALL 0x0012a360 ADD R13,RAX CMP R13,0x1fe JA 0x001afbc6 TEST R14B,0x40 SETZ R12B MOV RDI,RBX MOV RSI,R15 XOR EDX,EDX CALL 0x00198357 LEA RSI,[RBP + -0x50] MOV RDI,RAX CALL 0x0012a370 MOV RDI,RBX MOV ESI,0x80000 CALL 0x0012a5c0 MOV R15D,EAX TEST EAX,EAX SETS AL OR AL,R12B JNZ 0x001afb62 MOV ESI,0x10 MOV RDI,RBX CALL 0x001a1a24 LAB_001afb62: TEST R15D,R15D SETNS R12B MOV EDI,R15D MOV RSI,RBX MOV EDX,0x6 MOV ECX,0x1 MOV R8,R14 CALL 0x001a6ada MOV R13D,EAX TEST EAX,EAX SETS AL AND AL,R12B CMP AL,0x1 JNZ 0x001afbb5 CALL 0x001a8156 MOV R14D,dword ptr [RAX] MOV EDI,R15D CALL 0x0012a1b0 MOV ESI,0x10 MOV RDI,RBX CALL 0x001a1a24 CALL 0x001a8156 MOV dword ptr [RAX],R14D LAB_001afbb5: TEST R13D,R13D JS 0x001afbdf LEA RAX,[0xd113c8] INC qword ptr [RAX] JMP 0x001afbdf LAB_001afbc6: CALL 0x001a8156 MOV EBX,0x24 MOV dword ptr [RAX],EBX CALL 0x0012a820 MOV dword ptr [RAX],EBX MOV R13D,0xffffffff LAB_001afbdf: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001afc00 MOV EAX,R13D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001afc00: CALL 0x0012a270
int create_temp_file(char *param_1,char *param_2,int *param_3,uint param_4,ulong param_5) { int4 uVar1; int iVar2; int __fd; char *pcVar3; int4 *puVar4; size_t sVar5; int *piVar6; int *puVar7; long in_FS_OFFSET; char local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == (char *)0x0) { pcVar3 = getenv("TMPDIR"); param_2 = "/tmp"; if (pcVar3 != (char *)0x0) { param_2 = pcVar3; } } if (((param_5 & 0x40) == 0) || ((create_temp_file_O_TMPFILE_works & 1) != 0)) { LAB_001afacc: puVar7 = &DAT_001e5566; if (param_3 != (int *)0x0) { puVar7 = param_3; } puVar4 = (int4 *)strnmov(local_58,puVar7,0x17); *puVar4 = 0x58585858; *(int4 *)((long)puVar4 + 3) = 0x585858; sVar5 = strlen(param_2); if (0x1fe < (((int)puVar4 - (int)local_58) + 6) + sVar5) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x24; piVar6 = __errno_location(); *piVar6 = 0x24; iVar2 = -1; goto LAB_001afbdf; } pcVar3 = (char *)convert_dirname(param_1,param_2,0); strcpy(pcVar3,local_58); __fd = mkostemp64(param_1,0x80000); if (-1 < __fd && (param_5 & 0x40) != 0) { my_delete(param_1,0x10); } iVar2 = my_register_filename(__fd,param_1,6,1,param_5); if (iVar2 < 0 && -1 < __fd) { puVar4 = (int4 *)_my_thread_var(); uVar1 = *puVar4; close(__fd); my_delete(param_1,0x10); puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar1; } } else { iVar2 = open64(param_2,param_4 & 0xffb6fdbd | 0x490202,0x1b0); if (iVar2 < 0) { piVar6 = __errno_location(); if ((*piVar6 == 0x5f) || (*piVar6 == 0x16)) { my_printf_error(1,"O_TMPFILE is not supported on %s (disabling future attempts)",0x480, param_2); create_temp_file_O_TMPFILE_works = 1; } } else { my_snprintf(param_1,0x200,"%s/#sql/fd=%d",param_2,iVar2); iVar2 = my_register_filename(iVar2,param_1,5,1,param_5); } if (iVar2 == -1) goto LAB_001afacc; } if (-1 < iVar2) { my_tmp_file_created = my_tmp_file_created + 1; } LAB_001afbdf: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
48,461
testing::internal::FailFromInternalError(int)
seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
static void FailFromInternalError(int fd) { Message error; char buffer[256]; int num_read; do { while ((num_read = posix::Read(fd, buffer, 255)) > 0) { buffer[num_read] = '\0'; error << buffer; } } while (num_read == -1 && errno == EINTR); if (num_read == 0) { GTEST_LOG_(FATAL) << error.GetString(); } else { const int last_error = errno; GTEST_LOG_(FATAL) << "Error while reading death test internal: " << GetLastErrnoDescription() << " [" << last_error << "]"; } }
O0
cpp
testing::internal::FailFromInternalError(int): pushq %rbp movq %rsp, %rbp subq $0x1b0, %rsp # imm = 0x1B0 movl %edi, -0x4(%rbp) leaq -0x10(%rbp), %rdi callq 0x2daf0 jmp 0x1fcd9 movl -0x4(%rbp), %edi leaq -0x110(%rbp), %rsi movl $0xff, %edx callq 0x4a750 movl %eax, -0x174(%rbp) jmp 0x1fcf5 movl -0x174(%rbp), %eax movl %eax, -0x114(%rbp) cmpl $0x0, %eax jle 0x1fd40 movslq -0x114(%rbp), %rax movb $0x0, -0x110(%rbp,%rax) leaq -0x10(%rbp), %rdi leaq -0x110(%rbp), %rsi callq 0x55090 jmp 0x1fd27 jmp 0x1fcd9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x120(%rbp) movl %eax, -0x124(%rbp) jmp 0x1ff79 jmp 0x1fd42 xorl %eax, %eax cmpl $-0x1, -0x114(%rbp) movb %al, -0x175(%rbp) jne 0x1fd64 callq 0xb080 cmpl $0x4, (%rax) sete %al movb %al, -0x175(%rbp) movb -0x175(%rbp), %al testb $0x1, %al jne 0x1fcd7 cmpl $0x0, -0x114(%rbp) jne 0x1fe3a leaq 0x53b0c(%rip), %rdx # 0x73892 leaq -0x128(%rbp), %rdi movl $0x3, %esi movl $0x169, %ecx # imm = 0x169 callq 0x27170 jmp 0x1fd9e leaq -0x128(%rbp), %rdi callq 0x18810 movq %rax, -0x180(%rbp) jmp 0x1fdb3 leaq -0x148(%rbp), %rdi leaq -0x10(%rbp), %rsi callq 0x20c50 jmp 0x1fdc5 movq -0x180(%rbp), %rdi leaq -0x148(%rbp), %rsi callq 0xb5a0 jmp 0x1fdda leaq -0x148(%rbp), %rdi callq 0xbe58 leaq -0x128(%rbp), %rdi callq 0x272b0 jmp 0x1ff67 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x120(%rbp) movl %eax, -0x124(%rbp) jmp 0x1fe29 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x120(%rbp) movl %eax, -0x124(%rbp) leaq -0x148(%rbp), %rdi callq 0xbe58 leaq -0x128(%rbp), %rdi callq 0x272b0 jmp 0x1ff79 callq 0xb080 movl (%rax), %eax movl %eax, -0x14c(%rbp) leaq 0x53a44(%rip), %rdx # 0x73892 leaq -0x150(%rbp), %rdi movl $0x3, %esi movl $0x16c, %ecx # imm = 0x16C callq 0x27170 jmp 0x1fe66 leaq -0x150(%rbp), %rdi callq 0x18810 movq %rax, -0x188(%rbp) jmp 0x1fe7b movq -0x188(%rbp), %rdi leaq 0x555ca(%rip), %rsi # 0x75453 callq 0xb640 movq %rax, -0x190(%rbp) jmp 0x1fe97 leaq -0x170(%rbp), %rdi callq 0x1f420 jmp 0x1fea5 movq -0x190(%rbp), %rdi leaq -0x170(%rbp), %rsi callq 0xb5a0 movq %rax, -0x198(%rbp) jmp 0x1fec1 movq -0x198(%rbp), %rdi leaq 0x56335(%rip), %rsi # 0x76204 callq 0xb640 movq %rax, -0x1a0(%rbp) jmp 0x1fedd movq -0x1a0(%rbp), %rdi movl -0x14c(%rbp), %esi callq 0xbcb0 movq %rax, -0x1a8(%rbp) jmp 0x1fef8 movq -0x1a8(%rbp), %rdi leaq 0x53e76(%rip), %rsi # 0x73d7c callq 0xb640 jmp 0x1ff0d leaq -0x170(%rbp), %rdi callq 0xbe58 leaq -0x150(%rbp), %rdi callq 0x272b0 jmp 0x1ff67 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x120(%rbp) movl %eax, -0x124(%rbp) jmp 0x1ff59 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x120(%rbp) movl %eax, -0x124(%rbp) leaq -0x170(%rbp), %rdi callq 0xbe58 leaq -0x150(%rbp), %rdi callq 0x272b0 jmp 0x1ff79 leaq -0x10(%rbp), %rdi callq 0x13ed0 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbp retq leaq -0x10(%rbp), %rdi callq 0x13ed0 movq -0x120(%rbp), %rdi callq 0xbcd0 nop
_ZN7testing8internalL21FailFromInternalErrorEi: push rbp mov rbp, rsp sub rsp, 1B0h mov dword ptr [rbp+var_4], edi lea rdi, [rbp+var_10]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) loc_1FCD7: jmp short $+2 loc_1FCD9: mov edi, dword ptr [rbp+var_4]; this lea rsi, [rbp+var_110]; int mov edx, (offset off_F8+7); void * call _ZN7testing8internal5posix4ReadEiPvj; testing::internal::posix::Read(int,void *,uint) mov [rbp+var_174], eax jmp short $+2 loc_1FCF5: mov eax, [rbp+var_174] mov [rbp+var_114], eax cmp eax, 0 jle short loc_1FD40 movsxd rax, [rbp+var_114] mov byte ptr [rbp+rax+var_110], 0 lea rdi, [rbp+var_10] lea rsi, [rbp+var_110] call _ZN7testing7MessagelsIA256_cEERS0_RKT_; testing::Message::operator<<<char [256]>(char [256] const&) jmp short $+2 loc_1FD27: jmp short loc_1FCD9 mov rcx, rax mov eax, edx mov [rbp+var_120], rcx mov [rbp+var_124], eax jmp loc_1FF79 loc_1FD40: jmp short $+2 loc_1FD42: xor eax, eax cmp [rbp+var_114], 0FFFFFFFFh mov [rbp+var_175], al jnz short loc_1FD64 call ___errno_location cmp dword ptr [rax], 4 setz al mov [rbp+var_175], al loc_1FD64: mov al, [rbp+var_175] test al, 1 jnz loc_1FCD7 cmp [rbp+var_114], 0 jnz loc_1FE3A lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_128] mov esi, 3 mov ecx, 169h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) jmp short $+2 loc_1FD9E: lea rdi, [rbp+var_128]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov [rbp+var_180], rax jmp short $+2 loc_1FDB3: lea rdi, [rbp+var_148] lea rsi, [rbp+var_10] call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void) jmp short $+2 loc_1FDC5: mov rdi, [rbp+var_180] lea rsi, [rbp+var_148] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_1FDDA: lea rdi, [rbp+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_128]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp loc_1FF67 mov rcx, rax mov eax, edx mov [rbp+var_120], rcx mov [rbp+var_124], eax jmp short loc_1FE29 mov rcx, rax mov eax, edx mov [rbp+var_120], rcx mov [rbp+var_124], eax lea rdi, [rbp+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1FE29: lea rdi, [rbp+var_128]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp loc_1FF79 loc_1FE3A: call ___errno_location mov eax, [rax] mov [rbp+var_14C], eax lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_150] mov esi, 3 mov ecx, 16Ch call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) jmp short $+2 loc_1FE66: lea rdi, [rbp+var_150]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov [rbp+var_188], rax jmp short $+2 loc_1FE7B: mov rdi, [rbp+var_188] lea rsi, aErrorWhileRead; "Error while reading death test internal"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_190], rax jmp short $+2 loc_1FE97: lea rdi, [rbp+var_170] call _ZN7testing8internal23GetLastErrnoDescriptionB5cxx11Ev; testing::internal::GetLastErrnoDescription(void) jmp short $+2 loc_1FEA5: mov rdi, [rbp+var_190] lea rsi, [rbp+var_170] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_198], rax jmp short $+2 loc_1FEC1: mov rdi, [rbp+var_198] lea rsi, aMustBeInRange+12h; " [" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_1A0], rax jmp short $+2 loc_1FEDD: mov rdi, [rbp+var_1A0] mov esi, [rbp+var_14C] call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_1A8], rax jmp short $+2 loc_1FEF8: mov rdi, [rbp+var_1A8] lea rsi, aFatal+8; "]" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_1FF0D: lea rdi, [rbp+var_170]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_150]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_1FF67 mov rcx, rax mov eax, edx mov [rbp+var_120], rcx mov [rbp+var_124], eax jmp short loc_1FF59 mov rcx, rax mov eax, edx mov [rbp+var_120], rcx mov [rbp+var_124], eax lea rdi, [rbp+var_170]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1FF59: lea rdi, [rbp+var_150]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_1FF79 loc_1FF67: lea rdi, [rbp+var_10]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() add rsp, 1B0h pop rbp retn loc_1FF79: lea rdi, [rbp+var_10]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() mov rdi, [rbp+var_120] call __Unwind_Resume
void testing::internal::FailFromInternalError(testing::internal *this) { unsigned int v1; // ecx long long v2; // [rsp+8h] [rbp-1A8h] long long v3; // [rsp+10h] [rbp-1A0h] long long v4; // [rsp+18h] [rbp-198h] long long v5; // [rsp+20h] [rbp-190h] void *Stream; // [rsp+28h] [rbp-188h] void *v7; // [rsp+30h] [rbp-180h] bool v8; // [rsp+3Bh] [rbp-175h] _BYTE v9[32]; // [rsp+40h] [rbp-170h] BYREF _BYTE v10[4]; // [rsp+60h] [rbp-150h] BYREF unsigned int v11; // [rsp+64h] [rbp-14Ch] _BYTE v12[32]; // [rsp+68h] [rbp-148h] BYREF _BYTE v13[4]; // [rsp+88h] [rbp-128h] BYREF int v14; // [rsp+9Ch] [rbp-114h] _BYTE v15[256]; // [rsp+A0h] [rbp-110h] BYREF _BYTE v16[12]; // [rsp+1A0h] [rbp-10h] BYREF testing::internal::posix *var4; // [rsp+1ACh] [rbp-4h] LODWORD(var4) = (_DWORD)this; testing::Message::Message((testing::Message *)v16); do { while ( 1 ) { v14 = testing::internal::posix::Read( (testing::internal::posix *)(unsigned int)var4, (int)v15, (char *)off_F8 + 7, v1); if ( v14 <= 0 ) break; v15[v14] = 0; testing::Message::operator<<<char [256]>(v16, v15); } v8 = 0; if ( v14 == -1 ) v8 = *(_DWORD *)__errno_location() == 4; } while ( v8 ); if ( v14 ) { v11 = *(_DWORD *)__errno_location(); testing::internal::GTestLog::GTestLog( v10, 3LL, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/" "gtest-death-test.cc", 364LL); Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v10); v5 = std::operator<<<std::char_traits<char>>(Stream, "Error while reading death test internal: "); testing::internal::GetLastErrnoDescription[abi:cxx11]((long long)v9, (int)"Error while reading death test internal: "); v4 = std::operator<<<char>(v5, v9); v3 = std::operator<<<std::char_traits<char>>(v4, " ["); v2 = std::ostream::operator<<(v3, v11); std::operator<<<std::char_traits<char>>(v2, "]"); std::string::~string(v9); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v10); } else { testing::internal::GTestLog::GTestLog( v13, 3LL, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/" "gtest-death-test.cc", 361LL); v7 = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v13); testing::Message::GetString[abi:cxx11](v12, v16); std::operator<<<char>(v7, v12); std::string::~string(v12); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v13); } testing::Message::~Message((testing::Message *)v16); }
FailFromInternalError: PUSH RBP MOV RBP,RSP SUB RSP,0x1b0 MOV dword ptr [RBP + -0x4],EDI LEA RDI,[RBP + -0x10] CALL 0x0012daf0 LAB_0011fcd7: JMP 0x0011fcd9 LAB_0011fcd9: MOV EDI,dword ptr [RBP + -0x4] LAB_0011fcdc: LEA RSI,[RBP + -0x110] MOV EDX,0xff CALL 0x0014a750 MOV dword ptr [RBP + -0x174],EAX JMP 0x0011fcf5 LAB_0011fcf5: MOV EAX,dword ptr [RBP + -0x174] MOV dword ptr [RBP + -0x114],EAX CMP EAX,0x0 JLE 0x0011fd40 MOVSXD RAX,dword ptr [RBP + -0x114] MOV byte ptr [RBP + RAX*0x1 + -0x110],0x0 LEA RDI,[RBP + -0x10] LEA RSI,[RBP + -0x110] CALL 0x00155090 JMP 0x0011fd27 LAB_0011fd27: JMP 0x0011fcd9 LAB_0011fd40: JMP 0x0011fd42 LAB_0011fd42: XOR EAX,EAX CMP dword ptr [RBP + -0x114],-0x1 MOV byte ptr [RBP + -0x175],AL JNZ 0x0011fd64 CALL 0x0010b080 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RBP + -0x175],AL LAB_0011fd64: MOV AL,byte ptr [RBP + -0x175] TEST AL,0x1 JNZ 0x0011fcd7 CMP dword ptr [RBP + -0x114],0x0 JNZ 0x0011fe3a LEA RDX,[0x173892] LEA RDI,[RBP + -0x128] MOV ESI,0x3 MOV ECX,0x169 CALL 0x00127170 JMP 0x0011fd9e LAB_0011fd9e: LEA RDI,[RBP + -0x128] CALL 0x00118810 MOV qword ptr [RBP + -0x180],RAX JMP 0x0011fdb3 LAB_0011fdb3: LEA RDI,[RBP + -0x148] LEA RSI,[RBP + -0x10] CALL 0x00120c50 JMP 0x0011fdc5 LAB_0011fdc5: MOV RDI,qword ptr [RBP + -0x180] LEA RSI,[RBP + -0x148] CALL 0x0010b5a0 LAB_0011fdd8: JMP 0x0011fdda LAB_0011fdda: LEA RDI,[RBP + -0x148] CALL 0x0010be58 LEA RDI,[RBP + -0x128] CALL 0x001272b0 JMP 0x0011ff67 LAB_0011fe3a: CALL 0x0010b080 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14c],EAX LAB_0011fe47: LEA RDX,[0x173892] LEA RDI,[RBP + -0x150] MOV ESI,0x3 MOV ECX,0x16c CALL 0x00127170 JMP 0x0011fe66 LAB_0011fe66: LEA RDI,[RBP + -0x150] CALL 0x00118810 MOV qword ptr [RBP + -0x188],RAX JMP 0x0011fe7b LAB_0011fe7b: MOV RDI,qword ptr [RBP + -0x188] LEA RSI,[0x175453] CALL 0x0010b640 MOV qword ptr [RBP + -0x190],RAX JMP 0x0011fe97 LAB_0011fe97: LEA RDI,[RBP + -0x170] CALL 0x0011f420 JMP 0x0011fea5 LAB_0011fea5: MOV RDI,qword ptr [RBP + -0x190] LEA RSI,[RBP + -0x170] CALL 0x0010b5a0 MOV qword ptr [RBP + -0x198],RAX JMP 0x0011fec1 LAB_0011fec1: MOV RDI,qword ptr [RBP + -0x198] LEA RSI,[0x176204] CALL 0x0010b640 MOV qword ptr [RBP + -0x1a0],RAX JMP 0x0011fedd LAB_0011fedd: MOV RDI,qword ptr [RBP + -0x1a0] MOV ESI,dword ptr [RBP + -0x14c] CALL 0x0010bcb0 MOV qword ptr [RBP + -0x1a8],RAX JMP 0x0011fef8 LAB_0011fef8: MOV RDI,qword ptr [RBP + -0x1a8] LEA RSI,[0x173d7c] CALL 0x0010b640 LAB_0011ff0b: JMP 0x0011ff0d LAB_0011ff0d: LEA RDI,[RBP + -0x170] CALL 0x0010be58 LEA RDI,[RBP + -0x150] CALL 0x001272b0 JMP 0x0011ff67 LAB_0011ff67: LEA RDI,[RBP + -0x10] CALL 0x00113ed0 ADD RSP,0x1b0 POP RBP RET
/* testing::internal::FailFromInternalError(int) */ void testing::internal::FailFromInternalError(int param_1) { int *piVar1; ostream *poVar2; bool bVar3; internal local_178 [32]; GTestLog local_158 [4]; int local_154; string local_150 [32]; GTestLog local_130 [20]; int local_11c; char local_118 [256]; Message local_18 [12]; int local_c; local_c = param_1; Message::Message(local_18); do { /* try { // try from 0011fcdc to 0011fd9b has its CatchHandler @ 0011fd29 */ while (local_11c = posix::Read(local_c,local_118,0xff), 0 < local_11c) { local_118[local_11c] = '\0'; Message::operator<<(local_18,local_118); } bVar3 = false; if (local_11c == -1) { piVar1 = __errno_location(); bVar3 = *piVar1 == 4; } } while (bVar3); if (local_11c == 0) { GTestLog::GTestLog(local_130,3, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc" ,0x169); /* try { // try from 0011fd9e to 0011fdc2 has its CatchHandler @ 0011fdf7 */ poVar2 = (ostream *)GTestLog::GetStream(); Message::GetString_abi_cxx11_(); /* try { // try from 0011fdc5 to 0011fdd7 has its CatchHandler @ 0011fe0b */ std::operator<<(poVar2,local_150); std::__cxx11::string::~string(local_150); GTestLog::~GTestLog(local_130); } else { piVar1 = __errno_location(); local_154 = *piVar1; /* try { // try from 0011fe47 to 0011fe63 has its CatchHandler @ 0011fd29 */ GTestLog::GTestLog(local_158,3, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc" ,0x16c); /* try { // try from 0011fe66 to 0011fea2 has its CatchHandler @ 0011ff27 */ poVar2 = (ostream *)GTestLog::GetStream(); poVar2 = std::operator<<(poVar2,"Error while reading death test internal: "); GetLastErrnoDescription_abi_cxx11_(local_178); /* try { // try from 0011fea5 to 0011ff0a has its CatchHandler @ 0011ff3b */ poVar2 = std::operator<<(poVar2,(string *)local_178); poVar2 = std::operator<<(poVar2," ["); poVar2 = (ostream *)std::ostream::operator<<(poVar2,local_154); std::operator<<(poVar2,"]"); std::__cxx11::string::~string((string *)local_178); GTestLog::~GTestLog(local_158); } Message::~Message(local_18); return; }
48,462
YAML::SingleDocParser::ParseTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/singledocparser.cpp
void SingleDocParser::ParseTag(std::string& tag) { Token& token = m_scanner.peek(); if (!tag.empty()) throw ParserException(token.mark, ErrorMsg::MULTIPLE_TAGS); Tag tagInfo(token); tag = tagInfo.Translate(m_directives); m_scanner.pop(); }
O3
cpp
YAML::SingleDocParser::ParseTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rsi, %r15 movq %rdi, %rbx movq 0x8(%rdi), %rdi callq 0x63cac movq %rax, %r14 cmpq $0x0, 0x8(%r15) jne 0x6c882 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x6e1d0 movq 0x10(%rbx), %rdx leaq 0x50(%rsp), %rdi movq %r12, %rsi callq 0x6e27a leaq 0x50(%rsp), %r14 movq %r15, %rdi movq %r14, %rsi callq 0x2c6a0 movq (%r14), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi je 0x6c836 movq 0x60(%rsp), %rsi incq %rsi callq 0x2d2d0 movq 0x8(%rbx), %rdi callq 0x63c84 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6c85a movq 0x40(%rsp), %rsi incq %rsi callq 0x2d2d0 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6c875 movq 0x20(%rsp), %rsi incq %rsi callq 0x2d2d0 addq $0x70, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x40, %edi callq 0x2c800 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xf85ed(%rip), %rsi # 0x164e8c leaq 0xf8612(%rip), %rdx # 0x164eb8 leaq 0x8(%rsp), %rdi callq 0x2c610 addq $0x8, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x47336 leaq 0x19cc22(%rip), %rax # 0x2094f0 addq $0x10, %rax movq %rax, (%rbx) xorl %ebp, %ebp leaq 0x19cc3a(%rip), %rsi # 0x209518 leaq -0xc1b9(%rip), %rdx # 0x6072c movq %rbx, %rdi callq 0x2e0f0 jmp 0x6c91d movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x6c909 movq 0x18(%rsp), %rsi incq %rsi callq 0x2d2d0 testb %bpl, %bpl jne 0x6c913 jmp 0x6c92a movq %rax, %r14 movq %rbx, %rdi callq 0x2cc80 jmp 0x6c92a movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x6cb20 movq %r14, %rdi callq 0x2e220
_ZN4YAML15SingleDocParser8ParseTagERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 70h mov r15, rsi mov rbx, rdi mov rdi, [rdi+8]; this call _ZN4YAML7Scanner4peekEv; YAML::Scanner::peek(void) mov r14, rax cmp qword ptr [r15+8], 0 jnz loc_6C882 lea r12, [rsp+98h+var_90] mov rdi, r12; this mov rsi, r14; YAML::Token * call _ZN4YAML3TagC2ERKNS_5TokenE; YAML::Tag::Tag(YAML::Token const&) mov rdx, [rbx+10h] lea rdi, [rsp+98h+var_48] mov rsi, r12 call _ZN4YAML3Tag9TranslateB5cxx11ERKNS_10DirectivesE; YAML::Tag::Translate(YAML::Directives const&) lea r14, [rsp+98h+var_48] mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+98h+var_38] cmp rdi, rax jz short loc_6C836 mov rsi, [rsp+98h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6C836: mov rdi, [rbx+8]; this call _ZN4YAML7Scanner3popEv; YAML::Scanner::pop(void) lea rax, [rsp+98h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6C85A mov rsi, [rsp+98h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6C85A: lea rax, [rsp+98h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6C875 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6C875: add rsp, 70h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6C882: mov edi, 40h ; '@'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+98h+var_80] mov [r15-10h], r15 lea rsi, aCannotAssignMu; "cannot assign multiple tags to the same"... lea rdx, aCannotAssignMu+2Ch; "" lea rdi, [rsp+98h+var_90] 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) add r14, 8 mov bpl, 1 lea rdx, [rsp+98h+var_90] mov rdi, rbx mov rsi, r14 call _ZN4YAML9ExceptionC2ERKNS_4MarkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::Exception::Exception(YAML::Mark const&,std::string const&) lea rax, _ZTVN4YAML15ParserExceptionE; `vtable for'YAML::ParserException add rax, 10h mov [rbx], rax xor ebp, ebp lea rsi, _ZTIN4YAML15ParserExceptionE; lptinfo lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_6C91D mov r14, rax mov rdi, [rsp+98h+var_90]; void * cmp rdi, r15 jz short loc_6C909 mov rsi, [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6C909: test bpl, bpl jnz short loc_6C913 jmp short loc_6C92A mov r14, rax loc_6C913: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_6C92A loc_6C91D: mov r14, rax lea rdi, [rsp+98h+var_90]; this call _ZN4YAML3TagD2Ev; YAML::Tag::~Tag() loc_6C92A: mov rdi, r14 call __Unwind_Resume
void YAML::SingleDocParser::ParseTag(long long a1, _QWORD *a2) { const YAML::Token *v2; // rax int v3; // r14d _QWORD *exception; // rbx int v5; // ecx int v6; // r8d int v7; // r9d void *v8; // [rsp+8h] [rbp-90h] BYREF long long *v9; // [rsp+10h] [rbp-88h] long long v10; // [rsp+18h] [rbp-80h] BYREF long long v11; // [rsp+20h] [rbp-78h] BYREF long long *v12; // [rsp+30h] [rbp-68h] long long v13; // [rsp+40h] [rbp-58h] BYREF void *v14[2]; // [rsp+50h] [rbp-48h] BYREF long long v15; // [rsp+60h] [rbp-38h] BYREF v2 = (const YAML::Token *)YAML::Scanner::peek(*(YAML::Scanner **)(a1 + 8)); v3 = (int)v2; if ( a2[1] ) { exception = __cxa_allocate_exception(0x40uLL); v8 = &v10; std::string::_M_construct<char const*>(&v8, "cannot assign multiple tags to the same node", ""); YAML::Exception::Exception((_DWORD)exception, v3 + 8, (unsigned int)&v8, v5, v6, v7); *exception = &`vtable for'YAML::ParserException + 2; __cxa_throw( exception, (struct type_info *)&`typeinfo for'YAML::ParserException, (void (*)(void *))YAML::Exception::~Exception); } YAML::Tag::Tag((YAML::Tag *)&v8, v2); YAML::Tag::Translate[abi:cxx11](v14, &v8, *(_QWORD *)(a1 + 16)); std::string::operator=(a2, (long long)v14); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); YAML::Scanner::pop(*(YAML::Scanner **)(a1 + 8)); if ( v12 != &v13 ) operator delete(v12, v13 + 1); if ( v9 != &v11 ) operator delete(v9, v11 + 1); }
ParseTag: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x70 MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] CALL 0x00163cac MOV R14,RAX CMP qword ptr [R15 + 0x8],0x0 JNZ 0x0016c882 LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R14 CALL 0x0016e1d0 MOV RDX,qword ptr [RBX + 0x10] LAB_0016c7ff: LEA RDI,[RSP + 0x50] MOV RSI,R12 CALL 0x0016e27a LEA R14,[RSP + 0x50] MOV RDI,R15 MOV RSI,R14 CALL 0x0012c6a0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x60] CMP RDI,RAX JZ 0x0016c836 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x0012d2d0 LAB_0016c836: MOV RDI,qword ptr [RBX + 0x8] LAB_0016c83a: CALL 0x00163c84 LAB_0016c83f: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016c85a MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x0012d2d0 LAB_0016c85a: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016c875 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0012d2d0 LAB_0016c875: ADD RSP,0x70 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016c882: MOV EDI,0x40 CALL 0x0012c800 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0016c898: LEA RSI,[0x264e8c] LEA RDX,[0x264eb8] LEA RDI,[RSP + 0x8] CALL 0x0012c610 ADD R14,0x8 MOV BPL,0x1 LAB_0016c8b7: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 CALL 0x00147336 LEA RAX,[0x3094f0] ADD RAX,0x10 MOV qword ptr [RBX],RAX XOR EBP,EBP LEA RSI,[0x309518] LEA RDX,[0x16072c] MOV RDI,RBX CALL 0x0012e0f0
/* YAML::SingleDocParser::ParseTag(std::__cxx11::string&) */ void __thiscall YAML::SingleDocParser::ParseTag(SingleDocParser *this,string *param_1) { Token *pTVar1; Exception *this_00; int1 *local_90; long *local_88; int1 local_80 [8]; long local_78 [2]; long *local_68; long local_58 [2]; long *local_48 [2]; long local_38 [2]; pTVar1 = (Token *)Scanner::peek(*(Scanner **)(this + 8)); if (*(long *)(param_1 + 8) == 0) { Tag::Tag((Tag *)&local_90,pTVar1); /* try { // try from 0016c7ff to 0016c80b has its CatchHandler @ 0016c91d */ Tag::Translate_abi_cxx11_((Tag *)local_48,(Directives *)&local_90); std::__cxx11::string::operator=(param_1,(string *)local_48); if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } /* try { // try from 0016c83a to 0016c83e has its CatchHandler @ 0016c8ed */ Scanner::pop(*(Scanner **)(this + 8)); if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } return; } this_00 = (Exception *)__cxa_allocate_exception(0x40); local_90 = local_80; /* try { // try from 0016c898 to 0016c8af has its CatchHandler @ 0016c910 */ std::__cxx11::string::_M_construct<char_const*> (&local_90,"cannot assign multiple tags to the same node",""); /* try { // try from 0016c8b7 to 0016c8ec has its CatchHandler @ 0016c8ef */ Exception::Exception(this_00,(Mark *)(pTVar1 + 8),(string *)&local_90); *(int ***)this_00 = &PTR__BadInsert_00309500; /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&ParserException::typeinfo,BadInsert::~BadInsert); }
48,463
minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/minja.hpp
Value(const json & v) { if (v.is_object()) { auto object = std::make_shared<ObjectType>(); for (auto it = v.begin(); it != v.end(); ++it) { (*object)[it.key()] = it.value(); } object_ = std::move(object); } else if (v.is_array()) { auto array = std::make_shared<ArrayType>(); for (const auto& item : v) { array->push_back(Value(item)); } array_ = array; } else { primitive_ = v; } }
O3
cpp
minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r15 leaq 0x40(%rdi), %r14 movq $0x0, 0x48(%rdi) xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x30(%rdi) movq %rdi, (%rsp) movb $0x0, 0x40(%rdi) movq %r14, %rdi movl $0x1, %esi callq 0x5099a movq %r14, %rdi movl $0x1, %esi callq 0x5099a movzbl (%r15), %eax cmpl $0x2, %eax je 0x604e9 cmpl $0x1, %eax jne 0x6063e movq %r14, 0x8(%rsp) movl $0x30, %edi callq 0x197d0 movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x8f0a4(%rip), %rcx # 0xef458 addq $0x10, %rcx movq %rcx, (%rax) movq %rax, %r13 addq $0x10, %r13 xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq %rax, 0x10(%rsp) movq $0x0, 0x20(%rax) leaq 0x88(%rsp), %rbp movq %r15, (%rbp) movups %xmm0, 0x8(%rbp) movq %rdx, 0x18(%rbp) movq %rbp, %rdi callq 0x60d5e leaq 0x30(%rsp), %rbx leaq 0x68(%rsp), %r14 leaq 0x28(%rsp), %r12 movq %r15, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x40(%rsp) movq %r12, %rdi callq 0x610a8 movq %rbp, %rdi movq %r12, %rsi callq 0x60dd0 testb %al, %al jne 0x60691 movq %rbp, %rdi callq 0x60a64 movq %r12, %rdi movq %rax, %rsi callq 0x6031c movq %rbp, %rdi callq 0x6086c movq %r13, %rdi movq %rax, %rsi callq 0x60770 movq %rax, %rdi movq %r12, %rsi callq 0x60948 movq %r14, %rdi xorl %esi, %esi callq 0x5099a movq %r14, %rdi callq 0x5d0d4 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x60488 callq 0x31b9a movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x60497 callq 0x31b9a movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x604a6 callq 0x31b9a movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x604dc movq 0x90ae1(%rip), %rax # 0xf0f98 cmpb $0x0, (%rax) je 0x604c7 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x604d1 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x604dc movq (%rdi), %rax callq *0x18(%rax) movq %rbp, %rdi callq 0x60a16 jmp 0x60401 movq %r14, 0x8(%rsp) movl $0x28, %edi callq 0x197d0 leaq 0x20(%rsp), %rdx movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x8ef96(%rip), %rcx # 0xef4a8 addq $0x10, %rcx movq %rcx, (%rax) movq %rax, %rcx addq $0x10, %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq $0x0, 0x20(%rax) movq %rax, (%rdx) movq %rcx, -0x8(%rdx) leaq 0x88(%rsp), %r14 movq %r15, (%r14) movups %xmm0, 0x8(%r14) movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000 movq %rbx, 0x18(%r14) movq %r14, %rdi callq 0x60d5e leaq 0xa8(%rsp), %r13 movq %r15, (%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r13) movq %rbx, 0x18(%r13) movq %r13, %rdi callq 0x610a8 leaq 0x68(%rsp), %r15 leaq 0x28(%rsp), %rbp movq 0x90a0b(%rip), %rbx # 0xf0f98 movq %r14, %rdi movq %r13, %rsi callq 0x60dd0 testb %al, %al jne 0x6066f movq %r14, %rdi callq 0x60a64 movq 0x18(%rsp), %r12 movq %rbp, %rdi movq %rax, %rsi callq 0x6031c movq %r12, %rdi movq %rbp, %rsi callq 0x61abc movq %r15, %rdi xorl %esi, %esi callq 0x5099a movq %r15, %rdi callq 0x5d0d4 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x605e4 callq 0x31b9a movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x605f3 callq 0x31b9a movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x60602 callq 0x31b9a movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x60631 cmpb $0x0, (%rbx) je 0x6061c movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x60626 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x60631 movq (%rdi), %rax callq *0x18(%rax) movq %r14, %rdi callq 0x60a16 jmp 0x6058d leaq 0x78(%rsp), %rdi movq %r15, %rsi callq 0x48edc leaq 0x78(%rsp), %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x48c02 movq %rbx, %rdi xorl %esi, %esi callq 0x5099a movq %rbx, %rdi callq 0x5d0d4 jmp 0x606b0 movq 0x18(%rsp), %rax movq (%rsp), %rdi movq %rax, 0x10(%rdi) addq $0x18, %rdi leaq 0x20(%rsp), %rsi callq 0x61d26 movq 0x20(%rsp), %rdi jmp 0x606a6 movq (%rsp), %rax movq %r13, 0x20(%rax) movq 0x28(%rax), %rdi movq 0x10(%rsp), %rcx movq %rcx, 0x28(%rax) testq %rdi, %rdi je 0x606b0 callq 0x31b9a addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, 0x8(%rsp) jmp 0x606cb jmp 0x606cb movq %rax, %r14 jmp 0x60712 jmp 0x606e7 jmp 0x60700 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x5090e jmp 0x60703 jmp 0x60700 jmp 0x606e7 movq %rax, %r14 jmp 0x606f9 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x5090e movq 0x10(%rsp), %rdi jmp 0x6070d movq %rax, %r14 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x60712 callq 0x31b9a movq 0x8(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5099a movq %rbx, %rdi callq 0x5d0d4 movq (%rsp), %rax movq 0x38(%rax), %rdi testq %rdi, %rdi je 0x6073b callq 0x31b9a movq (%rsp), %rax movq 0x28(%rax), %rdi testq %rdi, %rdi je 0x6074d callq 0x31b9a movq (%rsp), %rax movq 0x18(%rax), %rdi testq %rdi, %rdi je 0x6075f callq 0x31b9a movq (%rsp), %rdi callq 0x52a86 movq %r14, %rdi callq 0x19dc0
_ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r15, rsi lea r14, [rdi+40h] mov qword ptr [rdi+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+30h], xmm0 mov [rsp+0F8h+var_F8], rdi mov byte ptr [rdi+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) movzx eax, byte ptr [r15] cmp eax, 2 jz loc_604E9 cmp eax, 1 jnz loc_6063E mov [rsp+0F8h+var_F0], r14 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rdx, 8000000000000000h mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<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>>>,std::allocator<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> add rcx, 10h mov [rax], rcx mov r13, rax add r13, 10h xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov [rsp+0F8h+var_E8], rax mov qword ptr [rax+20h], 0 lea rbp, [rsp+0F8h+var_70] mov [rbp+0], r15 movups xmmword ptr [rbp+8], xmm0 mov [rbp+18h], rdx mov rdi, rbp call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; 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>::set_begin(void) lea rbx, [rsp+0F8h+var_C8] lea r14, [rsp+0F8h+var_90] lea r12, [rsp+0F8h+var_D0] loc_60401: mov [rsp+0F8h+var_D0], r15 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rax, 8000000000000000h mov [rsp+0F8h+var_B8], rax mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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>::set_end(void) mov rdi, rbp mov rsi, r12 call _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_ test al, al jnz loc_60691 mov rdi, rbp call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; 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>::operator*(void) mov rdi, r12 mov rsi, rax call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, rbp call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void) mov rdi, r13 mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ mov rdi, rax mov rsi, r12 call _ZN5minja5ValueaSEOS0_; minja::Value::operator=(minja::Value&&) 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+0F8h+var_98] test rdi, rdi jz short loc_60488 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_60488: mov rdi, [rsp+0F8h+var_A8] test rdi, rdi jz short loc_60497 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_60497: mov rdi, [rsp+0F8h+var_B8] test rdi, rdi jz short loc_604A6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_604A6: mov rdi, [rsp+0F8h+var_C8] test rdi, rdi jz short loc_604DC mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_604C7 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_604D1 loc_604C7: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_604D1: cmp eax, 1 jnz short loc_604DC mov rax, [rdi] call qword ptr [rax+18h] loc_604DC: mov rdi, rbp call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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>::operator++(void) jmp loc_60401 loc_604E9: mov [rsp+0F8h+var_F0], r14 mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) lea rdx, [rsp+0F8h+var_D8] mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceISt6vectorIN5minja5ValueESaIS2_EESaIS4_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<std::vector<minja::Value>,std::allocator<std::vector<minja::Value>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx mov rcx, rax add rcx, 10h xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov qword ptr [rax+20h], 0 mov [rdx], rax mov [rdx-8], rcx lea r14, [rsp+0F8h+var_70] mov [r14], r15 movups xmmword ptr [r14+8], xmm0 mov rbx, 8000000000000000h mov [r14+18h], rbx mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; 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>::set_begin(void) lea r13, [rsp+0F8h+var_50] mov [r13+0], r15 xorps xmm0, xmm0 movups xmmword ptr [r13+8], xmm0 mov [r13+18h], rbx mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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>::set_end(void) lea r15, [rsp+0F8h+var_90] lea rbp, [rsp+0F8h+var_D0] mov rbx, cs:__libc_single_threaded_ptr loc_6058D: mov rdi, r14 mov rsi, r13 call _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_ test al, al jnz loc_6066F mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; 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>::operator*(void) mov r12, [rsp+0F8h+var_E0] mov rdi, rbp mov rsi, rax call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, r12 mov rsi, rbp call _ZNSt6vectorIN5minja5ValueESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<minja::Value>::emplace_back<minja::Value>(minja::Value &&) 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+0F8h+var_98] test rdi, rdi jz short loc_605E4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_605E4: mov rdi, [rsp+0F8h+var_A8] test rdi, rdi jz short loc_605F3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_605F3: mov rdi, [rsp+0F8h+var_B8] test rdi, rdi jz short loc_60602 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_60602: mov rdi, [rsp+0F8h+var_C8] test rdi, rdi jz short loc_60631 cmp byte ptr [rbx], 0 jz short loc_6061C mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_60626 loc_6061C: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_60626: cmp eax, 1 jnz short loc_60631 mov rax, [rdi] call qword ptr [rax+18h] loc_60631: mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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>::operator++(void) jmp loc_6058D loc_6063E: lea rdi, [rsp+0F8h+var_80] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(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&) lea rbx, [rsp+0F8h+var_80] mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, 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() jmp short loc_606B0 loc_6066F: mov rax, [rsp+0F8h+var_E0] mov rdi, [rsp+0F8h+var_F8] mov [rdi+10h], rax add rdi, 18h lea rsi, [rsp+0F8h+var_D8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rdi, [rsp+0F8h+var_D8] jmp short loc_606A6 loc_60691: mov rax, [rsp+0F8h+var_F8] mov [rax+20h], r13 mov rdi, [rax+28h] mov rcx, [rsp+0F8h+var_E8] mov [rax+28h], rcx loc_606A6: test rdi, rdi jz short loc_606B0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_606B0: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov [rsp+arg_0], r14 jmp short loc_606CB jmp short $+2 loc_606CB: mov r14, rax jmp short loc_60712 jmp short loc_606E7 jmp short loc_60700 mov r14, rax lea rdi, [rsp+arg_20]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_60703 jmp short loc_60700 jmp short $+2 loc_606E7: mov r14, rax jmp short loc_606F9 mov r14, rax lea rdi, [rsp+arg_20]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_606F9: mov rdi, [rsp+arg_8] jmp short loc_6070D loc_60700: mov r14, rax loc_60703: mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_60712 loc_6070D: call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_60712: mov rbx, [rsp+arg_0] 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 rax, [rsp+0] mov rdi, [rax+38h] test rdi, rdi jz short loc_6073B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6073B: mov rax, [rsp+0] mov rdi, [rax+28h] test rdi, rdi jz short loc_6074D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6074D: mov rax, [rsp+0] mov rdi, [rax+18h] test rdi, rdi jz short loc_6075F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6075F: mov rdi, [rsp+0] call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this() mov rdi, r14 call __Unwind_Resume
char * minja::Value::Value(long long a1, unsigned __int8 *a2) { int v2; // eax long long v3; // rax long long v4; // r13 int v5; // eax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d long long v10; // rax long long v11; // rax long long v12; // rdi signed __int32 v13; // eax long long v14; // rax int v15; // eax int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d long long v20; // rdi signed __int32 v21; // eax char *result; // rax volatile signed __int32 *v23; // rdi long long v25; // [rsp+10h] [rbp-E8h] long long v26; // [rsp+18h] [rbp-E0h] volatile signed __int32 *v27; // [rsp+20h] [rbp-D8h] BYREF unsigned __int8 *v28; // [rsp+28h] [rbp-D0h] BYREF __int128 v29; // [rsp+30h] [rbp-C8h] volatile signed __int32 *v30; // [rsp+40h] [rbp-B8h] volatile signed __int32 *v31; // [rsp+50h] [rbp-A8h] volatile signed __int32 *v32; // [rsp+60h] [rbp-98h] void **v33[2]; // [rsp+68h] [rbp-90h] BYREF void **v34[2]; // [rsp+78h] [rbp-80h] BYREF unsigned __int8 *v35; // [rsp+88h] [rbp-70h] BYREF __int128 v36; // [rsp+90h] [rbp-68h] unsigned long long v37; // [rsp+A0h] [rbp-58h] unsigned __int8 *v38; // [rsp+A8h] [rbp-50h] BYREF __int128 v39; // [rsp+B0h] [rbp-48h] unsigned long long v40; // [rsp+C0h] [rbp-38h] *(_QWORD *)(a1 + 72) = 0LL; *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); v2 = *a2; if ( v2 == 2 ) { v14 = operator new(0x28uLL); *(_QWORD *)(v14 + 8) = 0x100000001LL; *(_QWORD *)v14 = &`vtable for'std::_Sp_counted_ptr_inplace<std::vector<minja::Value>,std::allocator<std::vector<minja::Value>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v14 + 16) = 0LL; *(_QWORD *)(v14 + 32) = 0LL; v27 = (volatile signed __int32 *)v14; v26 = v14 + 16; v35 = a2; v36 = 0LL; v37 = 0x8000000000000000LL; 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>::set_begin( &v35, 1LL); v38 = a2; v39 = 0LL; v40 = 0x8000000000000000LL; 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>::set_end(&v38); while ( !(unsigned __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_( &v35, &v38) ) { v15 = 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*(&v35); minja::Value::Value((unsigned int)&v28, v15, v16, v17, v18, v19); std::vector<minja::Value>::emplace_back<minja::Value>(v26, &v28); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v33); 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(v33); if ( v32 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v32); if ( v31 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31); if ( v30 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30); v20 = v29; if ( (_QWORD)v29 ) { if ( _libc_single_threaded ) { v21 = *(_DWORD *)(v29 + 12); *(_DWORD *)(v29 + 12) = v21 - 1; } else { v21 = _InterlockedExchangeAdd((volatile signed __int32 *)(v29 + 12), 0xFFFFFFFF); } if ( v21 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v20 + 24LL))(v20, 0LL); } 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++( &v35, 0LL); } *(_QWORD *)(a1 + 16) = v26; result = (char *)std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(a1 + 24, &v27); v23 = v27; } else { if ( v2 != 1 ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)v34, (long long)a2); 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>::operator=( (char *)(a1 + 64), (char *)v34); 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 *)v34); 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(v34); return result; } v3 = operator new(0x30uLL); *(_QWORD *)(v3 + 8) = 0x100000001LL; *(_QWORD *)v3 = &`vtable for'std::_Sp_counted_ptr_inplace<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>>>,std::allocator<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> + 2; v4 = v3 + 16; *(_OWORD *)(v3 + 16) = 0LL; v25 = v3; *(_QWORD *)(v3 + 32) = 0LL; v35 = a2; v36 = 0LL; v37 = 0x8000000000000000LL; 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>::set_begin( &v35, 1LL); while ( 1 ) { v28 = a2; v29 = 0LL; v30 = (volatile signed __int32 *)0x8000000000000000LL; 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>::set_end(&v28); if ( (unsigned __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_( &v35, &v28) ) break; v5 = 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*(&v35); minja::Value::Value((unsigned int)&v28, v5, v6, v7, v8, v9); v10 = 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(&v35); v11 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_( v4, v10); minja::Value::operator=(v11, &v28); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v33); 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(v33); if ( v32 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v32); if ( v31 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31); if ( v30 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30); v12 = v29; if ( (_QWORD)v29 ) { if ( _libc_single_threaded ) { v13 = *(_DWORD *)(v29 + 12); *(_DWORD *)(v29 + 12) = v13 - 1; } else { v13 = _InterlockedExchangeAdd((volatile signed __int32 *)(v29 + 12), 0xFFFFFFFF); } if ( v13 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v12 + 24LL))(v12, 0LL); } 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++( &v35, 0LL); } result = (char *)a1; *(_QWORD *)(a1 + 32) = v4; v23 = *(volatile signed __int32 **)(a1 + 40); *(_QWORD *)(a1 + 40) = v25; } if ( v23 ) return (char *)std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23); return result; }
Value: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R15,RSI LEA R14,[RDI + 0x40] MOV qword ptr [RDI + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [RSP],RDI MOV byte ptr [RDI + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015099a MOV RDI,R14 MOV ESI,0x1 CALL 0x0015099a MOVZX EAX,byte ptr [R15] CMP EAX,0x2 JZ 0x001604e9 CMP EAX,0x1 JNZ 0x0016063e LAB_00160386: MOV qword ptr [RSP + 0x8],R14 MOV EDI,0x30 CALL 0x001197d0 MOV RDX,-0x8000000000000000 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1ef458] ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV R13,RAX ADD R13,0x10 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RAX + 0x20],0x0 LEA RBP,[RSP + 0x88] MOV qword ptr [RBP],R15 MOVUPS xmmword ptr [RBP + 0x8],XMM0 MOV qword ptr [RBP + 0x18],RDX MOV RDI,RBP CALL 0x00160d5e LEA RBX,[RSP + 0x30] LEA R14,[RSP + 0x68] LEA R12,[RSP + 0x28] LAB_00160401: MOV qword ptr [RSP + 0x28],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RAX,-0x8000000000000000 MOV qword ptr [RSP + 0x40],RAX MOV RDI,R12 CALL 0x001610a8 LAB_00160423: MOV RDI,RBP MOV RSI,R12 CALL 0x00160dd0 TEST AL,AL JNZ 0x00160691 LAB_00160436: MOV RDI,RBP CALL 0x00160a64 MOV RDI,R12 MOV RSI,RAX CALL 0x0016031c LAB_00160449: MOV RDI,RBP CALL 0x0016086c MOV RDI,R13 MOV RSI,RAX CALL 0x00160770 LAB_0016045c: MOV RDI,RAX MOV RSI,R12 CALL 0x00160948 MOV RDI,R14 XOR ESI,ESI CALL 0x0015099a MOV RDI,R14 CALL 0x0015d0d4 MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x00160488 CALL 0x00131b9a LAB_00160488: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x00160497 CALL 0x00131b9a LAB_00160497: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x001604a6 CALL 0x00131b9a LAB_001604a6: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x001604dc MOV RAX,qword ptr [0x001f0f98] CMP byte ptr [RAX],0x0 JZ 0x001604c7 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001604d1 LAB_001604c7: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001604d1: CMP EAX,0x1 JNZ 0x001604dc MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001604dc: MOV RDI,RBP CALL 0x00160a16 JMP 0x00160401 LAB_001604e9: MOV qword ptr [RSP + 0x8],R14 MOV EDI,0x28 CALL 0x001197d0 LEA RDX,[RSP + 0x20] MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1ef4a8] ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV RCX,RAX ADD RCX,0x10 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],0x0 MOV qword ptr [RDX],RAX MOV qword ptr [RDX + -0x8],RCX LEA R14,[RSP + 0x88] MOV qword ptr [R14],R15 MOVUPS xmmword ptr [R14 + 0x8],XMM0 MOV RBX,-0x8000000000000000 MOV qword ptr [R14 + 0x18],RBX MOV RDI,R14 CALL 0x00160d5e LEA R13,[RSP + 0xa8] MOV qword ptr [R13],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13 + 0x8],XMM0 MOV qword ptr [R13 + 0x18],RBX MOV RDI,R13 CALL 0x001610a8 LEA R15,[RSP + 0x68] LEA RBP,[RSP + 0x28] MOV RBX,qword ptr [0x001f0f98] LAB_0016058d: MOV RDI,R14 MOV RSI,R13 CALL 0x00160dd0 TEST AL,AL JNZ 0x0016066f LAB_001605a0: MOV RDI,R14 CALL 0x00160a64 MOV R12,qword ptr [RSP + 0x18] LAB_001605ad: MOV RDI,RBP MOV RSI,RAX CALL 0x0016031c LAB_001605b8: MOV RDI,R12 MOV RSI,RBP CALL 0x00161abc LAB_001605c3: MOV RDI,R15 XOR ESI,ESI CALL 0x0015099a MOV RDI,R15 CALL 0x0015d0d4 MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x001605e4 CALL 0x00131b9a LAB_001605e4: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x001605f3 CALL 0x00131b9a LAB_001605f3: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x00160602 CALL 0x00131b9a LAB_00160602: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00160631 CMP byte ptr [RBX],0x0 JZ 0x0016061c MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00160626 LAB_0016061c: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00160626: CMP EAX,0x1 JNZ 0x00160631 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00160631: MOV RDI,R14 CALL 0x00160a16 JMP 0x0016058d LAB_0016063e: LEA RDI,[RSP + 0x78] MOV RSI,R15 CALL 0x00148edc LAB_0016064b: LEA RBX,[RSP + 0x78] MOV RDI,R14 MOV RSI,RBX CALL 0x00148c02 MOV RDI,RBX XOR ESI,ESI CALL 0x0015099a MOV RDI,RBX CALL 0x0015d0d4 JMP 0x001606b0 LAB_0016066f: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP] MOV qword ptr [RDI + 0x10],RAX ADD RDI,0x18 LEA RSI,[RSP + 0x20] CALL 0x00161d26 MOV RDI,qword ptr [RSP + 0x20] JMP 0x001606a6 LAB_00160691: MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x20],R13 MOV RDI,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x28],RCX LAB_001606a6: TEST RDI,RDI JZ 0x001606b0 CALL 0x00131b9a LAB_001606b0: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::Value::Value(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&) */ void __thiscall minja::Value::Value(Value *this,basic_json *param_1) { int *piVar1; int *puVar2; char cVar3; int iVar4; int8 *puVar5; basic_json *pbVar6; int8 uVar7; Value *this_00; vector<minja::Value,std::allocator<minja::Value>> *this_01; bool bVar8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_02; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d8; basic_json *local_d0; long *local_c8; int8 uStack_c0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98; data local_90 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_80 [16]; basic_json *local_70; int8 local_68; int8 uStack_60; int8 local_58; basic_json *local_50; int8 local_48; int8 uStack_40; int8 local_38; *(int8 *)(this + 0x48) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; this[0x40] = (Value)0x0; bVar8 = SUB81((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(this + 0x40),0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar8); 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(bVar8); local_70 = param_1; if (*param_1 == (basic_json)0x2) { /* try { // try from 001604e9 to 001604f7 has its CatchHandler @ 001606c9 */ local_d8 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x28); *(int8 *)(local_d8 + 8) = 0x100000001; *(int ***)local_d8 = &PTR___Sp_counted_ptr_inplace_001ef4b8; this_01 = (vector<minja::Value,std::allocator<minja::Value>> *)(local_d8 + 0x10); *(int8 *)(local_d8 + 0x10) = 0; *(int8 *)(local_d8 + 0x18) = 0; *(int8 *)(local_d8 + 0x20) = 0; local_68 = 0; uStack_60 = 0; local_58 = 0x8000000000000000; 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> ::set_begin((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> *)&local_70); local_48 = 0; uStack_40 = 0; local_38 = 0x8000000000000000; local_50 = param_1; 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> ::set_end((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> *)&local_50); puVar2 = PTR___libc_single_threaded_001f0f98; /* try { // try from 0016058d to 00160597 has its CatchHandler @ 00160700 */ while (cVar3 = _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_ ((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> *)&local_70, (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> *)&local_50), cVar3 == '\0') { /* try { // try from 001605a0 to 001605a7 has its CatchHandler @ 001606e3 */ pbVar6 = (basic_json *) nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_70); /* try { // try from 001605ad to 001605b7 has its CatchHandler @ 001606d2 */ Value((Value *)&local_d0,pbVar6); /* try { // try from 001605b8 to 001605c2 has its CatchHandler @ 001606d4 */ std::vector<minja::Value,std::allocator<minja::Value>>::emplace_back<minja::Value> (this_01,(Value *)&local_d0); 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_90,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_90); if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98); } if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8); } if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8); } if (local_c8 != (long *)0x0) { if (*puVar2 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_c8 + 0x18))(); } } /* try { // try from 00160631 to 00160638 has its CatchHandler @ 00160700 */ nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_70); } *(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) = this_01; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(this + 0x18), (__shared_count *)&local_d8); this_02 = local_d8; } else { if (*param_1 != (basic_json)0x1) { /* try { // try from 0016063e to 0016064a has its CatchHandler @ 001606c2 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_80,param_1); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(this + 0x40),(data *)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((data *)local_80,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((data *)local_80); return; } /* try { // try from 00160386 to 00160394 has its CatchHandler @ 001606cb */ puVar5 = (int8 *)operator_new(0x30); puVar5[1] = 0x100000001; *puVar5 = &PTR___Sp_counted_ptr_inplace_001ef468; puVar5[2] = 0; puVar5[3] = 0; puVar5[4] = 0; local_68 = 0; uStack_60 = 0; local_58 = 0x8000000000000000; 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> ::set_begin((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> *)&local_70); while( true ) { local_c8 = (long *)0x0; uStack_c0 = 0; local_b8 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x8000000000000000; local_d0 = param_1; 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> ::set_end((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> *)&local_d0); /* try { // try from 00160423 to 0016042d has its CatchHandler @ 001606e5 */ cVar3 = _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_ ((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> *)&local_70, (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> *)&local_d0); if (cVar3 != '\0') break; /* try { // try from 00160436 to 00160448 has its CatchHandler @ 001606e7 */ pbVar6 = (basic_json *) nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_70); Value((Value *)&local_d0,pbVar6); /* try { // try from 00160449 to 0016045b has its CatchHandler @ 001606ec */ uVar7 = 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((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> *)&local_70); this_00 = (Value *)_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ (puVar5 + 2,uVar7); operator=(this_00,(Value *)&local_d0); 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_90,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_90); if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98); } if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8); } if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8); } if (local_c8 != (long *)0x0) { if (*PTR___libc_single_threaded_001f0f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_c8 + 0x18))(); } } /* try { // try from 001604dc to 001604e3 has its CatchHandler @ 001606d0 */ nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_70); } *(int8 **)(this + 0x20) = puVar5 + 2; this_02 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28); *(int8 **)(this + 0x28) = puVar5; } if (this_02 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_02); } return; }
48,464
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
llama.cpp/common/chat.cpp
bool common_chat_verify_template(const std::string & tmpl, bool use_jinja) { if (use_jinja) { try { common_chat_msg msg; msg.role = "user"; msg.content = "test"; auto tmpls = common_chat_templates_init(/* model= */ nullptr, tmpl); common_chat_templates_inputs inputs; inputs.messages = {msg}; common_chat_templates_apply(tmpls.get(), inputs); return true; } catch (const std::exception & e) { LOG_ERR("%s: failed to apply template: %s\n", __func__, e.what()); return false; } } llama_chat_message chat[] = {{"user", "test"}}; const int res = llama_chat_apply_template(tmpl.c_str(), chat, 1, true, nullptr, 0); return res >= 0; }
O3
cpp
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %rdi, %rbx testl %esi, %esi je 0x93554 leaq 0x170(%rsp), %rax movq %rax, -0x10(%rax) xorl %ecx, %ecx movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x190(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x1e0(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x40(%rax) movups %xmm0, -0x30(%rax) movups %xmm0, -0x20(%rax) movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x200(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x220(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x8bbcb(%rip), %rcx # 0x11eee7 leaq 0x160(%rsp), %rdi movl $0x4, %r8d xorl %esi, %esi xorl %edx, %edx callq 0x20850 leaq 0x180(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x858de(%rip), %rcx # 0x118c24 movl $0x4, %r8d xorl %esi, %esi callq 0x20850 leaq 0xa0(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x8c4db(%rip), %rdx # 0x11f841 leaq 0x90(%rsp), %rdi movq %rdx, %rsi callq 0x28870 leaq 0x20(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x8c4ba(%rip), %rdx # 0x11f841 leaq 0x10(%rsp), %rdi movq %rdx, %rsi callq 0x28870 leaq 0x8(%rsp), %rdi leaq 0x90(%rsp), %rcx leaq 0x10(%rsp), %r8 xorl %esi, %esi movq %rbx, %rdx callq 0x9369e movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x933c7 movq 0x20(%rsp), %rsi incq %rsi callq 0x20180 movq 0x90(%rsp), %rdi cmpq %r15, %rdi je 0x933e4 movq 0xa0(%rsp), %rsi incq %rsi callq 0x20180 xorl %eax, %eax leaq 0x38(%rsp), %r14 movq %rax, -0x18(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x28(%r14) movq %r14, -0x10(%r14) movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movw $0x101, 0x10(%r12) # imm = 0x101 movaps %xmm0, 0x18(%r12) movups %xmm0, 0x25(%r12) movb $0x1, 0x35(%r12) leaq 0x90(%rsp), %rdi leaq 0x160(%rsp), %rsi callq 0xb18b8 leaq 0x160(%rsp), %rdx leaq 0x10(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xd24da leaq 0x90(%rsp), %rdi callq 0xb0ffe movq 0x8(%rsp), %r15 leaq 0x230(%rsp), %rdi leaq 0x10(%rsp), %rdx movq %r15, %rsi callq 0x93ccf leaq 0x2b0(%rsp), %rdi callq 0x278c6 leaq 0x298(%rsp), %rdi callq 0x278c6 leaq 0x280(%rsp), %rbx movq %rbx, %rdi callq 0x288ea movq -0x28(%rbx), %rdi leaq 0x268(%rsp), %rax cmpq %rax, %rdi je 0x934d0 movq 0x268(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x70(%rsp), %rbx leaq 0x248(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x934f6 movq 0x248(%rsp), %rsi incq %rsi callq 0x20180 movq %rbx, %rdi callq 0xb1888 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x93515 movq 0x58(%rsp), %rsi incq %rsi callq 0x20180 movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x9352c movq 0x38(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x10(%rsp), %rdi callq 0xb115a testq %r15, %r15 je 0x93543 movq %r15, %rdi callq 0x9681b leaq 0x160(%rsp), %rdi callq 0xb0ffe movb $0x1, %al jmp 0x93583 movaps 0xcccd5(%rip), %xmm0 # 0x160230 leaq 0x160(%rsp), %rsi movaps %xmm0, (%rsi) movq (%rbx), %rdi movl $0x1, %edx movl $0x1, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x207b0 testl %eax, %eax setns %al addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rdx, %r14 movq %rax, %rbx jmp 0x935ba movq %rdx, %r14 movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0xb0ffe jmp 0x935b5 movq %rdx, %r14 movq %rax, %rbx movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rdi callq 0xb1ab0 testq %r15, %r15 je 0x9361f movq %r15, %rdi callq 0x9681b jmp 0x9361f movq %rdx, %r14 movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x935f8 movq 0x20(%rsp), %rsi incq %rsi callq 0x20180 jmp 0x935f8 movq %rdx, %r14 movq %rax, %rbx movq 0x90(%rsp), %rdi cmpq %r15, %rdi je 0x9361f movq 0xa0(%rsp), %rsi incq %rsi callq 0x20180 jmp 0x9361f jmp 0x93619 movq %rdx, %r14 movq %rax, %rbx leaq 0x160(%rsp), %rdi callq 0xb0ffe cmpl $0x1, %r14d jne 0x9368e movq %rbx, %rdi callq 0x200b0 movq %rax, %rbx leaq 0xd029c(%rip), %rax # 0x1638e0 cmpl $0x0, (%rax) js 0x9367a callq 0x10d343 movq %rax, %r14 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x8b88b(%rip), %rdx # 0x11eeec leaq 0x8b8a6(%rip), %rcx # 0x11ef0e movq %r14, %rdi movl $0x4, %esi movq %rax, %r8 xorl %eax, %eax callq 0x10d3e0 callq 0x20d50 xorl %eax, %eax jmp 0x93583 movq %rax, %rbx callq 0x20d50 movq %rbx, %rdi callq 0x20ae0 movq %rax, %rdi callq 0x2868d
_Z27common_chat_verify_templateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: push r15 push r14 push r12 push rbx sub rsp, 2C8h mov rbx, rdi test esi, esi jz loc_93554 lea rax, [rsp+2E8h+var_178] mov [rax-10h], rax xor ecx, ecx mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_158] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_108] xorps xmm0, xmm0 movups xmmword ptr [rax-40h], xmm0 movups xmmword ptr [rax-30h], xmm0 movups xmmword ptr [rax-20h], xmm0 mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_E8] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_C8] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rcx, aUser; "user" lea rdi, [rsp+2E8h+var_188] mov r8d, 4 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea rdi, [rsp+2E8h+var_168] mov rdx, [rdi+8] lea rcx, aLatest+2; "test" mov r8d, 4 xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea r15, [rsp+2E8h+var_248] mov [r15-10h], r15 lea rdx, aExampleToolCal+1Dh; "" lea rdi, [rsp+2E8h+var_258] mov rsi, rdx 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+2E8h+var_2C8] mov [r12-10h], r12 lea rdx, aExampleToolCal+1Dh; "" lea rdi, [rsp+2E8h+var_2D8] mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+2E8h+var_2E0] lea rcx, [rsp+2E8h+var_258] lea r8, [rsp+2E8h+var_2D8] xor esi, esi mov rdx, rbx call _Z26common_chat_templates_initPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_; common_chat_templates_init(llama_model const*,std::string const&,std::string const&,std::string const&) mov rdi, [rsp+2E8h+var_2D8]; void * cmp rdi, r12 jz short loc_933C7 mov rsi, [rsp+2E8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_933C7: mov rdi, [rsp+2E8h+var_258]; void * cmp rdi, r15 jz short loc_933E4 mov rsi, [rsp+2E8h+var_248] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_933E4: xor eax, eax lea r14, [rsp+2E8h+var_2B0] mov [r14-18h], rax xorps xmm0, xmm0 movaps xmmword ptr [r14-28h], xmm0 mov [r14-10h], r14 mov [r14-8], rax mov [r14], al lea r12, [rsp+2E8h+var_290] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov word ptr [r12+10h], 101h movaps xmmword ptr [r12+18h], xmm0 movups xmmword ptr [r12+25h], xmm0 mov byte ptr [r12+35h], 1 lea rdi, [rsp+2E8h+var_258]; this lea rsi, [rsp+2E8h+var_188]; common_chat_msg * call _ZN15common_chat_msgC2ERKS_; common_chat_msg::common_chat_msg(common_chat_msg const&) lea rdx, [rsp+2E8h+var_188] lea rdi, [rsp+2E8h+var_2D8] lea rsi, [rsp+2E8h+var_258] call _ZNSt6vectorI15common_chat_msgSaIS0_EE13_M_assign_auxIPKS0_EEvT_S6_St20forward_iterator_tag; std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(common_chat_msg const*,common_chat_msg const*,std::forward_iterator_tag) lea rdi, [rsp+2E8h+var_258]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov r15, [rsp+2E8h+var_2E0] lea rdi, [rsp+2E8h+var_B8] lea rdx, [rsp+2E8h+var_2D8] mov rsi, r15 call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&) lea rdi, [rsp+2E8h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+2E8h+var_50] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rbx, [rsp+2E8h+var_68] mov rdi, rbx call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector() mov rdi, [rbx-28h]; void * lea rax, [rsp+2E8h+var_80] cmp rdi, rax jz short loc_934D0 mov rsi, [rsp+2E8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_934D0: lea rbx, [rsp+2E8h+var_278] lea rax, [rsp+2E8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_934F6 mov rsi, [rsp+2E8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_934F6: mov rdi, rbx call _ZNSt6vectorI16common_chat_toolSaIS0_EED2Ev; std::vector<common_chat_tool>::~vector() mov rdi, [rsp+2E8h+var_2A0]; void * cmp rdi, r12 jz short loc_93515 mov rsi, [rsp+2E8h+var_290] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_93515: mov rdi, [rsp+2E8h+var_2C0]; void * cmp rdi, r14 jz short loc_9352C mov rsi, [rsp+2E8h+var_2B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9352C: lea rdi, [rsp+2E8h+var_2D8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() test r15, r15 jz short loc_93543 mov rdi, r15; void * call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *) loc_93543: lea rdi, [rsp+2E8h+var_188]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov al, 1 jmp short loc_93583 loc_93554: movaps xmm0, xmmword ptr cs:off_160230; "user" lea rsi, [rsp+2E8h+var_188] movaps xmmword ptr [rsi], xmm0 mov rdi, [rbx] mov edx, 1 mov ecx, 1 xor r8d, r8d xor r9d, r9d call _llama_chat_apply_template test eax, eax setns al loc_93583: add rsp, 2C8h pop rbx pop r12 pop r14 pop r15 retn mov r14, rdx mov rbx, rax jmp short loc_935BA mov r14, rdx mov rbx, rax lea rdi, [rsp+2E8h+var_258]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() jmp short loc_935B5 mov r14, rdx mov rbx, rax loc_935B5: mov r15, [rsp+2E8h+var_2E0] loc_935BA: lea rdi, [rsp+2E8h+var_2D8]; this call _ZN28common_chat_templates_inputsD2Ev; common_chat_templates_inputs::~common_chat_templates_inputs() test r15, r15 jz short loc_9361F mov rdi, r15; void * call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *) jmp short loc_9361F mov r14, rdx mov rbx, rax mov rdi, [rsp+2E8h+var_2D8]; void * cmp rdi, r12 jz short loc_935F8 mov rsi, [rsp+2E8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_935F8 mov r14, rdx mov rbx, rax loc_935F8: mov rdi, [rsp+2E8h+var_258]; void * cmp rdi, r15 jz short loc_9361F mov rsi, [rsp+2E8h+var_248] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9361F jmp short $+2 loc_93619: mov r14, rdx mov rbx, rax loc_9361F: lea rdi, [rsp+2E8h+var_188]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14d, 1 jnz short loc_9368E mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_9367A call _Z15common_log_mainv; common_log_main(void) mov r14, rax mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdx, aSFailedToApply; "%s: failed to apply template: %s\n" lea rcx, aCommonChatVeri; "common_chat_verify_template" mov rdi, r14 mov esi, 4 mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_9367A: call ___cxa_end_catch xor eax, eax jmp loc_93583 mov rbx, rax call ___cxa_end_catch loc_9368E: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
bool common_chat_verify_template(_QWORD *a1, int a2) { void *v2; // r15 void *v4; // [rsp+8h] [rbp-2E0h] BYREF __int128 v5; // [rsp+10h] [rbp-2D8h] BYREF long long v6; // [rsp+20h] [rbp-2C8h] BYREF void *v7; // [rsp+28h] [rbp-2C0h] long long v8; // [rsp+30h] [rbp-2B8h] _QWORD v9[2]; // [rsp+38h] [rbp-2B0h] BYREF void *v10; // [rsp+48h] [rbp-2A0h] long long v11; // [rsp+50h] [rbp-298h] _QWORD v12[2]; // [rsp+58h] [rbp-290h] BYREF __int16 v13; // [rsp+68h] [rbp-280h] _BYTE v14[32]; // [rsp+70h] [rbp-278h] BYREF void *v15[2]; // [rsp+90h] [rbp-258h] BYREF _QWORD v16[24]; // [rsp+A0h] [rbp-248h] BYREF __int128 v17; // [rsp+160h] [rbp-188h] BYREF char v18; // [rsp+170h] [rbp-178h] BYREF char *v19; // [rsp+180h] [rbp-168h] BYREF long long v20; // [rsp+188h] [rbp-160h] char v21; // [rsp+190h] [rbp-158h] BYREF __int128 v22; // [rsp+1A0h] [rbp-148h] __int128 v23; // [rsp+1B0h] [rbp-138h] __int128 v24; // [rsp+1C0h] [rbp-128h] char *v25; // [rsp+1D0h] [rbp-118h] long long v26; // [rsp+1D8h] [rbp-110h] char v27; // [rsp+1E0h] [rbp-108h] BYREF char *v28; // [rsp+1F0h] [rbp-F8h] long long v29; // [rsp+1F8h] [rbp-F0h] char v30; // [rsp+200h] [rbp-E8h] BYREF char *v31; // [rsp+210h] [rbp-D8h] long long v32; // [rsp+218h] [rbp-D0h] char v33; // [rsp+220h] [rbp-C8h] BYREF _BYTE v34[8]; // [rsp+230h] [rbp-B8h] BYREF long long *v35; // [rsp+238h] [rbp-B0h] long long v36; // [rsp+248h] [rbp-A0h] BYREF long long *v37; // [rsp+258h] [rbp-90h] long long v38; // [rsp+268h] [rbp-80h] BYREF _BYTE v39[24]; // [rsp+280h] [rbp-68h] BYREF _BYTE v40[24]; // [rsp+298h] [rbp-50h] BYREF _BYTE v41[56]; // [rsp+2B0h] [rbp-38h] BYREF if ( a2 ) { *(_QWORD *)&v17 = &v18; *((_QWORD *)&v17 + 1) = 0LL; v18 = 0; v19 = &v21; v20 = 0LL; v21 = 0; v22 = 0LL; v23 = 0LL; v24 = 0LL; v25 = &v27; v26 = 0LL; v27 = 0; v28 = &v30; v29 = 0LL; v30 = 0; v31 = &v33; v32 = 0LL; v33 = 0; std::string::_M_replace(&v17, 0LL, 0LL, "user", 4LL); std::string::_M_replace(&v19, 0LL, v20, "test", 4LL); v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "", (long long)""); *(_QWORD *)&v5 = &v6; std::string::_M_construct<char const*>((long long)&v5, "", (long long)""); common_chat_templates_init(&v4, 0LL, a1, v15, &v5); if ( (long long *)v5 != &v6 ) operator delete((void *)v5, v6 + 1); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); v6 = 0LL; v5 = 0LL; v7 = v9; v8 = 0LL; LOBYTE(v9[0]) = 0; v10 = v12; v11 = 0LL; LOBYTE(v12[0]) = 0; v13 = 257; memset(v14, 0, 29); v14[29] = 1; common_chat_msg::common_chat_msg((common_chat_msg *)v15, (const common_chat_msg *)&v17); std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(&v5, v15, &v17); common_chat_msg::~common_chat_msg((common_chat_msg *)v15); v2 = v4; common_chat_templates_apply(v34, v4, &v5); std::vector<std::string>::~vector((long long)v41); std::vector<std::string>::~vector((long long)v40); std::vector<common_grammar_trigger>::~vector((long long)v39); if ( v37 != &v38 ) operator delete(v37, v38 + 1); if ( v35 != &v36 ) operator delete(v35, v36 + 1); std::vector<common_chat_tool>::~vector(v14); if ( v10 != v12 ) operator delete(v10, v12[0] + 1LL); if ( v7 != v9 ) operator delete(v7, v9[0] + 1LL); std::vector<common_chat_msg>::~vector(&v5); if ( v2 ) common_chat_templates_free(v2); common_chat_msg::~common_chat_msg((common_chat_msg *)&v17); return 1; } else { v17 = *(_OWORD *)&off_160230; return (int)llama_chat_apply_template(*a1, &v17, 1LL, 1LL, 0LL, 0LL) >= 0; } }
common_chat_verify_template: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RBX,RDI TEST ESI,ESI JZ 0x00193554 LEA RAX,[RSP + 0x170] MOV qword ptr [RAX + -0x10],RAX XOR ECX,ECX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x190] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x1e0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x40],XMM0 MOVUPS xmmword ptr [RAX + -0x30],XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x200] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x220] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LAB_00193315: LEA RCX,[0x21eee7] LEA RDI,[RSP + 0x160] MOV R8D,0x4 XOR ESI,ESI XOR EDX,EDX CALL 0x00120850 LEA RDI,[RSP + 0x180] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x218c24] MOV R8D,0x4 XOR ESI,ESI CALL 0x00120850 LEA R15,[RSP + 0xa0] MOV qword ptr [R15 + -0x10],R15 LAB_0019335f: LEA RDX,[0x21f841] LEA RDI,[RSP + 0x90] MOV RSI,RDX CALL 0x00128870 LEA R12,[RSP + 0x20] MOV qword ptr [R12 + -0x10],R12 LAB_00193380: LEA RDX,[0x21f841] LEA RDI,[RSP + 0x10] MOV RSI,RDX CALL 0x00128870 LAB_00193394: LEA RDI,[RSP + 0x8] LEA RCX,[RSP + 0x90] LEA R8,[RSP + 0x10] XOR ESI,ESI MOV RDX,RBX CALL 0x0019369e MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001933c7 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00120180 LAB_001933c7: MOV RDI,qword ptr [RSP + 0x90] CMP RDI,R15 JZ 0x001933e4 MOV RSI,qword ptr [RSP + 0xa0] INC RSI CALL 0x00120180 LAB_001933e4: XOR EAX,EAX LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x18],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x28],XMM0 MOV qword ptr [R14 + -0x10],R14 MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV word ptr [R12 + 0x10],0x101 MOVAPS xmmword ptr [R12 + 0x18],XMM0 MOVUPS xmmword ptr [R12 + 0x25],XMM0 MOV byte ptr [R12 + 0x35],0x1 LAB_0019342f: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x160] CALL 0x001b18b8 LEA RDX,[RSP + 0x160] LAB_0019344c: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x90] CALL 0x001d24da LEA RDI,[RSP + 0x90] CALL 0x001b0ffe MOV R15,qword ptr [RSP + 0x8] LAB_00193470: LEA RDI,[RSP + 0x230] LEA RDX,[RSP + 0x10] MOV RSI,R15 CALL 0x00193ccf LAB_00193485: LEA RDI,[RSP + 0x2b0] CALL 0x001278c6 LEA RDI,[RSP + 0x298] CALL 0x001278c6 LEA RBX,[RSP + 0x280] MOV RDI,RBX CALL 0x001288ea MOV RDI,qword ptr [RBX + -0x28] LEA RAX,[RSP + 0x268] CMP RDI,RAX JZ 0x001934d0 MOV RSI,qword ptr [RSP + 0x268] INC RSI CALL 0x00120180 LAB_001934d0: LEA RBX,[RSP + 0x70] LEA RAX,[RSP + 0x248] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001934f6 MOV RSI,qword ptr [RSP + 0x248] INC RSI CALL 0x00120180 LAB_001934f6: MOV RDI,RBX CALL 0x001b1888 MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 JZ 0x00193515 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00120180 LAB_00193515: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x0019352c MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00120180 LAB_0019352c: LEA RDI,[RSP + 0x10] CALL 0x001b115a TEST R15,R15 JZ 0x00193543 MOV RDI,R15 CALL 0x0019681b LAB_00193543: LEA RDI,[RSP + 0x160] CALL 0x001b0ffe MOV AL,0x1 JMP 0x00193583 LAB_00193554: MOVAPS XMM0,xmmword ptr [0x00260230] LEA RSI,[RSP + 0x160] MOVAPS xmmword ptr [RSI],XMM0 MOV RDI,qword ptr [RBX] MOV EDX,0x1 MOV ECX,0x1 XOR R8D,R8D XOR R9D,R9D CALL 0x001207b0 TEST EAX,EAX SETNS AL LAB_00193583: ADD RSP,0x2c8 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_verify_template(std::__cxx11::string const&, bool) */ bool common_chat_verify_template(string *param_1,bool param_2) { int iVar1; int7 in_register_00000031; bool bVar2; common_chat_templates_inputs *local_2e0; long *local_2d8; int8 uStack_2d0; long local_2c8; int1 *local_2c0; int8 local_2b8; int1 local_2b0; int7 uStack_2af; int1 *local_2a0; int8 local_298; int1 local_290; int7 uStack_28f; int2 local_280; int8 local_278; int5 uStack_270; int3 uStack_26b; int5 uStack_268; int8 uStack_263; int1 local_25b; long *local_258 [2]; long local_248 [24]; int8 local_188; int8 uStack_180; int1 local_178 [16]; int1 *local_168; char *local_160; int1 local_158 [16]; int8 local_148; int8 uStack_140; int8 local_138; int8 uStack_130; int8 local_128; int8 uStack_120; int1 *local_118; int8 local_110; int1 local_108 [16]; int1 *local_f8; int8 local_f0; int1 local_e8 [16]; int1 *local_d8; int8 local_d0; int1 local_c8 [16]; common_chat_templates local_b8 [8]; long *local_b0; long local_a0 [2]; long *local_90; long local_80 [3]; vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_68 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_50 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_38 [24]; if ((int)CONCAT71(in_register_00000031,param_2) == 0) { local_188 = (int1 *)CONCAT44(PTR_DAT_00260230._4_4_,PTR_DAT_00260230._0_4_); uStack_180 = CONCAT44(PTR_s_test_00260238._4_4_,PTR_s_test_00260238._0_4_); iVar1 = llama_chat_apply_template(*(int8 *)param_1,&local_188,1,1,0,0); bVar2 = -1 < iVar1; } else { local_188 = local_178; uStack_180 = 0; local_178[0] = 0; local_168 = local_158; local_160 = (char *)0x0; local_158[0] = 0; local_118 = local_108; local_148 = 0; uStack_140 = 0; local_138 = 0; uStack_130 = 0; local_128 = 0; uStack_120 = 0; local_110 = 0; local_108[0] = 0; local_f8 = local_e8; local_f0 = 0; local_e8[0] = 0; local_d8 = local_c8; local_d0 = 0; local_c8[0] = 0; /* try { // try from 00193315 to 00193352 has its CatchHandler @ 00193619 */ std::__cxx11::string::_M_replace((ulong)&local_188,0,(char *)0x0,0x21eee7); std::__cxx11::string::_M_replace((ulong)&local_168,0,local_160,0x218c24); /* try { // try from 0019335f to 00193375 has its CatchHandler @ 00193617 */ local_258[0] = local_248; std::__cxx11::string::_M_construct<char_const*>(local_258,""); /* try { // try from 00193380 to 00193393 has its CatchHandler @ 001935f2 */ local_2d8 = &local_2c8; std::__cxx11::string::_M_construct<char_const*>(&local_2d8); /* try { // try from 00193394 to 001933af has its CatchHandler @ 001935d3 */ common_chat_templates_init((llama_model *)&local_2e0,(string *)0x0,param_1,(string *)local_258); if (local_2d8 != &local_2c8) { operator_delete(local_2d8,local_2c8 + 1); } if (local_258[0] != local_248) { operator_delete(local_258[0],local_248[0] + 1); } local_2c8 = 0; local_2d8 = (long *)0x0; uStack_2d0 = 0; local_2b8 = 0; local_2b0 = 0; local_298 = 0; local_290 = 0; local_280 = 0x101; local_278 = 0; uStack_270 = 0; uStack_26b = 0; uStack_268 = 0; uStack_263 = 0; local_25b = 1; /* try { // try from 0019342f to 00193443 has its CatchHandler @ 001935af */ local_2c0 = &local_2b0; local_2a0 = &local_290; common_chat_msg::common_chat_msg((common_chat_msg *)local_258,(common_chat_msg *)&local_188); /* try { // try from 0019344c to 0019345d has its CatchHandler @ 0019359a */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>:: _M_assign_aux<common_chat_msg_const*>(&local_2d8,local_258,&local_188); common_chat_msg::~common_chat_msg((common_chat_msg *)local_258); /* try { // try from 00193470 to 00193484 has its CatchHandler @ 00193592 */ common_chat_templates_apply(local_b8,local_2e0); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_38); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_50); std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_68); if (local_90 != local_80) { operator_delete(local_90,local_80[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } std::vector<common_chat_tool,std::allocator<common_chat_tool>>::~vector ((vector<common_chat_tool,std::allocator<common_chat_tool>> *)&local_278); if (local_2a0 != &local_290) { operator_delete(local_2a0,CONCAT71(uStack_28f,local_290) + 1); } if (local_2c0 != &local_2b0) { operator_delete(local_2c0,CONCAT71(uStack_2af,local_2b0) + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_2d8); if (local_2e0 != (common_chat_templates_inputs *)0x0) { common_chat_templates_free((common_chat_templates *)local_2e0); } common_chat_msg::~common_chat_msg((common_chat_msg *)&local_188); bVar2 = true; } return bVar2; }
48,465
llama_graph_compute(llama_context&, ggml_cgraph*, int, ggml_threadpool*)
monkey531[P]llama/src/llama.cpp
static enum ggml_status llama_graph_compute( llama_context & lctx, ggml_cgraph * gf, int n_threads, ggml_threadpool * threadpool) { if (lctx.backend_cpu != nullptr) { auto * reg = ggml_backend_dev_backend_reg(ggml_backend_get_device(lctx.backend_cpu)); auto * set_threadpool_fn = (decltype(ggml_backend_cpu_set_threadpool) *) ggml_backend_reg_get_proc_address(reg, "ggml_backend_cpu_set_threadpool"); set_threadpool_fn(lctx.backend_cpu, threadpool); } // set the number of threads for all the backends for (const auto & set_n_threads_fn : lctx.set_n_threads_fns) { set_n_threads_fn.second(set_n_threads_fn.first, n_threads); } auto status = ggml_backend_sched_graph_compute_async(lctx.sched.get(), gf); if (status != GGML_STATUS_SUCCESS) { LLAMA_LOG_ERROR("%s: ggml_backend_sched_graph_compute_async failed with error %d\n", __func__, status); } // fprintf(stderr, "splits: %d\n", ggml_backend_sched_get_n_splits(lctx.sched)); return status; }
O3
cpp
llama_graph_compute(llama_context&, ggml_cgraph*, int, ggml_threadpool*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 movq 0x2a8(%rdi), %rdi testq %rdi, %rdi je 0x761a3 movq %rcx, %r15 callq 0x64120 movq %rax, %rdi callq 0x65d30 leaq 0x9b2fd(%rip), %rsi # 0x11148c movq %rax, %rdi callq 0x67d00 movq 0x2a8(%r14), %rdi movq %r15, %rsi callq *%rax movq 0x290(%r14), %r15 movq 0x298(%r14), %r12 cmpq %r12, %r15 je 0x761c5 movq (%r15), %rdi movl %ebp, %esi callq *0x8(%r15) addq $0x10, %r15 jmp 0x761b1 movq 0x3d0(%r14), %rdi movq %rbx, %rsi callq 0x649d0 movl %eax, %ebx testl %eax, %eax je 0x761f6 leaq 0x9b2cb(%rip), %rsi # 0x1114ac leaq 0x9b305(%rip), %rdx # 0x1114ed movl $0x4, %edi movl %ebx, %ecx xorl %eax, %eax callq 0x67d20 movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZL19llama_graph_computeR13llama_contextP11ggml_cgraphiP15ggml_threadpool: push rbp push r15 push r14 push r12 push rbx mov ebp, edx mov rbx, rsi mov r14, rdi mov rdi, [rdi+2A8h] test rdi, rdi jz short loc_761A3 mov r15, rcx call _ggml_backend_get_device mov rdi, rax call _ggml_backend_dev_backend_reg lea rsi, aGgmlBackendCpu_1; "ggml_backend_cpu_set_threadpool" mov rdi, rax call _ggml_backend_reg_get_proc_address mov rdi, [r14+2A8h] mov rsi, r15 call rax loc_761A3: mov r15, [r14+290h] mov r12, [r14+298h] loc_761B1: cmp r15, r12 jz short loc_761C5 mov rdi, [r15] mov esi, ebp call qword ptr [r15+8] add r15, 10h jmp short loc_761B1 loc_761C5: mov rdi, [r14+3D0h] mov rsi, rbx call _ggml_backend_sched_graph_compute_async mov ebx, eax test eax, eax jz short loc_761F6 lea rsi, aSGgmlBackendSc; "%s: ggml_backend_sched_graph_compute_as"... lea rdx, aLlamaGraphComp; "llama_graph_compute" mov edi, 4 mov ecx, ebx xor eax, eax call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...) loc_761F6: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long llama_graph_compute(_QWORD *a1, long long a2, unsigned int a3, long long a4) { long long v6; // rdi long long device; // rax long long v9; // rax void ( *proc_address)(_QWORD, long long); // rax long long v11; // r15 long long v12; // r12 unsigned int v13; // eax int v14; // r8d int v15; // r9d unsigned int v16; // ebx v6 = a1[85]; if ( v6 ) { device = ggml_backend_get_device(v6); v9 = ggml_backend_dev_backend_reg(device); proc_address = (void ( *)(_QWORD, long long))ggml_backend_reg_get_proc_address( v9, "ggml_backend_cpu_set_threadpool"); proc_address(a1[85], a4); } v11 = a1[82]; v12 = a1[83]; while ( v11 != v12 ) { (*(void ( **)(_QWORD, _QWORD))(v11 + 8))(*(_QWORD *)v11, a3); v11 += 16LL; } v13 = ggml_backend_sched_graph_compute_async(a1[122], a2); v16 = v13; if ( v13 ) llama_log_internal( 4, (unsigned int)"%s: ggml_backend_sched_graph_compute_async failed with error %d\n", (unsigned int)"llama_graph_compute", v13, v14, v15); return v16; }
llama_graph_compute: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,EDX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x2a8] TEST RDI,RDI JZ 0x001761a3 MOV R15,RCX CALL 0x00164120 MOV RDI,RAX CALL 0x00165d30 LEA RSI,[0x21148c] MOV RDI,RAX CALL 0x00167d00 MOV RDI,qword ptr [R14 + 0x2a8] MOV RSI,R15 CALL RAX LAB_001761a3: MOV R15,qword ptr [R14 + 0x290] MOV R12,qword ptr [R14 + 0x298] LAB_001761b1: CMP R15,R12 JZ 0x001761c5 MOV RDI,qword ptr [R15] MOV ESI,EBP CALL qword ptr [R15 + 0x8] ADD R15,0x10 JMP 0x001761b1 LAB_001761c5: MOV RDI,qword ptr [R14 + 0x3d0] MOV RSI,RBX CALL 0x001649d0 MOV EBX,EAX TEST EAX,EAX JZ 0x001761f6 LEA RSI,[0x2114ac] LEA RDX,[0x2114ed] MOV EDI,0x4 MOV ECX,EBX XOR EAX,EAX CALL 0x00167d20 LAB_001761f6: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* llama_graph_compute(llama_context&, ggml_cgraph*, int, ggml_threadpool*) */ int llama_graph_compute(llama_context *param_1,ggml_cgraph *param_2,int param_3, ggml_threadpool *param_4) { int8 *puVar1; int iVar2; int8 uVar3; code *pcVar4; int8 *puVar5; if (*(long *)(param_1 + 0x2a8) != 0) { uVar3 = ggml_backend_get_device(); uVar3 = ggml_backend_dev_backend_reg(uVar3); pcVar4 = (code *)ggml_backend_reg_get_proc_address(uVar3,"ggml_backend_cpu_set_threadpool"); (*pcVar4)(*(int8 *)(param_1 + 0x2a8),param_4); } puVar1 = *(int8 **)(param_1 + 0x298); for (puVar5 = *(int8 **)(param_1 + 0x290); puVar5 != puVar1; puVar5 = puVar5 + 2) { (*(code *)puVar5[1])(*puVar5,param_3); } iVar2 = ggml_backend_sched_graph_compute_async(*(int8 *)(param_1 + 0x3d0),param_2); if (iVar2 != 0) { llama_log_internal(4,"%s: ggml_backend_sched_graph_compute_async failed with error %d\n", "llama_graph_compute",iVar2); } return iVar2; }
48,466
google::protobuf::DescriptorProto::_internal_has_options() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.h
inline bool DescriptorProto::_internal_has_options() const { bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr); return value; }
O0
c
google::protobuf::DescriptorProto::_internal_has_options() const: subq $0x98, %rsp movq %rdi, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) addq $0x10, %rax movq %rax, 0x90(%rsp) movl $0x0, 0x8c(%rsp) movq 0x90(%rsp), %rax movslq 0x8c(%rsp), %rcx movl (%rax,%rcx,4), %eax andl $0x2, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movb %al, 0x7f(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x87680 jmp 0x87729 movb 0x7f(%rsp), %al movb $0x0, 0x3f(%rsp) testb $0x1, %al je 0x8769c movq 0x20(%rsp), %rax cmpq $0x0, 0xe0(%rax) je 0x8769e jmp 0x876ee leaq 0x1688a4(%rip), %rdx # 0x1eff49 leaq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x265c, %ecx # imm = 0x265C callq 0x237e0 movq 0x10(%rsp), %rdi movb $0x1, 0x3f(%rsp) leaq 0x168921(%rip), %rsi # 0x1efff0 callq 0x230a0 movq %rax, 0x18(%rsp) jmp 0x876db movq 0x18(%rsp), %rsi leaq 0x2b(%rsp), %rdi callq 0x23250 jmp 0x876ec jmp 0x876ee testb $0x1, 0x3f(%rsp) jne 0x876f7 jmp 0x87701 leaq 0x40(%rsp), %rdi callq 0x23820 jmp 0x87675 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) testb $0x1, 0x3f(%rsp) jne 0x8771d jmp 0x87727 leaq 0x40(%rsp), %rdi callq 0x23820 jmp 0x8775c movb $0x1, %al testb $0x1, 0x7f(%rsp) movb %al, 0xf(%rsp) je 0x8774a movq 0x20(%rsp), %rax cmpq $0x0, 0xe0(%rax) setne %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al movb 0x7f(%rsp), %al andb $0x1, %al addq $0x98, %rsp retq movq 0x30(%rsp), %rdi callq 0x13750 nopw %cs:(%rax,%rax)
_ZNK6google8protobuf15DescriptorProto21_internal_has_optionsEv: sub rsp, 98h mov [rsp+98h+var_18], rdi mov rax, [rsp+98h+var_18] mov [rsp+98h+var_78], rax add rax, 10h mov [rsp+98h+var_8], rax mov [rsp+98h+var_C], 0 mov rax, [rsp+98h+var_8] movsxd rcx, [rsp+98h+var_C] mov eax, [rax+rcx*4] and eax, 2 cmp eax, 0 setnz al and al, 1 mov [rsp+98h+var_19], al loc_87675: xor eax, eax test al, 1 jnz short loc_87680 jmp loc_87729 loc_87680: mov al, [rsp+98h+var_19] mov [rsp+98h+var_59], 0 test al, 1 jz short loc_8769C mov rax, [rsp+98h+var_78] cmp qword ptr [rax+0E0h], 0 jz short loc_8769E loc_8769C: jmp short loc_876EE loc_8769E: lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+98h+var_58] mov [rsp+98h+var_88], rdi mov esi, 3 mov ecx, 265Ch call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+98h+var_88] mov [rsp+98h+var_59], 1 lea rsi, aCheckFailedVal_2; "CHECK failed: !value || _impl_.options_"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+98h+var_80], rax jmp short $+2 loc_876DB: mov rsi, [rsp+98h+var_80] lea rdi, [rsp+98h+var_6D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_876EC: jmp short $+2 loc_876EE: test [rsp+98h+var_59], 1 jnz short loc_876F7 jmp short loc_87701 loc_876F7: lea rdi, [rsp+98h+var_58]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_87701: jmp loc_87675 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax test [rsp+arg_37], 1 jnz short loc_8771D jmp short loc_87727 loc_8771D: lea rdi, [rsp+arg_38]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_87727: jmp short loc_8775C loc_87729: mov al, 1 test [rsp+98h+var_19], 1 mov [rsp+98h+var_89], al jz short loc_8774A mov rax, [rsp+98h+var_78] cmp qword ptr [rax+0E0h], 0 setnz al mov [rsp+98h+var_89], al loc_8774A: mov al, [rsp+98h+var_89] mov al, [rsp+98h+var_19] and al, 1 add rsp, 98h retn loc_8775C: mov rdi, [rsp+arg_28] call __Unwind_Resume
bool google::protobuf::DescriptorProto::_internal_has_options(google::protobuf::DescriptorProto *this) { return (*((_DWORD *)this + 4) & 2) != 0; }
_internal_has_options: SUB RSP,0x98 MOV qword ptr [RSP + 0x80],RDI MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x20],RAX ADD RAX,0x10 MOV qword ptr [RSP + 0x90],RAX MOV dword ptr [RSP + 0x8c],0x0 MOV RAX,qword ptr [RSP + 0x90] MOVSXD RCX,dword ptr [RSP + 0x8c] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,0x2 CMP EAX,0x0 SETNZ AL AND AL,0x1 MOV byte ptr [RSP + 0x7f],AL LAB_00187675: XOR EAX,EAX TEST AL,0x1 JNZ 0x00187680 JMP 0x00187729 LAB_00187680: MOV AL,byte ptr [RSP + 0x7f] MOV byte ptr [RSP + 0x3f],0x0 TEST AL,0x1 JZ 0x0018769c MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0xe0],0x0 JZ 0x0018769e LAB_0018769c: JMP 0x001876ee LAB_0018769e: LEA RDX,[0x2eff49] LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x10],RDI MOV ESI,0x3 MOV ECX,0x265c CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x3f],0x1 LAB_001876c8: LEA RSI,[0x2efff0] CALL 0x001230a0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001876db LAB_001876db: MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x2b] CALL 0x00123250 LAB_001876ea: JMP 0x001876ec LAB_001876ec: JMP 0x001876ee LAB_001876ee: TEST byte ptr [RSP + 0x3f],0x1 JNZ 0x001876f7 JMP 0x00187701 LAB_001876f7: LEA RDI,[RSP + 0x40] CALL 0x00123820 LAB_00187701: JMP 0x00187675 LAB_00187729: MOV AL,0x1 TEST byte ptr [RSP + 0x7f],0x1 MOV byte ptr [RSP + 0xf],AL JZ 0x0018774a MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0xe0],0x0 SETNZ AL MOV byte ptr [RSP + 0xf],AL LAB_0018774a: MOV AL,byte ptr [RSP + 0xf] MOV AL,byte ptr [RSP + 0x7f] AND AL,0x1 ADD RSP,0x98 RET
/* WARNING: Removing unreachable block (ram,0x00187680) */ /* WARNING: Removing unreachable block (ram,0x0018768d) */ /* WARNING: Removing unreachable block (ram,0x0018769c) */ /* WARNING: Removing unreachable block (ram,0x0018769e) */ /* WARNING: Removing unreachable block (ram,0x001876ee) */ /* WARNING: Removing unreachable block (ram,0x001876f7) */ /* WARNING: Removing unreachable block (ram,0x001876f5) */ /* WARNING: Removing unreachable block (ram,0x00187701) */ /* google::protobuf::DescriptorProto::_internal_has_options() const */ int8 __thiscall google::protobuf::DescriptorProto::_internal_has_options(DescriptorProto *this) { int7 uVar1; bool bVar2; bVar2 = (*(uint *)(this + 0x10) & 2) != 0; uVar1 = 0; if (bVar2) { uVar1 = (int7)((ulong)this >> 8); } return CONCAT71(uVar1,bVar2); }
48,467
minja::Value::contains(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
bool contains(const Value & value) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (const auto& item : *array_) { if (item.to_bool() && item == value) return true; } return false; } else if (object_) { if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump()); return object_->find(value.primitive_) != object_->end(); } else { throw std::runtime_error("contains can only be called on arrays and objects: " + dump()); } }
O1
cpp
minja::Value::contains(minja::Value const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rdi, %r15 movq 0x10(%rdi), %rax movq 0x20(%rdi), %r12 testq %r12, %r12 jne 0x78a4e testq %rax, %rax jne 0x78a4e cmpb $0x0, 0x40(%r15) jne 0x78a4e cmpq $0x0, 0x30(%r15) je 0x78b02 testq %rax, %rax je 0x78a87 movq (%rax), %r15 movq 0x8(%rax), %r12 cmpq %r12, %r15 setne %bl je 0x78af0 movq %r15, %rdi callq 0x6c57c testb %al, %al je 0x78a81 movq %r15, %rdi movq %r14, %rsi callq 0x79ebe testb %al, %al jne 0x78af0 addq $0x50, %r15 jmp 0x78a5a testq %r12, %r12 je 0x78b34 cmpq $0x0, 0x10(%r14) jne 0x78b91 cmpq $0x0, 0x20(%r14) jne 0x78b91 cmpq $0x0, 0x30(%r14) jne 0x78b91 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x78ae5 addq $0x40, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x4e0ec testb %al, %al jne 0x78ae2 addq $0x60, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x78ac3 jmp 0x78ae5 movq %rbx, %rax movq 0x20(%r15), %rcx cmpq 0x8(%rcx), %rax setne %bl andb $0x1, %bl movl %ebx, %eax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %rbx leaq 0x45408(%rip), %rsi # 0xbdf1e movq %rax, %rdi callq 0x19270 movq 0x764c3(%rip), %rsi # 0xeefe8 movq 0x7643c(%rip), %rdx # 0xeef68 movq %rbx, %rdi callq 0x19b70 movl $0x10, %edi callq 0x19370 movq %rax, %rbx movq %rsp, %rdi movq %r15, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6c964 leaq 0x45e46(%rip), %rsi # 0xbe9a0 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x3779b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x19ac0 xorl %ebp, %ebp movq 0x76468(%rip), %rsi # 0xeefe8 movq 0x763e1(%rip), %rdx # 0xeef68 movq %rbx, %rdi callq 0x19b70 jmp 0x78bec movl $0x10, %edi callq 0x19370 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6c964 leaq 0x4593f(%rip), %rsi # 0xbe4f6 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x3779b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x19ac0 xorl %ebp, %ebp movq 0x7640b(%rip), %rsi # 0xeefe8 movq 0x76384(%rip), %rdx # 0xeef68 movq %rbx, %rdi callq 0x19b70 jmp 0x78bf0 jmp 0x78c10 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x78c16 movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x78c16 movq %rax, %r14 movb $0x1, %bpl leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x78c3b movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x78c3b jmp 0x78c35 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl jne 0x78c45 jmp 0x78c4d movq %rax, %r14 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19be0 nop
_ZNK5minja5Value8containsERKS0_: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov r14, rsi mov r15, rdi mov rax, [rdi+10h] mov r12, [rdi+20h] test r12, r12 jnz short loc_78A4E test rax, rax jnz short loc_78A4E cmp byte ptr [r15+40h], 0 jnz short loc_78A4E cmp qword ptr [r15+30h], 0 jz loc_78B02 loc_78A4E: test rax, rax jz short loc_78A87 mov r15, [rax] mov r12, [rax+8] loc_78A5A: cmp r15, r12 setnz bl jz loc_78AF0 mov rdi, r15; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) test al, al jz short loc_78A81 mov rdi, r15 mov rsi, r14 call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&) test al, al jnz short loc_78AF0 loc_78A81: add r15, 50h ; 'P' jmp short loc_78A5A loc_78A87: test r12, r12 jz loc_78B34 cmp qword ptr [r14+10h], 0 jnz loc_78B91 cmp qword ptr [r14+20h], 0 jnz loc_78B91 cmp qword ptr [r14+30h], 0 jnz loc_78B91 mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_78AE5 add r14, 40h ; '@' loc_78AC3: mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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, al jnz short loc_78AE2 add rbx, 60h ; '`' mov rax, [r12+8] cmp rbx, rax jnz short loc_78AC3 jmp short loc_78AE5 loc_78AE2: mov rax, rbx loc_78AE5: mov rcx, [r15+20h] cmp rax, [rcx+8] setnz bl loc_78AF0: and bl, 1 mov eax, ebx add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_78B02: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_78B34: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r15 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aContainsCanOnl; "contains can only be called on arrays a"... lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_78BEC loc_78B91: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_78BEC: jmp short loc_78BF0 jmp short loc_78C10 loc_78BF0: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_78C16 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_78C16 loc_78C10: mov r14, rax mov bpl, 1 loc_78C16: lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_78C3B mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_78C3B jmp short $+2 loc_78C35: mov r14, rax mov bpl, 1 loc_78C3B: test bpl, bpl jnz short loc_78C45 jmp short loc_78C4D mov r14, rax loc_78C45: mov rdi, rbx; void * call ___cxa_free_exception loc_78C4D: mov rdi, r14 call __Unwind_Resume
long long minja::Value::contains(minja::Value *this, const minja::Value *a2, __m128d a3) { unsigned __int8 *v3; // rbx minja::Value **v4; // rax unsigned __int8 **v5; // r12 minja::Value *v6; // r15 minja::Value *v7; // r12 unsigned __int8 *v8; // rax std::runtime_error *exception; // rbx void *v11; // rbx void *v12; // rbx _BYTE v13[16]; // [rsp+0h] [rbp-68h] BYREF _BYTE v14[16]; // [rsp+20h] [rbp-48h] BYREF v4 = (minja::Value **)*((_QWORD *)this + 2); v5 = (unsigned __int8 **)*((_QWORD *)this + 4); if ( !v5 && !v4 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v4 ) { v6 = *v4; v7 = v4[1]; while ( 1 ) { LOBYTE(v3) = v6 != v7; if ( v6 == v7 || (unsigned __int8)minja::Value::to_bool(v6) && (unsigned __int8)minja::Value::operator==(v6, a2) ) break; v6 = (minja::Value *)((char *)v6 + 80); } } else { if ( !v5 ) { v11 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v13, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v14, (long long)"contains can only be called on arrays and objects: ", (long long)v13); std::runtime_error::runtime_error(v11, v14); __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { v12 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v13, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v14, (long long)"Unashable type: ", (long long)v13); std::runtime_error::runtime_error(v12, v14); __cxa_throw( v12, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = *v5; v8 = v5[1]; if ( *v5 != v8 ) { while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v3, (unsigned __int8 *)a2 + 64, a3) ) { v3 += 96; v8 = v5[1]; if ( v3 == v8 ) goto LABEL_20; } v8 = v3; } LABEL_20: LOBYTE(v3) = v8 != *(unsigned __int8 **)(*((_QWORD *)this + 4) + 8LL); } LOBYTE(v3) = (unsigned __int8)v3 & 1; return (unsigned int)v3; }
contains: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x10] MOV R12,qword ptr [RDI + 0x20] TEST R12,R12 JNZ 0x00178a4e TEST RAX,RAX JNZ 0x00178a4e CMP byte ptr [R15 + 0x40],0x0 JNZ 0x00178a4e CMP qword ptr [R15 + 0x30],0x0 JZ 0x00178b02 LAB_00178a4e: TEST RAX,RAX JZ 0x00178a87 MOV R15,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LAB_00178a5a: CMP R15,R12 SETNZ BL JZ 0x00178af0 MOV RDI,R15 CALL 0x0016c57c TEST AL,AL JZ 0x00178a81 MOV RDI,R15 MOV RSI,R14 CALL 0x00179ebe TEST AL,AL JNZ 0x00178af0 LAB_00178a81: ADD R15,0x50 JMP 0x00178a5a LAB_00178a87: TEST R12,R12 JZ 0x00178b34 CMP qword ptr [R14 + 0x10],0x0 JNZ 0x00178b91 CMP qword ptr [R14 + 0x20],0x0 JNZ 0x00178b91 CMP qword ptr [R14 + 0x30],0x0 JNZ 0x00178b91 MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x00178ae5 ADD R14,0x40 LAB_00178ac3: MOV RDI,RBX MOV RSI,R14 CALL 0x0014e0ec TEST AL,AL JNZ 0x00178ae2 ADD RBX,0x60 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x00178ac3 JMP 0x00178ae5 LAB_00178ae2: MOV RAX,RBX LAB_00178ae5: MOV RCX,qword ptr [R15 + 0x20] CMP RAX,qword ptr [RCX + 0x8] SETNZ BL LAB_00178af0: AND BL,0x1 MOV EAX,EBX ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00178b02: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_00178b0f: LEA RSI,[0x1bdf1e] MOV RDI,RAX CALL 0x00119270 LAB_00178b1e: MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,RBX CALL 0x00119b70 LAB_00178b34: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_00178b41: MOV RDI,RSP MOV RSI,R15 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016c964 LAB_00178b53: LEA RSI,[0x1be9a0] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0013779b MOV BPL,0x1 LAB_00178b6a: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00119ac0 XOR EBP,EBP MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,RBX CALL 0x00119b70 LAB_00178b91: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_00178b9e: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016c964 LAB_00178bb0: LEA RSI,[0x1be4f6] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0013779b MOV BPL,0x1 LAB_00178bc7: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00119ac0 XOR EBP,EBP MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,RBX CALL 0x00119b70
/* minja::Value::contains(minja::Value const&) const */ ulong __thiscall minja::Value::contains(Value *this,Value *param_1) { int8 *puVar1; long *plVar2; Value *pVVar3; char cVar4; basic_json *pbVar5; runtime_error *prVar6; ulong unaff_RBX; basic_json *pbVar7; Value *this_00; int1 auStack_68 [32]; string local_48 [32]; puVar1 = *(int8 **)(this + 0x10); plVar2 = *(long **)(this + 0x20); if ((((plVar2 == (long *)0x0) && (puVar1 == (int8 *)0x0)) && (this[0x40] == (Value)0x0)) && (*(long *)(this + 0x30) == 0)) { prVar6 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178b0f to 00178b1d has its CatchHandler @ 00178c42 */ std::runtime_error::runtime_error(prVar6,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar6,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } if (puVar1 == (int8 *)0x0) { if (plVar2 == (long *)0x0) { prVar6 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178b41 to 00178b52 has its CatchHandler @ 00178c35 */ dump_abi_cxx11_((int)auStack_68,SUB81(this,0)); /* try { // try from 00178b53 to 00178b66 has its CatchHandler @ 00178c10 */ std::operator+((char *)local_48, (string *)"contains can only be called on arrays and objects: "); /* try { // try from 00178b6a to 00178b8e has its CatchHandler @ 00178bf0 */ std::runtime_error::runtime_error(prVar6,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar6,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } if (((*(long *)(param_1 + 0x10) != 0) || (*(long *)(param_1 + 0x20) != 0)) || (*(long *)(param_1 + 0x30) != 0)) { prVar6 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178b9e to 00178baf has its CatchHandler @ 00178c33 */ dump_abi_cxx11_((int)auStack_68,SUB81(param_1,0)); /* try { // try from 00178bb0 to 00178bc3 has its CatchHandler @ 00178bee */ std::operator+((char *)local_48,(string *)"Unashable type: "); /* try { // try from 00178bc7 to 00178beb has its CatchHandler @ 00178bec */ std::runtime_error::runtime_error(prVar6,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar6,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } pbVar7 = (basic_json *)*plVar2; pbVar5 = (basic_json *)plVar2[1]; if (pbVar7 != pbVar5) { do { pbVar5 = pbVar7; cVar4 = nlohmann::json_abi_v3_11_3::operator==(pbVar5,(basic_json *)(param_1 + 0x40)); pbVar7 = pbVar5; if (cVar4 != '\0') break; pbVar7 = pbVar5 + 0x60; pbVar5 = (basic_json *)plVar2[1]; } while (pbVar7 != pbVar5); } unaff_RBX = CONCAT71((int7)((ulong)pbVar7 >> 8), pbVar5 != *(basic_json **)(*(long *)(this + 0x20) + 8)); } else { this_00 = (Value *)*puVar1; pVVar3 = (Value *)puVar1[1]; while ((unaff_RBX = CONCAT71((int7)(unaff_RBX >> 8),this_00 != pVVar3), this_00 != pVVar3 && ((cVar4 = to_bool(this_00), cVar4 == '\0' || (cVar4 = operator==(this_00,param_1), cVar4 == '\0'))))) { this_00 = this_00 + 0x50; } } return unaff_RBX & 0xffffffff; }
48,468
LefDefParser::lefiVia::bumpProps()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp
void lefiVia::bumpProps() { int i; double *d; char **n; char **v; char *t; if (propsAllocated_ == 0) propsAllocated_ = 2; else propsAllocated_ *= 2; d = (double*) lefMalloc(sizeof(double) * propsAllocated_); n = (char**) lefMalloc(sizeof(char*) * propsAllocated_); v = (char**) lefMalloc(sizeof(char*) * propsAllocated_); t = (char*) lefMalloc(sizeof(char) * propsAllocated_); for (i = 0; i < numProps_; i++) { d[i] = propDValue_[i]; n[i] = propName_[i]; v[i] = propValue_[i]; t[i] = propType_[i]; } if (numProps_ > 0) { lefFree((char*) (propDValue_)); lefFree((char*) (propName_)); lefFree((char*) (propValue_)); lefFree((char*) (propType_)); } propDValue_ = d; propName_ = n; propValue_ = v; propType_ = t; }
O3
cpp
LefDefParser::lefiVia::bumpProps(): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movl 0x24(%rdi), %eax leal (%rax,%rax), %ecx testl %eax, %eax movl $0x2, %eax cmovnel %ecx, %eax movl %eax, 0x24(%rdi) movslq %eax, %rdi shlq $0x3, %rdi callq 0x30c15 movq %rax, %r14 movslq 0x24(%rbx), %rdi shlq $0x3, %rdi callq 0x30c15 movq %rax, %r15 movslq 0x24(%rbx), %rdi shlq $0x3, %rdi callq 0x30c15 movq %rax, %r12 movslq 0x24(%rbx), %rdi callq 0x30c15 movq %rax, %r13 cmpl $0x0, 0x20(%rbx) jle 0xeeb3 xorl %eax, %eax movq 0x38(%rbx), %rcx movsd (%rcx,%rax,8), %xmm0 movsd %xmm0, (%r14,%rax,8) movq 0x28(%rbx), %rcx movq (%rcx,%rax,8), %rcx movq %rcx, (%r15,%rax,8) movq 0x30(%rbx), %rcx movq (%rcx,%rax,8), %rcx movq %rcx, (%r12,%rax,8) movq 0x40(%rbx), %rcx movb (%rcx,%rax), %cl movb %cl, (%r13,%rax) incq %rax movslq 0x20(%rbx), %rcx cmpq %rcx, %rax jl 0xee4c testl %ecx, %ecx jle 0xeeb3 movq 0x38(%rbx), %rdi callq 0x322d0 movq 0x28(%rbx), %rdi callq 0x322d0 movq 0x30(%rbx), %rdi callq 0x322d0 movq 0x40(%rbx), %rdi callq 0x322d0 movq %r14, 0x38(%rbx) movq %r15, 0x28(%rbx) movq %r12, 0x30(%rbx) movq %r13, 0x40(%rbx) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN12LefDefParser7lefiVia9bumpPropsEv: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi mov eax, [rdi+24h] lea ecx, [rax+rax] test eax, eax mov eax, 2 cmovnz eax, ecx mov [rdi+24h], eax movsxd rdi, eax shl rdi, 3; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r14, rax movsxd rdi, dword ptr [rbx+24h] shl rdi, 3; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r15, rax movsxd rdi, dword ptr [rbx+24h] shl rdi, 3; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r12, rax movsxd rdi, dword ptr [rbx+24h]; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r13, rax cmp dword ptr [rbx+20h], 0 jle short loc_EEB3 xor eax, eax loc_EE4C: mov rcx, [rbx+38h] movsd xmm0, qword ptr [rcx+rax*8] movsd qword ptr [r14+rax*8], xmm0 mov rcx, [rbx+28h] mov rcx, [rcx+rax*8] mov [r15+rax*8], rcx mov rcx, [rbx+30h] mov rcx, [rcx+rax*8] mov [r12+rax*8], rcx mov rcx, [rbx+40h] mov cl, [rcx+rax] mov [r13+rax+0], cl inc rax movsxd rcx, dword ptr [rbx+20h] cmp rax, rcx jl short loc_EE4C test ecx, ecx jle short loc_EEB3 mov rdi, [rbx+38h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rbx+28h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rbx+30h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rbx+40h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) loc_EEB3: mov [rbx+38h], r14 mov [rbx+28h], r15 mov [rbx+30h], r12 mov [rbx+40h], r13 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long LefDefParser::lefiVia::bumpProps(LefDefParser::lefiVia *this, void *a2) { int v2; // eax int v3; // ecx bool v4; // zf int v5; // eax long long v6; // r14 long long v7; // r15 long long v8; // r12 long long result; // rax long long v10; // r13 long long v11; // rcx v2 = *((_DWORD *)this + 9); v3 = 2 * v2; v4 = v2 == 0; v5 = 2; if ( !v4 ) v5 = v3; *((_DWORD *)this + 9) = v5; v6 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v5), (unsigned long long)a2); v7 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 9)), (unsigned long long)a2); v8 = LefDefParser::lefMalloc((LefDefParser *)(8LL * *((int *)this + 9)), (unsigned long long)a2); result = LefDefParser::lefMalloc((LefDefParser *)*((int *)this + 9), (unsigned long long)a2); v10 = result; if ( *((int *)this + 8) > 0 ) { result = 0LL; do { *(_QWORD *)(v6 + 8 * result) = *(_QWORD *)(*((_QWORD *)this + 7) + 8 * result); *(_QWORD *)(v7 + 8 * result) = *(_QWORD *)(*((_QWORD *)this + 5) + 8 * result); *(_QWORD *)(v8 + 8 * result) = *(_QWORD *)(*((_QWORD *)this + 6) + 8 * result); *(_BYTE *)(v10 + result) = *(_BYTE *)(*((_QWORD *)this + 8) + result); ++result; v11 = *((int *)this + 8); } while ( result < v11 ); if ( (int)v11 > 0 ) { LefDefParser::lefFree(*((LefDefParser **)this + 7), a2); LefDefParser::lefFree(*((LefDefParser **)this + 5), a2); LefDefParser::lefFree(*((LefDefParser **)this + 6), a2); result = LefDefParser::lefFree(*((LefDefParser **)this + 8), a2); } } *((_QWORD *)this + 7) = v6; *((_QWORD *)this + 5) = v7; *((_QWORD *)this + 6) = v8; *((_QWORD *)this + 8) = v10; return result; }
bumpProps: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x24] LEA ECX,[RAX + RAX*0x1] TEST EAX,EAX MOV EAX,0x2 CMOVNZ EAX,ECX MOV dword ptr [RDI + 0x24],EAX MOVSXD RDI,EAX SHL RDI,0x3 CALL 0x00130c15 MOV R14,RAX MOVSXD RDI,dword ptr [RBX + 0x24] SHL RDI,0x3 CALL 0x00130c15 MOV R15,RAX MOVSXD RDI,dword ptr [RBX + 0x24] SHL RDI,0x3 CALL 0x00130c15 MOV R12,RAX MOVSXD RDI,dword ptr [RBX + 0x24] CALL 0x00130c15 MOV R13,RAX CMP dword ptr [RBX + 0x20],0x0 JLE 0x0010eeb3 XOR EAX,EAX LAB_0010ee4c: MOV RCX,qword ptr [RBX + 0x38] MOVSD XMM0,qword ptr [RCX + RAX*0x8] MOVSD qword ptr [R14 + RAX*0x8],XMM0 MOV RCX,qword ptr [RBX + 0x28] MOV RCX,qword ptr [RCX + RAX*0x8] MOV qword ptr [R15 + RAX*0x8],RCX MOV RCX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RCX + RAX*0x8] MOV qword ptr [R12 + RAX*0x8],RCX MOV RCX,qword ptr [RBX + 0x40] MOV CL,byte ptr [RCX + RAX*0x1] MOV byte ptr [R13 + RAX*0x1],CL INC RAX MOVSXD RCX,dword ptr [RBX + 0x20] CMP RAX,RCX JL 0x0010ee4c TEST ECX,ECX JLE 0x0010eeb3 MOV RDI,qword ptr [RBX + 0x38] CALL 0x001322d0 MOV RDI,qword ptr [RBX + 0x28] CALL 0x001322d0 MOV RDI,qword ptr [RBX + 0x30] CALL 0x001322d0 MOV RDI,qword ptr [RBX + 0x40] CALL 0x001322d0 LAB_0010eeb3: MOV qword ptr [RBX + 0x38],R14 MOV qword ptr [RBX + 0x28],R15 MOV qword ptr [RBX + 0x30],R12 MOV qword ptr [RBX + 0x40],R13 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* LefDefParser::lefiVia::bumpProps() */ void LefDefParser::lefiVia::bumpProps(void) { int iVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; ulong in_RSI; long in_RDI; iVar1 = 2; if (*(int *)(in_RDI + 0x24) != 0) { iVar1 = *(int *)(in_RDI + 0x24) * 2; } *(int *)(in_RDI + 0x24) = iVar1; lVar2 = lefMalloc((LefDefParser *)((long)iVar1 << 3),in_RSI); lVar3 = lefMalloc((LefDefParser *)((long)*(int *)(in_RDI + 0x24) << 3),in_RSI); lVar4 = lefMalloc((LefDefParser *)((long)*(int *)(in_RDI + 0x24) << 3),in_RSI); lVar5 = lefMalloc((LefDefParser *)(long)*(int *)(in_RDI + 0x24),in_RSI); if (0 < *(int *)(in_RDI + 0x20)) { lVar6 = 0; do { *(int8 *)(lVar2 + lVar6 * 8) = *(int8 *)(*(long *)(in_RDI + 0x38) + lVar6 * 8); *(int8 *)(lVar3 + lVar6 * 8) = *(int8 *)(*(long *)(in_RDI + 0x28) + lVar6 * 8); *(int8 *)(lVar4 + lVar6 * 8) = *(int8 *)(*(long *)(in_RDI + 0x30) + lVar6 * 8); *(int1 *)(lVar5 + lVar6) = *(int1 *)(*(long *)(in_RDI + 0x40) + lVar6); lVar6 = lVar6 + 1; } while (lVar6 < *(int *)(in_RDI + 0x20)); if (0 < *(int *)(in_RDI + 0x20)) { lefFree(*(void **)(in_RDI + 0x38)); lefFree(*(void **)(in_RDI + 0x28)); lefFree(*(void **)(in_RDI + 0x30)); lefFree(*(void **)(in_RDI + 0x40)); } } *(long *)(in_RDI + 0x38) = lVar2; *(long *)(in_RDI + 0x28) = lVar3; *(long *)(in_RDI + 0x30) = lVar4; *(long *)(in_RDI + 0x40) = lVar5; return; }
48,469
my_register_filename
eloqsql/mysys/my_open.c
File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER)) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); statistic_increment(my_file_total_opened,&THR_LOCK_open); my_file_info[fd].type = type_of_file; DBUG_PRINT("exit",("fd: %d",fd)); DBUG_RETURN(fd); } my_errno= errno; DBUG_PRINT("error",("Got error %d on open", my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; my_error(error_message_number, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), FileName, my_errno); } DBUG_RETURN(-1); }
O0
c
my_register_filename: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq %r8, -0x20(%rbp) cmpl $0x0, -0x8(%rbp) jl 0xf3e26 movl $0x1, -0x24(%rbp) movl -0x24(%rbp), %eax leaq 0xb8e050(%rip), %rcx # 0xc81dd4 lock xaddl %eax, (%rcx) movl %eax, -0x28(%rbp) movl -0x8(%rbp), %eax leaq 0x1cae1b(%rip), %rcx # 0x2bebb0 cmpl (%rcx), %eax jae 0xf3da9 movq -0x20(%rbp), %rax andq $0x2004, %rax # imm = 0x2004 cmpq $0x0, %rax je 0xf3db6 jmp 0xf3dab movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xf3e9d leaq 0xb8e547(%rip), %rax # 0xc82304 movl (%rax), %edi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xf3690 movq %rax, %rcx leaq 0x1cade2(%rip), %rax # 0x2bebb8 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, (%rax) leaq 0xb8dfd2(%rip), %rax # 0xc81dc0 movq (%rax), %rcx addq $0x1, %rcx leaq 0xb8dfc4(%rip), %rax # 0xc81dc0 movq %rcx, (%rax) movl -0x14(%rbp), %ecx leaq 0x1cadaf(%rip), %rax # 0x2bebb8 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x8(%rax) jmp 0xf3e1c jmp 0xf3e1e movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xf3e9d callq 0x2a760 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0xf5a70 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) jmp 0xf3e3c movq -0x20(%rbp), %rax andq $0x19, %rax cmpq $0x0, %rax je 0xf3e94 callq 0xf5a70 cmpl $0x18, (%rax) jne 0xf3e5b movl $0x17, -0x18(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x20(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) callq 0xf5a70 movl -0x44(%rbp), %edi movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx movl (%rax), %ecx movb $0x0, %al callq 0xef520 jmp 0xf3e96 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_register_filename: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov [rbp+var_20], r8 cmp [rbp+var_8], 0 jl loc_F3E26 mov [rbp+var_24], 1 mov eax, [rbp+var_24] lea rcx, my_file_opened lock xadd [rcx], eax mov [rbp+var_28], eax mov eax, [rbp+var_8] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_F3DA9 mov rax, [rbp+var_20] and rax, 2004h cmp rax, 0 jz short loc_F3DB6 loc_F3DA9: jmp short $+2 loc_F3DAB: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp loc_F3E9D loc_F3DB6: lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_20] call my_strdup mov rcx, rax lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax], rcx lea rax, my_file_total_opened mov rcx, [rax] add rcx, 1 lea rax, my_file_total_opened mov [rax], rcx mov ecx, [rbp+var_14] lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax+8], ecx jmp short $+2 loc_F3E1C: jmp short $+2 loc_F3E1E: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp short loc_F3E9D loc_F3E26: call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx jmp short $+2 loc_F3E3C: mov rax, [rbp+var_20] and rax, 19h cmp rax, 0 jz short loc_F3E94 call _my_thread_var cmp dword ptr [rax], 18h jnz short loc_F3E5B mov [rbp+var_18], 17h loc_F3E5B: mov eax, [rbp+var_18] mov [rbp+var_44], eax mov rax, [rbp+var_20] and rax, 440h or rax, 4 mov [rbp+var_40], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax call _my_thread_var mov edi, [rbp+var_44] mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] mov ecx, [rax] mov al, 0 call my_error loc_F3E94: jmp short $+2 loc_F3E96: mov [rbp+var_4], 0FFFFFFFFh loc_F3E9D: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_register_filename(long long a1, const char *a2, int a3, unsigned int a4, __int16 a5) { unsigned int *v5; // rax int v7; // [rsp+24h] [rbp-2Ch] if ( (int)a1 < 0 ) { v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, a2) = v7; if ( (a5 & 0x19) != 0 ) { if ( *(_DWORD *)my_thread_var(a1, a2) == 24 ) a4 = 23; v5 = (unsigned int *)my_thread_var(a1, a2); my_error(a4, a5 & 0x440 | 4LL, a2, *v5); } return (unsigned int)-1; } else { _InterlockedExchangeAdd(my_file_opened, 1u); if ( (unsigned int)a1 >= my_file_limit || (a5 & 0x2004) != 0 ) { return (unsigned int)a1; } else { *((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, (long long)a2, a5); ++my_file_total_opened; *((_DWORD *)my_file_info + 4 * (int)a1 + 2) = a3; return (unsigned int)a1; } } }
my_register_filename: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV qword ptr [RBP + -0x20],R8 CMP dword ptr [RBP + -0x8],0x0 JL 0x001f3e26 MOV dword ptr [RBP + -0x24],0x1 MOV EAX,dword ptr [RBP + -0x24] LEA RCX,[0xd81dd4] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x8] LEA RCX,[0x3bebb0] CMP EAX,dword ptr [RCX] JNC 0x001f3da9 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x2004 CMP RAX,0x0 JZ 0x001f3db6 LAB_001f3da9: JMP 0x001f3dab LAB_001f3dab: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x001f3e9d LAB_001f3db6: LEA RAX,[0xd82304] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001f3690 MOV RCX,RAX LEA RAX,[0x3bebb8] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX],RCX LEA RAX,[0xd81dc0] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0xd81dc0] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x14] LEA RAX,[0x3bebb8] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x8],ECX JMP 0x001f3e1c LAB_001f3e1c: JMP 0x001f3e1e LAB_001f3e1e: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x001f3e9d LAB_001f3e26: CALL 0x0012a760 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x001f5a70 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX JMP 0x001f3e3c LAB_001f3e3c: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x19 CMP RAX,0x0 JZ 0x001f3e94 CALL 0x001f5a70 CMP dword ptr [RAX],0x18 JNZ 0x001f3e5b MOV dword ptr [RBP + -0x18],0x17 LAB_001f3e5b: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX CALL 0x001f5a70 MOV EDI,dword ptr [RBP + -0x44] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX] MOV AL,0x0 CALL 0x001ef520 LAB_001f3e94: JMP 0x001f3e96 LAB_001f3e96: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001f3e9d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
uint my_register_filename (uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5) { int iVar1; int8 uVar2; int *piVar3; int4 *puVar4; int4 local_20; uint local_c; if ((int)param_1 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_5 & 0x19) != 0) { piVar3 = (int *)_my_thread_var(); local_20 = param_4; if (*piVar3 == 0x18) { local_20 = 0x17; } puVar4 = (int4 *)_my_thread_var(); my_error(local_20,param_5 & 0x440 | 4,param_2,*puVar4); } local_c = 0xffffffff; } else { LOCK(); my_file_opened = my_file_opened + 1; UNLOCK(); local_c = param_1; if ((param_1 < my_file_limit) && ((param_5 & 0x2004) == 0)) { uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5); *(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = uVar2; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = param_3; } } return local_c; }
48,470
translog_write_variable_record_chunk2_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record_chunk2_page(struct st_translog_parts *parts, TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { uchar chunk2_header[1]; DBUG_ENTER("translog_write_variable_record_chunk2_page"); chunk2_header[0]= TRANSLOG_CHUNK_NOHDR; if (translog_chaser_page_next(horizon, cursor)) DBUG_RETURN(1); /* Puts chunk type */ translog_write_data_on_page(horizon, cursor, 1, chunk2_header); /* Puts chunk body */ translog_write_parts_on_page(horizon, cursor, log_descriptor.page_capacity_chunk_2, parts); DBUG_RETURN(0); }
O0
c
translog_write_variable_record_chunk2_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movb $-0x80, -0x21(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x5bfd0 cmpb $0x0, %al je 0x5bc21 jmp 0x5bc1b movb $0x1, -0x1(%rbp) jmp 0x5bc53 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi leaq -0x21(%rbp), %rcx movl $0x1, %edx callq 0x5c050 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movzwl 0x41d7a0(%rip), %edx # 0x4793e6 movq -0x10(%rbp), %rcx callq 0x5b590 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
translog_write_variable_record_chunk2_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_21], 80h mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call translog_chaser_page_next cmp al, 0 jz short loc_5BC21 jmp short $+2 loc_5BC1B: mov [rbp+var_1], 1 jmp short loc_5BC53 loc_5BC21: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] lea rcx, [rbp+var_21] mov edx, 1 call translog_write_data_on_page mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] movzx edx, cs:word_4793E6 mov rcx, [rbp+var_10] call translog_write_parts_on_page mov [rbp+var_1], 0 loc_5BC53: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char translog_write_variable_record_chunk2_page(long long a1, _QWORD *a2, long long a3) { char v4; // [rsp+Fh] [rbp-21h] BYREF long long v5; // [rsp+10h] [rbp-20h] _QWORD *v6; // [rsp+18h] [rbp-18h] long long v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; v5 = a3; v4 = 0x80; if ( (unsigned __int8)translog_chaser_page_next(a2, a3) ) return 1; translog_write_data_on_page(v6, v5, 1LL, &v4); translog_write_parts_on_page(v6, v5, (unsigned __int16)word_4793E6, v7); return 0; }
translog_write_variable_record_chunk2_page: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RBP + -0x21],0x80 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0015bfd0 CMP AL,0x0 JZ 0x0015bc21 JMP 0x0015bc1b LAB_0015bc1b: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015bc53 LAB_0015bc21: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x21] MOV EDX,0x1 CALL 0x0015c050 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOVZX EDX,word ptr [0x005793e6] MOV RCX,qword ptr [RBP + -0x10] CALL 0x0015b590 MOV byte ptr [RBP + -0x1],0x0 LAB_0015bc53: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool translog_write_variable_record_chunk2_page (int8 param_1,int8 param_2,int8 param_3) { char cVar1; int1 local_29; int8 local_28; int8 local_20; int8 local_18; bool local_9; local_29 = 0x80; local_28 = param_3; local_20 = param_2; local_18 = param_1; cVar1 = translog_chaser_page_next(param_2,param_3); if (cVar1 == '\0') { translog_write_data_on_page(local_20,local_28,1,&local_29); translog_write_parts_on_page(local_20,local_28,DAT_005793e6,local_18); } local_9 = cVar1 != '\0'; return local_9; }
48,471
js_regexp_Symbol_search
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_Symbol_search(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue rx = this_val; JSValue str, previousLastIndex, currentLastIndex, result, index; if (!JS_IsObject(rx)) return JS_ThrowTypeErrorNotAnObject(ctx); result = JS_UNDEFINED; currentLastIndex = JS_UNDEFINED; previousLastIndex = JS_UNDEFINED; str = JS_ToString(ctx, argv[0]); if (JS_IsException(str)) goto exception; previousLastIndex = JS_GetProperty(ctx, rx, JS_ATOM_lastIndex); if (JS_IsException(previousLastIndex)) goto exception; if (!js_same_value(ctx, previousLastIndex, js_int32(0))) { if (JS_SetProperty(ctx, rx, JS_ATOM_lastIndex, js_int32(0)) < 0) { goto exception; } } result = JS_RegExpExec(ctx, rx, str); if (JS_IsException(result)) goto exception; currentLastIndex = JS_GetProperty(ctx, rx, JS_ATOM_lastIndex); if (JS_IsException(currentLastIndex)) goto exception; if (js_same_value(ctx, currentLastIndex, previousLastIndex)) { JS_FreeValue(ctx, previousLastIndex); } else { if (JS_SetProperty(ctx, rx, JS_ATOM_lastIndex, previousLastIndex) < 0) { previousLastIndex = JS_UNDEFINED; goto exception; } } JS_FreeValue(ctx, str); JS_FreeValue(ctx, currentLastIndex); if (JS_IsNull(result)) { return js_int32(-1); } else { index = JS_GetProperty(ctx, result, JS_ATOM_index); JS_FreeValue(ctx, result); return index; } exception: JS_FreeValue(ctx, result); JS_FreeValue(ctx, str); JS_FreeValue(ctx, currentLastIndex); JS_FreeValue(ctx, previousLastIndex); return JS_EXCEPTION; }
O0
c
js_regexp_Symbol_search: subq $0x158, %rsp # imm = 0x158 movq %rsi, 0x138(%rsp) movq %rdx, 0x140(%rsp) movq %rdi, 0x130(%rsp) movl %ecx, 0x12c(%rsp) movq %r8, 0x120(%rsp) movq 0x138(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x140(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x110(%rsp), %rdi movq 0x118(%rsp), %rsi callq 0x2af70 cmpl $0x0, %eax jne 0x8306a movq 0x130(%rsp), %rdi callq 0x2f5a0 movq %rax, 0x148(%rsp) movq %rdx, 0x150(%rsp) jmp 0x8358c movl $0x0, 0xb0(%rsp) movq $0x3, 0xb8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0xd8(%rsp) movl $0x0, 0xa0(%rsp) movq $0x3, 0xa8(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0xe8(%rsp) movl $0x0, 0x90(%rsp) movq $0x3, 0x98(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0x98(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x130(%rsp), %rdi movq 0x120(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x29d40 movq %rax, 0x80(%rsp) movq %rdx, 0x88(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x100(%rsp), %rdi movq 0x108(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x8317a jmp 0x83501 movq 0x130(%rsp), %rdi movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx movl $0x56, %ecx callq 0x29d80 movq %rax, 0x70(%rsp) movq %rdx, 0x78(%rsp) movq 0x70(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0xf0(%rsp), %rdi movq 0xf8(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x831df jmp 0x83501 movq 0x130(%rsp), %rax movq %rax, 0x8(%rsp) xorl %edi, %edi callq 0x33cc0 movq 0x8(%rsp), %rdi movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx movq 0x60(%rsp), %rcx movq 0x68(%rsp), %r8 callq 0x35b10 cmpl $0x0, %eax jne 0x83277 movq 0x130(%rsp), %rax movq %rax, (%rsp) xorl %edi, %edi callq 0x33cc0 movq (%rsp), %rdi movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx movq 0x50(%rsp), %r8 movq 0x58(%rsp), %r9 movl $0x56, %ecx callq 0x31f00 cmpl $0x0, %eax jge 0x83275 jmp 0x83501 jmp 0x83277 movq 0x130(%rsp), %rdi movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx movq 0x100(%rsp), %rcx movq 0x108(%rsp), %r8 callq 0x84350 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xd8(%rsp) movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x832e7 jmp 0x83501 movq 0x130(%rsp), %rdi movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx movl $0x56, %ecx callq 0x29d80 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0x38(%rsp), %rax movq %rax, 0xe8(%rsp) movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x8334c jmp 0x83501 movq 0x130(%rsp), %rdi movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdx movq 0xf0(%rsp), %rcx movq 0xf8(%rsp), %r8 callq 0x35b10 cmpl $0x0, %eax je 0x8339d movq 0x130(%rsp), %rdi movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx callq 0x23c90 jmp 0x83406 movq 0x130(%rsp), %rdi movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx movq 0xf0(%rsp), %r8 movq 0xf8(%rsp), %r9 movl $0x56, %ecx callq 0x31f00 cmpl $0x0, %eax jge 0x83404 movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0x28(%rsp), %rax movq %rax, 0xf8(%rsp) jmp 0x83501 jmp 0x83406 movq 0x130(%rsp), %rdi movq 0x100(%rsp), %rsi movq 0x108(%rsp), %rdx callq 0x23c90 movq 0x130(%rsp), %rdi movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdx callq 0x23c90 movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x2e240 cmpl $0x0, %eax je 0x83479 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x33cc0 movq %rax, 0x148(%rsp) movq %rdx, 0x150(%rsp) jmp 0x8358c movq 0x130(%rsp), %rdi movq 0xd0(%rsp), %rsi movq 0xd8(%rsp), %rdx movl $0x58, %ecx callq 0x29d80 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x18(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0x130(%rsp), %rdi movq 0xd0(%rsp), %rsi movq 0xd8(%rsp), %rdx callq 0x23c90 movq 0xc0(%rsp), %rax movq %rax, 0x148(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x150(%rsp) jmp 0x8358c movq 0x130(%rsp), %rdi movq 0xd0(%rsp), %rsi movq 0xd8(%rsp), %rdx callq 0x23c90 movq 0x130(%rsp), %rdi movq 0x100(%rsp), %rsi movq 0x108(%rsp), %rdx callq 0x23c90 movq 0x130(%rsp), %rdi movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdx callq 0x23c90 movq 0x130(%rsp), %rdi movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx callq 0x23c90 movl $0x0, 0x148(%rsp) movq $0x6, 0x150(%rsp) movq 0x148(%rsp), %rax movq 0x150(%rsp), %rdx addq $0x158, %rsp # imm = 0x158 retq nopw %cs:(%rax,%rax)
js_regexp_Symbol_search: sub rsp, 158h mov [rsp+158h+var_20], rsi mov [rsp+158h+var_18], rdx mov [rsp+158h+var_28], rdi mov [rsp+158h+var_2C], ecx mov [rsp+158h+var_38], r8 mov rax, [rsp+158h+var_20] mov [rsp+158h+var_48], rax mov rax, [rsp+158h+var_18] mov [rsp+158h+var_40], rax mov rdi, [rsp+158h+var_48] mov rsi, [rsp+158h+var_40] call JS_IsObject cmp eax, 0 jnz short loc_8306A mov rdi, [rsp+158h+var_28] call JS_ThrowTypeErrorNotAnObject mov [rsp+158h+var_10], rax mov [rsp+158h+var_8], rdx jmp loc_8358C loc_8306A: mov dword ptr [rsp+158h+var_A8], 0 mov [rsp+158h+var_A0], 3 mov rax, [rsp+158h+var_A8] mov [rsp+158h+var_88], rax mov rax, [rsp+158h+var_A0] mov [rsp+158h+var_80], rax mov dword ptr [rsp+158h+var_B8], 0 mov [rsp+158h+var_B0], 3 mov rax, [rsp+158h+var_B8] mov [rsp+158h+var_78], rax mov rax, [rsp+158h+var_B0] mov [rsp+158h+var_70], rax mov dword ptr [rsp+158h+var_C8], 0 mov [rsp+158h+var_C0], 3 mov rax, [rsp+158h+var_C8] mov [rsp+158h+var_68], rax mov rax, [rsp+158h+var_C0] mov [rsp+158h+var_60], rax mov rdi, [rsp+158h+var_28] mov rax, [rsp+158h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToString mov [rsp+158h+var_D8], rax mov [rsp+158h+var_D0], rdx mov rax, [rsp+158h+var_D8] mov [rsp+158h+var_58], rax mov rax, [rsp+158h+var_D0] mov [rsp+158h+var_50], rax mov rdi, [rsp+158h+var_58] mov rsi, [rsp+158h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_8317A jmp loc_83501 loc_8317A: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_48] mov rdx, [rsp+158h+var_40] mov ecx, 56h ; 'V' call JS_GetProperty mov [rsp+158h+var_E8], rax mov [rsp+158h+var_E0], rdx mov rax, [rsp+158h+var_E8] mov [rsp+158h+var_68], rax mov rax, [rsp+158h+var_E0] mov [rsp+158h+var_60], rax mov rdi, [rsp+158h+var_68] mov rsi, [rsp+158h+var_60] call JS_IsException_1 cmp eax, 0 jz short loc_831DF jmp loc_83501 loc_831DF: mov rax, [rsp+158h+var_28] mov [rsp+158h+var_150], rax xor edi, edi call js_int32 mov rdi, [rsp+158h+var_150] mov [rsp+158h+var_F8], rax mov [rsp+158h+var_F0], rdx mov rsi, [rsp+158h+var_68] mov rdx, [rsp+158h+var_60] mov rcx, [rsp+158h+var_F8] mov r8, [rsp+158h+var_F0] call js_same_value cmp eax, 0 jnz short loc_83277 mov rax, [rsp+158h+var_28] mov [rsp+158h+var_158], rax xor edi, edi call js_int32 mov rdi, [rsp+158h+var_158] mov [rsp+158h+var_108], rax mov [rsp+158h+var_100], rdx mov rsi, [rsp+158h+var_48] mov rdx, [rsp+158h+var_40] mov r8, [rsp+158h+var_108] mov r9, [rsp+158h+var_100] mov ecx, 56h ; 'V' call JS_SetProperty cmp eax, 0 jge short loc_83275 jmp loc_83501 loc_83275: jmp short $+2 loc_83277: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_48] mov rdx, [rsp+158h+var_40] mov rcx, [rsp+158h+var_58] mov r8, [rsp+158h+var_50] call JS_RegExpExec mov [rsp+158h+var_118], rax mov [rsp+158h+var_110], rdx mov rax, [rsp+158h+var_118] mov [rsp+158h+var_88], rax mov rax, [rsp+158h+var_110] mov [rsp+158h+var_80], rax mov rdi, [rsp+158h+var_88] mov rsi, [rsp+158h+var_80] call JS_IsException_1 cmp eax, 0 jz short loc_832E7 jmp loc_83501 loc_832E7: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_48] mov rdx, [rsp+158h+var_40] mov ecx, 56h ; 'V' call JS_GetProperty mov [rsp+158h+var_128], rax mov [rsp+158h+var_120], rdx mov rax, [rsp+158h+var_128] mov [rsp+158h+var_78], rax mov rax, [rsp+158h+var_120] mov [rsp+158h+var_70], rax mov rdi, [rsp+158h+var_78] mov rsi, [rsp+158h+var_70] call JS_IsException_1 cmp eax, 0 jz short loc_8334C jmp loc_83501 loc_8334C: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_78] mov rdx, [rsp+158h+var_70] mov rcx, [rsp+158h+var_68] mov r8, [rsp+158h+var_60] call js_same_value cmp eax, 0 jz short loc_8339D mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_68] mov rdx, [rsp+158h+var_60] call JS_FreeValue jmp short loc_83406 loc_8339D: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_48] mov rdx, [rsp+158h+var_40] mov r8, [rsp+158h+var_68] mov r9, [rsp+158h+var_60] mov ecx, 56h ; 'V' call JS_SetProperty cmp eax, 0 jge short loc_83404 mov dword ptr [rsp+158h+var_138], 0 mov [rsp+158h+var_130], 3 mov rax, [rsp+158h+var_138] mov [rsp+158h+var_68], rax mov rax, [rsp+158h+var_130] mov [rsp+158h+var_60], rax jmp loc_83501 loc_83404: jmp short $+2 loc_83406: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_58] mov rdx, [rsp+158h+var_50] call JS_FreeValue mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_78] mov rdx, [rsp+158h+var_70] call JS_FreeValue mov rdi, [rsp+158h+var_88] mov rsi, [rsp+158h+var_80] call JS_IsNull_0 cmp eax, 0 jz short loc_83479 mov edi, 0FFFFFFFFh call js_int32 mov [rsp+158h+var_10], rax mov [rsp+158h+var_8], rdx jmp loc_8358C loc_83479: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_88] mov rdx, [rsp+158h+var_80] mov ecx, 58h ; 'X' call JS_GetProperty mov [rsp+158h+var_148], rax mov [rsp+158h+var_140], rdx mov rax, [rsp+158h+var_148] mov [rsp+158h+var_98], rax mov rax, [rsp+158h+var_140] mov [rsp+158h+var_90], rax mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_88] mov rdx, [rsp+158h+var_80] call JS_FreeValue mov rax, [rsp+158h+var_98] mov [rsp+158h+var_10], rax mov rax, [rsp+158h+var_90] mov [rsp+158h+var_8], rax jmp loc_8358C loc_83501: mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_88] mov rdx, [rsp+158h+var_80] call JS_FreeValue mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_58] mov rdx, [rsp+158h+var_50] call JS_FreeValue mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_78] mov rdx, [rsp+158h+var_70] call JS_FreeValue mov rdi, [rsp+158h+var_28] mov rsi, [rsp+158h+var_68] mov rdx, [rsp+158h+var_60] call JS_FreeValue mov dword ptr [rsp+158h+var_10], 0 mov [rsp+158h+var_8], 6 loc_8358C: mov rax, [rsp+158h+var_10] mov rdx, [rsp+158h+var_8] add rsp, 158h retn
long long js_regexp_Symbol_search( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long *a13) { long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rdx long long v22; // rdx unsigned int v23; // edx int v24; // edx long long v25; // rdx long long v26; // rdx long long v28; // [rsp+10h] [rbp-148h] long long v29; // [rsp+20h] [rbp-138h] _DWORD *v30; // [rsp+30h] [rbp-128h] long long v31; // [rsp+40h] [rbp-118h] int v32; // [rsp+50h] [rbp-108h] _DWORD *v33; // [rsp+60h] [rbp-F8h] _DWORD *Property; // [rsp+70h] [rbp-E8h] long long v35; // [rsp+80h] [rbp-D8h] long long v36; // [rsp+90h] [rbp-C8h] long long v37; // [rsp+A0h] [rbp-B8h] long long v38; // [rsp+B0h] [rbp-A8h] long long v39; // [rsp+D0h] [rbp-88h] long long v40; // [rsp+D8h] [rbp-80h] long long v41; // [rsp+E0h] [rbp-78h] long long v42; // [rsp+E8h] [rbp-70h] long long v43; // [rsp+F0h] [rbp-68h] long long v44; // [rsp+F8h] [rbp-60h] long long v45; // [rsp+108h] [rbp-50h] long long v50; // [rsp+148h] [rbp-10h] if ( !JS_IsObject(a2, a3) ) return JS_ThrowTypeErrorNotAnObject(a1, a4, a5, a6, a7, v19, v20, a10, a11, a3, v15, v16, v17, v18); LODWORD(v38) = 0; v39 = v38; v40 = 3LL; LODWORD(v37) = 0; v41 = v37; v42 = 3LL; LODWORD(v36) = 0; v43 = v36; v44 = 3LL; v35 = JS_ToString(a1, *a13, a13[1], v16, v17, v18); v45 = v21; if ( JS_IsException_1(v35, v21) ) goto LABEL_16; Property = (_DWORD *)JS_GetProperty(a1, a2, a3, 86); v43 = (long long)Property; v44 = v22; if ( JS_IsException_1((long long)Property, v22) ) goto LABEL_16; v33 = (_DWORD *)js_int32(0); if ( !(unsigned int)js_same_value(a1, Property, v44, v33, v23) ) { v32 = js_int32(0); if ( (int)JS_SetProperty(a1, a2, a3, 86, v32, v24) < 0 ) goto LABEL_16; } v31 = JS_RegExpExec(a1, a2, a3, v35, v45); v39 = v31; v40 = v25; if ( JS_IsException_1(v31, v25) || (v30 = (_DWORD *)JS_GetProperty(a1, a2, a3, 86), v41 = (long long)v30, v42 = v26, JS_IsException_1((long long)v30, v26)) ) { LABEL_16: JS_FreeValue(a1, v39, v40); JS_FreeValue(a1, v35, v45); JS_FreeValue(a1, v41, v42); JS_FreeValue(a1, v43, v44); LODWORD(v50) = 0; return v50; } if ( (unsigned int)js_same_value(a1, v30, v42, Property, v44) ) { JS_FreeValue(a1, (long long)Property, v44); goto LABEL_13; } if ( (int)JS_SetProperty(a1, a2, a3, 86, (int)Property, v44) < 0 ) { LODWORD(v29) = 0; v43 = v29; v44 = 3LL; goto LABEL_16; } LABEL_13: JS_FreeValue(a1, v35, v45); JS_FreeValue(a1, (long long)v30, v42); if ( JS_IsNull_0(v31, v40) ) return js_int32(-1); v28 = JS_GetProperty(a1, v31, v40, 88); JS_FreeValue(a1, v31, v40); return v28; }
js_regexp_Symbol_search: SUB RSP,0x158 MOV qword ptr [RSP + 0x138],RSI MOV qword ptr [RSP + 0x140],RDX MOV qword ptr [RSP + 0x130],RDI MOV dword ptr [RSP + 0x12c],ECX MOV qword ptr [RSP + 0x120],R8 MOV RAX,qword ptr [RSP + 0x138] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x140] MOV qword ptr [RSP + 0x118],RAX MOV RDI,qword ptr [RSP + 0x110] MOV RSI,qword ptr [RSP + 0x118] CALL 0x0012af70 CMP EAX,0x0 JNZ 0x0018306a MOV RDI,qword ptr [RSP + 0x130] CALL 0x0012f5a0 MOV qword ptr [RSP + 0x148],RAX MOV qword ptr [RSP + 0x150],RDX JMP 0x0018358c LAB_0018306a: MOV dword ptr [RSP + 0xb0],0x0 MOV qword ptr [RSP + 0xb8],0x3 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xd8],RAX MOV dword ptr [RSP + 0xa0],0x0 MOV qword ptr [RSP + 0xa8],0x3 MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0xe8],RAX MOV dword ptr [RSP + 0x90],0x0 MOV qword ptr [RSP + 0x98],0x3 MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xf8],RAX MOV RDI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RSP + 0x120] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00129d40 MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],RDX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x108],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x108] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x0018317a JMP 0x00183501 LAB_0018317a: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] MOV ECX,0x56 CALL 0x00129d80 MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x78],RDX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xf8],RAX MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xf8] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001831df JMP 0x00183501 LAB_001831df: MOV RAX,qword ptr [RSP + 0x130] MOV qword ptr [RSP + 0x8],RAX XOR EDI,EDI CALL 0x00133cc0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] MOV RCX,qword ptr [RSP + 0x60] MOV R8,qword ptr [RSP + 0x68] CALL 0x00135b10 CMP EAX,0x0 JNZ 0x00183277 MOV RAX,qword ptr [RSP + 0x130] MOV qword ptr [RSP],RAX XOR EDI,EDI CALL 0x00133cc0 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] MOV R8,qword ptr [RSP + 0x50] MOV R9,qword ptr [RSP + 0x58] MOV ECX,0x56 CALL 0x00131f00 CMP EAX,0x0 JGE 0x00183275 JMP 0x00183501 LAB_00183275: JMP 0x00183277 LAB_00183277: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] MOV RCX,qword ptr [RSP + 0x100] MOV R8,qword ptr [RSP + 0x108] CALL 0x00184350 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xd8],RAX MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001832e7 JMP 0x00183501 LAB_001832e7: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] MOV ECX,0x56 CALL 0x00129d80 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0xe8],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x0018334c JMP 0x00183501 LAB_0018334c: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xe8] MOV RCX,qword ptr [RSP + 0xf0] MOV R8,qword ptr [RSP + 0xf8] CALL 0x00135b10 CMP EAX,0x0 JZ 0x0018339d MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] CALL 0x00123c90 JMP 0x00183406 LAB_0018339d: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] MOV R8,qword ptr [RSP + 0xf0] MOV R9,qword ptr [RSP + 0xf8] MOV ECX,0x56 CALL 0x00131f00 CMP EAX,0x0 JGE 0x00183404 MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0xf8],RAX JMP 0x00183501 LAB_00183404: JMP 0x00183406 LAB_00183406: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xe8] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x0012e240 CMP EAX,0x0 JZ 0x00183479 MOV EDI,0xffffffff CALL 0x00133cc0 MOV qword ptr [RSP + 0x148],RAX MOV qword ptr [RSP + 0x150],RDX JMP 0x0018358c LAB_00183479: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xd8] MOV ECX,0x58 CALL 0x00129d80 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0xc8],RAX MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xd8] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x148],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x150],RAX JMP 0x0018358c LAB_00183501: MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xd8] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xe8] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] CALL 0x00123c90 MOV dword ptr [RSP + 0x148],0x0 MOV qword ptr [RSP + 0x150],0x6 LAB_0018358c: MOV RAX,qword ptr [RSP + 0x148] MOV RDX,qword ptr [RSP + 0x150] ADD RSP,0x158 RET
int1 [16] js_regexp_Symbol_search (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { long lVar1; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int iVar7; int8 uVar9; int8 uVar10; int8 uVar13; int8 uVar14; int1 auVar16 [16]; int1 auVar17 [16]; int1 auVar18 [16]; int1 auVar19 [16]; uint uStack_134; uint uStack_c4; uint uStack_b4; uint uStack_a4; int8 local_88; int8 local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int4 local_10; int4 uStack_c; int8 local_8; int8 uVar8; int8 uVar11; int8 uVar12; int8 uVar15; iVar7 = JS_IsObject(param_2,param_3); if (iVar7 == 0) { auVar16 = JS_ThrowTypeErrorNotAnObject(param_1); local_8 = auVar16._8_8_; local_10 = auVar16._0_4_; uStack_c = auVar16._4_4_; goto LAB_0018358c; } lVar1 = (ulong)uStack_a4 << 0x20; auVar18._8_8_ = 3; auVar18._0_8_ = lVar1; auVar3._8_8_ = 3; auVar3._0_8_ = lVar1; auVar2._8_8_ = 3; auVar2._0_8_ = lVar1; lVar1 = (ulong)uStack_b4 << 0x20; auVar19._8_8_ = 3; auVar19._0_8_ = lVar1; auVar6._8_8_ = 3; auVar6._0_8_ = lVar1; auVar5._8_8_ = 3; auVar5._0_8_ = lVar1; auVar4._8_8_ = 3; auVar4._0_8_ = lVar1; auVar16._8_8_ = 3; auVar16._0_8_ = (ulong)uStack_c4 << 0x20; auVar17 = JS_ToString(param_1,*param_5,param_5[1]); uVar12 = auVar17._8_8_; uVar8 = auVar17._0_8_; iVar7 = JS_IsException(uVar8,uVar12); if (iVar7 == 0) { auVar16 = JS_GetProperty(param_1,param_2,param_3,0x56); uVar13 = auVar16._8_8_; uVar9 = auVar16._0_8_; iVar7 = JS_IsException(uVar9,uVar13); auVar18 = auVar3; auVar19 = auVar6; if (iVar7 == 0) { auVar18 = js_int32(0); iVar7 = js_same_value(param_1,uVar9,uVar13,auVar18._0_8_,auVar18._8_8_); if (iVar7 == 0) { auVar18 = js_int32(0); iVar7 = JS_SetProperty(param_1,param_2,param_3,0x56,auVar18._0_8_,auVar18._8_8_); auVar18 = auVar2; auVar19 = auVar4; if (iVar7 < 0) goto LAB_00183501; } auVar18 = JS_RegExpExec(param_1,param_2,param_3,uVar8,uVar12); uVar14 = auVar18._8_8_; uVar10 = auVar18._0_8_; iVar7 = JS_IsException(uVar10,uVar14); auVar19 = auVar5; if (iVar7 == 0) { auVar19 = JS_GetProperty(param_1,param_2,param_3,0x56); uVar15 = auVar19._8_8_; uVar11 = auVar19._0_8_; iVar7 = JS_IsException(uVar11,uVar15); if (iVar7 == 0) { iVar7 = js_same_value(param_1,uVar11,uVar15,uVar9,uVar13); if (iVar7 == 0) { iVar7 = JS_SetProperty(param_1,param_2,param_3,0x56,uVar9,uVar13); if (iVar7 < 0) { auVar16._8_8_ = 3; auVar16._0_8_ = (ulong)uStack_134 << 0x20; goto LAB_00183501; } } else { JS_FreeValue(param_1,uVar9,uVar13); } JS_FreeValue(param_1,uVar8,uVar12); JS_FreeValue(param_1,uVar11,uVar15); iVar7 = JS_IsNull(uVar10,uVar14); if (iVar7 == 0) { auVar16 = JS_GetProperty(param_1,uVar10,uVar14,0x58); local_8 = auVar16._8_8_; JS_FreeValue(param_1,uVar10,uVar14); local_10 = auVar16._0_4_; uStack_c = auVar16._4_4_; } else { auVar16 = js_int32(0xffffffff); local_8 = auVar16._8_8_; local_10 = auVar16._0_4_; uStack_c = auVar16._4_4_; } goto LAB_0018358c; } } } } LAB_00183501: local_70 = auVar19._8_8_; local_78 = auVar19._0_8_; local_80 = auVar18._8_8_; local_88 = auVar18._0_8_; local_60 = auVar16._8_8_; local_68 = auVar16._0_8_; JS_FreeValue(param_1,local_88,local_80); JS_FreeValue(param_1,uVar8,uVar12); JS_FreeValue(param_1,local_78,local_70); JS_FreeValue(param_1,local_68,local_60); local_10 = 0; local_8 = 6; LAB_0018358c: auVar17._4_4_ = uStack_c; auVar17._0_4_ = local_10; auVar17._8_8_ = local_8; return auVar17; }
48,472
js_regexp_Symbol_search
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_Symbol_search(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue rx = this_val; JSValue str, previousLastIndex, currentLastIndex, result, index; if (!JS_IsObject(rx)) return JS_ThrowTypeErrorNotAnObject(ctx); result = JS_UNDEFINED; currentLastIndex = JS_UNDEFINED; previousLastIndex = JS_UNDEFINED; str = JS_ToString(ctx, argv[0]); if (JS_IsException(str)) goto exception; previousLastIndex = JS_GetProperty(ctx, rx, JS_ATOM_lastIndex); if (JS_IsException(previousLastIndex)) goto exception; if (!js_same_value(ctx, previousLastIndex, js_int32(0))) { if (JS_SetProperty(ctx, rx, JS_ATOM_lastIndex, js_int32(0)) < 0) { goto exception; } } result = JS_RegExpExec(ctx, rx, str); if (JS_IsException(result)) goto exception; currentLastIndex = JS_GetProperty(ctx, rx, JS_ATOM_lastIndex); if (JS_IsException(currentLastIndex)) goto exception; if (js_same_value(ctx, currentLastIndex, previousLastIndex)) { JS_FreeValue(ctx, previousLastIndex); } else { if (JS_SetProperty(ctx, rx, JS_ATOM_lastIndex, previousLastIndex) < 0) { previousLastIndex = JS_UNDEFINED; goto exception; } } JS_FreeValue(ctx, str); JS_FreeValue(ctx, currentLastIndex); if (JS_IsNull(result)) { return js_int32(-1); } else { index = JS_GetProperty(ctx, result, JS_ATOM_index); JS_FreeValue(ctx, result); return index; } exception: JS_FreeValue(ctx, result); JS_FreeValue(ctx, str); JS_FreeValue(ctx, currentLastIndex); JS_FreeValue(ctx, previousLastIndex); return JS_EXCEPTION; }
O1
c
js_regexp_Symbol_search: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r13 movq %rdi, %rbx cmpl $-0x1, %r13d jne 0x4ac0f movq %rsi, %rbp movq (%r8), %rsi movq 0x8(%r8), %rdx movq %rbx, %rdi xorl %ecx, %ecx callq 0x27add movq %rdx, %r14 cmpl $0x6, %r14d movq %rax, 0x48(%rsp) jne 0x4ac2e movl $0x3, %edx xorl %r12d, %r12d movl $0x3, %r15d xorl %r13d, %r13d xorl %esi, %esi movl $0x3, %ebp jmp 0x4adc1 leaq 0x5440f(%rip), %rsi # 0x9f025 xorl %r15d, %r15d movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %r14d jmp 0x4ae02 movq %rax, %r15 movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movl $0x56, %ecx movq %rbp, %r8 movq %r13, %r9 callq 0x22fa3 movq %rdx, %rcx cmpl $0x6, %ecx jne 0x4ac7d xorl %esi, %esi movl $0x3, %edx xorl %r12d, %r12d movl $0x3, %r15d movq %rcx, %rbp movq %rax, %r13 jmp 0x4adc1 movq %rbx, %rdi movq %rax, 0x30(%rsp) movq %rax, %rsi movq %rcx, 0x28(%rsp) movq %rcx, %rdx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x26461 testl %eax, %eax jne 0x4ace3 movq %rbp, 0x50(%rsp) movq %r13, 0x58(%rsp) movups 0x50(%rsp), %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movl $0x56, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x24388 testl %eax, %eax js 0x4ada7 movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movq %r15, %rcx movq %r14, %r8 callq 0x4b761 movq %rax, %rsi movl %edx, %eax cmpq $0x6, %rax jne 0x4ad15 xorl %r12d, %r12d movl $0x3, %r15d movq 0x28(%rsp), %rbp jmp 0x4adbc movq %rax, 0x60(%rsp) movq %rdx, 0x38(%rsp) movq %rsi, 0x40(%rsp) movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movl $0x56, %ecx movq %rbp, %r8 movq %r13, %r9 callq 0x22fa3 movq %rax, %r12 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x4ad6f movq 0x28(%rsp), %rbp movq 0x40(%rsp), %rsi movq 0x30(%rsp), %r13 movq 0x38(%rsp), %rdx jmp 0x4adc1 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq 0x30(%rsp), %rcx movq 0x28(%rsp), %r8 callq 0x26461 testl %eax, %eax je 0x4ae1c movq 0x18(%rbx), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x1d8c6 jmp 0x4ae65 movl $0x3, %edx xorl %r12d, %r12d movl $0x3, %r15d movq 0x28(%rsp), %rbp xorl %esi, %esi movq 0x30(%rsp), %r13 movq 0x18(%rbx), %rdi callq 0x1d8c6 movq 0x18(%rbx), %rdi movq 0x48(%rsp), %rsi movq %r14, %rdx callq 0x1d8c6 movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1d8c6 movq 0x18(%rbx), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1d8c6 movl $0x6, %r14d xorl %r15d, %r15d xorl %eax, %eax orq %rax, %r15 movq %r15, %rax movq %r14, %rdx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbp, 0x50(%rsp) movq %r13, 0x58(%rsp) movups 0x50(%rsp), %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movl $0x56, %ecx movq 0x30(%rsp), %r8 movq 0x28(%rsp), %r9 callq 0x24388 testl %eax, %eax js 0x4aef9 movq 0x18(%rbx), %rdi movq 0x48(%rsp), %rsi movq %r14, %rdx callq 0x1d8c6 movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1d8c6 cmpl $0x2, 0x60(%rsp) jne 0x4ae9c movl $0xffffffff, %r15d # imm = 0xFFFFFFFF xorl %eax, %eax xorl %r14d, %r14d jmp 0x4ae04 movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) movq %rbx, %rdi movq 0x40(%rsp), %r12 movq %r12, %rsi movq 0x38(%rsp), %r13 movq %r13, %rdx movl $0x58, %ecx movq %r12, %r8 movq %r13, %r9 callq 0x22fa3 movq %rax, %r15 movq %rdx, %r14 movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1d8c6 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 andq %r15, %rax movl %r15d, %r15d jmp 0x4ae04 xorl %r13d, %r13d movq 0x40(%rsp), %rsi movl $0x3, %ebp jmp 0x4ad68
js_regexp_Symbol_search: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r13, rdx mov rbx, rdi cmp r13d, 0FFFFFFFFh jnz short loc_4AC0F mov rbp, rsi mov rsi, [r8] mov rdx, [r8+8] mov rdi, rbx xor ecx, ecx call JS_ToStringInternal mov r14, rdx cmp r14d, 6 mov [rsp+98h+var_50], rax jnz short loc_4AC2E mov edx, 3 xor r12d, r12d mov r15d, 3 xor r13d, r13d xor esi, esi mov ebp, 3 jmp loc_4ADC1 loc_4AC0F: lea rsi, aOperandPrototy+20h; "not an object" xor r15d, r15d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r14d, 6 jmp loc_4AE02 loc_4AC2E: mov r15, rax mov dword ptr [rsp+98h+var_98+8], 0 mov qword ptr [rsp+98h+var_98], 0 mov rdi, rbx mov rsi, rbp mov rdx, r13 mov ecx, 56h ; 'V' mov r8, rbp mov r9, r13 call JS_GetPropertyInternal2 mov rcx, rdx cmp ecx, 6 jnz short loc_4AC7D xor esi, esi mov edx, 3 xor r12d, r12d mov r15d, 3 mov rbp, rcx mov r13, rax jmp loc_4ADC1 loc_4AC7D: mov rdi, rbx mov [rsp+98h+var_68], rax mov rsi, rax mov [rsp+98h+var_70], rcx mov rdx, rcx xor ecx, ecx xor r8d, r8d call js_same_value test eax, eax jnz short loc_4ACE3 mov qword ptr [rsp+98h+var_48], rbp mov qword ptr [rsp+98h+var_48+8], r13 movups xmm0, [rsp+98h+var_48] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_80], 0 mov [rsp+98h+var_88], 4000h mov rdi, rbx mov rsi, rbp mov rdx, r13 mov ecx, 56h ; 'V' xor r8d, r8d xor r9d, r9d call JS_SetPropertyInternal2 test eax, eax js loc_4ADA7 loc_4ACE3: mov rdi, rbx mov rsi, rbp mov rdx, r13 mov rcx, r15 mov r8, r14 call JS_RegExpExec mov rsi, rax mov eax, edx cmp rax, 6 jnz short loc_4AD15 xor r12d, r12d mov r15d, 3 mov rbp, [rsp+98h+var_70] jmp loc_4ADBC loc_4AD15: mov [rsp+98h+var_38], rax mov [rsp+98h+var_60], rdx mov [rsp+98h+var_58], rsi mov dword ptr [rsp+98h+var_98+8], 0 mov qword ptr [rsp+98h+var_98], 0 mov rdi, rbx mov rsi, rbp mov rdx, r13 mov ecx, 56h ; 'V' mov r8, rbp mov r9, r13 call JS_GetPropertyInternal2 mov r12, rax mov r15, rdx cmp r15d, 6 jnz short loc_4AD6F mov rbp, [rsp+98h+var_70] mov rsi, [rsp+98h+var_58] mov r13, [rsp+98h+var_68] loc_4AD68: mov rdx, [rsp+98h+var_60] jmp short loc_4ADC1 loc_4AD6F: mov rdi, rbx mov rsi, r12 mov rdx, r15 mov rcx, [rsp+98h+var_68] mov r8, [rsp+98h+var_70] call js_same_value test eax, eax jz loc_4AE1C mov rdi, [rbx+18h] mov rsi, [rsp+98h+var_68] mov rdx, [rsp+98h+var_70] call JS_FreeValueRT jmp loc_4AE65 loc_4ADA7: mov edx, 3 xor r12d, r12d mov r15d, 3 mov rbp, [rsp+98h+var_70] xor esi, esi loc_4ADBC: mov r13, [rsp+98h+var_68] loc_4ADC1: mov rdi, [rbx+18h] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rsp+98h+var_50] mov rdx, r14 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, r13 mov rdx, rbp call JS_FreeValueRT mov r14d, 6 xor r15d, r15d loc_4AE02: xor eax, eax loc_4AE04: or r15, rax mov rax, r15 mov rdx, r14 add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4AE1C: mov qword ptr [rsp+98h+var_48], rbp mov qword ptr [rsp+98h+var_48+8], r13 movups xmm0, [rsp+98h+var_48] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_80], 0 mov [rsp+98h+var_88], 4000h mov rdi, rbx mov rsi, rbp mov rdx, r13 mov ecx, 56h ; 'V' mov r8, [rsp+98h+var_68] mov r9, [rsp+98h+var_70] call JS_SetPropertyInternal2 test eax, eax js loc_4AEF9 loc_4AE65: mov rdi, [rbx+18h] mov rsi, [rsp+98h+var_50] mov rdx, r14 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT cmp dword ptr [rsp+98h+var_38], 2 jnz short loc_4AE9C mov r15d, 0FFFFFFFFh xor eax, eax xor r14d, r14d jmp loc_4AE04 loc_4AE9C: mov dword ptr [rsp+98h+var_98+8], 0 mov qword ptr [rsp+98h+var_98], 0 mov rdi, rbx mov r12, [rsp+98h+var_58] mov rsi, r12 mov r13, [rsp+98h+var_60] mov rdx, r13 mov ecx, 58h ; 'X' mov r8, r12 mov r9, r13 call JS_GetPropertyInternal2 mov r15, rax mov r14, rdx mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r13 call JS_FreeValueRT mov rax, 0FFFFFFFF00000000h and rax, r15 mov r15d, r15d jmp loc_4AE04 loc_4AEF9: xor r13d, r13d mov rsi, [rsp+98h+var_58] mov ebp, 3 jmp loc_4AD68
unsigned long long js_regexp_Symbol_search( long long a1, long long a2, unsigned 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) { unsigned long long v16; // rax long long v17; // rdx long long v18; // r14 long long v19; // rdx _DWORD *v20; // r12 long long v21; // r15 _DWORD *v22; // r13 _DWORD *v23; // rsi long long v24; // rbp unsigned long long v25; // r15 unsigned long long v26; // r15 _DWORD *PropertyInternal2; // rax long long v28; // rdx long long v29; // rcx double v30; // xmm4_8 double v31; // xmm5_8 _DWORD *v32; // rax long long v33; // rdx double v34; // xmm4_8 double v35; // xmm5_8 unsigned long long v36; // rax char v38; // [rsp+0h] [rbp-98h] long long v39; // [rsp+28h] [rbp-70h] _DWORD *v40; // [rsp+30h] [rbp-68h] long long v41; // [rsp+38h] [rbp-60h] _DWORD *v42; // [rsp+48h] [rbp-50h] __m128 v43; // [rsp+50h] [rbp-48h] __m128 v44; // [rsp+50h] [rbp-48h] int v45; // [rsp+60h] [rbp-38h] if ( (_DWORD)a3 != -1 ) { v25 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v38); LABEL_19: v36 = 0LL; return v36 | v25; } v16 = JS_ToStringInternal(a1, *a5, a5[1], 0, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; v42 = (_DWORD *)v16; if ( (_DWORD)v17 == 6 ) { v19 = 3LL; v20 = 0LL; v21 = 3LL; v22 = 0LL; v23 = 0LL; v24 = 3LL; LABEL_18: JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v19); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v42, v18); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v20, v21); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22, v24); v25 = 0LL; goto LABEL_19; } v26 = v16; PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, a2, a3, 0x56u, a2, a3, 0LL, 0); v29 = v28; if ( (_DWORD)v28 == 6 ) { v23 = 0LL; v19 = 3LL; v20 = 0LL; v21 = 3LL; v24 = v29; v22 = PropertyInternal2; goto LABEL_18; } v40 = PropertyInternal2; v39 = v28; if ( !(unsigned int)js_same_value(a1, PropertyInternal2, v28, 0LL, 0LL) ) { v43.m128_u64[0] = a2; v43.m128_u64[1] = a3; if ( (int)JS_SetPropertyInternal2( a1, a2, a3, 0x56u, 0LL, 0LL, v43, a8, a9, a10, v30, v31, a13, a14, a2, a3, 0x4000u, 0LL) < 0 ) { v19 = 3LL; v20 = 0LL; v21 = 3LL; v24 = v39; v23 = 0LL; goto LABEL_17; } } v23 = (_DWORD *)JS_RegExpExec(a1, a2, a3, v26, v18); if ( (unsigned int)v19 == 6LL ) { v20 = 0LL; v21 = 3LL; v24 = v39; LABEL_17: v22 = v40; goto LABEL_18; } v45 = v19; v41 = v19; v32 = (_DWORD *)JS_GetPropertyInternal2(a1, a2, a3, 0x56u, a2, a3, 0LL, 0); v20 = v32; v21 = v33; if ( (_DWORD)v33 == 6 ) { v24 = v39; v22 = v40; LABEL_13: v19 = v41; goto LABEL_18; } if ( (unsigned int)js_same_value(a1, v32, v33, v40, v39) ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v40, v39); } else { v44.m128_u64[0] = a2; v44.m128_u64[1] = a3; if ( (int)JS_SetPropertyInternal2( a1, a2, a3, 0x56u, v40, v39, v44, a8, a9, a10, v34, v35, a13, a14, a2, a3, 0x4000u, 0LL) < 0 ) { v22 = 0LL; v24 = 3LL; goto LABEL_13; } } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v42, v18); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v20, v21); if ( v45 == 2 ) { v25 = 0xFFFFFFFFLL; v36 = 0LL; } else { v25 = JS_GetPropertyInternal2(a1, (long long)v23, v41, 0x58u, (long long)v23, v41, 0LL, 0); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v41); v36 = v25 & 0xFFFFFFFF00000000LL; v25 = (unsigned int)v25; } return v36 | v25; }
js_regexp_Symbol_search: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R13,RDX MOV RBX,RDI CMP R13D,-0x1 JNZ 0x0014ac0f MOV RBP,RSI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] MOV RDI,RBX XOR ECX,ECX CALL 0x00127add MOV R14,RDX CMP R14D,0x6 MOV qword ptr [RSP + 0x48],RAX JNZ 0x0014ac2e MOV EDX,0x3 XOR R12D,R12D MOV R15D,0x3 XOR R13D,R13D XOR ESI,ESI MOV EBP,0x3 JMP 0x0014adc1 LAB_0014ac0f: LEA RSI,[0x19f025] XOR R15D,R15D MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 MOV R14D,0x6 JMP 0x0014ae02 LAB_0014ac2e: MOV R15,RAX MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 MOV ECX,0x56 MOV R8,RBP MOV R9,R13 CALL 0x00122fa3 MOV RCX,RDX CMP ECX,0x6 JNZ 0x0014ac7d XOR ESI,ESI MOV EDX,0x3 XOR R12D,R12D MOV R15D,0x3 MOV RBP,RCX MOV R13,RAX JMP 0x0014adc1 LAB_0014ac7d: MOV RDI,RBX MOV qword ptr [RSP + 0x30],RAX MOV RSI,RAX MOV qword ptr [RSP + 0x28],RCX MOV RDX,RCX XOR ECX,ECX XOR R8D,R8D CALL 0x00126461 TEST EAX,EAX JNZ 0x0014ace3 MOV qword ptr [RSP + 0x50],RBP MOV qword ptr [RSP + 0x58],R13 MOVUPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x10],0x4000 MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 MOV ECX,0x56 XOR R8D,R8D XOR R9D,R9D CALL 0x00124388 TEST EAX,EAX JS 0x0014ada7 LAB_0014ace3: MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 MOV RCX,R15 MOV R8,R14 CALL 0x0014b761 MOV RSI,RAX MOV EAX,EDX CMP RAX,0x6 JNZ 0x0014ad15 XOR R12D,R12D MOV R15D,0x3 MOV RBP,qword ptr [RSP + 0x28] JMP 0x0014adbc LAB_0014ad15: MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x40],RSI MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 MOV ECX,0x56 MOV R8,RBP MOV R9,R13 CALL 0x00122fa3 MOV R12,RAX MOV R15,RDX CMP R15D,0x6 JNZ 0x0014ad6f MOV RBP,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x40] MOV R13,qword ptr [RSP + 0x30] LAB_0014ad68: MOV RDX,qword ptr [RSP + 0x38] JMP 0x0014adc1 LAB_0014ad6f: MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x28] CALL 0x00126461 TEST EAX,EAX JZ 0x0014ae1c MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] CALL 0x0011d8c6 JMP 0x0014ae65 LAB_0014ada7: MOV EDX,0x3 XOR R12D,R12D MOV R15D,0x3 MOV RBP,qword ptr [RSP + 0x28] XOR ESI,ESI LAB_0014adbc: MOV R13,qword ptr [RSP + 0x30] LAB_0014adc1: MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011d8c6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,R14 CALL 0x0011d8c6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011d8c6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R13 MOV RDX,RBP CALL 0x0011d8c6 MOV R14D,0x6 XOR R15D,R15D LAB_0014ae02: XOR EAX,EAX LAB_0014ae04: OR R15,RAX MOV RAX,R15 MOV RDX,R14 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014ae1c: MOV qword ptr [RSP + 0x50],RBP MOV qword ptr [RSP + 0x58],R13 MOVUPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x10],0x4000 MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 MOV ECX,0x56 MOV R8,qword ptr [RSP + 0x30] MOV R9,qword ptr [RSP + 0x28] CALL 0x00124388 TEST EAX,EAX JS 0x0014aef9 LAB_0014ae65: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,R14 CALL 0x0011d8c6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011d8c6 CMP dword ptr [RSP + 0x60],0x2 JNZ 0x0014ae9c MOV R15D,0xffffffff XOR EAX,EAX XOR R14D,R14D JMP 0x0014ae04 LAB_0014ae9c: MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 MOV RDI,RBX MOV R12,qword ptr [RSP + 0x40] MOV RSI,R12 MOV R13,qword ptr [RSP + 0x38] MOV RDX,R13 MOV ECX,0x58 MOV R8,R12 MOV R9,R13 CALL 0x00122fa3 MOV R15,RAX MOV R14,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R13 CALL 0x0011d8c6 MOV RAX,-0x100000000 AND RAX,R15 MOV R15D,R15D JMP 0x0014ae04 LAB_0014aef9: XOR R13D,R13D MOV RSI,qword ptr [RSP + 0x40] MOV EBP,0x3 JMP 0x0014ad68
int1 [16] js_regexp_Symbol_search (long param_1,int8 param_2,int8 param_3,int8 param_4,int8 *param_5 ) { int iVar1; int8 uVar2; int8 uVar3; ulong uVar4; int8 uVar6; int8 uVar7; ulong uVar8; int1 auVar9 [16]; int1 auVar10 [16]; int1 auVar11 [16]; int local_38; int8 uVar5; if ((int)param_3 == -1) { auVar9 = JS_ToStringInternal(param_1,*param_5,param_5[1],0); uVar5 = auVar9._8_8_; uVar7 = auVar9._0_8_; if (auVar9._8_4_ == 6) { auVar11 = ZEXT816(3) << 0x40; auVar10 = ZEXT816(3) << 0x40; auVar9 = ZEXT816(3) << 0x40; } else { auVar9 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x56,param_2,param_3,0,0); uVar6 = auVar9._8_8_; uVar2 = auVar9._0_8_; if (auVar9._8_4_ == 6) { auVar10 = ZEXT816(3) << 0x40; auVar11 = ZEXT816(3) << 0x40; } else { iVar1 = js_same_value(param_1,uVar2,uVar6,0,0); if ((iVar1 == 0) && (iVar1 = JS_SetPropertyInternal2 (param_1,param_2,param_3,0x56,0,0,param_2,0xffffffff,0x4000,0), iVar1 < 0)) { auVar10 = ZEXT816(3) << 0x40; } else { auVar10 = JS_RegExpExec(param_1,param_2,param_3,uVar7,uVar5); uVar4 = auVar10._8_8_; uVar3 = auVar10._0_8_; if ((uVar4 & 0xffffffff) != 6) { auVar11 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x56,param_2,param_3,0,0); if (auVar11._8_4_ != 6) { iVar1 = js_same_value(param_1,auVar11._0_8_,auVar11._8_8_,uVar2,uVar6); if (iVar1 == 0) { iVar1 = JS_SetPropertyInternal2 (param_1,param_2,param_3,0x56,uVar2,uVar6,param_2,0xffffffff, 0x4000,0); if (iVar1 < 0) { auVar9 = ZEXT816(3) << 0x40; goto LAB_0014adc1; } } else { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar6); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar7,uVar5); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar11._0_8_,auVar11._8_8_); local_38 = auVar10._8_4_; if (local_38 == 2) { uVar8 = 0xffffffff; uVar4 = 0; uVar7 = 0; } else { auVar9 = JS_GetPropertyInternal2(param_1,uVar3,uVar4,0x58,uVar3,uVar4,0,0); uVar7 = auVar9._8_8_; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar4); uVar4 = auVar9._0_8_ & 0xffffffff00000000; uVar8 = auVar9._0_8_ & 0xffffffff; } goto LAB_0014ae04; } goto LAB_0014adc1; } } auVar11 = ZEXT816(3) << 0x40; } } LAB_0014adc1: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar10._0_8_,auVar10._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar7,uVar5); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar11._0_8_,auVar11._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_); } else { JS_ThrowTypeError(param_1,"not an object"); } uVar8 = 0; uVar7 = 6; uVar4 = 0; LAB_0014ae04: auVar9._8_8_ = uVar7; auVar9._0_8_ = uVar8 | uVar4; return auVar9; }
48,473
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O0
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x20(%rax), %eax movw %ax, -0x3a(%rbp) cmpq $0x10, -0x18(%rbp) jbe 0x94a9e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x94b20 movq %rax, -0x48(%rbp) jmp 0x94aaa movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x94aef movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x38(%rbp) movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movzwl -0x3a(%rbp), %ecx cmpl %ecx, %eax je 0x94aed movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x94aef jmp 0x94ab2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x94990 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_simple: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+20h] mov [rbp+var_3A], ax cmp [rbp+var_18], 10h jbe short loc_94A9E mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call skip_trailing_space_2 mov [rbp+var_48], rax jmp short loc_94AAA loc_94A9E: mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax loc_94AAA: mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_94AB2: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_94AEF mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_3A] cmp eax, ecx jz short loc_94AED mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_94AEF loc_94AED: jmp short loc_94AB2 loc_94AEF: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] sub rdx, rax mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call my_hash_sort_simple_nopad add rsp, 50h pop rbp retn
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5) { unsigned long long v5; // rcx long long v7; // [rsp+8h] [rbp-48h] __int16 v8; // [rsp+16h] [rbp-3Ah] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] v10 = *(_QWORD *)(a1 + 88); v8 = *(unsigned __int8 *)(v10 + 32); if ( a3 <= 0x10 ) v7 = (long long)&a2[a3]; else v7 = skip_trailing_space_2(a2, a3); v9 = v7; while ( (unsigned long long)a2 < v9 ) { v5 = v9--; if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 ) return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5); } return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5); }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x20] MOV word ptr [RBP + -0x3a],AX CMP qword ptr [RBP + -0x18],0x10 JBE 0x00194a9e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00194b20 MOV qword ptr [RBP + -0x48],RAX JMP 0x00194aaa LAB_00194a9e: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LAB_00194aaa: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_00194ab2: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00194aef MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,word ptr [RBP + -0x3a] CMP EAX,ECX JZ 0x00194aed MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00194aef LAB_00194aed: JMP 0x00194ab2 LAB_00194aef: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00194990 ADD RSP,0x50 POP RBP RET
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4, int8 param_5) { char cVar1; long lVar2; ulong uVar3; ulong local_50; ulong local_40; lVar2 = *(long *)(param_1 + 0x58); cVar1 = *(char *)(lVar2 + 0x20); if (param_3 < 0x11) { local_50 = param_2 + param_3; } else { local_50 = skip_trailing_space(param_2,param_3); } local_40 = local_50; uVar3 = local_40; do { local_40 = uVar3; if (local_40 <= param_2) break; uVar3 = local_40 - 1; } while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1); my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5); return; }
48,474
ma_check_index_cond
eloqsql/storage/maria/ma_key.c
check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr, uchar *record) { check_result_t res= CHECK_POS; if (info->index_cond_func) { if (_ma_put_key_in_record(info, keynr, FALSE, record)) { /* Impossible case; Can only happen if bug in code */ _ma_print_error(info, HA_ERR_CRASHED, 0); info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_CRASHED; res= CHECK_ERROR; } else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } return res; }
O0
c
ma_check_index_cond: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl $0x1, -0x1c(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x6f8(%rax) je 0x34c04 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rcx xorl %edx, %edx callq 0x34510 cmpl $0x0, %eax je 0x34bc6 movq -0x8(%rbp), %rdi movl $0x7e, %esi xorl %edx, %edx callq 0x331b0 movq -0x8(%rbp), %rax movq $-0x1, 0x98(%rax) callq 0xf5a70 movl $0x7e, (%rax) movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF jmp 0x34c02 movq -0x8(%rbp), %rax movq 0x6f8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x700(%rcx), %rdi callq *%rax movl %eax, -0x1c(%rbp) cmpl $0x2, %eax jne 0x34c00 movq -0x8(%rbp), %rax movq $-0x1, 0x98(%rax) callq 0xf5a70 movl $0x89, (%rax) jmp 0x34c02 jmp 0x34c04 movl -0x1c(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
ma_check_index_cond: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], 1 mov rax, [rbp+var_8] cmp qword ptr [rax+6F8h], 0 jz loc_34C04 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rcx, [rbp+var_18] xor edx, edx call _ma_put_key_in_record cmp eax, 0 jz short loc_34BC6 mov rdi, [rbp+var_8] mov esi, 7Eh ; '~' xor edx, edx call _ma_print_error mov rax, [rbp+var_8] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_1C], 0FFFFFFFFh jmp short loc_34C02 loc_34BC6: mov rax, [rbp+var_8] mov rax, [rax+6F8h] mov rcx, [rbp+var_8] mov rdi, [rcx+700h] call rax mov [rbp+var_1C], eax cmp eax, 2 jnz short loc_34C00 mov rax, [rbp+var_8] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h loc_34C00: jmp short $+2 loc_34C02: jmp short $+2 loc_34C04: mov eax, [rbp+var_1C] add rsp, 20h pop rbp retn
long long ma_check_index_cond(long long a1, unsigned int a2, long long a3) { long long v3; // rcx long long v4; // r8 int v5; // r9d unsigned int v7; // [rsp+4h] [rbp-1Ch] v7 = 1; if ( *(_QWORD *)(a1 + 1784) ) { if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) ) { ma_print_error((_DWORD *)a1, 126, 0, v3, v4, v5); *(_QWORD *)(a1 + 152) = -1LL; *(_DWORD *)my_thread_var() = 126; return (unsigned int)-1; } else { v7 = (*(long long ( **)(_QWORD))(a1 + 1784))(*(_QWORD *)(a1 + 1792)); if ( v7 == 2 ) { *(_QWORD *)(a1 + 152) = -1LL; *(_DWORD *)my_thread_var() = 137; } } } return v7; }
ma_check_index_cond: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],0x1 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x6f8],0x0 JZ 0x00134c04 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x00134510 CMP EAX,0x0 JZ 0x00134bc6 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x7e XOR EDX,EDX CALL 0x001331b0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],-0x1 CALL 0x001f5a70 MOV dword ptr [RAX],0x7e MOV dword ptr [RBP + -0x1c],0xffffffff JMP 0x00134c02 LAB_00134bc6: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x6f8] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x700] CALL RAX MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x2 JNZ 0x00134c00 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],-0x1 CALL 0x001f5a70 MOV dword ptr [RAX],0x89 LAB_00134c00: JMP 0x00134c02 LAB_00134c02: JMP 0x00134c04 LAB_00134c04: MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x20 POP RBP RET
int ma_check_index_cond(long param_1,int4 param_2,int8 param_3) { int iVar1; int4 *puVar2; int4 local_24; local_24 = 1; if (*(long *)(param_1 + 0x6f8) != 0) { iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3); if (iVar1 == 0) { local_24 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700)); if (local_24 == 2) { *(int8 *)(param_1 + 0x98) = 0xffffffffffffffff; puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; } } else { _ma_print_error(param_1,0x7e,0); *(int8 *)(param_1 + 0x98) = 0xffffffffffffffff; puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_24 = -1; } } return local_24; }
48,475
ma_check_index_cond
eloqsql/storage/maria/ma_key.c
check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr, uchar *record) { check_result_t res= CHECK_POS; if (info->index_cond_func) { if (_ma_put_key_in_record(info, keynr, FALSE, record)) { /* Impossible case; Can only happen if bug in code */ _ma_print_error(info, HA_ERR_CRASHED, 0); info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_CRASHED; res= CHECK_ERROR; } else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } return res; }
O3
c
ma_check_index_cond: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpq $0x0, 0x6f8(%rdi) je 0x373e1 movq %rdx, %rcx movq %rdi, %rbx xorl %edx, %edx callq 0x36fa1 testl %eax, %eax je 0x373e9 movl $0x7e, %r15d movq %rbx, %rdi movl $0x7e, %esi xorl %edx, %edx callq 0x3653e movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x3740a movl $0x1, %r14d jmp 0x3741d movq 0x700(%rbx), %rdi callq *0x6f8(%rbx) movl %eax, %r14d cmpl $0x2, %eax jne 0x3741d movl $0x2, %r14d movl $0x89, %r15d movq $-0x1, 0x98(%rbx) callq 0xa1672 movl %r15d, (%rax) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_check_index_cond: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp qword ptr [rdi+6F8h], 0 jz short loc_373E1 mov rcx, rdx mov rbx, rdi xor edx, edx call _ma_put_key_in_record test eax, eax jz short loc_373E9 mov r15d, 7Eh ; '~' mov rdi, rbx mov esi, 7Eh ; '~' xor edx, edx call _ma_print_error mov r14d, 0FFFFFFFFh jmp short loc_3740A loc_373E1: mov r14d, 1 jmp short loc_3741D loc_373E9: mov rdi, [rbx+700h] call qword ptr [rbx+6F8h] mov r14d, eax cmp eax, 2 jnz short loc_3741D mov r14d, 2 mov r15d, 89h loc_3740A: mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov [rax], r15d loc_3741D: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_check_index_cond(long long a1, long long a2, long long a3) { long long v3; // rbx long long v4; // rcx long long v5; // r8 int v6; // r9d int v7; // r15d long long v8; // rdx long long v9; // rcx long long v10; // r8 unsigned int v11; // r14d if ( *(_QWORD *)(a1 + 1784) ) { v3 = a1; if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) ) { v7 = 126; a2 = 126LL; ma_print_error((_DWORD *)a1, 126, 0, v4, v5, v6); v11 = -1; LABEL_7: *(_QWORD *)(v3 + 152) = -1LL; *(_DWORD *)my_thread_var(a1, a2, v8, v9, v10) = v7; return v11; } a1 = *(_QWORD *)(a1 + 1792); v11 = (*(long long ( **)(long long))(v3 + 1784))(a1); if ( v11 == 2 ) { v11 = 2; v7 = 137; goto LABEL_7; } } else { return 1; } return v11; }
ma_check_index_cond: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP qword ptr [RDI + 0x6f8],0x0 JZ 0x001373e1 MOV RCX,RDX MOV RBX,RDI XOR EDX,EDX CALL 0x00136fa1 TEST EAX,EAX JZ 0x001373e9 MOV R15D,0x7e MOV RDI,RBX MOV ESI,0x7e XOR EDX,EDX CALL 0x0013653e MOV R14D,0xffffffff JMP 0x0013740a LAB_001373e1: MOV R14D,0x1 JMP 0x0013741d LAB_001373e9: MOV RDI,qword ptr [RBX + 0x700] CALL qword ptr [RBX + 0x6f8] MOV R14D,EAX CMP EAX,0x2 JNZ 0x0013741d MOV R14D,0x2 MOV R15D,0x89 LAB_0013740a: MOV qword ptr [RBX + 0x98],-0x1 CALL 0x001a1672 MOV dword ptr [RAX],R15D LAB_0013741d: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int ma_check_index_cond(long param_1,int8 param_2,int8 param_3) { int iVar1; int4 *puVar2; int4 uVar3; if (*(long *)(param_1 + 0x6f8) == 0) { iVar1 = 1; } else { iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3); if (iVar1 == 0) { iVar1 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700)); if (iVar1 != 2) { return iVar1; } iVar1 = 2; uVar3 = 0x89; } else { uVar3 = 0x7e; _ma_print_error(param_1,0x7e,0); iVar1 = -1; } *(int8 *)(param_1 + 0x98) = 0xffffffffffffffff; puVar2 = (int4 *)_my_thread_var(); *puVar2 = uVar3; } return iVar1; }
48,476
translog_create_new_file
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_create_new_file() { TRANSLOG_FILE *file= (TRANSLOG_FILE*)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRANSLOG_FILE), MYF(0)); TRANSLOG_FILE *old= get_current_logfile(); uint32 file_no= LSN_FILE_NO(log_descriptor.horizon); DBUG_ENTER("translog_create_new_file"); if (file == NULL) goto error; /* Writes max_lsn to the file header before finishing it (there is no need to lock file header buffer because it is still unfinished file, so only one thread can finish the file and nobody interested of LSN of current (unfinished) file, because no one can purge it). */ if (translog_max_lsn_to_header(old->handler.file, log_descriptor.max_lsn)) goto error; mysql_rwlock_wrlock(&log_descriptor.open_files_lock); DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); DBUG_ASSERT(file_no == log_descriptor.max_file + 1); if (allocate_dynamic(&log_descriptor.open_files, log_descriptor.max_file - log_descriptor.min_file + 2)) goto error_lock; /* this call just expand the array */ if (insert_dynamic(&log_descriptor.open_files, (uchar*)&file)) goto error_lock; if ((file->handler.file= create_logfile_by_number_no_cache(file_no)) == -1) goto error_lock; translog_file_init(file, file_no, 0); log_descriptor.max_file++; { char *start= (char*) dynamic_element(&log_descriptor.open_files, 0, TRANSLOG_FILE**); memmove(start + sizeof(TRANSLOG_FILE*), start, sizeof(TRANSLOG_FILE*) * (log_descriptor.max_file - log_descriptor.min_file + 1 - 1)); } /* can't fail we because we expanded array */ set_dynamic(&log_descriptor.open_files, (uchar*)&file, 0); DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); mysql_rwlock_unlock(&log_descriptor.open_files_lock); DBUG_PRINT("info", ("file_no: %lu", (ulong)file_no)); if (translog_write_file_header()) goto error; if (ma_control_file_write_and_force(last_checkpoint_lsn, file_no, max_trid_in_control_file, recovery_failures)) goto error; DBUG_RETURN(0); error_lock: mysql_rwlock_unlock(&log_descriptor.open_files_lock); error: translog_stop_writing(); my_free(file); DBUG_RETURN(1); }
O3
c
translog_create_new_file: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movl $0x58, %esi xorl %edi, %edi xorl %edx, %edx callq 0x9f6e1 movq %rax, %rbx movq %rax, -0x18(%rbp) callq 0x4b5e8 testq %rbx, %rbx je 0x4a57d movl 0xbb38ab(%rip), %ebx # 0xbfddac movl 0x18(%rax), %edi movq 0xbb38e5(%rip), %rsi # 0xbfddf0 callq 0x4a6be testb %al, %al jne 0x4a57d cmpq $0x0, 0x3b2f2c(%rip) # 0x3fd448 jne 0x4a68d leaq 0x3b2e8f(%rip), %rdi # 0x3fd3b8 callq 0xa3d09 movl 0x3b2e7c(%rip), %esi # 0x3fd3b0 subl 0x3b2e7a(%rip), %esi # 0x3fd3b4 addl $0x2, %esi leaq 0x3b2e44(%rip), %rdi # 0x3fd388 callq 0x91685 testb %al, %al jne 0x4a561 leaq 0x3b2e34(%rip), %rdi # 0x3fd388 leaq -0x18(%rbp), %rsi callq 0x914f6 testb %al, %al je 0x4a5b6 movq 0x3b2ee0(%rip), %rdi # 0x3fd448 testq %rdi, %rdi jne 0x4a697 leaq 0x3b2e40(%rip), %rdi # 0x3fd3b8 callq 0xa3daa xorl %eax, %eax cmpl $0x3, 0x3b19ca(%rip) # 0x3fbf50 setne %al addl %eax, %eax movl %eax, 0x3b19bf(%rip) # 0x3fbf50 movb $0x1, 0xbb3a98(%rip) # 0xbfe030 movl $0x0, 0x3b2bca(%rip) # 0x3fd16c movq -0x18(%rbp), %rdi callq 0x9f90e movb $0x1, %al addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movl %ebx, %edi callq 0x45cc8 movq -0x18(%rbp), %r14 movl %eax, 0x18(%r14) cmpl $-0x1, %eax je 0x4a561 leaq 0x8(%r14), %rdi callq 0x4f36b leaq -0x513(%rip), %rax # 0x4a0c7 movq %rax, 0x28(%r14) leaq 0x596b(%rip), %rax # 0x4ff50 movq %rax, 0x40(%r14) movq %r14, 0x48(%r14) movl %ebx, (%r14) movw $0x0, 0x50(%r14) movl 0x3b2db3(%rip), %edx # 0x3fd3b0 incl %edx movl %edx, 0x3b2dab(%rip) # 0x3fd3b0 leaq 0x3b2d7c(%rip), %r14 # 0x3fd388 movq 0x3b2d75(%rip), %rsi # 0x3fd388 leaq 0x8(%rsi), %rdi subl 0x3b2d97(%rip), %edx # 0x3fd3b4 shlq $0x3, %rdx callq 0x29120 leaq -0x18(%rbp), %rsi movq %r14, %rdi xorl %edx, %edx callq 0x91608 movq 0x3b2e0d(%rip), %rdi # 0x3fd448 testq %rdi, %rdi jne 0x4a6ac leaq 0x3b2d71(%rip), %rdi # 0x3fd3b8 callq 0xa3daa callq 0x4a3f0 testb %al, %al jne 0x4a57d leaq 0x3b18a0(%rip), %rax # 0x3fbf00 movq (%rax), %rdi leaq 0x3b18a6(%rip), %rax # 0x3fbf10 movq (%rax), %rdx leaq 0x3b18a4(%rip), %rax # 0x3fbf18 movzbl (%rax), %ecx movl %ebx, %esi callq 0x43251 testl %eax, %eax jne 0x4a57d xorl %eax, %eax jmp 0x4a5ad callq 0x2cd85 jmp 0x4a52e leaq 0x33a972(%rip), %rax # 0x385010 movq (%rax), %rax callq *0x168(%rax) jmp 0x4a571 leaq 0x33a95d(%rip), %rax # 0x385010 movq (%rax), %rax callq *0x168(%rax) jmp 0x4a640
translog_create_new_file: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov esi, 58h ; 'X' xor edi, edi xor edx, edx call my_malloc mov rbx, rax mov [rbp+var_18], rax call get_current_logfile test rbx, rbx jz loc_4A57D mov ebx, dword ptr cs:qword_BFDDA8+4 mov edi, [rax+18h] mov rsi, cs:qword_BFDDF0 call translog_max_lsn_to_header test al, al jnz short loc_4A57D cmp cs:qword_3FD448, 0 jnz loc_4A68D lea rdi, unk_3FD3B8 call my_rw_wrlock loc_4A52E: mov esi, dword ptr cs:qword_3FD3B0 sub esi, dword ptr cs:qword_3FD3B0+4 add esi, 2 lea rdi, qword_3FD388 call allocate_dynamic test al, al jnz short loc_4A561 lea rdi, qword_3FD388 lea rsi, [rbp+var_18] call insert_dynamic test al, al jz short loc_4A5B6 loc_4A561: mov rdi, cs:qword_3FD448 test rdi, rdi jnz loc_4A697 loc_4A571: lea rdi, unk_3FD3B8 call my_rw_unlock loc_4A57D: xor eax, eax cmp cs:translog_status, 3 setnz al add eax, eax mov cs:translog_status, eax mov byte ptr cs:word_BFE030, 1 mov cs:dword_3FD16C, 0 mov rdi, [rbp+var_18] call my_free mov al, 1 loc_4A5AD: add rsp, 10h pop rbx pop r14 pop rbp retn loc_4A5B6: mov edi, ebx call create_logfile_by_number_no_cache mov r14, [rbp+var_18] mov [r14+18h], eax cmp eax, 0FFFFFFFFh jz short loc_4A561 lea rdi, [r14+8] call pagecache_file_set_null_hooks lea rax, translog_page_validator mov [r14+28h], rax lea rax, maria_flush_log_for_page_none mov [r14+40h], rax mov [r14+48h], r14 mov [r14], ebx mov word ptr [r14+50h], 0 mov edx, dword ptr cs:qword_3FD3B0 inc edx mov dword ptr cs:qword_3FD3B0, edx lea r14, qword_3FD388 mov rsi, cs:qword_3FD388 lea rdi, [rsi+8] sub edx, dword ptr cs:qword_3FD3B0+4 shl rdx, 3 call _memmove lea rsi, [rbp+var_18] mov rdi, r14 xor edx, edx call set_dynamic mov rdi, cs:qword_3FD448 test rdi, rdi jnz short loc_4A6AC loc_4A640: lea rdi, unk_3FD3B8 call my_rw_unlock call translog_write_file_header test al, al jnz loc_4A57D lea rax, last_checkpoint_lsn mov rdi, [rax] lea rax, max_trid_in_control_file mov rdx, [rax] lea rax, recovery_failures movzx ecx, byte ptr [rax] mov esi, ebx call ma_control_file_write_and_force test eax, eax jnz loc_4A57D xor eax, eax jmp loc_4A5AD loc_4A68D: call translog_create_new_file_cold_1 jmp loc_4A52E loc_4A697: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_4A571 loc_4A6AC: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp short loc_4A640
char translog_create_new_file() { long long current_logfile; // rax unsigned int v1; // ebx long long v2; // rdx long long v3; // rdx long long v4; // rcx int v5; // r8d int v6; // r9d int logfile_by_number_no_cache; // eax long long v9; // r14 _QWORD v10[3]; // [rsp+8h] [rbp-18h] BYREF v10[0] = my_malloc(0LL, 88LL, 0LL); current_logfile = get_current_logfile(0LL); if ( !v10[0] || (v1 = HIDWORD(qword_BFDDA8), (unsigned __int8)translog_max_lsn_to_header(*(unsigned int *)(current_logfile + 24), qword_BFDDF0)) ) { LABEL_10: translog_status = 2 * (translog_status != 3); LOBYTE(word_BFE030) = 1; dword_3FD16C = 0; my_free(v10[0]); return 1; } if ( qword_3FD448 ) translog_create_new_file_cold_1(); else my_rw_wrlock(&unk_3FD3B8); if ( (unsigned __int8)allocate_dynamic(&qword_3FD388, (unsigned int)(qword_3FD3B0 - HIDWORD(qword_3FD3B0) + 2), v2) || (unsigned __int8)insert_dynamic(&qword_3FD388, v10) || (logfile_by_number_no_cache = create_logfile_by_number_no_cache(v1, (long long)v10, v3, v4, v5, v6), v9 = v10[0], *(_DWORD *)(v10[0] + 24LL) = logfile_by_number_no_cache, logfile_by_number_no_cache == -1) ) { if ( qword_3FD448 ) PSI_server[45](); my_rw_unlock(&unk_3FD3B8); goto LABEL_10; } pagecache_file_set_null_hooks(v9 + 8); *(_QWORD *)(v9 + 40) = translog_page_validator; *(_QWORD *)(v9 + 64) = maria_flush_log_for_page_none; *(_QWORD *)(v9 + 72) = v9; *(_DWORD *)v9 = v1; *(_WORD *)(v9 + 80) = 0; LODWORD(qword_3FD3B0) = qword_3FD3B0 + 1; memmove(qword_3FD388 + 8, qword_3FD388, 8LL * (unsigned int)(qword_3FD3B0 - HIDWORD(qword_3FD3B0))); set_dynamic(&qword_3FD388, v10, 0LL); if ( qword_3FD448 ) PSI_server[45](); my_rw_unlock(&unk_3FD3B8); if ( translog_write_file_header((long long)&unk_3FD3B8, (long long)v10) || (unsigned int)ma_control_file_write_and_force( last_checkpoint_lsn, v1, max_trid_in_control_file, (unsigned __int8)recovery_failures) ) { goto LABEL_10; } return 0; }
translog_create_new_file: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV ESI,0x58 XOR EDI,EDI XOR EDX,EDX CALL 0x0019f6e1 MOV RBX,RAX MOV qword ptr [RBP + -0x18],RAX CALL 0x0014b5e8 TEST RBX,RBX JZ 0x0014a57d MOV EBX,dword ptr [0x00cfddac] MOV EDI,dword ptr [RAX + 0x18] MOV RSI,qword ptr [0x00cfddf0] CALL 0x0014a6be TEST AL,AL JNZ 0x0014a57d CMP qword ptr [0x004fd448],0x0 JNZ 0x0014a68d LEA RDI,[0x4fd3b8] CALL 0x001a3d09 LAB_0014a52e: MOV ESI,dword ptr [0x004fd3b0] SUB ESI,dword ptr [0x004fd3b4] ADD ESI,0x2 LEA RDI,[0x4fd388] CALL 0x00191685 TEST AL,AL JNZ 0x0014a561 LEA RDI,[0x4fd388] LEA RSI,[RBP + -0x18] CALL 0x001914f6 TEST AL,AL JZ 0x0014a5b6 LAB_0014a561: MOV RDI,qword ptr [0x004fd448] TEST RDI,RDI JNZ 0x0014a697 LAB_0014a571: LEA RDI,[0x4fd3b8] CALL 0x001a3daa LAB_0014a57d: XOR EAX,EAX CMP dword ptr [0x004fbf50],0x3 SETNZ AL ADD EAX,EAX MOV dword ptr [0x004fbf50],EAX MOV byte ptr [0x00cfe030],0x1 MOV dword ptr [0x004fd16c],0x0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0019f90e MOV AL,0x1 LAB_0014a5ad: ADD RSP,0x10 POP RBX POP R14 POP RBP RET LAB_0014a5b6: MOV EDI,EBX CALL 0x00145cc8 MOV R14,qword ptr [RBP + -0x18] MOV dword ptr [R14 + 0x18],EAX CMP EAX,-0x1 JZ 0x0014a561 LEA RDI,[R14 + 0x8] CALL 0x0014f36b LEA RAX,[0x14a0c7] MOV qword ptr [R14 + 0x28],RAX LEA RAX,[0x14ff50] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x48],R14 MOV dword ptr [R14],EBX MOV word ptr [R14 + 0x50],0x0 MOV EDX,dword ptr [0x004fd3b0] INC EDX MOV dword ptr [0x004fd3b0],EDX LEA R14,[0x4fd388] MOV RSI,qword ptr [0x004fd388] LEA RDI,[RSI + 0x8] SUB EDX,dword ptr [0x004fd3b4] SHL RDX,0x3 CALL 0x00129120 LEA RSI,[RBP + -0x18] MOV RDI,R14 XOR EDX,EDX CALL 0x00191608 MOV RDI,qword ptr [0x004fd448] TEST RDI,RDI JNZ 0x0014a6ac LAB_0014a640: LEA RDI,[0x4fd3b8] CALL 0x001a3daa CALL 0x0014a3f0 TEST AL,AL JNZ 0x0014a57d LEA RAX,[0x4fbf00] MOV RDI,qword ptr [RAX] LEA RAX,[0x4fbf10] MOV RDX,qword ptr [RAX] LEA RAX,[0x4fbf18] MOVZX ECX,byte ptr [RAX] MOV ESI,EBX CALL 0x00143251 TEST EAX,EAX JNZ 0x0014a57d XOR EAX,EAX JMP 0x0014a5ad LAB_0014a68d: CALL 0x0012cd85 JMP 0x0014a52e LAB_0014a697: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0014a571 LAB_0014a6ac: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0014a640
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 translog_create_new_file(void) { int4 uVar1; char cVar2; int iVar3; int4 *puVar4; long lVar5; int4 *local_20; puVar4 = (int4 *)my_malloc(0,0x58,0); local_20 = puVar4; lVar5 = get_current_logfile(); uVar1 = DAT_00cfdda8._4_4_; if ((puVar4 != (int4 *)0x0) && (cVar2 = translog_max_lsn_to_header(*(int4 *)(lVar5 + 0x18),DAT_00cfddf0), cVar2 == '\0') ) { if (DAT_004fd448 == 0) { my_rw_wrlock(&DAT_004fd3b8); } else { translog_create_new_file_cold_1(); } cVar2 = allocate_dynamic(&DAT_004fd388,(DAT_004fd3b0 - DAT_004fd3b4) + 2); if ((cVar2 == '\0') && (cVar2 = insert_dynamic(&DAT_004fd388,&local_20), cVar2 == '\0')) { iVar3 = create_logfile_by_number_no_cache(uVar1); puVar4 = local_20; local_20[6] = iVar3; if (iVar3 != -1) { pagecache_file_set_null_hooks(local_20 + 2); *(code **)(puVar4 + 10) = translog_page_validator; *(code **)(puVar4 + 0x10) = maria_flush_log_for_page_none; *(int4 **)(puVar4 + 0x12) = puVar4; *puVar4 = uVar1; *(int2 *)(puVar4 + 0x14) = 0; DAT_004fd3b0 = DAT_004fd3b0 + 1; memmove((void *)((long)DAT_004fd388 + 8),DAT_004fd388, (ulong)(uint)(DAT_004fd3b0 - DAT_004fd3b4) << 3); set_dynamic(&DAT_004fd388,&local_20,0); if (DAT_004fd448 != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(&DAT_004fd3b8); cVar2 = translog_write_file_header(); if ((cVar2 == '\0') && (iVar3 = ma_control_file_write_and_force (last_checkpoint_lsn,uVar1,max_trid_in_control_file,recovery_failures) , iVar3 == 0)) { return 0; } goto LAB_0014a57d; } } if (DAT_004fd448 != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(&DAT_004fd3b8); } LAB_0014a57d: translog_status = (uint)(translog_status != 3) * 2; DAT_00cfe030 = 1; _DAT_004fd16c = 0; my_free(local_20); return 1; }
48,477
ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static bool ggml_backend_sched_buffer_supported(ggml_backend_sched_t sched, struct ggml_tensor * t, int backend_id) { ggml_backend_buffer_t buf = t->view_src ? t->view_src->buffer : t->buffer; ggml_backend_buffer_type_t buft = NULL; if (buf) { // the tensor is already allocated buft = buf->buft; } else { // see if the tensor already has a backend assigned, and use the buffer type of that backend int tensor_backend_id = tensor_backend_id(t); if (tensor_backend_id == -1 && t->view_src) { tensor_backend_id = tensor_backend_id(t->view_src); } if (tensor_backend_id != -1) { buft = sched->bufts[tensor_backend_id]; } } return buft != NULL && ggml_backend_supports_buft(sched->backends[backend_id], buft); }
O0
cpp
ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0xe8(%rax) je 0x637c6 movq -0x10(%rbp), %rax movq 0xe8(%rax), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x637d2 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x20(%rbp) movq $0x0, -0x28(%rbp) cmpq $0x0, -0x20(%rbp) je 0x637fa movq -0x20(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x28(%rbp) jmp 0x63891 movq -0x8(%rbp), %rax movq 0x128(%rax), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi addq $0x110, %rdi # imm = 0x110 movq -0x10(%rbp), %rsi callq 0x62390 movq %rax, %rcx movq -0x40(%rbp), %rax movl (%rax,%rcx,4), %eax movl %eax, -0x2c(%rbp) cmpl $-0x1, -0x2c(%rbp) jne 0x63875 movq -0x10(%rbp), %rax cmpq $0x0, 0xe8(%rax) je 0x63875 movq -0x8(%rbp), %rax movq 0x128(%rax), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi addq $0x110, %rdi # imm = 0x110 movq -0x10(%rbp), %rax movq 0xe8(%rax), %rsi callq 0x62390 movq %rax, %rcx movq -0x48(%rbp), %rax movl (%rax,%rcx,4), %eax movl %eax, -0x2c(%rbp) cmpl $-0x1, -0x2c(%rbp) je 0x6388f movq -0x8(%rbp), %rax movslq -0x2c(%rbp), %rcx movq 0x88(%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) jmp 0x63891 xorl %eax, %eax cmpq $0x0, -0x28(%rbp) movb %al, -0x49(%rbp) je 0x638b6 movq -0x8(%rbp), %rax movslq -0x14(%rbp), %rcx movq 0x8(%rax,%rcx,8), %rdi movq -0x28(%rbp), %rsi callq 0x47fe0 movb %al, -0x49(%rbp) movb -0x49(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL35ggml_backend_sched_buffer_supportedP18ggml_backend_schedP11ggml_tensori: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_10] cmp qword ptr [rax+0E8h], 0 jz short loc_637C6 mov rax, [rbp+var_10] mov rax, [rax+0E8h] mov rax, [rax+8] mov [rbp+var_38], rax jmp short loc_637D2 loc_637C6: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_38], rax loc_637D2: mov rax, [rbp+var_38] mov [rbp+var_20], rax mov [rbp+var_28], 0 cmp [rbp+var_20], 0 jz short loc_637FA mov rax, [rbp+var_20] mov rax, [rax+48h] mov [rbp+var_28], rax jmp loc_63891 loc_637FA: mov rax, [rbp+var_8] mov rax, [rax+128h] mov [rbp+var_40], rax mov rdi, [rbp+var_8] add rdi, 110h mov rsi, [rbp+var_10] call _ZL24ggml_hash_find_or_insertP13ggml_hash_setP11ggml_tensor; ggml_hash_find_or_insert(ggml_hash_set *,ggml_tensor *) mov rcx, rax mov rax, [rbp+var_40] mov eax, [rax+rcx*4] mov [rbp+var_2C], eax cmp [rbp+var_2C], 0FFFFFFFFh jnz short loc_63875 mov rax, [rbp+var_10] cmp qword ptr [rax+0E8h], 0 jz short loc_63875 mov rax, [rbp+var_8] mov rax, [rax+128h] mov [rbp+var_48], rax mov rdi, [rbp+var_8] add rdi, 110h mov rax, [rbp+var_10] mov rsi, [rax+0E8h] call _ZL24ggml_hash_find_or_insertP13ggml_hash_setP11ggml_tensor; ggml_hash_find_or_insert(ggml_hash_set *,ggml_tensor *) mov rcx, rax mov rax, [rbp+var_48] mov eax, [rax+rcx*4] mov [rbp+var_2C], eax loc_63875: cmp [rbp+var_2C], 0FFFFFFFFh jz short loc_6388F mov rax, [rbp+var_8] movsxd rcx, [rbp+var_2C] mov rax, [rax+rcx*8+88h] mov [rbp+var_28], rax loc_6388F: jmp short $+2 loc_63891: xor eax, eax cmp [rbp+var_28], 0 mov [rbp+var_49], al jz short loc_638B6 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_14] mov rdi, [rax+rcx*8+8] mov rsi, [rbp+var_28] call _ggml_backend_supports_buft mov [rbp+var_49], al loc_638B6: mov al, [rbp+var_49] and al, 1 add rsp, 50h pop rbp retn
char ggml_backend_sched_buffer_supported(long long a1, long long a2, int a3) { char v4; // [rsp+7h] [rbp-49h] long long v5; // [rsp+8h] [rbp-48h] long long v6; // [rsp+10h] [rbp-40h] long long v7; // [rsp+18h] [rbp-38h] int v8; // [rsp+24h] [rbp-2Ch] long long v9; // [rsp+28h] [rbp-28h] if ( *(_QWORD *)(a2 + 232) ) v7 = *(_QWORD *)(*(_QWORD *)(a2 + 232) + 8LL); else v7 = *(_QWORD *)(a2 + 8); v9 = 0LL; if ( v7 ) { v9 = *(_QWORD *)(v7 + 72); } else { v6 = *(_QWORD *)(a1 + 296); v8 = *(_DWORD *)(v6 + 4 * ggml_hash_find_or_insert(a1 + 272, a2)); if ( v8 == -1 && *(_QWORD *)(a2 + 232) ) { v5 = *(_QWORD *)(a1 + 296); v8 = *(_DWORD *)(v5 + 4 * ggml_hash_find_or_insert(a1 + 272, *(_QWORD *)(a2 + 232))); } if ( v8 != -1 ) v9 = *(_QWORD *)(a1 + 8LL * v8 + 136); } v4 = 0; if ( v9 ) v4 = ggml_backend_supports_buft(*(_QWORD *)(a1 + 8LL * a3 + 8), v9); return v4 & 1; }
ggml_backend_sched_buffer_supported: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0xe8],0x0 JZ 0x001637c6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xe8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX JMP 0x001637d2 LAB_001637c6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX LAB_001637d2: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],0x0 CMP qword ptr [RBP + -0x20],0x0 JZ 0x001637fa MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x28],RAX JMP 0x00163891 LAB_001637fa: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x128] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x110 MOV RSI,qword ptr [RBP + -0x10] CALL 0x00162390 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],-0x1 JNZ 0x00163875 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0xe8],0x0 JZ 0x00163875 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x128] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x110 MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0xe8] CALL 0x00162390 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x2c],EAX LAB_00163875: CMP dword ptr [RBP + -0x2c],-0x1 JZ 0x0016388f MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x88] MOV qword ptr [RBP + -0x28],RAX LAB_0016388f: JMP 0x00163891 LAB_00163891: XOR EAX,EAX CMP qword ptr [RBP + -0x28],0x0 MOV byte ptr [RBP + -0x49],AL JZ 0x001638b6 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x14] MOV RDI,qword ptr [RAX + RCX*0x8 + 0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00147fe0 MOV byte ptr [RBP + -0x49],AL LAB_001638b6: MOV AL,byte ptr [RBP + -0x49] AND AL,0x1 ADD RSP,0x50 POP RBP RET
/* ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int) */ ulong ggml_backend_sched_buffer_supported (ggml_backend_sched *param_1,ggml_tensor *param_2,int param_3) { long lVar1; long lVar2; int8 uVar3; int1 local_51; long local_40; int local_34; long local_30; if (*(long *)(param_2 + 0xe8) == 0) { local_40 = *(long *)(param_2 + 8); } else { local_40 = *(long *)(*(long *)(param_2 + 0xe8) + 8); } local_30 = 0; if (local_40 == 0) { lVar1 = *(long *)(param_1 + 0x128); lVar2 = ggml_hash_find_or_insert((ggml_hash_set *)(param_1 + 0x110),param_2); local_34 = *(int *)(lVar1 + lVar2 * 4); if ((local_34 == -1) && (*(long *)(param_2 + 0xe8) != 0)) { lVar1 = *(long *)(param_1 + 0x128); lVar2 = ggml_hash_find_or_insert ((ggml_hash_set *)(param_1 + 0x110),*(ggml_tensor **)(param_2 + 0xe8)); local_34 = *(int *)(lVar1 + lVar2 * 4); } if (local_34 != -1) { local_30 = *(long *)(param_1 + (long)local_34 * 8 + 0x88); } } else { local_30 = *(long *)(local_40 + 0x48); } uVar3 = 0; local_51 = 0; if (local_30 != 0) { uVar3 = ggml_backend_supports_buft(*(int8 *)(param_1 + (long)param_3 * 8 + 8),local_30); local_51 = (int1)uVar3; } return CONCAT71((int7)((ulong)uVar3 >> 8),local_51) & 0xffffffffffffff01; }
48,478
ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static bool ggml_backend_sched_buffer_supported(ggml_backend_sched_t sched, struct ggml_tensor * t, int backend_id) { ggml_backend_buffer_t buf = t->view_src ? t->view_src->buffer : t->buffer; ggml_backend_buffer_type_t buft = NULL; if (buf) { // the tensor is already allocated buft = buf->buft; } else { // see if the tensor already has a backend assigned, and use the buffer type of that backend int tensor_backend_id = tensor_backend_id(t); if (tensor_backend_id == -1 && t->view_src) { tensor_backend_id = tensor_backend_id(t->view_src); } if (tensor_backend_id != -1) { buft = sched->bufts[tensor_backend_id]; } } return buft != NULL && ggml_backend_supports_buft(sched->backends[backend_id], buft); }
O2
cpp
ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %edx, %ebx movq %rdi, %r14 movq 0xe8(%rsi), %rax testq %rax, %rax cmoveq %rsi, %rax movq 0x8(%rax), %rax testq %rax, %rax je 0x2eacc addq $0x48, %rax jmp 0x2eafb movq %rsi, %r15 movq 0x128(%r14), %r13 leaq 0x110(%r14), %r12 movq %r12, %rdi callq 0x2ddd7 movl (%r13,%rax,4), %eax cmpl $-0x1, %eax je 0x2eb1e cltq leaq (%r14,%rax,8), %rax addq $0x88, %rax movq (%rax), %rsi testq %rsi, %rsi je 0x2eb42 movslq %ebx, %rax movq 0x8(%r14,%rax,8), %rax movq 0x70(%rax), %rdi movq 0x50(%rdi), %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *%rax movq 0xe8(%r15), %rsi testq %rsi, %rsi je 0x2eb42 movq 0x128(%r14), %r15 movq %r12, %rdi callq 0x2ddd7 movl (%r15,%rax,4), %eax cmpl $-0x1, %eax jne 0x2eaef xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZL35ggml_backend_sched_buffer_supportedP18ggml_backend_schedP11ggml_tensori: push r15 push r14 push r13 push r12 push rbx mov ebx, edx mov r14, rdi mov rax, [rsi+0E8h] test rax, rax cmovz rax, rsi mov rax, [rax+8] test rax, rax jz short loc_2EACC add rax, 48h ; 'H' jmp short loc_2EAFB loc_2EACC: mov r15, rsi mov r13, [r14+128h] lea r12, [r14+110h] mov rdi, r12 call _ZL24ggml_hash_find_or_insertP13ggml_hash_setP11ggml_tensor; ggml_hash_find_or_insert(ggml_hash_set *,ggml_tensor *) mov eax, [r13+rax*4+0] cmp eax, 0FFFFFFFFh jz short loc_2EB1E loc_2EAEF: cdqe lea rax, [r14+rax*8] add rax, 88h loc_2EAFB: mov rsi, [rax] test rsi, rsi jz short loc_2EB42 movsxd rax, ebx mov rax, [r14+rax*8+8] mov rdi, [rax+70h] mov rax, [rdi+50h] pop rbx pop r12 pop r13 pop r14 pop r15 jmp rax loc_2EB1E: mov rsi, [r15+0E8h] test rsi, rsi jz short loc_2EB42 mov r15, [r14+128h] mov rdi, r12 call _ZL24ggml_hash_find_or_insertP13ggml_hash_setP11ggml_tensor; ggml_hash_find_or_insert(ggml_hash_set *,ggml_tensor *) mov eax, [r15+rax*4] cmp eax, 0FFFFFFFFh jnz short loc_2EAEF loc_2EB42: xor eax, eax pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ggml_backend_sched_buffer_supported( long long a1, unsigned long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11) { unsigned long long v12; // rax long long v13; // rax _QWORD *v14; // rax long long v15; // r13 int v16; // eax __m128 v17; // xmm4 __m128 v18; // xmm5 unsigned long long v20; // rsi long long v21; // r15 v12 = *(_QWORD *)(a2 + 232); if ( !v12 ) v12 = a2; v13 = *(_QWORD *)(v12 + 8); if ( v13 ) { v14 = (_QWORD *)(v13 + 72); } else { v15 = *(_QWORD *)(a1 + 296); v16 = *(_DWORD *)(v15 + 4 * ggml_hash_find_or_insert((long long *)(a1 + 272), a2, a4, a5, a6, a7, a8, a9, a10, a11)); if ( v16 == -1 ) { v20 = *(_QWORD *)(a2 + 232); if ( !v20 ) return 0LL; v21 = *(_QWORD *)(a1 + 296); v16 = *(_DWORD *)(v21 + 4 * ggml_hash_find_or_insert((long long *)(a1 + 272), v20, a4, a5, a6, a7, v17, v18, a10, a11)); if ( v16 == -1 ) return 0LL; } v14 = (_QWORD *)(a1 + 8LL * v16 + 136); } if ( *v14 ) return (*(long long (**)(void))(*(_QWORD *)(*(_QWORD *)(a1 + 8LL * a3 + 8) + 112LL) + 80LL))(); return 0LL; }
ggml_backend_sched_buffer_supported: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14,RDI MOV RAX,qword ptr [RSI + 0xe8] TEST RAX,RAX CMOVZ RAX,RSI MOV RAX,qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x0012eacc ADD RAX,0x48 JMP 0x0012eafb LAB_0012eacc: MOV R15,RSI MOV R13,qword ptr [R14 + 0x128] LEA R12,[R14 + 0x110] MOV RDI,R12 CALL 0x0012ddd7 MOV EAX,dword ptr [R13 + RAX*0x4] CMP EAX,-0x1 JZ 0x0012eb1e LAB_0012eaef: CDQE LEA RAX,[R14 + RAX*0x8] ADD RAX,0x88 LAB_0012eafb: MOV RSI,qword ptr [RAX] TEST RSI,RSI JZ 0x0012eb42 MOVSXD RAX,EBX MOV RAX,qword ptr [R14 + RAX*0x8 + 0x8] MOV RDI,qword ptr [RAX + 0x70] MOV RAX,qword ptr [RDI + 0x50] POP RBX POP R12 POP R13 POP R14 POP R15 JMP RAX LAB_0012eb1e: MOV RSI,qword ptr [R15 + 0xe8] TEST RSI,RSI JZ 0x0012eb42 MOV R15,qword ptr [R14 + 0x128] MOV RDI,R12 CALL 0x0012ddd7 MOV EAX,dword ptr [R15 + RAX*0x4] CMP EAX,-0x1 JNZ 0x0012eaef LAB_0012eb42: XOR EAX,EAX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int) */ int8 ggml_backend_sched_buffer_supported(ggml_backend_sched *param_1,ggml_tensor *param_2,int param_3) { long lVar1; int iVar2; ggml_tensor *pgVar3; ggml_backend_sched *pgVar4; long lVar5; int8 uVar6; pgVar3 = *(ggml_tensor **)(param_2 + 0xe8); if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) { pgVar3 = param_2; } if (*(long *)(pgVar3 + 8) == 0) { lVar1 = *(long *)(param_1 + 0x128); lVar5 = ggml_hash_find_or_insert((ggml_hash_set *)(param_1 + 0x110),param_2); iVar2 = *(int *)(lVar1 + lVar5 * 4); if (iVar2 == -1) { if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) { return 0; } lVar1 = *(long *)(param_1 + 0x128); lVar5 = ggml_hash_find_or_insert ((ggml_hash_set *)(param_1 + 0x110),*(ggml_tensor **)(param_2 + 0xe8)); iVar2 = *(int *)(lVar1 + lVar5 * 4); if (iVar2 == -1) { return 0; } } pgVar4 = param_1 + (long)iVar2 * 8 + 0x88; } else { pgVar4 = (ggml_backend_sched *)(*(long *)(pgVar3 + 8) + 0x48); } if (*(long *)pgVar4 == 0) { return 0; } /* WARNING: Could not recover jumptable at 0x0012eb1c. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar6 = (**(code **)(*(long *)(*(long *)(param_1 + (long)param_3 * 8 + 8) + 0x70) + 0x50))(); return uVar6; }
48,479
ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static bool ggml_backend_sched_buffer_supported(ggml_backend_sched_t sched, struct ggml_tensor * t, int backend_id) { ggml_backend_buffer_t buf = t->view_src ? t->view_src->buffer : t->buffer; ggml_backend_buffer_type_t buft = NULL; if (buf) { // the tensor is already allocated buft = buf->buft; } else { // see if the tensor already has a backend assigned, and use the buffer type of that backend int tensor_backend_id = tensor_backend_id(t); if (tensor_backend_id == -1 && t->view_src) { tensor_backend_id = tensor_backend_id(t->view_src); } if (tensor_backend_id != -1) { buft = sched->bufts[tensor_backend_id]; } } return buft != NULL && ggml_backend_supports_buft(sched->backends[backend_id], buft); }
O3
cpp
ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %edx, %ebx movq %rdi, %r14 movq 0xe8(%rsi), %rax testq %rax, %rax cmoveq %rsi, %rax movq 0x8(%rax), %rax testq %rax, %rax je 0x29473 addq $0x48, %rax jmp 0x294a2 movq %rsi, %r15 movq 0x128(%r14), %r13 leaq 0x110(%r14), %r12 movq %r12, %rdi callq 0x286ba movl (%r13,%rax,4), %eax cmpl $-0x1, %eax je 0x294c5 cltq leaq (%r14,%rax,8), %rax addq $0x88, %rax movq (%rax), %rsi testq %rsi, %rsi je 0x294e9 movslq %ebx, %rax movq 0x8(%r14,%rax,8), %rax movq 0x70(%rax), %rdi movq 0x50(%rdi), %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *%rax movq 0xe8(%r15), %rsi testq %rsi, %rsi je 0x294e9 movq 0x128(%r14), %r15 movq %r12, %rdi callq 0x286ba movl (%r15,%rax,4), %eax cmpl $-0x1, %eax jne 0x29496 xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZL35ggml_backend_sched_buffer_supportedP18ggml_backend_schedP11ggml_tensori: push r15 push r14 push r13 push r12 push rbx mov ebx, edx mov r14, rdi mov rax, [rsi+0E8h] test rax, rax cmovz rax, rsi mov rax, [rax+8] test rax, rax jz short loc_29473 add rax, 48h ; 'H' jmp short loc_294A2 loc_29473: mov r15, rsi mov r13, [r14+128h] lea r12, [r14+110h] mov rdi, r12 call _ZL24ggml_hash_find_or_insertP13ggml_hash_setP11ggml_tensor; ggml_hash_find_or_insert(ggml_hash_set *,ggml_tensor *) mov eax, [r13+rax*4+0] cmp eax, 0FFFFFFFFh jz short loc_294C5 loc_29496: cdqe lea rax, [r14+rax*8] add rax, 88h loc_294A2: mov rsi, [rax] test rsi, rsi jz short loc_294E9 movsxd rax, ebx mov rax, [r14+rax*8+8] mov rdi, [rax+70h] mov rax, [rdi+50h] pop rbx pop r12 pop r13 pop r14 pop r15 jmp rax loc_294C5: mov rsi, [r15+0E8h] test rsi, rsi jz short loc_294E9 mov r15, [r14+128h] mov rdi, r12 call _ZL24ggml_hash_find_or_insertP13ggml_hash_setP11ggml_tensor; ggml_hash_find_or_insert(ggml_hash_set *,ggml_tensor *) mov eax, [r15+rax*4] cmp eax, 0FFFFFFFFh jnz short loc_29496 loc_294E9: xor eax, eax pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ggml_backend_sched_buffer_supported(long long a1, unsigned long long a2, int a3) { unsigned long long v4; // rax long long v5; // rax _QWORD *v6; // rax long long v7; // r13 int v8; // eax unsigned long long v10; // rsi long long v11; // r15 v4 = *(_QWORD *)(a2 + 232); if ( !v4 ) v4 = a2; v5 = *(_QWORD *)(v4 + 8); if ( v5 ) { v6 = (_QWORD *)(v5 + 72); } else { v7 = *(_QWORD *)(a1 + 296); v8 = *(_DWORD *)(v7 + 4 * ggml_hash_find_or_insert((long long *)(a1 + 272), a2)); if ( v8 == -1 ) { v10 = *(_QWORD *)(a2 + 232); if ( !v10 ) return 0LL; v11 = *(_QWORD *)(a1 + 296); v8 = *(_DWORD *)(v11 + 4 * ggml_hash_find_or_insert((long long *)(a1 + 272), v10)); if ( v8 == -1 ) return 0LL; } v6 = (_QWORD *)(a1 + 8LL * v8 + 136); } if ( *v6 ) return (*(long long (**)(void))(*(_QWORD *)(*(_QWORD *)(a1 + 8LL * a3 + 8) + 112LL) + 80LL))(); return 0LL; }
ggml_backend_sched_buffer_supported: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14,RDI MOV RAX,qword ptr [RSI + 0xe8] TEST RAX,RAX CMOVZ RAX,RSI MOV RAX,qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00129473 ADD RAX,0x48 JMP 0x001294a2 LAB_00129473: MOV R15,RSI MOV R13,qword ptr [R14 + 0x128] LEA R12,[R14 + 0x110] MOV RDI,R12 CALL 0x001286ba MOV EAX,dword ptr [R13 + RAX*0x4] CMP EAX,-0x1 JZ 0x001294c5 LAB_00129496: CDQE LEA RAX,[R14 + RAX*0x8] ADD RAX,0x88 LAB_001294a2: MOV RSI,qword ptr [RAX] TEST RSI,RSI JZ 0x001294e9 MOVSXD RAX,EBX MOV RAX,qword ptr [R14 + RAX*0x8 + 0x8] MOV RDI,qword ptr [RAX + 0x70] MOV RAX,qword ptr [RDI + 0x50] POP RBX POP R12 POP R13 POP R14 POP R15 JMP RAX LAB_001294c5: MOV RSI,qword ptr [R15 + 0xe8] TEST RSI,RSI JZ 0x001294e9 MOV R15,qword ptr [R14 + 0x128] MOV RDI,R12 CALL 0x001286ba MOV EAX,dword ptr [R15 + RAX*0x4] CMP EAX,-0x1 JNZ 0x00129496 LAB_001294e9: XOR EAX,EAX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* ggml_backend_sched_buffer_supported(ggml_backend_sched*, ggml_tensor*, int) */ int8 ggml_backend_sched_buffer_supported(ggml_backend_sched *param_1,ggml_tensor *param_2,int param_3) { long lVar1; int iVar2; ggml_tensor *pgVar3; ggml_backend_sched *pgVar4; long lVar5; int8 uVar6; pgVar3 = *(ggml_tensor **)(param_2 + 0xe8); if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) { pgVar3 = param_2; } if (*(long *)(pgVar3 + 8) == 0) { lVar1 = *(long *)(param_1 + 0x128); lVar5 = ggml_hash_find_or_insert((ggml_hash_set *)(param_1 + 0x110),param_2); iVar2 = *(int *)(lVar1 + lVar5 * 4); if (iVar2 == -1) { if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) { return 0; } lVar1 = *(long *)(param_1 + 0x128); lVar5 = ggml_hash_find_or_insert ((ggml_hash_set *)(param_1 + 0x110),*(ggml_tensor **)(param_2 + 0xe8)); iVar2 = *(int *)(lVar1 + lVar5 * 4); if (iVar2 == -1) { return 0; } } pgVar4 = param_1 + (long)iVar2 * 8 + 0x88; } else { pgVar4 = (ggml_backend_sched *)(*(long *)(pgVar3 + 8) + 0x48); } if (*(long *)pgVar4 == 0) { return 0; } /* WARNING: Could not recover jumptable at 0x001294c3. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar6 = (**(code **)(*(long *)(*(long *)(param_1 + (long)param_3 * 8 + 8) + 0x70) + 0x50))(); return uVar6; }
48,480
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
eloqsql/mysys_ssl/my_crypt.cc
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, const uchar *iv, uint ivlen) { compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad)); this->key= key; this->klen= klen; this->source_tail_len= 0; if (ivlen) memcpy(oiv, iv, ivlen); DBUG_ASSERT(ivlen == 0 || ivlen == sizeof(oiv)); int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen); EVP_CIPHER_CTX_set_padding(ctx, 0); return res; }
O0
cpp
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0xddccc movq -0x40(%rbp), %rax movq -0x20(%rbp), %rcx movq %rcx, 0xd0(%rax) movl -0x24(%rbp), %ecx movl %ecx, 0xd8(%rax) movl $0x0, 0xdc(%rax) cmpl $0x0, 0x10(%rbp) je 0xddd0d movq -0x40(%rbp), %rdi addq $0xe0, %rdi movq -0x30(%rbp), %rsi movl 0x10(%rbp), %eax movl %eax, %edx callq 0x290a0 jmp 0xddd0f jmp 0xddd11 movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %r8d movq -0x30(%rbp), %r9 movl 0x10(%rbp), %eax movl %eax, (%rsp) callq 0xddaf0 movl %eax, %ecx movq -0x40(%rbp), %rax movl %ecx, -0x34(%rbp) movq 0xc8(%rax), %rdi xorl %esi, %esi callq 0x29380 movl -0x34(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN11MyCTX_nopad4initEPK13evp_cipher_stiPKhjS4_j: 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_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 mov rax, [rbp+var_8] mov [rbp+var_40], rax jmp short $+2 loc_DDCCC: mov rax, [rbp+var_40] mov rcx, [rbp+var_20] mov [rax+0D0h], rcx mov ecx, [rbp+var_24] mov [rax+0D8h], ecx mov dword ptr [rax+0DCh], 0 cmp [rbp+arg_0], 0 jz short loc_DDD0D mov rdi, [rbp+var_40] add rdi, 0E0h mov rsi, [rbp+var_30] mov eax, [rbp+arg_0] mov edx, eax call _memcpy loc_DDD0D: jmp short $+2 loc_DDD0F: jmp short $+2 loc_DDD11: mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov r8d, [rbp+var_24] mov r9, [rbp+var_30] mov eax, [rbp+arg_0] mov [rsp+50h+var_50], eax call _ZN5MyCTX4initEPK13evp_cipher_stiPKhjS4_j; MyCTX::init(evp_cipher_st const*,int,uchar const*,uint,uchar const*,uint) mov ecx, eax mov rax, [rbp+var_40] mov [rbp+var_34], ecx mov rdi, [rax+0C8h] xor esi, esi call _EVP_CIPHER_CTX_set_padding mov eax, [rbp+var_34] add rsp, 50h pop rbp retn
long long MyCTX_nopad::init( _QWORD *a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6, unsigned int a7) { unsigned int v8; // [rsp+1Ch] [rbp-34h] a1[26] = a4; a1[27] = a5; if ( a7 ) memcpy(a1 + 28, a6, a7); v8 = MyCTX::init((long long)a1, a2, a3, a4, a5, a6); EVP_CIPHER_CTX_set_padding(a1[25], 0LL); return v8; }
init: 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 dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x40],RAX JMP 0x001ddccc LAB_001ddccc: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0xd0],RCX MOV ECX,dword ptr [RBP + -0x24] MOV dword ptr [RAX + 0xd8],ECX MOV dword ptr [RAX + 0xdc],0x0 CMP dword ptr [RBP + 0x10],0x0 JZ 0x001ddd0d MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0xe0 MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + 0x10] MOV EDX,EAX CALL 0x001290a0 LAB_001ddd0d: JMP 0x001ddd0f LAB_001ddd0f: JMP 0x001ddd11 LAB_001ddd11: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RBP + -0x24] MOV R9,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + 0x10] MOV dword ptr [RSP],EAX CALL 0x001ddaf0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x34],ECX MOV RDI,qword ptr [RAX + 0xc8] XOR ESI,ESI CALL 0x00129380 MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x50 POP RBP RET
/* MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int) */ int4 __thiscall MyCTX_nopad::init(MyCTX_nopad *this,evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4, uchar *param_5,uint param_6) { int4 uVar1; *(uchar **)(this + 0xd0) = param_3; *(uint *)(this + 0xd8) = param_4; *(int4 *)(this + 0xdc) = 0; if (param_6 != 0) { memcpy(this + 0xe0,param_5,(ulong)param_6); } uVar1 = MyCTX::init((evp_cipher_st *)this,(int)param_1,(uchar *)(ulong)(uint)param_2,(uint)param_3 ,(uchar *)(ulong)param_4,(uint)param_5); EVP_CIPHER_CTX_set_padding(*(EVP_CIPHER_CTX **)(this + 200),0); return uVar1; }
48,481
my_strxfrm_pad_desc_and_reverse_nopad
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); memset(frmend, 0x00, fill_length); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; memset(frmend, 0x00, fill_length); frmend= strend; } return frmend - str; }
O3
c
my_strxfrm_pad_desc_and_reverse_nopad: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r12d movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %rbx movl 0x10(%rbp), %ecx testl %r8d, %r8d sete %al cmpq %r15, %rdx setae %sil testb $0x40, %r12b sete %dl orb %al, %dl orb %sil, %dl jne 0xb61cd movl %r8d, %r13d movl %r15d, %eax imull 0x98(%rdi), %r13d subl %r14d, %eax cmpl %eax, %r13d cmovael %eax, %r13d movq %r14, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x292a0 movl 0x10(%rbp), %ecx addq %r13, %r14 movq %rbx, %rdi movq %r14, %rsi movl %r12d, %edx callq 0xb7a0e testb %r12b, %r12b jns 0xb61f8 cmpq %r15, %r14 jae 0xb61f8 movq %r15, %rdx subq %r14, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x292a0 movq %r15, %r14 subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strxfrm_pad_desc_and_reverse_nopad: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, r9d mov r15, rcx mov r14, rdx mov rbx, rsi mov ecx, [rbp+arg_0] test r8d, r8d setz al cmp rdx, r15 setnb sil test r12b, 40h setz dl or dl, al or dl, sil jnz short loc_B61CD mov r13d, r8d mov eax, r15d imul r13d, [rdi+98h] sub eax, r14d cmp r13d, eax cmovnb r13d, eax mov rdi, r14 xor esi, esi mov rdx, r13 call _memset mov ecx, [rbp+arg_0] add r14, r13 loc_B61CD: mov rdi, rbx mov rsi, r14 mov edx, r12d call my_strxfrm_desc_and_reverse test r12b, r12b jns short loc_B61F8 cmp r14, r15 jnb short loc_B61F8 mov rdx, r15 sub rdx, r14 mov rdi, r14 xor esi, esi call _memset mov r14, r15 loc_B61F8: 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_strxfrm_pad_desc_and_reverse_nopad( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned long long v9; // r14 long long v10; // rcx long long v11; // r13 v9 = a3; v10 = a7; if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 ) { v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5); if ( (unsigned int)v11 >= (int)a4 - (int)a3 ) v11 = (unsigned int)(a4 - a3); memset(a3, 0LL, v11); v10 = a7; v9 += v11; } my_strxfrm_desc_and_reverse(a2, v9, a6, v10); if ( (a6 & 0x80u) != 0 && v9 < a4 ) { memset(v9, 0LL, a4 - v9); v9 = a4; } return v9 - a2; }
my_strxfrm_pad_desc_and_reverse_nopad: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,R9D MOV R15,RCX MOV R14,RDX MOV RBX,RSI MOV ECX,dword ptr [RBP + 0x10] TEST R8D,R8D SETZ AL CMP RDX,R15 SETNC SIL TEST R12B,0x40 SETZ DL OR DL,AL OR DL,SIL JNZ 0x001b61cd MOV R13D,R8D MOV EAX,R15D IMUL R13D,dword ptr [RDI + 0x98] SUB EAX,R14D CMP R13D,EAX CMOVNC R13D,EAX MOV RDI,R14 XOR ESI,ESI MOV RDX,R13 CALL 0x001292a0 MOV ECX,dword ptr [RBP + 0x10] ADD R14,R13 LAB_001b61cd: MOV RDI,RBX MOV RSI,R14 MOV EDX,R12D CALL 0x001b7a0e TEST R12B,R12B JNS 0x001b61f8 CMP R14,R15 JNC 0x001b61f8 MOV RDX,R15 SUB RDX,R14 MOV RDI,R14 XOR ESI,ESI CALL 0x001292a0 MOV R14,R15 LAB_001b61f8: SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strxfrm_pad_desc_and_reverse_nopad (long param_1,long param_2,void *param_3,void *param_4,int param_5,uint param_6, int4 param_7) { uint uVar1; uint uVar2; if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) { uVar2 = param_5 * *(int *)(param_1 + 0x98); uVar1 = (int)param_4 - (int)param_3; if (uVar1 <= uVar2) { uVar2 = uVar1; } memset(param_3,0,(ulong)uVar2); param_3 = (void *)((long)param_3 + (ulong)uVar2); } my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7); if (((char)param_6 < '\0') && (param_3 < param_4)) { memset(param_3,0,(long)param_4 - (long)param_3); param_3 = param_4; } return (long)param_3 - param_2; }
48,482
test_bug29692
eloqsql/libmariadb/unittest/libmariadb/misc.c
static int test_bug29692(MYSQL *mysql) { int rc; rc= mysql_query(mysql, "drop table if exists t1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "create table t1(f1 int)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "insert into t1 values(1)"); check_mysql_rc(rc, mysql); FAIL_UNLESS(1 == mysql_affected_rows(mysql), "affected_rows != 1"); rc= mysql_query(mysql, "drop table t1"); check_mysql_rc(rc, mysql); return OK; }
O3
c
test_bug29692: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x22f89(%rip), %rsi # 0x3a322 callq 0x1ee15 testl %eax, %eax je 0x173d9 movl %eax, %r14d movq %rbx, %rdi callq 0x20e8e movq %rax, %r15 movq %rbx, %rdi callq 0x20e79 leaq 0x21ea6(%rip), %rdi # 0x39265 leaq 0x225a8(%rip), %r8 # 0x3996e movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x57, %r9d jmp 0x17465 leaq 0x23135(%rip), %rsi # 0x3a515 movq %rbx, %rdi callq 0x1ee15 testl %eax, %eax je 0x17420 movl %eax, %r14d movq %rbx, %rdi callq 0x20e8e movq %rax, %r15 movq %rbx, %rdi callq 0x20e79 leaq 0x21e5c(%rip), %rdi # 0x39265 leaq 0x2255e(%rip), %r8 # 0x3996e movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x59, %r9d jmp 0x17465 leaq 0x22f37(%rip), %rsi # 0x3a35e movq %rbx, %rdi callq 0x1ee15 testl %eax, %eax je 0x1747c movl %eax, %r14d movq %rbx, %rdi callq 0x20e8e movq %rax, %r15 movq %rbx, %rdi callq 0x20e79 leaq 0x21e15(%rip), %rdi # 0x39265 leaq 0x22517(%rip), %r8 # 0x3996e movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x5b, %r9d xorl %eax, %eax callq 0x1970b movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0x20e0c cmpq $0x1, %rax jne 0x174d1 leaq 0x22f25(%rip), %rsi # 0x3a3b6 movq %rbx, %rdi callq 0x1ee15 testl %eax, %eax je 0x174f7 movl %eax, %r14d movq %rbx, %rdi callq 0x20e8e movq %rax, %r15 movq %rbx, %rdi callq 0x20e79 leaq 0x21dab(%rip), %rdi # 0x39265 leaq 0x224ad(%rip), %r8 # 0x3996e movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x5e, %r9d jmp 0x17465 leaq 0x21c48(%rip), %rdi # 0x39120 leaq 0x2304e(%rip), %rsi # 0x3a52d leaq 0x22488(%rip), %rdx # 0x3996e movl $0x5c, %ecx xorl %eax, %eax callq 0x1970b jmp 0x1746c xorl %eax, %eax jmp 0x17471
test_bug29692: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea rsi, aDropTableIfExi_3; "drop table if exists t1" call mysql_query test eax, eax jz short loc_173D9 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 57h ; 'W' jmp loc_17465 loc_173D9: lea rsi, aCreateTableT1F_0; "create table t1(f1 int)" mov rdi, rbx call mysql_query test eax, eax jz short loc_17420 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 59h ; 'Y' jmp short loc_17465 loc_17420: lea rsi, aInsertIntoT1Va_2; "insert into t1 values(1)" mov rdi, rbx call mysql_query test eax, eax jz short loc_1747C mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 5Bh ; '[' loc_17465: xor eax, eax call diag loc_1746C: mov eax, 1 loc_17471: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_1747C: mov rdi, rbx call mysql_affected_rows cmp rax, 1 jnz short loc_174D1 lea rsi, aDropTableT1; "drop table t1" mov rdi, rbx call mysql_query test eax, eax jz short loc_174F7 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 5Eh ; '^' jmp short loc_17465 loc_174D1: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aAffectedRows1; "affected_rows != 1" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 5Ch ; '\' xor eax, eax call diag jmp loc_1746C loc_174F7: xor eax, eax jmp loc_17471
long long test_bug29692(long long a1) { int v1; // eax int v2; // r14d int v3; // r15d int v4; // eax int v5; // esi int v6; // edx int v7; // ecx int v8; // r9d int v9; // eax int v10; // r14d int v11; // r15d int v12; // eax int v13; // eax int v14; // r14d int v15; // r15d int v16; // eax int v18; // r8d int v19; // r9d int v20; // eax int v21; // r14d int v22; // r15d int v23; // eax v1 = mysql_query(a1, "drop table if exists t1"); if ( v1 ) { v2 = v1; v3 = mysql_error(a1); v4 = mysql_errno(a1); v5 = v2; v6 = v3; v7 = v4; v8 = 87; } else { v9 = mysql_query(a1, "create table t1(f1 int)"); if ( v9 ) { v10 = v9; v11 = mysql_error(a1); v12 = mysql_errno(a1); v5 = v10; v6 = v11; v7 = v12; v8 = 89; } else { v13 = mysql_query(a1, "insert into t1 values(1)"); if ( v13 ) { v14 = v13; v15 = mysql_error(a1); v16 = mysql_errno(a1); v5 = v14; v6 = v15; v7 = v16; v8 = 91; } else { if ( mysql_affected_rows(a1) != 1 ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"affected_rows != 1", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c", 92, v18, v19); return 1LL; } v20 = mysql_query(a1, "drop table t1"); if ( !v20 ) return 0LL; v21 = v20; v22 = mysql_error(a1); v23 = mysql_errno(a1); v5 = v21; v6 = v22; v7 = v23; v8 = 94; } } } diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v5, v6, v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c", v8); return 1LL; }
test_bug29692: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[0x13a322] CALL 0x0011ee15 TEST EAX,EAX JZ 0x001173d9 MOV R14D,EAX MOV RDI,RBX CALL 0x00120e8e MOV R15,RAX MOV RDI,RBX CALL 0x00120e79 LEA RDI,[0x139265] LEA R8,[0x13996e] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x57 JMP 0x00117465 LAB_001173d9: LEA RSI,[0x13a515] MOV RDI,RBX CALL 0x0011ee15 TEST EAX,EAX JZ 0x00117420 MOV R14D,EAX MOV RDI,RBX CALL 0x00120e8e MOV R15,RAX MOV RDI,RBX CALL 0x00120e79 LEA RDI,[0x139265] LEA R8,[0x13996e] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x59 JMP 0x00117465 LAB_00117420: LEA RSI,[0x13a35e] MOV RDI,RBX CALL 0x0011ee15 TEST EAX,EAX JZ 0x0011747c MOV R14D,EAX MOV RDI,RBX CALL 0x00120e8e MOV R15,RAX MOV RDI,RBX CALL 0x00120e79 LEA RDI,[0x139265] LEA R8,[0x13996e] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x5b LAB_00117465: XOR EAX,EAX CALL 0x0011970b LAB_0011746c: MOV EAX,0x1 LAB_00117471: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0011747c: MOV RDI,RBX CALL 0x00120e0c CMP RAX,0x1 JNZ 0x001174d1 LEA RSI,[0x13a3b6] MOV RDI,RBX CALL 0x0011ee15 TEST EAX,EAX JZ 0x001174f7 MOV R14D,EAX MOV RDI,RBX CALL 0x00120e8e MOV R15,RAX MOV RDI,RBX CALL 0x00120e79 LEA RDI,[0x139265] LEA R8,[0x13996e] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x5e JMP 0x00117465 LAB_001174d1: LEA RDI,[0x139120] LEA RSI,[0x13a52d] LEA RDX,[0x13996e] MOV ECX,0x5c XOR EAX,EAX CALL 0x0011970b JMP 0x0011746c LAB_001174f7: XOR EAX,EAX JMP 0x00117471
int8 test_bug29692(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; long lVar4; int8 uVar5; iVar1 = mysql_query(param_1,"drop table if exists t1"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"create table t1(f1 int)"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"insert into t1 values(1)"); if (iVar1 == 0) { lVar4 = mysql_affected_rows(param_1); if (lVar4 != 1) { diag("Error: %s (%s: %d)","affected_rows != 1", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",0x5c ); return 1; } iVar1 = mysql_query(param_1,"drop table t1"); if (iVar1 == 0) { return 0; } uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x5e; } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x5b; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x59; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); uVar5 = 0x57; } diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/misc.c",uVar5); return 1; }
48,483
ggml_backend_graph_copy
monkey531[P]llama/ggml/src/ggml-backend.cpp
struct ggml_backend_graph_copy ggml_backend_graph_copy(ggml_backend_t backend, struct ggml_cgraph * graph) { struct ggml_hash_set hash_set = ggml_hash_set_new(graph->visited_hash_set.size); struct ggml_tensor ** node_copies = (ggml_tensor **) calloc(hash_set.size, sizeof(node_copies[0])); // NOLINT bool * node_init = (bool *) calloc(hash_set.size, sizeof(node_init[0])); struct ggml_init_params params = { /* .mem_size = */ ggml_tensor_overhead()*hash_set.size + ggml_graph_overhead_custom(graph->size, false), /* .mem_buffer = */ NULL, /* .no_alloc = */ true }; struct ggml_context * ctx_allocated = ggml_init(params); struct ggml_context * ctx_unallocated = ggml_init(params); if (ctx_allocated == NULL || ctx_unallocated == NULL) { GGML_LOG_ERROR("%s: failed to allocate context for graph copy\n", __func__); ggml_hash_set_free(&hash_set); free(node_copies); free(node_init); ggml_free(ctx_allocated); ggml_free(ctx_unallocated); return { /* .buffer = */ NULL, /* .ctx_allocated = */ NULL, /* .ctx_unallocated = */ NULL, /* .graph = */ NULL, }; } // dup nodes for (int i = 0; i < graph->n_nodes; i++) { struct ggml_tensor * node = graph->nodes[i]; graph_copy_dup_tensor(hash_set, node_copies, ctx_allocated, ctx_unallocated, node); } // allocate nodes ggml_backend_buffer_t buffer = ggml_backend_alloc_ctx_tensors(ctx_allocated, backend); if (buffer == NULL) { GGML_LOG_ERROR("%s: failed to allocate buffer for graph copy\n", __func__); ggml_hash_set_free(&hash_set); free(node_copies); free(node_init); ggml_free(ctx_allocated); ggml_free(ctx_unallocated); return { /* .buffer = */ NULL, /* .ctx_allocated = */ NULL, /* .ctx_unallocated = */ NULL, /* .graph = */ NULL, }; } //printf("copy buffer size: %zu MB\n", ggml_backend_buffer_get_size(buffer) / 1024 / 1024); // copy data and init views for (int i = 0; i < graph->n_nodes; i++) { struct ggml_tensor * node = graph->nodes[i]; graph_copy_init_tensor(&hash_set, node_copies, node_init, node); } // build graph copy struct ggml_cgraph * graph_copy = ggml_new_graph_custom(ctx_allocated, graph->size, false); for (int i = 0; i < graph->n_nodes; i++) { struct ggml_tensor * node = graph->nodes[i]; struct ggml_tensor * node_copy = node_copies[ggml_hash_find(&hash_set, node)]; graph_copy->nodes[i] = node_copy; } graph_copy->n_nodes = graph->n_nodes; ggml_hash_set_free(&hash_set); free(node_copies); free(node_init); return { /* .buffer = */ buffer, /* .ctx_allocated = */ ctx_allocated, /* .ctx_unallocated = */ ctx_unallocated, /* .graph = */ graph_copy, }; }
O2
cpp
ggml_backend_graph_copy: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %rbp movq %rsi, 0x20(%rsp) movq %rdi, %r12 movq 0x30(%rdx), %rsi leaq 0x38(%rsp), %rbx movq %rbx, %rdi callq 0x1c260 movq (%rbx), %r14 pushq $0x8 popq %rsi movq %r14, %rdi callq 0x1cf20 movq %rax, %r15 pushq $0x1 popq %rsi movq %r14, %rdi callq 0x1cf20 movq %rax, %r13 callq 0x1e7e0 movq %rax, %r14 imulq (%rbx), %r14 movslq (%rbp), %rdi xorl %esi, %esi callq 0x1e000 movq %rax, %rbx addq %r14, %rbx movq %rbx, 0x80(%rsp) andq $0x0, 0x88(%rsp) movb $0x1, %r14b movb %r14b, 0x90(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x80(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x1d460 movq %rbx, 0x68(%rsp) andq $0x0, 0x70(%rsp) movb %r14b, 0x78(%rsp) movq %rax, %r14 movq 0x78(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x68(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x1d460 movq %rax, %rbx testq %r14, %r14 sete %al testq %rbx, %rbx sete %cl orb %al, %cl je 0x2caa3 leaq 0x21de2(%rip), %rsi # 0x4e84a leaq 0x21e0a(%rip), %rdx # 0x4e879 pushq $0x4 popq %rdi xorl %eax, %eax callq 0x1cac0 leaq 0x38(%rsp), %rdi callq 0x1c240 movq %r15, %rdi callq 0x1db60 movq %r13, %rdi callq 0x1db60 movq %r14, %rdi callq 0x1c3e0 movq %rbx, %rdi jmp 0x2cc18 movq %rbx, 0x28(%rsp) xorl %ebx, %ebx movslq 0x4(%rbp), %rax cmpq %rax, %rbx jge 0x2cae3 movq 0x10(%rbp), %rax movq (%rax,%rbx,8), %rcx movq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x38(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq 0x28(%rsp), %rdx callq 0x2cc40 incq %rbx jmp 0x2caaa movq %r14, %rdi movq 0x20(%rsp), %rsi callq 0x1d180 testq %rax, %rax je 0x2cbd9 movq %rax, 0x50(%rsp) movq %r14, 0x20(%rsp) xorl %r14d, %r14d leaq 0x38(%rsp), %rbx movslq 0x4(%rbp), %rax cmpq %rax, %r14 jge 0x2cb2f movq 0x10(%rbp), %rax movq (%rax,%r14,8), %rcx movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x2ce58 incq %r14 jmp 0x2cb0b movq %r13, 0x58(%rsp) movq %r12, 0x60(%rsp) movslq (%rbp), %rsi xorl %r13d, %r13d movq 0x20(%rsp), %rdi xorl %edx, %edx callq 0x1e8d0 movq %rax, %rbx movl 0x4(%rbp), %eax testl %eax, %eax movl $0x0, %r12d movl %eax, 0x34(%rsp) cmovgl %eax, %r12d leaq 0x38(%rsp), %r14 cmpq %r13, %r12 je 0x2cb8d movq 0x10(%rbp), %rax movq (%rax,%r13,8), %rsi movq %r14, %rdi callq 0x2ceec movq (%r15,%rax,8), %rax movq 0x10(%rbx), %rcx movq %rax, (%rcx,%r13,8) incq %r13 jmp 0x2cb67 movl 0x34(%rsp), %eax movl %eax, 0x4(%rbx) leaq 0x38(%rsp), %rdi callq 0x1c240 movq %r15, %rdi callq 0x1db60 movq 0x58(%rsp), %rdi callq 0x1db60 movq 0x60(%rsp), %r12 movq 0x50(%rsp), %rax movq %rax, (%r12) movq 0x20(%rsp), %rax movq %rax, 0x8(%r12) movq 0x28(%rsp), %rax movq %rax, 0x10(%r12) movq %rbx, 0x18(%r12) jmp 0x2cc2b leaq 0x21cb1(%rip), %rsi # 0x4e891 leaq 0x21c92(%rip), %rdx # 0x4e879 pushq $0x4 popq %rdi xorl %eax, %eax callq 0x1cac0 leaq 0x38(%rsp), %rdi callq 0x1c240 movq %r15, %rdi callq 0x1db60 movq %r13, %rdi callq 0x1db60 movq %r14, %rdi callq 0x1c3e0 movq 0x28(%rsp), %rdi callq 0x1c3e0 xorps %xmm0, %xmm0 movups %xmm0, 0x10(%r12) movups %xmm0, (%r12) movq %r12, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ggml_backend_graph_copy: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbp, rdx mov [rsp+0C8h+var_A8], rsi mov r12, rdi mov rsi, [rdx+30h] lea rbx, [rsp+0C8h+var_90] mov rdi, rbx call _ggml_hash_set_new mov r14, [rbx] push 8 pop rsi mov rdi, r14 call _calloc mov r15, rax push 1 pop rsi mov rdi, r14 call _calloc mov r13, rax call _ggml_tensor_overhead mov r14, rax imul r14, [rbx] movsxd rdi, dword ptr [rbp+0] xor esi, esi call _ggml_graph_overhead_custom mov rbx, rax add rbx, r14 mov qword ptr [rsp+0C8h+var_48], rbx and qword ptr [rsp+0C8h+var_48+8], 0 mov r14b, 1 mov byte ptr [rsp+0C8h+var_38], r14b mov rax, [rsp+0C8h+var_38] mov [rsp+0C8h+var_B8], rax movups xmm0, [rsp+0C8h+var_48] movups [rsp+0C8h+var_C8], xmm0 call _ggml_init mov qword ptr [rsp+0C8h+var_60], rbx and qword ptr [rsp+0C8h+var_60+8], 0 mov byte ptr [rsp+0C8h+var_50], r14b mov r14, rax mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_B8], rax movups xmm0, [rsp+0C8h+var_60] movups [rsp+0C8h+var_C8], xmm0 call _ggml_init mov rbx, rax test r14, r14 setz al test rbx, rbx setz cl or cl, al jz short loc_2CAA3 lea rsi, aSFailedToAlloc_2; "%s: failed to allocate context for grap"... lea rdx, aGgmlBackendGra_6; "ggml_backend_graph_copy" push 4 pop rdi xor eax, eax call _ggml_log_internal lea rdi, [rsp+0C8h+var_90] call _ggml_hash_set_free mov rdi, r15 call _free mov rdi, r13 call _free mov rdi, r14 call _ggml_free mov rdi, rbx jmp loc_2CC18 loc_2CAA3: mov [rsp+0C8h+var_A0], rbx xor ebx, ebx loc_2CAAA: movsxd rax, dword ptr [rbp+4] cmp rbx, rax jge short loc_2CAE3 mov rax, [rbp+10h] mov rcx, [rax+rbx*8] mov rax, [rsp+0C8h+var_80] mov [rsp+0C8h+var_B8], rax movups xmm0, [rsp+0C8h+var_90] movups [rsp+0C8h+var_C8], xmm0 mov rdi, r15 mov rsi, r14 mov rdx, [rsp+0C8h+var_A0] call _ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_; graph_copy_dup_tensor(ggml_hash_set,ggml_tensor **,ggml_context *,ggml_context *,ggml_tensor *) inc rbx jmp short loc_2CAAA loc_2CAE3: mov rdi, r14 mov rsi, [rsp+0C8h+var_A8] call _ggml_backend_alloc_ctx_tensors test rax, rax jz loc_2CBD9 mov [rsp+0C8h+var_78], rax mov [rsp+0C8h+var_A8], r14 xor r14d, r14d lea rbx, [rsp+0C8h+var_90] loc_2CB0B: movsxd rax, dword ptr [rbp+4] cmp r14, rax jge short loc_2CB2F mov rax, [rbp+10h] mov rcx, [rax+r14*8] mov rdi, rbx mov rsi, r15 mov rdx, r13 call _ZL22graph_copy_init_tensorP13ggml_hash_setPP11ggml_tensorPbS2_; graph_copy_init_tensor(ggml_hash_set *,ggml_tensor **,bool *,ggml_tensor *) inc r14 jmp short loc_2CB0B loc_2CB2F: mov [rsp+0C8h+var_70], r13 mov [rsp+0C8h+var_68], r12 movsxd rsi, dword ptr [rbp+0] xor r13d, r13d mov rdi, [rsp+0C8h+var_A8] xor edx, edx call _ggml_new_graph_custom mov rbx, rax mov eax, [rbp+4] test eax, eax mov r12d, 0 mov [rsp+0C8h+var_94], eax cmovg r12d, eax lea r14, [rsp+0C8h+var_90] loc_2CB67: cmp r12, r13 jz short loc_2CB8D mov rax, [rbp+10h] mov rsi, [rax+r13*8] mov rdi, r14 call _ZL14ggml_hash_findPK13ggml_hash_setPK11ggml_tensor; ggml_hash_find(ggml_hash_set const*,ggml_tensor const*) mov rax, [r15+rax*8] mov rcx, [rbx+10h] mov [rcx+r13*8], rax inc r13 jmp short loc_2CB67 loc_2CB8D: mov eax, [rsp+0C8h+var_94] mov [rbx+4], eax lea rdi, [rsp+0C8h+var_90] call _ggml_hash_set_free mov rdi, r15 call _free mov rdi, [rsp+0C8h+var_70] call _free mov r12, [rsp+0C8h+var_68] mov rax, [rsp+0C8h+var_78] mov [r12], rax mov rax, [rsp+0C8h+var_A8] mov [r12+8], rax mov rax, [rsp+0C8h+var_A0] mov [r12+10h], rax mov [r12+18h], rbx jmp short loc_2CC2B loc_2CBD9: lea rsi, aSFailedToAlloc_3; "%s: failed to allocate buffer for graph"... lea rdx, aGgmlBackendGra_6; "ggml_backend_graph_copy" push 4 pop rdi xor eax, eax call _ggml_log_internal lea rdi, [rsp+0C8h+var_90] call _ggml_hash_set_free mov rdi, r15 call _free mov rdi, r13 call _free mov rdi, r14 call _ggml_free mov rdi, [rsp+0C8h+var_A0] loc_2CC18: call _ggml_free xorps xmm0, xmm0 movups xmmword ptr [r12+10h], xmm0 movups xmmword ptr [r12], xmm0 loc_2CC2B: mov rax, r12 add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long * ggml_backend_graph_copy( long long *a1, long long a2, int *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { unsigned long long v13; // r14 long long v14; // r15 long long v15; // r13 long long v16; // r14 long long v17; // rdi unsigned long long v18; // rbx long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 double v23; // xmm4_8 double v24; // xmm5_8 long long v25; // rax long long v26; // r14 __m128 v27; // xmm0 long long v28; // rdx long long v29; // rcx long long v30; // r8 long long v31; // r9 double v32; // xmm4_8 double v33; // xmm5_8 long long v34; // rbx long long v35; // r8 long long v36; // r9 __m128 v37; // xmm4 __m128 v38; // xmm5 long long v39; // rcx const char *v40; // rsi const char *v41; // rdx const char *v42; // rdx long long v43; // rdi long long i; // rbx long long v45; // rax long long v46; // rcx long long v47; // r8 long long v48; // r9 __m128 v49; // xmm4 __m128 v50; // xmm5 long long j; // r14 long long v52; // rsi long long v53; // r13 long long v54; // rbx int v55; // eax long long v56; // r12 const char *v57; // rdx const char *v58; // rdx long long *v60; // [rsp+20h] [rbp-A8h] long long v61; // [rsp+28h] [rbp-A0h] int v62; // [rsp+34h] [rbp-94h] __m128 v63; // [rsp+38h] [rbp-90h] BYREF long long v64; // [rsp+48h] [rbp-80h] long long v65; // [rsp+50h] [rbp-78h] long long v66; // [rsp+58h] [rbp-70h] long long *v67; // [rsp+60h] [rbp-68h] __int128 v68; // [rsp+68h] [rbp-60h] long long v69; // [rsp+78h] [rbp-50h] __int128 v70; // [rsp+80h] [rbp-48h] long long v71; // [rsp+90h] [rbp-38h] ggml_hash_set_new((long long *)&v63, *((_QWORD *)a3 + 6), a4, a5, a6, a7, a8, a9, a10, a11); v13 = v63.m128_u64[0]; v14 = calloc(v63.m128_u64[0], 8LL); v15 = calloc(v13, 1LL); v16 = v63.m128_u64[0] * ggml_tensor_overhead(); v17 = *a3; v18 = v16 + ggml_graph_overhead_custom(v17); v70 = v18; LOBYTE(v71) = 1; v25 = ggml_init((__m128)v18, a5, a6, (__m128i)a7, v23, v24, a10, a11, v17, 0LL, v19, v20, v21, v22, v18, 0LL, 1); v68 = v18; LOBYTE(v69) = 1; v26 = v25; v27 = (__m128)v18; v34 = ggml_init((__m128)v18, a5, a6, (__m128i)a7, v32, v33, a10, a11, v17, 0LL, v28, v29, v30, v31, v18, 0LL, 1); LOBYTE(v39) = v26 == 0 || v34 == 0; if ( (_BYTE)v39 ) { v40 = "%s: failed to allocate context for graph copy\n"; ggml_log_internal( v27, a5, a6, a7, v37, v38, a10, a11, 4LL, (long long)"%s: failed to allocate context for graph copy\n", (long long)"ggml_backend_graph_copy", v39, v35, v36); ggml_hash_set_free((long long)&v63, (long long)"%s: failed to allocate context for graph copy\n"); free(v14, "%s: failed to allocate context for graph copy\n", v41); free(v15, "%s: failed to allocate context for graph copy\n", v42); ggml_free(v26, (long long)"%s: failed to allocate context for graph copy\n"); v43 = v34; LABEL_16: ggml_free(v43, (long long)v40); *((_OWORD *)a1 + 1) = 0LL; *(_OWORD *)a1 = 0LL; return a1; } v61 = v34; for ( i = 0LL; i < a3[1]; ++i ) { v27 = v63; graph_copy_dup_tensor(v14, v26, v61, *(_QWORD *)(*((_QWORD *)a3 + 2) + 8 * i), v35, v36, *(_OWORD *)&v63, v64); } v45 = ggml_backend_alloc_ctx_tensors( v26, a2, v27, a5, a6, a7, *(double *)v37.m128_u64, *(double *)v38.m128_u64, a10, a11); if ( !v45 ) { v40 = "%s: failed to allocate buffer for graph copy\n"; ggml_log_internal( v27, a5, a6, a7, v49, v50, a10, a11, 4LL, (long long)"%s: failed to allocate buffer for graph copy\n", (long long)"ggml_backend_graph_copy", v46, v47, v48); ggml_hash_set_free((long long)&v63, (long long)"%s: failed to allocate buffer for graph copy\n"); free(v14, "%s: failed to allocate buffer for graph copy\n", v57); free(v15, "%s: failed to allocate buffer for graph copy\n", v58); ggml_free(v26, (long long)"%s: failed to allocate buffer for graph copy\n"); v43 = v61; goto LABEL_16; } v65 = v45; v60 = (long long *)v26; for ( j = 0LL; j < a3[1]; ++j ) graph_copy_init_tensor(&v63, v14, v15, *(_QWORD *)(*((_QWORD *)a3 + 2) + 8 * j)); v66 = v15; v67 = a1; v52 = *a3; v53 = 0LL; v54 = ggml_new_graph_custom(v60, v52, 0, v27, a5, a6, a7, *(double *)v49.m128_u64, *(double *)v50.m128_u64, a10, a11); v55 = a3[1]; v56 = 0LL; v62 = v55; if ( v55 > 0 ) v56 = (unsigned int)v55; while ( v56 != v53 ) { v52 = *(_QWORD *)(*((_QWORD *)a3 + 2) + 8 * v53); *(_QWORD *)(*(_QWORD *)(v54 + 16) + 8 * v53++) = *(_QWORD *)(v14 + 8 * ggml_hash_find(&v63, v52)); } *(_DWORD *)(v54 + 4) = v62; ggml_hash_set_free((long long)&v63, v52); free(v14, (const char *)v52); free(v66, (const char *)v52); a1 = v67; *v67 = v65; a1[1] = (long long)v60; a1[2] = v61; a1[3] = v54; return a1; }
ggml_backend_graph_copy: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBP,RDX MOV qword ptr [RSP + 0x20],RSI MOV R12,RDI MOV RSI,qword ptr [RDX + 0x30] LEA RBX,[RSP + 0x38] MOV RDI,RBX CALL 0x0011c260 MOV R14,qword ptr [RBX] PUSH 0x8 POP RSI MOV RDI,R14 CALL 0x0011cf20 MOV R15,RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0011cf20 MOV R13,RAX CALL 0x0011e7e0 MOV R14,RAX IMUL R14,qword ptr [RBX] MOVSXD RDI,dword ptr [RBP] XOR ESI,ESI CALL 0x0011e000 MOV RBX,RAX ADD RBX,R14 MOV qword ptr [RSP + 0x80],RBX AND qword ptr [RSP + 0x88],0x0 MOV R14B,0x1 MOV byte ptr [RSP + 0x90],R14B MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x80] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x0011d460 MOV qword ptr [RSP + 0x68],RBX AND qword ptr [RSP + 0x70],0x0 MOV byte ptr [RSP + 0x78],R14B MOV R14,RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x68] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x0011d460 MOV RBX,RAX TEST R14,R14 SETZ AL TEST RBX,RBX SETZ CL OR CL,AL JZ 0x0012caa3 LEA RSI,[0x14e84a] LEA RDX,[0x14e879] PUSH 0x4 POP RDI XOR EAX,EAX CALL 0x0011cac0 LEA RDI,[RSP + 0x38] CALL 0x0011c240 MOV RDI,R15 CALL 0x0011db60 MOV RDI,R13 CALL 0x0011db60 MOV RDI,R14 CALL 0x0011c3e0 MOV RDI,RBX JMP 0x0012cc18 LAB_0012caa3: MOV qword ptr [RSP + 0x28],RBX XOR EBX,EBX LAB_0012caaa: MOVSXD RAX,dword ptr [RBP + 0x4] CMP RBX,RAX JGE 0x0012cae3 MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RAX + RBX*0x8] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV RDX,qword ptr [RSP + 0x28] CALL 0x0012cc40 INC RBX JMP 0x0012caaa LAB_0012cae3: MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x20] CALL 0x0011d180 TEST RAX,RAX JZ 0x0012cbd9 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x20],R14 XOR R14D,R14D LEA RBX,[RSP + 0x38] LAB_0012cb0b: MOVSXD RAX,dword ptr [RBP + 0x4] CMP R14,RAX JGE 0x0012cb2f MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RAX + R14*0x8] MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x0012ce58 INC R14 JMP 0x0012cb0b LAB_0012cb2f: MOV qword ptr [RSP + 0x58],R13 MOV qword ptr [RSP + 0x60],R12 MOVSXD RSI,dword ptr [RBP] XOR R13D,R13D MOV RDI,qword ptr [RSP + 0x20] XOR EDX,EDX CALL 0x0011e8d0 MOV RBX,RAX MOV EAX,dword ptr [RBP + 0x4] TEST EAX,EAX MOV R12D,0x0 MOV dword ptr [RSP + 0x34],EAX CMOVG R12D,EAX LEA R14,[RSP + 0x38] LAB_0012cb67: CMP R12,R13 JZ 0x0012cb8d MOV RAX,qword ptr [RBP + 0x10] MOV RSI,qword ptr [RAX + R13*0x8] MOV RDI,R14 CALL 0x0012ceec MOV RAX,qword ptr [R15 + RAX*0x8] MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RCX + R13*0x8],RAX INC R13 JMP 0x0012cb67 LAB_0012cb8d: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RBX + 0x4],EAX LEA RDI,[RSP + 0x38] CALL 0x0011c240 MOV RDI,R15 CALL 0x0011db60 MOV RDI,qword ptr [RSP + 0x58] CALL 0x0011db60 MOV R12,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [R12],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [R12 + 0x8],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [R12 + 0x10],RAX MOV qword ptr [R12 + 0x18],RBX JMP 0x0012cc2b LAB_0012cbd9: LEA RSI,[0x14e891] LEA RDX,[0x14e879] PUSH 0x4 POP RDI XOR EAX,EAX CALL 0x0011cac0 LEA RDI,[RSP + 0x38] CALL 0x0011c240 MOV RDI,R15 CALL 0x0011db60 MOV RDI,R13 CALL 0x0011db60 MOV RDI,R14 CALL 0x0011c3e0 MOV RDI,qword ptr [RSP + 0x28] LAB_0012cc18: CALL 0x0011c3e0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x10],XMM0 MOVUPS xmmword ptr [R12],XMM0 LAB_0012cc2b: MOV RAX,R12 ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * ggml_backend_graph_copy (long *param_1,int8 param_2,int *param_3,int8 param_4, int8 param_5,int8 param_6) { uint uVar1; size_t __nmemb; ggml_tensor **__ptr; bool *__ptr_00; long lVar2; long lVar3; long lVar4; long lVar5; ulong uVar6; ulong uVar7; int4 local_90; int4 uStack_8c; int4 uStack_88; int8 local_80; long local_78; bool *local_70; long *local_68; long local_60; int8 uStack_58; int1 local_50; long local_48; int8 uStack_40; int1 local_38; ggml_hash_set_new(&local_90,*(int8 *)(param_3 + 0xc)); __nmemb = CONCAT44(uStack_8c,local_90); __ptr = (ggml_tensor **)calloc(__nmemb,8); __ptr_00 = (bool *)calloc(__nmemb,1); lVar2 = ggml_tensor_overhead(); lVar4 = CONCAT44(uStack_8c,local_90); lVar3 = ggml_graph_overhead_custom((long)*param_3,0); lVar3 = lVar3 + lVar2 * lVar4; uStack_40 = 0; local_38 = 1; local_48 = lVar3; lVar4 = ggml_init(); uStack_58 = 0; local_50 = 1; local_60 = lVar3; lVar2 = ggml_init(); if (lVar2 == 0 || lVar4 == 0) { ggml_log_internal(4,"%s: failed to allocate context for graph copy\n","ggml_backend_graph_copy") ; ggml_hash_set_free(&local_90); free(__ptr); free(__ptr_00); ggml_free(lVar4); } else { for (lVar3 = 0; lVar3 < param_3[1]; lVar3 = lVar3 + 1) { graph_copy_dup_tensor (__ptr,lVar4,lVar2,*(int8 *)(*(long *)(param_3 + 4) + lVar3 * 8),param_5, param_6,local_90,uStack_88,local_80); } local_78 = ggml_backend_alloc_ctx_tensors(lVar4,param_2); if (local_78 != 0) { for (lVar3 = 0; lVar3 < param_3[1]; lVar3 = lVar3 + 1) { graph_copy_init_tensor ((ggml_hash_set *)&local_90,__ptr,__ptr_00, *(ggml_tensor **)(*(long *)(param_3 + 4) + lVar3 * 8)); } uVar7 = 0; local_70 = __ptr_00; local_68 = param_1; lVar3 = ggml_new_graph_custom(lVar4,(long)*param_3,0); uVar1 = param_3[1]; uVar6 = 0; if (0 < (int)uVar1) { uVar6 = (ulong)uVar1; } for (; uVar6 != uVar7; uVar7 = uVar7 + 1) { lVar5 = ggml_hash_find((ggml_hash_set *)&local_90, *(ggml_tensor **)(*(long *)(param_3 + 4) + uVar7 * 8)); *(ggml_tensor **)(*(long *)(lVar3 + 0x10) + uVar7 * 8) = __ptr[lVar5]; } *(uint *)(lVar3 + 4) = uVar1; ggml_hash_set_free(&local_90); free(__ptr); free(local_70); *local_68 = local_78; local_68[1] = lVar4; local_68[2] = lVar2; local_68[3] = lVar3; return local_68; } ggml_log_internal(4,"%s: failed to allocate buffer for graph copy\n","ggml_backend_graph_copy"); ggml_hash_set_free(&local_90); free(__ptr); free(__ptr_00); ggml_free(lVar4); } ggml_free(lVar2); param_1[2] = 0; param_1[3] = 0; *param_1 = 0; param_1[1] = 0; return param_1; }
48,484
free_full_page_range
eloqsql/storage/maria/ma_blockrec.c
static my_bool free_full_page_range(MARIA_HA *info, pgcache_page_no_t page, uint count) { my_bool res= 0; uint delete_count; MARIA_SHARE *share= info->s; DBUG_ENTER("free_full_page_range"); delete_count= count; if (share->state.state.data_file_length == (page + count) * share->block_size) { /* Don't delete last page from pagecache as this will make the file shorter than expected if the last operation extended the file */ delete_count--; } if (delete_count && pagecache_delete_pages(share->pagecache, &info->dfile, page, delete_count, PAGECACHE_LOCK_WRITE, 1)) res= 1; if (share->now_transactional) { LSN lsn; /** @todo unify log_data's shape with delete_head_or_tail() */ uchar log_data[FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE + ROW_EXTENT_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; DBUG_ASSERT(info->trn->rec_lsn); pagerange_store(log_data + FILEID_STORE_SIZE, 1); page_store(log_data + FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE, page); int2store(log_data + FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE + PAGE_STORE_SIZE, count); 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_FREE_BLOCKS, info->trn, info, (translog_size_t) sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) res= 1; } mysql_mutex_lock(&share->bitmap.bitmap_lock); if (_ma_bitmap_reset_full_page_bits(info, &share->bitmap, page, count)) res= 1; mysql_mutex_unlock(&share->bitmap.bitmap_lock); DBUG_RETURN(res); }
O0
c
free_full_page_range: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movl %edx, -0x2c(%rbp) movb $0x0, -0x2d(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x40(%rbp), %rax movq 0x40(%rax), %rax movq -0x28(%rbp), %rcx movl -0x2c(%rbp), %edx addq %rdx, %rcx movq -0x40(%rbp), %rdx movl 0x7bc(%rdx), %edx imulq %rdx, %rcx cmpq %rcx, %rax jne 0x57f76 movl -0x34(%rbp), %eax addl $-0x1, %eax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x57fb6 movq -0x40(%rbp), %rax movq 0x600(%rax), %rdi movq -0x20(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x28(%rbp), %rdx movl -0x34(%rbp), %ecx movl $0x4, %r8d movl $0x1, %r9d callq 0x40040 movsbl %al, %eax cmpl $0x0, %eax je 0x57fb6 movb $0x1, -0x2d(%rbp) movq -0x40(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x580a6 jmp 0x57fc9 jmp 0x57fcb jmp 0x57fcd leaq -0x13(%rbp), %rax addq $0x2, %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movw $0x1, (%rax) jmp 0x57fea leaq -0x13(%rbp), %rax addq $0x2, %rax addq $0x2, %rax movq %rax, -0x90(%rbp) movq -0x28(%rbp), %rax movl %eax, %ecx movq -0x90(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x90(%rbp), %rax movb %cl, 0x4(%rax) jmp 0x58022 leaq -0x13(%rbp), %rax addq $0x2, %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0x98(%rbp) movl -0x2c(%rbp), %eax movw %ax, %cx movq -0x98(%rbp), %rax movw %cx, (%rax) leaq -0x13(%rbp), %rax movq %rax, -0x60(%rbp) movq $0xb, -0x58(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rdx movq -0x20(%rbp), %rcx leaq -0x80(%rbp), %r10 leaq -0x13(%rbp), %rax leaq -0x48(%rbp), %rdi movl $0x8, %esi movl $0xb, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x33810 cmpb $0x0, %al je 0x580a4 movb $0x1, -0x2d(%rbp) jmp 0x580a6 movq -0x40(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0xfba9d(%rip), %rsi # 0x153b5c movl $0xa23, %edx # imm = 0xA23 callq 0x5cdb0 movq -0x20(%rbp), %rdi movq -0x40(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 movq -0x28(%rbp), %rdx movl -0x2c(%rbp), %ecx callq 0x65710 cmpb $0x0, %al je 0x580ec movb $0x1, -0x2d(%rbp) movq -0x40(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x5ce20 movb -0x2d(%rbp), %al movb %al, -0x99(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5812d movb -0x99(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
free_full_page_range: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_2C], edx mov [rbp+var_2D], 0 mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_40], rax mov eax, [rbp+var_2C] mov [rbp+var_34], eax mov rax, [rbp+var_40] mov rax, [rax+40h] mov rcx, [rbp+var_28] mov edx, [rbp+var_2C] add rcx, rdx mov rdx, [rbp+var_40] mov edx, [rdx+7BCh] imul rcx, rdx cmp rax, rcx jnz short loc_57F76 mov eax, [rbp+var_34] add eax, 0FFFFFFFFh mov [rbp+var_34], eax loc_57F76: cmp [rbp+var_34], 0 jz short loc_57FB6 mov rax, [rbp+var_40] mov rdi, [rax+600h] mov rsi, [rbp+var_20] add rsi, 470h mov rdx, [rbp+var_28] mov ecx, [rbp+var_34] mov r8d, 4 mov r9d, 1 call pagecache_delete_pages movsx eax, al cmp eax, 0 jz short loc_57FB6 mov [rbp+var_2D], 1 loc_57FB6: mov rax, [rbp+var_40] cmp byte ptr [rax+7E7h], 0 jz loc_580A6 jmp short $+2 loc_57FC9: jmp short $+2 loc_57FCB: jmp short $+2 loc_57FCD: lea rax, [rbp+var_13] add rax, 2 mov [rbp+var_88], rax mov rax, [rbp+var_88] mov word ptr [rax], 1 jmp short $+2 loc_57FEA: lea rax, [rbp+var_13] add rax, 2 add rax, 2 mov [rbp+var_90], rax mov rax, [rbp+var_28] mov ecx, eax mov rax, [rbp+var_90] mov [rax], ecx mov rax, [rbp+var_28] shr rax, 20h mov cl, al mov rax, [rbp+var_90] mov [rax+4], cl jmp short $+2 loc_58022: lea rax, [rbp+var_13] add rax, 2 add rax, 2 add rax, 5 mov [rbp+var_98], rax mov eax, [rbp+var_2C] mov cx, ax mov rax, [rbp+var_98] mov [rax], cx lea rax, [rbp+var_13] mov [rbp+var_60], rax mov [rbp+var_58], 0Bh mov rax, [rbp+var_20] mov rdx, [rax+8] mov rcx, [rbp+var_20] lea r10, [rbp+var_80] lea rax, [rbp+var_13] lea rdi, [rbp+var_48] mov esi, 8 mov r8d, 0Bh mov r9d, 3 xor r11d, r11d mov [rsp+0C0h+var_C0], r10 mov [rsp+0C0h+var_B8], rax mov [rsp+0C0h+var_B0], 0 call translog_write_record cmp al, 0 jz short loc_580A4 mov [rbp+var_2D], 1 loc_580A4: jmp short $+2 loc_580A6: mov rdi, [rbp+var_40] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0A23h call inline_mysql_mutex_lock_7 mov rdi, [rbp+var_20] mov rsi, [rbp+var_40] add rsi, 0A10h mov rdx, [rbp+var_28] mov ecx, [rbp+var_2C] call _ma_bitmap_reset_full_page_bits cmp al, 0 jz short loc_580EC mov [rbp+var_2D], 1 loc_580EC: mov rdi, [rbp+var_40] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_7 mov al, [rbp+var_2D] mov [rbp+var_99], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5812D mov al, [rbp+var_99] add rsp, 0C0h pop rbp retn loc_5812D: call ___stack_chk_fail
char free_full_page_range(long long *a1, long long a2, unsigned int a3) { _QWORD v4[7]; // [rsp+40h] [rbp-80h] BYREF _BYTE v5[8]; // [rsp+78h] [rbp-48h] BYREF long long v6; // [rsp+80h] [rbp-40h] unsigned int v7; // [rsp+8Ch] [rbp-34h] char v8; // [rsp+93h] [rbp-2Dh] unsigned int v9; // [rsp+94h] [rbp-2Ch] long long v10; // [rsp+98h] [rbp-28h] long long *v11; // [rsp+A0h] [rbp-20h] _WORD v12[2]; // [rsp+ADh] [rbp-13h] BYREF int v13; // [rsp+B1h] [rbp-Fh] char v14; // [rsp+B5h] [rbp-Bh] __int16 v15; // [rsp+B6h] [rbp-Ah] unsigned long long v16; // [rsp+B8h] [rbp-8h] v16 = __readfsqword(0x28u); v11 = a1; v10 = a2; v9 = a3; v8 = 0; v6 = *a1; v7 = a3; if ( *(_QWORD *)(v6 + 64) == *(unsigned int *)(v6 + 1980) * (a3 + a2) ) --v7; if ( v7 && pagecache_delete_pages(*(_QWORD **)(v6 + 1536), (long long)(v11 + 142), v10, v7, 4u, 1) ) v8 = 1; if ( *(_BYTE *)(v6 + 2023) ) { v12[1] = 1; v13 = v10; v14 = BYTE4(v10); v15 = v9; v4[4] = v12; v4[5] = 11LL; if ( translog_write_record((long long)v5, 8u, v11[1], v11, 11, 3u, v4, v12, 0LL) ) v8 = 1; } inline_mysql_mutex_lock_7(v6 + 2712, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 2595LL); if ( (unsigned __int8)ma_bitmap_reset_full_page_bits(v11, v6 + 2576, v10, v9) ) v8 = 1; inline_mysql_mutex_unlock_7(v6 + 2712); return v8; }
free_full_page_range: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV dword ptr [RBP + -0x2c],EDX MOV byte ptr [RBP + -0x2d],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x2c] ADD RCX,RDX MOV RDX,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RDX + 0x7bc] IMUL RCX,RDX CMP RAX,RCX JNZ 0x00157f76 MOV EAX,dword ptr [RBP + -0x34] ADD EAX,-0x1 MOV dword ptr [RBP + -0x34],EAX LAB_00157f76: CMP dword ptr [RBP + -0x34],0x0 JZ 0x00157fb6 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x34] MOV R8D,0x4 MOV R9D,0x1 CALL 0x00140040 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00157fb6 MOV byte ptr [RBP + -0x2d],0x1 LAB_00157fb6: MOV RAX,qword ptr [RBP + -0x40] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001580a6 JMP 0x00157fc9 LAB_00157fc9: JMP 0x00157fcb LAB_00157fcb: JMP 0x00157fcd LAB_00157fcd: LEA RAX,[RBP + -0x13] ADD RAX,0x2 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x88] MOV word ptr [RAX],0x1 JMP 0x00157fea LAB_00157fea: LEA RAX,[RBP + -0x13] ADD RAX,0x2 ADD RAX,0x2 MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x90] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RAX + 0x4],CL JMP 0x00158022 LAB_00158022: LEA RAX,[RBP + -0x13] ADD RAX,0x2 ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0x98],RAX MOV EAX,dword ptr [RBP + -0x2c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x98] MOV word ptr [RAX],CX LEA RAX,[RBP + -0x13] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBP + -0x58],0xb MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0x80] LEA RAX,[RBP + -0x13] LEA RDI,[RBP + -0x48] MOV ESI,0x8 MOV R8D,0xb MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00133810 CMP AL,0x0 JZ 0x001580a4 MOV byte ptr [RBP + -0x2d],0x1 LAB_001580a4: JMP 0x001580a6 LAB_001580a6: MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x253b5c] MOV EDX,0xa23 CALL 0x0015cdb0 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x40] ADD RSI,0xa10 MOV RDX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x2c] CALL 0x00165710 CMP AL,0x0 JZ 0x001580ec MOV byte ptr [RBP + -0x2d],0x1 LAB_001580ec: MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x0015ce20 MOV AL,byte ptr [RBP + -0x2d] MOV byte ptr [RBP + -0x99],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015812d MOV AL,byte ptr [RBP + -0x99] ADD RSP,0xc0 POP RBP RET LAB_0015812d: CALL 0x0012a250
int8 free_full_page_range(long *param_1,long param_2,uint param_3) { char cVar1; long in_FS_OFFSET; int1 local_88 [32]; int1 *local_68; int8 local_60; int1 local_50 [8]; long local_48; uint local_3c; int1 local_35; uint local_34; long local_30; long *local_28; int1 local_1b [2]; int2 local_19; int4 local_17; int1 local_13; int2 local_12; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_35 = 0; local_48 = *param_1; local_3c = param_3; if (*(long *)(local_48 + 0x40) == (param_2 + (ulong)param_3) * (ulong)*(uint *)(local_48 + 0x7bc)) { local_3c = param_3 - 1; } local_34 = param_3; local_30 = param_2; local_28 = param_1; if ((local_3c != 0) && (cVar1 = pagecache_delete_pages (*(int8 *)(local_48 + 0x600),param_1 + 0x8e,param_2,local_3c,4,1), cVar1 != '\0')) { local_35 = 1; } if (*(char *)(local_48 + 0x7e7) != '\0') { local_19 = 1; local_17 = (int4)local_30; local_13 = (int1)((ulong)local_30 >> 0x20); local_12 = (int2)local_34; local_68 = local_1b; local_60 = 0xb; cVar1 = translog_write_record(local_50,8,local_28[1],local_28,0xb,3,local_88,local_1b,0); if (cVar1 != '\0') { local_35 = 1; } } inline_mysql_mutex_lock (local_48 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c" ,0xa23); cVar1 = _ma_bitmap_reset_full_page_bits(local_28,local_48 + 0xa10,local_30,local_34); if (cVar1 != '\0') { local_35 = 1; } inline_mysql_mutex_unlock(local_48 + 0xa98); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_35); }
48,485
parser_parse_lambda
tsotchke[P]eshkol/src/frontend/parser/parser_lambda.c
AstNode* parser_parse_lambda(Parser* parser, size_t line, size_t column) { // Parse the parameter list if (!parser_match(parser, TOKEN_LPAREN)) { parser_error(parser, "Expected '(' before parameter list"); return NULL; } // Create a new scope for the lambda uint64_t lambda_scope_id = binding_system_enter_scope(parser->bindings); if (lambda_scope_id == 0) { parser_error(parser, "Failed to create scope for lambda"); return NULL; } size_t param_count = 0; Parameter** params = arena_alloc(parser->arena, sizeof(Parameter*) * 16); // Arbitrary initial capacity if (!params) { parser_error(parser, "Failed to allocate memory for parameters"); binding_system_exit_scope(parser->bindings); return NULL; } while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) { if (param_count >= 16) { parser_error(parser, "Too many parameters"); binding_system_exit_scope(parser->bindings); return NULL; } if (!parser_match(parser, TOKEN_IDENTIFIER)) { parser_error(parser, "Expected parameter name"); binding_system_exit_scope(parser->bindings); return NULL; } StringId param_name = parser->previous.value.string_id; // Add the parameter to the binding system uint64_t binding_id = binding_system_add_binding(parser->bindings, param_name, false); if (binding_id == 0) { parser_error(parser, "Failed to add binding for parameter"); binding_system_exit_scope(parser->bindings); return NULL; } Parameter* param = parameter_create(parser->arena, param_name, NULL, parser->previous.line, parser->previous.column); if (!param) { parser_error(parser, "Failed to create parameter"); binding_system_exit_scope(parser->bindings); return NULL; } params[param_count++] = param; } // Consume the closing parenthesis of the parameter list parser_consume(parser, TOKEN_RPAREN, "Expected ')' after parameter list"); // Parse the function body AstNode* body = NULL; // Parse the body expressions size_t body_expr_count = 0; AstNode** body_exprs = arena_alloc(parser->arena, sizeof(AstNode*) * 16); // Arbitrary initial capacity if (!body_exprs) { parser_error(parser, "Failed to allocate memory for body expressions"); binding_system_exit_scope(parser->bindings); return NULL; } while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) { if (body_expr_count >= 16) { parser_error(parser, "Too many expressions in function body"); binding_system_exit_scope(parser->bindings); return NULL; } AstNode* expr = parser_parse_expression(parser); if (!expr) { parser_error(parser, "Expected expression"); binding_system_exit_scope(parser->bindings); return NULL; } body_exprs[body_expr_count++] = expr; } // Create a begin node for the body if there are multiple expressions if (body_expr_count > 1) { body = ast_create_begin(parser->arena, body_exprs, body_expr_count, line, column); } else if (body_expr_count == 1) { body = body_exprs[0]; } else { parser_error(parser, "Expected at least one expression in function body"); binding_system_exit_scope(parser->bindings); return NULL; } if (!body) { parser_error(parser, "Failed to create function body"); binding_system_exit_scope(parser->bindings); return NULL; } // Consume the closing parenthesis of the lambda form parser_consume(parser, TOKEN_RPAREN, "Expected ')' after lambda"); // Exit the lambda scope binding_system_exit_scope(parser->bindings); // Create a lambda node AstNode* lambda = ast_create_lambda(parser->arena, params, param_count, NULL, body, line, column); if (!lambda) { parser_error(parser, "Failed to create lambda node"); return NULL; } // Set the scope ID in the lambda node lambda->scope_id = lambda_scope_id; return lambda; }
O0
c
parser_parse_lambda: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x8460 testb $0x1, %al jne 0x9666 movq -0x10(%rbp), %rdi leaq 0x8054(%rip), %rsi # 0x116a8 callq 0x8770 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb1f0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x969e movq -0x10(%rbp), %rdi leaq 0x803f(%rip), %rsi # 0x116cb callq 0x8770 movq $0x0, -0x8(%rbp) jmp 0x9acb movq $0x0, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x80, %esi callq 0x3a90 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x96ef movq -0x10(%rbp), %rdi leaq 0x7e47(%rip), %rsi # 0x11514 callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb jmp 0x96f1 movq -0x10(%rbp), %rdi movl $0x2, %esi callq 0x83f0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0x79(%rbp) jne 0x9719 movq -0x10(%rbp), %rdi callq 0x8440 xorb $-0x1, %al movb %al, -0x79(%rbp) movb -0x79(%rbp), %al testb $0x1, %al jne 0x9725 jmp 0x986e cmpq $0x10, -0x30(%rbp) jb 0x9759 movq -0x10(%rbp), %rdi leaq 0x7e06(%rip), %rsi # 0x1153d callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x10(%rbp), %rdi movl $0xb, %esi callq 0x8460 testb $0x1, %al jne 0x9798 movq -0x10(%rbp), %rdi leaq 0x7ddb(%rip), %rsi # 0x11551 callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi movq -0x40(%rbp), %rsi xorl %edx, %edx callq 0xb860 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x97f2 movq -0x10(%rbp), %rdi leaq 0x7f1d(%rip), %rsi # 0x116ed callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x40(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x68(%rax), %rcx movq -0x10(%rbp), %rax movq 0x70(%rax), %r8 xorl %eax, %eax movl %eax, %edx callq 0xaec0 movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) jne 0x984e movq -0x10(%rbp), %rdi leaq 0x7d3d(%rip), %rsi # 0x11569 callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x50(%rbp), %rdx movq -0x38(%rbp), %rax movq -0x30(%rbp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, -0x30(%rbp) movq %rdx, (%rax,%rcx,8) jmp 0x96f1 movq -0x10(%rbp), %rdi movl $0x2, %esi leaq 0x7d06(%rip), %rdx # 0x11584 callq 0x84a0 movq $0x0, -0x58(%rbp) movq $0x0, -0x60(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x80, %esi callq 0x3a90 movq %rax, -0x68(%rbp) cmpq $0x0, -0x68(%rbp) jne 0x98dc movq -0x10(%rbp), %rdi leaq 0x7cec(%rip), %rsi # 0x115a6 callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb jmp 0x98de movq -0x10(%rbp), %rdi movl $0x2, %esi callq 0x83f0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0x7a(%rbp) jne 0x9906 movq -0x10(%rbp), %rdi callq 0x8440 xorb $-0x1, %al movb %al, -0x7a(%rbp) movb -0x7a(%rbp), %al testb $0x1, %al jne 0x9912 jmp 0x99a7 cmpq $0x10, -0x60(%rbp) jb 0x9946 movq -0x10(%rbp), %rdi leaq 0x7cb1(%rip), %rsi # 0x115d5 callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x10(%rbp), %rdi callq 0x8830 movq %rax, -0x70(%rbp) cmpq $0x0, -0x70(%rbp) jne 0x9987 movq -0x10(%rbp), %rdi leaq 0x7ad2(%rip), %rsi # 0x11437 callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x70(%rbp), %rdx movq -0x68(%rbp), %rax movq -0x60(%rbp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, -0x60(%rbp) movq %rdx, (%rax,%rcx,8) jmp 0x98de cmpq $0x1, -0x60(%rbp) jbe 0x99d0 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x68(%rbp), %rsi movq -0x60(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 callq 0xcba0 movq %rax, -0x58(%rbp) jmp 0x9a13 cmpq $0x1, -0x60(%rbp) jne 0x99e4 movq -0x68(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) jmp 0x9a11 movq -0x10(%rbp), %rdi leaq 0x7c0c(%rip), %rsi # 0x115fb callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb jmp 0x9a13 cmpq $0x0, -0x58(%rbp) jne 0x9a47 movq -0x10(%rbp), %rdi leaq 0x7c08(%rip), %rsi # 0x1162d callq 0x8770 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x10(%rbp), %rdi movl $0x2, %esi leaq 0x7cba(%rip), %rdx # 0x11711 callq 0x84a0 movq -0x10(%rbp), %rax movq 0x88(%rax), %rdi callq 0xb610 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x58(%rbp), %r8 movq -0x18(%rbp), %r9 movq -0x20(%rbp), %rax xorl %ecx, %ecx movq %rax, (%rsp) callq 0xca70 movq %rax, -0x78(%rbp) cmpq $0x0, -0x78(%rbp) jne 0x9ab7 movq -0x10(%rbp), %rdi leaq 0x7c83(%rip), %rsi # 0x1172b callq 0x8770 movq $0x0, -0x8(%rbp) jmp 0x9acb movq -0x28(%rbp), %rcx movq -0x78(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x78(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nopl (%rax,%rax)
parser_parse_lambda: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10] mov esi, 1 call parser_match test al, 1 jnz short loc_9666 mov rdi, [rbp+var_10] lea rsi, aExpectedBefore; "Expected '(' before parameter list" call parser_error mov [rbp+var_8], 0 jmp loc_9ACB loc_9666: mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_enter_scope mov [rbp+var_28], rax cmp [rbp+var_28], 0 jnz short loc_969E mov rdi, [rbp+var_10] lea rsi, aFailedToCreate_3; "Failed to create scope for lambda" call parser_error mov [rbp+var_8], 0 jmp loc_9ACB loc_969E: mov [rbp+var_30], 0 mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 80h call arena_alloc mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_96EF mov rdi, [rbp+var_10] lea rsi, aFailedToAlloca_0; "Failed to allocate memory for parameter"... call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_96EF: jmp short $+2 loc_96F1: mov rdi, [rbp+var_10] mov esi, 2 call parser_check mov cl, al xor eax, eax test cl, 1 mov [rbp+var_79], al jnz short loc_9719 mov rdi, [rbp+var_10] call parser_is_at_end xor al, 0FFh mov [rbp+var_79], al loc_9719: mov al, [rbp+var_79] test al, 1 jnz short loc_9725 jmp loc_986E loc_9725: cmp [rbp+var_30], 10h jb short loc_9759 mov rdi, [rbp+var_10] lea rsi, aTooManyParamet; "Too many parameters" call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_9759: mov rdi, [rbp+var_10] mov esi, 0Bh call parser_match test al, 1 jnz short loc_9798 mov rdi, [rbp+var_10] lea rsi, aExpectedParame; "Expected parameter name" call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_9798: mov rax, [rbp+var_10] mov rax, [rax+78h] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rdi, [rax+88h] mov rsi, [rbp+var_40] xor edx, edx call binding_system_add_binding mov [rbp+var_48], rax cmp [rbp+var_48], 0 jnz short loc_97F2 mov rdi, [rbp+var_10] lea rsi, aFailedToAddBin_0; "Failed to add binding for parameter" call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_97F2: mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_40] mov rax, [rbp+var_10] mov rcx, [rax+68h] mov rax, [rbp+var_10] mov r8, [rax+70h] xor eax, eax mov edx, eax call parameter_create mov [rbp+var_50], rax cmp [rbp+var_50], 0 jnz short loc_984E mov rdi, [rbp+var_10] lea rsi, aFailedToCreate_1; "Failed to create parameter" call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_984E: mov rdx, [rbp+var_50] mov rax, [rbp+var_38] mov rcx, [rbp+var_30] mov rsi, rcx add rsi, 1 mov [rbp+var_30], rsi mov [rax+rcx*8], rdx jmp loc_96F1 loc_986E: mov rdi, [rbp+var_10] mov esi, 2 lea rdx, aExpectedAfterP; "Expected ')' after parameter list" call parser_consume mov [rbp+var_58], 0 mov [rbp+var_60], 0 mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 80h call arena_alloc mov [rbp+var_68], rax cmp [rbp+var_68], 0 jnz short loc_98DC mov rdi, [rbp+var_10] lea rsi, aFailedToAlloca_1; "Failed to allocate memory for body expr"... call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_98DC: jmp short $+2 loc_98DE: mov rdi, [rbp+var_10] mov esi, 2 call parser_check mov cl, al xor eax, eax test cl, 1 mov [rbp+var_7A], al jnz short loc_9906 mov rdi, [rbp+var_10] call parser_is_at_end xor al, 0FFh mov [rbp+var_7A], al loc_9906: mov al, [rbp+var_7A] test al, 1 jnz short loc_9912 jmp loc_99A7 loc_9912: cmp [rbp+var_60], 10h jb short loc_9946 mov rdi, [rbp+var_10] lea rsi, aTooManyExpress; "Too many expressions in function body" call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_9946: mov rdi, [rbp+var_10] call parser_parse_expression mov [rbp+var_70], rax cmp [rbp+var_70], 0 jnz short loc_9987 mov rdi, [rbp+var_10] lea rsi, aExpectedExpres; "Expected expression" call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_9987: mov rdx, [rbp+var_70] mov rax, [rbp+var_68] mov rcx, [rbp+var_60] mov rsi, rcx add rsi, 1 mov [rbp+var_60], rsi mov [rax+rcx*8], rdx jmp loc_98DE loc_99A7: cmp [rbp+var_60], 1 jbe short loc_99D0 mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_68] mov rdx, [rbp+var_60] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] call ast_create_begin mov [rbp+var_58], rax jmp short loc_9A13 loc_99D0: cmp [rbp+var_60], 1 jnz short loc_99E4 mov rax, [rbp+var_68] mov rax, [rax] mov [rbp+var_58], rax jmp short loc_9A11 loc_99E4: mov rdi, [rbp+var_10] lea rsi, aExpectedAtLeas; "Expected at least one expression in fun"... call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_9A11: jmp short $+2 loc_9A13: cmp [rbp+var_58], 0 jnz short loc_9A47 mov rdi, [rbp+var_10] lea rsi, aFailedToCreate_2; "Failed to create function body" call parser_error mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov [rbp+var_8], 0 jmp loc_9ACB loc_9A47: mov rdi, [rbp+var_10] mov esi, 2 lea rdx, aExpectedAfterL; "Expected ')' after lambda" call parser_consume mov rax, [rbp+var_10] mov rdi, [rax+88h] call binding_system_exit_scope mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_38] mov rdx, [rbp+var_30] mov r8, [rbp+var_58] mov r9, [rbp+var_18] mov rax, [rbp+var_20] xor ecx, ecx mov [rsp+90h+var_90], rax call ast_create_lambda mov [rbp+var_78], rax cmp [rbp+var_78], 0 jnz short loc_9AB7 mov rdi, [rbp+var_10] lea rsi, aFailedToCreate_4; "Failed to create lambda node" call parser_error mov [rbp+var_8], 0 jmp short loc_9ACB loc_9AB7: mov rcx, [rbp+var_28] mov rax, [rbp+var_78] mov [rax+30h], rcx mov rax, [rbp+var_78] mov [rbp+var_8], rax loc_9ACB: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
long long parser_parse_lambda(long long *a1, long long a2, long long a3) { unsigned long long v3; // rcx unsigned long long v4; // rcx char v6; // [rsp+16h] [rbp-7Ah] char v7; // [rsp+17h] [rbp-79h] long long lambda; // [rsp+18h] [rbp-78h] long long v9; // [rsp+20h] [rbp-70h] long long *v10; // [rsp+28h] [rbp-68h] unsigned long long v11; // [rsp+30h] [rbp-60h] long long begin; // [rsp+38h] [rbp-58h] long long v13; // [rsp+40h] [rbp-50h] long long v14; // [rsp+50h] [rbp-40h] long long v15; // [rsp+58h] [rbp-38h] unsigned long long v16; // [rsp+60h] [rbp-30h] long long v17; // [rsp+68h] [rbp-28h] if ( (parser_match((long long)a1, 1) & 1) != 0 ) { v17 = binding_system_enter_scope(a1[17]); if ( v17 ) { v16 = 0LL; v15 = arena_alloc(*a1, 128LL); if ( v15 ) { while ( 1 ) { v7 = 0; if ( !parser_check((long long)a1, 2) ) v7 = ~parser_is_at_end((long long)a1); if ( (v7 & 1) == 0 ) break; if ( v16 >= 0x10 ) { parser_error((long long)a1, (long long)"Too many parameters"); binding_system_exit_scope(a1[17]); return 0LL; } if ( (parser_match((long long)a1, 11) & 1) == 0 ) { parser_error((long long)a1, (long long)"Expected parameter name"); binding_system_exit_scope(a1[17]); return 0LL; } v14 = a1[15]; if ( !binding_system_add_binding(a1[17], v14, 0LL) ) { parser_error((long long)a1, (long long)"Failed to add binding for parameter"); binding_system_exit_scope(a1[17]); return 0LL; } v13 = parameter_create(*a1, v14, 0LL, a1[13], a1[14]); if ( !v13 ) { parser_error((long long)a1, (long long)"Failed to create parameter"); binding_system_exit_scope(a1[17]); return 0LL; } v3 = v16++; *(_QWORD *)(v15 + 8 * v3) = v13; } parser_consume((long long)a1, 2, (long long)"Expected ')' after parameter list"); v11 = 0LL; v10 = (long long *)arena_alloc(*a1, 128LL); if ( v10 ) { while ( 1 ) { v6 = 0; if ( !parser_check((long long)a1, 2) ) v6 = ~parser_is_at_end((long long)a1); if ( (v6 & 1) == 0 ) break; if ( v11 >= 0x10 ) { parser_error((long long)a1, (long long)"Too many expressions in function body"); binding_system_exit_scope(a1[17]); return 0LL; } v9 = parser_parse_expression((long long)a1); if ( !v9 ) { parser_error((long long)a1, (long long)"Expected expression"); binding_system_exit_scope(a1[17]); return 0LL; } v4 = v11++; v10[v4] = v9; } if ( v11 <= 1 ) { if ( v11 != 1 ) { parser_error((long long)a1, (long long)"Expected at least one expression in function body"); binding_system_exit_scope(a1[17]); return 0LL; } begin = *v10; } else { begin = ast_create_begin(*a1, v10, v11, a2, a3); } if ( begin ) { parser_consume((long long)a1, 2, (long long)"Expected ')' after lambda"); binding_system_exit_scope(a1[17]); lambda = ast_create_lambda(*a1, v15, v16, 0, begin, a2, a3); if ( lambda ) { *(_QWORD *)(lambda + 48) = v17; return lambda; } else { parser_error((long long)a1, (long long)"Failed to create lambda node"); return 0LL; } } else { parser_error((long long)a1, (long long)"Failed to create function body"); binding_system_exit_scope(a1[17]); return 0LL; } } else { parser_error((long long)a1, (long long)"Failed to allocate memory for body expressions"); binding_system_exit_scope(a1[17]); return 0LL; } } else { parser_error((long long)a1, (long long)"Failed to allocate memory for parameters"); binding_system_exit_scope(a1[17]); return 0LL; } } else { parser_error((long long)a1, (long long)"Failed to create scope for lambda"); return 0LL; } } else { parser_error((long long)a1, (long long)"Expected '(' before parameter list"); return 0LL; } }
parser_parse_lambda: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00108460 TEST AL,0x1 JNZ 0x00109666 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1116a8] CALL 0x00108770 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109666: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b1f0 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x0010969e MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1116cb] CALL 0x00108770 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_0010969e: MOV qword ptr [RBP + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x80 CALL 0x00103a90 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001096ef MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x111514] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_001096ef: JMP 0x001096f1 LAB_001096f1: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 CALL 0x001083f0 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RBP + -0x79],AL JNZ 0x00109719 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00108440 XOR AL,0xff MOV byte ptr [RBP + -0x79],AL LAB_00109719: MOV AL,byte ptr [RBP + -0x79] TEST AL,0x1 JNZ 0x00109725 JMP 0x0010986e LAB_00109725: CMP qword ptr [RBP + -0x30],0x10 JC 0x00109759 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x11153d] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109759: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xb CALL 0x00108460 TEST AL,0x1 JNZ 0x00109798 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x111551] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109798: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] MOV RSI,qword ptr [RBP + -0x40] XOR EDX,EDX CALL 0x0010b860 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x001097f2 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1116ed] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_001097f2: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x70] XOR EAX,EAX MOV EDX,EAX CALL 0x0010aec0 MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x50],0x0 JNZ 0x0010984e MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x111569] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_0010984e: MOV RDX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RAX + RCX*0x8],RDX JMP 0x001096f1 LAB_0010986e: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 LEA RDX,[0x111584] CALL 0x001084a0 MOV qword ptr [RBP + -0x58],0x0 MOV qword ptr [RBP + -0x60],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x80 CALL 0x00103a90 MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x68],0x0 JNZ 0x001098dc MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1115a6] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_001098dc: JMP 0x001098de LAB_001098de: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 CALL 0x001083f0 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RBP + -0x7a],AL JNZ 0x00109906 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00108440 XOR AL,0xff MOV byte ptr [RBP + -0x7a],AL LAB_00109906: MOV AL,byte ptr [RBP + -0x7a] TEST AL,0x1 JNZ 0x00109912 JMP 0x001099a7 LAB_00109912: CMP qword ptr [RBP + -0x60],0x10 JC 0x00109946 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1115d5] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109946: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00108830 MOV qword ptr [RBP + -0x70],RAX CMP qword ptr [RBP + -0x70],0x0 JNZ 0x00109987 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x111437] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109987: MOV RDX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RAX + RCX*0x8],RDX JMP 0x001098de LAB_001099a7: CMP qword ptr [RBP + -0x60],0x1 JBE 0x001099d0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] CALL 0x0010cba0 MOV qword ptr [RBP + -0x58],RAX JMP 0x00109a13 LAB_001099d0: CMP qword ptr [RBP + -0x60],0x1 JNZ 0x001099e4 MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX JMP 0x00109a11 LAB_001099e4: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1115fb] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109a11: JMP 0x00109a13 LAB_00109a13: CMP qword ptr [RBP + -0x58],0x0 JNZ 0x00109a47 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x11162d] CALL 0x00108770 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109a47: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 LEA RDX,[0x111711] CALL 0x001084a0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0010b610 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] XOR ECX,ECX MOV qword ptr [RSP],RAX CALL 0x0010ca70 MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x78],0x0 JNZ 0x00109ab7 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x11172b] CALL 0x00108770 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00109acb LAB_00109ab7: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x8],RAX LAB_00109acb: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
long parser_parse_lambda(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; uint uVar2; ulong uVar3; long lVar4; long lVar5; long *plVar6; long lVar7; byte local_82; byte local_81; ulong local_68; long local_60; ulong local_38; uVar3 = parser_match(param_1,1); if ((uVar3 & 1) == 0) { parser_error(param_1,"Expected \'(\' before parameter list"); } else { lVar4 = binding_system_enter_scope(param_1[0x11]); if (lVar4 == 0) { parser_error(param_1,"Failed to create scope for lambda"); } else { local_38 = 0; lVar5 = arena_alloc(*param_1,0x80); if (lVar5 == 0) { parser_error(param_1,"Failed to allocate memory for parameters"); binding_system_exit_scope(param_1[0x11]); } else { while( true ) { uVar2 = parser_check(param_1,2); local_81 = 0; if ((uVar2 & 1) == 0) { local_81 = parser_is_at_end(param_1); local_81 = local_81 ^ 0xff; } if ((local_81 & 1) == 0) { parser_consume(param_1,2,"Expected \')\' after parameter list"); local_68 = 0; plVar6 = (long *)arena_alloc(*param_1,0x80); if (plVar6 == (long *)0x0) { parser_error(param_1,"Failed to allocate memory for body expressions"); binding_system_exit_scope(param_1[0x11]); return 0; } while( true ) { uVar2 = parser_check(param_1,2); local_82 = 0; if ((uVar2 & 1) == 0) { local_82 = parser_is_at_end(param_1); local_82 = local_82 ^ 0xff; } if ((local_82 & 1) == 0) { if (local_68 < 2) { if (local_68 != 1) { parser_error(param_1,"Expected at least one expression in function body"); binding_system_exit_scope(param_1[0x11]); return 0; } local_60 = *plVar6; } else { local_60 = ast_create_begin(*param_1,plVar6,local_68,param_2,param_3); } if (local_60 == 0) { parser_error(param_1,"Failed to create function body"); binding_system_exit_scope(param_1[0x11]); return 0; } parser_consume(param_1,2,"Expected \')\' after lambda"); binding_system_exit_scope(param_1[0x11]); lVar5 = ast_create_lambda(*param_1,lVar5,local_38,0,local_60,param_2,param_3); if (lVar5 == 0) { parser_error(param_1,"Failed to create lambda node"); return 0; } *(long *)(lVar5 + 0x30) = lVar4; return lVar5; } if (0xf < local_68) { parser_error(param_1,"Too many expressions in function body"); binding_system_exit_scope(param_1[0x11]); return 0; } lVar7 = parser_parse_expression(param_1); if (lVar7 == 0) break; plVar6[local_68] = lVar7; local_68 = local_68 + 1; } parser_error(param_1,"Expected expression"); binding_system_exit_scope(param_1[0x11]); return 0; } if (0xf < local_38) { parser_error(param_1,"Too many parameters"); binding_system_exit_scope(param_1[0x11]); return 0; } uVar3 = parser_match(param_1,0xb); if ((uVar3 & 1) == 0) { parser_error(param_1,"Expected parameter name"); binding_system_exit_scope(param_1[0x11]); return 0; } uVar1 = param_1[0xf]; lVar7 = binding_system_add_binding(param_1[0x11],uVar1,0); if (lVar7 == 0) { parser_error(param_1,"Failed to add binding for parameter"); binding_system_exit_scope(param_1[0x11]); return 0; } lVar7 = parameter_create(*param_1,uVar1,0,param_1[0xd],param_1[0xe]); if (lVar7 == 0) break; *(long *)(lVar5 + local_38 * 8) = lVar7; local_38 = local_38 + 1; } parser_error(param_1,"Failed to create parameter"); binding_system_exit_scope(param_1[0x11]); } } } return 0; }
48,486
maria_lock_database
eloqsql/storage/maria/ma_locking.c
int maria_lock_database(MARIA_HA *info, int lock_type) { int error; uint count; MARIA_SHARE *share= info->s; DBUG_ENTER("maria_lock_database"); DBUG_PRINT("enter",("lock_type: %d old lock %d r_locks: %u w_locks: %u " "global_changed: %d open_count: %u name: '%s'", lock_type, info->lock_type, share->r_locks, share->w_locks, share->global_changed, share->state.open_count, share->index_file_name.str)); if (share->options & HA_OPTION_READ_ONLY_DATA || info->lock_type == lock_type) DBUG_RETURN(0); if (lock_type == F_EXTRA_LCK) /* Used by TMP tables */ { ++share->w_locks; ++share->tot_locks; info->lock_type= lock_type; DBUG_RETURN(0); } error=0; if (!info->intern_lock_locked) mysql_mutex_lock(&share->intern_lock); if (share->kfile.file >= 0) /* May only be false on windows */ { switch (lock_type) { case F_UNLCK: maria_ftparser_call_deinitializer(info); if (info->lock_type == F_RDLCK) { count= --share->r_locks; if (share->lock_restore_status) (*share->lock_restore_status)(info); } else { count= --share->w_locks; if (share->lock.update_status) _ma_update_status_with_lock(info); } --share->tot_locks; if (info->lock_type == F_WRLCK && !share->w_locks) { /* pages of transactional tables get flushed at Checkpoint */ if (!share->base.born_transactional && !share->temporary && _ma_flush_table_files(info, share->delay_key_write ? MARIA_FLUSH_DATA : MARIA_FLUSH_DATA | MARIA_FLUSH_INDEX, FLUSH_KEEP, FLUSH_KEEP)) error= my_errno; } if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { if (end_io_cache(&info->rec_cache)) { error= my_errno; _ma_set_fatal_error(info, error); } } if (!count) { DBUG_PRINT("info",("changed: %u w_locks: %u", (uint) share->changed, share->w_locks)); if (share->changed && !share->w_locks) { #ifdef HAVE_MMAP if ((share->mmaped_length != share->state.state.data_file_length) && (share->nonmmaped_inserts > MAX_NONMAPPED_INSERTS)) { if (share->lock_key_trees) mysql_rwlock_wrlock(&share->mmap_lock); _ma_remap_file(info, share->state.state.data_file_length); share->nonmmaped_inserts= 0; if (share->lock_key_trees) mysql_rwlock_unlock(&share->mmap_lock); } #endif #ifdef MARIA_EXTERNAL_LOCKING share->state.process= share->last_process=share->this_process; share->state.unique= info->last_unique= info->this_unique; share->state.update_count= info->last_loop= ++info->this_loop; #endif /* transactional tables rather flush their state at Checkpoint */ if (!share->base.born_transactional) { if (_ma_state_info_write_sub(share->kfile.file, &share->state, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET)) error= my_errno; else { /* A value of 0 means below means "state flushed" */ share->changed= 0; } } if (maria_flush) { if (_ma_sync_table_files(info)) error= my_errno; } else share->not_flushed=1; if (error) _ma_set_fatal_error(info, error); } } info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); info->lock_type= F_UNLCK; break; case F_RDLCK: if (info->lock_type == F_WRLCK) { /* Change RW to READONLY mysqld does not turn write locks to read locks, so we're never here in mysqld. */ share->w_locks--; share->r_locks++; info->lock_type=lock_type; break; } #ifdef MARIA_EXTERNAL_LOCKING if (!share->r_locks && !share->w_locks) { /* note that a transactional table should not do this */ if (_ma_state_info_read_dsk(share->kfile.file, &share->state)) { error=my_errno; break; } } #endif _ma_test_if_changed(info); share->r_locks++; share->tot_locks++; info->lock_type=lock_type; break; case F_WRLCK: if (info->lock_type == F_RDLCK) { /* Change READONLY to RW */ if (share->r_locks == 1) { share->r_locks--; share->w_locks++; info->lock_type=lock_type; break; } } #ifdef MARIA_EXTERNAL_LOCKING if (!(share->options & HA_OPTION_READ_ONLY_DATA)) { if (!share->w_locks) { if (!share->r_locks) { /* Note that transactional tables should not do this. If we enabled this code, we should make sure to skip it if born_transactional is true. We should not test now_transactional to decide if we can call _ma_state_info_read_dsk(), because it can temporarily be 0 (TRUNCATE on a partitioned table) and thus it would make a state modification below without mutex, confusing a concurrent checkpoint running. Even if this code was enabled only for non-transactional tables: in scenario LOCK TABLE t1 WRITE; INSERT INTO t1; DELETE FROM t1; state on disk read by DELETE is obsolete as it was not flushed at the end of INSERT. MyISAM same. It however causes no issue as maria_delete_all_rows() calls _ma_reset_status() thus is not influenced by the obsolete read values. */ if (_ma_state_info_read_dsk(share->kfile.file, &share->state)) { error=my_errno; break; } } } } #endif /* defined(MARIA_EXTERNAL_LOCKING) */ _ma_test_if_changed(info); info->lock_type=lock_type; info->invalidator=share->invalidator; share->w_locks++; share->tot_locks++; break; default: DBUG_ASSERT(0); break; /* Impossible */ } } #ifdef _WIN32 else { /* Check for bad file descriptors if this table is part of a merge union. Failing to capture this may cause a crash on windows if the table is renamed and later on referenced by the merge table. */ if( info->owned_by_merge && (info->s)->kfile.file < 0 ) { error = HA_ERR_NO_SUCH_TABLE; } } #endif if (!info->intern_lock_locked) mysql_mutex_unlock(&share->intern_lock); DBUG_RETURN(error); }
O3
c
maria_lock_database: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq (%rdi), %rbx xorl %r15d, %r15d testb $0x1, 0x722(%rbx) jne 0x45546 movl %esi, %r12d movq %rdi, %r14 cmpl %esi, 0x664(%rdi) je 0x45546 cmpl $-0x1, %r12d je 0x45395 cmpb $0x0, 0x680(%r14) jne 0x4532a leaq 0x8f0(%rbx), %rdi cmpq $0x0, 0x930(%rbx) jne 0x45647 callq 0x2a220 xorl %r15d, %r15d cmpl $0x0, 0x760(%rbx) js 0x4551d testl %r12d, %r12d je 0x453e4 cmpl $0x1, %r12d je 0x453b1 cmpl $0x2, %r12d jne 0x4551d movq %r14, %rdi callq 0x62865 cmpl $0x0, 0x664(%r14) je 0x4545a movl 0x7b0(%rbx), %r12d decl %r12d movl %r12d, 0x7b0(%rbx) cmpq $0x0, 0x8b0(%rbx) je 0x4547c movq %r14, %rdi callq 0x4600e jmp 0x4547c incl 0x7b0(%rbx) incl 0x7b8(%rbx) movl $0xffffffff, 0x664(%r14) # imm = 0xFFFFFFFF jmp 0x45546 cmpl $0x0, 0x664(%r14) jne 0x45408 cmpl $0x1, 0x7b4(%rbx) jne 0x45408 movl $0x0, 0x7b4(%rbx) incl 0x7b0(%rbx) movl $0x1, 0x664(%r14) jmp 0x4551d cmpl $0x1, 0x664(%r14) jne 0x45432 movq 0x7b0(%rbx), %xmm0 paddd 0x9ac92(%rip), %xmm0 # 0xe0090 movq %xmm0, 0x7b0(%rbx) jmp 0x4544a movl $0x1, 0x664(%r14) movq 0x6f0(%rbx), %rax movq %rax, 0x3e0(%r14) incl 0x7b0(%rbx) incl 0x7b8(%rbx) jmp 0x4551d movq 0x7b4(%rbx), %xmm0 pcmpeqd %xmm1, %xmm1 psubd %xmm1, %xmm0 movq %xmm0, 0x7b4(%rbx) movl $0x0, 0x664(%r14) jmp 0x4551d movl 0x7b4(%rbx), %r12d decl %r12d movl %r12d, 0x7b4(%rbx) movq 0x8e8(%rbx), %rax testq %rax, %rax je 0x4547c movq %r14, %rdi callq *%rax decl 0x7b8(%rbx) xorl %r15d, %r15d cmpl $0x1, 0x664(%r14) jne 0x454d8 cmpl $0x0, 0x7b0(%rbx) jne 0x454d8 cmpb $0x0, 0x44c(%rbx) jne 0x454d8 cmpb $0x0, 0x7d9(%rbx) jne 0x454d8 xorl %eax, %eax cmpb $0x0, 0x7e5(%rbx) sete %al leal 0x1(,%rax,2), %esi xorl %r15d, %r15d movq %r14, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0x423c8 testl %eax, %eax je 0x454d8 callq 0xa8156 movl (%rax), %r15d testb $0x12, 0x61c(%r14) je 0x45505 leaq 0x4b8(%r14), %rdi callq 0x99f67 testl %eax, %eax je 0x45505 callq 0xa8156 movl (%rax), %r15d movq %r14, %rdi movl %r15d, %esi callq 0x42bb4 testl %r12d, %r12d je 0x45552 andb $-0x13, 0x61c(%r14) movl $0x2, 0x664(%r14) cmpb $0x0, 0x680(%r14) jne 0x45546 movq 0x930(%rbx), %rdi addq $0x8f0, %rbx # imm = 0x8F0 testq %rdi, %rdi jne 0x4565d movq %rbx, %rdi callq 0x2a1e0 movl %r15d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpb $0x0, 0x7de(%rbx) je 0x4550a cmpl $0x0, 0x7b0(%rbx) jne 0x4550a movq 0x40(%rbx), %rsi cmpq %rsi, 0xa00(%rbx) je 0x455d0 cmpl $0x3e9, 0xa08(%rbx) # imm = 0x3E9 jb 0x455d0 cmpb $0x0, 0x7e3(%rbx) je 0x45596 leaq 0xb78(%rbx), %rdi callq 0x45687 movq 0x40(%rbx), %rsi movq %r14, %rdi callq 0x49a55 movl $0x0, 0xa08(%rbx) cmpb $0x0, 0x7e3(%rbx) je 0x455d0 leaq 0xb78(%rbx), %r12 movq 0xc08(%rbx), %rdi testq %rdi, %rdi jne 0x45672 movq %r12, %rdi callq 0xaab1a cmpb $0x0, 0x44c(%rbx) jne 0x45601 movl 0x760(%rbx), %edi movq %rbx, %rsi movl $0x1, %edx callq 0x6e1b6 testl %eax, %eax je 0x455fa callq 0xa8156 movl (%rax), %r15d jmp 0x45601 movb $0x0, 0x7de(%rbx) leaq 0x3c0240(%rip), %rax # 0x405848 cmpb $0x0, (%rax) je 0x45623 movq %r14, %rdi callq 0x425e2 testl %eax, %eax je 0x4562a callq 0xa8156 movl (%rax), %r15d jmp 0x4562a movb $0x1, 0x7e0(%rbx) testl %r15d, %r15d je 0x4563f movq %r14, %rdi movl %r15d, %esi callq 0x42bb4 jmp 0x4550a xorl %r15d, %r15d jmp 0x4550a leaq 0x9c672(%rip), %rsi # 0xe1cc0 movl $0x33, %edx callq 0x30603 jmp 0x4532a leaq 0x349bf4(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x160(%rax) jmp 0x4553e leaq 0x349bdf(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x168(%rax) jmp 0x455c8
maria_lock_database: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, [rdi] xor r15d, r15d test byte ptr [rbx+722h], 1 jnz loc_45546 mov r12d, esi mov r14, rdi cmp [rdi+664h], esi jz loc_45546 cmp r12d, 0FFFFFFFFh jz loc_45395 cmp byte ptr [r14+680h], 0 jnz short loc_4532A lea rdi, [rbx+8F0h] cmp qword ptr [rbx+930h], 0 jnz loc_45647 call _pthread_mutex_lock loc_4532A: xor r15d, r15d cmp dword ptr [rbx+760h], 0 js loc_4551D test r12d, r12d jz loc_453E4 cmp r12d, 1 jz short loc_453B1 cmp r12d, 2 jnz loc_4551D mov rdi, r14 call maria_ftparser_call_deinitializer cmp dword ptr [r14+664h], 0 jz loc_4545A mov r12d, [rbx+7B0h] dec r12d mov [rbx+7B0h], r12d cmp qword ptr [rbx+8B0h], 0 jz loc_4547C mov rdi, r14 call _ma_update_status_with_lock jmp loc_4547C loc_45395: inc dword ptr [rbx+7B0h] inc dword ptr [rbx+7B8h] mov dword ptr [r14+664h], 0FFFFFFFFh jmp loc_45546 loc_453B1: cmp dword ptr [r14+664h], 0 jnz short loc_45408 cmp dword ptr [rbx+7B4h], 1 jnz short loc_45408 mov dword ptr [rbx+7B4h], 0 inc dword ptr [rbx+7B0h] mov dword ptr [r14+664h], 1 jmp loc_4551D loc_453E4: cmp dword ptr [r14+664h], 1 jnz short loc_45432 movq xmm0, qword ptr [rbx+7B0h] paddd xmm0, cs:xmmword_E0090 movq qword ptr [rbx+7B0h], xmm0 jmp short loc_4544A loc_45408: mov dword ptr [r14+664h], 1 mov rax, [rbx+6F0h] mov [r14+3E0h], rax inc dword ptr [rbx+7B0h] inc dword ptr [rbx+7B8h] jmp loc_4551D loc_45432: movq xmm0, qword ptr [rbx+7B4h] pcmpeqd xmm1, xmm1 psubd xmm0, xmm1 movq qword ptr [rbx+7B4h], xmm0 loc_4544A: mov dword ptr [r14+664h], 0 jmp loc_4551D loc_4545A: mov r12d, [rbx+7B4h] dec r12d mov [rbx+7B4h], r12d mov rax, [rbx+8E8h] test rax, rax jz short loc_4547C mov rdi, r14 call rax loc_4547C: dec dword ptr [rbx+7B8h] xor r15d, r15d cmp dword ptr [r14+664h], 1 jnz short loc_454D8 cmp dword ptr [rbx+7B0h], 0 jnz short loc_454D8 cmp byte ptr [rbx+44Ch], 0 jnz short loc_454D8 cmp byte ptr [rbx+7D9h], 0 jnz short loc_454D8 xor eax, eax cmp byte ptr [rbx+7E5h], 0 setz al lea esi, ds:1[rax*2] xor r15d, r15d mov rdi, r14 xor edx, edx xor ecx, ecx call _ma_flush_table_files test eax, eax jz short loc_454D8 call _my_thread_var mov r15d, [rax] loc_454D8: test byte ptr [r14+61Ch], 12h jz short loc_45505 lea rdi, [r14+4B8h] call end_io_cache test eax, eax jz short loc_45505 call _my_thread_var mov r15d, [rax] mov rdi, r14 mov esi, r15d call _ma_set_fatal_error loc_45505: test r12d, r12d jz short loc_45552 loc_4550A: and byte ptr [r14+61Ch], 0EDh mov dword ptr [r14+664h], 2 loc_4551D: cmp byte ptr [r14+680h], 0 jnz short loc_45546 mov rdi, [rbx+930h] add rbx, 8F0h test rdi, rdi jnz loc_4565D loc_4553E: mov rdi, rbx call _pthread_mutex_unlock loc_45546: mov eax, r15d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_45552: cmp byte ptr [rbx+7DEh], 0 jz short loc_4550A cmp dword ptr [rbx+7B0h], 0 jnz short loc_4550A mov rsi, [rbx+40h] cmp [rbx+0A00h], rsi jz short loc_455D0 cmp dword ptr [rbx+0A08h], 3E9h jb short loc_455D0 cmp byte ptr [rbx+7E3h], 0 jz short loc_45596 lea rdi, [rbx+0B78h] call inline_mysql_rwlock_wrlock_0 mov rsi, [rbx+40h] loc_45596: mov rdi, r14 call _ma_remap_file mov dword ptr [rbx+0A08h], 0 cmp byte ptr [rbx+7E3h], 0 jz short loc_455D0 lea r12, [rbx+0B78h] mov rdi, [rbx+0C08h] test rdi, rdi jnz loc_45672 loc_455C8: mov rdi, r12 call my_rw_unlock loc_455D0: cmp byte ptr [rbx+44Ch], 0 jnz short loc_45601 mov edi, [rbx+760h] mov rsi, rbx mov edx, 1 call _ma_state_info_write_sub test eax, eax jz short loc_455FA call _my_thread_var mov r15d, [rax] jmp short loc_45601 loc_455FA: mov byte ptr [rbx+7DEh], 0 loc_45601: lea rax, maria_flush cmp byte ptr [rax], 0 jz short loc_45623 mov rdi, r14 call _ma_sync_table_files test eax, eax jz short loc_4562A call _my_thread_var mov r15d, [rax] jmp short loc_4562A loc_45623: mov byte ptr [rbx+7E0h], 1 loc_4562A: test r15d, r15d jz short loc_4563F mov rdi, r14 mov esi, r15d call _ma_set_fatal_error jmp loc_4550A loc_4563F: xor r15d, r15d jmp loc_4550A loc_45647: lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 33h ; '3' call psi_mutex_lock jmp loc_4532A loc_4565D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_4553E loc_45672: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_455C8
long long maria_lock_database(long long a1, int a2) { long long v2; // rbx unsigned int v3; // r15d long long v5; // rdi long long v6; // rdx long long v7; // rcx long long v8; // r8 int v9; // r9d int v10; // r12d void ( *v11)(long long); // rax long long v12; // rdx long long v13; // rcx long long v14; // r8 int v15; // r9d long long v16; // rdi long long v17; // rbx long long v19; // rsi long long v20; // rdi v2 = *(_QWORD *)a1; v3 = 0; if ( (*(_BYTE *)(*(_QWORD *)a1 + 1826LL) & 1) == 0 && *(_DWORD *)(a1 + 1636) != a2 ) { if ( a2 == -1 ) { ++*(_DWORD *)(v2 + 1968); ++*(_DWORD *)(v2 + 1976); *(_DWORD *)(a1 + 1636) = -1; } else { if ( !*(_BYTE *)(a1 + 1664) ) { v5 = v2 + 2288; if ( *(_QWORD *)(v2 + 2352) ) psi_mutex_lock(v5, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x33u); else pthread_mutex_lock(v5); } v3 = 0; if ( *(int *)(v2 + 1888) >= 0 ) { if ( a2 ) { if ( a2 == 1 ) { if ( *(_DWORD *)(a1 + 1636) || *(_DWORD *)(v2 + 1972) != 1 ) { *(_DWORD *)(a1 + 1636) = 1; *(_QWORD *)(a1 + 992) = *(_QWORD *)(v2 + 1776); ++*(_DWORD *)(v2 + 1968); ++*(_DWORD *)(v2 + 1976); } else { *(_DWORD *)(v2 + 1972) = 0; ++*(_DWORD *)(v2 + 1968); *(_DWORD *)(a1 + 1636) = 1; } } else if ( a2 == 2 ) { maria_ftparser_call_deinitializer(a1); if ( *(_DWORD *)(a1 + 1636) ) { v10 = *(_DWORD *)(v2 + 1968) - 1; *(_DWORD *)(v2 + 1968) = v10; if ( *(_QWORD *)(v2 + 2224) ) ma_update_status_with_lock(a1); } else { v10 = *(_DWORD *)(v2 + 1972) - 1; *(_DWORD *)(v2 + 1972) = v10; v11 = *(void ( **)(long long))(v2 + 2280); if ( v11 ) v11(a1); } --*(_DWORD *)(v2 + 1976); v3 = 0; if ( *(_DWORD *)(a1 + 1636) == 1 && !*(_DWORD *)(v2 + 1968) && !*(_BYTE *)(v2 + 1100) && !*(_BYTE *)(v2 + 2009) ) { v3 = 0; if ( (unsigned int)ma_flush_table_files((long long *)a1, 2 * (*(_BYTE *)(v2 + 2021) == 0) + 1, 0, 0) ) v3 = *(_DWORD *)my_thread_var(a1); } if ( (*(_BYTE *)(a1 + 1564) & 0x12) != 0 && (unsigned int)end_io_cache(a1 + 1208) ) { v3 = *(_DWORD *)my_thread_var(a1 + 1208); ma_set_fatal_error((_DWORD *)a1, v3, v12, v13, v14, v15); } if ( !v10 && *(_BYTE *)(v2 + 2014) && !*(_DWORD *)(v2 + 1968) ) { v19 = *(_QWORD *)(v2 + 64); if ( *(_QWORD *)(v2 + 2560) != v19 && *(_DWORD *)(v2 + 2568) >= 0x3E9u ) { if ( *(_BYTE *)(v2 + 2019) ) { inline_mysql_rwlock_wrlock_0(v2 + 2936); v19 = *(_QWORD *)(v2 + 64); } ma_remap_file(a1, v19); *(_DWORD *)(v2 + 2568) = 0; if ( *(_BYTE *)(v2 + 2019) ) { if ( *(_QWORD *)(v2 + 3080) ) PSI_server[45](); my_rw_unlock(v2 + 2936); } } if ( !*(_BYTE *)(v2 + 1100) ) { v20 = *(unsigned int *)(v2 + 1888); if ( (unsigned int)ma_state_info_write_sub(v20, v2, 1LL) ) v3 = *(_DWORD *)my_thread_var(v20); else *(_BYTE *)(v2 + 2014) = 0; } if ( maria_flush ) { if ( ma_sync_table_files((_DWORD *)a1) ) v3 = *(_DWORD *)my_thread_var(a1); } else { *(_BYTE *)(v2 + 2016) = 1; } if ( v3 ) ma_set_fatal_error((_DWORD *)a1, v3, v6, v7, v8, v9); else v3 = 0; } *(_BYTE *)(a1 + 1564) &= 0xEDu; *(_DWORD *)(a1 + 1636) = 2; } } else { if ( *(_DWORD *)(a1 + 1636) == 1 ) *(_QWORD *)(v2 + 1968) = _mm_add_epi32( _mm_loadl_epi64((const __m128i *)(v2 + 1968)), (__m128i)xmmword_E0090).m128i_u64[0]; else *(_QWORD *)(v2 + 1972) = _mm_sub_epi32(_mm_loadl_epi64((const __m128i *)(v2 + 1972)), (__m128i)-1LL).m128i_u64[0]; *(_DWORD *)(a1 + 1636) = 0; } } if ( !*(_BYTE *)(a1 + 1664) ) { v16 = *(_QWORD *)(v2 + 2352); v17 = v2 + 2288; if ( v16 ) PSI_server[44](); pthread_mutex_unlock(v17); } } } return v3; }
maria_lock_database: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,qword ptr [RDI] XOR R15D,R15D TEST byte ptr [RBX + 0x722],0x1 JNZ 0x00145546 MOV R12D,ESI MOV R14,RDI CMP dword ptr [RDI + 0x664],ESI JZ 0x00145546 CMP R12D,-0x1 JZ 0x00145395 CMP byte ptr [R14 + 0x680],0x0 JNZ 0x0014532a LEA RDI,[RBX + 0x8f0] CMP qword ptr [RBX + 0x930],0x0 JNZ 0x00145647 CALL 0x0012a220 LAB_0014532a: XOR R15D,R15D CMP dword ptr [RBX + 0x760],0x0 JS 0x0014551d TEST R12D,R12D JZ 0x001453e4 CMP R12D,0x1 JZ 0x001453b1 CMP R12D,0x2 JNZ 0x0014551d MOV RDI,R14 CALL 0x00162865 CMP dword ptr [R14 + 0x664],0x0 JZ 0x0014545a MOV R12D,dword ptr [RBX + 0x7b0] DEC R12D MOV dword ptr [RBX + 0x7b0],R12D CMP qword ptr [RBX + 0x8b0],0x0 JZ 0x0014547c MOV RDI,R14 CALL 0x0014600e JMP 0x0014547c LAB_00145395: INC dword ptr [RBX + 0x7b0] INC dword ptr [RBX + 0x7b8] MOV dword ptr [R14 + 0x664],0xffffffff JMP 0x00145546 LAB_001453b1: CMP dword ptr [R14 + 0x664],0x0 JNZ 0x00145408 CMP dword ptr [RBX + 0x7b4],0x1 JNZ 0x00145408 MOV dword ptr [RBX + 0x7b4],0x0 INC dword ptr [RBX + 0x7b0] MOV dword ptr [R14 + 0x664],0x1 JMP 0x0014551d LAB_001453e4: CMP dword ptr [R14 + 0x664],0x1 JNZ 0x00145432 MOVQ XMM0,qword ptr [RBX + 0x7b0] PADDD XMM0,xmmword ptr [0x001e0090] MOVQ qword ptr [RBX + 0x7b0],XMM0 JMP 0x0014544a LAB_00145408: MOV dword ptr [R14 + 0x664],0x1 MOV RAX,qword ptr [RBX + 0x6f0] MOV qword ptr [R14 + 0x3e0],RAX INC dword ptr [RBX + 0x7b0] INC dword ptr [RBX + 0x7b8] JMP 0x0014551d LAB_00145432: MOVQ XMM0,qword ptr [RBX + 0x7b4] PCMPEQD XMM1,XMM1 PSUBD XMM0,XMM1 MOVQ qword ptr [RBX + 0x7b4],XMM0 LAB_0014544a: MOV dword ptr [R14 + 0x664],0x0 JMP 0x0014551d LAB_0014545a: MOV R12D,dword ptr [RBX + 0x7b4] DEC R12D MOV dword ptr [RBX + 0x7b4],R12D MOV RAX,qword ptr [RBX + 0x8e8] TEST RAX,RAX JZ 0x0014547c MOV RDI,R14 CALL RAX LAB_0014547c: DEC dword ptr [RBX + 0x7b8] XOR R15D,R15D CMP dword ptr [R14 + 0x664],0x1 JNZ 0x001454d8 CMP dword ptr [RBX + 0x7b0],0x0 JNZ 0x001454d8 CMP byte ptr [RBX + 0x44c],0x0 JNZ 0x001454d8 CMP byte ptr [RBX + 0x7d9],0x0 JNZ 0x001454d8 XOR EAX,EAX CMP byte ptr [RBX + 0x7e5],0x0 SETZ AL LEA ESI,[0x1 + RAX*0x2] XOR R15D,R15D MOV RDI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x001423c8 TEST EAX,EAX JZ 0x001454d8 CALL 0x001a8156 MOV R15D,dword ptr [RAX] LAB_001454d8: TEST byte ptr [R14 + 0x61c],0x12 JZ 0x00145505 LEA RDI,[R14 + 0x4b8] CALL 0x00199f67 TEST EAX,EAX JZ 0x00145505 CALL 0x001a8156 MOV R15D,dword ptr [RAX] MOV RDI,R14 MOV ESI,R15D CALL 0x00142bb4 LAB_00145505: TEST R12D,R12D JZ 0x00145552 LAB_0014550a: AND byte ptr [R14 + 0x61c],0xed MOV dword ptr [R14 + 0x664],0x2 LAB_0014551d: CMP byte ptr [R14 + 0x680],0x0 JNZ 0x00145546 MOV RDI,qword ptr [RBX + 0x930] ADD RBX,0x8f0 TEST RDI,RDI JNZ 0x0014565d LAB_0014553e: MOV RDI,RBX CALL 0x0012a1e0 LAB_00145546: MOV EAX,R15D POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00145552: CMP byte ptr [RBX + 0x7de],0x0 JZ 0x0014550a CMP dword ptr [RBX + 0x7b0],0x0 JNZ 0x0014550a MOV RSI,qword ptr [RBX + 0x40] CMP qword ptr [RBX + 0xa00],RSI JZ 0x001455d0 CMP dword ptr [RBX + 0xa08],0x3e9 JC 0x001455d0 CMP byte ptr [RBX + 0x7e3],0x0 JZ 0x00145596 LEA RDI,[RBX + 0xb78] CALL 0x00145687 MOV RSI,qword ptr [RBX + 0x40] LAB_00145596: MOV RDI,R14 CALL 0x00149a55 MOV dword ptr [RBX + 0xa08],0x0 CMP byte ptr [RBX + 0x7e3],0x0 JZ 0x001455d0 LEA R12,[RBX + 0xb78] MOV RDI,qword ptr [RBX + 0xc08] TEST RDI,RDI JNZ 0x00145672 LAB_001455c8: MOV RDI,R12 CALL 0x001aab1a LAB_001455d0: CMP byte ptr [RBX + 0x44c],0x0 JNZ 0x00145601 MOV EDI,dword ptr [RBX + 0x760] MOV RSI,RBX MOV EDX,0x1 CALL 0x0016e1b6 TEST EAX,EAX JZ 0x001455fa CALL 0x001a8156 MOV R15D,dword ptr [RAX] JMP 0x00145601 LAB_001455fa: MOV byte ptr [RBX + 0x7de],0x0 LAB_00145601: LEA RAX,[0x505848] CMP byte ptr [RAX],0x0 JZ 0x00145623 MOV RDI,R14 CALL 0x001425e2 TEST EAX,EAX JZ 0x0014562a CALL 0x001a8156 MOV R15D,dword ptr [RAX] JMP 0x0014562a LAB_00145623: MOV byte ptr [RBX + 0x7e0],0x1 LAB_0014562a: TEST R15D,R15D JZ 0x0014563f MOV RDI,R14 MOV ESI,R15D CALL 0x00142bb4 JMP 0x0014550a LAB_0014563f: XOR R15D,R15D JMP 0x0014550a LAB_00145647: LEA RSI,[0x1e1cc0] MOV EDX,0x33 CALL 0x00130603 JMP 0x0014532a LAB_0014565d: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014553e LAB_00145672: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x001455c8
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int maria_lock_database(long *param_1,int param_2) { long lVar1; int iVar2; int *piVar3; long lVar4; int iVar5; int iVar6; lVar1 = *param_1; iVar6 = 0; if (((*(byte *)(lVar1 + 0x722) & 1) == 0) && (iVar6 = 0, *(int *)((long)param_1 + 0x664) != param_2)) { if (param_2 == -1) { *(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1; *(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + 1; *(int4 *)((long)param_1 + 0x664) = 0xffffffff; } else { if ((char)param_1[0xd0] == '\0') { if (*(long *)(lVar1 + 0x930) == 0) { pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 0x8f0)); } else { psi_mutex_lock((pthread_mutex_t *)(lVar1 + 0x8f0), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",0x33) ; } } iVar5 = 0; iVar6 = 0; if (-1 < *(int *)(lVar1 + 0x760)) { iVar6 = iVar5; if (param_2 == 0) { if (*(int *)((long)param_1 + 0x664) == 1) { *(ulong *)(lVar1 + 0x7b0) = CONCAT44((int)((ulong)*(int8 *)(lVar1 + 0x7b0) >> 0x20) + _UNK_001e0094, (int)*(int8 *)(lVar1 + 0x7b0) + _DAT_001e0090); } else { *(ulong *)(lVar1 + 0x7b4) = CONCAT44((int)((ulong)*(int8 *)(lVar1 + 0x7b4) >> 0x20) + 1, (int)*(int8 *)(lVar1 + 0x7b4) + 1); } *(int4 *)((long)param_1 + 0x664) = 0; } else if (param_2 == 1) { if ((*(int *)((long)param_1 + 0x664) == 0) && (*(int *)(lVar1 + 0x7b4) == 1)) { *(int4 *)(lVar1 + 0x7b4) = 0; *(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1; *(int4 *)((long)param_1 + 0x664) = 1; } else { *(int4 *)((long)param_1 + 0x664) = 1; param_1[0x7c] = *(long *)(lVar1 + 0x6f0); *(int *)(lVar1 + 0x7b0) = *(int *)(lVar1 + 0x7b0) + 1; *(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + 1; } } else if (param_2 == 2) { maria_ftparser_call_deinitializer(param_1); if (*(int *)((long)param_1 + 0x664) == 0) { iVar5 = *(int *)(lVar1 + 0x7b4) + -1; *(int *)(lVar1 + 0x7b4) = iVar5; if (*(code **)(lVar1 + 0x8e8) != (code *)0x0) { (**(code **)(lVar1 + 0x8e8))(param_1); } } else { iVar5 = *(int *)(lVar1 + 0x7b0) + -1; *(int *)(lVar1 + 0x7b0) = iVar5; if (*(long *)(lVar1 + 0x8b0) != 0) { _ma_update_status_with_lock(param_1); } } *(int *)(lVar1 + 0x7b8) = *(int *)(lVar1 + 0x7b8) + -1; iVar2 = 0; iVar6 = 0; if ((((*(int *)((long)param_1 + 0x664) == 1) && (iVar6 = iVar2, *(int *)(lVar1 + 0x7b0) == 0)) && (*(char *)(lVar1 + 0x44c) == '\0')) && (*(char *)(lVar1 + 0x7d9) == '\0')) { iVar6 = 0; iVar2 = _ma_flush_table_files (param_1,(*(char *)(lVar1 + 0x7e5) == '\0') * '\x02' + '\x01',0,0); if (iVar2 != 0) { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; } } if ((*(byte *)((long)param_1 + 0x61c) & 0x12) != 0) { iVar2 = end_io_cache(param_1 + 0x97); if (iVar2 != 0) { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; _ma_set_fatal_error(param_1,iVar6); } } if (((iVar5 == 0) && (*(char *)(lVar1 + 0x7de) != '\0')) && (*(int *)(lVar1 + 0x7b0) == 0) ) { lVar4 = *(long *)(lVar1 + 0x40); if ((*(long *)(lVar1 + 0xa00) != lVar4) && (1000 < *(uint *)(lVar1 + 0xa08))) { if (*(char *)(lVar1 + 0x7e3) != '\0') { inline_mysql_rwlock_wrlock(lVar1 + 0xb78); lVar4 = *(long *)(lVar1 + 0x40); } _ma_remap_file(param_1,lVar4); *(int4 *)(lVar1 + 0xa08) = 0; if (*(char *)(lVar1 + 0x7e3) != '\0') { if (*(long *)(lVar1 + 0xc08) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar1 + 0xb78); } } if (*(char *)(lVar1 + 0x44c) == '\0') { iVar5 = _ma_state_info_write_sub(*(int4 *)(lVar1 + 0x760),lVar1,1); if (iVar5 == 0) { *(int1 *)(lVar1 + 0x7de) = 0; } else { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; } } if (maria_flush == '\0') { *(int1 *)(lVar1 + 0x7e0) = 1; } else { iVar5 = _ma_sync_table_files(param_1); if (iVar5 != 0) { piVar3 = (int *)_my_thread_var(); iVar6 = *piVar3; } } if (iVar6 == 0) { iVar6 = 0; } else { _ma_set_fatal_error(param_1,iVar6); } } *(byte *)((long)param_1 + 0x61c) = *(byte *)((long)param_1 + 0x61c) & 0xed; *(int4 *)((long)param_1 + 0x664) = 2; } } if ((char)param_1[0xd0] == '\0') { if (*(long *)(lVar1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x8f0)); } } } return iVar6; }
48,487
ma_trid_from_key
eloqsql/storage/maria/ma_search.c
TrID _ma_trid_from_key(const MARIA_KEY *key) { if (!(key->flag & (SEARCH_PAGE_KEY_HAS_TRANSID | SEARCH_USER_KEY_HAS_TRANSID))) return 0; return transid_get_packed(key->keyinfo->share, key->data + key->data_length + key->keyinfo->share->rec_reflength); }
O0
c
ma_trid_from_key: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x18(%rax), %eax andl $0x180000, %eax # imm = 0x180000 cmpl $0x0, %eax jne 0x97b47 movq $0x0, -0x8(%rbp) jmp 0x97b80 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x10(%rax), %eax addq %rax, %rsi movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rax movl 0x740(%rax), %eax addq %rax, %rsi callq 0x48b90 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_trid_from_key: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax+18h] and eax, 180000h cmp eax, 0 jnz short loc_97B47 mov [rbp+var_8], 0 jmp short loc_97B80 loc_97B47: mov rax, [rbp+var_10] mov rax, [rax+8] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+10h] add rsi, rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax] mov eax, [rax+740h] add rsi, rax call transid_get_packed mov [rbp+var_8], rax loc_97B80: mov rax, [rbp+var_8] add rsp, 10h pop rbp retn
unsigned long long ma_trid_from_key(long long a1) { if ( (*(_DWORD *)(a1 + 24) & 0x180000) != 0 ) return transid_get_packed( **(_QWORD **)(a1 + 8), (unsigned __int8 *)(*(unsigned int *)(**(_QWORD **)(a1 + 8) + 1856LL) + *(unsigned int *)(a1 + 16) + *(_QWORD *)a1)); else return 0LL; }
_ma_trid_from_key: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0x180000 CMP EAX,0x0 JNZ 0x00197b47 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00197b80 LAB_00197b47: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x740] ADD RSI,RAX CALL 0x00148b90 MOV qword ptr [RBP + -0x8],RAX LAB_00197b80: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
int8 _ma_trid_from_key(long *param_1) { int8 local_10; if ((*(uint *)(param_1 + 3) & 0x180000) == 0) { local_10 = 0; } else { local_10 = transid_get_packed(*(int8 *)param_1[1], *param_1 + (ulong)*(uint *)(param_1 + 2) + (ulong)*(uint *)(*(long *)param_1[1] + 0x740)); } return local_10; }
48,488
ma_put_key_in_record
eloqsql/storage/maria/ma_key.c
static int _ma_put_key_in_record(register MARIA_HA *info, uint keynr, my_bool unpack_blobs, uchar *record) { reg2 uchar *key; uchar *pos,*key_end; reg1 HA_KEYSEG *keyseg; uchar *blob_ptr; DBUG_ENTER("_ma_put_key_in_record"); blob_ptr= info->lastkey_buff2; /* Place to put blob parts */ key= info->last_key.data; /* Key that was read */ key_end= key + info->last_key.data_length; for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++) { if (keyseg->null_bit) { if (!*key++) { record[keyseg->null_pos]|= keyseg->null_bit; continue; } record[keyseg->null_pos]&= ~keyseg->null_bit; } if (keyseg->type == HA_KEYTYPE_BIT) { uint length= keyseg->length; if (keyseg->bit_length) { uchar bits= *key++; set_rec_bits(bits, record + keyseg->bit_pos, keyseg->bit_start, keyseg->bit_length); length--; } else { clr_rec_bits(record + keyseg->bit_pos, keyseg->bit_start, keyseg->bit_length); } memcpy(record + keyseg->start, key, length); key+= length; continue; } if (keyseg->flag & HA_SPACE_PACK) { uint length; get_key_length(length,key); #ifdef CHECK_KEYS if (length > keyseg->length || key+length > key_end) goto err; #endif pos= record+keyseg->start; if (keyseg->type != (int) HA_KEYTYPE_NUM) { memcpy(pos,key,(size_t) length); my_ci_fill(keyseg->charset, (char*) pos + length, keyseg->length - length, ' '); } else { bfill(pos,keyseg->length-length,' '); memcpy(pos+keyseg->length-length,key,(size_t) length); } key+=length; continue; } if (keyseg->flag & HA_VAR_LENGTH_PART) { uint length; get_key_length(length,key); #ifdef CHECK_KEYS if (length > keyseg->length || key+length > key_end) goto err; #endif /* Store key length */ if (keyseg->bit_start == 1) *(uchar*) (record+keyseg->start)= (uchar) length; else int2store(record+keyseg->start, length); /* And key data */ memcpy(record+keyseg->start + keyseg->bit_start, key, length); key+= length; } else if (keyseg->flag & HA_BLOB_PART) { uint length; get_key_length(length,key); #ifdef CHECK_KEYS if (length > keyseg->length || key+length > key_end) goto err; #endif if (unpack_blobs) { memcpy(record+keyseg->start+keyseg->bit_start, &blob_ptr, sizeof(char*)); memcpy(blob_ptr,key,length); blob_ptr+=length; /* The above changed info->lastkey2. Inform maria_rnext_same(). */ info->update&= ~HA_STATE_RNEXT_SAME; _ma_store_blob_length(record+keyseg->start, (uint) keyseg->bit_start,length); } key+=length; } else if (keyseg->flag & HA_SWAP_KEY) { uchar *to= record+keyseg->start+keyseg->length; uchar *end= key+keyseg->length; #ifdef CHECK_KEYS if (end > key_end) goto err; #endif do { *--to= *key++; } while (key != end); continue; } else { #ifdef CHECK_KEYS if (key+keyseg->length > key_end) goto err; #endif memcpy(record+keyseg->start, key, (size_t) keyseg->length); key+= keyseg->length; } } DBUG_RETURN(0); err: DBUG_PRINT("info",("error")); DBUG_RETURN(1); /* Crashed row */ }
O3
c
ma_put_key_in_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r12 movl %edx, -0x44(%rbp) movq (%rdi), %rax movq 0x570(%rax), %rax movl %esi, %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 movq 0xc0(%rax,%rcx), %r15 movb 0x18(%r15), %cl testb %cl, %cl je 0x37837 movq 0x200(%rdi), %r13 movl 0x210(%rdi), %eax addq %r13, %rax movq %rax, -0x40(%rbp) leaq 0x18(%r15), %rax movq %rdi, -0x60(%rbp) movq 0x390(%rdi), %rdx movq %rdx, -0x50(%rbp) leaq -0x1(%r12), %rdx movq %rdx, -0x58(%rbp) movq %r12, -0x30(%rbp) movb 0x19(%r15), %dl testb %dl, %dl je 0x374e9 leaq 0x1(%r13), %rbx cmpb $0x0, (%r13) je 0x375bb notb %dl movl 0xc(%r15), %ecx andb %dl, (%r12,%rcx) movb (%rax), %cl movq %rbx, %r13 cmpb $0x13, %cl jne 0x3756b movzwl 0x14(%r15), %esi movzbl 0x1b(%r15), %eax testl %eax, %eax je 0x375dc movzbl (%r13), %edi movzwl 0x10(%r15), %r8d movzbl 0x1a(%r15), %edx movl $0xffffffff, %r9d # imm = 0xFFFFFFFF movl %eax, %ecx shll %cl, %r9d notl %r9d movl %edx, %ecx shll %cl, %r9d movzbl (%r12,%r8), %ecx notl %r9d andl %ecx, %r9d movl %edi, %r10d movl %edx, %ecx shll %cl, %r10d orl %r9d, %r10d movb %r10b, (%r12,%r8) addl %edx, %eax cmpl $0x9, %eax jb 0x37561 movzbl 0x1(%r12,%r8), %r9d addb $-0x8, %al movl %eax, %ecx shrl %cl, %r9d shll %cl, %r9d movb $0x8, %cl subb %dl, %cl shrl %cl, %edi orl %r9d, %edi movb %dil, 0x1(%r12,%r8) incq %r13 decl %esi jmp 0x375fa movzwl 0x12(%r15), %eax testb $0x1, %al jne 0x375c8 testb $0x8, %al jne 0x3761a testb $0x20, %al jne 0x376d8 movzwl 0x14(%r15), %edx leaq (%rdx,%r13), %rcx testb $0x40, %al jne 0x37767 cmpq -0x40(%rbp), %rcx ja 0x37848 movl 0x8(%r15), %edi addq %r12, %rdi movq %r13, %rsi callq 0x29080 movzwl 0x14(%r15), %ebx addq %r13, %rbx jmp 0x3781a movl 0xc(%r15), %eax orb %dl, (%r12,%rax) jmp 0x3781a movzbl (%r13), %edi cmpl $0xff, %edi je 0x37635 movl $0x1, %esi jmp 0x37646 movzbl 0x1a(%r15), %ecx cmpl $0x9, %ecx jb 0x375fa addb $-0x8, %cl movl $0xffffffff, %eax # imm = 0xFFFFFFFF shll %cl, %eax movzwl 0x10(%r15), %ecx andb %al, 0x1(%r12,%rcx) movl 0x8(%r15), %edi addq %r12, %rdi movl %esi, %r14d movq %r13, %rsi movq %r14, %rdx callq 0x29080 addq %r14, %r13 movq %r13, %rbx jmp 0x3781a movzbl (%r13), %ecx cmpl $0xff, %ecx je 0x376f3 movl $0x1, %edx jmp 0x37704 movzwl 0x1(%r13), %eax rolw $0x8, %ax movzwl %ax, %edi movl $0x3, %esi movzwl 0x14(%r15), %edx movl $0x1, %eax subl %edi, %edx jb 0x37839 addq %rsi, %r13 movl %edi, %r14d leaq (%r14,%r13), %rbx cmpq -0x40(%rbp), %rbx ja 0x37839 movl 0x8(%r15), %r12d addq -0x30(%rbp), %r12 cmpb $0x7, %cl jne 0x3769e movq %r12, %rdi movl $0x20, %esi callq 0x292c0 movzwl 0x14(%r15), %edi addq %r12, %rdi subq %r14, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x29080 jmp 0x376cf movl %edi, -0x34(%rbp) movq %r12, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x29080 movq (%r15), %rdi addq %r14, %r12 movzwl 0x14(%r15), %edx subl -0x34(%rbp), %edx movq 0xb8(%rdi), %rax movq %r12, %rsi movl $0x20, %ecx callq *0x78(%rax) movq -0x30(%rbp), %r12 jmp 0x3781a movzbl (%r13), %esi cmpl $0xff, %esi je 0x3778d movl $0x1, %ecx jmp 0x3779e movzwl 0x1(%r13), %eax rolw $0x8, %ax movzwl %ax, %ecx movl $0x3, %edx movzwl 0x14(%r15), %esi movl $0x1, %eax cmpl %esi, %ecx ja 0x37839 addq %rdx, %r13 movl %ecx, %edx leaq (%rdx,%r13), %rbx cmpq -0x40(%rbp), %rbx ja 0x37839 cmpb $0x1, 0x1a(%r15) jne 0x3773e movl 0x8(%r15), %eax movq -0x30(%rbp), %r12 movb %cl, (%r12,%rax) jmp 0x3774b movl 0x8(%r15), %eax movq -0x30(%rbp), %r12 movw %cx, (%r12,%rax) movl 0x8(%r15), %eax addq %r12, %rax movzbl 0x1a(%r15), %edi addq %rax, %rdi movq %r13, %rsi callq 0x29080 jmp 0x3781a cmpq -0x40(%rbp), %rcx ja 0x37848 movl 0x8(%r15), %eax addq -0x58(%rbp), %rax movb (%r13), %cl incq %r13 movb %cl, (%rax,%rdx) decq %rdx jne 0x37779 jmp 0x37612 movzwl 0x1(%r13), %eax rolw $0x8, %ax movzwl %ax, %esi movl $0x3, %ecx movzwl 0x14(%r15), %edx movl $0x1, %eax cmpl %edx, %esi ja 0x37839 addq %rcx, %r13 movl %esi, %r12d leaq (%r12,%r13), %rbx cmpq -0x40(%rbp), %rbx ja 0x37839 cmpb $0x0, -0x44(%rbp) je 0x376cf movl 0x8(%r15), %eax addq -0x30(%rbp), %rax movzbl 0x1a(%r15), %ecx movq -0x50(%rbp), %r14 movq %r14, (%rcx,%rax) movq %r14, %rdi movl %esi, -0x34(%rbp) movq %r13, %rsi movq %r12, %rdx callq 0x29080 movq -0x60(%rbp), %rax andb $-0x11, 0x625(%rax) addq %r12, %r14 movq %r14, -0x50(%rbp) movq -0x30(%rbp), %r12 movl 0x8(%r15), %edi addq %r12, %rdi movzbl 0x1a(%r15), %esi movl -0x34(%rbp), %edx callq 0x3e722 leaq 0x20(%r15), %rdx movb 0x38(%r15), %cl addq $0x38, %r15 movq %r15, %rax movq %rbx, %r13 movq %rdx, %r15 testb %cl, %cl jne 0x374c3 xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %eax jmp 0x37839
_ma_put_key_in_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rcx mov [rbp+var_44], edx mov rax, [rdi] mov rax, [rax+570h] mov ecx, esi imul rcx, 118h mov r15, [rax+rcx+0C0h] mov cl, [r15+18h] test cl, cl jz loc_37837 mov r13, [rdi+200h] mov eax, [rdi+210h] add rax, r13 mov [rbp+var_40], rax lea rax, [r15+18h] mov [rbp+var_60], rdi mov rdx, [rdi+390h] mov [rbp+var_50], rdx lea rdx, [r12-1] mov [rbp+var_58], rdx mov [rbp+var_30], r12 loc_374C3: mov dl, [r15+19h] test dl, dl jz short loc_374E9 lea rbx, [r13+1] cmp byte ptr [r13+0], 0 jz loc_375BB not dl mov ecx, [r15+0Ch] and [r12+rcx], dl mov cl, [rax] mov r13, rbx loc_374E9: cmp cl, 13h jnz short loc_3756B movzx esi, word ptr [r15+14h] movzx eax, byte ptr [r15+1Bh] test eax, eax jz loc_375DC movzx edi, byte ptr [r13+0] movzx r8d, word ptr [r15+10h] movzx edx, byte ptr [r15+1Ah] mov r9d, 0FFFFFFFFh mov ecx, eax shl r9d, cl not r9d mov ecx, edx shl r9d, cl movzx ecx, byte ptr [r12+r8] not r9d and r9d, ecx mov r10d, edi mov ecx, edx shl r10d, cl or r10d, r9d mov [r12+r8], r10b add eax, edx cmp eax, 9 jb short loc_37561 movzx r9d, byte ptr [r12+r8+1] add al, 0F8h mov ecx, eax shr r9d, cl shl r9d, cl mov cl, 8 sub cl, dl shr edi, cl or edi, r9d mov [r12+r8+1], dil loc_37561: inc r13 dec esi jmp loc_375FA loc_3756B: movzx eax, word ptr [r15+12h] test al, 1 jnz short loc_375C8 test al, 8 jnz loc_3761A test al, 20h jnz loc_376D8 movzx edx, word ptr [r15+14h] lea rcx, [rdx+r13] test al, 40h jnz loc_37767 cmp rcx, [rbp+var_40] ja loc_37848 mov edi, [r15+8] add rdi, r12 mov rsi, r13 call _memcpy movzx ebx, word ptr [r15+14h] add rbx, r13 jmp loc_3781A loc_375BB: mov eax, [r15+0Ch] or [r12+rax], dl jmp loc_3781A loc_375C8: movzx edi, byte ptr [r13+0] cmp edi, 0FFh jz short loc_37635 mov esi, 1 jmp short loc_37646 loc_375DC: movzx ecx, byte ptr [r15+1Ah] cmp ecx, 9 jb short loc_375FA add cl, 0F8h mov eax, 0FFFFFFFFh shl eax, cl movzx ecx, word ptr [r15+10h] and [r12+rcx+1], al loc_375FA: mov edi, [r15+8] add rdi, r12 mov r14d, esi mov rsi, r13 mov rdx, r14 call _memcpy add r13, r14 loc_37612: mov rbx, r13 jmp loc_3781A loc_3761A: movzx ecx, byte ptr [r13+0] cmp ecx, 0FFh jz loc_376F3 mov edx, 1 jmp loc_37704 loc_37635: movzx eax, word ptr [r13+1] rol ax, 8 movzx edi, ax mov esi, 3 loc_37646: movzx edx, word ptr [r15+14h] mov eax, 1 sub edx, edi jb loc_37839 add r13, rsi mov r14d, edi lea rbx, [r14+r13] cmp rbx, [rbp+var_40] ja loc_37839 mov r12d, [r15+8] add r12, [rbp+var_30] cmp cl, 7 jnz short loc_3769E mov rdi, r12 mov esi, 20h ; ' ' call _memset movzx edi, word ptr [r15+14h] add rdi, r12 sub rdi, r14 mov rsi, r13 mov rdx, r14 call _memcpy jmp short loc_376CF loc_3769E: mov [rbp+var_34], edi mov rdi, r12 mov rsi, r13 mov rdx, r14 call _memcpy mov rdi, [r15] add r12, r14 movzx edx, word ptr [r15+14h] sub edx, [rbp+var_34] mov rax, [rdi+0B8h] mov rsi, r12 mov ecx, 20h ; ' ' call qword ptr [rax+78h] loc_376CF: mov r12, [rbp+var_30] jmp loc_3781A loc_376D8: movzx esi, byte ptr [r13+0] cmp esi, 0FFh jz loc_3778D mov ecx, 1 jmp loc_3779E loc_376F3: movzx eax, word ptr [r13+1] rol ax, 8 movzx ecx, ax mov edx, 3 loc_37704: movzx esi, word ptr [r15+14h] mov eax, 1 cmp ecx, esi ja loc_37839 add r13, rdx mov edx, ecx lea rbx, [rdx+r13] cmp rbx, [rbp+var_40] ja loc_37839 cmp byte ptr [r15+1Ah], 1 jnz short loc_3773E mov eax, [r15+8] mov r12, [rbp+var_30] mov [r12+rax], cl jmp short loc_3774B loc_3773E: mov eax, [r15+8] mov r12, [rbp+var_30] mov [r12+rax], cx loc_3774B: mov eax, [r15+8] add rax, r12 movzx edi, byte ptr [r15+1Ah] add rdi, rax mov rsi, r13 call _memcpy jmp loc_3781A loc_37767: cmp rcx, [rbp+var_40] ja loc_37848 mov eax, [r15+8] add rax, [rbp+var_58] loc_37779: mov cl, [r13+0] inc r13 mov [rax+rdx], cl dec rdx jnz short loc_37779 jmp loc_37612 loc_3778D: movzx eax, word ptr [r13+1] rol ax, 8 movzx esi, ax mov ecx, 3 loc_3779E: movzx edx, word ptr [r15+14h] mov eax, 1 cmp esi, edx ja loc_37839 add r13, rcx mov r12d, esi lea rbx, [r12+r13] cmp rbx, [rbp+var_40] ja short loc_37839 cmp byte ptr [rbp+var_44], 0 jz loc_376CF mov eax, [r15+8] add rax, [rbp+var_30] movzx ecx, byte ptr [r15+1Ah] mov r14, [rbp+var_50] mov [rcx+rax], r14 mov rdi, r14 mov [rbp+var_34], esi mov rsi, r13 mov rdx, r12 call _memcpy mov rax, [rbp+var_60] and byte ptr [rax+625h], 0EFh add r14, r12 mov [rbp+var_50], r14 mov r12, [rbp+var_30] mov edi, [r15+8] add rdi, r12 movzx esi, byte ptr [r15+1Ah] mov edx, [rbp+var_34] call _ma_store_blob_length loc_3781A: lea rdx, [r15+20h] mov cl, [r15+38h] add r15, 38h ; '8' mov rax, r15 mov r13, rbx mov r15, rdx test cl, cl jnz loc_374C3 loc_37837: xor eax, eax loc_37839: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_37848: mov eax, 1 jmp short loc_37839
long long ma_put_key_in_record(long long a1, unsigned int a2, char a3, long long a4) { _QWORD *v5; // r15 char v6; // cl unsigned __int8 *v7; // r13 char *v8; // rax char v9; // dl unsigned __int8 *v10; // rbx unsigned int v11; // esi int v12; // eax unsigned int v13; // edi long long v14; // r8 int v15; // edx unsigned int v16; // eax __int16 v17; // ax long long v18; // rdx unsigned __int8 *v19; // rcx unsigned int v20; // edi long long v21; // rsi unsigned int v22; // ecx unsigned int v23; // ecx long long v24; // rdx unsigned int v25; // edx long long result; // rax bool v27; // cf long long v28; // rdx unsigned __int8 *v29; // r13 long long v30; // r12 unsigned int v31; // esi long long v32; // rcx unsigned __int8 *v33; // r13 long long v34; // rax char v35; // cl unsigned __int8 *v36; // r13 long long v38; // [rsp+8h] [rbp-58h] long long v39; // [rsp+10h] [rbp-50h] unsigned __int8 *v41; // [rsp+20h] [rbp-40h] long long v42; // [rsp+30h] [rbp-30h] v5 = *(_QWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 280LL * a2 + 192); v6 = *((_BYTE *)v5 + 24); if ( v6 ) { v7 = *(unsigned __int8 **)(a1 + 512); v41 = &v7[*(unsigned int *)(a1 + 528)]; v8 = (char *)(v5 + 3); v39 = *(_QWORD *)(a1 + 912); v38 = a4 - 1; v42 = a4; do { v9 = *((_BYTE *)v5 + 25); if ( v9 ) { v10 = v7 + 1; if ( !*v7 ) { *(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) |= v9; goto LABEL_51; } *(_BYTE *)(a4 + *((unsigned int *)v5 + 3)) &= ~v9; v6 = *v8; ++v7; } if ( v6 == 19 ) { v11 = *((unsigned __int16 *)v5 + 10); v12 = *((unsigned __int8 *)v5 + 27); if ( *((_BYTE *)v5 + 27) ) { v13 = *v7; v14 = *((unsigned __int16 *)v5 + 8); v15 = *((unsigned __int8 *)v5 + 26); *(_BYTE *)(a4 + v14) = *(_BYTE *)(a4 + v14) & ~(~(-1 << v12) << *((_BYTE *)v5 + 26)) | (*v7 << *((_BYTE *)v5 + 26)); v16 = v15 + v12; if ( v16 >= 9 ) *(_BYTE *)(a4 + v14 + 1) = (*(unsigned __int8 *)(a4 + v14 + 1) >> (v16 - 8) << (v16 - 8)) | (v13 >> (8 - v15)); ++v7; --v11; } else { v22 = *((unsigned __int8 *)v5 + 26); if ( v22 >= 9 ) *(_BYTE *)(a4 + *((unsigned __int16 *)v5 + 8) + 1) &= -1 << (v22 - 8); } memcpy(a4 + *((unsigned int *)v5 + 2), v7, v11); v7 += v11; LABEL_23: v10 = v7; goto LABEL_51; } v17 = *((_WORD *)v5 + 9); if ( (v17 & 1) != 0 ) { v20 = *v7; if ( v20 == 255 ) { v20 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8); v21 = 3LL; } else { v21 = 1LL; } v25 = *((unsigned __int16 *)v5 + 10); result = 1LL; v27 = v25 < v20; v28 = v25 - v20; if ( v27 ) return result; v29 = &v7[v21]; v10 = &v29[v20]; if ( v10 > v41 ) return result; v30 = v42 + *((unsigned int *)v5 + 2); if ( v6 == 7 ) { memset(v42 + *((unsigned int *)v5 + 2), 32LL, v28); memcpy(v30 + *((unsigned __int16 *)v5 + 10) - v20, v29, v20); } else { memcpy(v30, v29, v20); (*(void ( **)(_QWORD, long long, _QWORD, long long))(*(_QWORD *)(*v5 + 184LL) + 120LL))( *v5, v20 + v30, *((unsigned __int16 *)v5 + 10) - v20, 32LL); } LABEL_32: a4 = v42; goto LABEL_51; } if ( (v17 & 8) != 0 ) { v23 = *v7; if ( v23 == 255 ) { v23 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8); v24 = 3LL; } else { v24 = 1LL; } result = 1LL; if ( v23 > *((unsigned __int16 *)v5 + 10) ) return result; v33 = &v7[v24]; v10 = &v33[v23]; if ( v10 > v41 ) return result; a4 = v42; if ( *((_BYTE *)v5 + 26) == 1 ) *(_BYTE *)(v42 + *((unsigned int *)v5 + 2)) = v23; else *(_WORD *)(v42 + *((unsigned int *)v5 + 2)) = v23; memcpy(v42 + *((unsigned int *)v5 + 2) + *((unsigned __int8 *)v5 + 26), v33, v23); } else { if ( (v17 & 0x20) != 0 ) { v31 = *v7; if ( v31 == 255 ) { v31 = (unsigned __int16)__ROL2__(*(_WORD *)(v7 + 1), 8); v32 = 3LL; } else { v32 = 1LL; } result = 1LL; if ( v31 > *((unsigned __int16 *)v5 + 10) ) return result; v36 = &v7[v32]; v10 = &v36[v31]; if ( v10 > v41 ) return result; if ( a3 ) { *(_QWORD *)(*((unsigned __int8 *)v5 + 26) + v42 + *((unsigned int *)v5 + 2)) = v39; memcpy(v39, v36, v31); *(_BYTE *)(a1 + 1573) &= ~0x10u; v39 += v31; a4 = v42; ma_store_blob_length(v42 + *((unsigned int *)v5 + 2), *((unsigned __int8 *)v5 + 26), v31); goto LABEL_51; } goto LABEL_32; } v18 = *((unsigned __int16 *)v5 + 10); v19 = &v7[v18]; if ( (v17 & 0x40) != 0 ) { if ( v19 > v41 ) return 1LL; v34 = v38 + *((unsigned int *)v5 + 2); do { v35 = *v7++; *(_BYTE *)(v34 + v18--) = v35; } while ( v18 ); goto LABEL_23; } if ( v19 > v41 ) return 1LL; memcpy(a4 + *((unsigned int *)v5 + 2), v7, v18); v10 = &v7[*((unsigned __int16 *)v5 + 10)]; } LABEL_51: v6 = *((_BYTE *)v5 + 56); v8 = (char *)(v5 + 7); v7 = v10; v5 += 4; } while ( v6 ); } return 0LL; }
_ma_put_key_in_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RCX MOV dword ptr [RBP + -0x44],EDX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,ESI IMUL RCX,RCX,0x118 MOV R15,qword ptr [RAX + RCX*0x1 + 0xc0] MOV CL,byte ptr [R15 + 0x18] TEST CL,CL JZ 0x00137837 MOV R13,qword ptr [RDI + 0x200] MOV EAX,dword ptr [RDI + 0x210] ADD RAX,R13 MOV qword ptr [RBP + -0x40],RAX LEA RAX,[R15 + 0x18] MOV qword ptr [RBP + -0x60],RDI MOV RDX,qword ptr [RDI + 0x390] MOV qword ptr [RBP + -0x50],RDX LEA RDX,[R12 + -0x1] MOV qword ptr [RBP + -0x58],RDX MOV qword ptr [RBP + -0x30],R12 LAB_001374c3: MOV DL,byte ptr [R15 + 0x19] TEST DL,DL JZ 0x001374e9 LEA RBX,[R13 + 0x1] CMP byte ptr [R13],0x0 JZ 0x001375bb NOT DL MOV ECX,dword ptr [R15 + 0xc] AND byte ptr [R12 + RCX*0x1],DL MOV CL,byte ptr [RAX] MOV R13,RBX LAB_001374e9: CMP CL,0x13 JNZ 0x0013756b MOVZX ESI,word ptr [R15 + 0x14] MOVZX EAX,byte ptr [R15 + 0x1b] TEST EAX,EAX JZ 0x001375dc MOVZX EDI,byte ptr [R13] MOVZX R8D,word ptr [R15 + 0x10] MOVZX EDX,byte ptr [R15 + 0x1a] MOV R9D,0xffffffff MOV ECX,EAX SHL R9D,CL NOT R9D MOV ECX,EDX SHL R9D,CL MOVZX ECX,byte ptr [R12 + R8*0x1] NOT R9D AND R9D,ECX MOV R10D,EDI MOV ECX,EDX SHL R10D,CL OR R10D,R9D MOV byte ptr [R12 + R8*0x1],R10B ADD EAX,EDX CMP EAX,0x9 JC 0x00137561 MOVZX R9D,byte ptr [R12 + R8*0x1 + 0x1] ADD AL,0xf8 MOV ECX,EAX SHR R9D,CL SHL R9D,CL MOV CL,0x8 SUB CL,DL SHR EDI,CL OR EDI,R9D MOV byte ptr [R12 + R8*0x1 + 0x1],DIL LAB_00137561: INC R13 DEC ESI JMP 0x001375fa LAB_0013756b: MOVZX EAX,word ptr [R15 + 0x12] TEST AL,0x1 JNZ 0x001375c8 TEST AL,0x8 JNZ 0x0013761a TEST AL,0x20 JNZ 0x001376d8 MOVZX EDX,word ptr [R15 + 0x14] LEA RCX,[RDX + R13*0x1] TEST AL,0x40 JNZ 0x00137767 CMP RCX,qword ptr [RBP + -0x40] JA 0x00137848 MOV EDI,dword ptr [R15 + 0x8] ADD RDI,R12 MOV RSI,R13 CALL 0x00129080 MOVZX EBX,word ptr [R15 + 0x14] ADD RBX,R13 JMP 0x0013781a LAB_001375bb: MOV EAX,dword ptr [R15 + 0xc] OR byte ptr [R12 + RAX*0x1],DL JMP 0x0013781a LAB_001375c8: MOVZX EDI,byte ptr [R13] CMP EDI,0xff JZ 0x00137635 MOV ESI,0x1 JMP 0x00137646 LAB_001375dc: MOVZX ECX,byte ptr [R15 + 0x1a] CMP ECX,0x9 JC 0x001375fa ADD CL,0xf8 MOV EAX,0xffffffff SHL EAX,CL MOVZX ECX,word ptr [R15 + 0x10] AND byte ptr [R12 + RCX*0x1 + 0x1],AL LAB_001375fa: MOV EDI,dword ptr [R15 + 0x8] ADD RDI,R12 MOV R14D,ESI MOV RSI,R13 MOV RDX,R14 CALL 0x00129080 ADD R13,R14 LAB_00137612: MOV RBX,R13 JMP 0x0013781a LAB_0013761a: MOVZX ECX,byte ptr [R13] CMP ECX,0xff JZ 0x001376f3 MOV EDX,0x1 JMP 0x00137704 LAB_00137635: MOVZX EAX,word ptr [R13 + 0x1] ROL AX,0x8 MOVZX EDI,AX MOV ESI,0x3 LAB_00137646: MOVZX EDX,word ptr [R15 + 0x14] MOV EAX,0x1 SUB EDX,EDI JC 0x00137839 ADD R13,RSI MOV R14D,EDI LEA RBX,[R14 + R13*0x1] CMP RBX,qword ptr [RBP + -0x40] JA 0x00137839 MOV R12D,dword ptr [R15 + 0x8] ADD R12,qword ptr [RBP + -0x30] CMP CL,0x7 JNZ 0x0013769e MOV RDI,R12 MOV ESI,0x20 CALL 0x001292c0 MOVZX EDI,word ptr [R15 + 0x14] ADD RDI,R12 SUB RDI,R14 MOV RSI,R13 MOV RDX,R14 CALL 0x00129080 JMP 0x001376cf LAB_0013769e: MOV dword ptr [RBP + -0x34],EDI MOV RDI,R12 MOV RSI,R13 MOV RDX,R14 CALL 0x00129080 MOV RDI,qword ptr [R15] ADD R12,R14 MOVZX EDX,word ptr [R15 + 0x14] SUB EDX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R12 MOV ECX,0x20 CALL qword ptr [RAX + 0x78] LAB_001376cf: MOV R12,qword ptr [RBP + -0x30] JMP 0x0013781a LAB_001376d8: MOVZX ESI,byte ptr [R13] CMP ESI,0xff JZ 0x0013778d MOV ECX,0x1 JMP 0x0013779e LAB_001376f3: MOVZX EAX,word ptr [R13 + 0x1] ROL AX,0x8 MOVZX ECX,AX MOV EDX,0x3 LAB_00137704: MOVZX ESI,word ptr [R15 + 0x14] MOV EAX,0x1 CMP ECX,ESI JA 0x00137839 ADD R13,RDX MOV EDX,ECX LEA RBX,[RDX + R13*0x1] CMP RBX,qword ptr [RBP + -0x40] JA 0x00137839 CMP byte ptr [R15 + 0x1a],0x1 JNZ 0x0013773e MOV EAX,dword ptr [R15 + 0x8] MOV R12,qword ptr [RBP + -0x30] MOV byte ptr [R12 + RAX*0x1],CL JMP 0x0013774b LAB_0013773e: MOV EAX,dword ptr [R15 + 0x8] MOV R12,qword ptr [RBP + -0x30] MOV word ptr [R12 + RAX*0x1],CX LAB_0013774b: MOV EAX,dword ptr [R15 + 0x8] ADD RAX,R12 MOVZX EDI,byte ptr [R15 + 0x1a] ADD RDI,RAX MOV RSI,R13 CALL 0x00129080 JMP 0x0013781a LAB_00137767: CMP RCX,qword ptr [RBP + -0x40] JA 0x00137848 MOV EAX,dword ptr [R15 + 0x8] ADD RAX,qword ptr [RBP + -0x58] LAB_00137779: MOV CL,byte ptr [R13] INC R13 MOV byte ptr [RAX + RDX*0x1],CL DEC RDX JNZ 0x00137779 JMP 0x00137612 LAB_0013778d: MOVZX EAX,word ptr [R13 + 0x1] ROL AX,0x8 MOVZX ESI,AX MOV ECX,0x3 LAB_0013779e: MOVZX EDX,word ptr [R15 + 0x14] MOV EAX,0x1 CMP ESI,EDX JA 0x00137839 ADD R13,RCX MOV R12D,ESI LEA RBX,[R12 + R13*0x1] CMP RBX,qword ptr [RBP + -0x40] JA 0x00137839 CMP byte ptr [RBP + -0x44],0x0 JZ 0x001376cf MOV EAX,dword ptr [R15 + 0x8] ADD RAX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [R15 + 0x1a] MOV R14,qword ptr [RBP + -0x50] MOV qword ptr [RCX + RAX*0x1],R14 MOV RDI,R14 MOV dword ptr [RBP + -0x34],ESI MOV RSI,R13 MOV RDX,R12 CALL 0x00129080 MOV RAX,qword ptr [RBP + -0x60] AND byte ptr [RAX + 0x625],0xef ADD R14,R12 MOV qword ptr [RBP + -0x50],R14 MOV R12,qword ptr [RBP + -0x30] MOV EDI,dword ptr [R15 + 0x8] ADD RDI,R12 MOVZX ESI,byte ptr [R15 + 0x1a] MOV EDX,dword ptr [RBP + -0x34] CALL 0x0013e722 LAB_0013781a: LEA RDX,[R15 + 0x20] MOV CL,byte ptr [R15 + 0x38] ADD R15,0x38 MOV RAX,R15 MOV R13,RBX MOV R15,RDX TEST CL,CL JNZ 0x001374c3 LAB_00137837: XOR EAX,EAX LAB_00137839: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00137848: MOV EAX,0x1 JMP 0x00137839
int8 _ma_put_key_in_record(long *param_1,ulong param_2,char param_3,long param_4) { byte bVar1; byte bVar2; ushort uVar3; byte bVar4; byte *pbVar5; long *plVar6; char cVar7; long lVar8; ulong uVar9; uint uVar10; void *__dest; byte *__src; byte *pbVar11; long *plVar12; void *local_58; plVar12 = *(long **)(*(long *)(*param_1 + 0x570) + 0xc0 + (param_2 & 0xffffffff) * 0x118); cVar7 = (char)plVar12[3]; if (cVar7 != '\0') { pbVar5 = (byte *)param_1[0x40] + *(uint *)(param_1 + 0x42); plVar6 = plVar12 + 3; local_58 = (void *)param_1[0x72]; pbVar11 = (byte *)param_1[0x40]; do { bVar4 = *(byte *)((long)plVar12 + 0x19); __src = pbVar11; if (bVar4 == 0) { LAB_001374e9: if (cVar7 == '\x13') { uVar3 = *(ushort *)((long)plVar12 + 0x14); uVar10 = (uint)uVar3; bVar4 = *(byte *)((long)plVar12 + 0x1b); if (bVar4 == 0) { if (8 < *(byte *)((long)plVar12 + 0x1a)) { pbVar11 = (byte *)(param_4 + 1 + (ulong)*(ushort *)(plVar12 + 2)); *pbVar11 = *pbVar11 & (byte)(-1 << (*(byte *)((long)plVar12 + 0x1a) - 8 & 0x1f)); } } else { bVar1 = *__src; uVar9 = (ulong)*(ushort *)(plVar12 + 2); bVar2 = *(byte *)((long)plVar12 + 0x1a); *(byte *)(param_4 + uVar9) = bVar1 << (bVar2 & 0x1f) | ~(byte)(~(-1 << (bVar4 & 0x1f)) << (bVar2 & 0x1f)) & *(byte *)(param_4 + uVar9); if (8 < (uint)bVar4 + (uint)bVar2) { bVar4 = (char)((uint)bVar4 + (uint)bVar2) - 8; *(byte *)(param_4 + 1 + uVar9) = bVar1 >> (8 - bVar2 & 0x1f) | (*(byte *)(param_4 + 1 + uVar9) >> (bVar4 & 0x1f)) << (bVar4 & 0x1f); } __src = __src + 1; uVar10 = uVar3 - 1; } memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,(ulong)uVar10); __src = __src + uVar10; } else { uVar3 = *(ushort *)((long)plVar12 + 0x12); if ((uVar3 & 1) == 0) { if ((uVar3 & 8) == 0) { if ((uVar3 & 0x20) == 0) { uVar9 = (ulong)*(ushort *)((long)plVar12 + 0x14); if ((uVar3 & 0x40) == 0) { if (pbVar5 < __src + uVar9) { return 1; } memcpy((void *)((ulong)*(uint *)(plVar12 + 1) + param_4),__src,uVar9); __src = __src + *(ushort *)((long)plVar12 + 0x14); } else { if (pbVar5 < __src + uVar9) { return 1; } uVar10 = *(uint *)(plVar12 + 1); do { bVar4 = *__src; __src = __src + 1; *(byte *)((ulong)uVar10 + param_4 + -1 + uVar9) = bVar4; uVar9 = uVar9 - 1; } while (uVar9 != 0); } } else { uVar10 = (uint)*__src; if (*__src == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8) ; lVar8 = 3; } else { lVar8 = 1; } if (*(ushort *)((long)plVar12 + 0x14) < uVar10) { return 1; } pbVar11 = __src + lVar8; uVar9 = (ulong)uVar10; __src = pbVar11 + uVar9; if (pbVar5 < __src) { return 1; } if (param_3 != '\0') { *(void **)((ulong)*(byte *)((long)plVar12 + 0x1a) + (ulong)*(uint *)(plVar12 + 1) + param_4) = local_58; memcpy(local_58,pbVar11,uVar9); *(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) & 0xef; local_58 = (void *)((long)local_58 + uVar9); _ma_store_blob_length ((ulong)*(uint *)(plVar12 + 1) + param_4, *(int1 *)((long)plVar12 + 0x1a),uVar10); } } } else { uVar10 = (uint)*__src; if (*__src == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); lVar8 = 3; } else { lVar8 = 1; } if (*(ushort *)((long)plVar12 + 0x14) < uVar10) { return 1; } pbVar11 = __src + lVar8; __src = pbVar11 + uVar10; if (pbVar5 < __src) { return 1; } if (*(char *)((long)plVar12 + 0x1a) == '\x01') { *(char *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (char)uVar10; } else { *(short *)(param_4 + (ulong)*(uint *)(plVar12 + 1)) = (short)uVar10; } memcpy((void *)((ulong)*(byte *)((long)plVar12 + 0x1a) + (ulong)*(uint *)(plVar12 + 1) + param_4),pbVar11,(ulong)uVar10); } } else { uVar10 = (uint)*__src; if (*__src == 0xff) { uVar10 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); lVar8 = 3; } else { lVar8 = 1; } if (*(ushort *)((long)plVar12 + 0x14) < uVar10) { return 1; } pbVar11 = __src + lVar8; uVar9 = (ulong)uVar10; __src = pbVar11 + uVar9; if (pbVar5 < __src) { return 1; } __dest = (void *)((ulong)*(uint *)(plVar12 + 1) + param_4); if (cVar7 == '\a') { memset(__dest,0x20,(ulong)(*(ushort *)((long)plVar12 + 0x14) - uVar10)); memcpy((void *)((long)__dest + (*(ushort *)((long)plVar12 + 0x14) - uVar9)),pbVar11, uVar9); } else { memcpy(__dest,pbVar11,uVar9); (**(code **)(*(long *)(*plVar12 + 0xb8) + 0x78)) (*plVar12,(long)__dest + uVar9,*(ushort *)((long)plVar12 + 0x14) - uVar10, 0x20); } } } } else { __src = pbVar11 + 1; if (*pbVar11 != 0) { pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc)); *pbVar11 = *pbVar11 & ~bVar4; cVar7 = (char)*plVar6; goto LAB_001374e9; } pbVar11 = (byte *)(param_4 + (ulong)*(uint *)((long)plVar12 + 0xc)); *pbVar11 = *pbVar11 | bVar4; } cVar7 = (char)plVar12[7]; plVar6 = plVar12 + 7; pbVar11 = __src; plVar12 = plVar12 + 4; } while (cVar7 != '\0'); } return 0; }
48,489
cli_report_progress
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static int cli_report_progress(MYSQL *mysql, uchar *packet, uint length) { uint stage, max_stage, proc_length; double progress; uchar *start= packet; if (length < 5) return 1; /* Wrong packet */ if (!(mysql->options.extension && mysql->options.extension->report_progress)) return 0; /* No callback, ignore packet */ packet++; /* Ignore number of strings */ stage= (uint) *packet++; max_stage= (uint) *packet++; progress= uint3korr(packet)/1000.0; packet+= 3; proc_length= net_field_length(&packet); if (packet + proc_length > start + length) return 1; /* Wrong packet */ (*mysql->options.extension->report_progress)(mysql, stage, max_stage, progress, (char*) packet, proc_length); return 0; }
O0
c
cli_report_progress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) cmpl $0x5, -0x1c(%rbp) jae 0x1a85d movl $0x1, -0x4(%rbp) jmp 0x1a950 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x1a880 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x80(%rax) jne 0x1a88c movl $0x0, -0x4(%rbp) jmp 0x1a950 movq -0x18(%rbp), %rax incq %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rcx movzwl (%rcx), %eax movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax cvtsi2sd %eax, %xmm0 movsd 0x39195(%rip), %xmm1 # 0x53a70 divsd %xmm1, %xmm0 movsd %xmm0, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x3, %rax movq %rax, -0x18(%rbp) leaq -0x18(%rbp), %rdi callq 0x1a960 movl %eax, -0x28(%rbp) movq -0x18(%rbp), %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq -0x38(%rbp), %rcx movl -0x1c(%rbp), %edx addq %rdx, %rcx cmpq %rcx, %rax jbe 0x1a91e movl $0x1, -0x4(%rbp) jmp 0x1a950 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movsd -0x30(%rbp), %xmm0 movq -0x18(%rbp), %rcx movl -0x28(%rbp), %r8d callq *%rax movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
cli_report_progress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov [rbp+var_38], rax cmp [rbp+var_1C], 5 jnb short loc_1A85D mov [rbp+var_4], 1 jmp loc_1A950 loc_1A85D: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_1A880 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+80h], 0 jnz short loc_1A88C loc_1A880: mov [rbp+var_4], 0 jmp loc_1A950 loc_1A88C: mov rax, [rbp+var_18] inc rax mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_20], eax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_24], eax mov rcx, [rbp+var_18] movzx eax, word ptr [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx cvtsi2sd xmm0, eax movsd xmm1, cs:qword_53A70 divsd xmm0, xmm1 movsd [rbp+var_30], xmm0 mov rax, [rbp+var_18] add rax, 3 mov [rbp+var_18], rax lea rdi, [rbp+var_18] call net_field_length mov [rbp+var_28], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_28] add rax, rcx mov rcx, [rbp+var_38] mov edx, [rbp+var_1C] add rcx, rdx cmp rax, rcx jbe short loc_1A91E mov [rbp+var_4], 1 jmp short loc_1A950 loc_1A91E: mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+80h] mov rdi, [rbp+var_10] mov esi, [rbp+var_20] mov edx, [rbp+var_24] movsd xmm0, [rbp+var_30] mov rcx, [rbp+var_18] mov r8d, [rbp+var_28] call rax mov [rbp+var_4], 0 loc_1A950: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long cli_report_progress(long long a1, unsigned __int16 *a2, unsigned int a3) { unsigned __int16 *v3; // rax unsigned __int16 *v4; // rax double v6; // [rsp+10h] [rbp-30h] unsigned int v7; // [rsp+18h] [rbp-28h] unsigned int v8; // [rsp+1Ch] [rbp-24h] unsigned int v9; // [rsp+20h] [rbp-20h] unsigned __int16 *v11; // [rsp+28h] [rbp-18h] BYREF long long v12; // [rsp+30h] [rbp-10h] v12 = a1; v11 = a2; if ( a3 >= 5 ) { if ( *(_QWORD *)(v12 + 1152) && *(_QWORD *)(*(_QWORD *)(v12 + 1152) + 128LL) ) { v11 = (unsigned __int16 *)((char *)v11 + 1); v3 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v9 = *(unsigned __int8 *)v3; v4 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v8 = *(unsigned __int8 *)v4; v6 = (double)((*((unsigned __int8 *)v11 + 2) << 16) | (unsigned int)*v11) / 1000.0; v11 = (unsigned __int16 *)((char *)v11 + 3); v7 = net_field_length(&v11); if ( (char *)v11 + v7 <= (char *)a2 + a3 ) { (*(void ( **)(long long, _QWORD, _QWORD, unsigned __int16 *, _QWORD, double))(*(_QWORD *)(v12 + 1152) + 128LL))( v12, v9, v8, v11, v7, v6); return 0; } else { return 1; } } else { return 0; } } else { return 1; } }
cli_report_progress: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX CMP dword ptr [RBP + -0x1c],0x5 JNC 0x0011a85d MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011a950 LAB_0011a85d: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0011a880 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x80],0x0 JNZ 0x0011a88c LAB_0011a880: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0011a950 LAB_0011a88c: MOV RAX,qword ptr [RBP + -0x18] INC RAX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX CVTSI2SD XMM0,EAX MOVSD XMM1,qword ptr [0x00153a70] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x30],XMM0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x18] CALL 0x0011a960 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x1c] ADD RCX,RDX CMP RAX,RCX JBE 0x0011a91e MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011a950 LAB_0011a91e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOVSD XMM0,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOV R8D,dword ptr [RBP + -0x28] CALL RAX MOV dword ptr [RBP + -0x4],0x0 LAB_0011a950: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 cli_report_progress(long param_1,long param_2,uint param_3) { int1 uVar1; int1 uVar2; uint uVar3; double dVar4; long local_20; long local_18; int4 local_c; if (param_3 < 5) { local_c = 1; } else if ((*(long *)(param_1 + 0x480) == 0) || (*(long *)(*(long *)(param_1 + 0x480) + 0x80) == 0)) { local_c = 0; } else { uVar1 = *(int1 *)(param_2 + 1); uVar2 = *(int1 *)(param_2 + 2); dVar4 = (double)*(uint3 *)(param_2 + 3) / DAT_00153a70; local_20 = param_2 + 6; local_18 = param_1; uVar3 = net_field_length(&local_20); if (param_2 + (ulong)param_3 < local_20 + (ulong)uVar3) { local_c = 1; } else { (**(code **)(*(long *)(local_18 + 0x480) + 0x80))(dVar4,local_18,uVar1,uVar2,local_20,uVar3); local_c = 0; } } return local_c; }
48,490
mi_dpointer
eloqsql/storage/myisam/mi_search.c
void _mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos) { if (!(info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) && pos != HA_OFFSET_ERROR) pos/=info->s->base.pack_reclength; switch (info->s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: mi_int8store(buff,pos); break; case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 8: *buff++=0; /* fall through */ 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; default: abort(); /* Impossible */ } }
O0
c
mi_dpointer: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x318(%rax), %rax andq $0x5, %rax cmpq $0x0, %rax jne 0xc8441 cmpq $-0x1, -0x18(%rbp) je 0xc8441 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rcx movq -0x18(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x338(%rax), %eax addl $-0x2, %eax movl %eax, %ecx movq %rcx, -0x88(%rbp) subl $0x6, %eax ja 0xc8728 movq -0x88(%rbp), %rax leaq 0x98e8f(%rip), %rcx # 0x161300 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 -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x30(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x30(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x30(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x7(%rax) movq -0x38(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x38(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x38(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) jmp 0xc872d 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, 0x6(%rax) movq -0x40(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x40(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x40(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x48(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x48(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x48(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc872d movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x58(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x58(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc872d movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x60(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x60(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x60(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x68(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc872d movq -0x18(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x70(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x70(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x70(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc872d movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x78(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x78(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc872d movq -0x18(%rbp), %rax movl %eax, -0x7c(%rbp) movl -0x7c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movl -0x7c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc872d callq 0x29570 addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_dpointer: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+318h] and rax, 5 cmp rax, 0 jnz short loc_C8441 cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jz short loc_C8441 mov rax, [rbp+var_8] mov rax, [rax] mov rcx, [rax+148h] mov rax, [rbp+var_18] xor edx, edx div rcx mov [rbp+var_18], rax loc_C8441: mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+338h] add eax, 0FFFFFFFEh; switch 7 cases mov ecx, eax mov [rbp+var_88], rcx sub eax, 6 ja def_C8478; jumptable 00000000000C8478 default case mov rax, [rbp+var_88] lea rcx, jpt_C8478 movsxd rax, ds:(jpt_C8478 - 161300h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C847A: mov rax, [rbp+var_18]; jumptable 00000000000C8478 case 8 mov [rbp+var_20], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_28], rax mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_30] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_30] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_30] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov cl, al mov rax, [rbp+var_10] mov [rax+7], cl mov rax, [rbp+var_38] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_38] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_38] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl jmp loc_C872D loc_C8522: mov rax, [rbp+var_18]; jumptable 00000000000C8478 case 7 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+6], cl mov rax, [rbp+var_40] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_40] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_40] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_48] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_48] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_48] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C872D loc_C85A9: mov rax, [rbp+var_18]; jumptable 00000000000C8478 case 6 mov [rbp+var_50], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_58], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_58] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C872D loc_C861F: mov rax, [rbp+var_18]; jumptable 00000000000C8478 case 5 mov [rbp+var_60], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_68], rax mov rax, [rbp+var_60] mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_60] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_60] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_60] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_68] mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C872D loc_C8684: mov rax, [rbp+var_18]; jumptable 00000000000C8478 case 4 mov [rbp+var_70], rax mov rax, [rbp+var_70] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_70] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_70] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_70] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C872D loc_C86CD: mov rax, [rbp+var_18]; jumptable 00000000000C8478 case 3 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_78] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_78] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C872D loc_C8705: mov rax, [rbp+var_18]; jumptable 00000000000C8478 case 2 mov [rbp+var_7C], eax mov eax, [rbp+var_7C] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov eax, [rbp+var_7C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C872D def_C8478: call _abort; jumptable 00000000000C8478 default case loc_C872D: add rsp, 90h pop rbp retn
_BYTE * mi_dpointer(long long a1, _BYTE *a2, unsigned long long a3) { unsigned long long v3; // rcx _BYTE *result; // rax unsigned long long v5; // [rsp+78h] [rbp-18h] v5 = a3; if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) == 0 && a3 != -1LL ) { v3 = *(_QWORD *)(*(_QWORD *)a1 + 328LL); a3 %= v3; v5 /= v3; } switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) ) { case 2: a2[1] = v5; result = a2; *a2 = BYTE1(v5); break; case 3: a2[2] = v5; a2[1] = BYTE1(v5); result = a2; *a2 = BYTE2(v5); break; case 4: a2[3] = v5; a2[2] = BYTE1(v5); a2[1] = BYTE2(v5); result = a2; *a2 = BYTE3(v5); break; case 5: a2[4] = v5; a2[3] = BYTE1(v5); a2[2] = BYTE2(v5); a2[1] = BYTE3(v5); result = a2; *a2 = BYTE4(v5); break; case 6: a2[5] = v5; a2[4] = BYTE1(v5); a2[3] = BYTE2(v5); a2[2] = BYTE3(v5); a2[1] = BYTE4(v5); result = a2; *a2 = BYTE5(v5); break; case 7: a2[6] = v5; a2[5] = BYTE1(v5); a2[4] = BYTE2(v5); a2[3] = BYTE3(v5); a2[2] = BYTE4(v5); a2[1] = BYTE5(v5); result = a2; *a2 = BYTE6(v5); break; case 8: a2[3] = BYTE4(v5); a2[2] = BYTE5(v5); a2[1] = BYTE6(v5); *a2 = HIBYTE(v5); a2[7] = v5; a2[6] = BYTE1(v5); a2[5] = BYTE2(v5); result = a2; a2[4] = BYTE3(v5); break; default: abort(a1, a2, a3); } return result; }
_mi_dpointer: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x318] AND RAX,0x5 CMP RAX,0x0 JNZ 0x001c8441 CMP qword ptr [RBP + -0x18],-0x1 JZ 0x001c8441 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x148] MOV RAX,qword ptr [RBP + -0x18] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x18],RAX LAB_001c8441: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x338] ADD EAX,-0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x88],RCX SUB EAX,0x6 JA 0x001c8728 MOV RAX,qword ptr [RBP + -0x88] LEA RCX,[0x261300] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8: 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 + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL JMP 0x001c872d caseD_7: 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 + 0x6],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c872d caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c872d caseD_5: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x60] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x68] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c872d caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c872d caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x78] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x78] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c872d caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x7c],EAX MOV EAX,dword ptr [RBP + -0x7c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x7c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c872d default: CALL 0x00129570 LAB_001c872d: ADD RSP,0x90 POP RBP RET
void _mi_dpointer(long *param_1,int1 *param_2,ulong param_3) { int1 uVar1; int1 uVar2; int1 uVar3; int1 uVar4; int1 uVar5; int1 uVar6; int1 uVar7; ulong local_20; local_20 = param_3; if (((*(ulong *)(*param_1 + 0x318) & 5) == 0) && (param_3 != 0xffffffffffffffff)) { local_20 = param_3 / *(ulong *)(*param_1 + 0x148); } uVar4 = (int1)local_20; uVar5 = (int1)(local_20 >> 8); uVar6 = (int1)(local_20 >> 0x10); uVar7 = (int1)(local_20 >> 0x18); uVar1 = (int1)(local_20 >> 0x20); uVar2 = (int1)(local_20 >> 0x28); uVar3 = (int1)(local_20 >> 0x30); switch(*(int4 *)(*param_1 + 0x338)) { case 2: param_2[1] = uVar4; *param_2 = uVar5; break; case 3: param_2[2] = uVar4; param_2[1] = uVar5; *param_2 = uVar6; break; case 4: param_2[3] = uVar4; param_2[2] = uVar5; param_2[1] = uVar6; *param_2 = uVar7; break; case 5: param_2[4] = uVar4; param_2[3] = uVar5; param_2[2] = uVar6; param_2[1] = uVar7; *param_2 = uVar1; break; case 6: param_2[5] = uVar4; param_2[4] = uVar5; param_2[3] = uVar6; param_2[2] = uVar7; param_2[1] = uVar1; *param_2 = uVar2; break; case 7: param_2[6] = uVar4; param_2[5] = uVar5; param_2[4] = uVar6; param_2[3] = uVar7; param_2[2] = uVar1; param_2[1] = uVar2; *param_2 = uVar3; break; case 8: param_2[3] = uVar1; param_2[2] = uVar2; param_2[1] = uVar3; *param_2 = (char)(local_20 >> 0x38); param_2[7] = uVar4; param_2[6] = uVar5; param_2[5] = uVar6; param_2[4] = uVar7; break; default: /* WARNING: Subroutine does not return */ abort(); } return; }
48,491
bf_get_int64
bluesky950520[P]quickjs/libbf.c
int bf_get_int64(int64_t *pres, const bf_t *a, int flags) { uint64_t v; int ret; if (a->expn >= BF_EXP_INF) { ret = BF_ST_INVALID_OP; if (flags & BF_GET_INT_MOD) { v = 0; } else if (a->expn == BF_EXP_INF) { v = (uint64_t)INT64_MAX + a->sign; } else { v = INT64_MAX; } } else if (a->expn <= 0) { v = 0; ret = 0; } else if (a->expn <= 63) { #if LIMB_BITS == 32 if (a->expn <= 32) v = a->tab[a->len - 1] >> (LIMB_BITS - a->expn); else v = (((uint64_t)a->tab[a->len - 1] << 32) | get_limbz(a, a->len - 2)) >> (64 - a->expn); #else v = a->tab[a->len - 1] >> (LIMB_BITS - a->expn); #endif if (a->sign) v = -v; ret = 0; } else if (!(flags & BF_GET_INT_MOD)) { ret = BF_ST_INVALID_OP; if (a->sign) { uint64_t v1; v = (uint64_t)INT64_MAX + 1; if (a->expn == 64) { v1 = a->tab[a->len - 1]; #if LIMB_BITS == 32 v1 = (v1 << 32) | get_limbz(a, a->len - 2); #endif if (v1 == v) ret = 0; } } else { v = INT64_MAX; } } else { slimb_t bit_pos = a->len * LIMB_BITS - a->expn; v = get_bits(a->tab, a->len, bit_pos); #if LIMB_BITS == 32 v |= (uint64_t)get_bits(a->tab, a->len, bit_pos + 32) << 32; #endif if (a->sign) v = -v; ret = 0; } *pres = v; return ret; }
O0
c
bf_get_int64: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movl %edx, 0x24(%rsp) movq 0x28(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jl 0xea1ae movl $0x1, 0x14(%rsp) movl 0x24(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xea166 movq $0x0, 0x18(%rsp) jmp 0xea1a9 movq 0x28(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xea198 movq 0x28(%rsp), %rax movslq 0x8(%rax), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF addq %rcx, %rax movq %rax, 0x18(%rsp) jmp 0xea1a7 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, 0x18(%rsp) jmp 0xea1a9 jmp 0xea311 movq 0x28(%rsp), %rax cmpq $0x0, 0x10(%rax) jg 0xea1d0 movq $0x0, 0x18(%rsp) movl $0x0, 0x14(%rsp) jmp 0xea30f movq 0x28(%rsp), %rax cmpq $0x3f, 0x10(%rax) jg 0xea230 movq 0x28(%rsp), %rax movq 0x20(%rax), %rax movq 0x28(%rsp), %rcx movq 0x18(%rcx), %rcx subq $0x1, %rcx movq (%rax,%rcx,8), %rax movq 0x28(%rsp), %rdx movl $0x40, %ecx subq 0x10(%rdx), %rcx shrq %cl, %rax movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax cmpl $0x0, 0x8(%rax) je 0xea223 xorl %eax, %eax subq 0x18(%rsp), %rax movq %rax, 0x18(%rsp) movl $0x0, 0x14(%rsp) jmp 0xea30d movl 0x24(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xea2b2 movl $0x1, 0x14(%rsp) movq 0x28(%rsp), %rax cmpl $0x0, 0x8(%rax) je 0xea2a1 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax cmpq $0x40, 0x10(%rax) jne 0xea29f movq 0x28(%rsp), %rax movq 0x20(%rax), %rax movq 0x28(%rsp), %rcx movq 0x18(%rcx), %rcx subq $0x1, %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax cmpq 0x18(%rsp), %rax jne 0xea29d movl $0x0, 0x14(%rsp) jmp 0xea29f jmp 0xea2b0 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, 0x18(%rsp) jmp 0xea30b movq 0x28(%rsp), %rax movq 0x18(%rax), %rax shlq $0x6, %rax movq 0x28(%rsp), %rcx subq 0x10(%rcx), %rax movq %rax, (%rsp) movq 0x28(%rsp), %rax movq 0x20(%rax), %rdi movq 0x28(%rsp), %rax movq 0x18(%rax), %rsi movq (%rsp), %rdx callq 0xea050 movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax cmpl $0x0, 0x8(%rax) je 0xea303 xorl %eax, %eax subq 0x18(%rsp), %rax movq %rax, 0x18(%rsp) movl $0x0, 0x14(%rsp) jmp 0xea30d jmp 0xea30f jmp 0xea311 movq 0x18(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, (%rax) movl 0x14(%rsp), %eax addq $0x38, %rsp retq nopw (%rax,%rax)
bf_get_int64: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_14], edx mov rax, [rsp+38h+var_10] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jl short loc_EA1AE mov [rsp+38h+var_24], 1 mov eax, [rsp+38h+var_14] and eax, 1 cmp eax, 0 jz short loc_EA166 mov [rsp+38h+var_20], 0 jmp short loc_EA1A9 loc_EA166: mov rax, [rsp+38h+var_10] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz short loc_EA198 mov rax, [rsp+38h+var_10] movsxd rax, dword ptr [rax+8] mov rcx, 7FFFFFFFFFFFFFFFh add rax, rcx mov [rsp+38h+var_20], rax jmp short loc_EA1A7 loc_EA198: mov rax, 7FFFFFFFFFFFFFFFh mov [rsp+38h+var_20], rax loc_EA1A7: jmp short $+2 loc_EA1A9: jmp loc_EA311 loc_EA1AE: mov rax, [rsp+38h+var_10] cmp qword ptr [rax+10h], 0 jg short loc_EA1D0 mov [rsp+38h+var_20], 0 mov [rsp+38h+var_24], 0 jmp loc_EA30F loc_EA1D0: mov rax, [rsp+38h+var_10] cmp qword ptr [rax+10h], 3Fh ; '?' jg short loc_EA230 mov rax, [rsp+38h+var_10] mov rax, [rax+20h] mov rcx, [rsp+38h+var_10] mov rcx, [rcx+18h] sub rcx, 1 mov rax, [rax+rcx*8] mov rdx, [rsp+38h+var_10] mov ecx, 40h ; '@' sub rcx, [rdx+10h] shr rax, cl mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_10] cmp dword ptr [rax+8], 0 jz short loc_EA223 xor eax, eax sub rax, [rsp+38h+var_20] mov [rsp+38h+var_20], rax loc_EA223: mov [rsp+38h+var_24], 0 jmp loc_EA30D loc_EA230: mov eax, [rsp+38h+var_14] and eax, 1 cmp eax, 0 jnz short loc_EA2B2 mov [rsp+38h+var_24], 1 mov rax, [rsp+38h+var_10] cmp dword ptr [rax+8], 0 jz short loc_EA2A1 mov rax, 8000000000000000h mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_10] cmp qword ptr [rax+10h], 40h ; '@' jnz short loc_EA29F mov rax, [rsp+38h+var_10] mov rax, [rax+20h] mov rcx, [rsp+38h+var_10] mov rcx, [rcx+18h] sub rcx, 1 mov rax, [rax+rcx*8] mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_30] cmp rax, [rsp+38h+var_20] jnz short loc_EA29D mov [rsp+38h+var_24], 0 loc_EA29D: jmp short $+2 loc_EA29F: jmp short loc_EA2B0 loc_EA2A1: mov rax, 7FFFFFFFFFFFFFFFh mov [rsp+38h+var_20], rax loc_EA2B0: jmp short loc_EA30B loc_EA2B2: mov rax, [rsp+38h+var_10] mov rax, [rax+18h] shl rax, 6 mov rcx, [rsp+38h+var_10] sub rax, [rcx+10h] mov [rsp+38h+var_38], rax mov rax, [rsp+38h+var_10] mov rdi, [rax+20h] mov rax, [rsp+38h+var_10] mov rsi, [rax+18h] mov rdx, [rsp+38h+var_38] call get_bits mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_10] cmp dword ptr [rax+8], 0 jz short loc_EA303 xor eax, eax sub rax, [rsp+38h+var_20] mov [rsp+38h+var_20], rax loc_EA303: mov [rsp+38h+var_24], 0 loc_EA30B: jmp short $+2 loc_EA30D: jmp short $+2 loc_EA30F: jmp short $+2 loc_EA311: mov rcx, [rsp+38h+var_20] mov rax, [rsp+38h+var_8] mov [rax], rcx mov eax, [rsp+38h+var_24] add rsp, 38h retn
_BOOL8 bf_get_int64(unsigned long long *a1, long long a2, char a3) { BOOL v4; // [rsp+14h] [rbp-24h] unsigned long long bits; // [rsp+18h] [rbp-20h] if ( *(long long *)(a2 + 16) < 0x7FFFFFFFFFFFFFFELL ) { if ( *(long long *)(a2 + 16) > 0 ) { if ( *(long long *)(a2 + 16) > 63 ) { if ( (a3 & 1) != 0 ) { bits = get_bits( *(_QWORD *)(a2 + 32), *(_QWORD *)(a2 + 24), (*(_QWORD *)(a2 + 24) << 6) - *(_QWORD *)(a2 + 16)); if ( *(_DWORD *)(a2 + 8) ) bits = -(long long)bits; v4 = 0; } else { v4 = 1; if ( *(_DWORD *)(a2 + 8) ) { bits = 0x8000000000000000LL; if ( *(_QWORD *)(a2 + 16) == 64LL ) v4 = *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * (*(_QWORD *)(a2 + 24) - 1LL)) != 0x8000000000000000LL; } else { bits = 0x7FFFFFFFFFFFFFFFLL; } } } else { bits = *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * (*(_QWORD *)(a2 + 24) - 1LL)) >> (64 - *(_BYTE *)(a2 + 16)); if ( *(_DWORD *)(a2 + 8) ) bits = -(long long)bits; v4 = 0; } } else { bits = 0LL; v4 = 0; } } else { v4 = 1; if ( (a3 & 1) != 0 ) { bits = 0LL; } else if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFELL ) { bits = *(int *)(a2 + 8) + 0x7FFFFFFFFFFFFFFFLL; } else { bits = 0x7FFFFFFFFFFFFFFFLL; } } *a1 = bits; return v4; }
bf_get_int64: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV dword ptr [RSP + 0x24],EDX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JL 0x001ea1ae MOV dword ptr [RSP + 0x14],0x1 MOV EAX,dword ptr [RSP + 0x24] AND EAX,0x1 CMP EAX,0x0 JZ 0x001ea166 MOV qword ptr [RSP + 0x18],0x0 JMP 0x001ea1a9 LAB_001ea166: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001ea198 MOV RAX,qword ptr [RSP + 0x28] MOVSXD RAX,dword ptr [RAX + 0x8] MOV RCX,0x7fffffffffffffff ADD RAX,RCX MOV qword ptr [RSP + 0x18],RAX JMP 0x001ea1a7 LAB_001ea198: MOV RAX,0x7fffffffffffffff MOV qword ptr [RSP + 0x18],RAX LAB_001ea1a7: JMP 0x001ea1a9 LAB_001ea1a9: JMP 0x001ea311 LAB_001ea1ae: MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x10],0x0 JG 0x001ea1d0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x14],0x0 JMP 0x001ea30f LAB_001ea1d0: MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x10],0x3f JG 0x001ea230 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX + 0x18] SUB RCX,0x1 MOV RAX,qword ptr [RAX + RCX*0x8] MOV RDX,qword ptr [RSP + 0x28] MOV ECX,0x40 SUB RCX,qword ptr [RDX + 0x10] SHR RAX,CL MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001ea223 XOR EAX,EAX SUB RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x18],RAX LAB_001ea223: MOV dword ptr [RSP + 0x14],0x0 JMP 0x001ea30d LAB_001ea230: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001ea2b2 MOV dword ptr [RSP + 0x14],0x1 MOV RAX,qword ptr [RSP + 0x28] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001ea2a1 MOV RAX,-0x8000000000000000 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x10],0x40 JNZ 0x001ea29f MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX + 0x18] SUB RCX,0x1 MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] CMP RAX,qword ptr [RSP + 0x18] JNZ 0x001ea29d MOV dword ptr [RSP + 0x14],0x0 LAB_001ea29d: JMP 0x001ea29f LAB_001ea29f: JMP 0x001ea2b0 LAB_001ea2a1: MOV RAX,0x7fffffffffffffff MOV qword ptr [RSP + 0x18],RAX LAB_001ea2b0: JMP 0x001ea30b LAB_001ea2b2: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] SHL RAX,0x6 MOV RCX,qword ptr [RSP + 0x28] SUB RAX,qword ptr [RCX + 0x10] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RSP] CALL 0x001ea050 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001ea303 XOR EAX,EAX SUB RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x18],RAX LAB_001ea303: MOV dword ptr [RSP + 0x14],0x0 LAB_001ea30b: JMP 0x001ea30d LAB_001ea30d: JMP 0x001ea30f LAB_001ea30f: JMP 0x001ea311 LAB_001ea311: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x38 RET
bool bf_get_int64(ulong *param_1,long param_2,uint param_3) { bool bVar1; ulong local_20; if (*(long *)(param_2 + 0x10) < 0x7ffffffffffffffe) { if (*(long *)(param_2 + 0x10) < 1) { local_20 = 0; bVar1 = false; } else if (*(long *)(param_2 + 0x10) < 0x40) { local_20 = *(ulong *)(*(long *)(param_2 + 0x20) + (*(long *)(param_2 + 0x18) + -1) * 8) >> (0x40U - (char)*(int8 *)(param_2 + 0x10) & 0x3f); if (*(int *)(param_2 + 8) != 0) { local_20 = -local_20; } bVar1 = false; } else if ((param_3 & 1) == 0) { bVar1 = true; if (*(int *)(param_2 + 8) == 0) { local_20 = 0x7fffffffffffffff; } else { local_20 = 0x8000000000000000; if (*(long *)(param_2 + 0x10) == 0x40) { bVar1 = *(long *)(*(long *)(param_2 + 0x20) + (*(long *)(param_2 + 0x18) + -1) * 8) != -0x8000000000000000; } } } else { local_20 = get_bits(*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18), *(long *)(param_2 + 0x18) * 0x40 - *(long *)(param_2 + 0x10)); if (*(int *)(param_2 + 8) != 0) { local_20 = -local_20; } bVar1 = false; } } else { bVar1 = true; if ((param_3 & 1) == 0) { if (*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) { local_20 = (long)*(int *)(param_2 + 8) + 0x7fffffffffffffff; } else { local_20 = 0x7fffffffffffffff; } } else { local_20 = 0; } } *param_1 = local_20; return bVar1; }
48,492
bf_get_int64
bluesky950520[P]quickjs/libbf.c
int bf_get_int64(int64_t *pres, const bf_t *a, int flags) { uint64_t v; int ret; if (a->expn >= BF_EXP_INF) { ret = BF_ST_INVALID_OP; if (flags & BF_GET_INT_MOD) { v = 0; } else if (a->expn == BF_EXP_INF) { v = (uint64_t)INT64_MAX + a->sign; } else { v = INT64_MAX; } } else if (a->expn <= 0) { v = 0; ret = 0; } else if (a->expn <= 63) { #if LIMB_BITS == 32 if (a->expn <= 32) v = a->tab[a->len - 1] >> (LIMB_BITS - a->expn); else v = (((uint64_t)a->tab[a->len - 1] << 32) | get_limbz(a, a->len - 2)) >> (64 - a->expn); #else v = a->tab[a->len - 1] >> (LIMB_BITS - a->expn); #endif if (a->sign) v = -v; ret = 0; } else if (!(flags & BF_GET_INT_MOD)) { ret = BF_ST_INVALID_OP; if (a->sign) { uint64_t v1; v = (uint64_t)INT64_MAX + 1; if (a->expn == 64) { v1 = a->tab[a->len - 1]; #if LIMB_BITS == 32 v1 = (v1 << 32) | get_limbz(a, a->len - 2); #endif if (v1 == v) ret = 0; } } else { v = INT64_MAX; } } else { slimb_t bit_pos = a->len * LIMB_BITS - a->expn; v = get_bits(a->tab, a->len, bit_pos); #if LIMB_BITS == 32 v |= (uint64_t)get_bits(a->tab, a->len, bit_pos + 32) << 32; #endif if (a->sign) v = -v; ret = 0; } *pres = v; return ret; }
O1
c
bf_get_int64: movabsq $0x7fffffffffffffff, %r8 # imm = 0x7FFFFFFFFFFFFFFF movq 0x10(%rsi), %rcx leaq -0x2(%r8), %rax cmpq %rax, %rcx jle 0x87d01 movl $0x1, %eax testb $0x1, %dl jne 0x87d30 leaq -0x1(%r8), %rdx cmpq %rdx, %rcx jne 0x87d33 movslq 0x8(%rsi), %rcx addq %rcx, %r8 jmp 0x87d33 xorl %eax, %eax testq %rcx, %rcx jle 0x87d30 cmpq $0x3f, %rcx jg 0x87d37 movq 0x18(%rsi), %rdx movq 0x20(%rsi), %r8 movq -0x8(%r8,%rdx,8), %rdx negb %cl shrq %cl, %rdx movq %rdx, %r8 negq %r8 cmpl $0x0, 0x8(%rsi) cmoveq %rdx, %r8 jmp 0x87d33 xorl %r8d, %r8d movq %r8, (%rdi) retq testb $0x1, %dl jne 0x87d64 movl $0x1, %eax cmpl $0x0, 0x8(%rsi) je 0x87d33 cmpq $0x40, %rcx jne 0x87da4 movq 0x18(%rsi), %rcx movq 0x20(%rsi), %rdx incq %r8 xorl %eax, %eax cmpq %r8, -0x8(%rdx,%rcx,8) setne %al jmp 0x87d33 movq 0x18(%rsi), %r10 movq 0x20(%rsi), %r8 movq %r10, %rax shlq $0x6, %rax subq %rcx, %rax movq %rax, %rcx sarq $0x6, %rcx movl %eax, %edx andl $0x3f, %edx cmpq %r10, %rcx jae 0x87d8d movq (%r8,%rcx,8), %r9 jmp 0x87d90 xorl %r9d, %r9d testl %edx, %edx je 0x87dbb leaq 0x1(%rcx), %r11 cmpq %r10, %r11 jae 0x87da9 movq 0x8(%r8,%rcx,8), %r8 jmp 0x87dac incq %r8 jmp 0x87d33 xorl %r8d, %r8d movl %eax, %ecx shrq %cl, %r9 negb %dl movl %edx, %ecx shlq %cl, %r8 orq %r8, %r9 movq %r9, %r8 negq %r8 cmpl $0x0, 0x8(%rsi) cmoveq %r9, %r8 xorl %eax, %eax jmp 0x87d33
bf_get_int64: mov r8, 7FFFFFFFFFFFFFFFh mov rcx, [rsi+10h] lea rax, [r8-2] cmp rcx, rax jle short loc_87D01 mov eax, 1 test dl, 1 jnz short loc_87D30 lea rdx, [r8-1] cmp rcx, rdx jnz short loc_87D33 movsxd rcx, dword ptr [rsi+8] add r8, rcx jmp short loc_87D33 loc_87D01: xor eax, eax test rcx, rcx jle short loc_87D30 cmp rcx, 3Fh ; '?' jg short loc_87D37 mov rdx, [rsi+18h] mov r8, [rsi+20h] mov rdx, [r8+rdx*8-8] neg cl shr rdx, cl mov r8, rdx neg r8 cmp dword ptr [rsi+8], 0 cmovz r8, rdx jmp short loc_87D33 loc_87D30: xor r8d, r8d loc_87D33: mov [rdi], r8 retn loc_87D37: test dl, 1 jnz short loc_87D64 mov eax, 1 cmp dword ptr [rsi+8], 0 jz short loc_87D33 cmp rcx, 40h ; '@' jnz short loc_87DA4 mov rcx, [rsi+18h] mov rdx, [rsi+20h] inc r8 xor eax, eax cmp [rdx+rcx*8-8], r8 setnz al jmp short loc_87D33 loc_87D64: mov r10, [rsi+18h] mov r8, [rsi+20h] mov rax, r10 shl rax, 6 sub rax, rcx mov rcx, rax sar rcx, 6 mov edx, eax and edx, 3Fh cmp rcx, r10 jnb short loc_87D8D mov r9, [r8+rcx*8] jmp short loc_87D90 loc_87D8D: xor r9d, r9d loc_87D90: test edx, edx jz short loc_87DBB lea r11, [rcx+1] cmp r11, r10 jnb short loc_87DA9 mov r8, [r8+rcx*8+8] jmp short loc_87DAC loc_87DA4: inc r8 jmp short loc_87D33 loc_87DA9: xor r8d, r8d loc_87DAC: mov ecx, eax shr r9, cl neg dl mov ecx, edx shl r8, cl or r9, r8 loc_87DBB: mov r8, r9 neg r8 cmp dword ptr [rsi+8], 0 cmovz r8, r9 xor eax, eax jmp loc_87D33
_BOOL8 bf_get_int64(long long *a1, long long a2, char a3) { long long v3; // r8 long long v4; // rcx _BOOL8 result; // rax char v6; // cl unsigned long long v7; // r10 long long v8; // r8 char v9; // al unsigned long long v10; // rcx unsigned long long v11; // r9 long long v12; // r8 v3 = 0x7FFFFFFFFFFFFFFFLL; v4 = *(_QWORD *)(a2 + 16); if ( v4 > 0x7FFFFFFFFFFFFFFDLL ) { result = 1LL; if ( (a3 & 1) == 0 ) { if ( v4 == 0x7FFFFFFFFFFFFFFELL ) v3 = *(int *)(a2 + 8) + 0x7FFFFFFFFFFFFFFFLL; goto LABEL_11; } LABEL_10: v3 = 0LL; goto LABEL_11; } result = 0LL; if ( v4 <= 0 ) goto LABEL_10; if ( v4 > 63 ) { if ( (a3 & 1) != 0 ) { v7 = *(_QWORD *)(a2 + 24); v8 = *(_QWORD *)(a2 + 32); v9 = ((_BYTE)v7 << 6) - v4; v10 = (long long)((v7 << 6) - v4) >> 6; if ( v10 >= v7 ) v11 = 0LL; else v11 = *(_QWORD *)(v8 + 8 * v10); if ( (v9 & 0x3F) != 0 ) { if ( v10 + 1 >= v7 ) v12 = 0LL; else v12 = *(_QWORD *)(v8 + 8 * v10 + 8); v11 = (v12 << -(v9 & 0x3F)) | (v11 >> v9); } v3 = -(long long)v11; if ( !*(_DWORD *)(a2 + 8) ) v3 = v11; result = 0LL; } else { result = 1LL; if ( *(_DWORD *)(a2 + 8) ) { v3 = 0x8000000000000000LL; if ( v4 == 64 ) result = *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8) != 0x8000000000000000LL; } } } else { v6 = -(char)v4; v3 = -(*(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8) >> v6); if ( !*(_DWORD *)(a2 + 8) ) v3 = *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8) >> v6; } LABEL_11: *a1 = v3; return result; }
bf_get_int64: MOV R8,0x7fffffffffffffff MOV RCX,qword ptr [RSI + 0x10] LEA RAX,[R8 + -0x2] CMP RCX,RAX JLE 0x00187d01 MOV EAX,0x1 TEST DL,0x1 JNZ 0x00187d30 LEA RDX,[R8 + -0x1] CMP RCX,RDX JNZ 0x00187d33 MOVSXD RCX,dword ptr [RSI + 0x8] ADD R8,RCX JMP 0x00187d33 LAB_00187d01: XOR EAX,EAX TEST RCX,RCX JLE 0x00187d30 CMP RCX,0x3f JG 0x00187d37 MOV RDX,qword ptr [RSI + 0x18] MOV R8,qword ptr [RSI + 0x20] MOV RDX,qword ptr [R8 + RDX*0x8 + -0x8] NEG CL SHR RDX,CL MOV R8,RDX NEG R8 CMP dword ptr [RSI + 0x8],0x0 CMOVZ R8,RDX JMP 0x00187d33 LAB_00187d30: XOR R8D,R8D LAB_00187d33: MOV qword ptr [RDI],R8 RET LAB_00187d37: TEST DL,0x1 JNZ 0x00187d64 MOV EAX,0x1 CMP dword ptr [RSI + 0x8],0x0 JZ 0x00187d33 CMP RCX,0x40 JNZ 0x00187da4 MOV RCX,qword ptr [RSI + 0x18] MOV RDX,qword ptr [RSI + 0x20] INC R8 XOR EAX,EAX CMP qword ptr [RDX + RCX*0x8 + -0x8],R8 SETNZ AL JMP 0x00187d33 LAB_00187d64: MOV R10,qword ptr [RSI + 0x18] MOV R8,qword ptr [RSI + 0x20] MOV RAX,R10 SHL RAX,0x6 SUB RAX,RCX MOV RCX,RAX SAR RCX,0x6 MOV EDX,EAX AND EDX,0x3f CMP RCX,R10 JNC 0x00187d8d MOV R9,qword ptr [R8 + RCX*0x8] JMP 0x00187d90 LAB_00187d8d: XOR R9D,R9D LAB_00187d90: TEST EDX,EDX JZ 0x00187dbb LEA R11,[RCX + 0x1] CMP R11,R10 JNC 0x00187da9 MOV R8,qword ptr [R8 + RCX*0x8 + 0x8] JMP 0x00187dac LAB_00187da4: INC R8 JMP 0x00187d33 LAB_00187da9: XOR R8D,R8D LAB_00187dac: MOV ECX,EAX SHR R9,CL NEG DL MOV ECX,EDX SHL R8,CL OR R9,R8 LAB_00187dbb: MOV R8,R9 NEG R8 CMP dword ptr [RSI + 0x8],0x0 CMOVZ R8,R9 XOR EAX,EAX JMP 0x00187d33
bool bf_get_int64(ulong *param_1,long param_2,ulong param_3) { ulong uVar1; ulong uVar2; long lVar3; ulong uVar4; ulong uVar5; bool bVar6; lVar3 = *(long *)(param_2 + 0x10); uVar4 = 0x7fffffffffffffff; if (lVar3 < 0x7ffffffffffffffe) { bVar6 = false; if (0 < lVar3) { if (lVar3 < 0x40) { uVar2 = *(ulong *)(*(long *)(param_2 + 0x20) + -8 + *(long *)(param_2 + 0x18) * 8) >> (-(char)lVar3 & 0x3fU); uVar4 = -uVar2; if (*(int *)(param_2 + 8) == 0) { uVar4 = uVar2; } } else if ((param_3 & 1) == 0) { bVar6 = true; if (*(int *)(param_2 + 8) != 0) { if (lVar3 == 0x40) { bVar6 = *(long *)(*(long *)(param_2 + 0x20) + -8 + *(long *)(param_2 + 0x18) * 8) != -0x8000000000000000; uVar4 = 0x8000000000000000; } else { uVar4 = 0x8000000000000000; } } } else { uVar4 = *(ulong *)(param_2 + 0x18); uVar2 = uVar4 * 0x40 - lVar3; uVar1 = (long)uVar2 >> 6; if (uVar1 < uVar4) { uVar5 = *(ulong *)(*(long *)(param_2 + 0x20) + uVar1 * 8); } else { uVar5 = 0; } if ((uVar2 & 0x3f) != 0) { if (uVar1 + 1 < uVar4) { lVar3 = *(long *)(*(long *)(param_2 + 0x20) + 8 + uVar1 * 8); } else { lVar3 = 0; } uVar5 = uVar5 >> ((byte)uVar2 & 0x3f) | lVar3 << (-((byte)uVar2 & 0x3f) & 0x3f); } uVar4 = -uVar5; if (*(int *)(param_2 + 8) == 0) { uVar4 = uVar5; } bVar6 = false; } goto LAB_00187d33; } } else { bVar6 = true; if ((param_3 & 1) == 0) { if (lVar3 == 0x7ffffffffffffffe) { uVar4 = (long)*(int *)(param_2 + 8) + 0x7fffffffffffffff; } goto LAB_00187d33; } } uVar4 = 0; LAB_00187d33: *param_1 = uVar4; return bVar6; }
48,493
ggml_new_tensor_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_new_tensor_impl( struct ggml_context * ctx, enum ggml_type type, int n_dims, const int64_t * ne, struct ggml_tensor * view_src, size_t view_offs) { GGML_ASSERT(type >= 0 && type < GGML_TYPE_COUNT); GGML_ASSERT(n_dims >= 1 && n_dims <= GGML_MAX_DIMS); // find the base tensor and absolute offset if (view_src != NULL && view_src->view_src != NULL) { view_offs += view_src->view_offs; view_src = view_src->view_src; } size_t data_size = ggml_row_size(type, ne[0]); for (int i = 1; i < n_dims; i++) { data_size *= ne[i]; } GGML_ASSERT(view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)); void * data = view_src != NULL ? view_src->data : NULL; if (data != NULL) { data = (char *) data + view_offs; } size_t obj_alloc_size = 0; if (view_src == NULL && !ctx->no_alloc) { // allocate tensor data in the context's memory pool obj_alloc_size = data_size; } struct ggml_object * const obj_new = ggml_new_object(ctx, GGML_OBJECT_TYPE_TENSOR, GGML_TENSOR_SIZE + obj_alloc_size); GGML_ASSERT(obj_new); struct ggml_tensor * const result = (struct ggml_tensor *)((char *)ctx->mem_buffer + obj_new->offs); *result = (struct ggml_tensor) { /*.type =*/ type, /*.buffer =*/ NULL, /*.ne =*/ { 1, 1, 1, 1 }, /*.nb =*/ { 0, 0, 0, 0 }, /*.op =*/ GGML_OP_NONE, /*.op_params =*/ { 0 }, /*.flags =*/ 0, /*.src =*/ { NULL }, /*.view_src =*/ view_src, /*.view_offs =*/ view_offs, /*.data =*/ obj_alloc_size > 0 ? (void *)(result + 1) : data, /*.name =*/ { 0 }, /*.extra =*/ NULL, /*.padding =*/ { 0 }, }; // TODO: this should not be needed as long as we don't rely on aligned SIMD loads //GGML_ASSERT_ALIGNED(result->data); for (int i = 0; i < n_dims; i++) { result->ne[i] = ne[i]; } result->nb[0] = ggml_type_size(type); result->nb[1] = result->nb[0]*(result->ne[0]/ggml_blck_size(type)); for (int i = 2; i < GGML_MAX_DIMS; i++) { result->nb[i] = result->nb[i - 1]*result->ne[i - 1]; } ctx->n_objects++; return result; }
O0
c
ggml_new_tensor_impl: subq $0x1e8, %rsp # imm = 0x1E8 movq %rdi, 0x1e0(%rsp) movl %esi, 0x1dc(%rsp) movl %edx, 0x1d8(%rsp) movq %rcx, 0x1d0(%rsp) movq %r8, 0x1c8(%rsp) movq %r9, 0x1c0(%rsp) cmpl $0x0, 0x1dc(%rsp) jb 0x49ee9 cmpl $0x27, 0x1dc(%rsp) jb 0x49f0a leaq 0x6a6c7(%rip), %rdi # 0xb45b7 movl $0x629, %esi # imm = 0x629 leaq 0x6a706(%rip), %rdx # 0xb4602 leaq 0x6c7e4(%rip), %rcx # 0xb66e7 movb $0x0, %al callq 0x46780 cmpl $0x1, 0x1d8(%rsp) jl 0x49f1e cmpl $0x4, 0x1d8(%rsp) jle 0x49f3f leaq 0x6a692(%rip), %rdi # 0xb45b7 movl $0x62a, %esi # imm = 0x62A leaq 0x6a6d1(%rip), %rdx # 0xb4602 leaq 0x6c7d3(%rip), %rcx # 0xb670b movb $0x0, %al callq 0x46780 cmpq $0x0, 0x1c8(%rsp) je 0x49f92 movq 0x1c8(%rsp), %rax cmpq $0x0, 0xe8(%rax) je 0x49f92 movq 0x1c8(%rsp), %rax movq 0xf0(%rax), %rax addq 0x1c0(%rsp), %rax movq %rax, 0x1c0(%rsp) movq 0x1c8(%rsp), %rax movq 0xe8(%rax), %rax movq %rax, 0x1c8(%rsp) movl 0x1dc(%rsp), %edi movq 0x1d0(%rsp), %rax movq (%rax), %rsi callq 0x45820 movq %rax, 0x1b8(%rsp) movl $0x1, 0x1b4(%rsp) movl 0x1b4(%rsp), %eax cmpl 0x1d8(%rsp), %eax jge 0x4a004 movq 0x1d0(%rsp), %rax movslq 0x1b4(%rsp), %rcx movq (%rax,%rcx,8), %rax imulq 0x1b8(%rsp), %rax movq %rax, 0x1b8(%rsp) movl 0x1b4(%rsp), %eax addl $0x1, %eax movl %eax, 0x1b4(%rsp) jmp 0x49fbc cmpq $0x0, 0x1c8(%rsp) je 0x4a06a cmpq $0x0, 0x1b8(%rsp) je 0x4a06a movq 0x1b8(%rsp), %rax addq 0x1c0(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x1c8(%rsp), %rdi callq 0x40640 movq %rax, %rcx movq 0x30(%rsp), %rax cmpq %rcx, %rax jbe 0x4a06a leaq 0x6a567(%rip), %rdi # 0xb45b7 movl $0x637, %esi # imm = 0x637 leaq 0x6a5a6(%rip), %rdx # 0xb4602 leaq 0x6c6cf(%rip), %rcx # 0xb6732 movb $0x0, %al callq 0x46780 cmpq $0x0, 0x1c8(%rsp) je 0x4a08b movq 0x1c8(%rsp), %rax movq 0xf8(%rax), %rax movq %rax, 0x28(%rsp) jmp 0x4a094 xorl %eax, %eax movq %rax, 0x28(%rsp) jmp 0x4a094 movq 0x28(%rsp), %rax movq %rax, 0x1a8(%rsp) cmpq $0x0, 0x1a8(%rsp) je 0x4a0c4 movq 0x1a8(%rsp), %rax addq 0x1c0(%rsp), %rax movq %rax, 0x1a8(%rsp) movq $0x0, 0x1a0(%rsp) cmpq $0x0, 0x1c8(%rsp) jne 0x4a0f9 movq 0x1e0(%rsp), %rax testb $0x1, 0x11(%rax) jne 0x4a0f9 movq 0x1b8(%rsp), %rax movq %rax, 0x1a0(%rsp) movq 0x1e0(%rsp), %rdi movq 0x1a0(%rsp), %rdx addq $0x150, %rdx # imm = 0x150 xorl %esi, %esi callq 0x4a540 movq %rax, 0x198(%rsp) cmpq $0x0, 0x198(%rsp) jne 0x4a14b leaq 0x6a486(%rip), %rdi # 0xb45b7 movl $0x646, %esi # imm = 0x646 leaq 0x6a4c5(%rip), %rdx # 0xb4602 leaq 0x6c643(%rip), %rcx # 0xb6787 movb $0x0, %al callq 0x46780 movq 0x1e0(%rsp), %rax movq 0x8(%rax), %rax movq 0x198(%rsp), %rcx addq (%rcx), %rax movq %rax, 0x190(%rsp) movq 0x190(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x40(%rsp), %rdi xorl %esi, %esi movl $0x150, %edx # imm = 0x150 callq 0x41fb0 movl 0x1dc(%rsp), %eax movl %eax, 0x40(%rsp) movq 0x6a23e(%rip), %rax # 0xb43d8 movq %rax, 0x50(%rsp) movq 0x6a23a(%rip), %rax # 0xb43e0 movq %rax, 0x58(%rsp) movq 0x6a236(%rip), %rax # 0xb43e8 movq %rax, 0x60(%rsp) movq 0x6a232(%rip), %rax # 0xb43f0 movq %rax, 0x68(%rsp) movq 0x6a22e(%rip), %rax # 0xb43f8 movq %rax, 0x70(%rsp) movq 0x6a22a(%rip), %rax # 0xb4400 movq %rax, 0x78(%rsp) movq 0x6a226(%rip), %rax # 0xb4408 movq %rax, 0x80(%rsp) movq 0x6a21f(%rip), %rax # 0xb4410 movq %rax, 0x88(%rsp) movl $0x0, 0x90(%rsp) movq 0x1c8(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x1c0(%rsp), %rax movq %rax, 0x130(%rsp) leaq 0x40(%rsp), %rax addq $0xf8, %rax movq %rax, 0x20(%rsp) cmpq $0x0, 0x1a0(%rsp) jbe 0x4a254 movq 0x190(%rsp), %rax addq $0x150, %rax # imm = 0x150 movq %rax, 0x10(%rsp) jmp 0x4a261 movq 0x1a8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, (%rax) leaq 0x40(%rsp), %rsi movl $0x150, %edx # imm = 0x150 callq 0x432b0 movl $0x0, 0x3c(%rsp) movl 0x3c(%rsp), %eax cmpl 0x1d8(%rsp), %eax jge 0x4a2c7 movq 0x1d0(%rsp), %rax movslq 0x3c(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x190(%rsp), %rax movslq 0x3c(%rsp), %rcx movq %rdx, 0x10(%rax,%rcx,8) movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0x4a28a movl 0x1dc(%rsp), %edi callq 0x43b60 movq %rax, %rcx movq 0x190(%rsp), %rax movq %rcx, 0x30(%rax) movq 0x190(%rsp), %rax movq 0x30(%rax), %rax movq %rax, (%rsp) movq 0x190(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x8(%rsp) movl 0x1dc(%rsp), %edi callq 0x46220 movq (%rsp), %rcx movq %rax, %rsi movq 0x8(%rsp), %rax cqto idivq %rsi imulq %rax, %rcx movq 0x190(%rsp), %rax movq %rcx, 0x38(%rax) movl $0x2, 0x38(%rsp) cmpl $0x4, 0x38(%rsp) jge 0x4a38d movq 0x190(%rsp), %rax movl 0x38(%rsp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movq 0x30(%rax,%rcx,8), %rdx movq 0x190(%rsp), %rax movl 0x38(%rsp), %ecx subl $0x1, %ecx movslq %ecx, %rcx imulq 0x10(%rax,%rcx,8), %rdx movq 0x190(%rsp), %rax movslq 0x38(%rsp), %rcx movq %rdx, 0x30(%rax,%rcx,8) movl 0x38(%rsp), %eax addl $0x1, %eax movl %eax, 0x38(%rsp) jmp 0x4a338 movq 0x1e0(%rsp), %rax movl 0x14(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x14(%rax) movq 0x190(%rsp), %rax addq $0x1e8, %rsp # imm = 0x1E8 retq nop
ggml_new_tensor_impl: sub rsp, 1E8h mov [rsp+1E8h+var_8], rdi mov [rsp+1E8h+var_C], esi mov [rsp+1E8h+var_10], edx mov [rsp+1E8h+var_18], rcx mov [rsp+1E8h+var_20], r8 mov [rsp+1E8h+var_28], r9 cmp [rsp+1E8h+var_C], 0 jb short loc_49EE9 cmp [rsp+1E8h+var_C], 27h ; ''' jb short loc_49F0A loc_49EE9: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 629h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aType0TypeGgmlT; "type >= 0 && type < GGML_TYPE_COUNT" mov al, 0 call _ggml_abort loc_49F0A: cmp [rsp+1E8h+var_10], 1 jl short loc_49F1E cmp [rsp+1E8h+var_10], 4 jle short loc_49F3F loc_49F1E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 62Ah lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNDims1NDimsGgm; "n_dims >= 1 && n_dims <= GGML_MAX_DIMS" mov al, 0 call _ggml_abort loc_49F3F: cmp [rsp+1E8h+var_20], 0 jz short loc_49F92 mov rax, [rsp+1E8h+var_20] cmp qword ptr [rax+0E8h], 0 jz short loc_49F92 mov rax, [rsp+1E8h+var_20] mov rax, [rax+0F0h] add rax, [rsp+1E8h+var_28] mov [rsp+1E8h+var_28], rax mov rax, [rsp+1E8h+var_20] mov rax, [rax+0E8h] mov [rsp+1E8h+var_20], rax loc_49F92: mov edi, [rsp+1E8h+var_C] mov rax, [rsp+1E8h+var_18] mov rsi, [rax] call _ggml_row_size mov [rsp+1E8h+var_30], rax mov [rsp+1E8h+var_34], 1 loc_49FBC: mov eax, [rsp+1E8h+var_34] cmp eax, [rsp+1E8h+var_10] jge short loc_4A004 mov rax, [rsp+1E8h+var_18] movsxd rcx, [rsp+1E8h+var_34] mov rax, [rax+rcx*8] imul rax, [rsp+1E8h+var_30] mov [rsp+1E8h+var_30], rax mov eax, [rsp+1E8h+var_34] add eax, 1 mov [rsp+1E8h+var_34], eax jmp short loc_49FBC loc_4A004: cmp [rsp+1E8h+var_20], 0 jz short loc_4A06A cmp [rsp+1E8h+var_30], 0 jz short loc_4A06A mov rax, [rsp+1E8h+var_30] add rax, [rsp+1E8h+var_28] mov [rsp+1E8h+var_1B8], rax mov rdi, [rsp+1E8h+var_20] call _ggml_nbytes mov rcx, rax mov rax, [rsp+1E8h+var_1B8] cmp rax, rcx jbe short loc_4A06A lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 637h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aViewSrcNullDat; "view_src == NULL || data_size == 0 || d"... mov al, 0 call _ggml_abort loc_4A06A: cmp [rsp+1E8h+var_20], 0 jz short loc_4A08B mov rax, [rsp+1E8h+var_20] mov rax, [rax+0F8h] mov [rsp+1E8h+var_1C0], rax jmp short loc_4A094 loc_4A08B: xor eax, eax mov [rsp+1E8h+var_1C0], rax jmp short $+2 loc_4A094: mov rax, [rsp+1E8h+var_1C0] mov [rsp+1E8h+var_40], rax cmp [rsp+1E8h+var_40], 0 jz short loc_4A0C4 mov rax, [rsp+1E8h+var_40] add rax, [rsp+1E8h+var_28] mov [rsp+1E8h+var_40], rax loc_4A0C4: mov [rsp+1E8h+var_48], 0 cmp [rsp+1E8h+var_20], 0 jnz short loc_4A0F9 mov rax, [rsp+1E8h+var_8] test byte ptr [rax+11h], 1 jnz short loc_4A0F9 mov rax, [rsp+1E8h+var_30] mov [rsp+1E8h+var_48], rax loc_4A0F9: mov rdi, [rsp+1E8h+var_8] mov rdx, [rsp+1E8h+var_48] add rdx, 150h xor esi, esi call ggml_new_object mov [rsp+1E8h+var_50], rax cmp [rsp+1E8h+var_50], 0 jnz short loc_4A14B lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 646h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aObjNew; "obj_new" mov al, 0 call _ggml_abort loc_4A14B: mov rax, [rsp+1E8h+var_8] mov rax, [rax+8] mov rcx, [rsp+1E8h+var_50] add rax, [rcx] mov [rsp+1E8h+var_58], rax mov rax, [rsp+1E8h+var_58] mov [rsp+1E8h+var_1D0], rax lea rdi, [rsp+1E8h+var_1A8] xor esi, esi mov edx, 150h call _memset mov eax, [rsp+1E8h+var_C] mov [rsp+1E8h+var_1A8], eax mov rax, cs:qword_B43D8 mov [rsp+1E8h+var_198], rax mov rax, cs:qword_B43E0 mov [rsp+1E8h+var_190], rax mov rax, cs:qword_B43E8 mov [rsp+1E8h+var_188], rax mov rax, cs:qword_B43F0 mov [rsp+1E8h+var_180], rax mov rax, cs:qword_B43F8 mov [rsp+1E8h+var_178], rax mov rax, cs:qword_B4400 mov [rsp+1E8h+var_170], rax mov rax, cs:qword_B4408 mov [rsp+1E8h+var_168], rax mov rax, cs:qword_B4410 mov [rsp+1E8h+var_160], rax mov [rsp+1E8h+var_158], 0 mov rax, [rsp+1E8h+var_20] mov [rsp+1E8h+var_C0], rax mov rax, [rsp+1E8h+var_28] mov [rsp+1E8h+var_B8], rax lea rax, [rsp+1E8h+var_1A8] add rax, 0F8h mov [rsp+1E8h+var_1C8], rax cmp [rsp+1E8h+var_48], 0 jbe short loc_4A254 mov rax, [rsp+1E8h+var_58] add rax, 150h mov [rsp+1E8h+var_1D8], rax jmp short loc_4A261 loc_4A254: mov rax, [rsp+1E8h+var_40] mov [rsp+1E8h+var_1D8], rax loc_4A261: mov rdi, [rsp+1E8h+var_1D0] mov rax, [rsp+1E8h+var_1C8] mov rcx, [rsp+1E8h+var_1D8] mov [rax], rcx lea rsi, [rsp+1E8h+var_1A8] mov edx, 150h call _memcpy mov [rsp+1E8h+var_1AC], 0 loc_4A28A: mov eax, [rsp+1E8h+var_1AC] cmp eax, [rsp+1E8h+var_10] jge short loc_4A2C7 mov rax, [rsp+1E8h+var_18] movsxd rcx, [rsp+1E8h+var_1AC] mov rdx, [rax+rcx*8] mov rax, [rsp+1E8h+var_58] movsxd rcx, [rsp+1E8h+var_1AC] mov [rax+rcx*8+10h], rdx mov eax, [rsp+1E8h+var_1AC] add eax, 1 mov [rsp+1E8h+var_1AC], eax jmp short loc_4A28A loc_4A2C7: mov edi, [rsp+1E8h+var_C] call _ggml_type_size mov rcx, rax mov rax, [rsp+1E8h+var_58] mov [rax+30h], rcx mov rax, [rsp+1E8h+var_58] mov rax, [rax+30h] mov [rsp+1E8h+var_1E8], rax mov rax, [rsp+1E8h+var_58] mov rax, [rax+10h] mov [rsp+1E8h+var_1E0], rax mov edi, [rsp+1E8h+var_C] call _ggml_blck_size mov rcx, [rsp+1E8h+var_1E8] mov rsi, rax mov rax, [rsp+1E8h+var_1E0] cqo idiv rsi imul rcx, rax mov rax, [rsp+1E8h+var_58] mov [rax+38h], rcx mov [rsp+1E8h+var_1B0], 2 loc_4A338: cmp [rsp+1E8h+var_1B0], 4 jge short loc_4A38D mov rax, [rsp+1E8h+var_58] mov ecx, [rsp+1E8h+var_1B0] sub ecx, 1 movsxd rcx, ecx mov rdx, [rax+rcx*8+30h] mov rax, [rsp+1E8h+var_58] mov ecx, [rsp+1E8h+var_1B0] sub ecx, 1 movsxd rcx, ecx imul rdx, [rax+rcx*8+10h] mov rax, [rsp+1E8h+var_58] movsxd rcx, [rsp+1E8h+var_1B0] mov [rax+rcx*8+30h], rdx mov eax, [rsp+1E8h+var_1B0] add eax, 1 mov [rsp+1E8h+var_1B0], eax jmp short loc_4A338 loc_4A38D: mov rax, [rsp+1E8h+var_8] mov ecx, [rax+14h] add ecx, 1 mov [rax+14h], ecx mov rax, [rsp+1E8h+var_58] add rsp, 1E8h retn
_QWORD * ggml_new_tensor_impl(long long a1, unsigned int a2, int a3, long long *a4, unsigned int *a5, long long a6) { long long v7; // [rsp+0h] [rbp-1E8h] long long v8; // [rsp+8h] [rbp-1E0h] _QWORD *v9; // [rsp+10h] [rbp-1D8h] _QWORD *v10; // [rsp+18h] [rbp-1D0h] _QWORD *v11; // [rsp+28h] [rbp-1C0h] int k; // [rsp+38h] [rbp-1B0h] int j; // [rsp+3Ch] [rbp-1ACh] _DWORD v14[4]; // [rsp+40h] [rbp-1A8h] BYREF long long v15; // [rsp+50h] [rbp-198h] long long v16; // [rsp+58h] [rbp-190h] long long v17; // [rsp+60h] [rbp-188h] long long v18; // [rsp+68h] [rbp-180h] long long v19; // [rsp+70h] [rbp-178h] long long v20; // [rsp+78h] [rbp-170h] long long v21; // [rsp+80h] [rbp-168h] long long v22; // [rsp+88h] [rbp-160h] int v23; // [rsp+90h] [rbp-158h] unsigned int *v24; // [rsp+128h] [rbp-C0h] long long v25; // [rsp+130h] [rbp-B8h] _QWORD *v26; // [rsp+138h] [rbp-B0h] _QWORD *v27; // [rsp+190h] [rbp-58h] _QWORD *v28; // [rsp+198h] [rbp-50h] unsigned long long v29; // [rsp+1A0h] [rbp-48h] _QWORD *v30; // [rsp+1A8h] [rbp-40h] int i; // [rsp+1B4h] [rbp-34h] unsigned long long v32; // [rsp+1B8h] [rbp-30h] long long v33; // [rsp+1C0h] [rbp-28h] unsigned int *v34; // [rsp+1C8h] [rbp-20h] long long *v35; // [rsp+1D0h] [rbp-18h] int v36; // [rsp+1D8h] [rbp-10h] unsigned int v37; // [rsp+1DCh] [rbp-Ch] long long v38; // [rsp+1E0h] [rbp-8h] v38 = a1; v37 = a2; v36 = a3; v35 = a4; v34 = a5; v33 = a6; if ( a2 >= 0x27 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 1577, (long long)"GGML_ASSERT(%s) failed", "type >= 0 && type < GGML_TYPE_COUNT"); if ( v36 < 1 || v36 > 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 1578, (long long)"GGML_ASSERT(%s) failed", "n_dims >= 1 && n_dims <= GGML_MAX_DIMS"); if ( v34 && *((_QWORD *)v34 + 29) ) { v33 += *((_QWORD *)v34 + 30); v34 = (unsigned int *)*((_QWORD *)v34 + 29); } v32 = ggml_row_size(v37, *v35); for ( i = 1; i < v36; ++i ) v32 *= v35[i]; if ( v34 && v32 && v33 + v32 > ggml_nbytes(v34) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 1591, (long long)"GGML_ASSERT(%s) failed", "view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)"); if ( v34 ) v11 = (_QWORD *)*((_QWORD *)v34 + 31); else v11 = 0LL; v30 = v11; if ( v11 ) v30 = (_QWORD *)((char *)v30 + v33); v29 = 0LL; if ( !v34 && (*(_BYTE *)(v38 + 17) & 1) == 0 ) v29 = v32; v28 = (_QWORD *)ggml_new_object(v38, 0LL, v29 + 336); if ( !v28 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 1606, (long long)"GGML_ASSERT(%s) failed", "obj_new"); v27 = (_QWORD *)(*v28 + *(_QWORD *)(v38 + 8)); v10 = v27; memset(v14, 0LL, 336LL); v14[0] = v37; v15 = 1LL; v16 = 1LL; v17 = 1LL; v18 = 1LL; v19 = 0LL; v20 = 0LL; v21 = 0LL; v22 = 0LL; v23 = 0; v24 = v34; v25 = v33; if ( v29 ) v9 = v27 + 42; else v9 = v30; v26 = v9; memcpy(v10, v14, 336LL); for ( j = 0; j < v36; ++j ) v27[j + 2] = v35[j]; v27[6] = ggml_type_size(v37); v7 = v27[6]; v8 = v27[2]; v27[7] = v8 / ggml_blck_size(v37) * v7; for ( k = 2; k < 4; ++k ) v27[k + 6] = v27[k + 1] * v27[k + 5]; ++*(_DWORD *)(v38 + 20); return v27; }
ggml_new_tensor_impl: SUB RSP,0x1e8 MOV qword ptr [RSP + 0x1e0],RDI MOV dword ptr [RSP + 0x1dc],ESI MOV dword ptr [RSP + 0x1d8],EDX MOV qword ptr [RSP + 0x1d0],RCX MOV qword ptr [RSP + 0x1c8],R8 MOV qword ptr [RSP + 0x1c0],R9 CMP dword ptr [RSP + 0x1dc],0x0 JC 0x00149ee9 CMP dword ptr [RSP + 0x1dc],0x27 JC 0x00149f0a LAB_00149ee9: LEA RDI,[0x1b45b7] MOV ESI,0x629 LEA RDX,[0x1b4602] LEA RCX,[0x1b66e7] MOV AL,0x0 CALL 0x00146780 LAB_00149f0a: CMP dword ptr [RSP + 0x1d8],0x1 JL 0x00149f1e CMP dword ptr [RSP + 0x1d8],0x4 JLE 0x00149f3f LAB_00149f1e: LEA RDI,[0x1b45b7] MOV ESI,0x62a LEA RDX,[0x1b4602] LEA RCX,[0x1b670b] MOV AL,0x0 CALL 0x00146780 LAB_00149f3f: CMP qword ptr [RSP + 0x1c8],0x0 JZ 0x00149f92 MOV RAX,qword ptr [RSP + 0x1c8] CMP qword ptr [RAX + 0xe8],0x0 JZ 0x00149f92 MOV RAX,qword ptr [RSP + 0x1c8] MOV RAX,qword ptr [RAX + 0xf0] ADD RAX,qword ptr [RSP + 0x1c0] MOV qword ptr [RSP + 0x1c0],RAX MOV RAX,qword ptr [RSP + 0x1c8] MOV RAX,qword ptr [RAX + 0xe8] MOV qword ptr [RSP + 0x1c8],RAX LAB_00149f92: MOV EDI,dword ptr [RSP + 0x1dc] MOV RAX,qword ptr [RSP + 0x1d0] MOV RSI,qword ptr [RAX] CALL 0x00145820 MOV qword ptr [RSP + 0x1b8],RAX MOV dword ptr [RSP + 0x1b4],0x1 LAB_00149fbc: MOV EAX,dword ptr [RSP + 0x1b4] CMP EAX,dword ptr [RSP + 0x1d8] JGE 0x0014a004 MOV RAX,qword ptr [RSP + 0x1d0] MOVSXD RCX,dword ptr [RSP + 0x1b4] MOV RAX,qword ptr [RAX + RCX*0x8] IMUL RAX,qword ptr [RSP + 0x1b8] MOV qword ptr [RSP + 0x1b8],RAX MOV EAX,dword ptr [RSP + 0x1b4] ADD EAX,0x1 MOV dword ptr [RSP + 0x1b4],EAX JMP 0x00149fbc LAB_0014a004: CMP qword ptr [RSP + 0x1c8],0x0 JZ 0x0014a06a CMP qword ptr [RSP + 0x1b8],0x0 JZ 0x0014a06a MOV RAX,qword ptr [RSP + 0x1b8] ADD RAX,qword ptr [RSP + 0x1c0] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x1c8] CALL 0x00140640 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] CMP RAX,RCX JBE 0x0014a06a LEA RDI,[0x1b45b7] MOV ESI,0x637 LEA RDX,[0x1b4602] LEA RCX,[0x1b6732] MOV AL,0x0 CALL 0x00146780 LAB_0014a06a: CMP qword ptr [RSP + 0x1c8],0x0 JZ 0x0014a08b MOV RAX,qword ptr [RSP + 0x1c8] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RSP + 0x28],RAX JMP 0x0014a094 LAB_0014a08b: XOR EAX,EAX MOV qword ptr [RSP + 0x28],RAX JMP 0x0014a094 LAB_0014a094: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x1a8],RAX CMP qword ptr [RSP + 0x1a8],0x0 JZ 0x0014a0c4 MOV RAX,qword ptr [RSP + 0x1a8] ADD RAX,qword ptr [RSP + 0x1c0] MOV qword ptr [RSP + 0x1a8],RAX LAB_0014a0c4: MOV qword ptr [RSP + 0x1a0],0x0 CMP qword ptr [RSP + 0x1c8],0x0 JNZ 0x0014a0f9 MOV RAX,qword ptr [RSP + 0x1e0] TEST byte ptr [RAX + 0x11],0x1 JNZ 0x0014a0f9 MOV RAX,qword ptr [RSP + 0x1b8] MOV qword ptr [RSP + 0x1a0],RAX LAB_0014a0f9: MOV RDI,qword ptr [RSP + 0x1e0] MOV RDX,qword ptr [RSP + 0x1a0] ADD RDX,0x150 XOR ESI,ESI CALL 0x0014a540 MOV qword ptr [RSP + 0x198],RAX CMP qword ptr [RSP + 0x198],0x0 JNZ 0x0014a14b LEA RDI,[0x1b45b7] MOV ESI,0x646 LEA RDX,[0x1b4602] LEA RCX,[0x1b6787] MOV AL,0x0 CALL 0x00146780 LAB_0014a14b: MOV RAX,qword ptr [RSP + 0x1e0] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x198] ADD RAX,qword ptr [RCX] MOV qword ptr [RSP + 0x190],RAX MOV RAX,qword ptr [RSP + 0x190] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x40] XOR ESI,ESI MOV EDX,0x150 CALL 0x00141fb0 MOV EAX,dword ptr [RSP + 0x1dc] MOV dword ptr [RSP + 0x40],EAX MOV RAX,qword ptr [0x001b43d8] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [0x001b43e0] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [0x001b43e8] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [0x001b43f0] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [0x001b43f8] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [0x001b4400] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [0x001b4408] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [0x001b4410] MOV qword ptr [RSP + 0x88],RAX MOV dword ptr [RSP + 0x90],0x0 MOV RAX,qword ptr [RSP + 0x1c8] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x1c0] MOV qword ptr [RSP + 0x130],RAX LEA RAX,[RSP + 0x40] ADD RAX,0xf8 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x1a0],0x0 JBE 0x0014a254 MOV RAX,qword ptr [RSP + 0x190] ADD RAX,0x150 MOV qword ptr [RSP + 0x10],RAX JMP 0x0014a261 LAB_0014a254: MOV RAX,qword ptr [RSP + 0x1a8] MOV qword ptr [RSP + 0x10],RAX LAB_0014a261: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX LEA RSI,[RSP + 0x40] MOV EDX,0x150 CALL 0x001432b0 MOV dword ptr [RSP + 0x3c],0x0 LAB_0014a28a: MOV EAX,dword ptr [RSP + 0x3c] CMP EAX,dword ptr [RSP + 0x1d8] JGE 0x0014a2c7 MOV RAX,qword ptr [RSP + 0x1d0] MOVSXD RCX,dword ptr [RSP + 0x3c] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x190] MOVSXD RCX,dword ptr [RSP + 0x3c] MOV qword ptr [RAX + RCX*0x8 + 0x10],RDX MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x0014a28a LAB_0014a2c7: MOV EDI,dword ptr [RSP + 0x1dc] CALL 0x00143b60 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x190] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RSP + 0x190] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x190] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x1dc] CALL 0x00146220 MOV RCX,qword ptr [RSP] MOV RSI,RAX MOV RAX,qword ptr [RSP + 0x8] CQO IDIV RSI IMUL RCX,RAX MOV RAX,qword ptr [RSP + 0x190] MOV qword ptr [RAX + 0x38],RCX MOV dword ptr [RSP + 0x38],0x2 LAB_0014a338: CMP dword ptr [RSP + 0x38],0x4 JGE 0x0014a38d MOV RAX,qword ptr [RSP + 0x190] MOV ECX,dword ptr [RSP + 0x38] SUB ECX,0x1 MOVSXD RCX,ECX MOV RDX,qword ptr [RAX + RCX*0x8 + 0x30] MOV RAX,qword ptr [RSP + 0x190] MOV ECX,dword ptr [RSP + 0x38] SUB ECX,0x1 MOVSXD RCX,ECX IMUL RDX,qword ptr [RAX + RCX*0x8 + 0x10] MOV RAX,qword ptr [RSP + 0x190] MOVSXD RCX,dword ptr [RSP + 0x38] MOV qword ptr [RAX + RCX*0x8 + 0x30],RDX MOV EAX,dword ptr [RSP + 0x38] ADD EAX,0x1 MOV dword ptr [RSP + 0x38],EAX JMP 0x0014a338 LAB_0014a38d: MOV RAX,qword ptr [RSP + 0x1e0] MOV ECX,dword ptr [RAX + 0x14] ADD ECX,0x1 MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RSP + 0x190] ADD RSP,0x1e8 RET
void * ggml_new_tensor_impl (long param_1,uint param_2,int param_3,long param_4,long param_5,long param_6) { long lVar1; long lVar2; ulong uVar3; ulong uVar4; void *__dest; int8 uVar5; long lVar6; long local_1d8; long local_1c0; int local_1b0; int local_1ac; uint local_1a8 [4]; int8 local_198; int8 local_190; int8 local_188; int8 local_180; int8 local_178; int8 local_170; int8 local_168; int8 local_160; int4 local_158; long local_c0; long local_b8; long local_b0; void *local_58; long *local_50; long local_48; long local_40; int local_34; long local_30; long local_28; long local_20; long local_18; int local_10; uint local_c; long local_8; local_28 = param_6; local_20 = param_5; local_18 = param_4; local_10 = param_3; local_c = param_2; local_8 = param_1; if (0x26 < param_2) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x629, "GGML_ASSERT(%s) failed","type >= 0 && type < GGML_TYPE_COUNT"); } if ((local_10 < 1) || (4 < local_10)) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x62a, "GGML_ASSERT(%s) failed","n_dims >= 1 && n_dims <= GGML_MAX_DIMS"); } if ((local_20 != 0) && (*(long *)(local_20 + 0xe8) != 0)) { local_28 = *(long *)(local_20 + 0xf0) + local_28; local_20 = *(long *)(local_20 + 0xe8); } local_30 = ggml_row_size(local_c); for (local_34 = 1; local_34 < local_10; local_34 = local_34 + 1) { local_30 = *(long *)(local_18 + (long)local_34 * 8) * local_30; } if (((local_20 != 0) && (local_30 != 0)) && (uVar3 = local_30 + local_28, uVar4 = ggml_nbytes(local_20), uVar4 < uVar3)) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x637, "GGML_ASSERT(%s) failed", "view_src == NULL || data_size == 0 || data_size + view_offs <= ggml_nbytes(view_src)" ); } if (local_20 == 0) { local_1c0 = 0; } else { local_1c0 = *(long *)(local_20 + 0xf8); } local_40 = local_1c0; if (local_1c0 != 0) { local_40 = local_1c0 + local_28; } local_48 = 0; if ((local_20 == 0) && ((*(byte *)(local_8 + 0x11) & 1) == 0)) { local_48 = local_30; } local_50 = (long *)ggml_new_object(local_8,0,local_48 + 0x150); if (local_50 == (long *)0x0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x646, "GGML_ASSERT(%s) failed",&DAT_001b6787); } __dest = (void *)(*(long *)(local_8 + 8) + *local_50); local_58 = __dest; memset(local_1a8,0,0x150); local_1a8[0] = local_c; local_198 = DAT_001b43d8; local_190 = DAT_001b43e0; local_188 = DAT_001b43e8; local_180 = DAT_001b43f0; local_178 = DAT_001b43f8; local_170 = DAT_001b4400; local_168 = DAT_001b4408; local_160 = DAT_001b4410; local_158 = 0; local_c0 = local_20; local_b8 = local_28; if (local_48 == 0) { local_1d8 = local_40; } else { local_1d8 = (long)local_58 + 0x150; } local_b0 = local_1d8; memcpy(__dest,local_1a8,0x150); for (local_1ac = 0; local_1ac < local_10; local_1ac = local_1ac + 1) { *(int8 *)((long)local_58 + (long)local_1ac * 8 + 0x10) = *(int8 *)(local_18 + (long)local_1ac * 8); } uVar5 = ggml_type_size(local_c); *(int8 *)((long)local_58 + 0x30) = uVar5; lVar1 = *(long *)((long)local_58 + 0x30); lVar2 = *(long *)((long)local_58 + 0x10); lVar6 = ggml_blck_size(local_c); *(long *)((long)local_58 + 0x38) = lVar1 * (lVar2 / lVar6); for (local_1b0 = 2; local_1b0 < 4; local_1b0 = local_1b0 + 1) { *(long *)((long)local_58 + (long)local_1b0 * 8 + 0x30) = *(long *)((long)local_58 + (long)(local_1b0 + -1) * 8 + 0x30) * *(long *)((long)local_58 + (long)(local_1b0 + -1) * 8 + 0x10); } *(int *)(local_8 + 0x14) = *(int *)(local_8 + 0x14) + 1; return local_58; }
48,494
mi_readinfo
eloqsql/storage/myisam/mi_locking.c
int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer) { DBUG_ENTER("_mi_readinfo"); if (info->lock_type == F_UNLCK) { MYISAM_SHARE *share=info->s; if (!share->tot_locks) { if (my_lock(share->kfile,lock_type,0L,F_TO_EOF, info->lock_wait | MY_SEEK_NOT_DONE)) DBUG_RETURN(1); if (mi_state_info_read_dsk(share->kfile, &share->state, 1)) { int error= my_errno ? my_errno : HA_ERR_FILE_TOO_SHORT; (void) my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF, MYF(MY_SEEK_NOT_DONE)); my_errno= error; DBUG_RETURN(1); } } if (check_keybuffer) (void) _mi_test_if_changed(info); info->invalidator=info->s->invalidator; } else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK) { my_errno=EACCES; /* Not allowed to change */ DBUG_RETURN(-1); /* when have read_lock() */ } DBUG_RETURN(0); }
O3
c
mi_readinfo: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl 0x1f4(%rdi), %ecx cmpl $0x2, %ecx jne 0x7c19f movl %edx, %r15d movq %rdi, %r14 movq (%rdi), %rbx cmpl $0x0, 0x368(%rbx) je 0x7c1be testl %r15d, %r15d je 0x7c187 movq %r14, %rdi callq 0x7bf4e movq (%r14), %rax movq 0x2f0(%rax), %rax movq %rax, 0x148(%r14) xorl %eax, %eax jmp 0x7c23b xorl $0x1, %esi xorl %eax, %eax orl %ecx, %esi jne 0x7c23b callq 0xa13e6 movl $0xd, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x7c23b movl 0x350(%rbx), %edi movq 0x330(%r14), %r8 orq $0x20, %r8 xorl %edx, %edx xorl %ecx, %ecx callq 0x9f484 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx jne 0x7c23b movl 0x350(%rbx), %edi movq %rbx, %rsi movl $0x1, %edx callq 0x7fad4 testl %eax, %eax je 0x7c17a callq 0xa13e6 cmpl $0x0, (%rax) je 0x7c20e callq 0xa13e6 movl (%rax), %r14d jmp 0x7c214 movl $0xaf, %r14d movl 0x350(%rbx), %edi movl $0x20, %r8d movl $0x2, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x9f484 callq 0xa13e6 movl %r14d, (%rax) movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_mi_readinfo: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ecx, [rdi+1F4h] cmp ecx, 2 jnz short loc_7C19F mov r15d, edx mov r14, rdi mov rbx, [rdi] cmp dword ptr [rbx+368h], 0 jz short loc_7C1BE loc_7C17A: test r15d, r15d jz short loc_7C187 mov rdi, r14 call _mi_test_if_changed loc_7C187: mov rax, [r14] mov rax, [rax+2F0h] mov [r14+148h], rax xor eax, eax jmp loc_7C23B loc_7C19F: xor esi, 1 xor eax, eax or esi, ecx jnz loc_7C23B call _my_thread_var mov dword ptr [rax], 0Dh mov eax, 0FFFFFFFFh jmp short loc_7C23B loc_7C1BE: mov edi, [rbx+350h] mov r8, [r14+330h] or r8, 20h xor edx, edx xor ecx, ecx call my_lock mov ecx, eax mov eax, 1 test ecx, ecx jnz short loc_7C23B mov edi, [rbx+350h] mov rsi, rbx mov edx, 1 call mi_state_info_read_dsk test eax, eax jz short loc_7C17A call _my_thread_var cmp dword ptr [rax], 0 jz short loc_7C20E call _my_thread_var mov r14d, [rax] jmp short loc_7C214 loc_7C20E: mov r14d, 0AFh loc_7C214: mov edi, [rbx+350h] mov r8d, 20h ; ' ' mov esi, 2 xor edx, edx xor ecx, ecx call my_lock call _my_thread_var mov [rax], r14d mov eax, 1 loc_7C23B: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mi_readinfo(long long *a1, long long a2, int a3) { int v3; // ecx long long v6; // rbx long long result; // rax int v8; // ecx long long v9; // rdi int v10; // r14d long long v11; // rdi v3 = *((_DWORD *)a1 + 125); if ( v3 == 2 ) { v6 = *a1; if ( *(_DWORD *)(*a1 + 872) ) goto LABEL_3; v8 = my_lock(*(unsigned int *)(v6 + 848), a2, 0LL, 0LL, a1[102] | 0x20); result = 1LL; if ( v8 ) return result; v9 = *(unsigned int *)(v6 + 848); if ( !(unsigned int)mi_state_info_read_dsk(v9, v6, 1LL) ) { LABEL_3: if ( a3 ) mi_test_if_changed(a1); a1[41] = *(_QWORD *)(*a1 + 752); return 0LL; } else { if ( *(_DWORD *)my_thread_var(v9) ) v10 = *(_DWORD *)my_thread_var(v9); else v10 = 175; v11 = *(unsigned int *)(v6 + 848); my_lock(v11, 2LL, 0LL, 0LL, 32LL); *(_DWORD *)my_thread_var(v11) = v10; return 1LL; } } else { result = 0LL; if ( !(v3 | (unsigned int)a2 ^ 1) ) { *(_DWORD *)my_thread_var(a1) = 13; return 0xFFFFFFFFLL; } } return result; }
_mi_readinfo: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV ECX,dword ptr [RDI + 0x1f4] CMP ECX,0x2 JNZ 0x0017c19f MOV R15D,EDX MOV R14,RDI MOV RBX,qword ptr [RDI] CMP dword ptr [RBX + 0x368],0x0 JZ 0x0017c1be LAB_0017c17a: TEST R15D,R15D JZ 0x0017c187 MOV RDI,R14 CALL 0x0017bf4e LAB_0017c187: MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + 0x2f0] MOV qword ptr [R14 + 0x148],RAX XOR EAX,EAX JMP 0x0017c23b LAB_0017c19f: XOR ESI,0x1 XOR EAX,EAX OR ESI,ECX JNZ 0x0017c23b CALL 0x001a13e6 MOV dword ptr [RAX],0xd MOV EAX,0xffffffff JMP 0x0017c23b LAB_0017c1be: MOV EDI,dword ptr [RBX + 0x350] MOV R8,qword ptr [R14 + 0x330] OR R8,0x20 XOR EDX,EDX XOR ECX,ECX CALL 0x0019f484 MOV ECX,EAX MOV EAX,0x1 TEST ECX,ECX JNZ 0x0017c23b MOV EDI,dword ptr [RBX + 0x350] MOV RSI,RBX MOV EDX,0x1 CALL 0x0017fad4 TEST EAX,EAX JZ 0x0017c17a CALL 0x001a13e6 CMP dword ptr [RAX],0x0 JZ 0x0017c20e CALL 0x001a13e6 MOV R14D,dword ptr [RAX] JMP 0x0017c214 LAB_0017c20e: MOV R14D,0xaf LAB_0017c214: MOV EDI,dword ptr [RBX + 0x350] MOV R8D,0x20 MOV ESI,0x2 XOR EDX,EDX XOR ECX,ECX CALL 0x0019f484 CALL 0x001a13e6 MOV dword ptr [RAX],R14D MOV EAX,0x1 LAB_0017c23b: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 _mi_readinfo(long *param_1,int8 param_2,int param_3) { long lVar1; int iVar2; int *piVar3; int4 *puVar4; int4 uVar5; if (*(int *)((long)param_1 + 500) != 2) { if ((int)param_2 != 1 || *(int *)((long)param_1 + 500) != 0) { return 0; } puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0xd; return 0xffffffff; } lVar1 = *param_1; if (*(int *)(lVar1 + 0x368) == 0) { iVar2 = my_lock(*(int4 *)(lVar1 + 0x350),param_2,0,0,param_1[0x66] | 0x20); if (iVar2 != 0) { return 1; } iVar2 = mi_state_info_read_dsk(*(int4 *)(lVar1 + 0x350),lVar1,1); if (iVar2 != 0) { piVar3 = (int *)_my_thread_var(); if (*piVar3 == 0) { uVar5 = 0xaf; } else { puVar4 = (int4 *)_my_thread_var(); uVar5 = *puVar4; } my_lock(*(int4 *)(lVar1 + 0x350),2,0,0,0x20); puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar5; return 1; } } if (param_3 != 0) { _mi_test_if_changed(param_1); } param_1[0x29] = *(long *)(*param_1 + 0x2f0); return 0; }
48,495
ma_update_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_update_static_record(MARIA_HA *info, MARIA_RECORD_POS pos, const uchar *oldrec __attribute__ ((unused)), const uchar *record) { info->rec_cache.seek_not_done=1; /* We have done a seek */ return (info->s->file_write(info, record, info->s->base.reclength, pos, MYF(MY_NABP)) != 0); }
O0
c
ma_update_static_record: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movq 0x398(%rcx), %rdx movq -0x10(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax setne %al andb $0x1, %al movzbl %al, %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_update_static_record: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov dword ptr [rax+598h], 1 mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rcx, [rbp+var_8] mov rcx, [rcx] mov rdx, [rcx+398h] mov rcx, [rbp+var_10] mov r8d, 4 call rax cmp rax, 0 setnz al and al, 1 movzx eax, al add rsp, 20h pop rbp retn
_BOOL8 ma_update_static_record(_DWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6) { a1[358] = 1; return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long, long long, long long, long long, long long, _DWORD *))(*(_QWORD *)a1 + 1768LL))( a1, a4, *(_QWORD *)(*(_QWORD *)a1 + 920LL), a2, 4LL, a6, a4, a3, a2, a1) != 0; }
_ma_update_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x598],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x398] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,0x4 CALL RAX CMP RAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL ADD RSP,0x20 POP RBP RET
bool _ma_update_static_record (long *param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { long lVar1; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8)) (param_1,param_4,*(int8 *)(*param_1 + 0x398),param_2,4,param_6,param_4, param_3); return lVar1 != 0; }
48,496
mysql_real_query_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_real_query_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_real_query, (parms->mysql, parms->stmt_str, parms->length), parms->mysql, int, r_int) }
O0
c
mysql_real_query_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx callq 0x1d170 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_real_query_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] call mysql_real_query mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_real_query_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_real_query(*a1, a1[1], a1[2]); result = v2; *v2 = 0; return result; }
mysql_real_query_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] CALL 0x0011d170 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_real_query_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_real_query(*param_1,param_1[1],param_1[2]); puVar1[2] = uVar2; *puVar1 = 0; return; }
48,497
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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx xorl %esi, %esi callq 0x3cfe0 movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x3d080 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x3d000 leaq 0x20(%rsp), %rdi pushq $0x1 popq %rsi movq %rbx, %rdx callq 0x3d0c6 leaq 0x20(%rsp), %rdi callq 0x3d490 movq %rsp, %rdi callq 0x47a12 movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x3d490 jmp 0x67338 movq %rax, %r14 movq %rsp, %rdi callq 0x47a12 jmp 0x67345 movq %rax, %r14 movq %rbx, %rdi callq 0x3cfcc movq %r14, %rdi callq 0x23f80 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) mov r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_F8] push 1 pop rsi mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) lea rdi, [rsp+118h+var_F8]; this call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rdi, [rsp+arg_18]; this call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_67338 mov r14, rax loc_67338: mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_67345 mov r14, rax loc_67345: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov rdi, r14 call __Unwind_Resume
_BYTE * 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>::parse<std::string&>( _BYTE *a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 int v10; // ecx int v11; // r8d int v12; // r9d __int128 v14[2]; // [rsp+0h] [rbp-118h] BYREF _BYTE v15[248]; // [rsp+20h] [rbp-F8h] BYREF nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json((long long)a1); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( v14, a3); 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v15, v8, v8 + v9, v14, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v15, 1, a1, v10, v11, v12); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser((std::_Function_base *)v15); std::_Function_base::~_Function_base((std::_Function_base *)v14); return a1; }
parse<std::__cxx11::string&>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI XOR ESI,ESI CALL 0x0013cfe0 MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_001672c6: MOV RDI,RSP MOV RSI,R13 CALL 0x0013d080 ADD R12,R15 LAB_001672d4: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x0013d000 LAB_001672ef: LEA RDI,[RSP + 0x20] PUSH 0x1 POP RSI MOV RDX,RBX CALL 0x0013d0c6 LAB_001672ff: LEA RDI,[RSP + 0x20] CALL 0x0013d490 MOV RDI,RSP CALL 0x00147a12 MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::parse<std::__cxx11::string&>(std::__cxx11::string&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string&> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> afStack_118 [32]; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [200]; basic_json((_func_decltype_nullptr *)this); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 001672c6 to 001672d0 has its CatchHandler @ 00167342 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(afStack_118,param_3); /* try { // try from 001672d4 to 001672ee has its CatchHandler @ 00167335 */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 001672ef to 001672fe has its CatchHandler @ 00167326 */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,this); detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~parser(local_f8); std::_Function_base::~_Function_base((_Function_base *)afStack_118); return this; }
48,498
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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x5834c movq %rbx, %rdi movl $0x1, %esi callq 0x5834c movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x57cee addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x57c42 leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x57d4c leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x5887e movq -0x18(%r14), %rax testq %rax, %rax je 0x8bda9 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0x8bdc0 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x8be04 jmp 0x8be04 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x5831e jmp 0x8bdeb movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0x8be0f movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x8be0f movq %rax, %rdi callq 0x21927 movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x5834c movq %rbx, %rdi callq 0x5d83a movq %r14, %rdi callq 0x1af80 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_8BDA9 lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_8BDA9: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_8BDC0 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_8BDC0: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_8BE04 jmp short loc_8BE04 mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_8BDEB mov r14, rax loc_8BDEB: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_8BE0F mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_8BE0F loc_8BE04: mov rdi, rax call __clang_call_terminate mov r14, rax loc_8BE0F: 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, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 __int128 v11; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( &v11, a3); 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v13, v8, v8 + v9, &v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v13, 1, (_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(&v11, &v11, 3LL); return a1; }
parse<std::__cxx11::string&>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x0015834c MOV RDI,RBX MOV ESI,0x1 CALL 0x0015834c MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_0018bd49: MOV RDI,RSP MOV RSI,R13 CALL 0x00157cee ADD R12,R15 LAB_0018bd57: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x00157c42 LAB_0018bd72: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x00157d4c LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x0015887e MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x0018bda9 LAB_0018bd9a: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0018bda9: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0018bdc0 LAB_0018bdb3: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0018bdc0: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::parse<std::__cxx11::string&>(std::__cxx11::string&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string&> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> afStack_118 [16]; code *local_108; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 0018bd49 to 0018bd53 has its CatchHandler @ 0018be0c */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(afStack_118,param_3); /* try { // try from 0018bd57 to 0018bd71 has its CatchHandler @ 0018bde8 */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 0018bd72 to 0018bd83 has its CatchHandler @ 0018bdd9 */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 0018bd9a to 0018bda8 has its CatchHandler @ 0018bdd7 */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 0018bdb3 to 0018bdbf has its CatchHandler @ 0018bdd5 */ (*local_108)(afStack_118,afStack_118,3); } return this; }
48,499
mysql_next_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_next_result(MYSQL *mysql) { /* make sure communication is not blocking */ if (mysql->status != MYSQL_STATUS_READY) { SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } /* clear error, and mysql status variables */ CLEAR_CLIENT_ERROR(mysql); mysql->affected_rows = (ulonglong) ~0; if (mysql->server_status & SERVER_MORE_RESULTS_EXIST) { return(mysql->methods->db_read_query_result(mysql)); } return(-1); }
O0
c
mysql_next_result: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x488(%rax) je 0x37b3a jmp 0x37acb movq -0x10(%rbp), %rax movl $0x7de, 0x90(%rax) # imm = 0x7DE movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x493b5(%rip), %rax # 0x80ea0 movq (%rax), %rsi movl $0x5, %edx callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x4939b(%rip), %rax # 0x80eb0 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movl $0x1, -0x4(%rbp) jmp 0x37bd0 jmp 0x37b3c movq -0x10(%rbp), %rax movl $0x0, 0x90(%rax) movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x33053(%rip), %rsi # 0x6abaf callq 0x143d0 movq -0x10(%rbp), %rax movb $0x0, 0x97(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x2a0(%rax) je 0x37b8c movq -0x10(%rbp), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0x37b8e movq -0x10(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x10(%rbp), %rax movl 0x380(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x37bc9 movq -0x10(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) jmp 0x37bd0 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopl (%rax)
mysql_next_result: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp dword ptr [rax+488h], 0 jz short loc_37B3A jmp short $+2 loc_37ACB: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7DEh mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov [rbp+var_4], 1 jmp loc_37BD0 loc_37B3A: jmp short $+2 loc_37B3C: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 0 mov rdi, [rbp+var_10] add rdi, 297h lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_10] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+2A0h], 0 jz short loc_37B8C mov rax, [rbp+var_10] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_37B8C: jmp short $+2 loc_37B8E: mov rax, [rbp+var_10] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov eax, [rax+380h] and eax, 8 cmp eax, 0 jz short loc_37BC9 mov rax, [rbp+var_10] mov rax, [rax+4D0h] mov rax, [rax+20h] mov rdi, [rbp+var_10] call rax mov [rbp+var_4], eax jmp short loc_37BD0 loc_37BC9: mov [rbp+var_4], 0FFFFFFFFh loc_37BD0: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long mysql_next_result(long long a1) { if ( *(_DWORD *)(a1 + 1160) ) { *(_DWORD *)(a1 + 144) = 2014; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; strncpy(a1 + 151, client_errors[14], 511LL); *(_BYTE *)(a1 + 662) = 0; return 1; } else { *(_DWORD *)(a1 + 144) = 0; strcpy(a1 + 663, "00000"); *(_BYTE *)(a1 + 151) = 0; if ( *(_QWORD *)(a1 + 672) ) *(_DWORD *)(*(_QWORD *)(a1 + 672) + 4LL) = 0; *(_QWORD *)(a1 + 824) = -1LL; if ( (*(_DWORD *)(a1 + 896) & 8) != 0 ) return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(a1 + 1232) + 32LL))(a1); else return (unsigned int)-1; } }
mysql_next_result: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x0 JZ 0x00137b3a JMP 0x00137acb LAB_00137acb: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7de MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x180ea0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x180eb0] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00137bd0 LAB_00137b3a: JMP 0x00137b3c LAB_00137b3c: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RSI,[0x16abaf] CALL 0x001143d0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x00137b8c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_00137b8c: JMP 0x00137b8e LAB_00137b8e: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x338],-0x1 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x380] AND EAX,0x8 CMP EAX,0x0 JZ 0x00137bc9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x20] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x00137bd0 LAB_00137bc9: MOV dword ptr [RBP + -0x4],0xffffffff LAB_00137bd0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 mysql_next_result(long param_1) { int4 local_c; if (*(int *)(param_1 + 0x488) == 0) { *(int4 *)(param_1 + 0x90) = 0; strcpy((char *)(param_1 + 0x297),"00000"); *(int1 *)(param_1 + 0x97) = 0; if (*(long *)(param_1 + 0x2a0) != 0) { *(int4 *)(*(long *)(param_1 + 0x2a0) + 4) = 0; } *(int8 *)(param_1 + 0x338) = 0xffffffffffffffff; if ((*(uint *)(param_1 + 0x380) & 8) == 0) { local_c = 0xffffffff; } else { local_c = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1); } } else { *(int4 *)(param_1 + 0x90) = 0x7de; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_00180f20,0x1ff); *(int1 *)(param_1 + 0x296) = 0; local_c = 1; } return local_c; }