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
51,500
thr_downgrade_write_lock
eloqsql/mysys/thr_lock.c
void thr_downgrade_write_lock(THR_LOCK_DATA *in_data, enum thr_lock_type new_lock_type) { THR_LOCK *lock=in_data->lock; #ifdef DBUG_ASSERT_EXISTS enum thr_lock_type old_lock_type= in_data->type; #endif DBUG_ENTER("thr_downgrade_write_only_lock"); mysql_mutex_lock(&lock->mutex); DBUG_ASSERT(old_lock_type == TL_WRITE_ONLY); DBUG_ASSERT(old_lock_type > new_lock_type); in_data->type= new_lock_type; check_locks(lock,"after downgrading lock", old_lock_type, 0); mysql_mutex_unlock(&lock->mutex); DBUG_VOID_RETURN; }
O0
c
thr_downgrade_write_lock: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi addq $0x18, %rdi leaq 0x5b6a5(%rip), %rsi # 0x15467f movl $0x591, %edx # imm = 0x591 callq 0xf78d0 jmp 0xf8fe6 jmp 0xf8fe8 jmp 0xf8fea movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x40(%rax) movq -0x18(%rbp), %rdi addq $0x18, %rdi callq 0xf7940 jmp 0xf9003 addq $0x20, %rsp popq %rbp retq nopl (%rax)
thr_downgrade_write_lock: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_18], rax mov rdi, [rbp+var_18] add rdi, 18h lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 591h call inline_mysql_mutex_lock_27 jmp short $+2 loc_F8FE6: jmp short $+2 loc_F8FE8: jmp short $+2 loc_F8FEA: mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+40h], ecx mov rdi, [rbp+var_18] add rdi, 18h call inline_mysql_mutex_unlock_28 jmp short $+2 loc_F9003: add rsp, 20h pop rbp retn
long long thr_downgrade_write_lock(long long a1, int a2) { long long v3; // [rsp+8h] [rbp-18h] v3 = *(_QWORD *)(a1 + 24); inline_mysql_mutex_lock_27(v3 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x591u); *(_DWORD *)(a1 + 64) = a2; return inline_mysql_mutex_unlock_28(v3 + 24); }
thr_downgrade_write_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x18 LEA RSI,[0x25467f] MOV EDX,0x591 CALL 0x001f78d0 JMP 0x001f8fe6 LAB_001f8fe6: JMP 0x001f8fe8 LAB_001f8fe8: JMP 0x001f8fea LAB_001f8fea: MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x40],ECX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x18 CALL 0x001f7940 JMP 0x001f9003 LAB_001f9003: ADD RSP,0x20 POP RBP RET
void thr_downgrade_write_lock(long param_1,int4 param_2) { long lVar1; lVar1 = *(long *)(param_1 + 0x18); inline_mysql_mutex_lock (lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x591); *(int4 *)(param_1 + 0x40) = param_2; inline_mysql_mutex_unlock(lVar1 + 0x18); return; }
51,501
thr_downgrade_write_lock
eloqsql/mysys/thr_lock.c
void thr_downgrade_write_lock(THR_LOCK_DATA *in_data, enum thr_lock_type new_lock_type) { THR_LOCK *lock=in_data->lock; #ifdef DBUG_ASSERT_EXISTS enum thr_lock_type old_lock_type= in_data->type; #endif DBUG_ENTER("thr_downgrade_write_only_lock"); mysql_mutex_lock(&lock->mutex); DBUG_ASSERT(old_lock_type == TL_WRITE_ONLY); DBUG_ASSERT(old_lock_type > new_lock_type); in_data->type= new_lock_type; check_locks(lock,"after downgrading lock", old_lock_type, 0); mysql_mutex_unlock(&lock->mutex); DBUG_VOID_RETURN; }
O3
c
thr_downgrade_write_lock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %esi, %r14d movq %rdi, %r15 movq 0x18(%rdi), %r12 leaq 0x18(%r12), %rbx cmpq $0x0, 0x58(%r12) jne 0xa36d7 movq %rbx, %rdi callq 0x29220 movl %r14d, 0x40(%r15) movq 0x58(%r12), %rdi testq %rdi, %rdi jne 0xa36ed movq %rbx, %rdi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x291e0 leaq 0x39113(%rip), %rsi # 0xdc7f1 movq %rbx, %rdi movl $0x591, %edx # imm = 0x591 callq 0x2eb8f jmp 0xa36b9 leaq 0x2e291c(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0xa36c7
thr_downgrade_write_lock: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14d, esi mov r15, rdi mov r12, [rdi+18h] lea rbx, [r12+18h] cmp qword ptr [r12+58h], 0 jnz short loc_A36D7 mov rdi, rbx call _pthread_mutex_lock loc_A36B9: mov [r15+40h], r14d mov rdi, [r12+58h] test rdi, rdi jnz short loc_A36ED loc_A36C7: mov rdi, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_A36D7: lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 591h call psi_mutex_lock jmp short loc_A36B9 loc_A36ED: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_A36C7
long long thr_downgrade_write_lock(long long a1, int a2) { long long v2; // r12 v2 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v2 + 88) ) psi_mutex_lock(v2 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x591u); else pthread_mutex_lock(v2 + 24); *(_DWORD *)(a1 + 64) = a2; if ( *(_QWORD *)(v2 + 88) ) PSI_server[44](); return pthread_mutex_unlock(v2 + 24); }
thr_downgrade_write_lock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,ESI MOV R15,RDI MOV R12,qword ptr [RDI + 0x18] LEA RBX,[R12 + 0x18] CMP qword ptr [R12 + 0x58],0x0 JNZ 0x001a36d7 MOV RDI,RBX CALL 0x00129220 LAB_001a36b9: MOV dword ptr [R15 + 0x40],R14D MOV RDI,qword ptr [R12 + 0x58] TEST RDI,RDI JNZ 0x001a36ed LAB_001a36c7: MOV RDI,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001291e0 LAB_001a36d7: LEA RSI,[0x1dc7f1] MOV RDI,RBX MOV EDX,0x591 CALL 0x0012eb8f JMP 0x001a36b9 LAB_001a36ed: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a36c7
void thr_downgrade_write_lock(long param_1,int4 param_2) { pthread_mutex_t *__mutex; long lVar1; lVar1 = *(long *)(param_1 + 0x18); __mutex = (pthread_mutex_t *)(lVar1 + 0x18); if (*(long *)(lVar1 + 0x58) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x591); } *(int4 *)(param_1 + 0x40) = param_2; if (*(long *)(lVar1 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return; }
51,502
eval_num_suffix_ull
eloqsql/mysys/my_getopt.c
static ulonglong eval_num_suffix_ull(char *argument, int *error, char *option_name) { char *endchar; ulonglong num; DBUG_ENTER("eval_num_suffix_ull"); if (*argument == '-') { my_getopt_error_reporter(ERROR_LEVEL, "Incorrect unsigned value: '%s' for %s", argument, option_name); *error= 1; DBUG_RETURN(0); } *error= 0; errno= 0; num= strtoull(argument, &endchar, 10); if (errno == ERANGE) { my_getopt_error_reporter(ERROR_LEVEL, "Incorrect integer value: '%s' for %s", argument, option_name); *error= 1; DBUG_RETURN(0); } num*= eval_num_suffix(endchar, error); if (*error) my_getopt_error_reporter(ERROR_LEVEL, "Unknown suffix '%c' used for variable '%s' (value '%s')", *endchar, option_name, argument); DBUG_RETURN(num); }
O0
c
eval_num_suffix_ull: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0xf4ac7 leaq 0x1d5f09(%rip), %rax # 0x2ca9a0 movq (%rax), %r8 movq -0x10(%rbp), %rdx movq -0x20(%rbp), %rcx xorl %edi, %edi leaq 0x68677(%rip), %rsi # 0x15d122 movb $0x0, %al callq *%r8 movq -0x18(%rbp), %rax movl $0x1, (%rax) movq $0x0, -0x8(%rbp) jmp 0xf4b80 movq -0x18(%rbp), %rax movl $0x0, (%rax) callq 0x2a7a0 movl $0x0, (%rax) movq -0x10(%rbp), %rdi leaq -0x28(%rbp), %rsi movl $0xa, %edx callq 0x2a0a0 movq %rax, -0x30(%rbp) callq 0x2a7a0 cmpl $0x22, (%rax) jne 0xf4b30 leaq 0x1d5e9d(%rip), %rax # 0x2ca9a0 movq (%rax), %r8 movq -0x10(%rbp), %rdx movq -0x20(%rbp), %rcx xorl %edi, %edi leaq 0x68631(%rip), %rsi # 0x15d148 movb $0x0, %al callq *%r8 movq -0x18(%rbp), %rax movl $0x1, (%rax) movq $0x0, -0x8(%rbp) jmp 0xf4b80 movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xf49c0 imulq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0xf4b76 leaq 0x1d5e4a(%rip), %rax # 0x2ca9a0 movq (%rax), %r9 movq -0x28(%rbp), %rax movsbl (%rax), %edx movq -0x20(%rbp), %rcx movq -0x10(%rbp), %r8 xorl %edi, %edi leaq 0x685fc(%rip), %rsi # 0x15d16d movb $0x0, %al callq *%r9 jmp 0xf4b78 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
eval_num_suffix_ull: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_F4AC7 lea rax, my_getopt_error_reporter mov r8, [rax] mov rdx, [rbp+var_10] mov rcx, [rbp+var_20] xor edi, edi lea rsi, aIncorrectUnsig; "Incorrect unsigned value: '%s' for %s" mov al, 0 call r8 mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov [rbp+var_8], 0 jmp loc_F4B80 loc_F4AC7: mov rax, [rbp+var_18] mov dword ptr [rax], 0 call ___errno_location mov dword ptr [rax], 0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_28] mov edx, 0Ah call ___isoc23_strtoul mov [rbp+var_30], rax call ___errno_location cmp dword ptr [rax], 22h ; '"' jnz short loc_F4B30 lea rax, my_getopt_error_reporter mov r8, [rax] mov rdx, [rbp+var_10] mov rcx, [rbp+var_20] xor edi, edi lea rsi, aIncorrectInteg_0; "Incorrect integer value: '%s' for %s" mov al, 0 call r8 mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov [rbp+var_8], 0 jmp short loc_F4B80 loc_F4B30: mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] call eval_num_suffix imul rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_F4B76 lea rax, my_getopt_error_reporter mov r9, [rax] mov rax, [rbp+var_28] movsx edx, byte ptr [rax] mov rcx, [rbp+var_20] mov r8, [rbp+var_10] xor edi, edi lea rsi, aUnknownSuffixC_0; "Unknown suffix '%c' used for variable '"... mov al, 0 call r9 loc_F4B76: jmp short $+2 loc_F4B78: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_F4B80: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long eval_num_suffix_ull(const char *a1, _DWORD *a2, const char *a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+0h] [rbp-30h] _BYTE *v6; // [rsp+8h] [rbp-28h] BYREF const char *v7; // [rsp+10h] [rbp-20h] _DWORD *v8; // [rsp+18h] [rbp-18h] const char *v9; // [rsp+20h] [rbp-10h] v9 = a1; v8 = a2; v7 = a3; if ( *a1 == 45 ) { my_getopt_error_reporter(0, (long long)"Incorrect unsigned value: '%s' for %s", v9, v7); *v8 = 1; return 0LL; } else { *v8 = 0; *(_DWORD *)__errno_location() = 0; v4 = __isoc23_strtoul(v9, &v6, 10LL); if ( *(_DWORD *)__errno_location() == 34 ) { my_getopt_error_reporter(0, (long long)"Incorrect integer value: '%s' for %s", v9, v7); *v8 = 1; return 0LL; } else { v5 = v4 * eval_num_suffix(v6, v8); if ( *v8 ) my_getopt_error_reporter( 0, (long long)"Unknown suffix '%c' used for variable '%s' (value '%s')", (unsigned int)(char)*v6, v7, v9); return v5; } } }
eval_num_suffix_ull: 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 RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x001f4ac7 LEA RAX,[0x3ca9a0] MOV R8,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] XOR EDI,EDI LEA RSI,[0x25d122] MOV AL,0x0 CALL R8 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001f4b80 LAB_001f4ac7: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x0 CALL 0x0012a7a0 MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x28] MOV EDX,0xa CALL 0x0012a0a0 MOV qword ptr [RBP + -0x30],RAX CALL 0x0012a7a0 CMP dword ptr [RAX],0x22 JNZ 0x001f4b30 LEA RAX,[0x3ca9a0] MOV R8,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] XOR EDI,EDI LEA RSI,[0x25d148] MOV AL,0x0 CALL R8 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001f4b80 LAB_001f4b30: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001f49c0 IMUL RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x001f4b76 LEA RAX,[0x3ca9a0] MOV R9,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOVSX EDX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x10] XOR EDI,EDI LEA RSI,[0x25d16d] MOV AL,0x0 CALL R9 LAB_001f4b76: JMP 0x001f4b78 LAB_001f4b78: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_001f4b80: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long eval_num_suffix_ull(char *param_1,int *param_2,int8 param_3) { int *piVar1; long lVar2; char *local_30; int8 local_28; int *local_20; char *local_18; long local_10; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (*param_1 == '-') { (*(code *)my_getopt_error_reporter)(0,"Incorrect unsigned value: \'%s\' for %s",param_1,param_3) ; *local_20 = 1; local_10 = 0; } else { *param_2 = 0; piVar1 = __errno_location(); *piVar1 = 0; lVar2 = __isoc23_strtoul(local_18,&local_30,10); piVar1 = __errno_location(); if (*piVar1 == 0x22) { (*(code *)my_getopt_error_reporter) (0,"Incorrect integer value: \'%s\' for %s",local_18,local_28); *local_20 = 1; local_10 = 0; } else { local_10 = eval_num_suffix(local_30,local_20); local_10 = local_10 * lVar2; if (*local_20 != 0) { (*(code *)my_getopt_error_reporter) (0,"Unknown suffix \'%c\' used for variable \'%s\' (value \'%s\')",(int)*local_30, local_28,local_18); } } } return local_10; }
51,503
nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)())
ng-log[P]ng-log/src/logging.cc
ErrnoLogMessage::ErrnoLogMessage(const char* file, int line, LogSeverity severity, int64 ctr, void (LogMessage::*send_method)()) : LogMessage(file, line, severity, ctr, send_method) {}
O1
cpp
nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)()): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, (%rsp) movl %ecx, %ebp movl %edx, %r14d movq %rsi, %r15 movq %rdi, %r12 movq 0x40(%rsp), %r13 movq 0x48(%rsp), %rbx movq $0x0, (%rdi) addq $0x10, %rdi callq 0xf454 movq %r12, %rdi movq %r15, %rsi movl %r14d, %edx movl %ebp, %ecx movq %r13, %r8 movq %rbx, %r9 callq 0xab92 movq 0x8(%r12), %rax movq (%rsp), %rcx movq %rcx, 0x7580(%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN5nglog15ErrnoLogMessageC2EPKciNS_11LogSeverityElMNS_10LogMessageEFvvE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], r8 mov ebp, ecx mov r14d, edx mov r15, rsi mov r12, rdi mov r13, [rsp+38h+arg_0] mov rbx, [rsp+38h+arg_8] mov qword ptr [rdi], 0 add rdi, 10h; this call _ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void) mov rdi, r12 mov rsi, r15 mov edx, r14d mov ecx, ebp mov r8, r13 mov r9, rbx call _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void)) mov rax, [r12+8] mov rcx, [rsp+38h+var_38] mov [rax+7580h], rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nglog::ErrnoLogMessage::ErrnoLogMessage( _QWORD *a1, nglog::tools *a2, int a3, int a4, long long a5, long long a6, long long a7, long long a8) { long long result; // rax *a1 = 0LL; nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2)); nglog::LogMessage::Init((long long)a1, a2, a3, a4, a7, a8); result = a1[1]; *(_QWORD *)(result + 30080) = a5; return result; }
ErrnoLogMessage: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],R8 MOV EBP,ECX MOV R14D,EDX MOV R15,RSI MOV R12,RDI MOV R13,qword ptr [RSP + 0x40] MOV RBX,qword ptr [RSP + 0x48] MOV qword ptr [RDI],0x0 ADD RDI,0x10 CALL 0x0010f454 MOV RDI,R12 MOV RSI,R15 MOV EDX,R14D MOV ECX,EBP MOV R8,R13 MOV R9,RBX CALL 0x0010ab92 MOV RAX,qword ptr [R12 + 0x8] MOV RCX,qword ptr [RSP] MOV qword ptr [RAX + 0x7580],RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)()) */ void __thiscall nglog::ErrnoLogMessage::ErrnoLogMessage (ErrnoLogMessage *this,int8 param_1,int4 param_2,int4 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8) { *(int8 *)this = 0; LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10)); LogMessage::Init(this,param_1,param_2,param_4,param_7,param_8); *(int8 *)(*(long *)(this + 8) + 0x7580) = param_5; return; }
51,504
nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)())
ng-log[P]ng-log/src/logging.cc
ErrnoLogMessage::ErrnoLogMessage(const char* file, int line, LogSeverity severity, int64 ctr, void (LogMessage::*send_method)()) : LogMessage(file, line, severity, ctr, send_method) {}
O3
cpp
nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)()): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, (%rsp) movl %ecx, %ebp movl %edx, %r14d movq %rsi, %r15 movq %rdi, %r12 movq 0x40(%rsp), %r13 movq 0x48(%rsp), %rbx movq $0x0, (%rdi) addq $0x10, %rdi callq 0xf21e movq %r12, %rdi movq %r15, %rsi movl %r14d, %edx movl %ebp, %ecx movq %r13, %r8 movq %rbx, %r9 callq 0xa996 movq 0x8(%r12), %rax movq (%rsp), %rcx movq %rcx, 0x7580(%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN5nglog15ErrnoLogMessageC2EPKciNS_11LogSeverityElMNS_10LogMessageEFvvE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], r8 mov ebp, ecx mov r14d, edx mov r15, rsi mov r12, rdi mov r13, [rsp+38h+arg_0] mov rbx, [rsp+38h+arg_8] mov qword ptr [rdi], 0 add rdi, 10h; this call _ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void) mov rdi, r12 mov rsi, r15 mov edx, r14d mov ecx, ebp mov r8, r13 mov r9, rbx call _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void)) mov rax, [r12+8] mov rcx, [rsp+38h+var_38] mov [rax+7580h], rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nglog::ErrnoLogMessage::ErrnoLogMessage( _QWORD *a1, nglog::tools *a2, int a3, int a4, long long a5, long long a6, long long a7, long long a8) { long long result; // rax *a1 = 0LL; nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2)); nglog::LogMessage::Init((long long)a1, a2, a3, a4, a7, a8); result = a1[1]; *(_QWORD *)(result + 30080) = a5; return result; }
ErrnoLogMessage: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],R8 MOV EBP,ECX MOV R14D,EDX MOV R15,RSI MOV R12,RDI MOV R13,qword ptr [RSP + 0x40] MOV RBX,qword ptr [RSP + 0x48] MOV qword ptr [RDI],0x0 ADD RDI,0x10 CALL 0x0010f21e MOV RDI,R12 MOV RSI,R15 MOV EDX,R14D MOV ECX,EBP MOV R8,R13 MOV R9,RBX CALL 0x0010a996 MOV RAX,qword ptr [R12 + 0x8] MOV RCX,qword ptr [RSP] MOV qword ptr [RAX + 0x7580],RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::ErrnoLogMessage::ErrnoLogMessage(char const*, int, nglog::LogSeverity, long, void (nglog::LogMessage::*)()) */ void __thiscall nglog::ErrnoLogMessage::ErrnoLogMessage (ErrnoLogMessage *this,int8 param_1,int4 param_2,int4 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8) { *(int8 *)this = 0; LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10)); LogMessage::Init(this,param_1,param_2,param_4,param_7,param_8); *(int8 *)(*(long *)(this + 8) + 0x7580) = param_5; return; }
51,505
LefDefParser::lefwLayerRoutingCapMultiplier(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingCapMultiplier(double capMultiplier) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; if (!lefwIsRouting) return LEFW_BAD_DATA; // only routing calls this func if (prtSemiColon) { // the previous statement hasn't written the ; yet if (lefwWriteEncrypt) encPrint(lefwFile, (char*) ";\n"); else fprintf(lefwFile, ";\n"); prtSemiColon = 0; } if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " CAPMULTIPLIER %.11g ;\n", capMultiplier); else fprintf(lefwFile, " CAPMULTIPLIER %.11g ;\n", capMultiplier); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerRoutingCapMultiplier(double): pushq %rbx subq $0x10, %rsp leaq 0x1a6cd(%rip), %rbx # 0x24e00 movq (%rbx), %rcx testq %rcx, %rcx je 0xa78e leaq 0x1a90e(%rip), %rax # 0x25050 movl (%rax), %edx cmpl $0x1f, %edx je 0xa757 movl $0x2, %eax cmpl $0x7, %edx jne 0xa7f4 leaq 0x1a966(%rip), %rax # 0x250c4 cmpl $0x0, (%rax) je 0xa795 cmpb $0x1, 0x1a98a(%rip) # 0x250f4 jne 0xa7bf movsd %xmm0, 0x8(%rsp) cmpb $0x1, 0x1a973(%rip) # 0x250ec jne 0xa79c leaq 0xfa8e(%rip), %rsi # 0x1a210 movq %rcx, %rdi xorl %eax, %eax callq 0x18c35 jmp 0xa7b2 movl $0x1, %eax jmp 0xa7f4 movl $0x3, %eax jmp 0xa7f4 leaq 0xfa6d(%rip), %rdi # 0x1a210 movl $0x2, %esi movl $0x1, %edx callq 0x1110 movb $0x0, 0x1a93b(%rip) # 0x250f4 movsd 0x8(%rsp), %xmm0 movq (%rbx), %rdi cmpb $0x1, 0x1a923(%rip) # 0x250ec jne 0xa7db leaq 0x102ef(%rip), %rsi # 0x1aac1 movb $0x1, %al callq 0x18c35 jmp 0xa7e9 leaq 0x102df(%rip), %rsi # 0x1aac1 movb $0x1, %al callq 0x10f0 leaq 0x1a85c(%rip), %rax # 0x2504c incl (%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbx retq
_ZN12LefDefParser29lefwLayerRoutingCapMultiplierEd: push rbx sub rsp, 10h lea rbx, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rbx] test rcx, rcx jz short loc_A78E lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rax] cmp edx, 1Fh jz short loc_A757 mov eax, 2 cmp edx, 7 jnz loc_A7F4 loc_A757: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jz short loc_A795 cmp cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon jnz short loc_A7BF movsd [rsp+18h+var_10], xmm0 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_A79C lea rsi, aDividercharS+11h; ";\n" mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_A7B2 loc_A78E: mov eax, 1 jmp short loc_A7F4 loc_A795: mov eax, 3 jmp short loc_A7F4 loc_A79C: lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite loc_A7B2: mov cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon movsd xmm0, [rsp+18h+var_10] loc_A7BF: mov rdi, [rbx] cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_A7DB lea rsi, aCapmultiplier1; " CAPMULTIPLIER %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_A7E9 loc_A7DB: lea rsi, aCapmultiplier1; " CAPMULTIPLIER %.11g ;\n" mov al, 1 call _fprintf loc_A7E9: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax loc_A7F4: add rsp, 10h pop rbx retn
long long LefDefParser::lefwLayerRoutingCapMultiplier( LefDefParser *this, double a2, long long a3, long long a4, long long a5, int a6, int a7) { int v7; // ecx unsigned int v8; // edx long long result; // rax v7 = LefDefParser::lefwFile; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; v8 = LefDefParser::lefwState; if ( LefDefParser::lefwState == 31 || (result = 2LL, LefDefParser::lefwState == 7) ) { if ( LefDefParser::lefwIsRouting ) { if ( LefDefParser::prtSemiColon == 1 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)";\n", LefDefParser::lefwState, LefDefParser::lefwFile, a6, a7); else fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); LefDefParser::prtSemiColon = 0; } if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" CAPMULTIPLIER %.11g ;\n", v8, v7, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " CAPMULTIPLIER %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0LL; } else { return 3LL; } } return result; }
lefwLayerRoutingCapMultiplier: PUSH RBX SUB RSP,0x10 LEA RBX,[0x124e00] MOV RCX,qword ptr [RBX] TEST RCX,RCX JZ 0x0010a78e LEA RAX,[0x125050] MOV EDX,dword ptr [RAX] CMP EDX,0x1f JZ 0x0010a757 MOV EAX,0x2 CMP EDX,0x7 JNZ 0x0010a7f4 LAB_0010a757: LEA RAX,[0x1250c4] CMP dword ptr [RAX],0x0 JZ 0x0010a795 CMP byte ptr [0x001250f4],0x1 JNZ 0x0010a7bf MOVSD qword ptr [RSP + 0x8],XMM0 CMP byte ptr [0x001250ec],0x1 JNZ 0x0010a79c LEA RSI,[0x11a210] MOV RDI,RCX XOR EAX,EAX CALL 0x00118c35 JMP 0x0010a7b2 LAB_0010a78e: MOV EAX,0x1 JMP 0x0010a7f4 LAB_0010a795: MOV EAX,0x3 JMP 0x0010a7f4 LAB_0010a79c: LEA RDI,[0x11a210] MOV ESI,0x2 MOV EDX,0x1 CALL 0x00101110 LAB_0010a7b2: MOV byte ptr [0x001250f4],0x0 MOVSD XMM0,qword ptr [RSP + 0x8] LAB_0010a7bf: MOV RDI,qword ptr [RBX] CMP byte ptr [0x001250ec],0x1 JNZ 0x0010a7db LEA RSI,[0x11aac1] MOV AL,0x1 CALL 0x00118c35 JMP 0x0010a7e9 LAB_0010a7db: LEA RSI,[0x11aac1] MOV AL,0x1 CALL 0x001010f0 LAB_0010a7e9: LEA RAX,[0x12504c] INC dword ptr [RAX] XOR EAX,EAX LAB_0010a7f4: ADD RSP,0x10 POP RBX RET
/* LefDefParser::lefwLayerRoutingCapMultiplier(double) */ int8 LefDefParser::lefwLayerRoutingCapMultiplier(double param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else if ((lefwState == 0x1f) || (uVar1 = 2, lefwState == 7)) { if (lefwIsRouting == 0) { uVar1 = 3; } else { if (prtSemiColon == '\x01') { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,";\n"); } else { fwrite(";\n",2,1,lefwFile); } prtSemiColon = '\0'; } if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," CAPMULTIPLIER %.11g ;\n"); } else { fprintf(lefwFile," CAPMULTIPLIER %.11g ;\n",param_1); } lefwLines = lefwLines + 1; uVar1 = 0; } } return uVar1; }
51,506
testing::UnitTest::Run()
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
int UnitTest::Run() { const bool in_death_test_child_process = GTEST_FLAG_GET(internal_run_death_test).length() > 0; // Google Test implements this protocol for catching that a test // program exits before returning control to Google Test: // // 1. Upon start, Google Test creates a file whose absolute path // is specified by the environment variable // TEST_PREMATURE_EXIT_FILE. // 2. When Google Test has finished its work, it deletes the file. // // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before // running a Google-Test-based test program and check the existence // of the file at the end of the test execution to see if it has // exited prematurely. // If we are in the child process of a death test, don't // create/delete the premature exit file, as doing so is unnecessary // and will confuse the parent process. Otherwise, create/delete // the file upon entering/leaving this function. If the program // somehow exits before this function has a chance to return, the // premature-exit file will be left undeleted, causing a test runner // that understands the premature-exit-file protocol to report the // test as having failed. const internal::ScopedPrematureExitFile premature_exit_file( in_death_test_child_process ? nullptr : internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE")); // Captures the value of GTEST_FLAG(catch_exceptions). This value will be // used for the duration of the program. impl()->set_catch_exceptions(GTEST_FLAG_GET(catch_exceptions)); #if GTEST_OS_WINDOWS // Either the user wants Google Test to catch exceptions thrown by the // tests or this is executing in the context of death test child // process. In either case the user does not want to see pop-up dialogs // about crashes - they are expected. if (impl()->catch_exceptions() || in_death_test_child_process) { #if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT // SetErrorMode doesn't exist on CE. SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); #endif // !GTEST_OS_WINDOWS_MOBILE #if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE // Death test children can be terminated with _abort(). On Windows, // _abort() can show a dialog with a warning message. This forces the // abort message to go to stderr instead. _set_error_mode(_OUT_TO_STDERR); #endif #if defined(_MSC_VER) && !GTEST_OS_WINDOWS_MOBILE // In the debug version, Visual Studio pops up a separate dialog // offering a choice to debug the aborted program. We need to suppress // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement // executed. Google Test will notify the user of any unexpected // failure via stderr. if (!GTEST_FLAG_GET(break_on_failure)) _set_abort_behavior( 0x0, // Clear the following flags: _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. // In debug mode, the Windows CRT can crash with an assertion over invalid // input (e.g. passing an invalid file descriptor). The default handling // for these assertions is to pop up a dialog and wait for user input. // Instead ask the CRT to dump such assertions to stderr non-interactively. if (!IsDebuggerPresent()) { (void)_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); (void)_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); } #endif } #endif // GTEST_OS_WINDOWS return internal::HandleExceptionsInMethodIfSupported( impl(), &internal::UnitTestImpl::RunAllTests, "auxiliary test code (environments or event listeners)") ? 0 : 1; }
O1
cpp
testing::UnitTest::Run(): pushq %rbx subq $0x20, %rsp movq %rdi, %rbx cmpq $0x0, 0x412cda4(%rip) # 0x415ddd8 je 0x3103a xorl %esi, %esi jmp 0x31049 leaq 0x12a9d(%rip), %rdi # 0x43ade callq 0x9660 movq %rax, %rsi movq %rsp, %rdi callq 0x37bc8 movq 0x40(%rbx), %rdi movb 0x412cdda(%rip), %al # 0x415de35 movb %al, 0x258(%rdi) leaq 0x36(%rip), %rsi # 0x3109e leaq 0x12a88(%rip), %rcx # 0x43af7 xorl %edx, %edx callq 0x37c3b xorb $0x1, %al movzbl %al, %ebx movq %rsp, %rdi callq 0x37db4 movl %ebx, %eax addq $0x20, %rsp popq %rbx retq movq %rax, %rbx movq %rsp, %rdi callq 0x37db4 movq %rbx, %rdi callq 0x99a0
_ZN7testing8UnitTest3RunEv: push rbx sub rsp, 20h mov rbx, rdi cmp cs:qword_415DDD8, 0 jz short loc_3103A xor esi, esi jmp short loc_31049 loc_3103A: lea rdi, aTestPrematureE; "TEST_PREMATURE_EXIT_FILE" call _getenv mov rsi, rax; char * loc_31049: mov rdi, rsp; this call _ZN7testing8internal23ScopedPrematureExitFileC2EPKc; testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile(char const*) mov rdi, [rbx+40h] mov al, cs:_ZN7testing28FLAGS_gtest_catch_exceptionsE; testing::FLAGS_gtest_catch_exceptions mov [rdi+258h], al lea rsi, _ZN7testing8internal12UnitTestImpl11RunAllTestsEv; testing::internal::UnitTestImpl::RunAllTests(void) lea rcx, aAuxiliaryTestC; "auxiliary test code (environments or ev"... xor edx, edx call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(testing::internal::UnitTestImpl *,bool (testing::internal::UnitTestImpl::*)(void),char const*) xor al, 1 movzx ebx, al mov rdi, rsp; this call _ZN7testing8internal23ScopedPrematureExitFileD2Ev; testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile() mov eax, ebx add rsp, 20h pop rbx retn mov rbx, rax mov rdi, rsp; this call _ZN7testing8internal23ScopedPrematureExitFileD2Ev; testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile() mov rdi, rbx call __Unwind_Resume
long long testing::UnitTest::Run(testing::UnitTest *this) { const char *v1; // rsi long long v2; // rdi unsigned int v3; // ebx _BYTE v5[40]; // [rsp+0h] [rbp-28h] BYREF if ( qword_415DDD8 ) v1 = 0LL; else v1 = (const char *)getenv("TEST_PREMATURE_EXIT_FILE"); testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile( (testing::internal::ScopedPrematureExitFile *)v5, v1); v2 = *((_QWORD *)this + 8); *(_BYTE *)(v2 + 600) = testing::FLAGS_gtest_catch_exceptions; v3 = (unsigned __int8)testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>( v2, testing::internal::UnitTestImpl::RunAllTests, 0LL, "auxiliary test code (environments or event listeners)") ^ 1; testing::internal::ScopedPrematureExitFile::~ScopedPrematureExitFile((testing::internal::ScopedPrematureExitFile *)v5); return v3; }
Run: PUSH RBX SUB RSP,0x20 MOV RBX,RDI CMP qword ptr [0x0425ddd8],0x0 JZ 0x0013103a XOR ESI,ESI JMP 0x00131049 LAB_0013103a: LEA RDI,[0x143ade] CALL 0x00109660 MOV RSI,RAX LAB_00131049: MOV RDI,RSP CALL 0x00137bc8 MOV RDI,qword ptr [RBX + 0x40] MOV AL,byte ptr [0x0425de35] MOV byte ptr [RDI + 0x258],AL LAB_00131061: LEA RSI,[0x13109e] LEA RCX,[0x143af7] XOR EDX,EDX CALL 0x00137c3b LAB_00131076: XOR AL,0x1 MOVZX EBX,AL MOV RDI,RSP CALL 0x00137db4 MOV EAX,EBX ADD RSP,0x20 POP RBX RET
/* testing::UnitTest::Run() */ bool __thiscall testing::UnitTest::Run(UnitTest *this) { UnitTestImpl *pUVar1; bool bVar2; char *pcVar3; ScopedPrematureExitFile aSStack_28 [32]; if (DAT_0425ddd8 == 0) { pcVar3 = getenv("TEST_PREMATURE_EXIT_FILE"); } else { pcVar3 = (char *)0x0; } internal::ScopedPrematureExitFile::ScopedPrematureExitFile(aSStack_28,pcVar3); pUVar1 = *(UnitTestImpl **)(this + 0x40); pUVar1[600] = FLAGS_gtest_catch_exceptions; /* try { // try from 00131061 to 00131075 has its CatchHandler @ 0013108b */ bVar2 = internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> (pUVar1,internal::UnitTestImpl::RunAllTests,(char *)0x0); internal::ScopedPrematureExitFile::~ScopedPrematureExitFile(aSStack_28); return !bVar2; }
51,507
my_like_range_czech
eloqsql/strings/ctype-czech.c
static my_bool my_like_range_czech(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) { #ifdef EXAMPLE uchar value; const char *end=ptr+ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; for (; ptr != end && min_str != min_end ; ptr++) { if (*ptr == w_one) /* '_' in SQL */ { break; } if (*ptr == w_many) /* '%' in SQL */ { break; } if (*ptr == escape && ptr+1 != end) { ptr++; } /* Skip escape */ value = CZ_SORT_TABLE[0][(int) (uchar) *ptr]; if (value == 0) /* Ignore in the first pass */ { continue; } if (value <= 2) /* End of pass or end of string */ { break; } if (value == 255) /* Double char too compicated */ { break; } *min_str++= *max_str++ = *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; /* Because of key compression */ *max_str++ = max_sort_char; } return 0; #else return 1; #endif }
O0
c
my_like_range_czech: pushq %rbp movq %rsp, %rbp movl %r8d, -0x50(%rbp) movl %ecx, %eax movl -0x50(%rbp), %ecx movl %eax, -0x4c(%rbp) movq %rdx, %rax movl -0x4c(%rbp), %edx movq %rax, -0x48(%rbp) movq %rsi, %rax movq -0x48(%rbp), %rsi movq %rax, -0x40(%rbp) movq %rdi, %r8 movq -0x40(%rbp), %rdi movb %r9b, %al movq 0x30(%rbp), %r9 movq 0x28(%rbp), %r9 movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r9 movq 0x10(%rbp), %r9 movq %r8, -0x8(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %dl, -0x19(%rbp) movb %cl, -0x1a(%rbp) movb %al, -0x1b(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq 0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq 0x18(%rbp), %rax addq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x51(%rbp) je 0x3f695 movq 0x18(%rbp), %rax cmpq -0x38(%rbp), %rax setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al testb $0x1, %al jne 0x3f6a1 jmp 0x3f765 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1a(%rbp), %ecx cmpl %ecx, %eax jne 0x3f6b5 jmp 0x3f765 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1b(%rbp), %ecx cmpl %ecx, %eax jne 0x3f6c9 jmp 0x3f765 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x19(%rbp), %ecx cmpl %ecx, %eax jne 0x3f6f2 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x28(%rbp), %rax je 0x3f6f2 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq 0x18dfa7(%rip), %rax # 0x1cd6a0 movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movslq %ecx, %rcx movb (%rax,%rcx), %al movb %al, -0x1c(%rbp) movzbl -0x1c(%rbp), %eax cmpl $0x0, %eax jne 0x3f714 jmp 0x3f754 movzbl -0x1c(%rbp), %eax cmpl $0x2, %eax jg 0x3f71f jmp 0x3f765 movzbl -0x1c(%rbp), %eax cmpl $0xff, %eax jne 0x3f72c jmp 0x3f765 movq -0x10(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x3f678 movq -0x8(%rbp), %rax movl 0xc(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x3f788 movq 0x18(%rbp), %rcx movq -0x30(%rbp), %rax subq %rax, %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) jmp 0x3f793 movq 0x10(%rbp), %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x3f7ce movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x20, (%rax) movq 0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x20(%rbp) movb $0x39, (%rax) jmp 0x3f79e xorl %eax, %eax popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_like_range_czech: push rbp mov rbp, rsp mov [rbp+var_50], r8d mov eax, ecx mov ecx, [rbp+var_50] mov [rbp+var_4C], eax mov rax, rdx mov edx, [rbp+var_4C] mov [rbp+var_48], rax mov rax, rsi mov rsi, [rbp+var_48] mov [rbp+var_40], rax mov r8, rdi mov rdi, [rbp+var_40] mov al, r9b mov r9, [rbp+arg_20] mov r9, [rbp+arg_18] mov r9, [rbp+arg_10] mov r9, [rbp+arg_8] mov r9, [rbp+arg_0] mov [rbp+var_8], r8 mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], dl mov [rbp+var_1A], cl mov [rbp+var_1B], al mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+arg_8] mov [rbp+var_30], rax mov rax, [rbp+arg_8] add rax, [rbp+arg_0] mov [rbp+var_38], rax loc_3F678: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_51], al jz short loc_3F695 mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] setnz al mov [rbp+var_51], al loc_3F695: mov al, [rbp+var_51] test al, 1 jnz short loc_3F6A1 jmp loc_3F765 loc_3F6A1: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1A] cmp eax, ecx jnz short loc_3F6B5 jmp loc_3F765 loc_3F6B5: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1B] cmp eax, ecx jnz short loc_3F6C9 jmp loc_3F765 loc_3F6C9: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_19] cmp eax, ecx jnz short loc_3F6F2 mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_28] jz short loc_3F6F2 mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax loc_3F6F2: mov rax, cs:CZ_SORT_TABLE mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] movsxd rcx, ecx mov al, [rax+rcx] mov [rbp+var_1C], al movzx eax, [rbp+var_1C] cmp eax, 0 jnz short loc_3F714 jmp short loc_3F754 loc_3F714: movzx eax, [rbp+var_1C] cmp eax, 2 jg short loc_3F71F jmp short loc_3F765 loc_3F71F: movzx eax, [rbp+var_1C] cmp eax, 0FFh jnz short loc_3F72C jmp short loc_3F765 loc_3F72C: mov rax, [rbp+var_10] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl loc_3F754: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_3F678 loc_3F765: mov rax, [rbp+var_8] mov eax, [rax+0Ch] and eax, 10h cmp eax, 0 jz short loc_3F788 mov rcx, [rbp+arg_8] mov rax, [rbp+var_30] sub rcx, rax mov rax, [rbp+arg_18] mov [rax], rcx jmp short loc_3F793 loc_3F788: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_18] mov [rax], rcx loc_3F793: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_3F79E: mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] jz short loc_3F7CE mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 20h ; ' ' mov rax, [rbp+arg_10] mov rcx, rax add rcx, 1 mov [rbp+arg_10], rcx mov byte ptr [rax], 39h ; '9' jmp short loc_3F79E loc_3F7CE: xor eax, eax pop rbp retn
long long my_like_range_czech( long long a1, unsigned __int8 *a2, long long a3, char a4, char a5, char a6, long long a7, unsigned __int8 *a8, unsigned __int8 *a9, _QWORD *a10, _QWORD *a11) { unsigned __int8 v11; // cl unsigned __int8 *v12; // rax unsigned __int8 *v13; // rax unsigned __int8 *v14; // rax unsigned __int8 *v15; // rax bool v17; // [rsp+1h] [rbp-51h] unsigned __int8 *v18; // [rsp+1Ah] [rbp-38h] long long v19; // [rsp+22h] [rbp-30h] char *v20; // [rsp+2Ah] [rbp-28h] unsigned __int8 v21; // [rsp+36h] [rbp-1Ch] unsigned __int8 *v23; // [rsp+42h] [rbp-10h] v23 = a2; v20 = (char *)&a2[a3]; v19 = (long long)a8; v18 = &a8[a7]; while ( 1 ) { v17 = 0; if ( v23 != (unsigned __int8 *)v20 ) v17 = a8 != v18; if ( !v17 || (char)*v23 == a5 || (char)*v23 == a6 ) break; if ( (char)*v23 == a4 && v23 + 1 != (unsigned __int8 *)v20 ) ++v23; v21 = byte_DC397[*v23]; if ( v21 ) { if ( v21 <= 2u || v21 == 255 ) break; v11 = *v23; v12 = a9++; *v12 = *v23; v13 = a8++; *v13 = v11; } ++v23; } if ( (*(_DWORD *)(a1 + 12) & 0x10) != 0 ) *a10 = &a8[-v19]; else *a10 = a7; *a11 = a7; while ( a8 != v18 ) { v14 = a8++; *v14 = 32; v15 = a9++; *v15 = 57; } return 0LL; }
my_like_range_czech: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x50],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x4c] MOV qword ptr [RBP + -0x48],RAX MOV RAX,RSI MOV RSI,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX MOV R8,RDI MOV RDI,qword ptr [RBP + -0x40] MOV AL,R9B MOV R9,qword ptr [RBP + 0x30] MOV R9,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R9,qword ptr [RBP + 0x18] MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],DL MOV byte ptr [RBP + -0x1a],CL MOV byte ptr [RBP + -0x1b],AL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + 0x18] ADD RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX LAB_0013f678: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x51],AL JZ 0x0013f695 MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_0013f695: MOV AL,byte ptr [RBP + -0x51] TEST AL,0x1 JNZ 0x0013f6a1 JMP 0x0013f765 LAB_0013f6a1: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1a] CMP EAX,ECX JNZ 0x0013f6b5 JMP 0x0013f765 LAB_0013f6b5: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1b] CMP EAX,ECX JNZ 0x0013f6c9 JMP 0x0013f765 LAB_0013f6c9: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x19] CMP EAX,ECX JNZ 0x0013f6f2 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x28] JZ 0x0013f6f2 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX LAB_0013f6f2: MOV RAX,qword ptr [0x002cd6a0] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOVSXD RCX,ECX MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x1c],AL MOVZX EAX,byte ptr [RBP + -0x1c] CMP EAX,0x0 JNZ 0x0013f714 JMP 0x0013f754 LAB_0013f714: MOVZX EAX,byte ptr [RBP + -0x1c] CMP EAX,0x2 JG 0x0013f71f JMP 0x0013f765 LAB_0013f71f: MOVZX EAX,byte ptr [RBP + -0x1c] CMP EAX,0xff JNZ 0x0013f72c JMP 0x0013f765 LAB_0013f72c: MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL LAB_0013f754: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0013f678 LAB_0013f765: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x10 CMP EAX,0x0 JZ 0x0013f788 MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x30] SUB RCX,RAX MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX JMP 0x0013f793 LAB_0013f788: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_0013f793: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_0013f79e: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0013f7ce MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x20 MOV RAX,qword ptr [RBP + 0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x20],RCX MOV byte ptr [RAX],0x39 JMP 0x0013f79e LAB_0013f7ce: XOR EAX,EAX POP RBP RET
int8 my_like_range_czech(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6, long param_7,byte *param_8,byte *param_9,long *param_10,long *param_11) { byte bVar1; byte *pbVar2; byte *pbVar3; byte *local_18; pbVar2 = param_8; pbVar3 = param_8 + param_7; for (local_18 = param_2; ((local_18 != param_2 + param_3 && param_8 != pbVar3 && (*local_18 != param_5)) && (*local_18 != param_6)); local_18 = local_18 + 1) { if ((*local_18 == param_4) && (local_18 + 1 != param_2 + param_3)) { local_18 = local_18 + 1; } bVar1 = CZ_SORT_TABLE[(int)(uint)*local_18]; if (bVar1 != 0) { if ((bVar1 < 3) || (bVar1 == 0xff)) break; bVar1 = *local_18; *param_9 = bVar1; *param_8 = bVar1; param_8 = param_8 + 1; param_9 = param_9 + 1; } } if ((*(uint *)(param_1 + 0xc) & 0x10) == 0) { *param_10 = param_7; } else { *param_10 = (long)param_8 - (long)pbVar2; } *param_11 = param_7; while (param_8 != pbVar3) { *param_8 = 0x20; *param_9 = 0x39; param_8 = param_8 + 1; param_9 = param_9 + 1; } return 0; }
51,508
void nlohmann::json_abi_v3_11_3::detail::from_json<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> 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>::boolean_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) { if (JSON_HEDLEY_UNLIKELY(!j.is_boolean())) { JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j)); } b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); }
O1
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<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> 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>::boolean_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x4, (%rdi) jne 0x8c58e movb 0x8(%r14), %al movb %al, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1b460 movq %rax, %rbx movq %r14, %rdi callq 0x633e2 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x69c35(%rip), %rsi # 0xf61e7 leaq 0x10(%rsp), %rdi callq 0x8c627 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x8b74a xorl %ebp, %ebp leaq 0xa492b(%rip), %rsi # 0x130f08 leaq -0x2d0c0(%rip), %rdx # 0x5f524 movq %rbx, %rdi callq 0x1bfb0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8c612 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x8c612 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x8c61f movq %rbx, %rdi callq 0x1b6a0 movq %r14, %rdi callq 0x1c030
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 4 jnz short loc_8C58E mov al, [r14+8] mov [rsi], al add rsp, 30h pop rbx pop r14 pop rbp retn loc_8C58E: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeBool; "type must be boolean, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8C612 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8C612 mov r14, rax mov bpl, 1 loc_8C612: test bpl, bpl jz short loc_8C61F mov rdi, rbx; void * call ___cxa_free_exception loc_8C61F: mov rdi, r14 call __Unwind_Resume
unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<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>>( unsigned __int8 *a1, unsigned __int8 *a2) { unsigned __int8 result; // al nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *a1 != 4 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>( v4, "type must be boolean, but is "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } result = a1[8]; *a2 = result; return result; }
from_json<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>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x4 JNZ 0x0018c58e MOV AL,byte ptr [R14 + 0x8] MOV byte ptr [RSI],AL ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0018c58e: MOV EDI,0x20 CALL 0x0011b460 MOV RBX,RAX MOV RDI,R14 CALL 0x001633e2 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0018c5ab: LEA RSI,[0x1f61e7] LEA RDI,[RSP + 0x10] CALL 0x0018c627 MOV BPL,0x1 LAB_0018c5bf: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x0018b74a XOR EBP,EBP LEA RSI,[0x230f08] LEA RDX,[0x15f524] MOV RDI,RBX CALL 0x0011bfb0
/* void nlohmann::json_abi_v3_11_3::detail::from_json<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> 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>::boolean_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<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 *param_1,boolean_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json)0x4) { *param_2 = param_1[8]; return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 0018c5ab to 0018c5bb has its CatchHandler @ 0018c60c */ concat<std::__cxx11::string,char_const(&)[30],char_const*> (local_38,"type must be boolean, but is ",&local_40); /* try { // try from 0018c5bf to 0018c5eb has its CatchHandler @ 0018c5ec */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
51,509
ma_update_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_update_dynamic_record(MARIA_HA *info, MARIA_RECORD_POS pos, const uchar *oldrec __attribute__ ((unused)), const uchar *record) { uint length= _ma_rec_pack(info, info->rec_buff + MARIA_REC_BUFF_OFFSET, record); if (!length) return 1; return (update_dynamic_record(info, pos, info->rec_buff + MARIA_REC_BUFF_OFFSET, length)); }
O0
c
ma_update_dynamic_record: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x3a0(%rax), %rsi addq $0x18, %rsi movq -0x28(%rbp), %rdx callq 0x3b450 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jne 0x3bbf3 movb $0x1, -0x1(%rbp) jmp 0x3bc17 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x3a0(%rax), %rdx addq $0x18, %rdx movl -0x2c(%rbp), %eax movl %eax, %ecx callq 0x3bc20 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq
_ma_update_dynamic_record: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax+3A0h] add rsi, 18h mov rdx, [rbp+var_28] call _ma_rec_pack mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jnz short loc_3BBF3 mov [rbp+var_1], 1 jmp short loc_3BC17 loc_3BBF3: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov rdx, [rax+3A0h] add rdx, 18h mov eax, [rbp+var_2C] mov ecx, eax call update_dynamic_record mov [rbp+var_1], al loc_3BC17: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char ma_update_dynamic_record(long long a1, long long a2, long long a3, _BYTE *a4) { unsigned int v5; // [rsp+4h] [rbp-2Ch] v5 = ma_rec_pack((_DWORD *)a1, (_BYTE *)(*(_QWORD *)(a1 + 928) + 24LL), a4); if ( v5 ) return update_dynamic_record(a1, a2, *(_QWORD *)(a1 + 928) + 24LL, v5); else return 1; }
_ma_update_dynamic_record: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x3a0] ADD RSI,0x18 MOV RDX,qword ptr [RBP + -0x28] CALL 0x0013b450 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x0013bbf3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013bc17 LAB_0013bbf3: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x3a0] ADD RDX,0x18 MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,EAX CALL 0x0013bc20 MOV byte ptr [RBP + -0x1],AL LAB_0013bc17: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 _ma_update_dynamic_record(long param_1,int8 param_2,int8 param_3,int8 param_4) { int iVar1; int1 local_9; iVar1 = _ma_rec_pack(param_1,*(long *)(param_1 + 0x3a0) + 0x18,param_4); if (iVar1 == 0) { local_9 = 1; } else { local_9 = update_dynamic_record(param_1,param_2,*(long *)(param_1 + 0x3a0) + 0x18,iVar1); } return local_9; }
51,510
ma_test_if_changed
eloqsql/storage/maria/ma_locking.c
int _ma_test_if_changed(register MARIA_HA *info) { #ifdef MARIA_EXTERNAL_LOCKING MARIA_SHARE *share= info->s; if (share->state.process != share->last_process || share->state.unique != info->last_unique || share->state.update_count != info->last_loop) { /* Keyfile has changed */ DBUG_PRINT("info",("index file changed")); if (share->state.process != share->this_process) VOID(flush_pagecache_blocks(share->pagecache, &share->kfile, FLUSH_RELEASE)); share->last_process=share->state.process; info->last_unique= share->state.unique; info->last_loop= share->state.update_count; info->update|= HA_STATE_WRITTEN; /* Must use file on next */ info->data_changed= 1; /* For maria_is_changed */ return 1; } #endif return (!(info->update & HA_STATE_AKTIV) || (info->update & (HA_STATE_WRITTEN | HA_STATE_DELETED | HA_STATE_KEY_CHANGED))); }
O0
c
ma_test_if_changed: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x624(%rax), %ecx andl $0x2, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x9(%rbp) je 0x35bd7 movq -0x8(%rbp), %rax movl 0x624(%rax), %eax andl $0x8c, %eax cmpl $0x0, %eax setne %al movb %al, -0x9(%rbp) movb -0x9(%rbp), %al andb $0x1, %al movzbl %al, %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_test_if_changed: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov ecx, [rax+624h] and ecx, 2 mov al, 1 cmp ecx, 0 mov [rbp+var_9], al jz short loc_35BD7 mov rax, [rbp+var_8] mov eax, [rax+624h] and eax, 8Ch cmp eax, 0 setnz al mov [rbp+var_9], al loc_35BD7: mov al, [rbp+var_9] and al, 1 movzx eax, al pop rbp retn
_BOOL8 ma_test_if_changed(long long a1) { bool v2; // [rsp+1h] [rbp-9h] v2 = 1; if ( (*(_DWORD *)(a1 + 1572) & 2) != 0 ) return (*(_DWORD *)(a1 + 1572) & 0x8C) != 0; return v2; }
_ma_test_if_changed: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x624] AND ECX,0x2 MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x9],AL JZ 0x00135bd7 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x624] AND EAX,0x8c CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x9],AL LAB_00135bd7: MOV AL,byte ptr [RBP + -0x9] AND AL,0x1 MOVZX EAX,AL POP RBP RET
bool _ma_test_if_changed(long param_1) { int1 local_11; local_11 = true; if ((*(uint *)(param_1 + 0x624) & 2) != 0) { local_11 = (*(uint *)(param_1 + 0x624) & 0x8c) != 0; } return local_11; }
51,511
ftb_parse_query_internal
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_parse_query_internal(MYSQL_FTPARSER_PARAM *param, const char *query, int len) { MY_FTB_PARAM *ftb_param= param->mysql_ftparam; MYSQL_FTPARSER_BOOLEAN_INFO info; CHARSET_INFO *cs= ftb_param->ftb->charset; const uchar **start= (const uchar**) &query; uchar *end= (uchar*) query + len; FT_WORD w; info.prev= ' '; info.quot= 0; while (ft_get_word(cs, start, end, &w, &info)) param->mysql_add_word(param, (char*) w.pos, (int)w.len, &info); return(0); }
O0
c
ftb_parse_query_internal: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x40(%rbp) leaq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movb $0x20, -0x2a(%rbp) movq $0x0, -0x28(%rbp) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdx leaq -0x68(%rbp), %rcx leaq -0x38(%rbp), %r8 callq 0xa1ad0 cmpb $0x0, %al je 0x9f68c movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x58(%rbp), %rcx movl %ecx, %edx leaq -0x38(%rbp), %rcx callq *%rax jmp 0x9f651 xorl %eax, %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ftb_parse_query_internal: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+10h] mov [rbp+var_40], rax lea rax, [rbp+var_10] mov [rbp+var_48], rax mov rax, [rbp+var_10] movsxd rcx, [rbp+var_14] add rax, rcx mov [rbp+var_50], rax mov [rbp+var_2A], 20h ; ' ' mov [rbp+var_28], 0 loc_9F651: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_50] lea rcx, [rbp+var_68] lea r8, [rbp+var_38] call ft_get_word cmp al, 0 jz short loc_9F68C mov rax, [rbp+var_8] mov rax, [rax+8] mov rdi, [rbp+var_8] mov rsi, [rbp+var_68] mov rcx, [rbp+var_58] mov edx, ecx lea rcx, [rbp+var_38] call rax jmp short loc_9F651 loc_9F68C: xor eax, eax add rsp, 70h pop rbp retn
long long ftb_parse_query_internal(long long a1, long long a2, int a3) { long long v4; // [rsp+8h] [rbp-68h] BYREF long long v5; // [rsp+18h] [rbp-58h] long long v6; // [rsp+20h] [rbp-50h] long long *v7; // [rsp+28h] [rbp-48h] long long v8; // [rsp+30h] [rbp-40h] _BYTE v9[16]; // [rsp+38h] [rbp-38h] BYREF long long v10; // [rsp+48h] [rbp-28h] long long v11; // [rsp+50h] [rbp-20h] int v12; // [rsp+5Ch] [rbp-14h] long long v13; // [rsp+60h] [rbp-10h] BYREF long long v14; // [rsp+68h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; v11 = *(_QWORD *)(a1 + 24); v8 = *(_QWORD *)(*(_QWORD *)v11 + 16LL); v7 = &v13; v6 = a3 + a2; v9[14] = 32; v10 = 0LL; while ( (unsigned __int8)ft_get_word(v8, v7, v6, &v4, v9) ) (*(void ( **)(long long, long long, _QWORD, _BYTE *))(v14 + 8))(v14, v4, (unsigned int)v5, v9); return 0LL; }
ftb_parse_query_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x14] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV byte ptr [RBP + -0x2a],0x20 MOV qword ptr [RBP + -0x28],0x0 LAB_0019f651: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] LEA RCX,[RBP + -0x68] LEA R8,[RBP + -0x38] CALL 0x001a1ad0 CMP AL,0x0 JZ 0x0019f68c MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x58] MOV EDX,ECX LEA RCX,[RBP + -0x38] CALL RAX JMP 0x0019f651 LAB_0019f68c: XOR EAX,EAX ADD RSP,0x70 POP RBP RET
int8 ftb_parse_query_internal(long param_1,long param_2,int param_3) { char cVar1; int8 local_70 [2]; ulong local_60; long local_58; long *local_50; int8 local_48; int1 local_40 [14]; int1 local_32; int8 local_30; long *local_28; int local_1c; long local_18; long local_10; local_28 = *(long **)(param_1 + 0x18); local_48 = *(int8 *)(*local_28 + 0x10); local_50 = &local_18; local_58 = param_2 + param_3; local_32 = 0x20; local_30 = 0; local_1c = param_3; local_18 = param_2; local_10 = param_1; while( true ) { cVar1 = ft_get_word(local_48,local_50,local_58,local_70,local_40); if (cVar1 == '\0') break; (**(code **)(local_10 + 8))(local_10,local_70[0],local_60 & 0xffffffff,local_40); } return 0; }
51,512
ftb_parse_query_internal
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_parse_query_internal(MYSQL_FTPARSER_PARAM *param, const char *query, int len) { MY_FTB_PARAM *ftb_param= param->mysql_ftparam; MYSQL_FTPARSER_BOOLEAN_INFO info; CHARSET_INFO *cs= ftb_param->ftb->charset; const uchar **start= (const uchar**) &query; uchar *end= (uchar*) query + len; FT_WORD w; info.prev= ' '; info.quot= 0; while (ft_get_word(cs, start, end, &w, &info)) param->mysql_add_word(param, (char*) w.pos, (int)w.len, &info); return(0); }
O3
c
ftb_parse_query_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx leaq -0x30(%rbp), %rax movq %rsi, (%rax) movq 0x18(%rdi), %rcx movq (%rcx), %rcx movq 0x10(%rcx), %r14 movslq %edx, %r15 addq %rsi, %r15 leaq -0x60(%rbp), %r8 movb $0x20, 0xe(%r8) movq $0x0, 0x10(%r8) leaq -0x48(%rbp), %rcx movq %r14, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x736d9 testb %al, %al je 0x725d0 leaq -0x60(%rbp), %r12 leaq -0x48(%rbp), %r13 movq -0x48(%rbp), %rsi movl -0x38(%rbp), %edx movq %rbx, %rdi movq %r12, %rcx callq *0x8(%rbx) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx movq %r12, %r8 callq 0x736d9 testb %al, %al jne 0x725a7 xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ftb_parse_query_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi lea rax, [rbp+var_30] mov [rax], rsi mov rcx, [rdi+18h] mov rcx, [rcx] mov r14, [rcx+10h] movsxd r15, edx add r15, rsi lea r8, [rbp+var_60] mov byte ptr [r8+0Eh], 20h ; ' ' mov qword ptr [r8+10h], 0 lea rcx, [rbp+var_48] mov rdi, r14 mov rsi, rax mov rdx, r15 call ft_get_word test al, al jz short loc_725D0 lea r12, [rbp+var_60] lea r13, [rbp+var_48] loc_725A7: mov rsi, [rbp+var_48] mov edx, [rbp+var_38] mov rdi, rbx mov rcx, r12 call qword ptr [rbx+8] mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 mov r8, r12 call ft_get_word test al, al jnz short loc_725A7 loc_725D0: xor eax, eax add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ftb_parse_query_internal(long long a1, long long a2, int a3) { long long v3; // r14 long long v4; // r15 _BYTE v6[16]; // [rsp+0h] [rbp-60h] BYREF long long v7; // [rsp+10h] [rbp-50h] _QWORD v8[2]; // [rsp+18h] [rbp-48h] BYREF unsigned int v9; // [rsp+28h] [rbp-38h] _QWORD v10[6]; // [rsp+30h] [rbp-30h] BYREF v10[0] = a2; v3 = *(_QWORD *)(**(_QWORD **)(a1 + 24) + 16LL); v4 = a2 + a3; v6[14] = 32; v7 = 0LL; while ( (unsigned __int8)ft_get_word(v3, v10, v4, v8) ) (*(void ( **)(long long, _QWORD, _QWORD, _BYTE *))(a1 + 8))(a1, v8[0], v9, v6); return 0LL; }
ftb_parse_query_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI LEA RAX,[RBP + -0x30] MOV qword ptr [RAX],RSI MOV RCX,qword ptr [RDI + 0x18] MOV RCX,qword ptr [RCX] MOV R14,qword ptr [RCX + 0x10] MOVSXD R15,EDX ADD R15,RSI LEA R8,[RBP + -0x60] MOV byte ptr [R8 + 0xe],0x20 MOV qword ptr [R8 + 0x10],0x0 LEA RCX,[RBP + -0x48] MOV RDI,R14 MOV RSI,RAX MOV RDX,R15 CALL 0x001736d9 TEST AL,AL JZ 0x001725d0 LEA R12,[RBP + -0x60] LEA R13,[RBP + -0x48] LAB_001725a7: MOV RSI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x38] MOV RDI,RBX MOV RCX,R12 CALL qword ptr [RBX + 0x8] MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 MOV R8,R12 CALL 0x001736d9 TEST AL,AL JNZ 0x001725a7 LAB_001725d0: XOR EAX,EAX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ftb_parse_query_internal(long param_1,long param_2,int param_3) { int8 uVar1; char cVar2; int1 local_68 [14]; int1 local_5a; int8 local_58; int8 local_50 [2]; int4 local_40; long local_38; uVar1 = *(int8 *)(**(long **)(param_1 + 0x18) + 0x10); local_5a = 0x20; local_58 = 0; local_38 = param_2; cVar2 = ft_get_word(uVar1,&local_38,param_3 + param_2,local_50); if (cVar2 != '\0') { do { (**(code **)(param_1 + 8))(param_1,local_50[0],local_40,local_68); cVar2 = ft_get_word(uVar1,&local_38,param_3 + param_2,local_50,local_68); } while (cVar2 != '\0'); } return 0; }
51,513
wserver_handler_framework_end
navaro[P]qoraal-tictactoe/src/services/www/wserver_inst.c
int32_t wserver_handler_framework_end(HTTP_USER_T * user, uint32_t method, char* endpoint, WSERVER_CTRL ctrl) { static const char framework_content[] = "\r\n" " </div>\r\n" " </div>\r\n" " <div class=\"row\">\r\n" " <div class=\"twelve columns\">\r\n" " <br><p STYLE=\"text-align: right;\">" "<img src=\"/image/sicon.png\" height=\"16\" width=\"16\">&nbsp;&nbsp;" WSERVER_TITLE_TEXT "</p>\r\n" " </div>\r\n" " </div>\r\n" "</div>\r\n" ; return httpserver_chunked_append_str (user, framework_content, sizeof(framework_content) - 1) ; }
O3
c
wserver_handler_framework_end: pushq %rbp movq %rsp, %rbp leaq 0x14fc5(%rip), %rsi # 0x27640 movl $0xed, %edx popq %rbp jmp 0x1dd14
wserver_handler_framework_end: push rbp mov rbp, rsp lea rsi, wserver_handler_framework_end_framework_content; "\r\n </div>\r\n </div>\r\n <div c"... mov edx, 0EDh pop rbp jmp httpserver_chunked_append_str
long long wserver_handler_framework_end(long long a1) { return httpserver_chunked_append_str(a1, wserver_handler_framework_end_framework_content, 237LL); }
wserver_handler_framework_end: PUSH RBP MOV RBP,RSP LEA RSI,[0x127640] MOV EDX,0xed POP RBP JMP 0x0011dd14
void wserver_handler_framework_end(int8 param_1) { httpserver_chunked_append_str(param_1,wserver_handler_framework_end_framework_content,0xed); return; }
51,514
int10_to_str
eloqsql/strings/int2str.c
char *int10_to_str(long int val,char *dst,int radix) { char buffer[65]; register char *p; long int new_val; unsigned long int uval = (unsigned long int) val; if (radix < 0) /* -10 */ { if (val < 0) { *dst++ = '-'; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (unsigned long int)0 - uval; } } p = &buffer[sizeof(buffer)-1]; *p = '\0'; new_val= (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val = new_val; while (val != 0) { new_val=val/10; *--p = '0' + (char) (val-new_val*10); val= new_val; } while ((*dst++ = *p++) != 0) ; return dst-1; }
O0
c
int10_to_str: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movl %edx, -0x64(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) cmpl $0x0, -0x64(%rbp) jge 0xa8316 cmpq $0x0, -0x58(%rbp) jge 0xa8314 movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movb $0x2d, (%rax) xorl %eax, %eax subq -0x80(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0xa8316 leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movb $0x0, (%rax) movq -0x80(%rbp), %rax movl $0xa, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x78(%rbp) movq -0x80(%rbp), %rax imulq $0xa, -0x78(%rbp), %rcx subq %rcx, %rax movsbl %al, %eax addl $0x30, %eax movb %al, %cl movq -0x70(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x70(%rbp) movb %cl, -0x1(%rax) movq -0x78(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) je 0xa83b2 movq -0x58(%rbp), %rax movl $0xa, %ecx cqto idivq %rcx movq %rax, -0x78(%rbp) movq -0x58(%rbp), %rax imulq $0xa, -0x78(%rbp), %rcx subq %rcx, %rax movsbl %al, %eax addl $0x30, %eax movb %al, %cl movq -0x70(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x70(%rbp) movb %cl, -0x1(%rax) movq -0x78(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0xa8369 jmp 0xa83b4 movq -0x70(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x70(%rbp) movb (%rax), %al movq -0x60(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x60(%rbp) movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0xa83e0 jmp 0xa83b4 movq -0x60(%rbp), %rax decq %rax movq %rax, -0x88(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xa8410 movq -0x88(%rbp), %rax addq $0x90, %rsp popq %rbp retq callq 0x26360 nopw %cs:(%rax,%rax) nop
int10_to_str: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_64], edx mov rax, [rbp+var_58] mov [rbp+var_80], rax cmp [rbp+var_64], 0 jge short loc_A8316 cmp [rbp+var_58], 0 jge short loc_A8314 mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx mov byte ptr [rax], 2Dh ; '-' xor eax, eax sub rax, [rbp+var_80] mov [rbp+var_80], rax loc_A8314: jmp short $+2 loc_A8316: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_70], rax mov rax, [rbp+var_70] mov byte ptr [rax], 0 mov rax, [rbp+var_80] mov ecx, 0Ah xor edx, edx div rcx mov [rbp+var_78], rax mov rax, [rbp+var_80] imul rcx, [rbp+var_78], 0Ah sub rax, rcx movsx eax, al add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_70] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_70], rdx mov [rax-1], cl mov rax, [rbp+var_78] mov [rbp+var_58], rax loc_A8369: cmp [rbp+var_58], 0 jz short loc_A83B2 mov rax, [rbp+var_58] mov ecx, 0Ah cqo idiv rcx mov [rbp+var_78], rax mov rax, [rbp+var_58] imul rcx, [rbp+var_78], 0Ah sub rax, rcx movsx eax, al add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_70] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_70], rdx mov [rax-1], cl mov rax, [rbp+var_78] mov [rbp+var_58], rax jmp short loc_A8369 loc_A83B2: jmp short $+2 loc_A83B4: mov rax, [rbp+var_70] mov rcx, rax add rcx, 1 mov [rbp+var_70], rcx mov al, [rax] mov rcx, [rbp+var_60] mov rdx, rcx add rdx, 1 mov [rbp+var_60], rdx mov [rcx], al movsx eax, al cmp eax, 0 jz short loc_A83E0 jmp short loc_A83B4 loc_A83E0: mov rax, [rbp+var_60] dec rax mov [rbp+var_88], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_A8410 mov rax, [rbp+var_88] add rsp, 90h pop rbp retn loc_A8410: call ___stack_chk_fail
_BYTE * int10_to_str(long long a1, _BYTE *a2, int a3) { _BYTE *v3; // rax _BYTE *v4; // rax _BYTE *v5; // rcx unsigned long long v7; // [rsp+10h] [rbp-80h] _BYTE *v8; // [rsp+20h] [rbp-70h] _BYTE *v9; // [rsp+30h] [rbp-60h] signed long long i; // [rsp+38h] [rbp-58h] _BYTE v11[9]; // [rsp+7Fh] [rbp-11h] BYREF unsigned long long v12; // [rsp+88h] [rbp-8h] v12 = __readfsqword(0x28u); v9 = a2; v7 = a1; if ( a3 < 0 && a1 < 0 ) { v9 = a2 + 1; *a2 = 45; v7 = -a1; } v11[1] = 0; v8 = v11; v11[0] = v7 % 0xA + 48; for ( i = v7 / 0xA; i; i /= 10LL ) { v3 = v8--; *(v3 - 1) = i % 10 + 48; } do { v4 = v8++; LOBYTE(v4) = *v4; v5 = v9++; *v5 = (_BYTE)v4; } while ( (_BYTE)v4 ); return v9 - 1; }
int10_to_str: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV dword ptr [RBP + -0x64],EDX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX CMP dword ptr [RBP + -0x64],0x0 JGE 0x001a8316 CMP qword ptr [RBP + -0x58],0x0 JGE 0x001a8314 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RAX],0x2d XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x80],RAX LAB_001a8314: JMP 0x001a8316 LAB_001a8316: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x80] MOV ECX,0xa XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x80] IMUL RCX,qword ptr [RBP + -0x78],0xa SUB RAX,RCX MOVSX EAX,AL ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x70] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x70],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x58],RAX LAB_001a8369: CMP qword ptr [RBP + -0x58],0x0 JZ 0x001a83b2 MOV RAX,qword ptr [RBP + -0x58] MOV ECX,0xa CQO IDIV RCX MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x58] IMUL RCX,qword ptr [RBP + -0x78],0xa SUB RAX,RCX MOVSX EAX,AL ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x70] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x70],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x58],RAX JMP 0x001a8369 LAB_001a83b2: JMP 0x001a83b4 LAB_001a83b4: MOV RAX,qword ptr [RBP + -0x70] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x70],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x60] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x60],RDX MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x001a83e0 JMP 0x001a83b4 LAB_001a83e0: MOV RAX,qword ptr [RBP + -0x60] DEC RAX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001a8410 MOV RAX,qword ptr [RBP + -0x88] ADD RSP,0x90 POP RBP RET LAB_001a8410: CALL 0x00126360
char * int10_to_str(ulong param_1,char *param_2,int param_3) { char cVar1; char *pcVar2; long in_FS_OFFSET; ulong local_88; char *local_78; char *local_68; ulong local_60; char local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_88 = param_1; local_68 = param_2; if ((param_3 < 0) && ((long)param_1 < 0)) { local_68 = param_2 + 1; *param_2 = '-'; local_88 = -param_1; } local_1a[2] = 0; local_1a[1] = (char)local_88 + (char)(local_88 / 10) * -10 + '0'; local_78 = local_1a + 1; local_60 = local_88 / 10; while (pcVar2 = local_68, local_60 != 0) { local_78[-1] = (char)local_60 + (char)((long)local_60 / 10) * -10 + '0'; local_78 = local_78 + -1; local_60 = (long)local_60 / 10; } do { local_68 = pcVar2; cVar1 = *local_78; *local_68 = cVar1; local_78 = local_78 + 1; pcVar2 = local_68 + 1; } while (cVar1 != '\0'); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_68; }
51,515
json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool)
llama.cpp/common/json-schema-to-grammar.cpp
std::string json_schema_to_grammar(const json & schema, bool force_gbnf) { #ifdef LLAMA_USE_LLGUIDANCE if (!force_gbnf) { return "%llguidance {}\nstart: %json " + schema.dump(); } #else (void)force_gbnf; #endif // LLAMA_USE_LLGUIDANCE return build_grammar([&](const common_grammar_builder & callbacks) { auto copy = schema; callbacks.resolve_refs(copy); callbacks.add_schema("", copy); }); }
O3
cpp
json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool): pushq %rbx subq $0x30, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %rax movq $0x0, 0x8(%rax) movq %rsi, (%rax) leaq 0x25f(%rip), %rcx # 0x100182 movq %rcx, 0x18(%rax) leaq 0x34e(%rip), %rcx # 0x10027c movq %rcx, 0x10(%rax) leaq 0xf(%rsp), %rdx movb $0x0, (%rdx) movq %rax, %rsi callq 0xfff92 movq 0x20(%rsp), %rax testq %rax, %rax je 0xfff5b leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x30, %rsp popq %rbx retq jmp 0xfff8a movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0xfff82 leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x20b50 movq %rax, %rdi callq 0x2a257
_Z22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEb: push rbx sub rsp, 30h mov rbx, rdi lea rax, [rsp+38h+var_28] mov qword ptr [rax+8], 0 mov [rax], rsi lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rax+18h], rcx lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rax+10h], rcx lea rdx, [rsp+38h+var_29] mov byte ptr [rdx], 0 mov rsi, rax call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) mov rax, [rsp+38h+var_18] test rax, rax jz short loc_FFF5B lea rdi, [rsp+38h+var_28] mov rsi, rdi mov edx, 3 call rax loc_FFF5B: mov rax, rbx add rsp, 30h pop rbx retn jmp short loc_FFF8A mov rbx, rax mov rax, [rsp+38h+var_18] test rax, rax jz short loc_FFF82 lea rdi, [rsp+38h+var_28] mov rsi, rdi mov edx, 3 call rax loc_FFF82: mov rdi, rbx call __Unwind_Resume loc_FFF8A: mov rdi, rax call __clang_call_terminate
long long json_schema_to_grammar(long long a1, long long a2) { char v3; // [rsp+Fh] [rbp-29h] BYREF _QWORD v4[2]; // [rsp+10h] [rbp-28h] BYREF long long ( *v5)(); // [rsp+20h] [rbp-18h] long long ( *v6)(); // [rsp+28h] [rbp-10h] v4[1] = 0LL; v4[0] = a2; v6 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,bool)::$_0>::_M_invoke; v5 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,bool)::$_0>::_M_manager; v3 = 0; build_grammar[abi:cxx11](a1, v4, &v3); if ( v5 ) ((void ( *)(_QWORD *, _QWORD *, long long))v5)(v4, v4, 3LL); return a1; }
json_schema_to_grammar: PUSH RBX SUB RSP,0x30 MOV RBX,RDI LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX],RSI LEA RCX,[0x200182] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[0x20027c] MOV qword ptr [RAX + 0x10],RCX LEA RDX,[RSP + 0xf] MOV byte ptr [RDX],0x0 LAB_001fff3a: MOV RSI,RAX CALL 0x001fff92 MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x001fff5b LAB_001fff4c: LEA RDI,[RSP + 0x10] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001fff5b: MOV RAX,RBX ADD RSP,0x30 POP RBX RET
/* json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, bool) */ basic_json * json_schema_to_grammar(basic_json *param_1,bool param_2) { int7 in_register_00000031; int8 local_28; int8 local_20; code *local_18; code *local_10; local_28 = CONCAT71(in_register_00000031,param_2); local_20 = 0; local_10 = std:: _Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,bool)::$_0> ::_M_invoke; local_18 = std:: _Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,bool)::$_0> ::_M_manager; /* try { // try from 001fff3a to 001fff41 has its CatchHandler @ 001fff66 */ build_grammar_abi_cxx11_(param_1,(common_grammar_options *)&local_28); if (local_18 != (code *)0x0) { /* try { // try from 001fff4c to 001fff5a has its CatchHandler @ 001fff64 */ (*local_18)(&local_28,&local_28,3); } return param_1; }
51,516
ssz_add_uint256
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_uint256(ssz_builder_t* buffer, bytes_t data) { buffer_grow(&buffer->fixed, buffer->fixed.data.len + 32); uint8_t* ptr = buffer->fixed.data.data + buffer->fixed.data.len; for (int i = 0; i < data.len; i++, ptr++) { *ptr = data.data[data.len - i - 1]; } if (data.len < 32) memset(ptr, 0, 32 - data.len); buffer->fixed.data.len += 32; }
O0
c
ssz_add_uint256: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %esi, -0x10(%rbp) movq %rdx, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq -0x18(%rbp), %rdi addq $0x8, %rdi movq -0x18(%rbp), %rax movl 0x8(%rax), %eax addl $0x20, %eax movl %eax, %eax movl %eax, %esi callq 0x18af0 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpl -0x10(%rbp), %eax jae 0x1e9f2 movq -0x8(%rbp), %rax movl -0x10(%rbp), %ecx subl -0x24(%rbp), %ecx subl $0x1, %ecx movl %ecx, %ecx movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x1e9bb cmpl $0x20, -0x10(%rbp) jae 0x1ea0f movq -0x20(%rbp), %rdi movl $0x20, %eax subl -0x10(%rbp), %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x5110 movq -0x18(%rbp), %rax movl 0x8(%rax), %ecx addl $0x20, %ecx movl %ecx, 0x8(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ssz_add_uint256: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], esi mov [rbp+var_8], rdx mov [rbp+var_18], rdi mov rdi, [rbp+var_18] add rdi, 8 mov rax, [rbp+var_18] mov eax, [rax+8] add eax, 20h ; ' ' mov eax, eax mov esi, eax call buffer_grow mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_18] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_20], rax mov [rbp+var_24], 0 loc_1E9BB: mov eax, [rbp+var_24] cmp eax, [rbp+var_10] jnb short loc_1E9F2 mov rax, [rbp+var_8] mov ecx, [rbp+var_10] sub ecx, [rbp+var_24] sub ecx, 1 mov ecx, ecx mov cl, [rax+rcx] mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_1E9BB loc_1E9F2: cmp [rbp+var_10], 20h ; ' ' jnb short loc_1EA0F mov rdi, [rbp+var_20] mov eax, 20h ; ' ' sub eax, [rbp+var_10] mov eax, eax mov edx, eax xor esi, esi call _memset loc_1EA0F: mov rax, [rbp+var_18] mov ecx, [rax+8] add ecx, 20h ; ' ' mov [rax+8], ecx add rsp, 30h pop rbp retn
long long ssz_add_uint256(long long a1, unsigned int a2, long long a3) { long long result; // rax unsigned int i; // [rsp+Ch] [rbp-24h] _BYTE *v5; // [rsp+10h] [rbp-20h] buffer_grow(a1 + 8, (unsigned int)(*(_DWORD *)(a1 + 8) + 32)); v5 = (_BYTE *)(*(unsigned int *)(a1 + 8) + *(_QWORD *)(a1 + 16)); for ( i = 0; i < a2; ++i ) *v5++ = *(_BYTE *)(a3 + a2 - i - 1); if ( a2 < 0x20 ) memset(v5, 0LL, 32 - a2); result = a1; *(_DWORD *)(a1 + 8) += 32; return result; }
ssz_add_uint256: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x10],ESI MOV qword ptr [RBP + -0x8],RDX MOV qword ptr [RBP + -0x18],RDI MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] ADD EAX,0x20 MOV EAX,EAX MOV ESI,EAX CALL 0x00118af0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_0011e9bb: MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x10] JNC 0x0011e9f2 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x10] SUB ECX,dword ptr [RBP + -0x24] SUB ECX,0x1 MOV ECX,ECX MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0011e9bb LAB_0011e9f2: CMP dword ptr [RBP + -0x10],0x20 JNC 0x0011ea0f MOV RDI,qword ptr [RBP + -0x20] MOV EAX,0x20 SUB EAX,dword ptr [RBP + -0x10] MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x00105110 LAB_0011ea0f: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x20 MOV dword ptr [RAX + 0x8],ECX ADD RSP,0x30 POP RBP RET
void ssz_add_uint256(long param_1,uint param_2,long param_3) { uint local_2c; int1 *local_28; buffer_grow(param_1 + 8); local_28 = (int1 *)(*(long *)(param_1 + 0x10) + (ulong)*(uint *)(param_1 + 8)); for (local_2c = 0; local_2c < param_2; local_2c = local_2c + 1) { *local_28 = *(int1 *)(param_3 + (ulong)((param_2 - local_2c) - 1)); local_28 = local_28 + 1; } if (param_2 < 0x20) { memset(local_28,0,(ulong)(0x20 - param_2)); } *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 0x20; return; }
51,517
ssz_add_uint256
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_uint256(ssz_builder_t* buffer, bytes_t data) { buffer_grow(&buffer->fixed, buffer->fixed.data.len + 32); uint8_t* ptr = buffer->fixed.data.data + buffer->fixed.data.len; for (int i = 0; i < data.len; i++, ptr++) { *ptr = data.data[data.len - i - 1]; } if (data.len < 32) memset(ptr, 0, 32 - data.len); buffer->fixed.data.len += 32; }
O3
c
ssz_add_uint256: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %ebp movq %rdi, %r15 leaq 0x8(%rdi), %rbx movl 0x8(%rdi), %esi addl $0x20, %esi movq %rbx, %rdi callq 0x125e5 movl 0x8(%r15), %edi addq 0x10(%r15), %rdi testl %ebp, %ebp je 0x15d42 movl %ebp, %eax decq %rax movl %eax, %ecx movb (%r14,%rcx), %cl movb %cl, (%rdi) incq %rdi testq %rax, %rax jne 0x15d2a cmpl $0x20, %ebp jae 0x15d50 movl $0x20, %edx subl %ebp, %edx xorl %esi, %esi callq 0x5110 addl $0x20, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ssz_add_uint256: push rbp push r15 push r14 push rbx push rax mov r14, rdx mov ebp, esi mov r15, rdi lea rbx, [rdi+8] mov esi, [rdi+8] add esi, 20h ; ' ' mov rdi, rbx call buffer_grow mov edi, [r15+8] add rdi, [r15+10h] test ebp, ebp jz short loc_15D42 mov eax, ebp loc_15D2A: dec rax mov ecx, eax mov cl, [r14+rcx] mov [rdi], cl inc rdi test rax, rax jnz short loc_15D2A cmp ebp, 20h ; ' ' jnb short loc_15D50 loc_15D42: mov edx, 20h ; ' ' sub edx, ebp xor esi, esi call _memset loc_15D50: add dword ptr [rbx], 20h ; ' ' add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ssz_add_uint256(long long a1, unsigned int a2, long long a3) { _DWORD *v4; // rbx _BYTE *v5; // rdi long long result; // rax v4 = (_DWORD *)(a1 + 8); buffer_grow(a1 + 8, (unsigned int)(*(_DWORD *)(a1 + 8) + 32)); v5 = (_BYTE *)(*(_QWORD *)(a1 + 16) + *(unsigned int *)(a1 + 8)); if ( !a2 ) goto LABEL_5; result = a2; do *v5++ = *(_BYTE *)(a3 + (unsigned int)--result); while ( result ); if ( a2 < 0x20 ) LABEL_5: result = memset(v5, 0LL, 32 - a2); *v4 += 32; return result; }
ssz_add_uint256: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV EBP,ESI MOV R15,RDI LEA RBX,[RDI + 0x8] MOV ESI,dword ptr [RDI + 0x8] ADD ESI,0x20 MOV RDI,RBX CALL 0x001125e5 MOV EDI,dword ptr [R15 + 0x8] ADD RDI,qword ptr [R15 + 0x10] TEST EBP,EBP JZ 0x00115d42 MOV EAX,EBP LAB_00115d2a: DEC RAX MOV ECX,EAX MOV CL,byte ptr [R14 + RCX*0x1] MOV byte ptr [RDI],CL INC RDI TEST RAX,RAX JNZ 0x00115d2a CMP EBP,0x20 JNC 0x00115d50 LAB_00115d42: MOV EDX,0x20 SUB EDX,EBP XOR ESI,ESI CALL 0x00105110 LAB_00115d50: ADD dword ptr [RBX],0x20 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void ssz_add_uint256(long param_1,uint param_2,long param_3) { int *piVar1; ulong uVar2; int1 *__s; piVar1 = (int *)(param_1 + 8); buffer_grow(piVar1); __s = (int1 *)((ulong)*(uint *)(param_1 + 8) + *(long *)(param_1 + 0x10)); if (param_2 != 0) { uVar2 = (ulong)param_2; do { uVar2 = uVar2 - 1; *__s = *(int1 *)(param_3 + (uVar2 & 0xffffffff)); __s = __s + 1; } while (uVar2 != 0); if (0x1f < param_2) goto LAB_00115d50; } memset(__s,0,(ulong)(0x20 - param_2)); LAB_00115d50: *piVar1 = *piVar1 + 0x20; return; }
51,518
write_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
static my_bool write_dynamic_record(MARIA_HA *info, const uchar *record, ulong reclength) { int flag; ulong length; my_off_t filepos; DBUG_ENTER("write_dynamic_record"); flag=0; /* Check if we have enough room for the new record. First we do simplified check to make usual case faster. Then we do more precise check for the space left. Though it still is not absolutely precise, as we always use MARIA_MAX_DYN_BLOCK_HEADER while it can be less in the most of the cases. */ if (unlikely(info->s->base.max_data_file_length - info->state->data_file_length < reclength + MARIA_MAX_DYN_BLOCK_HEADER)) { if (info->s->base.max_data_file_length - info->state->data_file_length + info->state->empty - info->state->del * MARIA_MAX_DYN_BLOCK_HEADER < reclength + MARIA_MAX_DYN_BLOCK_HEADER) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(1); } } do { if (_ma_find_writepos(info,reclength,&filepos,&length)) goto err; if (_ma_write_part_record(info,filepos,length, (info->append_insert_at_end ? HA_OFFSET_ERROR : info->s->state.dellink), (uchar**) &record,&reclength,&flag)) goto err; } while (reclength); DBUG_RETURN(0); err: DBUG_RETURN(1); }
O3
c
write_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq %rsi, -0x50(%rbp) movq %rdx, -0x38(%rbp) movl $0x0, -0x2c(%rbp) movq (%rdi), %rax movq 0x20(%rdi), %rsi movq 0x368(%rax), %rax subq 0x28(%rsi), %rax leaq 0x14(%rdx), %rcx cmpq %rcx, %rax jb 0x47ce2 leaq -0x48(%rbp), %r15 leaq -0x50(%rbp), %r12 leaq -0x38(%rbp), %r13 movq %rbx, %rdi movq %rdx, %rsi leaq -0x40(%rbp), %rdx movq %r15, %rcx callq 0x4a881 movb $0x1, %r14b testl %eax, %eax jne 0x47cd0 movq $-0x1, %rcx cmpb $0x0, 0x681(%rbx) jne 0x47ca2 movq (%rbx), %rax movq 0xc8(%rax), %rcx movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdx leaq -0x2c(%rbp), %rax movq %rax, (%rsp) movq %rbx, %rdi movq %r12, %r8 movq %r13, %r9 callq 0x485e6 testl %eax, %eax jne 0x47cd0 movq -0x38(%rbp), %rdx testq %rdx, %rdx jne 0x47c6f xorl %r14d, %r14d movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq 0x10(%rsi), %rax movq 0x8(%rsi), %rsi shlq $0x2, %rsi leaq (%rsi,%rsi,4), %rsi subq %rsi, %rax cmpq %rcx, %rax jae 0x47c63 callq 0xa2412 movl $0x87, (%rax) movb $0x1, %r14b jmp 0x47cd0
write_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi mov [rbp+var_50], rsi mov [rbp+var_38], rdx mov [rbp+var_2C], 0 mov rax, [rdi] mov rsi, [rdi+20h] mov rax, [rax+368h] sub rax, [rsi+28h] lea rcx, [rdx+14h] cmp rax, rcx jb short loc_47CE2 loc_47C63: lea r15, [rbp+var_48] lea r12, [rbp+var_50] lea r13, [rbp+var_38] loc_47C6F: mov rdi, rbx mov rsi, rdx lea rdx, [rbp+var_40] mov rcx, r15 call _ma_find_writepos mov r14b, 1 test eax, eax jnz short loc_47CD0 mov rcx, 0FFFFFFFFFFFFFFFFh cmp byte ptr [rbx+681h], 0 jnz short loc_47CA2 mov rax, [rbx] mov rcx, [rax+0C8h] loc_47CA2: mov rsi, [rbp+var_40] mov rdx, [rbp+var_48] lea rax, [rbp+var_2C] mov [rsp+60h+var_60], rax mov rdi, rbx mov r8, r12 mov r9, r13 call _ma_write_part_record test eax, eax jnz short loc_47CD0 mov rdx, [rbp+var_38] test rdx, rdx jnz short loc_47C6F xor r14d, r14d loc_47CD0: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_47CE2: add rax, [rsi+10h] mov rsi, [rsi+8] shl rsi, 2 lea rsi, [rsi+rsi*4] sub rax, rsi cmp rax, rcx jnb loc_47C63 call _my_thread_var mov dword ptr [rax], 87h mov r14b, 1 jmp short loc_47CD0
long long write_dynamic_record(_BYTE *a1, long long a2, long long a3) { unsigned int v3; // r14d _QWORD *v4; // rsi unsigned long long v5; // rax long long v6; // rcx long long v8; // [rsp+10h] [rbp-50h] BYREF long long v9; // [rsp+18h] [rbp-48h] BYREF long long v10; // [rsp+20h] [rbp-40h] BYREF long long v11; // [rsp+28h] [rbp-38h] BYREF _DWORD v12[11]; // [rsp+34h] [rbp-2Ch] BYREF v8 = a2; v11 = a3; v12[0] = 0; v4 = (_QWORD *)*((_QWORD *)a1 + 4); v5 = *(_QWORD *)(*(_QWORD *)a1 + 872LL) - v4[5]; if ( v5 >= a3 + 20 || v4[2] + v5 - 20LL * v4[1] >= a3 + 20 ) { while ( 1 ) { LOBYTE(v3) = 1; if ( (unsigned int)ma_find_writepos(a1, a3, &v10, &v9) ) break; LODWORD(v6) = -1; if ( !a1[1665] ) v6 = *(_QWORD *)(*(_QWORD *)a1 + 200LL); if ( (unsigned int)ma_write_part_record( (_DWORD)a1, v10, v9, v6, (unsigned int)&v8, (unsigned int)&v11, (long long)v12) ) break; a3 = v11; if ( !v11 ) return 0; } } else { *(_DWORD *)my_thread_var(a1) = 135; LOBYTE(v3) = 1; } return v3; }
write_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x38],RDX MOV dword ptr [RBP + -0x2c],0x0 MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX + 0x368] SUB RAX,qword ptr [RSI + 0x28] LEA RCX,[RDX + 0x14] CMP RAX,RCX JC 0x00147ce2 LAB_00147c63: LEA R15,[RBP + -0x48] LEA R12,[RBP + -0x50] LEA R13,[RBP + -0x38] LAB_00147c6f: MOV RDI,RBX MOV RSI,RDX LEA RDX,[RBP + -0x40] MOV RCX,R15 CALL 0x0014a881 MOV R14B,0x1 TEST EAX,EAX JNZ 0x00147cd0 MOV RCX,-0x1 CMP byte ptr [RBX + 0x681],0x0 JNZ 0x00147ca2 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0xc8] LAB_00147ca2: MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x48] LEA RAX,[RBP + -0x2c] MOV qword ptr [RSP],RAX MOV RDI,RBX MOV R8,R12 MOV R9,R13 CALL 0x001485e6 TEST EAX,EAX JNZ 0x00147cd0 MOV RDX,qword ptr [RBP + -0x38] TEST RDX,RDX JNZ 0x00147c6f XOR R14D,R14D LAB_00147cd0: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00147ce2: ADD RAX,qword ptr [RSI + 0x10] MOV RSI,qword ptr [RSI + 0x8] SHL RSI,0x2 LEA RSI,[RSI + RSI*0x4] SUB RAX,RSI CMP RAX,RCX JNC 0x00147c63 CALL 0x001a2412 MOV dword ptr [RAX],0x87 MOV R14B,0x1 JMP 0x00147cd0
ulong write_dynamic_record(long *param_1,int8 param_2,long param_3) { long lVar1; int iVar2; ulong uVar3; int4 *puVar4; int8 uVar5; ulong unaff_R14; int8 local_58; int8 local_50; int8 local_48; long local_40; int4 local_34; local_34 = 0; lVar1 = param_1[4]; uVar3 = *(long *)(*param_1 + 0x368) - *(long *)(lVar1 + 0x28); local_58 = param_2; local_40 = param_3; if ((uVar3 < param_3 + 0x14U) && (uVar3 + *(long *)(lVar1 + 0x10) + *(long *)(lVar1 + 8) * -0x14 < param_3 + 0x14U)) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x87; unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); } else { do { iVar2 = _ma_find_writepos(param_1,local_40,&local_48,&local_50); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (iVar2 != 0) goto LAB_00147cd0; uVar5 = 0xffffffffffffffff; if (*(char *)((long)param_1 + 0x681) == '\0') { uVar5 = *(int8 *)(*param_1 + 200); } iVar2 = _ma_write_part_record(param_1,local_48,local_50,uVar5,&local_58,&local_40,&local_34); if (iVar2 != 0) goto LAB_00147cd0; } while (local_40 != 0); unaff_R14 = 0; } LAB_00147cd0: return unaff_R14 & 0xffffffff; }
51,519
fmt::v11::basic_appender<char> fmt::v11::detail::write_significand<fmt::v11::basic_appender<char>, char>(fmt::v11::basic_appender<char>, char const*, int, int, char)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto write_significand(OutputIt out, const char* significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt { out = detail::copy_noinline<Char>(significand, significand + integral_size, out); if (!decimal_point) return out; *out++ = decimal_point; return detail::copy_noinline<Char>(significand + integral_size, significand + significand_size, out); }
O1
c
fmt::v11::basic_appender<char> fmt::v11::detail::write_significand<fmt::v11::basic_appender<char>, char>(fmt::v11::basic_appender<char>, char const*, int, int, char): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %r8d, %ebp movl %edx, %r14d movq %rsi, %rbx movq %rdi, %rdx movslq %ecx, %r15 addq %rsi, %r15 movq %rsi, %rdi movq %r15, %rsi callq 0x458b0 movq %rax, %r12 testb %bpl, %bpl je 0x458a4 movq 0x8(%r12), %rsi incq %rsi cmpq %rsi, 0x10(%r12) jae 0x45872 movq %r12, %rdi callq *0x18(%r12) movq (%r12), %rax movq 0x8(%r12), %rcx leaq 0x1(%rcx), %rdx movq %rdx, 0x8(%r12) movb %bpl, (%rax,%rcx) movslq %r14d, %rax addq %rax, %rbx movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x458b0 movq %r12, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN3fmt3v116detail17write_significandINS0_14basic_appenderIcEEcEET_S5_PKciiT0_: push rbp push r15 push r14 push r12 push rbx mov ebp, r8d mov r14d, edx mov rbx, rsi mov rdx, rdi movsxd r15, ecx add r15, rsi mov rdi, rsi mov rsi, r15 call _ZN3fmt3v116detail13copy_noinlineIcPKcNS0_14basic_appenderIcEEEET1_T0_S8_S7_; fmt::v11::detail::copy_noinline<char,char const*,fmt::v11::basic_appender<char>>(char const*,char const*,fmt::v11::basic_appender<char>) mov r12, rax test bpl, bpl jz short loc_458A4 mov rsi, [r12+8] inc rsi cmp [r12+10h], rsi jnb short loc_45872 mov rdi, r12 call qword ptr [r12+18h] loc_45872: mov rax, [r12] mov rcx, [r12+8] lea rdx, [rcx+1] mov [r12+8], rdx mov [rax+rcx], bpl movsxd rax, r14d add rbx, rax mov rdi, r15 mov rsi, rbx mov rdx, r12 pop rbx pop r12 pop r14 pop r15 pop rbp jmp _ZN3fmt3v116detail13copy_noinlineIcPKcNS0_14basic_appenderIcEEEET1_T0_S8_S7_; fmt::v11::detail::copy_noinline<char,char const*,fmt::v11::basic_appender<char>>(char const*,char const*,fmt::v11::basic_appender<char>) loc_458A4: mov rax, r12 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long fmt::v11::detail::write_significand<fmt::v11::basic_appender<char>,char>( long long a1, long long a2, int a3, int a4, char a5) { long long v7; // r15 long long result; // rax long long *v9; // r12 long long v10; // rax long long v11; // rcx v7 = a2 + a4; result = fmt::v11::detail::copy_noinline<char,char const*,fmt::v11::basic_appender<char>>(a2, v7, a1); v9 = (long long *)result; if ( a5 ) { if ( *(_QWORD *)(result + 16) < (unsigned long long)(*(_QWORD *)(result + 8) + 1LL) ) (*(void ( **)(long long))(result + 24))(result); v10 = *v9; v11 = v9[1]; v9[1] = v11 + 1; *(_BYTE *)(v10 + v11) = a5; return fmt::v11::detail::copy_noinline<char,char const*,fmt::v11::basic_appender<char>>(v7, a3 + a2, v9); } return result; }
write_significand<fmt::v11::basic_appender<char>,char>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,R8D MOV R14D,EDX MOV RBX,RSI MOV RDX,RDI MOVSXD R15,ECX ADD R15,RSI MOV RDI,RSI MOV RSI,R15 CALL 0x001458b0 MOV R12,RAX TEST BPL,BPL JZ 0x001458a4 MOV RSI,qword ptr [R12 + 0x8] INC RSI CMP qword ptr [R12 + 0x10],RSI JNC 0x00145872 MOV RDI,R12 CALL qword ptr [R12 + 0x18] LAB_00145872: MOV RAX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] LEA RDX,[RCX + 0x1] MOV qword ptr [R12 + 0x8],RDX MOV byte ptr [RAX + RCX*0x1],BPL MOVSXD RAX,R14D ADD RBX,RAX MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001458b0 LAB_001458a4: MOV RAX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* fmt::v11::basic_appender<char> fmt::v11::detail::write_significand<fmt::v11::basic_appender<char>, char>(fmt::v11::basic_appender<char>, char const*, int, int, char) */ long * fmt::v11::detail::write_significand<fmt::v11::basic_appender<char>,char> (int8 param_1,long param_2,int param_3,int param_4,char param_5) { long lVar1; long *plVar2; plVar2 = (long *)copy_noinline<char,char_const*,fmt::v11::basic_appender<char>> (param_2,param_4 + param_2,param_1); if (param_5 != '\0') { if ((ulong)plVar2[2] < plVar2[1] + 1U) { (*(code *)plVar2[3])(plVar2); } lVar1 = plVar2[1]; plVar2[1] = lVar1 + 1; *(char *)(*plVar2 + lVar1) = param_5; plVar2 = (long *)copy_noinline<char,char_const*,fmt::v11::basic_appender<char>> (param_4 + param_2,param_2 + param_3,plVar2); return plVar2; } return plVar2; }
51,520
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&)
monkey531[P]llama/common/./json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b3d0 movq %rax, %r12 movq (%r14), %rdi callq 0x1b3d0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1bd80 movq %rbx, %rdi movq %r15, %rsi callq 0x1c110 movq (%r14), %rsi movq %rbx, %rdi callq 0x1c110 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xe82d4 movq (%r13), %rsi incq %rsi callq 0x1b8e0 movq %r14, %rdi callq 0x1bfb0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_E82D4 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E82D4: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[32],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b3d0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011b3d0 ADD R12,RAX LAB_001e828f: MOV RDI,RBX MOV RSI,R12 CALL 0x0011bd80 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c110 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011c110 LAB_001e82b0: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [32], char const*>(char const (&) [32], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001e828f to 001e82af has its CatchHandler @ 001e82bd */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
51,521
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&)
monkey531[P]llama/common/./json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1a3d0 movq %rax, %r12 movq (%r14), %rdi callq 0x1a3d0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1ad80 movq %rbx, %rdi movq %r15, %rsi callq 0x1b110 movq (%r14), %rsi movq %rbx, %rdi callq 0x1b110 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xe5194 movq (%r13), %rsi incq %rsi callq 0x1a8e0 movq %r14, %rdi callq 0x1afb0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_E5194 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E5194: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[32],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011a3d0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011a3d0 ADD R12,RAX LAB_001e514f: MOV RDI,RBX MOV RSI,R12 CALL 0x0011ad80 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b110 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011b110 LAB_001e5170: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [32], char const*>(char const (&) [32], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001e514f to 001e516f has its CatchHandler @ 001e517d */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
51,522
inline_mysql_file_chsize
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_chsize( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t newlength, int filler, myf flags) { int result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file, src_line); result= my_chsize(file, newlength, filler, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength); return result; } #endif result= my_chsize(file, newlength, filler, flags); return result; }
O0
c
inline_mysql_file_chsize: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x27bd30(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0xd, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x44422 leaq 0x27bcea(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xef4d0 movl %eax, -0x34(%rbp) leaq 0x27bcb2(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4443e movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xef4d0 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_chsize: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 0Dh call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_44422 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_4443E loc_44422: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_4443E: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_chsize( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 13LL); if ( v8 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v8, v12, v15, v14); v9 = my_chsize(v13, v12, v11, v10); ((void ( *)(long long, long long))PSI_server[67])(v8, v12); } else { return (unsigned int)my_chsize(v13, v12, v11, v10); } return v9; }
inline_mysql_file_chsize: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0xd CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00144422 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001ef4d0 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014443e LAB_00144422: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001ef4d0 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0014443e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_chsize (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,0xd); if (local_48 == 0) { local_c = my_chsize(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_28,local_18,local_1c); local_3c = my_chsize(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,local_28); local_c = local_3c; } return local_c; }
51,523
unpack_filename
eloqsql/mysys/mf_pack.c
size_t unpack_filename(char * to, const char *from) { size_t length, n_length, buff_length; char buff[FN_REFLEN + 1]; DBUG_ENTER("unpack_filename"); length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */ n_length=unpack_dirname(buff,buff); if (n_length+strlen(from+length) < FN_REFLEN) { (void) strmov(buff+n_length,from+length); length= system_filename(to,buff); /* Fix to usably filename */ } else length= system_filename(to,from); /* Fix to usably filename */ DBUG_RETURN(length); }
O3
c
unpack_filename: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x230(%rbp), %r12 leaq -0x238(%rbp), %rdx movq %r12, %rdi callq 0x94895 movq %rax, %r15 movq %r12, %rdi movq %r12, %rsi callq 0x9b422 movq %rax, %r12 addq %r14, %r15 movq %r15, %rdi callq 0x29340 addq %r12, %rax cmpq $0x1ff, %rax # imm = 0x1FF ja 0x9b644 leaq (%r12,%rbp), %rdi addq $-0x230, %rdi # imm = 0xFDD0 movq %r15, %rsi callq 0x29350 leaq -0x230(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi jmp 0x9b64f movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi movq %r14, %rsi callq 0xd727c movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x9b676 subq %rbx, %rax addq $0x220, %rsp # imm = 0x220 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x29250 nop
unpack_filename: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 220h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax lea r12, [rbp+var_230] lea rdx, [rbp+var_238] mov rdi, r12 call dirname_part mov r15, rax mov rdi, r12 mov rsi, r12 call unpack_dirname mov r12, rax add r15, r14 mov rdi, r15 call _strlen add rax, r12 cmp rax, 1FFh ja short loc_9B644 lea rdi, [r12+rbp] add rdi, 0FFFFFFFFFFFFFDD0h mov rsi, r15 call _strcpy lea rsi, [rbp+var_230] mov edx, 1FFh mov rdi, rbx jmp short loc_9B64F loc_9B644: mov edx, 1FFh mov rdi, rbx mov rsi, r14 loc_9B64F: call strmake mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_9B676 sub rax, rbx add rsp, 220h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_9B676: call ___stack_chk_fail
long long unpack_filename(long long a1, _BYTE *a2) { long long v2; // r15 long long v3; // r12 _BYTE *v4; // r15 long long v6; // [rsp+8h] [rbp-238h] BYREF _BYTE v7[520]; // [rsp+10h] [rbp-230h] BYREF unsigned long long v8; // [rsp+218h] [rbp-28h] v8 = __readfsqword(0x28u); v2 = dirname_part((long long)v7, a2, &v6); v3 = unpack_dirname((long long)v7, v7); v4 = &a2[v2]; if ( (unsigned long long)(v3 + strlen(v4)) <= 0x1FF ) { strcpy(&v7[v3], v4); a2 = v7; } return strmake(a1, a2, 511LL) - a1; }
unpack_filename: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x220 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA R12,[RBP + -0x230] LEA RDX,[RBP + -0x238] MOV RDI,R12 CALL 0x00194895 MOV R15,RAX MOV RDI,R12 MOV RSI,R12 CALL 0x0019b422 MOV R12,RAX ADD R15,R14 MOV RDI,R15 CALL 0x00129340 ADD RAX,R12 CMP RAX,0x1ff JA 0x0019b644 LEA RDI,[R12 + RBP*0x1] ADD RDI,-0x230 MOV RSI,R15 CALL 0x00129350 LEA RSI,[RBP + -0x230] MOV EDX,0x1ff MOV RDI,RBX JMP 0x0019b64f LAB_0019b644: MOV EDX,0x1ff MOV RDI,RBX MOV RSI,R14 LAB_0019b64f: CALL 0x001d727c MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x0019b676 SUB RAX,RBX ADD RSP,0x220 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0019b676: CALL 0x00129250
long unpack_filename(long param_1,char *param_2) { long lVar1; long lVar2; size_t sVar3; long in_FS_OFFSET; int1 local_240 [8]; char local_238 [520]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = dirname_part(local_238,param_2,local_240); lVar2 = unpack_dirname(local_238,local_238); sVar3 = strlen(param_2 + lVar1); if (sVar3 + lVar2 < 0x200) { strcpy(local_238 + lVar2,param_2 + lVar1); param_2 = local_238; } lVar1 = strmake(param_1,param_2,0x1ff); if (*(long *)(in_FS_OFFSET + 0x28) != local_30) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar1 - param_1; }
51,524
my_strnncoll_czech
eloqsql/strings/ctype-czech.c
static int my_strnncoll_czech(CHARSET_INFO *cs __attribute__((unused)), const uchar *s1, size_t len1, const uchar *s2, size_t len2, my_bool s2_is_prefix) { int v1, v2; const uchar *p1, * p2, * store1, * store2; int pass1 = 0, pass2 = 0; if (s2_is_prefix && len1 > len2) len1=len2; p1 = s1; p2 = s2; store1 = s1; store2 = s2; do { int diff; NEXT_CMP_VALUE(s1, p1, store1, pass1, v1, (int)len1); NEXT_CMP_VALUE(s2, p2, store2, pass2, v2, (int)len2); if ((diff = v1 - v2)) return diff; } while (v1); return 0; }
O3
c
my_strnncoll_czech: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rcx, %r12 movq %rsi, %r14 cmpq %r8, %rdx movslq %r8d, %rdi cmovbq %rdx, %r8 testb %r9b, %r9b cmoveq %rdx, %r8 movslq %r8d, %rdx movl $0x1, %ecx movl $0x1, %esi subq %r14, %rsi movq %rsi, -0x68(%rbp) subq %r12, %rcx movq %rcx, -0x70(%rbp) xorl %r15d, %r15d movq %r12, %rcx movq %r14, %r13 movq %r12, -0x58(%rbp) movq $0x0, -0x30(%rbp) movq %r14, %rsi movq %r12, -0x50(%rbp) movq %r13, -0x38(%rbp) movq %rsi, %r9 subq %r14, %r9 cmpq %rdx, %r9 jge 0x2f456 movslq %r15d, %rax leaq 0x2bdaa4(%rip), %r8 # 0x2ece80 movq (%r8,%rax,8), %r9 movzbl (%rsi), %r10d movzbl (%r9,%r10), %r10d testl %r10d, %r10d je 0x2f424 cmpl $0x2, %r10d jne 0x2f493 incq %rsi movq %rsi, %r10 subq %r14, %r10 movq %rsi, %rbx cmpq %rdx, %r10 jge 0x2f432 movzbl (%rbx), %r11d cmpb $0x2, (%r9,%r11) jne 0x2f432 incq %rbx incq %r10 movq %rbx, %r11 cmpq %rdx, %r10 jl 0x2f409 jmp 0x2f435 incq %rsi movq %rsi, %r10 subq %r14, %r10 movq %rsi, %rbx jmp 0x2f44f movq %rsi, %r11 cmpl $0x3, %r15d cmovgeq %r11, %rbx movq %rbx, %r10 subq %r14, %r10 cmpq %rdx, %r10 jl 0x2f51b movq %rbx, %rsi cmpq %rdx, %r10 jl 0x2f3e0 jmp 0x2f459 movq %rsi, %rbx cmpl $0x3, %r15d jne 0x2f470 xorl %eax, %eax movl $0x3, %r15d movq -0x38(%rbp), %r13 movq %rbx, %rsi jmp 0x2f48a testl %r15d, %r15d movq %r14, %rsi movq -0x38(%rbp), %r13 cmoveq %r13, %rsi leal 0x1(%r15), %r9d movl $0x1, %eax movl %r9d, %r15d movq -0x30(%rbp), %r11 jmp 0x2f576 cmpl $0xff, %r10d jne 0x2f515 movq %r15, -0x40(%rbp) movq %rsi, %r9 subq %r14, %r9 movq -0x68(%rbp), %r8 addq %rsi, %r8 movq %r8, -0x60(%rbp) xorl %r10d, %r10d movq %r10, %r11 shlq $0x4, %r11 leaq 0x2bd9de(%rip), %r8 # 0x2ecea0 movq (%r11,%r8), %rbx movb (%rbx), %r12b testb %r12b, %r12b je 0x2f4ff cmpq %rdx, %r9 jge 0x2f4ff incq %rbx movq -0x60(%rbp), %r15 movq %rsi, %r13 cmpb %r12b, (%r13) jne 0x2f507 incq %r13 movb (%rbx), %r12b testb %r12b, %r12b je 0x2f502 incq %rbx leaq 0x1(%r15), %r8 cmpq %rdx, %r15 movq %r8, %r15 jl 0x2f4dd jmp 0x2f502 movq %rsi, %r13 testb %r12b, %r12b je 0x2f547 incq %r10 cmpq $0x50, %r10 jne 0x2f4b4 movb $-0x1, %r10b jmp 0x2f55f movq -0x30(%rbp), %r11 jmp 0x2f56b movl $0x2, %eax cmpl $0x1, %r15d movq -0x30(%rbp), %r11 jle 0x2f533 movq -0x38(%rbp), %r13 movq %rbx, %rsi jmp 0x2f576 movl $0x1, %esi subl %r15d, %esi movq %rbx, %r13 movl %esi, %r15d movq -0x38(%rbp), %rsi jmp 0x2f576 leaq 0x2bd952(%rip), %rsi # 0x2ecea0 addq %rsi, %r11 movq 0x8(%r11), %rsi movb (%rsi,%rax), %r10b decq %r13 movq %r13, %rsi movq -0x40(%rbp), %r15 movq -0x30(%rbp), %r11 movq -0x50(%rbp), %r12 movq -0x38(%rbp), %r13 movzbl %r10b, %eax incq %rsi movq %rcx, %r8 subq %r12, %r8 cmpq %rdi, %r8 jge 0x2f60d movslq %r11d, %r9 leaq 0x2bd8f1(%rip), %r8 # 0x2ece80 movq %r9, -0x60(%rbp) movq (%r8,%r9,8), %rbx movzbl (%rcx), %r8d movzbl (%rbx,%r8), %r8d testl %r8d, %r8d je 0x2f5db cmpl $0x2, %r8d jne 0x2f648 incq %rcx movq %rcx, %r8 subq %r12, %r8 movq %rcx, %r10 cmpq %rdi, %r8 jge 0x2f5e9 movzbl (%r10), %r9d cmpb $0x2, (%rbx,%r9) jne 0x2f5e9 incq %r10 incq %r8 movq %r10, %r9 cmpq %rdi, %r8 jl 0x2f5c0 jmp 0x2f5ec incq %rcx movq %rcx, %r8 subq %r12, %r8 movq %rcx, %r10 jmp 0x2f606 movq %rcx, %r9 cmpl $0x3, %r11d cmovgeq %r9, %r10 movq %r10, %r8 subq %r12, %r8 cmpq %rdi, %r8 jl 0x2f6e0 movq %r10, %rcx cmpq %rdi, %r8 jl 0x2f597 jmp 0x2f610 movq %rcx, %r10 cmpl $0x3, %r11d jne 0x2f62a xorl %r11d, %r11d movl $0x3, %ecx movq %rcx, -0x30(%rbp) movq %r10, %rcx jmp 0x2f739 testl %r11d, %r11d leal 0x1(%r11), %r8d movq %r12, %rcx cmoveq -0x58(%rbp), %rcx movl $0x1, %r11d movq %r8, -0x30(%rbp) jmp 0x2f739 cmpl $0xff, %r8d jne 0x2f732 movq %r13, -0x40(%rbp) movl %eax, -0x44(%rbp) movq %rcx, %rax subq %r12, %rax movq -0x70(%rbp), %r8 addq %rcx, %r8 movq %r8, -0x38(%rbp) xorl %r11d, %r11d movq %r15, %rbx movq %r11, %r8 shlq $0x4, %r8 leaq 0x2bd81f(%rip), %r9 # 0x2ecea0 movq (%r8,%r9), %r13 movb (%r13), %r9b testb %r9b, %r9b je 0x2f6c0 cmpq %rdi, %rax jge 0x2f6c0 incq %r13 movq -0x38(%rbp), %r15 movq %rcx, %r12 cmpb %r9b, (%r12) jne 0x2f6c8 incq %r12 movb (%r13), %r9b testb %r9b, %r9b je 0x2f6c3 incq %r13 leaq 0x1(%r15), %r10 cmpq %rdi, %r15 movq %r10, %r15 jl 0x2f69d jmp 0x2f6c3 movq %rcx, %r12 testb %r9b, %r9b je 0x2f708 incq %r11 cmpq $0x50, %r11 movq -0x50(%rbp), %r12 jne 0x2f673 movq %rbx, %r15 movb $-0x1, %r8b movl -0x44(%rbp), %eax jmp 0x2f72e movq %r11, %rcx movl $0x2, %r11d cmpl $0x1, %ecx jg 0x2f622 movl $0x1, %r8d subl %ecx, %r8d movq -0x58(%rbp), %rcx movq %r10, -0x58(%rbp) jmp 0x2f63f leaq 0x2bd791(%rip), %rcx # 0x2ecea0 addq %rcx, %r8 movq 0x8(%r8), %rcx movq -0x60(%rbp), %r8 movb (%rcx,%r8), %r8b decq %r12 movq %r12, %rcx movq %rbx, %r15 movl -0x44(%rbp), %eax movq -0x50(%rbp), %r12 movq -0x40(%rbp), %r13 movzbl %r8b, %r11d incq %rcx testl %eax, %eax je 0x2f746 cmpl %r11d, %eax je 0x2f3bf subl %r11d, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnncoll_czech: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r12, rcx mov r14, rsi cmp rdx, r8 movsxd rdi, r8d cmovb r8, rdx test r9b, r9b cmovz r8, rdx movsxd rdx, r8d mov ecx, 1 mov esi, 1 sub rsi, r14 mov [rbp+var_68], rsi sub rcx, r12 mov [rbp+var_70], rcx xor r15d, r15d mov rcx, r12 mov r13, r14 mov [rbp+var_58], r12 mov [rbp+var_30], 0 mov rsi, r14 mov [rbp+var_50], r12 loc_2F3BF: mov [rbp+var_38], r13 mov r9, rsi sub r9, r14 cmp r9, rdx jge loc_2F456 movsxd rax, r15d lea r8, CZ_SORT_TABLE mov r9, [r8+rax*8] loc_2F3E0: movzx r10d, byte ptr [rsi] movzx r10d, byte ptr [r9+r10] test r10d, r10d jz short loc_2F424 cmp r10d, 2 jnz loc_2F493 inc rsi mov r10, rsi sub r10, r14 mov rbx, rsi cmp r10, rdx jge short loc_2F432 loc_2F409: movzx r11d, byte ptr [rbx] cmp byte ptr [r9+r11], 2 jnz short loc_2F432 inc rbx inc r10 mov r11, rbx cmp r10, rdx jl short loc_2F409 jmp short loc_2F435 loc_2F424: inc rsi mov r10, rsi sub r10, r14 mov rbx, rsi jmp short loc_2F44F loc_2F432: mov r11, rsi loc_2F435: cmp r15d, 3 cmovge rbx, r11 mov r10, rbx sub r10, r14 cmp r10, rdx jl loc_2F51B mov rsi, rbx loc_2F44F: cmp r10, rdx jl short loc_2F3E0 jmp short loc_2F459 loc_2F456: mov rbx, rsi loc_2F459: cmp r15d, 3 jnz short loc_2F470 xor eax, eax mov r15d, 3 mov r13, [rbp+var_38] mov rsi, rbx jmp short loc_2F48A loc_2F470: test r15d, r15d mov rsi, r14 mov r13, [rbp+var_38] cmovz rsi, r13 lea r9d, [r15+1] mov eax, 1 mov r15d, r9d loc_2F48A: mov r11, [rbp+var_30] jmp loc_2F576 loc_2F493: cmp r10d, 0FFh jnz short loc_2F515 mov [rbp+var_40], r15 mov r9, rsi sub r9, r14 mov r8, [rbp+var_68] add r8, rsi mov [rbp+var_60], r8 xor r10d, r10d loc_2F4B4: mov r11, r10 shl r11, 4 lea r8, doubles mov rbx, [r11+r8] mov r12b, [rbx] test r12b, r12b jz short loc_2F4FF cmp r9, rdx jge short loc_2F4FF inc rbx mov r15, [rbp+var_60] mov r13, rsi loc_2F4DD: cmp [r13+0], r12b jnz short loc_2F507 inc r13 mov r12b, [rbx] test r12b, r12b jz short loc_2F502 inc rbx lea r8, [r15+1] cmp r15, rdx mov r15, r8 jl short loc_2F4DD jmp short loc_2F502 loc_2F4FF: mov r13, rsi loc_2F502: test r12b, r12b jz short loc_2F547 loc_2F507: inc r10 cmp r10, 50h ; 'P' jnz short loc_2F4B4 mov r10b, 0FFh jmp short loc_2F55F loc_2F515: mov r11, [rbp+var_30] jmp short loc_2F56B loc_2F51B: mov eax, 2 cmp r15d, 1 mov r11, [rbp+var_30] jle short loc_2F533 mov r13, [rbp+var_38] mov rsi, rbx jmp short loc_2F576 loc_2F533: mov esi, 1 sub esi, r15d mov r13, rbx mov r15d, esi mov rsi, [rbp+var_38] jmp short loc_2F576 loc_2F547: lea rsi, doubles add r11, rsi mov rsi, [r11+8] mov r10b, [rsi+rax] dec r13 mov rsi, r13 loc_2F55F: mov r15, [rbp+var_40] mov r11, [rbp+var_30] mov r12, [rbp+var_50] loc_2F56B: mov r13, [rbp+var_38] movzx eax, r10b inc rsi loc_2F576: mov r8, rcx sub r8, r12 cmp r8, rdi jge loc_2F60D movsxd r9, r11d lea r8, CZ_SORT_TABLE mov [rbp+var_60], r9 mov rbx, [r8+r9*8] loc_2F597: movzx r8d, byte ptr [rcx] movzx r8d, byte ptr [rbx+r8] test r8d, r8d jz short loc_2F5DB cmp r8d, 2 jnz loc_2F648 inc rcx mov r8, rcx sub r8, r12 mov r10, rcx cmp r8, rdi jge short loc_2F5E9 loc_2F5C0: movzx r9d, byte ptr [r10] cmp byte ptr [rbx+r9], 2 jnz short loc_2F5E9 inc r10 inc r8 mov r9, r10 cmp r8, rdi jl short loc_2F5C0 jmp short loc_2F5EC loc_2F5DB: inc rcx mov r8, rcx sub r8, r12 mov r10, rcx jmp short loc_2F606 loc_2F5E9: mov r9, rcx loc_2F5EC: cmp r11d, 3 cmovge r10, r9 mov r8, r10 sub r8, r12 cmp r8, rdi jl loc_2F6E0 mov rcx, r10 loc_2F606: cmp r8, rdi jl short loc_2F597 jmp short loc_2F610 loc_2F60D: mov r10, rcx loc_2F610: cmp r11d, 3 jnz short loc_2F62A xor r11d, r11d mov ecx, 3 mov [rbp+var_30], rcx loc_2F622: mov rcx, r10 jmp loc_2F739 loc_2F62A: test r11d, r11d lea r8d, [r11+1] mov rcx, r12 cmovz rcx, [rbp+var_58] mov r11d, 1 loc_2F63F: mov [rbp+var_30], r8 jmp loc_2F739 loc_2F648: cmp r8d, 0FFh jnz loc_2F732 mov [rbp+var_40], r13 mov [rbp+var_44], eax mov rax, rcx sub rax, r12 mov r8, [rbp+var_70] add r8, rcx mov [rbp+var_38], r8 xor r11d, r11d mov rbx, r15 loc_2F673: mov r8, r11 shl r8, 4 lea r9, doubles mov r13, [r8+r9] mov r9b, [r13+0] test r9b, r9b jz short loc_2F6C0 cmp rax, rdi jge short loc_2F6C0 inc r13 mov r15, [rbp+var_38] mov r12, rcx loc_2F69D: cmp [r12], r9b jnz short loc_2F6C8 inc r12 mov r9b, [r13+0] test r9b, r9b jz short loc_2F6C3 inc r13 lea r10, [r15+1] cmp r15, rdi mov r15, r10 jl short loc_2F69D jmp short loc_2F6C3 loc_2F6C0: mov r12, rcx loc_2F6C3: test r9b, r9b jz short loc_2F708 loc_2F6C8: inc r11 cmp r11, 50h ; 'P' mov r12, [rbp+var_50] jnz short loc_2F673 mov r15, rbx mov r8b, 0FFh mov eax, [rbp+var_44] jmp short loc_2F72E loc_2F6E0: mov rcx, r11 mov r11d, 2 cmp ecx, 1 jg loc_2F622 mov r8d, 1 sub r8d, ecx mov rcx, [rbp+var_58] mov [rbp+var_58], r10 jmp loc_2F63F loc_2F708: lea rcx, doubles add r8, rcx mov rcx, [r8+8] mov r8, [rbp+var_60] mov r8b, [rcx+r8] dec r12 mov rcx, r12 mov r15, rbx mov eax, [rbp+var_44] mov r12, [rbp+var_50] loc_2F72E: mov r13, [rbp+var_40] loc_2F732: movzx r11d, r8b inc rcx loc_2F739: test eax, eax jz short loc_2F746 cmp eax, r11d jz loc_2F3BF loc_2F746: sub eax, r11d pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnncoll_czech( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { unsigned __int8 *v6; // r12 unsigned __int8 *v7; // r14 long long v8; // rdi long long v9; // rdx long long v10; // r15 unsigned __int8 *v11; // r13 long long v12; // rax long long v13; // r9 long long v14; // r10 unsigned __int8 *v15; // rsi long long v16; // r10 unsigned __int8 *v17; // rbx unsigned __int8 *v18; // r11 unsigned __int8 *v19; // r10 int v20; // eax int v21; // r11d char *v22; // rbx char v23; // r12 char *v24; // rbx unsigned __int8 *v25; // r15 _BYTE *v26; // r13 bool v27; // cc long long v28; // rbx int v29; // r8d unsigned __int8 *v30; // rcx long long v31; // r8 unsigned __int8 *v32; // r10 unsigned __int8 *v33; // r9 unsigned __int8 *v34; // r8 int v35; // r11d int v36; // r8d unsigned __int8 *v37; // rax long long v38; // r11 long long v39; // rbx char *v40; // r13 char v41; // r9 char *v42; // r13 unsigned __int8 *v43; // r15 _BYTE *v44; // r12 int v45; // ecx long long v47; // [rsp+0h] [rbp-70h] long long v48; // [rsp+8h] [rbp-68h] long long v49; // [rsp+10h] [rbp-60h] unsigned __int8 *v50; // [rsp+18h] [rbp-58h] unsigned __int8 *v51; // [rsp+20h] [rbp-50h] int v52; // [rsp+2Ch] [rbp-44h] long long v53; // [rsp+30h] [rbp-40h] unsigned __int8 *v54; // [rsp+30h] [rbp-40h] unsigned __int8 *v55; // [rsp+38h] [rbp-38h] int v56; // [rsp+40h] [rbp-30h] v6 = a4; v7 = a2; v8 = (int)a5; if ( a3 < a5 ) LODWORD(a5) = a3; if ( !a6 ) LODWORD(a5) = a3; v9 = (int)a5; v48 = 1LL - (_QWORD)a2; v47 = 1LL - (_QWORD)a4; v10 = 0LL; v11 = a2; v50 = a4; v56 = 0; v51 = a4; do { v55 = v11; if ( a2 - v7 >= v9 ) { v17 = a2; LABEL_23: if ( (_DWORD)v10 == 3 ) { v20 = 0; v10 = 3LL; a2 = v17; } else { a2 = v7; if ( !(_DWORD)v10 ) a2 = v11; v20 = 1; v10 = (unsigned int)(v10 + 1); } v21 = v56; goto LABEL_49; } v12 = (int)v10; v13 = (long long)*(&CZ_SORT_TABLE + (int)v10); while ( 1 ) { LODWORD(v14) = *(unsigned __int8 *)(v13 + *a2); if ( *(_BYTE *)(v13 + *a2) ) break; v19 = (unsigned __int8 *)(++a2 - v7); v17 = a2; LABEL_20: if ( (long long)v19 >= v9 ) goto LABEL_23; } if ( (_DWORD)v14 == 2 ) { v15 = a2 + 1; v16 = v15 - v7; v17 = v15; if ( v15 - v7 < v9 ) { while ( *(_BYTE *)(v13 + *v17) == 2 ) { ++v17; ++v16; v18 = v17; if ( v16 >= v9 ) goto LABEL_16; } } v18 = v15; LABEL_16: if ( (int)v10 >= 3 ) v17 = v18; v19 = (unsigned __int8 *)(v17 - v7); if ( v17 - v7 < v9 ) { v20 = 2; v21 = v56; if ( (int)v10 <= 1 ) { v11 = v17; v10 = (unsigned int)(1 - v10); a2 = v55; } else { a2 = v17; } goto LABEL_49; } a2 = v17; goto LABEL_20; } if ( (_DWORD)v14 != 255 ) { v21 = v56; goto LABEL_48; } v53 = v10; v14 = 0LL; while ( 2 ) { v22 = (char *)*(&doubles + 2 * v14); v23 = *v22; if ( *v22 && a2 - v7 < v9 ) { v24 = v22 + 1; v25 = &a2[v48]; v26 = a2; while ( *v26 == v23 ) { ++v26; v23 = *v24; if ( *v24 ) { ++v24; v27 = (long long)v25++ < v9; if ( v27 ) continue; } goto LABEL_39; } goto LABEL_40; } v26 = a2; LABEL_39: if ( v23 ) { LABEL_40: if ( ++v14 == 80 ) { LOBYTE(v14) = -1; goto LABEL_47; } continue; } break; } LOBYTE(v14) = *((_BYTE *)*(&doubles + 2 * v14 + 1) + v12); a2 = v26 - 1; LABEL_47: v10 = v53; v21 = v56; v6 = v51; LABEL_48: v11 = v55; v20 = (unsigned __int8)v14; ++a2; LABEL_49: if ( a4 - v6 >= v8 ) { v32 = a4; LABEL_66: if ( v21 != 3 ) { v36 = v21 + 1; a4 = v6; if ( !v21 ) a4 = v50; v35 = 1; goto LABEL_72; } v35 = 0; v56 = 3; LABEL_68: a4 = v32; continue; } v49 = v21; v28 = (long long)*(&CZ_SORT_TABLE + v21); while ( 2 ) { v29 = *(unsigned __int8 *)(v28 + *a4); if ( !*(_BYTE *)(v28 + *a4) ) { v34 = (unsigned __int8 *)(++a4 - v6); v32 = a4; LABEL_63: if ( (long long)v34 >= v8 ) goto LABEL_66; continue; } break; } if ( v29 == 2 ) { v30 = a4 + 1; v31 = v30 - v6; v32 = v30; if ( v30 - v6 < v8 ) { while ( *(_BYTE *)(v28 + *v32) == 2 ) { ++v32; ++v31; v33 = v32; if ( v31 >= v8 ) goto LABEL_59; } } v33 = v30; LABEL_59: if ( v21 >= 3 ) v32 = v33; v34 = (unsigned __int8 *)(v32 - v6); if ( v32 - v6 < v8 ) { v45 = v21; v35 = 2; if ( v45 <= 1 ) { v36 = 1 - v45; a4 = v50; v50 = v32; LABEL_72: v56 = v36; continue; } goto LABEL_68; } a4 = v32; goto LABEL_63; } if ( v29 != 255 ) goto LABEL_90; v54 = v11; v52 = v20; v37 = (unsigned __int8 *)(a4 - v6); v38 = 0LL; v39 = v10; while ( 2 ) { v40 = (char *)*(&doubles + 2 * v38); v41 = *v40; if ( *v40 && (long long)v37 < v8 ) { v42 = v40 + 1; v43 = &a4[v47]; v44 = a4; while ( *v44 == v41 ) { ++v44; v41 = *v42; if ( *v42 ) { ++v42; v27 = (long long)v43++ < v8; if ( v27 ) continue; } goto LABEL_83; } goto LABEL_84; } v44 = a4; LABEL_83: if ( v41 ) { LABEL_84: ++v38; v6 = v51; if ( v38 == 80 ) { v10 = v39; LOBYTE(v29) = -1; v20 = v52; goto LABEL_89; } continue; } break; } LOBYTE(v29) = *((_BYTE *)*(&doubles + 2 * v38 + 1) + v49); a4 = v44 - 1; v10 = v39; v20 = v52; v6 = v51; LABEL_89: v11 = v54; LABEL_90: v35 = (unsigned __int8)v29; ++a4; } while ( v20 && v20 == v35 ); return (unsigned int)(v20 - v35); }
my_strnncoll_czech: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R12,RCX MOV R14,RSI CMP RDX,R8 MOVSXD RDI,R8D CMOVC R8,RDX TEST R9B,R9B CMOVZ R8,RDX MOVSXD RDX,R8D MOV ECX,0x1 MOV ESI,0x1 SUB RSI,R14 MOV qword ptr [RBP + -0x68],RSI SUB RCX,R12 MOV qword ptr [RBP + -0x70],RCX XOR R15D,R15D MOV RCX,R12 MOV R13,R14 MOV qword ptr [RBP + -0x58],R12 MOV qword ptr [RBP + -0x30],0x0 MOV RSI,R14 MOV qword ptr [RBP + -0x50],R12 LAB_0012f3bf: MOV qword ptr [RBP + -0x38],R13 MOV R9,RSI SUB R9,R14 CMP R9,RDX JGE 0x0012f456 MOVSXD RAX,R15D LEA R8,[0x3ece80] MOV R9,qword ptr [R8 + RAX*0x8] LAB_0012f3e0: MOVZX R10D,byte ptr [RSI] MOVZX R10D,byte ptr [R9 + R10*0x1] TEST R10D,R10D JZ 0x0012f424 CMP R10D,0x2 JNZ 0x0012f493 INC RSI MOV R10,RSI SUB R10,R14 MOV RBX,RSI CMP R10,RDX JGE 0x0012f432 LAB_0012f409: MOVZX R11D,byte ptr [RBX] CMP byte ptr [R9 + R11*0x1],0x2 JNZ 0x0012f432 INC RBX INC R10 MOV R11,RBX CMP R10,RDX JL 0x0012f409 JMP 0x0012f435 LAB_0012f424: INC RSI MOV R10,RSI SUB R10,R14 MOV RBX,RSI JMP 0x0012f44f LAB_0012f432: MOV R11,RSI LAB_0012f435: CMP R15D,0x3 CMOVGE RBX,R11 MOV R10,RBX SUB R10,R14 CMP R10,RDX JL 0x0012f51b MOV RSI,RBX LAB_0012f44f: CMP R10,RDX JL 0x0012f3e0 JMP 0x0012f459 LAB_0012f456: MOV RBX,RSI LAB_0012f459: CMP R15D,0x3 JNZ 0x0012f470 XOR EAX,EAX MOV R15D,0x3 MOV R13,qword ptr [RBP + -0x38] MOV RSI,RBX JMP 0x0012f48a LAB_0012f470: TEST R15D,R15D MOV RSI,R14 MOV R13,qword ptr [RBP + -0x38] CMOVZ RSI,R13 LEA R9D,[R15 + 0x1] MOV EAX,0x1 MOV R15D,R9D LAB_0012f48a: MOV R11,qword ptr [RBP + -0x30] JMP 0x0012f576 LAB_0012f493: CMP R10D,0xff JNZ 0x0012f515 MOV qword ptr [RBP + -0x40],R15 MOV R9,RSI SUB R9,R14 MOV R8,qword ptr [RBP + -0x68] ADD R8,RSI MOV qword ptr [RBP + -0x60],R8 XOR R10D,R10D LAB_0012f4b4: MOV R11,R10 SHL R11,0x4 LEA R8,[0x3ecea0] MOV RBX,qword ptr [R11 + R8*0x1] MOV R12B,byte ptr [RBX] TEST R12B,R12B JZ 0x0012f4ff CMP R9,RDX JGE 0x0012f4ff INC RBX MOV R15,qword ptr [RBP + -0x60] MOV R13,RSI LAB_0012f4dd: CMP byte ptr [R13],R12B JNZ 0x0012f507 INC R13 MOV R12B,byte ptr [RBX] TEST R12B,R12B JZ 0x0012f502 INC RBX LEA R8,[R15 + 0x1] CMP R15,RDX MOV R15,R8 JL 0x0012f4dd JMP 0x0012f502 LAB_0012f4ff: MOV R13,RSI LAB_0012f502: TEST R12B,R12B JZ 0x0012f547 LAB_0012f507: INC R10 CMP R10,0x50 JNZ 0x0012f4b4 MOV R10B,0xff JMP 0x0012f55f LAB_0012f515: MOV R11,qword ptr [RBP + -0x30] JMP 0x0012f56b LAB_0012f51b: MOV EAX,0x2 CMP R15D,0x1 MOV R11,qword ptr [RBP + -0x30] JLE 0x0012f533 MOV R13,qword ptr [RBP + -0x38] MOV RSI,RBX JMP 0x0012f576 LAB_0012f533: MOV ESI,0x1 SUB ESI,R15D MOV R13,RBX MOV R15D,ESI MOV RSI,qword ptr [RBP + -0x38] JMP 0x0012f576 LAB_0012f547: LEA RSI,[0x3ecea0] ADD R11,RSI MOV RSI,qword ptr [R11 + 0x8] MOV R10B,byte ptr [RSI + RAX*0x1] DEC R13 MOV RSI,R13 LAB_0012f55f: MOV R15,qword ptr [RBP + -0x40] MOV R11,qword ptr [RBP + -0x30] MOV R12,qword ptr [RBP + -0x50] LAB_0012f56b: MOV R13,qword ptr [RBP + -0x38] MOVZX EAX,R10B INC RSI LAB_0012f576: MOV R8,RCX SUB R8,R12 CMP R8,RDI JGE 0x0012f60d MOVSXD R9,R11D LEA R8,[0x3ece80] MOV qword ptr [RBP + -0x60],R9 MOV RBX,qword ptr [R8 + R9*0x8] LAB_0012f597: MOVZX R8D,byte ptr [RCX] MOVZX R8D,byte ptr [RBX + R8*0x1] TEST R8D,R8D JZ 0x0012f5db CMP R8D,0x2 JNZ 0x0012f648 INC RCX MOV R8,RCX SUB R8,R12 MOV R10,RCX CMP R8,RDI JGE 0x0012f5e9 LAB_0012f5c0: MOVZX R9D,byte ptr [R10] CMP byte ptr [RBX + R9*0x1],0x2 JNZ 0x0012f5e9 INC R10 INC R8 MOV R9,R10 CMP R8,RDI JL 0x0012f5c0 JMP 0x0012f5ec LAB_0012f5db: INC RCX MOV R8,RCX SUB R8,R12 MOV R10,RCX JMP 0x0012f606 LAB_0012f5e9: MOV R9,RCX LAB_0012f5ec: CMP R11D,0x3 CMOVGE R10,R9 MOV R8,R10 SUB R8,R12 CMP R8,RDI JL 0x0012f6e0 MOV RCX,R10 LAB_0012f606: CMP R8,RDI JL 0x0012f597 JMP 0x0012f610 LAB_0012f60d: MOV R10,RCX LAB_0012f610: CMP R11D,0x3 JNZ 0x0012f62a XOR R11D,R11D MOV ECX,0x3 MOV qword ptr [RBP + -0x30],RCX LAB_0012f622: MOV RCX,R10 JMP 0x0012f739 LAB_0012f62a: TEST R11D,R11D LEA R8D,[R11 + 0x1] MOV RCX,R12 CMOVZ RCX,qword ptr [RBP + -0x58] MOV R11D,0x1 LAB_0012f63f: MOV qword ptr [RBP + -0x30],R8 JMP 0x0012f739 LAB_0012f648: CMP R8D,0xff JNZ 0x0012f732 MOV qword ptr [RBP + -0x40],R13 MOV dword ptr [RBP + -0x44],EAX MOV RAX,RCX SUB RAX,R12 MOV R8,qword ptr [RBP + -0x70] ADD R8,RCX MOV qword ptr [RBP + -0x38],R8 XOR R11D,R11D MOV RBX,R15 LAB_0012f673: MOV R8,R11 SHL R8,0x4 LEA R9,[0x3ecea0] MOV R13,qword ptr [R8 + R9*0x1] MOV R9B,byte ptr [R13] TEST R9B,R9B JZ 0x0012f6c0 CMP RAX,RDI JGE 0x0012f6c0 INC R13 MOV R15,qword ptr [RBP + -0x38] MOV R12,RCX LAB_0012f69d: CMP byte ptr [R12],R9B JNZ 0x0012f6c8 INC R12 MOV R9B,byte ptr [R13] TEST R9B,R9B JZ 0x0012f6c3 INC R13 LEA R10,[R15 + 0x1] CMP R15,RDI MOV R15,R10 JL 0x0012f69d JMP 0x0012f6c3 LAB_0012f6c0: MOV R12,RCX LAB_0012f6c3: TEST R9B,R9B JZ 0x0012f708 LAB_0012f6c8: INC R11 CMP R11,0x50 MOV R12,qword ptr [RBP + -0x50] JNZ 0x0012f673 MOV R15,RBX MOV R8B,0xff MOV EAX,dword ptr [RBP + -0x44] JMP 0x0012f72e LAB_0012f6e0: MOV RCX,R11 MOV R11D,0x2 CMP ECX,0x1 JG 0x0012f622 MOV R8D,0x1 SUB R8D,ECX MOV RCX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],R10 JMP 0x0012f63f LAB_0012f708: LEA RCX,[0x3ecea0] ADD R8,RCX MOV RCX,qword ptr [R8 + 0x8] MOV R8,qword ptr [RBP + -0x60] MOV R8B,byte ptr [RCX + R8*0x1] DEC R12 MOV RCX,R12 MOV R15,RBX MOV EAX,dword ptr [RBP + -0x44] MOV R12,qword ptr [RBP + -0x50] LAB_0012f72e: MOV R13,qword ptr [RBP + -0x40] LAB_0012f732: MOVZX R11D,R8B INC RCX LAB_0012f739: TEST EAX,EAX JZ 0x0012f746 CMP EAX,R11D JZ 0x0012f3bf LAB_0012f746: SUB EAX,R11D POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_strnncoll_czech(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, char param_6) { byte *pbVar1; byte *pbVar2; byte *pbVar3; long lVar4; byte *pbVar5; byte *pbVar6; long lVar7; int iVar8; uint uVar9; int iVar10; uint uVar11; long lVar12; byte *pbVar13; byte bVar14; byte *pbVar15; byte *pbVar16; byte *local_60; lVar7 = (long)(int)param_5; if (param_3 < param_5) { param_5 = param_3; } iVar8 = (int)param_5; if (param_6 == '\0') { iVar8 = (int)param_3; } lVar4 = (long)iVar8; iVar10 = 0; iVar8 = 0; pbVar13 = param_4; pbVar6 = param_2; pbVar16 = param_2; local_60 = param_4; LAB_0012f3bf: if ((long)pbVar6 - (long)param_2 < lVar4) { do { bVar14 = (&CZ_SORT_TABLE)[iVar10][*pbVar6]; uVar11 = (uint)bVar14; if (bVar14 == 0) { lVar12 = (long)(pbVar6 + 1) - (long)param_2; pbVar6 = pbVar6 + 1; } else { if (bVar14 != 2) { if (bVar14 != 0xff) goto LAB_0012f56b; lVar12 = 0; goto LAB_0012f4b4; } pbVar6 = pbVar6 + 1; lVar12 = (long)pbVar6 - (long)param_2; pbVar5 = pbVar6; while ((pbVar15 = pbVar5, lVar12 < lVar4 && (pbVar15 = pbVar6, (&CZ_SORT_TABLE)[iVar10][*pbVar5] == '\x02'))) { pbVar5 = pbVar5 + 1; lVar12 = lVar12 + 1; } if (2 < iVar10) { pbVar5 = pbVar15; } lVar12 = (long)pbVar5 - (long)param_2; pbVar6 = pbVar5; if (lVar12 < lVar4) { uVar11 = 2; if (iVar10 < 2) { iVar10 = 1 - iVar10; pbVar6 = pbVar16; pbVar16 = pbVar5; } goto LAB_0012f576; } } } while (lVar12 < lVar4); } if (iVar10 == 3) { uVar11 = 0; iVar10 = 3; } else { pbVar6 = param_2; if (iVar10 == 0) { pbVar6 = pbVar16; } iVar10 = iVar10 + 1; uVar11 = 1; } goto LAB_0012f576; LAB_0012f4b4: do { pbVar5 = (&doubles)[lVar12 * 2]; bVar14 = *pbVar5; pbVar15 = pbVar6; pbVar3 = pbVar6 + (1 - (long)param_2); pbVar2 = pbVar6 + -(long)param_2; if (bVar14 != 0) { while (pbVar1 = pbVar3, (long)pbVar2 < lVar4) { pbVar5 = pbVar5 + 1; if (*pbVar15 != bVar14) goto LAB_0012f507; pbVar15 = pbVar15 + 1; bVar14 = *pbVar5; if (bVar14 == 0) break; pbVar3 = pbVar1 + 1; pbVar2 = pbVar1; } } if (bVar14 == 0) { uVar11 = (uint)(byte)(&PTR_DAT_003ecea8)[lVar12 * 2][iVar10]; pbVar6 = pbVar15 + -1; goto LAB_0012f56b; } LAB_0012f507: lVar12 = lVar12 + 1; } while (lVar12 != 0x50); uVar11 = 0xff; LAB_0012f56b: pbVar6 = pbVar6 + 1; LAB_0012f576: if ((long)pbVar13 - (long)param_4 < lVar7) { do { bVar14 = (&CZ_SORT_TABLE)[iVar8][*pbVar13]; uVar9 = (uint)bVar14; if (bVar14 == 0) { pbVar13 = pbVar13 + 1; lVar12 = (long)pbVar13 - (long)param_4; } else { if (bVar14 != 2) { if (bVar14 != 0xff) goto LAB_0012f732; lVar12 = 0; goto LAB_0012f673; } pbVar5 = pbVar13 + 1; lVar12 = (long)pbVar5 - (long)param_4; pbVar13 = pbVar5; while ((pbVar15 = pbVar13, lVar12 < lVar7 && (pbVar15 = pbVar5, (&CZ_SORT_TABLE)[iVar8][*pbVar13] == '\x02'))) { pbVar13 = pbVar13 + 1; lVar12 = lVar12 + 1; } if (2 < iVar8) { pbVar13 = pbVar15; } lVar12 = (long)pbVar13 - (long)param_4; if (lVar12 < lVar7) { uVar9 = 2; if (1 < iVar8) goto LAB_0012f739; iVar8 = -iVar8; pbVar5 = local_60; local_60 = pbVar13; goto LAB_0012f63f; } } } while (lVar12 < lVar7); } if (iVar8 == 3) { uVar9 = 0; iVar8 = 3; } else { pbVar5 = param_4; if (iVar8 == 0) { pbVar5 = local_60; } uVar9 = 1; LAB_0012f63f: iVar8 = iVar8 + 1; pbVar13 = pbVar5; } LAB_0012f739: if ((uVar11 == 0) || (uVar11 != uVar9)) { return uVar11 - uVar9; } goto LAB_0012f3bf; LAB_0012f673: do { pbVar5 = (&doubles)[lVar12 * 2]; bVar14 = *pbVar5; pbVar15 = pbVar13; pbVar3 = pbVar13 + (1 - (long)param_4); pbVar2 = pbVar13 + -(long)param_4; if (bVar14 != 0) { while (pbVar1 = pbVar3, (long)pbVar2 < lVar7) { pbVar5 = pbVar5 + 1; if (*pbVar15 != bVar14) goto LAB_0012f6c8; pbVar15 = pbVar15 + 1; bVar14 = *pbVar5; if (bVar14 == 0) break; pbVar3 = pbVar1 + 1; pbVar2 = pbVar1; } } if (bVar14 == 0) { uVar9 = (uint)(byte)(&PTR_DAT_003ecea8)[lVar12 * 2][iVar8]; pbVar13 = pbVar15 + -1; goto LAB_0012f732; } LAB_0012f6c8: lVar12 = lVar12 + 1; } while (lVar12 != 0x50); uVar9 = 0xff; LAB_0012f732: pbVar13 = pbVar13 + 1; goto LAB_0012f739; }
51,525
google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*, google::protobuf::Arena*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/dynamic_message.cc
DynamicMessage::DynamicMessage(const DynamicMessageFactory::TypeInfo* type_info, Arena* arena) : Message(arena), type_info_(type_info), cached_byte_size_(0) { SharedCtor(true); }
O3
cpp
google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*, google::protobuf::Arena*): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq %rdx, 0x8(%rdi) leaq 0x9f059(%rip), %rax # 0xffcb0 movq %rax, (%rdi) movq %rsi, 0x10(%rdi) movl $0x0, 0x18(%rdi) movl $0x1, %esi callq 0x60862 popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 leaq 0xa06a1(%rip), %rax # 0x101320 addq $0x10, %rax movq %rax, (%r14) movq %rbx, %rdi callq 0x59494 movq %r15, %rdi callq 0xf570
_ZN6google8protobuf14DynamicMessageC2EPKNS0_21DynamicMessageFactory8TypeInfoEPNS0_5ArenaE: push r15; Alternative name is 'google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*, google::protobuf::Arena *)' push r14 push rbx mov r14, rdi lea rbx, [rdi+8] mov [rdi+8], rdx lea rax, off_FFCB0 mov [rdi], rax mov [rdi+10h], rsi mov dword ptr [rdi+18h], 0 mov esi, 1; bool call _ZN6google8protobuf14DynamicMessage10SharedCtorEb; google::protobuf::DynamicMessage::SharedCtor(bool) pop rbx pop r14 pop r15 retn mov r15, rax lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite add rax, 10h mov [r14], rax mov rdi, rbx; this call _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata() mov rdi, r15 call __Unwind_Resume
long long google::protobuf::DynamicMessage::DynamicMessage( google::protobuf::DynamicMessage *this, const google::protobuf::DynamicMessageFactory::TypeInfo *a2, google::protobuf::Arena *a3, long long a4, long long a5) { *((_QWORD *)this + 1) = a3; *(_QWORD *)this = off_FFCB0; *((_QWORD *)this + 2) = a2; *((_DWORD *)this + 6) = 0; return google::protobuf::DynamicMessage::SharedCtor(this, 1, (long long)a3, a4, a5); }
DynamicMessage: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV qword ptr [RDI + 0x8],RDX LEA RAX,[0x1ffcb0] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x10],RSI MOV dword ptr [RDI + 0x18],0x0 LAB_00160c65: MOV ESI,0x1 CALL 0x00160862 LAB_00160c6f: POP RBX POP R14 POP R15 RET
/* google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*, google::protobuf::Arena*) */ void __thiscall google::protobuf::DynamicMessage::DynamicMessage (DynamicMessage *this,TypeInfo *param_1,Arena *param_2) { *(Arena **)(this + 8) = param_2; *(int ***)this = &PTR__DynamicMessage_001ffcb0; *(TypeInfo **)(this + 0x10) = param_1; *(int4 *)(this + 0x18) = 0; /* try { // try from 00160c65 to 00160c6e has its CatchHandler @ 00160c75 */ SharedCtor(this,true); return; }
51,526
my_snprintf_8bit
eloqsql/strings/ctype-simple.c
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n __attribute__((unused)), const char* fmt, ...) { va_list args; size_t result; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O3
c
my_snprintf_8bit: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rsi, %rdi leaq -0xd0(%rbp), %rsi movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0xbbd25 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rax movq %rsi, 0x10(%rax) leaq 0x10(%rbp), %rsi movq %rsi, 0x8(%rax) movabsq $0x3000000020, %rsi # imm = 0x3000000020 movq %rsi, (%rax) movq %rdx, %rsi movq %rcx, %rdx movq %rax, %rcx callq 0xdd9d9 addq $0xd0, %rsp popq %rbp retq
my_snprintf_8bit: push rbp mov rbp, rsp sub rsp, 0D0h mov rdi, rsi lea rsi, [rbp+var_D0] mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_BBD25 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_BBD25: lea rax, [rbp+var_20] mov [rax+10h], rsi lea rsi, [rbp+arg_0] mov [rax+8], rsi mov rsi, 3000000020h mov [rax], rsi mov rsi, rdx mov rdx, rcx mov rcx, rax call my_vsnprintf add rsp, 0D0h pop rbp retn
long long my_snprintf_8bit( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+20h] [rbp-B0h] long long v18; // [rsp+28h] [rbp-A8h] __m128 v19; // [rsp+30h] [rbp-A0h] __m128 v20; // [rsp+40h] [rbp-90h] __m128 v21; // [rsp+50h] [rbp-80h] __m128 v22; // [rsp+60h] [rbp-70h] __m128 v23; // [rsp+70h] [rbp-60h] __m128 v24; // [rsp+80h] [rbp-50h] __m128 v25; // [rsp+90h] [rbp-40h] __m128 v26; // [rsp+A0h] [rbp-30h] long long v27; // [rsp+B0h] [rbp-20h] char *v28; // [rsp+B8h] [rbp-18h] char *v29; // [rsp+C0h] [rbp-10h] v19 = a1; v20 = a2; v21 = a3; v22 = a4; v23 = a5; v24 = a6; v25 = a7; v26 = a8; v17 = a13; v18 = a14; v29 = &v16; v28 = &a15; v27 = 0x3000000020LL; return my_vsnprintf(a10, a11, a12); }
my_snprintf_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RDI,RSI LEA RSI,[RBP + -0xd0] MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x001bbd25 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_001bbd25: LEA RAX,[RBP + -0x20] MOV qword ptr [RAX + 0x10],RSI LEA RSI,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RSI MOV RSI,0x3000000020 MOV qword ptr [RAX],RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,RAX CALL 0x001dd9d9 ADD RSP,0xd0 POP RBP RET
void my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [32]; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000020; local_b8 = param_13; local_b0 = param_14; my_vsnprintf(param_10,param_11,param_12,&local_28); return; }
51,527
lock_io_cache
eloqsql/mysys/mf_iocache.c
static int lock_io_cache(IO_CACHE *cache, my_off_t pos) { IO_CACHE_SHARE *cshare= cache->share; DBUG_ENTER("lock_io_cache"); /* Enter the lock. */ mysql_mutex_lock(&cshare->mutex); cshare->running_threads--; DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u", (cache == cshare->source_cache) ? "writer" : "reader", cache, (ulong) pos, cshare->running_threads)); if (cshare->source_cache) { /* A write cache is synchronized to the read caches. */ if (cache == cshare->source_cache) { /* The writer waits until all readers are here. */ while (cshare->running_threads) { DBUG_PRINT("io_cache_share", ("writer waits in lock")); mysql_cond_wait(&cshare->cond_writer, &cshare->mutex); } DBUG_PRINT("io_cache_share", ("writer awoke, going to copy")); /* Stay locked. Leave the lock later by unlock_io_cache(). */ DBUG_RETURN(1); } /* The last thread wakes the writer. */ if (!cshare->running_threads) { DBUG_PRINT("io_cache_share", ("waking writer")); mysql_cond_signal(&cshare->cond_writer); } /* Readers wait until the data is copied from the writer. Another reason to stop waiting is the removal of the write thread. If this happens, we leave the lock with old data in the buffer. */ while ((!cshare->read_end || (cshare->pos_in_file < pos)) && cshare->source_cache) { DBUG_PRINT("io_cache_share", ("reader waits in lock")); mysql_cond_wait(&cshare->cond, &cshare->mutex); } /* If the writer was removed from the share while this thread was asleep, we need to simulate an EOF condition. The writer cannot reset the share variables as they might still be in use by readers of the last block. When we awake here then because the last joining thread signalled us. If the writer is not the last, it will not signal. So it is safe to clear the buffer here. */ if (!cshare->read_end || (cshare->pos_in_file < pos)) { DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF")); cshare->read_end= cshare->buffer; /* Empty buffer. */ cshare->error= 0; /* EOF is not an error. */ } } else { /* There are read caches only. The last thread arriving in lock_io_cache() continues with a locked cache and reads the block. */ if (!cshare->running_threads) { DBUG_PRINT("io_cache_share", ("last thread joined, going to read")); /* Stay locked. Leave the lock later by unlock_io_cache(). */ DBUG_RETURN(1); } /* All other threads wait until the requested block is read by the last thread arriving. Another reason to stop waiting is the removal of a thread. If this leads to all threads being in the lock, we have to continue also. The first of the awaken threads will then do the read. */ while ((!cshare->read_end || (cshare->pos_in_file < pos)) && cshare->running_threads) { DBUG_PRINT("io_cache_share", ("reader waits in lock")); mysql_cond_wait(&cshare->cond, &cshare->mutex); } /* If the block is not yet read, continue with a locked cache and read. */ if (!cshare->read_end || (cshare->pos_in_file < pos)) { DBUG_PRINT("io_cache_share", ("reader awoke, going to read")); /* Stay locked. Leave the lock later by unlock_io_cache(). */ DBUG_RETURN(1); } /* Another thread did read the block already. */ } DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes", (uint) (cshare->read_end ? (size_t) (cshare->read_end - cshare->buffer) : 0))); /* Leave the lock. Do not call unlock_io_cache() later. The thread that filled the buffer did this and marked all threads as running. */ mysql_mutex_unlock(&cshare->mutex); DBUG_RETURN(0); }
O3
c
lock_io_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r15 movq 0x98(%rdi), %rbx cmpq $0x0, 0x40(%rbx) jne 0x96d58 movq %rbx, %rdi callq 0x29220 movl 0xd8(%rbx), %eax decl %eax movl %eax, 0xd8(%rbx) movq 0xc0(%rbx), %rcx testq %rcx, %rcx je 0x96c6b cmpq %r15, %rcx je 0x96d0b testl %eax, %eax jne 0x96c12 leaq 0x80(%rbx), %r15 movq 0xb0(%rbx), %rdi testq %rdi, %rdi jne 0x96d86 movq %r15, %rdi callq 0x295c0 leaq 0x48(%rbx), %r15 leaq 0x4540b(%rip), %r12 # 0xdc028 cmpq $0x0, 0xd0(%rbx) je 0x96c34 cmpq %r14, 0xb8(%rbx) jae 0x96ce1 cmpq $0x0, 0xc0(%rbx) je 0x96cc9 cmpq $0x0, 0x78(%rbx) jne 0x96c56 movq %r15, %rdi movq %rbx, %rsi callq 0x29430 jmp 0x96c1d movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx movl $0x406, %ecx # imm = 0x406 callq 0x2eea0 jmp 0x96c1d movl $0x1, %r15d testl %eax, %eax je 0x96cf9 leaq 0x48(%rbx), %r12 leaq 0x453a4(%rip), %r13 # 0xdc028 cmpq $0x0, 0xd0(%rbx) je 0x96c97 cmpq %r14, 0xb8(%rbx) jae 0x96ce1 cmpl $0x0, 0xd8(%rbx) je 0x96cf9 cmpq $0x0, 0x78(%rbx) jne 0x96cb4 movq %r12, %rdi movq %rbx, %rsi callq 0x29430 jmp 0x96c84 movq %r12, %rdi movq %rbx, %rsi movq %r13, %rdx movl $0x430, %ecx # imm = 0x430 callq 0x2eea0 jmp 0x96c84 movq 0xc8(%rbx), %rax movq %rax, 0xd0(%rbx) movl $0x0, 0xe0(%rbx) movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x96d71 movq %rbx, %rdi callq 0x291e0 xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %r15d testl %eax, %eax je 0x96cf9 leaq 0x80(%rbx), %r14 leaq 0x45305(%rip), %r12 # 0xdc028 cmpq $0x0, 0xb0(%rbx) jne 0x96d43 movq %r14, %rdi movq %rbx, %rsi callq 0x29430 cmpl $0x0, 0xd8(%rbx) jne 0x96d23 jmp 0x96cf9 movq %r14, %rdi movq %rbx, %rsi movq %r12, %rdx movl $0x3ee, %ecx # imm = 0x3EE callq 0x2eea0 jmp 0x96d38 leaq 0x452c9(%rip), %rsi # 0xdc028 movq %rbx, %rdi movl $0x3dd, %edx # imm = 0x3DD callq 0x2eb8f jmp 0x96bc8 leaq 0x2ef298(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x96cee leaq 0x2ef283(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x170(%rax) jmp 0x96c0a
lock_io_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov r15, rdi mov rbx, [rdi+98h] cmp qword ptr [rbx+40h], 0 jnz loc_96D58 mov rdi, rbx call _pthread_mutex_lock loc_96BC8: mov eax, [rbx+0D8h] dec eax mov [rbx+0D8h], eax mov rcx, [rbx+0C0h] test rcx, rcx jz loc_96C6B cmp rcx, r15 jz loc_96D0B test eax, eax jnz short loc_96C12 lea r15, [rbx+80h] mov rdi, [rbx+0B0h] test rdi, rdi jnz loc_96D86 loc_96C0A: mov rdi, r15 call _pthread_cond_signal loc_96C12: lea r15, [rbx+48h] lea r12, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... loc_96C1D: cmp qword ptr [rbx+0D0h], 0 jz short loc_96C34 cmp [rbx+0B8h], r14 jnb loc_96CE1 loc_96C34: cmp qword ptr [rbx+0C0h], 0 jz loc_96CC9 cmp qword ptr [rbx+78h], 0 jnz short loc_96C56 mov rdi, r15 mov rsi, rbx call _pthread_cond_wait jmp short loc_96C1D loc_96C56: mov rdi, r15 mov rsi, rbx mov rdx, r12 mov ecx, 406h call psi_cond_wait jmp short loc_96C1D loc_96C6B: mov r15d, 1 test eax, eax jz loc_96CF9 lea r12, [rbx+48h] lea r13, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... loc_96C84: cmp qword ptr [rbx+0D0h], 0 jz short loc_96C97 cmp [rbx+0B8h], r14 jnb short loc_96CE1 loc_96C97: cmp dword ptr [rbx+0D8h], 0 jz short loc_96CF9 cmp qword ptr [rbx+78h], 0 jnz short loc_96CB4 mov rdi, r12 mov rsi, rbx call _pthread_cond_wait jmp short loc_96C84 loc_96CB4: mov rdi, r12 mov rsi, rbx mov rdx, r13 mov ecx, 430h call psi_cond_wait jmp short loc_96C84 loc_96CC9: mov rax, [rbx+0C8h] mov [rbx+0D0h], rax mov dword ptr [rbx+0E0h], 0 loc_96CE1: mov rdi, [rbx+40h] test rdi, rdi jnz loc_96D71 loc_96CEE: mov rdi, rbx call _pthread_mutex_unlock xor r15d, r15d loc_96CF9: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_96D0B: mov r15d, 1 test eax, eax jz short loc_96CF9 lea r14, [rbx+80h] lea r12, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... loc_96D23: cmp qword ptr [rbx+0B0h], 0 jnz short loc_96D43 mov rdi, r14 mov rsi, rbx call _pthread_cond_wait loc_96D38: cmp dword ptr [rbx+0D8h], 0 jnz short loc_96D23 jmp short loc_96CF9 loc_96D43: mov rdi, r14 mov rsi, rbx mov rdx, r12 mov ecx, 3EEh call psi_cond_wait jmp short loc_96D38 loc_96D58: lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 3DDh call psi_mutex_lock jmp loc_96BC8 loc_96D71: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_96CEE loc_96D86: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp loc_96C0A
long long lock_io_cache(long long a1, unsigned long long a2) { long long v2; // rbx int v3; // eax long long v4; // rcx long long v5; // rdi unsigned int v6; // r15d long long v7; // rdi v2 = *(_QWORD *)(a1 + 152); if ( *(_QWORD *)(v2 + 64) ) psi_mutex_lock( *(_QWORD *)(a1 + 152), (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3DDu); else pthread_mutex_lock(*(_QWORD *)(a1 + 152)); v3 = *(_DWORD *)(v2 + 216) - 1; *(_DWORD *)(v2 + 216) = v3; v4 = *(_QWORD *)(v2 + 192); if ( !v4 ) { v6 = 1; if ( !v3 ) return v6; while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 ) { if ( !*(_DWORD *)(v2 + 216) ) return v6; if ( *(_QWORD *)(v2 + 120) ) psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x430u); else pthread_cond_wait(v2 + 72, v2); } goto LABEL_23; } if ( v4 != a1 ) { if ( !v3 ) { v5 = *(_QWORD *)(v2 + 176); if ( v5 ) ((void ( *)(long long))PSI_server[46])(v5); pthread_cond_signal(v2 + 128); } while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 ) { if ( !*(_QWORD *)(v2 + 192) ) { *(_QWORD *)(v2 + 208) = *(_QWORD *)(v2 + 200); *(_DWORD *)(v2 + 224) = 0; break; } if ( *(_QWORD *)(v2 + 120) ) psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x406u); else pthread_cond_wait(v2 + 72, v2); } LABEL_23: v7 = *(_QWORD *)(v2 + 64); if ( v7 ) ((void ( *)(long long))PSI_server[44])(v7); pthread_mutex_unlock(v2); return 0; } v6 = 1; if ( v3 ) { do { if ( *(_QWORD *)(v2 + 176) ) psi_cond_wait(v2 + 128, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3EEu); else pthread_cond_wait(v2 + 128, v2); } while ( *(_DWORD *)(v2 + 216) ); } return v6; }
lock_io_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R15,RDI MOV RBX,qword ptr [RDI + 0x98] CMP qword ptr [RBX + 0x40],0x0 JNZ 0x00196d58 MOV RDI,RBX CALL 0x00129220 LAB_00196bc8: MOV EAX,dword ptr [RBX + 0xd8] DEC EAX MOV dword ptr [RBX + 0xd8],EAX MOV RCX,qword ptr [RBX + 0xc0] TEST RCX,RCX JZ 0x00196c6b CMP RCX,R15 JZ 0x00196d0b TEST EAX,EAX JNZ 0x00196c12 LEA R15,[RBX + 0x80] MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JNZ 0x00196d86 LAB_00196c0a: MOV RDI,R15 CALL 0x001295c0 LAB_00196c12: LEA R15,[RBX + 0x48] LEA R12,[0x1dc028] LAB_00196c1d: CMP qword ptr [RBX + 0xd0],0x0 JZ 0x00196c34 CMP qword ptr [RBX + 0xb8],R14 JNC 0x00196ce1 LAB_00196c34: CMP qword ptr [RBX + 0xc0],0x0 JZ 0x00196cc9 CMP qword ptr [RBX + 0x78],0x0 JNZ 0x00196c56 MOV RDI,R15 MOV RSI,RBX CALL 0x00129430 JMP 0x00196c1d LAB_00196c56: MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 MOV ECX,0x406 CALL 0x0012eea0 JMP 0x00196c1d LAB_00196c6b: MOV R15D,0x1 TEST EAX,EAX JZ 0x00196cf9 LEA R12,[RBX + 0x48] LEA R13,[0x1dc028] LAB_00196c84: CMP qword ptr [RBX + 0xd0],0x0 JZ 0x00196c97 CMP qword ptr [RBX + 0xb8],R14 JNC 0x00196ce1 LAB_00196c97: CMP dword ptr [RBX + 0xd8],0x0 JZ 0x00196cf9 CMP qword ptr [RBX + 0x78],0x0 JNZ 0x00196cb4 MOV RDI,R12 MOV RSI,RBX CALL 0x00129430 JMP 0x00196c84 LAB_00196cb4: MOV RDI,R12 MOV RSI,RBX MOV RDX,R13 MOV ECX,0x430 CALL 0x0012eea0 JMP 0x00196c84 LAB_00196cc9: MOV RAX,qword ptr [RBX + 0xc8] MOV qword ptr [RBX + 0xd0],RAX MOV dword ptr [RBX + 0xe0],0x0 LAB_00196ce1: MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x00196d71 LAB_00196cee: MOV RDI,RBX CALL 0x001291e0 XOR R15D,R15D LAB_00196cf9: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00196d0b: MOV R15D,0x1 TEST EAX,EAX JZ 0x00196cf9 LEA R14,[RBX + 0x80] LEA R12,[0x1dc028] LAB_00196d23: CMP qword ptr [RBX + 0xb0],0x0 JNZ 0x00196d43 MOV RDI,R14 MOV RSI,RBX CALL 0x00129430 LAB_00196d38: CMP dword ptr [RBX + 0xd8],0x0 JNZ 0x00196d23 JMP 0x00196cf9 LAB_00196d43: MOV RDI,R14 MOV RSI,RBX MOV RDX,R12 MOV ECX,0x3ee CALL 0x0012eea0 JMP 0x00196d38 LAB_00196d58: LEA RSI,[0x1dc028] MOV RDI,RBX MOV EDX,0x3dd CALL 0x0012eb8f JMP 0x00196bc8 LAB_00196d71: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00196cee LAB_00196d86: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x00196c0a
int8 lock_io_cache(long param_1,ulong param_2) { pthread_mutex_t *__mutex; int iVar1; int8 uVar2; __mutex = *(pthread_mutex_t **)(param_1 + 0x98); if (*(long *)((long)__mutex + 0x40) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3dd); } iVar1 = *(int *)((long)__mutex + 0xd8) + -1; *(int *)((long)__mutex + 0xd8) = iVar1; if (*(long *)((long)__mutex + 0xc0) == 0) { uVar2 = 1; if (iVar1 != 0) { while( true ) { if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8))) goto LAB_00196ce1; if (*(int *)((long)__mutex + 0xd8) == 0) break; if (__mutex[3].__align == 0) { pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex); } else { psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x430); } } } } else if (*(long *)((long)__mutex + 0xc0) == param_1) { uVar2 = 1; if (iVar1 != 0) { do { if (*(long *)((long)__mutex + 0xb0) == 0) { pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex); } else { psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3ee); } } while (*(int *)((long)__mutex + 0xd8) != 0); } } else { if (iVar1 == 0) { if (*(long *)((long)__mutex + 0xb0) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80)); } while( true ) { if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8))) goto LAB_00196ce1; if (*(long *)((long)__mutex + 0xc0) == 0) break; if (__mutex[3].__align == 0) { pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex); } else { psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x406); } } *(long *)((long)__mutex + 0xd0) = __mutex[5].__align; *(int4 *)((long)__mutex + 0xe0) = 0; LAB_00196ce1: if (*(long *)((long)__mutex + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); uVar2 = 0; } return uVar2; }
51,528
nglog::tools::SafeAppendString(char const*, char*, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static void SafeAppendString(const char* source, char* dest, size_t dest_size) { size_t dest_string_length = strlen(dest); NGLOG_SAFE_ASSERT(dest_string_length < dest_size); dest += dest_string_length; dest_size -= dest_string_length; strncpy(dest, source, dest_size); // Making sure |dest| is always null-terminated. dest[dest_size - 1] = '\0'; }
O1
cpp
nglog::tools::SafeAppendString(char const*, char*, unsigned long): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rdi callq 0x8270 movq %rbx, %rdx subq %rax, %rdx jbe 0x30ab6 addq %r14, %rax movq %rax, %rdi movq %r15, %rsi callq 0x82d0 movb $0x0, -0x1(%r14,%rbx) popq %rbx popq %r14 popq %r15 retq callq 0x8340
_ZN5nglog5toolsL16SafeAppendStringEPKcPcm: push r15 push r14 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, rsi call _strlen mov rdx, rbx sub rdx, rax jbe short loc_30AB6 add rax, r14 mov rdi, rax mov rsi, r15 call _strncpy mov byte ptr [r14+rbx-1], 0 pop rbx pop r14 pop r15 retn loc_30AB6: call _abort
long long nglog::tools::SafeAppendString(nglog::tools *this, const char *a2, char *a3) { unsigned long long v4; // rax long long result; // rax v4 = strlen(a2); if ( (unsigned long long)a3 <= v4 ) abort(a2); result = strncpy(&a2[v4], this, &a3[-v4]); a3[(_QWORD)a2 - 1] = 0; return result; }
SafeAppendString: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,RSI CALL 0x00108270 MOV RDX,RBX SUB RDX,RAX JBE 0x00130ab6 ADD RAX,R14 MOV RDI,RAX MOV RSI,R15 CALL 0x001082d0 MOV byte ptr [R14 + RBX*0x1 + -0x1],0x0 POP RBX POP R14 POP R15 RET LAB_00130ab6: CALL 0x00108340
/* nglog::tools::SafeAppendString(char const*, char*, unsigned long) */ void nglog::tools::SafeAppendString(char *param_1,char *param_2,ulong param_3) { size_t sVar1; sVar1 = strlen(param_2); if (sVar1 <= param_3 && param_3 - sVar1 != 0) { strncpy(param_2 + sVar1,param_1,param_3 - sVar1); param_2[param_3 - 1] = '\0'; return; } /* WARNING: Subroutine does not return */ abort(); }
51,529
nglog::tools::SafeAppendString(char const*, char*, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static void SafeAppendString(const char* source, char* dest, size_t dest_size) { size_t dest_string_length = strlen(dest); NGLOG_SAFE_ASSERT(dest_string_length < dest_size); dest += dest_string_length; dest_size -= dest_string_length; strncpy(dest, source, dest_size); // Making sure |dest| is always null-terminated. dest[dest_size - 1] = '\0'; }
O3
cpp
nglog::tools::SafeAppendString(char const*, char*, unsigned long): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rdi callq 0x8270 movq %rbx, %rdx subq %rax, %rdx jbe 0x2fabc addq %r14, %rax movq %rax, %rdi movq %r15, %rsi callq 0x82d0 movb $0x0, -0x1(%r14,%rbx) popq %rbx popq %r14 popq %r15 retq callq 0x8340
_ZN5nglog5toolsL16SafeAppendStringEPKcPcm: push r15 push r14 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, rsi call _strlen mov rdx, rbx sub rdx, rax jbe short loc_2FABC add rax, r14 mov rdi, rax mov rsi, r15 call _strncpy mov byte ptr [r14+rbx-1], 0 pop rbx pop r14 pop r15 retn loc_2FABC: call _abort
long long nglog::tools::SafeAppendString(nglog::tools *this, const char *a2, char *a3) { unsigned long long v4; // rax long long result; // rax v4 = strlen(a2); if ( (unsigned long long)a3 <= v4 ) abort(a2); result = strncpy(&a2[v4], this, &a3[-v4]); a3[(_QWORD)a2 - 1] = 0; return result; }
SafeAppendString: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,RSI CALL 0x00108270 MOV RDX,RBX SUB RDX,RAX JBE 0x0012fabc ADD RAX,R14 MOV RDI,RAX MOV RSI,R15 CALL 0x001082d0 MOV byte ptr [R14 + RBX*0x1 + -0x1],0x0 POP RBX POP R14 POP R15 RET LAB_0012fabc: CALL 0x00108340
/* nglog::tools::SafeAppendString(char const*, char*, unsigned long) */ void nglog::tools::SafeAppendString(char *param_1,char *param_2,ulong param_3) { size_t sVar1; sVar1 = strlen(param_2); if (sVar1 <= param_3 && param_3 - sVar1 != 0) { strncpy(param_2 + sVar1,param_1,param_3 - sVar1); param_2[param_3 - 1] = '\0'; return; } /* WARNING: Subroutine does not return */ abort(); }
51,530
cli::matchable_derived<cli::integer>::to_ptr() const
msxemulator/build_O3/_deps/picotool-src/cli.h
std::shared_ptr<matchable> to_ptr() const { return std::shared_ptr<matchable>(new D(*static_cast<const D *>(this))); }
O3
c
cli::matchable_derived<cli::integer>::to_ptr() const: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %r14 movl $0x110, %edi # imm = 0x110 callq 0xf460 movq %rax, %rbx movq %rax, %rdi movq %r15, %rsi callq 0x4e7de leaq 0x858fc(%rip), %rax # 0xe0138 movq %rax, (%rbx) movl $0xb8, %esi leaq (%rbx,%rsi), %rdi addq %r15, %rsi callq 0x4d534 leaq 0x85859(%rip), %rax # 0xe00b0 movq %rax, (%rbx) movups 0xd8(%r15), %xmm0 movups %xmm0, 0xd8(%rbx) leaq 0xe8(%rbx), %rdi movq %rbx, %rax addq $0xf8, %rax movq %rax, 0xe8(%rbx) movq 0xe8(%r15), %rsi movq 0xf0(%r15), %rdx addq %rsi, %rdx callq 0x1d410 movq 0x108(%r15), %rax movq %rax, 0x108(%rbx) movq %rbx, (%r14) movq %r14, %rdi addq $0x8, %rdi movq %rbx, %rsi callq 0x5a8f2 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x4d330 jmp 0x5a8dc movq %rax, %r14 movq %rbx, %rdi callq 0x5872e jmp 0x5a8dc movq %rax, %r14 movl $0x110, %esi # imm = 0x110 movq %rbx, %rdi callq 0xf470 movq %r14, %rdi callq 0xf7d0 nop
_ZNK3cli17matchable_derivedINS_7integerEE6to_ptrEv: push r15 push r14 push rbx mov r15, rsi mov r14, rdi mov edi, 110h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax; this mov rsi, r15; cli::matchable * call _ZN3cli9matchableC2ERKS0_; cli::matchable::matchable(cli::matchable const&) lea rax, off_E0138 mov [rbx], rax mov esi, 0B8h lea rdi, [rbx+rsi] add rsi, r15 call _ZNSt8functionIFbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2ERKS9_; std::function<bool ()(std::string const&)>::function(std::function<bool ()(std::string const&)> const&) lea rax, off_E00B0 mov [rbx], rax movups xmm0, xmmword ptr [r15+0D8h] movups xmmword ptr [rbx+0D8h], xmm0 lea rdi, [rbx+0E8h] mov rax, rbx add rax, 0F8h mov [rbx+0E8h], rax mov rsi, [r15+0E8h] mov rdx, [r15+0F0h] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, [r15+108h] mov [rbx+108h], rax mov [r14], rbx mov rdi, r14 add rdi, 8 mov rsi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IPN3cli7integerEEET_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<cli::integer *>(cli::integer *) mov rax, r14 pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN3cli10value_baseINS_7integerEED2Ev; cli::value_base<cli::integer>::~value_base() jmp short loc_5A8DC mov r14, rax mov rdi, rbx; this call _ZN3cli9matchableD2Ev; cli::matchable::~matchable() jmp short loc_5A8DC mov r14, rax loc_5A8DC: mov esi, 110h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
_QWORD * cli::matchable_derived<cli::integer>::to_ptr(_QWORD *a1, long long a2) { long long v2; // rbx v2 = operator new(0x110uLL); cli::matchable::matchable((cli::matchable *)v2, (const cli::matchable *)a2); *(_QWORD *)v2 = off_E0138; std::function<bool ()(std::string const&)>::function((_OWORD *)(v2 + 184), a2 + 184); *(_QWORD *)v2 = off_E00B0; *(_OWORD *)(v2 + 216) = *(_OWORD *)(a2 + 216); *(_QWORD *)(v2 + 232) = v2 + 248; std::string::_M_construct<char *>(v2 + 232, *(_BYTE **)(a2 + 232), *(_QWORD *)(a2 + 232) + *(_QWORD *)(a2 + 240)); *(_QWORD *)(v2 + 264) = *(_QWORD *)(a2 + 264); *a1 = v2; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<cli::integer *>(a1 + 1, v2); return a1; }
to_ptr: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV R14,RDI MOV EDI,0x110 CALL 0x0010f460 MOV RBX,RAX LAB_0015a82a: MOV RDI,RAX MOV RSI,R15 CALL 0x0014e7de LEA RAX,[0x1e0138] MOV qword ptr [RBX],RAX MOV ESI,0xb8 LEA RDI,[RBX + RSI*0x1] ADD RSI,R15 LAB_0015a84b: CALL 0x0014d534 LEA RAX,[0x1e00b0] MOV qword ptr [RBX],RAX MOVUPS XMM0,xmmword ptr [R15 + 0xd8] MOVUPS xmmword ptr [RBX + 0xd8],XMM0 LEA RDI,[RBX + 0xe8] MOV RAX,RBX ADD RAX,0xf8 MOV qword ptr [RBX + 0xe8],RAX MOV RSI,qword ptr [R15 + 0xe8] MOV RDX,qword ptr [R15 + 0xf0] ADD RDX,RSI LAB_0015a891: CALL 0x0011d410 LAB_0015a896: MOV RAX,qword ptr [R15 + 0x108] MOV qword ptr [RBX + 0x108],RAX MOV qword ptr [R14],RBX MOV RDI,R14 ADD RDI,0x8 MOV RSI,RBX CALL 0x0015a8f2 MOV RAX,R14 POP RBX POP R14 POP R15 RET
/* cli::matchable_derived<cli::integer>::to_ptr() const */ void cli::matchable_derived<cli::integer>::to_ptr(void) { int4 uVar1; int4 uVar2; int4 uVar3; matchable *this; matchable *in_RSI; int8 *in_RDI; this = (matchable *)operator_new(0x110); /* try { // try from 0015a82a to 0015a834 has its CatchHandler @ 0015a8d9 */ matchable::matchable(this,in_RSI); *(int ***)this = &PTR__value_base_001e0138; /* try { // try from 0015a84b to 0015a84f has its CatchHandler @ 0015a8cc */ std::function<bool(std::__cxx11::string_const&)>::function ((function<bool(std::__cxx11::string_const&)> *)(this + 0xb8),in_RSI + 0xb8); *(int ***)this = &PTR__integer_001e00b0; uVar1 = *(int4 *)(in_RSI + 0xdc); uVar2 = *(int4 *)(in_RSI + 0xe0); uVar3 = *(int4 *)(in_RSI + 0xe4); *(int4 *)(this + 0xd8) = *(int4 *)(in_RSI + 0xd8); *(int4 *)(this + 0xdc) = uVar1; *(int4 *)(this + 0xe0) = uVar2; *(int4 *)(this + 0xe4) = uVar3; *(matchable **)(this + 0xe8) = this + 0xf8; /* try { // try from 0015a891 to 0015a895 has its CatchHandler @ 0015a8bf */ std::__cxx11::string::_M_construct<char*> (this + 0xe8,*(long *)(in_RSI + 0xe8), *(long *)(in_RSI + 0xf0) + *(long *)(in_RSI + 0xe8)); *(int8 *)(this + 0x108) = *(int8 *)(in_RSI + 0x108); *in_RDI = this; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<cli::integer*> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1),(integer *)this); return; }
51,531
pop_scope
bluesky950520[P]quickjs/quickjs.c
static void pop_scope(JSParseState *s) { if (s->cur_func) { /* disable scoped variables */ JSFunctionDef *fd = s->cur_func; int scope = fd->scope_level; emit_op(s, OP_leave_scope); emit_u16(s, scope); fd->scope_level = fd->scopes[scope].parent; fd->scope_first = get_first_lexical_var(fd, fd->scope_level); } }
O0
c
pop_scope: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq $0x0, 0x90(%rax) je 0xacf9d movq 0x10(%rsp), %rax movq 0x90(%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movl 0xe8(%rax), %eax movl %eax, 0x4(%rsp) movq 0x10(%rsp), %rdi movl $0xb4, %esi callq 0x9bc60 movq 0x10(%rsp), %rdi movl 0x4(%rsp), %eax movzwl %ax, %esi callq 0x9bcc0 movq 0x8(%rsp), %rax movq 0xf8(%rax), %rax movslq 0x4(%rsp), %rcx movl (%rax,%rcx,8), %ecx movq 0x8(%rsp), %rax movl %ecx, 0xe8(%rax) movq 0x8(%rsp), %rdi movq 0x8(%rsp), %rax movl 0xe8(%rax), %esi callq 0xad840 movl %eax, %ecx movq 0x8(%rsp), %rax movl %ecx, 0xec(%rax) addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
pop_scope: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] cmp qword ptr [rax+90h], 0 jz loc_ACF9D mov rax, [rsp+18h+var_8] mov rax, [rax+90h] mov [rsp+18h+var_10], rax mov rax, [rsp+18h+var_10] mov eax, [rax+0E8h] mov [rsp+18h+var_14], eax mov rdi, [rsp+18h+var_8] mov esi, 0B4h call emit_op mov rdi, [rsp+18h+var_8] mov eax, [rsp+18h+var_14] movzx esi, ax call emit_u16 mov rax, [rsp+18h+var_10] mov rax, [rax+0F8h] movsxd rcx, [rsp+18h+var_14] mov ecx, [rax+rcx*8] mov rax, [rsp+18h+var_10] mov [rax+0E8h], ecx mov rdi, [rsp+18h+var_10] mov rax, [rsp+18h+var_10] mov esi, [rax+0E8h] call get_first_lexical_var mov ecx, eax mov rax, [rsp+18h+var_10] mov [rax+0ECh], ecx loc_ACF9D: add rsp, 18h retn
long long pop_scope(long long a1) { long long result; // rax int first_lexical_var; // ecx int v3; // [rsp+4h] [rbp-14h] long long v4; // [rsp+8h] [rbp-10h] result = a1; if ( *(_QWORD *)(a1 + 144) ) { v4 = *(_QWORD *)(a1 + 144); v3 = *(_DWORD *)(v4 + 232); emit_op(a1, 180); emit_u16(a1, v3); *(_DWORD *)(v4 + 232) = *(_DWORD *)(*(_QWORD *)(v4 + 248) + 8LL * v3); first_lexical_var = get_first_lexical_var(v4, *(unsigned int *)(v4 + 232)); result = v4; *(_DWORD *)(v4 + 236) = first_lexical_var; } return result; }
pop_scope: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x90],0x0 JZ 0x001acf9d MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x90] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0xe8] MOV dword ptr [RSP + 0x4],EAX MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0xb4 CALL 0x0019bc60 MOV RDI,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x4] MOVZX ESI,AX CALL 0x0019bcc0 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RSP + 0x4] MOV ECX,dword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0xe8],ECX MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX + 0xe8] CALL 0x001ad840 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0xec],ECX LAB_001acf9d: ADD RSP,0x18 RET
void pop_scope(long param_1) { uint uVar1; long lVar2; int4 uVar3; if (*(long *)(param_1 + 0x90) != 0) { lVar2 = *(long *)(param_1 + 0x90); uVar1 = *(uint *)(lVar2 + 0xe8); emit_op(param_1,0xb4); emit_u16(param_1,uVar1 & 0xffff); *(int4 *)(lVar2 + 0xe8) = *(int4 *)(*(long *)(lVar2 + 0xf8) + (long)(int)uVar1 * 8); uVar3 = get_first_lexical_var(lVar2,*(int4 *)(lVar2 + 0xe8)); *(int4 *)(lVar2 + 0xec) = uVar3; } return; }
51,532
pop_scope
bluesky950520[P]quickjs/quickjs.c
static void pop_scope(JSParseState *s) { if (s->cur_func) { /* disable scoped variables */ JSFunctionDef *fd = s->cur_func; int scope = fd->scope_level; emit_op(s, OP_leave_scope); emit_u16(s, scope); fd->scope_level = fd->scopes[scope].parent; fd->scope_first = get_first_lexical_var(fd, fd->scope_level); } }
O1
c
pop_scope: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x90(%rdi), %r15 testq %r15, %r15 je 0x69a4c movq %rdi, %rbx movslq 0xe8(%r15), %r12 movl $0x138, %r14d # imm = 0x138 leaq (%r15,%r14), %rdi movl 0x140(%r15), %eax movl %eax, 0x168(%r15) movl $0xb4, %esi callq 0x1a8bc addq 0x90(%rbx), %r14 leaq 0x6(%rsp), %rsi movw %r12w, (%rsi) movl $0x2, %edx movq %r14, %rdi callq 0x1a80e movq 0xf8(%r15), %rax movl (%rax,%r12,8), %ecx movl %ecx, 0xe8(%r15) testl %ecx, %ecx js 0x69a40 movl %ecx, %r8d movl 0x4(%rax,%r8,8), %edi movl %edi, %esi testl %edi, %edi jns 0x69a38 movl (%rax,%r8,8), %ecx movl %edx, %esi movl %esi, %edx testl %edi, %edi js 0x69a20 jmp 0x69a45 movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl %esi, 0xec(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
pop_scope: push r15 push r14 push r12 push rbx push rax mov r15, [rdi+90h] test r15, r15 jz loc_69A4C mov rbx, rdi movsxd r12, dword ptr [r15+0E8h] mov r14d, 138h lea rdi, [r15+r14] mov eax, [r15+140h] mov [r15+168h], eax mov esi, 0B4h call dbuf_putc add r14, [rbx+90h] lea rsi, [rsp+28h+var_22] mov [rsi], r12w mov edx, 2 mov rdi, r14 call dbuf_put mov rax, [r15+0F8h] mov ecx, [rax+r12*8] mov [r15+0E8h], ecx loc_69A20: test ecx, ecx js short loc_69A40 mov r8d, ecx mov edi, [rax+r8*8+4] mov esi, edi test edi, edi jns short loc_69A38 mov ecx, [rax+r8*8] mov esi, edx loc_69A38: mov edx, esi test edi, edi js short loc_69A20 jmp short loc_69A45 loc_69A40: mov esi, 0FFFFFFFFh loc_69A45: mov [r15+0ECh], esi loc_69A4C: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long pop_scope(long long a1) { long long result; // rax long long v2; // r15 long long v3; // r12 _QWORD *v4; // r14 int v5; // edx int v6; // ecx int v7; // edi int v8; // esi _WORD v9[17]; // [rsp+0h] [rbp-22h] BYREF v9[0] = HIWORD(result); v2 = *(_QWORD *)(a1 + 144); if ( v2 ) { v3 = *(int *)(v2 + 232); *(_DWORD *)(v2 + 360) = *(_DWORD *)(v2 + 320); dbuf_putc((_QWORD *)(v2 + 312), 180); v4 = (_QWORD *)(*(_QWORD *)(a1 + 144) + 312LL); v9[0] = v3; dbuf_put(v4, (long long)v9, 2LL); result = *(_QWORD *)(v2 + 248); v6 = *(_DWORD *)(result + 8 * v3); *(_DWORD *)(v2 + 232) = v6; while ( v6 >= 0 ) { v7 = *(_DWORD *)(result + 8LL * (unsigned int)v6 + 4); v8 = v7; if ( v7 < 0 ) { v6 = *(_DWORD *)(result + 8LL * (unsigned int)v6); v8 = v5; } v5 = v8; if ( v7 >= 0 ) goto LABEL_9; } v8 = -1; LABEL_9: *(_DWORD *)(v2 + 236) = v8; } return result; }
pop_scope: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI + 0x90] TEST R15,R15 JZ 0x00169a4c MOV RBX,RDI MOVSXD R12,dword ptr [R15 + 0xe8] MOV R14D,0x138 LEA RDI,[R15 + R14*0x1] MOV EAX,dword ptr [R15 + 0x140] MOV dword ptr [R15 + 0x168],EAX MOV ESI,0xb4 CALL 0x0011a8bc ADD R14,qword ptr [RBX + 0x90] LEA RSI,[RSP + 0x6] MOV word ptr [RSI],R12W MOV EDX,0x2 MOV RDI,R14 CALL 0x0011a80e MOV RAX,qword ptr [R15 + 0xf8] MOV ECX,dword ptr [RAX + R12*0x8] MOV dword ptr [R15 + 0xe8],ECX LAB_00169a20: TEST ECX,ECX JS 0x00169a40 MOV R8D,ECX MOV EDI,dword ptr [RAX + R8*0x8 + 0x4] MOV ESI,EDI TEST EDI,EDI JNS 0x00169a38 MOV ECX,dword ptr [RAX + R8*0x8] MOV ESI,EDX LAB_00169a38: MOV EDX,ESI TEST EDI,EDI JS 0x00169a20 JMP 0x00169a45 LAB_00169a40: MOV ESI,0xffffffff LAB_00169a45: MOV dword ptr [R15 + 0xec],ESI LAB_00169a4c: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void pop_scope(long param_1) { int iVar1; uint uVar2; long lVar3; long lVar4; int8 in_RAX; uint uVar5; uint uVar6; ulong extraout_RDX; ulong uVar7; int8 uStack_28; lVar3 = *(long *)(param_1 + 0x90); if (lVar3 != 0) { iVar1 = *(int *)(lVar3 + 0xe8); *(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140); uStack_28 = in_RAX; dbuf_putc(lVar3 + 0x138,0xb4); uStack_28 = CONCAT26((short)iVar1,(int6)uStack_28); dbuf_put(*(long *)(param_1 + 0x90) + 0x138,(long)&uStack_28 + 6,2); lVar4 = *(long *)(lVar3 + 0xf8); uVar5 = *(uint *)(lVar4 + (long)iVar1 * 8); *(uint *)(lVar3 + 0xe8) = uVar5; uVar7 = extraout_RDX; do { if ((int)uVar5 < 0) { uVar6 = 0xffffffff; break; } uVar2 = *(uint *)(lVar4 + 4 + (ulong)uVar5 * 8); uVar6 = uVar2; if ((int)uVar2 < 0) { uVar5 = *(uint *)(lVar4 + (ulong)uVar5 * 8); uVar6 = (uint)uVar7; } uVar7 = (ulong)uVar6; } while ((int)uVar2 < 0); *(uint *)(lVar3 + 0xec) = uVar6; } return; }
51,533
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*)
ng-log[P]ng-log/src/ng-log/logging.h
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2, const char* exprtext) { CheckOpMessageBuilder comb(exprtext); MakeCheckOpValueString(comb.ForVar1(), v1); MakeCheckOpValueString(comb.ForVar2(), v2); return comb.NewString(); }
O0
c
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x58(%rbp) movq %rdi, %rax movq %rax, -0x50(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x20(%rbp), %rsi leaq -0x28(%rbp), %rdi movq %rdi, -0x48(%rbp) callq 0x148d0 movq -0x48(%rbp), %rdi callq 0xd840 movq %rax, -0x40(%rbp) jmp 0x1e2c3 movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x1e330 jmp 0x1e2d2 leaq -0x28(%rbp), %rdi callq 0x14990 movq %rax, -0x60(%rbp) jmp 0x1e2e1 movq -0x60(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xda40 jmp 0x1e2f0 movq -0x58(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x149c0 jmp 0x1e2ff leaq -0x28(%rbp), %rdi callq 0x14960 movq -0x50(%rbp), %rax addq $0x60, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x28(%rbp), %rdi callq 0x14960 movq -0x30(%rbp), %rdi callq 0x9d10
_ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_58], rdi mov rax, rdi mov [rbp+var_50], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rsi, [rbp+var_20]; char * lea rdi, [rbp+var_28]; this mov [rbp+var_48], rdi call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*) mov rdi, [rbp+var_48]; this call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar1Ev; nglog::internal::CheckOpMessageBuilder::ForVar1(void) mov [rbp+var_40], rax jmp short $+2 loc_1E2C3: mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] call _ZN5nglog8internal22MakeCheckOpValueStringINS_11LogSeverityEEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<nglog::LogSeverity>(std::ostream *,nglog::LogSeverity const&) jmp short $+2 loc_1E2D2: lea rdi, [rbp+var_28]; this call _ZN5nglog8internal21CheckOpMessageBuilder7ForVar2Ev; nglog::internal::CheckOpMessageBuilder::ForVar2(void) mov [rbp+var_60], rax jmp short $+2 loc_1E2E1: mov rdi, [rbp+var_60] mov rsi, [rbp+var_18] call _ZN5nglog8internal22MakeCheckOpValueStringIiEEvPSoRKT_; nglog::internal::MakeCheckOpValueString<int>(std::ostream *,int const&) jmp short $+2 loc_1E2F0: mov rdi, [rbp+var_58] lea rsi, [rbp+var_28] call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void) jmp short $+2 loc_1E2FF: lea rdi, [rbp+var_28]; this call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder() mov rax, [rbp+var_50] add rsp, 60h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_28]; this call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder() mov rdi, [rbp+var_30] call __Unwind_Resume
long long nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>( long long a1, long long a2, unsigned int *a3, char *a4) { long long v5; // [rsp+0h] [rbp-60h] long long v6; // [rsp+20h] [rbp-40h] char *v7[2]; // [rsp+38h] [rbp-28h] BYREF unsigned int *v8; // [rsp+48h] [rbp-18h] long long v9; // [rsp+50h] [rbp-10h] long long v10; // [rsp+58h] [rbp-8h] v10 = a1; v9 = a2; v8 = a3; v7[1] = a4; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7, a4); v6 = nglog::internal::CheckOpMessageBuilder::ForVar1((nglog::internal::CheckOpMessageBuilder *)v7); nglog::internal::MakeCheckOpValueString<nglog::LogSeverity>(v6, v9); v5 = nglog::internal::CheckOpMessageBuilder::ForVar2((nglog::internal::CheckOpMessageBuilder *)v7); nglog::internal::MakeCheckOpValueString<int>(v5, v8); nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, v7); nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7); return a1; }
MakeCheckOpString<nglog::LogSeverity,int>: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x58],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x50],RAX 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 RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x48],RDI CALL 0x001148d0 MOV RDI,qword ptr [RBP + -0x48] LAB_0011e2b8: CALL 0x0010d840 MOV qword ptr [RBP + -0x40],RAX JMP 0x0011e2c3 LAB_0011e2c3: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0011e330 JMP 0x0011e2d2 LAB_0011e2d2: LEA RDI,[RBP + -0x28] CALL 0x00114990 MOV qword ptr [RBP + -0x60],RAX JMP 0x0011e2e1 LAB_0011e2e1: MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0010da40 JMP 0x0011e2f0 LAB_0011e2f0: MOV RDI,qword ptr [RBP + -0x58] LEA RSI,[RBP + -0x28] CALL 0x001149c0 LAB_0011e2fd: JMP 0x0011e2ff LAB_0011e2ff: LEA RDI,[RBP + -0x28] CALL 0x00114960 MOV RAX,qword ptr [RBP + -0x50] ADD RSP,0x60 POP RBP RET
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > > nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*) */ internal * __thiscall nglog::internal::MakeCheckOpString<nglog::LogSeverity,int> (internal *this,LogSeverity *param_1,int *param_2,char *param_3) { ostream *poVar1; CheckOpMessageBuilder local_30 [8]; char *local_28; int *local_20; LogSeverity *local_18; internal *local_10; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_10 = this; CheckOpMessageBuilder::CheckOpMessageBuilder(local_30,param_3); /* try { // try from 0011e2b8 to 0011e2fc has its CatchHandler @ 0011e312 */ poVar1 = (ostream *)CheckOpMessageBuilder::ForVar1(local_30); MakeCheckOpValueString<nglog::LogSeverity>(poVar1,local_18); poVar1 = (ostream *)CheckOpMessageBuilder::ForVar2(local_30); MakeCheckOpValueString<int>(poVar1,local_20); CheckOpMessageBuilder::NewString_abi_cxx11_(); CheckOpMessageBuilder::~CheckOpMessageBuilder(local_30); return this; }
51,534
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*)
ng-log[P]ng-log/src/ng-log/logging.h
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2, const char* exprtext) { CheckOpMessageBuilder comb(exprtext); MakeCheckOpValueString(comb.ForVar1(), v1); MakeCheckOpValueString(comb.ForVar2(), v2); return comb.NewString(); }
O3
c
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsp, %r12 movq %r12, %rdi movq %rcx, %rsi callq 0xe864 movq (%r12), %rdi movl (%r15), %esi callq 0x7970 movq (%rsp), %rdi leaq 0x1153a(%rip), %rsi # 0x23a67 movl $0x5, %edx callq 0x7610 movq (%rsp), %rdi movl (%r14), %esi callq 0x7970 movq %rsp, %rsi movq %rbx, %rdi callq 0xe91c movq %rsp, %rdi callq 0xe8ee movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0xe8ee movq %rbx, %rdi callq 0x7990
_ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi mov r12, rsp mov rdi, r12; this mov rsi, rcx; char * call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*) mov rdi, [r12] mov esi, [r15] call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rsp+28h+var_28] lea rsi, aVs; " vs. " mov edx, 5 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+28h+var_28] mov esi, [r14] call __ZNSolsEi; std::ostream::operator<<(int) mov rsi, rsp mov rdi, rbx call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void) mov rdi, rsp; this call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder() mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder() mov rdi, rbx call __Unwind_Resume
_QWORD * nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>( _QWORD *a1, unsigned int *a2, unsigned int *a3, const char *a4) { long long v4; // rax _QWORD v7[5]; // [rsp+0h] [rbp-28h] BYREF v7[0] = v4; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7, a4); std::ostream::operator<<(v7[0], *a2); std::__ostream_insert<char,std::char_traits<char>>(v7[0], " vs. ", 5LL); std::ostream::operator<<(v7[0], *a3); nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, v7); nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7); return a1; }
MakeCheckOpString<nglog::LogSeverity,int>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV R12,RSP MOV RDI,R12 MOV RSI,RCX CALL 0x0010e864 MOV RDI,qword ptr [R12] MOV ESI,dword ptr [R15] LAB_0011251d: CALL 0x00107970 MOV RDI,qword ptr [RSP] LEA RSI,[0x123a67] MOV EDX,0x5 CALL 0x00107610 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [R14] CALL 0x00107970 MOV RSI,RSP MOV RDI,RBX CALL 0x0010e91c LAB_0011254e: MOV RDI,RSP CALL 0x0010e8ee MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > > nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*) */ internal * __thiscall nglog::internal::MakeCheckOpString<nglog::LogSeverity,int> (internal *this,LogSeverity *param_1,int *param_2,char *param_3) { ostream *in_RAX; ostream *local_28; local_28 = in_RAX; CheckOpMessageBuilder::CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28,param_3); /* try { // try from 0011251d to 0011254d has its CatchHandler @ 00112565 */ std::ostream::operator<<(local_28,*(int *)param_1); std::__ostream_insert<char,std::char_traits<char>>(local_28," vs. ",5); std::ostream::operator<<(local_28,*param_2); CheckOpMessageBuilder::NewString_abi_cxx11_(); CheckOpMessageBuilder::~CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28); return this; }
51,535
JS_AutoInitProperty
bluesky950520[P]quickjs/quickjs.c
static int JS_AutoInitProperty(JSContext *ctx, JSObject *p, JSAtom prop, JSProperty *pr, JSShapeProperty *prs) { JSValue val; JSContext *realm; JSAutoInitFunc *func; if (js_shape_prepare_update(ctx, p, &prs)) return -1; realm = js_autoinit_get_realm(pr); func = js_autoinit_func_table[js_autoinit_get_id(pr)]; /* 'func' shall not modify the object properties 'pr' */ val = func(realm, p, prop, pr->u.init.opaque); js_autoinit_free(ctx->rt, pr); prs->flags &= ~JS_PROP_TMASK; pr->u.value = JS_UNDEFINED; if (JS_IsException(val)) return -1; pr->u.value = val; return 0; }
O1
c
JS_AutoInitProperty: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r14d movq %rsi, %r15 movq %rsp, %rdx movq %r8, (%rdx) callq 0x2a37a movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testl %eax, %eax jne 0x2a36d movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rax, %rdi andq $-0x4, %rdi andl $0x3, %eax leaq 0xa3146(%rip), %r8 # 0xcd470 movq %r15, %rsi movl %r14d, %edx callq *(%r8,%rax,8) movq %rax, %r14 movq %rdx, %r15 movq (%rbx), %rdi andq $-0x4, %rdi callq 0x23afc movq (%rsp), %rax andl $0x3fffffff, (%rax) # imm = 0x3FFFFFFF movl $0x0, (%rbx) movq $0x3, 0x8(%rbx) cmpl $0x6, %r15d je 0x2a36d movq %r14, (%rbx) movq %r15, 0x8(%rbx) xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
JS_AutoInitProperty: push rbp push r15 push r14 push rbx push rax mov rbx, rcx mov r14d, edx mov r15, rsi mov rdx, rsp mov [rdx], r8 call js_shape_prepare_update mov ebp, 0FFFFFFFFh test eax, eax jnz short loc_2A36D mov rax, [rbx] mov rcx, [rbx+8] mov rdi, rax and rdi, 0FFFFFFFFFFFFFFFCh and eax, 3 lea r8, js_autoinit_func_table mov rsi, r15 mov edx, r14d call ds:(js_autoinit_func_table - 0CD470h)[r8+rax*8] mov r14, rax mov r15, rdx mov rdi, [rbx] and rdi, 0FFFFFFFFFFFFFFFCh call JS_FreeContext mov rax, [rsp+28h+var_28] and dword ptr [rax], 3FFFFFFFh mov dword ptr [rbx], 0 mov qword ptr [rbx+8], 3 cmp r15d, 6 jz short loc_2A36D mov [rbx], r14 mov [rbx+8], r15 xor ebp, ebp loc_2A36D: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long JS_AutoInitProperty(long long a1, long long a2, unsigned int a3, long long *a4, _DWORD *a5) { unsigned int v7; // ebp long long v8; // r14 long long v9; // rdx long long v10; // r15 _DWORD *v12; // [rsp+0h] [rbp-28h] BYREF v12 = a5; v7 = -1; if ( !(unsigned int)js_shape_prepare_update(a1, a2, &v12) ) { v8 = ((long long ( *)(unsigned long long, long long, _QWORD, long long))js_autoinit_func_table[*a4 & 3])( *a4 & 0xFFFFFFFFFFFFFFFCLL, a2, a3, a4[1]); v10 = v9; JS_FreeContext((unsigned int *)(*a4 & 0xFFFFFFFFFFFFFFFCLL)); *v12 &= 0x3FFFFFFFu; *(_DWORD *)a4 = 0; a4[1] = 3LL; if ( (_DWORD)v10 != 6 ) { *a4 = v8; a4[1] = v10; return 0; } } return v7; }
JS_AutoInitProperty: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14D,EDX MOV R15,RSI MOV RDX,RSP MOV qword ptr [RDX],R8 CALL 0x0012a37a MOV EBP,0xffffffff TEST EAX,EAX JNZ 0x0012a36d MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV RDI,RAX AND RDI,-0x4 AND EAX,0x3 LEA R8,[0x1cd470] MOV RSI,R15 MOV EDX,R14D CALL qword ptr [R8 + RAX*0x8] MOV R14,RAX MOV R15,RDX MOV RDI,qword ptr [RBX] AND RDI,-0x4 CALL 0x00123afc MOV RAX,qword ptr [RSP] AND dword ptr [RAX],0x3fffffff MOV dword ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x3 CMP R15D,0x6 JZ 0x0012a36d MOV qword ptr [RBX],R14 MOV qword ptr [RBX + 0x8],R15 XOR EBP,EBP LAB_0012a36d: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 JS_AutoInitProperty(int8 param_1,int8 param_2,int4 param_3, int1 (*param_4) [16],uint *param_5) { int iVar1; int8 uVar2; int1 auVar3 [16]; iVar1 = js_shape_prepare_update(); uVar2 = 0xffffffff; if (iVar1 == 0) { auVar3 = (**(code **)(js_autoinit_func_table + (ulong)((uint)*(ulong *)*param_4 & 3) * 8)) (*(ulong *)*param_4 & 0xfffffffffffffffc,param_2,param_3, *(int8 *)(*param_4 + 8)); JS_FreeContext(*(ulong *)*param_4 & 0xfffffffffffffffc); *param_5 = *param_5 & 0x3fffffff; *(int4 *)*param_4 = 0; *(int8 *)(*param_4 + 8) = 3; if (auVar3._8_4_ != 6) { *param_4 = auVar3; uVar2 = 0; } } return uVar2; }
51,536
JS_AutoInitProperty
bluesky950520[P]quickjs/quickjs.c
static int JS_AutoInitProperty(JSContext *ctx, JSObject *p, JSAtom prop, JSProperty *pr, JSShapeProperty *prs) { JSValue val; JSContext *realm; JSAutoInitFunc *func; if (js_shape_prepare_update(ctx, p, &prs)) return -1; realm = js_autoinit_get_realm(pr); func = js_autoinit_func_table[js_autoinit_get_id(pr)]; /* 'func' shall not modify the object properties 'pr' */ val = func(realm, p, prop, pr->u.init.opaque); js_autoinit_free(ctx->rt, pr); prs->flags &= ~JS_PROP_TMASK; pr->u.value = JS_UNDEFINED; if (JS_IsException(val)) return -1; pr->u.value = val; return 0; }
O2
c
JS_AutoInitProperty: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r14d movq %rsi, %r15 movq %rsp, %rdx movq %r8, (%rdx) callq 0x239e5 pushq $-0x1 popq %rbp testl %eax, %eax jne 0x239d8 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rax, %rdi andq $-0x4, %rdi andl $0x3, %eax leaq 0x96ad4(%rip), %r8 # 0xba470 movq %r15, %rsi movl %r14d, %edx callq *(%r8,%rax,8) movq %rax, %r14 movq %rdx, %r15 movq %rbx, %rdi callq 0x3917c movq (%rsp), %rax andl $0x3fffffff, (%rax) # imm = 0x3FFFFFFF andl $0x0, (%rbx) movq $0x3, 0x8(%rbx) cmpl $0x6, %r15d je 0x239d8 movq %r14, (%rbx) movq %r15, 0x8(%rbx) xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
JS_AutoInitProperty: push rbp push r15 push r14 push rbx push rax mov rbx, rcx mov r14d, edx mov r15, rsi mov rdx, rsp mov [rdx], r8 call js_shape_prepare_update push 0FFFFFFFFFFFFFFFFh pop rbp test eax, eax jnz short loc_239D8 mov rax, [rbx] mov rcx, [rbx+8] mov rdi, rax and rdi, 0FFFFFFFFFFFFFFFCh and eax, 3 lea r8, js_autoinit_func_table mov rsi, r15 mov edx, r14d call ds:(js_autoinit_func_table - 0BA470h)[r8+rax*8] mov r14, rax mov r15, rdx mov rdi, rbx call js_autoinit_free mov rax, [rsp+28h+var_28] and dword ptr [rax], 3FFFFFFFh and dword ptr [rbx], 0 mov qword ptr [rbx+8], 3 cmp r15d, 6 jz short loc_239D8 mov [rbx], r14 mov [rbx+8], r15 xor ebp, ebp loc_239D8: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long JS_AutoInitProperty(long long a1, long long a2, unsigned int a3, long long *a4, _DWORD *a5) { unsigned int v7; // ebp long long v8; // r14 long long v9; // rdx long long v10; // r15 _DWORD *v12; // [rsp+0h] [rbp-28h] BYREF v12 = a5; v7 = -1; if ( !(unsigned int)js_shape_prepare_update(a1, a2, &v12, a4) ) { v8 = ((long long ( *)(unsigned long long, long long, _QWORD, long long))js_autoinit_func_table[*a4 & 3])( *a4 & 0xFFFFFFFFFFFFFFFCLL, a2, a3, a4[1]); v10 = v9; js_autoinit_free(a4); *v12 &= 0x3FFFFFFFu; *(_DWORD *)a4 = 0; a4[1] = 3LL; if ( (_DWORD)v10 != 6 ) { *a4 = v8; a4[1] = v10; return 0; } } return v7; }
JS_AutoInitProperty: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14D,EDX MOV R15,RSI MOV RDX,RSP MOV qword ptr [RDX],R8 CALL 0x001239e5 PUSH -0x1 POP RBP TEST EAX,EAX JNZ 0x001239d8 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV RDI,RAX AND RDI,-0x4 AND EAX,0x3 LEA R8,[0x1ba470] MOV RSI,R15 MOV EDX,R14D CALL qword ptr [R8 + RAX*0x8] MOV R14,RAX MOV R15,RDX MOV RDI,RBX CALL 0x0013917c MOV RAX,qword ptr [RSP] AND dword ptr [RAX],0x3fffffff AND dword ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x3 CMP R15D,0x6 JZ 0x001239d8 MOV qword ptr [RBX],R14 MOV qword ptr [RBX + 0x8],R15 XOR EBP,EBP LAB_001239d8: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 JS_AutoInitProperty(int8 param_1,int8 param_2,int4 param_3, int1 (*param_4) [16],uint *param_5) { int iVar1; int4 uVar2; int1 auVar3 [16]; iVar1 = js_shape_prepare_update(); uVar2 = 0xffffffff; if (iVar1 == 0) { auVar3 = (**(code **)(js_autoinit_func_table + (ulong)((uint)*(ulong *)*param_4 & 3) * 8)) (*(ulong *)*param_4 & 0xfffffffffffffffc,param_2,param_3, *(int8 *)(*param_4 + 8)); js_autoinit_free(param_4); *param_5 = *param_5 & 0x3fffffff; *(int4 *)*param_4 = 0; *(int8 *)(*param_4 + 8) = 3; if (auVar3._8_4_ != 6) { *param_4 = auVar3; uVar2 = 0; } } return uVar2; }
51,537
JS_AutoInitProperty
bluesky950520[P]quickjs/quickjs.c
static int JS_AutoInitProperty(JSContext *ctx, JSObject *p, JSAtom prop, JSProperty *pr, JSShapeProperty *prs) { JSValue val; JSContext *realm; JSAutoInitFunc *func; if (js_shape_prepare_update(ctx, p, &prs)) return -1; realm = js_autoinit_get_realm(pr); func = js_autoinit_func_table[js_autoinit_get_id(pr)]; /* 'func' shall not modify the object properties 'pr' */ val = func(realm, p, prop, pr->u.init.opaque); js_autoinit_free(ctx->rt, pr); prs->flags &= ~JS_PROP_TMASK; pr->u.value = JS_UNDEFINED; if (JS_IsException(val)) return -1; pr->u.value = val; return 0; }
O3
c
JS_AutoInitProperty: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r14d movq %rsi, %r15 movq %rsp, %rdx movq %r8, (%rdx) callq 0x2a99d movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testl %eax, %eax jne 0x2a990 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rax, %rdi andq $-0x4, %rdi andl $0x3, %eax leaq 0xa5b23(%rip), %r8 # 0xd0470 movq %r15, %rsi movl %r14d, %edx callq *(%r8,%rax,8) movq %rax, %r14 movq %rdx, %r15 movq (%rbx), %rdi andq $-0x4, %rdi callq 0x240ef movq (%rsp), %rax andl $0x3fffffff, (%rax) # imm = 0x3FFFFFFF movl $0x0, (%rbx) movq $0x3, 0x8(%rbx) cmpl $0x6, %r15d je 0x2a990 movq %r14, (%rbx) movq %r15, 0x8(%rbx) xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
JS_AutoInitProperty: push rbp push r15 push r14 push rbx push rax mov rbx, rcx mov r14d, edx mov r15, rsi mov rdx, rsp mov [rdx], r8 call js_shape_prepare_update mov ebp, 0FFFFFFFFh test eax, eax jnz short loc_2A990 mov rax, [rbx] mov rcx, [rbx+8] mov rdi, rax and rdi, 0FFFFFFFFFFFFFFFCh and eax, 3 lea r8, js_autoinit_func_table mov rsi, r15 mov edx, r14d call ds:(js_autoinit_func_table - 0D0470h)[r8+rax*8] mov r14, rax mov r15, rdx mov rdi, [rbx] and rdi, 0FFFFFFFFFFFFFFFCh call JS_FreeContext mov rax, [rsp+28h+var_28] and dword ptr [rax], 3FFFFFFFh mov dword ptr [rbx], 0 mov qword ptr [rbx+8], 3 cmp r15d, 6 jz short loc_2A990 mov [rbx], r14 mov [rbx+8], r15 xor ebp, ebp loc_2A990: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long JS_AutoInitProperty(long long a1, long long a2, unsigned int a3, long long *a4, _DWORD *a5) { unsigned int v7; // ebp long long v8; // r14 long long v9; // rdx long long v10; // r15 _DWORD *v12; // [rsp+0h] [rbp-28h] BYREF v12 = a5; v7 = -1; if ( !(unsigned int)js_shape_prepare_update(a1, a2, &v12) ) { v8 = ((long long ( *)(unsigned long long, long long, _QWORD, long long))js_autoinit_func_table[*a4 & 3])( *a4 & 0xFFFFFFFFFFFFFFFCLL, a2, a3, a4[1]); v10 = v9; JS_FreeContext((unsigned int *)(*a4 & 0xFFFFFFFFFFFFFFFCLL)); *v12 &= 0x3FFFFFFFu; *(_DWORD *)a4 = 0; a4[1] = 3LL; if ( (_DWORD)v10 != 6 ) { *a4 = v8; a4[1] = v10; return 0; } } return v7; }
JS_AutoInitProperty: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14D,EDX MOV R15,RSI MOV RDX,RSP MOV qword ptr [RDX],R8 CALL 0x0012a99d MOV EBP,0xffffffff TEST EAX,EAX JNZ 0x0012a990 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV RDI,RAX AND RDI,-0x4 AND EAX,0x3 LEA R8,[0x1d0470] MOV RSI,R15 MOV EDX,R14D CALL qword ptr [R8 + RAX*0x8] MOV R14,RAX MOV R15,RDX MOV RDI,qword ptr [RBX] AND RDI,-0x4 CALL 0x001240ef MOV RAX,qword ptr [RSP] AND dword ptr [RAX],0x3fffffff MOV dword ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x3 CMP R15D,0x6 JZ 0x0012a990 MOV qword ptr [RBX],R14 MOV qword ptr [RBX + 0x8],R15 XOR EBP,EBP LAB_0012a990: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 JS_AutoInitProperty(int8 param_1,int8 param_2,int4 param_3, int1 (*param_4) [16],uint *param_5) { int iVar1; int8 uVar2; int1 auVar3 [16]; iVar1 = js_shape_prepare_update(); uVar2 = 0xffffffff; if (iVar1 == 0) { auVar3 = (**(code **)(js_autoinit_func_table + (ulong)((uint)*(ulong *)*param_4 & 3) * 8)) (*(ulong *)*param_4 & 0xfffffffffffffffc,param_2,param_3, *(int8 *)(*param_4 + 8)); JS_FreeContext(*(ulong *)*param_4 & 0xfffffffffffffffc); *param_5 = *param_5 & 0x3fffffff; *(int4 *)*param_4 = 0; *(int8 *)(*param_4 + 8) = 3; if (auVar3._8_4_ != 6) { *param_4 = auVar3; uVar2 = 0; } } return uVar2; }
51,538
allocate_and_write_block_record
eloqsql/storage/maria/ma_blockrec.c
static my_bool allocate_and_write_block_record(MARIA_HA *info, const uchar *record, MARIA_ROW *row, LSN undo_lsn) { struct st_row_pos_info row_pos; MARIA_BITMAP_BLOCKS *blocks= &row->insert_blocks; int save_my_errno; DBUG_ENTER("allocate_and_write_block_record"); _ma_bitmap_flushable(info, 1); if (_ma_bitmap_find_place(info, row, blocks)) goto err; /* Error reading bitmap */ /* Sleep; a checkpoint will happen and should not send this over-allocated bitmap to disk but rather wait. */ DBUG_EXECUTE_IF("maria_over_alloc_bitmap", sleep(10);); /* page will be pinned & locked by get_head_or_tail_page */ if (get_head_or_tail_page(info, blocks->block, info->buff, MY_MAX(row->space_on_head_page, info->s->base.min_block_length), HEAD_PAGE, PAGECACHE_LOCK_WRITE, &row_pos)) goto err; row->lastpos= ma_recordpos(blocks->block->page, row_pos.rownr); if (info->s->calc_checksum) { if (undo_lsn == LSN_ERROR) row->checksum= (info->s->calc_checksum)(info, record); else { /* _ma_apply_undo_row_delete() already set row's checksum. Verify it. */ DBUG_ASSERT(row->checksum == (info->s->calc_checksum)(info, record)); } } DBUG_PRINT("info", ("rowid: %lu (%lu:%u) length: %u", (ulong) row->lastpos, (ulong) ma_recordpos_to_page(row->lastpos), ma_recordpos_to_dir_entry(row->lastpos), row_pos.length)); if (write_block_record(info, (uchar*) 0, record, row, blocks, blocks->block->org_bitmap_value != 0, &row_pos, undo_lsn, 0)) goto err; /* Now let checkpoint happen but don't commit */ DBUG_EXECUTE_IF("maria_over_alloc_bitmap", sleep(1000);); DBUG_RETURN(0); err: save_my_errno= my_errno; if (info->non_flushable_state) _ma_bitmap_flushable(info, -1); _ma_unpin_all_pages_and_finalize_row(info, LSN_IMPOSSIBLE); my_errno= save_my_errno; DBUG_RETURN(1); }
O0
c
allocate_and_write_block_record: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x43840 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x58(%rbp), %rdx callq 0x428d0 cmpb $0x0, %al je 0x7574b jmp 0x758a7 jmp 0x7574d jmp 0x7574f movq -0x10(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x58(%rbp), %rax movq (%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax movq 0x378(%rax), %rax movq %rax, -0x68(%rbp) movq -0x20(%rbp), %rax movl 0xb8(%rax), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpq 0x3b8(%rcx), %rax jbe 0x7579b movq -0x20(%rbp), %rax movl 0xb8(%rax), %eax movq %rax, -0x80(%rbp) jmp 0x757ad movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x3b8(%rax), %rax movq %rax, -0x80(%rbp) movq -0x68(%rbp), %rdx movq -0x70(%rbp), %rsi movq -0x78(%rbp), %rdi movq -0x80(%rbp), %rax movl %eax, %ecx movl $0x1, %r8d movl $0x4, %r9d leaq -0x50(%rbp), %rax movq %rax, (%rsp) callq 0x7fc80 cmpb $0x0, %al je 0x757e1 jmp 0x758a7 movq -0x58(%rbp), %rax movq (%rax), %rax movq (%rax), %rdi movl -0x34(%rbp), %esi callq 0x79430 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x6a8(%rax) je 0x75841 cmpq $0x1, -0x28(%rbp) jne 0x75839 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x6a8(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq *%rax movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x30(%rax) jmp 0x7583f jmp 0x7583b jmp 0x7583d jmp 0x7583f jmp 0x75841 jmp 0x75843 jmp 0x75845 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x58(%rbp), %r8 movq -0x58(%rbp), %rax movq (%rax), %rax movzbl 0x15(%rax), %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax movb %al, %r9b movq -0x28(%rbp), %rax xorl %esi, %esi leaq -0x50(%rbp), %r10 xorl %r11d, %r11d movsbl %r9b, %r9d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movl $0x0, 0x10(%rsp) callq 0x7cdd0 cmpb $0x0, %al je 0x7589b jmp 0x758a7 jmp 0x7589d jmp 0x7589f jmp 0x758a1 movb $0x0, -0x1(%rbp) jmp 0x758f3 callq 0xf60c0 movl (%rax), %eax movl %eax, -0x5c(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x644(%rax) je 0x758cc movq -0x10(%rbp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x43840 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x760f0 movl -0x5c(%rbp), %eax movl %eax, -0x84(%rbp) callq 0xf60c0 movl -0x84(%rbp), %ecx movl %ecx, (%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xa0, %rsp popq %rbp retq nop
allocate_and_write_block_record: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov [rbp+var_58], rax mov rdi, [rbp+var_10] mov esi, 1 call _ma_bitmap_flushable mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_58] call _ma_bitmap_find_place cmp al, 0 jz short loc_7574B jmp loc_758A7 loc_7574B: jmp short $+2 loc_7574D: jmp short $+2 loc_7574F: mov rax, [rbp+var_10] mov [rbp+var_78], rax mov rax, [rbp+var_58] mov rax, [rax] mov [rbp+var_70], rax mov rax, [rbp+var_10] mov rax, [rax+378h] mov [rbp+var_68], rax mov rax, [rbp+var_20] mov eax, [rax+0B8h] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp rax, [rcx+3B8h] jbe short loc_7579B mov rax, [rbp+var_20] mov eax, [rax+0B8h] mov [rbp+var_80], rax jmp short loc_757AD loc_7579B: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+3B8h] mov [rbp+var_80], rax loc_757AD: mov rdx, [rbp+var_68] mov rsi, [rbp+var_70] mov rdi, [rbp+var_78] mov rax, [rbp+var_80] mov ecx, eax mov r8d, 1 mov r9d, 4 lea rax, [rbp+var_50] mov [rsp+0A0h+var_A0], rax call get_head_or_tail_page cmp al, 0 jz short loc_757E1 jmp loc_758A7 loc_757E1: mov rax, [rbp+var_58] mov rax, [rax] mov rdi, [rax] mov esi, [rbp+var_34] call ma_recordpos mov rcx, rax mov rax, [rbp+var_20] mov [rax+18h], rcx mov rax, [rbp+var_10] mov rax, [rax] cmp qword ptr [rax+6A8h], 0 jz short loc_75841 cmp [rbp+var_28], 1 jnz short loc_75839 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+6A8h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rax mov ecx, eax mov rax, [rbp+var_20] mov [rax+30h], ecx jmp short loc_7583F loc_75839: jmp short $+2 loc_7583B: jmp short $+2 loc_7583D: jmp short $+2 loc_7583F: jmp short $+2 loc_75841: jmp short $+2 loc_75843: jmp short $+2 loc_75845: mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_58] mov rax, [rbp+var_58] mov rax, [rax] movzx eax, byte ptr [rax+15h] cmp eax, 0 setnz al and al, 1 movzx eax, al mov r9b, al mov rax, [rbp+var_28] xor esi, esi lea r10, [rbp+var_50] xor r11d, r11d movsx r9d, r9b mov [rsp+0A0h+var_A0], r10 mov [rsp+0A0h+var_98], rax mov [rsp+0A0h+var_90], 0 call write_block_record cmp al, 0 jz short loc_7589B jmp short loc_758A7 loc_7589B: jmp short $+2 loc_7589D: jmp short $+2 loc_7589F: jmp short $+2 loc_758A1: mov [rbp+var_1], 0 jmp short loc_758F3 loc_758A7: call _my_thread_var mov eax, [rax] mov [rbp+var_5C], eax mov rax, [rbp+var_10] cmp dword ptr [rax+644h], 0 jz short loc_758CC mov rdi, [rbp+var_10] mov esi, 0FFFFFFFFh call _ma_bitmap_flushable loc_758CC: mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ma_unpin_all_pages_and_finalize_row_0 mov eax, [rbp+var_5C] mov [rbp+var_84], eax call _my_thread_var mov ecx, [rbp+var_84] mov [rax], ecx mov [rbp+var_1], 1 loc_758F3: mov al, [rbp+var_1] add rsp, 0A0h pop rbp retn
char allocate_and_write_block_record(_DWORD *a1, long long a2, const char **a3, long long a4) { const char *v4; // rsi long long v5; // rcx int v6; // eax _DWORD *v7; // rdi long long v9; // [rsp+20h] [rbp-80h] int v10; // [rsp+44h] [rbp-5Ch] _BYTE v12[28]; // [rsp+50h] [rbp-50h] BYREF unsigned int v13; // [rsp+6Ch] [rbp-34h] long long v14; // [rsp+78h] [rbp-28h] const char **v15; // [rsp+80h] [rbp-20h] long long v16; // [rsp+88h] [rbp-18h] _DWORD *v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; ma_bitmap_flushable(a1, 1); v4 = (const char *)v15; if ( ma_bitmap_find_place((long long *)a1, (long long)v15, (long long)a3) ) goto LABEL_11; if ( (unsigned long long)*((unsigned int *)v15 + 46) <= *(_QWORD *)(*(_QWORD *)v17 + 952LL) ) v9 = *(_QWORD *)(*(_QWORD *)v17 + 952LL); else LODWORD(v9) = *((_DWORD *)v15 + 46); v4 = *a3; a1 = v17; if ( (unsigned __int8)get_head_or_tail_page( (_DWORD)v17, (unsigned int)*a3, *((_QWORD *)v17 + 111), v9, 1, 4, (long long)v12) ) goto LABEL_11; v5 = ma_recordpos(*(_QWORD *)*a3, v13); v15[3] = (const char *)v5; if ( *(_QWORD *)(*(_QWORD *)v17 + 1704LL) && v14 == 1 ) { v6 = (*(long long ( **)(_DWORD *, long long))(*(_QWORD *)v17 + 1704LL))(v17, v16); *((_DWORD *)v15 + 12) = v6; } a1 = v17; v4 = 0LL; if ( !(unsigned __int8)write_block_record( (_DWORD)v17, 0, v16, (_DWORD)v15, (_DWORD)a3, *((unsigned __int8 *)*a3 + 21) != 0, (long long)v12, v14, 0) ) return 0; LABEL_11: v10 = *(_DWORD *)my_thread_var(a1, v4); if ( v17[401] ) ma_bitmap_flushable(v17, -1); v7 = v17; ma_unpin_all_pages_and_finalize_row_0(v17, 0LL); *(_DWORD *)my_thread_var(v7, 0LL) = v10; return 1; }
allocate_and_write_block_record: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00143840 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x58] CALL 0x001428d0 CMP AL,0x0 JZ 0x0017574b JMP 0x001758a7 LAB_0017574b: JMP 0x0017574d LAB_0017574d: JMP 0x0017574f LAB_0017574f: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x378] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0xb8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x3b8] JBE 0x0017579b MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0xb8] MOV qword ptr [RBP + -0x80],RAX JMP 0x001757ad LAB_0017579b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3b8] MOV qword ptr [RBP + -0x80],RAX LAB_001757ad: MOV RDX,qword ptr [RBP + -0x68] MOV RSI,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x80] MOV ECX,EAX MOV R8D,0x1 MOV R9D,0x4 LEA RAX,[RBP + -0x50] MOV qword ptr [RSP],RAX CALL 0x0017fc80 CMP AL,0x0 JZ 0x001757e1 JMP 0x001758a7 LAB_001757e1: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX] MOV ESI,dword ptr [RBP + -0x34] CALL 0x00179430 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x6a8],0x0 JZ 0x00175841 CMP qword ptr [RBP + -0x28],0x1 JNZ 0x00175839 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6a8] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x30],ECX JMP 0x0017583f LAB_00175839: JMP 0x0017583b LAB_0017583b: JMP 0x0017583d LAB_0017583d: JMP 0x0017583f LAB_0017583f: JMP 0x00175841 LAB_00175841: JMP 0x00175843 LAB_00175843: JMP 0x00175845 LAB_00175845: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX + 0x15] CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV R9B,AL MOV RAX,qword ptr [RBP + -0x28] XOR ESI,ESI LEA R10,[RBP + -0x50] XOR R11D,R11D MOVSX R9D,R9B MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x10],0x0 CALL 0x0017cdd0 CMP AL,0x0 JZ 0x0017589b JMP 0x001758a7 LAB_0017589b: JMP 0x0017589d LAB_0017589d: JMP 0x0017589f LAB_0017589f: JMP 0x001758a1 LAB_001758a1: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001758f3 LAB_001758a7: CALL 0x001f60c0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x644],0x0 JZ 0x001758cc MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xffffffff CALL 0x00143840 LAB_001758cc: MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001760f0 MOV EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x84],EAX CALL 0x001f60c0 MOV ECX,dword ptr [RBP + -0x84] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x1 LAB_001758f3: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xa0 POP RBP RET
int1 allocate_and_write_block_record(long *param_1,int8 param_2,long *param_3,long param_4) { char cVar1; int4 uVar2; long lVar3; int4 *puVar4; ulong local_88; int1 local_58 [28]; int4 local_3c; long local_30; long *local_28; int8 local_20; long *local_18; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; _ma_bitmap_flushable(param_1,1); cVar1 = _ma_bitmap_find_place(local_18,local_28,param_3); if (cVar1 == '\0') { if (*(ulong *)(*local_18 + 0x3b8) < (ulong)*(uint *)(local_28 + 0x17)) { local_88 = (ulong)*(uint *)(local_28 + 0x17); } else { local_88 = *(ulong *)(*local_18 + 0x3b8); } cVar1 = get_head_or_tail_page (local_18,*param_3,local_18[0x6f],local_88 & 0xffffffff,1,4,local_58); if (cVar1 == '\0') { lVar3 = ma_recordpos(*(int8 *)*param_3,local_3c); local_28[3] = lVar3; if ((*(long *)(*local_18 + 0x6a8) != 0) && (local_30 == 1)) { uVar2 = (**(code **)(*local_18 + 0x6a8))(local_18,local_20); *(int4 *)(local_28 + 6) = uVar2; } cVar1 = write_block_record(local_18,0,local_20,local_28,param_3, *(char *)(*param_3 + 0x15) != '\0',local_58,local_30,0); if (cVar1 == '\0') { return 0; } } } puVar4 = (int4 *)_my_thread_var(); uVar2 = *puVar4; if (*(int *)((long)local_18 + 0x644) != 0) { _ma_bitmap_flushable(local_18,0xffffffff); } _ma_unpin_all_pages_and_finalize_row(local_18,0); puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar2; return 1; }
51,539
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
llama.cpp/common/common.cpp
bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) { size_t dash_loc = range.find('-'); if (dash_loc == std::string::npos) { LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n"); return false; } size_t start_i; size_t end_i; if (dash_loc == 0) { start_i = 0; } else { start_i = std::stoull(range.substr(0, dash_loc)); if (start_i >= GGML_MAX_N_THREADS) { LOG_ERR("Start index out of bounds!\n"); return false; } } if (dash_loc == range.length() - 1) { end_i = GGML_MAX_N_THREADS - 1; } else { end_i = std::stoull(range.substr(dash_loc + 1)); if (end_i >= GGML_MAX_N_THREADS) { LOG_ERR("End index out of bounds!\n"); return false; } } for (size_t i = start_i; i <= end_i; i++) { boolmask[i] = true; } return true; }
O3
cpp
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %rbx movq %rdi, %r15 movl $0x2d, %esi xorl %edx, %edx callq 0x211d0 movq %rax, %r12 testq %rax, %rax je 0xf6a6a cmpq $-0x1, %r12 jne 0xf6a77 leaq 0x6ce60(%rip), %rax # 0x1638b0 cmpl $0x0, (%rax) js 0xf6c28 callq 0x10d47b leaq 0x2da8e(%rip), %rdx # 0x1244f3 jmp 0xf6bf0 movq %rbx, 0x10(%rsp) movq %r12, %r14 jmp 0xf6b31 movq %rbx, 0x10(%rsp) leaq 0x18(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movq %r12, %rcx callq 0x21080 movq (%r14), %rbp callq 0x210a0 movq %rax, %r13 movl (%rax), %eax movl %eax, 0x4(%rsp) movl $0x0, (%r13) leaq 0x8(%rsp), %rbx movq %rbp, %rdi movq %rbx, %rsi movl $0xa, %edx callq 0x20da0 cmpq %rbp, (%rbx) je 0xf6c3b movq %rax, %r14 movl (%r13), %eax testl %eax, %eax je 0xf6ae4 cmpl $0x22, %eax jne 0xf6aec leaq 0x2e32f(%rip), %rdi # 0x124e0e callq 0x20a20 movl 0x4(%rsp), %eax movl %eax, (%r13) leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf6b07 movq 0x28(%rsp), %rsi incq %rsi callq 0x20170 cmpq $0x200, %r14 # imm = 0x200 jb 0xf6b31 leaq 0x6cd99(%rip), %rax # 0x1638b0 cmpl $0x0, (%rax) js 0xf6c28 callq 0x10d47b leaq 0x2da04(%rip), %rdx # 0x124530 jmp 0xf6bf0 movq 0x8(%r15), %rax decq %rax movl $0x1ff, %r13d # imm = 0x1FF cmpq %rax, %r12 je 0xf6c03 incq %r12 leaq 0x18(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movq $-0x1, %rcx callq 0x21080 movq (%rbx), %rbx callq 0x210a0 movq %rax, %r15 movl (%rax), %ebp movl $0x0, (%rax) leaq 0x8(%rsp), %r12 movq %rbx, %rdi movq %r12, %rsi movl $0xa, %edx callq 0x20da0 cmpq %rbx, (%r12) je 0xf6c47 movq %rax, %r13 movl (%r15), %eax testl %eax, %eax je 0xf6bb1 cmpl $0x22, %eax jne 0xf6bb4 leaq 0x2e262(%rip), %rdi # 0x124e0e callq 0x20a20 movl %ebp, (%r15) leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf6bcf movq 0x28(%rsp), %rsi incq %rsi callq 0x20170 cmpq $0x200, %r13 # imm = 0x200 jb 0xf6c03 leaq 0x6ccd1(%rip), %rax # 0x1638b0 cmpl $0x0, (%rax) js 0xf6c28 callq 0x10d47b leaq 0x2d95c(%rip), %rdx # 0x12454c xorl %ebp, %ebp movq %rax, %rdi movl $0x4, %esi xorl %eax, %eax callq 0x10d518 jmp 0xf6c2a movb $0x1, %bpl cmpq %r13, %r14 ja 0xf6c2a movq 0x10(%rsp), %rdi addq %r14, %rdi subq %r14, %r13 incq %r13 movl $0x1, %esi movq %r13, %rdx callq 0x204d0 jmp 0xf6c2a xorl %ebp, %ebp movl %ebp, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2e1cc(%rip), %rdi # 0x124e0e callq 0x20220 leaq 0x2e1c0(%rip), %rdi # 0x124e0e callq 0x20220 movq %rax, %rbx cmpl $0x0, (%r15) jne 0xf6c5f movl %ebp, (%r15) leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x226fa jmp 0xf6c91 movq %rax, %rbx cmpl $0x0, (%r13) jne 0xf6c82 movl 0x4(%rsp), %eax movl %eax, (%r13) leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x22717 movq %rbx, %rdi callq 0x20ad0
_Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rsi mov r15, rdi mov esi, 2Dh ; '-' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r12, rax test rax, rax jz short loc_F6A6A cmp r12, 0FFFFFFFFFFFFFFFFh jnz short loc_F6A77 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_F6C28 call _Z15common_log_mainv; common_log_main(void) lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"... jmp loc_F6BF0 loc_F6A6A: mov [rsp+68h+var_58], rbx mov r14, r12 jmp loc_F6B31 loc_F6A77: mov [rsp+68h+var_58], rbx lea r14, [rsp+68h+var_50] mov rdi, r14 mov rsi, r15 xor edx, edx mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rbp, [r14] call ___errno_location mov r13, rax mov eax, [rax] mov [rsp+68h+var_64], eax mov dword ptr [r13+0], 0 lea rbx, [rsp+68h+var_60] mov rdi, rbp mov rsi, rbx mov edx, 0Ah call _strtoull cmp [rbx], rbp jz loc_F6C3B mov r14, rax mov eax, [r13+0] test eax, eax jz short loc_F6AE4 cmp eax, 22h ; '"' jnz short loc_F6AEC lea rdi, aStoull; "stoull" call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*) loc_F6AE4: mov eax, [rsp+68h+var_64] mov [r13+0], eax loc_F6AEC: lea rax, [rsp+68h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F6B07 mov rsi, [rsp+68h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F6B07: cmp r14, 200h jb short loc_F6B31 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_F6C28 call _Z15common_log_mainv; common_log_main(void) lea rdx, aStartIndexOutO; "Start index out of bounds!\n" jmp loc_F6BF0 loc_F6B31: mov rax, [r15+8] dec rax mov r13d, 1FFh cmp r12, rax jz loc_F6C03 inc r12 lea rbx, [rsp+68h+var_50] mov rdi, rbx mov rsi, r15 mov rdx, r12 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rbx, [rbx] call ___errno_location mov r15, rax mov ebp, [rax] mov dword ptr [rax], 0 lea r12, [rsp+68h+var_60] mov rdi, rbx mov rsi, r12 mov edx, 0Ah call _strtoull cmp [r12], rbx jz loc_F6C47 mov r13, rax mov eax, [r15] test eax, eax jz short loc_F6BB1 cmp eax, 22h ; '"' jnz short loc_F6BB4 lea rdi, aStoull; "stoull" call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*) loc_F6BB1: mov [r15], ebp loc_F6BB4: lea rax, [rsp+68h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F6BCF mov rsi, [rsp+68h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F6BCF: cmp r13, 200h jb short loc_F6C03 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_F6C28 call _Z15common_log_mainv; common_log_main(void) lea rdx, aEndIndexOutOfB; "End index out of bounds!\n" loc_F6BF0: xor ebp, ebp mov rdi, rax mov esi, 4 xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp short loc_F6C2A loc_F6C03: mov bpl, 1 cmp r14, r13 ja short loc_F6C2A mov rdi, [rsp+68h+var_58] add rdi, r14 sub r13, r14 inc r13 mov esi, 1 mov rdx, r13 call _memset jmp short loc_F6C2A loc_F6C28: xor ebp, ebp loc_F6C2A: mov eax, ebp add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_F6C3B: lea rdi, aStoull; "stoull" call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*) loc_F6C47: lea rdi, aStoull; "stoull" call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*) mov rbx, rax cmp dword ptr [r15], 0 jnz short loc_F6C5F mov [r15], ebp loc_F6C5F: lea rdi, [rsp+68h+var_60] lea rsi, [rsp+68h+var_50] call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_1; parse_cpu_range(std::string const&,bool (&)[512]) [clone] jmp short loc_F6C91 mov rbx, rax cmp dword ptr [r13+0], 0 jnz short loc_F6C82 mov eax, [rsp+68h+var_64] mov [r13+0], eax loc_F6C82: lea rdi, [rsp+68h+var_60] lea rsi, [rsp+68h+var_50] call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_2; parse_cpu_range(std::string const&,bool (&)[512]) [clone] loc_F6C91: mov rdi, rbx call __Unwind_Resume
long long parse_cpu_range(long long a1, long long a2) { void *v2; // rbp _DWORD *v3; // r15 long long v4; // rax long long v5; // r12 int v6; // eax int v7; // ecx int v8; // r8d int v9; // r9d const char *v10; // rdx unsigned long long v11; // r14 int *v12; // r13 long long v13; // rax unsigned long long v14; // r13 void *v15; // rbx long long v16; // rax long long v18; // rbx int v19; // [rsp+4h] [rbp-64h] void *v20; // [rsp+8h] [rbp-60h] BYREF long long v21; // [rsp+10h] [rbp-58h] void *v22[2]; // [rsp+18h] [rbp-50h] BYREF _QWORD v23[8]; // [rsp+28h] [rbp-40h] BYREF v3 = (_DWORD *)a1; v4 = std::string::find(a1, 45LL, 0LL); v5 = v4; if ( v4 ) { if ( v4 == -1 ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v10 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n"; LABEL_27: LODWORD(v2) = 0; common_log_add(v6, 4, (_DWORD)v10, v7, v8, v9); return (unsigned int)v2; } goto LABEL_30; } v21 = a2; std::string::substr(v22, a1, 0LL, v4); v2 = v22[0]; v12 = (int *)__errno_location(v22); v19 = *v12; *v12 = 0; v13 = strtoull(v2, &v20, 10LL); if ( v20 == v2 ) { std::__throw_invalid_argument("stoull"); goto LABEL_33; } v11 = v13; if ( *v12 ) { if ( *v12 == 34 ) std::__throw_out_of_range("stoull"); } else { *v12 = v19; } if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); if ( v11 >= 0x200 ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v10 = "Start index out of bounds!\n"; goto LABEL_27; } LABEL_30: LODWORD(v2) = 0; return (unsigned int)v2; } } else { v21 = a2; v11 = 0LL; } v14 = 511LL; if ( v5 == *(_QWORD *)(a1 + 8) - 1LL ) goto LABEL_28; std::string::substr(v22, a1, v5 + 1, -1LL); v15 = v22[0]; v3 = (_DWORD *)__errno_location(v22); LODWORD(v2) = *v3; *v3 = 0; v16 = strtoull(v15, &v20, 10LL); if ( v20 == v15 ) { LABEL_33: v18 = std::__throw_invalid_argument("stoull"); if ( !*v3 ) *v3 = (_DWORD)v2; parse_cpu_range((long long)&v20, v22); _Unwind_Resume(v18); } v14 = v16; if ( *v3 ) { if ( *v3 == 34 ) std::__throw_out_of_range("stoull"); } else { *v3 = (_DWORD)v2; } if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); if ( v14 >= 0x200 ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v10 = "End index out of bounds!\n"; goto LABEL_27; } goto LABEL_30; } LABEL_28: LOBYTE(v2) = 1; if ( v11 <= v14 ) memset(v11 + v21, 1LL, v14 - v11 + 1); return (unsigned int)v2; }
parse_cpu_range: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RSI MOV R15,RDI MOV ESI,0x2d XOR EDX,EDX CALL 0x001211d0 MOV R12,RAX TEST RAX,RAX JZ 0x001f6a6a CMP R12,-0x1 JNZ 0x001f6a77 LEA RAX,[0x2638b0] CMP dword ptr [RAX],0x0 JS 0x001f6c28 CALL 0x0020d47b LEA RDX,[0x2244f3] JMP 0x001f6bf0 LAB_001f6a6a: MOV qword ptr [RSP + 0x10],RBX MOV R14,R12 JMP 0x001f6b31 LAB_001f6a77: MOV qword ptr [RSP + 0x10],RBX LEA R14,[RSP + 0x18] MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV RCX,R12 CALL 0x00121080 MOV RBP,qword ptr [R14] CALL 0x001210a0 MOV R13,RAX MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x4],EAX MOV dword ptr [R13],0x0 LEA RBX,[RSP + 0x8] MOV RDI,RBP MOV RSI,RBX MOV EDX,0xa CALL 0x00120da0 CMP qword ptr [RBX],RBP JZ 0x001f6c3b MOV R14,RAX MOV EAX,dword ptr [R13] TEST EAX,EAX JZ 0x001f6ae4 CMP EAX,0x22 JNZ 0x001f6aec LAB_001f6ad8: LEA RDI,[0x224e0e] CALL 0x00120a20 LAB_001f6ae4: MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [R13],EAX LAB_001f6aec: LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001f6b07 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x00120170 LAB_001f6b07: CMP R14,0x200 JC 0x001f6b31 LEA RAX,[0x2638b0] CMP dword ptr [RAX],0x0 JS 0x001f6c28 CALL 0x0020d47b LEA RDX,[0x224530] JMP 0x001f6bf0 LAB_001f6b31: MOV RAX,qword ptr [R15 + 0x8] DEC RAX MOV R13D,0x1ff CMP R12,RAX JZ 0x001f6c03 INC R12 LEA RBX,[RSP + 0x18] MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV RCX,-0x1 CALL 0x00121080 MOV RBX,qword ptr [RBX] CALL 0x001210a0 MOV R15,RAX MOV EBP,dword ptr [RAX] MOV dword ptr [RAX],0x0 LEA R12,[RSP + 0x8] MOV RDI,RBX MOV RSI,R12 MOV EDX,0xa CALL 0x00120da0 CMP qword ptr [R12],RBX JZ 0x001f6c47 MOV R13,RAX MOV EAX,dword ptr [R15] TEST EAX,EAX JZ 0x001f6bb1 CMP EAX,0x22 JNZ 0x001f6bb4 LAB_001f6ba5: LEA RDI,[0x224e0e] CALL 0x00120a20 LAB_001f6bb1: MOV dword ptr [R15],EBP LAB_001f6bb4: LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001f6bcf MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x00120170 LAB_001f6bcf: CMP R13,0x200 JC 0x001f6c03 LEA RAX,[0x2638b0] CMP dword ptr [RAX],0x0 JS 0x001f6c28 CALL 0x0020d47b LEA RDX,[0x22454c] LAB_001f6bf0: XOR EBP,EBP MOV RDI,RAX MOV ESI,0x4 XOR EAX,EAX CALL 0x0020d518 JMP 0x001f6c2a LAB_001f6c03: MOV BPL,0x1 CMP R14,R13 JA 0x001f6c2a MOV RDI,qword ptr [RSP + 0x10] ADD RDI,R14 SUB R13,R14 INC R13 MOV ESI,0x1 MOV RDX,R13 CALL 0x001204d0 JMP 0x001f6c2a LAB_001f6c28: XOR EBP,EBP LAB_001f6c2a: MOV EAX,EBP ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001f6c3b: LEA RDI,[0x224e0e] CALL 0x00120220 LAB_001f6c47: LEA RDI,[0x224e0e] CALL 0x00120220 LAB_001f6c53: MOV RBX,RAX CMP dword ptr [R15],0x0 JNZ 0x001f6c5f MOV dword ptr [R15],EBP LAB_001f6c5f: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x18] CALL 0x001226fa JMP 0x001f6c91 LAB_001f6c91: MOV RDI,RBX CALL 0x00120ad0
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */ ulong parse_cpu_range(string *param_1,bool *param_2) { int iVar1; uint uVar2; long *__nptr; long lVar3; int8 uVar4; int *piVar5; ulong uVar6; char *pcVar7; long *unaff_RBP; ulong uVar8; ulonglong uVar9; long *local_60; bool *local_58; long *local_50 [2]; long local_40 [2]; lVar3 = std::__cxx11::string::find((char)param_1,0x2d); if (lVar3 == 0) { uVar6 = 0; local_58 = param_2; LAB_001f6b31: uVar9 = 0x1ff; if (lVar3 != *(long *)(param_1 + 8) + -1) { std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); __nptr = local_50[0]; param_1 = (string *)__errno_location(); uVar2 = *(uint *)param_1; unaff_RBP = (long *)(ulong)uVar2; *(uint *)param_1 = 0; uVar9 = strtoull((char *)__nptr,(char **)&local_60,10); if (local_60 == __nptr) { LAB_001f6c47: /* try { // try from 001f6c47 to 001f6c52 has its CatchHandler @ 001f6c53 */ uVar4 = std::__throw_invalid_argument("stoull"); /* catch() { ... } // from try @ 001f6ba5 with catch @ 001f6c53 catch() { ... } // from try @ 001f6c47 with catch @ 001f6c53 */ if (*(uint *)param_1 == 0) { *(uint *)param_1 = (uint)unaff_RBP; } parse_cpu_range((string *)&local_60,(bool *)local_50); /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar4); } if (*(uint *)param_1 == 0) { *(uint *)param_1 = uVar2; } else if (*(uint *)param_1 == 0x22) { /* try { // try from 001f6ba5 to 001f6bb0 has its CatchHandler @ 001f6c53 */ /* WARNING: Subroutine does not return */ std::__throw_out_of_range("stoull"); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (0x1ff < uVar9) { if (common_log_verbosity_thold < 0) goto LAB_001f6c28; uVar4 = common_log_main(); pcVar7 = "End index out of bounds!\n"; goto LAB_001f6bf0; } } uVar8 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); if (uVar6 <= uVar9) { memset(local_58 + uVar6,1,(uVar9 - uVar6) + 1); } } else { if (lVar3 == -1) { if (common_log_verbosity_thold < 0) { LAB_001f6c28: uVar8 = 0; goto LAB_001f6c2a; } uVar4 = common_log_main(); pcVar7 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n"; } else { local_58 = param_2; std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); unaff_RBP = local_50[0]; piVar5 = __errno_location(); iVar1 = *piVar5; *piVar5 = 0; uVar6 = strtoull((char *)unaff_RBP,(char **)&local_60,10); if (local_60 == unaff_RBP) { /* try { // try from 001f6c3b to 001f6c46 has its CatchHandler @ 001f6c70 */ std::__throw_invalid_argument("stoull"); goto LAB_001f6c47; } if (*piVar5 == 0) { *piVar5 = iVar1; } else if (*piVar5 == 0x22) { /* try { // try from 001f6ad8 to 001f6ae3 has its CatchHandler @ 001f6c70 */ /* WARNING: Subroutine does not return */ std::__throw_out_of_range("stoull"); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (uVar6 < 0x200) goto LAB_001f6b31; if (common_log_verbosity_thold < 0) goto LAB_001f6c28; uVar4 = common_log_main(); pcVar7 = "Start index out of bounds!\n"; } LAB_001f6bf0: uVar8 = 0; common_log_add(uVar4,4,pcVar7); } LAB_001f6c2a: return uVar8 & 0xffffffff; }
51,540
ma_log_prefix
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_log_prefix(MARIA_PAGE *ma_page, uint changed_length, int move_length, enum en_key_debug debug_marker __attribute__((unused))) { uint translog_parts; LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 7 + 7 + 2 + 2]; uchar *log_pos; uchar *buff= ma_page->buff; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4]; MARIA_HA *info= ma_page->info; pgcache_page_no_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_prefix"); DBUG_PRINT("enter", ("page: %lu changed_length: %u move_length: %d", (ulong) page, changed_length, move_length)); DBUG_ASSERT(ma_page->size == ma_page->org_size + move_length); log_pos= log_data + FILEID_STORE_SIZE; page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; #ifdef EXTRA_DEBUG_KEY_CHANGES (*log_pos++)= KEY_OP_DEBUG; (*log_pos++)= debug_marker; #endif /* Store keypage_flag */ *log_pos++= KEY_OP_SET_PAGEFLAG; *log_pos++= _ma_get_keypage_flag(info->s, buff); if (move_length < 0) { /* Delete prefix */ log_pos[0]= KEY_OP_DEL_PREFIX; int2store(log_pos+1, -move_length); log_pos+= 3; if (changed_length) { /* We don't need a KEY_OP_OFFSET as KEY_OP_DEL_PREFIX has an implicit offset */ log_pos[0]= KEY_OP_CHANGE; int2store(log_pos+1, changed_length); log_pos+= 3; } } else { /* Add prefix */ DBUG_ASSERT(changed_length >0 && (int) changed_length >= move_length); log_pos[0]= KEY_OP_ADD_PREFIX; int2store(log_pos+1, move_length); int2store(log_pos+3, changed_length); log_pos+= 5; } translog_parts= 1; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); if (changed_length) { log_array[TRANSLOG_INTERNAL_PARTS + 1].str= (buff + info->s->keypage_header); log_array[TRANSLOG_INTERNAL_PARTS + 1].length= changed_length; translog_parts= 2; } _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &changed_length, &translog_parts); /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length + changed_length, TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)); }
O3
c
ma_log_prefix: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movl %edx, %r8d movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq 0x10(%rdi), %r9 movq (%rdi), %rcx movq 0x18(%rdi), %rax movq (%rcx), %r10 movl 0x7bc(%r10), %r11d xorl %edx, %edx divq %r11 movl %eax, -0x2e(%rbp) shrq $0x20, %rax movb %al, -0x2a(%rbp) movb $0xa, -0x29(%rbp) movl 0x744(%r10), %eax leal -0x3(%rax), %edx movb (%r9,%rdx), %dl movb %dl, -0x28(%rbp) testl %r8d, %r8d js 0x4035a leaq -0x30(%rbp), %rdx movb $0x4, 0x9(%rdx) movw %r8w, 0xa(%rdx) movw %si, 0xc(%rdx) movq %rdx, -0x80(%rbp) movq $0xe, -0x78(%rbp) movl $0xe, %r8d testl %esi, %esi jne 0x40388 movl $0x3, %r9d jmp 0x4039e movb $0x5, -0x27(%rbp) negl %r8d movw %r8w, -0x26(%rbp) testl %esi, %esi je 0x403e9 leaq -0x30(%rbp), %rdx movb $0x3, 0xc(%rdx) movw %si, 0xd(%rdx) movq %rdx, -0x80(%rbp) movq $0xf, -0x78(%rbp) movl $0xf, %r8d leaq -0x68(%rbp), %rdx addq %rax, %r9 movq %r9, -0x8(%rdx) movl %esi, %eax movl $0x4, %r9d movq %rax, (%rdx) movl 0x20(%rdi), %eax movl %eax, 0x24(%rdi) movq 0x8(%rcx), %rdx addl %esi, %r8d subq $0x8, %rsp leaq -0x30(%rbp), %rax leaq -0xa0(%rbp), %r10 leaq -0x38(%rbp), %rdi movl $0xc, %esi pushq $0x0 pushq %rax pushq %r10 callq 0x29c54 addq $0x20, %rsp movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x40408 addq $0xa0, %rsp popq %rbp retq leaq -0x78(%rbp), %rdx leaq -0x30(%rbp), %rax movq %rax, -0x8(%rdx) movl $0x3, %r9d movl $0xc, %r8d movl $0xc, %eax jmp 0x4039b callq 0x29260
_ma_log_prefix: push rbp mov rbp, rsp sub rsp, 0A0h mov r8d, edx mov rax, fs:28h mov [rbp+var_8], rax mov r9, [rdi+10h] mov rcx, [rdi] mov rax, [rdi+18h] mov r10, [rcx] mov r11d, [r10+7BCh] xor edx, edx div r11 mov [rbp+var_2E], eax shr rax, 20h mov [rbp+var_2A], al mov [rbp+var_29], 0Ah mov eax, [r10+744h] lea edx, [rax-3] mov dl, [r9+rdx] mov [rbp+var_28], dl test r8d, r8d js short loc_4035A lea rdx, [rbp+var_30] mov byte ptr [rdx+9], 4 mov [rdx+0Ah], r8w mov [rdx+0Ch], si mov [rbp+var_80], rdx mov [rbp+var_78], 0Eh mov r8d, 0Eh test esi, esi jnz short loc_40388 mov r9d, 3 jmp short loc_4039E loc_4035A: mov [rbp+var_27], 5 neg r8d mov [rbp+var_26], r8w test esi, esi jz short loc_403E9 lea rdx, [rbp+var_30] mov byte ptr [rdx+0Ch], 3 mov [rdx+0Dh], si mov [rbp+var_80], rdx mov [rbp+var_78], 0Fh mov r8d, 0Fh loc_40388: lea rdx, [rbp+var_68] add r9, rax mov [rdx-8], r9 mov eax, esi mov r9d, 4 loc_4039B: mov [rdx], rax loc_4039E: mov eax, [rdi+20h] mov [rdi+24h], eax mov rdx, [rcx+8] add r8d, esi sub rsp, 8 lea rax, [rbp+var_30] lea r10, [rbp+var_A0] lea rdi, [rbp+var_38] mov esi, 0Ch push 0 push rax push r10 call translog_write_record add rsp, 20h mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_40408 add rsp, 0A0h pop rbp retn loc_403E9: lea rdx, [rbp+var_78] lea rax, [rbp+var_30] mov [rdx-8], rax mov r9d, 3 mov r8d, 0Ch mov eax, 0Ch jmp short loc_4039B loc_40408: call ___stack_chk_fail
long long ma_log_prefix(long long **a1, unsigned int a2, int a3) { long long *v3; // r9 long long *v4; // rcx long long v5; // r10 unsigned long long v6; // rax long long v7; // rax int v8; // r8d int v9; // r9d long long *v10; // rdx long long v11; // rax __int128 v13; // [rsp+0h] [rbp-A0h] BYREF __int16 *v14; // [rsp+20h] [rbp-80h] _QWORD v15[2]; // [rsp+28h] [rbp-78h] BYREF char v16; // [rsp+38h] [rbp-68h] BYREF _BYTE v17[8]; // [rsp+68h] [rbp-38h] BYREF __int16 v18; // [rsp+70h] [rbp-30h] BYREF int v19; // [rsp+72h] [rbp-2Eh] char v20; // [rsp+76h] [rbp-2Ah] char v21; // [rsp+77h] [rbp-29h] char v22; // [rsp+78h] [rbp-28h] char v23; // [rsp+79h] [rbp-27h] __int16 v24; // [rsp+7Ah] [rbp-26h] _WORD v25[14]; // [rsp+7Ch] [rbp-24h] unsigned long long v26; // [rsp+98h] [rbp-8h] v26 = __readfsqword(0x28u); v3 = a1[2]; v4 = *a1; v5 = **a1; v6 = (unsigned long long)a1[3] / *(unsigned int *)(v5 + 1980); v19 = v6; v20 = BYTE4(v6); v21 = 10; v7 = *(unsigned int *)(v5 + 1860); v22 = *((_BYTE *)v3 + (unsigned int)(v7 - 3)); if ( a3 < 0 ) { v23 = 5; v24 = -(__int16)a3; if ( !a2 ) { v10 = v15; v14 = &v18; v9 = 3; v8 = 12; v11 = 12LL; goto LABEL_7; } LOBYTE(v25[0]) = 3; *(_WORD *)((char *)v25 + 1) = a2; v14 = &v18; v15[0] = 15LL; v8 = 15; LABEL_6: v10 = (long long *)&v16; v15[1] = (char *)v3 + v7; v11 = a2; v9 = 4; LABEL_7: *v10 = v11; goto LABEL_8; } v23 = 4; v24 = a3; v25[0] = a2; v14 = &v18; v15[0] = 14LL; v8 = 14; if ( a2 ) goto LABEL_6; v9 = 3; LABEL_8: *((_DWORD *)a1 + 9) = *((_DWORD *)a1 + 8); return translog_write_record((unsigned long long)v17, &byte_9[3], v4[1], v4, a2 + v8, v9, &v13, &v18, 0LL); }
_ma_log_prefix: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV R8D,EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV R9,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x18] MOV R10,qword ptr [RCX] MOV R11D,dword ptr [R10 + 0x7bc] XOR EDX,EDX DIV R11 MOV dword ptr [RBP + -0x2e],EAX SHR RAX,0x20 MOV byte ptr [RBP + -0x2a],AL MOV byte ptr [RBP + -0x29],0xa MOV EAX,dword ptr [R10 + 0x744] LEA EDX,[RAX + -0x3] MOV DL,byte ptr [R9 + RDX*0x1] MOV byte ptr [RBP + -0x28],DL TEST R8D,R8D JS 0x0014035a LEA RDX,[RBP + -0x30] MOV byte ptr [RDX + 0x9],0x4 MOV word ptr [RDX + 0xa],R8W MOV word ptr [RDX + 0xc],SI MOV qword ptr [RBP + -0x80],RDX MOV qword ptr [RBP + -0x78],0xe MOV R8D,0xe TEST ESI,ESI JNZ 0x00140388 MOV R9D,0x3 JMP 0x0014039e LAB_0014035a: MOV byte ptr [RBP + -0x27],0x5 NEG R8D MOV word ptr [RBP + -0x26],R8W TEST ESI,ESI JZ 0x001403e9 LEA RDX,[RBP + -0x30] MOV byte ptr [RDX + 0xc],0x3 MOV word ptr [RDX + 0xd],SI MOV qword ptr [RBP + -0x80],RDX MOV qword ptr [RBP + -0x78],0xf MOV R8D,0xf LAB_00140388: LEA RDX,[RBP + -0x68] ADD R9,RAX MOV qword ptr [RDX + -0x8],R9 MOV EAX,ESI MOV R9D,0x4 LAB_0014039b: MOV qword ptr [RDX],RAX LAB_0014039e: MOV EAX,dword ptr [RDI + 0x20] MOV dword ptr [RDI + 0x24],EAX MOV RDX,qword ptr [RCX + 0x8] ADD R8D,ESI SUB RSP,0x8 LEA RAX,[RBP + -0x30] LEA R10,[RBP + -0xa0] LEA RDI,[RBP + -0x38] MOV ESI,0xc PUSH 0x0 PUSH RAX PUSH R10 CALL 0x00129c54 ADD RSP,0x20 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x00140408 ADD RSP,0xa0 POP RBP RET LAB_001403e9: LEA RDX,[RBP + -0x78] LEA RAX,[RBP + -0x30] MOV qword ptr [RDX + -0x8],RAX MOV R9D,0x3 MOV R8D,0xc MOV EAX,0xc JMP 0x0014039b LAB_00140408: CALL 0x00129260
void _ma_log_prefix(long *param_1,uint param_2,int param_3) { uint uVar1; long *plVar2; int1 auVar3 [16]; int iVar4; ulong uVar5; ulong *puVar6; int iVar7; int8 uVar8; long in_FS_OFFSET; int1 local_a8 [32]; int1 *local_88; ulong local_80; long local_78; ulong local_70 [6]; int1 local_40 [8]; int1 local_38 [2]; int4 local_36; int1 local_32; int1 local_31; int1 local_30; int1 local_2f; short local_2e; int1 local_2c [28]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); plVar2 = (long *)*param_1; auVar3._8_8_ = 0; auVar3._0_8_ = param_1[3]; auVar3 = auVar3 / ZEXT416(*(uint *)(*plVar2 + 0x7bc)); local_36 = auVar3._0_4_; local_32 = auVar3[4]; local_31 = 10; uVar1 = *(uint *)(*plVar2 + 0x744); local_30 = *(int1 *)(param_1[2] + (ulong)(uVar1 - 3)); local_2e = (short)param_3; if (param_3 < 0) { local_2f = 5; local_2e = -local_2e; if (param_2 != 0) { local_2c._1_2_ = (short)param_2; local_2c[0] = 3; local_80 = 0xf; iVar4 = 0xf; goto LAB_00140388; } puVar6 = &local_80; uVar8 = 3; iVar7 = 0xc; uVar5 = 0xc; } else { local_2f = 4; local_2c._0_2_ = (short)param_2; local_80 = 0xe; iVar7 = 0xe; iVar4 = 0xe; if (param_2 == 0) { uVar8 = 3; goto LAB_0014039e; } LAB_00140388: iVar7 = iVar4; puVar6 = local_70; local_78 = param_1[2] + (ulong)uVar1; uVar5 = (ulong)param_2; uVar8 = 4; } *puVar6 = uVar5; LAB_0014039e: local_88 = local_38; *(int *)((long)param_1 + 0x24) = (int)param_1[4]; translog_write_record(local_40,0xc,plVar2[1],plVar2,iVar7 + param_2,uVar8,local_a8,local_38,0); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
51,541
create_fromuni
eloqsql/strings/ctype-simple.c
static my_bool create_fromuni(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { uni_idx idx[PLANE_NUM]; int i,n; /* Check that Unicode map is loaded. It can be not loaded when the collation is listed in Index.xml but not specified in the character set specific XML file. */ if (!cs->tab_to_uni) return TRUE; /* Clear plane statistics */ bzero(idx,sizeof(idx)); /* Count number of characters in each plane */ for (i=0; i< 0x100; i++) { uint16 wc=cs->tab_to_uni[i]; int pl= PLANE_NUMBER(wc); if (wc || !i) { if (!idx[pl].nchars) { idx[pl].uidx.from=wc; idx[pl].uidx.to=wc; }else { idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from; idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to; } idx[pl].nchars++; } } /* Sort planes in descending order */ qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp); for (i=0; i < PLANE_NUM; i++) { int ch,numchars; uchar *tab; /* Skip empty plane */ if (!idx[i].nchars) break; numchars=idx[i].uidx.to-idx[i].uidx.from+1; if (!(idx[i].uidx.tab= tab= (uchar*) (loader->once_alloc) (numchars * sizeof(*idx[i].uidx.tab)))) return TRUE; bzero(tab,numchars*sizeof(*tab)); for (ch=1; ch < PLANE_SIZE; ch++) { uint16 wc=cs->tab_to_uni[ch]; if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc) { int ofs= wc - idx[i].uidx.from; if (!tab[ofs] || tab[ofs] > 0x7F) /* Prefer ASCII*/ { /* Some character sets can have double encoding. For example, in ARMSCII8, the following characters are encoded twice: Encoding#1 Encoding#2 Unicode Character Name ---------- ---------- ------- -------------- 0x27 0xFF U+0027 APOSTROPHE 0x28 0xA5 U+0028 LEFT PARENTHESIS 0x29 0xA4 U+0029 RIGHT PARENTHESIS 0x2C 0xAB U+002C COMMA 0x2D 0xAC U+002D HYPHEN-MINUS 0x2E 0xA9 U+002E FULL STOP That is, both 0x27 and 0xFF convert to Unicode U+0027. When converting back from Unicode to ARMSCII, we prefer the ASCII range, that is we want U+0027 to convert to 0x27 rather than to 0xFF. */ tab[ofs]= ch; } } } } /* Allocate and fill reverse table for each plane */ n=i; if (!(cs->tab_from_uni= (MY_UNI_IDX *) (loader->once_alloc)(sizeof(MY_UNI_IDX) * (n + 1)))) return TRUE; for (i=0; i< n; i++) ((struct my_uni_idx_st*)cs->tab_from_uni)[i]= idx[i].uidx; /* Set end-of-list marker */ bzero((char*) &cs->tab_from_uni[i],sizeof(MY_UNI_IDX)); return FALSE; }
O0
c
create_fromuni: pushq %rbp movq %rsp, %rbp subq $0x1850, %rsp # imm = 0x1850 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x47c67 movb $0x1, -0x1(%rbp) jmp 0x4813a leaq -0x1820(%rbp), %rdi xorl %esi, %esi movl $0x1800, %edx # imm = 0x1800 callq 0x24180 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0x47e58 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1824(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x182a(%rbp) movzwl -0x182a(%rbp), %eax sarl $0x8, %eax movl $0x100, %ecx # imm = 0x100 cltd idivl %ecx movl %edx, -0x1830(%rbp) movzwl -0x182a(%rbp), %eax cmpl $0x0, %eax jne 0x47cdf cmpl $0x0, -0x1824(%rbp) jne 0x47e42 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0x47d3e movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) jmp 0x47e26 movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jge 0x47d71 movzwl -0x182a(%rbp), %eax movl %eax, -0x184c(%rbp) jmp 0x47d90 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0x8(%rax), %eax movl %eax, -0x184c(%rbp) movl -0x184c(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jle 0x47de5 movzwl -0x182a(%rbp), %eax movl %eax, -0x1850(%rbp) jmp 0x47e04 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movl %eax, -0x1850(%rbp) movl -0x1850(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) jmp 0x47e44 movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x47c84 leaq -0x1820(%rbp), %rdi movl $0x100, %esi # imm = 0x100 movl $0x18, %edx leaq 0x2e0(%rip), %rcx # 0x48150 callq 0x24540 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0x48071 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0x47eae jmp 0x48071 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax addl $0x1, %eax movl %eax, -0x1838(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movslq -0x1838(%rbp), %rdi shlq $0x0, %rdi callq *%rax movq %rax, -0x1840(%rbp) movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x47f32 movb $0x1, -0x1(%rbp) jmp 0x4813a movq -0x1840(%rbp), %rdi movslq -0x1838(%rbp), %rdx shlq $0x0, %rdx xorl %esi, %esi callq 0x24180 movl $0x1, -0x1834(%rbp) cmpl $0x100, -0x1834(%rbp) # imm = 0x100 jge 0x4805b movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1834(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x1842(%rbp) movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jl 0x48045 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jg 0x48045 movzwl -0x1842(%rbp), %eax cmpl $0x0, %eax je 0x48045 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax movl %eax, -0x1848(%rbp) movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x4802a movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x7f, %eax jle 0x48043 movl -0x1834(%rbp), %eax movb %al, %dl movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movb %dl, (%rax,%rcx) jmp 0x48045 jmp 0x48047 movl -0x1834(%rbp), %eax addl $0x1, %eax movl %eax, -0x1834(%rbp) jmp 0x47f55 jmp 0x4805d movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x47e7f movl -0x1824(%rbp), %eax movl %eax, -0x1828(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movl -0x1828(%rbp), %ecx addl $0x1, %ecx movslq %ecx, %rdi shlq $0x4, %rdi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x70(%rcx) cmpq $0x0, %rax jne 0x480b1 movb $0x1, -0x1(%rbp) jmp 0x4813a movl $0x0, -0x1824(%rbp) movl -0x1824(%rbp), %eax cmpl -0x1828(%rbp), %eax jge 0x48114 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movslq -0x1824(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq 0x8(%rcx), %rdx movq %rdx, (%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x8(%rax) movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x480bb movq -0x10(%rbp), %rax movq 0x70(%rax), %rdi movslq -0x1824(%rbp), %rax shlq $0x4, %rax addq %rax, %rdi xorl %esi, %esi movl $0x10, %edx callq 0x24180 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x1850, %rsp # imm = 0x1850 popq %rbp retq nopw %cs:(%rax,%rax)
create_fromuni: push rbp mov rbp, rsp sub rsp, 1850h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_47C67 mov [rbp+var_1], 1 jmp loc_4813A loc_47C67: lea rdi, [rbp+var_1820] xor esi, esi mov edx, 1800h call _memset mov [rbp+var_1824], 0 loc_47C84: cmp [rbp+var_1824], 100h jge loc_47E58 mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1824] mov ax, [rax+rcx*2] mov [rbp+var_182A], ax movzx eax, [rbp+var_182A] sar eax, 8 mov ecx, 100h cdq idiv ecx mov [rbp+var_1830], edx movzx eax, [rbp+var_182A] cmp eax, 0 jnz short loc_47CDF cmp [rbp+var_1824], 0 jnz loc_47E42 loc_47CDF: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_47D3E mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx jmp loc_47E26 loc_47D3E: movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jge short loc_47D71 movzx eax, [rbp+var_182A] mov [rbp+var_184C], eax jmp short loc_47D90 loc_47D71: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+8] mov [rbp+var_184C], eax loc_47D90: mov eax, [rbp+var_184C] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jle short loc_47DE5 movzx eax, [rbp+var_182A] mov [rbp+var_1850], eax jmp short loc_47E04 loc_47DE5: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] mov [rbp+var_1850], eax loc_47E04: mov eax, [rbp+var_1850] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx loc_47E26: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_47E42: jmp short $+2 loc_47E44: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_47C84 loc_47E58: lea rdi, [rbp+var_1820] mov esi, 100h mov edx, 18h lea rcx, pcmp call _qsort mov [rbp+var_1824], 0 loc_47E7F: cmp [rbp+var_1824], 100h jge loc_48071 movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_47EAE jmp loc_48071 loc_47EAE: movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx add eax, 1 mov [rbp+var_1838], eax mov rax, [rbp+var_18] mov rax, [rax+80h] movsxd rdi, [rbp+var_1838] shl rdi, 0 call rax mov [rbp+var_1840], rax movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov [rcx+10h], rax cmp rax, 0 jnz short loc_47F32 mov [rbp+var_1], 1 jmp loc_4813A loc_47F32: mov rdi, [rbp+var_1840] movsxd rdx, [rbp+var_1838] shl rdx, 0 xor esi, esi call _memset mov [rbp+var_1834], 1 loc_47F55: cmp [rbp+var_1834], 100h jge loc_4805B mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1834] mov ax, [rax+rcx*2] mov [rbp+var_1842], ax movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jl loc_48045 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jg short loc_48045 movzx eax, [rbp+var_1842] cmp eax, 0 jz short loc_48045 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx mov [rbp+var_1848], eax mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] cmp byte ptr [rax+rcx], 0 jz short loc_4802A mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] movzx eax, byte ptr [rax+rcx] cmp eax, 7Fh jle short loc_48043 loc_4802A: mov eax, [rbp+var_1834] mov dl, al mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] mov [rax+rcx], dl loc_48043: jmp short $+2 loc_48045: jmp short $+2 loc_48047: mov eax, [rbp+var_1834] add eax, 1 mov [rbp+var_1834], eax jmp loc_47F55 loc_4805B: jmp short $+2 loc_4805D: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_47E7F loc_48071: mov eax, [rbp+var_1824] mov [rbp+var_1828], eax mov rax, [rbp+var_18] mov rax, [rax+80h] mov ecx, [rbp+var_1828] add ecx, 1 movsxd rdi, ecx shl rdi, 4 call rax mov rcx, [rbp+var_10] mov [rcx+70h], rax cmp rax, 0 jnz short loc_480B1 mov [rbp+var_1], 1 jmp loc_4813A loc_480B1: mov [rbp+var_1824], 0 loc_480BB: mov eax, [rbp+var_1824] cmp eax, [rbp+var_1828] jge short loc_48114 mov rax, [rbp+var_10] mov rax, [rax+70h] movsxd rcx, [rbp+var_1824] shl rcx, 4 add rax, rcx movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov rdx, [rcx+8] mov [rax], rdx mov rcx, [rcx+10h] mov [rax+8], rcx mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp short loc_480BB loc_48114: mov rax, [rbp+var_10] mov rdi, [rax+70h] movsxd rax, [rbp+var_1824] shl rax, 4 add rdi, rax xor esi, esi mov edx, 10h call _memset mov [rbp+var_1], 0 loc_4813A: mov al, [rbp+var_1] add rsp, 1850h pop rbp retn
char create_fromuni(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rax unsigned __int16 v5; // [rsp+0h] [rbp-1850h] __int16 v6; // [rsp+4h] [rbp-184Ch] int v7; // [rsp+8h] [rbp-1848h] unsigned __int16 v8; // [rsp+Eh] [rbp-1842h] long long v9; // [rsp+10h] [rbp-1840h] int v10; // [rsp+18h] [rbp-1838h] int k; // [rsp+1Ch] [rbp-1834h] int v12; // [rsp+20h] [rbp-1830h] unsigned __int16 v13; // [rsp+26h] [rbp-182Ah] int v14; // [rsp+28h] [rbp-1828h] int i; // [rsp+2Ch] [rbp-1824h] int j; // [rsp+2Ch] [rbp-1824h] int m; // [rsp+2Ch] [rbp-1824h] _DWORD v18[1538]; // [rsp+30h] [rbp-1820h] BYREF long long v19; // [rsp+1838h] [rbp-18h] long long v20; // [rsp+1840h] [rbp-10h] v20 = a1; v19 = a2; if ( !*(_QWORD *)(a1 + 104) ) return 1; memset(v18, 0LL, 6144LL); for ( i = 0; i < 256; ++i ) { v13 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); v12 = ((int)v13 >> 8) % 256; if ( v13 || !i ) { if ( v18[6 * v12] ) { if ( v13 >= (int)LOWORD(v18[6 * v12 + 2]) ) v6 = v18[6 * v12 + 2]; else v6 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); LOWORD(v18[6 * v12 + 2]) = v6; if ( v13 <= (int)HIWORD(v18[6 * v12 + 2]) ) v5 = HIWORD(v18[6 * v12 + 2]); else v5 = v13; HIWORD(v18[6 * v12 + 2]) = v5; } else { LOWORD(v18[6 * v12 + 2]) = v13; HIWORD(v18[6 * v12 + 2]) = v13; } ++v18[6 * v12]; } } qsort(v18, 256LL, 24LL, pcmp); for ( j = 0; j < 256 && v18[6 * j]; ++j ) { v10 = HIWORD(v18[6 * j + 2]) - LOWORD(v18[6 * j + 2]) + 1; v9 = (*(long long ( **)(_QWORD))(v19 + 128))(v10); *(_QWORD *)&v18[6 * j + 4] = v9; if ( !v9 ) return 1; memset(v9, 0LL, v10); for ( k = 1; k < 256; ++k ) { v8 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * k); if ( v8 >= (int)LOWORD(v18[6 * j + 2]) && v8 <= (int)HIWORD(v18[6 * j + 2]) ) { if ( v8 ) { v7 = v8 - LOWORD(v18[6 * j + 2]); if ( !*(_BYTE *)(v9 + v7) || *(unsigned __int8 *)(v9 + v7) > 0x7Fu ) *(_BYTE *)(v9 + v7) = k; } } } } v14 = j; v2 = (*(long long ( **)(long long))(v19 + 128))(16LL * (j + 1)); *(_QWORD *)(v20 + 112) = v2; if ( !v2 ) return 1; for ( m = 0; m < v14; ++m ) { v3 = (_QWORD *)(16LL * m + *(_QWORD *)(v20 + 112)); *v3 = *(_QWORD *)&v18[6 * m + 2]; v3[1] = *(_QWORD *)&v18[6 * m + 4]; } memset(16LL * m + *(_QWORD *)(v20 + 112), 0LL, 16LL); return 0; }
create_fromuni: PUSH RBP MOV RBP,RSP SUB RSP,0x1850 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x00147c67 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014813a LAB_00147c67: LEA RDI,[RBP + -0x1820] XOR ESI,ESI MOV EDX,0x1800 CALL 0x00124180 MOV dword ptr [RBP + -0x1824],0x0 LAB_00147c84: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x00147e58 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1824] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x182a],AX MOVZX EAX,word ptr [RBP + -0x182a] SAR EAX,0x8 MOV ECX,0x100 CDQ IDIV ECX MOV dword ptr [RBP + -0x1830],EDX MOVZX EAX,word ptr [RBP + -0x182a] CMP EAX,0x0 JNZ 0x00147cdf CMP dword ptr [RBP + -0x1824],0x0 JNZ 0x00147e42 LAB_00147cdf: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x00147d3e MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX JMP 0x00147e26 LAB_00147d3e: MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JGE 0x00147d71 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x184c],EAX JMP 0x00147d90 LAB_00147d71: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RBP + -0x184c],EAX LAB_00147d90: MOV EAX,dword ptr [RBP + -0x184c] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JLE 0x00147de5 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x1850],EAX JMP 0x00147e04 LAB_00147de5: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x1850],EAX LAB_00147e04: MOV EAX,dword ptr [RBP + -0x1850] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX LAB_00147e26: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00147e42: JMP 0x00147e44 LAB_00147e44: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x00147c84 LAB_00147e58: LEA RDI,[RBP + -0x1820] MOV ESI,0x100 MOV EDX,0x18 LEA RCX,[0x148150] CALL 0x00124540 MOV dword ptr [RBP + -0x1824],0x0 LAB_00147e7f: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x00148071 MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x00147eae JMP 0x00148071 LAB_00147eae: MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX ADD EAX,0x1 MOV dword ptr [RBP + -0x1838],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOVSXD RDI,dword ptr [RBP + -0x1838] SHL RDI,0x0 CALL RAX MOV qword ptr [RBP + -0x1840],RAX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x00147f32 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014813a LAB_00147f32: MOV RDI,qword ptr [RBP + -0x1840] MOVSXD RDX,dword ptr [RBP + -0x1838] SHL RDX,0x0 XOR ESI,ESI CALL 0x00124180 MOV dword ptr [RBP + -0x1834],0x1 LAB_00147f55: CMP dword ptr [RBP + -0x1834],0x100 JGE 0x0014805b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1834] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x1842],AX MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JL 0x00148045 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JG 0x00148045 MOVZX EAX,word ptr [RBP + -0x1842] CMP EAX,0x0 JZ 0x00148045 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX MOV dword ptr [RBP + -0x1848],EAX MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x0014802a MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7f JLE 0x00148043 LAB_0014802a: MOV EAX,dword ptr [RBP + -0x1834] MOV DL,AL MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOV byte ptr [RAX + RCX*0x1],DL LAB_00148043: JMP 0x00148045 LAB_00148045: JMP 0x00148047 LAB_00148047: MOV EAX,dword ptr [RBP + -0x1834] ADD EAX,0x1 MOV dword ptr [RBP + -0x1834],EAX JMP 0x00147f55 LAB_0014805b: JMP 0x0014805d LAB_0014805d: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x00147e7f LAB_00148071: MOV EAX,dword ptr [RBP + -0x1824] MOV dword ptr [RBP + -0x1828],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x1828] ADD ECX,0x1 MOVSXD RDI,ECX SHL RDI,0x4 CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x70],RAX CMP RAX,0x0 JNZ 0x001480b1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014813a LAB_001480b1: MOV dword ptr [RBP + -0x1824],0x0 LAB_001480bb: MOV EAX,dword ptr [RBP + -0x1824] CMP EAX,dword ptr [RBP + -0x1828] JGE 0x00148114 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOVSXD RCX,dword ptr [RBP + -0x1824] SHL RCX,0x4 ADD RAX,RCX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001480bb LAB_00148114: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x70] MOVSXD RAX,dword ptr [RBP + -0x1824] SHL RAX,0x4 ADD RDI,RAX XOR ESI,ESI MOV EDX,0x10 CALL 0x00124180 MOV byte ptr [RBP + -0x1],0x0 LAB_0014813a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x1850 POP RBP RET
int1 create_fromuni(long param_1,long param_2) { ushort uVar1; ushort uVar2; int iVar3; void *__s; long lVar4; int8 *puVar5; uint uVar6; int local_183c; int local_182c; int local_1828 [2]; ushort auStack_1820 [4]; int8 auStack_1818 [767]; long local_20; long local_18; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 1; } else { local_20 = param_2; local_18 = param_1; memset(local_1828,0,0x1800); for (local_182c = 0; local_182c < 0x100; local_182c = local_182c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_182c * 2); uVar6 = (uint)((int)(uint)uVar1 >> 8) % 0x100; if ((uVar1 != 0) || (local_182c == 0)) { if (local_1828[(long)(int)uVar6 * 6] == 0) { auStack_1820[(long)(int)uVar6 * 0xc] = uVar1; auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } else { uVar2 = uVar1; if (auStack_1820[(long)(int)uVar6 * 0xc] <= uVar1) { uVar2 = auStack_1820[(long)(int)uVar6 * 0xc]; } auStack_1820[(long)(int)uVar6 * 0xc] = uVar2; if (uVar1 <= auStack_1820[(long)(int)uVar6 * 0xc + 1]) { uVar1 = auStack_1820[(long)(int)uVar6 * 0xc + 1]; } auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } local_1828[(long)(int)uVar6 * 6] = local_1828[(long)(int)uVar6 * 6] + 1; } } qsort(local_1828,0x100,0x18,pcmp); local_182c = 0; while ((iVar3 = local_182c, local_182c < 0x100 && (local_1828[(long)local_182c * 6] != 0))) { iVar3 = ((uint)auStack_1820[(long)local_182c * 0xc + 1] - (uint)auStack_1820[(long)local_182c * 0xc]) + 1; __s = (void *)(**(code **)(local_20 + 0x80))((long)iVar3); auStack_1818[(long)local_182c * 3] = __s; if (__s == (void *)0x0) { return 1; } memset(__s,0,(long)iVar3); for (local_183c = 1; local_183c < 0x100; local_183c = local_183c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_183c * 2); if ((((auStack_1820[(long)local_182c * 0xc] <= uVar1) && (uVar1 <= auStack_1820[(long)local_182c * 0xc + 1])) && (uVar1 != 0)) && ((iVar3 = (uint)uVar1 - (uint)auStack_1820[(long)local_182c * 0xc], *(char *)((long)__s + (long)iVar3) == '\0' || (0x7f < *(byte *)((long)__s + (long)iVar3))))) { *(char *)((long)__s + (long)iVar3) = (char)local_183c; } } local_182c = local_182c + 1; } lVar4 = (**(code **)(local_20 + 0x80))((long)(local_182c + 1) << 4); *(long *)(local_18 + 0x70) = lVar4; if (lVar4 == 0) { local_9 = 1; } else { for (local_182c = 0; local_182c < iVar3; local_182c = local_182c + 1) { puVar5 = (int8 *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10); *puVar5 = *(int8 *)(auStack_1820 + (long)local_182c * 0xc); puVar5[1] = auStack_1818[(long)local_182c * 3]; } memset((void *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10),0,0x10); local_9 = 0; } } return local_9; }
51,542
test_vector_set
tsotchke[P]eshkol/tests/unit/test_vector.c
static void test_vector_set(void) { printf("Testing vector setting...\n"); // Create an arena Arena* arena = arena_create(1024); assert(arena != NULL); // Create vectors VectorF* vf = vector_f_create(arena, 3); assert(vf != NULL); VectorD* vd = vector_d_create(arena, 4); assert(vd != NULL); VectorI* vi = vector_i_create(arena, 2); assert(vi != NULL); // Set vectors float f_data[3] = {1.0f, 2.0f, 3.0f}; assert(vector_f_set(vf, f_data, 3)); assert(vf->data[0] == 1.0f && vf->data[1] == 2.0f && vf->data[2] == 3.0f); double d_data[4] = {1.0, 2.0, 3.0, 4.0}; assert(vector_d_set(vd, d_data, 4)); assert(vd->data[0] == 1.0 && vd->data[1] == 2.0 && vd->data[2] == 3.0 && vd->data[3] == 4.0); int i_data[2] = {1, 2}; assert(vector_i_set(vi, i_data, 2)); assert(vi->data[0] == 1 && vi->data[1] == 2); // Destroy the arena arena_destroy(arena); printf("PASS: vector_set\n"); }
O0
c
test_vector_set: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp leaq 0x8d4b(%rip), %rdi # 0xa31a movb $0x0, %al callq 0x1080 movl $0x400, %edi # imm = 0x400 callq 0x42a0 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x15ed jmp 0x160c leaq 0x8be1(%rip), %rdi # 0xa1d5 leaq 0x8b36(%rip), %rsi # 0xa131 movl $0x36, %edx leaq 0x8d2e(%rip), %rcx # 0xa335 callq 0x1090 movq -0x8(%rbp), %rdi movl $0x3, %esi callq 0x49a0 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1627 jmp 0x1646 leaq 0x8bd3(%rip), %rdi # 0xa201 leaq 0x8afc(%rip), %rsi # 0xa131 movl $0x3a, %edx leaq 0x8cf4(%rip), %rcx # 0xa335 callq 0x1090 movq -0x8(%rbp), %rdi movl $0x4, %esi callq 0x4c00 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1661 jmp 0x1680 leaq 0x8bf3(%rip), %rdi # 0xa25b leaq 0x8ac2(%rip), %rsi # 0xa131 movl $0x3d, %edx leaq 0x8cba(%rip), %rcx # 0xa335 callq 0x1090 movq -0x8(%rbp), %rdi movl $0x2, %esi callq 0x4cc0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x169b jmp 0x16ba leaq 0x8c26(%rip), %rdi # 0xa2c8 leaq 0x8a88(%rip), %rsi # 0xa131 movl $0x40, %edx leaq 0x8c80(%rip), %rcx # 0xa335 callq 0x1090 movq 0x9cdf(%rip), %rax # 0xb3a0 movq %rax, -0x2c(%rbp) movl 0x9cdd(%rip), %eax # 0xb3a8 movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi leaq -0x2c(%rbp), %rsi movl $0x3, %edx callq 0x4d80 testb $0x1, %al jne 0x16e6 jmp 0x16e8 jmp 0x1707 leaq 0x8c61(%rip), %rdi # 0xa350 leaq 0x8a3b(%rip), %rsi # 0xa131 movl $0x44, %edx leaq 0x8c33(%rip), %rcx # 0xa335 callq 0x1090 movq -0x10(%rbp), %rax movss (%rax), %xmm0 movss 0x88ed(%rip), %xmm1 # 0xa004 ucomiss %xmm1, %xmm0 jne 0x1750 jp 0x1750 movq -0x10(%rbp), %rax movss 0x4(%rax), %xmm0 movss 0x88d9(%rip), %xmm1 # 0xa008 ucomiss %xmm1, %xmm0 jne 0x1750 jp 0x1750 movq -0x10(%rbp), %rax movss 0x8(%rax), %xmm0 movss 0x88c5(%rip), %xmm1 # 0xa00c ucomiss %xmm1, %xmm0 jne 0x1750 jp 0x1750 jmp 0x176f leaq 0x8c15(%rip), %rdi # 0xa36c leaq 0x89d3(%rip), %rsi # 0xa131 movl $0x45, %edx leaq 0x8bcb(%rip), %rcx # 0xa335 callq 0x1090 movq 0x9d9a(%rip), %rax # 0xb510 movq %rax, -0x50(%rbp) movq 0x9d97(%rip), %rax # 0xb518 movq %rax, -0x48(%rbp) movq 0x9d94(%rip), %rax # 0xb520 movq %rax, -0x40(%rbp) movq 0x9d91(%rip), %rax # 0xb528 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi leaq -0x50(%rbp), %rsi movl $0x4, %edx callq 0x4e60 testb $0x1, %al jne 0x17b3 jmp 0x17b5 jmp 0x17d4 leaq 0x8bf2(%rip), %rdi # 0xa3ae leaq 0x896e(%rip), %rsi # 0xa131 movl $0x48, %edx leaq 0x8b66(%rip), %rcx # 0xa335 callq 0x1090 movq -0x18(%rbp), %rax movsd (%rax), %xmm0 movsd 0x8884(%rip), %xmm1 # 0xa068 ucomisd %xmm1, %xmm0 jne 0x1839 jp 0x1839 movq -0x18(%rbp), %rax movsd 0x8(%rax), %xmm0 movsd 0x8873(%rip), %xmm1 # 0xa070 ucomisd %xmm1, %xmm0 jne 0x1839 jp 0x1839 movq -0x18(%rbp), %rax movsd 0x10(%rax), %xmm0 movsd 0x8862(%rip), %xmm1 # 0xa078 ucomisd %xmm1, %xmm0 jne 0x1839 jp 0x1839 movq -0x18(%rbp), %rax movsd 0x18(%rax), %xmm0 movsd 0x8851(%rip), %xmm1 # 0xa080 ucomisd %xmm1, %xmm0 jne 0x1839 jp 0x1839 jmp 0x1858 leaq 0x8b8a(%rip), %rdi # 0xa3ca leaq 0x88ea(%rip), %rsi # 0xa131 movl $0x49, %edx leaq 0x8ae2(%rip), %rcx # 0xa335 callq 0x1090 movq 0x8829(%rip), %rax # 0xa088 movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rdi leaq -0x58(%rbp), %rsi movl $0x2, %edx callq 0x4f40 testb $0x1, %al jne 0x187b jmp 0x187d jmp 0x189c leaq 0x8b9b(%rip), %rdi # 0xa41f leaq 0x88a6(%rip), %rsi # 0xa131 movl $0x4c, %edx leaq 0x8a9e(%rip), %rcx # 0xa335 callq 0x1090 movq -0x20(%rbp), %rax cmpl $0x1, (%rax) jne 0x18b1 movq -0x20(%rbp), %rax cmpl $0x2, 0x4(%rax) jne 0x18b1 jmp 0x18d0 leaq 0x8b83(%rip), %rdi # 0xa43b leaq 0x8872(%rip), %rsi # 0xa131 movl $0x4d, %edx leaq 0x8a6a(%rip), %rcx # 0xa335 callq 0x1090 movq -0x8(%rbp), %rdi callq 0x4880 leaq 0x8b80(%rip), %rdi # 0xa460 movb $0x0, %al callq 0x1080 addq $0x60, %rsp popq %rbp retq nopl (%rax)
test_vector_set: push rbp mov rbp, rsp sub rsp, 60h lea rdi, aTestingVectorS; "Testing vector setting...\n" mov al, 0 call _printf mov edi, 400h call arena_create mov [rbp+var_8], rax cmp [rbp+var_8], 0 jz short loc_15ED jmp short loc_160C loc_15ED: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 36h ; '6' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_160C: mov rdi, [rbp+var_8] mov esi, 3 call vector_f_create mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_1627 jmp short loc_1646 loc_1627: lea rdi, aVfNull; "vf != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 3Ah ; ':' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_1646: mov rdi, [rbp+var_8] mov esi, 4 call vector_d_create mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_1661 jmp short loc_1680 loc_1661: lea rdi, aVdNull; "vd != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 3Dh ; '=' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_1680: mov rdi, [rbp+var_8] mov esi, 2 call vector_i_create mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz short loc_169B jmp short loc_16BA loc_169B: lea rdi, aViNull; "vi != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 40h ; '@' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_16BA: mov rax, cs:qword_B3A0 mov [rbp+var_2C], rax mov eax, cs:dword_B3A8 mov [rbp+var_24], eax mov rdi, [rbp+var_10] lea rsi, [rbp+var_2C] mov edx, 3 call vector_f_set test al, 1 jnz short loc_16E6 jmp short loc_16E8 loc_16E6: jmp short loc_1707 loc_16E8: lea rdi, aVectorFSetVfFD; "vector_f_set(vf, f_data, 3)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 44h ; 'D' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_1707: mov rax, [rbp+var_10] movss xmm0, dword ptr [rax] movss xmm1, cs:dword_A004 ucomiss xmm0, xmm1 jnz short loc_1750 jp short loc_1750 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+4] movss xmm1, cs:dword_A008 ucomiss xmm0, xmm1 jnz short loc_1750 jp short loc_1750 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+8] movss xmm1, cs:dword_A00C ucomiss xmm0, xmm1 jnz short loc_1750 jp short loc_1750 jmp short loc_176F loc_1750: lea rdi, aVfData010fVfDa; "vf->data[0] == 1.0f && vf->data[1] == 2"... lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 45h ; 'E' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_176F: mov rax, cs:qword_B510 mov [rbp+var_50], rax mov rax, cs:qword_B518 mov [rbp+var_48], rax mov rax, cs:qword_B520 mov [rbp+var_40], rax mov rax, cs:qword_B528 mov [rbp+var_38], rax mov rdi, [rbp+var_18] lea rsi, [rbp+var_50] mov edx, 4 call vector_d_set test al, 1 jnz short loc_17B3 jmp short loc_17B5 loc_17B3: jmp short loc_17D4 loc_17B5: lea rdi, aVectorDSetVdDD; "vector_d_set(vd, d_data, 4)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 48h ; 'H' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_17D4: mov rax, [rbp+var_18] movsd xmm0, qword ptr [rax] movsd xmm1, cs:qword_A068 ucomisd xmm0, xmm1 jnz short loc_1839 jp short loc_1839 mov rax, [rbp+var_18] movsd xmm0, qword ptr [rax+8] movsd xmm1, cs:qword_A070 ucomisd xmm0, xmm1 jnz short loc_1839 jp short loc_1839 mov rax, [rbp+var_18] movsd xmm0, qword ptr [rax+10h] movsd xmm1, cs:qword_A078 ucomisd xmm0, xmm1 jnz short loc_1839 jp short loc_1839 mov rax, [rbp+var_18] movsd xmm0, qword ptr [rax+18h] movsd xmm1, cs:qword_A080 ucomisd xmm0, xmm1 jnz short loc_1839 jp short loc_1839 jmp short loc_1858 loc_1839: lea rdi, aVdData010VdDat; "vd->data[0] == 1.0 && vd->data[1] == 2."... lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 49h ; 'I' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_1858: mov rax, cs:qword_A088 mov [rbp+var_58], rax mov rdi, [rbp+var_20] lea rsi, [rbp+var_58] mov edx, 2 call vector_i_set test al, 1 jnz short loc_187B jmp short loc_187D loc_187B: jmp short loc_189C loc_187D: lea rdi, aVectorISetViID; "vector_i_set(vi, i_data, 2)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 4Ch ; 'L' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_189C: mov rax, [rbp+var_20] cmp dword ptr [rax], 1 jnz short loc_18B1 mov rax, [rbp+var_20] cmp dword ptr [rax+4], 2 jnz short loc_18B1 jmp short loc_18D0 loc_18B1: lea rdi, aViData01ViData; "vi->data[0] == 1 && vi->data[1] == 2" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 4Dh ; 'M' lea rcx, aVoidTestVector_0; "void test_vector_set(void)" call ___assert_fail loc_18D0: mov rdi, [rbp+var_8] call arena_destroy lea rdi, aPassVectorSet; "PASS: vector_set\n" mov al, 0 call _printf add rsp, 60h pop rbp retn
long long test_vector_set(long long a1, long long a2, long long a3) { char v3; // al char v4; // al long long v5; // rdx long long v7; // [rsp+8h] [rbp-58h] BYREF _QWORD v8[4]; // [rsp+10h] [rbp-50h] BYREF long long v9; // [rsp+34h] [rbp-2Ch] BYREF int v10; // [rsp+3Ch] [rbp-24h] _DWORD *v11; // [rsp+40h] [rbp-20h] double *v12; // [rsp+48h] [rbp-18h] float *v13; // [rsp+50h] [rbp-10h] long long v14; // [rsp+58h] [rbp-8h] printf("Testing vector setting...\n", a2, a3); v14 = arena_create(1024LL); if ( !v14 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 54LL, "void test_vector_set(void)"); v13 = (float *)vector_f_create(v14, 3LL); if ( !v13 ) __assert_fail( "vf != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 58LL, "void test_vector_set(void)"); v12 = (double *)vector_d_create(v14, 4LL); if ( !v12 ) __assert_fail( "vd != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 61LL, "void test_vector_set(void)"); v11 = (_DWORD *)vector_i_create(v14, 2LL); if ( !v11 ) __assert_fail( "vi != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 64LL, "void test_vector_set(void)"); v9 = 0x400000003F800000LL; v10 = 1077936128; if ( (vector_f_set(v13, &v9, 3LL) & 1) == 0 ) __assert_fail( "vector_f_set(vf, f_data, 3)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 68LL, "void test_vector_set(void)"); if ( *v13 != 1.0 || v13[1] != 2.0 || v13[2] != 3.0 ) __assert_fail( "vf->data[0] == 1.0f && vf->data[1] == 2.0f && vf->data[2] == 3.0f", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 69LL, "void test_vector_set(void)"); v8[0] = 0x3FF0000000000000LL; v8[1] = 0x4000000000000000LL; v8[2] = 0x4008000000000000LL; v8[3] = 0x4010000000000000LL; v3 = vector_d_set(v12, v8, 4LL); if ( (v3 & 1) == 0 ) __assert_fail( "vector_d_set(vd, d_data, 4)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 72LL, "void test_vector_set(void)"); if ( *v12 != 1.0 || v12[1] != 2.0 || v12[2] != 3.0 || v12[3] != 4.0 ) __assert_fail( "vd->data[0] == 1.0 && vd->data[1] == 2.0 && vd->data[2] == 3.0 && vd->data[3] == 4.0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 73LL, "void test_vector_set(void)"); v7 = 0x200000001LL; v4 = vector_i_set(v11, &v7, 2LL); if ( (v4 & 1) == 0 ) __assert_fail( "vector_i_set(vi, i_data, 2)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 76LL, "void test_vector_set(void)"); if ( *v11 != 1 || v11[1] != 2 ) __assert_fail( "vi->data[0] == 1 && vi->data[1] == 2", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 77LL, "void test_vector_set(void)"); arena_destroy(v14); return printf("PASS: vector_set\n", &v7, v5); }
test_vector_set: PUSH RBP MOV RBP,RSP SUB RSP,0x60 LEA RDI,[0x10a308] MOV AL,0x0 CALL 0x00101080 MOV EDI,0x400 CALL 0x001042a0 MOV qword ptr [RBP + -0x8],RAX CMP qword ptr [RBP + -0x8],0x0 JZ 0x001015ed JMP 0x0010160c LAB_001015ed: LEA RDI,[0x10a1c3] LEA RSI,[0x10a131] MOV EDX,0x36 LEA RCX,[0x10a323] CALL 0x00101090 LAB_0010160c: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x3 CALL 0x001049a0 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00101627 JMP 0x00101646 LAB_00101627: LEA RDI,[0x10a1ef] LEA RSI,[0x10a131] MOV EDX,0x3a LEA RCX,[0x10a323] CALL 0x00101090 LAB_00101646: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x4 CALL 0x00104c00 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00101661 JMP 0x00101680 LAB_00101661: LEA RDI,[0x10a249] LEA RSI,[0x10a131] MOV EDX,0x3d LEA RCX,[0x10a323] CALL 0x00101090 LAB_00101680: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x2 CALL 0x00104cc0 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0010169b JMP 0x001016ba LAB_0010169b: LEA RDI,[0x10a2b6] LEA RSI,[0x10a131] MOV EDX,0x40 LEA RCX,[0x10a323] CALL 0x00101090 LAB_001016ba: MOV RAX,qword ptr [0x0010b380] MOV qword ptr [RBP + -0x2c],RAX MOV EAX,dword ptr [0x0010b388] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x2c] MOV EDX,0x3 CALL 0x00104d80 TEST AL,0x1 JNZ 0x001016e6 JMP 0x001016e8 LAB_001016e6: JMP 0x00101707 LAB_001016e8: LEA RDI,[0x10a33e] LEA RSI,[0x10a131] MOV EDX,0x44 LEA RCX,[0x10a323] CALL 0x00101090 LAB_00101707: MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX] MOVSS XMM1,dword ptr [0x0010a004] UCOMISS XMM0,XMM1 JNZ 0x00101750 JP 0x00101750 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x4] MOVSS XMM1,dword ptr [0x0010a008] UCOMISS XMM0,XMM1 JNZ 0x00101750 JP 0x00101750 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x8] MOVSS XMM1,dword ptr [0x0010a00c] UCOMISS XMM0,XMM1 JNZ 0x00101750 JP 0x00101750 JMP 0x0010176f LAB_00101750: LEA RDI,[0x10a35a] LEA RSI,[0x10a131] MOV EDX,0x45 LEA RCX,[0x10a323] CALL 0x00101090 LAB_0010176f: MOV RAX,qword ptr [0x0010b4f0] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [0x0010b4f8] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [0x0010b500] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [0x0010b508] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x50] MOV EDX,0x4 CALL 0x00104e60 TEST AL,0x1 JNZ 0x001017b3 JMP 0x001017b5 LAB_001017b3: JMP 0x001017d4 LAB_001017b5: LEA RDI,[0x10a39c] LEA RSI,[0x10a131] MOV EDX,0x48 LEA RCX,[0x10a323] CALL 0x00101090 LAB_001017d4: MOV RAX,qword ptr [RBP + -0x18] MOVSD XMM0,qword ptr [RAX] MOVSD XMM1,qword ptr [0x0010a068] UCOMISD XMM0,XMM1 JNZ 0x00101839 JP 0x00101839 MOV RAX,qword ptr [RBP + -0x18] MOVSD XMM0,qword ptr [RAX + 0x8] MOVSD XMM1,qword ptr [0x0010a070] UCOMISD XMM0,XMM1 JNZ 0x00101839 JP 0x00101839 MOV RAX,qword ptr [RBP + -0x18] MOVSD XMM0,qword ptr [RAX + 0x10] MOVSD XMM1,qword ptr [0x0010a078] UCOMISD XMM0,XMM1 JNZ 0x00101839 JP 0x00101839 MOV RAX,qword ptr [RBP + -0x18] MOVSD XMM0,qword ptr [RAX + 0x18] MOVSD XMM1,qword ptr [0x0010a080] UCOMISD XMM0,XMM1 JNZ 0x00101839 JP 0x00101839 JMP 0x00101858 LAB_00101839: LEA RDI,[0x10a3b8] LEA RSI,[0x10a131] MOV EDX,0x49 LEA RCX,[0x10a323] CALL 0x00101090 LAB_00101858: MOV RAX,qword ptr [0x0010a088] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x58] MOV EDX,0x2 CALL 0x00104f40 TEST AL,0x1 JNZ 0x0010187b JMP 0x0010187d LAB_0010187b: JMP 0x0010189c LAB_0010187d: LEA RDI,[0x10a40d] LEA RSI,[0x10a131] MOV EDX,0x4c LEA RCX,[0x10a323] CALL 0x00101090 LAB_0010189c: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x1 JNZ 0x001018b1 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x4],0x2 JNZ 0x001018b1 JMP 0x001018d0 LAB_001018b1: LEA RDI,[0x10a429] LEA RSI,[0x10a131] MOV EDX,0x4d LEA RCX,[0x10a323] CALL 0x00101090 LAB_001018d0: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00104880 LEA RDI,[0x10a44e] MOV AL,0x0 CALL 0x00101080 ADD RSP,0x60 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void test_vector_set(void) { ulong uVar1; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_34; int4 local_2c; int *local_28; double *local_20; float *local_18; long local_10; printf("Testing vector setting...\n"); local_10 = arena_create(0x400); if (local_10 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c" ,0x36,"void test_vector_set(void)"); } local_18 = (float *)vector_f_create(local_10,3); if (local_18 == (float *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("vf != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c", 0x3a,"void test_vector_set(void)"); } local_20 = (double *)vector_d_create(local_10,4); if (local_20 == (double *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("vd != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c", 0x3d,"void test_vector_set(void)"); } local_28 = (int *)vector_i_create(local_10,2); if (local_28 != (int *)0x0) { local_34 = DAT_0010b380; local_2c = DAT_0010b388; uVar1 = vector_f_set(local_18,&local_34,3); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("vector_f_set(vf, f_data, 3)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x44, "void test_vector_set(void)"); } if ((((*local_18 == DAT_0010a004) && (!NAN(*local_18) && !NAN(DAT_0010a004))) && (local_18[1] == DAT_0010a008)) && (!NAN(local_18[1]) && !NAN(DAT_0010a008))) { if ((local_18[2] == DAT_0010a00c) && (!NAN(local_18[2]) && !NAN(DAT_0010a00c))) { local_58 = DAT_0010b4f0; local_50 = DAT_0010b4f8; local_48 = DAT_0010b500; local_40 = _DAT_0010b508; uVar1 = vector_d_set(local_20,&local_58,4); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("vector_d_set(vd, d_data, 4)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x48, "void test_vector_set(void)"); } if (((*local_20 == DAT_0010a068) && (!NAN(*local_20) && !NAN(DAT_0010a068))) && ((local_20[1] == DAT_0010a070 && (((!NAN(local_20[1]) && !NAN(DAT_0010a070) && (local_20[2] == DAT_0010a078)) && (!NAN(local_20[2]) && !NAN(DAT_0010a078))))))) { if ((local_20[3] == DAT_0010a080) && (!NAN(local_20[3]) && !NAN(DAT_0010a080))) { local_60 = DAT_0010a088; uVar1 = vector_i_set(local_28,&local_60,2); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("vector_i_set(vi, i_data, 2)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x4c, "void test_vector_set(void)"); } if ((*local_28 == 1) && (local_28[1] == 2)) { arena_destroy(local_10); printf("PASS: vector_set\n"); return; } /* WARNING: Subroutine does not return */ __assert_fail("vi->data[0] == 1 && vi->data[1] == 2", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x4d, "void test_vector_set(void)"); } } /* WARNING: Subroutine does not return */ __assert_fail("vd->data[0] == 1.0 && vd->data[1] == 2.0 && vd->data[2] == 3.0 && vd->data[3] == 4.0" ,"/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x49, "void test_vector_set(void)"); } } /* WARNING: Subroutine does not return */ __assert_fail("vf->data[0] == 1.0f && vf->data[1] == 2.0f && vf->data[2] == 3.0f", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x45, "void test_vector_set(void)"); } /* WARNING: Subroutine does not return */ __assert_fail("vi != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x40 ,"void test_vector_set(void)"); }
51,543
terminate
untodesu[P]riteg/build_O0/_deps/glfw-src/src/init.c
static void terminate(void) { int i; memset(&_glfw.callbacks, 0, sizeof(_glfw.callbacks)); while (_glfw.windowListHead) glfwDestroyWindow((GLFWwindow*) _glfw.windowListHead); while (_glfw.cursorListHead) glfwDestroyCursor((GLFWcursor*) _glfw.cursorListHead); for (i = 0; i < _glfw.monitorCount; i++) { _GLFWmonitor* monitor = _glfw.monitors[i]; if (monitor->originalRamp.size) _glfwPlatformSetGammaRamp(monitor, &monitor->originalRamp); _glfwFreeMonitor(monitor); } free(_glfw.monitors); _glfw.monitors = NULL; _glfw.monitorCount = 0; free(_glfw.mappings); _glfw.mappings = NULL; _glfw.mappingCount = 0; _glfwTerminateVulkan(); _glfwPlatformTerminate(); _glfw.initialized = GLFW_FALSE; while (_glfw.errorListHead) { _GLFWerror* error = _glfw.errorListHead; _glfw.errorListHead = error->next; free(error); } _glfwPlatformDestroyTls(&_glfw.contextSlot); _glfwPlatformDestroyTls(&_glfw.errorSlot); _glfwPlatformDestroyMutex(&_glfw.errorLock); memset(&_glfw, 0, sizeof(_glfw)); }
O0
c
terminate: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp leaq 0xbe629(%rip), %rdi # 0xe0c68 addq $0x1feb0, %rdi # imm = 0x1FEB0 xorl %esi, %esi movl $0x10, %edx callq 0xc490 leaq 0xbe60f(%rip), %rax # 0xe0c68 cmpq $0x0, 0x3f0(%rax) je 0x22678 leaq 0xbe5fe(%rip), %rax # 0xe0c68 movq 0x3f0(%rax), %rdi callq 0x28710 jmp 0x22652 jmp 0x2267a leaq 0xbe5e7(%rip), %rax # 0xe0c68 cmpq $0x0, 0x3e8(%rax) je 0x226a0 leaq 0xbe5d6(%rip), %rax # 0xe0c68 movq 0x3e8(%rax), %rdi callq 0x23c40 jmp 0x2267a movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax leaq 0xbe5b7(%rip), %rcx # 0xe0c68 cmpl 0x400(%rcx), %eax jge 0x22702 leaq 0xbe5a8(%rip), %rax # 0xe0c68 movq 0x3f8(%rax), %rax movslq -0x4(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x60(%rax) je 0x226ee movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x48, %rsi callq 0x2fc40 movq -0x10(%rbp), %rdi callq 0x26500 movl -0x4(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x226a7 leaq 0xbe55f(%rip), %rax # 0xe0c68 movq 0x3f8(%rax), %rdi callq 0xcb20 leaq 0xbe54c(%rip), %rax # 0xe0c68 movq $0x0, 0x3f8(%rax) leaq 0xbe53a(%rip), %rax # 0xe0c68 movl $0x0, 0x400(%rax) leaq 0xbe529(%rip), %rax # 0xe0c68 movq 0x1fe08(%rax), %rdi callq 0xcb20 leaq 0xbe516(%rip), %rax # 0xe0c68 movq $0x0, 0x1fe08(%rax) leaq 0xbe504(%rip), %rax # 0xe0c68 movl $0x0, 0x1fe10(%rax) callq 0x27910 callq 0x2c970 leaq 0xbe4e9(%rip), %rax # 0xe0c68 movl $0x0, (%rax) leaq 0xbe4dc(%rip), %rax # 0xe0c68 cmpq $0x0, 0x3e0(%rax) je 0x227c8 leaq 0xbe4cb(%rip), %rax # 0xe0c68 movq 0x3e0(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rcx leaq 0xbe4b2(%rip), %rax # 0xe0c68 movq %rcx, 0x3e0(%rax) movq -0x18(%rbp), %rdi callq 0xcb20 jmp 0x22785 leaq 0xbe499(%rip), %rdi # 0xe0c68 addq $0x1fe1c, %rdi # imm = 0x1FE1C callq 0x36750 leaq 0xbe486(%rip), %rdi # 0xe0c68 addq $0x1fe14, %rdi # imm = 0x1FE14 callq 0x36750 leaq 0xbe473(%rip), %rdi # 0xe0c68 addq $0x1fe28, %rdi # imm = 0x1FE28 callq 0x368c0 leaq 0xbe460(%rip), %rdi # 0xe0c68 xorl %esi, %esi movl $0x20990, %edx # imm = 0x20990 callq 0xc490 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
terminate: push rbp mov rbp, rsp sub rsp, 20h lea rdi, _glfw add rdi, 1FEB0h xor esi, esi mov edx, 10h call _memset loc_22652: lea rax, _glfw cmp qword ptr [rax+3F0h], 0 jz short loc_22678 lea rax, _glfw mov rdi, [rax+3F0h] call glfwDestroyWindow jmp short loc_22652 loc_22678: jmp short $+2 loc_2267A: lea rax, _glfw cmp qword ptr [rax+3E8h], 0 jz short loc_226A0 lea rax, _glfw mov rdi, [rax+3E8h] call glfwDestroyCursor jmp short loc_2267A loc_226A0: mov [rbp+var_4], 0 loc_226A7: mov eax, [rbp+var_4] lea rcx, _glfw cmp eax, [rcx+400h] jge short loc_22702 lea rax, _glfw mov rax, [rax+3F8h] movsxd rcx, [rbp+var_4] mov rax, [rax+rcx*8] mov [rbp+var_10], rax mov rax, [rbp+var_10] cmp dword ptr [rax+60h], 0 jz short loc_226EE mov rdi, [rbp+var_10] mov rsi, [rbp+var_10] add rsi, 48h ; 'H' call _glfwPlatformSetGammaRamp loc_226EE: mov rdi, [rbp+var_10] call _glfwFreeMonitor mov eax, [rbp+var_4] add eax, 1 mov [rbp+var_4], eax jmp short loc_226A7 loc_22702: lea rax, _glfw mov rdi, [rax+3F8h] call _free lea rax, _glfw mov qword ptr [rax+3F8h], 0 lea rax, _glfw mov dword ptr [rax+400h], 0 lea rax, _glfw mov rdi, [rax+1FE08h] call _free lea rax, _glfw mov qword ptr [rax+1FE08h], 0 lea rax, _glfw mov dword ptr [rax+1FE10h], 0 call _glfwTerminateVulkan call _glfwPlatformTerminate lea rax, _glfw mov dword ptr [rax], 0 loc_22785: lea rax, _glfw cmp qword ptr [rax+3E0h], 0 jz short loc_227C8 lea rax, _glfw mov rax, [rax+3E0h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, [rax] lea rax, _glfw mov [rax+3E0h], rcx mov rdi, [rbp+var_18] call _free jmp short loc_22785 loc_227C8: lea rdi, _glfw add rdi, 1FE1Ch call _glfwPlatformDestroyTls lea rdi, _glfw add rdi, 1FE14h call _glfwPlatformDestroyTls lea rdi, _glfw add rdi, 1FE28h call _glfwPlatformDestroyMutex lea rdi, _glfw xor esi, esi mov edx, 20990h call _memset add rsp, 20h pop rbp retn
void __noreturn terminate() { _QWORD *v0; // [rsp+8h] [rbp-18h] long long v1; // [rsp+10h] [rbp-10h] int i; // [rsp+1Ch] [rbp-4h] memset(&glfw[32684], 0LL, 16LL); while ( *(_QWORD *)&glfw[252] ) glfwDestroyWindow(*(_QWORD *)&glfw[252]); while ( *(_QWORD *)&glfw[250] ) glfwDestroyCursor(*(_QWORD *)&glfw[250]); for ( i = 0; i < glfw[256]; ++i ) { v1 = *(_QWORD *)(*(_QWORD *)&glfw[254] + 8LL * i); if ( *(_DWORD *)(v1 + 96) ) glfwPlatformSetGammaRamp(v1, v1 + 72); glfwFreeMonitor(v1); } free(*(_QWORD *)&glfw[254]); *(_QWORD *)&glfw[254] = 0LL; glfw[256] = 0; free(*(_QWORD *)&glfw[32642]); *(_QWORD *)&glfw[32642] = 0LL; glfw[32644] = 0; glfwTerminateVulkan(); glfwPlatformTerminate(); glfw[0] = 0; while ( *(_QWORD *)&glfw[248] ) { v0 = *(_QWORD **)&glfw[248]; *(_QWORD *)&glfw[248] = *v0; free(v0); } glfwPlatformDestroyTls(&glfw[32647]); glfwPlatformDestroyTls(&glfw[32645]); glfwPlatformDestroyMutex(&glfw[32650]); memset(glfw, 0LL, 133520LL); }
terminate: PUSH RBP MOV RBP,RSP SUB RSP,0x20 LEA RDI,[0x1e0c68] ADD RDI,0x1feb0 XOR ESI,ESI MOV EDX,0x10 CALL 0x0010c490 LAB_00122652: LEA RAX,[0x1e0c68] CMP qword ptr [RAX + 0x3f0],0x0 JZ 0x00122678 LEA RAX,[0x1e0c68] MOV RDI,qword ptr [RAX + 0x3f0] CALL 0x00128710 JMP 0x00122652 LAB_00122678: JMP 0x0012267a LAB_0012267a: LEA RAX,[0x1e0c68] CMP qword ptr [RAX + 0x3e8],0x0 JZ 0x001226a0 LEA RAX,[0x1e0c68] MOV RDI,qword ptr [RAX + 0x3e8] CALL 0x00123c40 JMP 0x0012267a LAB_001226a0: MOV dword ptr [RBP + -0x4],0x0 LAB_001226a7: MOV EAX,dword ptr [RBP + -0x4] LEA RCX,[0x1e0c68] CMP EAX,dword ptr [RCX + 0x400] JGE 0x00122702 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x3f8] MOVSXD RCX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x60],0x0 JZ 0x001226ee MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x48 CALL 0x0012fc40 LAB_001226ee: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126500 MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x001226a7 LAB_00122702: LEA RAX,[0x1e0c68] MOV RDI,qword ptr [RAX + 0x3f8] CALL 0x0010cb20 LEA RAX,[0x1e0c68] MOV qword ptr [RAX + 0x3f8],0x0 LEA RAX,[0x1e0c68] MOV dword ptr [RAX + 0x400],0x0 LEA RAX,[0x1e0c68] MOV RDI,qword ptr [RAX + 0x1fe08] CALL 0x0010cb20 LEA RAX,[0x1e0c68] MOV qword ptr [RAX + 0x1fe08],0x0 LEA RAX,[0x1e0c68] MOV dword ptr [RAX + 0x1fe10],0x0 CALL 0x00127910 CALL 0x0012c970 LEA RAX,[0x1e0c68] MOV dword ptr [RAX],0x0 LAB_00122785: LEA RAX,[0x1e0c68] CMP qword ptr [RAX + 0x3e0],0x0 JZ 0x001227c8 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x3e0] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] LEA RAX,[0x1e0c68] MOV qword ptr [RAX + 0x3e0],RCX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010cb20 JMP 0x00122785 LAB_001227c8: LEA RDI,[0x1e0c68] ADD RDI,0x1fe1c CALL 0x00136750 LEA RDI,[0x1e0c68] ADD RDI,0x1fe14 CALL 0x00136750 LEA RDI,[0x1e0c68] ADD RDI,0x1fe28 CALL 0x001368c0 LEA RDI,[0x1e0c68] XOR ESI,ESI MOV EDX,0x20990 CALL 0x0010c490 ADD RSP,0x20 POP RBP RET
void terminate(void) { long lVar1; int8 *__ptr; int local_c; memset(&DAT_00200b18,0,0x10); while (DAT_001e1058 != 0) { glfwDestroyWindow(DAT_001e1058); } while (DAT_001e1050 != 0) { glfwDestroyCursor(DAT_001e1050); } for (local_c = 0; local_c < DAT_001e1068; local_c = local_c + 1) { lVar1 = *(long *)((long)DAT_001e1060 + (long)local_c * 8); if (*(int *)(lVar1 + 0x60) != 0) { _glfwPlatformSetGammaRamp(lVar1); } _glfwFreeMonitor(lVar1); } free(DAT_001e1060); DAT_001e1060 = (void *)0x0; DAT_001e1068 = 0; free(DAT_00200a70); DAT_00200a70 = (void *)0x0; DAT_00200a78 = 0; _glfwTerminateVulkan(); _glfwPlatformTerminate(); _glfw = 0; while (__ptr = DAT_001e1048, DAT_001e1048 != (int8 *)0x0) { DAT_001e1048 = (int8 *)*DAT_001e1048; free(__ptr); } _glfwPlatformDestroyTls(&DAT_00200a84); _glfwPlatformDestroyTls(&DAT_00200a7c); _glfwPlatformDestroyMutex(&DAT_00200a90); memset(&_glfw,0,0x20990); return; }
51,544
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad: movq (%rcx), %r9 movq (%r8), %rax cmpq $0x2, %rdx jl 0xc8fe1 pushq %rbp movq %rsp, %rbp pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movq 0x8(%rdi), %rdi movzbl (%rsi), %r10d movzbl 0x1(%rsi), %r11d movq (%rdi,%r10,8), %rbx testq %rbx, %rbx je 0xc8f7d leaq (%r11,%r11,2), %r10 movl 0x8(%rbx,%r10,4), %r10d jmp 0xc8f84 shll $0x8, %r10d orq %r11, %r10 movl %r9d, %r11d andl $0x3f, %r11d addq %rax, %r11 movzbl %r10b, %ebx imulq %r11, %rbx movq %r9, %r11 shlq $0x8, %r11 addq %rbx, %r11 xorq %r9, %r11 movl %r11d, %r9d andl $0x3f, %r9d addq %rax, %r9 addq $0x3, %r9 shrl $0x8, %r10d imulq %r9, %r10 movq %r11, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r11, %r9 addq $0x6, %rax leaq 0x2(%rsi), %r10 cmpq %rdx, %r10 jae 0xc8fdf addq $0x4, %rsi cmpq %rdx, %rsi movq %r10, %rsi jbe 0xc8f60 popq %rbx popq %rbp movq %r9, (%rcx) movq %rax, (%r8) retq
my_hash_sort_ucs2_nopad: mov r9, [rcx] mov rax, [r8] cmp rdx, 2 jl loc_C8FE1 push rbp mov rbp, rsp push rbx add rdx, rsi mov rdi, [rdi+78h] mov rdi, [rdi+8] loc_C8F60: movzx r10d, byte ptr [rsi] movzx r11d, byte ptr [rsi+1] mov rbx, [rdi+r10*8] test rbx, rbx jz short loc_C8F7D lea r10, [r11+r11*2] mov r10d, [rbx+r10*4+8] jmp short loc_C8F84 loc_C8F7D: shl r10d, 8 or r10, r11 loc_C8F84: mov r11d, r9d and r11d, 3Fh add r11, rax movzx ebx, r10b imul rbx, r11 mov r11, r9 shl r11, 8 add r11, rbx xor r11, r9 mov r9d, r11d and r9d, 3Fh add r9, rax add r9, 3 shr r10d, 8 imul r10, r9 mov r9, r11 shl r9, 8 add r9, r10 xor r9, r11 add rax, 6 lea r10, [rsi+2] cmp r10, rdx jnb short loc_C8FDF add rsi, 4 cmp rsi, rdx mov rsi, r10 jbe short loc_C8F60 loc_C8FDF: pop rbx pop rbp loc_C8FE1: mov [rcx], r9 mov [r8], rax retn
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r9 long long result; // rax unsigned long long v7; // rdx long long v8; // rdi long long v9; // r10 long long v10; // r11 long long v11; // rbx unsigned int v12; // r10d long long v13; // rbx bool v14; // cc v5 = *a4; result = *a5; if ( a3 >= 2 ) { v7 = (unsigned long long)&a2[a3]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL); do { v9 = *a2; v10 = a2[1]; v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) v12 = *(_DWORD *)(v11 + 12 * v10 + 8); else v12 = v10 | ((_DWORD)v9 << 8); v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12; v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8) + ((v5 ^ (v13 + (v5 << 8))) << 8)); result += 6LL; if ( (unsigned long long)(a2 + 2) >= v7 ) break; v14 = (unsigned long long)(a2 + 4) <= v7; a2 += 2; } while ( v14 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_ucs2_nopad: MOV R9,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x2 JL 0x001c8fe1 PUSH RBP MOV RBP,RSP PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV RDI,qword ptr [RDI + 0x8] LAB_001c8f60: MOVZX R10D,byte ptr [RSI] MOVZX R11D,byte ptr [RSI + 0x1] MOV RBX,qword ptr [RDI + R10*0x8] TEST RBX,RBX JZ 0x001c8f7d LEA R10,[R11 + R11*0x2] MOV R10D,dword ptr [RBX + R10*0x4 + 0x8] JMP 0x001c8f84 LAB_001c8f7d: SHL R10D,0x8 OR R10,R11 LAB_001c8f84: MOV R11D,R9D AND R11D,0x3f ADD R11,RAX MOVZX EBX,R10B IMUL RBX,R11 MOV R11,R9 SHL R11,0x8 ADD R11,RBX XOR R11,R9 MOV R9D,R11D AND R9D,0x3f ADD R9,RAX ADD R9,0x3 SHR R10D,0x8 IMUL R10,R9 MOV R9,R11 SHL R9,0x8 ADD R9,R10 XOR R9,R11 ADD RAX,0x6 LEA R10,[RSI + 0x2] CMP R10,RDX JNC 0x001c8fdf ADD RSI,0x4 CMP RSI,RDX MOV RSI,R10 JBE 0x001c8f60 LAB_001c8fdf: POP RBX POP RBP LAB_001c8fe1: MOV qword ptr [RCX],R9 MOV qword ptr [R8],RAX RET
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long lVar1; long lVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; ulong uVar6; uVar6 = *param_4; lVar2 = *param_5; if (1 < param_3) { pbVar3 = param_2; do { lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8); if (lVar1 == 0) { uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]); } else { uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc); } uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6; uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6; lVar2 = lVar2 + 6; } while ((pbVar3 + 2 < param_2 + param_3) && (pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3)); } *param_4 = uVar6; *param_5 = lVar2; return; }
51,545
new_sd_ctx
7CodeWizard[P]stablediffusion/stable-diffusion.cpp
sd_ctx_t* new_sd_ctx(const char* model_path_c_str, const char* vae_path_c_str, const char* taesd_path_c_str, const char* lora_model_dir_c_str, bool vae_decode_only, bool vae_tiling, bool free_params_immediately, int n_threads, enum sd_type_t wtype, enum rng_type_t rng_type, enum schedule_t s) { sd_ctx_t* sd_ctx = (sd_ctx_t*)malloc(sizeof(sd_ctx_t)); if (sd_ctx == NULL) { return NULL; } std::string model_path(model_path_c_str); std::string vae_path(vae_path_c_str); std::string taesd_path(taesd_path_c_str); std::string lora_model_dir(lora_model_dir_c_str); sd_ctx->sd = new StableDiffusionGGML(n_threads, vae_decode_only, free_params_immediately, lora_model_dir, rng_type); if (sd_ctx->sd == NULL) { return NULL; } if (!sd_ctx->sd->load_from_file(model_path, vae_path, taesd_path, vae_tiling, (ggml_type)wtype, s)) { delete sd_ctx->sd; sd_ctx->sd = NULL; free(sd_ctx); return NULL; } return sd_ctx; }
O0
cpp
new_sd_ctx: subq $0x198, %rsp # imm = 0x198 movl %r9d, 0x74(%rsp) movl %r8d, %eax movq %rcx, %r8 movl 0x74(%rsp), %ecx movq %r8, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq %rsi, %r8 movq 0x78(%rsp), %rsi movq %rdi, %r9 movq 0x80(%rsp), %rdi movb %al, %dl movl 0x1c0(%rsp), %eax movl 0x1b8(%rsp), %eax movl 0x1b0(%rsp), %eax movl 0x1a8(%rsp), %eax movb 0x1a0(%rsp), %al movq %r9, 0x188(%rsp) movq %r8, 0x180(%rsp) movq %rdi, 0x178(%rsp) movq %rsi, 0x170(%rsp) andb $0x1, %dl movb %dl, 0x16f(%rsp) andb $0x1, %cl movb %cl, 0x16e(%rsp) andb $0x1, %al movb %al, 0x16d(%rsp) movl $0x8, %edi callq 0xba00 movq %rax, 0x160(%rsp) cmpq $0x0, 0x160(%rsp) jne 0x333e6 movq $0x0, 0x190(%rsp) jmp 0x3381e movq 0x188(%rsp), %rax movq %rax, 0x60(%rsp) leaq 0x13f(%rsp), %rdi movq %rdi, 0x68(%rsp) callq 0xbd40 movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx leaq 0x140(%rsp), %rdi callq 0x30260 jmp 0x3341e leaq 0x13f(%rsp), %rdi callq 0xb820 movq 0x180(%rsp), %rax movq %rax, 0x50(%rsp) leaq 0x107(%rsp), %rdi movq %rdi, 0x58(%rsp) callq 0xbd40 movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx leaq 0x108(%rsp), %rdi callq 0x30260 jmp 0x33463 leaq 0x107(%rsp), %rdi callq 0xb820 movq 0x178(%rsp), %rax movq %rax, 0x40(%rsp) leaq 0xdf(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0xbd40 movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx leaq 0xe0(%rsp), %rdi callq 0x30260 jmp 0x334a8 leaq 0xdf(%rsp), %rdi callq 0xb820 movq 0x170(%rsp), %rax movq %rax, 0x30(%rsp) leaq 0xb7(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0xbd40 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx leaq 0xb8(%rsp), %rdi callq 0x30260 jmp 0x334ed leaq 0xb7(%rsp), %rdi callq 0xb820 movl $0x25c0, %edi # imm = 0x25C0 callq 0xb780 movq %rax, 0x28(%rsp) jmp 0x3350b movb $0x1, 0x8f(%rsp) movl 0x1a8(%rsp), %eax movl %eax, 0x20(%rsp) movb 0x16f(%rsp), %al movb %al, 0x26(%rsp) movb 0x16d(%rsp), %al movb %al, 0x27(%rsp) leaq 0x90(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0xb2b0 jmp 0x3354b movl 0x20(%rsp), %esi movq 0x28(%rsp), %rdi movb 0x27(%rsp), %al movb 0x26(%rsp), %cl movl 0x1b8(%rsp), %r9d movzbl %cl, %edx andl $0x1, %edx movzbl %al, %ecx andl $0x1, %ecx leaq 0x90(%rsp), %r8 callq 0x38270 jmp 0x3357f movq 0x28(%rsp), %rcx movb $0x0, 0x8f(%rsp) movq 0x160(%rsp), %rax movq %rcx, (%rax) leaq 0x90(%rsp), %rdi callq 0xbf00 movq 0x160(%rsp), %rax cmpq $0x0, (%rax) jne 0x336da movq $0x0, 0x190(%rsp) movl $0x1, 0x88(%rsp) jmp 0x337b2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) leaq 0x13f(%rsp), %rdi callq 0xb820 jmp 0x3382e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) leaq 0x107(%rsp), %rdi callq 0xb820 jmp 0x3380f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) leaq 0xdf(%rsp), %rdi callq 0xb820 jmp 0x33802 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) leaq 0xb7(%rsp), %rdi callq 0xb820 jmp 0x337f5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) jmp 0x337e8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) jmp 0x336ba movq %rax, %rcx movl %edx, %eax movq %rcx, 0x130(%rsp) movl %eax, 0x12c(%rsp) leaq 0x90(%rsp), %rdi callq 0xbf00 testb $0x1, 0x8f(%rsp) jne 0x336c6 jmp 0x336d5 movq 0x28(%rsp), %rdi movl $0x25c0, %esi # imm = 0x25C0 callq 0xb790 jmp 0x337e8 movq 0x160(%rsp), %rax movq (%rax), %rdi movl 0x1b0(%rsp), %r9d movl 0x1c0(%rsp), %ecx movzbl 0x16e(%rsp), %r8d movq %rsp, %rax movl %ecx, (%rax) andl $0x1, %r8d leaq 0x140(%rsp), %rsi leaq 0x108(%rsp), %rdx leaq 0xe0(%rsp), %rcx callq 0x38630 movb %al, 0x1f(%rsp) jmp 0x33729 movb 0x1f(%rsp), %al testb $0x1, %al jne 0x33797 jmp 0x33733 movq 0x160(%rsp), %rax movq (%rax), %rax movq %rax, 0x10(%rsp) cmpq $0x0, %rax je 0x33762 movq 0x10(%rsp), %rdi callq 0x3a030 movq 0x10(%rsp), %rdi movl $0x25c0, %esi # imm = 0x25C0 callq 0xb790 movq 0x160(%rsp), %rax movq $0x0, (%rax) movq 0x160(%rsp), %rdi callq 0xb900 movq $0x0, 0x190(%rsp) movl $0x1, 0x88(%rsp) jmp 0x337b2 movq 0x160(%rsp), %rax movq %rax, 0x190(%rsp) movl $0x1, 0x88(%rsp) leaq 0xb8(%rsp), %rdi callq 0xbf00 leaq 0xe0(%rsp), %rdi callq 0xbf00 leaq 0x108(%rsp), %rdi callq 0xbf00 leaq 0x140(%rsp), %rdi callq 0xbf00 jmp 0x3381e leaq 0xb8(%rsp), %rdi callq 0xbf00 leaq 0xe0(%rsp), %rdi callq 0xbf00 leaq 0x108(%rsp), %rdi callq 0xbf00 leaq 0x140(%rsp), %rdi callq 0xbf00 jmp 0x3382e movq 0x190(%rsp), %rax addq $0x198, %rsp # imm = 0x198 retq movq 0x130(%rsp), %rdi callq 0xbd30 nopl (%rax,%rax)
new_sd_ctx: sub rsp, 198h mov [rsp+198h+var_124], r9d mov eax, r8d mov r8, rcx mov ecx, [rsp+198h+var_124] mov qword ptr [rsp+198h+var_120], r8; int mov qword ptr [rsp+198h+var_118], rdx; int mov r8, rsi mov rsi, qword ptr [rsp+198h+var_120] mov r9, rdi mov rdi, qword ptr [rsp+198h+var_118] mov dl, al mov eax, dword ptr [rsp+198h+arg_20] mov eax, [rsp+198h+arg_18] mov eax, [rsp+198h+arg_10] mov eax, dword ptr [rsp+198h+arg_8] mov al, [rsp+198h+arg_0] mov qword ptr [rsp+198h+var_10], r9 mov [rsp+198h+var_18], r8 mov [rsp+198h+var_20], rdi mov [rsp+198h+var_28], rsi and dl, 1 mov [rsp+198h+var_29], dl and cl, 1 mov [rsp+198h+var_2A], cl and al, 1 mov [rsp+198h+var_2B], al mov edi, 8 call _malloc mov [rsp+198h+var_38], rax cmp [rsp+198h+var_38], 0 jnz short loc_333E6 mov [rsp+198h+var_8], 0 jmp loc_3381E loc_333E6: mov rax, qword ptr [rsp+198h+var_10] mov qword ptr [rsp+198h+var_138], rax; int lea rdi, [rsp+198h+var_59] mov [rsp+198h+var_130], rdi; FrozenCLIPEmbedderWithCustomWords * call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+198h+var_138] mov rdx, [rsp+198h+var_130] lea rdi, [rsp+198h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3341E: lea rdi, [rsp+198h+var_59] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+198h+var_18] mov [rsp+198h+var_148], rax; __int64 lea rdi, [rsp+198h+var_91] mov qword ptr [rsp+198h+var_140], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+198h+var_148] mov rdx, qword ptr [rsp+198h+var_140] lea rdi, [rsp+198h+var_91+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_33463: lea rdi, [rsp+198h+var_91] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+198h+var_20] mov [rsp+198h+var_158], rax; UNetModel * lea rdi, [rsp+198h+var_B9] mov qword ptr [rsp+198h+var_150], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+198h+var_158] mov rdx, qword ptr [rsp+198h+var_150] lea rdi, [rsp+198h+var_B9+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_334A8: lea rdi, [rsp+198h+var_B9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+198h+var_28] mov [rsp+198h+var_168], rax; void * lea rdi, [rsp+198h+var_E1] mov [rsp+198h+var_160], rdi; AutoEncoderKL * call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+198h+var_168] mov rdx, [rsp+198h+var_160] lea rdi, [rsp+198h+var_E0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_334ED: lea rdi, [rsp+198h+var_E1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov edi, 25C0h; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+198h+var_170], rax; __int64 jmp short $+2 loc_3350B: mov [rsp+198h+var_109], 1 mov eax, dword ptr [rsp+198h+arg_8] mov dword ptr [rsp+198h+var_178], eax; __int64 mov al, [rsp+198h+var_29] mov byte ptr [rsp+198h+var_178+6], al mov al, [rsp+198h+var_2B] mov byte ptr [rsp+198h+var_178+7], al lea rdi, [rsp+198h+var_108] lea rsi, [rsp+198h+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_3354B: mov esi, dword ptr [rsp+198h+var_178] mov rdi, [rsp+198h+var_170]; int mov al, byte ptr [rsp+198h+var_178+7] mov cl, byte ptr [rsp+198h+var_178+6] mov r9d, [rsp+198h+arg_18] movzx edx, cl and edx, 1 movzx ecx, al and ecx, 1 lea r8, [rsp+198h+var_108] call _ZN19StableDiffusionGGMLC2EibbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10rng_type_t; StableDiffusionGGML::StableDiffusionGGML(int,bool,bool,std::string,rng_type_t) jmp short $+2 loc_3357F: mov rcx, [rsp+198h+var_170] mov [rsp+198h+var_109], 0 mov rax, [rsp+198h+var_38] mov [rax], rcx lea rdi, [rsp+198h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+198h+var_38] cmp qword ptr [rax], 0 jnz loc_336DA mov [rsp+198h+var_8], 0 mov [rsp+198h+var_110], 1 jmp loc_337B2 mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax lea rdi, [rsp+arg_137] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_3382E mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax lea rdi, [rsp+arg_FF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_3380F mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax lea rdi, [rsp+arg_D7] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_33802 mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax lea rdi, [rsp+arg_AF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_337F5 mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax jmp loc_337E8 mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax jmp short loc_336BA mov rcx, rax mov eax, edx mov [rsp+arg_128], rcx mov [rsp+arg_124], eax lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_336BA: test [rsp+arg_87], 1 jnz short loc_336C6 jmp short loc_336D5 loc_336C6: mov rdi, [rsp+arg_20]; void * mov esi, 25C0h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_336D5: jmp loc_337E8 loc_336DA: mov rax, [rsp+198h+var_38] mov rdi, [rax] mov r9d, [rsp+198h+arg_10] mov ecx, dword ptr [rsp+198h+arg_20] movzx r8d, [rsp+198h+var_2A] mov rax, rsp mov [rax], ecx and r8d, 1 lea rsi, [rsp+198h+var_58] lea rdx, [rsp+198h+var_91+1] lea rcx, [rsp+198h+var_B9+1] call _ZN19StableDiffusionGGML14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_b9ggml_type10schedule_t; StableDiffusionGGML::load_from_file(std::string const&,std::string const&,std::string const&,bool,ggml_type,schedule_t) mov [rsp+198h+var_179], al jmp short $+2 loc_33729: mov al, [rsp+198h+var_179] test al, 1 jnz short loc_33797 jmp short $+2 loc_33733: mov rax, [rsp+198h+var_38] mov rax, [rax] mov [rsp+198h+var_188], rax cmp rax, 0 jz short loc_33762 mov rdi, [rsp+198h+var_188]; this call _ZN19StableDiffusionGGMLD2Ev; StableDiffusionGGML::~StableDiffusionGGML() mov rdi, [rsp+198h+var_188]; void * mov esi, 25C0h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33762: mov rax, [rsp+198h+var_38] mov qword ptr [rax], 0 mov rdi, [rsp+198h+var_38] call _free mov [rsp+198h+var_8], 0 mov [rsp+198h+var_110], 1 jmp short loc_337B2 loc_33797: mov rax, [rsp+198h+var_38] mov [rsp+198h+var_8], rax mov [rsp+198h+var_110], 1 loc_337B2: lea rdi, [rsp+198h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+198h+var_B9+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+198h+var_91+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+198h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_3381E loc_337E8: lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_337F5: lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_33802: lea rdi, [rsp+arg_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3380F: lea rdi, [rsp+arg_138]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_3382E loc_3381E: mov rax, [rsp+198h+var_8] add rsp, 198h retn loc_3382E: mov rdi, [rsp+arg_128] call __Unwind_Resume
long long * new_sd_ctx( long long a1, long long a2, UNetModel *a3, void *a4, char a5, char a6, char a7, int a8, unsigned int a9, long long a10, int a11) { int v12; // [rsp+0h] [rbp-198h] TinyAutoEncoder *v13; // [rsp+8h] [rbp-190h] StableDiffusionGGML *v14; // [rsp+10h] [rbp-188h] StableDiffusionGGML *v15; // [rsp+10h] [rbp-188h] long long v16; // [rsp+18h] [rbp-180h] long long v17; // [rsp+20h] [rbp-178h] long long v18; // [rsp+28h] [rbp-170h] long long v19; // [rsp+28h] [rbp-170h] void *v20; // [rsp+30h] [rbp-168h] UNetModel *v21; // [rsp+40h] [rbp-158h] long long v22; // [rsp+50h] [rbp-148h] long long v23; // [rsp+60h] [rbp-138h] int v24; // [rsp+70h] [rbp-128h] int v25; // [rsp+78h] [rbp-120h] int v26; // [rsp+80h] [rbp-118h] int v27; // [rsp+88h] [rbp-110h] int v28[6]; // [rsp+90h] [rbp-108h] BYREF long long v29; // [rsp+A8h] [rbp-F0h] char v30; // [rsp+B7h] [rbp-E1h] BYREF _BYTE v31[39]; // [rsp+B8h] [rbp-E0h] BYREF int v32[10]; // [rsp+DFh] [rbp-B9h] BYREF int v33[14]; // [rsp+107h] [rbp-91h] BYREF char v34; // [rsp+13Fh] [rbp-59h] BYREF _BYTE v35[32]; // [rsp+140h] [rbp-58h] BYREF long long *v36; // [rsp+160h] [rbp-38h] char v37; // [rsp+16Dh] [rbp-2Bh] char v38; // [rsp+16Eh] [rbp-2Ah] char v39; // [rsp+16Fh] [rbp-29h] void *v40; // [rsp+170h] [rbp-28h] UNetModel *v41; // [rsp+178h] [rbp-20h] long long v42; // [rsp+180h] [rbp-18h] int v43[2]; // [rsp+188h] [rbp-10h] long long *v44; // [rsp+190h] [rbp-8h] v25 = (int)a4; v26 = (int)a3; *(_QWORD *)v43 = a1; v42 = a2; v41 = a3; v40 = a4; v39 = a5 & 1; v38 = a6 & 1; v37 = a7 & 1; v36 = (long long *)malloc(8LL); if ( !v36 ) return 0LL; v23 = *(_QWORD *)v43; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v35, v23, (long long)&v34); std::allocator<char>::~allocator(&v34); v22 = v42; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v33 + 1, v22, (long long)v33); std::allocator<char>::~allocator(v33); v21 = v41; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v32 + 1, (long long)v21, (long long)v32); std::allocator<char>::~allocator(v32); v20 = v40; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v31, (long long)v20, (long long)&v30); std::allocator<char>::~allocator(&v30); v18 = operator new(0x25C0uLL); LODWORD(v17) = a8; BYTE6(v17) = v39; HIBYTE(v17) = v37; std::string::basic_string(v28, v31); StableDiffusionGGML::StableDiffusionGGML( v18, v12, v13, (long long)v14, v16, v17, v18, v20, (AutoEncoderKL *)&v30, v21, (int)v32, v22, (int)v33, v23, (FrozenCLIPEmbedderWithCustomWords *)&v34, v24, v25, v26, v27, v28[0], v28[2], v28[4], v29); *v36 = v19; std::string::~string(v28); if ( *v36 ) { if ( (StableDiffusionGGML::load_from_file(*v36, v35, (char *)v33 + 1, (char *)v32 + 1, v38 & 1, a9, a11) & 1) != 0 ) { v44 = v36; } else { v15 = (StableDiffusionGGML *)*v36; if ( *v36 ) { StableDiffusionGGML::~StableDiffusionGGML(v15); operator delete(v15, 0x25C0uLL); } *v36 = 0LL; free(v36); v44 = 0LL; } } else { v44 = 0LL; } std::string::~string(v31); std::string::~string((char *)v32 + 1); std::string::~string((char *)v33 + 1); std::string::~string(v35); return v44; }
new_sd_ctx: SUB RSP,0x198 MOV dword ptr [RSP + 0x74],R9D MOV EAX,R8D MOV R8,RCX MOV ECX,dword ptr [RSP + 0x74] MOV qword ptr [RSP + 0x78],R8 MOV qword ptr [RSP + 0x80],RDX MOV R8,RSI MOV RSI,qword ptr [RSP + 0x78] MOV R9,RDI MOV RDI,qword ptr [RSP + 0x80] MOV DL,AL MOV EAX,dword ptr [RSP + 0x1c0] MOV EAX,dword ptr [RSP + 0x1b8] MOV EAX,dword ptr [RSP + 0x1b0] MOV EAX,dword ptr [RSP + 0x1a8] MOV AL,byte ptr [RSP + 0x1a0] MOV qword ptr [RSP + 0x188],R9 MOV qword ptr [RSP + 0x180],R8 MOV qword ptr [RSP + 0x178],RDI MOV qword ptr [RSP + 0x170],RSI AND DL,0x1 MOV byte ptr [RSP + 0x16f],DL AND CL,0x1 MOV byte ptr [RSP + 0x16e],CL AND AL,0x1 MOV byte ptr [RSP + 0x16d],AL MOV EDI,0x8 CALL 0x0010ba00 MOV qword ptr [RSP + 0x160],RAX CMP qword ptr [RSP + 0x160],0x0 JNZ 0x001333e6 MOV qword ptr [RSP + 0x190],0x0 JMP 0x0013381e LAB_001333e6: MOV RAX,qword ptr [RSP + 0x188] MOV qword ptr [RSP + 0x60],RAX LEA RDI,[RSP + 0x13f] MOV qword ptr [RSP + 0x68],RDI CALL 0x0010bd40 MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] LAB_0013340f: LEA RDI,[RSP + 0x140] CALL 0x00130260 JMP 0x0013341e LAB_0013341e: LEA RDI,[RSP + 0x13f] CALL 0x0010b820 MOV RAX,qword ptr [RSP + 0x180] MOV qword ptr [RSP + 0x50],RAX LEA RDI,[RSP + 0x107] MOV qword ptr [RSP + 0x58],RDI CALL 0x0010bd40 MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] LAB_00133454: LEA RDI,[RSP + 0x108] CALL 0x00130260 JMP 0x00133463 LAB_00133463: LEA RDI,[RSP + 0x107] CALL 0x0010b820 MOV RAX,qword ptr [RSP + 0x178] MOV qword ptr [RSP + 0x40],RAX LEA RDI,[RSP + 0xdf] MOV qword ptr [RSP + 0x48],RDI CALL 0x0010bd40 MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_00133499: LEA RDI,[RSP + 0xe0] CALL 0x00130260 JMP 0x001334a8 LAB_001334a8: LEA RDI,[RSP + 0xdf] CALL 0x0010b820 MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0xb7] MOV qword ptr [RSP + 0x38],RDI CALL 0x0010bd40 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LAB_001334de: LEA RDI,[RSP + 0xb8] CALL 0x00130260 JMP 0x001334ed LAB_001334ed: LEA RDI,[RSP + 0xb7] CALL 0x0010b820 LAB_001334fa: MOV EDI,0x25c0 CALL 0x0010b780 MOV qword ptr [RSP + 0x28],RAX JMP 0x0013350b LAB_0013350b: MOV byte ptr [RSP + 0x8f],0x1 MOV EAX,dword ptr [RSP + 0x1a8] MOV dword ptr [RSP + 0x20],EAX MOV AL,byte ptr [RSP + 0x16f] MOV byte ptr [RSP + 0x26],AL MOV AL,byte ptr [RSP + 0x16d] MOV byte ptr [RSP + 0x27],AL LAB_00133534: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0xb8] CALL 0x0010b2b0 JMP 0x0013354b LAB_0013354b: MOV ESI,dword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x28] MOV AL,byte ptr [RSP + 0x27] MOV CL,byte ptr [RSP + 0x26] MOV R9D,dword ptr [RSP + 0x1b8] LAB_00133564: MOVZX EDX,CL AND EDX,0x1 MOVZX ECX,AL AND ECX,0x1 LEA R8,[RSP + 0x90] CALL 0x00138270 JMP 0x0013357f LAB_0013357f: MOV RCX,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0x8f],0x0 MOV RAX,qword ptr [RSP + 0x160] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x90] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x160] CMP qword ptr [RAX],0x0 JNZ 0x001336da MOV qword ptr [RSP + 0x190],0x0 MOV dword ptr [RSP + 0x88],0x1 JMP 0x001337b2 LAB_001336da: MOV RAX,qword ptr [RSP + 0x160] MOV RDI,qword ptr [RAX] MOV R9D,dword ptr [RSP + 0x1b0] MOV ECX,dword ptr [RSP + 0x1c0] MOVZX R8D,byte ptr [RSP + 0x16e] LAB_001336fd: MOV RAX,RSP MOV dword ptr [RAX],ECX AND R8D,0x1 LEA RSI,[RSP + 0x140] LEA RDX,[RSP + 0x108] LEA RCX,[RSP + 0xe0] CALL 0x00138630 LAB_00133723: MOV byte ptr [RSP + 0x1f],AL JMP 0x00133729 LAB_00133729: MOV AL,byte ptr [RSP + 0x1f] TEST AL,0x1 JNZ 0x00133797 JMP 0x00133733 LAB_00133733: MOV RAX,qword ptr [RSP + 0x160] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX CMP RAX,0x0 JZ 0x00133762 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0013a030 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x25c0 CALL 0x0010b790 LAB_00133762: MOV RAX,qword ptr [RSP + 0x160] MOV qword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x160] CALL 0x0010b900 MOV qword ptr [RSP + 0x190],0x0 MOV dword ptr [RSP + 0x88],0x1 JMP 0x001337b2 LAB_00133797: MOV RAX,qword ptr [RSP + 0x160] MOV qword ptr [RSP + 0x190],RAX MOV dword ptr [RSP + 0x88],0x1 LAB_001337b2: LEA RDI,[RSP + 0xb8] CALL 0x0010bf00 LEA RDI,[RSP + 0xe0] CALL 0x0010bf00 LEA RDI,[RSP + 0x108] CALL 0x0010bf00 LEA RDI,[RSP + 0x140] CALL 0x0010bf00 JMP 0x0013381e LAB_0013381e: MOV RAX,qword ptr [RSP + 0x190] ADD RSP,0x198 RET
long * new_sd_ctx(char *param_1,char *param_2,char *param_3,char *param_4,byte param_5,byte param_6, byte param_7,int4 param_8,int4 param_9,int4 param_10, int4 param_11) { byte bVar1; char *pcVar2; byte bVar3; StableDiffusionGGML *pSVar4; string local_108 [39]; allocator local_e1; string local_e0 [39]; allocator local_b9; string local_b8 [39]; allocator local_91; string local_90 [55]; allocator local_59; string local_58 [32]; long *local_38; byte local_2b; byte local_2a; byte local_29; char *local_28; char *local_20; char *local_18; char *local_10; long *local_8; local_29 = param_5 & 1; local_2a = param_6 & 1; local_2b = param_7 & 1; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_38 = (long *)malloc(8); pcVar2 = local_10; if (local_38 == (long *)0x0) { local_8 = (long *)0x0; } else { std::allocator<char>::allocator(); /* try { // try from 0013340f to 0013341b has its CatchHandler @ 001335d2 */ std::__cxx11::string::string<std::allocator<char>>(local_58,pcVar2,&local_59); std::allocator<char>::~allocator((allocator<char> *)&local_59); pcVar2 = local_18; std::allocator<char>::allocator(); /* try { // try from 00133454 to 00133460 has its CatchHandler @ 001335f8 */ std::__cxx11::string::string<std::allocator<char>>(local_90,pcVar2,&local_91); std::allocator<char>::~allocator((allocator<char> *)&local_91); pcVar2 = local_20; std::allocator<char>::allocator(); /* try { // try from 00133499 to 001334a5 has its CatchHandler @ 0013361e */ std::__cxx11::string::string<std::allocator<char>>(local_b8,pcVar2,&local_b9); std::allocator<char>::~allocator((allocator<char> *)&local_b9); pcVar2 = local_28; std::allocator<char>::allocator(); /* try { // try from 001334de to 001334ea has its CatchHandler @ 00133644 */ std::__cxx11::string::string<std::allocator<char>>(local_e0,pcVar2,&local_e1); std::allocator<char>::~allocator((allocator<char> *)&local_e1); /* try { // try from 001334fa to 00133503 has its CatchHandler @ 0013366a */ pSVar4 = (StableDiffusionGGML *)operator_new(0x25c0); bVar1 = local_29; bVar3 = local_2b; /* try { // try from 00133534 to 00133548 has its CatchHandler @ 00133683 */ std::__cxx11::string::string(local_108,local_e0); /* try { // try from 00133564 to 0013357c has its CatchHandler @ 00133699 */ StableDiffusionGGML::StableDiffusionGGML(pSVar4,param_8,bVar1 & 1,bVar3 & 1,local_108,param_10); *local_38 = (long)pSVar4; std::__cxx11::string::~string(local_108); if (*local_38 == 0) { local_8 = (long *)0x0; } else { /* try { // try from 001336fd to 00133722 has its CatchHandler @ 0013366a */ bVar3 = StableDiffusionGGML::load_from_file ((StableDiffusionGGML *)*local_38,local_58,local_90,local_b8,local_2a & 1, param_9,param_11); if ((bVar3 & 1) == 0) { pSVar4 = (StableDiffusionGGML *)*local_38; if (pSVar4 != (StableDiffusionGGML *)0x0) { StableDiffusionGGML::~StableDiffusionGGML(pSVar4); operator_delete(pSVar4,0x25c0); } *local_38 = 0; free(local_38); local_8 = (long *)0x0; } else { local_8 = local_38; } } std::__cxx11::string::~string(local_e0); std::__cxx11::string::~string(local_b8); std::__cxx11::string::~string(local_90); std::__cxx11::string::~string(local_58); } return local_8; }
51,546
new_sd_ctx
7CodeWizard[P]stablediffusion/stable-diffusion.cpp
sd_ctx_t* new_sd_ctx(const char* model_path_c_str, const char* vae_path_c_str, const char* taesd_path_c_str, const char* lora_model_dir_c_str, bool vae_decode_only, bool vae_tiling, bool free_params_immediately, int n_threads, enum sd_type_t wtype, enum rng_type_t rng_type, enum schedule_t s) { sd_ctx_t* sd_ctx = (sd_ctx_t*)malloc(sizeof(sd_ctx_t)); if (sd_ctx == NULL) { return NULL; } std::string model_path(model_path_c_str); std::string vae_path(vae_path_c_str); std::string taesd_path(taesd_path_c_str); std::string lora_model_dir(lora_model_dir_c_str); sd_ctx->sd = new StableDiffusionGGML(n_threads, vae_decode_only, free_params_immediately, lora_model_dir, rng_type); if (sd_ctx->sd == NULL) { return NULL; } if (!sd_ctx->sd->load_from_file(model_path, vae_path, taesd_path, vae_tiling, (ggml_type)wtype, s)) { delete sd_ctx->sd; sd_ctx->sd = NULL; free(sd_ctx); return NULL; } return sd_ctx; }
O3
cpp
new_sd_ctx: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movl %r9d, 0x14(%rsp) movl %r8d, %r15d movq %rcx, %r14 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbp movl $0x8, %edi callq 0xa7b0 testq %rax, %rax je 0x30297 movq %rax, %rbx leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rdx movq %rbp, %rsi callq 0x2e2fe leaq 0x78(%rsp), %rdi leaq 0x58(%rsp), %rdx movq %r13, %rsi callq 0x2e2fe leaq 0x58(%rsp), %rdi leaq 0x18(%rsp), %rdx movq %r12, %rsi callq 0x2e2fe leaq 0x18(%rsp), %rdi leaq 0x13(%rsp), %rdx movq %r14, %rsi callq 0x2e2fe movl $0x25c0, %edi # imm = 0x25C0 callq 0xa5c0 movq %rax, %r14 leaq 0x48(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx addq %rsi, %rdx leaq 0x38(%rsp), %rdi callq 0x2ebc4 movl 0x108(%rsp), %r9d movl 0xf8(%rsp), %esi movzbl %r15b, %edx movzbl 0xf0(%rsp), %ecx leaq 0x38(%rsp), %r8 movq %r14, %rdi callq 0x325a0 movl 0x110(%rsp), %ebp movl 0x100(%rsp), %r15d movq %r14, (%rbx) movq 0x38(%rsp), %rdi cmpq %r12, %rdi je 0x301d4 movq 0x48(%rsp), %rsi incq %rsi callq 0xa5d0 movl %ebp, (%rsp) movzbl 0x14(%rsp), %r8d leaq 0x98(%rsp), %rsi leaq 0x78(%rsp), %rdx leaq 0x58(%rsp), %rcx movq %r14, %rdi movl %r15d, %r9d callq 0x3290e testb %al, %al jne 0x3021d movq %r14, %rdi callq 0x33b90 movl $0x25c0, %esi # imm = 0x25C0 movq %r14, %rdi callq 0xa5d0 movq %rbx, %rdi callq 0xa6f0 xorl %ebx, %ebx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30238 movq 0x28(%rsp), %rsi incq %rsi callq 0xa5d0 leaq 0x68(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30253 movq 0x68(%rsp), %rsi incq %rsi callq 0xa5d0 leaq 0x88(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30274 movq 0x88(%rsp), %rsi incq %rsi callq 0xa5d0 leaq 0xa8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30299 movq 0xa8(%rsp), %rsi incq %rsi callq 0xa5d0 jmp 0x30299 xorl %ebx, %ebx movq %rbx, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x38(%rsp), %rdi cmpq %r12, %rdi je 0x302cd movq 0x48(%rsp), %rsi incq %rsi callq 0xa5d0 jmp 0x302cd movq %rax, %rbx movl $0x25c0, %esi # imm = 0x25C0 movq %r14, %rdi callq 0xa5d0 jmp 0x302ee movq %rax, %rbx jmp 0x30309 movq %rax, %rbx jmp 0x30324 movq %rax, %rbx jmp 0x30345 movq %rax, %rbx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30309 movq 0x28(%rsp), %rsi incq %rsi callq 0xa5d0 leaq 0x68(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30324 movq 0x68(%rsp), %rsi incq %rsi callq 0xa5d0 leaq 0x88(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30345 movq 0x88(%rsp), %rsi incq %rsi callq 0xa5d0 leaq 0xa8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30366 movq 0xa8(%rsp), %rsi incq %rsi callq 0xa5d0 movq %rbx, %rdi callq 0xaad0
new_sd_ctx: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rsp+0E8h+var_D4], r9d mov r15d, r8d mov r14, rcx mov r12, rdx mov r13, rsi mov rbp, rdi mov edi, 8 call _malloc test rax, rax jz loc_30297 mov rbx, rax lea rdi, [rsp+0E8h+var_50] lea rdx, [rsp+0E8h+var_70] mov rsi, rbp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0E8h+var_70] lea rdx, [rsp+0E8h+var_90] mov rsi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0E8h+var_90] lea rdx, [rsp+0E8h+var_D0] mov rsi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0E8h+var_D0] lea rdx, [rsp+0E8h+var_D5] mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov edi, 25C0h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea r12, [rsp+0E8h+var_A0] mov [r12-10h], r12 mov rsi, [rsp+0E8h+var_D0] mov rdx, [rsp+0E8h+var_C8] add rdx, rsi lea rdi, [rsp+0E8h+var_B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov r9d, [rsp+0E8h+arg_18] mov esi, [rsp+0E8h+arg_8] movzx edx, r15b movzx ecx, [rsp+0E8h+arg_0] lea r8, [rsp+0E8h+var_B0] mov rdi, r14 call _ZN19StableDiffusionGGMLC2EibbNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE10rng_type_t; StableDiffusionGGML::StableDiffusionGGML(int,bool,bool,std::string,rng_type_t) mov ebp, dword ptr [rsp+0E8h+arg_20] mov r15d, [rsp+0E8h+arg_10] mov [rbx], r14 mov rdi, [rsp+0E8h+var_B0]; void * cmp rdi, r12 jz short loc_301D4 mov rsi, [rsp+0E8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_301D4: mov [rsp+0E8h+var_E8], ebp movzx r8d, byte ptr [rsp+0E8h+var_D4] lea rsi, [rsp+0E8h+var_50] lea rdx, [rsp+0E8h+var_70] lea rcx, [rsp+0E8h+var_90] mov rdi, r14 mov r9d, r15d call _ZN19StableDiffusionGGML14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_b9ggml_type10schedule_t; StableDiffusionGGML::load_from_file(std::string const&,std::string const&,std::string const&,bool,ggml_type,schedule_t) test al, al jnz short loc_3021D mov rdi, r14; this call _ZN19StableDiffusionGGMLD2Ev; StableDiffusionGGML::~StableDiffusionGGML() mov esi, 25C0h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call _free xor ebx, ebx loc_3021D: lea rax, [rsp+0E8h+var_C0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30238 mov rsi, [rsp+0E8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30238: lea rax, [rsp+0E8h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30253 mov rsi, [rsp+0E8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30253: lea rax, [rsp+0E8h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30274 mov rsi, [rsp+0E8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30274: lea rax, [rsp+0E8h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30299 mov rsi, [rsp+0E8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_30299 loc_30297: xor ebx, ebx loc_30299: mov rax, rbx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_30]; void * cmp rdi, r12 jz short loc_302CD mov rsi, [rsp+arg_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_302CD mov rbx, rax loc_302CD: mov esi, 25C0h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_302EE mov rbx, rax jmp short loc_30309 mov rbx, rax jmp short loc_30324 mov rbx, rax jmp short loc_30345 mov rbx, rax loc_302EE: lea rax, [rsp+arg_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30309 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30309: lea rax, [rsp+arg_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30324 mov rsi, [rsp+arg_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30324: lea rax, [rsp+arg_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30345 mov rsi, [rsp+arg_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30345: lea rax, [rsp+arg_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30366 mov rsi, [rsp+arg_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30366: mov rdi, rbx call __Unwind_Resume
_QWORD * new_sd_ctx( long long a1, long long a2, long long a3, long long a4, unsigned __int8 a5, unsigned __int8 a6, unsigned __int8 a7, unsigned int a8, unsigned int a9, unsigned int a10, long long a11) { long long v14; // rax _QWORD *v15; // rbx StableDiffusionGGML *v16; // r14 void *v19[2]; // [rsp+18h] [rbp-D0h] BYREF long long v20; // [rsp+28h] [rbp-C0h] BYREF void *v21[2]; // [rsp+38h] [rbp-B0h] BYREF _QWORD v22[2]; // [rsp+48h] [rbp-A0h] BYREF void *v23[2]; // [rsp+58h] [rbp-90h] BYREF long long v24; // [rsp+68h] [rbp-80h] BYREF void *v25[2]; // [rsp+78h] [rbp-70h] BYREF long long v26; // [rsp+88h] [rbp-60h] BYREF void *v27[2]; // [rsp+98h] [rbp-50h] BYREF long long v28; // [rsp+A8h] [rbp-40h] BYREF v14 = malloc(8LL); if ( !v14 ) return 0LL; v15 = (_QWORD *)v14; std::string::basic_string<std::allocator<char>>(v27, a1); std::string::basic_string<std::allocator<char>>(v25, a2); std::string::basic_string<std::allocator<char>>(v23, a3); std::string::basic_string<std::allocator<char>>(v19, a4); v16 = (StableDiffusionGGML *)operator new(0x25C0uLL); v21[0] = v22; std::string::_M_construct<char *>((long long)v21, (_BYTE *)v19[0], (long long)v19[0] + (unsigned long long)v19[1]); StableDiffusionGGML::StableDiffusionGGML(v16, a8, a5, a7, v21, a10); *v15 = v16; if ( v21[0] != v22 ) operator delete(v21[0], v22[0] + 1LL); if ( !(unsigned __int8)StableDiffusionGGML::load_from_file(v16, v27, v25, v23, a6, a9, a11) ) { StableDiffusionGGML::~StableDiffusionGGML(v16); operator delete(v16, 0x25C0uLL); free(v15); v15 = 0LL; } if ( v19[0] != &v20 ) operator delete(v19[0], v20 + 1); if ( v23[0] != &v24 ) operator delete(v23[0], v24 + 1); if ( v25[0] != &v26 ) operator delete(v25[0], v26 + 1); if ( v27[0] != &v28 ) operator delete(v27[0], v28 + 1); return v15; }
51,547
aimrt::executor::ExecutorRef::Now() const
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_module_cpp_interface/../aimrt_module_cpp_interface/executor/executor.h
std::chrono::system_clock::time_point Now() const { AIMRT_ASSERT(base_ptr_, "Reference is null."); return common::util::GetTimePointFromTimestampNs(base_ptr_->now(base_ptr_->impl)); }
O3
c
aimrt::executor::ExecutorRef::Now() const: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq (%rdi), %rax testq %rax, %rax je 0x462a3 movq 0x40(%rax), %rdi addq $0x30, %rsp popq %rbx popq %r14 popq %r15 jmpq *0x30(%rax) movl $0x28, %edi callq 0x2c800 movq %rax, %rbx leaq 0x11b362(%rip), %rsi # 0x161619 movq %rsp, %rdi leaq 0x20(%rsp), %r8 movl $0x12, %edx xorl %ecx, %ecx callq 0x34203 leaq 0x1c2616(%rip), %rax # 0x2088e8 movq %rax, (%rbx) movq %rbx, %rax addq $0x18, %rax movq %rax, 0x8(%rbx) leaq 0x10(%rsp), %r15 movq -0x10(%r15), %rcx cmpq %r15, %rcx jne 0x462f7 movups (%r15), %xmm0 movups %xmm0, (%rax) jmp 0x46304 movq %rcx, 0x8(%rbx) movq 0x10(%rsp), %rax movq %rax, 0x18(%rbx) movq 0x8(%rsp), %rax movq %rax, 0x10(%rbx) movq %r15, (%rsp) movq $0x0, 0x8(%rsp) movb $0x0, 0x10(%rsp) leaq 0x1c245a(%rip), %rsi # 0x208780 leaq -0x12159(%rip), %rdx # 0x341d4 movq %rbx, %rdi callq 0x2e0f0 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x4635b movq 0x10(%rsp), %rsi incq %rsi callq 0x2d2d0 jmp 0x4635b movq %rax, %r14 movq %rbx, %rdi callq 0x2cc80 movq %r14, %rdi callq 0x2e220 nop
_ZNK5aimrt8executor11ExecutorRef3NowEv: push r15 push r14 push rbx sub rsp, 30h mov rax, [rdi] test rax, rax jz short loc_462A3 mov rdi, [rax+40h] add rsp, 30h pop rbx pop r14 pop r15 jmp qword ptr [rax+30h] loc_462A3: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aReferenceIsNul; "Reference is null." mov rdi, rsp; int lea r8, [rsp+48h+var_28]; int mov edx, 12h; int xor ecx, ecx; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) lea rax, off_2088E8 mov [rbx], rax mov rax, rbx add rax, 18h mov [rbx+8], rax lea r15, [rsp+48h+var_38] mov rcx, [r15-10h] cmp rcx, r15 jnz short loc_462F7 movups xmm0, xmmword ptr [r15] movups xmmword ptr [rax], xmm0 jmp short loc_46304 loc_462F7: mov [rbx+8], rcx mov rax, [rsp+48h+var_38] mov [rbx+18h], rax loc_46304: mov rax, [rsp+48h+var_40] mov [rbx+10h], rax mov [rsp+48h+var_48], r15 mov [rsp+48h+var_40], 0 mov byte ptr [rsp+48h+var_38], 0 lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+48h+var_48]; void * cmp rdi, r15 jz short loc_4635B mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4635B mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception loc_4635B: mov rdi, r14 call __Unwind_Resume
long long aimrt::executor::ExecutorRef::Now(aimrt::executor::ExecutorRef *this) { char *exception; // rbx void *v3; // [rsp+0h] [rbp-48h] BYREF long long v4; // [rsp+8h] [rbp-40h] __int128 v5; // [rsp+10h] [rbp-38h] BYREF if ( !*(_QWORD *)this ) { exception = (char *)__cxa_allocate_exception(0x28uLL); fmt::v10::vformat[abi:cxx11](&v3); *(_QWORD *)exception = off_2088E8; *((_QWORD *)exception + 1) = exception + 24; if ( v3 == &v5 ) { *(_OWORD *)(exception + 24) = v5; } else { *((_QWORD *)exception + 1) = v3; *((_QWORD *)exception + 3) = v5; } *((_QWORD *)exception + 2) = v4; v3 = &v5; v4 = 0LL; LOBYTE(v5) = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException, (void (*)(void *))aimrt::common::util::AimRTException::~AimRTException); } return (*(long long ( **)(_QWORD))(*(_QWORD *)this + 48LL))(*(_QWORD *)(*(_QWORD *)this + 64LL)); }
Now: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001462a3 MOV RDI,qword ptr [RAX + 0x40] ADD RSP,0x30 POP RBX POP R14 POP R15 JMP qword ptr [RAX + 0x30] LAB_001462a3: MOV EDI,0x28 CALL 0x0012c800 MOV RBX,RAX LAB_001462b0: LEA RSI,[0x261619] MOV RDI,RSP LEA R8,[RSP + 0x20] MOV EDX,0x12 XOR ECX,ECX CALL 0x00134203 LEA RAX,[0x3088e8] MOV qword ptr [RBX],RAX MOV RAX,RBX ADD RAX,0x18 MOV qword ptr [RBX + 0x8],RAX LEA R15,[RSP + 0x10] MOV RCX,qword ptr [R15 + -0x10] CMP RCX,R15 JNZ 0x001462f7 MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RAX],XMM0 JMP 0x00146304 LAB_001462f7: MOV qword ptr [RBX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x18],RAX LAB_00146304: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RSP],R15 MOV qword ptr [RSP + 0x8],0x0 MOV byte ptr [RSP + 0x10],0x0 LAB_0014631f: LEA RSI,[0x308780] LEA RDX,[0x1341d4] MOV RDI,RBX CALL 0x0012e0f0
/* aimrt::executor::ExecutorRef::Now() const */ void __thiscall aimrt::executor::ExecutorRef::Now(ExecutorRef *this) { long lVar1; int8 *puVar2; uint *local_48; int8 local_40; uint local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; int1 local_28 [16]; lVar1 = *(long *)this; if (lVar1 != 0) { /* WARNING: Could not recover jumptable at 0x001462a0. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 0x30))(*(int8 *)(lVar1 + 0x40)); return; } puVar2 = (int8 *)__cxa_allocate_exception(0x28); /* try { // try from 001462b0 to 001462ca has its CatchHandler @ 00146350 */ fmt::v10::vformat_abi_cxx11_(&local_48,"Reference is null.",0x12,0,local_28); *puVar2 = &PTR__AimRTException_003088e8; puVar2[1] = puVar2 + 3; if (local_48 == &local_38) { *(uint *)(puVar2 + 3) = local_38; *(int4 *)((long)puVar2 + 0x1c) = uStack_34; *(int4 *)(puVar2 + 4) = uStack_30; *(int4 *)((long)puVar2 + 0x24) = uStack_2c; } else { puVar2[1] = local_48; puVar2[3] = CONCAT44(uStack_34,local_38); } puVar2[2] = local_40; local_40 = 0; local_38 = local_38 & 0xffffff00; local_48 = &local_38; /* try { // try from 0014631f to 00146334 has its CatchHandler @ 00146335 */ /* WARNING: Subroutine does not return */ __cxa_throw(puVar2,&common::util::AimRTException::typeinfo, common::util::AimRTException::~AimRTException); }
51,548
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static ggml_type kv_cache_type_from_str(const std::string & s) { for (const auto & type : kv_cache_types) { if (ggml_type_name(type) == s) { return type; } } throw std::runtime_error("Unsupported cache type: " + s); }
O1
cpp
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0xdf0bc(%rip), %r12 # 0x12fd68 movq 0xdf0bd(%rip), %r15 # 0x12fd70 cmpq %r15, %r12 sete %r14b je 0x50d0d movl (%r12), %edi callq 0x1b830 movq %rbx, %rdi movq %rax, %rsi callq 0x1b230 movl (%r12), %ebp testl %eax, %eax je 0x50d0d addq $0x4, %r12 cmpq %r15, %r12 sete %r14b je 0x50d0d movl (%r12), %edi callq 0x1b830 movq %rbx, %rdi movq %rax, %rsi callq 0x1b230 leaq 0x4(%r12), %rcx testl %eax, %eax jne 0x50d06 movl (%r12), %ebp movq %rcx, %r12 jne 0x50cdc jmp 0x50d0d testb %r14b, %r14b jne 0x50d21 movl %ebp, %eax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %r14 leaq 0x9f38d(%rip), %rsi # 0xf00c2 movq %rsp, %rdi movq %rbx, %rdx callq 0x54775 movb $0x1, %bpl movq %rsp, %rsi movq %r14, %rdi callq 0x1be50 xorl %ebp, %ebp movq 0xde299(%rip), %rsi # 0x12eff0 movq 0xde202(%rip), %rdx # 0x12ef60 movq %r14, %rdi callq 0x1bf40 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x50d8c movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8d0 jmp 0x50d8c movq %rax, %rbx movb $0x1, %bpl testb %bpl, %bpl je 0x50d99 movq %r14, %rdi callq 0x1b680 movq %rbx, %rdi callq 0x1bfc0 nop
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov rbx, rdi mov r12, cs:_ZL14kv_cache_types; kv_cache_types mov r15, cs:qword_12FD70 cmp r12, r15 setz r14b jz short loc_50D0D mov edi, [r12] call _ggml_type_name mov rdi, rbx mov rsi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) mov ebp, [r12] test eax, eax jz short loc_50D0D add r12, 4 loc_50CDC: cmp r12, r15 setz r14b jz short loc_50D0D mov edi, [r12] call _ggml_type_name mov rdi, rbx mov rsi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) lea rcx, [r12+4] test eax, eax jnz short loc_50D06 mov ebp, [r12] loc_50D06: mov r12, rcx jnz short loc_50CDC jmp short $+2 loc_50D0D: test r14b, r14b jnz short loc_50D21 mov eax, ebp add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_50D21: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aUnsupportedCac; "Unsupported cache type: " mov rdi, rsp mov rdx, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 mov rsi, rsp mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_50D8C mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_50D8C mov rbx, rax mov bpl, 1 loc_50D8C: test bpl, bpl jz short loc_50D99 mov rdi, r14; void * call ___cxa_free_exception loc_50D99: mov rdi, rbx call __Unwind_Resume
long long kv_cache_type_from_str(long long a1) { unsigned int v1; // ebp unsigned int *v2; // r12 long long v3; // r15 bool v4; // r14 long long v5; // rax int v6; // eax unsigned int *v7; // r12 long long v8; // rax int v9; // eax void *exception; // r14 _BYTE v12[16]; // [rsp+0h] [rbp-48h] BYREF v2 = (unsigned int *)kv_cache_types; v3 = qword_12FD70; v4 = kv_cache_types == qword_12FD70; if ( kv_cache_types != qword_12FD70 ) { v5 = ggml_type_name(*(unsigned int *)kv_cache_types); v6 = std::string::compare(a1, v5); v1 = *v2; if ( v6 ) { v7 = v2 + 1; do { v4 = v7 == (unsigned int *)v3; if ( v7 == (unsigned int *)v3 ) break; v8 = ggml_type_name(*v7); v9 = std::string::compare(a1, v8); if ( !v9 ) v1 = *v7; ++v7; } while ( v9 ); } } if ( v4 ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>(v12, "Unsupported cache type: ", a1); std::runtime_error::runtime_error(exception, v12); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return v1; }
kv_cache_type_from_str: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV R12,qword ptr [0x0022fd68] MOV R15,qword ptr [0x0022fd70] CMP R12,R15 SETZ R14B JZ 0x00150d0d MOV EDI,dword ptr [R12] CALL 0x0011b830 MOV RDI,RBX MOV RSI,RAX CALL 0x0011b230 MOV EBP,dword ptr [R12] TEST EAX,EAX JZ 0x00150d0d ADD R12,0x4 LAB_00150cdc: CMP R12,R15 SETZ R14B JZ 0x00150d0d MOV EDI,dword ptr [R12] CALL 0x0011b830 MOV RDI,RBX MOV RSI,RAX CALL 0x0011b230 LEA RCX,[R12 + 0x4] TEST EAX,EAX JNZ 0x00150d06 MOV EBP,dword ptr [R12] LAB_00150d06: MOV R12,RCX JNZ 0x00150cdc JMP 0x00150d0d LAB_00150d0d: TEST R14B,R14B JNZ 0x00150d21 MOV EAX,EBP ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00150d21: MOV EDI,0x10 CALL 0x0011b450 MOV R14,RAX LAB_00150d2e: LEA RSI,[0x1f00c2] MOV RDI,RSP MOV RDX,RBX CALL 0x00154775 MOV BPL,0x1 LAB_00150d43: MOV RSI,RSP MOV RDI,R14 CALL 0x0011be50 XOR EBP,EBP MOV RSI,qword ptr [0x0022eff0] MOV RDX,qword ptr [0x0022ef60] MOV RDI,R14 CALL 0x0011bf40
/* kv_cache_type_from_str(std::__cxx11::string const&) */ int4 kv_cache_type_from_str(string *param_1) { int4 *puVar1; int iVar2; runtime_error *this; int4 unaff_EBP; int4 *puVar3; bool bVar4; string asStack_48 [32]; puVar1 = DAT_0022fd70; puVar3 = kv_cache_types; bVar4 = kv_cache_types == DAT_0022fd70; if (!bVar4) { ggml_type_name(*kv_cache_types); iVar2 = std::__cxx11::string::compare((char *)param_1); unaff_EBP = *puVar3; if (iVar2 != 0) { do { puVar3 = puVar3 + 1; bVar4 = puVar3 == puVar1; if (bVar4) goto LAB_00150d0d; ggml_type_name(*puVar3); iVar2 = std::__cxx11::string::compare((char *)param_1); } while (iVar2 != 0); unaff_EBP = *puVar3; } } LAB_00150d0d: if (!bVar4) { return unaff_EBP; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00150d2e to 00150d3f has its CatchHandler @ 00150d86 */ std::operator+((char *)asStack_48,(string *)"Unsupported cache type: "); /* try { // try from 00150d43 to 00150d65 has its CatchHandler @ 00150d66 */ std::runtime_error::runtime_error(this,asStack_48); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60); }
51,549
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static ggml_type kv_cache_type_from_str(const std::string & s) { for (const auto & type : kv_cache_types) { if (ggml_type_name(type) == s) { return type; } } throw std::runtime_error("Unsupported cache type: " + s); }
O2
cpp
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq 0xc822a(%rip), %rbx # 0xfed98 movq 0xc822b(%rip), %r15 # 0xfeda0 cmpq %r15, %rbx je 0x36ba3 movl (%rbx), %edi callq 0x23860 movq %rax, %rdi movq %r14, %rsi callq 0x46202 testb %al, %al jne 0x36b96 addq $0x4, %rbx jmp 0x36b75 movl (%rbx), %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %rbx leaq 0x7a51f(%rip), %rsi # 0xb10d4 leaq 0x8(%rsp), %rdi movq %r14, %rdx callq 0x39738 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x23e70 xorl %ebp, %ebp movq 0xc7415(%rip), %rsi # 0xfdff0 movq 0xc7376(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f40 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x241f8 testb %bpl, %bpl jne 0x36c01 jmp 0x36c09 movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23fc0 nop
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 28h mov r14, rdi mov rbx, cs:_ZL14kv_cache_types; kv_cache_types mov r15, cs:qword_FEDA0 loc_36B75: cmp rbx, r15 jz short loc_36BA3 mov edi, [rbx] call _ggml_type_name mov rdi, rax mov rsi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbPKT_RKNSt7__cxx1112basic_stringIS3_T0_T1_EE; std::operator==<char>(char const*,std::string const&) test al, al jnz short loc_36B96 add rbx, 4 jmp short loc_36B75 loc_36B96: mov eax, [rbx] add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_36BA3: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnsupportedCac; "Unsupported cache type: " lea rdi, [rsp+48h+var_40] mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+48h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_36C01 jmp short loc_36C09 mov r14, rax loc_36C01: mov rdi, rbx; void * call ___cxa_free_exception loc_36C09: mov rdi, r14 call __Unwind_Resume
long long kv_cache_type_from_str(long long a1) { unsigned int *v1; // rbx long long v2; // r15 long long v3; // rax void *exception; // rbx _BYTE v6[64]; // [rsp+8h] [rbp-40h] BYREF v1 = (unsigned int *)kv_cache_types; v2 = qword_FEDA0; while ( 1 ) { if ( v1 == (unsigned int *)v2 ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>(v6, "Unsupported cache type: ", a1); std::runtime_error::runtime_error(exception, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = ggml_type_name(*v1); if ( (unsigned __int8)std::operator==<char>(v3, a1) ) break; ++v1; } return *v1; }
kv_cache_type_from_str: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RBX,qword ptr [0x001fed98] MOV R15,qword ptr [0x001feda0] LAB_00136b75: CMP RBX,R15 JZ 0x00136ba3 MOV EDI,dword ptr [RBX] CALL 0x00123860 MOV RDI,RAX MOV RSI,R14 CALL 0x00146202 TEST AL,AL JNZ 0x00136b96 ADD RBX,0x4 JMP 0x00136b75 LAB_00136b96: MOV EAX,dword ptr [RBX] ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00136ba3: PUSH 0x10 POP RDI CALL 0x00123470 MOV RBX,RAX LAB_00136bae: LEA RSI,[0x1b10d4] LEA RDI,[RSP + 0x8] MOV RDX,R14 CALL 0x00139738 MOV BPL,0x1 LAB_00136bc5: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00123e70 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f40
/* kv_cache_type_from_str(std::__cxx11::string const&) */ int4 kv_cache_type_from_str(string *param_1) { int4 *puVar1; bool bVar2; char *pcVar3; runtime_error *this; int4 *puVar4; string local_40 [32]; puVar1 = DAT_001feda0; puVar4 = kv_cache_types; while( true ) { if (puVar4 == puVar1) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00136bae to 00136bc1 has its CatchHandler @ 00136bfe */ std::operator+((char *)local_40,(string *)"Unsupported cache type: "); /* try { // try from 00136bc5 to 00136be9 has its CatchHandler @ 00136bea */ std::runtime_error::runtime_error(this,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } pcVar3 = (char *)ggml_type_name(*puVar4); bVar2 = std::operator==(pcVar3,param_1); if (bVar2) break; puVar4 = puVar4 + 1; } return *puVar4; }
51,550
spdlog::pattern_formatter::get_time_(spdlog::details::log_msg const&)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
SPDLOG_INLINE std::tm pattern_formatter::get_time_(const details::log_msg &msg) { if (pattern_time_type_ == pattern_time_type::local) { return details::os::localtime(log_clock::to_time_t(msg.time)); } return details::os::gmtime(log_clock::to_time_t(msg.time)); }
O3
c
spdlog::pattern_formatter::get_time_(spdlog::details::log_msg const&): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx cmpl $0x0, 0x48(%rsi) je 0x2f350 movabsq $0x112e0be826d694b3, %rax # imm = 0x112E0BE826D694B3 imulq 0x18(%rdx) movq %rdx, %rax shrq $0x3f, %rax sarq $0x1a, %rdx addq %rax, %rdx leaq 0x8(%rsp), %rdi movq %rdx, (%rdi) movq %rbx, %rsi callq 0x11950 jmp 0x2f37c movabsq $0x112e0be826d694b3, %rax # imm = 0x112E0BE826D694B3 imulq 0x18(%rdx) movq %rdx, %rax shrq $0x3f, %rax sarq $0x1a, %rdx addq %rax, %rdx leaq 0x8(%rsp), %rdi movq %rdx, (%rdi) movq %rbx, %rsi callq 0x111a0 movq %rbx, %rax addq $0x10, %rsp popq %rbx retq nop
_ZN6spdlog17pattern_formatter9get_time_ERKNS_7details7log_msgE: push rbx sub rsp, 10h mov rbx, rdi cmp dword ptr [rsi+48h], 0 jz short loc_2F350 mov rax, 112E0BE826D694B3h imul qword ptr [rdx+18h] mov rax, rdx shr rax, 3Fh sar rdx, 1Ah add rdx, rax lea rdi, [rsp+18h+var_10] mov [rdi], rdx mov rsi, rbx call _gmtime_r jmp short loc_2F37C loc_2F350: mov rax, 112E0BE826D694B3h imul qword ptr [rdx+18h] mov rax, rdx shr rax, 3Fh sar rdx, 1Ah add rdx, rax lea rdi, [rsp+18h+var_10] mov [rdi], rdx mov rsi, rbx call _localtime_r loc_2F37C: mov rax, rbx add rsp, 10h pop rbx retn
long long spdlog::pattern_formatter::get_time_(long long a1, long long a2, long long a3) { long long v3; // rdx long long v5; // [rsp+8h] [rbp-10h] BYREF v3 = (unsigned __int128)(*(long long *)(a3 + 24) * (__int128)0x112E0BE826D694B3LL) >> 64; if ( *(_DWORD *)(a2 + 72) ) { v5 = ((unsigned long long)v3 >> 63) + (v3 >> 26); gmtime_r(&v5, a1); } else { v5 = ((unsigned long long)v3 >> 63) + (v3 >> 26); localtime_r(&v5, a1); } return a1; }
get_time_: PUSH RBX SUB RSP,0x10 MOV RBX,RDI CMP dword ptr [RSI + 0x48],0x0 JZ 0x0012f350 MOV RAX,0x112e0be826d694b3 IMUL qword ptr [RDX + 0x18] MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x1a ADD RDX,RAX LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RDX MOV RSI,RBX CALL 0x00111950 JMP 0x0012f37c LAB_0012f350: MOV RAX,0x112e0be826d694b3 IMUL qword ptr [RDX + 0x18] MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x1a ADD RDX,RAX LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RDX MOV RSI,RBX CALL 0x001111a0 LAB_0012f37c: MOV RAX,RBX ADD RSP,0x10 POP RBX RET
/* spdlog::pattern_formatter::get_time_(spdlog::details::log_msg const&) */ log_msg * spdlog::pattern_formatter::get_time_(log_msg *param_1) { long in_RDX; long in_RSI; long local_10; if (*(int *)(in_RSI + 0x48) == 0) { local_10 = *(long *)(in_RDX + 0x18) / 1000000000; localtime_r(&local_10,(tm *)param_1); } else { local_10 = *(long *)(in_RDX + 0x18) / 1000000000; gmtime_r(&local_10,(tm *)param_1); } return param_1; }
51,551
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O3
c
my_strerror: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movb $0x0, (%rdi) testl %edx, %edx jle 0xd8262 leal -0x78(%rdx), %eax cmpl $0x4e, %eax ja 0xd8276 movl %eax, %eax leaq 0x284b23(%rip), %rcx # 0x35cd7c movslq (%rcx,%rax,4), %rsi addq %rcx, %rsi jmp 0xd828b leaq 0x891f(%rip), %rax # 0xe0b88 leaq 0x8940(%rip), %rsi # 0xe0bb0 cmoveq %rax, %rsi jmp 0xd82a3 movl %edx, %edi movq %rbx, %rsi movq %r14, %rdx callq 0x298b0 movq %rax, %rsi cmpq %rbx, %rax je 0xd8297 leaq -0x1(%r14), %rdx movq %rbx, %rdi callq 0xd86a8 cmpb $0x0, (%rbx) jne 0xd82b1 leaq 0x8933(%rip), %rsi # 0xe0bd6 decq %r14 movq %rbx, %rdi movq %r14, %rdx callq 0xd86a8 movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
my_strerror: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi mov byte ptr [rdi], 0 test edx, edx jle short loc_D8262 lea eax, [rdx-78h] cmp eax, 4Eh ; 'N' ja short loc_D8276 mov eax, eax lea rcx, handler_error_messages_rel movsxd rsi, dword ptr [rcx+rax*4] add rsi, rcx jmp short loc_D828B loc_D8262: lea rax, aInternalErrorC; "Internal error/check (Not system error)" lea rsi, aInternalError0; "Internal error < 0 (Not system error)" cmovz rsi, rax jmp short loc_D82A3 loc_D8276: mov edi, edx mov rsi, rbx mov rdx, r14 call _strerror_r mov rsi, rax cmp rax, rbx jz short loc_D8297 loc_D828B: lea rdx, [r14-1] mov rdi, rbx call strmake loc_D8297: cmp byte ptr [rbx], 0 jnz short loc_D82B1 lea rsi, aUnknownError; "unknown error" loc_D82A3: dec r14 mov rdi, rbx mov rdx, r14 call strmake loc_D82B1: mov rax, rbx pop rbx pop r14 pop rbp retn
char * my_strerror(char *a1, long long a2, int a3) { char *v4; // rsi const char *v5; // rsi *a1 = 0; if ( a3 <= 0 ) { v5 = "Internal error < 0 (Not system error)"; if ( !a3 ) v5 = "Internal error/check (Not system error)"; goto LABEL_11; } if ( (unsigned int)(a3 - 120) > 0x4E ) { v4 = (char *)strerror_r((unsigned int)a3, a1, a2); if ( v4 == a1 ) goto LABEL_9; } else { v4 = (char *)handler_error_messages_rel + handler_error_messages_rel[a3 - 120]; } strmake(a1, v4, a2 - 1); LABEL_9: if ( !*a1 ) { v5 = "unknown error"; LABEL_11: strmake(a1, v5, a2 - 1); } return a1; }
my_strerror: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 TEST EDX,EDX JLE 0x001d8262 LEA EAX,[RDX + -0x78] CMP EAX,0x4e JA 0x001d8276 MOV EAX,EAX LEA RCX,[0x45cd7c] MOVSXD RSI,dword ptr [RCX + RAX*0x4] ADD RSI,RCX JMP 0x001d828b LAB_001d8262: LEA RAX,[0x1e0b88] LEA RSI,[0x1e0bb0] CMOVZ RSI,RAX JMP 0x001d82a3 LAB_001d8276: MOV EDI,EDX MOV RSI,RBX MOV RDX,R14 CALL 0x001298b0 MOV RSI,RAX CMP RAX,RBX JZ 0x001d8297 LAB_001d828b: LEA RDX,[R14 + -0x1] MOV RDI,RBX CALL 0x001d86a8 LAB_001d8297: CMP byte ptr [RBX],0x0 JNZ 0x001d82b1 LEA RSI,[0x1e0bd6] LAB_001d82a3: DEC R14 MOV RDI,RBX MOV RDX,R14 CALL 0x001d86a8 LAB_001d82b1: MOV RAX,RBX POP RBX POP R14 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } goto LAB_001d82a3; } if (param_3 - 0x78U < 0x4f) { pcVar1 = handler_error_messages_rel + *(int *)(handler_error_messages_rel + (ulong)(param_3 - 0x78U) * 4); LAB_001d828b: strmake(param_1,pcVar1,param_2 - 1); } else { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) goto LAB_001d828b; } if (*param_1 != '\0') { return param_1; } pcVar1 = "unknown error"; LAB_001d82a3: strmake(param_1,pcVar1,param_2 - 1); return param_1; }
51,552
strxnmov
eloqsql/strings/strxnmov.c
char *strxnmov(char *dst, size_t len, const char *src, ...) { va_list pvar; char *end_of_dst=dst+len; va_start(pvar,src); while (src != NullS) { do { if (dst == end_of_dst) goto end; } while ((*dst++ = *src++)); dst--; src = va_arg(pvar, char *); } end: *dst=0; va_end(pvar); return dst; }
O0
c
strxnmov: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp testb %al, %al je 0x7774b movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rcx, -0xd8(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x30(%rbp), %rax leaq -0xf0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x18, (%rax) cmpq $0x0, -0x18(%rbp) je 0x77857 jmp 0x777a9 movq -0x8(%rbp), %rax cmpq -0x38(%rbp), %rax jne 0x777b8 jmp 0x77859 jmp 0x777ba movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb (%rax), %al movq -0x8(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %al, (%rcx) cmpb $0x0, %al jne 0x777a9 movq -0x8(%rbp), %rax addq $-0x1, %rax movq %rax, -0x8(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x100(%rbp) movl -0x30(%rbp), %eax movl %eax, -0xf4(%rbp) cmpl $0x28, %eax ja 0x77827 movq -0x100(%rbp), %rcx movl -0xf4(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x108(%rbp) jmp 0x77844 movq -0x100(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x108(%rbp) movq -0x108(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x7779c jmp 0x77859 movq -0x8(%rbp), %rax movb $0x0, (%rax) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nopl (%rax)
strxnmov: push rbp mov rbp, rsp sub rsp, 90h test al, al jz short loc_7774B movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_7774B: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_D8], rcx mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_38], rax lea rax, [rbp+var_30] lea rcx, [rbp+var_F0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 18h loc_7779C: cmp [rbp+var_18], 0 jz loc_77857 jmp short $+2 loc_777A9: mov rax, [rbp+var_8] cmp rax, [rbp+var_38] jnz short loc_777B8 jmp loc_77859 loc_777B8: jmp short $+2 loc_777BA: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov al, [rax] mov rcx, [rbp+var_8] mov rdx, rcx add rdx, 1 mov [rbp+var_8], rdx mov [rcx], al cmp al, 0 jnz short loc_777A9 mov rax, [rbp+var_8] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_8], rax lea rax, [rbp+var_30] mov [rbp+var_100], rax mov eax, [rbp+var_30] mov [rbp+var_F4], eax cmp eax, 28h ; '(' ja short loc_77827 mov rcx, [rbp+var_100] mov edx, [rbp+var_F4] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_108], rax jmp short loc_77844 loc_77827: mov rcx, [rbp+var_100] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_108], rax loc_77844: mov rax, [rbp+var_108] mov rax, [rax] mov [rbp+var_18], rax jmp loc_7779C loc_77857: jmp short $+2 loc_77859: mov rax, [rbp+var_8] mov byte ptr [rax], 0 mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
_BYTE * strxnmov( _BYTE *a1, long long a2, _BYTE *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { _BYTE *v15; // rax _BYTE *v16; // rcx char *v17; // rax char v19; // [rsp+18h] [rbp-F0h] BYREF long long v20; // [rsp+30h] [rbp-D8h] long long v21; // [rsp+38h] [rbp-D0h] long long v22; // [rsp+40h] [rbp-C8h] __m128 v23; // [rsp+48h] [rbp-C0h] __m128 v24; // [rsp+58h] [rbp-B0h] __m128 v25; // [rsp+68h] [rbp-A0h] __m128 v26; // [rsp+78h] [rbp-90h] __m128 v27; // [rsp+88h] [rbp-80h] __m128 v28; // [rsp+98h] [rbp-70h] __m128 v29; // [rsp+A8h] [rbp-60h] __m128 v30; // [rsp+B8h] [rbp-50h] _BYTE *v31; // [rsp+D0h] [rbp-38h] int v32; // [rsp+D8h] [rbp-30h] int v33; // [rsp+DCh] [rbp-2Ch] char *v34; // [rsp+E0h] [rbp-28h] char *v35; // [rsp+E8h] [rbp-20h] _BYTE *v36; // [rsp+F0h] [rbp-18h] long long v37; // [rsp+F8h] [rbp-10h] _BYTE *v38; // [rsp+100h] [rbp-8h] v23 = a7; v24 = a8; v25 = a9; v26 = a10; v27 = a11; v28 = a12; v29 = a13; v30 = a14; v22 = a6; v21 = a5; v20 = a4; v38 = a1; v37 = a2; v36 = a3; v31 = &a1[a2]; v35 = &v19; v34 = &a15; v33 = 48; v32 = 24; LABEL_2: if ( v36 ) { while ( v38 != v31 ) { v15 = v36++; LOBYTE(v15) = *v15; v16 = v38++; *v16 = (_BYTE)v15; if ( !(_BYTE)v15 ) { --v38; if ( (unsigned int)v32 > 0x28 ) { v17 = v34; v34 += 8; } else { v17 = &v35[v32]; v32 += 8; } v36 = *(_BYTE **)v17; goto LABEL_2; } } } *v38 = 0; return v38; }
strxnmov: PUSH RBP MOV RBP,RSP SUB RSP,0x90 TEST AL,AL JZ 0x0017774b MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_0017774b: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0xd8],RCX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xf0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x18 LAB_0017779c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00177857 JMP 0x001777a9 LAB_001777a9: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x38] JNZ 0x001777b8 JMP 0x00177859 LAB_001777b8: JMP 0x001777ba LAB_001777ba: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RCX],AL CMP AL,0x0 JNZ 0x001777a9 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,-0x1 MOV qword ptr [RBP + -0x8],RAX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x100],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0xf4],EAX CMP EAX,0x28 JA 0x00177827 MOV RCX,qword ptr [RBP + -0x100] MOV EDX,dword ptr [RBP + -0xf4] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x108],RAX JMP 0x00177844 LAB_00177827: MOV RCX,qword ptr [RBP + -0x100] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x108],RAX LAB_00177844: MOV RAX,qword ptr [RBP + -0x108] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x0017779c LAB_00177857: JMP 0x00177859 LAB_00177859: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ char * strxnmov(char *param_1,long param_2,char *param_3) { char cVar1; char *pcVar2; int8 *local_110; int8 local_f8 [24]; uint local_38; int8 *local_30; char *local_20; char *local_10; local_30 = (int8 *)&stack0x00000008; local_38 = 0x18; local_20 = param_3; local_10 = param_1; while (pcVar2 = local_10, local_20 != (char *)0x0) { do { local_10 = pcVar2; if (local_10 == param_1 + param_2) goto LAB_00177859; cVar1 = *local_20; *local_10 = cVar1; local_20 = local_20 + 1; pcVar2 = local_10 + 1; } while (cVar1 != '\0'); if (local_38 < 0x29) { local_110 = (int8 *)((long)local_f8 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_110 = local_30; local_30 = local_30 + 1; } local_20 = (char *)*local_110; } LAB_00177859: *local_10 = '\0'; return local_10; }
51,553
js_map_delete
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_delete(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSMapRecord *mr; JSValue key; if (!s) return JS_EXCEPTION; key = map_normalize_key(ctx, argv[0]); mr = map_find_record(ctx, s, key); if (!mr) return JS_FALSE; map_delete_record(ctx->rt, s, mr); return JS_TRUE; }
O1
c
js_map_delete: pushq %r15 pushq %r14 pushq %rbx movq %r8, %r15 movq %rdi, %rbx leal 0x23(%r9), %ecx callq 0x275b5 testq %rax, %rax je 0x4fc97 movq %rax, %r14 movq (%r15), %rdx movq 0x8(%r15), %rcx movl %ecx, %eax xorq $0x7, %rax movq %rdx, %rsi btrq $0x3f, %rsi xorl %r15d, %r15d orq %rax, %rsi cmoveq %r15, %rdx cmoveq %r15, %rcx movq %rbx, %rdi movq %r14, %rsi callq 0x4748d testq %rax, %rax je 0x4fc90 movq 0x18(%rbx), %rdi movq %r14, %rsi movq %rax, %rdx callq 0x50086 movl $0x1, %r15d movl $0x1, %edx jmp 0x4fc9f movl $0x6, %edx xorl %r15d, %r15d movq %r15, %rax popq %rbx popq %r14 popq %r15 retq
js_map_delete: push r15 push r14 push rbx mov r15, r8 mov rbx, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_4FC97 mov r14, rax mov rdx, [r15] mov rcx, [r15+8] mov eax, ecx xor rax, 7 mov rsi, rdx btr rsi, 3Fh ; '?' xor r15d, r15d or rsi, rax cmovz rdx, r15 cmovz rcx, r15 mov rdi, rbx mov rsi, r14 call map_find_record test rax, rax jz short loc_4FC90 mov rdi, [rbx+18h] mov rsi, r14 mov rdx, rax call map_delete_record mov r15d, 1 loc_4FC90: mov edx, 1 jmp short loc_4FC9F loc_4FC97: mov edx, 6 xor r15d, r15d loc_4FC9F: mov rax, r15 pop rbx pop r14 pop r15 retn
long long js_map_delete(long long a1, long long a2, int a3, double a4, __m128d a5, long long a6, long long a7, int a8) { long long Opaque2; // rax long long v10; // r14 _DWORD *v11; // rdx long long v12; // rcx long long v13; // rsi long long v14; // r15 long long record; // rax Opaque2 = JS_GetOpaque2(a1, a2, a3, a8 + 35); if ( !Opaque2 ) return 0LL; v10 = Opaque2; v11 = *(_DWORD **)a7; v12 = *(_QWORD *)(a7 + 8); v13 = *(_QWORD *)a7 & 0x7FFFFFFFFFFFFFFFLL; v14 = 0LL; if ( !((unsigned int)v12 ^ 7LL | v13) ) { v11 = 0LL; v12 = 0LL; } record = map_find_record(a1, Opaque2, v11, v12, a4, a5); if ( record ) { map_delete_record(*(_QWORD *)(a1 + 24), v10, record); return 1LL; } return v14; }
js_map_delete: PUSH R15 PUSH R14 PUSH RBX MOV R15,R8 MOV RBX,RDI LEA ECX,[R9 + 0x23] CALL 0x001275b5 TEST RAX,RAX JZ 0x0014fc97 MOV R14,RAX MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV EAX,ECX XOR RAX,0x7 MOV RSI,RDX BTR RSI,0x3f XOR R15D,R15D OR RSI,RAX CMOVZ RDX,R15 CMOVZ RCX,R15 MOV RDI,RBX MOV RSI,R14 CALL 0x0014748d TEST RAX,RAX JZ 0x0014fc90 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,RAX CALL 0x00150086 MOV R15D,0x1 LAB_0014fc90: MOV EDX,0x1 JMP 0x0014fc9f LAB_0014fc97: MOV EDX,0x6 XOR R15D,R15D LAB_0014fc9f: MOV RAX,R15 POP RBX POP R14 POP R15 RET
bool js_map_delete(long param_1) { ulong uVar1; long lVar2; long lVar3; ulong uVar4; ulong *in_R8; bool bVar5; lVar2 = JS_GetOpaque2(); if (lVar2 == 0) { bVar5 = false; } else { uVar4 = in_R8[1]; uVar1 = *in_R8; if ((*in_R8 & 0x7fffffffffffffff) == 0 && (in_R8[1] & 0xffffffff) == 7) { uVar4 = 0; uVar1 = 0; } lVar3 = map_find_record(param_1,lVar2,uVar1,uVar4); bVar5 = lVar3 != 0; if (bVar5) { map_delete_record(*(int8 *)(param_1 + 0x18),lVar2,lVar3); } } return bVar5; }
51,554
js_map_delete
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_delete(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSMapRecord *mr; JSValue key; if (!s) return JS_EXCEPTION; key = map_normalize_key(ctx, argv[0]); mr = map_find_record(ctx, s, key); if (!mr) return JS_FALSE; map_delete_record(ctx->rt, s, mr); return JS_TRUE; }
O2
c
js_map_delete: pushq %r15 pushq %r14 pushq %rbx movq %r8, %r15 movq %rdi, %rbx leal 0x23(%r9), %ecx callq 0x21207 testq %rax, %rax je 0x4480f movq %rax, %r14 movq (%r15), %rdx movq 0x8(%r15), %rcx movl %ecx, %eax xorq $0x7, %rax movq %rdx, %rsi btrq $0x3f, %rsi xorl %r15d, %r15d orq %rax, %rsi cmoveq %r15, %rdx cmoveq %r15, %rcx movq %rbx, %rdi movq %r14, %rsi callq 0x3d80d testq %rax, %rax je 0x44817 movq 0x18(%rbx), %rdi movq %r14, %rsi movq %rax, %rdx callq 0x44b6e pushq $0x1 popq %r15 movq %r15, %rdx jmp 0x4481a pushq $0x6 popq %rdx xorl %r15d, %r15d jmp 0x4481a pushq $0x1 popq %rdx movq %r15, %rax popq %rbx popq %r14 popq %r15 retq
js_map_delete: push r15 push r14 push rbx mov r15, r8 mov rbx, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_4480F mov r14, rax mov rdx, [r15] mov rcx, [r15+8] mov eax, ecx xor rax, 7 mov rsi, rdx btr rsi, 3Fh ; '?' xor r15d, r15d or rsi, rax cmovz rdx, r15 cmovz rcx, r15 mov rdi, rbx mov rsi, r14 call map_find_record test rax, rax jz short loc_44817 mov rdi, [rbx+18h] mov rsi, r14 mov rdx, rax call map_delete_record push 1 pop r15 mov rdx, r15 jmp short loc_4481A loc_4480F: push 6 pop rdx xor r15d, r15d jmp short loc_4481A loc_44817: push 1 pop rdx loc_4481A: mov rax, r15 pop rbx pop r14 pop r15 retn
long long js_map_delete(long long a1, long long a2, int a3, __m128d a4, long long a5, long long a6, int a7) { long long Opaque2; // rax long long v9; // r14 _DWORD *v10; // rdx long long v11; // rcx long long v12; // rsi long long v13; // r15 long long record; // rax Opaque2 = JS_GetOpaque2(a1, a2, a3, a7 + 35); if ( !Opaque2 ) return 0LL; v9 = Opaque2; v10 = *(_DWORD **)a6; v11 = *(_QWORD *)(a6 + 8); v12 = *(_QWORD *)a6 & 0x7FFFFFFFFFFFFFFFLL; v13 = 0LL; if ( !((unsigned int)v11 ^ 7LL | v12) ) { v10 = 0LL; v11 = 0LL; } record = map_find_record(a1, Opaque2, v10, v11, a4); if ( record ) { map_delete_record(*(_QWORD *)(a1 + 24), v9, record); return 1LL; } return v13; }
js_map_delete: PUSH R15 PUSH R14 PUSH RBX MOV R15,R8 MOV RBX,RDI LEA ECX,[R9 + 0x23] CALL 0x00121207 TEST RAX,RAX JZ 0x0014480f MOV R14,RAX MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV EAX,ECX XOR RAX,0x7 MOV RSI,RDX BTR RSI,0x3f XOR R15D,R15D OR RSI,RAX CMOVZ RDX,R15 CMOVZ RCX,R15 MOV RDI,RBX MOV RSI,R14 CALL 0x0013d80d TEST RAX,RAX JZ 0x00144817 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,RAX CALL 0x00144b6e PUSH 0x1 POP R15 MOV RDX,R15 JMP 0x0014481a LAB_0014480f: PUSH 0x6 POP RDX XOR R15D,R15D JMP 0x0014481a LAB_00144817: PUSH 0x1 POP RDX LAB_0014481a: MOV RAX,R15 POP RBX POP R14 POP R15 RET
int1 [16] js_map_delete(long param_1) { long lVar1; long lVar2; ulong uVar3; ulong uVar4; ulong *in_R8; ulong uVar5; int1 auVar6 [16]; lVar1 = JS_GetOpaque2(); if (lVar1 == 0) { uVar4 = 6; uVar5 = 0; } else { uVar5 = 0; uVar3 = in_R8[1]; uVar4 = *in_R8; if ((*in_R8 & 0x7fffffffffffffff) == 0 && (in_R8[1] & 0xffffffff) == 7) { uVar3 = uVar5; uVar4 = uVar5; } lVar2 = map_find_record(param_1,lVar1,uVar4,uVar3); if (lVar2 == 0) { uVar4 = 1; } else { map_delete_record(*(int8 *)(param_1 + 0x18),lVar1,lVar2); uVar4 = 1; uVar5 = uVar4; } } auVar6._8_8_ = uVar4; auVar6._0_8_ = uVar5; return auVar6; }
51,555
nglog::tools::Demangle(char const*, char*, unsigned long)
ng-log[P]ng-log/src/demangle.cc
bool Demangle(const char* mangled, char* out, size_t out_size) { #if defined(NGLOG_OS_WINDOWS) # if defined(HAVE_DBGHELP) // When built with incremental linking, the Windows debugger // library provides a more complicated `Symbol->Name` with the // Incremental Linking Table offset, which looks like // `@ILT+1105(?func@Foo@@SAXH@Z)`. However, the demangler expects // only the mangled symbol, `?func@Foo@@SAXH@Z`. Fortunately, the // mangled symbol is guaranteed not to have parentheses, // so we search for `(` and extract up to `)`. // // Since we may be in a signal handler here, we cannot use `std::string`. char buffer[1024]; // Big enough for a sane symbol. const char* lparen = strchr(mangled, '('); if (lparen) { // Extract the string `(?...)` const char* rparen = strchr(lparen, ')'); size_t length = static_cast<size_t>(rparen - lparen) - 1; strncpy(buffer, lparen + 1, length); buffer[length] = '\0'; mangled = buffer; } // Else the symbol wasn't inside a set of parentheses // We use the ANSI version to ensure the string type is always `char *`. return UnDecorateSymbolName(mangled, out, out_size, UNDNAME_COMPLETE); # else (void)mangled; (void)out; (void)out_size; return false; # endif #elif defined(HAVE___CXA_DEMANGLE) int status = -1; std::size_t n = 0; std::unique_ptr<char, decltype(&std::free)> unmangled{ abi::__cxa_demangle(mangled, nullptr, &n, &status), &std::free}; if (!unmangled) { return false; } std::copy_n(unmangled.get(), std::min(n, out_size), out); return status == 0; #else State state; InitState(&state, mangled, out, out_size); return ParseTopLevelMangledName(&state) && !state.overflowed; #endif }
O1
cpp
nglog::tools::Demangle(char const*, char*, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movq %rsi, %r15 leaq 0xc(%rsp), %rcx movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF leaq 0x10(%rsp), %rdx movq $0x0, (%rdx) xorl %r12d, %r12d xorl %esi, %esi callq 0x8510 movq %rax, %rbx testq %rax, %rax je 0x19d66 movq 0x10(%rsp), %rax cmpq %r14, %rax cmovbq %rax, %r14 testq %r14, %r14 je 0x19d5d movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x8af0 cmpl $0x0, 0xc(%rsp) sete %r12b testq %rbx, %rbx je 0x19d73 movq %rbx, %rdi callq 0x8790 movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN5nglog5tools8DemangleEPKcPcm: push r15 push r14 push r12 push rbx sub rsp, 18h mov r14, rdx mov r15, rsi lea rcx, [rsp+38h+status]; lpstatus mov dword ptr [rcx], 0FFFFFFFFh lea rdx, [rsp+38h+outlen]; lpoutlen mov qword ptr [rdx], 0 xor r12d, r12d xor esi, esi; lpout call ___cxa_demangle mov rbx, rax test rax, rax jz short loc_19D66 mov rax, [rsp+38h+outlen] cmp rax, r14 cmovb r14, rax test r14, r14 jz short loc_19D5D mov rdi, r15 mov rsi, rbx mov rdx, r14 call _memmove loc_19D5D: cmp [rsp+38h+status], 0 setz r12b loc_19D66: test rbx, rbx jz short loc_19D73 mov rdi, rbx call _free loc_19D73: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long nglog::tools::Demangle(nglog::tools *this, const char *a2, char *a3) { unsigned int v4; // r12d char *v5; // rbx int status; // [rsp+Ch] [rbp-2Ch] BYREF size_t outlen[5]; // [rsp+10h] [rbp-28h] BYREF status = -1; outlen[0] = 0LL; v4 = 0; v5 = __cxa_demangle((const char *)this, 0LL, outlen, &status); if ( v5 ) { if ( outlen[0] < (unsigned long long)a3 ) a3 = (char *)outlen[0]; if ( a3 ) memmove(a2, v5, a3); LOBYTE(v4) = status == 0; } if ( v5 ) free(v5); return v4; }
Demangle: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDX MOV R15,RSI LEA RCX,[RSP + 0xc] MOV dword ptr [RCX],0xffffffff LEA RDX,[RSP + 0x10] MOV qword ptr [RDX],0x0 XOR R12D,R12D XOR ESI,ESI CALL 0x00108510 MOV RBX,RAX TEST RAX,RAX JZ 0x00119d66 MOV RAX,qword ptr [RSP + 0x10] CMP RAX,R14 CMOVC R14,RAX TEST R14,R14 JZ 0x00119d5d MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x00108af0 LAB_00119d5d: CMP dword ptr [RSP + 0xc],0x0 SETZ R12B LAB_00119d66: TEST RBX,RBX JZ 0x00119d73 MOV RDI,RBX CALL 0x00108790 LAB_00119d73: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
/* nglog::tools::Demangle(char const*, char*, unsigned long) */ int8 nglog::tools::Demangle(char *param_1,char *param_2,ulong param_3) { void *__src; __src = (void *)__cxa_demangle(param_1,0); if (__src != (void *)0x0) { if (param_3 != 0) { param_3 = 0; } if (param_3 != 0) { memmove(param_2,__src,param_3); } } if (__src != (void *)0x0) { free(__src); } return 0; }
51,556
utf8_encode_buf8
bluesky950520[P]quickjs/cutils.c
size_t utf8_encode_buf8(char *dest, size_t dest_len, const uint8_t *src, size_t src_len) { size_t i, j; uint32_t c; for (i = j = 0; i < src_len; i++) { c = src[i]; if (c < 0x80) { if (j + 1 >= dest_len) goto overflow; dest[j++] = c; } else { if (j + 2 >= dest_len) goto overflow; dest[j++] = (c >> 6) | 0xC0; dest[j++] = (c & 0x3F) | 0x80; } } if (j < dest_len) dest[j] = '\0'; return j; overflow: if (j < dest_len) dest[j] = '\0'; while (i < src_len) j += 1 + (src[i++] >= 0x80); return j; }
O0
c
utf8_encode_buf8: movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movq %rdx, -0x20(%rsp) movq %rcx, -0x28(%rsp) movq $0x0, -0x38(%rsp) movq $0x0, -0x30(%rsp) movq -0x30(%rsp), %rax cmpq -0x28(%rsp), %rax jae 0x1e0d0 movq -0x20(%rsp), %rax movq -0x30(%rsp), %rcx movzbl (%rax,%rcx), %eax movl %eax, -0x3c(%rsp) cmpl $0x80, -0x3c(%rsp) jae 0x1e058 movq -0x38(%rsp), %rax addq $0x1, %rax cmpq -0x18(%rsp), %rax jb 0x1e037 jmp 0x1e0f6 movl -0x3c(%rsp), %eax movb %al, %dl movq -0x10(%rsp), %rax movq -0x38(%rsp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, -0x38(%rsp) movb %dl, (%rax,%rcx) jmp 0x1e0bb movq -0x38(%rsp), %rax addq $0x2, %rax cmpq -0x18(%rsp), %rax jb 0x1e06d jmp 0x1e0f6 movl -0x3c(%rsp), %eax shrl $0x6, %eax orl $0xc0, %eax movb %al, %dl movq -0x10(%rsp), %rax movq -0x38(%rsp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, -0x38(%rsp) movb %dl, (%rax,%rcx) movl -0x3c(%rsp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, %dl movq -0x10(%rsp), %rax movq -0x38(%rsp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, -0x38(%rsp) movb %dl, (%rax,%rcx) jmp 0x1e0bd movq -0x30(%rsp), %rax addq $0x1, %rax movq %rax, -0x30(%rsp) jmp 0x1dff6 movq -0x38(%rsp), %rax cmpq -0x18(%rsp), %rax jae 0x1e0ea movq -0x10(%rsp), %rax movq -0x38(%rsp), %rcx movb $0x0, (%rax,%rcx) movq -0x38(%rsp), %rax movq %rax, -0x8(%rsp) jmp 0x1e160 movq -0x38(%rsp), %rax cmpq -0x18(%rsp), %rax jae 0x1e110 movq -0x10(%rsp), %rax movq -0x38(%rsp), %rcx movb $0x0, (%rax,%rcx) jmp 0x1e112 movq -0x30(%rsp), %rax cmpq -0x28(%rsp), %rax jae 0x1e156 movq -0x20(%rsp), %rax movq -0x30(%rsp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x30(%rsp) movzbl (%rax,%rcx), %eax cmpl $0x80, %eax setge %al andb $0x1, %al movzbl %al, %eax addl $0x1, %eax cltq addq -0x38(%rsp), %rax movq %rax, -0x38(%rsp) jmp 0x1e112 movq -0x38(%rsp), %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax)
utf8_encode_buf8: mov [rsp+var_10], rdi mov [rsp+var_18], rsi mov [rsp+var_20], rdx mov [rsp+var_28], rcx mov [rsp+var_38], 0 mov [rsp+var_30], 0 loc_1DFF6: mov rax, [rsp+var_30] cmp rax, [rsp+var_28] jnb loc_1E0D0 mov rax, [rsp+var_20] mov rcx, [rsp+var_30] movzx eax, byte ptr [rax+rcx] mov [rsp+var_3C], eax cmp [rsp+var_3C], 80h jnb short loc_1E058 mov rax, [rsp+var_38] add rax, 1 cmp rax, [rsp+var_18] jb short loc_1E037 jmp loc_1E0F6 loc_1E037: mov eax, [rsp+var_3C] mov dl, al mov rax, [rsp+var_10] mov rcx, [rsp+var_38] mov rsi, rcx add rsi, 1 mov [rsp+var_38], rsi mov [rax+rcx], dl jmp short loc_1E0BB loc_1E058: mov rax, [rsp+var_38] add rax, 2 cmp rax, [rsp+var_18] jb short loc_1E06D jmp loc_1E0F6 loc_1E06D: mov eax, [rsp+var_3C] shr eax, 6 or eax, 0C0h mov dl, al mov rax, [rsp+var_10] mov rcx, [rsp+var_38] mov rsi, rcx add rsi, 1 mov [rsp+var_38], rsi mov [rax+rcx], dl mov eax, [rsp+var_3C] and eax, 3Fh or eax, 80h mov dl, al mov rax, [rsp+var_10] mov rcx, [rsp+var_38] mov rsi, rcx add rsi, 1 mov [rsp+var_38], rsi mov [rax+rcx], dl loc_1E0BB: jmp short $+2 loc_1E0BD: mov rax, [rsp+var_30] add rax, 1 mov [rsp+var_30], rax jmp loc_1DFF6 loc_1E0D0: mov rax, [rsp+var_38] cmp rax, [rsp+var_18] jnb short loc_1E0EA mov rax, [rsp+var_10] mov rcx, [rsp+var_38] mov byte ptr [rax+rcx], 0 loc_1E0EA: mov rax, [rsp+var_38] mov [rsp+var_8], rax jmp short loc_1E160 loc_1E0F6: mov rax, [rsp+var_38] cmp rax, [rsp+var_18] jnb short loc_1E110 mov rax, [rsp+var_10] mov rcx, [rsp+var_38] mov byte ptr [rax+rcx], 0 loc_1E110: jmp short $+2 loc_1E112: mov rax, [rsp+var_30] cmp rax, [rsp+var_28] jnb short loc_1E156 mov rax, [rsp+var_20] mov rcx, [rsp+var_30] mov rdx, rcx add rdx, 1 mov [rsp+var_30], rdx movzx eax, byte ptr [rax+rcx] cmp eax, 80h setnl al and al, 1 movzx eax, al add eax, 1 cdqe add rax, [rsp+var_38] mov [rsp+var_38], rax jmp short loc_1E112 loc_1E156: mov rax, [rsp+var_38] mov [rsp+var_8], rax loc_1E160: mov rax, [rsp+var_8] retn
unsigned long long utf8_encode_buf8(long long a1, unsigned long long a2, long long a3, unsigned long long a4) { unsigned long long v4; // rcx unsigned long long v5; // rcx long long v6; // rcx unsigned int v8; // [rsp+0h] [rbp-3Ch] unsigned long long v9; // [rsp+4h] [rbp-38h] unsigned long long i; // [rsp+Ch] [rbp-30h] v9 = 0LL; for ( i = 0LL; i < a4; ++i ) { v8 = *(unsigned __int8 *)(a3 + i); if ( v8 >= 0x80 ) { if ( v9 + 2 >= a2 ) { LABEL_12: if ( v9 < a2 ) *(_BYTE *)(a1 + v9) = 0; while ( i < a4 ) { v6 = i++; v9 += (*(unsigned __int8 *)(a3 + v6) >= 0x80u) + 1; } return v9; } *(_BYTE *)(a1 + v9) = (*(_BYTE *)(a3 + i) >> 6) | 0xC0; v5 = v9 + 1; v9 += 2LL; *(_BYTE *)(a1 + v5) = v8 & 0x3F | 0x80; } else { if ( v9 + 1 >= a2 ) goto LABEL_12; v4 = v9++; *(_BYTE *)(a1 + v4) = v8; } } if ( v9 < a2 ) *(_BYTE *)(a1 + v9) = 0; return v9; }
utf8_encode_buf8: MOV qword ptr [RSP + -0x10],RDI MOV qword ptr [RSP + -0x18],RSI MOV qword ptr [RSP + -0x20],RDX MOV qword ptr [RSP + -0x28],RCX MOV qword ptr [RSP + -0x38],0x0 MOV qword ptr [RSP + -0x30],0x0 LAB_0011dff6: MOV RAX,qword ptr [RSP + -0x30] CMP RAX,qword ptr [RSP + -0x28] JNC 0x0011e0d0 MOV RAX,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x30] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + -0x3c],EAX CMP dword ptr [RSP + -0x3c],0x80 JNC 0x0011e058 MOV RAX,qword ptr [RSP + -0x38] ADD RAX,0x1 CMP RAX,qword ptr [RSP + -0x18] JC 0x0011e037 JMP 0x0011e0f6 LAB_0011e037: MOV EAX,dword ptr [RSP + -0x3c] MOV DL,AL MOV RAX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RSP + -0x38] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RSP + -0x38],RSI MOV byte ptr [RAX + RCX*0x1],DL JMP 0x0011e0bb LAB_0011e058: MOV RAX,qword ptr [RSP + -0x38] ADD RAX,0x2 CMP RAX,qword ptr [RSP + -0x18] JC 0x0011e06d JMP 0x0011e0f6 LAB_0011e06d: MOV EAX,dword ptr [RSP + -0x3c] SHR EAX,0x6 OR EAX,0xc0 MOV DL,AL MOV RAX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RSP + -0x38] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RSP + -0x38],RSI MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RSP + -0x3c] AND EAX,0x3f OR EAX,0x80 MOV DL,AL MOV RAX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RSP + -0x38] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RSP + -0x38],RSI MOV byte ptr [RAX + RCX*0x1],DL LAB_0011e0bb: JMP 0x0011e0bd LAB_0011e0bd: MOV RAX,qword ptr [RSP + -0x30] ADD RAX,0x1 MOV qword ptr [RSP + -0x30],RAX JMP 0x0011dff6 LAB_0011e0d0: MOV RAX,qword ptr [RSP + -0x38] CMP RAX,qword ptr [RSP + -0x18] JNC 0x0011e0ea MOV RAX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RSP + -0x38] MOV byte ptr [RAX + RCX*0x1],0x0 LAB_0011e0ea: MOV RAX,qword ptr [RSP + -0x38] MOV qword ptr [RSP + -0x8],RAX JMP 0x0011e160 LAB_0011e0f6: MOV RAX,qword ptr [RSP + -0x38] CMP RAX,qword ptr [RSP + -0x18] JNC 0x0011e110 MOV RAX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RSP + -0x38] MOV byte ptr [RAX + RCX*0x1],0x0 LAB_0011e110: JMP 0x0011e112 LAB_0011e112: MOV RAX,qword ptr [RSP + -0x30] CMP RAX,qword ptr [RSP + -0x28] JNC 0x0011e156 MOV RAX,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x30] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RSP + -0x30],RDX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x80 SETGE AL AND AL,0x1 MOVZX EAX,AL ADD EAX,0x1 CDQE ADD RAX,qword ptr [RSP + -0x38] MOV qword ptr [RSP + -0x38],RAX JMP 0x0011e112 LAB_0011e156: MOV RAX,qword ptr [RSP + -0x38] MOV qword ptr [RSP + -0x8],RAX LAB_0011e160: MOV RAX,qword ptr [RSP + -0x8] RET
ulong utf8_encode_buf8(long param_1,ulong param_2,long param_3,ulong param_4) { byte bVar1; long lVar2; ulong local_38; ulong local_30; local_38 = 0; local_30 = 0; do { if (param_4 <= local_30) { if (local_38 < param_2) { *(int1 *)(param_1 + local_38) = 0; } return local_38; } bVar1 = *(byte *)(param_3 + local_30); if (bVar1 < 0x80) { if (param_2 <= local_38 + 1) { LAB_0011e0f6: if (local_38 < param_2) { *(int1 *)(param_1 + local_38) = 0; } for (; local_30 < param_4; local_30 = local_30 + 1) { local_38 = (long)(int)((0x7f < *(byte *)(param_3 + local_30)) + 1) + local_38; } return local_38; } *(byte *)(param_1 + local_38) = bVar1; local_38 = local_38 + 1; } else { if (param_2 <= local_38 + 2) goto LAB_0011e0f6; lVar2 = local_38 + 1; *(byte *)(param_1 + local_38) = bVar1 >> 6 | 0xc0; local_38 = local_38 + 2; *(byte *)(param_1 + lVar2) = bVar1 & 0x3f | 0x80; } local_30 = local_30 + 1; } while( true ); }
51,557
utf8_encode_buf8
bluesky950520[P]quickjs/cutils.c
size_t utf8_encode_buf8(char *dest, size_t dest_len, const uint8_t *src, size_t src_len) { size_t i, j; uint32_t c; for (i = j = 0; i < src_len; i++) { c = src[i]; if (c < 0x80) { if (j + 1 >= dest_len) goto overflow; dest[j++] = c; } else { if (j + 2 >= dest_len) goto overflow; dest[j++] = (c >> 6) | 0xC0; dest[j++] = (c & 0x3F) | 0x80; } } if (j < dest_len) dest[j] = '\0'; return j; overflow: if (j < dest_len) dest[j] = '\0'; while (i < src_len) j += 1 + (src[i++] >= 0x80); return j; }
O1
c
utf8_encode_buf8: testq %rcx, %rcx je 0x1ae5c xorl %r9d, %r9d xorl %r8d, %r8d movb (%rdx,%r8), %r10b testb %r10b, %r10b js 0x1ae2e leaq 0x1(%r9), %rax cmpq %rsi, %rax jae 0x1ae68 movb %r10b, (%rdi,%r9) jmp 0x1ae4f leaq 0x2(%r9), %rax cmpq %rsi, %rax jae 0x1ae68 movl %r10d, %r11d shrb $0x6, %r11b orb $-0x40, %r11b movb %r11b, (%rdi,%r9) andb $-0x41, %r10b movb %r10b, 0x1(%rdi,%r9) incq %r8 movq %rax, %r9 cmpq %r8, %rcx jne 0x1ae16 jmp 0x1ae5e xorl %eax, %eax cmpq %rsi, %rax jae 0x1ae8d movb $0x0, (%rdi,%rax) retq cmpq %rsi, %r9 jae 0x1ae72 movb $0x0, (%rdi,%r9) movq %r9, %rax cmpq %rcx, %r8 jae 0x1ae8d movzbl (%rdx,%r8), %esi incq %r8 shrl $0x7, %esi addq %rsi, %rax incq %rax jmp 0x1ae75 retq
utf8_encode_buf8: test rcx, rcx jz short loc_1AE5C xor r9d, r9d xor r8d, r8d loc_1AE16: mov r10b, [rdx+r8] test r10b, r10b js short loc_1AE2E lea rax, [r9+1] cmp rax, rsi jnb short loc_1AE68 mov [rdi+r9], r10b jmp short loc_1AE4F loc_1AE2E: lea rax, [r9+2] cmp rax, rsi jnb short loc_1AE68 mov r11d, r10d shr r11b, 6 or r11b, 0C0h mov [rdi+r9], r11b and r10b, 0BFh mov [rdi+r9+1], r10b loc_1AE4F: inc r8 mov r9, rax cmp rcx, r8 jnz short loc_1AE16 jmp short loc_1AE5E loc_1AE5C: xor eax, eax loc_1AE5E: cmp rax, rsi jnb short locret_1AE8D mov byte ptr [rdi+rax], 0 retn loc_1AE68: cmp r9, rsi jnb short loc_1AE72 mov byte ptr [rdi+r9], 0 loc_1AE72: mov rax, r9 loc_1AE75: cmp r8, rcx jnb short locret_1AE8D movzx esi, byte ptr [rdx+r8] inc r8 shr esi, 7 add rax, rsi inc rax jmp short loc_1AE75 locret_1AE8D: retn
unsigned long long utf8_encode_buf8(long long a1, unsigned long long a2, long long a3, unsigned long long a4) { unsigned long long v4; // r9 unsigned long long v5; // r8 char v6; // r10 unsigned long long result; // rax unsigned int v8; // esi if ( a4 ) { v4 = 0LL; v5 = 0LL; while ( 1 ) { v6 = *(_BYTE *)(a3 + v5); if ( v6 < 0 ) { result = v4 + 2; if ( v4 + 2 >= a2 ) { LABEL_13: if ( v4 < a2 ) *(_BYTE *)(a1 + v4) = 0; result = v4; while ( v5 < a4 ) { v8 = *(unsigned __int8 *)(a3 + v5++); result += (v8 >> 7) + 1LL; } return result; } *(_BYTE *)(a1 + v4) = ((unsigned __int8)v6 >> 6) | 0xC0; *(_BYTE *)(a1 + v4 + 1) = v6 & 0xBF; } else { result = v4 + 1; if ( v4 + 1 >= a2 ) goto LABEL_13; *(_BYTE *)(a1 + v4) = v6; } ++v5; v4 = result; if ( a4 == v5 ) goto LABEL_11; } } result = 0LL; LABEL_11: if ( result < a2 ) *(_BYTE *)(a1 + result) = 0; return result; }
utf8_encode_buf8: TEST RCX,RCX JZ 0x0011ae5c XOR R9D,R9D XOR R8D,R8D LAB_0011ae16: MOV R10B,byte ptr [RDX + R8*0x1] TEST R10B,R10B JS 0x0011ae2e LEA RAX,[R9 + 0x1] CMP RAX,RSI JNC 0x0011ae68 MOV byte ptr [RDI + R9*0x1],R10B JMP 0x0011ae4f LAB_0011ae2e: LEA RAX,[R9 + 0x2] CMP RAX,RSI JNC 0x0011ae68 MOV R11D,R10D SHR R11B,0x6 OR R11B,0xc0 MOV byte ptr [RDI + R9*0x1],R11B AND R10B,0xbf MOV byte ptr [RDI + R9*0x1 + 0x1],R10B LAB_0011ae4f: INC R8 MOV R9,RAX CMP RCX,R8 JNZ 0x0011ae16 JMP 0x0011ae5e LAB_0011ae5c: XOR EAX,EAX LAB_0011ae5e: CMP RAX,RSI JNC 0x0011ae8d MOV byte ptr [RDI + RAX*0x1],0x0 RET LAB_0011ae68: CMP R9,RSI JNC 0x0011ae72 MOV byte ptr [RDI + R9*0x1],0x0 LAB_0011ae72: MOV RAX,R9 LAB_0011ae75: CMP R8,RCX JNC 0x0011ae8d MOVZX ESI,byte ptr [RDX + R8*0x1] INC R8 SHR ESI,0x7 ADD RAX,RSI INC RAX JMP 0x0011ae75 LAB_0011ae8d: RET
ulong utf8_encode_buf8(long param_1,ulong param_2,long param_3,ulong param_4) { byte bVar1; ulong uVar2; ulong uVar3; ulong uVar4; if (param_4 == 0) { uVar2 = 0; } else { uVar4 = 0; uVar3 = 0; do { bVar1 = *(byte *)(param_3 + uVar4); if ((char)bVar1 < '\0') { uVar2 = uVar3 + 2; if (param_2 <= uVar2) goto LAB_0011ae68; *(byte *)(param_1 + uVar3) = bVar1 >> 6 | 0xc0; *(byte *)(param_1 + 1 + uVar3) = bVar1 & 0xbf; } else { uVar2 = uVar3 + 1; if (param_2 <= uVar2) { LAB_0011ae68: if (uVar3 < param_2) { *(int1 *)(param_1 + uVar3) = 0; } for (; uVar4 < param_4; uVar4 = uVar4 + 1) { uVar3 = uVar3 + (*(byte *)(param_3 + uVar4) >> 7) + 1; } return uVar3; } *(byte *)(param_1 + uVar3) = bVar1; } uVar4 = uVar4 + 1; uVar3 = uVar2; } while (param_4 != uVar4); } if (param_2 <= uVar2) { return uVar2; } *(int1 *)(param_1 + uVar2) = 0; return uVar2; }
51,558
utf8_encode_buf8
bluesky950520[P]quickjs/cutils.c
size_t utf8_encode_buf8(char *dest, size_t dest_len, const uint8_t *src, size_t src_len) { size_t i, j; uint32_t c; for (i = j = 0; i < src_len; i++) { c = src[i]; if (c < 0x80) { if (j + 1 >= dest_len) goto overflow; dest[j++] = c; } else { if (j + 2 >= dest_len) goto overflow; dest[j++] = (c >> 6) | 0xC0; dest[j++] = (c & 0x3F) | 0x80; } } if (j < dest_len) dest[j] = '\0'; return j; overflow: if (j < dest_len) dest[j] = '\0'; while (i < src_len) j += 1 + (src[i++] >= 0x80); return j; }
O3
c
utf8_encode_buf8: testq %rcx, %rcx je 0x1b763 xorl %eax, %eax xorl %r8d, %r8d movb (%rdx,%r8), %r10b testb %r10b, %r10b js 0x1b735 leaq 0x1(%rax), %r9 cmpq %rsi, %r9 jae 0x1b779 movb %r10b, (%rdi,%rax) jmp 0x1b756 leaq 0x2(%rax), %r9 cmpq %rsi, %r9 jae 0x1b779 movl %r10d, %r11d shrb $0x6, %r11b orb $-0x40, %r11b movb %r11b, (%rdi,%rax) andb $-0x41, %r10b movb %r10b, 0x1(%rdi,%rax) incq %r8 movq %r9, %rax cmpq %r8, %rcx jne 0x1b71d jmp 0x1b770 xorl %r9d, %r9d movl $0x0, %eax testq %rsi, %rsi je 0x1b79a movb $0x0, (%rdi,%r9) movq %r9, %rax retq cmpq %rsi, %rax jae 0x1b795 movb $0x0, (%rdi,%rax) jmp 0x1b795 movzbl (%rdx,%r8), %esi incq %r8 shrl $0x7, %esi addq %rsi, %rax incq %rax cmpq %rcx, %r8 jb 0x1b784 retq
utf8_encode_buf8: test rcx, rcx jz short loc_1B763 xor eax, eax xor r8d, r8d loc_1B71D: mov r10b, [rdx+r8] test r10b, r10b js short loc_1B735 lea r9, [rax+1] cmp r9, rsi jnb short loc_1B779 mov [rdi+rax], r10b jmp short loc_1B756 loc_1B735: lea r9, [rax+2] cmp r9, rsi jnb short loc_1B779 mov r11d, r10d shr r11b, 6 or r11b, 0C0h mov [rdi+rax], r11b and r10b, 0BFh mov [rdi+rax+1], r10b loc_1B756: inc r8 mov rax, r9 cmp rcx, r8 jnz short loc_1B71D jmp short loc_1B770 loc_1B763: xor r9d, r9d mov eax, 0 test rsi, rsi jz short locret_1B79A loc_1B770: mov byte ptr [rdi+r9], 0 mov rax, r9 retn loc_1B779: cmp rax, rsi jnb short loc_1B795 mov byte ptr [rdi+rax], 0 jmp short loc_1B795 loc_1B784: movzx esi, byte ptr [rdx+r8] inc r8 shr esi, 7 add rax, rsi inc rax loc_1B795: cmp r8, rcx jb short loc_1B784 locret_1B79A: retn
unsigned long long utf8_encode_buf8(long long a1, unsigned long long a2, long long a3, unsigned long long a4) { unsigned long long result; // rax unsigned long long v5; // r8 char v6; // r10 unsigned long long v7; // r9 unsigned int v8; // esi if ( a4 ) { result = 0LL; v5 = 0LL; while ( 1 ) { v6 = *(_BYTE *)(a3 + v5); if ( v6 < 0 ) { v7 = result + 2; if ( result + 2 >= a2 ) { LABEL_12: if ( result < a2 ) *(_BYTE *)(a1 + result) = 0; while ( v5 < a4 ) { v8 = *(unsigned __int8 *)(a3 + v5++); result += (v8 >> 7) + 1LL; } return result; } *(_BYTE *)(a1 + result) = ((unsigned __int8)v6 >> 6) | 0xC0; *(_BYTE *)(a1 + result + 1) = v6 & 0xBF; } else { v7 = result + 1; if ( result + 1 >= a2 ) goto LABEL_12; *(_BYTE *)(a1 + result) = v6; } ++v5; result = v7; if ( a4 == v5 ) goto LABEL_11; } } v7 = 0LL; result = 0LL; if ( a2 ) { LABEL_11: *(_BYTE *)(a1 + v7) = 0; return v7; } return result; }
utf8_encode_buf8: TEST RCX,RCX JZ 0x0011b763 XOR EAX,EAX XOR R8D,R8D LAB_0011b71d: MOV R10B,byte ptr [RDX + R8*0x1] TEST R10B,R10B JS 0x0011b735 LEA R9,[RAX + 0x1] CMP R9,RSI JNC 0x0011b779 MOV byte ptr [RDI + RAX*0x1],R10B JMP 0x0011b756 LAB_0011b735: LEA R9,[RAX + 0x2] CMP R9,RSI JNC 0x0011b779 MOV R11D,R10D SHR R11B,0x6 OR R11B,0xc0 MOV byte ptr [RDI + RAX*0x1],R11B AND R10B,0xbf MOV byte ptr [RDI + RAX*0x1 + 0x1],R10B LAB_0011b756: INC R8 MOV RAX,R9 CMP RCX,R8 JNZ 0x0011b71d JMP 0x0011b770 LAB_0011b763: XOR R9D,R9D MOV EAX,0x0 TEST RSI,RSI JZ 0x0011b79a LAB_0011b770: MOV byte ptr [RDI + R9*0x1],0x0 MOV RAX,R9 RET LAB_0011b779: CMP RAX,RSI JNC 0x0011b795 MOV byte ptr [RDI + RAX*0x1],0x0 JMP 0x0011b795 LAB_0011b784: MOVZX ESI,byte ptr [RDX + R8*0x1] INC R8 SHR ESI,0x7 ADD RAX,RSI INC RAX LAB_0011b795: CMP R8,RCX JC 0x0011b784 LAB_0011b79a: RET
ulong utf8_encode_buf8(long param_1,ulong param_2,long param_3,ulong param_4) { byte bVar1; ulong uVar2; ulong uVar3; if (param_4 == 0) { uVar2 = 0; if (param_2 == 0) { return 0; } } else { uVar2 = 0; uVar3 = 0; do { bVar1 = *(byte *)(param_3 + uVar3); if ((char)bVar1 < '\0') { if (param_2 <= uVar2 + 2) goto LAB_0011b779; *(byte *)(param_1 + uVar2) = bVar1 >> 6 | 0xc0; *(byte *)(param_1 + 1 + uVar2) = bVar1 & 0xbf; uVar2 = uVar2 + 2; } else { if (param_2 <= uVar2 + 1) { LAB_0011b779: if (uVar2 < param_2) { *(int1 *)(param_1 + uVar2) = 0; } for (; uVar3 < param_4; uVar3 = uVar3 + 1) { uVar2 = uVar2 + (*(byte *)(param_3 + uVar3) >> 7) + 1; } return uVar2; } *(byte *)(param_1 + uVar2) = bVar1; uVar2 = uVar2 + 1; } uVar3 = uVar3 + 1; } while (param_4 != uVar3); } *(int1 *)(param_1 + uVar2) = 0; return uVar2; }
51,559
translog_set_sent_to_disk
eloqsql/storage/maria/ma_loghandler.c
static void translog_set_sent_to_disk(struct st_translog_buffer *buffer) { LSN lsn= buffer->last_lsn; TRANSLOG_ADDRESS in_buffers= buffer->next_buffer_offset; DBUG_ENTER("translog_set_sent_to_disk"); mysql_mutex_lock(&log_descriptor.sent_to_disk_lock); DBUG_PRINT("enter", ("lsn: " LSN_FMT " in_buffers: " LSN_FMT " " "in_buffers_only: " LSN_FMT " start: " LSN_FMT " " "sent_to_disk: " LSN_FMT, LSN_IN_PARTS(lsn), LSN_IN_PARTS(in_buffers), LSN_IN_PARTS(log_descriptor.log_start), LSN_IN_PARTS(log_descriptor.in_buffers_only), LSN_IN_PARTS(log_descriptor.sent_to_disk))); /* We write sequentially (first part of following assert) but we rewrite the same page in case we started mysql and shut it down immediately (second part of the following assert) */ DBUG_ASSERT(cmp_translog_addr(lsn, log_descriptor.sent_to_disk) >= 0 || cmp_translog_addr(lsn, log_descriptor.log_start) < 0); log_descriptor.sent_to_disk= lsn; /* LSN_IMPOSSIBLE == 0 => it will work for very first time */ if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0) { log_descriptor.in_buffers_only= in_buffers; DBUG_PRINT("info", ("set new in_buffers_only")); } mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock); DBUG_VOID_RETURN; }
O3
c
translog_set_sent_to_disk: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 cmpq $0x0, 0xbaf259(%rip) # 0xbff4c0 jne 0x502a8 leaq 0xbaf210(%rip), %rdi # 0xbff480 callq 0x29220 movq %r14, 0xbaf1e4(%rip) # 0xbff460 cmpq %rbx, 0xbaf1f5(%rip) # 0xbff478 jge 0x5028c movq %rbx, 0xbaf1ec(%rip) # 0xbff478 movq 0xbaf22d(%rip), %rdi # 0xbff4c0 testq %rdi, %rdi jne 0x502af leaq 0xbaf1e1(%rip), %rdi # 0xbff480 popq %rbx popq %r14 popq %rbp jmp 0x291e0 callq 0x2cf08 jmp 0x50275 leaq 0x335d5a(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x50298
translog_set_sent_to_disk: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi cmp cs:qword_BFF4C0, 0 jnz short loc_502A8 lea rdi, unk_BFF480 call _pthread_mutex_lock loc_50275: mov cs:qword_BFF460, r14 cmp cs:qword_BFF478, rbx jge short loc_5028C mov cs:qword_BFF478, rbx loc_5028C: mov rdi, cs:qword_BFF4C0 test rdi, rdi jnz short loc_502AF loc_50298: lea rdi, unk_BFF480 pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_502A8: call translog_set_sent_to_disk_cold_1 jmp short loc_50275 loc_502AF: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_50298
long long translog_set_sent_to_disk(long long a1, long long a2) { if ( qword_BFF4C0 ) translog_set_sent_to_disk_cold_1(); else pthread_mutex_lock(&unk_BFF480); qword_BFF460 = a1; if ( qword_BFF478 < a2 ) qword_BFF478 = a2; if ( qword_BFF4C0 ) PSI_server[44](); return pthread_mutex_unlock(&unk_BFF480); }
translog_set_sent_to_disk: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI CMP qword ptr [0x00cff4c0],0x0 JNZ 0x001502a8 LEA RDI,[0xcff480] CALL 0x00129220 LAB_00150275: MOV qword ptr [0x00cff460],R14 CMP qword ptr [0x00cff478],RBX JGE 0x0015028c MOV qword ptr [0x00cff478],RBX LAB_0015028c: MOV RDI,qword ptr [0x00cff4c0] TEST RDI,RDI JNZ 0x001502af LAB_00150298: LEA RDI,[0xcff480] POP RBX POP R14 POP RBP JMP 0x001291e0 LAB_001502a8: CALL 0x0012cf08 JMP 0x00150275 LAB_001502af: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00150298
void translog_set_sent_to_disk(int8 param_1,long param_2) { if (DAT_00cff4c0 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff480); } else { translog_set_sent_to_disk_cold_1(); } if (DAT_00cff478 < param_2) { DAT_00cff478 = param_2; } DAT_00cff460 = param_1; if (DAT_00cff4c0 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff480); return; }
51,560
File::Copy(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, bool)
Dolphin-anty/Source/Core/Common/FileUtil.cpp
bool Copy(std::string_view source_path, std::string_view dest_path, bool overwrite_existing) { DEBUG_LOG_FMT(COMMON, "{}: {} --> {} ({})", __func__, source_path, dest_path, overwrite_existing ? "overwrite" : "preserve"); auto src_path = StringToPath(source_path); auto dst_path = StringToPath(dest_path); std::error_code error; auto options = fs::copy_options::recursive; if (overwrite_existing) options |= fs::copy_options::overwrite_existing; fs::copy(src_path, dst_path, options, error); if (error) { std::error_code error_ignored; if (fs::equivalent(src_path, dst_path, error_ignored)) return true; ERROR_LOG_FMT(COMMON, "{}: failed {} --> {} ({}): {}", __func__, source_path, dest_path, overwrite_existing ? "overwrite" : "preserve", error.message()); return false; } return true; }
O0
cpp
File::Copy(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>, bool): pushq %rbx subq $0x130, %rsp # imm = 0x130 movb %r8b, %al movq %rdi, 0x118(%rsp) movq %rsi, 0x120(%rsp) movq %rdx, 0x108(%rsp) movq %rcx, 0x110(%rsp) andb $0x1, %al movb %al, 0x107(%rsp) jmp 0x43f76 jmp 0x43f78 jmp 0x43f7a movq 0x118(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0x120(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xc8(%rsp), %rsi movq 0xd0(%rsp), %rdx leaq 0xd8(%rsp), %rdi callq 0x28f70 movq 0x108(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x110(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx leaq 0xa0(%rsp), %rdi callq 0x28f70 leaq 0x80(%rsp), %rdi callq 0x475a0 movw $0x8, 0x7e(%rsp) testb $0x1, 0x107(%rsp) je 0x44021 leaq 0x7e(%rsp), %rdi movl $0x2, %esi callq 0x47a90 leaq 0xd8(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x80(%rsp), %rcx movzwl 0x7e(%rsp), %edx callq 0x9ba0 leaq 0x80(%rsp), %rdi callq 0x475d0 testb $0x1, %al jne 0x44059 jmp 0x44158 leaq 0x68(%rsp), %rdi callq 0x475a0 leaq 0xd8(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0x9290 testb $0x1, %al jne 0x44083 jmp 0x44098 movb $0x1, 0x12f(%rsp) movl $0x1, 0x64(%rsp) jmp 0x44168 jmp 0x4409a jmp 0x4409c movq $0x5, 0x58(%rsp) leaq 0x56(%rsp), %rdi callq 0x44330 movb 0x107(%rsp), %dl leaq 0x5c090(%rip), %rax # 0xa014d leaq 0x5c07f(%rip), %rcx # 0xa0143 testb $0x1, %dl cmovneq %rcx, %rax movq %rax, 0x48(%rsp) leaq 0x28(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x47690 movl $0x2, %edi movl $0x6, %esi leaq 0x5bf87(%rip), %rdx # 0xa007a movl $0x231, %ecx # imm = 0x231 leaq 0x57(%rsp), %r8 leaq 0x5c03a(%rip), %r9 # 0xa013e leaq 0x118(%rsp), %rbx leaq 0x108(%rsp), %r11 leaq 0x48(%rsp), %r10 leaq 0x28(%rsp), %rax movq %rbx, (%rsp) movq %r11, 0x8(%rsp) movq %r10, 0x10(%rsp) movq %rax, 0x18(%rsp) callq 0x441a0 leaq 0x28(%rsp), %rdi callq 0x12a10 jmp 0x44142 jmp 0x44144 jmp 0x44146 movb $0x0, 0x12f(%rsp) movl $0x1, 0x64(%rsp) jmp 0x44168 movb $0x1, 0x12f(%rsp) movl $0x1, 0x64(%rsp) leaq 0xa0(%rsp), %rdi callq 0x47640 leaq 0xd8(%rsp), %rdi callq 0x47640 movb 0x12f(%rsp), %al andb $0x1, %al addq $0x130, %rsp # imm = 0x130 popq %rbx retq nopw %cs:(%rax,%rax)
_ZN4File4CopyESt17basic_string_viewIcSt11char_traitsIcEES3_b: push rbx sub rsp, 130h mov al, r8b mov [rsp+138h+var_20], rdi mov [rsp+138h+var_18], rsi mov [rsp+138h+var_30], rdx mov [rsp+138h+var_28], rcx and al, 1 mov [rsp+138h+var_31], al jmp short $+2 loc_43F76: jmp short $+2 loc_43F78: jmp short $+2 loc_43F7A: mov rax, [rsp+138h+var_20] mov [rsp+138h+var_70], rax mov rax, [rsp+138h+var_18] mov [rsp+138h+var_68], rax mov rsi, [rsp+138h+var_70] mov rdx, [rsp+138h+var_68] lea rdi, [rsp+138h+var_60] call _Z12StringToPathB5cxx11St17basic_string_viewIcSt11char_traitsIcEE; StringToPath(std::string_view) mov rax, [rsp+138h+var_30] mov [rsp+138h+var_A8], rax mov rax, [rsp+138h+var_28] mov [rsp+138h+var_A0], rax mov rsi, [rsp+138h+var_A8] mov rdx, [rsp+138h+var_A0] lea rdi, [rsp+138h+var_98] call _Z12StringToPathB5cxx11St17basic_string_viewIcSt11char_traitsIcEE; StringToPath(std::string_view) lea rdi, [rsp+138h+var_B8]; this call _ZNSt10error_codeC2Ev; std::error_code::error_code(void) mov [rsp+138h+var_BA], 8 test [rsp+138h+var_31], 1 jz short loc_44021 lea rdi, [rsp+138h+var_BA] mov esi, 2 call _ZNSt10filesystemoRERNS_12copy_optionsES0_; std::filesystem::operator|=(std::filesystem::copy_options &,std::filesystem::copy_options) loc_44021: lea rdi, [rsp+138h+var_60] lea rsi, [rsp+138h+var_98] lea rcx, [rsp+138h+var_B8] movzx edx, [rsp+138h+var_BA] call __ZNSt10filesystem4copyERKNS_7__cxx114pathES3_NS_12copy_optionsERSt10error_code; std::filesystem::copy(std::filesystem::__cxx11::path const&,std::filesystem::__cxx11::path const&,std::filesystem::copy_options,std::error_code &) lea rdi, [rsp+138h+var_B8] call _ZNKSt10error_codecvbEv; std::error_code::operator bool(void) test al, 1 jnz short loc_44059 jmp loc_44158 loc_44059: lea rdi, [rsp+138h+var_D0]; this call _ZNSt10error_codeC2Ev; std::error_code::error_code(void) lea rdi, [rsp+138h+var_60]; this lea rsi, [rsp+138h+var_98]; std::filesystem::__cxx11::path * lea rdx, [rsp+138h+var_D0]; std::filesystem::__cxx11::path * call __ZNSt10filesystem10equivalentERKNS_7__cxx114pathES3_RSt10error_code; std::filesystem::equivalent(std::filesystem::__cxx11::path const&,std::filesystem::__cxx11::path const&,std::error_code &) test al, 1 jnz short loc_44083 jmp short loc_44098 loc_44083: mov [rsp+138h+var_9], 1 mov [rsp+138h+var_D4], 1 jmp loc_44168 loc_44098: jmp short $+2 loc_4409A: jmp short $+2 loc_4409C: mov [rsp+138h+var_E0], 5 lea rdi, [rsp+138h+var_E2] call _ZZN4File4CopyESt17basic_string_viewIcSt11char_traitsIcEES3_bENK3$_1clEv; File::Copy(std::string_view,std::string_view,bool)::$_1::operator()(void) mov dl, [rsp+138h+var_31] lea rax, aPreserve; "preserve" lea rcx, aOverwrite; "overwrite" test dl, 1 cmovnz rax, rcx mov [rsp+138h+var_F0], rax lea rdi, [rsp+138h+var_110] lea rsi, [rsp+138h+var_B8] call _ZNKSt10error_code7messageB5cxx11Ev; std::error_code::message(void) mov edi, 2 mov esi, 6 lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/Dolphi"... mov ecx, 231h lea r8, [rsp+138h+var_E1] lea r9, aCopy; "Copy" lea rbx, [rsp+138h+var_20] lea r11, [rsp+138h+var_30] lea r10, [rsp+138h+var_F0] lea rax, [rsp+138h+var_110] mov [rsp+138h+var_138], rbx mov [rsp+138h+var_130], r11 mov [rsp+138h+var_128], r10 mov [rsp+138h+var_120], rax call _ZN6Common3Log13GenericLogFmtILm5EZZN4File4CopyESt17basic_string_viewIcSt11char_traitsIcEES6_bENK3$_1clEvE18FMT_COMPILE_STRINGJA5_cS6_S6_PKcNSt7__cxx1112basic_stringIcS5_SaIcEEEEEEvNS0_8LogLevelENS0_7LogTypeESB_iRKT0_DpRKT1_; Common::Log::GenericLogFmt<5ul,File::Copy(std::string_view,std::string_view,bool)::$_1::operator() const(void)::FMT_COMPILE_STRING,char [5],std::string_view,std::string_view,char const*,std::string>(Common::Log::LogLevel,Common::Log::LogType,char const*,int,File::Copy(std::string_view,std::string_view,bool)::$_1::operator() const(void)::FMT_COMPILE_STRING const&,char [5],std::string_view,std::string_view,char const*,std::string const&) lea rdi, [rsp+138h+var_110]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short $+2 loc_44142: jmp short $+2 loc_44144: jmp short $+2 loc_44146: mov [rsp+138h+var_9], 0 mov [rsp+138h+var_D4], 1 jmp short loc_44168 loc_44158: mov [rsp+138h+var_9], 1 mov [rsp+138h+var_D4], 1 loc_44168: lea rdi, [rsp+138h+var_98]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() lea rdi, [rsp+138h+var_60]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov al, [rsp+138h+var_9] and al, 1 add rsp, 130h pop rbx retn
char File::Copy(long long a1, long long a2, long long a3, long long a4, char a5) { std::error_code *v5; // rcx const char *v6; // rax _BYTE v8[32]; // [rsp+28h] [rbp-110h] BYREF const char *v9; // [rsp+48h] [rbp-F0h] BYREF char v10; // [rsp+56h] [rbp-E2h] BYREF char v11; // [rsp+57h] [rbp-E1h] BYREF long long v12; // [rsp+58h] [rbp-E0h] int v13; // [rsp+64h] [rbp-D4h] _BYTE v14[22]; // [rsp+68h] [rbp-D0h] BYREF unsigned __int16 v15; // [rsp+7Eh] [rbp-BAh] BYREF _BYTE v16[16]; // [rsp+80h] [rbp-B8h] BYREF long long v17; // [rsp+90h] [rbp-A8h] long long v18; // [rsp+98h] [rbp-A0h] _BYTE v19[40]; // [rsp+A0h] [rbp-98h] BYREF long long v20; // [rsp+C8h] [rbp-70h] long long v21; // [rsp+D0h] [rbp-68h] _BYTE v22[47]; // [rsp+D8h] [rbp-60h] BYREF char v23; // [rsp+107h] [rbp-31h] long long v24; // [rsp+108h] [rbp-30h] BYREF long long v25; // [rsp+110h] [rbp-28h] _QWORD v26[2]; // [rsp+118h] [rbp-20h] BYREF char v27; // [rsp+12Fh] [rbp-9h] v26[0] = a1; v26[1] = a2; v24 = a3; v25 = a4; v23 = a5 & 1; v20 = a1; v21 = a2; StringToPath[abi:cxx11]((long long)v22, a1, a2); v17 = v24; v18 = v25; StringToPath[abi:cxx11]((long long)v19, v24, v25); std::error_code::error_code((std::error_code *)v16); v15 = 8; if ( (v23 & 1) != 0 ) std::filesystem::operator|=(&v15, 2LL); std::filesystem::copy(v22, v19, v15, v16); if ( (std::error_code::operator bool(v16) & 1) != 0 ) { std::error_code::error_code((std::error_code *)v14); if ( (std::filesystem::equivalent( (std::filesystem *)v22, (const std::filesystem::__cxx11::path *)v19, (const std::filesystem::__cxx11::path *)v14, v5) & 1) != 0 ) { v27 = 1; v13 = 1; } else { v12 = 5LL; File::Copy(std::string_view,std::string_view,bool)::$_1::operator()(&v10); v6 = "preserve"; if ( (v23 & 1) != 0 ) v6 = "overwrite"; v9 = v6; std::error_code::message[abi:cxx11](v8, v16); Common::Log::GenericLogFmt<5ul,File::Copy(std::string_view,std::string_view,bool)::$_1::operator() const(void)::FMT_COMPILE_STRING,char [5],std::string_view,std::string_view,char const*,std::string>( 2, 6, (unsigned int)"/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp", 561, (unsigned int)&v11, (unsigned int)"Copy", (long long)v26, (long long)&v24, (long long)&v9, (long long)v8); std::string::~string(v8); v27 = 0; v13 = 1; } } else { v27 = 1; v13 = 1; } std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v19); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v22); return v27 & 1; }
Copy: PUSH RBX SUB RSP,0x130 MOV AL,R8B MOV qword ptr [RSP + 0x118],RDI MOV qword ptr [RSP + 0x120],RSI MOV qword ptr [RSP + 0x108],RDX MOV qword ptr [RSP + 0x110],RCX AND AL,0x1 MOV byte ptr [RSP + 0x107],AL JMP 0x00143f76 LAB_00143f76: JMP 0x00143f78 LAB_00143f78: JMP 0x00143f7a LAB_00143f7a: MOV RAX,qword ptr [RSP + 0x118] MOV qword ptr [RSP + 0xc8],RAX MOV RAX,qword ptr [RSP + 0x120] MOV qword ptr [RSP + 0xd0],RAX MOV RSI,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] LEA RDI,[RSP + 0xd8] CALL 0x00128f70 MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x110] MOV qword ptr [RSP + 0x98],RAX MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] LEA RDI,[RSP + 0xa0] CALL 0x00128f70 LEA RDI,[RSP + 0x80] CALL 0x001475a0 MOV word ptr [RSP + 0x7e],0x8 TEST byte ptr [RSP + 0x107],0x1 JZ 0x00144021 LEA RDI,[RSP + 0x7e] MOV ESI,0x2 CALL 0x00147a90 LAB_00144021: LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0xa0] LEA RCX,[RSP + 0x80] MOVZX EDX,word ptr [RSP + 0x7e] CALL 0x00109ba0 LEA RDI,[RSP + 0x80] CALL 0x001475d0 TEST AL,0x1 JNZ 0x00144059 JMP 0x00144158 LAB_00144059: LEA RDI,[RSP + 0x68] CALL 0x001475a0 LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0xa0] LEA RDX,[RSP + 0x68] CALL 0x00109290 TEST AL,0x1 JNZ 0x00144083 JMP 0x00144098 LAB_00144083: MOV byte ptr [RSP + 0x12f],0x1 MOV dword ptr [RSP + 0x64],0x1 JMP 0x00144168 LAB_00144098: JMP 0x0014409a LAB_0014409a: JMP 0x0014409c LAB_0014409c: MOV qword ptr [RSP + 0x58],0x5 LEA RDI,[RSP + 0x56] CALL 0x00144330 MOV DL,byte ptr [RSP + 0x107] LEA RAX,[0x1a014d] LEA RCX,[0x1a0143] TEST DL,0x1 CMOVNZ RAX,RCX MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x80] CALL 0x00147690 MOV EDI,0x2 MOV ESI,0x6 LEA RDX,[0x1a007a] MOV ECX,0x231 LEA R8,[RSP + 0x57] LEA R9,[0x1a013e] LEA RBX,[RSP + 0x118] LEA R11,[RSP + 0x108] LEA R10,[RSP + 0x48] LEA RAX,[RSP + 0x28] MOV qword ptr [RSP],RBX MOV qword ptr [RSP + 0x8],R11 MOV qword ptr [RSP + 0x10],R10 MOV qword ptr [RSP + 0x18],RAX CALL 0x001441a0 LEA RDI,[RSP + 0x28] CALL 0x00112a10 JMP 0x00144142 LAB_00144142: JMP 0x00144144 LAB_00144144: JMP 0x00144146 LAB_00144146: MOV byte ptr [RSP + 0x12f],0x0 MOV dword ptr [RSP + 0x64],0x1 JMP 0x00144168 LAB_00144158: MOV byte ptr [RSP + 0x12f],0x1 MOV dword ptr [RSP + 0x64],0x1 LAB_00144168: LEA RDI,[RSP + 0xa0] CALL 0x00147640 LEA RDI,[RSP + 0xd8] CALL 0x00147640 MOV AL,byte ptr [RSP + 0x12f] AND AL,0x1 ADD RSP,0x130 POP RBX RET
/* File::Copy(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, bool) */ ulong File::Copy(int8 param_1,int8 param_2,int8 param_3,int8 param_4, byte param_5) { bool bVar1; ulong uVar2; int8 uVar3; string local_110 [32]; char *local_f0; __1 local_e2; int1 local_e1; int8 local_e0; int4 local_d4; error_code local_d0 [22]; int2 local_ba; error_code local_b8 [16]; int8 local_a8; int8 local_a0; path local_98 [40]; int8 local_70; int8 local_68; path local_60 [47]; byte local_31; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int1 local_9; local_31 = param_5 & 1; local_70 = param_1; local_68 = param_2; local_30 = param_3; local_28 = param_4; local_20 = param_1; local_18 = param_2; StringToPath_abi_cxx11_(local_60,param_1,param_2); local_a8 = local_30; local_a0 = local_28; StringToPath_abi_cxx11_(local_98,local_30,local_28); std::error_code::error_code(local_b8); local_ba = 8; if ((local_31 & 1) != 0) { std::filesystem::operator|=(&local_ba,2); } std::filesystem::copy(local_60,local_98,local_ba,local_b8); bVar1 = std::error_code::operator_cast_to_bool(local_b8); if (bVar1) { std::error_code::error_code(local_d0); uVar2 = std::filesystem::equivalent(local_60,local_98,local_d0); if ((uVar2 & 1) == 0) { local_e0 = 5; Copy(std::basic_string_view<char,std::char_traits<char>>,std::basic_string_view<char,std::char_traits<char>>,bool) ::$_1::operator()(&local_e2); local_f0 = "preserve"; if ((local_31 & 1) != 0) { local_f0 = "overwrite"; } std::error_code::message_abi_cxx11_(); Common::Log::operator() (2,6,"/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp" ,0x231,&local_e1,&DAT_001a013e,&local_20,&local_30,&local_f0,local_110); std::__cxx11::string::~string(local_110); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 1; } local_d4 = 1; std::filesystem::__cxx11::path::~path(local_98); uVar3 = std::filesystem::__cxx11::path::~path(local_60); return CONCAT71((int7)((ulong)uVar3 >> 8),local_9) & 0xffffffffffffff01; }
51,561
get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)())
eloqsql/storage/perfschema/pfs_timer.cc
ulonglong get_timer_raw_value_and_function(enum_timer_name timer_name, timer_fct_t *fct) { switch (timer_name) { case TIMER_NAME_CYCLE: *fct= my_timer_cycles; return my_timer_cycles(); case TIMER_NAME_NANOSEC: *fct= my_timer_nanoseconds; return my_timer_nanoseconds(); case TIMER_NAME_MICROSEC: *fct= my_timer_microseconds; return my_timer_microseconds(); case TIMER_NAME_MILLISEC: *fct= my_timer_milliseconds; return my_timer_milliseconds(); case TIMER_NAME_TICK: *fct= my_timer_ticks; return my_timer_ticks(); default: *fct= NULL; assert(false); } return 0; }
O3
cpp
get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)()): pushq %rbp movq %rsp, %rbp decl %edi cmpl $0x4, %edi ja 0x33f4f leaq 0x4f947(%rip), %rax # 0x83838 movslq (%rax,%rdi,4), %rcx addq %rax, %rcx jmpq *%rcx leaq -0x73(%rip), %rax # 0x33e8e movq %rax, (%rsi) rdtsc shlq $0x20, %rdx orq %rdx, %rax jmp 0x33f58 leaq 0x15433(%rip), %rax # 0x49349 movq %rax, (%rsi) popq %rbp jmp 0x49349 leaq 0x153a7(%rip), %rax # 0x492cd movq %rax, (%rsi) popq %rbp jmp 0x492cd leaq 0x153d3(%rip), %rax # 0x49309 movq %rax, (%rsi) popq %rbp jmp 0x49309 leaq 0x1535e(%rip), %rax # 0x492a4 movq %rax, (%rsi) popq %rbp jmp 0x492a4 movq $0x0, (%rsi) xorl %eax, %eax popq %rbp retq
_Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE: push rbp mov rbp, rsp dec edi; switch 5 cases cmp edi, 4 ja short def_33EF8; jumptable 0000000000033EF8 default case lea rax, jpt_33EF8 movsxd rcx, ds:(jpt_33EF8 - 83838h)[rax+rdi*4] add rcx, rax jmp rcx; switch jump loc_33EFA: lea rax, _ZL15my_timer_cyclesv; jumptable 0000000000033EF8 case 1 mov [rsi], rax rdtsc shl rdx, 20h or rax, rdx jmp short loc_33F58 loc_33F0F: lea rax, my_timer_ticks; jumptable 0000000000033EF8 case 5 mov [rsi], rax pop rbp jmp my_timer_ticks loc_33F1F: lea rax, my_timer_microseconds; jumptable 0000000000033EF8 case 3 mov [rsi], rax pop rbp jmp my_timer_microseconds loc_33F2F: lea rax, my_timer_milliseconds; jumptable 0000000000033EF8 case 4 mov [rsi], rax pop rbp jmp my_timer_milliseconds loc_33F3F: lea rax, my_timer_nanoseconds; jumptable 0000000000033EF8 case 2 mov [rsi], rax pop rbp jmp my_timer_nanoseconds def_33EF8: mov qword ptr [rsi], 0; jumptable 0000000000033EF8 default case xor eax, eax loc_33F58: pop rbp retn
long long get_timer_raw_value_and_function(int a1, unsigned long long (**a2)(void)) { long long result; // rax switch ( a1 ) { case 1: *a2 = my_timer_cycles; result = __rdtsc(); break; case 2: *a2 = (unsigned long long (*)(void))my_timer_nanoseconds; result = my_timer_nanoseconds(); break; case 3: *a2 = (unsigned long long (*)(void))my_timer_microseconds; result = my_timer_microseconds(); break; case 4: *a2 = (unsigned long long (*)(void))my_timer_milliseconds; result = my_timer_milliseconds(); break; case 5: *a2 = (unsigned long long (*)(void))my_timer_ticks; result = my_timer_ticks(); break; default: *a2 = 0LL; result = 0LL; break; } return result; }
get_timer_raw_value_and_function: PUSH RBP MOV RBP,RSP DEC EDI CMP EDI,0x4 JA 0x00133f4f LEA RAX,[0x183838] MOVSXD RCX,dword ptr [RAX + RDI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_1: LEA RAX,[0x133e8e] MOV qword ptr [RSI],RAX RDTSC SHL RDX,0x20 OR RAX,RDX JMP 0x00133f58 caseD_5: LEA RAX,[0x149349] MOV qword ptr [RSI],RAX POP RBP JMP 0x00149349 caseD_3: LEA RAX,[0x1492cd] MOV qword ptr [RSI],RAX POP RBP JMP 0x001492cd caseD_4: LEA RAX,[0x149309] MOV qword ptr [RSI],RAX POP RBP JMP 0x00149309 caseD_2: LEA RAX,[0x1492a4] MOV qword ptr [RSI],RAX POP RBP JMP 0x001492a4 default: MOV qword ptr [RSI],0x0 XOR EAX,EAX LAB_00133f58: POP RBP RET
/* get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)()) */ int8 get_timer_raw_value_and_function(int4 param_1,int8 *param_2) { int8 uVar1; switch(param_1) { case 1: *param_2 = my_timer_cycles; uVar1 = rdtsc(); break; case 2: *param_2 = my_timer_nanoseconds; uVar1 = my_timer_nanoseconds(); return uVar1; case 3: *param_2 = my_timer_microseconds; uVar1 = my_timer_microseconds(); return uVar1; case 4: *param_2 = my_timer_milliseconds; uVar1 = my_timer_milliseconds(); return uVar1; case 5: *param_2 = my_timer_ticks; uVar1 = my_timer_ticks(); return uVar1; default: *param_2 = 0; uVar1 = 0; } return uVar1; }
51,562
mi_read_pack_record
eloqsql/storage/myisam/mi_packrec.c
int _mi_read_pack_record(MI_INFO *info, my_off_t filepos, uchar *buf) { MI_BLOCK_INFO block_info; File file; DBUG_ENTER("mi_read_pack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(-1); /* _search() didn't find record */ file=info->dfile; if (_mi_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, file, filepos)) goto err; if (mysql_file_read(file, (uchar*) info->rec_buff + block_info.offset, block_info.rec_len - block_info.offset, MYF(MY_NABP))) goto panic; info->update|= HA_STATE_AKTIV; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf, info->rec_buff, block_info.rec_len)); panic: my_errno=HA_ERR_WRONG_IN_RECORD; err: DBUG_RETURN(-1); }
O3
c
mi_read_pack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq $-0x1, %rsi je 0x827f2 movq %rdx, %r12 movq %rsi, %r9 movq %rdi, %r15 movl 0x1c0(%rdi), %r13d leaq 0x50(%rdi), %rbx leaq 0x120(%rdi), %r14 leaq -0x88(%rbp), %rdx movq %rbx, %rsi movq %r14, %rcx movl %r13d, %r8d callq 0x828b9 testl %eax, %eax jne 0x827ed movq %r12, -0x98(%rbp) movl -0x34(%rbp), %eax movq (%r14), %r12 addq %rax, %r12 movq -0x70(%rbp), %r14 subq %rax, %r14 leaq 0x30591a(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq -0xe0(%rbp), %rdi movl %r13d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x8284d movl $0x4, %ecx movl %r13d, %edi movq %r12, %rsi movq %r14, %rdx callq 0xa18cc movq %rax, %r12 testq %r12, %r12 je 0x82817 callq 0xa2a4e movl $0x7f, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x828b4 addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq orb $0x2, 0x1d0(%r15) movq 0x120(%r15), %rax movq -0x70(%rbp), %rcx movb $0x0, (%rax,%rcx) movq 0x120(%r15), %rcx movq -0x70(%rbp), %r8 movq %r15, %rdi movq %rbx, %rsi movq -0x98(%rbp), %rdx callq 0x82b57 jmp 0x827f2 movq %rax, %rcx leaq 0x305869(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq 0x5a7d4(%rip), %rdx # 0xdd035 movq %rcx, -0x90(%rbp) movq %rcx, %rdi movq %r14, %rsi movl $0x2d5, %ecx # imm = 0x2D5 callq *0x210(%rax) movl $0x4, %ecx movl %r13d, %edi movq %r12, %rsi movq %r14, %rdx callq 0xa18cc movq %rax, %r12 xorl %esi, %esi testq %rax, %rax cmoveq %r14, %rsi leaq 0x305821(%rip), %rax # 0x3880c0 movq (%rax), %rax movq -0x90(%rbp), %rdi callq *0x218(%rax) jmp 0x827dd callq 0x29270
_mi_read_pack_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rax, fs:28h mov [rbp+var_30], rax mov eax, 0FFFFFFFFh cmp rsi, 0FFFFFFFFFFFFFFFFh jz loc_827F2 mov r12, rdx mov r9, rsi mov r15, rdi mov r13d, [rdi+1C0h] lea rbx, [rdi+50h] lea r14, [rdi+120h] lea rdx, [rbp+var_88] mov rsi, rbx mov rcx, r14 mov r8d, r13d call _mi_pack_get_block_info test eax, eax jnz short loc_827ED mov [rbp+var_98], r12 mov eax, [rbp+var_34] mov r12, [r14] add r12, rax mov r14, [rbp+var_70] sub r14, rax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_E0] mov esi, r13d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_8284D mov ecx, 4 mov edi, r13d mov rsi, r12 mov rdx, r14 call my_read mov r12, rax loc_827DD: test r12, r12 jz short loc_82817 call _my_thread_var mov dword ptr [rax], 7Fh loc_827ED: mov eax, 0FFFFFFFFh loc_827F2: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_828B4 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_82817: or byte ptr [r15+1D0h], 2 mov rax, [r15+120h] mov rcx, [rbp+var_70] mov byte ptr [rax+rcx], 0 mov rcx, [r15+120h] mov r8, [rbp+var_70] mov rdi, r15 mov rsi, rbx mov rdx, [rbp+var_98] call _mi_pack_rec_unpack jmp short loc_827F2 loc_8284D: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_90], rcx mov rdi, rcx mov rsi, r14 mov ecx, 2D5h call qword ptr [rax+210h] mov ecx, 4 mov edi, r13d mov rsi, r12 mov rdx, r14 call my_read mov r12, rax xor esi, esi test rax, rax cmovz rsi, r14 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_90] call qword ptr [rax+218h] jmp loc_827DD loc_828B4: call ___stack_chk_fail
long long mi_read_pack_record(long long a1, long long a2, long long a3) { long long result; // rax unsigned int v6; // r13d long long v7; // rbx const char *v8; // r12 const char *v9; // r14 long long v10; // rax long long v11; // rdi const char *v12; // rsi long long v13; // r12 char v14[72]; // [rsp+0h] [rbp-E0h] BYREF long long v15; // [rsp+48h] [rbp-98h] long long v16; // [rsp+50h] [rbp-90h] char v17[24]; // [rsp+58h] [rbp-88h] BYREF long long v18; // [rsp+70h] [rbp-70h] unsigned int v19; // [rsp+ACh] [rbp-34h] unsigned long long v20; // [rsp+B0h] [rbp-30h] v20 = __readfsqword(0x28u); result = 0xFFFFFFFFLL; if ( a2 != -1 ) { v6 = *(_DWORD *)(a1 + 448); v7 = a1 + 80; if ( !(unsigned int)mi_pack_get_block_info(a1, a1 + 80, v17, a1 + 288, v6, a2) ) { v15 = a3; v8 = (const char *)(v19 + *(_QWORD *)(a1 + 288)); v9 = (const char *)(v18 - v19); v10 = ((long long ( *)(char *, _QWORD, long long))PSI_server[43])(v14, v6, 6LL); if ( v10 ) { v16 = v10; ((void ( *)(long long, const char *, const char *, long long))PSI_server[66])( v10, v9, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 725LL); v13 = my_read(v6, v8, v9, 4LL); v12 = 0LL; if ( !v13 ) v12 = v9; v11 = v16; ((void ( *)(long long, const char *))PSI_server[67])(v16, v12); } else { v11 = v6; v12 = v8; v13 = my_read(v6, v8, v9, 4LL); } if ( !v13 ) { *(_BYTE *)(a1 + 464) |= 2u; *(_BYTE *)(*(_QWORD *)(a1 + 288) + v18) = 0; return mi_pack_rec_unpack(a1, v7, v15, *(_QWORD *)(a1 + 288), v18); } *(_DWORD *)my_thread_var(v11, v12) = 127; } return 0xFFFFFFFFLL; } return result; }
_mi_read_pack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,0xffffffff CMP RSI,-0x1 JZ 0x001827f2 MOV R12,RDX MOV R9,RSI MOV R15,RDI MOV R13D,dword ptr [RDI + 0x1c0] LEA RBX,[RDI + 0x50] LEA R14,[RDI + 0x120] LEA RDX,[RBP + -0x88] MOV RSI,RBX MOV RCX,R14 MOV R8D,R13D CALL 0x001828b9 TEST EAX,EAX JNZ 0x001827ed MOV qword ptr [RBP + -0x98],R12 MOV EAX,dword ptr [RBP + -0x34] MOV R12,qword ptr [R14] ADD R12,RAX MOV R14,qword ptr [RBP + -0x70] SUB R14,RAX LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xe0] MOV ESI,R13D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0018284d MOV ECX,0x4 MOV EDI,R13D MOV RSI,R12 MOV RDX,R14 CALL 0x001a18cc MOV R12,RAX LAB_001827dd: TEST R12,R12 JZ 0x00182817 CALL 0x001a2a4e MOV dword ptr [RAX],0x7f LAB_001827ed: MOV EAX,0xffffffff LAB_001827f2: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001828b4 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00182817: OR byte ptr [R15 + 0x1d0],0x2 MOV RAX,qword ptr [R15 + 0x120] MOV RCX,qword ptr [RBP + -0x70] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RCX,qword ptr [R15 + 0x120] MOV R8,qword ptr [RBP + -0x70] MOV RDI,R15 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x98] CALL 0x00182b57 JMP 0x001827f2 LAB_0018284d: MOV RCX,RAX LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dd035] MOV qword ptr [RBP + -0x90],RCX MOV RDI,RCX MOV RSI,R14 MOV ECX,0x2d5 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R13D MOV RSI,R12 MOV RDX,R14 CALL 0x001a18cc MOV R12,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R14 LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x90] CALL qword ptr [RAX + 0x218] JMP 0x001827dd LAB_001828b4: CALL 0x00129270
int8 _mi_read_pack_record(long param_1,long param_2,int8 param_3) { int4 uVar1; int iVar2; int8 uVar3; long lVar4; int4 *puVar5; long lVar6; long lVar7; long in_FS_OFFSET; int1 local_e8 [72]; int8 local_a0; long local_98; int1 local_90 [24]; long local_78; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = 0xffffffff; if (param_2 != -1) { uVar1 = *(int4 *)(param_1 + 0x1c0); iVar2 = _mi_pack_get_block_info (param_1,param_1 + 0x50,local_90,(long *)(param_1 + 0x120),uVar1,param_2); if (iVar2 == 0) { lVar6 = *(long *)(param_1 + 0x120) + (ulong)local_3c; lVar7 = local_78 - (ulong)local_3c; local_a0 = param_3; lVar4 = (**(code **)(PSI_server + 0x158))(local_e8,uVar1,6); if (lVar4 == 0) { lVar6 = my_read(uVar1,lVar6,lVar7,4); } else { local_98 = lVar4; (**(code **)(PSI_server + 0x210)) (lVar4,lVar7, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x2d5); lVar6 = my_read(uVar1,lVar6,lVar7,4); lVar4 = 0; if (lVar6 == 0) { lVar4 = lVar7; } (**(code **)(PSI_server + 0x218))(local_98,lVar4); } if (lVar6 == 0) { *(byte *)(param_1 + 0x1d0) = *(byte *)(param_1 + 0x1d0) | 2; *(int1 *)(*(long *)(param_1 + 0x120) + local_78) = 0; uVar3 = _mi_pack_rec_unpack(param_1,param_1 + 0x50,local_a0,*(int8 *)(param_1 + 0x120) ,local_78); goto LAB_001827f2; } puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x7f; } uVar3 = 0xffffffff; } LAB_001827f2: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
51,563
queue_replace
eloqsql/mysys/queues.c
void queue_replace(QUEUE *queue, uint idx) { uchar *element= queue->root[idx]; uint next_index, elements= queue->elements, half_queue= elements>>1, offset_to_key= queue->offset_to_key, offset_to_queue_pos= queue->offset_to_queue_pos; my_bool first= TRUE; while (idx <= half_queue) { next_index= idx + idx; if (next_index < elements && queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, queue->root[next_index+1]+offset_to_key) * queue->max_at_top > 0) next_index++; if (first && queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, element+offset_to_key) * queue->max_at_top >= 0) { queue->root[idx]= element; if (offset_to_queue_pos) (*(uint*) (element + offset_to_queue_pos-1))= idx; break; } first= FALSE; queue->root[idx]= queue->root[next_index]; if (offset_to_queue_pos) (*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx; idx=next_index; } insert_at(queue, element, idx); }
O3
c
queue_replace: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %esi, %r15d movq %rdi, %rbx movq (%rdi), %rax movl %esi, %ecx movq (%rax,%rcx,8), %rax movl 0x10(%rdi), %ecx movl %ecx, -0x38(%rbp) shrl %ecx movl %ecx, -0x34(%rbp) cmpl %esi, %ecx movq %rax, -0x40(%rbp) jae 0xa529e movl %r15d, %r13d jmp 0xa5352 movl 0x18(%rbx), %ecx movl 0x1c(%rbx), %esi movq %rcx, -0x48(%rbp) addq %rcx, %rax movq %rax, -0x50(%rbp) xorl %r14d, %r14d movq %rsi, -0x30(%rbp) leal (%r15,%r15), %r13d movq (%rbx), %rcx cmpl -0x38(%rbp), %r13d jae 0xa52fb movq 0x8(%rbx), %rdi movl %r13d, %eax movq (%rcx,%rax,8), %rsi movq -0x48(%rbp), %rax addq %rax, %rsi movl %r13d, %r12d orl $0x1, %r12d movq (%rcx,%r12,8), %rdx addq %rax, %rdx callq *0x28(%rbx) imull 0x24(%rbx), %eax testl %eax, %eax jg 0xa52f1 movl %r13d, %r12d movq (%rbx), %rcx movl %r12d, %r13d movq -0x30(%rbp), %rsi movl %r13d, %r12d testb $0x1, %r14b jne 0xa5326 movq 0x8(%rbx), %rdi movq (%rcx,%r12,8), %rsi addq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdx callq *0x28(%rbx) imull 0x24(%rbx), %eax movq (%rbx), %rcx testl %eax, %eax jns 0xa536f movq -0x30(%rbp), %rsi movq (%rcx,%r12,8), %rdx movl %r15d, %eax movq %rdx, (%rcx,%rax,8) testq %rsi, %rsi je 0xa5342 movq (%rbx), %rcx movq (%rcx,%rax,8), %rax movl %r15d, -0x1(%rax,%rsi) movb $0x1, %r14b movl %r13d, %r15d cmpl -0x34(%rbp), %r13d jbe 0xa52b6 movq %rbx, %rdi movq -0x40(%rbp), %rsi movl %r13d, %edx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa5136 movl %r15d, %eax movq -0x40(%rbp), %rdx movq %rdx, (%rcx,%rax,8) movq -0x30(%rbp), %rcx testq %rcx, %rcx je 0xa5296 movl %r15d, -0x1(%rdx,%rcx) jmp 0xa5296
queue_replace: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15d, esi mov rbx, rdi mov rax, [rdi] mov ecx, esi mov rax, [rax+rcx*8] mov ecx, [rdi+10h] mov [rbp+var_38], ecx shr ecx, 1 mov [rbp+var_34], ecx cmp ecx, esi mov [rbp+var_40], rax jnb short loc_A529E loc_A5296: mov r13d, r15d jmp loc_A5352 loc_A529E: mov ecx, [rbx+18h] mov esi, [rbx+1Ch] mov [rbp+var_48], rcx add rax, rcx mov [rbp+var_50], rax xor r14d, r14d mov [rbp+var_30], rsi loc_A52B6: lea r13d, [r15+r15] mov rcx, [rbx] cmp r13d, [rbp+var_38] jnb short loc_A52FB mov rdi, [rbx+8] mov eax, r13d mov rsi, [rcx+rax*8] mov rax, [rbp+var_48] add rsi, rax mov r12d, r13d or r12d, 1 mov rdx, [rcx+r12*8] add rdx, rax call qword ptr [rbx+28h] imul eax, [rbx+24h] test eax, eax jg short loc_A52F1 mov r12d, r13d loc_A52F1: mov rcx, [rbx] mov r13d, r12d mov rsi, [rbp+var_30] loc_A52FB: mov r12d, r13d test r14b, 1 jnz short loc_A5326 mov rdi, [rbx+8] mov rsi, [rcx+r12*8] add rsi, [rbp+var_48] mov rdx, [rbp+var_50] call qword ptr [rbx+28h] imul eax, [rbx+24h] mov rcx, [rbx] test eax, eax jns short loc_A536F mov rsi, [rbp+var_30] loc_A5326: mov rdx, [rcx+r12*8] mov eax, r15d mov [rcx+rax*8], rdx test rsi, rsi jz short loc_A5342 mov rcx, [rbx] mov rax, [rcx+rax*8] mov [rax+rsi-1], r15d loc_A5342: mov r14b, 1 mov r15d, r13d cmp r13d, [rbp+var_34] jbe loc_A52B6 loc_A5352: mov rdi, rbx mov rsi, [rbp+var_40] mov edx, r13d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp insert_at loc_A536F: mov eax, r15d mov rdx, [rbp+var_40] mov [rcx+rax*8], rdx mov rcx, [rbp+var_30] test rcx, rcx jz loc_A5296 mov [rdx+rcx-1], r15d jmp loc_A5296
long long queue_replace(long long *a1, unsigned int a2) { unsigned int v2; // r15d long long v3; // rax unsigned int v4; // r13d long long v5; // rsi char v6; // r14 long long v7; // rcx long long v8; // r12 int v9; // eax long long v11; // [rsp+0h] [rbp-50h] long long v12; // [rsp+8h] [rbp-48h] long long v13; // [rsp+10h] [rbp-40h] unsigned int v14; // [rsp+18h] [rbp-38h] long long v15; // [rsp+20h] [rbp-30h] v2 = a2; v3 = *(_QWORD *)(*a1 + 8LL * a2); v14 = *((_DWORD *)a1 + 4); v13 = v3; if ( v14 >> 1 >= a2 ) { v5 = *((unsigned int *)a1 + 7); v12 = *((unsigned int *)a1 + 6); v11 = v12 + v3; v6 = 0; v15 = v5; while ( 1 ) { v4 = 2 * v2; v7 = *a1; if ( 2 * v2 < v14 ) { v8 = v4 | 1; if ( (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, long long, long long))a1[5])( a1[1], v12 + *(_QWORD *)(v7 + 8LL * v4), v12 + *(_QWORD *)(v7 + 8 * v8))) <= 0 ) LODWORD(v8) = 2 * v2; v7 = *a1; v4 = v8; v5 = v15; } if ( (v6 & 1) == 0 ) { v9 = ((long long ( *)(long long, long long, long long))a1[5])(a1[1], v12 + *(_QWORD *)(v7 + 8LL * v4), v11); v7 = *a1; if ( *((_DWORD *)a1 + 9) * v9 >= 0 ) { *(_QWORD *)(v7 + 8LL * v2) = v13; if ( v15 ) *(_DWORD *)(v13 + v15 - 1) = v2; break; } v5 = v15; } *(_QWORD *)(v7 + 8LL * v2) = *(_QWORD *)(v7 + 8LL * v4); if ( v5 ) *(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v5 - 1) = v2; v6 = 1; v2 = v4; if ( v4 > v14 >> 1 ) return insert_at(a1, v13, v4); } } v4 = v2; return insert_at(a1, v13, v4); }
queue_replace: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15D,ESI MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV ECX,ESI MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RDI + 0x10] MOV dword ptr [RBP + -0x38],ECX SHR ECX,0x1 MOV dword ptr [RBP + -0x34],ECX CMP ECX,ESI MOV qword ptr [RBP + -0x40],RAX JNC 0x001a529e LAB_001a5296: MOV R13D,R15D JMP 0x001a5352 LAB_001a529e: MOV ECX,dword ptr [RBX + 0x18] MOV ESI,dword ptr [RBX + 0x1c] MOV qword ptr [RBP + -0x48],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX XOR R14D,R14D MOV qword ptr [RBP + -0x30],RSI LAB_001a52b6: LEA R13D,[R15 + R15*0x1] MOV RCX,qword ptr [RBX] CMP R13D,dword ptr [RBP + -0x38] JNC 0x001a52fb MOV RDI,qword ptr [RBX + 0x8] MOV EAX,R13D MOV RSI,qword ptr [RCX + RAX*0x8] MOV RAX,qword ptr [RBP + -0x48] ADD RSI,RAX MOV R12D,R13D OR R12D,0x1 MOV RDX,qword ptr [RCX + R12*0x8] ADD RDX,RAX CALL qword ptr [RBX + 0x28] IMUL EAX,dword ptr [RBX + 0x24] TEST EAX,EAX JG 0x001a52f1 MOV R12D,R13D LAB_001a52f1: MOV RCX,qword ptr [RBX] MOV R13D,R12D MOV RSI,qword ptr [RBP + -0x30] LAB_001a52fb: MOV R12D,R13D TEST R14B,0x1 JNZ 0x001a5326 MOV RDI,qword ptr [RBX + 0x8] MOV RSI,qword ptr [RCX + R12*0x8] ADD RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] CALL qword ptr [RBX + 0x28] IMUL EAX,dword ptr [RBX + 0x24] MOV RCX,qword ptr [RBX] TEST EAX,EAX JNS 0x001a536f MOV RSI,qword ptr [RBP + -0x30] LAB_001a5326: MOV RDX,qword ptr [RCX + R12*0x8] MOV EAX,R15D MOV qword ptr [RCX + RAX*0x8],RDX TEST RSI,RSI JZ 0x001a5342 MOV RCX,qword ptr [RBX] MOV RAX,qword ptr [RCX + RAX*0x8] MOV dword ptr [RAX + RSI*0x1 + -0x1],R15D LAB_001a5342: MOV R14B,0x1 MOV R15D,R13D CMP R13D,dword ptr [RBP + -0x34] JBE 0x001a52b6 LAB_001a5352: MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x40] MOV EDX,R13D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a5136 LAB_001a536f: MOV EAX,R15D MOV RDX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + RAX*0x8],RDX MOV RCX,qword ptr [RBP + -0x30] TEST RCX,RCX JZ 0x001a5296 MOV dword ptr [RDX + RCX*0x1 + -0x1],R15D JMP 0x001a5296
void queue_replace(long *param_1,uint param_2) { uint uVar1; long lVar2; int iVar3; uint uVar4; int iVar5; uint uVar6; ulong uVar7; long lVar8; ulong uVar9; uint uVar10; ulong uVar11; ulong uVar12; bool bVar13; uVar12 = (ulong)param_2; lVar2 = *(long *)(*param_1 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); uVar6 = uVar1 >> 1; if (param_2 <= uVar6) { uVar7 = (ulong)*(uint *)(param_1 + 3); uVar9 = (ulong)*(uint *)((long)param_1 + 0x1c); bVar13 = false; do { iVar3 = (int)uVar12; uVar4 = iVar3 * 2; lVar8 = *param_1; uVar10 = uVar4; if (uVar4 < uVar1) { iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(lVar8 + (ulong)uVar4 * 8) + uVar7, *(long *)(lVar8 + (ulong)(uVar4 | 1) * 8) + uVar7); uVar10 = uVar4 | 1; if (iVar5 * *(int *)((long)param_1 + 0x24) < 1) { uVar10 = uVar4; } lVar8 = *param_1; } uVar11 = (ulong)uVar10; if (!bVar13) { iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(lVar8 + uVar11 * 8) + uVar7,lVar2 + uVar7); lVar8 = *param_1; if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) { *(long *)(lVar8 + uVar12 * 8) = lVar2; if (uVar9 != 0) { *(int *)(lVar2 + -1 + uVar9) = iVar3; } break; } } *(int8 *)(lVar8 + uVar12 * 8) = *(int8 *)(lVar8 + uVar11 * 8); if (uVar9 != 0) { *(int *)(*(long *)(*param_1 + uVar12 * 8) + -1 + uVar9) = iVar3; } bVar13 = true; uVar12 = uVar11; } while (uVar10 <= uVar6); } insert_at(param_1,lVar2,uVar12); return; }
51,564
tinyxml2::MemPoolT<80>::Free(void*)
aimrt_mujoco_sim/_deps/tinyxml2-src/tinyxml2.h
virtual void Free( void* mem ) { if ( !mem ) { return; } --_currentAllocs; Item* item = static_cast<Item*>( mem ); #ifdef TINYXML2_DEBUG memset( item, 0xfe, sizeof( *item ) ); #endif item->next = _root; _root = item; }
O0
c
tinyxml2::MemPoolT<80>::Free(void*): movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq -0x8(%rsp), %rax movq %rax, -0x20(%rsp) cmpq $0x0, -0x10(%rsp) jne 0x51765e jmp 0x51768b movq -0x20(%rsp), %rax movl 0x70(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x70(%rax) movq -0x10(%rsp), %rcx movq %rcx, -0x18(%rsp) movq 0x68(%rax), %rdx movq -0x18(%rsp), %rcx movq %rdx, (%rcx) movq -0x18(%rsp), %rcx movq %rcx, 0x68(%rax) retq nopl (%rax)
_ZN8tinyxml28MemPoolTILi104EE4FreeEPv: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov rax, [rsp+var_8] mov [rsp+var_20], rax cmp [rsp+var_10], 0 jnz short loc_51765E jmp short locret_51768B loc_51765E: mov rax, [rsp+var_20] mov ecx, [rax+70h] add ecx, 0FFFFFFFFh mov [rax+70h], ecx mov rcx, [rsp+var_10] mov [rsp+var_18], rcx mov rdx, [rax+68h] mov rcx, [rsp+var_18] mov [rcx], rdx mov rcx, [rsp+var_18] mov [rax+68h], rcx locret_51768B: retn
long long tinyxml2::MemPoolT<104>::Free(long long a1, _QWORD *a2) { long long result; // rax result = a1; if ( a2 ) { result = a1; --*(_DWORD *)(a1 + 112); *a2 = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a2; } return result; }
_M_head: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] RET
/* std::_Head_base<0ul, _mjSpec*, false>::_M_head(std::_Head_base<0ul, _mjSpec*, false> const&) */ _Head_base * std::_Head_base<0ul,_mjSpec*,false>::_M_head(_Head_base *param_1) { return param_1; }
51,565
tinyxml2::MemPoolT<80>::Free(void*)
aimrt_mujoco_sim/_deps/tinyxml2-src/tinyxml2.h
virtual void Free( void* mem ) { if ( !mem ) { return; } --_currentAllocs; Item* item = static_cast<Item*>( mem ); #ifdef TINYXML2_DEBUG memset( item, 0xfe, sizeof( *item ) ); #endif item->next = _root; _root = item; }
O3
c
tinyxml2::MemPoolT<80>::Free(void*): testq %rsi, %rsi je 0x1bcaa7 decl 0x70(%rdi) movq 0x68(%rdi), %rax movq %rax, (%rsi) movq %rsi, 0x68(%rdi) retq
_ZN8tinyxml28MemPoolTILi104EE4FreeEPv: test rsi, rsi jz short locret_1BCAA7 dec dword ptr [rdi+70h] mov rax, [rdi+68h] mov [rsi], rax mov [rdi+68h], rsi locret_1BCAA7: retn
long long tinyxml2::MemPoolT<104>::Free(long long a1, _QWORD *a2) { long long result; // rax if ( a2 ) { --*(_DWORD *)(a1 + 112); result = *(_QWORD *)(a1 + 104); *a2 = result; *(_QWORD *)(a1 + 104) = a2; } return result; }
51,566
mysql_stmt_bind_param
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bind) { MYSQL *mysql= stmt->mysql; if (!mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } /* If number of parameters was specified via mysql_stmt_attr_set we need to realloc them, e.g. for mariadb_stmt_execute_direct() */ if ((stmt->state < MYSQL_STMT_PREPARED || stmt->state >= MYSQL_STMT_EXECUTED) && stmt->prebind_params > 0) { if (!stmt->params && stmt->prebind_params) { if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->prebind_params * sizeof(MYSQL_BIND)))) { SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } memset(stmt->params, '\0', stmt->prebind_params * sizeof(MYSQL_BIND)); } stmt->param_count= stmt->prebind_params; } else if (stmt->state < MYSQL_STMT_PREPARED) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->param_count && bind) { uint i; memcpy(stmt->params, bind, sizeof(MYSQL_BIND) * stmt->param_count); stmt->send_types_to_server= 1; for (i=0; i < stmt->param_count; i++) { if (stmt->mysql->methods->db_supported_buffer_type && !stmt->mysql->methods->db_supported_buffer_type(stmt->params[i].buffer_type)) { SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->params[i].is_null) stmt->params[i].is_null= &is_not_null; if (stmt->params[i].long_data_used) stmt->params[i].long_data_used= 0; if (!stmt->params[i].length) stmt->params[i].length= &stmt->params[i].buffer_length; switch(stmt->params[i].buffer_type) { case MYSQL_TYPE_NULL: stmt->params[i].is_null= &is_null; break; case MYSQL_TYPE_TINY: stmt->params[i].buffer_length= 1; break; case MYSQL_TYPE_SHORT: case MYSQL_TYPE_YEAR: stmt->params[i].buffer_length= 2; break; case MYSQL_TYPE_LONG: case MYSQL_TYPE_FLOAT: stmt->params[i].buffer_length= 4; break; case MYSQL_TYPE_LONGLONG: case MYSQL_TYPE_DOUBLE: stmt->params[i].buffer_length= 8; break; case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: stmt->params[i].buffer_length= 12; break; case MYSQL_TYPE_TIME: stmt->params[i].buffer_length= 13; break; case MYSQL_TYPE_DATE: stmt->params[i].buffer_length= 5; break; case MYSQL_TYPE_STRING: case MYSQL_TYPE_JSON: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_NEWDECIMAL: break; default: SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return(1); break; } } } stmt->bind_param_done= stmt->send_types_to_server= 1; CLEAR_CLIENT_STMT_ERROR(stmt); return(0); }
O3
c
mysql_stmt_bind_param: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, 0x38(%rdi) je 0x22dab movq %rsi, %r14 movl 0x50(%rbx), %ecx cmpl $0x1, %ecx je 0x22e0c movl 0x378(%rbx), %eax testq %rax, %rax je 0x22e04 cmpq $0x0, 0x70(%rbx) jne 0x22da6 imulq $0x70, %rax, %rsi movq %rbx, %rdi callq 0x20a6f movq %rax, 0x70(%rbx) testq %rax, %rax je 0x23026 movl 0x378(%rbx), %ecx imulq $0x70, %rcx, %rdx movq %rax, %rdi xorl %esi, %esi callq 0x13260 movl 0x378(%rbx), %eax movl %eax, 0x64(%rbx) jmp 0x22e0c movl $0x7dd, 0x108(%rbx) # imm = 0x7DD leaq 0x30d(%rbx), %rdi leaq 0x2afbd(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2afa8(%rip), %rax # 0x4dd90 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movb $0x1, %al jmp 0x22f85 testl %ecx, %ecx je 0x22fdd movl 0x64(%rbx), %eax testq %rax, %rax sete %cl testq %r14, %r14 sete %dl orb %cl, %dl jne 0x22f54 movq 0x70(%rbx), %rdi imulq $0x70, %rax, %rdx movq %r14, %rsi callq 0x13390 movb $0x1, 0x68(%rbx) cmpl $0x0, 0x64(%rbx) je 0x22f54 movl $0x40, %r14d xorl %r15d, %r15d movl $0x3f3, %r13d # imm = 0x3F3 leaq 0x19145(%rip), %r12 # 0x3bf9c movq 0x38(%rbx), %rcx movq 0x70(%rbx), %rax movq 0x4d0(%rcx), %rcx movq 0x38(%rcx), %rcx testq %rcx, %rcx je 0x22e82 movl 0x20(%rax,%r14), %edi callq *%rcx testb %al, %al je 0x22f94 movq 0x70(%rbx), %rax cmpq $0x0, -0x38(%rax,%r14) jne 0x22e9a leaq 0x2b411(%rip), %rcx # 0x4e2a2 movq %rcx, -0x38(%rax,%r14) movq 0x70(%rbx), %rax cmpb $0x0, 0x26(%rax,%r14) je 0x22eac movb $0x0, 0x26(%rax,%r14) movq 0x70(%rbx), %rax cmpq $0x0, -0x40(%rax,%r14) jne 0x22ec1 leaq (%rax,%r14), %rcx movq %rcx, -0x40(%rax,%r14) movq 0x70(%rbx), %rax movl 0x20(%rax,%r14), %ecx cmpq $0xd, %rcx ja 0x22edf movslq (%r12,%rcx,4), %rcx addq %r12, %rcx jmpq *%rcx movq $0x2, (%rax,%r14) jmp 0x22f41 addl $0xffffff0b, %ecx # imm = 0xFFFFFF0B cmpl $0x9, %ecx ja 0x22f94 btl %ecx, %r13d jb 0x22f41 jmp 0x22f94 movq $0x4, (%rax,%r14) jmp 0x22f41 movq $0x8, (%rax,%r14) jmp 0x22f41 movq $0xc, (%rax,%r14) jmp 0x22f41 movq $0xd, (%rax,%r14) jmp 0x22f41 movq $0x1, (%rax,%r14) jmp 0x22f41 leaq 0x29f6e(%rip), %rcx # 0x4cea0 movq %rcx, -0x38(%rax,%r14) jmp 0x22f41 movq $0x5, (%rax,%r14) incq %r15 movl 0x64(%rbx), %eax addq $0x70, %r14 cmpq %rax, %r15 jb 0x22e57 movb $0x1, %al movb %al, 0x68(%rbx) movb %al, 0xe9(%rbx) movl $0x0, 0x108(%rbx) movl $0x30303030, 0x30d(%rbx) # imm = 0x30303030 movw $0x30, 0x311(%rbx) movb $0x0, 0x10c(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x7f4, 0x108(%rbx) # imm = 0x7F4 leaq 0x30d(%rbx), %rdi leaq 0x2add4(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2adbf(%rip), %rax # 0x4dd90 movq 0x120(%rax), %rsi jmp 0x22dec movl $0x7ee, 0x108(%rbx) # imm = 0x7EE leaq 0x30d(%rbx), %rdi leaq 0x2ad8b(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2ad76(%rip), %rax # 0x4dd90 movq 0xf0(%rax), %rsi jmp 0x22dec movl $0x7d8, 0x108(%rbx) # imm = 0x7D8 leaq 0x30d(%rbx), %rdi leaq 0x2ad42(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2ad2d(%rip), %rax # 0x4dd90 movq 0x40(%rax), %rsi jmp 0x22dec
mysql_stmt_bind_param: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp qword ptr [rdi+38h], 0 jz short loc_22DAB mov r14, rsi mov ecx, [rbx+50h] cmp ecx, 1 jz loc_22E0C mov eax, [rbx+378h] test rax, rax jz loc_22E04 cmp qword ptr [rbx+70h], 0 jnz short loc_22DA6 imul rsi, rax, 70h ; 'p' mov rdi, rbx call ma_alloc_root mov [rbx+70h], rax test rax, rax jz loc_23026 mov ecx, [rbx+378h] imul rdx, rcx, 70h ; 'p' mov rdi, rax xor esi, esi call _memset mov eax, [rbx+378h] loc_22DA6: mov [rbx+64h], eax jmp short loc_22E0C loc_22DAB: mov dword ptr [rbx+108h], 7DDh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+68h] loc_22DEC: mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov al, 1 jmp loc_22F85 loc_22E04: test ecx, ecx jz loc_22FDD loc_22E0C: mov eax, [rbx+64h] test rax, rax setz cl test r14, r14 setz dl or dl, cl jnz loc_22F54 mov rdi, [rbx+70h] imul rdx, rax, 70h ; 'p' mov rsi, r14 call _memcpy mov byte ptr [rbx+68h], 1 cmp dword ptr [rbx+64h], 0 jz loc_22F54 mov r14d, 40h ; '@' xor r15d, r15d mov r13d, 3F3h lea r12, jpt_22ED3 loc_22E57: mov rcx, [rbx+38h] mov rax, [rbx+70h] mov rcx, [rcx+4D0h] mov rcx, [rcx+38h] test rcx, rcx jz short loc_22E82 mov edi, [rax+r14+20h] call rcx test al, al jz loc_22F94; jumptable 0000000000022ED3 case 9 mov rax, [rbx+70h] loc_22E82: cmp qword ptr [rax+r14-38h], 0 jnz short loc_22E9A lea rcx, is_not_null mov [rax+r14-38h], rcx mov rax, [rbx+70h] loc_22E9A: cmp byte ptr [rax+r14+26h], 0 jz short loc_22EAC mov byte ptr [rax+r14+26h], 0 mov rax, [rbx+70h] loc_22EAC: cmp qword ptr [rax+r14-40h], 0 jnz short loc_22EC1 lea rcx, [rax+r14] mov [rax+r14-40h], rcx mov rax, [rbx+70h] loc_22EC1: mov ecx, [rax+r14+20h] cmp rcx, 0Dh; switch 14 cases ja short def_22ED3; jumptable 0000000000022ED3 default case movsxd rcx, ds:(jpt_22ED3 - 3BF9Ch)[r12+rcx*4] add rcx, r12 jmp rcx; switch jump loc_22ED5: mov qword ptr [rax+r14], 2; jumptable 0000000000022ED3 cases 2,13 jmp short loc_22F41; jumptable 0000000000022ED3 case 0 def_22ED3: add ecx, 0FFFFFF0Bh; jumptable 0000000000022ED3 default case cmp ecx, 9 ja loc_22F94; jumptable 0000000000022ED3 case 9 bt r13d, ecx jb short loc_22F41; jumptable 0000000000022ED3 case 0 jmp loc_22F94; jumptable 0000000000022ED3 case 9 loc_22EF9: mov qword ptr [rax+r14], 4; jumptable 0000000000022ED3 cases 3,4 jmp short loc_22F41; jumptable 0000000000022ED3 case 0 loc_22F03: mov qword ptr [rax+r14], 8; jumptable 0000000000022ED3 cases 5,8 jmp short loc_22F41; jumptable 0000000000022ED3 case 0 loc_22F0D: mov qword ptr [rax+r14], 0Ch; jumptable 0000000000022ED3 cases 7,12 jmp short loc_22F41; jumptable 0000000000022ED3 case 0 loc_22F17: mov qword ptr [rax+r14], 0Dh; jumptable 0000000000022ED3 case 11 jmp short loc_22F41; jumptable 0000000000022ED3 case 0 loc_22F21: mov qword ptr [rax+r14], 1; jumptable 0000000000022ED3 case 1 jmp short loc_22F41; jumptable 0000000000022ED3 case 0 loc_22F2B: lea rcx, is_null; jumptable 0000000000022ED3 case 6 mov [rax+r14-38h], rcx jmp short loc_22F41; jumptable 0000000000022ED3 case 0 loc_22F39: mov qword ptr [rax+r14], 5; jumptable 0000000000022ED3 case 10 loc_22F41: inc r15; jumptable 0000000000022ED3 case 0 mov eax, [rbx+64h] add r14, 70h ; 'p' cmp r15, rax jb loc_22E57 loc_22F54: mov al, 1 mov [rbx+68h], al mov [rbx+0E9h], al mov dword ptr [rbx+108h], 0 mov dword ptr [rbx+30Dh], 30303030h mov word ptr [rbx+311h], 30h ; '0' mov byte ptr [rbx+10Ch], 0 xor eax, eax loc_22F85: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_22F94: mov dword ptr [rbx+108h], 7F4h; jumptable 0000000000022ED3 case 9 lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+120h] jmp loc_22DEC loc_22FDD: mov dword ptr [rbx+108h], 7EEh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+0F0h] jmp loc_22DEC loc_23026: mov dword ptr [rbx+108h], 7D8h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+40h] jmp loc_22DEC
char mysql_stmt_bind_param(long long a1, long long a2) { int v3; // ecx long long v4; // rax char *v5; // rax long long v6; // rdi char *v7; // rsi long long v9; // rax long long v10; // r14 unsigned long long v11; // r15 int v12; // r13d long long v13; // rax unsigned __int8 ( *v14)(_QWORD); // rcx unsigned int v15; // ecx if ( !*(_QWORD *)(a1 + 56) ) { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v6 = a1 + 268; v7 = client_errors[13]; goto LABEL_9; } v3 = *(_DWORD *)(a1 + 80); if ( v3 == 1 ) goto LABEL_11; v4 = *(unsigned int *)(a1 + 888); if ( *(_DWORD *)(a1 + 888) ) { if ( *(_QWORD *)(a1 + 112) ) { LABEL_7: *(_DWORD *)(a1 + 100) = v4; goto LABEL_11; } v5 = ma_alloc_root(a1, 112 * v4); *(_QWORD *)(a1 + 112) = v5; if ( v5 ) { memset(v5, 0LL, 112LL * *(unsigned int *)(a1 + 888)); LODWORD(v4) = *(_DWORD *)(a1 + 888); goto LABEL_7; } *(_DWORD *)(a1 + 264) = 2008; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v6 = a1 + 268; v7 = client_errors[8]; LABEL_9: strncpy(v6, v7, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } if ( !v3 ) { *(_DWORD *)(a1 + 264) = 2030; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v6 = a1 + 268; v7 = client_errors[30]; goto LABEL_9; } LABEL_11: v9 = *(unsigned int *)(a1 + 100); if ( v9 != 0 && a2 != 0 ) { memcpy(*(_QWORD *)(a1 + 112), a2, 112 * v9); *(_BYTE *)(a1 + 104) = 1; if ( *(_DWORD *)(a1 + 100) ) { v10 = 64LL; v11 = 0LL; v12 = 1011; do { v13 = *(_QWORD *)(a1 + 112); v14 = *(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 56LL); if ( v14 ) { if ( !v14(*(unsigned int *)(v13 + v10 + 32)) ) { LABEL_38: *(_DWORD *)(a1 + 264) = 2036; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v6 = a1 + 268; v7 = client_errors[36]; goto LABEL_9; } v13 = *(_QWORD *)(a1 + 112); } if ( !*(_QWORD *)(v13 + v10 - 56) ) { *(_QWORD *)(v13 + v10 - 56) = &is_not_null; v13 = *(_QWORD *)(a1 + 112); } if ( *(_BYTE *)(v13 + v10 + 38) ) { *(_BYTE *)(v13 + v10 + 38) = 0; v13 = *(_QWORD *)(a1 + 112); } if ( !*(_QWORD *)(v13 + v10 - 64) ) { *(_QWORD *)(v13 + v10 - 64) = v13 + v10; v13 = *(_QWORD *)(a1 + 112); } switch ( *(_DWORD *)(v13 + v10 + 32) ) { case 0: break; case 1: *(_QWORD *)(v13 + v10) = 1LL; break; case 2: case 0xD: *(_QWORD *)(v13 + v10) = 2LL; break; case 3: case 4: *(_QWORD *)(v13 + v10) = 4LL; break; case 5: case 8: *(_QWORD *)(v13 + v10) = 8LL; break; case 6: *(_QWORD *)(v13 + v10 - 56) = &is_null; break; case 7: case 0xC: *(_QWORD *)(v13 + v10) = 12LL; break; case 9: goto LABEL_38; case 0xA: *(_QWORD *)(v13 + v10) = 5LL; break; case 0xB: *(_QWORD *)(v13 + v10) = 13LL; break; default: v15 = *(_DWORD *)(v13 + v10 + 32) - 245; if ( v15 > 9 || !_bittest(&v12, v15) ) goto LABEL_38; break; } ++v11; v10 += 112LL; } while ( v11 < *(unsigned int *)(a1 + 100) ); } } *(_BYTE *)(a1 + 104) = 1; *(_BYTE *)(a1 + 233) = 1; *(_DWORD *)(a1 + 264) = 0; strcpy((char *)(a1 + 781), "00000"); *(_BYTE *)(a1 + 268) = 0; return 0; }
mysql_stmt_bind_param: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP qword ptr [RDI + 0x38],0x0 JZ 0x00122dab MOV R14,RSI MOV ECX,dword ptr [RBX + 0x50] CMP ECX,0x1 JZ 0x00122e0c MOV EAX,dword ptr [RBX + 0x378] TEST RAX,RAX JZ 0x00122e04 CMP qword ptr [RBX + 0x70],0x0 JNZ 0x00122da6 IMUL RSI,RAX,0x70 MOV RDI,RBX CALL 0x00120a6f MOV qword ptr [RBX + 0x70],RAX TEST RAX,RAX JZ 0x00123026 MOV ECX,dword ptr [RBX + 0x378] IMUL RDX,RCX,0x70 MOV RDI,RAX XOR ESI,ESI CALL 0x00113260 MOV EAX,dword ptr [RBX + 0x378] LAB_00122da6: MOV dword ptr [RBX + 0x64],EAX JMP 0x00122e0c LAB_00122dab: MOV dword ptr [RBX + 0x108],0x7dd LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0x68] LAB_00122dec: MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV AL,0x1 JMP 0x00122f85 LAB_00122e04: TEST ECX,ECX JZ 0x00122fdd LAB_00122e0c: MOV EAX,dword ptr [RBX + 0x64] TEST RAX,RAX SETZ CL TEST R14,R14 SETZ DL OR DL,CL JNZ 0x00122f54 MOV RDI,qword ptr [RBX + 0x70] IMUL RDX,RAX,0x70 MOV RSI,R14 CALL 0x00113390 MOV byte ptr [RBX + 0x68],0x1 CMP dword ptr [RBX + 0x64],0x0 JZ 0x00122f54 MOV R14D,0x40 XOR R15D,R15D MOV R13D,0x3f3 LEA R12,[0x13bf9c] LAB_00122e57: MOV RCX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RBX + 0x70] MOV RCX,qword ptr [RCX + 0x4d0] MOV RCX,qword ptr [RCX + 0x38] TEST RCX,RCX JZ 0x00122e82 MOV EDI,dword ptr [RAX + R14*0x1 + 0x20] CALL RCX TEST AL,AL JZ 0x00122f94 MOV RAX,qword ptr [RBX + 0x70] LAB_00122e82: CMP qword ptr [RAX + R14*0x1 + -0x38],0x0 JNZ 0x00122e9a LEA RCX,[0x14e2a2] MOV qword ptr [RAX + R14*0x1 + -0x38],RCX MOV RAX,qword ptr [RBX + 0x70] LAB_00122e9a: CMP byte ptr [RAX + R14*0x1 + 0x26],0x0 JZ 0x00122eac MOV byte ptr [RAX + R14*0x1 + 0x26],0x0 MOV RAX,qword ptr [RBX + 0x70] LAB_00122eac: CMP qword ptr [RAX + R14*0x1 + -0x40],0x0 JNZ 0x00122ec1 LEA RCX,[RAX + R14*0x1] MOV qword ptr [RAX + R14*0x1 + -0x40],RCX MOV RAX,qword ptr [RBX + 0x70] LAB_00122ec1: MOV ECX,dword ptr [RAX + R14*0x1 + 0x20] CMP RCX,0xd JA 0x00122edf MOVSXD RCX,dword ptr [R12 + RCX*0x4] ADD RCX,R12 switchD: JMP RCX caseD_2: MOV qword ptr [RAX + R14*0x1],0x2 JMP 0x00122f41 default: ADD ECX,0xffffff0b CMP ECX,0x9 JA 0x00122f94 BT R13D,ECX JC 0x00122f41 JMP 0x00122f94 caseD_3: MOV qword ptr [RAX + R14*0x1],0x4 JMP 0x00122f41 caseD_5: MOV qword ptr [RAX + R14*0x1],0x8 JMP 0x00122f41 caseD_7: MOV qword ptr [RAX + R14*0x1],0xc JMP 0x00122f41 caseD_b: MOV qword ptr [RAX + R14*0x1],0xd JMP 0x00122f41 caseD_1: MOV qword ptr [RAX + R14*0x1],0x1 JMP 0x00122f41 caseD_6: LEA RCX,[0x14cea0] MOV qword ptr [RAX + R14*0x1 + -0x38],RCX JMP 0x00122f41 caseD_a: MOV qword ptr [RAX + R14*0x1],0x5 caseD_0: INC R15 MOV EAX,dword ptr [RBX + 0x64] ADD R14,0x70 CMP R15,RAX JC 0x00122e57 LAB_00122f54: MOV AL,0x1 MOV byte ptr [RBX + 0x68],AL MOV byte ptr [RBX + 0xe9],AL MOV dword ptr [RBX + 0x108],0x0 MOV dword ptr [RBX + 0x30d],0x30303030 MOV word ptr [RBX + 0x311],0x30 MOV byte ptr [RBX + 0x10c],0x0 XOR EAX,EAX LAB_00122f85: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET caseD_9: MOV dword ptr [RBX + 0x108],0x7f4 LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0x120] JMP 0x00122dec LAB_00122fdd: MOV dword ptr [RBX + 0x108],0x7ee LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0xf0] JMP 0x00122dec LAB_00123026: MOV dword ptr [RBX + 0x108],0x7d8 LEA RDI,[RBX + 0x30d] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0x40] JMP 0x00122dec
int8 mysql_stmt_bind_param(long param_1,void *param_2) { code *pcVar1; char cVar2; int iVar3; void *__s; int8 uVar4; long lVar5; uint uVar6; char *__src; long lVar7; ulong uVar8; if (*(long *)(param_1 + 0x38) == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Lost_connection_to_server_during_0014ddf8; LAB_00122dec: strncpy((char *)(param_1 + 0x10c),__src,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar4 = 1; } else { if (*(int *)(param_1 + 0x50) != 1) { iVar3 = *(int *)(param_1 + 0x378); if (iVar3 == 0) { if (*(int *)(param_1 + 0x50) == 0) { *(int4 *)(param_1 + 0x108) = 0x7ee; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Statement_is_not_prepared_0014de80; goto LAB_00122dec; } } else { if (*(long *)(param_1 + 0x70) == 0) { __s = (void *)ma_alloc_root(param_1); *(void **)(param_1 + 0x70) = __s; if (__s == (void *)0x0) { *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Client_run_out_of_memory_0014ddd0; goto LAB_00122dec; } memset(__s,0,(ulong)*(uint *)(param_1 + 0x378) * 0x70); iVar3 = *(int *)(param_1 + 0x378); } *(int *)(param_1 + 100) = iVar3; } } if (param_2 != (void *)0x0 && (ulong)*(uint *)(param_1 + 100) != 0) { memcpy(*(void **)(param_1 + 0x70),param_2,(ulong)*(uint *)(param_1 + 100) * 0x70); *(int1 *)(param_1 + 0x68) = 1; if (*(int *)(param_1 + 100) != 0) { lVar7 = 0x40; uVar8 = 0; do { lVar5 = *(long *)(param_1 + 0x70); pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x38); if (pcVar1 != (code *)0x0) { cVar2 = (*pcVar1)(*(int4 *)(lVar5 + 0x20 + lVar7)); if (cVar2 != '\0') { lVar5 = *(long *)(param_1 + 0x70); goto LAB_00122e82; } switchD_00122ed3_caseD_9: *(int4 *)(param_1 + 0x108) = 0x7f4; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Buffer_type_is_not_supported_0014deb0; goto LAB_00122dec; } LAB_00122e82: if (*(long *)(lVar5 + -0x38 + lVar7) == 0) { *(int1 **)(lVar5 + -0x38 + lVar7) = &is_not_null; lVar5 = *(long *)(param_1 + 0x70); } if (*(char *)(lVar5 + 0x26 + lVar7) != '\0') { *(int1 *)(lVar5 + 0x26 + lVar7) = 0; lVar5 = *(long *)(param_1 + 0x70); } if (*(long *)(lVar5 + -0x40 + lVar7) == 0) { *(long *)(lVar5 + -0x40 + lVar7) = lVar5 + lVar7; lVar5 = *(long *)(param_1 + 0x70); } iVar3 = *(int *)(lVar5 + 0x20 + lVar7); switch(iVar3) { case 0: break; case 1: *(int8 *)(lVar5 + lVar7) = 1; break; case 2: case 0xd: *(int8 *)(lVar5 + lVar7) = 2; break; case 3: case 4: *(int8 *)(lVar5 + lVar7) = 4; break; case 5: case 8: *(int8 *)(lVar5 + lVar7) = 8; break; case 6: *(int1 **)(lVar5 + -0x38 + lVar7) = &is_null; break; case 7: case 0xc: *(int8 *)(lVar5 + lVar7) = 0xc; break; case 9: goto switchD_00122ed3_caseD_9; case 10: *(int8 *)(lVar5 + lVar7) = 5; break; case 0xb: *(int8 *)(lVar5 + lVar7) = 0xd; break; default: uVar6 = iVar3 - 0xf5; if ((9 < uVar6) || ((0x3f3U >> (uVar6 & 0x1f) & 1) == 0)) goto switchD_00122ed3_caseD_9; } uVar8 = uVar8 + 1; lVar7 = lVar7 + 0x70; } while (uVar8 < *(uint *)(param_1 + 100)); } } *(int1 *)(param_1 + 0x68) = 1; *(int1 *)(param_1 + 0xe9) = 1; *(int4 *)(param_1 + 0x108) = 0; *(int4 *)(param_1 + 0x30d) = 0x30303030; *(int2 *)(param_1 + 0x311) = 0x30; *(int1 *)(param_1 + 0x10c) = 0; uVar4 = 0; } return uVar4; }
51,567
my_mb_wc_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O0
c
my_mb_wc_euc_kr: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x9d2ce movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x9d3bb movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x9d2f6 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x9d3bb movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x9d310 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x9d3bb movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0x9d37e movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xfe, %eax jg 0x9d37e movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x41, %eax jl 0x9d346 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x5a, %eax jle 0x9d387 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x61, %eax jl 0x9d360 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7a, %eax jle 0x9d387 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x81, %eax jl 0x9d37e movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0x9d387 movl $0x0, -0x4(%rbp) jmp 0x9d3bb movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi callq 0x9d730 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x9d3b4 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x9d3bb movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_mb_wc_euc_kr: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_9D2CE mov [rbp+var_4], 0FFFFFF9Bh jmp loc_9D3BB loc_9D2CE: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_9D2F6 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_9D3BB loc_9D2F6: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_9D310 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_9D3BB loc_9D310: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 81h cmp eax, ecx jg short loc_9D37E mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0FEh jg short loc_9D37E mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 41h ; 'A' jl short loc_9D346 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 5Ah ; 'Z' jle short loc_9D387 loc_9D346: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 61h ; 'a' jl short loc_9D360 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 7Ah ; 'z' jle short loc_9D387 loc_9D360: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 81h jl short loc_9D37E mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_9D387 loc_9D37E: mov [rbp+var_4], 0 jmp short loc_9D3BB loc_9D387: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax call func_ksc5601_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_9D3B4 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_9D3BB loc_9D3B4: mov [rbp+var_4], 2 loc_9D3BB: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_euc_kr(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { int v4; // eax unsigned int v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v6 = *a3; if ( v6 >= 0x80 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (unsigned __int8)v6 < 0x81u || (unsigned __int8)v6 == 255 || (a3[1] < 0x41u || a3[1] > 0x5Au) && (a3[1] < 0x61u || a3[1] > 0x7Au) && (a3[1] < 0x81u || a3[1] == 255) ) { return 0; } else { v4 = func_ksc5601_uni_onechar(a3[1] + (v6 << 8)); *a2 = v4; if ( v4 ) return 2; else return (unsigned int)-2; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_euc_kr: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0019d2ce MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0019d3bb LAB_0019d2ce: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x0019d2f6 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019d3bb LAB_0019d2f6: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0019d310 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0019d3bb LAB_0019d310: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0x81 CMP EAX,ECX JG 0x0019d37e MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xfe JG 0x0019d37e MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x41 JL 0x0019d346 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x5a JLE 0x0019d387 LAB_0019d346: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x61 JL 0x0019d360 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7a JLE 0x0019d387 LAB_0019d360: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x81 JL 0x0019d37e MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x0019d387 LAB_0019d37e: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019d3bb LAB_0019d387: MOV EDI,dword ptr [RBP + -0x2c] SHL EDI,0x8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EDI,EAX CALL 0x0019d730 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x0019d3b4 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x0019d3bb LAB_0019d3b4: MOV dword ptr [RBP + -0x4],0x2 LAB_0019d3bb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_euc_kr(int8 param_1,long *param_2,byte *param_3,byte *param_4) { uint uVar1; int iVar2; int4 local_c; if (param_3 < param_4) { uVar1 = (uint)*param_3; if (uVar1 < 0x80) { *param_2 = (long)(int)uVar1; local_c = 1; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if (((uVar1 < 0x81) || (0xfe < uVar1)) || ((((param_3[1] < 0x41 || (0x5a < param_3[1])) && ((param_3[1] < 0x61 || (0x7a < param_3[1])))) && ((param_3[1] < 0x81 || (param_3[1] == 0xff)))))) { local_c = 0; } else { iVar2 = func_ksc5601_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]); *param_2 = (long)iVar2; if ((long)iVar2 == 0) { local_c = 0xfffffffe; } else { local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
51,568
my_strtoull
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err) { unsigned long long val = 0; const char *p = str; const char *end_str = p + len; for (; p < end_str; p++) { if (*p < '0' || *p > '9') break; if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0')) { *err = ERANGE; break; } val = val * 10 + *p -'0'; } if (p == str) /* Did not parse anything.*/ *err = ERANGE; *end = p; return val; }
O0
c
my_strtoull: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x49fee movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x49f86 movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x49f88 jmp 0x49fee movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999 cmpq %rax, -0x28(%rbp) ja 0x49fb9 imulq $0xa, -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movsbl (%rcx), %ecx subl $0x30, %ecx movslq %ecx, %rdx movq $-0x1, %rcx subq %rdx, %rcx cmpq %rcx, %rax jbe 0x49fc5 movq -0x20(%rbp), %rax movl $0x22, (%rax) jmp 0x49fee imulq $0xa, -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movsbq (%rcx), %rcx addq %rcx, %rax subq $0x30, %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x49f60 movq -0x30(%rbp), %rax cmpq -0x8(%rbp), %rax jne 0x4a002 movq -0x20(%rbp), %rax movl $0x22, (%rax) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_strtoull: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], 0 mov rax, [rbp+var_8] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rax, [rbp+var_10] mov [rbp+var_38], rax loc_49F60: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb loc_49FEE mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_49F86 mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_49F88 loc_49F86: jmp short loc_49FEE loc_49F88: mov rax, 1999999999999999h cmp [rbp+var_28], rax ja short loc_49FB9 imul rax, [rbp+var_28], 0Ah mov rcx, [rbp+var_30] movsx ecx, byte ptr [rcx] sub ecx, 30h ; '0' movsxd rdx, ecx mov rcx, 0FFFFFFFFFFFFFFFFh sub rcx, rdx cmp rax, rcx jbe short loc_49FC5 loc_49FB9: mov rax, [rbp+var_20] mov dword ptr [rax], 22h ; '"' jmp short loc_49FEE loc_49FC5: imul rax, [rbp+var_28], 0Ah mov rcx, [rbp+var_30] movsx rcx, byte ptr [rcx] add rax, rcx sub rax, 30h ; '0' mov [rbp+var_28], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp loc_49F60 loc_49FEE: mov rax, [rbp+var_30] cmp rax, [rbp+var_8] jnz short loc_4A002 mov rax, [rbp+var_20] mov dword ptr [rax], 22h ; '"' loc_4A002: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_28] pop rbp retn
unsigned long long my_strtoull(char *a1, long long a2, char **a3, _DWORD *a4) { char *i; // [rsp+8h] [rbp-30h] unsigned long long v6; // [rsp+10h] [rbp-28h] v6 = 0LL; for ( i = a1; i < &a1[a2] && *i >= 48 && *i <= 57; ++i ) { if ( v6 > 0x1999999999999999LL || 10 * v6 > -1LL - (*i - 48) ) { *a4 = 34; break; } v6 = *i + 10 * v6 - 48; } if ( i == a1 ) *a4 = 34; *a3 = i; return v6; }
my_strtoull: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LAB_00149f60: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00149fee MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x00149f86 MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x00149f88 LAB_00149f86: JMP 0x00149fee LAB_00149f88: MOV RAX,0x1999999999999999 CMP qword ptr [RBP + -0x28],RAX JA 0x00149fb9 IMUL RAX,qword ptr [RBP + -0x28],0xa MOV RCX,qword ptr [RBP + -0x30] MOVSX ECX,byte ptr [RCX] SUB ECX,0x30 MOVSXD RDX,ECX MOV RCX,-0x1 SUB RCX,RDX CMP RAX,RCX JBE 0x00149fc5 LAB_00149fb9: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x22 JMP 0x00149fee LAB_00149fc5: IMUL RAX,qword ptr [RBP + -0x28],0xa MOV RCX,qword ptr [RBP + -0x30] MOVSX RCX,byte ptr [RCX] ADD RAX,RCX SUB RAX,0x30 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00149f60 LAB_00149fee: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x8] JNZ 0x0014a002 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x22 LAB_0014a002: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] POP RBP RET
ulong my_strtoull(char *param_1,long param_2,int8 *param_3,int4 *param_4) { ulong uVar1; char *local_38; ulong local_30; local_30 = 0; local_38 = param_1; while( true ) { if (((param_1 + param_2 <= local_38) || (*local_38 < '0')) || ('9' < *local_38)) goto LAB_00149fee; if ((0x1999999999999999 < local_30) || (uVar1 = -(long)(*local_38 + -0x30) - 1, uVar1 <= local_30 * 10 && local_30 * 10 - uVar1 != 0 )) break; local_30 = (local_30 * 10 + (long)*local_38) - 0x30; local_38 = local_38 + 1; } *param_4 = 0x22; LAB_00149fee: if (local_38 == param_1) { *param_4 = 0x22; } *param_3 = local_38; return local_30; }
51,569
mi_mempack_get_block_info
eloqsql/storage/myisam/mi_packrec.c
static uchar *_mi_mempack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, uchar *header) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); if (myisam->s->base.blobs) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->blob_len); /* mi_alloc_rec_buff sets my_errno on error */ if (!(mi_alloc_rec_buff(myisam, info->blob_len , rec_buff_p))) return 0; /* not enough memory */ bit_buff->blob_pos= (uchar*) *rec_buff_p; bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len; } return header; }
O3
c
mi_mempack_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movzbl (%r8), %eax cmpq $0xfd, %rax ja 0x8695b movl $0x1, %ecx jmp 0x86996 cmpl $0xfe, %eax jne 0x8696d movzwl 0x1(%rbx), %eax movl $0x3, %ecx jmp 0x86996 movq (%rdi), %rax cmpb $0x1, 0x244(%rax) jne 0x8698e movzwl 0x1(%rbx), %ecx movzbl 0x3(%rbx), %eax shll $0x10, %eax orq %rcx, %rax movl $0x4, %ecx jmp 0x86996 movl 0x1(%rbx), %eax movl $0x5, %ecx movq %rax, 0x18(%r15) addq %rcx, %rbx movq (%rdi), %rax cmpl $0x0, 0x188(%rax) je 0x86a21 movzbl (%rbx), %esi cmpq $0xfd, %rsi ja 0x869bd movl $0x1, %r13d jmp 0x869f9 cmpl $0xfe, %esi jne 0x869d1 movzwl 0x1(%rbx), %esi movl $0x3, %r13d jmp 0x869f9 cmpb $0x1, 0x244(%rax) jne 0x869f0 movzwl 0x1(%rbx), %eax movzbl 0x3(%rbx), %esi shll $0x10, %esi orq %rax, %rsi movl $0x4, %r13d jmp 0x869f9 movl 0x1(%rbx), %esi movl $0x5, %r13d movq %rsi, 0x30(%r15) movq %r12, %rdx callq 0x82a59 testq %rax, %rax je 0x86a1f addq %r13, %rbx movq (%r12), %rax movq %rax, 0x18(%r14) addq 0x30(%r15), %rax movq %rax, 0x20(%r14) jmp 0x86a21 xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_mi_mempack_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r12, rcx mov r15, rdx mov r14, rsi movzx eax, byte ptr [r8] cmp rax, 0FDh ja short loc_8695B mov ecx, 1 jmp short loc_86996 loc_8695B: cmp eax, 0FEh jnz short loc_8696D movzx eax, word ptr [rbx+1] mov ecx, 3 jmp short loc_86996 loc_8696D: mov rax, [rdi] cmp byte ptr [rax+244h], 1 jnz short loc_8698E movzx ecx, word ptr [rbx+1] movzx eax, byte ptr [rbx+3] shl eax, 10h or rax, rcx mov ecx, 4 jmp short loc_86996 loc_8698E: mov eax, [rbx+1] mov ecx, 5 loc_86996: mov [r15+18h], rax add rbx, rcx mov rax, [rdi] cmp dword ptr [rax+188h], 0 jz short loc_86A21 movzx esi, byte ptr [rbx] cmp rsi, 0FDh ja short loc_869BD mov r13d, 1 jmp short loc_869F9 loc_869BD: cmp esi, 0FEh jnz short loc_869D1 movzx esi, word ptr [rbx+1] mov r13d, 3 jmp short loc_869F9 loc_869D1: cmp byte ptr [rax+244h], 1 jnz short loc_869F0 movzx eax, word ptr [rbx+1] movzx esi, byte ptr [rbx+3] shl esi, 10h or rsi, rax mov r13d, 4 jmp short loc_869F9 loc_869F0: mov esi, [rbx+1] mov r13d, 5 loc_869F9: mov [r15+30h], rsi mov rdx, r12 call mi_alloc_rec_buff test rax, rax jz short loc_86A1F add rbx, r13 mov rax, [r12] mov [r14+18h], rax add rax, [r15+30h] mov [r14+20h], rax jmp short loc_86A21 loc_86A1F: xor ebx, ebx loc_86A21: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned __int8 * mi_mempack_get_block_info( long long *a1, long long a2, long long a3, long long *a4, unsigned __int8 *a5, long long a6) { unsigned long long v9; // rax long long v10; // rcx unsigned __int8 *v11; // rbx unsigned long long v12; // rsi long long v13; // r13 long long v14; // rax v9 = *a5; if ( v9 > 0xFD ) { if ( (_DWORD)v9 == 254 ) { v9 = *(unsigned __int16 *)(a5 + 1); v10 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v9 = *(unsigned __int16 *)(a5 + 1) | (unsigned long long)(a5[3] << 16); v10 = 4LL; } else { v9 = *(unsigned int *)(a5 + 1); v10 = 5LL; } } else { v10 = 1LL; } *(_QWORD *)(a3 + 24) = v9; v11 = &a5[v10]; if ( *(_DWORD *)(*a1 + 392) ) { v12 = *v11; if ( v12 > 0xFD ) { if ( (_DWORD)v12 == 254 ) { v12 = *(unsigned __int16 *)(v11 + 1); v13 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v12 = *(unsigned __int16 *)(v11 + 1) | (unsigned long long)(v11[3] << 16); v13 = 4LL; } else { v12 = *(unsigned int *)(v11 + 1); v13 = 5LL; } } else { v13 = 1LL; } *(_QWORD *)(a3 + 48) = v12; if ( mi_alloc_rec_buff(a1, v12, a4, v10, (long long)a5, a6) ) { v11 += v13; v14 = *a4; *(_QWORD *)(a2 + 24) = *a4; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + v14; } else { return 0LL; } } return v11; }
_mi_mempack_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R12,RCX MOV R15,RDX MOV R14,RSI MOVZX EAX,byte ptr [R8] CMP RAX,0xfd JA 0x0018695b MOV ECX,0x1 JMP 0x00186996 LAB_0018695b: CMP EAX,0xfe JNZ 0x0018696d MOVZX EAX,word ptr [RBX + 0x1] MOV ECX,0x3 JMP 0x00186996 LAB_0018696d: MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x244],0x1 JNZ 0x0018698e MOVZX ECX,word ptr [RBX + 0x1] MOVZX EAX,byte ptr [RBX + 0x3] SHL EAX,0x10 OR RAX,RCX MOV ECX,0x4 JMP 0x00186996 LAB_0018698e: MOV EAX,dword ptr [RBX + 0x1] MOV ECX,0x5 LAB_00186996: MOV qword ptr [R15 + 0x18],RAX ADD RBX,RCX MOV RAX,qword ptr [RDI] CMP dword ptr [RAX + 0x188],0x0 JZ 0x00186a21 MOVZX ESI,byte ptr [RBX] CMP RSI,0xfd JA 0x001869bd MOV R13D,0x1 JMP 0x001869f9 LAB_001869bd: CMP ESI,0xfe JNZ 0x001869d1 MOVZX ESI,word ptr [RBX + 0x1] MOV R13D,0x3 JMP 0x001869f9 LAB_001869d1: CMP byte ptr [RAX + 0x244],0x1 JNZ 0x001869f0 MOVZX EAX,word ptr [RBX + 0x1] MOVZX ESI,byte ptr [RBX + 0x3] SHL ESI,0x10 OR RSI,RAX MOV R13D,0x4 JMP 0x001869f9 LAB_001869f0: MOV ESI,dword ptr [RBX + 0x1] MOV R13D,0x5 LAB_001869f9: MOV qword ptr [R15 + 0x30],RSI MOV RDX,R12 CALL 0x00182a59 TEST RAX,RAX JZ 0x00186a1f ADD RBX,R13 MOV RAX,qword ptr [R12] MOV qword ptr [R14 + 0x18],RAX ADD RAX,qword ptr [R15 + 0x30] MOV qword ptr [R14 + 0x20],RAX JMP 0x00186a21 LAB_00186a1f: XOR EBX,EBX LAB_00186a21: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
byte * _mi_mempack_get_block_info (long *param_1,long param_2,long param_3,long *param_4,byte *param_5) { long lVar1; long lVar2; ulong uVar3; uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x18) = uVar3; param_5 = param_5 + lVar2; if (*(int *)(*param_1 + 0x188) != 0) { uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x30) = uVar3; lVar1 = mi_alloc_rec_buff(param_1,uVar3,param_4); if (lVar1 == 0) { param_5 = (byte *)0x0; } else { param_5 = param_5 + lVar2; lVar2 = *param_4; *(long *)(param_2 + 0x18) = lVar2; *(long *)(param_2 + 0x20) = lVar2 + *(long *)(param_3 + 0x30); } } return param_5; }
51,570
my_casefold_mb
eloqsql/strings/ctype-mb.c
static size_t my_casefold_mb(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar *map, size_t is_upper) { const char *srcend= src + srclen; char *dst0= dst; DBUG_ASSERT(cs->mbmaxlen == 2); while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; if ((ch= get_case_info_for_ch(cs, (uchar) src[0], (uchar) src[1]))) { int code= is_upper ? ch->toupper : ch->tolower; src+= 2; if (code > 0xFF) *dst++= code >> 8; *dst++= code & 0xFF; } else { *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O3
c
my_casefold_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x364f7 movq %r8, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 addq %rsi, %r15 xorl %eax, %eax testq %r9, %r9 sete %al shll $0x2, %eax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rbx movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax jge 0x36497 movzbl (%r12), %eax incq %r12 movb (%r14,%rax), %al movb %al, (%rbx) incq %rbx jmp 0x364ee movb (%r12), %al movq 0x78(%r13), %rcx testq %rcx, %rcx je 0x364dc movzbl %al, %edx movq 0x8(%rcx), %rcx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0x364dc movzbl 0x1(%r12), %eax leaq (%rax,%rax,2), %rax leaq (%rcx,%rax,4), %rax movq -0x38(%rbp), %rcx movl (%rcx,%rax), %eax cmpl $0x100, %eax # imm = 0x100 jl 0x364d5 movb %ah, (%rbx) incq %rbx movb %al, (%rbx) incq %rbx jmp 0x364ea movb %al, (%rbx) movb 0x1(%r12), %al movb %al, 0x1(%rbx) addq $0x2, %rbx addq $0x2, %r12 cmpq %r15, %r12 jb 0x36469 subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casefold_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rcx mov [rbp+var_30], rcx test rdx, rdx jle loc_364F7 mov r14, r8 mov r15, rdx mov r12, rsi mov r13, rdi add r15, rsi xor eax, eax test r9, r9 setz al shl eax, 2 mov [rbp+var_38], rax mov rbx, [rbp+var_30] loc_36469: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_36497 movzx eax, byte ptr [r12] inc r12 mov al, [r14+rax] mov [rbx], al inc rbx jmp short loc_364EE loc_36497: mov al, [r12] mov rcx, [r13+78h] test rcx, rcx jz short loc_364DC movzx edx, al mov rcx, [rcx+8] mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_364DC movzx eax, byte ptr [r12+1] lea rax, [rax+rax*2] lea rax, [rcx+rax*4] mov rcx, [rbp+var_38] mov eax, [rcx+rax] cmp eax, 100h jl short loc_364D5 mov [rbx], ah inc rbx loc_364D5: mov [rbx], al inc rbx jmp short loc_364EA loc_364DC: mov [rbx], al mov al, [r12+1] mov [rbx+1], al add rbx, 2 loc_364EA: add r12, 2 loc_364EE: cmp r12, r15 jb loc_36469 loc_364F7: sub rbx, [rbp+var_30] mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casefold_mb( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6) { unsigned __int8 *v6; // rbx unsigned __int8 *v8; // r12 unsigned long long v9; // r15 long long v10; // rax unsigned __int8 v11; // al long long v12; // rcx long long v13; // rcx int v14; // eax long long v16; // [rsp+8h] [rbp-38h] v6 = a4; if ( a3 > 0 ) { v8 = a2; v9 = (unsigned long long)&a2[a3]; v16 = 4 * (unsigned int)(a6 == 0); v6 = a4; do { if ( (*(int ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v8, v9) >= 2 ) { v11 = *v8; v12 = *(_QWORD *)(a1 + 120); if ( v12 && (v13 = *(_QWORD *)(*(_QWORD *)(v12 + 8) + 8LL * v11)) != 0 ) { v14 = *(_DWORD *)(v16 + v13 + 12LL * v8[1]); if ( v14 >= 256 ) *v6++ = BYTE1(v14); *v6++ = v14; } else { *v6 = v11; v6[1] = v8[1]; v6 += 2; } v8 += 2; } else { v10 = *v8++; *v6++ = *(_BYTE *)(a5 + v10); } } while ( (unsigned long long)v8 < v9 ); } return (_BYTE *)(v6 - a4); }
my_casefold_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x001364f7 MOV R14,R8 MOV R15,RDX MOV R12,RSI MOV R13,RDI ADD R15,RSI XOR EAX,EAX TEST R9,R9 SETZ AL SHL EAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RBX,qword ptr [RBP + -0x30] LAB_00136469: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x00136497 MOVZX EAX,byte ptr [R12] INC R12 MOV AL,byte ptr [R14 + RAX*0x1] MOV byte ptr [RBX],AL INC RBX JMP 0x001364ee LAB_00136497: MOV AL,byte ptr [R12] MOV RCX,qword ptr [R13 + 0x78] TEST RCX,RCX JZ 0x001364dc MOVZX EDX,AL MOV RCX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x001364dc MOVZX EAX,byte ptr [R12 + 0x1] LEA RAX,[RAX + RAX*0x2] LEA RAX,[RCX + RAX*0x4] MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RCX + RAX*0x1] CMP EAX,0x100 JL 0x001364d5 MOV byte ptr [RBX],AH INC RBX LAB_001364d5: MOV byte ptr [RBX],AL INC RBX JMP 0x001364ea LAB_001364dc: MOV byte ptr [RBX],AL MOV AL,byte ptr [R12 + 0x1] MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 LAB_001364ea: ADD R12,0x2 LAB_001364ee: CMP R12,R15 JC 0x00136469 LAB_001364f7: SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casefold_mb(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,long param_6) { byte bVar1; long lVar2; int iVar3; byte *pbVar4; byte *pbVar5; pbVar4 = param_4; if (0 < param_3) { pbVar5 = param_2 + param_3; do { iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar5); if (iVar3 < 2) { bVar1 = *param_2; param_2 = param_2 + 1; *pbVar4 = *(byte *)(param_5 + (ulong)bVar1); pbVar4 = pbVar4 + 1; } else { if ((*(long *)(param_1 + 0x78) == 0) || (lVar2 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8), lVar2 == 0)) { *pbVar4 = *param_2; pbVar4[1] = param_2[1]; pbVar4 = pbVar4 + 2; } else { iVar3 = *(int *)((ulong)(param_6 == 0) * 4 + lVar2 + (ulong)param_2[1] * 0xc); if (0xff < iVar3) { *pbVar4 = (byte)((uint)iVar3 >> 8); pbVar4 = pbVar4 + 1; } *pbVar4 = (byte)iVar3; pbVar4 = pbVar4 + 1; } param_2 = param_2 + 2; } } while (param_2 < pbVar5); } return (long)pbVar4 - (long)param_4; }
51,571
testing::internal::NoExecDeathTest::NoExecDeathTest(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>)
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest-death-test.cc
NoExecDeathTest(const char* a_statement, Matcher<const std::string&> matcher) : ForkingDeathTest(a_statement, std::move(matcher)) {}
O3
cpp
testing::internal::NoExecDeathTest::NoExecDeathTest(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>): pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x8(%rdx), %rcx leaq 0x8(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rdx), %rcx movq %rcx, 0x10(%rax) movq $0x0, 0x8(%rdx) leaq 0x247ec(%rip), %rcx # 0x59738 movq %rcx, (%rax) movq %rax, %rdx callq 0x1369e leaq 0x8(%rsp), %rdi callq 0x34c38 leaq 0x24288(%rip), %rax # 0x591f0 movq %rax, (%rbx) addq $0x20, %rsp popq %rbx retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x34c38 movq %rbx, %rdi callq 0x99a0
_ZN7testing8internal15NoExecDeathTestC2EPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE: push rbx sub rsp, 20h mov rbx, rdi mov rcx, [rdx+8] lea rax, [rsp+28h+var_20] mov [rax+8], rcx mov rcx, [rdx+10h] mov [rax+10h], rcx mov qword ptr [rdx+8], 0 lea rcx, off_59738 mov [rax], rcx mov rdx, rax call _ZN7testing8internal16ForkingDeathTestC2EPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE; testing::internal::ForkingDeathTest::ForkingDeathTest(char const*,testing::Matcher<std::string const&>) lea rdi, [rsp+28h+var_20] call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase() lea rax, off_591F0 mov [rbx], rax add rsp, 20h pop rbx retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase() mov rdi, rbx call __Unwind_Resume
void ( ** testing::internal::NoExecDeathTest::NoExecDeathTest( _QWORD *a1, long long a2, long long a3))(testing::internal::DeathTestImpl *__hidden this) { void ( **result)(testing::internal::DeathTestImpl *__hidden); // rax _QWORD v4[4]; // [rsp+8h] [rbp-20h] BYREF v4[1] = *(_QWORD *)(a3 + 8); v4[2] = *(_QWORD *)(a3 + 16); *(_QWORD *)(a3 + 8) = 0LL; v4[0] = &off_59738; testing::internal::ForkingDeathTest::ForkingDeathTest((long long)a1, a2, (long long)v4); testing::internal::MatcherBase<std::string const&>::~MatcherBase((long long)v4); result = off_591F0; *a1 = off_591F0; return result; }
NoExecDeathTest: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RCX,qword ptr [RDX + 0x8] LEA RAX,[RSP + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RDX + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RDX + 0x8],0x0 LEA RCX,[0x159738] MOV qword ptr [RAX],RCX LAB_00134f4f: MOV RDX,RAX CALL 0x0011369e LAB_00134f57: LEA RDI,[RSP + 0x8] CALL 0x00134c38 LEA RAX,[0x1591f0] MOV qword ptr [RBX],RAX ADD RSP,0x20 POP RBX RET
/* testing::internal::NoExecDeathTest::NoExecDeathTest(char const*, testing::Matcher<std::__cxx11::string const&>) */ void __thiscall testing::internal::NoExecDeathTest::NoExecDeathTest (NoExecDeathTest *this,int8 param_1,long param_3) { int **local_20; int8 local_18; int8 local_10; local_18 = *(int8 *)(param_3 + 8); local_10 = *(int8 *)(param_3 + 0x10); *(int8 *)(param_3 + 8) = 0; local_20 = &PTR__MatcherBase_00159738; /* try { // try from 00134f4f to 00134f56 has its CatchHandler @ 00134f71 */ ForkingDeathTest::ForkingDeathTest((ForkingDeathTest *)this,param_1,&local_20); MatcherBase<std::__cxx11::string_const&>::~MatcherBase ((MatcherBase<std::__cxx11::string_const&> *)&local_20); *(int ***)this = &PTR__DeathTestImpl_001591f0; return; }
51,572
peek_token
bluesky950520[P]quickjs/quickjs.c
static int peek_token(JSParseState *s, BOOL no_line_terminator) { const uint8_t *p = s->buf_ptr; return simple_next_token(&p, no_line_terminator); }
O2
c
peek_token: pushq %r15 pushq %r14 pushq %rbx movq 0x70(%rdi), %r15 pushq $0xa popq %rcx pushq $0x2f popq %rax movl $0x2401, %edx # imm = 0x2401 movq %r15, %r14 incq %r15 movzbl (%r14), %ebx leal -0xb(%rbx), %edi cmpl $0x2, %edi jb 0x51b55 cmpl $0x9, %ebx je 0x51b55 cmpl $0xa, %ebx je 0x51bc4 cmpl $0xd, %ebx je 0x51bc4 cmpl $0x20, %ebx je 0x51b55 cmpl $0x2f, %ebx jne 0x51bfe movzbl (%r15), %edi cmpl $0x2f, %edi je 0x51bca cmpl $0x2a, %edi jne 0x51bf8 addq $0x2, %r14 movq %r14, %r15 movzbl (%r15), %edi cmpl $0xd, %edi je 0x51bbb testl %edi, %edi je 0x51b55 testl %esi, %esi je 0x51bac cmpb $0xa, %dil je 0x51bf6 cmpb $0x2a, %dil jne 0x51bbf cmpb $0x2f, 0x1(%r15) jne 0x51bbf jmp 0x51bed testl %esi, %esi jne 0x51bf6 incq %r15 jmp 0x51b95 testl %esi, %esi je 0x51b55 jmp 0x51bf6 testl %esi, %esi jne 0x51bf6 movb $0x2f, %dil cmpb $0xd, %dil ja 0x51be4 movzbl %dil, %edi btl %edi, %edx jb 0x51b55 movb 0x1(%r15), %dil incq %r15 jmp 0x51bd1 addq $0x2, %r15 jmp 0x51b55 movl %ecx, %eax popq %rbx popq %r14 popq %r15 retq cmpl $0x3d, %ebx jne 0x51c12 cmpb $0x3e, (%r15) pushq $-0x5c popq %rcx pushq $0x3d popq %rax cmovel %ecx, %eax jmp 0x51bf8 movl %ebx, %edi callq 0x5184d testl %eax, %eax je 0x51c79 leal -0x61(%rbx), %eax cmpl $0x8, %eax ja 0x51c80 leaq 0x326d4(%rip), %rcx # 0x84300 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax cmpb $0x77, (%r15) jne 0x51d84 cmpb $0x61, 0x2(%r14) jne 0x51d84 cmpb $0x69, 0x3(%r14) jne 0x51d84 cmpb $0x74, 0x4(%r14) jne 0x51d84 movzbl 0x5(%r14), %edi callq 0x51a98 testl %eax, %eax jne 0x51d84 pushq $-0x28 jmp 0x51d86 movl %ebx, %eax jmp 0x51bf8 cmpl $0x6f, %ebx jne 0x51d84 cmpb $0x66, (%r15) jne 0x51d84 movzbl 0x2(%r14), %edi callq 0x51a98 testl %eax, %eax jne 0x51d84 pushq $-0x27 jmp 0x51d86 cmpb $0x75, (%r15) jne 0x51d84 cmpb $0x6e, 0x2(%r14) jne 0x51d84 cmpb $0x63, 0x3(%r14) jne 0x51d84 cmpb $0x74, 0x4(%r14) jne 0x51d84 cmpb $0x69, 0x5(%r14) jne 0x51d84 cmpb $0x6f, 0x6(%r14) jne 0x51d84 cmpb $0x6e, 0x7(%r14) jne 0x51d84 movzbl 0x8(%r14), %edi callq 0x51a98 testl %eax, %eax jne 0x51d84 pushq $-0x3b jmp 0x51d86 movb (%r15), %al cmpb $0x6e, %al jne 0x51d22 movzbl 0x2(%r14), %edi callq 0x51a98 testl %eax, %eax je 0x51d8c movb (%r15), %al cmpb $0x6d, %al jne 0x51d84 cmpb $0x70, 0x2(%r14) jne 0x51d84 cmpb $0x6f, 0x3(%r14) jne 0x51d84 cmpb $0x72, 0x4(%r14) jne 0x51d84 cmpb $0x74, 0x5(%r14) jne 0x51d84 movzbl 0x6(%r14), %edi callq 0x51a98 testl %eax, %eax jne 0x51d84 pushq $-0x33 jmp 0x51d86 cmpb $0x78, (%r15) jne 0x51d84 cmpb $0x70, 0x2(%r14) jne 0x51d84 cmpb $0x6f, 0x3(%r14) jne 0x51d84 cmpb $0x72, 0x4(%r14) jne 0x51d84 cmpb $0x74, 0x5(%r14) jne 0x51d84 movzbl 0x6(%r14), %edi callq 0x51a98 testl %eax, %eax je 0x51d90 pushq $-0x7d popq %rax jmp 0x51bf8 pushq $-0x49 jmp 0x51d86 pushq $-0x35 jmp 0x51d86
peek_token: push r15 push r14 push rbx mov r15, [rdi+70h] push 0Ah pop rcx push 2Fh ; '/' pop rax mov edx, 2401h loc_51B55: mov r14, r15 inc r15 movzx ebx, byte ptr [r14] lea edi, [rbx-0Bh] cmp edi, 2 jb short loc_51B55 cmp ebx, 9 jz short loc_51B55 cmp ebx, 0Ah jz short loc_51BC4 cmp ebx, 0Dh jz short loc_51BC4 cmp ebx, 20h ; ' ' jz short loc_51B55 cmp ebx, 2Fh ; '/' jnz short loc_51BFE movzx edi, byte ptr [r15] cmp edi, 2Fh ; '/' jz short loc_51BCA cmp edi, 2Ah ; '*' jnz short loc_51BF8 add r14, 2 mov r15, r14 loc_51B95: movzx edi, byte ptr [r15] cmp edi, 0Dh jz short loc_51BBB test edi, edi jz short loc_51B55 test esi, esi jz short loc_51BAC cmp dil, 0Ah jz short loc_51BF6 loc_51BAC: cmp dil, 2Ah ; '*' jnz short loc_51BBF cmp byte ptr [r15+1], 2Fh ; '/' jnz short loc_51BBF jmp short loc_51BED loc_51BBB: test esi, esi jnz short loc_51BF6 loc_51BBF: inc r15 jmp short loc_51B95 loc_51BC4: test esi, esi jz short loc_51B55 jmp short loc_51BF6 loc_51BCA: test esi, esi jnz short loc_51BF6 mov dil, 2Fh ; '/' loc_51BD1: cmp dil, 0Dh ja short loc_51BE4 movzx edi, dil bt edx, edi jb loc_51B55 loc_51BE4: mov dil, [r15+1] inc r15 jmp short loc_51BD1 loc_51BED: add r15, 2 jmp loc_51B55 loc_51BF6: mov eax, ecx loc_51BF8: pop rbx pop r14 pop r15 retn loc_51BFE: cmp ebx, 3Dh ; '=' jnz short loc_51C12 cmp byte ptr [r15], 3Eh ; '>' push 0FFFFFFFFFFFFFFA4h pop rcx push 3Dh ; '=' pop rax cmovz eax, ecx jmp short loc_51BF8 loc_51C12: mov edi, ebx call lre_js_is_ident_first test eax, eax jz short loc_51C79 lea eax, [rbx-61h]; switch 9 cases cmp eax, 8 ja short def_51C33; jumptable 0000000000051C33 default case lea rcx, jpt_51C33 movsxd rax, ds:(jpt_51C33 - 84300h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_51C35: cmp byte ptr [r15], 77h ; 'w'; jumptable 0000000000051C33 case 97 jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+2], 61h ; 'a' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+3], 69h ; 'i' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+4], 74h ; 't' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 movzx edi, byte ptr [r14+5] call lre_js_is_ident_next test eax, eax jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 push 0FFFFFFFFFFFFFFD8h jmp loc_51D86 loc_51C79: mov eax, ebx jmp loc_51BF8 def_51C33: cmp ebx, 6Fh ; 'o'; jumptable 0000000000051C33 default case jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r15], 66h ; 'f' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 movzx edi, byte ptr [r14+2] call lre_js_is_ident_next test eax, eax jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 push 0FFFFFFFFFFFFFFD9h jmp loc_51D86 loc_51CAC: cmp byte ptr [r15], 75h ; 'u'; jumptable 0000000000051C33 case 102 jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+2], 6Eh ; 'n' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+3], 63h ; 'c' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+4], 74h ; 't' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+5], 69h ; 'i' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+6], 6Fh ; 'o' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+7], 6Eh ; 'n' jnz loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 movzx edi, byte ptr [r14+8] call lre_js_is_ident_next test eax, eax jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 push 0FFFFFFFFFFFFFFC5h jmp short loc_51D86 loc_51D0A: mov al, [r15]; jumptable 0000000000051C33 case 105 cmp al, 6Eh ; 'n' jnz short loc_51D22 movzx edi, byte ptr [r14+2] call lre_js_is_ident_next test eax, eax jz short loc_51D8C mov al, [r15] loc_51D22: cmp al, 6Dh ; 'm' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+2], 70h ; 'p' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+3], 6Fh ; 'o' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+4], 72h ; 'r' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+5], 74h ; 't' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 movzx edi, byte ptr [r14+6] call lre_js_is_ident_next test eax, eax jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 push 0FFFFFFFFFFFFFFCDh jmp short loc_51D86 loc_51D54: cmp byte ptr [r15], 78h ; 'x'; jumptable 0000000000051C33 case 101 jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+2], 70h ; 'p' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+3], 6Fh ; 'o' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+4], 72h ; 'r' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 cmp byte ptr [r14+5], 74h ; 't' jnz short loc_51D84; jumptable 0000000000051C33 cases 98-100,103,104 movzx edi, byte ptr [r14+6] call lre_js_is_ident_next test eax, eax jz short loc_51D90 loc_51D84: push 0FFFFFFFFFFFFFF83h; jumptable 0000000000051C33 cases 98-100,103,104 loc_51D86: pop rax jmp loc_51BF8 loc_51D8C: push 0FFFFFFFFFFFFFFB7h jmp short loc_51D86 loc_51D90: push 0FFFFFFFFFFFFFFCBh jmp short loc_51D86
long long peek_token(long long a1, int a2) { unsigned __int8 *j; // r15 long long result; // rax int v4; // edx unsigned __int8 *v5; // r14 unsigned int v6; // ebx int v7; // edi int v8; // edi unsigned __int8 i; // di unsigned __int8 v10; // al long long v11; // [rsp-8h] [rbp-20h] j = *(unsigned __int8 **)(a1 + 112); result = 47LL; v4 = 9217; while ( 1 ) { do { while ( 1 ) { do { do { LABEL_2: v5 = j++; v6 = *v5; } while ( v6 - 11 < 2 ); } while ( v6 == 9 ); if ( v6 != 10 && v6 != 13 ) break; if ( a2 ) return 10LL; } } while ( v6 == 32 ); if ( v6 != 47 ) break; v7 = *j; if ( v7 == 47 ) { if ( !a2 ) { for ( i = 47; i > 0xDu || !_bittest(&v4, i); i = *++j ) ; goto LABEL_2; } return 10LL; } if ( v7 != 42 ) return result; for ( j = v5 + 2; ; ++j ) { v8 = *j; if ( v8 == 13 ) { if ( a2 ) return 10LL; continue; } if ( !*j ) goto LABEL_2; if ( a2 && (_BYTE)v8 == 10 ) return 10LL; if ( (_BYTE)v8 == 42 && j[1] == 47 ) break; } j += 2; } if ( v6 == 61 ) { result = 61LL; if ( *j == 62 ) return 4294967204LL; } else if ( (unsigned int)lre_js_is_ident_first(*v5) ) { switch ( v6 ) { case 'a': if ( *j != 119 || v5[2] != 97 || v5[3] != 105 || v5[4] != 116 || (unsigned int)lre_js_is_ident_next(v5[5]) ) goto LABEL_71; return -40LL; case 'b': case 'c': case 'd': case 'g': case 'h': goto LABEL_71; case 'e': if ( *j != 120 || v5[2] != 112 || v5[3] != 111 || v5[4] != 114 || v5[5] != 116 || (unsigned int)lre_js_is_ident_next(v5[6]) ) { goto LABEL_71; } v11 = -53LL; break; case 'f': if ( *j != 117 || v5[2] != 110 || v5[3] != 99 || v5[4] != 116 || v5[5] != 105 || v5[6] != 111 || v5[7] != 110 || (unsigned int)lre_js_is_ident_next(v5[8]) ) { goto LABEL_71; } v11 = -59LL; break; case 'i': v10 = *j; if ( *j != 110 ) goto LABEL_58; if ( (unsigned int)lre_js_is_ident_next(v5[2]) ) { v10 = *j; LABEL_58: if ( v10 == 109 && v5[2] == 112 && v5[3] == 111 && v5[4] == 114 && v5[5] == 116 && !(unsigned int)lre_js_is_ident_next(v5[6]) ) { v11 = -51LL; } else { LABEL_71: v11 = -125LL; } } else { v11 = -73LL; } break; default: if ( v6 != 111 || *j != 102 || (unsigned int)lre_js_is_ident_next(v5[2]) ) goto LABEL_71; v11 = -39LL; break; } return v11; } else { return v6; } return result; }
peek_token: PUSH R15 PUSH R14 PUSH RBX MOV R15,qword ptr [RDI + 0x70] PUSH 0xa POP RCX PUSH 0x2f POP RAX MOV EDX,0x2401 LAB_00151b55: MOV R14,R15 INC R15 MOVZX EBX,byte ptr [R14] LEA EDI,[RBX + -0xb] CMP EDI,0x2 JC 0x00151b55 CMP EBX,0x9 JZ 0x00151b55 CMP EBX,0xa JZ 0x00151bc4 CMP EBX,0xd JZ 0x00151bc4 CMP EBX,0x20 JZ 0x00151b55 CMP EBX,0x2f JNZ 0x00151bfe MOVZX EDI,byte ptr [R15] CMP EDI,0x2f JZ 0x00151bca CMP EDI,0x2a JNZ 0x00151bf8 ADD R14,0x2 MOV R15,R14 LAB_00151b95: MOVZX EDI,byte ptr [R15] CMP EDI,0xd JZ 0x00151bbb TEST EDI,EDI JZ 0x00151b55 TEST ESI,ESI JZ 0x00151bac CMP DIL,0xa JZ 0x00151bf6 LAB_00151bac: CMP DIL,0x2a JNZ 0x00151bbf CMP byte ptr [R15 + 0x1],0x2f JNZ 0x00151bbf JMP 0x00151bed LAB_00151bbb: TEST ESI,ESI JNZ 0x00151bf6 LAB_00151bbf: INC R15 JMP 0x00151b95 LAB_00151bc4: TEST ESI,ESI JZ 0x00151b55 JMP 0x00151bf6 LAB_00151bca: TEST ESI,ESI JNZ 0x00151bf6 MOV DIL,0x2f LAB_00151bd1: CMP DIL,0xd JA 0x00151be4 MOVZX EDI,DIL BT EDX,EDI JC 0x00151b55 LAB_00151be4: MOV DIL,byte ptr [R15 + 0x1] INC R15 JMP 0x00151bd1 LAB_00151bed: ADD R15,0x2 JMP 0x00151b55 LAB_00151bf6: MOV EAX,ECX LAB_00151bf8: POP RBX POP R14 POP R15 RET LAB_00151bfe: CMP EBX,0x3d JNZ 0x00151c12 CMP byte ptr [R15],0x3e PUSH -0x5c POP RCX PUSH 0x3d POP RAX CMOVZ EAX,ECX JMP 0x00151bf8 LAB_00151c12: MOV EDI,EBX CALL 0x0015184d TEST EAX,EAX JZ 0x00151c79 LEA EAX,[RBX + -0x61] CMP EAX,0x8 JA 0x00151c80 LEA RCX,[0x184300] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_61: CMP byte ptr [R15],0x77 JNZ 0x00151d84 CMP byte ptr [R14 + 0x2],0x61 JNZ 0x00151d84 CMP byte ptr [R14 + 0x3],0x69 JNZ 0x00151d84 CMP byte ptr [R14 + 0x4],0x74 JNZ 0x00151d84 MOVZX EDI,byte ptr [R14 + 0x5] CALL 0x00151a98 TEST EAX,EAX JNZ 0x00151d84 PUSH -0x28 JMP 0x00151d86 LAB_00151c79: MOV EAX,EBX JMP 0x00151bf8 default: CMP EBX,0x6f JNZ 0x00151d84 CMP byte ptr [R15],0x66 JNZ 0x00151d84 MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x00151a98 TEST EAX,EAX JNZ 0x00151d84 PUSH -0x27 JMP 0x00151d86 caseD_66: CMP byte ptr [R15],0x75 JNZ 0x00151d84 CMP byte ptr [R14 + 0x2],0x6e JNZ 0x00151d84 CMP byte ptr [R14 + 0x3],0x63 JNZ 0x00151d84 CMP byte ptr [R14 + 0x4],0x74 JNZ 0x00151d84 CMP byte ptr [R14 + 0x5],0x69 JNZ 0x00151d84 CMP byte ptr [R14 + 0x6],0x6f JNZ 0x00151d84 CMP byte ptr [R14 + 0x7],0x6e JNZ 0x00151d84 MOVZX EDI,byte ptr [R14 + 0x8] CALL 0x00151a98 TEST EAX,EAX JNZ 0x00151d84 PUSH -0x3b JMP 0x00151d86 caseD_69: MOV AL,byte ptr [R15] CMP AL,0x6e JNZ 0x00151d22 MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x00151a98 TEST EAX,EAX JZ 0x00151d8c MOV AL,byte ptr [R15] LAB_00151d22: CMP AL,0x6d JNZ 0x00151d84 CMP byte ptr [R14 + 0x2],0x70 JNZ 0x00151d84 CMP byte ptr [R14 + 0x3],0x6f JNZ 0x00151d84 CMP byte ptr [R14 + 0x4],0x72 JNZ 0x00151d84 CMP byte ptr [R14 + 0x5],0x74 JNZ 0x00151d84 MOVZX EDI,byte ptr [R14 + 0x6] CALL 0x00151a98 TEST EAX,EAX JNZ 0x00151d84 PUSH -0x33 JMP 0x00151d86 caseD_65: CMP byte ptr [R15],0x78 JNZ 0x00151d84 CMP byte ptr [R14 + 0x2],0x70 JNZ 0x00151d84 CMP byte ptr [R14 + 0x3],0x6f JNZ 0x00151d84 CMP byte ptr [R14 + 0x4],0x72 JNZ 0x00151d84 CMP byte ptr [R14 + 0x5],0x74 JNZ 0x00151d84 MOVZX EDI,byte ptr [R14 + 0x6] CALL 0x00151a98 TEST EAX,EAX JZ 0x00151d90 caseD_62: PUSH -0x7d LAB_00151d86: POP RAX JMP 0x00151bf8 LAB_00151d8c: PUSH -0x49 JMP 0x00151d86 LAB_00151d90: PUSH -0x35 JMP 0x00151d86
ulong peek_token(long param_1,int param_2) { ulong uVar1; int iVar2; uint uVar3; byte bVar4; byte *pbVar5; byte *pbVar6; pbVar6 = *(byte **)(param_1 + 0x70); LAB_00151b55: do { do { while( true ) { do { do { pbVar5 = pbVar6; pbVar6 = pbVar5 + 1; bVar4 = *pbVar5; } while (bVar4 - 0xb < 2); } while (bVar4 == 9); if ((bVar4 != 10) && (bVar4 != 0xd)) break; if (param_2 != 0) { return 10; } } } while (bVar4 == 0x20); if (bVar4 != 0x2f) { if (bVar4 == 0x3d) { uVar1 = 0x3d; if (*pbVar6 == 0x3e) { uVar1 = 0xffffffffffffffa4; } return uVar1 & 0xffffffff; } uVar3 = (uint)bVar4; iVar2 = lre_js_is_ident_first(uVar3); if (iVar2 == 0) { return (ulong)uVar3; } switch(bVar4) { case 0x61: if (((*pbVar6 == 0x77) && (pbVar5[2] == 0x61)) && ((pbVar5[3] == 0x69 && ((pbVar5[4] == 0x74 && (iVar2 = lre_js_is_ident_next(pbVar5[5]), iVar2 == 0)))))) { return 0xffffffffffffffd8; } break; case 0x62: case 99: case 100: case 0x67: case 0x68: break; case 0x65: if (((((*pbVar6 == 0x78) && (pbVar5[2] == 0x70)) && (pbVar5[3] == 0x6f)) && ((pbVar5[4] == 0x72 && (pbVar5[5] == 0x74)))) && (iVar2 = lre_js_is_ident_next(pbVar5[6]), iVar2 == 0)) { return 0xffffffffffffffcb; } break; case 0x66: if (((((*pbVar6 == 0x75) && (pbVar5[2] == 0x6e)) && (pbVar5[3] == 99)) && ((pbVar5[4] == 0x74 && (pbVar5[5] == 0x69)))) && ((pbVar5[6] == 0x6f && ((pbVar5[7] == 0x6e && (iVar2 = lre_js_is_ident_next(pbVar5[8]), iVar2 == 0)))))) { return 0xffffffffffffffc5; } break; case 0x69: bVar4 = *pbVar6; if (bVar4 == 0x6e) { iVar2 = lre_js_is_ident_next(pbVar5[2]); if (iVar2 == 0) { return 0xffffffffffffffb7; } bVar4 = *pbVar6; } if ((((bVar4 == 0x6d) && (pbVar5[2] == 0x70)) && ((pbVar5[3] == 0x6f && ((pbVar5[4] == 0x72 && (pbVar5[5] == 0x74)))))) && (iVar2 = lre_js_is_ident_next(pbVar5[6]), iVar2 == 0)) { return 0xffffffffffffffcd; } break; default: if (((uVar3 == 0x6f) && (*pbVar6 == 0x66)) && (iVar2 = lre_js_is_ident_next(pbVar5[2]), iVar2 == 0)) { return 0xffffffffffffffd9; } } return 0xffffffffffffff83; } if (*pbVar6 != 0x2f) { if (*pbVar6 != 0x2a) { return 0x2f; } pbVar6 = pbVar5 + 2; do { bVar4 = *pbVar6; if (bVar4 == 0xd) { if (param_2 != 0) { return 10; } } else { if (bVar4 == 0) goto LAB_00151b55; if ((param_2 != 0) && (bVar4 == 10)) { return 10; } if ((bVar4 == 0x2a) && (pbVar6[1] == 0x2f)) goto LAB_00151bed; } pbVar6 = pbVar6 + 1; } while( true ); } if (param_2 != 0) { return 10; } bVar4 = 0x2f; while ((0xd < bVar4 || ((0x2401U >> (bVar4 & 0x1f) & 1) == 0))) { bVar4 = pbVar6[1]; pbVar6 = pbVar6 + 1; } } while( true ); LAB_00151bed: pbVar6 = pbVar6 + 2; goto LAB_00151b55; }
51,573
evmone::check_memory(long&, evmone::Memory&, intx::uint<256u> const&, unsigned long)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline bool check_memory( int64_t& gas_left, Memory& memory, const uint256& offset, uint64_t size) noexcept { // TODO: This should be done in intx. // There is "branchless" variant of this using | instead of ||, but benchmarks difference // is within noise. This should be decided when moving the implementation to intx. if (((offset[3] | offset[2] | offset[1]) != 0) || (offset[0] > max_buffer_size)) return false; const auto new_size = static_cast<uint64_t>(offset) + size; if (new_size > memory.size()) gas_left = grow_memory(gas_left, memory, new_size); return gas_left >= 0; // Always true for no-grow case. }
O0
cpp
evmone::check_memory(long&, evmone::Memory&, intx::uint<256u> const&, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi movl $0x3, %esi callq 0x61430 movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rdi movl $0x2, %esi callq 0x61430 movq %rax, %rcx movq -0x40(%rbp), %rax orq (%rcx), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi movl $0x1, %esi callq 0x61430 movq %rax, %rcx movq -0x38(%rbp), %rax orq (%rcx), %rax cmpq $0x0, %rax jne 0x6866e movq -0x20(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x61430 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, (%rax) jbe 0x68674 movb $0x0, -0x1(%rbp) jmp 0x686d0 movq -0x20(%rbp), %rdi callq 0x68550 addq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rdi callq 0x686e0 movq %rax, %rcx movq -0x48(%rbp), %rax cmpq %rcx, %rax jbe 0x686c0 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x68700 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) setge %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEEm: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] mov esi, 3 call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rax, [rax] mov [rbp+var_40], rax mov rdi, [rbp+var_20] mov esi, 2 call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_40] or rax, [rcx] mov [rbp+var_38], rax mov rdi, [rbp+var_20] mov esi, 1 call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_38] or rax, [rcx] cmp rax, 0 jnz short loc_6866E mov rdi, [rbp+var_20] xor eax, eax mov esi, eax call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov ecx, 0FFFFFFFFh cmp [rax], rcx jbe short loc_68674 loc_6866E: mov [rbp+var_1], 0 jmp short loc_686D0 loc_68674: mov rdi, [rbp+var_20] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) add rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov [rbp+var_48], rax mov rdi, [rbp+var_18]; this call _ZNK6evmone6Memory4sizeEv; evmone::Memory::size(void) mov rcx, rax; unsigned __int64 mov rax, [rbp+var_48] cmp rax, rcx jbe short loc_686C0 mov rax, [rbp+var_10] mov rdi, [rax]; this mov rsi, [rbp+var_18]; __int64 mov rdx, [rbp+var_30]; evmone::Memory * call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong) mov rcx, rax mov rax, [rbp+var_10] mov [rax], rcx loc_686C0: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 setnl al and al, 1 mov [rbp+var_1], al loc_686D0: mov al, [rbp+var_1] and al, 1 add rsp, 50h pop rbp retn
bool evmone::check_memory(evmone **a1, evmone::Memory *a2, long long a3, long long a4) { unsigned long long v4; // rcx long long v6; // [rsp+10h] [rbp-40h] long long v7; // [rsp+18h] [rbp-38h] evmone::Memory *v8; // [rsp+20h] [rbp-30h] v6 = *(_QWORD *)intx::uint<256u>::operator[](a3, 3LL); v7 = *(_QWORD *)intx::uint<256u>::operator[](a3, 2LL) | v6; if ( *(_QWORD *)intx::uint<256u>::operator[](a3, 1LL) | v7 || *(_QWORD *)intx::uint<256u>::operator[](a3, 0LL) > 0xFFFFFFFFuLL ) { return 0; } else { v8 = (evmone::Memory *)(a4 + intx::uint<256u>::operator unsigned long<unsigned long,void>(a3)); v4 = evmone::Memory::size(a2); if ( (unsigned long long)v8 > v4 ) *a1 = (evmone *)evmone::grow_memory(*a1, (long long)a2, v8, v4); return (long long)*a1 >= 0; } }
check_memory: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x3 CALL 0x00161430 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x2 CALL 0x00161430 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] OR RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x1 CALL 0x00161430 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] OR RAX,qword ptr [RCX] CMP RAX,0x0 JNZ 0x0016866e MOV RDI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ESI,EAX CALL 0x00161430 MOV ECX,0xffffffff CMP qword ptr [RAX],RCX JBE 0x00168674 LAB_0016866e: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001686d0 LAB_00168674: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00168550 ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001686e0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,RCX JBE 0x001686c0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] CALL 0x00168700 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_001686c0: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 SETGE AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_001686d0: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x50 POP RBP RET
/* evmone::check_memory(long&, evmone::Memory&, intx::uint<256u> const&, unsigned long) */ bool evmone::check_memory(long *param_1,Memory *param_2,uint *param_3,ulong param_4) { long lVar1; long *plVar2; ulong *puVar3; ulong uVar4; ulong uVar5; long lVar6; plVar2 = (long *)intx::uint<256u>::operator[]((uint<256u> *)param_3,3); lVar6 = *plVar2; plVar2 = (long *)intx::uint<256u>::operator[]((uint<256u> *)param_3,2); lVar1 = *plVar2; plVar2 = (long *)intx::uint<256u>::operator[]((uint<256u> *)param_3,1); if (((lVar6 == 0 && lVar1 == 0) && *plVar2 == 0) && (puVar3 = (ulong *)intx::uint<256u>::operator[]((uint<256u> *)param_3,0), *puVar3 < 0x100000000 )) { uVar4 = intx::uint::operator_cast_to_unsigned_long(param_3); uVar5 = Memory::size(param_2); if (uVar5 < uVar4 + param_4) { lVar6 = grow_memory(*param_1,param_2,uVar4 + param_4); *param_1 = lVar6; } return -1 < *param_1; } return false; }
51,574
minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv) : TemplateNode(location), name(name), template_value(std::move(tv)) {}
O1
cpp
minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %r14 movq %rdi, %rbx leaq 0x6ee2c(%rip), %r15 # 0xed148 addq $0x10, %r15 movq %r15, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x7e34c movq 0x6fc5a(%rip), %rcx # 0xedf98 cmpb $0x0, (%rcx) je 0x7e348 incl 0x8(%rax) jmp 0x7e34c lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x6f1ed(%rip), %rax # 0xed548 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx callq 0x23264 xorl %eax, %eax movq %rax, 0x48(%rbx) movups (%r14), %xmm0 movq %rax, 0x8(%r14) movups %xmm0, 0x40(%rbx) movq %rax, (%r14) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x7e3ac callq 0x31024 movq %r14, %rdi callq 0x19c00
_ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE: push r15 push r14 push rbx mov r14, rcx mov rbx, rdi lea r15, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add r15, 10h mov [rdi], r15 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_7E34C mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_7E348 inc dword ptr [rax+8] jmp short loc_7E34C loc_7E348: lock inc dword ptr [rax+8] loc_7E34C: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode add rax, 10h mov [rbx], rax lea rdi, [rbx+20h] lea rax, [rbx+30h] mov [rbx+20h], rax mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xor eax, eax mov [rbx+48h], rax movups xmm0, xmmword ptr [r14] mov [r14+8], rax movups xmmword ptr [rbx+40h], xmm0 mov [r14], rax pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+10h] test rdi, rdi jz short loc_7E3AC call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7E3AC: mov rdi, r14 call __Unwind_Resume
long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4) { long long v5; // rax long long result; // rax __int128 v7; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v5 = a2[1]; *(_QWORD *)(a1 + 16) = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v5 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v5 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2; *(_QWORD *)(a1 + 32) = a1 + 48; std::string::_M_construct<char *>((_QWORD *)(a1 + 32), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); result = 0LL; *(_QWORD *)(a1 + 72) = 0LL; v7 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 64) = v7; *(_QWORD *)a4 = 0LL; return result; }
SetTemplateNode: PUSH R15 PUSH R14 PUSH RBX MOV R14,RCX MOV RBX,RDI LEA R15,[0x1ed148] ADD R15,0x10 MOV qword ptr [RDI],R15 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x0017e34c MOV RCX,qword ptr [0x001edf98] CMP byte ptr [RCX],0x0 JZ 0x0017e348 INC dword ptr [RAX + 0x8] JMP 0x0017e34c LAB_0017e348: INC.LOCK dword ptr [RAX + 0x8] LAB_0017e34c: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x1ed548] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LEA RAX,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_0017e378: CALL 0x00123264 LAB_0017e37d: XOR EAX,EAX MOV qword ptr [RBX + 0x48],RAX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOV qword ptr [R14],RAX POP RBX POP R14 POP R15 RET
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::SetTemplateNode::SetTemplateNode (SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_001ed158; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001edf98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_001ed558; *(SetTemplateNode **)(this + 0x20) = this + 0x30; /* try { // try from 0017e378 to 0017e37c has its CatchHandler @ 0017e398 */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); *(int8 *)(this + 0x48) = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x40) = *(int8 *)param_3; *(int8 *)(this + 0x48) = uVar2; *(int8 *)param_3 = 0; return; }
51,575
ma_clear_session_state
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void ma_clear_session_state(MYSQL *mysql) { uint i; if (!mysql || !mysql->extension) return; for (i= SESSION_TRACK_BEGIN; i <= SESSION_TRACK_END; i++) { list_free(mysql->extension->session_state[i].list, 0); } memset(mysql->extension->session_state, 0, sizeof(struct st_mariadb_session_state) * SESSION_TRACK_TYPES); }
O0
c
ma_clear_session_state: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x1eec1 movq -0x8(%rbp), %rax cmpq $0x0, 0x4f0(%rax) jne 0x1eec3 jmp 0x1ef19 movl $0x0, -0xc(%rbp) cmpl $0x5, -0xc(%rbp) ja 0x1eefe movq -0x8(%rbp), %rax movq 0x4f0(%rax), %rax addq $0x8, %rax movl -0xc(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi xorl %esi, %esi callq 0x23ab0 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x1eeca movq -0x8(%rbp), %rax movq 0x4f0(%rax), %rdi addq $0x8, %rdi xorl %esi, %esi movl $0x60, %edx callq 0x13250 addq $0x10, %rsp popq %rbp retq nop
ma_clear_session_state: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz short loc_1EEC1 mov rax, [rbp+var_8] cmp qword ptr [rax+4F0h], 0 jnz short loc_1EEC3 loc_1EEC1: jmp short loc_1EF19 loc_1EEC3: mov [rbp+var_C], 0 loc_1EECA: cmp [rbp+var_C], 5 ja short loc_1EEFE mov rax, [rbp+var_8] mov rax, [rax+4F0h] add rax, 8 mov ecx, [rbp+var_C] shl rcx, 4 add rax, rcx mov rdi, [rax] xor esi, esi call list_free mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_1EECA loc_1EEFE: mov rax, [rbp+var_8] mov rdi, [rax+4F0h] add rdi, 8 xor esi, esi mov edx, 60h ; '`' call _memset loc_1EF19: add rsp, 10h pop rbp retn
long long ma_clear_session_state(long long a1) { long long result; // rax unsigned int i; // [rsp+4h] [rbp-Ch] if ( a1 ) { result = a1; if ( *(_QWORD *)(a1 + 1264) ) { for ( i = 0; i <= 5; ++i ) list_free(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 1264) + 8LL), 0LL); return memset(*(_QWORD *)(a1 + 1264) + 8LL, 0LL, 96LL); } } return result; }
ma_clear_session_state: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x0011eec1 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x4f0],0x0 JNZ 0x0011eec3 LAB_0011eec1: JMP 0x0011ef19 LAB_0011eec3: MOV dword ptr [RBP + -0xc],0x0 LAB_0011eeca: CMP dword ptr [RBP + -0xc],0x5 JA 0x0011eefe MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4f0] ADD RAX,0x8 MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] XOR ESI,ESI CALL 0x00123ab0 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0011eeca LAB_0011eefe: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x4f0] ADD RDI,0x8 XOR ESI,ESI MOV EDX,0x60 CALL 0x00113250 LAB_0011ef19: ADD RSP,0x10 POP RBP RET
void ma_clear_session_state(long param_1) { uint local_14; if ((param_1 != 0) && (*(long *)(param_1 + 0x4f0) != 0)) { for (local_14 = 0; local_14 < 6; local_14 = local_14 + 1) { list_free(*(int8 *)(*(long *)(param_1 + 0x4f0) + 8 + (ulong)local_14 * 0x10)); } memset((void *)(*(long *)(param_1 + 0x4f0) + 8),0,0x60); } return; }
51,576
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
static void ColoredWriteToStderrOrStdout(FILE* output, LogSeverity severity, const char* message, size_t len) { bool is_stdout = (output == stdout); const GLogColor color = (LogDestination::terminal_supports_color() && ((!is_stdout && FLAGS_colorlogtostderr) || (is_stdout && FLAGS_colorlogtostdout))) ? SeverityToColor(severity) : COLOR_DEFAULT; // Avoid using cerr from this module since we may get called during // exit code, and cerr may be partially or fully destroyed by then. if (COLOR_DEFAULT == color) { fwrite(message, len, 1, output); return; } #ifdef NGLOG_OS_WINDOWS const HANDLE output_handle = GetStdHandle(is_stdout ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE); // Gets the current text color. CONSOLE_SCREEN_BUFFER_INFO buffer_info; GetConsoleScreenBufferInfo(output_handle, &buffer_info); const WORD old_color_attrs = buffer_info.wAttributes; // We need to flush the stream buffers into the console before each // SetConsoleTextAttribute call lest it affect the text that is already // printed but has not yet reached the console. fflush(output); SetConsoleTextAttribute(output_handle, GetColorAttribute(color) | FOREGROUND_INTENSITY); fwrite(message, len, 1, output); fflush(output); // Restores the text color. SetConsoleTextAttribute(output_handle, old_color_attrs); #else fprintf(output, "\033[0;3%sm", GetAnsiColorCode(color)); fwrite(message, len, 1, output); fprintf(output, "\033[m"); // Resets the terminal to default. #endif // NGLOG_OS_WINDOWS }
O2
cpp
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %rbx cmpb $0x1, 0x21681(%rip) # 0x30cb0 jne 0xf671 movq 0x208d8(%rip), %rax # 0x2ff10 cmpq %rbx, (%rax) je 0xf64b leaq 0x21462(%rip), %rax # 0x30aa6 cmpb $0x0, (%rax) jne 0xf657 jmp 0xf671 leaq 0x21456(%rip), %rax # 0x30aa8 cmpb $0x1, (%rax) jne 0xf671 leal -0x2(%rsi), %eax cmpl $0x2, %eax jb 0xf68d testl %esi, %esi je 0xf671 cmpl $0x1, %esi jne 0xf6c9 leaq 0x10d6c(%rip), %rdx # 0x203db jmp 0xf694 pushq $0x1 popq %rdx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x7a60 leaq 0x10269(%rip), %rdx # 0x1f8fd leaq 0x105a4(%rip), %rsi # 0x1fc3f movq %rbx, %rdi xorl %eax, %eax callq 0x7820 pushq $0x1 popq %r12 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %rbx, %rcx callq 0x7a60 leaq 0x10587(%rip), %rdi # 0x1fc48 pushq $0x3 popq %rsi movq %r12, %rdx jmp 0xf67a leaq 0x1057c(%rip), %rdi # 0x1fc4c leaq 0x10043(%rip), %rsi # 0x1f71a leaq 0x10574(%rip), %rcx # 0x1fc52 movl $0xeb, %edx callq 0x7380
_ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm: push r15 push r14 push r12 push rbx push rax mov r14, rcx mov r15, rdx mov rbx, rdi cmp cs:_ZN5nglog14LogDestination24terminal_supports_color_E, 1; nglog::LogDestination::terminal_supports_color_ jnz short loc_F671 mov rax, cs:stdout_ptr cmp [rax], rbx jz short loc_F64B lea rax, _ZN3fLB22FLAGS_colorlogtostderrE; fLB::FLAGS_colorlogtostderr cmp byte ptr [rax], 0 jnz short loc_F657 jmp short loc_F671 loc_F64B: lea rax, _ZN3fLB22FLAGS_colorlogtostdoutE; fLB::FLAGS_colorlogtostdout cmp byte ptr [rax], 1 jnz short loc_F671 loc_F657: lea eax, [rsi-2] cmp eax, 2 jb short loc_F68D test esi, esi jz short loc_F671 cmp esi, 1 jnz short loc_F6C9 lea rdx, aDc3+2; "3" jmp short loc_F694 loc_F671: push 1 pop rdx mov rdi, r15 mov rsi, r14 loc_F67A: mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _fwrite loc_F68D: lea rdx, aProcSelfFd1+0Eh; "1" loc_F694: lea rsi, a03Sm; "\x1B[0;3%sm" mov rdi, rbx xor eax, eax call _fprintf push 1 pop r12 mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, rbx call _fwrite lea rdi, aM; "\x1B[m" push 3 pop rsi mov rdx, r12 jmp short loc_F67A loc_F6C9: lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aGlogcolorNglog; "GLogColor nglog::SeverityToColor(LogSev"... mov edx, 0EBh call ___assert_fail
long long nglog::ColoredWriteToStderrOrStdout(long long a1, int a2, const char *a3, long long a4) { const char *v7; // rdx const char *v8; // rdi long long v9; // rsi if ( nglog::LogDestination::terminal_supports_color_ != 1 ) goto LABEL_10; if ( stdout == a1 ) { if ( fLB::FLAGS_colorlogtostdout != 1 ) goto LABEL_10; } else if ( !fLB::FLAGS_colorlogtostderr ) { goto LABEL_10; } if ( (unsigned int)(a2 - 2) < 2 ) { v7 = "1"; LABEL_13: fprintf(a1, "\x1B[0;3%sm", v7); fwrite(a3, a4, 1LL, a1); v8 = "\x1B[m"; v9 = 3LL; return fwrite(v8, v9, 1LL, a1); } if ( a2 ) { if ( a2 != 1 ) __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 235LL, "GLogColor nglog::SeverityToColor(LogSeverity)"); v7 = "3"; goto LABEL_13; } LABEL_10: v8 = a3; v9 = a4; return fwrite(v8, v9, 1LL, a1); }
ColoredWriteToStderrOrStdout: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV R15,RDX MOV RBX,RDI CMP byte ptr [0x00130cb0],0x1 JNZ 0x0010f671 MOV RAX,qword ptr [0x0012ff10] CMP qword ptr [RAX],RBX JZ 0x0010f64b LEA RAX,[0x130aa6] CMP byte ptr [RAX],0x0 JNZ 0x0010f657 JMP 0x0010f671 LAB_0010f64b: LEA RAX,[0x130aa8] CMP byte ptr [RAX],0x1 JNZ 0x0010f671 LAB_0010f657: LEA EAX,[RSI + -0x2] CMP EAX,0x2 JC 0x0010f68d TEST ESI,ESI JZ 0x0010f671 CMP ESI,0x1 JNZ 0x0010f6c9 LEA RDX,[0x1203db] JMP 0x0010f694 LAB_0010f671: PUSH 0x1 POP RDX MOV RDI,R15 MOV RSI,R14 LAB_0010f67a: MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00107a60 LAB_0010f68d: LEA RDX,[0x11f8fd] LAB_0010f694: LEA RSI,[0x11fc3f] MOV RDI,RBX XOR EAX,EAX CALL 0x00107820 PUSH 0x1 POP R12 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,RBX CALL 0x00107a60 LEA RDI,[0x11fc48] PUSH 0x3 POP RSI MOV RDX,R12 JMP 0x0010f67a LAB_0010f6c9: LEA RDI,[0x11fc4c] LEA RSI,[0x11f71a] LEA RCX,[0x11fc52] MOV EDX,0xeb CALL 0x00107380
/* nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long) */ void nglog::ColoredWriteToStderrOrStdout (FILE *param_1,int param_2,int *param_3,size_t param_4) { char *pcVar1; size_t sStack_30; sStack_30 = param_4; if (LogDestination::terminal_supports_color_ == '\x01') { if (*(FILE **)PTR_stdout_0012ff10 == param_1) { if (fLB::FLAGS_colorlogtostdout != '\x01') goto LAB_0010f67a; } else if (fLB::FLAGS_colorlogtostderr == '\0') goto LAB_0010f67a; if (param_2 - 2U < 2) { pcVar1 = "1"; } else { if (param_2 == 0) goto LAB_0010f67a; if (param_2 != 1) { /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0xeb, "GLogColor nglog::SeverityToColor(LogSeverity)"); } pcVar1 = "3"; } fprintf(param_1,"\x1b[0;3%sm",pcVar1); fwrite(param_3,param_4,1,param_1); param_3 = &DAT_0011fc48; sStack_30 = 3; } LAB_0010f67a: fwrite(param_3,sStack_30,1,param_1); return; }
51,577
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
static void ColoredWriteToStderrOrStdout(FILE* output, LogSeverity severity, const char* message, size_t len) { bool is_stdout = (output == stdout); const GLogColor color = (LogDestination::terminal_supports_color() && ((!is_stdout && FLAGS_colorlogtostderr) || (is_stdout && FLAGS_colorlogtostdout))) ? SeverityToColor(severity) : COLOR_DEFAULT; // Avoid using cerr from this module since we may get called during // exit code, and cerr may be partially or fully destroyed by then. if (COLOR_DEFAULT == color) { fwrite(message, len, 1, output); return; } #ifdef NGLOG_OS_WINDOWS const HANDLE output_handle = GetStdHandle(is_stdout ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE); // Gets the current text color. CONSOLE_SCREEN_BUFFER_INFO buffer_info; GetConsoleScreenBufferInfo(output_handle, &buffer_info); const WORD old_color_attrs = buffer_info.wAttributes; // We need to flush the stream buffers into the console before each // SetConsoleTextAttribute call lest it affect the text that is already // printed but has not yet reached the console. fflush(output); SetConsoleTextAttribute(output_handle, GetColorAttribute(color) | FOREGROUND_INTENSITY); fwrite(message, len, 1, output); fflush(output); // Restores the text color. SetConsoleTextAttribute(output_handle, old_color_attrs); #else fprintf(output, "\033[0;3%sm", GetAnsiColorCode(color)); fwrite(message, len, 1, output); fprintf(output, "\033[m"); // Resets the terminal to default. #endif // NGLOG_OS_WINDOWS }
O3
cpp
nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %rbx cmpb $0x1, 0x20c77(%rip) # 0x32c50 jne 0x1201b movq 0x1ff0e(%rip), %rax # 0x31ef0 cmpq %rbx, (%rax) je 0x11ff5 leaq 0x20a58(%rip), %rax # 0x32a46 cmpb $0x0, (%rax) jne 0x12001 jmp 0x1201b leaq 0x20a4c(%rip), %rax # 0x32a48 cmpb $0x1, (%rax) jne 0x1201b leal -0x2(%rsi), %eax cmpl $0x2, %eax jb 0x12033 testl %esi, %esi je 0x1201b cmpl $0x1, %esi jne 0x12071 leaq 0x133d2(%rip), %rdx # 0x253eb jmp 0x1203a movl $0x1, %edx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx popq %rbx popq %r14 popq %r15 jmp 0x79d0 leaq 0x128d3(%rip), %rdx # 0x2490d leaq 0x12c0e(%rip), %rsi # 0x24c4f movq %rbx, %rdi xorl %eax, %eax callq 0x77a0 movl $0x1, %edx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx callq 0x79d0 leaq 0x12bf3(%rip), %rdi # 0x24c58 movl $0x3, %esi movl $0x1, %edx jmp 0x12026 leaq 0x12be4(%rip), %rdi # 0x24c5c leaq 0x126ab(%rip), %rsi # 0x2472a leaq 0x12bdc(%rip), %rcx # 0x24c62 movl $0xeb, %edx callq 0x7310
_ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm: push r15 push r14 push rbx mov r14, rcx mov r15, rdx mov rbx, rdi cmp cs:_ZN5nglog14LogDestination24terminal_supports_color_E, 1; nglog::LogDestination::terminal_supports_color_ jnz short loc_1201B mov rax, cs:stdout_ptr cmp [rax], rbx jz short loc_11FF5 lea rax, _ZN3fLB22FLAGS_colorlogtostderrE; fLB::FLAGS_colorlogtostderr cmp byte ptr [rax], 0 jnz short loc_12001 jmp short loc_1201B loc_11FF5: lea rax, _ZN3fLB22FLAGS_colorlogtostdoutE; fLB::FLAGS_colorlogtostdout cmp byte ptr [rax], 1 jnz short loc_1201B loc_12001: lea eax, [rsi-2] cmp eax, 2 jb short loc_12033 test esi, esi jz short loc_1201B cmp esi, 1 jnz short loc_12071 lea rdx, aDc3+2; "3" jmp short loc_1203A loc_1201B: mov edx, 1 mov rdi, r15 mov rsi, r14 loc_12026: mov rcx, rbx pop rbx pop r14 pop r15 jmp _fwrite loc_12033: lea rdx, aProcSelfFd1+0Eh; "1" loc_1203A: lea rsi, a03Sm; "\x1B[0;3%sm" mov rdi, rbx xor eax, eax call _fprintf mov edx, 1 mov rdi, r15 mov rsi, r14 mov rcx, rbx call _fwrite lea rdi, aM; "\x1B[m" mov esi, 3 mov edx, 1 jmp short loc_12026 loc_12071: lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aGlogcolorNglog; "GLogColor nglog::SeverityToColor(LogSev"... mov edx, 0EBh call ___assert_fail
long long nglog::ColoredWriteToStderrOrStdout(long long a1, int a2, const char *a3, long long a4) { const char *v7; // rdx const char *v8; // rdi long long v9; // rsi if ( nglog::LogDestination::terminal_supports_color_ != 1 ) goto LABEL_10; if ( stdout == a1 ) { if ( fLB::FLAGS_colorlogtostdout != 1 ) goto LABEL_10; } else if ( !fLB::FLAGS_colorlogtostderr ) { goto LABEL_10; } if ( (unsigned int)(a2 - 2) < 2 ) { v7 = "1"; LABEL_13: fprintf(a1, "\x1B[0;3%sm", v7); fwrite(a3, a4, 1LL, a1); v8 = "\x1B[m"; v9 = 3LL; return fwrite(v8, v9, 1LL, a1); } if ( a2 ) { if ( a2 != 1 ) __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 235LL, "GLogColor nglog::SeverityToColor(LogSeverity)"); v7 = "3"; goto LABEL_13; } LABEL_10: v8 = a3; v9 = a4; return fwrite(v8, v9, 1LL, a1); }
ColoredWriteToStderrOrStdout: PUSH R15 PUSH R14 PUSH RBX MOV R14,RCX MOV R15,RDX MOV RBX,RDI CMP byte ptr [0x00132c50],0x1 JNZ 0x0011201b MOV RAX,qword ptr [0x00131ef0] CMP qword ptr [RAX],RBX JZ 0x00111ff5 LEA RAX,[0x132a46] CMP byte ptr [RAX],0x0 JNZ 0x00112001 JMP 0x0011201b LAB_00111ff5: LEA RAX,[0x132a48] CMP byte ptr [RAX],0x1 JNZ 0x0011201b LAB_00112001: LEA EAX,[RSI + -0x2] CMP EAX,0x2 JC 0x00112033 TEST ESI,ESI JZ 0x0011201b CMP ESI,0x1 JNZ 0x00112071 LEA RDX,[0x1253eb] JMP 0x0011203a LAB_0011201b: MOV EDX,0x1 MOV RDI,R15 MOV RSI,R14 LAB_00112026: MOV RCX,RBX POP RBX POP R14 POP R15 JMP 0x001079d0 LAB_00112033: LEA RDX,[0x12490d] LAB_0011203a: LEA RSI,[0x124c4f] MOV RDI,RBX XOR EAX,EAX CALL 0x001077a0 MOV EDX,0x1 MOV RDI,R15 MOV RSI,R14 MOV RCX,RBX CALL 0x001079d0 LEA RDI,[0x124c58] MOV ESI,0x3 MOV EDX,0x1 JMP 0x00112026 LAB_00112071: LEA RDI,[0x124c5c] LEA RSI,[0x12472a] LEA RCX,[0x124c62] MOV EDX,0xeb CALL 0x00107310
/* nglog::ColoredWriteToStderrOrStdout(_IO_FILE*, nglog::LogSeverity, char const*, unsigned long) */ void nglog::ColoredWriteToStderrOrStdout (FILE *param_1,int param_2,int *param_3,size_t param_4) { char *pcVar1; if (LogDestination::terminal_supports_color_ == '\x01') { if (*(FILE **)PTR_stdout_00131ef0 == param_1) { if (fLB::FLAGS_colorlogtostdout != '\x01') goto LAB_00112026; } else if (fLB::FLAGS_colorlogtostderr == '\0') goto LAB_00112026; if (param_2 - 2U < 2) { pcVar1 = "1"; } else { if (param_2 == 0) goto LAB_00112026; if (param_2 != 1) { /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0xeb, "GLogColor nglog::SeverityToColor(LogSeverity)"); } pcVar1 = "3"; } fprintf(param_1,"\x1b[0;3%sm",pcVar1); fwrite(param_3,param_4,1,param_1); param_3 = &DAT_00124c58; param_4 = 3; } LAB_00112026: fwrite(param_3,param_4,1,param_1); return; }
51,578
my_like_range_czech
eloqsql/strings/ctype-czech.c
static my_bool my_like_range_czech(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) { #ifdef EXAMPLE uchar value; const char *end=ptr+ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; for (; ptr != end && min_str != min_end ; ptr++) { if (*ptr == w_one) /* '_' in SQL */ { break; } if (*ptr == w_many) /* '%' in SQL */ { break; } if (*ptr == escape && ptr+1 != end) { ptr++; } /* Skip escape */ value = CZ_SORT_TABLE[0][(int) (uchar) *ptr]; if (value == 0) /* Ignore in the first pass */ { continue; } if (value <= 2) /* End of pass or end of string */ { break; } if (value == 255) /* Double char too compicated */ { break; } *min_str++= *max_str++ = *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; /* Because of key compression */ *max_str++ = max_sort_char; } return 0; #else return 1; #endif }
O3
c
my_like_range_czech: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r11 movq 0x20(%rbp), %rax movq 0x18(%rbp), %r12 movq 0x10(%rbp), %r15 leaq (%r12,%r15), %r10 testq %rdx, %rdx sete %sil testq %r15, %r15 sete %bl orb %sil, %bl jne 0x53040 addq %r11, %rdx leaq 0x88209(%rip), %r13 # 0xdb1f7 movq %r12, %r14 movb (%r11), %bl cmpb %r8b, %bl je 0x53043 cmpb %r9b, %bl je 0x53043 leaq 0x1(%r11), %rsi cmpq %rdx, %rsi cmoveq %r11, %rsi cmpb %cl, %bl cmovneq %r11, %rsi movzbl (%rsi), %r11d movb (%r11,%r13), %bl testb %bl, %bl je 0x5302e incb %bl cmpb $0x4, %bl jb 0x53043 movb %r11b, (%rax) incq %rax movb %r11b, (%r14) incq %r14 incq %rsi cmpq %rdx, %rsi je 0x53043 movq %rsi, %r11 cmpq %r10, %r14 jne 0x52ff1 jmp 0x53043 movq %r12, %r14 movq %r14, %rcx subq %r12, %rcx testb $0x10, 0xc(%rdi) cmoveq %r15, %rcx movq 0x28(%rbp), %rdx movq %rcx, (%rdx) movq 0x30(%rbp), %rcx movq %r15, (%rcx) cmpq %r10, %r14 je 0x53073 movb $0x20, (%r14) incq %r14 movb $0x39, (%rax) incq %rax jmp 0x5305f xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_like_range_czech: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r11, rsi mov rax, [rbp+arg_10] mov r12, [rbp+arg_8] mov r15, [rbp+arg_0] lea r10, [r12+r15] test rdx, rdx setz sil test r15, r15 setz bl or bl, sil jnz short loc_53040 add rdx, r11 lea r13, unk_DB1F7 mov r14, r12 loc_52FF1: mov bl, [r11] cmp bl, r8b jz short loc_53043 cmp bl, r9b jz short loc_53043 lea rsi, [r11+1] cmp rsi, rdx cmovz rsi, r11 cmp bl, cl cmovnz rsi, r11 movzx r11d, byte ptr [rsi] mov bl, [r11+r13] test bl, bl jz short loc_5302E inc bl cmp bl, 4 jb short loc_53043 mov [rax], r11b inc rax mov [r14], r11b inc r14 loc_5302E: inc rsi cmp rsi, rdx jz short loc_53043 mov r11, rsi cmp r14, r10 jnz short loc_52FF1 jmp short loc_53043 loc_53040: mov r14, r12 loc_53043: mov rcx, r14 sub rcx, r12 test byte ptr [rdi+0Ch], 10h cmovz rcx, r15 mov rdx, [rbp+arg_18] mov [rdx], rcx mov rcx, [rbp+arg_20] mov [rcx], r15 loc_5305F: cmp r14, r10 jz short loc_53073 mov byte ptr [r14], 20h ; ' ' inc r14 mov byte ptr [rax], 39h ; '9' inc rax jmp short loc_5305F loc_53073: xor eax, eax pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_like_range_czech( long long a1, unsigned __int8 *a2, long long a3, char a4, char a5, char a6, long long a7, long long a8, _BYTE *a9, long long *a10, _QWORD *a11) { unsigned __int8 *v11; // r11 _BYTE *v13; // r10 unsigned __int8 *v14; // rdx _BYTE *v15; // r14 unsigned __int8 v16; // bl unsigned __int8 *v17; // rsi long long v18; // r11 char v19; // bl unsigned __int8 *v20; // rsi long long v21; // rcx v11 = a2; v13 = (_BYTE *)(a8 + a7); if ( a3 == 0 || a7 == 0 ) { v15 = (_BYTE *)a8; } else { v14 = &a2[a3]; v15 = (_BYTE *)a8; do { v16 = *v11; if ( *v11 == a5 || v16 == a6 ) break; v17 = v11 + 1; if ( v11 + 1 == v14 ) v17 = v11; if ( v16 != a4 ) v17 = v11; v18 = *v17; v19 = byte_DB1F7[v18]; if ( v19 ) { if ( (unsigned __int8)(v19 + 1) < 4u ) break; *a9++ = v18; *v15++ = v18; } v20 = v17 + 1; if ( v20 == v14 ) break; v11 = v20; } while ( v15 != v13 ); } v21 = (long long)&v15[-a8]; if ( (*(_BYTE *)(a1 + 12) & 0x10) == 0 ) v21 = a7; *a10 = v21; *a11 = a7; while ( v15 != v13 ) { *v15++ = 32; *a9++ = 57; } return 0LL; }
my_like_range_czech: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R11,RSI MOV RAX,qword ptr [RBP + 0x20] MOV R12,qword ptr [RBP + 0x18] MOV R15,qword ptr [RBP + 0x10] LEA R10,[R12 + R15*0x1] TEST RDX,RDX SETZ SIL TEST R15,R15 SETZ BL OR BL,SIL JNZ 0x00153040 ADD RDX,R11 LEA R13,[0x1db1f7] MOV R14,R12 LAB_00152ff1: MOV BL,byte ptr [R11] CMP BL,R8B JZ 0x00153043 CMP BL,R9B JZ 0x00153043 LEA RSI,[R11 + 0x1] CMP RSI,RDX CMOVZ RSI,R11 CMP BL,CL CMOVNZ RSI,R11 MOVZX R11D,byte ptr [RSI] MOV BL,byte ptr [R11 + R13*0x1] TEST BL,BL JZ 0x0015302e INC BL CMP BL,0x4 JC 0x00153043 MOV byte ptr [RAX],R11B INC RAX MOV byte ptr [R14],R11B INC R14 LAB_0015302e: INC RSI CMP RSI,RDX JZ 0x00153043 MOV R11,RSI CMP R14,R10 JNZ 0x00152ff1 JMP 0x00153043 LAB_00153040: MOV R14,R12 LAB_00153043: MOV RCX,R14 SUB RCX,R12 TEST byte ptr [RDI + 0xc],0x10 CMOVZ RCX,R15 MOV RDX,qword ptr [RBP + 0x28] MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBP + 0x30] MOV qword ptr [RCX],R15 LAB_0015305f: CMP R14,R10 JZ 0x00153073 MOV byte ptr [R14],0x20 INC R14 MOV byte ptr [RAX],0x39 INC RAX JMP 0x0015305f LAB_00153073: XOR EAX,EAX POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_like_range_czech(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6, long param_7,byte *param_8,byte *param_9,long *param_10,long *param_11) { byte bVar1; long lVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; pbVar5 = param_8; if (param_7 != 0 && param_3 != 0) { pbVar3 = param_2 + param_3; while ((bVar1 = *param_2, bVar1 != param_5 && (bVar1 != param_6))) { pbVar4 = param_2 + 1; if (param_2 + 1 == pbVar3) { pbVar4 = param_2; } if (bVar1 != param_4) { pbVar4 = param_2; } bVar1 = *pbVar4; if ((&DAT_001db1f7)[bVar1] != '\0') { if ((byte)((&DAT_001db1f7)[bVar1] + 1) < 4) break; *param_9 = bVar1; param_9 = param_9 + 1; *pbVar5 = bVar1; pbVar5 = pbVar5 + 1; } param_2 = pbVar4 + 1; if ((param_2 == pbVar3) || (pbVar5 == param_8 + param_7)) break; } } lVar2 = (long)pbVar5 - (long)param_8; if ((*(byte *)(param_1 + 0xc) & 0x10) == 0) { lVar2 = param_7; } *param_10 = lVar2; *param_11 = param_7; for (; pbVar5 != param_8 + param_7; pbVar5 = pbVar5 + 1) { *pbVar5 = 0x20; *param_9 = 0x39; param_9 = param_9 + 1; } return 0; }
51,579
js_map_clear
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_clear(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); struct list_head *el, *el1; JSMapRecord *mr; if (!s) return JS_EXCEPTION; list_for_each_safe(el, el1, &s->records) { mr = list_entry(el, JSMapRecord, link); map_delete_record(ctx->rt, s, mr); } return JS_UNDEFINED; }
O0
c
js_map_clear: subq $0x68, %rsp movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rdi, 0x40(%rsp) movl %ecx, 0x3c(%rsp) movq %r8, 0x30(%rsp) movl %r9d, 0x2c(%rsp) movq 0x40(%rsp), %rdi movl 0x2c(%rsp), %ecx addl $0x23, %ecx movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x383b0 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x8c91f movl $0x0, 0x58(%rsp) movq $0x6, 0x60(%rsp) jmp 0x8c99f movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x8, %rcx cmpq %rcx, %rax je 0x8c98e movq 0x18(%rsp), %rax addq $-0x10, %rax movq %rax, 0x8(%rsp) movq 0x40(%rsp), %rax movq 0x18(%rax), %rdi movq 0x20(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x8cf70 movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x8c93b movl $0x0, 0x58(%rsp) movq $0x3, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rdx addq $0x68, %rsp retq nop
js_map_clear: sub rsp, 68h mov [rsp+68h+var_20], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_28], rdi mov [rsp+68h+var_2C], ecx mov [rsp+68h+var_38], r8 mov [rsp+68h+var_3C], r9d mov rdi, [rsp+68h+var_28] mov ecx, [rsp+68h+var_3C] add ecx, 23h ; '#' mov rsi, [rsp+68h+var_20] mov rdx, [rsp+68h+var_18] call JS_GetOpaque2 mov [rsp+68h+var_48], rax cmp [rsp+68h+var_48], 0 jnz short loc_8C91F mov dword ptr [rsp+68h+var_10], 0 mov [rsp+68h+var_8], 6 jmp loc_8C99F loc_8C91F: mov rax, [rsp+68h+var_48] mov rax, [rax+10h] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_50] mov rax, [rax+8] mov [rsp+68h+var_58], rax loc_8C93B: mov rax, [rsp+68h+var_50] mov rcx, [rsp+68h+var_48] add rcx, 8 cmp rax, rcx jz short loc_8C98E mov rax, [rsp+68h+var_50] add rax, 0FFFFFFFFFFFFFFF0h mov [rsp+68h+var_60], rax mov rax, [rsp+68h+var_28] mov rdi, [rax+18h] mov rsi, [rsp+68h+var_48] mov rdx, [rsp+68h+var_60] call map_delete_record mov rax, [rsp+68h+var_58] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_50] mov rax, [rax+8] mov [rsp+68h+var_58], rax jmp short loc_8C93B loc_8C98E: mov dword ptr [rsp+68h+var_10], 0 mov [rsp+68h+var_8], 3 loc_8C99F: mov rax, [rsp+68h+var_10] mov rdx, [rsp+68h+var_8] add rsp, 68h retn
long long js_map_clear(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long v7; // [rsp+10h] [rbp-58h] long long v8; // [rsp+18h] [rbp-50h] long long Opaque2; // [rsp+20h] [rbp-48h] long long v10; // [rsp+58h] [rbp-10h] Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 ) { v8 = *(_QWORD *)(Opaque2 + 16); v7 = *(_QWORD *)(v8 + 8); while ( v8 != Opaque2 + 8 ) { map_delete_record(*(_QWORD *)(a1 + 24), Opaque2, v8 - 16); v8 = v7; v7 = *(_QWORD *)(v7 + 8); } LODWORD(v10) = 0; } else { LODWORD(v10) = 0; } return v10; }
js_map_clear: SUB RSP,0x68 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ECX MOV qword ptr [RSP + 0x30],R8 MOV dword ptr [RSP + 0x2c],R9D MOV RDI,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RSP + 0x2c] ADD ECX,0x23 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x001383b0 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x0018c91f MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x6 JMP 0x0018c99f LAB_0018c91f: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX LAB_0018c93b: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x8 CMP RAX,RCX JZ 0x0018c98e MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x10 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0018cf70 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x0018c93b LAB_0018c98e: MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x3 LAB_0018c99f: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int1 [16] js_map_clear(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int param_6) { int1 auVar1 [16]; long lVar2; int8 local_58; int8 local_50; int4 uStack_c; int8 local_8; lVar2 = JS_GetOpaque2(param_1,param_2,param_3,param_6 + 0x23); if (lVar2 == 0) { local_8 = 6; } else { local_50 = *(long *)(lVar2 + 0x10); local_58 = *(long *)(local_50 + 8); while (local_50 != lVar2 + 8) { map_delete_record(*(int8 *)(param_1 + 0x18),lVar2,local_50 + -0x10); local_50 = local_58; local_58 = *(long *)(local_58 + 8); } local_8 = 3; } auVar1._4_8_ = local_8; auVar1._0_4_ = uStack_c; auVar1._12_4_ = 0; return auVar1 << 0x20; }
51,580
js_map_clear
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_clear(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); struct list_head *el, *el1; JSMapRecord *mr; if (!s) return JS_EXCEPTION; list_for_each_safe(el, el1, &s->records) { mr = list_entry(el, JSMapRecord, link); map_delete_record(ctx->rt, s, mr); } return JS_UNDEFINED; }
O1
c
js_map_clear: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx leal 0x23(%r9), %ecx callq 0x275b5 testq %rax, %rax je 0x4fcf9 movq %rax, %r15 movq %rax, %r12 addq $0x8, %r12 movq 0x10(%rax), %rdx movl $0x3, %r14d cmpq %r12, %rdx je 0x4fcff movq 0x8(%rdx), %r13 addq $-0x10, %rdx movq 0x18(%rbx), %rdi movq %r15, %rsi callq 0x50086 movq %r13, %rdx cmpq %r12, %r13 jne 0x4fcdb jmp 0x4fcff movl $0x6, %r14d xorl %eax, %eax movq %r14, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_map_clear: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_4FCF9 mov r15, rax mov r12, rax add r12, 8 mov rdx, [rax+10h] mov r14d, 3 cmp rdx, r12 jz short loc_4FCFF loc_4FCDB: mov r13, [rdx+8] add rdx, 0FFFFFFFFFFFFFFF0h mov rdi, [rbx+18h] mov rsi, r15 call map_delete_record mov rdx, r13 cmp r13, r12 jnz short loc_4FCDB jmp short loc_4FCFF loc_4FCF9: mov r14d, 6 loc_4FCFF: xor eax, eax mov rdx, r14 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_map_clear(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long Opaque2; // rax long long v7; // r15 long long v8; // r12 long long v9; // rdx long long v10; // r13 Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 ) { v7 = Opaque2; v8 = Opaque2 + 8; v9 = *(_QWORD *)(Opaque2 + 16); if ( v9 != Opaque2 + 8 ) { do { v10 = *(_QWORD *)(v9 + 8); map_delete_record(*(_QWORD *)(a1 + 24), v7, v9 - 16); v9 = v10; } while ( v10 != v8 ); } } return 0LL; }
js_map_clear: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI LEA ECX,[R9 + 0x23] CALL 0x001275b5 TEST RAX,RAX JZ 0x0014fcf9 MOV R15,RAX MOV R12,RAX ADD R12,0x8 MOV RDX,qword ptr [RAX + 0x10] MOV R14D,0x3 CMP RDX,R12 JZ 0x0014fcff LAB_0014fcdb: MOV R13,qword ptr [RDX + 0x8] ADD RDX,-0x10 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 CALL 0x00150086 MOV RDX,R13 CMP R13,R12 JNZ 0x0014fcdb JMP 0x0014fcff LAB_0014fcf9: MOV R14D,0x6 LAB_0014fcff: XOR EAX,EAX MOV RDX,R14 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_map_clear(long param_1) { long lVar1; int1 auVar2 [16]; long lVar3; long lVar4; ulong uVar5; lVar4 = JS_GetOpaque2(); if (lVar4 == 0) { uVar5 = 6; } else { uVar5 = 3; lVar3 = *(long *)(lVar4 + 0x10); while (lVar3 != lVar4 + 8) { lVar1 = *(long *)(lVar3 + 8); map_delete_record(*(int8 *)(param_1 + 0x18),lVar4,lVar3 + -0x10); lVar3 = lVar1; } } auVar2._8_8_ = 0; auVar2._0_8_ = uVar5; return auVar2 << 0x40; }
51,581
js_map_clear
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_clear(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); struct list_head *el, *el1; JSMapRecord *mr; if (!s) return JS_EXCEPTION; list_for_each_safe(el, el1, &s->records) { mr = list_entry(el, JSMapRecord, link); map_delete_record(ctx->rt, s, mr); } return JS_UNDEFINED; }
O2
c
js_map_clear: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx leal 0x23(%r9), %ecx callq 0x21207 testq %rax, %rax je 0x4486d movq %rax, %r15 movq %rax, %r12 addq $0x8, %r12 movq 0x10(%rax), %rdx pushq $0x3 popq %r14 cmpq %r12, %rdx je 0x44871 movq 0x8(%rdx), %r13 addq $-0x10, %rdx movq 0x18(%rbx), %rdi movq %r15, %rsi callq 0x44b6e movq %r13, %rdx jmp 0x4484f pushq $0x6 popq %r14 xorl %eax, %eax movq %r14, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_map_clear: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_4486D mov r15, rax mov r12, rax add r12, 8 mov rdx, [rax+10h] push 3 pop r14 loc_4484F: cmp rdx, r12 jz short loc_44871 mov r13, [rdx+8] add rdx, 0FFFFFFFFFFFFFFF0h mov rdi, [rbx+18h] mov rsi, r15 call map_delete_record mov rdx, r13 jmp short loc_4484F loc_4486D: push 6 pop r14 loc_44871: xor eax, eax mov rdx, r14 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_map_clear(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long Opaque2; // rax long long v7; // r15 long long v8; // r12 long long i; // rdx long long v10; // r13 Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 ) { v7 = Opaque2; v8 = Opaque2 + 8; for ( i = *(_QWORD *)(Opaque2 + 16); i != v8; i = v10 ) { v10 = *(_QWORD *)(i + 8); map_delete_record(*(_QWORD *)(a1 + 24), v7, i - 16); } } return 0LL; }
js_map_clear: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI LEA ECX,[R9 + 0x23] CALL 0x00121207 TEST RAX,RAX JZ 0x0014486d MOV R15,RAX MOV R12,RAX ADD R12,0x8 MOV RDX,qword ptr [RAX + 0x10] PUSH 0x3 POP R14 LAB_0014484f: CMP RDX,R12 JZ 0x00144871 MOV R13,qword ptr [RDX + 0x8] ADD RDX,-0x10 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 CALL 0x00144b6e MOV RDX,R13 JMP 0x0014484f LAB_0014486d: PUSH 0x6 POP R14 LAB_00144871: XOR EAX,EAX MOV RDX,R14 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_map_clear(long param_1) { long lVar1; int1 auVar2 [16]; long lVar3; long lVar4; ulong uVar5; lVar3 = JS_GetOpaque2(); if (lVar3 == 0) { uVar5 = 6; } else { uVar5 = 3; lVar4 = *(long *)(lVar3 + 0x10); while (lVar4 != lVar3 + 8) { lVar1 = *(long *)(lVar4 + 8); map_delete_record(*(int8 *)(param_1 + 0x18),lVar3,lVar4 + -0x10); lVar4 = lVar1; } } auVar2._8_8_ = 0; auVar2._0_8_ = uVar5; return auVar2 << 0x40; }
51,582
LefDefParser::lefwLayerCutSpacingArea(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerCutSpacingArea(double cutArea) { if (!lefwIsLayerCutSpacing) return LEFW_BAD_ORDER; // has to be after // lefwLayerCutSpacing is called if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) "\n AREA %.11g", cutArea); } else { fprintf(lefwFile, "\n AREA %.11g", cutArea); } lefwLines++; lefwState = LEFW_LAYER; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerCutSpacingArea(double): subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) cmpl $0x0, 0xabadf(%rip) # 0xc5540 jne 0x19a6d movl $0x2, 0x14(%rsp) jmp 0x19ade cmpl $0x0, 0xabac8(%rip) # 0xc553c je 0x19a96 leaq 0xab7d3(%rip), %rax # 0xc5250 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x78f7b(%rip), %rsi # 0x92a08 movb $0x1, %al callq 0x8bf50 jmp 0x19ab4 leaq 0xab7b3(%rip), %rax # 0xc5250 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x78f5b(%rip), %rsi # 0x92a08 movb $0x1, %al callq 0x2370 leaq 0xab9e1(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0xab9d5(%rip), %rax # 0xc549c movl %ecx, (%rax) leaq 0xab9d0(%rip), %rax # 0xc54a0 movl $0x1c, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN12LefDefParser23lefwLayerCutSpacingAreaEd: sub rsp, 18h movsd [rsp+18h+var_10], xmm0 cmp cs:_ZN12LefDefParserL21lefwIsLayerCutSpacingE, 0; LefDefParser::lefwIsLayerCutSpacing jnz short loc_19A6D mov [rsp+18h+var_4], 2 jmp short loc_19ADE loc_19A6D: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_19A96 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aArea11g; "\n AREA %.11g" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_19AB4 loc_19A96: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aArea11g; "\n AREA %.11g" mov al, 1 call _fprintf loc_19AB4: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 1Ch mov [rsp+18h+var_4], 0 loc_19ADE: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwLayerCutSpacingArea( LefDefParser *this, double a2, long long a3, int a4, int a5, int a6, int a7) { if ( LefDefParser::lefwIsLayerCutSpacing ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"\n AREA %.11g", a4, a5, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n AREA %.11g", a2); ++LefDefParser::lefwLines; LefDefParser::lefwState = 28; return 0; } else { return 2; } }
lefwLayerCutSpacingArea: SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 CMP dword ptr [0x001c5540],0x0 JNZ 0x00119a6d MOV dword ptr [RSP + 0x14],0x2 JMP 0x00119ade LAB_00119a6d: CMP dword ptr [0x001c553c],0x0 JZ 0x00119a96 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x192a08] MOV AL,0x1 CALL 0x0018bf50 JMP 0x00119ab4 LAB_00119a96: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x192a08] MOV AL,0x1 CALL 0x00102370 LAB_00119ab4: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX LEA RAX,[0x1c54a0] MOV dword ptr [RAX],0x1c MOV dword ptr [RSP + 0x14],0x0 LAB_00119ade: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwLayerCutSpacingArea(double) */ int4 LefDefParser::lefwLayerCutSpacingArea(double param_1) { int4 local_4; if (lefwIsLayerCutSpacing == 0) { local_4 = 2; } else { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"\n AREA %.11g",param_1); } else { encPrint(lefwFile,"\n AREA %.11g",param_1); } lefwLines = lefwLines + 1; lefwState = 0x1c; local_4 = 0; } return local_4; }
51,583
my_mb_wc_utf8mb4_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc= c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_utf8mb4_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x71d46 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x71fc3 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x71d73 movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x71fc3 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x71d8a movl $0x0, -0x4(%rbp) jmp 0x71fc3 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x71e00 movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x71daf movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x71fc3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x71dcd movl $0x0, -0x4(%rbp) jmp 0x71fc3 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x71fc3 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x71ebc movq -0x18(%rbp), %rax addq $0x3, %rax cmpq -0x20(%rbp), %rax jbe 0x71e29 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x71fc3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x71e67 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x71e67 movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x71e73 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x71e73 movl $0x0, -0x4(%rbp) jmp 0x71fc3 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x71fc3 movzbl -0x21(%rbp), %eax cmpl $0xf5, %eax jge 0x71fb4 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x71ee5 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x71fc3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x71f4f movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x71f4f movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x71f4f movzbl -0x21(%rbp), %eax cmpl $0xf1, %eax jge 0x71f35 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x90, %eax jl 0x71f4f movzbl -0x21(%rbp), %eax cmpl $0xf3, %eax jle 0x71f58 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x8f, %eax jle 0x71f58 movl $0x0, -0x4(%rbp) jmp 0x71fc3 movzbl -0x21(%rbp), %eax andl $0x7, %eax movslq %eax, %rcx shlq $0x12, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0xc, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x71fc3 jmp 0x71fb6 jmp 0x71fb8 jmp 0x71fba jmp 0x71fbc movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_utf8mb4_quick_0: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_71D46 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_71FC3 loc_71D46: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_71D73 movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_71FC3 loc_71D73: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_71D8A mov [rbp+var_4], 0 jmp loc_71FC3 loc_71D8A: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_71E00 mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_71DAF mov [rbp+var_4], 0FFFFFF9Ah jmp loc_71FC3 loc_71DAF: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_71DCD mov [rbp+var_4], 0 jmp loc_71FC3 loc_71DCD: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_71FC3 loc_71E00: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_71EBC mov rax, [rbp+var_18] add rax, 3 cmp rax, [rbp+var_20] jbe short loc_71E29 mov [rbp+var_4], 0FFFFFF99h jmp loc_71FC3 loc_71E29: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_71E67 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_71E67 movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_71E73 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_71E73 loc_71E67: mov [rbp+var_4], 0 jmp loc_71FC3 loc_71E73: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 3 jmp loc_71FC3 loc_71EBC: movzx eax, [rbp+var_21] cmp eax, 0F5h jge loc_71FB4 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_71EE5 mov [rbp+var_4], 0FFFFFF98h jmp loc_71FC3 loc_71EE5: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_71F4F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_71F4F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cmp eax, 40h ; '@' jge short loc_71F4F movzx eax, [rbp+var_21] cmp eax, 0F1h jge short loc_71F35 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 90h jl short loc_71F4F loc_71F35: movzx eax, [rbp+var_21] cmp eax, 0F3h jle short loc_71F58 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 8Fh jle short loc_71F58 loc_71F4F: mov [rbp+var_4], 0 jmp short loc_71FC3 loc_71F58: movzx eax, [rbp+var_21] and eax, 7 movsxd rcx, eax shl rcx, 12h mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 0Ch or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_71FC3 loc_71FB4: jmp short $+2 loc_71FB6: jmp short $+2 loc_71FB8: jmp short $+2 loc_71FBA: jmp short $+2 loc_71FBC: mov [rbp+var_4], 0 loc_71FC3: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( *a2 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { if ( v4 >= 0xF5u ) { return 0; } else if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (a2[3] ^ 0x80) < 64 && (v4 >= 0xF1u || a2[1] >= 0x90u) && (v4 <= 0xF3u || a2[1] <= 0x8Fu) ) { *a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18); return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a2 + 3) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) ) { *a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 ) { *a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return (unsigned int)-102; } } else { return 0; } } else { *a1 = v4; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_utf8mb4_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x00171d46 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00171fc3 LAB_00171d46: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x00171d73 MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00171fc3 LAB_00171d73: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x00171d8a MOV dword ptr [RBP + -0x4],0x0 JMP 0x00171fc3 LAB_00171d8a: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x00171e00 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00171daf MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00171fc3 LAB_00171daf: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x00171dcd MOV dword ptr [RBP + -0x4],0x0 JMP 0x00171fc3 LAB_00171dcd: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00171fc3 LAB_00171e00: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x00171ebc MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00171e29 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00171fc3 LAB_00171e29: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00171e67 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00171e67 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x00171e73 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x00171e73 LAB_00171e67: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00171fc3 LAB_00171e73: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x00171fc3 LAB_00171ebc: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf5 JGE 0x00171fb4 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00171ee5 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00171fc3 LAB_00171ee5: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00171f4f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00171f4f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00171f4f MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf1 JGE 0x00171f35 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x90 JL 0x00171f4f LAB_00171f35: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf3 JLE 0x00171f58 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x8f JLE 0x00171f58 LAB_00171f4f: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00171fc3 LAB_00171f58: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x7 MOVSXD RCX,EAX SHL RCX,0x12 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0xc OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x00171fc3 LAB_00171fb4: JMP 0x00171fb6 LAB_00171fb6: JMP 0x00171fb8 LAB_00171fb8: JMP 0x00171fba LAB_00171fba: JMP 0x00171fbc LAB_00171fbc: MOV dword ptr [RBP + -0x4],0x0 LAB_00171fc3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; int4 local_c; if (param_2 < param_3) { bVar1 = *param_2; if (bVar1 < 0x80) { *param_1 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((param_2[1] ^ 0x80) < 0x40) { *param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { local_c = 0xffffff99; } else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_2[1])))) { *param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 | (long)(int)(param_2[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((param_2[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_2[1])))) && ((bVar1 < 0xf4 || (param_2[1] < 0x90)))) { *param_1 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_2[1] ^ 0x80) << 0xc | (long)(int)(param_2[2] ^ 0x80) << 6 | (long)(int)(param_2[3] ^ 0x80); local_c = 4; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
51,584
google::protobuf::io::StringOutputStream::BackUp(int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
void StringOutputStream::BackUp(int count) { GOOGLE_CHECK_GE(count, 0); GOOGLE_CHECK(target_ != NULL); GOOGLE_CHECK_LE(static_cast<size_t>(count), target_->size()); target_->resize(target_->size() - count); }
O0
cpp
google::protobuf::io::StringOutputStream::BackUp(int): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x120(%rsp) movl %esi, 0x11c(%rsp) movq 0x120(%rsp), %rax movq %rax, 0x40(%rsp) movl 0x11c(%rsp), %eax movb $0x0, 0xdf(%rsp) cmpl $0x0, %eax jl 0x1f0b59 jmp 0x1f0bb2 leaq 0x20b370(%rip), %rdx # 0x3fbed0 leaq 0xe0(%rsp), %rdi movq %rdi, 0x30(%rsp) movl $0x3, %esi movl $0xa8, %ecx callq 0x219560 movq 0x30(%rsp), %rdi movb $0x1, 0xdf(%rsp) leaq 0x20b44e(%rip), %rsi # 0x3fbfde callq 0x218e20 movq %rax, 0x38(%rsp) jmp 0x1f0b9c movq 0x38(%rsp), %rsi leaq 0xcb(%rsp), %rdi callq 0x218fd0 jmp 0x1f0bb0 jmp 0x1f0bb2 testb $0x1, 0xdf(%rsp) jne 0x1f0bbe jmp 0x1f0bcb leaq 0xe0(%rsp), %rdi callq 0x2195a0 movq 0x40(%rsp), %rax movq 0x8(%rax), %rax movb $0x0, 0x8f(%rsp) cmpq $0x0, %rax je 0x1f0be4 jmp 0x1f0c3d leaq 0x20b2e5(%rip), %rdx # 0x3fbed0 leaq 0x90(%rsp), %rdi movq %rdi, 0x20(%rsp) movl $0x3, %esi movl $0xa9, %ecx callq 0x219560 movq 0x20(%rsp), %rdi movb $0x1, 0x8f(%rsp) leaq 0x20b41c(%rip), %rsi # 0x3fc037 callq 0x218e20 movq %rax, 0x28(%rsp) jmp 0x1f0c27 movq 0x28(%rsp), %rsi leaq 0x8e(%rsp), %rdi callq 0x218fd0 jmp 0x1f0c3b jmp 0x1f0c3d testb $0x1, 0x8f(%rsp) jne 0x1f0c49 jmp 0x1f0c56 leaq 0x90(%rsp), %rdi callq 0x2195a0 movq 0x40(%rsp), %rax movslq 0x11c(%rsp), %rcx movq %rcx, 0x18(%rsp) movq 0x8(%rax), %rdi callq 0x21300 movq %rax, %rcx movq 0x18(%rsp), %rax movb $0x0, 0x4f(%rsp) cmpq %rcx, %rax ja 0x1f0c85 jmp 0x1f0cd5 leaq 0x20b244(%rip), %rdx # 0x3fbed0 leaq 0x50(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0xaa, %ecx callq 0x219560 movq 0x8(%rsp), %rdi movb $0x1, 0x4f(%rsp) leaq 0x20b3a1(%rip), %rsi # 0x3fc057 callq 0x218e20 movq %rax, 0x10(%rsp) jmp 0x1f0cc2 movq 0x10(%rsp), %rsi leaq 0x4e(%rsp), %rdi callq 0x218fd0 jmp 0x1f0cd3 jmp 0x1f0cd5 testb $0x1, 0x4f(%rsp) jne 0x1f0cde jmp 0x1f0ce8 leaq 0x50(%rsp), %rdi callq 0x2195a0 movq 0x40(%rsp), %rax movq 0x8(%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rdi callq 0x21300 movq (%rsp), %rdi movq %rax, %rsi movslq 0x11c(%rsp), %rax subq %rax, %rsi callq 0x21470 addq $0x128, %rsp # imm = 0x128 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) testb $0x1, 0xdf(%rsp) jne 0x1f0d3d jmp 0x1f0d4a leaq 0xe0(%rsp), %rdi callq 0x2195a0 jmp 0x1f0da4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) testb $0x1, 0x8f(%rsp) jne 0x1f0d6c jmp 0x1f0d79 leaq 0x90(%rsp), %rdi callq 0x2195a0 jmp 0x1f0da4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) testb $0x1, 0x4f(%rsp) jne 0x1f0d98 jmp 0x1f0da2 leaq 0x50(%rsp), %rdi callq 0x2195a0 jmp 0x1f0da4 movq 0xd0(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZN6google8protobuf2io18StringOutputStream6BackUpEi: sub rsp, 128h mov [rsp+128h+var_8], rdi mov [rsp+128h+var_C], esi mov rax, [rsp+128h+var_8] mov [rsp+128h+var_E8], rax mov eax, [rsp+128h+var_C] mov [rsp+128h+var_49], 0 cmp eax, 0 jl short loc_1F0B59 jmp short loc_1F0BB2 loc_1F0B59: lea rdx, aWorkspaceLlm4b_66; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+128h+var_48] mov [rsp+128h+var_F8], rdi mov esi, 3 mov ecx, 0A8h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+128h+var_F8] mov [rsp+128h+var_49], 1 lea rsi, aCheckFailedCou_1; "CHECK failed: (count) >= (0): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+128h+var_F0], rax jmp short $+2 loc_1F0B9C: mov rsi, [rsp+128h+var_F0] lea rdi, [rsp+128h+var_5D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1F0BB0: jmp short $+2 loc_1F0BB2: test [rsp+128h+var_49], 1 jnz short loc_1F0BBE jmp short loc_1F0BCB loc_1F0BBE: lea rdi, [rsp+128h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F0BCB: mov rax, [rsp+128h+var_E8] mov rax, [rax+8] mov [rsp+128h+var_99], 0 cmp rax, 0 jz short loc_1F0BE4 jmp short loc_1F0C3D loc_1F0BE4: lea rdx, aWorkspaceLlm4b_66; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+128h+var_98] mov [rsp+128h+var_108], rdi mov esi, 3 mov ecx, 0A9h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+128h+var_108] mov [rsp+128h+var_99], 1 lea rsi, aCheckFailedTar_0; "CHECK failed: target_ != NULL: " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+128h+var_100], rax jmp short $+2 loc_1F0C27: mov rsi, [rsp+128h+var_100] lea rdi, [rsp+128h+var_9A] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1F0C3B: jmp short $+2 loc_1F0C3D: test [rsp+128h+var_99], 1 jnz short loc_1F0C49 jmp short loc_1F0C56 loc_1F0C49: lea rdi, [rsp+128h+var_98]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F0C56: mov rax, [rsp+128h+var_E8] movsxd rcx, [rsp+128h+var_C] mov [rsp+128h+var_110], rcx mov rdi, [rax+8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rsp+128h+var_110] mov [rsp+128h+var_D9], 0 cmp rax, rcx ja short loc_1F0C85 jmp short loc_1F0CD5 loc_1F0C85: lea rdx, aWorkspaceLlm4b_66; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+128h+var_D8] mov [rsp+128h+var_120], rdi mov esi, 3 mov ecx, 0AAh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+128h+var_120] mov [rsp+128h+var_D9], 1 lea rsi, aCheckFailedSta; "CHECK failed: (static_cast<size_t>(coun"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+128h+var_118], rax jmp short $+2 loc_1F0CC2: mov rsi, [rsp+128h+var_118] lea rdi, [rsp+128h+var_DA] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1F0CD3: jmp short $+2 loc_1F0CD5: test [rsp+128h+var_D9], 1 jnz short loc_1F0CDE jmp short loc_1F0CE8 loc_1F0CDE: lea rdi, [rsp+128h+var_D8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F0CE8: mov rax, [rsp+128h+var_E8] mov rcx, [rax+8] mov [rsp+128h+var_128], rcx mov rdi, [rax+8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+128h+var_128] mov rsi, rax movsxd rax, [rsp+128h+var_C] sub rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong) add rsp, 128h retn mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax test [rsp+arg_D7], 1 jnz short loc_1F0D3D jmp short loc_1F0D4A loc_1F0D3D: lea rdi, [rsp+arg_D8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F0D4A: jmp short loc_1F0DA4 mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax test [rsp+arg_87], 1 jnz short loc_1F0D6C jmp short loc_1F0D79 loc_1F0D6C: lea rdi, [rsp+arg_88]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F0D79: jmp short loc_1F0DA4 mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax test [rsp+arg_47], 1 jnz short loc_1F0D98 jmp short loc_1F0DA2 loc_1F0D98: lea rdi, [rsp+arg_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F0DA2: jmp short $+2 loc_1F0DA4: mov rdi, [rsp+arg_C8] call __Unwind_Resume
long long google::protobuf::io::StringOutputStream::BackUp( google::protobuf::io::StringOutputStream *this, int a2) { long long v2; // rax unsigned long long v3; // rcx long long v4; // rax long long v6; // [rsp+0h] [rbp-128h] long long v7; // [rsp+10h] [rbp-118h] unsigned long long v8; // [rsp+18h] [rbp-110h] long long v9; // [rsp+28h] [rbp-100h] long long v10; // [rsp+38h] [rbp-F0h] char v11; // [rsp+4Eh] [rbp-DAh] BYREF char v12; // [rsp+4Fh] [rbp-D9h] _BYTE v13[62]; // [rsp+50h] [rbp-D8h] BYREF char v14; // [rsp+8Eh] [rbp-9Ah] BYREF char v15; // [rsp+8Fh] [rbp-99h] _BYTE v16[59]; // [rsp+90h] [rbp-98h] BYREF _BYTE v17[20]; // [rsp+CBh] [rbp-5Dh] BYREF char v18; // [rsp+DFh] [rbp-49h] _BYTE v19[60]; // [rsp+E0h] [rbp-48h] BYREF int v20; // [rsp+11Ch] [rbp-Ch] google::protobuf::io::StringOutputStream *v21; // [rsp+120h] [rbp-8h] v21 = this; v20 = a2; v18 = 0; if ( a2 < 0 ) { google::protobuf::internal::LogMessage::LogMessage( v19, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 168LL); v18 = 1; v10 = google::protobuf::internal::LogMessage::operator<<(v19, "CHECK failed: (count) >= (0): "); google::protobuf::internal::LogFinisher::operator=(v17, v10); } if ( (v18 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v19); v2 = *((_QWORD *)this + 1); v15 = 0; if ( !v2 ) { google::protobuf::internal::LogMessage::LogMessage( v16, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 169LL); v15 = 1; v9 = google::protobuf::internal::LogMessage::operator<<(v16, "CHECK failed: target_ != NULL: "); google::protobuf::internal::LogFinisher::operator=(&v14, v9); } if ( (v15 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v16); v8 = v20; v3 = std::string::size(*((_QWORD *)this + 1)); v12 = 0; if ( v8 > v3 ) { google::protobuf::internal::LogMessage::LogMessage( v13, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 170LL); v12 = 1; v7 = google::protobuf::internal::LogMessage::operator<<( v13, "CHECK failed: (static_cast<size_t>(count)) <= (target_->size()): "); google::protobuf::internal::LogFinisher::operator=(&v11, v7); } if ( (v12 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v13); v6 = *((_QWORD *)this + 1); v4 = std::string::size(v6); return std::string::resize(v6, v4 - v20); }
end: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RSI,qword ptr [RSP + 0x8] ADD RSI,0x8 LEA RDI,[RSP + 0x10] CALL 0x001eff30 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x18 RET
/* std::_Rb_tree<std::__cxx11::string, std::pair<std::__cxx11::string const, google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>, std::_Select1st<std::pair<std::__cxx11::string const, google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations> >, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations> > >::end() */ int8 __thiscall std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>,std::_Select1st<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>> ::end(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>,std::_Select1st<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>> *this) { int8 local_8; _Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> ::_Rb_tree_iterator((_Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> *)&local_8,(_Rb_tree_node_base *)(this + 8)); return local_8; }
51,585
my_print_default_files
eloqsql/mysys/my_default.c
void my_print_default_files(const char *conf_file) { const char *empty_list[]= { "", 0 }; my_bool have_ext= fn_ext(conf_file)[0] != 0; const char **exts_to_use= have_ext ? empty_list : f_extensions; char name[FN_REFLEN], **ext; puts("\nDefault options are read from the following files in the given order:"); if (my_defaults_file) { puts(my_defaults_file); return; } if (dirname_length(conf_file)) fputs(conf_file,stdout); else { const char **dirs; MEM_ROOT alloc; init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0)); if ((dirs= init_default_directories(&alloc)) == NULL) { fputs("Internal error initializing default directories list", stdout); } else { for ( ; *dirs; dirs++) { for (ext= (char**) exts_to_use; *ext; ext++) { const char *pos; char *end; if (**dirs) pos= *dirs; else if (my_defaults_extra_file) { pos= my_defaults_extra_file; fputs(pos, stdout); fputs(" ", stdout); continue; } else continue; end= convert_dirname(name, pos, NullS); if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ *end++= '.'; strxmov(end, conf_file, *ext, " ", NullS); fputs(name, stdout); } } } free_root(&alloc, MYF(0)); } puts(""); }
O0
c
my_print_default_files: pushq %rbp movq %rsp, %rbp subq $0x2b0, %rsp # imm = 0x2B0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq 0x1e7c9a(%rip), %rax # 0x2e9bd0 movq %rax, -0x230(%rbp) movq 0x1e7c94(%rip), %rax # 0x2e9bd8 movq %rax, -0x228(%rbp) movq -0x218(%rbp), %rdi callq 0x1054c0 movsbl (%rax), %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x231(%rbp) movsbl -0x231(%rbp), %eax cmpl $0x0, %eax je 0x101f87 leaq -0x230(%rbp), %rax movq %rax, -0x2a8(%rbp) jmp 0x101f97 leaq 0x1f30f2(%rip), %rax # 0x2f5080 movq %rax, -0x2a8(%rbp) jmp 0x101f97 movq -0x2a8(%rbp), %rax movq %rax, -0x240(%rbp) leaq 0x827ea(%rip), %rdi # 0x184796 callq 0x2a850 leaq 0xbb5c10(%rip), %rax # 0xcb7bc8 cmpq $0x0, (%rax) je 0x101fd2 leaq 0xbb5c03(%rip), %rax # 0xcb7bc8 movq (%rax), %rdi callq 0x2a850 jmp 0x1021ce movq -0x218(%rbp), %rdi callq 0x105320 cmpq $0x0, %rax je 0x101fff movq -0x218(%rbp), %rdi movq 0x1effde(%rip), %rax # 0x2f1fd0 movq (%rax), %rsi callq 0x2a320 jmp 0x1021c2 leaq 0xbb6ba2(%rip), %rax # 0xcb8ba8 movl (%rax), %edi leaq -0x290(%rbp), %rsi movl $0x200, %edx # imm = 0x200 xorl %eax, %eax movl %eax, %r8d movq %r8, %rcx callq 0x114e70 leaq -0x290(%rbp), %rdi callq 0x101a70 movq %rax, -0x250(%rbp) cmpq $0x0, %rax jne 0x102055 movq 0x1eff8f(%rip), %rax # 0x2f1fd0 movq (%rax), %rsi leaq 0x82792(%rip), %rdi # 0x1847dd callq 0x2a320 jmp 0x1021b2 jmp 0x102057 movq -0x250(%rbp), %rax cmpq $0x0, (%rax) je 0x1021b0 movq -0x240(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x248(%rbp), %rax cmpq $0x0, (%rax) je 0x102197 movq -0x250(%rbp), %rax movq (%rax), %rax cmpb $0x0, (%rax) je 0x1020a9 movq -0x250(%rbp), %rax movq (%rax), %rax movq %rax, -0x298(%rbp) jmp 0x1020fd leaq 0xbb5b28(%rip), %rax # 0xcb7bd8 cmpq $0x0, (%rax) je 0x1020f8 leaq 0xbb5b1b(%rip), %rax # 0xcb7bd8 movq (%rax), %rax movq %rax, -0x298(%rbp) movq -0x298(%rbp), %rdi movq 0x1efefb(%rip), %rax # 0x2f1fd0 movq (%rax), %rsi callq 0x2a320 movq 0x1efeec(%rip), %rax # 0x2f1fd0 movq (%rax), %rsi leaq 0x7edce(%rip), %rdi # 0x180ebc callq 0x2a320 jmp 0x102180 jmp 0x102180 leaq -0x210(%rbp), %rdi movq -0x298(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x105400 movq %rax, -0x2a0(%rbp) movsbl -0x210(%rbp), %eax cmpl $0x7e, %eax jne 0x10213f movq -0x2a0(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x2a0(%rbp) movb $0x2e, (%rax) movq -0x2a0(%rbp), %rdi movq -0x218(%rbp), %rsi movq -0x248(%rbp), %rax movq (%rax), %rdx leaq 0x7ed5e(%rip), %rcx # 0x180ebc xorl %eax, %eax movl %eax, %r8d movb $0x0, %al callq 0x17a780 leaq -0x210(%rbp), %rdi movq 0x1efe58(%rip), %rax # 0x2f1fd0 movq (%rax), %rsi callq 0x2a320 movq -0x248(%rbp), %rax addq $0x8, %rax movq %rax, -0x248(%rbp) jmp 0x102076 jmp 0x102199 movq -0x250(%rbp), %rax addq $0x8, %rax movq %rax, -0x250(%rbp) jmp 0x102057 jmp 0x1021b2 leaq -0x290(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x1156e0 leaq 0x7f20b(%rip), %rdi # 0x1813d4 callq 0x2a850 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x1021e9 addq $0x2b0, %rsp # imm = 0x2B0 popq %rbp retq callq 0x2a290 nop
my_print_default_files: push rbp mov rbp, rsp sub rsp, 2B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov rax, cs:off_2E9BD0; "" mov [rbp+var_230], rax mov rax, cs:qword_2E9BD8 mov [rbp+var_228], rax mov rdi, [rbp+var_218] call fn_ext movsx eax, byte ptr [rax] cmp eax, 0 setnz al and al, 1 movzx eax, al mov [rbp+var_231], al movsx eax, [rbp+var_231] cmp eax, 0 jz short loc_101F87 lea rax, [rbp+var_230] mov [rbp+var_2A8], rax jmp short loc_101F97 loc_101F87: lea rax, f_extensions mov [rbp+var_2A8], rax jmp short $+2 loc_101F97: mov rax, [rbp+var_2A8] mov [rbp+var_240], rax lea rdi, aDefaultOptions; "\nDefault options are read from the fol"... call _puts lea rax, my_defaults_file cmp qword ptr [rax], 0 jz short loc_101FD2 lea rax, my_defaults_file mov rdi, [rax] call _puts jmp loc_1021CE loc_101FD2: mov rdi, [rbp+var_218] call dirname_length cmp rax, 0 jz short loc_101FFF mov rdi, [rbp+var_218] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs jmp loc_1021C2 loc_101FFF: lea rax, key_memory_defaults mov edi, [rax] lea rsi, [rbp+var_290] mov edx, 200h xor eax, eax mov r8d, eax mov rcx, r8 call init_alloc_root lea rdi, [rbp+var_290] call init_default_directories mov [rbp+var_250], rax cmp rax, 0 jnz short loc_102055 mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, aInternalErrorI; "Internal error initializing default dir"... call _fputs jmp loc_1021B2 loc_102055: jmp short $+2 loc_102057: mov rax, [rbp+var_250] cmp qword ptr [rax], 0 jz loc_1021B0 mov rax, [rbp+var_240] mov [rbp+var_248], rax loc_102076: mov rax, [rbp+var_248] cmp qword ptr [rax], 0 jz loc_102197 mov rax, [rbp+var_250] mov rax, [rax] cmp byte ptr [rax], 0 jz short loc_1020A9 mov rax, [rbp+var_250] mov rax, [rax] mov [rbp+var_298], rax jmp short loc_1020FD loc_1020A9: lea rax, my_defaults_extra_file cmp qword ptr [rax], 0 jz short loc_1020F8 lea rax, my_defaults_extra_file mov rax, [rax] mov [rbp+var_298], rax mov rdi, [rbp+var_298] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, aRecordlinks+0Fh; " " call _fputs jmp loc_102180 loc_1020F8: jmp loc_102180 loc_1020FD: lea rdi, [rbp+var_210] mov rsi, [rbp+var_298] xor eax, eax mov edx, eax call convert_dirname mov [rbp+var_2A0], rax movsx eax, [rbp+var_210] cmp eax, 7Eh ; '~' jnz short loc_10213F mov rax, [rbp+var_2A0] mov rcx, rax add rcx, 1 mov [rbp+var_2A0], rcx mov byte ptr [rax], 2Eh ; '.' loc_10213F: mov rdi, [rbp+var_2A0] mov rsi, [rbp+var_218] mov rax, [rbp+var_248] mov rdx, [rax] lea rcx, aRecordlinks+0Fh; " " xor eax, eax mov r8d, eax mov al, 0 call strxmov lea rdi, [rbp+var_210] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs loc_102180: mov rax, [rbp+var_248] add rax, 8 mov [rbp+var_248], rax jmp loc_102076 loc_102197: jmp short $+2 loc_102199: mov rax, [rbp+var_250] add rax, 8 mov [rbp+var_250], rax jmp loc_102057 loc_1021B0: jmp short $+2 loc_1021B2: lea rdi, [rbp+var_290] xor eax, eax mov esi, eax call free_root loc_1021C2: lea rdi, aTotalKeyblocks+30h; "" call _puts loc_1021CE: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_1021E9 add rsp, 2B0h pop rbp retn loc_1021E9: call ___stack_chk_fail
unsigned long long my_print_default_files(long long a1) { _BYTE *v1; // rax int v2; // r9d char **v4; // [rsp+8h] [rbp-2A8h] int v5; // [rsp+10h] [rbp-2A0h] _BYTE v6[64]; // [rsp+20h] [rbp-290h] BYREF _QWORD *inited; // [rsp+60h] [rbp-250h] char **i; // [rsp+68h] [rbp-248h] char **v9; // [rsp+70h] [rbp-240h] _QWORD v11[3]; // [rsp+80h] [rbp-230h] BYREF long long v12; // [rsp+98h] [rbp-218h] _BYTE v13[520]; // [rsp+A0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2A8h] [rbp-8h] v14 = __readfsqword(0x28u); v12 = a1; v11[0] = ""; v11[1] = &dword_0; if ( *(_BYTE *)fn_ext(a1) != 0 ) v4 = (char **)v11; else v4 = &f_extensions; v9 = v4; puts("\nDefault options are read from the following files in the given order:"); if ( my_defaults_file ) { puts(my_defaults_file); } else { if ( dirname_length(v12) ) { fputs(v12, stdout); } else { init_alloc_root(key_memory_defaults, v6, 512LL, 0LL); inited = (_QWORD *)init_default_directories((long long)v6); if ( inited ) { while ( *inited ) { for ( i = v9; *i; ++i ) { if ( *(_BYTE *)*inited ) { v1 = (_BYTE *)convert_dirname(v13, *inited, 0LL); v5 = (int)v1; if ( v13[0] == 126 ) { v5 = (_DWORD)v1 + 1; *v1 = 46; } strxmov(v5, v12, (unsigned int)*i, (unsigned int)" ", 0, v2); fputs(v13, stdout); } else if ( my_defaults_extra_file ) { fputs(my_defaults_extra_file, stdout); fputs(" ", stdout); } } ++inited; } } else { fputs("Internal error initializing default directories list", stdout); } free_root(v6, 0LL); } puts(""); } return __readfsqword(0x28u); }
51,586
my_print_default_files
eloqsql/mysys/my_default.c
void my_print_default_files(const char *conf_file) { const char *empty_list[]= { "", 0 }; my_bool have_ext= fn_ext(conf_file)[0] != 0; const char **exts_to_use= have_ext ? empty_list : f_extensions; char name[FN_REFLEN], **ext; puts("\nDefault options are read from the following files in the given order:"); if (my_defaults_file) { puts(my_defaults_file); return; } if (dirname_length(conf_file)) fputs(conf_file,stdout); else { const char **dirs; MEM_ROOT alloc; init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0)); if ((dirs= init_default_directories(&alloc)) == NULL) { fputs("Internal error initializing default directories list", stdout); } else { for ( ; *dirs; dirs++) { for (ext= (char**) exts_to_use; *ext; ext++) { const char *pos; char *end; if (**dirs) pos= *dirs; else if (my_defaults_extra_file) { pos= my_defaults_extra_file; fputs(pos, stdout); fputs(" ", stdout); continue; } else continue; end= convert_dirname(name, pos, NullS); if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ *end++= '.'; strxmov(end, conf_file, *ext, " ", NullS); fputs(name, stdout); } } } free_root(&alloc, MYF(0)); } puts(""); }
O3
c
my_print_default_files: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x258, %rsp # imm = 0x258 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) callq 0xb022c cmpb $0x0, (%rax) leaq 0x2f4c7e(%rip), %rax # 0x3a3ac0 leaq 0x2f4c87(%rip), %rbx # 0x3a3ad0 cmoveq %rax, %rbx leaq 0x508e6(%rip), %rdi # 0xff73a callq 0x2a8a0 leaq 0xb811d8(%rip), %rax # 0xc30038 movq (%rax), %rdi testq %rdi, %rdi je 0xaee91 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xaf00d addq $0x258, %rsp # imm = 0x258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2a8a0 movq %r15, %rdi callq 0xb0158 testq %rax, %rax je 0xaeeb5 movq 0x2fd0fb(%rip), %rax # 0x3abfa0 movq (%rax), %rsi movq %r15, %rdi callq 0x2a310 jmp 0xaefe2 leaq 0xb8215c(%rip), %rax # 0xc31018 movl (%rax), %edi leaq -0x280(%rbp), %r14 movl $0x200, %edx # imm = 0x200 movq %r14, %rsi xorl %ecx, %ecx xorl %r8d, %r8d callq 0xb96e8 movq %r14, %rdi callq 0xaecff testq %rax, %rax je 0xaefbe movq %rax, %r14 cmpq $0x0, (%rax) je 0xaefd4 movq (%rbx), %rax movq %rax, -0x238(%rbp) addq $0x8, %rbx movq %rbx, -0x240(%rbp) leaq -0x230(%rbp), %r12 cmpq $0x0, -0x238(%rbp) je 0xaefad movq -0x240(%rbp), %rbx movq -0x238(%rbp), %r13 movq (%r14), %rsi cmpb $0x0, (%rsi) je 0xaef6d movq %r12, %rdi xorl %edx, %edx callq 0xb01d3 cmpb $0x7e, -0x230(%rbp) jne 0xaef4e movb $0x2e, (%rax) incq %rax movq %rax, %rdi movq %r15, %rsi movq %r13, %rdx leaq 0x4cefe(%rip), %rcx # 0xfbe5c xorl %r8d, %r8d xorl %eax, %eax callq 0xf6ea8 movq %r12, %rdi jmp 0xaef92 leaq 0xb810d4(%rip), %rax # 0xc30048 movq (%rax), %rdi testq %rdi, %rdi je 0xaefa1 movq 0x2fd01d(%rip), %rax # 0x3abfa0 movq (%rax), %rsi callq 0x2a310 leaq 0x4ceca(%rip), %rdi # 0xfbe5c movq 0x2fd007(%rip), %rax # 0x3abfa0 movq (%rax), %rsi callq 0x2a310 movq (%rbx), %r13 addq $0x8, %rbx testq %r13, %r13 jne 0xaef2d cmpq $0x0, 0x8(%r14) leaq 0x8(%r14), %r14 jne 0xaef11 jmp 0xaefd4 movq 0x2fcfdb(%rip), %rax # 0x3abfa0 movq (%rax), %rsi leaq 0x507b2(%rip), %rdi # 0xff781 callq 0x2a310 leaq -0x280(%rbp), %rdi xorl %esi, %esi callq 0xb9ab7 movl $0xa, %edi callq 0x2a9e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xaf00d addq $0x258, %rsp # imm = 0x258 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a280
my_print_default_files: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 258h mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax call fn_ext cmp byte ptr [rax], 0 lea rax, f_extensions lea rbx, off_3A3AD0; "" cmovz rbx, rax lea rdi, aDefaultOptions; "\nDefault options are read from the fol"... call _puts lea rax, my_defaults_file mov rdi, [rax] test rdi, rdi jz short loc_AEE91 mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_AF00D add rsp, 258h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _puts loc_AEE91: mov rdi, r15 call dirname_length test rax, rax jz short loc_AEEB5 mov rax, cs:stdout_ptr mov rsi, [rax] mov rdi, r15 call _fputs jmp loc_AEFE2 loc_AEEB5: lea rax, key_memory_defaults mov edi, [rax] lea r14, [rbp+var_280] mov edx, 200h mov rsi, r14 xor ecx, ecx xor r8d, r8d call init_alloc_root mov rdi, r14 call init_default_directories test rax, rax jz loc_AEFBE mov r14, rax cmp qword ptr [rax], 0 jz loc_AEFD4 mov rax, [rbx] mov [rbp+var_238], rax add rbx, 8 mov [rbp+var_240], rbx lea r12, [rbp+var_230] loc_AEF11: cmp [rbp+var_238], 0 jz loc_AEFAD mov rbx, [rbp+var_240] mov r13, [rbp+var_238] loc_AEF2D: mov rsi, [r14] cmp byte ptr [rsi], 0 jz short loc_AEF6D mov rdi, r12 xor edx, edx call convert_dirname cmp [rbp+var_230], 7Eh ; '~' jnz short loc_AEF4E mov byte ptr [rax], 2Eh ; '.' inc rax loc_AEF4E: mov rdi, rax mov rsi, r15 mov rdx, r13 lea rcx, aRecordlinks+0Fh; " " xor r8d, r8d xor eax, eax call strxmov mov rdi, r12 jmp short loc_AEF92 loc_AEF6D: lea rax, my_defaults_extra_file mov rdi, [rax] test rdi, rdi jz short loc_AEFA1 mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs lea rdi, aRecordlinks+0Fh; " " loc_AEF92: mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs loc_AEFA1: mov r13, [rbx] add rbx, 8 test r13, r13 jnz short loc_AEF2D loc_AEFAD: cmp qword ptr [r14+8], 0 lea r14, [r14+8] jnz loc_AEF11 jmp short loc_AEFD4 loc_AEFBE: mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, aInternalErrorI; "Internal error initializing default dir"... call _fputs loc_AEFD4: lea rdi, [rbp+var_280] xor esi, esi call free_root loc_AEFE2: mov edi, 0Ah call _putchar mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_AF00D add rsp, 258h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_AF00D: call ___stack_chk_fail
long long my_print_default_files(long long a1) { int v1; // r15d char **v2; // rbx _OWORD *inited; // rax _QWORD *v5; // r14 char **v6; // rbx long long v7; // r13 _BYTE *v8; // rax int v9; // r9d char *v10; // rdi bool v11; // zf _BYTE v12[64]; // [rsp+0h] [rbp-280h] BYREF char **v13; // [rsp+40h] [rbp-240h] char *v14; // [rsp+48h] [rbp-238h] _BYTE v15[512]; // [rsp+50h] [rbp-230h] BYREF unsigned long long v16; // [rsp+250h] [rbp-30h] v1 = a1; v16 = __readfsqword(0x28u); v2 = (char **)&off_3A3AD0; if ( !*(_BYTE *)fn_ext() ) v2 = &f_extensions; puts("\nDefault options are read from the following files in the given order:"); if ( my_defaults_file ) return puts(my_defaults_file); if ( !dirname_length(a1) ) { init_alloc_root(key_memory_defaults, v12, 512LL, 0LL, 0LL); inited = init_default_directories((long long)v12); if ( inited ) { v5 = inited; if ( *(_QWORD *)inited ) { v14 = *v2; v13 = v2 + 1; while ( !v14 ) { LABEL_20: v11 = v5[1] == 0LL; ++v5; if ( v11 ) goto LABEL_23; } v6 = v13; LODWORD(v7) = (_DWORD)v14; while ( !*(_BYTE *)*v5 ) { if ( my_defaults_extra_file ) { fputs(my_defaults_extra_file, stdout); v10 = " "; LABEL_18: fputs(v10, stdout); } v7 = (long long)*v6++; if ( !v7 ) goto LABEL_20; } v8 = (_BYTE *)convert_dirname(v15, *v5, 0LL); if ( v15[0] == 126 ) { *v8 = 46; LODWORD(v8) = (_DWORD)v8 + 1; } strxmov((_DWORD)v8, v1, v7, (unsigned int)" ", 0, v9); v10 = v15; goto LABEL_18; } } else { fputs("Internal error initializing default directories list", stdout); } LABEL_23: free_root(v12, 0LL); goto LABEL_24; } fputs(a1, stdout); LABEL_24: putchar(10LL); return __readfsqword(0x28u); }
my_print_default_files: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x258 MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CALL 0x001b022c CMP byte ptr [RAX],0x0 LEA RAX,[0x4a3ac0] LEA RBX,[0x4a3ad0] CMOVZ RBX,RAX LEA RDI,[0x1ff73a] CALL 0x0012a8a0 LEA RAX,[0xd30038] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x001aee91 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001af00d ADD RSP,0x258 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0012a8a0 LAB_001aee91: MOV RDI,R15 CALL 0x001b0158 TEST RAX,RAX JZ 0x001aeeb5 MOV RAX,qword ptr [0x004abfa0] MOV RSI,qword ptr [RAX] MOV RDI,R15 CALL 0x0012a310 JMP 0x001aefe2 LAB_001aeeb5: LEA RAX,[0xd31018] MOV EDI,dword ptr [RAX] LEA R14,[RBP + -0x280] MOV EDX,0x200 MOV RSI,R14 XOR ECX,ECX XOR R8D,R8D CALL 0x001b96e8 MOV RDI,R14 CALL 0x001aecff TEST RAX,RAX JZ 0x001aefbe MOV R14,RAX CMP qword ptr [RAX],0x0 JZ 0x001aefd4 MOV RAX,qword ptr [RBX] MOV qword ptr [RBP + -0x238],RAX ADD RBX,0x8 MOV qword ptr [RBP + -0x240],RBX LEA R12,[RBP + -0x230] LAB_001aef11: CMP qword ptr [RBP + -0x238],0x0 JZ 0x001aefad MOV RBX,qword ptr [RBP + -0x240] MOV R13,qword ptr [RBP + -0x238] LAB_001aef2d: MOV RSI,qword ptr [R14] CMP byte ptr [RSI],0x0 JZ 0x001aef6d MOV RDI,R12 XOR EDX,EDX CALL 0x001b01d3 CMP byte ptr [RBP + -0x230],0x7e JNZ 0x001aef4e MOV byte ptr [RAX],0x2e INC RAX LAB_001aef4e: MOV RDI,RAX MOV RSI,R15 MOV RDX,R13 LEA RCX,[0x1fbe5c] XOR R8D,R8D XOR EAX,EAX CALL 0x001f6ea8 MOV RDI,R12 JMP 0x001aef92 LAB_001aef6d: LEA RAX,[0xd30048] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x001aefa1 MOV RAX,qword ptr [0x004abfa0] MOV RSI,qword ptr [RAX] CALL 0x0012a310 LEA RDI,[0x1fbe5c] LAB_001aef92: MOV RAX,qword ptr [0x004abfa0] MOV RSI,qword ptr [RAX] CALL 0x0012a310 LAB_001aefa1: MOV R13,qword ptr [RBX] ADD RBX,0x8 TEST R13,R13 JNZ 0x001aef2d LAB_001aefad: CMP qword ptr [R14 + 0x8],0x0 LEA R14,[R14 + 0x8] JNZ 0x001aef11 JMP 0x001aefd4 LAB_001aefbe: MOV RAX,qword ptr [0x004abfa0] MOV RSI,qword ptr [RAX] LEA RDI,[0x1ff781] CALL 0x0012a310 LAB_001aefd4: LEA RDI,[RBP + -0x280] XOR ESI,ESI CALL 0x001b9ab7 LAB_001aefe2: MOV EDI,0xa CALL 0x0012a9e0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001af00d ADD RSP,0x258 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001af00d: CALL 0x0012a280
void my_print_default_files(char *param_1) { long *plVar1; int *puVar2; char *pcVar3; long lVar4; long *plVar5; int1 *puVar6; int **ppuVar7; long in_FS_OFFSET; int1 local_288 [64]; int **local_248; int *local_240; char local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar3 = (char *)fn_ext(); ppuVar7 = &PTR_s__004a3ad0; if (*pcVar3 == '\0') { ppuVar7 = (int **)f_extensions; } puts("\nDefault options are read from the following files in the given order:"); if (my_defaults_file == (char *)0x0) { lVar4 = dirname_length(param_1); if (lVar4 == 0) { init_alloc_root(key_memory_defaults,local_288,0x200,0,0); plVar5 = (long *)init_default_directories(local_288); if (plVar5 == (long *)0x0) { fputs("Internal error initializing default directories list",*(FILE **)PTR_stdout_004abfa0); } else if (*plVar5 != 0) { local_240 = *ppuVar7; local_248 = ppuVar7 + 1; ppuVar7 = local_248; puVar2 = local_240; do { while (puVar2 != (int *)0x0) { if (*(char *)*plVar5 == '\0') { if (my_defaults_extra_file != (char *)0x0) { fputs(my_defaults_extra_file,*(FILE **)PTR_stdout_004abfa0); pcVar3 = " "; goto LAB_001aef92; } } else { puVar6 = (int1 *)convert_dirname(local_238,(char *)*plVar5,0); if (local_238[0] == '~') { *puVar6 = 0x2e; puVar6 = puVar6 + 1; } strxmov(puVar6,param_1,puVar2," ",0); pcVar3 = local_238; LAB_001aef92: fputs(pcVar3,*(FILE **)PTR_stdout_004abfa0); } puVar2 = *ppuVar7; ppuVar7 = ppuVar7 + 1; } plVar1 = plVar5 + 1; plVar5 = plVar5 + 1; ppuVar7 = local_248; puVar2 = local_240; } while (*plVar1 != 0); } free_root(local_288,0); } else { fputs(param_1,*(FILE **)PTR_stdout_004abfa0); } putchar(10); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } else if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { puts(my_defaults_file); return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
51,587
make_quick_table
eloqsql/storage/maria/ma_packrec.c
static void make_quick_table(uint16 *to_table, uint16 *decode_table, uint *next_free_offset, uint value, uint bits, uint max_bits) { DBUG_ENTER("make_quick_table"); /* When down the table to the requested maximum, copy the rest of the Huffman table. */ if (!bits--) { /* Remaining left Huffman tree segment starts behind quick table. Remaining right Huffman tree segment starts behind left segment. */ to_table[value]= (uint16) *next_free_offset; /* Re-construct the remaining Huffman tree segment at next_free_offset in to_table. */ *next_free_offset=copy_decode_table(to_table, *next_free_offset, decode_table); DBUG_VOID_RETURN; } /* Descent on the left side. Left side bits are clear (0). */ if (!(*decode_table & IS_CHAR)) { /* Not a leaf. Follow the pointer. */ make_quick_table(to_table,decode_table+ *decode_table, next_free_offset,value,bits,max_bits); } else { /* A leaf. A Huffman code is complete. Fill the quick_table array for all possible bit strings starting with this Huffman code. */ fill_quick_table(to_table+value,bits,max_bits,(uint) *decode_table); } /* Descent on the right side. Right side bits are set (1). */ decode_table++; value|= (1 << bits); if (!(*decode_table & IS_CHAR)) { /* Not a leaf. Follow the pointer. */ make_quick_table(to_table,decode_table+ *decode_table, next_free_offset,value,bits,max_bits); } else { /* A leaf. A Huffman code is complete. Fill the quick_table array for all possible bit strings starting with this Huffman code. */ fill_quick_table(to_table+value,bits,max_bits,(uint) *decode_table); } DBUG_VOID_RETURN; }
O0
c
make_quick_table: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl %r8d, -0x20(%rbp) movl %r9d, -0x24(%rbp) movl -0x20(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x20(%rbp) cmpl $0x0, %eax jne 0x81083 movq -0x18(%rbp), %rax movl (%rax), %eax movw %ax, %dx movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx movw %dx, (%rax,%rcx,2) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rax movl (%rax), %esi movq -0x10(%rbp), %rdx callq 0x81170 movl %eax, %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) jmp 0x8115d movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x810c1 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movzwl (%rax), %eax cltq shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d movl -0x24(%rbp), %r9d callq 0x81020 jmp 0x810e0 movq -0x8(%rbp), %rdi movl -0x1c(%rbp), %eax shlq %rax addq %rax, %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movq -0x10(%rbp), %rax movzwl (%rax), %ecx callq 0x81270 movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movl $0x1, %eax shll %cl, %eax orl -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x8113a movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movzwl (%rax), %eax cltq shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d movl -0x24(%rbp), %r9d callq 0x81020 jmp 0x81159 movq -0x8(%rbp), %rdi movl -0x1c(%rbp), %eax shlq %rax addq %rax, %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movq -0x10(%rbp), %rax movzwl (%rax), %ecx callq 0x81270 jmp 0x8115b jmp 0x8115d addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
make_quick_table: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_20], r8d mov [rbp+var_24], r9d mov eax, [rbp+var_20] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_20], ecx cmp eax, 0 jnz short loc_81083 mov rax, [rbp+var_18] mov eax, [rax] mov dx, ax mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] mov [rax+rcx*2], dx mov rdi, [rbp+var_8] mov rax, [rbp+var_18] mov esi, [rax] mov rdx, [rbp+var_10] call copy_decode_table mov ecx, eax mov rax, [rbp+var_18] mov [rax], ecx jmp loc_8115D loc_81083: mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_810C1 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] movzx eax, word ptr [rax] cdqe shl rax, 1 add rsi, rax mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] mov r9d, [rbp+var_24] call make_quick_table jmp short loc_810E0 loc_810C1: mov rdi, [rbp+var_8] mov eax, [rbp+var_1C] shl rax, 1 add rdi, rax mov esi, [rbp+var_20] mov edx, [rbp+var_24] mov rax, [rbp+var_10] movzx ecx, word ptr [rax] call fill_quick_table loc_810E0: mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov eax, 1 shl eax, cl or eax, [rbp+var_1C] mov [rbp+var_1C], eax mov rax, [rbp+var_10] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_8113A mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] movzx eax, word ptr [rax] cdqe shl rax, 1 add rsi, rax mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] mov r9d, [rbp+var_24] call make_quick_table jmp short loc_81159 loc_8113A: mov rdi, [rbp+var_8] mov eax, [rbp+var_1C] shl rax, 1 add rdi, rax mov esi, [rbp+var_20] mov edx, [rbp+var_24] mov rax, [rbp+var_10] movzx ecx, word ptr [rax] call fill_quick_table loc_81159: jmp short $+2 loc_8115B: jmp short $+2 loc_8115D: add rsp, 30h pop rbp retn
long long make_quick_table( long long a1, unsigned __int16 *a2, _DWORD *a3, unsigned int a4, int a5, unsigned int a6) { int v6; // ecx long long result; // rax unsigned int v9; // [rsp+10h] [rbp-20h] unsigned int v11; // [rsp+14h] [rbp-1Ch] unsigned __int16 *v13; // [rsp+20h] [rbp-10h] v9 = a5 - 1; if ( a5 ) { if ( (*a2 & 0x8000) != 0 ) fill_quick_table(2LL * a4 + a1, v9, a6, *a2); else make_quick_table(a1, &a2[*a2], a3, a4, v9, a6); v13 = a2 + 1; v11 = a4 | (1 << v9); if ( (a2[1] & 0x8000) != 0 ) return fill_quick_table(2LL * v11 + a1, v9, a6, *v13); else return make_quick_table(a1, &v13[*v13], a3, v11, v9, a6); } else { *(_WORD *)(a1 + 2LL * a4) = *a3; v6 = copy_decode_table(a1, (unsigned int)*a3, a2); result = (long long)a3; *a3 = v6; } return result; }
make_quick_table: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV dword ptr [RBP + -0x20],R8D MOV dword ptr [RBP + -0x24],R9D MOV EAX,dword ptr [RBP + -0x20] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x20],ECX CMP EAX,0x0 JNZ 0x00181083 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV DX,AX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] MOV word ptr [RAX + RCX*0x2],DX MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] CALL 0x00181170 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],ECX JMP 0x0018115d LAB_00181083: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x001810c1 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] CDQE SHL RAX,0x1 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] CALL 0x00181020 JMP 0x001810e0 LAB_001810c1: MOV RDI,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RBP + -0x1c] SHL RAX,0x1 ADD RDI,RAX MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX] CALL 0x00181270 LAB_001810e0: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV EAX,0x1 SHL EAX,CL OR EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x0018113a MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX] CDQE SHL RAX,0x1 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] CALL 0x00181020 JMP 0x00181159 LAB_0018113a: MOV RDI,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RBP + -0x1c] SHL RAX,0x1 ADD RDI,RAX MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX] CALL 0x00181270 LAB_00181159: JMP 0x0018115b LAB_0018115b: JMP 0x0018115d LAB_0018115d: ADD RSP,0x30 POP RBP RET
void make_quick_table(long param_1,ushort *param_2,int4 *param_3,uint param_4,int param_5, int4 param_6) { int4 uVar1; int iVar2; iVar2 = param_5 + -1; if (param_5 == 0) { *(short *)(param_1 + (ulong)param_4 * 2) = (short)*param_3; uVar1 = copy_decode_table(param_1,*param_3,param_2); *param_3 = uVar1; } else { if ((*param_2 & 0x8000) == 0) { make_quick_table(param_1,param_2 + (int)(uint)*param_2,param_3,param_4,iVar2,param_6); } else { fill_quick_table(param_1 + (ulong)param_4 * 2,iVar2,param_6,*param_2); } param_2 = param_2 + 1; param_4 = 1 << ((byte)iVar2 & 0x1f) | param_4; if ((*param_2 & 0x8000) == 0) { make_quick_table(param_1,param_2 + (int)(uint)*param_2,param_3,param_4,iVar2,param_6); } else { fill_quick_table(param_1 + (ulong)param_4 * 2,iVar2,param_6,*param_2); } } return; }
51,588
LefDefParser::lefiOrthogonal::Destroy()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
void lefiOrthogonal::Destroy() { if (cutWithin_) lefFree((char*) (cutWithin_)); if (ortho_) lefFree((char*) (ortho_)); numAllocated_ = 0; numCutOrtho_ = 0; }
O3
cpp
LefDefParser::lefiOrthogonal::Destroy(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rdi testq %rdi, %rdi je 0x16e34 callq 0x26040 movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x16e42 callq 0x26040 movq $0x0, (%rbx) popq %rbx retq nop
_ZN12LefDefParser14lefiOrthogonal7DestroyEv: push rbx mov rbx, rdi mov rdi, [rdi+8]; this test rdi, rdi jz short loc_16E34 call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) loc_16E34: mov rdi, [rbx+10h]; this test rdi, rdi jz short loc_16E42 call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) loc_16E42: mov qword ptr [rbx], 0 pop rbx retn
long long LefDefParser::lefiOrthogonal::Destroy(LefDefParser::lefiOrthogonal *this, void *a2) { LefDefParser *v3; // rdi long long result; // rax LefDefParser *v5; // rdi v3 = (LefDefParser *)*((_QWORD *)this + 1); if ( v3 ) result = LefDefParser::lefFree(v3, a2); v5 = (LefDefParser *)*((_QWORD *)this + 2); if ( v5 ) result = LefDefParser::lefFree(v5, a2); *(_QWORD *)this = 0LL; return result; }
Destroy: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] TEST RDI,RDI JZ 0x00116e34 CALL 0x00126040 LAB_00116e34: MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x00116e42 CALL 0x00126040 LAB_00116e42: MOV qword ptr [RBX],0x0 POP RBX RET
/* LefDefParser::lefiOrthogonal::Destroy() */ void __thiscall LefDefParser::lefiOrthogonal::Destroy(lefiOrthogonal *this) { if (*(void **)(this + 8) != (void *)0x0) { lefFree(*(void **)(this + 8)); } if (*(void **)(this + 0x10) != (void *)0x0) { lefFree(*(void **)(this + 0x10)); } *(int8 *)this = 0; return; }
51,589
create_tailoring
eloqsql/strings/ctype-uca.c
static my_bool create_tailoring(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { MY_COLL_RULES rules; MY_UCA_INFO new_uca, *src_uca= NULL; int rc= 0; uint i; *loader->error= '\0'; if (!cs->tailoring) return 0; /* Ok to add a collation without tailoring */ memset(&rules, 0, sizeof(rules)); rules.loader= loader; rules.uca= cs->uca ? cs->uca : &my_uca_v400; /* For logical positions, etc */ memset(&new_uca, 0, sizeof(new_uca)); /* Parse ICU Collation Customization expression */ if ((rc= my_coll_rule_parse(&rules, cs->tailoring, cs->tailoring + strlen(cs->tailoring)))) goto ex; if (rules.version == 520) /* Unicode-5.2.0 requested */ { src_uca= &my_uca_v520; cs->caseinfo= &my_unicase_unicode520; } else if (rules.version == 400) /* Unicode-4.0.0 requested */ { src_uca= &my_uca_v400; cs->caseinfo= &my_unicase_default; } else /* No Unicode version specified */ { src_uca= cs->uca ? cs->uca : &my_uca_v400; if (!cs->caseinfo) cs->caseinfo= &my_unicase_default; } cs->levels_for_order= rules.strength ? rules.strength : 1; for (i= 0; i != cs->levels_for_order; i++) { if ((rc= (src_uca->level[i].maxchar == 0))) { my_snprintf(loader->error, sizeof(loader->error) - 1, "%s: no level #%d data for this Unicode version.", cs->coll_name.str, i + 1); goto ex; } if ((rc= init_weight_level(loader, &rules, &new_uca.level[i], &src_uca->level[i]))) goto ex; } if (!(cs->uca= (MY_UCA_INFO *) (loader->once_alloc)(sizeof(MY_UCA_INFO)))) { rc= 1; goto ex; } cs->uca[0]= new_uca; if (cs->levels_for_order > 1) cs->coll= (cs->state & MY_CS_NOPAD) ? &my_uca_collation_handler_nopad_multilevel_generic : &my_uca_collation_handler_multilevel_generic; ex: (loader->free)(rules.rule); if (rc != 0 && loader->error[0]) loader->reporter(ERROR_LEVEL, "%s", loader->error); return rc; }
O0
c
create_tailoring: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq $0x0, -0x128(%rbp) movl $0x0, -0x12c(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x41383 movb $0x0, -0x1(%rbp) jmp 0x416c0 leaq -0x50(%rbp), %rdi xorl %esi, %esi movl $0x38, %edx callq 0x25180 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x413b7 movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x138(%rbp) jmp 0x413c7 leaq 0x1b8202(%rip), %rax # 0x1f95c0 movq %rax, -0x138(%rbp) jmp 0x413c7 movq -0x138(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x120(%rbp), %rdi xorl %esi, %esi movl $0xd0, %edx callq 0x25180 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x140(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x148(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x25120 movq -0x148(%rbp), %rdx movq -0x140(%rbp), %rsi addq %rax, %rdx leaq -0x50(%rbp), %rdi callq 0x416d0 movl %eax, -0x12c(%rbp) cmpl $0x0, %eax je 0x4143a jmp 0x41675 cmpl $0x208, -0x50(%rbp) # imm = 0x208 jne 0x41465 leaq 0x1bd2de(%rip), %rax # 0x1fe728 movq %rax, -0x128(%rbp) movq -0x10(%rbp), %rax leaq 0x1894b4(%rip), %rcx # 0x1ca910 movq %rcx, 0x78(%rax) jmp 0x414e5 cmpl $0x190, -0x50(%rbp) # imm = 0x190 jne 0x4148d leaq 0x1b814b(%rip), %rax # 0x1f95c0 movq %rax, -0x128(%rbp) movq -0x10(%rbp), %rax leaq 0x189459(%rip), %rcx # 0x1ca8e0 movq %rcx, 0x78(%rax) jmp 0x414e3 movq -0x10(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x414a9 movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x150(%rbp) jmp 0x414b9 leaq 0x1b8110(%rip), %rax # 0x1f95c0 movq %rax, -0x150(%rbp) jmp 0x414b9 movq -0x150(%rbp), %rax movq %rax, -0x128(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x78(%rax) jne 0x414e1 movq -0x10(%rbp), %rax leaq 0x189403(%rip), %rcx # 0x1ca8e0 movq %rcx, 0x78(%rax) jmp 0x414e3 jmp 0x414e5 cmpl $0x0, -0x4c(%rbp) je 0x414f6 movl -0x4c(%rbp), %eax movl %eax, -0x154(%rbp) jmp 0x41503 movl $0x1, %eax movl %eax, -0x154(%rbp) jmp 0x41503 movl -0x154(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0xb2(%rax) movl $0x0, -0x130(%rbp) movl -0x130(%rbp), %eax movq -0x10(%rbp), %rcx movzbl 0xb2(%rcx), %ecx cmpl %ecx, %eax je 0x415f4 movq -0x128(%rbp), %rax movl -0x130(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax cmpq $0x0, (%rax) sete %al movb %al, %cl andb $0x1, %cl movzbl %cl, %ecx movl %ecx, -0x12c(%rbp) testb $0x1, %al jne 0x41567 jmp 0x41596 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx movl -0x130(%rbp), %r8d addl $0x1, %r8d movl $0x7f, %esi leaq 0x3d81d(%rip), %rdx # 0x7eda7 movb $0x0, %al callq 0x5d8b0 jmp 0x41675 movq -0x18(%rbp), %rdi leaq -0x120(%rbp), %rdx movl -0x130(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdx movq -0x128(%rbp), %rcx movl -0x130(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rcx leaq -0x50(%rbp), %rsi callq 0x417b0 movsbl %al, %eax movl %eax, -0x12c(%rbp) cmpl $0x0, %eax je 0x415de jmp 0x41675 jmp 0x415e0 movl -0x130(%rbp), %eax addl $0x1, %eax movl %eax, -0x130(%rbp) jmp 0x4151f movq -0x18(%rbp), %rax movl $0xd0, %edi callq *0x80(%rax) movq -0x10(%rbp), %rcx movq %rax, 0x60(%rcx) cmpq $0x0, %rax jne 0x4161d movl $0x1, -0x12c(%rbp) jmp 0x41675 movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi leaq -0x120(%rbp), %rsi movl $0xd0, %edx callq 0x25220 movq -0x10(%rbp), %rax movzbl 0xb2(%rax), %eax cmpl $0x1, %eax jle 0x41673 movq -0x10(%rbp), %rax movl 0xc(%rax), %edx andl $0x20000, %edx # imm = 0x20000 leaq 0x18b996(%rip), %rcx # 0x1ccff0 leaq 0x18b9ff(%rip), %rax # 0x1cd060 cmpl $0x0, %edx cmovneq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc0(%rax) jmp 0x41675 movq -0x18(%rbp), %rax movq 0x98(%rax), %rax movq -0x30(%rbp), %rdi callq *%rax cmpl $0x0, -0x12c(%rbp) je 0x416b7 movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x416b7 movq -0x18(%rbp), %rax movq 0xa0(%rax), %rcx movq -0x18(%rbp), %rdx xorl %edi, %edi leaq 0x3bc67(%rip), %rsi # 0x7d31a movb $0x0, %al callq *%rcx movl -0x12c(%rbp), %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x160, %rsp # imm = 0x160 popq %rbp retq nopl (%rax)
create_tailoring: push rbp mov rbp, rsp sub rsp, 160h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_128], 0 mov [rbp+var_12C], 0 mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jnz short loc_41383 mov [rbp+var_1], 0 jmp loc_416C0 loc_41383: lea rdi, [rbp+var_50] xor esi, esi mov edx, 38h ; '8' call _memset mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_10] cmp qword ptr [rax+60h], 0 jz short loc_413B7 mov rax, [rbp+var_10] mov rax, [rax+60h] mov [rbp+var_138], rax jmp short loc_413C7 loc_413B7: lea rax, my_uca_v400 mov [rbp+var_138], rax jmp short $+2 loc_413C7: mov rax, [rbp+var_138] mov [rbp+var_48], rax lea rdi, [rbp+var_120] xor esi, esi mov edx, 0D0h call _memset mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_140], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_148], rax mov rax, [rbp+var_10] mov rdi, [rax+38h] call _strlen mov rdx, [rbp+var_148] mov rsi, [rbp+var_140] add rdx, rax lea rdi, [rbp+var_50] call my_coll_rule_parse mov [rbp+var_12C], eax cmp eax, 0 jz short loc_4143A jmp loc_41675 loc_4143A: cmp [rbp+var_50], 208h jnz short loc_41465 lea rax, my_uca_v520 mov [rbp+var_128], rax mov rax, [rbp+var_10] lea rcx, my_unicase_unicode520 mov [rax+78h], rcx jmp loc_414E5 loc_41465: cmp [rbp+var_50], 190h jnz short loc_4148D lea rax, my_uca_v400 mov [rbp+var_128], rax mov rax, [rbp+var_10] lea rcx, my_unicase_default mov [rax+78h], rcx jmp short loc_414E3 loc_4148D: mov rax, [rbp+var_10] cmp qword ptr [rax+60h], 0 jz short loc_414A9 mov rax, [rbp+var_10] mov rax, [rax+60h] mov [rbp+var_150], rax jmp short loc_414B9 loc_414A9: lea rax, my_uca_v400 mov [rbp+var_150], rax jmp short $+2 loc_414B9: mov rax, [rbp+var_150] mov [rbp+var_128], rax mov rax, [rbp+var_10] cmp qword ptr [rax+78h], 0 jnz short loc_414E1 mov rax, [rbp+var_10] lea rcx, my_unicase_default mov [rax+78h], rcx loc_414E1: jmp short $+2 loc_414E3: jmp short $+2 loc_414E5: cmp [rbp+var_4C], 0 jz short loc_414F6 mov eax, [rbp+var_4C] mov [rbp+var_154], eax jmp short loc_41503 loc_414F6: mov eax, 1 mov [rbp+var_154], eax jmp short $+2 loc_41503: mov eax, [rbp+var_154] mov cl, al mov rax, [rbp+var_10] mov [rax+0B2h], cl mov [rbp+var_130], 0 loc_4151F: mov eax, [rbp+var_130] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+0B2h] cmp eax, ecx jz loc_415F4 mov rax, [rbp+var_128] mov ecx, [rbp+var_130] imul rcx, 38h ; '8' add rax, rcx cmp qword ptr [rax], 0 setz al mov cl, al and cl, 1 movzx ecx, cl mov [rbp+var_12C], ecx test al, 1 jnz short loc_41567 jmp short loc_41596 loc_41567: mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rcx, [rax+20h] mov r8d, [rbp+var_130] add r8d, 1 mov esi, 7Fh lea rdx, aSNoLevelDDataF; "%s: no level #%d data for this Unicode "... mov al, 0 call my_snprintf jmp loc_41675 loc_41596: mov rdi, [rbp+var_18] lea rdx, [rbp+var_120] mov eax, [rbp+var_130] imul rax, 38h ; '8' add rdx, rax mov rcx, [rbp+var_128] mov eax, [rbp+var_130] imul rax, 38h ; '8' add rcx, rax lea rsi, [rbp+var_50] call init_weight_level movsx eax, al mov [rbp+var_12C], eax cmp eax, 0 jz short loc_415DE jmp loc_41675 loc_415DE: jmp short $+2 loc_415E0: mov eax, [rbp+var_130] add eax, 1 mov [rbp+var_130], eax jmp loc_4151F loc_415F4: mov rax, [rbp+var_18] mov edi, 0D0h call qword ptr [rax+80h] mov rcx, [rbp+var_10] mov [rcx+60h], rax cmp rax, 0 jnz short loc_4161D mov [rbp+var_12C], 1 jmp short loc_41675 loc_4161D: mov rax, [rbp+var_10] mov rdi, [rax+60h] lea rsi, [rbp+var_120] mov edx, 0D0h call _memcpy mov rax, [rbp+var_10] movzx eax, byte ptr [rax+0B2h] cmp eax, 1 jle short loc_41673 mov rax, [rbp+var_10] mov edx, [rax+0Ch] and edx, 20000h lea rcx, my_uca_collation_handler_multilevel_generic lea rax, my_uca_collation_handler_nopad_multilevel_generic cmp edx, 0 cmovnz rcx, rax mov rax, [rbp+var_10] mov [rax+0C0h], rcx loc_41673: jmp short $+2 loc_41675: mov rax, [rbp+var_18] mov rax, [rax+98h] mov rdi, [rbp+var_30] call rax cmp [rbp+var_12C], 0 jz short loc_416B7 mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_416B7 mov rax, [rbp+var_18] mov rcx, [rax+0A0h] mov rdx, [rbp+var_18] xor edi, edi lea rsi, aAtLineDPosDS+13h; "%s" mov al, 0 call rcx loc_416B7: mov eax, [rbp+var_12C] mov [rbp+var_1], al loc_416C0: mov al, [rbp+var_1] add rsp, 160h pop rbp retn
char create_tailoring(long long a1, const char *a2) { long long v2; // rax int v3; // r9d char inited; // al long long v5; // rax long long ( **v6)(); // rcx char v8; // [rsp+Ch] [rbp-154h] _UNKNOWN **v9; // [rsp+10h] [rbp-150h] long long v10; // [rsp+20h] [rbp-140h] void *v11; // [rsp+28h] [rbp-138h] unsigned int i; // [rsp+30h] [rbp-130h] int v13; // [rsp+34h] [rbp-12Ch] _UNKNOWN **v14; // [rsp+38h] [rbp-128h] _QWORD v15[26]; // [rsp+40h] [rbp-120h] BYREF int v16; // [rsp+110h] [rbp-50h] BYREF int v17; // [rsp+114h] [rbp-4Ch] void *v18; // [rsp+118h] [rbp-48h] long long v19; // [rsp+130h] [rbp-30h] const char *v20; // [rsp+138h] [rbp-28h] const char *v21; // [rsp+148h] [rbp-18h] long long v22; // [rsp+150h] [rbp-10h] v22 = a1; v21 = a2; *a2 = 0; if ( !*(_QWORD *)(v22 + 56) ) return 0; memset(&v16, 0LL, 56LL); v20 = v21; if ( *(_QWORD *)(v22 + 96) ) v11 = *(void **)(v22 + 96); else v11 = &my_uca_v400; v18 = v11; memset(v15, 0LL, sizeof(v15)); v10 = *(_QWORD *)(v22 + 56); v2 = strlen(v10); v13 = my_coll_rule_parse(&v16, v10, v2 + v10); if ( !v13 ) { if ( v16 == 520 ) { v14 = &my_uca_v520; *(_QWORD *)(v22 + 120) = &my_unicase_unicode520; } else if ( v16 == 400 ) { v14 = (_UNKNOWN **)&my_uca_v400; *(_QWORD *)(v22 + 120) = &my_unicase_default; } else { if ( *(_QWORD *)(v22 + 96) ) v9 = *(_UNKNOWN ***)(v22 + 96); else v9 = (_UNKNOWN **)&my_uca_v400; v14 = v9; if ( !*(_QWORD *)(v22 + 120) ) *(_QWORD *)(v22 + 120) = &my_unicase_default; } if ( v17 ) v8 = v17; else v8 = 1; *(_BYTE *)(v22 + 178) = v8; for ( i = 0; i != *(unsigned __int8 *)(v22 + 178); ++i ) { v13 = v14[7 * i] == 0LL; if ( !v14[7 * i] ) { my_snprintf( (_DWORD)v21, 127, (unsigned int)"%s: no level #%d data for this Unicode version.", *(_QWORD *)(v22 + 32), i + 1, v3); goto LABEL_31; } inited = init_weight_level(v21, &v16, &v15[7 * i], &v14[7 * i]); v13 = inited; if ( inited ) goto LABEL_31; } v5 = (*((long long ( **)(long long))v21 + 16))(208LL); *(_QWORD *)(v22 + 96) = v5; if ( v5 ) { memcpy(*(_QWORD *)(v22 + 96), v15, 208LL); if ( *(unsigned __int8 *)(v22 + 178) > 1u ) { v6 = my_uca_collation_handler_multilevel_generic; if ( (*(_DWORD *)(v22 + 12) & 0x20000) != 0 ) v6 = my_uca_collation_handler_nopad_multilevel_generic; *(_QWORD *)(v22 + 192) = v6; } } else { v13 = 1; } } LABEL_31: (*((void ( **)(long long))v21 + 19))(v19); if ( v13 && *v21 ) (*((void (**)(_QWORD, const char *, ...))v21 + 20))(0LL, "%s", v21); return v13; }
create_tailoring: PUSH RBP MOV RBP,RSP SUB RSP,0x160 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x128],0x0 MOV dword ptr [RBP + -0x12c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00141383 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001416c0 LAB_00141383: LEA RDI,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x38 CALL 0x00125180 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001413b7 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x138],RAX JMP 0x001413c7 LAB_001413b7: LEA RAX,[0x2f95c0] MOV qword ptr [RBP + -0x138],RAX JMP 0x001413c7 LAB_001413c7: MOV RAX,qword ptr [RBP + -0x138] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x120] XOR ESI,ESI MOV EDX,0xd0 CALL 0x00125180 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x140],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00125120 MOV RDX,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RBP + -0x140] ADD RDX,RAX LEA RDI,[RBP + -0x50] CALL 0x001416d0 MOV dword ptr [RBP + -0x12c],EAX CMP EAX,0x0 JZ 0x0014143a JMP 0x00141675 LAB_0014143a: CMP dword ptr [RBP + -0x50],0x208 JNZ 0x00141465 LEA RAX,[0x2fe728] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2ca910] MOV qword ptr [RAX + 0x78],RCX JMP 0x001414e5 LAB_00141465: CMP dword ptr [RBP + -0x50],0x190 JNZ 0x0014148d LEA RAX,[0x2f95c0] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2ca8e0] MOV qword ptr [RAX + 0x78],RCX JMP 0x001414e3 LAB_0014148d: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001414a9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x150],RAX JMP 0x001414b9 LAB_001414a9: LEA RAX,[0x2f95c0] MOV qword ptr [RBP + -0x150],RAX JMP 0x001414b9 LAB_001414b9: MOV RAX,qword ptr [RBP + -0x150] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x78],0x0 JNZ 0x001414e1 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2ca8e0] MOV qword ptr [RAX + 0x78],RCX LAB_001414e1: JMP 0x001414e3 LAB_001414e3: JMP 0x001414e5 LAB_001414e5: CMP dword ptr [RBP + -0x4c],0x0 JZ 0x001414f6 MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x154],EAX JMP 0x00141503 LAB_001414f6: MOV EAX,0x1 MOV dword ptr [RBP + -0x154],EAX JMP 0x00141503 LAB_00141503: MOV EAX,dword ptr [RBP + -0x154] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xb2],CL MOV dword ptr [RBP + -0x130],0x0 LAB_0014151f: MOV EAX,dword ptr [RBP + -0x130] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0xb2] CMP EAX,ECX JZ 0x001415f4 MOV RAX,qword ptr [RBP + -0x128] MOV ECX,dword ptr [RBP + -0x130] IMUL RCX,RCX,0x38 ADD RAX,RCX CMP qword ptr [RAX],0x0 SETZ AL MOV CL,AL AND CL,0x1 MOVZX ECX,CL MOV dword ptr [RBP + -0x12c],ECX TEST AL,0x1 JNZ 0x00141567 JMP 0x00141596 LAB_00141567: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] MOV R8D,dword ptr [RBP + -0x130] ADD R8D,0x1 MOV ESI,0x7f LEA RDX,[0x17eda7] MOV AL,0x0 CALL 0x0015d8b0 JMP 0x00141675 LAB_00141596: MOV RDI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x120] MOV EAX,dword ptr [RBP + -0x130] IMUL RAX,RAX,0x38 ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x128] MOV EAX,dword ptr [RBP + -0x130] IMUL RAX,RAX,0x38 ADD RCX,RAX LEA RSI,[RBP + -0x50] CALL 0x001417b0 MOVSX EAX,AL MOV dword ptr [RBP + -0x12c],EAX CMP EAX,0x0 JZ 0x001415de JMP 0x00141675 LAB_001415de: JMP 0x001415e0 LAB_001415e0: MOV EAX,dword ptr [RBP + -0x130] ADD EAX,0x1 MOV dword ptr [RBP + -0x130],EAX JMP 0x0014151f LAB_001415f4: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,0xd0 CALL qword ptr [RAX + 0x80] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x60],RAX CMP RAX,0x0 JNZ 0x0014161d MOV dword ptr [RBP + -0x12c],0x1 JMP 0x00141675 LAB_0014161d: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[RBP + -0x120] MOV EDX,0xd0 CALL 0x00125220 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0xb2] CMP EAX,0x1 JLE 0x00141673 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xc] AND EDX,0x20000 LEA RCX,[0x2ccff0] LEA RAX,[0x2cd060] CMP EDX,0x0 CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc0],RCX LAB_00141673: JMP 0x00141675 LAB_00141675: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x98] MOV RDI,qword ptr [RBP + -0x30] CALL RAX CMP dword ptr [RBP + -0x12c],0x0 JZ 0x001416b7 MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001416b7 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0xa0] MOV RDX,qword ptr [RBP + -0x18] XOR EDI,EDI LEA RSI,[0x17d31a] MOV AL,0x0 CALL RCX LAB_001416b7: MOV EAX,dword ptr [RBP + -0x12c] MOV byte ptr [RBP + -0x1],AL LAB_001416c0: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x160 POP RBP RET
int1 create_tailoring(long param_1,char *param_2) { int8 uVar1; char cVar2; size_t sVar3; long lVar4; int1 *puVar5; int1 local_15c; int1 *local_158; int1 *local_140; uint local_138; uint local_134; int1 *local_130; int1 local_128 [208]; int local_58; int local_54; int1 *local_50; int8 local_38; char *local_30; char *local_20; long local_18; int1 local_9; *param_2 = '\0'; if (*(long *)(param_1 + 0x38) == 0) { local_9 = 0; } else { local_20 = param_2; local_18 = param_1; memset(&local_58,0,0x38); local_30 = local_20; if (*(long *)(local_18 + 0x60) == 0) { local_140 = my_uca_v400; } else { local_140 = *(int1 **)(local_18 + 0x60); } local_50 = local_140; memset(local_128,0,0xd0); uVar1 = *(int8 *)(local_18 + 0x38); lVar4 = *(long *)(local_18 + 0x38); sVar3 = strlen(*(char **)(local_18 + 0x38)); local_134 = my_coll_rule_parse(&local_58,uVar1,lVar4 + sVar3); if (local_134 == 0) { if (local_58 == 0x208) { local_130 = my_uca_v520; *(int1 **)(local_18 + 0x78) = my_unicase_unicode520; } else if (local_58 == 400) { local_130 = my_uca_v400; *(int1 **)(local_18 + 0x78) = my_unicase_default; } else { if (*(long *)(local_18 + 0x60) == 0) { local_158 = my_uca_v400; } else { local_158 = *(int1 **)(local_18 + 0x60); } local_130 = local_158; if (*(long *)(local_18 + 0x78) == 0) { *(int1 **)(local_18 + 0x78) = my_unicase_default; } } if (local_54 == 0) { local_15c = 1; } else { local_15c = (int1)local_54; } *(int1 *)(local_18 + 0xb2) = local_15c; for (local_138 = 0; local_138 != *(byte *)(local_18 + 0xb2); local_138 = local_138 + 1) { local_134 = (uint)(*(long *)(local_130 + (ulong)local_138 * 0x38) == 0); if (*(long *)(local_130 + (ulong)local_138 * 0x38) == 0) { my_snprintf(local_20,0x7f,"%s: no level #%d data for this Unicode version.", *(int8 *)(local_18 + 0x20),local_138 + 1); goto LAB_00141675; } cVar2 = init_weight_level(local_20,&local_58,local_128 + (ulong)local_138 * 0x38, local_130 + (ulong)local_138 * 0x38); local_134 = (uint)cVar2; if (local_134 != 0) goto LAB_00141675; } lVar4 = (**(code **)(local_20 + 0x80))(0xd0); *(long *)(local_18 + 0x60) = lVar4; if (lVar4 == 0) { local_134 = 1; } else { memcpy(*(void **)(local_18 + 0x60),local_128,0xd0); if (1 < *(byte *)(local_18 + 0xb2)) { puVar5 = my_uca_collation_handler_multilevel_generic; if ((*(uint *)(local_18 + 0xc) & 0x20000) != 0) { puVar5 = my_uca_collation_handler_nopad_multilevel_generic; } *(int1 **)(local_18 + 0xc0) = puVar5; } } } LAB_00141675: (**(code **)(local_20 + 0x98))(local_38); if ((local_134 != 0) && (*local_20 != '\0')) { (**(code **)(local_20 + 0xa0))(0,"%s",local_20); } local_9 = (int1)local_134; } return local_9; }
51,590
plutovg_text_iterator_init
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c
void plutovg_text_iterator_init(plutovg_text_iterator_t* it, const void* text, int length, plutovg_text_encoding_t encoding) { if(length == -1) length = plutovg_text_iterator_length(text, encoding); it->text = text; it->length = length; it->encoding = encoding; it->index = 0; }
O0
c
plutovg_text_iterator_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) cmpl $-0x1, -0x14(%rbp) jne 0x5aeb movq -0x10(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x5b20 movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movl -0x14(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movl -0x18(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x10(%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
plutovg_text_iterator_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx cmp [rbp+var_14], 0FFFFFFFFh jnz short loc_5AEB mov rdi, [rbp+var_10] mov esi, [rbp+var_18] call plutovg_text_iterator_length mov [rbp+var_14], eax loc_5AEB: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx mov ecx, [rbp+var_14] mov rax, [rbp+var_8] mov [rax+8], ecx mov ecx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+0Ch], ecx mov rax, [rbp+var_8] mov dword ptr [rax+10h], 0 add rsp, 20h pop rbp retn
long long plutovg_text_iterator_init(long long a1, long long a2, int a3, unsigned int a4) { long long result; // rax int v6; // [rsp+Ch] [rbp-14h] v6 = a3; if ( a3 == -1 ) v6 = plutovg_text_iterator_length(a2, a4); *(_QWORD *)a1 = a2; *(_DWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 12) = a4; result = a1; *(_DWORD *)(a1 + 16) = 0; return result; }
plutovg_text_iterator_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX CMP dword ptr [RBP + -0x14],-0x1 JNZ 0x00105aeb MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x18] CALL 0x00105b20 MOV dword ptr [RBP + -0x14],EAX LAB_00105aeb: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],0x0 ADD RSP,0x20 POP RBP RET
void plutovg_text_iterator_init (int8 *param_1,int8 param_2,int param_3,int4 param_4) { int local_1c; local_1c = param_3; if (param_3 == -1) { local_1c = plutovg_text_iterator_length(param_2,param_4); } *param_1 = param_2; *(int *)(param_1 + 1) = local_1c; *(int4 *)((long)param_1 + 0xc) = param_4; *(int4 *)(param_1 + 2) = 0; return; }
51,591
test_vector_add
tsotchke[P]eshkol/tests/unit/test_vector.c
static void test_vector_add(void) { printf("Testing vector addition...\n"); // Create an arena Arena* arena = arena_create(1024); assert(arena != NULL); // Create vectors VectorF* a = vector_f_create(arena, 3); assert(a != NULL); VectorF* b = vector_f_create(arena, 3); assert(b != NULL); // Set vectors float a_data[3] = {1.0f, 2.0f, 3.0f}; assert(vector_f_set(a, a_data, 3)); float b_data[3] = {4.0f, 5.0f, 6.0f}; assert(vector_f_set(b, b_data, 3)); // Add vectors VectorF* c = vector_f_add(arena, a, b); assert(c != NULL); assert(c->dim == 3); assert(c->data[0] == 5.0f && c->data[1] == 7.0f && c->data[2] == 9.0f); // Destroy the arena arena_destroy(arena); printf("PASS: vector_add\n"); }
O0
c
test_vector_add: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp leaq 0x8b73(%rip), %rdi # 0xa472 movb $0x0, %al callq 0x1080 movl $0x400, %edi # imm = 0x400 callq 0x42a0 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x191d jmp 0x193c leaq 0x88b1(%rip), %rdi # 0xa1d5 leaq 0x8806(%rip), %rsi # 0xa131 movl $0x5d, %edx leaq 0x8b57(%rip), %rcx # 0xa48e callq 0x1090 movq -0x8(%rbp), %rdi movl $0x3, %esi callq 0x49a0 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1957 jmp 0x1976 leaq 0x887b(%rip), %rdi # 0xa1d9 leaq 0x87cc(%rip), %rsi # 0xa131 movl $0x61, %edx leaq 0x8b1d(%rip), %rcx # 0xa48e callq 0x1090 movq -0x8(%rbp), %rdi movl $0x3, %esi callq 0x49a0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1991 jmp 0x19b0 leaq 0x8b11(%rip), %rdi # 0xa4a9 leaq 0x8792(%rip), %rsi # 0xa131 movl $0x64, %edx leaq 0x8ae3(%rip), %rcx # 0xa48e callq 0x1090 movq 0x99f5(%rip), %rax # 0xb3ac movq %rax, -0x24(%rbp) movl 0x99f3(%rip), %eax # 0xb3b4 movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rdi leaq -0x24(%rbp), %rsi movl $0x3, %edx callq 0x4d80 testb $0x1, %al jne 0x19dc jmp 0x19de jmp 0x19fd leaq 0x8ace(%rip), %rdi # 0xa4b3 leaq 0x8745(%rip), %rsi # 0xa131 movl $0x68, %edx leaq 0x8a96(%rip), %rcx # 0xa48e callq 0x1090 movq 0x99b4(%rip), %rax # 0xb3b8 movq %rax, -0x30(%rbp) movl 0x99b2(%rip), %eax # 0xb3c0 movl %eax, -0x28(%rbp) movq -0x18(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0x3, %edx callq 0x4d80 testb $0x1, %al jne 0x1a29 jmp 0x1a2b jmp 0x1a4a leaq 0x8a9c(%rip), %rdi # 0xa4ce leaq 0x86f8(%rip), %rsi # 0xa131 movl $0x6b, %edx leaq 0x8a49(%rip), %rcx # 0xa48e callq 0x1090 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x5020 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0x1a68 jmp 0x1a87 leaq 0x9e0a(%rip), %rdi # 0xb879 leaq 0x86bb(%rip), %rsi # 0xa131 movl $0x6f, %edx leaq 0x8a0c(%rip), %rcx # 0xa48e callq 0x1090 movq -0x38(%rbp), %rax cmpq $0x3, 0x10(%rax) jne 0x1a94 jmp 0x1ab3 leaq 0x8a4e(%rip), %rdi # 0xa4e9 leaq 0x868f(%rip), %rsi # 0xa131 movl $0x70, %edx leaq 0x89e0(%rip), %rcx # 0xa48e callq 0x1090 movq -0x38(%rbp), %rax movss (%rax), %xmm0 movss 0x854d(%rip), %xmm1 # 0xa010 ucomiss %xmm1, %xmm0 jne 0x1afc jp 0x1afc movq -0x38(%rbp), %rax movss 0x4(%rax), %xmm0 movss 0x8539(%rip), %xmm1 # 0xa014 ucomiss %xmm1, %xmm0 jne 0x1afc jp 0x1afc movq -0x38(%rbp), %rax movss 0x8(%rax), %xmm0 movss 0x8525(%rip), %xmm1 # 0xa018 ucomiss %xmm1, %xmm0 jne 0x1afc jp 0x1afc jmp 0x1b1b leaq 0x89f2(%rip), %rdi # 0xa4f5 leaq 0x8627(%rip), %rsi # 0xa131 movl $0x71, %edx leaq 0x8978(%rip), %rcx # 0xa48e callq 0x1090 movq -0x8(%rbp), %rdi callq 0x4880 leaq 0x8a09(%rip), %rdi # 0xa534 movb $0x0, %al callq 0x1080 addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
test_vector_add: push rbp mov rbp, rsp sub rsp, 40h lea rdi, aTestingVectorA; "Testing vector addition...\n" mov al, 0 call _printf mov edi, 400h call arena_create mov [rbp+var_8], rax cmp [rbp+var_8], 0 jz short loc_191D jmp short loc_193C loc_191D: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 5Dh ; ']' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_193C: mov rdi, [rbp+var_8] mov esi, 3 call vector_f_create mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_1957 jmp short loc_1976 loc_1957: lea rdi, aArenaNull+4; "a != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 61h ; 'a' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_1976: mov rdi, [rbp+var_8] mov esi, 3 call vector_f_create mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_1991 jmp short loc_19B0 loc_1991: lea rdi, aBNull; "b != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 64h ; 'd' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_19B0: mov rax, cs:qword_B3AC mov [rbp+var_24], rax mov eax, cs:dword_B3B4 mov [rbp+var_1C], eax mov rdi, [rbp+var_10] lea rsi, [rbp+var_24] mov edx, 3 call vector_f_set test al, 1 jnz short loc_19DC jmp short loc_19DE loc_19DC: jmp short loc_19FD loc_19DE: lea rdi, aVectorFSetAADa; "vector_f_set(a, a_data, 3)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 68h ; 'h' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_19FD: mov rax, cs:qword_B3B8 mov [rbp+var_30], rax mov eax, cs:dword_B3C0 mov [rbp+var_28], eax mov rdi, [rbp+var_18] lea rsi, [rbp+var_30] mov edx, 3 call vector_f_set test al, 1 jnz short loc_1A29 jmp short loc_1A2B loc_1A29: jmp short loc_1A4A loc_1A2B: lea rdi, aVectorFSetBBDa; "vector_f_set(b, b_data, 3)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 6Bh ; 'k' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_1A4A: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call vector_f_add mov [rbp+var_38], rax cmp [rbp+var_38], 0 jz short loc_1A68 jmp short loc_1A87 loc_1A68: lea rdi, aVecNull+2; "c != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 6Fh ; 'o' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_1A87: mov rax, [rbp+var_38] cmp qword ptr [rax+10h], 3 jnz short loc_1A94 jmp short loc_1AB3 loc_1A94: lea rdi, aCDim3; "c->dim == 3" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 70h ; 'p' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_1AB3: mov rax, [rbp+var_38] movss xmm0, dword ptr [rax] movss xmm1, cs:dword_A010 ucomiss xmm0, xmm1 jnz short loc_1AFC jp short loc_1AFC mov rax, [rbp+var_38] movss xmm0, dword ptr [rax+4] movss xmm1, cs:dword_A014 ucomiss xmm0, xmm1 jnz short loc_1AFC jp short loc_1AFC mov rax, [rbp+var_38] movss xmm0, dword ptr [rax+8] movss xmm1, cs:dword_A018 ucomiss xmm0, xmm1 jnz short loc_1AFC jp short loc_1AFC jmp short loc_1B1B loc_1AFC: lea rdi, aCData050fCData; "c->data[0] == 5.0f && c->data[1] == 7.0"... lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 71h ; 'q' lea rcx, aVoidTestVector_1; "void test_vector_add(void)" call ___assert_fail loc_1B1B: mov rdi, [rbp+var_8] call arena_destroy lea rdi, aPassVectorAdd; "PASS: vector_add\n" mov al, 0 call _printf add rsp, 40h pop rbp retn
long long test_vector_add(long long a1, long long a2, long long a3) { char v3; // al long long v4; // rsi long long v5; // rax long long v6; // rdx long long v8; // [rsp+10h] [rbp-30h] BYREF int v9; // [rsp+18h] [rbp-28h] long long v10; // [rsp+1Ch] [rbp-24h] BYREF int v11; // [rsp+24h] [rbp-1Ch] long long v12; // [rsp+28h] [rbp-18h] long long v13; // [rsp+30h] [rbp-10h] long long v14; // [rsp+38h] [rbp-8h] printf("Testing vector addition...\n", a2, a3); v14 = arena_create(1024LL); if ( !v14 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 93LL, "void test_vector_add(void)"); v13 = vector_f_create(v14, 3LL); if ( !v13 ) __assert_fail( "a != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 97LL, "void test_vector_add(void)"); v12 = vector_f_create(v14, 3LL); if ( !v12 ) __assert_fail( "b != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 100LL, "void test_vector_add(void)"); v10 = 0x400000003F800000LL; v11 = 1077936128; if ( (vector_f_set(v13, &v10, 3LL) & 1) == 0 ) __assert_fail( "vector_f_set(a, a_data, 3)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 104LL, "void test_vector_add(void)"); v8 = 0x40A0000040800000LL; v9 = 1086324736; v3 = vector_f_set(v12, &v8, 3LL); if ( (v3 & 1) == 0 ) __assert_fail( "vector_f_set(b, b_data, 3)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 107LL, "void test_vector_add(void)"); v4 = v13; v5 = vector_f_add(v14, v13, v12); if ( !v5 ) __assert_fail( "c != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 111LL, "void test_vector_add(void)"); if ( *(_QWORD *)(v5 + 16) != 3LL ) __assert_fail( "c->dim == 3", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 112LL, "void test_vector_add(void)"); if ( *(float *)v5 != 5.0 || *(float *)(v5 + 4) != 7.0 || *(float *)(v5 + 8) != 9.0 ) __assert_fail( "c->data[0] == 5.0f && c->data[1] == 7.0f && c->data[2] == 9.0f", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_vector.c", 113LL, "void test_vector_add(void)"); arena_destroy(v14); return printf("PASS: vector_add\n", v4, v6); }
test_vector_add: PUSH RBP MOV RBP,RSP SUB RSP,0x40 LEA RDI,[0x10a460] MOV AL,0x0 CALL 0x00101080 MOV EDI,0x400 CALL 0x001042a0 MOV qword ptr [RBP + -0x8],RAX CMP qword ptr [RBP + -0x8],0x0 JZ 0x0010191d JMP 0x0010193c LAB_0010191d: LEA RDI,[0x10a1c3] LEA RSI,[0x10a131] MOV EDX,0x5d LEA RCX,[0x10a47c] CALL 0x00101090 LAB_0010193c: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x3 CALL 0x001049a0 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00101957 JMP 0x00101976 LAB_00101957: LEA RDI,[0x10a1c7] LEA RSI,[0x10a131] MOV EDX,0x61 LEA RCX,[0x10a47c] CALL 0x00101090 LAB_00101976: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x3 CALL 0x001049a0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00101991 JMP 0x001019b0 LAB_00101991: LEA RDI,[0x10a497] LEA RSI,[0x10a131] MOV EDX,0x64 LEA RCX,[0x10a47c] CALL 0x00101090 LAB_001019b0: MOV RAX,qword ptr [0x0010b38c] MOV qword ptr [RBP + -0x24],RAX MOV EAX,dword ptr [0x0010b394] MOV dword ptr [RBP + -0x1c],EAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x24] MOV EDX,0x3 CALL 0x00104d80 TEST AL,0x1 JNZ 0x001019dc JMP 0x001019de LAB_001019dc: JMP 0x001019fd LAB_001019de: LEA RDI,[0x10a4a1] LEA RSI,[0x10a131] MOV EDX,0x68 LEA RCX,[0x10a47c] CALL 0x00101090 LAB_001019fd: MOV RAX,qword ptr [0x0010b398] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [0x0010b3a0] MOV dword ptr [RBP + -0x28],EAX MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x30] MOV EDX,0x3 CALL 0x00104d80 TEST AL,0x1 JNZ 0x00101a29 JMP 0x00101a2b LAB_00101a29: JMP 0x00101a4a LAB_00101a2b: LEA RDI,[0x10a4bc] LEA RSI,[0x10a131] MOV EDX,0x6b LEA RCX,[0x10a47c] CALL 0x00101090 LAB_00101a4a: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00105020 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x00101a68 JMP 0x00101a87 LAB_00101a68: LEA RDI,[0x10b833] LEA RSI,[0x10a131] MOV EDX,0x6f LEA RCX,[0x10a47c] CALL 0x00101090 LAB_00101a87: MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + 0x10],0x3 JNZ 0x00101a94 JMP 0x00101ab3 LAB_00101a94: LEA RDI,[0x10a4d7] LEA RSI,[0x10a131] MOV EDX,0x70 LEA RCX,[0x10a47c] CALL 0x00101090 LAB_00101ab3: MOV RAX,qword ptr [RBP + -0x38] MOVSS XMM0,dword ptr [RAX] MOVSS XMM1,dword ptr [0x0010a010] UCOMISS XMM0,XMM1 JNZ 0x00101afc JP 0x00101afc MOV RAX,qword ptr [RBP + -0x38] MOVSS XMM0,dword ptr [RAX + 0x4] MOVSS XMM1,dword ptr [0x0010a014] UCOMISS XMM0,XMM1 JNZ 0x00101afc JP 0x00101afc MOV RAX,qword ptr [RBP + -0x38] MOVSS XMM0,dword ptr [RAX + 0x8] MOVSS XMM1,dword ptr [0x0010a018] UCOMISS XMM0,XMM1 JNZ 0x00101afc JP 0x00101afc JMP 0x00101b1b LAB_00101afc: LEA RDI,[0x10a4e3] LEA RSI,[0x10a131] MOV EDX,0x71 LEA RCX,[0x10a47c] CALL 0x00101090 LAB_00101b1b: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00104880 LEA RDI,[0x10a522] MOV AL,0x0 CALL 0x00101080 ADD RSP,0x40 POP RBP RET
void test_vector_add(void) { ulong uVar1; float *pfVar2; int8 local_38; int4 local_30; int8 local_2c; int4 local_24; long local_20; long local_18; long local_10; printf("Testing vector addition...\n"); local_10 = arena_create(0x400); if (local_10 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c" ,0x5d,"void test_vector_add(void)"); } local_18 = vector_f_create(local_10,3); if (local_18 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("a != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c", 0x61,"void test_vector_add(void)"); } local_20 = vector_f_create(local_10,3); if (local_20 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("b != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",100 ,"void test_vector_add(void)"); } local_2c = DAT_0010b38c; local_24 = DAT_0010b394; uVar1 = vector_f_set(local_18,&local_2c,3); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("vector_f_set(a, a_data, 3)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x68, "void test_vector_add(void)"); } local_38 = DAT_0010b398; local_30 = DAT_0010b3a0; uVar1 = vector_f_set(local_20,&local_38,3); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("vector_f_set(b, b_data, 3)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x6b, "void test_vector_add(void)"); } pfVar2 = (float *)vector_f_add(local_10,local_18,local_20); if (pfVar2 != (float *)0x0) { if (*(long *)(pfVar2 + 4) != 3) { /* WARNING: Subroutine does not return */ __assert_fail("c->dim == 3","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c" ,0x70,"void test_vector_add(void)"); } if ((((*pfVar2 == DAT_0010a010) && (!NAN(*pfVar2) && !NAN(DAT_0010a010))) && (pfVar2[1] == DAT_0010a014)) && (!NAN(pfVar2[1]) && !NAN(DAT_0010a014))) { if ((pfVar2[2] == DAT_0010a018) && (!NAN(pfVar2[2]) && !NAN(DAT_0010a018))) { arena_destroy(local_10); printf("PASS: vector_add\n"); return; } } /* WARNING: Subroutine does not return */ __assert_fail("c->data[0] == 5.0f && c->data[1] == 7.0f && c->data[2] == 9.0f", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x71, "void test_vector_add(void)"); } /* WARNING: Subroutine does not return */ __assert_fail("c != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_vector.c",0x6f, "void test_vector_add(void)"); }
51,592
my_uca_coll_init_utf8mb3
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb3, &my_uca_package_no_contractions_utf8mb3); return FALSE; }
O0
c
my_uca_coll_init_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x499a0 cmpb $0x0, %al je 0x4ae37 movb $0x1, -0x1(%rbp) jmp 0x4ae5f movq -0x10(%rbp), %rdi callq 0x55990 cmpb $0x0, %al je 0x4ae5b movq -0x10(%rbp), %rdi leaq 0x275911(%rip), %rsi # 0x2c0760 leaq 0x27592a(%rip), %rdx # 0x2c0780 callq 0x559f0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_coll_init_utf8mb3: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_coll_init_uca cmp al, 0 jz short loc_4AE37 mov [rbp+var_1], 1 jmp short loc_4AE5F loc_4AE37: mov rdi, [rbp+var_10] call my_uca_collation_can_optimize_no_contractions cmp al, 0 jz short loc_4AE5B mov rdi, [rbp+var_10] lea rsi, my_uca_package_utf8mb3 lea rdx, my_uca_package_no_contractions_utf8mb3 call my_uca_handler_map loc_4AE5B: mov [rbp+var_1], 0 loc_4AE5F: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_uca_coll_init_utf8mb3(long long a1, long long a2) { if ( (unsigned __int8)my_coll_init_uca(a1, a2) ) return 1; if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) ) my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3); return 0; }
my_uca_coll_init_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001499a0 CMP AL,0x0 JZ 0x0014ae37 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014ae5f LAB_0014ae37: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00155990 CMP AL,0x0 JZ 0x0014ae5b MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x3c0760] LEA RDX,[0x3c0780] CALL 0x001559f0 LAB_0014ae5b: MOV byte ptr [RBP + -0x1],0x0 LAB_0014ae5f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2) { char cVar1; int1 local_9; cVar1 = my_coll_init_uca(param_1,param_2); if (cVar1 == '\0') { cVar1 = my_uca_collation_can_optimize_no_contractions(param_1); if (cVar1 != '\0') { my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3); } local_9 = 0; } else { local_9 = 1; } return local_9; }
51,593
sqr_fp6
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/fp12_tower.c
static void sqr_fp6(vec384fp6 ret, const vec384fp6 a) { vec768x s0, m01, m12, s2, rx; sqr_fp2x2(s0, a[0]); mul_fp2x2(m01, a[0], a[1]); add_fp2x2(m01, m01, m01); mul_fp2x2(m12, a[1], a[2]); add_fp2x2(m12, m12, m12); sqr_fp2x2(s2, a[2]); /* ret[2] = (a0 + a1 + a2)^2 - a0^2 - a2^2 - 2*(a0*a1) - 2*(a1*a2) = a1^2 + 2*(a0*a2) */ add_fp2(ret[2], a[2], a[1]); add_fp2(ret[2], ret[2], a[0]); sqr_fp2x2(rx, ret[2]); sub_fp2x2(rx, rx, s0); sub_fp2x2(rx, rx, s2); sub_fp2x2(rx, rx, m01); sub_fp2x2(rx, rx, m12); redc_fp2x2(ret[2], rx); /* ret[0] = a0^2 + 2*(a1*a2)*(u+1) */ mul_by_u_plus_1_fp2x2(rx, m12); add_fp2x2(rx, rx, s0); redc_fp2x2(ret[0], rx); /* ret[1] = a2^2*(u+1) + 2*(a0*a1) */ mul_by_u_plus_1_fp2x2(rx, s2); add_fp2x2(rx, rx, m01); redc_fp2x2(ret[1], rx); }
O1
c
sqr_fp6: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x3c8, %rsp # imm = 0x3C8 movq %rsi, %r12 movq %rdi, -0x30(%rbp) leaq 0x1791d(%rip), %rbx # 0x3fb20 leaq -0x330(%rbp), %rdi movq %rbx, %rdx callq 0x33ce0 leaq 0x60(%r12), %r13 leaq -0x1b0(%rbp), %r14 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx movq %rbx, %rcx callq 0x33b60 movq %r14, %rdi movq %r14, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x30720 leaq -0x150(%rbp), %rdi movq %rdi, %rsi movq %rdi, %rdx movq %rbx, %rcx callq 0x30720 movl $0xc0, %r15d leaq (%r12,%r15), %r14 leaq -0xf0(%rbp), %rdi movq %r13, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x33b60 leaq -0xf0(%rbp), %rdi movq %rdi, %rsi movq %rdi, %rdx movq %rbx, %rcx callq 0x30720 leaq -0x90(%rbp), %rdi movq %rdi, %rsi movq %rdi, %rdx movq %rbx, %rcx callq 0x30720 leaq -0x270(%rbp), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x33ce0 addq -0x30(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi movq %r13, %rdx movq %rbx, %rcx callq 0x2f460 movq %r15, %rdi movq %r15, %rsi movq %r12, %rdx movq %rbx, %rcx callq 0x2f460 leaq -0x3f0(%rbp), %r12 movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x33ce0 movq %r12, %rdi movq %r12, %rsi leaq -0x330(%rbp), %rdx movq %rbx, %rcx callq 0x30840 leaq -0x390(%rbp), %r13 leaq -0x2d0(%rbp), %rdx movq %r13, %rdi movq %r13, %rsi movq %rbx, %rcx callq 0x30840 movq %r12, %rdi movq %r12, %rsi leaq -0x270(%rbp), %rdx movq %rbx, %rcx callq 0x30840 leaq -0x210(%rbp), %rdx movq %r13, %rdi movq %r13, %rsi movq %rbx, %rcx callq 0x30840 movq %r12, %rdi movq %r12, %rsi leaq -0x1b0(%rbp), %rdx movq %rbx, %rcx callq 0x30840 movq %r13, %rdi movq %r13, %rsi leaq -0x150(%rbp), %rdx movq %rbx, %rcx callq 0x30840 movq %r12, %rdi movq %r12, %rsi leaq -0xf0(%rbp), %rdx movq %rbx, %rcx callq 0x30840 movq %r13, %rdi movq %r13, %rsi leaq -0x90(%rbp), %rdx movq %rbx, %rcx callq 0x30840 movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD movq %r15, %rdi movq %r12, %rsi movq %rbx, %rdx movq %rcx, %r15 callq 0x344e0 movq -0x30(%rbp), %r14 leaq 0xf0(%r14), %rdi movq %r13, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x344e0 movq %r12, %rdi leaq -0xf0(%rbp), %r15 movq %r15, %rsi leaq -0x90(%rbp), %rdx movq %rbx, %rcx callq 0x30840 movq %r13, %rdi movq %r15, %rsi leaq -0x90(%rbp), %rdx movq %rbx, %rcx callq 0x30720 movq %r12, %rdi movq %r12, %rsi leaq -0x330(%rbp), %rdx movq %rbx, %rcx callq 0x30720 movq %r13, %rdi movq %r13, %rsi leaq -0x2d0(%rbp), %rdx movq %rbx, %rcx callq 0x30720 movq %r14, %rdi movq %r12, %rsi movq %rbx, %rdx movabsq $-0x760c000300030003, %r15 # imm = 0x89F3FFFCFFFCFFFD movq %r15, %rcx callq 0x344e0 leaq 0x30(%r14), %rdi movq %r13, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x344e0 movq %r12, %rdi leaq -0x270(%rbp), %r15 movq %r15, %rsi leaq -0x210(%rbp), %r14 movq %r14, %rdx movq %rbx, %rcx callq 0x30840 movq %r13, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x30720 movq %r12, %rdi movq %r12, %rsi leaq -0x1b0(%rbp), %rdx movq %rbx, %rcx callq 0x30720 movq %r13, %rdi movq %r13, %rsi leaq -0x150(%rbp), %rdx movq %rbx, %rcx callq 0x30720 movq -0x30(%rbp), %r15 leaq 0x60(%r15), %rdi movq %r12, %rsi movq %rbx, %rdx movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD movq %r14, %rcx callq 0x344e0 movq %r15, %rdi addq $0x90, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x344e0 addq $0x3c8, %rsp # imm = 0x3C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
sqr_fp6: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 3C8h mov r12, rsi mov [rbp+var_30], rdi lea rbx, BLS12_381_P lea rdi, [rbp+var_330] mov rdx, rbx call sqr_382x lea r13, [r12+60h] lea r14, [rbp+var_1B0] mov rdi, r14 mov rsi, r12 mov rdx, r13 mov rcx, rbx call mul_382x mov rdi, r14 mov rsi, r14 mov rdx, r14 mov rcx, rbx call add_mod_384x384 lea rdi, [rbp+var_150] mov rsi, rdi mov rdx, rdi mov rcx, rbx call add_mod_384x384 mov r15d, 0C0h lea r14, [r12+r15] lea rdi, [rbp+var_F0] mov rsi, r13 mov rdx, r14 mov rcx, rbx call mul_382x lea rdi, [rbp+var_F0] mov rsi, rdi mov rdx, rdi mov rcx, rbx call add_mod_384x384 lea rdi, [rbp+var_90] mov rsi, rdi mov rdx, rdi mov rcx, rbx call add_mod_384x384 lea rdi, [rbp+var_270] mov rsi, r14 mov rdx, rbx call sqr_382x add r15, [rbp+var_30] mov rdi, r15 mov rsi, r14 mov rdx, r13 mov rcx, rbx call add_mod_384x mov rdi, r15 mov rsi, r15 mov rdx, r12 mov rcx, rbx call add_mod_384x lea r12, [rbp+var_3F0] mov rdi, r12 mov rsi, r15 mov rdx, rbx call sqr_382x mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_330] mov rcx, rbx call _sub_mod_384x384 lea r13, [rbp+var_390] lea rdx, [rbp+var_2D0] mov rdi, r13 mov rsi, r13 mov rcx, rbx call _sub_mod_384x384 mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_270] mov rcx, rbx call _sub_mod_384x384 lea rdx, [rbp+var_210] mov rdi, r13 mov rsi, r13 mov rcx, rbx call _sub_mod_384x384 mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_1B0] mov rcx, rbx call _sub_mod_384x384 mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_150] mov rcx, rbx call _sub_mod_384x384 mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_F0] mov rcx, rbx call _sub_mod_384x384 mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_90] mov rcx, rbx call _sub_mod_384x384 mov rcx, 89F3FFFCFFFCFFFDh mov rdi, r15 mov rsi, r12 mov rdx, rbx mov r15, rcx call redc_mont_384 mov r14, [rbp+var_30] lea rdi, [r14+0F0h] mov rsi, r13 mov rdx, rbx mov rcx, r15 call redc_mont_384 mov rdi, r12 lea r15, [rbp+var_F0] mov rsi, r15 lea rdx, [rbp+var_90] mov rcx, rbx call _sub_mod_384x384 mov rdi, r13 mov rsi, r15 lea rdx, [rbp+var_90] mov rcx, rbx call add_mod_384x384 mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_330] mov rcx, rbx call add_mod_384x384 mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_2D0] mov rcx, rbx call add_mod_384x384 mov rdi, r14 mov rsi, r12 mov rdx, rbx mov r15, 89F3FFFCFFFCFFFDh mov rcx, r15 call redc_mont_384 lea rdi, [r14+30h] mov rsi, r13 mov rdx, rbx mov rcx, r15 call redc_mont_384 mov rdi, r12 lea r15, [rbp+var_270] mov rsi, r15 lea r14, [rbp+var_210] mov rdx, r14 mov rcx, rbx call _sub_mod_384x384 mov rdi, r13 mov rsi, r15 mov rdx, r14 mov rcx, rbx call add_mod_384x384 mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_1B0] mov rcx, rbx call add_mod_384x384 mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_150] mov rcx, rbx call add_mod_384x384 mov r15, [rbp+var_30] lea rdi, [r15+60h] mov rsi, r12 mov rdx, rbx mov r14, 89F3FFFCFFFCFFFDh mov rcx, r14 call redc_mont_384 mov rdi, r15 add rdi, 90h mov rsi, r13 mov rdx, rbx mov rcx, r14 call redc_mont_384 add rsp, 3C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long sqr_fp6(long long a1, long long a2) { long long v3; // r15 long long v4; // r14 long long v5; // r15 _BYTE v7[96]; // [rsp+0h] [rbp-3F0h] BYREF _BYTE v8[96]; // [rsp+60h] [rbp-390h] BYREF _BYTE v9[96]; // [rsp+C0h] [rbp-330h] BYREF _BYTE v10[96]; // [rsp+120h] [rbp-2D0h] BYREF _BYTE v11[96]; // [rsp+180h] [rbp-270h] BYREF _BYTE v12[96]; // [rsp+1E0h] [rbp-210h] BYREF _BYTE v13[96]; // [rsp+240h] [rbp-1B0h] BYREF _BYTE v14[96]; // [rsp+2A0h] [rbp-150h] BYREF _BYTE v15[96]; // [rsp+300h] [rbp-F0h] BYREF _BYTE v16[96]; // [rsp+360h] [rbp-90h] BYREF long long v17; // [rsp+3C0h] [rbp-30h] v17 = a1; sqr_382x(v9, a2, &BLS12_381_P); mul_382x(v13, a2, a2 + 96, &BLS12_381_P); add_mod_384x384(v13, v13, v13, &BLS12_381_P); add_mod_384x384(v14, v14, v14, &BLS12_381_P); mul_382x(v15, a2 + 96, a2 + 192, &BLS12_381_P); add_mod_384x384(v15, v15, v15, &BLS12_381_P); add_mod_384x384(v16, v16, v16, &BLS12_381_P); sqr_382x(v11, a2 + 192, &BLS12_381_P); v3 = v17 + 192; add_mod_384x(v17 + 192, a2 + 192, a2 + 96, &BLS12_381_P); add_mod_384x(v3, v3, a2, &BLS12_381_P); sqr_382x(v7, v3, &BLS12_381_P); sub_mod_384x384(v7, v7, v9, &BLS12_381_P); sub_mod_384x384(v8, v8, v10, &BLS12_381_P); sub_mod_384x384(v7, v7, v11, &BLS12_381_P); sub_mod_384x384(v8, v8, v12, &BLS12_381_P); sub_mod_384x384(v7, v7, v13, &BLS12_381_P); sub_mod_384x384(v8, v8, v14, &BLS12_381_P); sub_mod_384x384(v7, v7, v15, &BLS12_381_P); sub_mod_384x384(v8, v8, v16, &BLS12_381_P); redc_mont_384(v3, v7, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v4 = v17; redc_mont_384(v17 + 240, v8, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sub_mod_384x384(v7, v15, v16, &BLS12_381_P); add_mod_384x384(v8, v15, v16, &BLS12_381_P); add_mod_384x384(v7, v7, v9, &BLS12_381_P); add_mod_384x384(v8, v8, v10, &BLS12_381_P); redc_mont_384(v4, v7, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); redc_mont_384(v4 + 48, v8, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sub_mod_384x384(v7, v11, v12, &BLS12_381_P); add_mod_384x384(v8, v11, v12, &BLS12_381_P); add_mod_384x384(v7, v7, v13, &BLS12_381_P); add_mod_384x384(v8, v8, v14, &BLS12_381_P); v5 = v17; redc_mont_384(v17 + 96, v7, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); return redc_mont_384(v5 + 144, v8, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); }
sqr_fp6: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x3c8 MOV R12,RSI MOV qword ptr [RBP + -0x30],RDI LEA RBX,[0x13fb20] LEA RDI,[RBP + -0x330] MOV RDX,RBX CALL 0x00133ce0 LEA R13,[R12 + 0x60] LEA R14,[RBP + -0x1b0] MOV RDI,R14 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBX CALL 0x00133b60 MOV RDI,R14 MOV RSI,R14 MOV RDX,R14 MOV RCX,RBX CALL 0x00130720 LEA RDI,[RBP + -0x150] MOV RSI,RDI MOV RDX,RDI MOV RCX,RBX CALL 0x00130720 MOV R15D,0xc0 LEA R14,[R12 + R15*0x1] LEA RDI,[RBP + -0xf0] MOV RSI,R13 MOV RDX,R14 MOV RCX,RBX CALL 0x00133b60 LEA RDI,[RBP + -0xf0] MOV RSI,RDI MOV RDX,RDI MOV RCX,RBX CALL 0x00130720 LEA RDI,[RBP + -0x90] MOV RSI,RDI MOV RDX,RDI MOV RCX,RBX CALL 0x00130720 LEA RDI,[RBP + -0x270] MOV RSI,R14 MOV RDX,RBX CALL 0x00133ce0 ADD R15,qword ptr [RBP + -0x30] MOV RDI,R15 MOV RSI,R14 MOV RDX,R13 MOV RCX,RBX CALL 0x0012f460 MOV RDI,R15 MOV RSI,R15 MOV RDX,R12 MOV RCX,RBX CALL 0x0012f460 LEA R12,[RBP + -0x3f0] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL 0x00133ce0 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0x330] MOV RCX,RBX CALL 0x00130840 LEA R13,[RBP + -0x390] LEA RDX,[RBP + -0x2d0] MOV RDI,R13 MOV RSI,R13 MOV RCX,RBX CALL 0x00130840 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0x270] MOV RCX,RBX CALL 0x00130840 LEA RDX,[RBP + -0x210] MOV RDI,R13 MOV RSI,R13 MOV RCX,RBX CALL 0x00130840 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0x1b0] MOV RCX,RBX CALL 0x00130840 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0x150] MOV RCX,RBX CALL 0x00130840 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0xf0] MOV RCX,RBX CALL 0x00130840 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0x90] MOV RCX,RBX CALL 0x00130840 MOV RCX,-0x760c000300030003 MOV RDI,R15 MOV RSI,R12 MOV RDX,RBX MOV R15,RCX CALL 0x001344e0 MOV R14,qword ptr [RBP + -0x30] LEA RDI,[R14 + 0xf0] MOV RSI,R13 MOV RDX,RBX MOV RCX,R15 CALL 0x001344e0 MOV RDI,R12 LEA R15,[RBP + -0xf0] MOV RSI,R15 LEA RDX,[RBP + -0x90] MOV RCX,RBX CALL 0x00130840 MOV RDI,R13 MOV RSI,R15 LEA RDX,[RBP + -0x90] MOV RCX,RBX CALL 0x00130720 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0x330] MOV RCX,RBX CALL 0x00130720 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0x2d0] MOV RCX,RBX CALL 0x00130720 MOV RDI,R14 MOV RSI,R12 MOV RDX,RBX MOV R15,-0x760c000300030003 MOV RCX,R15 CALL 0x001344e0 LEA RDI,[R14 + 0x30] MOV RSI,R13 MOV RDX,RBX MOV RCX,R15 CALL 0x001344e0 MOV RDI,R12 LEA R15,[RBP + -0x270] MOV RSI,R15 LEA R14,[RBP + -0x210] MOV RDX,R14 MOV RCX,RBX CALL 0x00130840 MOV RDI,R13 MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX CALL 0x00130720 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0x1b0] MOV RCX,RBX CALL 0x00130720 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0x150] MOV RCX,RBX CALL 0x00130720 MOV R15,qword ptr [RBP + -0x30] LEA RDI,[R15 + 0x60] MOV RSI,R12 MOV RDX,RBX MOV R14,-0x760c000300030003 MOV RCX,R14 CALL 0x001344e0 MOV RDI,R15 ADD RDI,0x90 MOV RSI,R13 MOV RDX,RBX MOV RCX,R14 CALL 0x001344e0 ADD RSP,0x3c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void sqr_fp6(long param_1,long param_2) { long lVar1; long lVar2; long lVar3; int1 local_3f8 [96]; int1 local_398 [96]; int1 local_338 [96]; int1 local_2d8 [96]; int1 local_278 [96]; int1 local_218 [96]; int1 local_1b8 [96]; int1 local_158 [96]; int1 local_f8 [96]; int1 local_98 [96]; long local_38; local_38 = param_1; sqr_382x(local_338,param_2,BLS12_381_P); lVar2 = param_2 + 0x60; mul_382x(local_1b8,param_2,lVar2,BLS12_381_P); add_mod_384x384(local_1b8,local_1b8,local_1b8,BLS12_381_P); add_mod_384x384(local_158,local_158,local_158,BLS12_381_P); lVar1 = param_2 + 0xc0; mul_382x(local_f8,lVar2,lVar1,BLS12_381_P); add_mod_384x384(local_f8,local_f8,local_f8,BLS12_381_P); add_mod_384x384(local_98,local_98,local_98,BLS12_381_P); sqr_382x(local_278,lVar1,BLS12_381_P); lVar3 = local_38 + 0xc0; add_mod_384x(lVar3,lVar1,lVar2,BLS12_381_P); add_mod_384x(lVar3,lVar3,param_2,BLS12_381_P); sqr_382x(local_3f8,lVar3,BLS12_381_P); sub_mod_384x384(local_3f8,local_3f8,local_338,BLS12_381_P); sub_mod_384x384(local_398,local_398,local_2d8,BLS12_381_P); sub_mod_384x384(local_3f8,local_3f8,local_278,BLS12_381_P); sub_mod_384x384(local_398,local_398,local_218,BLS12_381_P); sub_mod_384x384(local_3f8,local_3f8,local_1b8,BLS12_381_P); sub_mod_384x384(local_398,local_398,local_158,BLS12_381_P); sub_mod_384x384(local_3f8,local_3f8,local_f8,BLS12_381_P); sub_mod_384x384(local_398,local_398,local_98,BLS12_381_P); redc_mont_384(lVar3,local_3f8,BLS12_381_P,0x89f3fffcfffcfffd); lVar1 = local_38; redc_mont_384(local_38 + 0xf0,local_398,BLS12_381_P,0x89f3fffcfffcfffd); sub_mod_384x384(local_3f8,local_f8,local_98,BLS12_381_P); add_mod_384x384(local_398,local_f8,local_98,BLS12_381_P); add_mod_384x384(local_3f8,local_3f8,local_338,BLS12_381_P); add_mod_384x384(local_398,local_398,local_2d8,BLS12_381_P); redc_mont_384(lVar1,local_3f8,BLS12_381_P,0x89f3fffcfffcfffd); redc_mont_384(lVar1 + 0x30,local_398,BLS12_381_P,0x89f3fffcfffcfffd); sub_mod_384x384(local_3f8,local_278,local_218,BLS12_381_P); add_mod_384x384(local_398,local_278,local_218,BLS12_381_P); add_mod_384x384(local_3f8,local_3f8,local_1b8,BLS12_381_P); add_mod_384x384(local_398,local_398,local_158,BLS12_381_P); lVar1 = local_38; redc_mont_384(local_38 + 0x60,local_3f8,BLS12_381_P,0x89f3fffcfffcfffd); redc_mont_384(lVar1 + 0x90,local_398,BLS12_381_P,0x89f3fffcfffcfffd); return; }
51,594
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const
monkey531[P]llama/common/./minja.hpp
std::unique_ptr<std::string> parseString() { auto doParse = [&](char quote) -> std::unique_ptr<std::string> { if (it == end || *it != quote) return nullptr; std::string result; bool escape = false; for (++it; it != end; ++it) { if (escape) { escape = false; switch (*it) { case 'n': result += '\n'; break; case 'r': result += '\r'; break; case 't': result += '\t'; break; case 'b': result += '\b'; break; case 'f': result += '\f'; break; case '\\': result += '\\'; break; default: if (*it == quote) { result += quote; } else { result += *it; } break; } } else if (*it == '\\') { escape = true; } else if (*it == quote) { ++it; return std::make_unique<std::string>(std::move(result)); } else { result += *it; } } return nullptr; }; consumeSpaces(); if (it == end) return nullptr; if (*it == '"') return doParse('"'); if (*it == '\'') return doParse('\''); return nullptr; }
O0
cpp
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const: subq $0x78, %rsp movq %rdi, 0x10(%rsp) movb %dl, %al movq %rdi, %rcx movq %rcx, 0x18(%rsp) movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movb %al, 0x67(%rsp) movq 0x68(%rsp), %rax movq (%rax), %rsi movq %rsi, 0x20(%rsp) movq %rsi, %rdi addq $0x20, %rdi addq $0x18, %rsi callq 0x9d2b0 testb $0x1, %al jne 0xacafc movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b390 movsbl (%rax), %eax movsbl 0x67(%rsp), %ecx cmpl %ecx, %eax je 0xacb0f movq 0x10(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xaca60 jmp 0xacd36 leaq 0x40(%rsp), %rdi callq 0x504a0 movq 0x20(%rsp), %rdi movb $0x0, 0x3f(%rsp) addq $0x20, %rdi callq 0x9b3a0 movq 0x20(%rsp), %rsi movq %rsi, %rdi addq $0x20, %rdi addq $0x18, %rsi callq 0x76d70 testb $0x1, %al jne 0xacb4a jmp 0xacd16 testb $0x1, 0x3f(%rsp) je 0xacc7e movq 0x20(%rsp), %rdi movb $0x0, 0x3f(%rsp) addq $0x20, %rdi callq 0x9b390 movsbl (%rax), %eax addl $-0x5c, %eax movl %eax, %ecx movq %rcx, 0x8(%rsp) subl $0x18, %eax ja 0xacc2b movq 0x8(%rsp), %rax leaq 0x1156b6(%rip), %rcx # 0x1c2240 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x40(%rsp), %rdi movl $0xa, %esi callq 0x50a00 jmp 0xacba4 jmp 0xacc79 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x40(%rsp), %rdi callq 0x510c0 jmp 0xacd40 leaq 0x40(%rsp), %rdi movl $0xd, %esi callq 0x50a00 jmp 0xacbd7 jmp 0xacc79 leaq 0x40(%rsp), %rdi movl $0x9, %esi callq 0x50a00 jmp 0xacbed jmp 0xacc79 leaq 0x40(%rsp), %rdi movl $0x8, %esi callq 0x50a00 jmp 0xacc03 jmp 0xacc79 leaq 0x40(%rsp), %rdi movl $0xc, %esi callq 0x50a00 jmp 0xacc16 jmp 0xacc79 leaq 0x40(%rsp), %rdi movl $0x5c, %esi callq 0x50a00 jmp 0xacc29 jmp 0xacc79 movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b390 movsbl (%rax), %eax movsbl 0x67(%rsp), %ecx cmpl %ecx, %eax jne 0xacc58 movsbl 0x67(%rsp), %esi leaq 0x40(%rsp), %rdi callq 0x50a00 jmp 0xacc56 jmp 0xacc77 movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b390 movsbl (%rax), %esi leaq 0x40(%rsp), %rdi callq 0x50a00 jmp 0xacc75 jmp 0xacc77 jmp 0xacc79 jmp 0xacd01 movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b390 movsbl (%rax), %eax cmpl $0x5c, %eax jne 0xacc9b movb $0x1, 0x3f(%rsp) jmp 0xaccff movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b390 movsbl (%rax), %eax movsbl 0x67(%rsp), %ecx cmpl %ecx, %eax jne 0xaccde movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b3a0 movq 0x10(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0xace00 jmp 0xaccd4 movl $0x1, 0x28(%rsp) jmp 0xacd2c movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b390 movsbl (%rax), %esi leaq 0x40(%rsp), %rdi callq 0x50a00 jmp 0xaccfb jmp 0xaccfd jmp 0xaccff jmp 0xacd01 jmp 0xacd03 movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0x9b3a0 jmp 0xacb2c movq 0x10(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xaca60 movl $0x1, 0x28(%rsp) leaq 0x40(%rsp), %rdi callq 0x510c0 movq 0x18(%rsp), %rax addq $0x78, %rsp retq movq 0x30(%rsp), %rdi callq 0x50940 nopw (%rax,%rax)
_ZZN5minja6Parser11parseStringB5cxx11EvENKUlcE_clB5cxx11Ec: sub rsp, 78h mov [rsp+78h+var_68], rdi mov al, dl mov rcx, rdi mov [rsp+78h+var_60], rcx mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov [rsp+78h+var_11], al mov rax, [rsp+78h+var_10] mov rsi, [rax] mov [rsp+78h+var_58], rsi mov rdi, rsi add rdi, 20h ; ' ' add rsi, 18h call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator==<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_ACAFC mov rdi, [rsp+78h+var_58] add rdi, 20h ; ' ' call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] movsx ecx, [rsp+78h+var_11] cmp eax, ecx jz short loc_ACB0F loc_ACAFC: mov rdi, [rsp+78h+var_68] xor eax, eax mov esi, eax call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEC2IS7_vEEDn; std::unique_ptr<std::string>::unique_ptr<std::default_delete<std::string>,void>(decltype(nullptr)) jmp loc_ACD36 loc_ACB0F: lea rdi, [rsp+78h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rsp+78h+var_58] mov [rsp+78h+var_39], 0 add rdi, 20h ; ' ' call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) loc_ACB2C: mov rsi, [rsp+78h+var_58] mov rdi, rsi add rdi, 20h ; ' ' add rsi, 18h call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_ACB4A jmp loc_ACD16 loc_ACB4A: test [rsp+78h+var_39], 1 jz loc_ACC7E mov rdi, [rsp+78h+var_58] mov [rsp+78h+var_39], 0 add rdi, 20h ; ' ' call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] add eax, 0FFFFFFA4h; switch 25 cases mov ecx, eax mov [rsp+78h+var_70], rcx sub eax, 18h ja def_ACB91; jumptable 00000000000ACB91 default case, cases 93-97,99-101,103-109,111-113,115 mov rax, [rsp+78h+var_70] lea rcx, jpt_ACB91 movsxd rax, ds:(jpt_ACB91 - 1C2240h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_ACB93: lea rdi, [rsp+78h+var_38]; jumptable 00000000000ACB91 case 110 mov esi, 0Ah call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACBA4: jmp loc_ACC79 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_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_ACD40 loc_ACBC6: lea rdi, [rsp+78h+var_38]; jumptable 00000000000ACB91 case 114 mov esi, 0Dh call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACBD7: jmp loc_ACC79 loc_ACBDC: lea rdi, [rsp+78h+var_38]; jumptable 00000000000ACB91 case 116 mov esi, 9 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACBED: jmp loc_ACC79 loc_ACBF2: lea rdi, [rsp+78h+var_38]; jumptable 00000000000ACB91 case 98 mov esi, 8 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACC03: jmp short loc_ACC79 loc_ACC05: lea rdi, [rsp+78h+var_38]; jumptable 00000000000ACB91 case 102 mov esi, 0Ch call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACC16: jmp short loc_ACC79 loc_ACC18: lea rdi, [rsp+78h+var_38]; jumptable 00000000000ACB91 case 92 mov esi, 5Ch ; '\' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACC29: jmp short loc_ACC79 def_ACB91: mov rdi, [rsp+78h+var_58]; jumptable 00000000000ACB91 default case, cases 93-97,99-101,103-109,111-113,115 add rdi, 20h ; ' ' call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] movsx ecx, [rsp+78h+var_11] cmp eax, ecx jnz short loc_ACC58 movsx esi, [rsp+78h+var_11] lea rdi, [rsp+78h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACC56: jmp short loc_ACC77 loc_ACC58: mov rdi, [rsp+78h+var_58] add rdi, 20h ; ' ' call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx esi, byte ptr [rax] lea rdi, [rsp+78h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACC75: jmp short $+2 loc_ACC77: jmp short $+2 loc_ACC79: jmp loc_ACD01 loc_ACC7E: mov rdi, [rsp+78h+var_58] add rdi, 20h ; ' ' call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] cmp eax, 5Ch ; '\' jnz short loc_ACC9B mov [rsp+78h+var_39], 1 jmp short loc_ACCFF loc_ACC9B: mov rdi, [rsp+78h+var_58] add rdi, 20h ; ' ' call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx eax, byte ptr [rax] movsx ecx, [rsp+78h+var_11] cmp eax, ecx jnz short loc_ACCDE mov rdi, [rsp+78h+var_58] add rdi, 20h ; ' ' call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) mov rdi, [rsp+78h+var_68] lea rsi, [rsp+78h+var_38] call _ZSt11make_uniqueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::string,std::string>(std::string &&) jmp short $+2 loc_ACCD4: mov [rsp+78h+var_50], 1 jmp short loc_ACD2C loc_ACCDE: mov rdi, [rsp+78h+var_58] add rdi, 20h ; ' ' call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) movsx esi, byte ptr [rax] lea rdi, [rsp+78h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_ACCFB: jmp short $+2 loc_ACCFD: jmp short $+2 loc_ACCFF: jmp short $+2 loc_ACD01: jmp short $+2 loc_ACD03: mov rdi, [rsp+78h+var_58] add rdi, 20h ; ' ' call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp loc_ACB2C loc_ACD16: mov rdi, [rsp+78h+var_68] xor eax, eax mov esi, eax call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEC2IS7_vEEDn; std::unique_ptr<std::string>::unique_ptr<std::default_delete<std::string>,void>(decltype(nullptr)) mov [rsp+78h+var_50], 1 loc_ACD2C: lea rdi, [rsp+78h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_ACD36: mov rax, [rsp+78h+var_60] add rsp, 78h retn loc_ACD40: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long minja::Parser::parseString[abi:cxx11](void)::{lambda(char)#1}::operator()[abi:cxx11]( long long a1, _QWORD *a2, char a3) { char *v3; // rax char *v4; // rax char *v5; // rax long long v7; // [rsp+20h] [rbp-58h] char v8; // [rsp+3Fh] [rbp-39h] _BYTE v9[39]; // [rsp+40h] [rbp-38h] BYREF char v10; // [rsp+67h] [rbp-11h] _QWORD *v11; // [rsp+68h] [rbp-10h] long long v12; // [rsp+70h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v7 = *a2; if ( !__gnu_cxx::operator==<char const*,std::string>(*a2 + 32LL, *a2 + 24LL) && *(char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v7 + 32) == v10 ) { std::string::basic_string(v9); v8 = 0; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++((_QWORD *)(v7 + 32)); while ( __gnu_cxx::operator!=<char const*,std::string>(v7 + 32, v7 + 24) ) { if ( (v8 & 1) != 0 ) { v8 = 0; switch ( *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v7 + 32) ) { case '\\': std::string::operator+=(v9, 92LL); break; case 'b': std::string::operator+=(v9, 8LL); break; case 'f': std::string::operator+=(v9, 12LL); break; case 'n': std::string::operator+=(v9, 10LL); break; case 'r': std::string::operator+=(v9, 13LL); break; case 't': std::string::operator+=(v9, 9LL); break; default: v3 = (char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v7 + 32); if ( *v3 != v10 ) goto LABEL_21; std::string::operator+=(v9, (unsigned int)v10); break; } } else if ( *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v7 + 32) == 92 ) { v8 = 1; } else { v4 = (char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v7 + 32); if ( *v4 == v10 ) { __gnu_cxx::__normal_iterator<char const*,std::string>::operator++((_QWORD *)(v7 + 32)); std::make_unique<std::string,std::string>(a1, v9); goto LABEL_24; } LABEL_21: v5 = (char *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v7 + 32); std::string::operator+=(v9, (unsigned int)*v5); } __gnu_cxx::__normal_iterator<char const*,std::string>::operator++((_QWORD *)(v7 + 32)); } std::unique_ptr<std::string>::unique_ptr<std::default_delete<std::string>,void>(a1); LABEL_24: std::string::~string(v9); } else { std::unique_ptr<std::string>::unique_ptr<std::default_delete<std::string>,void>(a1); } return a1; }
operator()[abi:cxx11]: SUB RSP,0x78 MOV qword ptr [RSP + 0x10],RDI MOV AL,DL MOV RCX,RDI MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV byte ptr [RSP + 0x67],AL MOV RAX,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RSI MOV RDI,RSI ADD RDI,0x20 ADD RSI,0x18 CALL 0x0019d2b0 TEST AL,0x1 JNZ 0x001acafc MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b390 MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RSP + 0x67] CMP EAX,ECX JZ 0x001acb0f LAB_001acafc: MOV RDI,qword ptr [RSP + 0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001aca60 JMP 0x001acd36 LAB_001acb0f: LEA RDI,[RSP + 0x40] CALL 0x001504a0 MOV RDI,qword ptr [RSP + 0x20] MOV byte ptr [RSP + 0x3f],0x0 ADD RDI,0x20 CALL 0x0019b3a0 LAB_001acb2c: MOV RSI,qword ptr [RSP + 0x20] MOV RDI,RSI ADD RDI,0x20 ADD RSI,0x18 CALL 0x00176d70 TEST AL,0x1 JNZ 0x001acb4a JMP 0x001acd16 LAB_001acb4a: TEST byte ptr [RSP + 0x3f],0x1 JZ 0x001acc7e MOV RDI,qword ptr [RSP + 0x20] MOV byte ptr [RSP + 0x3f],0x0 ADD RDI,0x20 CALL 0x0019b390 MOVSX EAX,byte ptr [RAX] ADD EAX,-0x5c MOV ECX,EAX MOV qword ptr [RSP + 0x8],RCX SUB EAX,0x18 JA 0x001acc2b MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x2c2240] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_6e: LEA RDI,[RSP + 0x40] MOV ESI,0xa CALL 0x00150a00 JMP 0x001acba4 LAB_001acba4: JMP 0x001acc79 caseD_72: LEA RDI,[RSP + 0x40] MOV ESI,0xd CALL 0x00150a00 JMP 0x001acbd7 LAB_001acbd7: JMP 0x001acc79 caseD_74: LEA RDI,[RSP + 0x40] MOV ESI,0x9 CALL 0x00150a00 JMP 0x001acbed LAB_001acbed: JMP 0x001acc79 caseD_62: LEA RDI,[RSP + 0x40] MOV ESI,0x8 CALL 0x00150a00 JMP 0x001acc03 LAB_001acc03: JMP 0x001acc79 caseD_66: LEA RDI,[RSP + 0x40] MOV ESI,0xc CALL 0x00150a00 JMP 0x001acc16 LAB_001acc16: JMP 0x001acc79 caseD_5c: LEA RDI,[RSP + 0x40] MOV ESI,0x5c CALL 0x00150a00 JMP 0x001acc29 LAB_001acc29: JMP 0x001acc79 caseD_5d: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b390 MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RSP + 0x67] CMP EAX,ECX JNZ 0x001acc58 MOVSX ESI,byte ptr [RSP + 0x67] LEA RDI,[RSP + 0x40] CALL 0x00150a00 JMP 0x001acc56 LAB_001acc56: JMP 0x001acc77 LAB_001acc58: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b390 MOVSX ESI,byte ptr [RAX] LEA RDI,[RSP + 0x40] CALL 0x00150a00 JMP 0x001acc75 LAB_001acc75: JMP 0x001acc77 LAB_001acc77: JMP 0x001acc79 LAB_001acc79: JMP 0x001acd01 LAB_001acc7e: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b390 MOVSX EAX,byte ptr [RAX] CMP EAX,0x5c JNZ 0x001acc9b MOV byte ptr [RSP + 0x3f],0x1 JMP 0x001accff LAB_001acc9b: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b390 MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RSP + 0x67] CMP EAX,ECX JNZ 0x001accde MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b3a0 MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x40] CALL 0x001ace00 JMP 0x001accd4 LAB_001accd4: MOV dword ptr [RSP + 0x28],0x1 JMP 0x001acd2c LAB_001accde: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b390 MOVSX ESI,byte ptr [RAX] LEA RDI,[RSP + 0x40] CALL 0x00150a00 LAB_001accf9: JMP 0x001accfb LAB_001accfb: JMP 0x001accfd LAB_001accfd: JMP 0x001accff LAB_001accff: JMP 0x001acd01 LAB_001acd01: JMP 0x001acd03 LAB_001acd03: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x0019b3a0 JMP 0x001acb2c LAB_001acd16: MOV RDI,qword ptr [RSP + 0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001aca60 MOV dword ptr [RSP + 0x28],0x1 LAB_001acd2c: LEA RDI,[RSP + 0x40] CALL 0x001510c0 LAB_001acd36: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x78 RET
/* operator()[abi:cxx11](char) const */ string * minja::Parser::parseString[abi:cxx11]()::{lambda(char)#1}::operator()[abi_cxx11_ (char param_1) { long lVar1; bool bVar2; bool bVar3; char *pcVar4; int1 *puVar5; char in_DL; long *in_RSI; int7 in_register_00000039; string *psVar6; string local_38 [39]; char local_11; string *local_8; psVar6 = (string *)CONCAT71(in_register_00000039,param_1); lVar1 = *in_RSI; local_11 = in_DL; local_8 = psVar6; bVar2 = __gnu_cxx::operator== ((__normal_iterator *)(lVar1 + 0x20),(__normal_iterator *)(lVar1 + 0x18)); if ((bVar2) || (pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *) (lVar1 + 0x20)), *pcVar4 != local_11)) { std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>:: unique_ptr<std::default_delete<std::__cxx11::string>,void>((_func_decltype_nullptr *)psVar6); } else { std::__cxx11::string::string(local_38); bVar2 = false; __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++ ((__normal_iterator<char_const*,std::__cxx11::string> *)(lVar1 + 0x20)); while (bVar3 = __gnu_cxx::operator!= ((__normal_iterator *)(lVar1 + 0x20), (__normal_iterator *)(lVar1 + 0x18)), bVar3) { if (bVar2) { bVar2 = false; puVar5 = (int1 *) __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *)(lVar1 + 0x20)); switch(*puVar5) { case 0x5c: std::__cxx11::string::operator+=(local_38,'\\'); break; default: pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *) (lVar1 + 0x20)); if (*pcVar4 == local_11) { std::__cxx11::string::operator+=(local_38,local_11); } else { pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>:: operator*((__normal_iterator<char_const*,std::__cxx11::string> *) (lVar1 + 0x20)); std::__cxx11::string::operator+=(local_38,*pcVar4); } break; case 0x62: std::__cxx11::string::operator+=(local_38,'\b'); break; case 0x66: std::__cxx11::string::operator+=(local_38,'\f'); break; case 0x6e: /* try { // try from 001acb93 to 001accf8 has its CatchHandler @ 001acba9 */ std::__cxx11::string::operator+=(local_38,'\n'); break; case 0x72: std::__cxx11::string::operator+=(local_38,'\r'); break; case 0x74: std::__cxx11::string::operator+=(local_38,'\t'); } } else { pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *) (lVar1 + 0x20)); if (*pcVar4 == '\\') { bVar2 = true; } else { pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *) (lVar1 + 0x20)); if (*pcVar4 == local_11) { __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++ ((__normal_iterator<char_const*,std::__cxx11::string> *)(lVar1 + 0x20)); std::make_unique<std::__cxx11::string,std::__cxx11::string>(psVar6); goto LAB_001acd2c; } pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator* ((__normal_iterator<char_const*,std::__cxx11::string> *) (lVar1 + 0x20)); std::__cxx11::string::operator+=(local_38,*pcVar4); } } __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++ ((__normal_iterator<char_const*,std::__cxx11::string> *)(lVar1 + 0x20)); } std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>:: unique_ptr<std::default_delete<std::__cxx11::string>,void>((_func_decltype_nullptr *)psVar6); LAB_001acd2c: std::__cxx11::string::~string(local_38); } return psVar6; }
51,595
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const
monkey531[P]llama/common/./minja.hpp
std::unique_ptr<std::string> parseString() { auto doParse = [&](char quote) -> std::unique_ptr<std::string> { if (it == end || *it != quote) return nullptr; std::string result; bool escape = false; for (++it; it != end; ++it) { if (escape) { escape = false; switch (*it) { case 'n': result += '\n'; break; case 'r': result += '\r'; break; case 't': result += '\t'; break; case 'b': result += '\b'; break; case 'f': result += '\f'; break; case '\\': result += '\\'; break; default: if (*it == quote) { result += quote; } else { result += *it; } break; } } else if (*it == '\\') { escape = true; } else if (*it == quote) { ++it; return std::make_unique<std::string>(std::move(result)); } else { result += *it; } } return nullptr; }; consumeSpaces(); if (it == end) return nullptr; if (*it == '"') return doParse('"'); if (*it == '\'') return doParse('\''); return nullptr; }
O2
cpp
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq (%rsi), %r15 movq 0x18(%r15), %rcx movq 0x20(%r15), %rax cmpq %rcx, %rax je 0x40237 movl %edx, %ebp cmpb %bpl, (%rax) jne 0x40237 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) andq $0x0, -0x8(%rdx) movb $0x0, (%rdx) xorl %edx, %edx movl $0x1a29, %r12d # imm = 0x1A29 leaq 0x50740(%rip), %r13 # 0x90920 leaq 0x8(%rsp), %r14 leaq 0x1(%rax), %rsi movq %rsi, 0x20(%r15) cmpq %rcx, %rsi je 0x4023d movb (%rsi), %cl testb $0x1, %dl je 0x40214 movsbl %cl, %eax addl $-0x5c, %eax rorl %eax cmpl $0xc, %eax ja 0x40220 btl %eax, %r12d jae 0x40220 movl %eax, %eax movb (%rax,%r13), %cl jmp 0x40220 movb $0x1, %dl cmpb $0x5c, %cl je 0x4022d cmpb %bpl, %cl je 0x4025d movsbl %cl, %esi movq %r14, %rdi callq 0x205c0 xorl %edx, %edx movq 0x18(%r15), %rcx movq 0x20(%r15), %rax jmp 0x401e5 andq $0x0, (%rbx) jmp 0x4024b andq $0x0, (%rbx) leaq 0x8(%rsp), %rdi callq 0x20d78 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x2, %rax movq %rax, 0x20(%r15) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x4028b jmp 0x40241 jmp 0x40276 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x20d78 movq %rbx, %rdi callq 0x20b90
_ZZN5minja6Parser11parseStringB5cxx11EvENKUlcE_clB5cxx11Ec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov r15, [rsi] mov rcx, [r15+18h] mov rax, [r15+20h] cmp rax, rcx jz short loc_40237 mov ebp, edx cmp [rax], bpl jnz short loc_40237 lea rdx, [rsp+58h+var_40] mov [rdx-10h], rdx and qword ptr [rdx-8], 0 mov byte ptr [rdx], 0 xor edx, edx mov r12d, 1A29h lea r13, unk_90920 lea r14, [rsp+58h+var_50] loc_401E5: lea rsi, [rax+1] mov [r15+20h], rsi cmp rsi, rcx jz short loc_4023D mov cl, [rsi] test dl, 1 jz short loc_40214 movsx eax, cl add eax, 0FFFFFFA4h ror eax, 1 cmp eax, 0Ch ja short loc_40220 bt r12d, eax jnb short loc_40220 mov eax, eax mov cl, [rax+r13] jmp short loc_40220 loc_40214: mov dl, 1 cmp cl, 5Ch ; '\' jz short loc_4022D cmp cl, bpl jz short loc_4025D loc_40220: movsx esi, cl mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) xor edx, edx loc_4022D: mov rcx, [r15+18h] mov rax, [r15+20h] jmp short loc_401E5 loc_40237: and qword ptr [rbx], 0 jmp short loc_4024B loc_4023D: and qword ptr [rbx], 0 loc_40241: lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4024B: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4025D: add rax, 2 mov [r15+20h], rax lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZSt11make_uniqueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::string,std::string>(std::string &&) jmp short loc_40241 jmp short $+2 loc_40276: mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Parser::parseString[abi:cxx11](void)::{lambda(char)#1}::operator()[abi:cxx11]( _QWORD *a1, long long *a2, char a3) { long long v3; // r15 _BYTE *v4; // rcx _BYTE *v5; // rax long long v7; // rdx int v8; // r12d char v9; // cl unsigned int v10; // eax _QWORD v12[2]; // [rsp+8h] [rbp-50h] BYREF char v13; // [rsp+18h] [rbp-40h] BYREF v3 = *a2; v4 = *(_BYTE **)(*a2 + 24); v5 = *(_BYTE **)(*a2 + 32); if ( v5 == v4 || *v5 != a3 ) { *a1 = 0LL; return a1; } v12[0] = &v13; v12[1] = 0LL; v13 = 0; v7 = 0LL; v8 = 6697; while ( 1 ) { *(_QWORD *)(v3 + 32) = v5 + 1; if ( v5 + 1 == v4 ) { *a1 = 0LL; goto LABEL_15; } v9 = v5[1]; if ( (v7 & 1) != 0 ) { v10 = __ROR4__(v9 - 92, 1); if ( v10 <= 0xC ) { if ( _bittest(&v8, v10) ) v9 = byte_90920[v10]; } goto LABEL_11; } LOBYTE(v7) = 1; if ( v9 == 92 ) goto LABEL_12; if ( v9 == a3 ) break; LABEL_11: std::string::push_back(v12, (unsigned int)v9); v7 = 0LL; LABEL_12: v4 = *(_BYTE **)(v3 + 24); v5 = *(_BYTE **)(v3 + 32); } *(_QWORD *)(v3 + 32) = v5 + 2; std::make_unique<std::string,std::string>(a1, v12, v7); LABEL_15: std::string::~string(v12); return a1; }
51,596
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const
monkey531[P]llama/common/./minja.hpp
std::unique_ptr<std::string> parseString() { auto doParse = [&](char quote) -> std::unique_ptr<std::string> { if (it == end || *it != quote) return nullptr; std::string result; bool escape = false; for (++it; it != end; ++it) { if (escape) { escape = false; switch (*it) { case 'n': result += '\n'; break; case 'r': result += '\r'; break; case 't': result += '\t'; break; case 'b': result += '\b'; break; case 'f': result += '\f'; break; case '\\': result += '\\'; break; default: if (*it == quote) { result += quote; } else { result += *it; } break; } } else if (*it == '\\') { escape = true; } else if (*it == quote) { ++it; return std::make_unique<std::string>(std::move(result)); } else { result += *it; } } return nullptr; }; consumeSpaces(); if (it == end) return nullptr; if (*it == '"') return doParse('"'); if (*it == '\'') return doParse('\''); return nullptr; }
O3
cpp
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq (%rsi), %r12 movq 0x18(%r12), %rcx movq 0x20(%r12), %rax cmpq %rcx, %rax je 0x43f75 movl %edx, %ebp cmpb %bpl, (%rax) jne 0x43f75 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) leaq 0x1(%rax), %rdx movq %rdx, 0x20(%r12) cmpq %rcx, %rdx je 0x43f8e xorl %edx, %edx movl $0x1a29, %r13d # imm = 0x1A29 leaq 0x8(%rsp), %r14 movb 0x1(%rax), %cl testb $0x1, %dl je 0x43f27 movsbl %cl, %eax addl $-0x5c, %eax rorl %eax cmpl $0xc, %eax ja 0x43f33 btl %eax, %r13d jae 0x43f33 movl %eax, %eax leaq 0x79df2(%rip), %rcx # 0xbdd14 movb (%rax,%rcx), %cl jmp 0x43f33 movb $0x1, %dl cmpb $0x5c, %cl je 0x43f40 cmpb %bpl, %cl je 0x43f92 movsbl %cl, %esi movq %r14, %rdi callq 0x185a0 xorl %edx, %edx movq 0x20(%r12), %rax leaq 0x1(%rax), %rcx movq %rcx, 0x20(%r12) cmpq 0x18(%r12), %rcx jne 0x43efe movq 0x8(%rsp), %rdi movq $0x0, (%rbx) cmpq %r15, %rdi je 0x43f7c movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x43f7c movq $0x0, (%rbx) movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %eax, %eax jmp 0x43fd7 addq $0x2, %rax movq %rax, 0x20(%r12) movl $0x20, %edi callq 0x18690 movq %rax, %rcx addq $0x10, %rcx movq %rcx, (%rax) movq 0x8(%rsp), %rdx cmpq %r15, %rdx je 0x43fc7 movq %rdx, (%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x10(%rax) jmp 0x43fce movups (%r15), %xmm0 movups %xmm0, (%rcx) movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rbx) jmp 0x43f7c jmp 0x43fde movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x43ff8 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18b90
_ZZN5minja6Parser11parseStringB5cxx11EvENKUlcE_clB5cxx11Ec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov r12, [rsi] mov rcx, [r12+18h] mov rax, [r12+20h] cmp rax, rcx jz loc_43F75 mov ebp, edx cmp [rax], bpl jnz loc_43F75 lea r15, [rsp+58h+var_40] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 lea rdx, [rax+1] mov [r12+20h], rdx cmp rdx, rcx jz loc_43F8E xor edx, edx mov r13d, 1A29h lea r14, [rsp+58h+var_50] loc_43EFE: mov cl, [rax+1] test dl, 1 jz short loc_43F27 movsx eax, cl add eax, 0FFFFFFA4h ror eax, 1 cmp eax, 0Ch ja short loc_43F33 bt r13d, eax jnb short loc_43F33 mov eax, eax lea rcx, unk_BDD14 mov cl, [rax+rcx] jmp short loc_43F33 loc_43F27: mov dl, 1 cmp cl, 5Ch ; '\' jz short loc_43F40 cmp cl, bpl jz short loc_43F92 loc_43F33: movsx esi, cl mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) xor edx, edx loc_43F40: mov rax, [r12+20h] lea rcx, [rax+1] mov [r12+20h], rcx cmp rcx, [r12+18h] jnz short loc_43EFE mov rdi, [rsp+58h+var_50]; void * mov qword ptr [rbx], 0 cmp rdi, r15 jz short loc_43F7C mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_43F7C loc_43F75: mov qword ptr [rbx], 0 loc_43F7C: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_43F8E: xor eax, eax jmp short loc_43FD7 loc_43F92: add rax, 2 mov [r12+20h], rax mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, rax add rcx, 10h mov [rax], rcx mov rdx, [rsp+58h+var_50] cmp rdx, r15 jz short loc_43FC7 mov [rax], rdx mov rcx, [rsp+58h+var_40] mov [rax+10h], rcx jmp short loc_43FCE loc_43FC7: movups xmm0, xmmword ptr [r15] movups xmmword ptr [rcx], xmm0 loc_43FCE: mov rcx, [rsp+58h+var_48] mov [rax+8], rcx loc_43FD7: mov [rbx], rax jmp short loc_43F7C jmp short $+2 loc_43FDE: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r15 jz short loc_43FF8 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43FF8: mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Parser::parseString[abi:cxx11](void)::{lambda(char)#1}::operator()[abi:cxx11]( _QWORD *a1, long long *a2, char a3) { long long v4; // r12 _BYTE *v5; // rcx _BYTE *v6; // rax char v8; // dl int v9; // r13d char v10; // cl unsigned int v11; // eax _OWORD *v12; // rdi long long v14; // rax void *v15; // [rsp+8h] [rbp-50h] BYREF long long v16; // [rsp+10h] [rbp-48h] _OWORD v17[4]; // [rsp+18h] [rbp-40h] BYREF v4 = *a2; v5 = *(_BYTE **)(*a2 + 24); v6 = *(_BYTE **)(*a2 + 32); if ( v6 == v5 || *v6 != a3 ) { *a1 = 0LL; return a1; } v15 = v17; v16 = 0LL; LOBYTE(v17[0]) = 0; *(_QWORD *)(v4 + 32) = v6 + 1; if ( v6 + 1 == v5 ) { v14 = 0LL; goto LABEL_22; } v8 = 0; v9 = 6697; while ( 1 ) { v10 = v6[1]; if ( (v8 & 1) != 0 ) { v11 = __ROR4__(v10 - 92, 1); if ( v11 <= 0xC && _bittest(&v9, v11) ) v10 = byte_BDD14[v11]; goto LABEL_11; } v8 = 1; if ( v10 != 92 ) break; LABEL_12: v6 = *(_BYTE **)(v4 + 32); *(_QWORD *)(v4 + 32) = v6 + 1; if ( v6 + 1 == *(_BYTE **)(v4 + 24) ) { v12 = v15; *a1 = 0LL; if ( v12 != v17 ) operator delete(v12, *(_QWORD *)&v17[0] + 1LL); return a1; } } if ( v10 != a3 ) { LABEL_11: std::string::push_back(&v15, (unsigned int)v10); v8 = 0; goto LABEL_12; } *(_QWORD *)(v4 + 32) = v6 + 2; v14 = operator new(0x20uLL); *(_QWORD *)v14 = v14 + 16; if ( v15 == v17 ) { *(_OWORD *)(v14 + 16) = v17[0]; } else { *(_QWORD *)v14 = v15; *(_QWORD *)(v14 + 16) = *(_QWORD *)&v17[0]; } *(_QWORD *)(v14 + 8) = v16; LABEL_22: *a1 = v14; return a1; }
operator()[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R12,qword ptr [RSI] MOV RCX,qword ptr [R12 + 0x18] MOV RAX,qword ptr [R12 + 0x20] CMP RAX,RCX JZ 0x00143f75 MOV EBP,EDX CMP byte ptr [RAX],BPL JNZ 0x00143f75 LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 LEA RDX,[RAX + 0x1] MOV qword ptr [R12 + 0x20],RDX CMP RDX,RCX JZ 0x00143f8e XOR EDX,EDX MOV R13D,0x1a29 LEA R14,[RSP + 0x8] LAB_00143efe: MOV CL,byte ptr [RAX + 0x1] TEST DL,0x1 JZ 0x00143f27 MOVSX EAX,CL ADD EAX,-0x5c ROR EAX,0x1 CMP EAX,0xc JA 0x00143f33 BT R13D,EAX JNC 0x00143f33 MOV EAX,EAX LEA RCX,[0x1bdd14] MOV CL,byte ptr [RAX + RCX*0x1] JMP 0x00143f33 LAB_00143f27: MOV DL,0x1 CMP CL,0x5c JZ 0x00143f40 CMP CL,BPL JZ 0x00143f92 LAB_00143f33: MOVSX ESI,CL MOV RDI,R14 CALL 0x001185a0 XOR EDX,EDX LAB_00143f40: MOV RAX,qword ptr [R12 + 0x20] LEA RCX,[RAX + 0x1] MOV qword ptr [R12 + 0x20],RCX CMP RCX,qword ptr [R12 + 0x18] JNZ 0x00143efe MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RBX],0x0 CMP RDI,R15 JZ 0x00143f7c MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 JMP 0x00143f7c LAB_00143f75: MOV qword ptr [RBX],0x0 LAB_00143f7c: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00143f8e: XOR EAX,EAX JMP 0x00143fd7 LAB_00143f92: ADD RAX,0x2 MOV qword ptr [R12 + 0x20],RAX LAB_00143f9b: MOV EDI,0x20 CALL 0x00118690 LAB_00143fa5: MOV RCX,RAX ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV RDX,qword ptr [RSP + 0x8] CMP RDX,R15 JZ 0x00143fc7 MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x10],RCX JMP 0x00143fce LAB_00143fc7: MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RCX],XMM0 LAB_00143fce: MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX LAB_00143fd7: MOV qword ptr [RBX],RAX JMP 0x00143f7c
/* operator()[abi:cxx11](char) const */ int8 * minja::Parser::parseString[abi:cxx11]()::{lambda(char)#1}::operator()[abi_cxx11_(char param_1) { long lVar1; char *pcVar2; int8 *puVar3; char in_DL; bool bVar4; long *in_RSI; int7 in_register_00000039; int8 *puVar5; int1 *local_50; int8 local_48; int1 local_40; int7 uStack_3f; int8 uStack_38; puVar5 = (int8 *)CONCAT71(in_register_00000039,param_1); lVar1 = *in_RSI; pcVar2 = *(char **)(lVar1 + 0x20); if ((pcVar2 == *(char **)(lVar1 + 0x18)) || (*pcVar2 != in_DL)) { *puVar5 = 0; } else { local_48 = 0; local_40 = 0; *(char **)(lVar1 + 0x20) = pcVar2 + 1; if (pcVar2 + 1 == *(char **)(lVar1 + 0x18)) { puVar3 = (int8 *)0x0; LAB_00143fd7: *puVar5 = puVar3; } else { bVar4 = false; local_50 = &local_40; do { if (bVar4) { LAB_00143f33: /* try { // try from 00143f33 to 00143f3d has its CatchHandler @ 00143fde */ std::__cxx11::string::push_back((char)&local_50); bVar4 = false; } else { bVar4 = true; if (pcVar2[1] != '\\') { if (pcVar2[1] != in_DL) goto LAB_00143f33; *(char **)(lVar1 + 0x20) = pcVar2 + 2; /* try { // try from 00143f9b to 00143fa4 has its CatchHandler @ 00143fdc */ puVar3 = (int8 *)operator_new(0x20); *puVar3 = puVar3 + 2; if (local_50 == &local_40) { puVar3[2] = CONCAT71(uStack_3f,local_40); puVar3[3] = uStack_38; } else { *puVar3 = local_50; puVar3[2] = CONCAT71(uStack_3f,local_40); } puVar3[1] = local_48; goto LAB_00143fd7; } } pcVar2 = *(char **)(lVar1 + 0x20); *(char **)(lVar1 + 0x20) = pcVar2 + 1; } while (pcVar2 + 1 != *(char **)(lVar1 + 0x18)); *puVar5 = 0; if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } } } return puVar5; }
51,597
JS_IsStrictEqual
bluesky950520[P]quickjs/quickjs.c
JS_BOOL JS_IsStrictEqual(JSContext *ctx, JSValue op1, JSValue op2) { return js_strict_eq2(ctx, js_dup(op1), js_dup(op2), JS_EQ_STRICT); }
O1
c
JS_IsStrictEqual: movq %rsi, -0x8(%rsp) cmpl $-0x9, %edx jb 0x394f9 movq -0x8(%rsp), %rax incl (%rax) movq %rcx, -0x8(%rsp) cmpl $-0x9, %r8d jb 0x3950b movq -0x8(%rsp), %rax incl (%rax) xorl %r9d, %r9d jmp 0x39510
JS_IsStrictEqual: mov [rsp+var_8], rsi cmp edx, 0FFFFFFF7h jb short loc_394F9 mov rax, [rsp+var_8] inc dword ptr [rax] loc_394F9: mov [rsp+var_8], rcx cmp r8d, 0FFFFFFF7h jb short loc_3950B mov rax, [rsp+var_8] inc dword ptr [rax] loc_3950B: xor r9d, r9d jmp short $+2
long long JS_IsStrictEqual(long long a1, _DWORD *a2, long long a3, _DWORD *a4, long long a5) { if ( (unsigned int)a3 >= 0xFFFFFFF7 ) ++*a2; if ( (unsigned int)a5 >= 0xFFFFFFF7 ) ++*a4; return js_strict_eq2(a1, a2, a3, a4, a5, 0LL); }
JS_IsStrictEqual: MOV qword ptr [RSP + -0x8],RSI CMP EDX,-0x9 JC 0x001394f9 MOV RAX,qword ptr [RSP + -0x8] INC dword ptr [RAX] LAB_001394f9: MOV qword ptr [RSP + -0x8],RCX CMP R8D,-0x9 JC 0x0013950b MOV RAX,qword ptr [RSP + -0x8] INC dword ptr [RAX] LAB_0013950b: XOR R9D,R9D JMP 0x00139510
void JS_IsStrictEqual(int8 param_1,int *param_2,uint param_3,int *param_4,uint param_5) { if (0xfffffff6 < param_3) { *param_2 = *param_2 + 1; } if (0xfffffff6 < param_5) { *param_4 = *param_4 + 1; } js_strict_eq2(); return; }
51,598
spell_gen_proc_on_victim::Register()
SylCore-WoTLK/src/server/scripts/Spells/spell_generic.cpp
void Register() override { OnEffectProc += AuraEffectProcFn(spell_gen_proc_on_victim::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); }
O3
cpp
spell_gen_proc_on_victim::Register(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx leaq 0x74(%rip), %rsi # 0x8b4ba4 movq %rsp, %r14 movq %r14, %rdi xorl %edx, %edx xorl %ecx, %ecx movl $0x2a, %r8d callq 0xee5c56 leaq 0xf92eb4(%rip), %rax # 0x1847a00 movq %rax, (%r14) movzwl 0xa(%r14), %ebp movb 0x8(%r14), %r12b leaq 0x298(%rbx), %r15 movl $0x30, %edi callq 0x10a2258 movw %bp, 0x1a(%rax) movb %r12b, 0x18(%rax) leaq 0xe68ce8(%rip), %rcx # 0x171d860 movq %rcx, 0x10(%rax) movups 0x10(%r14), %xmm0 movups %xmm0, 0x20(%rax) movq %rax, %rdi movq %r15, %rsi callq 0x45c2d0 incq 0x2a8(%rbx) addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN24spell_gen_proc_on_victim8RegisterEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov rbx, rdi lea rsi, _ZN24spell_gen_proc_on_victim6OnProcEPK10AuraEffectR13ProcEventInfo; spell_gen_proc_on_victim::OnProc(AuraEffect const*,ProcEventInfo &) mov r14, rsp mov rdi, r14 xor edx, edx xor ecx, ecx mov r8d, 2Ah ; '*' call _ZN10AuraScript17EffectProcHandlerC2EMS_FvPK10AuraEffectR13ProcEventInfoEht; AuraScript::EffectProcHandler::EffectProcHandler(void (AuraScript::*)(AuraEffect const*,ProcEventInfo &),uchar,ushort) lea rax, off_1847A00 mov [r14], rax movzx ebp, word ptr [r14+0Ah] mov r12b, [r14+8] lea r15, [rbx+298h] mov edi, 30h ; '0'; unsigned __int64 call _Znwm; operator new(ulong) mov [rax+1Ah], bp mov [rax+18h], r12b lea rcx, off_171D860 mov [rax+10h], rcx movups xmm0, xmmword ptr [r14+10h] movups xmmword ptr [rax+20h], xmm0 mov rdi, rax; this mov rsi, r15; std::__detail::_List_node_base * call __ZNSt8__detail15_List_node_base7_M_hookEPS0_; std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*) inc qword ptr [rbx+2A8h] add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long spell_gen_proc_on_victim::Register(spell_gen_proc_on_victim *this) { __int16 v1; // bp char v2; // r12 long long v3; // rax long long result; // rax void ( **v5)(_SpellScript::EffectHook *__hidden); // [rsp+0h] [rbp-48h] BYREF char v6; // [rsp+8h] [rbp-40h] __int16 v7; // [rsp+Ah] [rbp-3Eh] __int128 v8; // [rsp+10h] [rbp-38h] AuraScript::EffectProcHandler::EffectProcHandler(&v5, spell_gen_proc_on_victim::OnProc, 0LL, 0LL, 42LL); v5 = off_1847A00; v1 = v7; v2 = v6; v3 = operator new(0x30uLL); *(_WORD *)(v3 + 26) = v1; *(_BYTE *)(v3 + 24) = v2; *(_QWORD *)(v3 + 16) = off_171D860; *(_OWORD *)(v3 + 32) = v8; result = std::__detail::_List_node_base::_M_hook( (std::__detail::_List_node_base *)v3, (spell_gen_proc_on_victim *)((char *)this + 664)); ++*((_QWORD *)this + 85); return result; }
_M_invoke: JMP 0x008b4b45
/* std::_Function_handler<void (TaskContext), boss_mechano_lord_capacitus::JustEngagedWith(Unit*)::{lambda(TaskContext)#2}>::_M_invoke(std::_Any_data const&, TaskContext&&) */ void std:: _Function_handler<void(TaskContext),boss_mechano_lord_capacitus::JustEngagedWith(Unit*)::{lambda(TaskContext)#2}> ::_M_invoke(_Any_data *param_1,TaskContext *param_2) { int *piVar1; UnitAI *this; uint uVar2; int iVar3; int4 uStack_68; int4 uStack_64; int4 uStack_60; int4 uStack_5c; int1 *apuStack_58 [4]; int8 uStack_38; int8 uStack_30; int8 uStack_28; long *plStack_20; int8 uStack_18; int8 uStack_10; apuStack_58[3] = (int1 *)&uStack_68; uStack_38 = *(int8 *)param_2; uStack_30 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)param_2 = 0; uStack_28 = *(int8 *)(param_2 + 0x10); plStack_20 = *(long **)(param_2 + 0x18); *(int8 *)(param_2 + 0x10) = 0; *(int8 *)(param_2 + 0x18) = 0; uStack_18 = *(int8 *)(param_2 + 0x20); uStack_10 = *(int8 *)(param_2 + 0x28); *(int8 *)(param_2 + 0x28) = 0; *(int8 *)(param_2 + 0x20) = 0; this = *(UnitAI **)param_1; apuStack_58[0] = (int1 *)&uStack_5c; uStack_5c = 0x8951; apuStack_58[1] = (int1 *)&uStack_60; uStack_60 = 0x8c40; apuStack_58[2] = (int1 *)&uStack_64; uStack_64 = 0x8c41; uStack_68 = 0x8c42; uVar2 = urand(0,3); UnitAI::DoCastAOE(this,*(uint *)apuStack_58[uVar2],false); uVar2 = urand(0x960,0xe10); apuStack_58[0] = (int1 *)(ulong)uVar2; TaskContext::Repeat<long,std::ratio<1l,1000l>>((TaskContext *)&uStack_38,(duration *)apuStack_58); __shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10); if (plStack_20 != (long *)0x0) { if (*PTR___libc_single_threaded_01991e10 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_20 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)plStack_20 + 0xc); *(int *)((long)plStack_20 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*plStack_20 + 0x18))(); } } __shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30); return; }
51,599
my_wc_mb_filename
eloqsql/strings/ctype-utf8.c
static int my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; static const char hex[]= "0123456789abcdef"; if (s >= e) return MY_CS_TOOSMALL; if (wc < 128 && filename_safe_char[wc]) { *s= (uchar) wc; return 1; } if (s + 3 > e) return MY_CS_TOOSMALL3; *s++= MY_FILENAME_ESCAPE; if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) || (wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) || (wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) || (wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) || (wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20]))) { *s++= (code / 80) + 0x30; *s++= (code % 80) + 0x30; return 3; } /* Non letter */ if (s + 4 > e) return MY_CS_TOOSMALL5; *s++= hex[(wc >> 12) & 15]; *s++= hex[(wc >> 8) & 15]; *s++= hex[(wc >> 4) & 15]; *s++= hex[(wc) & 15]; return 5; }
O0
c
my_wc_mb_filename: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0xba0aa movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xba315 cmpq $0x80, -0x18(%rbp) jae 0xba0e0 movq -0x18(%rbp), %rcx leaq 0x14dba1(%rip), %rax # 0x207c60 movsbl (%rax,%rcx), %eax cmpl $0x0, %eax je 0xba0e0 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0xba315 movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0xba0fa movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0xba315 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb $0x40, (%rax) cmpq $0xc0, -0x18(%rbp) jb 0xba142 cmpq $0x5ff, -0x18(%rbp) # imm = 0x5FF ja 0xba142 movq -0x18(%rbp), %rcx subq $0xc0, %rcx leaq 0x150cee(%rip), %rax # 0x20ae20 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xba20e cmpq $0x1e00, -0x18(%rbp) # imm = 0x1E00 jb 0xba178 cmpq $0x1fff, -0x18(%rbp) # imm = 0x1FFF ja 0xba178 movq -0x18(%rbp), %rcx subq $0x1e00, %rcx # imm = 0x1E00 leaq 0x331d78(%rip), %rax # 0x3ebee0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xba20e cmpq $0x2160, -0x18(%rbp) # imm = 0x2160 jb 0xba1aa cmpq $0x217f, -0x18(%rbp) # imm = 0x217F ja 0xba1aa movq -0x18(%rbp), %rcx subq $0x2160, %rcx # imm = 0x2160 leaq 0x150b42(%rip), %rax # 0x20ace0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xba20e cmpq $0x24b0, -0x18(%rbp) # imm = 0x24B0 jb 0xba1dc cmpq $0x24ef, -0x18(%rbp) # imm = 0x24EF ja 0xba1dc movq -0x18(%rbp), %rcx subq $0x24b0, %rcx # imm = 0x24B0 leaq 0x150b50(%rip), %rax # 0x20ad20 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xba20e cmpq $0xff20, -0x18(%rbp) # imm = 0xFF20 jb 0xba25c cmpq $0xff5f, -0x18(%rbp) # imm = 0xFF5F ja 0xba25c movq -0x18(%rbp), %rcx subq $0xff20, %rcx # imm = 0xFF20 leaq 0x150b9e(%rip), %rax # 0x20ada0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0xba25c movl -0x2c(%rbp), %eax movl $0x50, %ecx cltd idivl %ecx addl $0x30, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl -0x2c(%rbp), %eax movl $0x50, %ecx cltd idivl %ecx addl $0x30, %edx movb %dl, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl $0x3, -0x4(%rbp) jmp 0xba315 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0xba276 movl $0xffffff97, -0x4(%rbp) # imm = 0xFFFFFF97 jmp 0xba315 movq -0x18(%rbp), %rcx shrq $0xc, %rcx andq $0xf, %rcx leaq 0x150a37(%rip), %rax # 0x20acc0 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rcx shrq $0x8, %rcx andq $0xf, %rcx leaq 0x150a10(%rip), %rax # 0x20acc0 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rcx shrq $0x4, %rcx andq $0xf, %rcx leaq 0x1509e9(%rip), %rax # 0x20acc0 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rcx andq $0xf, %rcx leaq 0x1509c6(%rip), %rax # 0x20acc0 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_wc_mb_filename: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_BA0AA mov [rbp+var_4], 0FFFFFF9Bh jmp loc_BA315 loc_BA0AA: cmp [rbp+var_18], 80h jnb short loc_BA0E0 mov rcx, [rbp+var_18] lea rax, filename_safe_char movsx eax, byte ptr [rax+rcx] cmp eax, 0 jz short loc_BA0E0 mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_BA315 loc_BA0E0: mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_BA0FA mov [rbp+var_4], 0FFFFFF99h jmp loc_BA315 loc_BA0FA: mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov byte ptr [rax], 40h ; '@' cmp [rbp+var_18], 0C0h jb short loc_BA142 cmp [rbp+var_18], 5FFh ja short loc_BA142 mov rcx, [rbp+var_18] sub rcx, 0C0h lea rax, uni_0C00_05FF movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz loc_BA20E loc_BA142: cmp [rbp+var_18], 1E00h jb short loc_BA178 cmp [rbp+var_18], 1FFFh ja short loc_BA178 mov rcx, [rbp+var_18] sub rcx, 1E00h lea rax, uni_1E00_1FFF movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz loc_BA20E loc_BA178: cmp [rbp+var_18], 2160h jb short loc_BA1AA cmp [rbp+var_18], 217Fh ja short loc_BA1AA mov rcx, [rbp+var_18] sub rcx, 2160h lea rax, uni_2160_217F movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_BA20E loc_BA1AA: cmp [rbp+var_18], 24B0h jb short loc_BA1DC cmp [rbp+var_18], 24EFh ja short loc_BA1DC mov rcx, [rbp+var_18] sub rcx, 24B0h lea rax, uni_24B0_24EF movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_BA20E loc_BA1DC: cmp [rbp+var_18], 0FF20h jb short loc_BA25C cmp [rbp+var_18], 0FF5Fh ja short loc_BA25C mov rcx, [rbp+var_18] sub rcx, 0FF20h lea rax, uni_FF20_FF5F movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_BA25C loc_BA20E: mov eax, [rbp+var_2C] mov ecx, 50h ; 'P' cdq idiv ecx add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov eax, [rbp+var_2C] mov ecx, 50h ; 'P' cdq idiv ecx add edx, 30h ; '0' mov cl, dl mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov [rbp+var_4], 3 jmp loc_BA315 loc_BA25C: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_BA276 mov [rbp+var_4], 0FFFFFF97h jmp loc_BA315 loc_BA276: mov rcx, [rbp+var_18] shr rcx, 0Ch and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rcx, [rbp+var_18] shr rcx, 8 and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rcx, [rbp+var_18] shr rcx, 4 and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rcx, [rbp+var_18] and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov [rbp+var_4], 5 loc_BA315: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_filename(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+0h] [rbp-2Ch] _BYTE *v6; // [rsp+Ch] [rbp-20h] if ( (unsigned long long)a3 < a4 ) { if ( a2 < 0x80 && filename_safe_char[a2] ) { *a3 = a2; return 1; } else if ( (unsigned long long)(a3 + 3) <= a4 ) { v6 = a3 + 1; *a3 = 64; if ( a2 >= 0xC0 && a2 <= 0x5FF && (v5 = uni_0C00_05FF[a2 - 192]) != 0 || a2 >= 0x1E00 && a2 <= 0x1FFF && (v5 = uni_1E00_1FFF[a2 - 7680]) != 0 || a2 >= 0x2160 && a2 <= 0x217F && (v5 = uni_2160_217F[a2 - 8544]) != 0 || a2 >= 0x24B0 && a2 <= 0x24EF && (v5 = uni_24B0_24EF[a2 - 9392]) != 0 || a2 >= 0xFF20 && a2 <= 0xFF5F && (v5 = uni_FF20_FF5F[a2 - 65312]) != 0 ) { *v6 = v5 / 80 + 48; a3[2] = v5 % 80 + 48; return 3; } else if ( (unsigned long long)(a3 + 5) <= a4 ) { *v6 = my_wc_mb_filename_hex[(unsigned __int16)a2 >> 12]; a3[2] = my_wc_mb_filename_hex[(a2 >> 8) & 0xF]; a3[3] = my_wc_mb_filename_hex[(unsigned __int8)a2 >> 4]; a3[4] = my_wc_mb_filename_hex[a2 & 0xF]; return 5; } else { return (unsigned int)-105; } } else { return (unsigned int)-103; } } else { return (unsigned int)-101; } }
my_wc_mb_filename: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001ba0aa MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001ba315 LAB_001ba0aa: CMP qword ptr [RBP + -0x18],0x80 JNC 0x001ba0e0 MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x307c60] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x0 JZ 0x001ba0e0 MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x001ba315 LAB_001ba0e0: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001ba0fa MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x001ba315 LAB_001ba0fa: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV byte ptr [RAX],0x40 CMP qword ptr [RBP + -0x18],0xc0 JC 0x001ba142 CMP qword ptr [RBP + -0x18],0x5ff JA 0x001ba142 MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0xc0 LEA RAX,[0x30ae20] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001ba20e LAB_001ba142: CMP qword ptr [RBP + -0x18],0x1e00 JC 0x001ba178 CMP qword ptr [RBP + -0x18],0x1fff JA 0x001ba178 MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0x1e00 LEA RAX,[0x4ebee0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001ba20e LAB_001ba178: CMP qword ptr [RBP + -0x18],0x2160 JC 0x001ba1aa CMP qword ptr [RBP + -0x18],0x217f JA 0x001ba1aa MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0x2160 LEA RAX,[0x30ace0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001ba20e LAB_001ba1aa: CMP qword ptr [RBP + -0x18],0x24b0 JC 0x001ba1dc CMP qword ptr [RBP + -0x18],0x24ef JA 0x001ba1dc MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0x24b0 LEA RAX,[0x30ad20] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001ba20e LAB_001ba1dc: CMP qword ptr [RBP + -0x18],0xff20 JC 0x001ba25c CMP qword ptr [RBP + -0x18],0xff5f JA 0x001ba25c MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0xff20 LEA RAX,[0x30ada0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x001ba25c LAB_001ba20e: MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,0x50 CDQ IDIV ECX ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,0x50 CDQ IDIV ECX ADD EDX,0x30 MOV CL,DL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x3 JMP 0x001ba315 LAB_001ba25c: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001ba276 MOV dword ptr [RBP + -0x4],0xffffff97 JMP 0x001ba315 LAB_001ba276: MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0xc AND RCX,0xf LEA RAX,[0x30acc0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x8 AND RCX,0xf LEA RAX,[0x30acc0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x4 AND RCX,0xf LEA RAX,[0x30acc0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x18] AND RCX,0xf LEA RAX,[0x30acc0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x5 LAB_001ba315: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_filename(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { uint local_34; int4 local_c; if (param_3 < param_4) { if ((param_2 < 0x80) && (filename_safe_char[param_2] != '\0')) { *param_3 = (char)param_2; local_c = 1; } else if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { *param_3 = 0x40; if ((((((param_2 < 0xc0) || (0x5ff < param_2)) || (local_34 = (uint)*(ushort *)(uni_0C00_05FF + (param_2 - 0xc0) * 2), local_34 == 0)) && (((param_2 < 0x1e00 || (0x1fff < param_2)) || (local_34 = (uint)*(ushort *)(uni_1E00_1FFF + (param_2 - 0x1e00) * 2), local_34 == 0)))) && (((param_2 < 0x2160 || (0x217f < param_2)) || (local_34 = (uint)*(ushort *)(uni_2160_217F + (param_2 - 0x2160) * 2), local_34 == 0)) )) && ((((param_2 < 0x24b0 || (0x24ef < param_2)) || (local_34 = (uint)*(ushort *)(uni_24B0_24EF + (param_2 - 0x24b0) * 2), local_34 == 0)) && (((param_2 < 0xff20 || (0xff5f < param_2)) || (local_34 = (uint)*(ushort *)(uni_FF20_FF5F + (param_2 - 0xff20) * 2), local_34 == 0)))))) { if (param_4 < param_3 + 5) { local_c = 0xffffff97; } else { param_3[1] = "0123456789abcdef"[param_2 >> 0xc & 0xf]; param_3[2] = "0123456789abcdef"[param_2 >> 8 & 0xf]; param_3[3] = "0123456789abcdef"[param_2 >> 4 & 0xf]; param_3[4] = "0123456789abcdef"[param_2 & 0xf]; local_c = 5; } } else { param_3[1] = (char)(local_34 / 0x50) + '0'; param_3[2] = (char)(local_34 % 0x50) + '0'; local_c = 3; } } } else { local_c = 0xffffff9b; } return local_c; }