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
45,400
google::protobuf::DescriptorProto_ExtensionRange::InternalSwap(google::protobuf::DescriptorProto_ExtensionRange*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void DescriptorProto_ExtensionRange::InternalSwap(DescriptorProto_ExtensionRange* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, _impl_.end_) + sizeof(DescriptorProto_ExtensionRange::_impl_.end_) - PROTOBUF_FIELD_OFFSET(DescriptorProto_ExtensionRange, _impl_.options_)>( reinterpret_cast<char*>(&_impl_.options_), reinterpret_cast<char*>(&other->_impl_.options_)); }
O0
cpp
google::protobuf::DescriptorProto_ExtensionRange::InternalSwap(google::protobuf::DescriptorProto_ExtensionRange*): subq $0x48, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rcx movq %rcx, (%rsp) addq $0x8, %rcx movq 0x8(%rsp), %rax addq $0x8, %rax movq %rcx, 0x20(%rsp) movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x93960 movq (%rsp), %rax addq $0x10, %rax movq %rax, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movq 0x40(%rsp), %rdi movslq 0x3c(%rsp), %rax shlq $0x2, %rax addq %rax, %rdi movq 0x8(%rsp), %rax addq $0x10, %rax movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movq 0x30(%rsp), %rsi movslq 0x2c(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi callq 0x96ed0 movq (%rsp), %rdi addq $0x10, %rdi addq $0x8, %rdi movq 0x8(%rsp), %rsi addq $0x10, %rsi addq $0x8, %rsi callq 0x155ef0 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf30DescriptorProto_ExtensionRange12InternalSwapEPS1_: sub rsp, 48h mov [rsp+48h+var_38], rdi mov [rsp+48h+var_40], rsi mov rcx, [rsp+48h+var_38] mov [rsp+48h+var_48], rcx add rcx, 8 mov rax, [rsp+48h+var_40] add rax, 8 mov [rsp+48h+var_28], rcx mov [rsp+48h+var_30], rax mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_30] call __ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rax, [rsp+48h+var_48] add rax, 10h mov [rsp+48h+var_8], rax mov [rsp+48h+var_C], 0 mov rdi, [rsp+48h+var_8] movsxd rax, [rsp+48h+var_C] shl rax, 2 add rdi, rax mov rax, [rsp+48h+var_40] add rax, 10h mov [rsp+48h+var_18], rax mov [rsp+48h+var_1C], 0 mov rsi, [rsp+48h+var_18] movsxd rax, [rsp+48h+var_1C] shl rax, 2 add rsi, rax call __ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rdi, [rsp+48h+var_48] add rdi, 10h add rdi, 8 mov rsi, [rsp+48h+var_40] add rsi, 10h add rsi, 8 call _ZN6google8protobuf8internal7memswapILi16EEENSt9enable_ifIXaageT_Lm16EltT_lsLj1ELi31EEvE4typeEPcS6_; google::protobuf::internal::memswap<16>(char *,char *) add rsp, 48h retn
long long google::protobuf::DescriptorProto_ExtensionRange::InternalSwap( google::protobuf::DescriptorProto_ExtensionRange *this, google::protobuf::DescriptorProto_ExtensionRange *a2) { std::swap<long>((char *)this + 8, (char *)a2 + 8); std::swap<unsigned int>((char *)this + 16, (char *)a2 + 16); return google::protobuf::internal::memswap<16>((long long *)this + 3, (long long *)a2 + 3); }
MutableRepeatedFieldInternal<unsigned_long>: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP],RDX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP] MOV ECX,0x4 MOV R8D,0xffffffff XOR EAX,EAX MOV R9D,EAX CALL 0x002b5f70 ADD RSP,0x18 RET
/* google::protobuf::RepeatedField<unsigned long>* google::protobuf::Reflection::MutableRepeatedFieldInternal<unsigned long>(google::protobuf::Message*, google::protobuf::FieldDescriptor const*) const */ RepeatedField * __thiscall google::protobuf::Reflection::MutableRepeatedFieldInternal<unsigned_long> (Reflection *this,Message *param_1,FieldDescriptor *param_2) { RepeatedField *pRVar1; pRVar1 = (RepeatedField *)MutableRawRepeatedField(this,param_1,param_2,4,0xffffffff,0); return pRVar1; }
45,401
my_coll_lexem_num_to_str
eloqsql/strings/ctype-uca.c
static const char * my_coll_lexem_num_to_str(my_coll_lexem_num term) { switch (term) { case MY_COLL_LEXEM_EOF: return "EOF"; case MY_COLL_LEXEM_SHIFT: return "Shift"; case MY_COLL_LEXEM_RESET: return "&"; case MY_COLL_LEXEM_CHAR: return "Character"; case MY_COLL_LEXEM_OPTION: return "Bracket option"; case MY_COLL_LEXEM_EXTEND: return "/"; case MY_COLL_LEXEM_CONTEXT:return "|"; case MY_COLL_LEXEM_ERROR: return "ERROR"; } return NULL; }
O0
c
my_coll_lexem_num_to_str: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x9, %rax ja 0xa11d0 movq -0x18(%rbp), %rax leaq 0xf7615(%rip), %rcx # 0x198774 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x31071(%rip), %rax # 0xd21e0 movq %rax, -0x8(%rbp) jmp 0xa11d8 leaq 0x31068(%rip), %rax # 0xd21e4 movq %rax, -0x8(%rbp) jmp 0xa11d8 leaq 0x311e0(%rip), %rax # 0xd2369 movq %rax, -0x8(%rbp) jmp 0xa11d8 leaq 0x31054(%rip), %rax # 0xd21ea movq %rax, -0x8(%rbp) jmp 0xa11d8 leaq 0x31051(%rip), %rax # 0xd21f4 movq %rax, -0x8(%rbp) jmp 0xa11d8 leaq 0x30abd(%rip), %rax # 0xd1c6d movq %rax, -0x8(%rbp) jmp 0xa11d8 leaq 0x2b566(%rip), %rax # 0xcc723 movq %rax, -0x8(%rbp) jmp 0xa11d8 leaq 0x2f7af(%rip), %rax # 0xd0979 movq %rax, -0x8(%rbp) jmp 0xa11d8 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nop
my_coll_lexem_num_to_str: push rbp mov rbp, rsp mov [rbp+var_C], edi mov eax, [rbp+var_C] mov [rbp+var_18], rax sub rax, 9; switch 10 cases ja short def_A1166; jumptable 00000000000A1166 default case, cases 2,3 mov rax, [rbp+var_18] lea rcx, jpt_A1166 movsxd rax, ds:(jpt_A1166 - 198774h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_A1168: lea rax, aEof; jumptable 00000000000A1166 case 0 mov [rbp+var_8], rax jmp short loc_A11D8 loc_A1175: lea rax, aShift; jumptable 00000000000A1166 case 1 mov [rbp+var_8], rax jmp short loc_A11D8 loc_A1182: lea rax, asc_D2368+1; jumptable 00000000000A1166 case 4 mov [rbp+var_8], rax jmp short loc_A11D8 loc_A118F: lea rax, aCharacter; jumptable 00000000000A1166 case 5 mov [rbp+var_8], rax jmp short loc_A11D8 loc_A119C: lea rax, aBracketOption; jumptable 00000000000A1166 case 7 mov [rbp+var_8], rax jmp short loc_A11D8 loc_A11A9: lea rax, unk_D1C6D; jumptable 00000000000A1166 case 8 mov [rbp+var_8], rax jmp short loc_A11D8 loc_A11B6: lea rax, aS_0+6; jumptable 00000000000A1166 case 9 mov [rbp+var_8], rax jmp short loc_A11D8 loc_A11C3: lea rax, aError; jumptable 00000000000A1166 case 6 mov [rbp+var_8], rax jmp short loc_A11D8 def_A1166: mov [rbp+var_8], 0; jumptable 00000000000A1166 default case, cases 2,3 loc_A11D8: mov rax, [rbp+var_8] pop rbp retn
char * my_coll_lexem_num_to_str(int a1) { char *v2; // [rsp+10h] [rbp-8h] switch ( a1 ) { case 0: v2 = "EOF"; break; case 1: v2 = "Shift"; break; case 4: v2 = "&"; break; case 5: v2 = "Character"; break; case 6: v2 = "ERROR"; break; case 7: v2 = "Bracket option"; break; case 8: v2 = (char *)&unk_D1C6D; break; case 9: v2 = "|"; break; default: v2 = 0LL; break; } return v2; }
my_coll_lexem_num_to_str: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x9 JA 0x001a11d0 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x298774] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[0x1d21e0] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_1: LEA RAX,[0x1d21e4] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_4: LEA RAX,[0x1d2369] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_5: LEA RAX,[0x1d21ea] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_7: LEA RAX,[0x1d21f4] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_8: LEA RAX,[0x1d1c6d] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_9: LEA RAX,[0x1cc723] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_6: LEA RAX,[0x1d0979] MOV qword ptr [RBP + -0x8],RAX JMP 0x001a11d8 caseD_2: MOV qword ptr [RBP + -0x8],0x0 LAB_001a11d8: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * my_coll_lexem_num_to_str(int4 param_1) { char *local_10; switch(param_1) { case 0: local_10 = "EOF"; break; case 1: local_10 = "Shift"; break; default: local_10 = (char *)0x0; break; case 4: local_10 = "&"; break; case 5: local_10 = "Character"; break; case 6: local_10 = "ERROR"; break; case 7: local_10 = "Bracket option"; break; case 8: local_10 = "/"; break; case 9: local_10 = "|"; } return local_10; }
45,402
myisam_log_command
eloqsql/storage/myisam/mi_log.c
void _myisam_log_command(enum myisam_log_commands command, MI_INFO *info, const uchar *buffert, uint length, int result) { uchar buff[9]; int error,old_errno; ulong pid=(ulong) GETPID(); old_errno=my_errno; buff[0]=(char) command; mi_int2store(buff+1,info->dfile); mi_int4store(buff+3,pid); mi_int2store(buff+7,result); mysql_mutex_lock(&THR_LOCK_myisam); error=my_lock(myisam_log_file,F_WRLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)); (void) mysql_file_write(myisam_log_file, buff, sizeof(buff), MYF(0)); if (buffert) (void) mysql_file_write(myisam_log_file, buffert, length, MYF(0)); if (!error) error=my_lock(myisam_log_file,F_UNLCK,0L,F_TO_EOF,MYF(MY_SEEK_NOT_DONE)); mysql_mutex_unlock(&THR_LOCK_myisam); my_errno=old_errno; }
O0
c
myisam_log_command: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) movl %ecx, -0x2c(%rbp) movl %r8d, -0x30(%rbp) cmpl $0x1, 0xbc7aaa(%rip) # 0xc78f98 jne 0xb14fd movq 0xbc7a99(%rip), %rax # 0xc78f90 movq %rax, -0x60(%rbp) jmp 0xb1506 callq 0xf5bf0 movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x40(%rbp) callq 0xf55f0 movl (%rax), %eax movl %eax, -0x38(%rbp) movl -0x18(%rbp), %eax movb %al, -0x11(%rbp) movq -0x20(%rbp), %rax movl 0x1c0(%rax), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax movb %al, -0xf(%rbp) movl -0x44(%rbp), %eax shrl $0x8, %eax movb %al, -0x10(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb %al, -0xb(%rbp) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, -0xc(%rbp) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, -0xd(%rbp) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, -0xe(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movb %al, -0x9(%rbp) movl -0x54(%rbp), %eax shrl $0x8, %eax movb %al, -0xa(%rbp) leaq 0xbd07ca(%rip), %rdi # 0xc81d50 leaq 0xa143d(%rip), %rsi # 0x1529ca movl $0x69, %edx callq 0xb1280 leaq 0x20cbf2(%rip), %rax # 0x2be190 movl (%rax), %edi movl $0x1, %esi xorl %eax, %eax movl %eax, %ecx movl $0x20, %r8d movq %rcx, %rdx callq 0xf2b00 movl %eax, -0x34(%rbp) leaq 0x20cbcf(%rip), %rax # 0x2be190 movl (%rax), %edx leaq -0x11(%rbp), %rcx leaq 0xa13fc(%rip), %rdi # 0x1529ca movl $0x6b, %esi movl $0x9, %r8d xorl %eax, %eax movl %eax, %r9d callq 0xb12f0 cmpq $0x0, -0x28(%rbp) je 0xb1613 leaq 0x20cb9f(%rip), %rax # 0x2be190 movl (%rax), %edx movq -0x28(%rbp), %rcx movl -0x2c(%rbp), %eax movl %eax, %r8d leaq 0xa13c6(%rip), %rdi # 0x1529ca movl $0x6d, %esi xorl %eax, %eax movl %eax, %r9d callq 0xb12f0 cmpl $0x0, -0x34(%rbp) jne 0xb163c leaq 0x20cb70(%rip), %rax # 0x2be190 movl (%rax), %edi movl $0x2, %esi xorl %eax, %eax movl %eax, %ecx movl $0x20, %r8d movq %rcx, %rdx callq 0xf2b00 movl %eax, -0x34(%rbp) leaq 0xbd070d(%rip), %rdi # 0xc81d50 callq 0xb1460 movl -0x38(%rbp), %eax movl %eax, -0x64(%rbp) callq 0xf55f0 movl -0x64(%rbp), %ecx movl %ecx, (%rax) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xb1670 addq $0x70, %rsp popq %rbp retq callq 0x2a260 nopw %cs:(%rax,%rax)
_myisam_log_command: push rbp mov rbp, rsp sub rsp, 70h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], edi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov [rbp+var_2C], ecx mov [rbp+var_30], r8d cmp cs:log_type, 1 jnz short loc_B14FD mov rax, cs:myisam_pid mov [rbp+var_60], rax jmp short loc_B1506 loc_B14FD: call my_thread_dbug_id mov [rbp+var_60], rax loc_B1506: mov rax, [rbp+var_60] mov [rbp+var_40], rax call _my_thread_var mov eax, [rax] mov [rbp+var_38], eax mov eax, [rbp+var_18] mov [rbp+var_11], al mov rax, [rbp+var_20] mov eax, [rax+1C0h] mov [rbp+var_44], eax mov eax, [rbp+var_44] mov [rbp+var_F], al mov eax, [rbp+var_44] shr eax, 8 mov [rbp+var_10], al mov rax, [rbp+var_40] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov [rbp+var_B], al mov rax, [rbp+var_50] shr rax, 8 mov [rbp+var_C], al mov rax, [rbp+var_50] shr rax, 10h mov [rbp+var_D], al mov rax, [rbp+var_50] shr rax, 18h mov [rbp+var_E], al mov eax, [rbp+var_30] mov [rbp+var_54], eax mov eax, [rbp+var_54] mov [rbp+var_9], al mov eax, [rbp+var_54] shr eax, 8 mov [rbp+var_A], al lea rdi, THR_LOCK_myisam lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 69h ; 'i' call inline_mysql_mutex_lock_18 lea rax, myisam_log_file mov edi, [rax] mov esi, 1 xor eax, eax mov ecx, eax mov r8d, 20h ; ' ' mov rdx, rcx call my_lock mov [rbp+var_34], eax lea rax, myisam_log_file mov edx, [rax] lea rcx, [rbp+var_11] lea rdi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 6Bh ; 'k' mov r8d, 9 xor eax, eax mov r9d, eax call inline_mysql_file_write_1 cmp [rbp+var_28], 0 jz short loc_B1613 lea rax, myisam_log_file mov edx, [rax] mov rcx, [rbp+var_28] mov eax, [rbp+var_2C] mov r8d, eax lea rdi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 6Dh ; 'm' xor eax, eax mov r9d, eax call inline_mysql_file_write_1 loc_B1613: cmp [rbp+var_34], 0 jnz short loc_B163C lea rax, myisam_log_file mov edi, [rax] mov esi, 2 xor eax, eax mov ecx, eax mov r8d, 20h ; ' ' mov rdx, rcx call my_lock mov [rbp+var_34], eax loc_B163C: lea rdi, THR_LOCK_myisam call inline_mysql_mutex_unlock_19 mov eax, [rbp+var_38] mov [rbp+var_64], eax call _my_thread_var mov ecx, [rbp+var_64] mov [rax], ecx mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_B1670 add rsp, 70h pop rbp retn loc_B1670: call ___stack_chk_fail
unsigned long long myisam_log_command(char a1, long long a2, long long a3, unsigned int a4, __int16 a5, double a6) { __int16 v6; // kr00_2 int v8; // [rsp+10h] [rbp-60h] int v9; // [rsp+38h] [rbp-38h] int v10; // [rsp+3Ch] [rbp-34h] _BYTE v14[9]; // [rsp+5Fh] [rbp-11h] BYREF unsigned long long v15; // [rsp+68h] [rbp-8h] v15 = __readfsqword(0x28u); if ( log_type == 1 ) v8 = myisam_pid; else v8 = my_thread_dbug_id(); v9 = *(_DWORD *)my_thread_var(a6); v14[0] = a1; v6 = *(_DWORD *)(a2 + 448); v14[1] = HIBYTE(v6); v14[2] = v6; v14[5] = BYTE1(v8); v14[6] = v8; v14[3] = HIBYTE(v8); v14[4] = BYTE2(v8); v14[7] = HIBYTE(a5); v14[8] = a5; inline_mysql_mutex_lock_18( (long long)&THR_LOCK_myisam, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c", 0x69u); v10 = my_lock(myisam_log_file, 1LL, 0LL, 0LL, 32LL); inline_mysql_file_write_1( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c", 0x6Bu, myisam_log_file, (long long)v14, 9LL, 0LL); if ( a3 ) inline_mysql_file_write_1( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c", 0x6Du, myisam_log_file, a3, a4, 0LL); if ( !v10 ) my_lock(myisam_log_file, 2LL, 0LL, 0LL, 32LL); inline_mysql_mutex_unlock_19((long long)&THR_LOCK_myisam); *(_DWORD *)my_thread_var(a6) = v9; return __readfsqword(0x28u); }
_myisam_log_command: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x18],EDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x2c],ECX MOV dword ptr [RBP + -0x30],R8D CMP dword ptr [0x00d78f98],0x1 JNZ 0x001b14fd MOV RAX,qword ptr [0x00d78f90] MOV qword ptr [RBP + -0x60],RAX JMP 0x001b1506 LAB_001b14fd: CALL 0x001f5bf0 MOV qword ptr [RBP + -0x60],RAX LAB_001b1506: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x40],RAX CALL 0x001f55f0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x11],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x1c0] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] MOV byte ptr [RBP + -0xf],AL MOV EAX,dword ptr [RBP + -0x44] SHR EAX,0x8 MOV byte ptr [RBP + -0x10],AL MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV byte ptr [RBP + -0xd],AL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV byte ptr [RBP + -0xe],AL MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x54],EAX MOV EAX,dword ptr [RBP + -0x54] MOV byte ptr [RBP + -0x9],AL MOV EAX,dword ptr [RBP + -0x54] SHR EAX,0x8 MOV byte ptr [RBP + -0xa],AL LEA RDI,[0xd81d50] LEA RSI,[0x2529ca] MOV EDX,0x69 CALL 0x001b1280 LEA RAX,[0x3be190] MOV EDI,dword ptr [RAX] MOV ESI,0x1 XOR EAX,EAX MOV ECX,EAX MOV R8D,0x20 MOV RDX,RCX CALL 0x001f2b00 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3be190] MOV EDX,dword ptr [RAX] LEA RCX,[RBP + -0x11] LEA RDI,[0x2529ca] MOV ESI,0x6b MOV R8D,0x9 XOR EAX,EAX MOV R9D,EAX CALL 0x001b12f0 CMP qword ptr [RBP + -0x28],0x0 JZ 0x001b1613 LEA RAX,[0x3be190] MOV EDX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x2c] MOV R8D,EAX LEA RDI,[0x2529ca] MOV ESI,0x6d XOR EAX,EAX MOV R9D,EAX CALL 0x001b12f0 LAB_001b1613: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x001b163c LEA RAX,[0x3be190] MOV EDI,dword ptr [RAX] MOV ESI,0x2 XOR EAX,EAX MOV ECX,EAX MOV R8D,0x20 MOV RDX,RCX CALL 0x001f2b00 MOV dword ptr [RBP + -0x34],EAX LAB_001b163c: LEA RDI,[0xd81d50] CALL 0x001b1460 MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x64],EAX CALL 0x001f55f0 MOV ECX,dword ptr [RBP + -0x64] MOV dword ptr [RAX],ECX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001b1670 ADD RSP,0x70 POP RBP RET LAB_001b1670: CALL 0x0012a260
void _myisam_log_command(int1 param_1,long param_2,long param_3,int4 param_4, int4 param_5) { int4 uVar1; int iVar2; int4 *puVar3; long in_FS_OFFSET; int4 local_68; int1 local_19; int1 local_18; int1 local_17; int1 local_16; int1 local_15; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (log_type == 1) { local_68 = (int4)myisam_pid; } else { local_68 = my_thread_dbug_id(); } puVar3 = (int4 *)_my_thread_var(); uVar1 = *puVar3; local_17 = (int1)*(int4 *)(param_2 + 0x1c0); local_18 = (int1)((uint)*(int4 *)(param_2 + 0x1c0) >> 8); local_13 = (int1)local_68; local_14 = (int1)((uint)local_68 >> 8); local_15 = (int1)((uint)local_68 >> 0x10); local_16 = (int1)((uint)local_68 >> 0x18); local_11 = (int1)param_5; local_12 = (int1)((uint)param_5 >> 8); local_19 = param_1; inline_mysql_mutex_lock (THR_LOCK_myisam,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x69 ); iVar2 = my_lock(myisam_log_file,1,0,0,0x20); inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x6b,myisam_log_file ,&local_19,9,0); if (param_3 != 0) { inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_log.c",0x6d, myisam_log_file,param_3,param_4,0); } if (iVar2 == 0) { my_lock(myisam_log_file,2,0,0,0x20); } inline_mysql_mutex_unlock(THR_LOCK_myisam); puVar3 = (int4 *)_my_thread_var(); *puVar3 = uVar1; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
45,403
js_generator_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_generator_function_call(JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags) { JSValue obj, func_ret; JSGeneratorData *s; s = js_mallocz(ctx, sizeof(*s)); if (!s) return JS_EXCEPTION; s->state = JS_GENERATOR_STATE_SUSPENDED_START; if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) { s->state = JS_GENERATOR_STATE_COMPLETED; goto fail; } /* execute the function up to 'OP_initial_yield' */ func_ret = async_func_resume(ctx, &s->func_state); if (JS_IsException(func_ret)) goto fail; JS_FreeValue(ctx, func_ret); obj = js_create_from_ctor(ctx, func_obj, JS_CLASS_GENERATOR); if (JS_IsException(obj)) goto fail; JS_SetOpaqueInternal(obj, s); return obj; fail: free_generator_stack_rt(ctx->rt, s); js_free(ctx, s); return JS_EXCEPTION; }
O1
c
js_generator_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %r12d movq %r8, %r13 movq %rcx, %rbp movq %rdx, 0x10(%rsp) movq %rsi, %rbx movq %rdi, %r15 pushq $0x70 popq %rsi callq 0xed7d pushq $0x6 popq %rdx testq %rax, %rax jne 0xee69 xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 andl $0x0, (%rax) movq 0x50(%rsp), %rax movq %r14, %rsi addq $0x8, %rsi movq %r15, %rdi movq %rsi, 0x8(%rsp) movq %rbx, %rdx movq 0x10(%rsp), %rcx movq %rbp, %r8 movq %r13, %r9 pushq %rax pushq %r12 callq 0x10b57 popq %rcx popq %rdx testl %eax, %eax je 0xeead movl $0x4, (%r14) movq 0x8(%rsp), %r12 jmp 0xeeec movq %rbx, %r13 movq 0x10(%rsp), %rbx movq %r15, %rdi movq 0x8(%rsp), %r12 movq %r12, %rsi callq 0x42542 cmpl $0x6, %edx je 0xeeec movq 0x18(%r15), %rdi movq %rax, %rsi callq 0x1ccb2 pushq $0x2f popq %rcx movq %r15, %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x36142 cmpl $0x6, %edx jne 0xef3a cmpl $0x4, (%r14) je 0xef05 movq 0x18(%r15), %rdi movq %r12, %rsi callq 0x3a8b6 movl $0x4, (%r14) movq 0x18(%r15), %r15 decq 0x28(%r15) movq %r14, %rdi callq *0x20(%r15) movq 0x30(%r15), %rcx movq 0x40(%r15), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r15) movq %r14, %rsi callq *0x10(%r15) xorl %eax, %eax xorl %ecx, %ecx pushq $0x6 popq %rdx jmp 0xee57 movq %r14, 0x30(%rax) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0xee57
js_generator_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12d, r9d mov r13, r8 mov rbp, rcx mov [rsp+48h+var_38], rdx mov rbx, rsi mov r15, rdi push 70h ; 'p' pop rsi call js_mallocz push 6 pop rdx test rax, rax jnz short loc_EE69 xor eax, eax xor ecx, ecx loc_EE57: or rax, rcx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_EE69: mov r14, rax and dword ptr [rax], 0 mov rax, [rsp+48h+arg_0] mov rsi, r14 add rsi, 8 mov rdi, r15 mov [rsp+48h+var_40], rsi mov rdx, rbx mov rcx, [rsp+48h+var_38] mov r8, rbp mov r9, r13 push rax push r12 call async_func_init pop rcx pop rdx test eax, eax jz short loc_EEAD mov dword ptr [r14], 4 mov r12, [rsp+48h+var_40] jmp short loc_EEEC loc_EEAD: mov r13, rbx mov rbx, [rsp+48h+var_38] mov rdi, r15 mov r12, [rsp+48h+var_40] mov rsi, r12 call async_func_resume cmp edx, 6 jz short loc_EEEC mov rdi, [r15+18h] mov rsi, rax call JS_FreeValueRT push 2Fh ; '/' pop rcx mov rdi, r15 mov rsi, r13 mov rdx, rbx call js_create_from_ctor cmp edx, 6 jnz short loc_EF3A loc_EEEC: cmp dword ptr [r14], 4 jz short loc_EF05 mov rdi, [r15+18h] mov rsi, r12 call async_func_free mov dword ptr [r14], 4 loc_EF05: mov r15, [r15+18h] dec qword ptr [r15+28h] mov rdi, r14 call qword ptr [r15+20h] mov rcx, [r15+30h] mov rdi, [r15+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r15+30h], rcx mov rsi, r14 call qword ptr [r15+10h] xor eax, eax xor ecx, ecx push 6 pop rdx jmp loc_EE57 loc_EF3A: mov [rax+30h], r14 mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp loc_EE57
unsigned long long js_generator_function_call( long long a1, _DWORD *a2, long long a3, int a4, int a5, int a6, long long a7) { _DWORD *v11; // rax long long v12; // rax unsigned long long v13; // rcx _DWORD *v15; // r14 _DWORD *v16; // rsi int v17; // eax long long v18; // rdx _DWORD *v19; // r12 long long v20; // rax long long v21; // r15 long long v22; // rax long long v23; // rdi long long v24; // [rsp-8h] [rbp-50h] _DWORD *v25; // [rsp+8h] [rbp-40h] v11 = (_DWORD *)js_mallocz(a1, 0x70uLL); if ( v11 ) { v15 = v11; *v11 = 0; v16 = v11 + 2; v25 = v11 + 2; v17 = async_func_init(a1, (int)v11 + 8, (_DWORD)a2, a3, a4, a5, a6, a7); v18 = v24; if ( v17 ) { *v15 = 4; v19 = v25; } else { v19 = v25; v16 = v25; v20 = async_func_resume(a1, v25, v24); if ( (_DWORD)v18 != 6 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v20); v16 = a2; v12 = js_create_from_ctor(a1, a2, a3, 47LL); if ( (_DWORD)v18 != 6 ) { *(_QWORD *)(v12 + 48) = v15; v13 = v12 & 0xFFFFFFFF00000000LL; v12 = (unsigned int)v12; return v13 | v12; } } } if ( *v15 != 4 ) { v16 = v19; async_func_free(*(_QWORD *)(a1 + 24), v19, v18); *v15 = 4; } v21 = *(_QWORD *)(a1 + 24); --*(_QWORD *)(v21 + 40); v22 = (*(long long ( **)(_DWORD *, _DWORD *, long long))(v21 + 32))(v15, v16, v18); v23 = *(_QWORD *)(v21 + 64); *(_QWORD *)(v21 + 48) = *(_QWORD *)(v21 + 48) - v22 - 8; (*(void ( **)(long long, _DWORD *))(v21 + 16))(v23, v15); v12 = 0LL; v13 = 0LL; } else { v12 = 0LL; v13 = 0LL; } return v13 | v12; }
js_generator_function_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12D,R9D MOV R13,R8 MOV RBP,RCX MOV qword ptr [RSP + 0x10],RDX MOV RBX,RSI MOV R15,RDI PUSH 0x70 POP RSI CALL 0x0010ed7d PUSH 0x6 POP RDX TEST RAX,RAX JNZ 0x0010ee69 XOR EAX,EAX XOR ECX,ECX LAB_0010ee57: OR RAX,RCX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010ee69: MOV R14,RAX AND dword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x50] MOV RSI,R14 ADD RSI,0x8 MOV RDI,R15 MOV qword ptr [RSP + 0x8],RSI MOV RDX,RBX MOV RCX,qword ptr [RSP + 0x10] MOV R8,RBP MOV R9,R13 PUSH RAX PUSH R12 CALL 0x00110b57 POP RCX POP RDX TEST EAX,EAX JZ 0x0010eead MOV dword ptr [R14],0x4 MOV R12,qword ptr [RSP + 0x8] JMP 0x0010eeec LAB_0010eead: MOV R13,RBX MOV RBX,qword ptr [RSP + 0x10] MOV RDI,R15 MOV R12,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x00142542 CMP EDX,0x6 JZ 0x0010eeec MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RAX CALL 0x0011ccb2 PUSH 0x2f POP RCX MOV RDI,R15 MOV RSI,R13 MOV RDX,RBX CALL 0x00136142 CMP EDX,0x6 JNZ 0x0010ef3a LAB_0010eeec: CMP dword ptr [R14],0x4 JZ 0x0010ef05 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R12 CALL 0x0013a8b6 MOV dword ptr [R14],0x4 LAB_0010ef05: MOV R15,qword ptr [R15 + 0x18] DEC qword ptr [R15 + 0x28] MOV RDI,R14 CALL qword ptr [R15 + 0x20] MOV RCX,qword ptr [R15 + 0x30] MOV RDI,qword ptr [R15 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R15 + 0x30],RCX MOV RSI,R14 CALL qword ptr [R15 + 0x10] XOR EAX,EAX XOR ECX,ECX PUSH 0x6 POP RDX JMP 0x0010ee57 LAB_0010ef3a: MOV qword ptr [RAX + 0x30],R14 MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX JMP 0x0010ee57
ulong js_generator_function_call (long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int4 param_6,int8 param_7) { long lVar1; int iVar2; int *piVar3; ulong uVar4; long lVar5; ulong uVar6; int *piVar7; int1 auVar8 [12]; piVar3 = (int *)js_mallocz(param_1,0x70); if (piVar3 == (int *)0x0) { uVar4 = 0; uVar6 = 0; } else { *piVar3 = 0; piVar7 = piVar3 + 2; iVar2 = async_func_init(param_1,piVar7,param_2,param_3,param_4,param_5); if (iVar2 == 0) { auVar8 = async_func_resume(param_1,piVar7,param_7,param_6); if (auVar8._8_4_ != 6) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar8._0_8_); auVar8 = js_create_from_ctor(param_1,param_2,param_3,0x2f); uVar4 = auVar8._0_8_; if (auVar8._8_4_ != 6) { *(int **)(uVar4 + 0x30) = piVar3; uVar6 = uVar4 & 0xffffffff00000000; uVar4 = uVar4 & 0xffffffff; goto LAB_0010ee57; } } } else { *piVar3 = 4; } if (*piVar3 != 4) { async_func_free(*(int8 *)(param_1 + 0x18),piVar7); *piVar3 = 4; } lVar1 = *(long *)(param_1 + 0x18); *(long *)(lVar1 + 0x28) = *(long *)(lVar1 + 0x28) + -1; lVar5 = (**(code **)(lVar1 + 0x20))(piVar3); *(long *)(lVar1 + 0x30) = (*(long *)(lVar1 + 0x30) - lVar5) + -8; (**(code **)(lVar1 + 0x10))(*(int8 *)(lVar1 + 0x40),piVar3); uVar4 = 0; uVar6 = 0; } LAB_0010ee57: return uVar4 | uVar6; }
45,404
js_generator_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_generator_function_call(JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags) { JSValue obj, func_ret; JSGeneratorData *s; s = js_mallocz(ctx, sizeof(*s)); if (!s) return JS_EXCEPTION; s->state = JS_GENERATOR_STATE_SUSPENDED_START; if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) { s->state = JS_GENERATOR_STATE_COMPLETED; goto fail; } /* execute the function up to 'OP_initial_yield' */ func_ret = async_func_resume(ctx, &s->func_state); if (JS_IsException(func_ret)) goto fail; JS_FreeValue(ctx, func_ret); obj = js_create_from_ctor(ctx, func_obj, JS_CLASS_GENERATOR); if (JS_IsException(obj)) goto fail; JS_SetOpaqueInternal(obj, s); return obj; fail: free_generator_stack_rt(ctx->rt, s); js_free(ctx, s); return JS_EXCEPTION; }
O2
c
js_generator_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r15d movq %r8, (%rsp) movq %rcx, %rbp movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r14 pushq $0x70 popq %rsi callq 0x166c5 pushq $0x6 popq %rdx testq %rax, %rax je 0x17072 movq %rax, %r13 andl $0x0, (%rax) movq 0x40(%rsp), %rax movq %r15, %r10 movq %r13, %r15 addq $0x8, %r15 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movq %rbx, %rcx movq %rbp, %r8 movq (%rsp), %r9 pushq %rax pushq %r10 callq 0x3a0eb popq %rcx popq %rdx testl %eax, %eax je 0x17078 movl $0x4, (%r13) jmp 0x170a9 xorl %eax, %eax xorl %ecx, %ecx jmp 0x170c7 movq %r14, %rdi movq %r15, %rsi callq 0x3a24b cmpl $0x6, %edx je 0x170a9 movq %r14, %rdi movq %rax, %rsi callq 0x174a2 pushq $0x2f popq %rcx movq %r14, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x2f8de cmpl $0x6, %edx jne 0x170d9 movq 0x18(%r14), %rdi movq %r13, %rsi callq 0x336db movq %r14, %rdi movq %r13, %rsi callq 0x166f2 xorl %eax, %eax xorl %ecx, %ecx pushq $0x6 popq %rdx orq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, 0x30(%rax) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0x170c7
js_generator_function_call: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15d, r9d mov [rsp+38h+var_38], r8 mov rbp, rcx mov rbx, rdx mov r12, rsi mov r14, rdi push 70h ; 'p' pop rsi call js_mallocz push 6 pop rdx test rax, rax jz short loc_17072 mov r13, rax and dword ptr [rax], 0 mov rax, [rsp+38h+arg_0] mov r10, r15 mov r15, r13 add r15, 8 mov rdi, r14 mov rsi, r15 mov rdx, r12 mov rcx, rbx mov r8, rbp mov r9, [rsp+38h+var_38] push rax push r10 call async_func_init pop rcx pop rdx test eax, eax jz short loc_17078 mov dword ptr [r13+0], 4 jmp short loc_170A9 loc_17072: xor eax, eax xor ecx, ecx jmp short loc_170C7 loc_17078: mov rdi, r14 mov rsi, r15 call async_func_resume cmp edx, 6 jz short loc_170A9 mov rdi, r14 mov rsi, rax call JS_FreeValue push 2Fh ; '/' pop rcx mov rdi, r14 mov rsi, r12 mov rdx, rbx call js_create_from_ctor cmp edx, 6 jnz short loc_170D9 loc_170A9: mov rdi, [r14+18h] mov rsi, r13 call free_generator_stack_rt mov rdi, r14 mov rsi, r13 call js_free xor eax, eax xor ecx, ecx push 6 pop rdx loc_170C7: or rax, rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_170D9: mov [rax+30h], r13 mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp short loc_170C7
unsigned long long js_generator_function_call( long long a1, long long a2, long long a3, int a4, int a5, int a6, long long a7) { _DWORD *v10; // rax _DWORD *v11; // r13 int v12; // eax long long v13; // rdx long long v14; // rax unsigned long long v15; // rcx long long v16; // rax long long v18; // [rsp-8h] [rbp-40h] v10 = (_DWORD *)js_mallocz(a1, 0x70uLL); if ( v10 ) { v11 = v10; *v10 = 0; v12 = async_func_init(a1, (int)v10 + 8, a2, a3, a4, a5, a6, a7); v13 = v18; if ( v12 ) { *v11 = 4; } else { v16 = async_func_resume(a1, v11 + 2, v18); if ( (_DWORD)v13 != 6 ) { JS_FreeValue(a1, v16, v13); v14 = js_create_from_ctor(a1, a2, a3, 47LL); if ( (_DWORD)v13 != 6 ) { *(_QWORD *)(v14 + 48) = v11; v15 = v14 & 0xFFFFFFFF00000000LL; v14 = (unsigned int)v14; return v15 | v14; } } } free_generator_stack_rt(*(_QWORD *)(a1 + 24), v11, v13); js_free(a1, (long long)v11); v14 = 0LL; v15 = 0LL; } else { v14 = 0LL; v15 = 0LL; } return v15 | v14; }
js_generator_function_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15D,R9D MOV qword ptr [RSP],R8 MOV RBP,RCX MOV RBX,RDX MOV R12,RSI MOV R14,RDI PUSH 0x70 POP RSI CALL 0x001166c5 PUSH 0x6 POP RDX TEST RAX,RAX JZ 0x00117072 MOV R13,RAX AND dword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x40] MOV R10,R15 MOV R15,R13 ADD R15,0x8 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV RCX,RBX MOV R8,RBP MOV R9,qword ptr [RSP] PUSH RAX PUSH R10 CALL 0x0013a0eb POP RCX POP RDX TEST EAX,EAX JZ 0x00117078 MOV dword ptr [R13],0x4 JMP 0x001170a9 LAB_00117072: XOR EAX,EAX XOR ECX,ECX JMP 0x001170c7 LAB_00117078: MOV RDI,R14 MOV RSI,R15 CALL 0x0013a24b CMP EDX,0x6 JZ 0x001170a9 MOV RDI,R14 MOV RSI,RAX CALL 0x001174a2 PUSH 0x2f POP RCX MOV RDI,R14 MOV RSI,R12 MOV RDX,RBX CALL 0x0012f8de CMP EDX,0x6 JNZ 0x001170d9 LAB_001170a9: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R13 CALL 0x001336db MOV RDI,R14 MOV RSI,R13 CALL 0x001166f2 XOR EAX,EAX XOR ECX,ECX PUSH 0x6 POP RDX LAB_001170c7: OR RAX,RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001170d9: MOV qword ptr [RAX + 0x30],R13 MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX JMP 0x001170c7
ulong js_generator_function_call (long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int4 param_6,int8 param_7) { int iVar1; int4 *puVar2; ulong uVar3; ulong uVar4; int1 auVar5 [12]; puVar2 = (int4 *)js_mallocz(param_1,0x70); if (puVar2 == (int4 *)0x0) { uVar3 = 0; uVar4 = 0; } else { *puVar2 = 0; iVar1 = async_func_init(param_1,puVar2 + 2,param_2,param_3,param_4,param_5); if (iVar1 == 0) { auVar5 = async_func_resume(param_1,puVar2 + 2,param_7,param_6); if (auVar5._8_4_ != 6) { JS_FreeValue(param_1,auVar5._0_8_); auVar5 = js_create_from_ctor(param_1,param_2,param_3,0x2f); uVar3 = auVar5._0_8_; if (auVar5._8_4_ != 6) { *(int4 **)(uVar3 + 0x30) = puVar2; uVar4 = uVar3 & 0xffffffff00000000; uVar3 = uVar3 & 0xffffffff; goto LAB_001170c7; } } } else { *puVar2 = 4; } free_generator_stack_rt(*(int8 *)(param_1 + 0x18),puVar2); js_free(param_1,puVar2); uVar3 = 0; uVar4 = 0; } LAB_001170c7: return uVar3 | uVar4; }
45,405
ma_ft_segiterator_init
eloqsql/storage/maria/ma_ft_update.c
void _ma_ft_segiterator_init(MARIA_HA *info, uint keynr, const uchar *record, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_ma_ft_segiterator_init"); ftsi->num=info->s->keyinfo[keynr].keysegs; ftsi->seg=info->s->keyinfo[keynr].seg; ftsi->rec=record; ftsi->pos= 0; /* Avoid warnings from gcc */ ftsi->len= 0; /* Avoid warnings from gcc */ DBUG_VOID_RETURN; }
O0
c
ma_ft_segiterator_init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movzwl 0xa0(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq 0xc0(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x20(%rbp), %rax movl $0x0, 0x4(%rax) jmp 0x8c51a popq %rbp retq nopl (%rax)
_ma_ft_segiterator_init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_C] imul rcx, 118h add rax, rcx movzx ecx, word ptr [rax+0A0h] mov rax, [rbp+var_20] mov [rax], ecx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_C] imul rcx, 118h add rax, rcx mov rcx, [rax+0C0h] mov rax, [rbp+var_20] mov [rax+8], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+10h], rcx mov rax, [rbp+var_20] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_20] mov dword ptr [rax+4], 0 jmp short $+2 loc_8C51A: pop rbp retn
long long ma_ft_segiterator_init(long long a1, unsigned int a2, long long a3, long long a4) { long long result; // rax *(_DWORD *)a4 = *(unsigned __int16 *)(280LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 160); *(_QWORD *)(a4 + 8) = *(_QWORD *)(280LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 192); *(_QWORD *)(a4 + 16) = a3; *(_QWORD *)(a4 + 24) = 0LL; result = a4; *(_DWORD *)(a4 + 4) = 0; return result; }
_ma_ft_segiterator_init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x118 ADD RAX,RCX MOVZX ECX,word ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV RCX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x4],0x0 JMP 0x0018c51a LAB_0018c51a: POP RBP RET
void _ma_ft_segiterator_init(long *param_1,uint param_2,int8 param_3,uint *param_4) { *param_4 = (uint)*(ushort *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xa0); *(int8 *)(param_4 + 2) = *(int8 *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0); *(int8 *)(param_4 + 4) = param_3; param_4[6] = 0; param_4[7] = 0; param_4[1] = 0; return; }
45,406
codegen_generate_sequence
eshkol/src/backend/codegen/blocks.c
bool codegen_generate_sequence(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_SEQUENCE); // Get output file FILE* output = codegen_context_get_output(context); // Generate code fprintf(output, "({ "); // Generate expressions for (size_t i = 0; i < node->as.sequence.expr_count; i++) { if (i > 0) { fprintf(output, "; "); } // Generate expression if (!codegen_generate_expression(context, node->as.sequence.exprs[i])) { return false; } } // Close sequence fprintf(output, "; })"); return true; }
O3
c
codegen_generate_sequence: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x8762 movq %rsi, %rbx testq %rsi, %rsi je 0x8781 cmpl $0x1a, (%rbx) jne 0x87a0 movq %rdi, %r14 callq 0x3c55 movq %rax, %r15 leaq 0x8c76(%rip), %rdi # 0x11350 movl $0x3, %esi movl $0x1, %edx movq %rax, %rcx callq 0x1220 cmpq $0x0, 0x50(%rbx) je 0x8734 xorl %r13d, %r13d leaq 0x871e(%rip), %r12 # 0x10e1b testq %r13, %r13 je 0x8717 movl $0x2, %esi movl $0x1, %edx movq %r12, %rdi movq %r15, %rcx callq 0x1220 movq 0x48(%rbx), %rax movq (%rax,%r13,8), %rsi movq %r14, %rdi callq 0x56c0 testb %al, %al je 0x8751 incq %r13 cmpq 0x50(%rbx), %r13 jb 0x86fd leaq 0x8899(%rip), %rdi # 0x10fd4 movl $0x4, %esi movl $0x1, %edx movq %r15, %rcx callq 0x1220 movb $0x1, %al jmp 0x8753 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5930(%rip), %rdi # 0xe099 leaq 0x8d07(%rip), %rsi # 0x11477 leaq 0x8f00(%rip), %rcx # 0x11677 movl $0xf6, %edx callq 0x1130 leaq 0x6684(%rip), %rdi # 0xee0c leaq 0x8ce8(%rip), %rsi # 0x11477 leaq 0x8ee1(%rip), %rcx # 0x11677 movl $0xf7, %edx callq 0x1130 leaq 0x8f13(%rip), %rdi # 0x116ba leaq 0x8cc9(%rip), %rsi # 0x11477 leaq 0x8ec2(%rip), %rcx # 0x11677 movl $0xf8, %edx callq 0x1130
codegen_generate_sequence: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax test rdi, rdi jz loc_8762 mov rbx, rsi test rsi, rsi jz loc_8781 cmp dword ptr [rbx], 1Ah jnz loc_87A0 mov r14, rdi call codegen_context_get_output mov r15, rax lea rdi, asc_11350; "({ " mov esi, 3 mov edx, 1 mov rcx, rax call _fwrite cmp qword ptr [rbx+50h], 0 jz short loc_8734 xor r13d, r13d lea r12, aCharBuffer1024+19h; "; " loc_86FD: test r13, r13 jz short loc_8717 mov esi, 2 mov edx, 1 mov rdi, r12 mov rcx, r15 call _fwrite loc_8717: mov rax, [rbx+48h] mov rsi, [rax+r13*8] mov rdi, r14 call codegen_generate_expression test al, al jz short loc_8751 inc r13 cmp r13, [rbx+50h] jb short loc_86FD loc_8734: lea rdi, aVectorFGetComp_0+4Eh; "; })" mov esi, 4 mov edx, 1 mov rcx, r15 call _fwrite mov al, 1 jmp short loc_8753 loc_8751: xor eax, eax loc_8753: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8762: lea rdi, aTypeContextNul+5; "context != NULL" lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_23; "_Bool codegen_generate_sequence(Codegen"... mov edx, 0F6h call ___assert_fail loc_8781: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_23; "_Bool codegen_generate_sequence(Codegen"... mov edx, 0F7h call ___assert_fail loc_87A0: lea rdi, aNodeTypeAstSeq; "node->type == AST_SEQUENCE" lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_23; "_Bool codegen_generate_sequence(Codegen"... mov edx, 0F8h call ___assert_fail
char codegen_generate_sequence(long long a1, long long a2) { long long output; // r15 long long v3; // r13 if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/blocks.c", 246LL, "_Bool codegen_generate_sequence(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/blocks.c", 247LL, "_Bool codegen_generate_sequence(CodegenContext *, const AstNode *)"); if ( *(_DWORD *)a2 != 26 ) __assert_fail( "node->type == AST_SEQUENCE", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/blocks.c", 248LL, "_Bool codegen_generate_sequence(CodegenContext *, const AstNode *)"); output = codegen_context_get_output(a1); fwrite("({ ", 3LL, 1LL, output); if ( *(_QWORD *)(a2 + 80) ) { v3 = 0LL; while ( 1 ) { if ( v3 ) fwrite("; ", 2LL, 1LL, output); if ( !(unsigned __int8)codegen_generate_expression(a1, *(_DWORD **)(*(_QWORD *)(a2 + 72) + 8 * v3)) ) return 0; if ( (unsigned long long)++v3 >= *(_QWORD *)(a2 + 80) ) goto LABEL_10; } } else { LABEL_10: fwrite("; })", 4LL, 1LL, output); return 1; } }
codegen_generate_sequence: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00108762 MOV RBX,RSI TEST RSI,RSI JZ 0x00108781 CMP dword ptr [RBX],0x1a JNZ 0x001087a0 MOV R14,RDI CALL 0x00103c55 MOV R15,RAX LEA RDI,[0x111350] MOV ESI,0x3 MOV EDX,0x1 MOV RCX,RAX CALL 0x00101220 CMP qword ptr [RBX + 0x50],0x0 JZ 0x00108734 XOR R13D,R13D LEA R12,[0x110e1b] LAB_001086fd: TEST R13,R13 JZ 0x00108717 MOV ESI,0x2 MOV EDX,0x1 MOV RDI,R12 MOV RCX,R15 CALL 0x00101220 LAB_00108717: MOV RAX,qword ptr [RBX + 0x48] MOV RSI,qword ptr [RAX + R13*0x8] MOV RDI,R14 CALL 0x001056c0 TEST AL,AL JZ 0x00108751 INC R13 CMP R13,qword ptr [RBX + 0x50] JC 0x001086fd LAB_00108734: LEA RDI,[0x110fd4] MOV ESI,0x4 MOV EDX,0x1 MOV RCX,R15 CALL 0x00101220 MOV AL,0x1 JMP 0x00108753 LAB_00108751: XOR EAX,EAX LAB_00108753: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00108762: LEA RDI,[0x10e099] LEA RSI,[0x111477] LEA RCX,[0x111677] MOV EDX,0xf6 CALL 0x00101130 LAB_00108781: LEA RDI,[0x10ee0c] LEA RSI,[0x111477] LEA RCX,[0x111677] MOV EDX,0xf7 CALL 0x00101130 LAB_001087a0: LEA RDI,[0x1116ba] LEA RSI,[0x111477] LEA RCX,[0x111677] MOV EDX,0xf8 CALL 0x00101130
int8 codegen_generate_sequence(long param_1,int *param_2) { char cVar1; FILE *__s; ulong uVar2; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/blocks.c",0xf6, "_Bool codegen_generate_sequence(CodegenContext *, const AstNode *)"); } if (param_2 != (int *)0x0) { if (*param_2 != 0x1a) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_SEQUENCE", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/blocks.c",0xf8, "_Bool codegen_generate_sequence(CodegenContext *, const AstNode *)"); } __s = (FILE *)codegen_context_get_output(); fwrite(&DAT_00111350,3,1,__s); if (*(long *)(param_2 + 0x14) != 0) { uVar2 = 0; do { if (uVar2 != 0) { fwrite("; ",2,1,__s); } cVar1 = codegen_generate_expression (param_1,*(int8 *)(*(long *)(param_2 + 0x12) + uVar2 * 8)); if (cVar1 == '\0') { return 0; } uVar2 = uVar2 + 1; } while (uVar2 < *(ulong *)(param_2 + 0x14)); } fwrite("; })",4,1,__s); return 1; } /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/blocks.c",0xf7, "_Bool codegen_generate_sequence(CodegenContext *, const AstNode *)"); }
45,407
check_mb_utf16
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_utf16(const char *start, const char *end) { if (start + 2 > end) { return 0; } if (UTF16_HIGH_HEAD(*start)) { return (start + 4 <= end) && UTF16_LOW_HEAD(start[2]) ? 4 : 0; } if (UTF16_LOW_HEAD(*start)) { return 0; } return 2; }
O3
c
check_mb_utf16: pushq %rbp movq %rsp, %rbp leaq 0x2(%rdi), %rcx xorl %eax, %eax cmpq %rsi, %rcx ja 0x5ee6a movzbl (%rdi), %edx andl $-0x4, %edx cmpl $0xdc, %edx je 0x5ee6a cmpl $0xd8, %edx jne 0x5ee65 addq $0x4, %rdi cmpq %rsi, %rdi ja 0x5ee6a movb (%rcx), %cl andb $-0x4, %cl xorl %eax, %eax cmpb $-0x24, %cl sete %al shll $0x2, %eax jmp 0x5ee6a movl $0x2, %eax popq %rbp retq
check_mb_utf16: push rbp mov rbp, rsp lea rcx, [rdi+2] xor eax, eax cmp rcx, rsi ja short loc_5EE6A movzx edx, byte ptr [rdi] and edx, 0FFFFFFFCh cmp edx, 0DCh jz short loc_5EE6A cmp edx, 0D8h jnz short loc_5EE65 add rdi, 4 cmp rdi, rsi ja short loc_5EE6A mov cl, [rcx] and cl, 0FCh xor eax, eax cmp cl, 0DCh setz al shl eax, 2 jmp short loc_5EE6A loc_5EE65: mov eax, 2 loc_5EE6A: pop rbp retn
long long check_mb_utf16(_BYTE *a1, unsigned long long a2) { long long result; // rax int v3; // edx result = 0LL; if ( (unsigned long long)(a1 + 2) <= a2 ) { v3 = *a1 & 0xFC; if ( v3 != 220 ) { if ( v3 == 216 ) { if ( (unsigned long long)(a1 + 4) <= a2 ) return 4 * (unsigned int)((a1[2] & 0xFC) == 0xDC); } else { return 2LL; } } } return result; }
check_mb_utf16: PUSH RBP MOV RBP,RSP LEA RCX,[RDI + 0x2] XOR EAX,EAX CMP RCX,RSI JA 0x0015ee6a MOVZX EDX,byte ptr [RDI] AND EDX,0xfffffffc CMP EDX,0xdc JZ 0x0015ee6a CMP EDX,0xd8 JNZ 0x0015ee65 ADD RDI,0x4 CMP RDI,RSI JA 0x0015ee6a MOV CL,byte ptr [RCX] AND CL,0xfc XOR EAX,EAX CMP CL,0xdc SETZ AL SHL EAX,0x2 JMP 0x0015ee6a LAB_0015ee65: MOV EAX,0x2 LAB_0015ee6a: POP RBP RET
long check_mb_utf16(byte *param_1,byte *param_2) { long lVar1; lVar1 = 0; if ((param_1 + 2 <= param_2) && ((*param_1 & 0xfc) != 0xdc)) { if ((*param_1 & 0xfc) == 0xd8) { if (param_1 + 4 <= param_2) { lVar1 = (ulong)((param_1[2] & 0xfc) == 0xdc) << 2; } } else { lVar1 = 2; } } return lVar1; }
45,408
my_hash_first
eloqsql/mysys/hash.c
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; DBUG_ASSERT(my_hash_inited(hash)); res= my_hash_first_from_hash_value(hash, hash->hash_function(hash->charset, key, length ? length : hash->key_length), key, length, current_record); return res; }
O3
c
my_hash_first: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x58(%rdi), %rax movq 0x68(%rdi), %rdi movq %rdx, %r12 testq %rdx, %rdx jne 0x5a3c8 movq 0x8(%r15), %rdx xorl %r12d, %r12d movq %r14, %rsi callq *%rax movq %r15, %rdi movl %eax, %esi movq %r14, %rdx movq %r12, %rcx movq %rbx, %r8 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x5a3ff
my_hash_first: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rsi mov r15, rdi mov rax, [rdi+58h] mov rdi, [rdi+68h] mov r12, rdx test rdx, rdx jnz short loc_5A3C8 mov rdx, [r15+8] xor r12d, r12d loc_5A3C8: mov rsi, r14 call rax mov rdi, r15 mov esi, eax mov rdx, r14 mov rcx, r12 mov r8, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp my_hash_first_from_hash_value
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, long long, long long); // rax long long v7; // rdi long long v8; // r12 unsigned int v9; // eax v6 = (long long ( *)(long long, long long, long long))a1[11]; v7 = a1[13]; v8 = a3; if ( !a3 ) { a3 = a1[1]; v8 = 0LL; } v9 = v6(v7, a2, a3); return my_hash_first_from_hash_value(a1, v9, a2, v8, a4); }
my_hash_first: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x58] MOV RDI,qword ptr [RDI + 0x68] MOV R12,RDX TEST RDX,RDX JNZ 0x0015a3c8 MOV RDX,qword ptr [R15 + 0x8] XOR R12D,R12D LAB_0015a3c8: MOV RSI,R14 CALL RAX MOV RDI,R15 MOV ESI,EAX MOV RDX,R14 MOV RCX,R12 MOV R8,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0015a3ff
void my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4) { int4 uVar1; long lVar2; lVar2 = param_3; if (param_3 == 0) { param_3 = *(long *)(param_1 + 8); lVar2 = 0; } uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,param_3); my_hash_first_from_hash_value(param_1,uVar1,param_2,lVar2,param_4); return; }
45,409
Generator::gen_term(NodeTerm const*)::TermVisitor::operator()(NodeTermIdent const*) const
BhuvanGudi[P]LexiParse/src/generation.hpp
void operator()(const NodeTermIdent* term_ident) const { const auto it = std::ranges::find_if(std::as_const(gen.m_vars), [&](const Var& var) { return var.name == term_ident->ident.value.value(); }); if (it == gen.m_vars.cend()) { std::cerr << "Undeclared identifier: " << term_ident->ident.value.value() << std::endl; exit(EXIT_FAILURE); } std::stringstream offset; offset << "QWORD [rsp + " << (gen.m_stack_size - it->stack_loc - 1) * 8 << "]"; gen.push(offset.str()); }
O0
cpp
Generator::gen_term(NodeTerm const*)::TermVisitor::operator()(NodeTermIdent const*) const: pushq %rbp movq %rsp, %rbp subq $0x220, %rsp # imm = 0x220 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x1f0(%rbp) movq (%rax), %rsi addq $0x1a8, %rsi # imm = 0x1A8 leaq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdx leaq 0x58d6(%rip), %rdi # 0x175e1 callq 0x11ed0 movq %rax, %rcx movq -0x1f0(%rbp), %rax movq %rcx, -0x18(%rbp) movq (%rax), %rdi addq $0x1a8, %rdi # imm = 0x1A8 callq 0x11f80 movq %rax, -0x30(%rbp) leaq -0x18(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x11f40 testb $0x1, %al jne 0x11d44 jmp 0x11d93 movq 0x122a5(%rip), %rdi # 0x23ff0 leaq 0x5715(%rip), %rsi # 0x17467 callq 0x31c0 movq %rax, -0x1f8(%rbp) movq -0x10(%rbp), %rdi addq $0x8, %rdi callq 0x11b00 movq -0x1f8(%rbp), %rdi movq %rax, %rsi callq 0x31a0 movq %rax, %rdi movq 0x12224(%rip), %rsi # 0x23fa8 callq 0x3200 movl $0x1, %edi callq 0x3230 leaq -0x1b8(%rbp), %rdi callq 0x3130 leaq -0x1a8(%rbp), %rdi leaq 0x56d2(%rip), %rsi # 0x1747f callq 0x31c0 movq %rax, -0x200(%rbp) jmp 0x11dbb movq -0x1f0(%rbp), %rax movq (%rax), %rax movq 0x1a0(%rax), %rax movq %rax, -0x210(%rbp) leaq -0x18(%rbp), %rdi callq 0x11fb0 movq -0x200(%rbp), %rdi movq %rax, %rcx movq -0x210(%rbp), %rax movq 0x20(%rcx), %rsi notq %rsi addq %rax, %rsi shlq $0x3, %rsi callq 0x3080 movq %rax, -0x208(%rbp) jmp 0x11e09 movq -0x208(%rbp), %rdi leaq 0x5676(%rip), %rsi # 0x1748d callq 0x31c0 jmp 0x11e1e movq -0x1f0(%rbp), %rax movq (%rax), %rax movq %rax, -0x218(%rbp) leaq -0x1e8(%rbp), %rdi leaq -0x1b8(%rbp), %rsi callq 0x32f0 jmp 0x11e44 movq -0x218(%rbp), %rdi leaq -0x1e8(%rbp), %rsi callq 0x11b40 jmp 0x11e59 leaq -0x1e8(%rbp), %rdi callq 0x3bd0 leaq -0x1b8(%rbp), %rdi callq 0x3150 addq $0x220, %rsp # imm = 0x220 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c0(%rbp) movl %eax, -0x1c4(%rbp) jmp 0x11eac movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c0(%rbp) movl %eax, -0x1c4(%rbp) leaq -0x1e8(%rbp), %rdi callq 0x3bd0 leaq -0x1b8(%rbp), %rdi callq 0x3150 movq -0x1c0(%rbp), %rdi callq 0x32d0 nopw %cs:(%rax,%rax) nop
_ZZN9Generator8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdent: push rbp mov rbp, rsp sub rsp, 220h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_1F0], rax mov rsi, [rax] add rsi, 1A8h lea rax, [rbp+var_10] mov [rbp+var_20], rax mov rdx, [rbp+var_20] lea rdi, _ZNSt6ranges7find_ifE; std::ranges::find_if call _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF_ mov rcx, rax mov rax, [rbp+var_1F0] mov [rbp+var_18], rcx mov rdi, [rax] add rdi, 1A8h call _ZNKSt6vectorIN9Generator3VarESaIS1_EE4cendEv; std::vector<Generator::Var>::cend(void) mov [rbp+var_30], rax lea rdi, [rbp+var_18] lea rsi, [rbp+var_30] call _ZN9__gnu_cxxeqIPKN9Generator3VarESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE test al, 1 jnz short loc_11D44 jmp short loc_11D93 loc_11D44: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aUndeclaredIden; "Undeclared identifier: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_1F8], rax mov rdi, [rbp+var_10] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) mov rdi, [rbp+var_1F8] mov rsi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) mov edi, 1 call _exit loc_11D93: lea rdi, [rbp+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rbp+var_1A8] lea rsi, aQwordRsp; "QWORD [rsp + " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_200], rax jmp short $+2 loc_11DBB: mov rax, [rbp+var_1F0] mov rax, [rax] mov rax, [rax+1A0h] mov [rbp+var_210], rax lea rdi, [rbp+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPKN9Generator3VarESt6vectorIS2_SaIS2_EEEptEv; __gnu_cxx::__normal_iterator<Generator::Var const*,std::vector<Generator::Var>>::operator->(void) mov rdi, [rbp+var_200] mov rcx, rax mov rax, [rbp+var_210] mov rsi, [rcx+20h] not rsi add rsi, rax shl rsi, 3 call __ZNSolsEm; std::ostream::operator<<(ulong) mov [rbp+var_208], rax jmp short $+2 loc_11E09: mov rdi, [rbp+var_208] lea rsi, asc_1748D; "]" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_11E1E: mov rax, [rbp+var_1F0] mov rax, [rax] mov [rbp+var_218], rax lea rdi, [rbp+var_1E8] lea rsi, [rbp+var_1B8] call __ZNKRSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_11E44: mov rdi, [rbp+var_218] lea rsi, [rbp+var_1E8] call _ZN9Generator4pushERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::push(std::string const&) jmp short $+2 loc_11E59: lea rdi, [rbp+var_1E8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() add rsp, 220h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_1C0], rcx mov [rbp+var_1C4], eax jmp short loc_11EAC mov rcx, rax mov eax, edx mov [rbp+var_1C0], rcx mov [rbp+var_1C4], eax lea rdi, [rbp+var_1E8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_11EAC: lea rdi, [rbp+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rbp+var_1C0] call __Unwind_Resume
long long Generator::gen_term(NodeTerm const*)::TermVisitor::operator()(long long *a1, long long a2) { long long v2; // rsi long long v3; // rax long long v4; // rax long long v5; // rax long long v7; // [rsp+8h] [rbp-218h] long long v8; // [rsp+10h] [rbp-210h] long long v9; // [rsp+18h] [rbp-208h] long long v10; // [rsp+20h] [rbp-200h] long long v11; // [rsp+28h] [rbp-1F8h] _BYTE v12[36]; // [rsp+38h] [rbp-1E8h] BYREF _BYTE v13[16]; // [rsp+68h] [rbp-1B8h] BYREF _BYTE v14[376]; // [rsp+78h] [rbp-1A8h] BYREF _QWORD v15[3]; // [rsp+1F0h] [rbp-30h] BYREF long long if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF; // [rsp+208h] [rbp-18h] BYREF _QWORD v17[2]; // [rsp+210h] [rbp-10h] BYREF v17[1] = a1; v17[0] = a2; v2 = *a1 + 424; v15[2] = v17; if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF = ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF_(&std::ranges::find_if, v2, v17); v15[0] = std::vector<Generator::Var>::cend(*a1 + 424); if ( (__gnu_cxx::operator==<Generator::Var const*,std::vector<Generator::Var>>( &if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF, v15) & 1) != 0 ) { v11 = std::operator<<<std::char_traits<char>>(&std::cerr, "Undeclared identifier: "); v3 = std::optional<std::string>::value(v17[0] + 8LL); v4 = std::operator<<<char>(v11, v3); std::ostream::operator<<(v4, &std::endl<char,std::char_traits<char>>); exit(1LL); } std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v13); v10 = std::operator<<<std::char_traits<char>>(v14, "QWORD [rsp + "); v8 = *(_QWORD *)(*a1 + 416); v5 = __gnu_cxx::__normal_iterator<Generator::Var const*,std::vector<Generator::Var>>::operator->(&if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF); v9 = std::ostream::operator<<(v10, 8 * (v8 + ~*(_QWORD *)(v5 + 32))); std::operator<<<std::char_traits<char>>(v9, "]"); v7 = *a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v12, v13); Generator::push(v7, (long long)v12); std::string::~string((long long)v12); return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v13); }
operator(): PUSH RBP MOV RBP,RSP SUB RSP,0x220 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x1f0],RAX MOV RSI,qword ptr [RAX] ADD RSI,0x1a8 LEA RAX,[RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RDX,qword ptr [RBP + -0x20] LEA RDI,[0x1175e1] CALL 0x00111ed0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x1f0] MOV qword ptr [RBP + -0x18],RCX MOV RDI,qword ptr [RAX] ADD RDI,0x1a8 CALL 0x00111f80 MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x18] LEA RSI,[RBP + -0x30] CALL 0x00111f40 TEST AL,0x1 JNZ 0x00111d44 JMP 0x00111d93 LAB_00111d44: MOV RDI,qword ptr [0x00123ff0] LEA RSI,[0x117467] CALL 0x001031c0 MOV qword ptr [RBP + -0x1f8],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 CALL 0x00111b00 MOV RDI,qword ptr [RBP + -0x1f8] MOV RSI,RAX CALL 0x001031a0 MOV RDI,RAX MOV RSI,qword ptr [0x00123fa8] CALL 0x00103200 MOV EDI,0x1 CALL 0x00103230 LAB_00111d93: LEA RDI,[RBP + -0x1b8] CALL 0x00103130 LEA RDI,[RBP + -0x1a8] LAB_00111da6: LEA RSI,[0x11747f] CALL 0x001031c0 MOV qword ptr [RBP + -0x200],RAX JMP 0x00111dbb LAB_00111dbb: MOV RAX,qword ptr [RBP + -0x1f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a0] MOV qword ptr [RBP + -0x210],RAX LEA RDI,[RBP + -0x18] CALL 0x00111fb0 MOV RDI,qword ptr [RBP + -0x200] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x210] MOV RSI,qword ptr [RCX + 0x20] NOT RSI ADD RSI,RAX SHL RSI,0x3 CALL 0x00103080 MOV qword ptr [RBP + -0x208],RAX JMP 0x00111e09 LAB_00111e09: MOV RDI,qword ptr [RBP + -0x208] LEA RSI,[0x11748d] CALL 0x001031c0 JMP 0x00111e1e LAB_00111e1e: MOV RAX,qword ptr [RBP + -0x1f0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x218],RAX LEA RDI,[RBP + -0x1e8] LEA RSI,[RBP + -0x1b8] CALL 0x001032f0 JMP 0x00111e44 LAB_00111e44: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x1e8] CALL 0x00111b40 LAB_00111e57: JMP 0x00111e59 LAB_00111e59: LEA RDI,[RBP + -0x1e8] CALL 0x00103bd0 LEA RDI,[RBP + -0x1b8] CALL 0x00103150 ADD RSP,0x220 POP RBP RET
/* Generator::gen_term(NodeTerm const*)::TermVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeTermIdent const*) const */ void __thiscall Generator::gen_term(NodeTerm_const*)::TermVisitor::operator() (TermVisitor *this,NodeTermIdent *param_1) { long lVar1; Generator *this_00; ulong uVar2; string *psVar3; ostream *poVar4; long lVar5; string local_1f0 [48]; stringstream local_1c0 [16]; ostream local_1b0 [376]; int8 local_38 [2]; NodeTermIdent **local_28; int8 local_20; NodeTermIdent *local_18; TermVisitor *local_10; local_28 = &local_18; local_18 = param_1; local_10 = this; local_20 = _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF_ (&std::ranges::find_if,*(long *)this + 0x1a8,local_28); local_38[0] = std::vector<Generator::Var,std::allocator<Generator::Var>>::cend ((vector<Generator::Var,std::allocator<Generator::Var>> *) (*(long *)this + 0x1a8)); uVar2 = _ZN9__gnu_cxxeqIPKN9Generator3VarESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE (&local_20,local_38); if ((uVar2 & 1) == 0) { std::__cxx11::stringstream::stringstream(local_1c0); /* try { // try from 00111da6 to 00111e41 has its CatchHandler @ 00111e7a */ poVar4 = std::operator<<(local_1b0,"QWORD [rsp + "); lVar1 = *(long *)(*(long *)this + 0x1a0); lVar5 = __gnu_cxx:: __normal_iterator<Generator::Var_const*,std::vector<Generator::Var,std::allocator<Generator::Var>>> ::operator->((__normal_iterator<Generator::Var_const*,std::vector<Generator::Var,std::allocator<Generator::Var>>> *)&local_20); poVar4 = (ostream *)std::ostream::operator<<(poVar4,(~*(ulong *)(lVar5 + 0x20) + lVar1) * 8); std::operator<<(poVar4,"]"); this_00 = *(Generator **)this; std::__cxx11::stringstream::str(); /* try { // try from 00111e44 to 00111e56 has its CatchHandler @ 00111e8e */ push(this_00,local_1f0); std::__cxx11::string::~string(local_1f0); std::__cxx11::stringstream::~stringstream(local_1c0); return; } poVar4 = std::operator<<((ostream *)PTR_cerr_00123ff0,"Undeclared identifier: "); psVar3 = (string *) std::optional<std::__cxx11::string>::value ((optional<std::__cxx11::string> *)(local_18 + 8)); poVar4 = std::operator<<(poVar4,psVar3); std::ostream::operator<< (poVar4,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00123fa8); /* WARNING: Subroutine does not return */ exit(1); }
45,410
Generator::gen_term(NodeTerm const*)::TermVisitor::operator()(NodeTermIdent const*) const
BhuvanGudi[P]LexiParse/src/generation.hpp
void operator()(const NodeTermIdent* term_ident) const { const auto it = std::ranges::find_if(std::as_const(gen.m_vars), [&](const Var& var) { return var.name == term_ident->ident.value.value(); }); if (it == gen.m_vars.cend()) { std::cerr << "Undeclared identifier: " << term_ident->ident.value.value() << std::endl; exit(EXIT_FAILURE); } std::stringstream offset; offset << "QWORD [rsp + " << (gen.m_stack_size - it->stack_loc - 1) * 8 << "]"; gen.push(offset.str()); }
O1
cpp
Generator::gen_term(NodeTerm const*)::TermVisitor::operator()(NodeTermIdent const*) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rdi, %rbx leaq 0x8(%rsp), %rax movq %rsi, (%rax) movq (%rdi), %rcx movq 0x1a8(%rcx), %r14 movq 0x1b0(%rcx), %r12 movq %rax, 0x30(%rsp) cmpq %r12, %r14 je 0x782b leaq 0x30(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x7982 testb %al, %al jne 0x782b addq $0x28, %r14 cmpq %r12, %r14 jne 0x7813 movq (%rbx), %rax cmpq 0x1b0(%rax), %r14 je 0x78f6 leaq 0x30(%rsp), %rdi callq 0x2140 leaq 0x40(%rsp), %r15 leaq 0x1c1a(%rip), %rsi # 0x946b movl $0xd, %edx movq %r15, %rdi callq 0x2230 movq (%rbx), %rax movq 0x20(%r14), %rsi notq %rsi addq 0x1a0(%rax), %rsi shlq $0x3, %rsi movq %r15, %rdi callq 0x2120 leaq 0x1bf7(%rip), %rsi # 0x9479 movl $0x1, %edx movq %rax, %rdi callq 0x2230 movq (%rbx), %rbx leaq 0x48(%rsp), %rsi leaq 0x10(%rsp), %rdi callq 0x2160 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x7786 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x78c9 movq 0x20(%rsp), %rsi incq %rsi callq 0x2200 movq 0x56d0(%rip), %rsi # 0xcfa0 leaq 0x30(%rsp), %rdi callq 0x2170 leaq 0xb0(%rsp), %rdi callq 0x2090 addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x56f3(%rip), %rdi # 0xcff0 leaq 0x1b4f(%rip), %rsi # 0x9453 callq 0x21e0 movq %rax, %rbx movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x7776 movq %rbx, %rdi movq %rax, %rsi callq 0x21c0 movq %rax, %rdi callq 0x20e0 movl $0x1, %edi callq 0x2240 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x795c movq 0x20(%rsp), %rsi incq %rsi callq 0x2200 jmp 0x795c jmp 0x7959 movq %rax, %rbx movq 0x563d(%rip), %rsi # 0xcfa0 leaq 0x30(%rsp), %rdi callq 0x2170 leaq 0xb0(%rsp), %rdi callq 0x2090 movq %rbx, %rdi callq 0x22d0
_ZZN9Generator8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdent: push r15 push r14 push r12 push rbx sub rsp, 1B8h mov rbx, rdi lea rax, [rsp+1D8h+var_1D0] mov [rax], rsi mov rcx, [rdi] mov r14, [rcx+1A8h] mov r12, [rcx+1B0h] mov [rsp+1D8h+var_1A8], rax cmp r14, r12 jz short loc_782B lea r15, [rsp+1D8h+var_1A8] loc_7813: mov rdi, r15 mov rsi, r14 call _ZSt13__invoke_implIbRZZN9Generator8gen_termEPK8NodeTermENK11TermVisitorclEPK13NodeTermIdentEUlRKNS0_3VarEE_JSA_EET_St14__invoke_otherOT0_DpOT1_; std::__invoke_impl<bool,Generator::gen_term(NodeTerm const*)::TermVisitor::operator() const(NodeTermIdent const*)::{lambda(Generator::Var const&)#1} &,Generator::Var const&>(std::__invoke_other,Generator::gen_term(NodeTerm const*)::TermVisitor::operator() const(NodeTermIdent const*)::{lambda(Generator::Var const&)#1} &,Generator::Var const&) test al, al jnz short loc_782B add r14, 28h ; '(' cmp r14, r12 jnz short loc_7813 loc_782B: mov rax, [rbx] cmp r14, [rax+1B0h] jz loc_78F6 lea rdi, [rsp+1D8h+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea r15, [rsp+1D8h+var_198] lea rsi, aQwordRsp; "QWORD [rsp + " mov edx, 0Dh mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx] mov rsi, [r14+20h] not rsi add rsi, [rax+1A0h] shl rsi, 3 mov rdi, r15 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, asc_9479; "]" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rbx] lea rsi, [rsp+1D8h+var_190] lea rdi, [rsp+1D8h+var_1C8] call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rsi, [rsp+1D8h+var_1C8] mov rdi, rbx call _ZN9Generator4pushERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::push(std::string const&) lea rax, [rsp+1D8h+var_1B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_78C9 mov rsi, [rsp+1D8h+var_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_78C9: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1D8h+var_128]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() add rsp, 1B8h pop rbx pop r12 pop r14 pop r15 retn loc_78F6: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aUndeclaredIden; "Undeclared identifier: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, [rsp+1D8h+var_1D0] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) mov rdi, rbx mov rsi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov edi, 1 call _exit mov rbx, rax lea rax, [rsp+1D8h+var_1B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_795C mov rsi, [rsp+1D8h+var_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_795C jmp short $+2 loc_7959: mov rbx, rax loc_795C: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1D8h+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1D8h+var_128]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
void Generator::gen_term(NodeTerm const*)::TermVisitor::operator()(long long *a1, long long a2, long long a3) { long long v3; // r14 long long v4; // r12 long long v5; // rax long long v6; // rbx long long v7; // rbx long long v8; // rax long long v9; // rax long long v10; // [rsp+8h] [rbp-1D0h] BYREF void *v11[2]; // [rsp+10h] [rbp-1C8h] BYREF long long v12; // [rsp+20h] [rbp-1B8h] BYREF _QWORD v13[2]; // [rsp+30h] [rbp-1A8h] BYREF _BYTE v14[8]; // [rsp+40h] [rbp-198h] BYREF _BYTE v15[104]; // [rsp+48h] [rbp-190h] BYREF _BYTE v16[296]; // [rsp+B0h] [rbp-128h] BYREF v10 = a2; v3 = *(_QWORD *)(*a1 + 424); v4 = *(_QWORD *)(*a1 + 432); for ( v13[0] = &v10; v3 != v4; v3 += 40LL ) { a2 = v3; if ( (unsigned __int8)std::__invoke_impl<bool,Generator::gen_term(NodeTerm const*)::TermVisitor::operator() const(NodeTermIdent const*)::{lambda(Generator::Var const&)#1} &,Generator::Var const&>( v13, v3) ) break; } if ( v3 == *(_QWORD *)(*a1 + 432) ) { v7 = std::operator<<<std::char_traits<char>>(&std::cerr, "Undeclared identifier: "); v8 = std::optional<std::string>::value(v10 + 8); v9 = std::operator<<<char>(v7, v8); std::endl<char,std::char_traits<char>>(v9); exit(1LL); } std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v13, a2, a3); std::__ostream_insert<char,std::char_traits<char>>(v14, "QWORD [rsp + ", 13LL); v5 = std::ostream::_M_insert<unsigned long>(v14, 8LL * (*(_QWORD *)(*a1 + 416) + ~*(_QWORD *)(v3 + 32))); std::__ostream_insert<char,std::char_traits<char>>(v5, "]", 1LL); v6 = *a1; std::stringbuf::str(v11, v15); Generator::push(v6, v11); if ( v11[0] != &v12 ) operator delete(v11[0], v12 + 1); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v13, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v16); }
operator(): PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RDI LEA RAX,[RSP + 0x8] MOV qword ptr [RAX],RSI MOV RCX,qword ptr [RDI] MOV R14,qword ptr [RCX + 0x1a8] MOV R12,qword ptr [RCX + 0x1b0] MOV qword ptr [RSP + 0x30],RAX CMP R14,R12 JZ 0x0010782b LEA R15,[RSP + 0x30] LAB_00107813: MOV RDI,R15 MOV RSI,R14 CALL 0x00107982 TEST AL,AL JNZ 0x0010782b ADD R14,0x28 CMP R14,R12 JNZ 0x00107813 LAB_0010782b: MOV RAX,qword ptr [RBX] CMP R14,qword ptr [RAX + 0x1b0] JZ 0x001078f6 LEA RDI,[RSP + 0x30] CALL 0x00102140 LEA R15,[RSP + 0x40] LAB_0010784a: LEA RSI,[0x10946b] MOV EDX,0xd MOV RDI,R15 CALL 0x00102230 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [R14 + 0x20] NOT RSI ADD RSI,qword ptr [RAX + 0x1a0] SHL RSI,0x3 MOV RDI,R15 CALL 0x00102120 LEA RSI,[0x109479] MOV EDX,0x1 MOV RDI,RAX CALL 0x00102230 MOV RBX,qword ptr [RBX] LEA RSI,[RSP + 0x48] LAB_00107897: LEA RDI,[RSP + 0x10] CALL 0x00102160 LAB_001078a1: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00107786 LAB_001078ae: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001078c9 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00102200 LAB_001078c9: MOV RSI,qword ptr [0x0010cfa0] LEA RDI,[RSP + 0x30] CALL 0x00102170 LEA RDI,[RSP + 0xb0] CALL 0x00102090 ADD RSP,0x1b8 POP RBX POP R12 POP R14 POP R15 RET LAB_001078f6: MOV RDI,qword ptr [0x0010cff0] LEA RSI,[0x109453] CALL 0x001021e0 MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 CALL 0x00107776 MOV RDI,RBX MOV RSI,RAX CALL 0x001021c0 MOV RDI,RAX CALL 0x001020e0 MOV EDI,0x1 CALL 0x00102240
/* Generator::gen_term(NodeTerm const*)::TermVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeTermIdent const*) const */ void __thiscall Generator::gen_term(NodeTerm_const*)::TermVisitor::operator() (TermVisitor *this,NodeTermIdent *param_1) { long lVar1; Generator *this_00; bool bVar2; ostream *poVar3; string *psVar4; long lVar5; NodeTermIdent *local_1d0; long *local_1c8 [2]; long local_1b8 [2]; NodeTermIdent **local_1a8 [2]; ostream local_198 [112]; ios_base local_128 [264]; local_1a8[0] = &local_1d0; lVar5 = *(long *)(*(long *)this + 0x1a8); lVar1 = *(long *)(*(long *)this + 0x1b0); local_1d0 = param_1; if (lVar5 != lVar1) { do { bVar2 = std::operator()(local_1a8,lVar5); if (bVar2) break; lVar5 = lVar5 + 0x28; } while (lVar5 != lVar1); } if (lVar5 != *(long *)(*(long *)this + 0x1b0)) { std::__cxx11::stringstream::stringstream((stringstream *)local_1a8); /* try { // try from 0010784a to 0010788e has its CatchHandler @ 00107959 */ std::__ostream_insert<char,std::char_traits<char>>(local_198,"QWORD [rsp + ",0xd); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)local_198); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"]",1); this_00 = *(Generator **)this; /* try { // try from 00107897 to 001078a0 has its CatchHandler @ 00107957 */ std::__cxx11::stringbuf::str(); /* try { // try from 001078a1 to 001078ad has its CatchHandler @ 00107937 */ push(this_00,(string *)local_1c8); if (local_1c8[0] != local_1b8) { operator_delete(local_1c8[0],local_1b8[0] + 1); } std::__cxx11::stringstream::~stringstream((stringstream *)local_1a8); std::ios_base::~ios_base(local_128); return; } poVar3 = std::operator<<((ostream *)PTR_cerr_0010cff0,"Undeclared identifier: "); psVar4 = (string *) std::optional<std::__cxx11::string>::value ((optional<std::__cxx11::string> *)(local_1d0 + 8)); poVar3 = std::operator<<(poVar3,psVar4); std::endl<char,std::char_traits<char>>(poVar3); /* WARNING: Subroutine does not return */ exit(1); }
45,411
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::setWidth(const std::string& N) { std::lock_guard<std::mutex> lock(settings_mutex); std::regex valid_number_regex("^\\d+$"); if (!std::regex_match(N, valid_number_regex)) { return "failed"; } uint64_t value = std::stoull(N); width = value; return "ok"; }
O0
cpp
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x80(%rbp) movq %rdi, %rax movq %rax, -0x78(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x70(%rbp) leaq -0x20(%rbp), %rdi callq 0xb6f0 leaq 0x365ad(%rip), %rsi # 0x402c7 leaq -0x40(%rbp), %rdi movl $0x10, %edx callq 0xb890 jmp 0x9d2a movq -0x18(%rbp), %rdi leaq -0x40(%rbp), %rsi xorl %edx, %edx callq 0xb930 movb %al, -0x81(%rbp) jmp 0x9d41 movb -0x81(%rbp), %al testb $0x1, %al jne 0x9dc7 jmp 0x9d4d leaq -0x4d(%rbp), %rdi movq %rdi, -0x90(%rbp) callq 0x7640 movq -0x80(%rbp), %rdi movq -0x90(%rbp), %rdx leaq 0x36551(%rip), %rsi # 0x402c0 callq 0xb600 jmp 0x9d76 leaq -0x4d(%rbp), %rdi callq 0x73c0 movl $0x1, -0x54(%rbp) jmp 0x9e4b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x9e73 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x9e6a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x4d(%rbp), %rdi callq 0x73c0 jmp 0x9e6a movq -0x18(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0xa, %edx callq 0xb980 movq %rax, -0x98(%rbp) jmp 0x9de2 movq -0x70(%rbp), %rax movq -0x98(%rbp), %rcx movq %rcx, -0x60(%rbp) movq -0x60(%rbp), %rcx movq %rcx, 0x48(%rax) leaq -0x61(%rbp), %rdi movq %rdi, -0xa0(%rbp) callq 0x7640 movq -0x80(%rbp), %rdi movq -0xa0(%rbp), %rdx leaq 0x364a2(%rip), %rsi # 0x402bd callq 0xb600 jmp 0x9e22 leaq -0x61(%rbp), %rdi callq 0x73c0 movl $0x1, -0x54(%rbp) jmp 0x9e4b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x61(%rbp), %rdi callq 0x73c0 jmp 0x9e6a leaq -0x40(%rbp), %rdi callq 0xb9c0 leaq -0x20(%rbp), %rdi callq 0xb780 movq -0x78(%rbp), %rax addq $0xa0, %rsp popq %rbp retq leaq -0x40(%rbp), %rdi callq 0xb9c0 leaq -0x20(%rbp), %rdi callq 0xb780 movq -0x48(%rbp), %rdi callq 0x7630 nopw %cs:(%rax,%rax)
_ZN8Settings8setWidthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_80], rdi mov rax, rdi mov [rbp+var_78], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rsi, [rbp+var_10] mov [rbp+var_70], rsi lea rdi, [rbp+var_20] call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) lea rsi, aD; "^\\d+$" lea rdi, [rbp+var_40] mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_9D2A: mov rdi, [rbp+var_18] lea rsi, [rbp+var_40] xor edx, edx call _ZSt11regex_matchISt11char_traitsIcESaIcEcNSt7__cxx1112regex_traitsIcEEEbRKNS3_12basic_stringIT1_T_T0_EERKNS3_11basic_regexIS7_T2_EENSt15regex_constants15match_flag_typeE; std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rbp+var_81], al jmp short $+2 loc_9D41: mov al, [rbp+var_81] test al, 1 jnz short loc_9DC7 jmp short $+2 loc_9D4D: lea rdi, [rbp+var_4D] mov [rbp+var_90], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_80] mov rdx, [rbp+var_90] lea rsi, aFailed; "failed" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_9D76: lea rdi, [rbp+var_4D] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_54], 1 jmp loc_9E4B mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp loc_9E73 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp loc_9E6A mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_4D] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_9E6A loc_9DC7: mov rdi, [rbp+var_18] xor eax, eax mov esi, eax mov edx, 0Ah call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int) mov [rbp+var_98], rax jmp short $+2 loc_9DE2: mov rax, [rbp+var_70] mov rcx, [rbp+var_98] mov [rbp+var_60], rcx mov rcx, [rbp+var_60] mov [rax+48h], rcx lea rdi, [rbp+var_61] mov [rbp+var_A0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_80] mov rdx, [rbp+var_A0] lea rsi, aOk; "ok" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_9E22: lea rdi, [rbp+var_61] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_54], 1 jmp short loc_9E4B mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_61] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_9E6A loc_9E4B: lea rdi, [rbp+var_40] call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() lea rdi, [rbp+var_20] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rax, [rbp+var_78] add rsp, 0A0h pop rbp retn loc_9E6A: lea rdi, [rbp+var_40] call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() loc_9E73: lea rdi, [rbp+var_20] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rdi, [rbp+var_48] call __Unwind_Resume
long long Settings::setWidth(long long a1, long long a2, long long a3) { char v4; // [rsp+3Fh] [rbp-61h] BYREF long long v5; // [rsp+40h] [rbp-60h] int v6; // [rsp+4Ch] [rbp-54h] char v7; // [rsp+53h] [rbp-4Dh] BYREF _BYTE v8[32]; // [rsp+60h] [rbp-40h] BYREF _BYTE v9[8]; // [rsp+80h] [rbp-20h] BYREF long long v10; // [rsp+88h] [rbp-18h] long long v11; // [rsp+90h] [rbp-10h] long long v12; // [rsp+98h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; std::lock_guard<std::mutex>::lock_guard(v9); std::basic_regex<char,std::regex_traits<char>>::basic_regex(v8, "^\\d+$", 16LL); if ( (std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(v10, v8, 0LL) & 1) != 0 ) { v5 = std::stoull(v10, 0LL, 10LL); *(_QWORD *)(a2 + 72) = v5; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, "ok", &v4); std::allocator<char>::~allocator(&v4); } else { std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, "failed", &v7); std::allocator<char>::~allocator(&v7); } v6 = 1; std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v8); std::lock_guard<std::mutex>::~lock_guard(v9); return a1; }
setWidth: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x80],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x78],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RSI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x70],RSI LEA RDI,[RBP + -0x20] CALL 0x0010b6f0 LAB_00109d13: LEA RSI,[0x1402c7] LEA RDI,[RBP + -0x40] MOV EDX,0x10 CALL 0x0010b890 JMP 0x00109d2a LAB_00109d2a: MOV RDI,qword ptr [RBP + -0x18] LAB_00109d2e: LEA RSI,[RBP + -0x40] XOR EDX,EDX CALL 0x0010b930 MOV byte ptr [RBP + -0x81],AL JMP 0x00109d41 LAB_00109d41: MOV AL,byte ptr [RBP + -0x81] TEST AL,0x1 JNZ 0x00109dc7 JMP 0x00109d4d LAB_00109d4d: LEA RDI,[RBP + -0x4d] MOV qword ptr [RBP + -0x90],RDI CALL 0x00107640 MOV RDI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x90] LAB_00109d68: LEA RSI,[0x1402c0] CALL 0x0010b600 JMP 0x00109d76 LAB_00109d76: LEA RDI,[RBP + -0x4d] CALL 0x001073c0 MOV dword ptr [RBP + -0x54],0x1 JMP 0x00109e4b LAB_00109dc7: MOV RDI,qword ptr [RBP + -0x18] LAB_00109dcb: XOR EAX,EAX MOV ESI,EAX MOV EDX,0xa CALL 0x0010b980 MOV qword ptr [RBP + -0x98],RAX JMP 0x00109de2 LAB_00109de2: MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x60],RCX MOV RCX,qword ptr [RBP + -0x60] MOV qword ptr [RAX + 0x48],RCX LEA RDI,[RBP + -0x61] MOV qword ptr [RBP + -0xa0],RDI CALL 0x00107640 MOV RDI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0xa0] LAB_00109e14: LEA RSI,[0x1402bd] CALL 0x0010b600 LAB_00109e20: JMP 0x00109e22 LAB_00109e22: LEA RDI,[RBP + -0x61] CALL 0x001073c0 MOV dword ptr [RBP + -0x54],0x1 JMP 0x00109e4b LAB_00109e4b: LEA RDI,[RBP + -0x40] CALL 0x0010b9c0 LEA RDI,[RBP + -0x20] CALL 0x0010b780 MOV RAX,qword ptr [RBP + -0x78] ADD RSP,0xa0 POP RBP RET
/* Settings::setWidth(std::__cxx11::string const&) */ string * Settings::setWidth(string *param_1) { bool bVar1; string *in_RDX; mutex *in_RSI; allocator local_69; int8 local_68; int4 local_5c; allocator local_55 [13]; basic_regex<char,std::__cxx11::regex_traits<char>> local_48 [32]; lock_guard<std::mutex> local_28 [8]; string *local_20; string *local_10; local_20 = in_RDX; local_10 = param_1; std::lock_guard<std::mutex>::lock_guard(local_28,in_RSI); /* try { // try from 00109d13 to 00109d27 has its CatchHandler @ 00109d8b */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (local_48,"^\\d+$",0x10); /* try { // try from 00109d2e to 00109d38 has its CatchHandler @ 00109d9c */ bVar1 = std:: regex_match<std::char_traits<char>,std::allocator<char>,char,std::__cxx11::regex_traits<char>> (local_20,local_48,0); if (bVar1) { /* try { // try from 00109dcb to 00109dd8 has its CatchHandler @ 00109d9c */ local_68 = std::__cxx11::stoull(local_20,(ulong *)0x0,10); *(int8 *)(in_RSI + 0x48) = local_68; std::allocator<char>::allocator(); /* try { // try from 00109e14 to 00109e1f has its CatchHandler @ 00109e34 */ std::__cxx11::string::string<std::allocator<char>>(param_1,"ok",&local_69); std::allocator<char>::~allocator((allocator<char> *)&local_69); } else { std::allocator<char>::allocator(); /* try { // try from 00109d68 to 00109d73 has its CatchHandler @ 00109dad */ std::__cxx11::string::string<std::allocator<char>>(param_1,"failed",local_55); std::allocator<char>::~allocator((allocator<char> *)local_55); } local_5c = 1; std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_48); std::lock_guard<std::mutex>::~lock_guard(local_28); return param_1; }
45,412
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::setWidth(const std::string& N) { std::lock_guard<std::mutex> lock(settings_mutex); std::regex valid_number_regex("^\\d+$"); if (!std::regex_match(N, valid_number_regex)) { return "failed"; } uint64_t value = std::stoull(N); width = value; return "ok"; }
O2
cpp
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x6e34 leaq 0x111ea(%rip), %rsi # 0x1723f leaq 0x10(%rsp), %rdi pushq $0x10 popq %rdx callq 0x6b8c leaq 0x10(%rsp), %rsi movq %r15, %rdi xorl %edx, %edx callq 0x6bf2 testb %al, %al je 0x609c pushq $0xa popq %rdx movq %r15, %rdi xorl %esi, %esi callq 0x6c09 movq %rax, 0x48(%rbx) leaq 0x111a8(%rip), %rsi # 0x17235 leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0x6b2a jmp 0x60b0 leaq 0x11195(%rip), %rsi # 0x17238 leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0x6b2a leaq 0x10(%rsp), %rdi callq 0x6c26 movq %rbx, %rdi callq 0x52c0 movq %r14, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x60d5 jmp 0x60d5 jmp 0x60d5 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x6c26 jmp 0x60e7 movq %rax, %r14 movq %rbx, %rdi callq 0x52c0 movq %r14, %rdi callq 0x5590 nop
_ZN8Settings8setWidthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 30h mov r15, rdx mov rbx, rsi mov r14, rdi mov rdi, rsi; this call _ZNSt5mutex4lockEv; std::mutex::lock(void) lea rsi, aD; "^\\d+$" lea rdi, [rsp+48h+var_38] push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rsi, [rsp+48h+var_38] mov rdi, r15 xor edx, edx call _ZSt11regex_matchISt11char_traitsIcESaIcEcNSt7__cxx1112regex_traitsIcEEEbRKNS3_12basic_stringIT1_T_T0_EERKNS3_11basic_regexIS7_T2_EENSt15regex_constants15match_flag_typeE; std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_609C push 0Ah pop rdx mov rdi, r15 xor esi, esi call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int) mov [rbx+48h], rax lea rsi, aOk; "ok" lea rdx, [rsp+48h+var_39] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_60B0 loc_609C: lea rsi, aFailed; "failed" lea rdx, [rsp+48h+var_39] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_60B0: lea rdi, [rsp+48h+var_38] call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 30h pop rbx pop r14 pop r15 retn jmp short loc_60D5 jmp short loc_60D5 jmp short $+2 loc_60D5: mov r14, rax lea rdi, [rsp+arg_8] call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() jmp short loc_60E7 mov r14, rax loc_60E7: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long Settings::setWidth(long long a1, std::mutex *a2, long long a3) { char v5; // [rsp+Fh] [rbp-39h] BYREF _BYTE v6[56]; // [rsp+10h] [rbp-38h] BYREF std::mutex::lock(a2); std::basic_regex<char,std::regex_traits<char>>::basic_regex(v6, "^\\d+$", 16LL); if ( (unsigned __int8)std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>( a3, v6, 0LL) ) { *((_QWORD *)a2 + 9) = std::stoull(a3, 0LL, 10LL); std::string::basic_string<std::allocator<char>>(a1, "ok", &v5); } else { std::string::basic_string<std::allocator<char>>(a1, "failed", &v5); } std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v6); pthread_mutex_unlock(a2); return a1; }
setWidth: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00106e34 LAB_0010604e: LEA RSI,[0x11723f] LEA RDI,[RSP + 0x10] PUSH 0x10 POP RDX CALL 0x00106b8c LAB_00106062: LEA RSI,[RSP + 0x10] MOV RDI,R15 XOR EDX,EDX CALL 0x00106bf2 TEST AL,AL JZ 0x0010609c LAB_00106075: PUSH 0xa POP RDX MOV RDI,R15 XOR ESI,ESI CALL 0x00106c09 MOV qword ptr [RBX + 0x48],RAX LAB_00106086: LEA RSI,[0x117235] LEA RDX,[RSP + 0xf] MOV RDI,R14 CALL 0x00106b2a JMP 0x001060b0 LAB_0010609c: LEA RSI,[0x117238] LEA RDX,[RSP + 0xf] MOV RDI,R14 CALL 0x00106b2a LAB_001060b0: LEA RDI,[RSP + 0x10] CALL 0x00106c26 MOV RDI,RBX CALL 0x001052c0 MOV RAX,R14 ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* Settings::setWidth(std::__cxx11::string const&) */ string * Settings::setWidth(string *param_1) { bool bVar1; int8 uVar2; string *in_RDX; pthread_mutex_t *in_RSI; allocator local_39; basic_regex<char,std::__cxx11::regex_traits<char>> local_38 [32]; std::mutex::lock(); /* try { // try from 0010604e to 00106061 has its CatchHandler @ 001060e4 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (local_38,"^\\d+$",0x10); /* try { // try from 00106062 to 00106070 has its CatchHandler @ 001060d5 */ bVar1 = std:: regex_match<std::char_traits<char>,std::allocator<char>,char,std::__cxx11::regex_traits<char>> (); if (bVar1) { /* try { // try from 00106075 to 00106081 has its CatchHandler @ 001060d3 */ uVar2 = std::__cxx11::stoull(in_RDX,(ulong *)0x0,10); *(int8 *)((long)in_RSI + 0x48) = uVar2; /* try { // try from 00106086 to 00106099 has its CatchHandler @ 001060cf */ std::__cxx11::string::string<std::allocator<char>>(param_1,"ok",&local_39); } else { /* try { // try from 0010609c to 001060af has its CatchHandler @ 001060d1 */ std::__cxx11::string::string<std::allocator<char>>(param_1,"failed",&local_39); } std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_38); pthread_mutex_unlock(in_RSI); return param_1; }
45,413
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O3
c
my_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x359b76(%rip), %rax # 0x3b61b0 cmpb $0x0, (%rax) je 0x5c646 xorl %eax, %eax jmp 0x5c72e leaq 0x359b67(%rip), %rcx # 0x3b61b4 incl (%rcx) movb $0x1, (%rax) leaq 0x2d9d1f(%rip), %r14 # 0x336378 movl $0x1b0, (%r14) # imm = 0x1B0 leaq 0x2d9d15(%rip), %rbx # 0x33637c movl $0x1c0, (%rbx) # imm = 0x1C0 leaq 0x35a014(%rip), %rax # 0x3b6688 movq $0x0, (%rax) leaq 0x3ad51(%rip), %rdi # 0x973d3 callq 0x284f0 testq %rax, %rax je 0x5c69c movq %rax, %rdi callq 0x5c76a orl $0x180, %eax # imm = 0x180 movl %eax, (%r14) leaq 0x3ad36(%rip), %rdi # 0x973d9 callq 0x284f0 testq %rax, %rax je 0x5c6bc movq %rax, %rdi callq 0x5c76a orl $0x1c0, %eax # imm = 0x1C0 movl %eax, (%rbx) callq 0x65248 movq 0x2d78e8(%rip), %rax # 0x333fb0 movq (%rax), %rax movq %rax, 0x359aee(%rip) # 0x3b61c0 leaq 0x359ae7(%rip), %rax # 0x3b61c0 movq $0x0, 0x359ae4(%rip) # 0x3b61c8 leaq 0x359acd(%rip), %rcx # 0x3b61b8 movq %rax, (%rcx) leaq 0x3acee(%rip), %rax # 0x973e3 leaq 0x359b6c(%rip), %r14 # 0x3b6268 movq %rax, (%r14) leaq 0x359b5a(%rip), %rax # 0x3b6260 movq (%rax), %rbx testq %rbx, %rbx je 0x5c71c movq %rbx, %rdi callq 0x50558 addq %rbx, %rax movq %rax, (%r14) callq 0x61508 callq 0x5ee54 movl %eax, %ecx movb $0x1, %al testb %cl, %cl je 0x5c733 popq %rbx popq %r14 popq %rbp retq leaq 0x3b88b(%rip), %rdi # 0x97fc5 callq 0x284f0 leaq 0x359b12(%rip), %rbx # 0x3b6258 movq %rax, (%rbx) testq %rax, %rax je 0x5c760 leaq 0x359d1b(%rip), %rdi # 0x3b6470 movq %rax, %rsi callq 0x56d89 movq %rax, (%rbx) callq 0x65f5c jmp 0x5c63f
my_init: push rbp mov rbp, rsp push r14 push rbx lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_5C646 loc_5C63F: xor eax, eax jmp loc_5C72E loc_5C646: lea rcx, mysys_usage_id inc dword ptr [rcx] mov byte ptr [rax], 1 lea r14, my_umask mov dword ptr [r14], 1B0h lea rbx, my_umask_dir mov dword ptr [rbx], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv test rax, rax jz short loc_5C69C mov rdi, rax call atoi_octal or eax, 180h mov [r14], eax loc_5C69C: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv test rax, rax jz short loc_5C6BC mov rdi, rax call atoi_octal or eax, 1C0h mov [rbx], eax loc_5C6BC: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax lea rax, instrumented_stdin mov cs:qword_3B61C8, 0 lea rcx, mysql_stdin mov [rcx], rax lea rax, aUnknown; "unknown" lea r14, my_progname_short mov [r14], rax lea rax, my_progname mov rbx, [rax] test rbx, rbx jz short loc_5C71C mov rdi, rbx call dirname_length add rax, rbx mov [r14], rax loc_5C71C: call my_mutex_init call my_thread_global_init mov ecx, eax mov al, 1 test cl, cl jz short loc_5C733 loc_5C72E: pop rbx pop r14 pop rbp retn loc_5C733: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rbx, home_dir mov [rbx], rax test rax, rax jz short loc_5C760 lea rdi, home_dir_buff mov rsi, rax call intern_filename mov [rbx], rax loc_5C760: call my_time_init jmp loc_5C63F
char my_init() { char result; // al long long v1; // rax long long v2; // rax const char *v3; // rbx char v4; // cl _BYTE *v5; // rax if ( my_init_done ) return 0; ++mysys_usage_id; my_init_done = 1; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v1 = getenv("UMASK"); if ( v1 ) my_umask = atoi_octal(v1) | 0x180; v2 = getenv("UMASK_DIR"); if ( v2 ) my_umask_dir = atoi_octal(v2) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_3B61C8 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; v3 = my_progname; if ( my_progname ) my_progname_short = &v3[dirname_length(my_progname)]; my_mutex_init(); v4 = my_thread_global_init(); result = 1; if ( !v4 ) { v5 = (_BYTE *)getenv("HOME"); home_dir = v5; if ( v5 ) home_dir = intern_filename((long long)&home_dir_buff, v5); my_time_init(); return 0; } return result; }
my_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0x4b61b0] CMP byte ptr [RAX],0x0 JZ 0x0015c646 LAB_0015c63f: XOR EAX,EAX JMP 0x0015c72e LAB_0015c646: LEA RCX,[0x4b61b4] INC dword ptr [RCX] MOV byte ptr [RAX],0x1 LEA R14,[0x436378] MOV dword ptr [R14],0x1b0 LEA RBX,[0x43637c] MOV dword ptr [RBX],0x1c0 LEA RAX,[0x4b6688] MOV qword ptr [RAX],0x0 LEA RDI,[0x1973d3] CALL 0x001284f0 TEST RAX,RAX JZ 0x0015c69c MOV RDI,RAX CALL 0x0015c76a OR EAX,0x180 MOV dword ptr [R14],EAX LAB_0015c69c: LEA RDI,[0x1973d9] CALL 0x001284f0 TEST RAX,RAX JZ 0x0015c6bc MOV RDI,RAX CALL 0x0015c76a OR EAX,0x1c0 MOV dword ptr [RBX],EAX LAB_0015c6bc: CALL 0x00165248 MOV RAX,qword ptr [0x00433fb0] MOV RAX,qword ptr [RAX] MOV qword ptr [0x004b61c0],RAX LEA RAX,[0x4b61c0] MOV qword ptr [0x004b61c8],0x0 LEA RCX,[0x4b61b8] MOV qword ptr [RCX],RAX LEA RAX,[0x1973e3] LEA R14,[0x4b6268] MOV qword ptr [R14],RAX LEA RAX,[0x4b6260] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x0015c71c MOV RDI,RBX CALL 0x00150558 ADD RAX,RBX MOV qword ptr [R14],RAX LAB_0015c71c: CALL 0x00161508 CALL 0x0015ee54 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JZ 0x0015c733 LAB_0015c72e: POP RBX POP R14 POP RBP RET LAB_0015c733: LEA RDI,[0x197fc5] CALL 0x001284f0 LEA RBX,[0x4b6258] MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x0015c760 LEA RDI,[0x4b6470] MOV RSI,RAX CALL 0x00156d89 MOV qword ptr [RBX],RAX LAB_0015c760: CALL 0x00165f5c JMP 0x0015c63f
int8 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; if (my_init_done == '\0') { mysys_usage_id = mysys_usage_id + 1; my_init_done = '\x01'; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_00433fb0; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar5 + lVar1); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 != '\0') { return 1; } home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); } return 0; }
45,414
parts_get_event_name
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/parts/parts.c
const char* parts_get_event_name (uint16_t event_id) { const PART_EVENT_T* event ; event = parts_get_event(event_id) ; if (event == 0) { static char name[16] ; snprintf(name, 16, "0x%x", event_id) ; return name ; } else { return event->name ; } }
O3
c
parts_get_event_name: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %eax andl $0x7ff, %eax # imm = 0x7FF cmpl $0x700, %eax # imm = 0x700 jb 0x81a0 movzwl %di, %ecx leaq 0x36e18(%rip), %rbx # 0x3efa0 leaq 0x1d2b4(%rip), %rdx # 0x25443 movl $0x10, %esi movq %rbx, %rdi xorl %eax, %eax callq 0x6200 jmp 0x81b1 movzwl %ax, %eax shll $0x4, %eax leaq 0x1a4cb(%rip), %rcx # 0x22678 movq (%rcx,%rax), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
parts_get_event_name: push rbp mov rbp, rsp push rbx push rax mov eax, edi and eax, 7FFh cmp eax, 700h jb short loc_81A0 movzx ecx, di lea rbx, parts_get_event_name_name lea rdx, aValidatingStat_0+2Bh; "0x%x" mov esi, 10h mov rdi, rbx xor eax, eax call _snprintf jmp short loc_81B1 loc_81A0: movzx eax, ax shl eax, 4 lea rcx, __engine_event_base__ mov rbx, [rcx+rax] loc_81B1: mov rax, rbx add rsp, 8 pop rbx pop rbp retn
char * parts_get_event_name(unsigned __int16 a1) { unsigned int v1; // eax void *v2; // rbx v1 = a1 & 0x7FF; if ( v1 < 0x700 ) return _engine_event_base__[2 * (unsigned int)(unsigned __int16)v1]; v2 = &parts_get_event_name_name; snprintf(&parts_get_event_name_name, 16LL, "0x%x", a1); return (char *)v2; }
parts_get_event_name: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EAX,EDI AND EAX,0x7ff CMP EAX,0x700 JC 0x001081a0 MOVZX ECX,DI LEA RBX,[0x13efa0] LEA RDX,[0x125443] MOV ESI,0x10 MOV RDI,RBX XOR EAX,EAX CALL 0x00106200 JMP 0x001081b1 LAB_001081a0: MOVZX EAX,AX SHL EAX,0x4 LEA RCX,[0x122678] MOV RBX,qword ptr [RCX + RAX*0x1] LAB_001081b1: MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP RET
int1 * parts_get_event_name(uint param_1) { int1 *puVar1; if ((param_1 & 0x7ff) < 0x700) { puVar1 = *(int1 **)((long)&__engine_event__console_char + (ulong)((param_1 & 0x7ff) << 4)) ; } else { puVar1 = parts_get_event_name_name; snprintf(parts_get_event_name_name,0x10,s_validating_statemachine___s__inv_00125418 + 0x2b, (ulong)(param_1 & 0xffff)); } return puVar1; }
45,415
String::append_semi_hex(char const*, unsigned int, charset_info_st const*)
eloqsql/sql/sql_string.cc
bool String::append_semi_hex(const char *s, uint len, CHARSET_INFO *cs) { if (!len) return false; size_t dst_len= convert_to_printable_required_length(len); if (reserve(dst_len)) return true; uint nbytes= convert_to_printable(Ptr + str_length, dst_len, s, len, cs); DBUG_ASSERT((ulonglong) str_length + nbytes < UINT_MAX32); str_length+= nbytes; return false; }
O0
cpp
String::append_semi_hex(char const*, unsigned int, charset_info_st const*): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) cmpl $0x0, -0x1c(%rbp) jne 0x79ecb movb $0x0, -0x1(%rbp) jmp 0x79f32 movl -0x1c(%rbp), %edi callq 0x79e80 movq -0x40(%rbp), %rdi movq %rax, -0x30(%rbp) addq $0x8, %rdi movq -0x30(%rbp), %rsi callq 0x7a470 cmpl $0x0, %eax je 0x79ef3 movb $0x1, -0x1(%rbp) jmp 0x79f32 movq -0x40(%rbp), %rax movq 0x8(%rax), %rdi movl 0x10(%rax), %eax addq %rax, %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %eax movl %eax, %ecx movq -0x28(%rbp), %r8 xorl %eax, %eax movl %eax, %r9d callq 0x79ca0 movl %eax, -0x34(%rbp) jmp 0x79f21 movq -0x40(%rbp), %rax movl -0x34(%rbp), %ecx addl 0x10(%rax), %ecx movl %ecx, 0x10(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ZN6String15append_semi_hexEPKcjPK15charset_info_st: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_1C+4], rsi mov dword ptr [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov [rbp+var_40], rax cmp dword ptr [rbp+var_1C], 0 jnz short loc_79ECB mov [rbp+var_1], 0 jmp short loc_79F32 loc_79ECB: mov edi, dword ptr [rbp+var_1C]; unsigned int call _Z36convert_to_printable_required_lengthj; convert_to_printable_required_length(uint) mov rdi, [rbp+var_40] mov [rbp+var_30], rax add rdi, 8; this mov rsi, [rbp+var_30]; unsigned __int64 call _ZN13Binary_string7reserveEm; Binary_string::reserve(ulong) cmp eax, 0 jz short loc_79EF3 mov [rbp+var_1], 1 jmp short loc_79F32 loc_79EF3: mov rax, [rbp+var_40] mov rdi, [rax+8] mov eax, [rax+10h] add rdi, rax; char * mov rsi, [rbp+var_30]; unsigned __int64 mov rdx, [rbp+var_1C+4]; char * mov eax, dword ptr [rbp+var_1C] mov ecx, eax; unsigned __int64 mov r8, [rbp+var_28]; charset_info_st * xor eax, eax mov r9d, eax; unsigned __int64 call _Z20convert_to_printablePcmPKcmPK15charset_info_stm; convert_to_printable(char *,ulong,char const*,ulong,charset_info_st const*,ulong) mov [rbp+var_34], eax jmp short $+2 loc_79F21: mov rax, [rbp+var_40] mov ecx, [rbp+var_34] add ecx, [rax+10h] mov [rax+10h], ecx mov [rbp+var_1], 0 loc_79F32: mov al, [rbp+var_1] and al, 1 add rsp, 40h pop rbp retn
char String::append_semi_hex(String *this, char *a2, unsigned int a3, const charset_info_st *a4) { long long v5; // [rsp+10h] [rbp-30h] if ( !a3 ) return 0; v5 = convert_to_printable_required_length(a3); if ( (unsigned int)Binary_string::reserve((String *)((char *)this + 8), v5) ) return 1; *((_DWORD *)this + 4) += convert_to_printable( (char *)(*((unsigned int *)this + 4) + *((_QWORD *)this + 1)), v5, a2, a3, a4, 0LL); return 0; }
append_semi_hex: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x00179ecb MOV byte ptr [RBP + -0x1],0x0 JMP 0x00179f32 LAB_00179ecb: MOV EDI,dword ptr [RBP + -0x1c] CALL 0x00179e80 MOV RDI,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x30],RAX ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x30] CALL 0x0017a470 CMP EAX,0x0 JZ 0x00179ef3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00179f32 LAB_00179ef3: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX MOV R8,qword ptr [RBP + -0x28] XOR EAX,EAX MOV R9D,EAX CALL 0x00179ca0 MOV dword ptr [RBP + -0x34],EAX JMP 0x00179f21 LAB_00179f21: MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x34] ADD ECX,dword ptr [RAX + 0x10] MOV dword ptr [RAX + 0x10],ECX MOV byte ptr [RBP + -0x1],0x0 LAB_00179f32: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x40 POP RBP RET
/* String::append_semi_hex(char const*, unsigned int, charset_info_st const*) */ int1 __thiscall String::append_semi_hex(String *this,char *param_1,uint param_2,charset_info_st *param_3) { int iVar1; ulong uVar2; int1 local_9; if (param_2 == 0) { local_9 = 0; } else { uVar2 = convert_to_printable_required_length(param_2); iVar1 = Binary_string::reserve((Binary_string *)(this + 8),uVar2); if (iVar1 == 0) { iVar1 = convert_to_printable ((char *)(*(long *)(this + 8) + (ulong)*(uint *)(this + 0x10)),uVar2,param_1 ,(ulong)param_2,param_3,0); *(int *)(this + 0x10) = iVar1 + *(int *)(this + 0x10); local_9 = 0; } else { local_9 = 1; } } return local_9; }
45,416
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x7864b movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x434f0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3e5d3(%rip), %rsi # 0xb6c40 leaq 0x10(%rsp), %rdi callq 0x786ce movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x63472 xorl %ebp, %ebp leaq 0x858a0(%rip), %rsi # 0xfdf38 leaq -0x3861f(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x786be jmp 0x786c6 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_7864B mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_7864B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_786BE jmp short loc_786C6 mov r14, rax loc_786BE: mov rdi, rbx; void * call ___cxa_free_exception loc_786C6: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__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((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, (long long)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); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
_M_manager: CMP EDX,0x2 JZ 0x00178643 CMP EDX,0x1 JZ 0x0017863e TEST EDX,EDX JNZ 0x00178649 LEA RAX,[0x201498] MOV qword ptr [RDI],RAX JMP 0x00178649 LAB_0017863e: MOV qword ptr [RDI],RSI JMP 0x00178649 LAB_00178643: MOVUPS XMM0,xmmword ptr [RSI] MOVUPS xmmword ptr [RDI],XMM0 LAB_00178649: XOR EAX,EAX RET
/* std::_Function_base::_Base_manager<minja::MacroNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const::{lambda(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)#1}>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation) */ int8 std::_Function_base:: _Base_manager<minja::MacroNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)#1}> ::_M_manager(int8 *param_1,int8 *param_2,int param_3) { int8 uVar1; if (param_3 == 2) { uVar1 = param_2[1]; *param_1 = *param_2; param_1[1] = uVar1; } else if (param_3 == 1) { *param_1 = param_2; } else if (param_3 == 0) { *param_1 = &const::{lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)#1}:: typeinfo; } return 0; }
45,417
js_worker_ctor_internal
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_ctor_internal(JSContext *ctx, JSValue new_target, JSWorkerMessagePipe *recv_pipe, JSWorkerMessagePipe *send_pipe) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue obj = JS_UNDEFINED, proto; JSWorkerData *s; /* create the object */ if (JS_IsUndefined(new_target)) { proto = JS_GetClassProto(ctx, ts->worker_class_id); } else { proto = JS_GetPropertyStr(ctx, new_target, "prototype"); if (JS_IsException(proto)) goto fail; } obj = JS_NewObjectProtoClass(ctx, proto, ts->worker_class_id); JS_FreeValue(ctx, proto); if (JS_IsException(obj)) goto fail; s = js_mallocz(ctx, sizeof(*s)); if (!s) goto fail; s->recv_pipe = js_dup_message_pipe(recv_pipe); s->send_pipe = js_dup_message_pipe(send_pipe); JS_SetOpaque(obj, s); return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
js_worker_ctor_internal: subq $0xa8, %rsp movq %rsi, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq %rdi, 0x80(%rsp) movq %rcx, 0x78(%rsp) movq %r8, 0x70(%rsp) movq 0x80(%rsp), %rdi callq 0x27f00 movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rdi callq 0x115d0 movq %rax, 0x60(%rsp) movq 0xf359f(%rip), %rax # 0x10a310 movq %rax, 0x50(%rsp) movq 0xf359b(%rip), %rax # 0x10a318 movq %rax, 0x58(%rsp) movq 0x88(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0x11930 cmpl $0x0, %eax je 0x16dd1 movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rax movl 0x7c(%rax), %esi callq 0x27aa0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x48(%rsp) jmp 0x16e2e movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx leaq 0xf7222(%rip), %rcx # 0x10e012 callq 0x31e80 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x10390 cmpl $0x0, %eax je 0x16e2c jmp 0x16f14 jmp 0x16e2e movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rax movl 0x7c(%rax), %ecx movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x29ea0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x80(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x23c90 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x10390 cmpl $0x0, %eax je 0x16e98 jmp 0x16f14 movq 0x80(%rsp), %rdi movl $0x18, %esi callq 0x21d30 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x16eb9 jmp 0x16f14 movq 0x78(%rsp), %rdi callq 0x177a0 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, (%rax) movq 0x70(%rsp), %rdi callq 0x177a0 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x38(%rsp), %rdx movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x382f0 movq 0x50(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xa0(%rsp) jmp 0x16f42 movq 0x80(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x23c90 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) movq 0x98(%rsp), %rax movq 0xa0(%rsp), %rdx addq $0xa8, %rsp retq nopw (%rax,%rax)
js_worker_ctor_internal: sub rsp, 0A8h mov [rsp+0A8h+var_20], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_28], rdi mov [rsp+0A8h+var_30], rcx mov [rsp+0A8h+var_38], r8 mov rdi, [rsp+0A8h+var_28] call JS_GetRuntime mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_40] call js_get_thread_state mov [rsp+0A8h+var_48], rax mov rax, cs:qword_10A310 mov [rsp+0A8h+var_58], rax mov rax, cs:qword_10A318 mov [rsp+0A8h+var_50], rax mov rdi, [rsp+0A8h+var_20] mov rsi, [rsp+0A8h+var_18] call JS_IsUndefined cmp eax, 0 jz short loc_16DD1 mov rdi, [rsp+0A8h+var_28] mov rax, [rsp+0A8h+var_48] mov esi, [rax+7Ch] call JS_GetClassProto mov [rsp+0A8h+var_80], rax mov [rsp+0A8h+var_78], rdx mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_68], rax mov rax, [rsp+0A8h+var_78] mov [rsp+0A8h+var_60], rax jmp short loc_16E2E loc_16DD1: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] lea rcx, aProxyBadProtot+0Bh; "prototype" call JS_GetPropertyStr mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_88], rdx mov rax, [rsp+0A8h+var_90] mov [rsp+0A8h+var_68], rax mov rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_60], rax mov rdi, [rsp+0A8h+var_68] mov rsi, [rsp+0A8h+var_60] call JS_IsException_0 cmp eax, 0 jz short loc_16E2C jmp loc_16F14 loc_16E2C: jmp short $+2 loc_16E2E: mov rdi, [rsp+0A8h+var_28] mov rax, [rsp+0A8h+var_48] mov ecx, [rax+7Ch] mov rsi, [rsp+0A8h+var_68] mov rdx, [rsp+0A8h+var_60] call JS_NewObjectProtoClass mov [rsp+0A8h+var_A0], rax mov [rsp+0A8h+var_98], rdx mov rax, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_58], rax mov rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_50], rax mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_68] mov rdx, [rsp+0A8h+var_60] call JS_FreeValue mov rdi, [rsp+0A8h+var_58] mov rsi, [rsp+0A8h+var_50] call JS_IsException_0 cmp eax, 0 jz short loc_16E98 jmp short loc_16F14 loc_16E98: mov rdi, [rsp+0A8h+var_28] mov esi, 18h call js_mallocz mov [rsp+0A8h+var_70], rax cmp [rsp+0A8h+var_70], 0 jnz short loc_16EB9 jmp short loc_16F14 loc_16EB9: mov rdi, [rsp+0A8h+var_30] call js_dup_message_pipe mov rcx, rax mov rax, [rsp+0A8h+var_70] mov [rax], rcx mov rdi, [rsp+0A8h+var_38] call js_dup_message_pipe mov rcx, rax mov rax, [rsp+0A8h+var_70] mov [rax+8], rcx mov rdx, [rsp+0A8h+var_70] mov rdi, [rsp+0A8h+var_58] mov rsi, [rsp+0A8h+var_50] call JS_SetOpaque mov rax, [rsp+0A8h+var_58] mov [rsp+0A8h+var_10], rax mov rax, [rsp+0A8h+var_50] mov [rsp+0A8h+var_8], rax jmp short loc_16F42 loc_16F14: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call JS_FreeValue mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 loc_16F42: mov rax, [rsp+0A8h+var_10] mov rdx, [rsp+0A8h+var_8] add rsp, 0A8h retn
long long js_worker_ctor_internal(long long a1, long long a2, long long a3, long long a4, long long a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rdx long long v10; // rax long long v11; // rdx long long v12; // rdx long long PropertyStr; // [rsp+18h] [rbp-90h] _QWORD *v15; // [rsp+38h] [rbp-70h] long long ClassProto; // [rsp+40h] [rbp-68h] long long v17; // [rsp+48h] [rbp-60h] long long v18; // [rsp+50h] [rbp-58h] long long v19; // [rsp+58h] [rbp-50h] long long thread_state; // [rsp+60h] [rbp-48h] int Runtime; // [rsp+68h] [rbp-40h] long long v25; // [rsp+98h] [rbp-10h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8); v18 = 0LL; v19 = 3LL; if ( JS_IsUndefined(a2, a3) ) { ClassProto = JS_GetClassProto(a1, *(unsigned int *)(thread_state + 124)); v17 = v9; v10 = JS_NewObjectProtoClass(a1, ClassProto, v9, *(unsigned int *)(thread_state + 124)); } else { PropertyStr = JS_GetPropertyStr(a1, a2, a3, "prototype"); ClassProto = PropertyStr; v17 = v12; if ( JS_IsException_0(PropertyStr, v12) ) { LABEL_8: JS_FreeValue(a1, v18, v19); LODWORD(v25) = 0; return v25; } v10 = JS_NewObjectProtoClass(a1, PropertyStr, v17, *(unsigned int *)(thread_state + 124)); } v18 = v10; v19 = v11; JS_FreeValue(a1, ClassProto, v17); if ( JS_IsException_0(v18, v19) ) goto LABEL_8; v15 = (_QWORD *)js_mallocz(a1, 24LL); if ( !v15 ) goto LABEL_8; *v15 = js_dup_message_pipe(a4); v15[1] = js_dup_message_pipe(a5); JS_SetOpaque(v18, v19, v15); return v18; }
js_worker_ctor_internal: SUB RSP,0xa8 MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x70],R8 MOV RDI,qword ptr [RSP + 0x80] CALL 0x00127f00 MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x68] CALL 0x001115d0 MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [0x0020a310] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [0x0020a318] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x90] CALL 0x00111930 CMP EAX,0x0 JZ 0x00116dd1 MOV RDI,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RAX + 0x7c] CALL 0x00127aa0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x48],RAX JMP 0x00116e2e LAB_00116dd1: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] LEA RCX,[0x20e012] CALL 0x00131e80 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00110390 CMP EAX,0x0 JZ 0x00116e2c JMP 0x00116f14 LAB_00116e2c: JMP 0x00116e2e LAB_00116e2e: MOV RDI,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV ECX,dword ptr [RAX + 0x7c] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00129ea0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x00110390 CMP EAX,0x0 JZ 0x00116e98 JMP 0x00116f14 LAB_00116e98: MOV RDI,qword ptr [RSP + 0x80] MOV ESI,0x18 CALL 0x00121d30 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x00116eb9 JMP 0x00116f14 LAB_00116eb9: MOV RDI,qword ptr [RSP + 0x78] CALL 0x001177a0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x70] CALL 0x001177a0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x001382f0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xa0],RAX JMP 0x00116f42 LAB_00116f14: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x00123c90 MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 LAB_00116f42: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
int1 [16] js_worker_ctor_internal (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int8 uVar2; long lVar3; int8 *puVar4; int1 auVar5 [16]; int1 auVar6 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int4 local_10; int4 uStack_c; int8 local_8; uVar2 = JS_GetRuntime(param_1); lVar3 = js_get_thread_state(uVar2); auVar6._8_8_ = DAT_0020a318; auVar6._0_8_ = DAT_0020a310; iVar1 = JS_IsUndefined(param_2,param_3); if (iVar1 == 0) { auVar5 = JS_GetPropertyStr(param_1,param_2,param_3,"prototype"); iVar1 = JS_IsException(auVar5._0_8_,auVar5._8_8_); if (iVar1 == 0) goto LAB_00116e2e; } else { auVar5 = JS_GetClassProto(param_1,*(int4 *)(lVar3 + 0x7c)); LAB_00116e2e: local_60 = auVar5._8_8_; local_68 = auVar5._0_8_; auVar6 = JS_NewObjectProtoClass(param_1,local_68,local_60,*(int4 *)(lVar3 + 0x7c)); local_8 = auVar6._8_8_; JS_FreeValue(param_1,local_68,local_60); iVar1 = JS_IsException(auVar6._0_8_,local_8); if ((iVar1 == 0) && (puVar4 = (int8 *)js_mallocz(param_1,0x18), puVar4 != (int8 *)0x0)) { uVar2 = js_dup_message_pipe(param_4); *puVar4 = uVar2; uVar2 = js_dup_message_pipe(param_5); puVar4[1] = uVar2; JS_SetOpaque(auVar6._0_8_,local_8,puVar4); local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; goto LAB_00116f42; } } local_50 = auVar6._8_8_; local_58 = auVar6._0_8_; JS_FreeValue(param_1,local_58,local_50); local_10 = 0; local_8 = 6; LAB_00116f42: auVar5._4_4_ = uStack_c; auVar5._0_4_ = local_10; auVar5._8_8_ = local_8; return auVar5; }
45,418
js_worker_ctor_internal
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_ctor_internal(JSContext *ctx, JSValue new_target, JSWorkerMessagePipe *recv_pipe, JSWorkerMessagePipe *send_pipe) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue obj = JS_UNDEFINED, proto; JSWorkerData *s; /* create the object */ if (JS_IsUndefined(new_target)) { proto = JS_GetClassProto(ctx, ts->worker_class_id); } else { proto = JS_GetPropertyStr(ctx, new_target, "prototype"); if (JS_IsException(proto)) goto fail; } obj = JS_NewObjectProtoClass(ctx, proto, ts->worker_class_id); JS_FreeValue(ctx, proto); if (JS_IsException(obj)) goto fail; s = js_mallocz(ctx, sizeof(*s)); if (!s) goto fail; s->recv_pipe = js_dup_message_pipe(recv_pipe); s->send_pipe = js_dup_message_pipe(send_pipe); JS_SetOpaque(obj, s); return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
js_worker_ctor_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, (%rsp) movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %rbx callq 0x204e9 xorl %edi, %edi movq %rax, %rsi xorl %eax, %eax callq 0x3bb70 movq %rax, %r12 cmpl $0x3, %r14d jne 0x18afa movl 0x7c(%r12), %esi movq %rbx, %rdi callq 0x200b2 movq %rax, %rbp movq %rdx, %r14 jmp 0x18b26 leaq 0x8946d(%rip), %rcx # 0xa1f6e movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x2491d movq %rdx, %r14 cmpl $0x6, %r14d jne 0x18b23 movl $0x3, %r12d xorl %r13d, %r13d jmp 0x18b87 movq %rax, %rbp movl 0x7c(%r12), %ecx movq %rbx, %rdi movq %rbp, %rsi movq %r14, %rdx callq 0x21651 movq %rax, %r13 movq %rdx, %r12 movq %rbx, %rdi movq %rbp, %rsi movq %r14, %rdx callq 0x1e1d5 cmpl $0x6, %r12d je 0x18b87 movl $0x18, %esi movq %rbx, %rdi callq 0xee3f testq %rax, %rax je 0x18b87 lock incl (%r15) movq %r15, (%rax) movq (%rsp), %rcx lock incl (%rcx) movq %rcx, 0x8(%rax) movq %r13, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x27ca4 jmp 0x18b9e movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1e1d5 movl $0x6, %r12d xorl %r13d, %r13d movq %r13, %rax movq %r12, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_worker_ctor_internal: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], r8 mov r15, rcx mov r14, rdx mov r13, rsi mov rbx, rdi call JS_GetRuntime xor edi, edi mov rsi, rax xor eax, eax call js_std_cmd mov r12, rax cmp r14d, 3 jnz short loc_18AFA mov esi, [r12+7Ch] mov rdi, rbx call JS_GetClassProto mov rbp, rax mov r14, rdx jmp short loc_18B26 loc_18AFA: lea rcx, aProxyBadProtot+0Bh; "prototype" mov rdi, rbx mov rsi, r13 mov rdx, r14 call JS_GetPropertyStr mov r14, rdx cmp r14d, 6 jnz short loc_18B23 mov r12d, 3 xor r13d, r13d jmp short loc_18B87 loc_18B23: mov rbp, rax loc_18B26: mov ecx, [r12+7Ch] mov rdi, rbx mov rsi, rbp mov rdx, r14 call JS_NewObjectProtoClass mov r13, rax mov r12, rdx mov rdi, rbx mov rsi, rbp mov rdx, r14 call JS_FreeValue cmp r12d, 6 jz short loc_18B87 mov esi, 18h mov rdi, rbx call js_mallocz test rax, rax jz short loc_18B87 lock inc dword ptr [r15] mov [rax], r15 mov rcx, [rsp+38h+var_38] lock inc dword ptr [rcx] mov [rax+8], rcx mov rdi, r13 mov rsi, r12 mov rdx, rax call JS_SetOpaque jmp short loc_18B9E loc_18B87: mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_FreeValue mov r12d, 6 xor r13d, r13d loc_18B9E: mov rax, r13 mov rdx, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_worker_ctor_internal( long long a1, long long a2, long long a3, volatile signed __int32 *a4, volatile signed __int32 *a5) { int Runtime; // eax int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // rax long long v13; // r12 long long ClassProto; // rbp long long v15; // rdx long long v16; // r14 long long PropertyStr; // rax long long v18; // rdx long long v19; // r12 long long v20; // r13 long long v21; // rdx _QWORD *v22; // rax Runtime = JS_GetRuntime(a1); v12 = js_std_cmd(0, Runtime, v8, v9, v10, v11); v13 = v12; if ( (_DWORD)a3 == 3 ) { ClassProto = JS_GetClassProto(a1, *(unsigned int *)(v12 + 124)); v16 = v15; } else { PropertyStr = JS_GetPropertyStr(a1, a2, a3, "prototype"); v16 = v18; if ( (_DWORD)v18 == 6 ) { v19 = 3LL; v20 = 0LL; LABEL_9: JS_FreeValue(a1, v20, v19); return 0LL; } ClassProto = PropertyStr; } v20 = JS_NewObjectProtoClass(a1, ClassProto, v16, *(unsigned int *)(v13 + 124)); v19 = v21; JS_FreeValue(a1, ClassProto, v16); if ( (_DWORD)v19 == 6 ) goto LABEL_9; v22 = (_QWORD *)js_mallocz(a1, 0x18uLL); if ( !v22 ) goto LABEL_9; _InterlockedIncrement(a4); *v22 = a4; _InterlockedIncrement(a5); v22[1] = a5; JS_SetOpaque(v20, v19, v22); return v20; }
js_worker_ctor_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],R8 MOV R15,RCX MOV R14,RDX MOV R13,RSI MOV RBX,RDI CALL 0x001204e9 XOR EDI,EDI MOV RSI,RAX XOR EAX,EAX CALL 0x0013bb70 MOV R12,RAX CMP R14D,0x3 JNZ 0x00118afa MOV ESI,dword ptr [R12 + 0x7c] MOV RDI,RBX CALL 0x001200b2 MOV RBP,RAX MOV R14,RDX JMP 0x00118b26 LAB_00118afa: LEA RCX,[0x1a1f6e] MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0012491d MOV R14,RDX CMP R14D,0x6 JNZ 0x00118b23 MOV R12D,0x3 XOR R13D,R13D JMP 0x00118b87 LAB_00118b23: MOV RBP,RAX LAB_00118b26: MOV ECX,dword ptr [R12 + 0x7c] MOV RDI,RBX MOV RSI,RBP MOV RDX,R14 CALL 0x00121651 MOV R13,RAX MOV R12,RDX MOV RDI,RBX MOV RSI,RBP MOV RDX,R14 CALL 0x0011e1d5 CMP R12D,0x6 JZ 0x00118b87 MOV ESI,0x18 MOV RDI,RBX CALL 0x0010ee3f TEST RAX,RAX JZ 0x00118b87 INC.LOCK dword ptr [R15] MOV qword ptr [RAX],R15 MOV RCX,qword ptr [RSP] INC.LOCK dword ptr [RCX] MOV qword ptr [RAX + 0x8],RCX MOV RDI,R13 MOV RSI,R12 MOV RDX,RAX CALL 0x00127ca4 JMP 0x00118b9e LAB_00118b87: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x0011e1d5 MOV R12D,0x6 XOR R13D,R13D LAB_00118b9e: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_worker_ctor_internal (int8 param_1,int8 param_2,int8 param_3,int *param_4,int *param_5) { int8 uVar1; long lVar2; int8 *puVar3; int1 auVar4 [16]; int1 auVar5 [16]; uVar1 = JS_GetRuntime(); lVar2 = js_std_cmd(0,uVar1); if ((int)param_3 == 3) { auVar4 = JS_GetClassProto(param_1,*(int4 *)(lVar2 + 0x7c)); } else { auVar4 = JS_GetPropertyStr(param_1,param_2,param_3,"prototype"); if (auVar4._8_4_ == 6) { auVar5 = ZEXT816(3) << 0x40; goto LAB_00118b87; } } auVar5 = JS_NewObjectProtoClass(param_1,auVar4._0_8_,auVar4._8_8_,*(int4 *)(lVar2 + 0x7c)); JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_); if ((auVar5._8_4_ != 6) && (puVar3 = (int8 *)js_mallocz(param_1,0x18), puVar3 != (int8 *)0x0)) { LOCK(); *param_4 = *param_4 + 1; UNLOCK(); *puVar3 = param_4; LOCK(); *param_5 = *param_5 + 1; UNLOCK(); puVar3[1] = param_5; JS_SetOpaque(auVar5._0_8_,auVar5._8_8_,puVar3); return auVar5; } LAB_00118b87: JS_FreeValue(param_1,auVar5._0_8_,auVar5._8_8_); return ZEXT816(6) << 0x40; }
45,419
blst_pairing_raw_aggregate
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/aggregate.c
void blst_pairing_raw_aggregate(PAIRING *ctx, const POINTonE2_affine *q, const POINTonE1_affine *p) { unsigned int n; if (vec_is_zero(q, sizeof(*q)) & vec_is_zero(p, sizeof(*p))) return; n = ctx->nelems; vec_copy(ctx->Q + n, q, sizeof(*q)); vec_copy(ctx->P + n, p, sizeof(*p)); if (++n == N_MAX) { if (ctx->ctrl & AGGR_GT_SET) { vec384fp12 GT; miller_loop_n(GT, ctx->Q, ctx->P, n); mul_fp12(ctx->GT, ctx->GT, GT); } else { miller_loop_n(ctx->GT, ctx->Q, ctx->P, n); ctx->ctrl |= AGGR_GT_SET; } n = 0; } ctx->nelems = n; }
O0
c
blst_pairing_raw_aggregate: pushq %rbp movq %rsp, %rbp subq $0x270, %rsp # imm = 0x270 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi movl $0xc0, %esi callq 0x23820 movq %rax, -0x268(%rbp) movq -0x18(%rbp), %rdi movl $0x60, %esi callq 0x23820 movq %rax, %rcx movq -0x268(%rbp), %rax andq %rcx, %rax cmpq $0x0, %rax je 0x2c802 jmp 0x2c8fe movq -0x8(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x8(%rbp), %rdi addq $0x378, %rdi # imm = 0x378 movl -0x1c(%rbp), %eax imulq $0xc0, %rax, %rax addq %rax, %rdi movq -0x10(%rbp), %rsi movl $0xc0, %edx callq 0x23620 movq -0x8(%rbp), %rdi addq $0x978, %rdi # imm = 0x978 movl -0x1c(%rbp), %eax imulq $0x60, %rax, %rax addq %rax, %rdi movq -0x18(%rbp), %rsi movl $0x60, %edx callq 0x23620 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) cmpl $0x8, %eax jne 0x2c8f4 movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x2c8ba leaq -0x260(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0x378, %rsi # imm = 0x378 movq -0x8(%rbp), %rdx addq $0x978, %rdx # imm = 0x978 movl -0x1c(%rbp), %eax movl %eax, %ecx callq 0x2a300 movq -0x8(%rbp), %rdi addq $0x18, %rdi movq -0x8(%rbp), %rsi addq $0x18, %rsi leaq -0x260(%rbp), %rdx callq 0x299e0 jmp 0x2c8ed movq -0x8(%rbp), %rdi addq $0x18, %rdi movq -0x8(%rbp), %rsi addq $0x378, %rsi # imm = 0x378 movq -0x8(%rbp), %rdx addq $0x978, %rdx # imm = 0x978 movl -0x1c(%rbp), %eax movl %eax, %ecx callq 0x2a300 movq -0x8(%rbp), %rax movl (%rax), %ecx orl $0x20, %ecx movl %ecx, (%rax) movl $0x0, -0x1c(%rbp) movl -0x1c(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x4(%rax) addq $0x270, %rsp # imm = 0x270 popq %rbp retq nopw (%rax,%rax)
blst_pairing_raw_aggregate: push rbp mov rbp, rsp sub rsp, 270h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10] mov esi, 0C0h call vec_is_zero mov [rbp+var_268], rax mov rdi, [rbp+var_18] mov esi, 60h ; '`' call vec_is_zero mov rcx, rax mov rax, [rbp+var_268] and rax, rcx cmp rax, 0 jz short loc_2C802 jmp loc_2C8FE loc_2C802: mov rax, [rbp+var_8] mov eax, [rax+4] mov [rbp+var_1C], eax mov rdi, [rbp+var_8] add rdi, 378h mov eax, [rbp+var_1C] imul rax, 0C0h add rdi, rax mov rsi, [rbp+var_10] mov edx, 0C0h call vec_copy mov rdi, [rbp+var_8] add rdi, 978h mov eax, [rbp+var_1C] imul rax, 60h ; '`' add rdi, rax mov rsi, [rbp+var_18] mov edx, 60h ; '`' call vec_copy mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax cmp eax, 8 jnz loc_2C8F4 mov rax, [rbp+var_8] mov eax, [rax] and eax, 20h cmp eax, 0 jz short loc_2C8BA lea rdi, [rbp+var_260] mov rsi, [rbp+var_8] add rsi, 378h mov rdx, [rbp+var_8] add rdx, 978h mov eax, [rbp+var_1C] mov ecx, eax call miller_loop_n mov rdi, [rbp+var_8] add rdi, 18h mov rsi, [rbp+var_8] add rsi, 18h lea rdx, [rbp+var_260] call mul_fp12 jmp short loc_2C8ED loc_2C8BA: mov rdi, [rbp+var_8] add rdi, 18h mov rsi, [rbp+var_8] add rsi, 378h mov rdx, [rbp+var_8] add rdx, 978h mov eax, [rbp+var_1C] mov ecx, eax call miller_loop_n mov rax, [rbp+var_8] mov ecx, [rax] or ecx, 20h mov [rax], ecx loc_2C8ED: mov [rbp+var_1C], 0 loc_2C8F4: mov ecx, [rbp+var_1C] mov rax, [rbp+var_8] mov [rax+4], ecx loc_2C8FE: add rsp, 270h pop rbp retn
unsigned long long blst_pairing_raw_aggregate(_DWORD *a1, long long a2, long long a3) { unsigned long long result; // rax unsigned long long is_zero; // [rsp+8h] [rbp-268h] _BYTE v5[580]; // [rsp+10h] [rbp-260h] BYREF unsigned int v6; // [rsp+254h] [rbp-1Ch] long long v7; // [rsp+258h] [rbp-18h] long long v8; // [rsp+260h] [rbp-10h] _DWORD *v9; // [rsp+268h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; is_zero = vec_is_zero(a2, 0xC0uLL); result = vec_is_zero(v7, 0x60uLL) & is_zero; if ( !result ) { v6 = v9[1]; vec_copy((long long)&v9[48 * v6 + 222], v8, 0xC0uLL); vec_copy((long long)&v9[24 * v6++ + 606], v7, 0x60uLL); if ( v6 == 8 ) { if ( (*v9 & 0x20) != 0 ) { miller_loop_n((long long)v5, (long long)(v9 + 222), (long long)(v9 + 606), v6); mul_fp12((long long)(v9 + 6), (long long)(v9 + 6), (long long)v5); } else { miller_loop_n((long long)(v9 + 6), (long long)(v9 + 222), (long long)(v9 + 606), v6); *v9 |= 0x20u; } v6 = 0; } result = (unsigned long long)v9; v9[1] = v6; } return result; }
blst_pairing_raw_aggregate: PUSH RBP MOV RBP,RSP SUB RSP,0x270 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xc0 CALL 0x00123820 MOV qword ptr [RBP + -0x268],RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x60 CALL 0x00123820 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x268] AND RAX,RCX CMP RAX,0x0 JZ 0x0012c802 JMP 0x0012c8fe LAB_0012c802: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x1c],EAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x378 MOV EAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0xc0 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0xc0 CALL 0x00123620 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x978 MOV EAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0x60 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x60 CALL 0x00123620 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x8 JNZ 0x0012c8f4 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x20 CMP EAX,0x0 JZ 0x0012c8ba LEA RDI,[RBP + -0x260] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x378 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x978 MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX CALL 0x0012a300 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x18 LEA RDX,[RBP + -0x260] CALL 0x001299e0 JMP 0x0012c8ed LAB_0012c8ba: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x378 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x978 MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX CALL 0x0012a300 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX] OR ECX,0x20 MOV dword ptr [RAX],ECX LAB_0012c8ed: MOV dword ptr [RBP + -0x1c],0x0 LAB_0012c8f4: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],ECX LAB_0012c8fe: ADD RSP,0x270 POP RBP RET
void blst_pairing_raw_aggregate(uint *param_1,int8 param_2,int8 param_3) { ulong uVar1; ulong uVar2; int1 local_268 [580]; uint local_24; int8 local_20; int8 local_18; uint *local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar1 = vec_is_zero(param_2,0xc0); uVar2 = vec_is_zero(local_20,0x60); if ((uVar1 & uVar2) == 0) { local_24 = local_10[1]; vec_copy(local_10 + (ulong)local_24 * 0x30 + 0xde,local_18,0xc0); vec_copy(local_10 + (ulong)local_24 * 0x18 + 0x25e,local_20,0x60); local_24 = local_24 + 1; if (local_24 == 8) { if ((*local_10 & 0x20) == 0) { miller_loop_n(local_10 + 6,local_10 + 0xde,local_10 + 0x25e,8); *local_10 = *local_10 | 0x20; } else { miller_loop_n(local_268,local_10 + 0xde,local_10 + 0x25e,8); mul_fp12(local_10 + 6,local_10 + 6,local_268); } local_24 = 0; } local_10[1] = local_24; } return; }
45,420
ma_tls_verify_server_cert
eloqsql/libmariadb/libmariadb/secure/openssl.c
int ma_tls_verify_server_cert(MARIADB_TLS *ctls) { X509 *cert; MYSQL *mysql; SSL *ssl; MARIADB_PVIO *pvio; #if !defined(HAVE_OPENSSL_CHECK_HOST) X509_NAME *x509sn; int cn_pos; X509_NAME_ENTRY *cn_entry; ASN1_STRING *cn_asn1; const char *cn_str; #endif if (!ctls || !ctls->ssl) return 1; ssl= (SSL *)ctls->ssl; mysql= (MYSQL *)SSL_get_app_data(ssl); pvio= mysql->net.pvio; if (!mysql->host) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Invalid (empty) hostname"); return 1; } if (!(cert= SSL_get_peer_certificate(ssl))) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate"); return 1; } #ifdef HAVE_OPENSSL_CHECK_HOST if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1 && X509_check_ip_asc(cert, mysql->host, 0) != 1) goto error; #else x509sn= X509_get_subject_name(cert); if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0) goto error; if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos))) goto error; if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry))) goto error; cn_str = (char *)ASN1_STRING_data(cn_asn1); /* Make sure there is no embedded \0 in the CN */ if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str)) goto error; if (strcmp(cn_str, mysql->host)) goto error; #endif X509_free(cert); return 0; error: X509_free(cert); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Validation of SSL server certificate failed"); return 1; }
O0
c
ma_tls_verify_server_cert: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x5c9ee movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x5c9fa movl $0x1, -0x4(%rbp) jmp 0x5cb5a movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi xorl %esi, %esi callq 0x36300 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x2b0(%rax) jne 0x5ca6f movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x1d863f(%rip), %rax # 0x235080 movq (%rax), %rdx leaq 0x1d8645(%rip), %rax # 0x235090 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x70b7a(%rip), %r8 # 0xcd5d8 movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) jmp 0x5cb5a movq -0x28(%rbp), %rdi callq 0x36a90 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x5cac3 movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x1d85eb(%rip), %rax # 0x235080 movq (%rax), %rdx leaq 0x1d85f1(%rip), %rax # 0x235090 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x70b3f(%rip), %r8 # 0xcd5f1 movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) jmp 0x5cb5a movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x2b0(%rax), %rsi xorl %eax, %eax movl %eax, %r8d xorl %ecx, %ecx movq %r8, %rdx callq 0x36620 cmpl $0x1, %eax je 0x5cb03 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x2b0(%rax), %rsi xorl %edx, %edx callq 0x36830 cmpl $0x1, %eax je 0x5cb03 jmp 0x5cb15 movq -0x18(%rbp), %rdi callq 0x36bd0 movl $0x0, -0x4(%rbp) jmp 0x5cb5a movq -0x18(%rbp), %rdi callq 0x36bd0 movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x1d854f(%rip), %rax # 0x235080 movq (%rax), %rdx leaq 0x1d8555(%rip), %rax # 0x235090 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x70ac4(%rip), %r8 # 0xcd612 movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_tls_verify_server_cert: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jz short loc_5C9EE mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_5C9FA loc_5C9EE: mov [rbp+var_4], 1 jmp loc_5CB5A loc_5C9FA: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax mov rdi, [rbp+var_28] xor esi, esi call _SSL_get_ex_data mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_20] cmp qword ptr [rax+2B0h], 0 jnz short loc_5CA6F mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aInvalidEmptyHo; "Invalid (empty) hostname" mov al, 0 call r9 mov [rbp+var_4], 1 jmp loc_5CB5A loc_5CA6F: mov rdi, [rbp+var_28] call _SSL_get1_peer_certificate mov [rbp+var_18], rax cmp rax, 0 jnz short loc_5CAC3 mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aUnableToGetSer; "Unable to get server certificate" mov al, 0 call r9 mov [rbp+var_4], 1 jmp loc_5CB5A loc_5CAC3: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rsi, [rax+2B0h] xor eax, eax mov r8d, eax xor ecx, ecx mov rdx, r8 call _X509_check_host cmp eax, 1 jz short loc_5CB03 mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rsi, [rax+2B0h] xor edx, edx call _X509_check_ip_asc cmp eax, 1 jz short loc_5CB03 jmp short loc_5CB15 loc_5CB03: mov rdi, [rbp+var_18] call _X509_free mov [rbp+var_4], 0 jmp short loc_5CB5A loc_5CB15: mov rdi, [rbp+var_18] call _X509_free mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aValidationOfSs; "Validation of SSL server certificate fa"... mov al, 0 call r9 mov [rbp+var_4], 1 loc_5CB5A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ma_tls_verify_server_cert(long long a1) { long long v2; // [rsp+0h] [rbp-30h] long long v3; // [rsp+8h] [rbp-28h] long long *v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] if ( a1 && *(_QWORD *)(a1 + 16) ) { v3 = *(_QWORD *)(a1 + 16); v4 = (long long *)SSL_get_ex_data(v3, 0LL); v2 = *v4; if ( v4[86] ) { v5 = SSL_get1_peer_certificate(v3); if ( v5 ) { if ( (unsigned int)X509_check_host(v5, v4[86], 0LL, 0LL) == 1 || (unsigned int)X509_check_ip_asc(v5, v4[86], 0LL) == 1 ) { X509_free(v5); return 0; } else { X509_free(v5); (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Validation of SSL server certificate failed"); return 1; } } else { (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Unable to get server certificate"); return 1; } } else { (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Invalid (empty) hostname"); return 1; } } else { return 1; } }
ma_tls_verify_server_cert: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0015c9ee MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0015c9fa LAB_0015c9ee: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015cb5a LAB_0015c9fa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00136300 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x2b0],0x0 JNZ 0x0015ca6f MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x335080] MOV RDX,qword ptr [RAX] LEA RAX,[0x335090] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1cd5d8] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015cb5a LAB_0015ca6f: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00136a90 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0015cac3 MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x335080] MOV RDX,qword ptr [RAX] LEA RAX,[0x335090] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1cd5f1] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015cb5a LAB_0015cac3: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x2b0] XOR EAX,EAX MOV R8D,EAX XOR ECX,ECX MOV RDX,R8 CALL 0x00136620 CMP EAX,0x1 JZ 0x0015cb03 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x2b0] XOR EDX,EDX CALL 0x00136830 CMP EAX,0x1 JZ 0x0015cb03 JMP 0x0015cb15 LAB_0015cb03: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00136bd0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015cb5a LAB_0015cb15: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00136bd0 MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x335080] MOV RDX,qword ptr [RAX] LEA RAX,[0x335090] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1cd612] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 LAB_0015cb5a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 ma_tls_verify_server_cert(long param_1) { SSL *ssl; long lVar1; int iVar2; long *plVar3; X509 *a; int4 local_c; if ((param_1 == 0) || (*(long *)(param_1 + 0x10) == 0)) { local_c = 1; } else { ssl = *(SSL **)(param_1 + 0x10); plVar3 = (long *)SSL_get_ex_data(ssl,0); lVar1 = *plVar3; if (plVar3[0x56] == 0) { (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00335160, "Invalid (empty) hostname"); local_c = 1; } else { a = (X509 *)SSL_get1_peer_certificate(ssl); if (a == (X509 *)0x0) { (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00335160, "Unable to get server certificate"); local_c = 1; } else { iVar2 = X509_check_host(a,plVar3[0x56],0,0); if ((iVar2 != 1) && (iVar2 = X509_check_ip_asc(a,plVar3[0x56],0), iVar2 != 1)) { X509_free(a); (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00335160, "Validation of SSL server certificate failed"); return 1; } X509_free(a); local_c = 0; } } } return local_c; }
45,421
my_free
eloqsql/mysys/my_malloc.c
void my_free(void *ptr) { my_memory_header *mh; size_t old_size; my_bool old_flags; DBUG_ENTER("my_free"); DBUG_PRINT("my",("ptr: %p", ptr)); if (ptr == NULL) DBUG_VOID_RETURN; mh= USER_TO_HEADER(ptr); old_size= mh->m_size & ~1; old_flags= mh->m_size & 1; PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner); update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags); #ifndef SAFEMALLOC /* Trash memory if not safemalloc. We don't have to do this if safemalloc is used as safemalloc will also do trashing */ TRASH_FREE(ptr, old_size); #endif sf_free(mh); DBUG_VOID_RETURN; }
O3
c
my_free: testq %rdi, %rdi je 0x9ff23 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq -0x18(%rdi), %rbx movq -0x18(%rdi), %rdx movq -0x10(%rdi), %r14 movq %r14, %r15 andq $-0x2, %r15 leaq 0x2e6125(%rip), %rax # 0x386010 movq (%rax), %rax movl -0x8(%rdi), %edi movq %r15, %rsi callq *0x3f8(%rax) movq $-0x18, %rdi subq %r15, %rdi andl $0x1, %r14d movl %r14d, %esi callq *0x2e5bdf(%rip) # 0x385af0 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x29160 retq
my_free: test rdi, rdi jz short locret_9FF23 push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea rbx, [rdi-18h] mov rdx, [rdi-18h] mov r14, [rdi-10h] mov r15, r14 and r15, 0FFFFFFFFFFFFFFFEh lea rax, PSI_server mov rax, [rax] mov edi, [rdi-8] mov rsi, r15 call qword ptr [rax+3F8h] mov rdi, 0FFFFFFFFFFFFFFE8h sub rdi, r15 and r14d, 1 mov esi, r14d call cs:update_malloc_size mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _free locret_9FF23: retn
long long my_free(long long a1) { long long result; // rax if ( a1 ) { ((void ( *)(_QWORD, unsigned long long, _QWORD))PSI_server[127])( *(unsigned int *)(a1 - 8), *(_QWORD *)(a1 - 16) & 0xFFFFFFFFFFFFFFFELL, *(_QWORD *)(a1 - 24)); update_malloc_size(); return free(a1 - 24); } return result; }
my_free: TEST RDI,RDI JZ 0x0019ff23 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA RBX,[RDI + -0x18] MOV RDX,qword ptr [RDI + -0x18] MOV R14,qword ptr [RDI + -0x10] MOV R15,R14 AND R15,-0x2 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RDI + -0x8] MOV RSI,R15 CALL qword ptr [RAX + 0x3f8] MOV RDI,-0x18 SUB RDI,R15 AND R14D,0x1 MOV ESI,R14D CALL qword ptr [0x00485af0] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00129160 LAB_0019ff23: RET
void my_free(long param_1) { ulong uVar1; ulong uVar2; if (param_1 != 0) { uVar1 = *(ulong *)(param_1 + -0x10); uVar2 = uVar1 & 0xfffffffffffffffe; (**(code **)(PSI_server + 0x3f8)) (*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18)); (*(code *)update_malloc_size)(-0x18 - uVar2,(uint)uVar1 & 1); free((void *)(param_1 + -0x18)); return; } return; }
45,422
testing::internal::Random::Generate(unsigned int)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
uint32_t Random::Generate(uint32_t range) { // These constants are the same as are used in glibc's rand(3). // Use wider types than necessary to prevent unsigned overflow diagnostics. state_ = static_cast<uint32_t>(1103515245ULL * state_ + 12345U) % kMaxRange; GTEST_CHECK_(range > 0) << "Cannot generate a number in the range [0, 0)."; GTEST_CHECK_(range <= kMaxRange) << "Generation of a number in [0, " << range << ") was requested, " << "but this can only generate numbers in [0, " << kMaxRange << ")."; // Converting via modulus introduces a bit of downward bias, but // it's simple, and a linear congruential generator isn't too good // to begin with. return state_ % range; }
O0
cpp
testing::internal::Random::Generate(unsigned int): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movl %esi, 0x7c(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x60(%rsp) movl (%rax), %eax imulq $0x41c64e6d, %rax, %rax # imm = 0x41C64E6D addq $0x3039, %rax # imm = 0x3039 movl $0x80000000, %ecx # imm = 0x80000000 xorl %edx, %edx divl %ecx movq 0x60(%rsp), %rax movl %edx, (%rax) cmpl $0x0, 0x7c(%rsp) seta %al movzbl %al, %edi andl $0x1, %edi callq 0xbc040 testb $0x1, %al jne 0xc4948 jmp 0xc494d jmp 0xc49d2 leaq 0x58372(%rip), %rdx # 0x11ccc6 leaq 0x78(%rsp), %rdi movq %rdi, 0x50(%rsp) movl $0x3, %esi movl $0x19a, %ecx # imm = 0x19A callq 0xc17d0 movq 0x50(%rsp), %rdi callq 0x20a90 movq %rax, 0x58(%rsp) jmp 0xc497e movq 0x58(%rsp), %rdi leaq 0x5839d(%rip), %rsi # 0x11cd27 callq 0x166e0 movq %rax, 0x48(%rsp) jmp 0xc4996 movq 0x48(%rsp), %rdi leaq 0x583a2(%rip), %rsi # 0x11cd44 callq 0x166e0 jmp 0xc49a9 leaq 0x78(%rsp), %rdi callq 0xc1940 jmp 0xc49d2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x78(%rsp), %rdi callq 0xc1940 jmp 0xc4aff cmpl $0x80000000, 0x7c(%rsp) # imm = 0x80000000 setbe %al movzbl %al, %edi andl $0x1, %edi callq 0xbc040 testb $0x1, %al jne 0xc49ee jmp 0xc49f3 jmp 0xc4ae8 leaq 0x582cc(%rip), %rdx # 0x11ccc6 leaq 0x68(%rsp), %rdi movq %rdi, 0x38(%rsp) movl $0x3, %esi movl $0x19b, %ecx # imm = 0x19B callq 0xc17d0 movq 0x38(%rsp), %rdi callq 0x20a90 movq %rax, 0x40(%rsp) jmp 0xc4a24 movq 0x40(%rsp), %rdi leaq 0x58342(%rip), %rsi # 0x11cd72 callq 0x166e0 movq %rax, 0x30(%rsp) jmp 0xc4a3c movq 0x30(%rsp), %rdi leaq 0x58350(%rip), %rsi # 0x11cd98 callq 0x166e0 movq %rax, 0x28(%rsp) jmp 0xc4a54 movq 0x28(%rsp), %rdi movl 0x7c(%rsp), %esi callq 0x169e0 movq %rax, 0x20(%rsp) jmp 0xc4a69 movq 0x20(%rsp), %rdi leaq 0x58342(%rip), %rsi # 0x11cdb7 callq 0x166e0 movq %rax, 0x18(%rsp) jmp 0xc4a81 movq 0x18(%rsp), %rdi leaq 0x5833c(%rip), %rsi # 0x11cdc9 callq 0x166e0 movq %rax, 0x10(%rsp) jmp 0xc4a99 movq 0x10(%rsp), %rdi movl $0x80000000, %esi # imm = 0x80000000 callq 0x169e0 movq %rax, 0x8(%rsp) jmp 0xc4aaf movq 0x8(%rsp), %rdi leaq 0x582b4(%rip), %rsi # 0x11cd6f callq 0x166e0 jmp 0xc4ac2 leaq 0x68(%rsp), %rdi callq 0xc1940 jmp 0xc4ae8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x68(%rsp), %rdi callq 0xc1940 jmp 0xc4aff movq 0x60(%rsp), %rax movl (%rax), %eax xorl %edx, %edx divl 0x7c(%rsp) movl %edx, %eax addq $0x88, %rsp retq movq 0x70(%rsp), %rdi callq 0x16cf0 nopl (%rax)
_ZN7testing8internal6Random8GenerateEj: sub rsp, 88h mov [rsp+88h+var_8], rdi mov [rsp+88h+var_C], esi mov rax, [rsp+88h+var_8] mov [rsp+88h+var_28], rax mov eax, [rax] imul rax, 41C64E6Dh add rax, 3039h mov ecx, 80000000h xor edx, edx div ecx mov rax, [rsp+88h+var_28] mov [rax], edx cmp [rsp+88h+var_C], 0 setnbe al movzx edi, al and edi, 1; this call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool) test al, 1 jnz short loc_C4948 jmp short loc_C494D loc_C4948: jmp loc_C49D2 loc_C494D: lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+88h+var_10]; int mov [rsp+88h+var_38], rdi mov esi, 3 mov ecx, 19Ah call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, [rsp+88h+var_38]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov [rsp+88h+var_30], rax jmp short $+2 loc_C497E: mov rdi, [rsp+88h+var_30] lea rsi, aConditionRange; "Condition range > 0 failed. " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+88h+var_40], rax jmp short $+2 loc_C4996: mov rdi, [rsp+88h+var_40] lea rsi, aCannotGenerate; "Cannot generate a number in the range ["... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_C49A9: lea rdi, [rsp+88h+var_10]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_C49D2 mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_70]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp loc_C4AFF loc_C49D2: cmp [rsp+88h+var_C], 80000000h setbe al movzx edi, al and edi, 1; this call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool) test al, 1 jnz short loc_C49EE jmp short loc_C49F3 loc_C49EE: jmp loc_C4AE8 loc_C49F3: lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+88h+var_20]; int mov [rsp+88h+var_50], rdi; int mov esi, 3 mov ecx, 19Bh call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, [rsp+88h+var_50]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov [rsp+88h+var_48], rax jmp short $+2 loc_C4A24: mov rdi, [rsp+88h+var_48] lea rsi, aConditionRange_0; "Condition range <= kMaxRange failed. " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+88h+var_58], rax jmp short $+2 loc_C4A3C: mov rdi, [rsp+88h+var_58] lea rsi, aGenerationOfAN; "Generation of a number in [0, " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+88h+var_60], rax jmp short $+2 loc_C4A54: mov rdi, [rsp+88h+var_60] mov esi, [rsp+88h+var_C] call __ZNSolsEj; std::ostream::operator<<(uint) mov [rsp+88h+var_68], rax jmp short $+2 loc_C4A69: mov rdi, [rsp+88h+var_68] lea rsi, aWasRequested; ") was requested, " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+88h+var_70], rax jmp short $+2 loc_C4A81: mov rdi, [rsp+88h+var_70] lea rsi, aButThisCanOnly; "but this can only generate numbers in ["... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+88h+var_78], rax jmp short $+2 loc_C4A99: mov rdi, [rsp+88h+var_78] mov esi, 80000000h call __ZNSolsEj; std::ostream::operator<<(uint) mov [rsp+88h+var_80], rax jmp short $+2 loc_C4AAF: mov rdi, [rsp+88h+var_80] lea rsi, aCannotGenerate+2Bh; ")." call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_C4AC2: lea rdi, [rsp+88h+var_20]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_C4AE8 mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_60]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_C4AFF loc_C4AE8: mov rax, [rsp+88h+var_28] mov eax, [rax] xor edx, edx div [rsp+88h+var_C] mov eax, edx add rsp, 88h retn loc_C4AFF: mov rdi, [rsp+arg_68] call __Unwind_Resume
long long testing::internal::Random::Generate(testing::internal::Random *this, unsigned int a2) { long long v3; // [rsp+8h] [rbp-80h] long long v4; // [rsp+10h] [rbp-78h] long long v5; // [rsp+18h] [rbp-70h] long long v6; // [rsp+20h] [rbp-68h] long long v7; // [rsp+28h] [rbp-60h] long long v8; // [rsp+30h] [rbp-58h] void *v9; // [rsp+40h] [rbp-48h] long long v10; // [rsp+48h] [rbp-40h] void *Stream; // [rsp+58h] [rbp-30h] int v12[4]; // [rsp+68h] [rbp-20h] BYREF int v13; // [rsp+78h] [rbp-10h] BYREF unsigned int v14; // [rsp+7Ch] [rbp-Ch] testing::internal::Random *v15; // [rsp+80h] [rbp-8h] v15 = this; v14 = a2; *(_DWORD *)this = (1103515245 * *(_DWORD *)this + 12345) % 0x80000000; if ( (testing::internal::IsTrue((testing::internal *)(v14 != 0)) & 1) == 0 ) { testing::internal::GTestLog::GTestLog( (testing::internal::GTestLog *)&v13, 3, (long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc", 410); Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v13); v10 = std::operator<<<std::char_traits<char>>(Stream, "Condition range > 0 failed. "); std::operator<<<std::char_traits<char>>(v10, "Cannot generate a number in the range [0, 0)."); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v13); } if ( (testing::internal::IsTrue((testing::internal *)(v14 <= 0x80000000)) & 1) == 0 ) { testing::internal::GTestLog::GTestLog( (testing::internal::GTestLog *)v12, 3, (long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc", 411); v9 = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v12); v8 = std::operator<<<std::char_traits<char>>(v9, "Condition range <= kMaxRange failed. "); v7 = std::operator<<<std::char_traits<char>>(v8, "Generation of a number in [0, "); v6 = std::ostream::operator<<(v7, v14); v5 = std::operator<<<std::char_traits<char>>(v6, ") was requested, "); v4 = std::operator<<<std::char_traits<char>>(v5, "but this can only generate numbers in [0, "); v3 = std::ostream::operator<<(v4, 0x80000000LL); std::operator<<<std::char_traits<char>>(v3, ")."); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v12); } return *(_DWORD *)this % v14; }
Generate: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV dword ptr [RSP + 0x7c],ESI MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x60],RAX MOV EAX,dword ptr [RAX] IMUL RAX,RAX,0x41c64e6d ADD RAX,0x3039 MOV ECX,0x80000000 XOR EDX,EDX DIV ECX MOV RAX,qword ptr [RSP + 0x60] MOV dword ptr [RAX],EDX CMP dword ptr [RSP + 0x7c],0x0 SETA AL MOVZX EDI,AL AND EDI,0x1 CALL 0x001bc040 TEST AL,0x1 JNZ 0x001c4948 JMP 0x001c494d LAB_001c4948: JMP 0x001c49d2 LAB_001c494d: LEA RDX,[0x21ccc6] LEA RDI,[RSP + 0x78] MOV qword ptr [RSP + 0x50],RDI MOV ESI,0x3 MOV ECX,0x19a CALL 0x001c17d0 MOV RDI,qword ptr [RSP + 0x50] LAB_001c4972: CALL 0x00120a90 MOV qword ptr [RSP + 0x58],RAX JMP 0x001c497e LAB_001c497e: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x21cd27] CALL 0x001166e0 MOV qword ptr [RSP + 0x48],RAX JMP 0x001c4996 LAB_001c4996: MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[0x21cd44] CALL 0x001166e0 LAB_001c49a7: JMP 0x001c49a9 LAB_001c49a9: LEA RDI,[RSP + 0x78] CALL 0x001c1940 JMP 0x001c49d2 LAB_001c49d2: CMP dword ptr [RSP + 0x7c],0x80000000 SETBE AL MOVZX EDI,AL AND EDI,0x1 CALL 0x001bc040 TEST AL,0x1 JNZ 0x001c49ee JMP 0x001c49f3 LAB_001c49ee: JMP 0x001c4ae8 LAB_001c49f3: LEA RDX,[0x21ccc6] LEA RDI,[RSP + 0x68] MOV qword ptr [RSP + 0x38],RDI MOV ESI,0x3 MOV ECX,0x19b CALL 0x001c17d0 MOV RDI,qword ptr [RSP + 0x38] LAB_001c4a18: CALL 0x00120a90 MOV qword ptr [RSP + 0x40],RAX JMP 0x001c4a24 LAB_001c4a24: MOV RDI,qword ptr [RSP + 0x40] LEA RSI,[0x21cd72] CALL 0x001166e0 MOV qword ptr [RSP + 0x30],RAX JMP 0x001c4a3c LAB_001c4a3c: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[0x21cd98] CALL 0x001166e0 MOV qword ptr [RSP + 0x28],RAX JMP 0x001c4a54 LAB_001c4a54: MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x7c] CALL 0x001169e0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001c4a69 LAB_001c4a69: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x21cdb7] CALL 0x001166e0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001c4a81 LAB_001c4a81: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x21cdc9] CALL 0x001166e0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001c4a99 LAB_001c4a99: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x80000000 CALL 0x001169e0 MOV qword ptr [RSP + 0x8],RAX JMP 0x001c4aaf LAB_001c4aaf: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x21cd6f] CALL 0x001166e0 LAB_001c4ac0: JMP 0x001c4ac2 LAB_001c4ac2: LEA RDI,[RSP + 0x68] CALL 0x001c1940 JMP 0x001c4ae8 LAB_001c4ae8: MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] XOR EDX,EDX DIV dword ptr [RSP + 0x7c] MOV EAX,EDX ADD RSP,0x88 RET
/* testing::internal::Random::Generate(unsigned int) */ ulong __thiscall testing::internal::Random::Generate(Random *this,uint param_1) { ulong uVar1; ostream *poVar2; GTestLog local_20 [16]; GTestLog local_10 [4]; uint local_c; Random *local_8; *(uint *)this = (*(int *)this * 0x41c64e6d + 0x3039U) % 0x80000000; local_c = param_1; local_8 = this; uVar1 = IsTrue(param_1 != 0); if ((uVar1 & 1) == 0) { GTestLog::GTestLog(local_10,3, "/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc" ,0x19a); /* try { // try from 001c4972 to 001c49a6 has its CatchHandler @ 001c49b5 */ poVar2 = (ostream *)GTestLog::GetStream(); poVar2 = std::operator<<(poVar2,"Condition range > 0 failed. "); std::operator<<(poVar2,"Cannot generate a number in the range [0, 0)."); GTestLog::~GTestLog(local_10); } uVar1 = IsTrue(local_c < 0x80000001); if ((uVar1 & 1) == 0) { GTestLog::GTestLog(local_20,3, "/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc" ,0x19b); /* try { // try from 001c4a18 to 001c4abf has its CatchHandler @ 001c4ace */ poVar2 = (ostream *)GTestLog::GetStream(); poVar2 = std::operator<<(poVar2,"Condition range <= kMaxRange failed. "); poVar2 = std::operator<<(poVar2,"Generation of a number in [0, "); poVar2 = (ostream *)std::ostream::operator<<(poVar2,local_c); poVar2 = std::operator<<(poVar2,") was requested, "); poVar2 = std::operator<<(poVar2,"but this can only generate numbers in [0, "); poVar2 = (ostream *)std::ostream::operator<<(poVar2,0x80000000); std::operator<<(poVar2,")."); GTestLog::~GTestLog(local_20); } return (ulong)*(uint *)this % (ulong)local_c; }
45,423
mju_rotVecMatT
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_blas.c
void mju_rotVecMatT(mjtNum res[3], const mjtNum vec[3], const mjtNum mat[9]) { mjtNum tmp[3] = { mat[0]*vec[0] + mat[3]*vec[1] + mat[6]*vec[2], mat[1]*vec[0] + mat[4]*vec[1] + mat[7]*vec[2], mat[2]*vec[0] + mat[5]*vec[1] + mat[8]*vec[2] }; res[0] = tmp[0]; res[1] = tmp[1]; res[2] = tmp[2]; }
O0
c
mju_rotVecMatT: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq %rdx, -0x18(%rsp) movq -0x18(%rsp), %rax vmovsd (%rax), %xmm0 movq -0x10(%rsp), %rax vmovsd (%rax), %xmm2 movq -0x18(%rsp), %rax vmovsd 0x18(%rax), %xmm1 movq -0x10(%rsp), %rax vmulsd 0x8(%rax), %xmm1, %xmm1 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm1 movq -0x18(%rsp), %rax vmovsd 0x30(%rax), %xmm0 movq -0x10(%rsp), %rax vmovsd 0x10(%rax), %xmm2 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm0 vmovsd %xmm0, -0x38(%rsp) movq -0x18(%rsp), %rax vmovsd 0x8(%rax), %xmm0 movq -0x10(%rsp), %rax vmovsd (%rax), %xmm2 movq -0x18(%rsp), %rax vmovsd 0x20(%rax), %xmm1 movq -0x10(%rsp), %rax vmulsd 0x8(%rax), %xmm1, %xmm1 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm1 movq -0x18(%rsp), %rax vmovsd 0x38(%rax), %xmm0 movq -0x10(%rsp), %rax vmovsd 0x10(%rax), %xmm2 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm0 vmovsd %xmm0, -0x30(%rsp) movq -0x18(%rsp), %rax vmovsd 0x10(%rax), %xmm0 movq -0x10(%rsp), %rax vmovsd (%rax), %xmm2 movq -0x18(%rsp), %rax vmovsd 0x28(%rax), %xmm1 movq -0x10(%rsp), %rax vmulsd 0x8(%rax), %xmm1, %xmm1 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm1 movq -0x18(%rsp), %rax vmovsd 0x40(%rax), %xmm0 movq -0x10(%rsp), %rax vmovsd 0x10(%rax), %xmm2 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm0 vmovsd %xmm0, -0x28(%rsp) vmovsd -0x38(%rsp), %xmm0 movq -0x8(%rsp), %rax vmovsd %xmm0, (%rax) vmovsd -0x30(%rsp), %xmm0 movq -0x8(%rsp), %rax vmovsd %xmm0, 0x8(%rax) vmovsd -0x28(%rsp), %xmm0 movq -0x8(%rsp), %rax vmovsd %xmm0, 0x10(%rax) retq nopw %cs:(%rax,%rax)
mju_rotVecMatT: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov [rsp+var_18], rdx mov rax, [rsp+var_18] vmovsd xmm0, qword ptr [rax] mov rax, [rsp+var_10] vmovsd xmm2, qword ptr [rax] mov rax, [rsp+var_18] vmovsd xmm1, qword ptr [rax+18h] mov rax, [rsp+var_10] vmulsd xmm1, xmm1, qword ptr [rax+8] vmulsd xmm0, xmm0, xmm2 vaddsd xmm1, xmm0, xmm1 mov rax, [rsp+var_18] vmovsd xmm0, qword ptr [rax+30h] mov rax, [rsp+var_10] vmovsd xmm2, qword ptr [rax+10h] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+var_38], xmm0 mov rax, [rsp+var_18] vmovsd xmm0, qword ptr [rax+8] mov rax, [rsp+var_10] vmovsd xmm2, qword ptr [rax] mov rax, [rsp+var_18] vmovsd xmm1, qword ptr [rax+20h] mov rax, [rsp+var_10] vmulsd xmm1, xmm1, qword ptr [rax+8] vmulsd xmm0, xmm0, xmm2 vaddsd xmm1, xmm0, xmm1 mov rax, [rsp+var_18] vmovsd xmm0, qword ptr [rax+38h] mov rax, [rsp+var_10] vmovsd xmm2, qword ptr [rax+10h] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+var_30], xmm0 mov rax, [rsp+var_18] vmovsd xmm0, qword ptr [rax+10h] mov rax, [rsp+var_10] vmovsd xmm2, qword ptr [rax] mov rax, [rsp+var_18] vmovsd xmm1, qword ptr [rax+28h] mov rax, [rsp+var_10] vmulsd xmm1, xmm1, qword ptr [rax+8] vmulsd xmm0, xmm0, xmm2 vaddsd xmm1, xmm0, xmm1 mov rax, [rsp+var_18] vmovsd xmm0, qword ptr [rax+40h] mov rax, [rsp+var_10] vmovsd xmm2, qword ptr [rax+10h] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+var_28], xmm0 vmovsd xmm0, [rsp+var_38] mov rax, [rsp+var_8] vmovsd qword ptr [rax], xmm0 vmovsd xmm0, [rsp+var_30] mov rax, [rsp+var_8] vmovsd qword ptr [rax+8], xmm0 vmovsd xmm0, [rsp+var_28] mov rax, [rsp+var_8] vmovsd qword ptr [rax+10h], xmm0 retn
long long mju_rotVecMatT(long long a1, long long a2, long long a3) { long long result; // rax long long v57; // [rsp+20h] [rbp-18h] long long v58; // [rsp+28h] [rbp-10h] long long v59; // [rsp+30h] [rbp-8h] v59 = a1; v58 = a2; v57 = a3; _RAX = a3; __asm { vmovsd xmm0, qword ptr [rax] } _RAX = a2; __asm { vmovsd xmm2, qword ptr [rax] } _RAX = a3; __asm { vmovsd xmm1, qword ptr [rax+18h] vmulsd xmm1, xmm1, qword ptr [rax+8] vmulsd xmm0, xmm0, xmm2 vaddsd xmm1, xmm0, xmm1 } _RAX = a3; __asm { vmovsd xmm0, qword ptr [rax+30h] } _RAX = a2; __asm { vmovsd xmm2, qword ptr [rax+10h] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+var_38], xmm0 } _RAX = v57; __asm { vmovsd xmm0, qword ptr [rax+8] } _RAX = v58; __asm { vmovsd xmm2, qword ptr [rax] } _RAX = v57; __asm { vmovsd xmm1, qword ptr [rax+20h] vmulsd xmm1, xmm1, qword ptr [rax+8] vmulsd xmm0, xmm0, xmm2 vaddsd xmm1, xmm0, xmm1 } _RAX = v57; __asm { vmovsd xmm0, qword ptr [rax+38h] } _RAX = v58; __asm { vmovsd xmm2, qword ptr [rax+10h] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+var_30], xmm0 } _RAX = v57; __asm { vmovsd xmm0, qword ptr [rax+10h] } _RAX = v58; __asm { vmovsd xmm2, qword ptr [rax] } _RAX = v57; __asm { vmovsd xmm1, qword ptr [rax+28h] vmulsd xmm1, xmm1, qword ptr [rax+8] vmulsd xmm0, xmm0, xmm2 vaddsd xmm1, xmm0, xmm1 } _RAX = v57; __asm { vmovsd xmm0, qword ptr [rax+40h] } _RAX = v58; __asm { vmovsd xmm2, qword ptr [rax+10h] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+var_28], xmm0 vmovsd xmm0, [rsp+var_38] } _RAX = v59; __asm { vmovsd qword ptr [rax], xmm0 vmovsd xmm0, [rsp+var_30] } _RAX = v59; __asm { vmovsd qword ptr [rax+8], xmm0 vmovsd xmm0, [rsp+var_28] } result = v59; __asm { vmovsd qword ptr [rax+10h], xmm0 } return result; }
45,424
mju_rotVecMatT
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_blas.c
void mju_rotVecMatT(mjtNum res[3], const mjtNum vec[3], const mjtNum mat[9]) { mjtNum tmp[3] = { mat[0]*vec[0] + mat[3]*vec[1] + mat[6]*vec[2], mat[1]*vec[0] + mat[4]*vec[1] + mat[7]*vec[2], mat[2]*vec[0] + mat[5]*vec[1] + mat[8]*vec[2] }; res[0] = tmp[0]; res[1] = tmp[1]; res[2] = tmp[2]; }
O3
c
mju_rotVecMatT: vmovddup 0x8(%rsi), %xmm0 # xmm0 = mem[0,0] vmulsd 0x28(%rdx), %xmm0, %xmm1 vmovddup (%rsi), %xmm2 # xmm2 = mem[0,0] vmulsd 0x10(%rdx), %xmm2, %xmm3 vmovddup 0x10(%rsi), %xmm4 # xmm4 = mem[0,0] vmulsd 0x40(%rdx), %xmm4, %xmm5 vaddsd %xmm1, %xmm3, %xmm1 vaddsd %xmm1, %xmm5, %xmm1 vmulpd 0x18(%rdx), %xmm0, %xmm0 vmulpd (%rdx), %xmm2, %xmm2 vmulpd 0x30(%rdx), %xmm4, %xmm3 vaddpd %xmm0, %xmm2, %xmm0 vaddpd %xmm0, %xmm3, %xmm0 vmovupd %xmm0, (%rdi) vmovsd %xmm1, 0x10(%rdi) retq
mju_rotVecMatT: vmovddup xmm0, qword ptr [rsi+8] vmulsd xmm1, xmm0, qword ptr [rdx+28h] vmovddup xmm2, qword ptr [rsi] vmulsd xmm3, xmm2, qword ptr [rdx+10h] vmovddup xmm4, qword ptr [rsi+10h] vmulsd xmm5, xmm4, qword ptr [rdx+40h] vaddsd xmm1, xmm3, xmm1 vaddsd xmm1, xmm5, xmm1 vmulpd xmm0, xmm0, xmmword ptr [rdx+18h] vmulpd xmm2, xmm2, xmmword ptr [rdx] vmulpd xmm3, xmm4, xmmword ptr [rdx+30h] vaddpd xmm0, xmm2, xmm0 vaddpd xmm0, xmm3, xmm0 vmovupd xmmword ptr [rdi], xmm0 vmovsd qword ptr [rdi+10h], xmm1 retn
void mju_rotVecMatT(long long _RDI, long long _RSI) { __asm { vmovddup xmm0, qword ptr [rsi+8] vmulsd xmm1, xmm0, qword ptr [rdx+28h] vmovddup xmm2, qword ptr [rsi] vmulsd xmm3, xmm2, qword ptr [rdx+10h] vmovddup xmm4, qword ptr [rsi+10h] vmulsd xmm5, xmm4, qword ptr [rdx+40h] vaddsd xmm1, xmm3, xmm1 vaddsd xmm1, xmm5, xmm1 vmulpd xmm0, xmm0, xmmword ptr [rdx+18h] vmulpd xmm2, xmm2, xmmword ptr [rdx] vmulpd xmm3, xmm4, xmmword ptr [rdx+30h] vaddpd xmm0, xmm2, xmm0 vaddpd xmm0, xmm3, xmm0 vmovupd xmmword ptr [rdi], xmm0 vmovsd qword ptr [rdi+10h], xmm1 } }
mju_rotVecMatT: VMOVDDUP XMM0,qword ptr [RSI + 0x8] VMULSD XMM1,XMM0,qword ptr [RDX + 0x28] VMOVDDUP XMM2,qword ptr [RSI] VMULSD XMM3,XMM2,qword ptr [RDX + 0x10] VMOVDDUP XMM4,qword ptr [RSI + 0x10] VMULSD XMM5,XMM4,qword ptr [RDX + 0x40] VADDSD XMM1,XMM3,XMM1 VADDSD XMM1,XMM5,XMM1 VMULPD XMM0,XMM0,xmmword ptr [RDX + 0x18] VMULPD XMM2,XMM2,xmmword ptr [RDX] VMULPD XMM3,XMM4,xmmword ptr [RDX + 0x30] VADDPD XMM0,XMM2,XMM0 VADDPD XMM0,XMM3,XMM0 VMOVUPD xmmword ptr [RDI],XMM0 VMOVSD qword ptr [RDI + 0x10],XMM1 RET
void mju_rotVecMatT(double *param_1,double *param_2,double *param_3) { double dVar1; double dVar2; double dVar3; double dVar4; double dVar5; double dVar6; double dVar7; double dVar8; double dVar9; dVar1 = param_2[1]; dVar2 = param_3[5]; dVar3 = *param_2; dVar4 = param_3[2]; dVar5 = param_2[2]; dVar6 = param_3[8]; dVar7 = param_3[4]; dVar9 = dVar3 * *param_3; dVar8 = param_3[7]; *param_1 = dVar5 * param_3[6] + dVar9 + dVar1 * param_3[3]; param_1[1] = dVar5 * dVar8 + dVar9 + dVar1 * dVar7; param_1[2] = dVar5 * dVar6 + dVar3 * dVar4 + dVar1 * dVar2; return; }
45,425
fill_uint16
eloqsql/strings/ctype.c
static int fill_uint16(uint16 *a,uint size,const char *str, size_t len) { uint i= 0; const char *s, *b, *e=str+len; for (s=str ; s < e ; i++) { for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; b=s; for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; if (s == b || i > size) break; a[i]= (uint16) strtol(b,NULL,16); } return 0; }
O0
c
fill_uint16: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x6ca68 jmp 0x6c992 movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x41(%rbp) jae 0x6c9be movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0xf0c4(%rip), %rdi # 0x7ba73 callq 0x240f0 cmpq $0x0, %rax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x6c9c7 jmp 0x6c9d7 jmp 0x6c9c9 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x6c992 movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x6ca0d movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0xf077(%rip), %rdi # 0x7ba73 callq 0x240f0 cmpq $0x0, %rax setne %al xorb $-0x1, %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x6ca16 jmp 0x6ca26 jmp 0x6ca18 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x6c9df movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x6ca38 movl -0x24(%rbp), %eax cmpl -0xc(%rbp), %eax jbe 0x6ca3a jmp 0x6ca68 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0x10, %edx callq 0x24510 movw %ax, %dx movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx movw %dx, (%rax,%rcx,2) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x6c982 xorl %eax, %eax addq $0x50, %rsp popq %rbp retq
fill_uint16: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], 0 mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_6C982: mov rax, [rbp+var_30] cmp rax, [rbp+var_40] jnb loc_6CA68 jmp short $+2 loc_6C992: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_41], al jnb short loc_6C9BE mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_7BA73; " \t\r\n" call _strchr cmp rax, 0 setnz al mov [rbp+var_41], al loc_6C9BE: mov al, [rbp+var_41] test al, 1 jnz short loc_6C9C7 jmp short loc_6C9D7 loc_6C9C7: jmp short $+2 loc_6C9C9: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_6C992 loc_6C9D7: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_6C9DF: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_42], al jnb short loc_6CA0D mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_7BA73; " \t\r\n" call _strchr cmp rax, 0 setnz al xor al, 0FFh mov [rbp+var_42], al loc_6CA0D: mov al, [rbp+var_42] test al, 1 jnz short loc_6CA16 jmp short loc_6CA26 loc_6CA16: jmp short $+2 loc_6CA18: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_6C9DF loc_6CA26: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_6CA38 mov eax, [rbp+var_24] cmp eax, [rbp+var_C] jbe short loc_6CA3A loc_6CA38: jmp short loc_6CA68 loc_6CA3A: mov rdi, [rbp+var_38] xor eax, eax mov esi, eax mov edx, 10h call ___isoc23_strtol mov dx, ax mov rax, [rbp+var_8] mov ecx, [rbp+var_24] mov [rax+rcx*2], dx mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_6C982 loc_6CA68: xor eax, eax add rsp, 50h pop rbp retn
long long fill_uint16(long long a1, unsigned int a2, char *a3, long long a4) { char v5; // [rsp+Eh] [rbp-42h] bool v6; // [rsp+Fh] [rbp-41h] unsigned long long v7; // [rsp+10h] [rbp-40h] char *v8; // [rsp+18h] [rbp-38h] char *v9; // [rsp+20h] [rbp-30h] unsigned int v10; // [rsp+2Ch] [rbp-24h] v10 = 0; v7 = (unsigned long long)&a3[a4]; v9 = a3; while ( (unsigned long long)v9 < v7 ) { while ( 1 ) { v6 = 0; if ( (unsigned long long)v9 < v7 ) v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0; if ( !v6 ) break; ++v9; } v8 = v9; while ( 1 ) { v5 = 0; if ( (unsigned long long)v9 < v7 ) v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0); if ( (v5 & 1) == 0 ) break; ++v9; } if ( v9 == v8 || v10 > a2 ) break; *(_WORD *)(a1 + 2LL * v10++) = __isoc23_strtol(v8, 0LL, 16LL); } return 0LL; }
fill_uint16: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_0016c982: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0016ca68 JMP 0x0016c992 LAB_0016c992: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x41],AL JNC 0x0016c9be MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x17ba73] CALL 0x001240f0 CMP RAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_0016c9be: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0016c9c7 JMP 0x0016c9d7 LAB_0016c9c7: JMP 0x0016c9c9 LAB_0016c9c9: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0016c992 LAB_0016c9d7: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0016c9df: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x42],AL JNC 0x0016ca0d MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x17ba73] CALL 0x001240f0 CMP RAX,0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x42],AL LAB_0016ca0d: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x0016ca16 JMP 0x0016ca26 LAB_0016ca16: JMP 0x0016ca18 LAB_0016ca18: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0016c9df LAB_0016ca26: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0016ca38 MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0xc] JBE 0x0016ca3a LAB_0016ca38: JMP 0x0016ca68 LAB_0016ca3a: MOV RDI,qword ptr [RBP + -0x38] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x10 CALL 0x00124510 MOV DX,AX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] MOV word ptr [RAX + RCX*0x2],DX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0016c982 LAB_0016ca68: XOR EAX,EAX ADD RSP,0x50 POP RBP RET
int8 fill_uint16(long param_1,uint param_2,char *param_3,long param_4) { char *pcVar1; int2 uVar2; char *pcVar3; char *pcVar4; bool bVar5; char *local_38; uint local_2c; local_2c = 0; pcVar3 = param_3 + param_4; local_38 = param_3; while( true ) { if (pcVar3 <= local_38) { return 0; } while( true ) { pcVar1 = local_38; bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 != (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } while( true ) { bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 == (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } if (local_38 == pcVar1) break; if (param_2 < local_2c) { return 0; } uVar2 = __isoc23_strtol(pcVar1,0,0x10); *(int2 *)(param_1 + (ulong)local_2c * 2) = uVar2; local_2c = local_2c + 1; } return 0; }
45,426
intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long)
corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp
inline uint64_t submul( uint64_t r[], const uint64_t x[], const uint64_t y[], int len, uint64_t multiplier) noexcept { // OPT: Add MinLen template parameter and unroll first loop iterations. INTX_REQUIRE(len >= 1); uint64_t borrow = 0; for (int i = 0; i < len; ++i) { const auto s = x[i] - borrow; const auto p = umul(y[i], multiplier); borrow = p[1] + (x[i] < s); r[i] = s - p[0]; borrow += (s < r[i]); } return borrow; }
O3
cpp
intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long): pushq %rbx testl %ecx, %ecx jle 0x406af movq %rdx, %r9 movl %ecx, %ecx xorl %r10d, %r10d xorl %eax, %eax movq (%rsi,%r10,8), %r11 xorl %ebx, %ebx subq %rax, %r11 setb %bl movq %r8, %rax mulq (%r9,%r10,8) subq %rax, %r11 movq %r11, (%rdi,%r10,8) movq %rbx, %rax adcq %rdx, %rax incq %r10 cmpq %r10, %rcx jne 0x40685 popq %rbx retq leaq 0x43a86(%rip), %rdi # 0x8413c leaq 0x438a1(%rip), %rsi # 0x83f5e leaq 0x43a81(%rip), %rcx # 0x84145 movl $0x67d, %edx # imm = 0x67D callq 0x22110
_ZN4intx8internal6submulEPmPKmS3_im: push rbx test ecx, ecx jle short loc_406AF mov r9, rdx mov ecx, ecx xor r10d, r10d xor eax, eax loc_40685: mov r11, [rsi+r10*8] xor ebx, ebx sub r11, rax setb bl mov rax, r8 mul qword ptr [r9+r10*8] sub r11, rax mov [rdi+r10*8], r11 mov rax, rbx adc rax, rdx inc r10 cmp rcx, r10 jnz short loc_40685 pop rbx retn loc_406AF: lea rdi, aLen1; "len >= 1" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rcx, aUint64TIntxInt_0; "uint64_t intx::internal::submul(uint64_"... mov edx, 67Dh call ___assert_fail
unsigned long long intx::internal::submul( intx::internal *this, unsigned long long *a2, const unsigned long long *a3, const unsigned long long *a4, unsigned long long a5) { long long v6; // r10 unsigned long long result; // rax unsigned long long v8; // r11 bool v9; // cf unsigned long long v10; // r11 unsigned __int128 v11; // rax if ( (int)a4 <= 0 ) __assert_fail( "len >= 1", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp", 1661LL, "uint64_t intx::internal::submul(uint64_t *, const uint64_t *, const uint64_t *, int, uint64_t)"); v6 = 0LL; result = 0LL; do { v8 = a2[v6]; v9 = v8 < result; v10 = v8 - result; v11 = a3[v6] * (unsigned __int128)a5; *((_QWORD *)this + v6) = v10 - v11; result = *((_QWORD *)&v11 + 1) + (v10 < (unsigned long long)v11) + (unsigned long long)v9; ++v6; } while ( (unsigned int)a4 != v6 ); return result; }
submul: PUSH RBX TEST ECX,ECX JLE 0x001406af MOV R9,RDX MOV ECX,ECX XOR R10D,R10D XOR EAX,EAX LAB_00140685: MOV R11,qword ptr [RSI + R10*0x8] XOR EBX,EBX SUB R11,RAX SETC BL MOV RAX,R8 MUL qword ptr [R9 + R10*0x8] SUB R11,RAX MOV qword ptr [RDI + R10*0x8],R11 MOV RAX,RBX ADC RAX,RDX INC R10 CMP RCX,R10 JNZ 0x00140685 POP RBX RET LAB_001406af: LEA RDI,[0x18413c] LEA RSI,[0x183f5e] LEA RCX,[0x184145] MOV EDX,0x67d CALL 0x00122110
/* intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long) */ void intx::internal::submul(ulong *param_1,ulong *param_2,ulong *param_3,int param_4,ulong param_5) { ulong uVar1; int1 auVar2 [16]; int1 auVar3 [16]; ulong uVar4; ulong uVar5; ulong uVar6; ulong uVar7; if (0 < param_4) { uVar6 = 0; uVar5 = 0; do { uVar1 = param_2[uVar6]; uVar7 = uVar1 - uVar5; auVar2._8_8_ = 0; auVar2._0_8_ = param_5; auVar3._8_8_ = 0; auVar3._0_8_ = param_3[uVar6]; uVar4 = SUB168(auVar2 * auVar3,0); param_1[uVar6] = uVar7 - uVar4; uVar5 = (ulong)(uVar1 < uVar5) + SUB168(auVar2 * auVar3,8) + (ulong)(uVar7 < uVar4); uVar6 = uVar6 + 1; } while ((uint)param_4 != uVar6); return; } /* WARNING: Subroutine does not return */ __assert_fail("len >= 1", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp" ,0x67d, "uint64_t intx::internal::submul(uint64_t *, const uint64_t *, const uint64_t *, int, uint64_t)" ); }
45,427
unlink_deleted_block
eloqsql/storage/maria/ma_dynrec.c
static my_bool unlink_deleted_block(MARIA_HA *info, MARIA_BLOCK_INFO *block_info) { DBUG_ENTER("unlink_deleted_block"); if (block_info->filepos == info->s->state.dellink) { /* First deleted block; We can just use this ! */ info->s->state.dellink=block_info->next_filepos; } else { MARIA_BLOCK_INFO tmp; tmp.second_read=0; /* Unlink block from the previous block */ if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->prev_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+4,block_info->next_filepos); if (info->s->file_write(info, tmp.header+4,8, block_info->prev_filepos+4, MYF(MY_NABP))) DBUG_RETURN(1); /* Unlink block from next block */ if (block_info->next_filepos != HA_OFFSET_ERROR) { if (!(_ma_get_block_info(info, &tmp, info->dfile.file, block_info->next_filepos) & BLOCK_DELETED)) DBUG_RETURN(1); /* Something is wrong */ mi_sizestore(tmp.header+12,block_info->prev_filepos); if (info->s->file_write(info, tmp.header+12,8, block_info->next_filepos+12, MYF(MY_NABP))) DBUG_RETURN(1); } } /* We now have one less deleted block */ info->state->del--; info->state->empty-= block_info->block_len; info->s->state.split--; /* If this was a block that we where accessing through table scan (maria_rrnd() or maria_scan(), then ensure that we skip over this block when doing next maria_rrnd() or maria_scan(). */ if (info->cur_row.nextpos == block_info->filepos) info->cur_row.nextpos+= block_info->block_len; DBUG_RETURN(0); }
O3
c
unlink_deleted_block: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq 0x38(%rsi), %rcx movq (%rdi), %rax cmpq 0xc8(%rax), %rcx jne 0x4b77a movq 0x40(%r14), %rcx movq %rcx, 0xc8(%rax) movq 0x20(%rbx), %rax decq 0x8(%rax) movq 0x28(%r14), %rax movq 0x20(%rbx), %rcx subq %rax, 0x10(%rcx) movq (%rbx), %rax decq 0xc0(%rax) movq 0xa0(%rbx), %rax cmpq 0x38(%r14), %rax jne 0x4b776 addq 0x28(%r14), %rax movq %rax, 0xa0(%rbx) xorl %eax, %eax jmp 0x4b7cf leaq -0x70(%rbp), %rsi movl $0x0, 0x50(%rsi) movl 0x480(%rbx), %edx movq 0x48(%r14), %rcx movq %rbx, %rdi callq 0x4b2f8 testb $0x4, %al je 0x4b7cd movq 0x40(%r14), %rax leaq -0x6c(%rbp), %rsi bswapq %rax movq %rax, (%rsi) movq (%rbx), %rax movq 0x48(%r14), %rcx addq $0x4, %rcx movl $0x8, %edx movl $0x4, %r8d movq %rbx, %rdi callq *0x6e8(%rax) testq %rax, %rax je 0x4b7e7 movb $0x1, %al movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x4b842 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x40(%r14), %rcx cmpq $-0x1, %rcx je 0x4b740 movl 0x480(%rbx), %edx leaq -0x70(%rbp), %rsi movq %rbx, %rdi callq 0x4b2f8 testb $0x4, %al je 0x4b7cd movq 0x48(%r14), %rax leaq -0x64(%rbp), %rsi bswapq %rax movq %rax, (%rsi) movq (%rbx), %rax movq 0x40(%r14), %rcx addq $0xc, %rcx movl $0x8, %edx movl $0x4, %r8d movq %rbx, %rdi callq *0x6e8(%rax) testq %rax, %rax jne 0x4b7cd jmp 0x4b740 callq 0x2a270
unlink_deleted_block: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax mov rcx, [rsi+38h] mov rax, [rdi] cmp rcx, [rax+0C8h] jnz short loc_4B77A mov rcx, [r14+40h] mov [rax+0C8h], rcx loc_4B740: mov rax, [rbx+20h] dec qword ptr [rax+8] mov rax, [r14+28h] mov rcx, [rbx+20h] sub [rcx+10h], rax mov rax, [rbx] dec qword ptr [rax+0C0h] mov rax, [rbx+0A0h] cmp rax, [r14+38h] jnz short loc_4B776 add rax, [r14+28h] mov [rbx+0A0h], rax loc_4B776: xor eax, eax jmp short loc_4B7CF loc_4B77A: lea rsi, [rbp+var_70] mov dword ptr [rsi+50h], 0 mov edx, [rbx+480h] mov rcx, [r14+48h] mov rdi, rbx call _ma_get_block_info test al, 4 jz short loc_4B7CD mov rax, [r14+40h] lea rsi, [rbp+var_6C] bswap rax mov [rsi], rax mov rax, [rbx] mov rcx, [r14+48h] add rcx, 4 mov edx, 8 mov r8d, 4 mov rdi, rbx call qword ptr [rax+6E8h] test rax, rax jz short loc_4B7E7 loc_4B7CD: mov al, 1 loc_4B7CF: mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_4B842 add rsp, 60h pop rbx pop r14 pop rbp retn loc_4B7E7: mov rcx, [r14+40h] cmp rcx, 0FFFFFFFFFFFFFFFFh jz loc_4B740 mov edx, [rbx+480h] lea rsi, [rbp+var_70] mov rdi, rbx call _ma_get_block_info test al, 4 jz short loc_4B7CD mov rax, [r14+48h] lea rsi, [rbp+var_64] bswap rax mov [rsi], rax mov rax, [rbx] mov rcx, [r14+40h] add rcx, 0Ch mov edx, 8 mov r8d, 4 mov rdi, rbx call qword ptr [rax+6E8h] test rax, rax jnz short loc_4B7CD jmp loc_4B740 loc_4B842: call ___stack_chk_fail
char unlink_deleted_block(_QWORD *a1, _QWORD *a2, long long a3, long long a4, long long a5, int a6) { long long v6; // rax long long v8; // r8 int v9; // r9d long long v10; // rcx unsigned __int8 v11[4]; // [rsp+0h] [rbp-70h] BYREF unsigned long long v12; // [rsp+4h] [rbp-6Ch] BYREF unsigned long long v13[8]; // [rsp+Ch] [rbp-64h] BYREF int v14; // [rsp+50h] [rbp-20h] unsigned long long v15; // [rsp+58h] [rbp-18h] v15 = __readfsqword(0x28u); if ( a2[7] == *(_QWORD *)(*a1 + 200LL) ) { *(_QWORD *)(*a1 + 200LL) = a2[8]; } else { v14 = 0; if ( (ma_get_block_info((long long)a1, v11, *((unsigned int *)a1 + 288), a2[9], a5, a6) & 4) == 0 ) return 1; v12 = _byteswap_uint64(a2[8]); if ( (*(long long ( **)(_QWORD *, unsigned long long *, long long, long long, long long))(*a1 + 1768LL))( a1, &v12, 8LL, a2[9] + 4LL, 4LL) ) { return 1; } v10 = a2[8]; if ( v10 != -1 ) { if ( (ma_get_block_info((long long)a1, v11, *((unsigned int *)a1 + 288), v10, v8, v9) & 4) == 0 ) return 1; v13[0] = _byteswap_uint64(a2[9]); if ( (*(long long ( **)(_QWORD *, unsigned long long *, long long, long long, long long))(*a1 + 1768LL))( a1, v13, 8LL, a2[8] + 12LL, 4LL) ) { return 1; } } } --*(_QWORD *)(a1[4] + 8LL); *(_QWORD *)(a1[4] + 16LL) -= a2[5]; --*(_QWORD *)(*a1 + 192LL); v6 = a1[20]; if ( v6 == a2[7] ) a1[20] = a2[5] + v6; return 0; }
unlink_deleted_block: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RSI + 0x38] MOV RAX,qword ptr [RDI] CMP RCX,qword ptr [RAX + 0xc8] JNZ 0x0014b77a MOV RCX,qword ptr [R14 + 0x40] MOV qword ptr [RAX + 0xc8],RCX LAB_0014b740: MOV RAX,qword ptr [RBX + 0x20] DEC qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x28] MOV RCX,qword ptr [RBX + 0x20] SUB qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBX] DEC qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RBX + 0xa0] CMP RAX,qword ptr [R14 + 0x38] JNZ 0x0014b776 ADD RAX,qword ptr [R14 + 0x28] MOV qword ptr [RBX + 0xa0],RAX LAB_0014b776: XOR EAX,EAX JMP 0x0014b7cf LAB_0014b77a: LEA RSI,[RBP + -0x70] MOV dword ptr [RSI + 0x50],0x0 MOV EDX,dword ptr [RBX + 0x480] MOV RCX,qword ptr [R14 + 0x48] MOV RDI,RBX CALL 0x0014b2f8 TEST AL,0x4 JZ 0x0014b7cd MOV RAX,qword ptr [R14 + 0x40] LEA RSI,[RBP + -0x6c] BSWAP RAX MOV qword ptr [RSI],RAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [R14 + 0x48] ADD RCX,0x4 MOV EDX,0x8 MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x6e8] TEST RAX,RAX JZ 0x0014b7e7 LAB_0014b7cd: MOV AL,0x1 LAB_0014b7cf: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0014b842 ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_0014b7e7: MOV RCX,qword ptr [R14 + 0x40] CMP RCX,-0x1 JZ 0x0014b740 MOV EDX,dword ptr [RBX + 0x480] LEA RSI,[RBP + -0x70] MOV RDI,RBX CALL 0x0014b2f8 TEST AL,0x4 JZ 0x0014b7cd MOV RAX,qword ptr [R14 + 0x48] LEA RSI,[RBP + -0x64] BSWAP RAX MOV qword ptr [RSI],RAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [R14 + 0x40] ADD RCX,0xc MOV EDX,0x8 MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x6e8] TEST RAX,RAX JNZ 0x0014b7cd JMP 0x0014b740 LAB_0014b842: CALL 0x0012a270
int8 unlink_deleted_block(long *param_1,long param_2) { ulong uVar1; long lVar2; int8 uVar3; long in_FS_OFFSET; int1 local_78 [4]; ulong local_74; ulong local_6c [8]; int4 local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_2 + 0x38) == *(long *)(*param_1 + 200)) { *(int8 *)(*param_1 + 200) = *(int8 *)(param_2 + 0x40); goto LAB_0014b740; } local_28 = 0; uVar1 = _ma_get_block_info(param_1,local_78,(int)param_1[0x90],*(int8 *)(param_2 + 0x48)); if ((uVar1 & 4) != 0) { uVar1 = *(ulong *)(param_2 + 0x40); local_74 = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38; lVar2 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_74,8,*(long *)(param_2 + 0x48) + 4,4); if (lVar2 == 0) { if (*(long *)(param_2 + 0x40) == -1) { LAB_0014b740: *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(param_2 + 0x28); *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + -1; if (param_1[0x14] == *(long *)(param_2 + 0x38)) { param_1[0x14] = param_1[0x14] + *(long *)(param_2 + 0x28); } uVar3 = 0; goto LAB_0014b7cf; } uVar1 = _ma_get_block_info(param_1,local_78,(int)param_1[0x90]); if ((uVar1 & 4) != 0) { uVar1 = *(ulong *)(param_2 + 0x48); local_6c[0] = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38; lVar2 = (**(code **)(*param_1 + 0x6e8)) (param_1,local_6c,8,*(long *)(param_2 + 0x40) + 0xc,4); if (lVar2 == 0) goto LAB_0014b740; } } } uVar3 = 1; LAB_0014b7cf: if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar3; }
45,428
SDL::SoftwareRender::Draw(SDL_Texture*, SDL::Rect2f const&, SDL::Rect2f const&)
SDL3Lite/source/Renders/Software/SoftwareRender.cpp
void SoftwareRender::Draw(SDL_Texture* texture, const Rect2f& dst, const Rect2f& src) { SDL_Rect dest = { (int)dst.x, (int)dst.y, (int)dst.w, (int)dst.h }; SDL_Rect source = { (int)src.x, (int)src.y, (int)src.w, (int)src.h }; SoftwareTexture* surf = (SoftwareTexture*)texture; _pixelCopier.Copy( _window->GetSurface()->GetPixels(), _window->GetSurface()->GetBpp(), _window->GetSurface()->GetSize(), Vec2i(dest.x, dest.y), Vec2i(dest.w, dest.h), surf->GetSurface()->GetPixels(), surf->GetSurface()->GetBpp(), surf->GetSurface()->GetSize(), Vec2i(source.x, source.y), Vec2i(source.w, source.h)); }
O3
cpp
SDL::SoftwareRender::Draw(SDL_Texture*, SDL::Rect2f const&, SDL::Rect2f const&): pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq %rcx, 0xa8(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0x30(%rsp) movq 0xb0(%rsp), %rcx cvttss2si (%rcx), %ecx movl %ecx, 0x98(%rsp) movq 0xb0(%rsp), %rcx cvttss2si 0x4(%rcx), %ecx movl %ecx, 0x9c(%rsp) movq 0xb0(%rsp), %rcx cvttss2si 0x8(%rcx), %ecx movl %ecx, 0xa0(%rsp) movq 0xb0(%rsp), %rcx cvttss2si 0xc(%rcx), %ecx movl %ecx, 0xa4(%rsp) movq 0xa8(%rsp), %rcx cvttss2si (%rcx), %ecx movl %ecx, 0x88(%rsp) movq 0xa8(%rsp), %rcx cvttss2si 0x4(%rcx), %ecx movl %ecx, 0x8c(%rsp) movq 0xa8(%rsp), %rcx cvttss2si 0x8(%rcx), %ecx movl %ecx, 0x90(%rsp) movq 0xa8(%rsp), %rcx cvttss2si 0xc(%rcx), %ecx movl %ecx, 0x94(%rsp) movq 0xb8(%rsp), %rcx movq %rcx, 0x80(%rsp) movq %rax, %rcx addq $0x9, %rcx movq %rcx, 0x38(%rsp) movq 0x10(%rax), %rdi movq (%rdi), %rax callq *0x10(%rax) movq %rax, %rdi callq 0x2d670 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x40(%rsp) movq 0x10(%rax), %rdi movq (%rdi), %rax callq *0x10(%rax) movq %rax, %rdi callq 0x2d640 movl %eax, %ecx movq 0x30(%rsp), %rax movl %ecx, 0x4c(%rsp) movq 0x10(%rax), %rdi movq (%rdi), %rax callq *0x10(%rax) movq %rax, %rdi callq 0x2d660 movq %rax, 0x50(%rsp) movl 0x98(%rsp), %esi movl 0x9c(%rsp), %edx leaq 0x78(%rsp), %rdi callq 0x2e310 movl 0xa0(%rsp), %esi movl 0xa4(%rsp), %edx leaq 0x70(%rsp), %rdi callq 0x2e310 movq 0x80(%rsp), %rdi callq 0x25200 movq %rax, %rdi callq 0x2d670 movq %rax, %r14 movq 0x80(%rsp), %rdi callq 0x25200 movq %rax, %rdi callq 0x2d640 movl %eax, %ebx movq 0x80(%rsp), %rdi callq 0x25200 movq %rax, %rdi callq 0x2d660 movq %rax, 0x58(%rsp) movl 0x88(%rsp), %esi movl 0x8c(%rsp), %edx leaq 0x68(%rsp), %rdi callq 0x2e310 movl 0x90(%rsp), %esi movl 0x94(%rsp), %edx leaq 0x60(%rsp), %rdi callq 0x2e310 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movl 0x4c(%rsp), %edx movq 0x50(%rsp), %rcx movq 0x58(%rsp), %r11 leaq 0x78(%rsp), %r8 leaq 0x70(%rsp), %r9 leaq 0x68(%rsp), %r10 leaq 0x60(%rsp), %rax movq %r14, (%rsp) movl %ebx, 0x8(%rsp) movq %r11, 0x10(%rsp) movq %r10, 0x18(%rsp) movq %rax, 0x20(%rsp) callq 0x2ca00 addq $0xc8, %rsp popq %rbx popq %r14 retq
_ZN3SDL14SoftwareRender4DrawEP11SDL_TextureRKNS_6Rect2fES5_: push r14 push rbx sub rsp, 0C8h mov [rsp+0D8h+var_18], rdi mov [rsp+0D8h+var_20], rsi mov [rsp+0D8h+var_28], rdx mov [rsp+0D8h+var_30], rcx mov rax, [rsp+0D8h+var_18] mov [rsp+0D8h+var_A8], rax mov rcx, [rsp+0D8h+var_28] cvttss2si ecx, dword ptr [rcx] mov [rsp+0D8h+var_40], ecx mov rcx, [rsp+0D8h+var_28] cvttss2si ecx, dword ptr [rcx+4] mov [rsp+0D8h+var_3C], ecx mov rcx, [rsp+0D8h+var_28] cvttss2si ecx, dword ptr [rcx+8] mov [rsp+0D8h+var_38], ecx mov rcx, [rsp+0D8h+var_28] cvttss2si ecx, dword ptr [rcx+0Ch] mov [rsp+0D8h+var_34], ecx mov rcx, [rsp+0D8h+var_30] cvttss2si ecx, dword ptr [rcx] mov [rsp+0D8h+var_50], ecx mov rcx, [rsp+0D8h+var_30] cvttss2si ecx, dword ptr [rcx+4] mov [rsp+0D8h+var_4C], ecx mov rcx, [rsp+0D8h+var_30] cvttss2si ecx, dword ptr [rcx+8] mov [rsp+0D8h+var_48], ecx mov rcx, [rsp+0D8h+var_30] cvttss2si ecx, dword ptr [rcx+0Ch] mov [rsp+0D8h+var_44], ecx mov rcx, [rsp+0D8h+var_20] mov [rsp+0D8h+var_58], rcx mov rcx, rax add rcx, 9 mov [rsp+0D8h+var_A0], rcx mov rdi, [rax+10h] mov rax, [rdi] call qword ptr [rax+10h] mov rdi, rax; this call _ZN3SDL7Surface9GetPixelsEv; SDL::Surface::GetPixels(void) mov rcx, rax mov rax, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_98], rcx mov rdi, [rax+10h] mov rax, [rdi] call qword ptr [rax+10h] mov rdi, rax; this call _ZN3SDL7Surface6GetBppEv; SDL::Surface::GetBpp(void) mov ecx, eax mov rax, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_8C], ecx mov rdi, [rax+10h] mov rax, [rdi] call qword ptr [rax+10h] mov rdi, rax; this call _ZN3SDL7Surface7GetSizeEv; SDL::Surface::GetSize(void) mov [rsp+0D8h+var_88], rax mov esi, [rsp+0D8h+var_40]; int mov edx, [rsp+0D8h+var_3C]; int lea rdi, [rsp+0D8h+var_60]; this call _ZN3SDL5Vec2iC2Eii; SDL::Vec2i::Vec2i(int,int) mov esi, [rsp+0D8h+var_38]; int mov edx, [rsp+0D8h+var_34]; int lea rdi, [rsp+0D8h+var_68]; this call _ZN3SDL5Vec2iC2Eii; SDL::Vec2i::Vec2i(int,int) mov rdi, [rsp+0D8h+var_58]; this call _ZN3SDL15SoftwareTexture10GetSurfaceEv; SDL::SoftwareTexture::GetSurface(void) mov rdi, rax; this call _ZN3SDL7Surface9GetPixelsEv; SDL::Surface::GetPixels(void) mov r14, rax mov rdi, [rsp+0D8h+var_58]; this call _ZN3SDL15SoftwareTexture10GetSurfaceEv; SDL::SoftwareTexture::GetSurface(void) mov rdi, rax; this call _ZN3SDL7Surface6GetBppEv; SDL::Surface::GetBpp(void) mov ebx, eax mov rdi, [rsp+0D8h+var_58]; this call _ZN3SDL15SoftwareTexture10GetSurfaceEv; SDL::SoftwareTexture::GetSurface(void) mov rdi, rax; this call _ZN3SDL7Surface7GetSizeEv; SDL::Surface::GetSize(void) mov [rsp+0D8h+var_80], rax mov esi, [rsp+0D8h+var_50]; int mov edx, [rsp+0D8h+var_4C]; int lea rdi, [rsp+0D8h+var_70]; this call _ZN3SDL5Vec2iC2Eii; SDL::Vec2i::Vec2i(int,int) mov esi, [rsp+0D8h+var_48]; int mov edx, [rsp+0D8h+var_44]; int lea rdi, [rsp+0D8h+var_78]; this call _ZN3SDL5Vec2iC2Eii; SDL::Vec2i::Vec2i(int,int) mov rdi, [rsp+0D8h+var_A0] mov rsi, [rsp+0D8h+var_98] mov edx, [rsp+0D8h+var_8C] mov rcx, [rsp+0D8h+var_88] mov r11, [rsp+0D8h+var_80] lea r8, [rsp+0D8h+var_60] lea r9, [rsp+0D8h+var_68] lea r10, [rsp+0D8h+var_70] lea rax, [rsp+0D8h+var_78] mov [rsp+0D8h+var_D8], r14 mov [rsp+0D8h+var_D0], ebx mov [rsp+0D8h+var_C8], r11 mov [rsp+0D8h+var_C0], r10 mov [rsp+0D8h+var_B8], rax call _ZN3SDL11PixelCopier4CopyEPhiRKNS_5Vec2iES4_S4_S1_iS4_S4_S4_; SDL::PixelCopier::Copy(uchar *,int,SDL::Vec2i const&,SDL::Vec2i const&,SDL::Vec2i const&,uchar *,int,SDL::Vec2i const&,SDL::Vec2i const&,SDL::Vec2i const&) add rsp, 0C8h pop rbx pop r14 retn
long long SDL::SoftwareRender::Draw( SDL::SoftwareRender *this, SDL_Texture *a2, const SDL::Rect2f *a3, const SDL::Rect2f *a4) { SDL::Surface *v4; // rax SDL::Surface *v5; // rax SDL::Surface *v6; // rax SDL::Surface *Surface; // rax unsigned __int8 *v8; // r14 SDL::Surface *v9; // rax int v10; // ebx SDL::Surface *v11; // rax unsigned __int8 *Pixels; // [rsp+40h] [rbp-98h] int Bpp; // [rsp+4Ch] [rbp-8Ch] const SDL::Vec2i *Size; // [rsp+50h] [rbp-88h] const SDL::Vec2i *v17; // [rsp+58h] [rbp-80h] _BYTE v18[8]; // [rsp+60h] [rbp-78h] BYREF _BYTE v19[8]; // [rsp+68h] [rbp-70h] BYREF _BYTE v20[8]; // [rsp+70h] [rbp-68h] BYREF _BYTE v21[8]; // [rsp+78h] [rbp-60h] BYREF SDL::SoftwareTexture *v22; // [rsp+80h] [rbp-58h] int v23; // [rsp+88h] [rbp-50h] int v24; // [rsp+8Ch] [rbp-4Ch] int v25; // [rsp+90h] [rbp-48h] int v26; // [rsp+94h] [rbp-44h] int v27; // [rsp+98h] [rbp-40h] int v28; // [rsp+9Ch] [rbp-3Ch] int v29; // [rsp+A0h] [rbp-38h] int v30; // [rsp+A4h] [rbp-34h] const SDL::Rect2f *v31; // [rsp+A8h] [rbp-30h] const SDL::Rect2f *v32; // [rsp+B0h] [rbp-28h] SDL_Texture *v33; // [rsp+B8h] [rbp-20h] SDL::SoftwareRender *v34; // [rsp+C0h] [rbp-18h] v34 = this; v33 = a2; v32 = a3; v31 = a4; v27 = (int)*(float *)a3; v28 = (int)*((float *)a3 + 1); v29 = (int)*((float *)a3 + 2); v30 = (int)*((float *)a3 + 3); v23 = (int)*(float *)a4; v24 = (int)*((float *)a4 + 1); v25 = (int)*((float *)a4 + 2); v26 = (int)*((float *)a4 + 3); v22 = a2; v4 = (SDL::Surface *)(*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 16LL))(*((_QWORD *)this + 2)); Pixels = (unsigned __int8 *)SDL::Surface::GetPixels(v4); v5 = (SDL::Surface *)(*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 16LL))(*((_QWORD *)this + 2)); Bpp = SDL::Surface::GetBpp(v5); v6 = (SDL::Surface *)(*(long long ( **)(_QWORD))(**((_QWORD **)this + 2) + 16LL))(*((_QWORD *)this + 2)); Size = (const SDL::Vec2i *)SDL::Surface::GetSize(v6); SDL::Vec2i::Vec2i((SDL::Vec2i *)v21, v27, v28); SDL::Vec2i::Vec2i((SDL::Vec2i *)v20, v29, v30); Surface = (SDL::Surface *)SDL::SoftwareTexture::GetSurface(v22); v8 = (unsigned __int8 *)SDL::Surface::GetPixels(Surface); v9 = (SDL::Surface *)SDL::SoftwareTexture::GetSurface(v22); v10 = SDL::Surface::GetBpp(v9); v11 = (SDL::Surface *)SDL::SoftwareTexture::GetSurface(v22); v17 = (const SDL::Vec2i *)SDL::Surface::GetSize(v11); SDL::Vec2i::Vec2i((SDL::Vec2i *)v19, v23, v24); SDL::Vec2i::Vec2i((SDL::Vec2i *)v18, v25, v26); return SDL::PixelCopier::Copy( (SDL::SoftwareRender *)((char *)this + 9), Pixels, Bpp, Size, (const SDL::Vec2i *)v21, (const SDL::Vec2i *)v20, v8, v10, v17, (const SDL::Vec2i *)v19, (const SDL::Vec2i *)v18); }
Draw: PUSH R14 PUSH RBX SUB RSP,0xc8 MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xa8],RCX MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x30],RAX MOV RCX,qword ptr [RSP + 0xb0] CVTTSS2SI ECX,dword ptr [RCX] MOV dword ptr [RSP + 0x98],ECX MOV RCX,qword ptr [RSP + 0xb0] CVTTSS2SI ECX,dword ptr [RCX + 0x4] MOV dword ptr [RSP + 0x9c],ECX MOV RCX,qword ptr [RSP + 0xb0] CVTTSS2SI ECX,dword ptr [RCX + 0x8] MOV dword ptr [RSP + 0xa0],ECX MOV RCX,qword ptr [RSP + 0xb0] CVTTSS2SI ECX,dword ptr [RCX + 0xc] MOV dword ptr [RSP + 0xa4],ECX MOV RCX,qword ptr [RSP + 0xa8] CVTTSS2SI ECX,dword ptr [RCX] MOV dword ptr [RSP + 0x88],ECX MOV RCX,qword ptr [RSP + 0xa8] CVTTSS2SI ECX,dword ptr [RCX + 0x4] MOV dword ptr [RSP + 0x8c],ECX MOV RCX,qword ptr [RSP + 0xa8] CVTTSS2SI ECX,dword ptr [RCX + 0x8] MOV dword ptr [RSP + 0x90],ECX MOV RCX,qword ptr [RSP + 0xa8] CVTTSS2SI ECX,dword ptr [RCX + 0xc] MOV dword ptr [RSP + 0x94],ECX MOV RCX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x80],RCX MOV RCX,RAX ADD RCX,0x9 MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV RDI,RAX CALL 0x0012d670 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x40],RCX MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV RDI,RAX CALL 0x0012d640 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x4c],ECX MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] MOV RDI,RAX CALL 0x0012d660 MOV qword ptr [RSP + 0x50],RAX MOV ESI,dword ptr [RSP + 0x98] MOV EDX,dword ptr [RSP + 0x9c] LEA RDI,[RSP + 0x78] CALL 0x0012e310 MOV ESI,dword ptr [RSP + 0xa0] MOV EDX,dword ptr [RSP + 0xa4] LEA RDI,[RSP + 0x70] CALL 0x0012e310 MOV RDI,qword ptr [RSP + 0x80] CALL 0x00125200 MOV RDI,RAX CALL 0x0012d670 MOV R14,RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x00125200 MOV RDI,RAX CALL 0x0012d640 MOV EBX,EAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x00125200 MOV RDI,RAX CALL 0x0012d660 MOV qword ptr [RSP + 0x58],RAX MOV ESI,dword ptr [RSP + 0x88] MOV EDX,dword ptr [RSP + 0x8c] LEA RDI,[RSP + 0x68] CALL 0x0012e310 MOV ESI,dword ptr [RSP + 0x90] MOV EDX,dword ptr [RSP + 0x94] LEA RDI,[RSP + 0x60] CALL 0x0012e310 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV EDX,dword ptr [RSP + 0x4c] MOV RCX,qword ptr [RSP + 0x50] MOV R11,qword ptr [RSP + 0x58] LEA R8,[RSP + 0x78] LEA R9,[RSP + 0x70] LEA R10,[RSP + 0x68] LEA RAX,[RSP + 0x60] MOV qword ptr [RSP],R14 MOV dword ptr [RSP + 0x8],EBX MOV qword ptr [RSP + 0x10],R11 MOV qword ptr [RSP + 0x18],R10 MOV qword ptr [RSP + 0x20],RAX CALL 0x0012ca00 ADD RSP,0xc8 POP RBX POP R14 RET
/* SDL::SoftwareRender::Draw(SDL_Texture*, SDL::Rect2f const&, SDL::Rect2f const&) */ void __thiscall SDL::SoftwareRender::Draw(SoftwareRender *this,SDL_Texture *param_1,Rect2f *param_2,Rect2f *param_3) { int iVar1; uint uVar2; int iVar3; int4 uVar4; Surface *pSVar5; Vec2i *pVVar6; Vec2i *pVVar7; int4 in_stack_ffffffffffffff34; Vec2i local_78 [8]; Vec2i local_70 [8]; Vec2i local_68 [8]; Vec2i local_60 [8]; SDL_Texture *local_58; int local_50; int local_4c; int local_48; int local_44; int local_40; int local_3c; int local_38; int local_34; Rect2f *local_30; Rect2f *local_28; SDL_Texture *local_20; SoftwareRender *local_18; local_40 = (int)*(float *)param_2; local_3c = (int)*(float *)(param_2 + 4); local_38 = (int)*(float *)(param_2 + 8); local_34 = (int)*(float *)(param_2 + 0xc); local_50 = (int)*(float *)param_3; local_4c = (int)*(float *)(param_3 + 4); local_48 = (int)*(float *)(param_3 + 8); local_44 = (int)*(float *)(param_3 + 0xc); local_58 = param_1; local_30 = param_3; local_28 = param_2; local_20 = param_1; local_18 = this; pSVar5 = (Surface *)(**(code **)(**(long **)(this + 0x10) + 0x10))(); iVar1 = Surface::GetPixels(pSVar5); pSVar5 = (Surface *)(**(code **)(**(long **)(this + 0x10) + 0x10))(); uVar2 = Surface::GetBpp(pSVar5); pSVar5 = (Surface *)(**(code **)(**(long **)(this + 0x10) + 0x10))(); pVVar6 = (Vec2i *)Surface::GetSize(pSVar5); Vec2i::Vec2i(local_60,local_40,local_3c); Vec2i::Vec2i(local_68,local_38,local_34); pSVar5 = (Surface *)SoftwareTexture::GetSurface((SoftwareTexture *)local_58); iVar3 = Surface::GetPixels(pSVar5); pSVar5 = (Surface *)SoftwareTexture::GetSurface((SoftwareTexture *)local_58); uVar4 = Surface::GetBpp(pSVar5); pSVar5 = (Surface *)SoftwareTexture::GetSurface((SoftwareTexture *)local_58); pVVar7 = (Vec2i *)Surface::GetSize(pSVar5); Vec2i::Vec2i(local_70,local_50,local_4c); Vec2i::Vec2i(local_78,local_48,local_44); PixelCopier::Copy((uchar *)(this + 9),iVar1,(Vec2i *)(ulong)uVar2,pVVar6,local_60, (uchar *)local_68,iVar3,(Vec2i *)CONCAT44(in_stack_ffffffffffffff34,uVar4), pVVar7,local_70); return; }
45,429
my_vsnprintf_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_vsnprintf_utf32(char *dst, size_t n, const char* fmt, va_list ap) { char *start= dst, *end= dst + n; DBUG_ASSERT((n % 4) == 0); for (; *fmt ; fmt++) { if (fmt[0] != '%') { if (dst >= end) /* End of buffer */ break; *dst++= '\0'; *dst++= '\0'; *dst++= '\0'; *dst++= *fmt; /* Copy ordinary char */ continue; } fmt++; /* Skip if max size is used (to be compatible with printf) */ while ( (*fmt>='0' && *fmt<='9') || *fmt == '.' || *fmt == '-') fmt++; if (*fmt == 'l') fmt++; if (*fmt == 's') /* String parameter */ { reg2 char *par= va_arg(ap, char *); size_t plen; size_t left_len= (size_t)(end - dst); if (!par) par= (char*)"(null)"; plen= strlen(par); if (left_len <= plen*4) plen= left_len / 4 - 1; for ( ; plen ; plen--, dst+= 4, par++) { dst[0]= '\0'; dst[1]= '\0'; dst[2]= '\0'; dst[3]= par[0]; } continue; } else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ { register int iarg; char nbuf[16]; char *pbuf= nbuf; if ((size_t) (end - dst) < 64) break; iarg= va_arg(ap, int); if (*fmt == 'd') int10_to_str((long) iarg, nbuf, -10); else int10_to_str((long) (uint) iarg,nbuf,10); for (; pbuf[0]; pbuf++) { *dst++= '\0'; *dst++= '\0'; *dst++= '\0'; *dst++= *pbuf; } continue; } /* We come here on '%%', unknown code or too long parameter */ if (dst == end) break; *dst++= '\0'; *dst++= '\0'; *dst++= '\0'; *dst++= '%'; /* % used as % or unknown code */ } DBUG_ASSERT(dst < end); *dst++= '\0'; *dst++= '\0'; *dst++= '\0'; *dst++= '\0'; /* End of errmessage */ return (size_t) (dst - start - 4); }
O0
c
my_vsnprintf_utf32: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x28(%rbp) movq %rsi, -0x30(%rbp) movq %rdx, -0x38(%rbp) movq %rcx, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x6f1fe jmp 0x6f200 movq -0x38(%rbp), %rax cmpb $0x0, (%rax) je 0x6f5a8 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x25, %eax je 0x6f27a movq -0x28(%rbp), %rax cmpq -0x50(%rbp), %rax jb 0x6f228 jmp 0x6f5a8 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x38(%rbp), %rax movb (%rax), %cl movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movb %cl, (%rax) jmp 0x6f597 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x6f2a3 movq -0x38(%rbp), %rax movsbl (%rax), %ecx movb $0x1, %al cmpl $0x39, %ecx movb %al, -0x79(%rbp) jle 0x6f2c4 movq -0x38(%rbp), %rax movsbl (%rax), %ecx movb $0x1, %al cmpl $0x2e, %ecx movb %al, -0x79(%rbp) je 0x6f2c4 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax sete %al movb %al, -0x79(%rbp) movb -0x79(%rbp), %al testb $0x1, %al jne 0x6f2cd jmp 0x6f2db movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x6f286 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x6c, %eax jne 0x6f2f3 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x73, %eax jne 0x6f409 movq -0x40(%rbp), %rax movq %rax, -0x88(%rbp) movl (%rax), %eax movl %eax, -0x80(%rbp) cmpl $0x28, %eax ja 0x6f337 movq -0x88(%rbp), %rcx movl -0x80(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x90(%rbp) jmp 0x6f354 movq -0x88(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x58(%rbp) jne 0x6f383 leaq 0x1d8fa(%rip), %rax # 0x8cc79 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi callq 0x25160 movq %rax, -0x60(%rbp) movq -0x68(%rbp), %rax movq -0x60(%rbp), %rcx shlq $0x2, %rcx cmpq %rcx, %rax ja 0x6f3b1 movq -0x68(%rbp), %rax shrq $0x2, %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x6f3b3 cmpq $0x0, -0x60(%rbp) je 0x6f404 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x2(%rax) movq -0x58(%rbp), %rax movb (%rax), %cl movq -0x28(%rbp), %rax movb %cl, 0x3(%rax) movq -0x60(%rbp), %rax addq $-0x1, %rax movq %rax, -0x60(%rbp) movq -0x28(%rbp), %rax addq $0x4, %rax movq %rax, -0x28(%rbp) movq -0x58(%rbp), %rax addq $0x1, %rax movq %rax, -0x58(%rbp) jmp 0x6f3b3 jmp 0x6f597 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x64, %eax je 0x6f425 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x75, %eax jne 0x6f541 leaq -0x20(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x50(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax cmpq $0x40, %rax jae 0x6f443 jmp 0x6f5a8 movq -0x40(%rbp), %rax movq %rax, -0xa0(%rbp) movl (%rax), %eax movl %eax, -0x94(%rbp) cmpl $0x28, %eax ja 0x6f47d movq -0xa0(%rbp), %rcx movl -0x94(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0xa8(%rbp) jmp 0x6f49a movq -0xa0(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movl (%rax), %eax movl %eax, -0x6c(%rbp) movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x64, %eax jne 0x6f4c6 movslq -0x6c(%rbp), %rdi leaq -0x20(%rbp), %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 callq 0x83520 jmp 0x6f4d9 movl -0x6c(%rbp), %eax movl %eax, %edi leaq -0x20(%rbp), %rsi movl $0xa, %edx callq 0x83520 jmp 0x6f4db movq -0x78(%rbp), %rax cmpb $0x0, (%rax) je 0x6f53f movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x78(%rbp), %rax movb (%rax), %cl movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movb %cl, (%rax) movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) jmp 0x6f4db jmp 0x6f597 jmp 0x6f543 movq -0x28(%rbp), %rax cmpq -0x50(%rbp), %rax jne 0x6f54f jmp 0x6f5a8 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x25, (%rax) movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x6f200 jmp 0x6f5aa jmp 0x6f5ac movq -0x28(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax addq $-0x4, %rax movq %rax, -0xb0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x6f628 movq -0xb0(%rbp), %rax addq $0xb0, %rsp popq %rbp retq callq 0x25380 nopl (%rax)
my_vsnprintf_utf32: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_38], rdx mov [rbp+var_40], rcx mov rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_50], rax jmp short $+2 loc_6F1FE: jmp short $+2 loc_6F200: mov rax, [rbp+var_38] cmp byte ptr [rax], 0 jz loc_6F5A8 mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 25h ; '%' jz short loc_6F27A mov rax, [rbp+var_28] cmp rax, [rbp+var_50] jb short loc_6F228 jmp loc_6F5A8 loc_6F228: mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_38] mov cl, [rax] mov rax, [rbp+var_28] mov rdx, rax add rdx, 1 mov [rbp+var_28], rdx mov [rax], cl jmp loc_6F597 loc_6F27A: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax loc_6F286: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_6F2A3 mov rax, [rbp+var_38] movsx ecx, byte ptr [rax] mov al, 1 cmp ecx, 39h ; '9' mov [rbp+var_79], al jle short loc_6F2C4 loc_6F2A3: mov rax, [rbp+var_38] movsx ecx, byte ptr [rax] mov al, 1 cmp ecx, 2Eh ; '.' mov [rbp+var_79], al jz short loc_6F2C4 mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' setz al mov [rbp+var_79], al loc_6F2C4: mov al, [rbp+var_79] test al, 1 jnz short loc_6F2CD jmp short loc_6F2DB loc_6F2CD: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_6F286 loc_6F2DB: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 6Ch ; 'l' jnz short loc_6F2F3 mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax loc_6F2F3: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 73h ; 's' jnz loc_6F409 mov rax, [rbp+var_40] mov [rbp+var_88], rax mov eax, [rax] mov [rbp+var_80], eax cmp eax, 28h ; '(' ja short loc_6F337 mov rcx, [rbp+var_88] mov edx, [rbp+var_80] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_90], rax jmp short loc_6F354 loc_6F337: mov rcx, [rbp+var_88] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_90], rax loc_6F354: mov rax, [rbp+var_90] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_68], rax cmp [rbp+var_58], 0 jnz short loc_6F383 lea rax, aNull; "(null)" mov [rbp+var_58], rax loc_6F383: mov rdi, [rbp+var_58] call _strlen mov [rbp+var_60], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_60] shl rcx, 2 cmp rax, rcx ja short loc_6F3B1 mov rax, [rbp+var_68] shr rax, 2 sub rax, 1 mov [rbp+var_60], rax loc_6F3B1: jmp short $+2 loc_6F3B3: cmp [rbp+var_60], 0 jz short loc_6F404 mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov byte ptr [rax+1], 0 mov rax, [rbp+var_28] mov byte ptr [rax+2], 0 mov rax, [rbp+var_58] mov cl, [rax] mov rax, [rbp+var_28] mov [rax+3], cl mov rax, [rbp+var_60] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_60], rax mov rax, [rbp+var_28] add rax, 4 mov [rbp+var_28], rax mov rax, [rbp+var_58] add rax, 1 mov [rbp+var_58], rax jmp short loc_6F3B3 loc_6F404: jmp loc_6F597 loc_6F409: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 64h ; 'd' jz short loc_6F425 mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 75h ; 'u' jnz loc_6F541 loc_6F425: lea rax, [rbp+var_20] mov [rbp+var_78], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_28] sub rax, rcx cmp rax, 40h ; '@' jnb short loc_6F443 jmp loc_6F5A8 loc_6F443: mov rax, [rbp+var_40] mov [rbp+var_A0], rax mov eax, [rax] mov [rbp+var_94], eax cmp eax, 28h ; '(' ja short loc_6F47D mov rcx, [rbp+var_A0] mov edx, [rbp+var_94] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_A8], rax jmp short loc_6F49A loc_6F47D: mov rcx, [rbp+var_A0] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_A8], rax loc_6F49A: mov rax, [rbp+var_A8] mov eax, [rax] mov [rbp+var_6C], eax mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 64h ; 'd' jnz short loc_6F4C6 movsxd rdi, [rbp+var_6C] lea rsi, [rbp+var_20] mov edx, 0FFFFFFF6h call int10_to_str jmp short loc_6F4D9 loc_6F4C6: mov eax, [rbp+var_6C] mov edi, eax lea rsi, [rbp+var_20] mov edx, 0Ah call int10_to_str loc_6F4D9: jmp short $+2 loc_6F4DB: mov rax, [rbp+var_78] cmp byte ptr [rax], 0 jz short loc_6F53F mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_78] mov cl, [rax] mov rax, [rbp+var_28] mov rdx, rax add rdx, 1 mov [rbp+var_28], rdx mov [rax], cl mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax jmp short loc_6F4DB loc_6F53F: jmp short loc_6F597 loc_6F541: jmp short $+2 loc_6F543: mov rax, [rbp+var_28] cmp rax, [rbp+var_50] jnz short loc_6F54F jmp short loc_6F5A8 loc_6F54F: mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 25h ; '%' loc_6F597: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp loc_6F200 loc_6F5A8: jmp short $+2 loc_6F5AA: jmp short $+2 loc_6F5AC: mov rax, [rbp+var_28] mov rcx, rax inc rcx mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax inc rcx mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax inc rcx mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax inc rcx mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_48] sub rax, rcx add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_B0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_6F628 mov rax, [rbp+var_B0] add rsp, 0B0h pop rbp retn loc_6F628: call ___stack_chk_fail
_BYTE * my_vsnprintf_utf32(_BYTE *a1, long long a2, _BYTE *a3, int *a4) { _BYTE *v4; // rax const char **v5; // rax unsigned int *v6; // rax _BYTE *v7; // rax _BYTE *v8; // rax int v10; // [rsp+1Ch] [rbp-94h] int v11; // [rsp+30h] [rbp-80h] bool v12; // [rsp+37h] [rbp-79h] _BYTE *v13; // [rsp+38h] [rbp-78h] unsigned int v14; // [rsp+44h] [rbp-6Ch] unsigned long long v15; // [rsp+48h] [rbp-68h] long long v16; // [rsp+50h] [rbp-60h] const char *v17; // [rsp+58h] [rbp-58h] _BYTE *v18; // [rsp+60h] [rbp-50h] _BYTE *v21; // [rsp+88h] [rbp-28h] _BYTE v22[24]; // [rsp+90h] [rbp-20h] BYREF unsigned long long v23; // [rsp+A8h] [rbp-8h] v23 = __readfsqword(0x28u); v21 = a1; v18 = &a1[a2]; while ( *a3 ) { if ( *a3 == 37 ) { ++a3; while ( 1 ) { if ( (char)*a3 < 48 || (v12 = 1, (char)*a3 > 57) ) { v12 = 1; if ( *a3 != 46 ) v12 = *a3 == 45; } if ( !v12 ) break; ++a3; } if ( *a3 == 108 ) ++a3; if ( *a3 == 115 ) { v11 = *a4; if ( (unsigned int)*a4 > 0x28 ) { v5 = (const char **)*((_QWORD *)a4 + 1); *((_QWORD *)a4 + 1) = v5 + 1; } else { v5 = (const char **)(*((_QWORD *)a4 + 2) + v11); *a4 = v11 + 8; } v17 = *v5; v15 = v18 - v21; if ( !*v5 ) v17 = "(null)"; v16 = strlen(v17); if ( v15 <= 4 * v16 ) v16 = (v15 >> 2) - 1; while ( v16 ) { *v21 = 0; v21[1] = 0; v21[2] = 0; v21[3] = *v17; --v16; v21 += 4; ++v17; } } else if ( *a3 == 100 || *a3 == 117 ) { v13 = v22; if ( (unsigned long long)(v18 - v21) < 0x40 ) break; v10 = *a4; if ( (unsigned int)*a4 > 0x28 ) { v6 = (unsigned int *)*((_QWORD *)a4 + 1); *((_QWORD *)a4 + 1) = v6 + 2; } else { v6 = (unsigned int *)(*((_QWORD *)a4 + 2) + v10); *a4 = v10 + 8; } v14 = *v6; if ( *a3 == 100 ) int10_to_str((int)v14, v22, 4294967286LL); else int10_to_str(v14, v22, 10LL); while ( *v13 ) { *v21 = 0; v21[1] = 0; v21[2] = 0; v7 = v21 + 3; v21 += 4; *v7 = *v13++; } } else { if ( v21 == v18 ) break; *v21 = 0; v21[1] = 0; v21[2] = 0; v8 = v21 + 3; v21 += 4; *v8 = 37; } } else { if ( v21 >= v18 ) break; *v21 = 0; v21[1] = 0; v21[2] = 0; v4 = v21 + 3; v21 += 4; *v4 = *a3; } ++a3; } *v21 = 0; v21[1] = 0; v21[2] = 0; v21[3] = 0; return (_BYTE *)(v21 - a1); }
my_vsnprintf_utf32: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x40],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX JMP 0x0016f1fe LAB_0016f1fe: JMP 0x0016f200 LAB_0016f200: MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX],0x0 JZ 0x0016f5a8 MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x25 JZ 0x0016f27a MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x50] JC 0x0016f228 JMP 0x0016f5a8 LAB_0016f228: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOV byte ptr [RAX],CL JMP 0x0016f597 LAB_0016f27a: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX LAB_0016f286: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x0016f2a3 MOV RAX,qword ptr [RBP + -0x38] MOVSX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x39 MOV byte ptr [RBP + -0x79],AL JLE 0x0016f2c4 LAB_0016f2a3: MOV RAX,qword ptr [RBP + -0x38] MOVSX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x2e MOV byte ptr [RBP + -0x79],AL JZ 0x0016f2c4 MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d SETZ AL MOV byte ptr [RBP + -0x79],AL LAB_0016f2c4: MOV AL,byte ptr [RBP + -0x79] TEST AL,0x1 JNZ 0x0016f2cd JMP 0x0016f2db LAB_0016f2cd: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x0016f286 LAB_0016f2db: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x6c JNZ 0x0016f2f3 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX LAB_0016f2f3: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x73 JNZ 0x0016f409 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x88],RAX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x80],EAX CMP EAX,0x28 JA 0x0016f337 MOV RCX,qword ptr [RBP + -0x88] MOV EDX,dword ptr [RBP + -0x80] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x90],RAX JMP 0x0016f354 LAB_0016f337: MOV RCX,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x90],RAX LAB_0016f354: MOV RAX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x58],0x0 JNZ 0x0016f383 LEA RAX,[0x18cc79] MOV qword ptr [RBP + -0x58],RAX LAB_0016f383: MOV RDI,qword ptr [RBP + -0x58] CALL 0x00125160 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] SHL RCX,0x2 CMP RAX,RCX JA 0x0016f3b1 MOV RAX,qword ptr [RBP + -0x68] SHR RAX,0x2 SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_0016f3b1: JMP 0x0016f3b3 LAB_0016f3b3: CMP qword ptr [RBP + -0x60],0x0 JZ 0x0016f404 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x2],0x0 MOV RAX,qword ptr [RBP + -0x58] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x60] ADD RAX,-0x1 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x4 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x1 MOV qword ptr [RBP + -0x58],RAX JMP 0x0016f3b3 LAB_0016f404: JMP 0x0016f597 LAB_0016f409: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x64 JZ 0x0016f425 MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x75 JNZ 0x0016f541 LAB_0016f425: LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX CMP RAX,0x40 JNC 0x0016f443 JMP 0x0016f5a8 LAB_0016f443: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0xa0],RAX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x94],EAX CMP EAX,0x28 JA 0x0016f47d MOV RCX,qword ptr [RBP + -0xa0] MOV EDX,dword ptr [RBP + -0x94] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0xa8],RAX JMP 0x0016f49a LAB_0016f47d: MOV RCX,qword ptr [RBP + -0xa0] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0xa8],RAX LAB_0016f49a: MOV RAX,qword ptr [RBP + -0xa8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x6c],EAX MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x64 JNZ 0x0016f4c6 MOVSXD RDI,dword ptr [RBP + -0x6c] LEA RSI,[RBP + -0x20] MOV EDX,0xfffffff6 CALL 0x00183520 JMP 0x0016f4d9 LAB_0016f4c6: MOV EAX,dword ptr [RBP + -0x6c] MOV EDI,EAX LEA RSI,[RBP + -0x20] MOV EDX,0xa CALL 0x00183520 LAB_0016f4d9: JMP 0x0016f4db LAB_0016f4db: MOV RAX,qword ptr [RBP + -0x78] CMP byte ptr [RAX],0x0 JZ 0x0016f53f MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX JMP 0x0016f4db LAB_0016f53f: JMP 0x0016f597 LAB_0016f541: JMP 0x0016f543 LAB_0016f543: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x50] JNZ 0x0016f54f JMP 0x0016f5a8 LAB_0016f54f: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x25 LAB_0016f597: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x0016f200 LAB_0016f5a8: JMP 0x0016f5aa LAB_0016f5aa: JMP 0x0016f5ac LAB_0016f5ac: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX ADD RAX,-0x4 MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0016f628 MOV RAX,qword ptr [RBP + -0xb0] ADD RSP,0xb0 POP RBP RET LAB_0016f628: CALL 0x00125380
long my_vsnprintf_utf32(int1 *param_1,long param_2,char *param_3,uint *param_4) { uint uVar1; int1 *puVar2; char *pcVar3; int1 *puVar4; long in_FS_OFFSET; bool bVar5; int *local_b0; long *local_98; char *local_80; size_t local_68; char *local_60; char *local_40; int1 *local_30; char local_28 [24]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); puVar2 = param_1 + param_2; local_30 = param_1; for (local_40 = param_3; *local_40 != '\0'; local_40 = local_40 + 1) { if (*local_40 == '%') { do { pcVar3 = local_40; local_40 = pcVar3 + 1; if (((*local_40 < '0') || (bVar5 = true, '9' < *local_40)) && (bVar5 = true, *local_40 != '.')) { bVar5 = *local_40 == '-'; } } while (bVar5); if (*local_40 == 'l') { local_40 = pcVar3 + 2; } if (*local_40 == 's') { uVar1 = *param_4; if (uVar1 < 0x29) { local_98 = (long *)((long)(int)uVar1 + *(long *)(param_4 + 4)); *param_4 = uVar1 + 8; } else { local_98 = *(long **)(param_4 + 2); *(long **)(param_4 + 2) = local_98 + 1; } local_60 = (char *)*local_98; if (local_60 == (char *)0x0) { local_60 = "(null)"; } local_68 = strlen(local_60); if ((ulong)((long)puVar2 - (long)local_30) <= local_68 << 2) { local_68 = ((ulong)((long)puVar2 - (long)local_30) >> 2) - 1; } for (; local_68 != 0; local_68 = local_68 - 1) { *local_30 = 0; local_30[1] = 0; local_30[2] = 0; local_30[3] = *local_60; local_30 = local_30 + 4; local_60 = local_60 + 1; } } else if ((*local_40 == 'd') || (*local_40 == 'u')) { local_80 = local_28; if ((ulong)((long)puVar2 - (long)local_30) < 0x40) break; uVar1 = *param_4; if (uVar1 < 0x29) { local_b0 = (int *)((long)(int)uVar1 + *(long *)(param_4 + 4)); *param_4 = uVar1 + 8; } else { local_b0 = *(int **)(param_4 + 2); *(int **)(param_4 + 2) = local_b0 + 2; } if (*local_40 == 'd') { int10_to_str((long)*local_b0,local_28,0xfffffff6); } else { int10_to_str(*local_b0,local_28,10); } for (; *local_80 != '\0'; local_80 = local_80 + 1) { *local_30 = 0; local_30[1] = 0; pcVar3 = local_30 + 3; local_30[2] = 0; local_30 = local_30 + 4; *pcVar3 = *local_80; } } else { if (local_30 == puVar2) break; *local_30 = 0; local_30[1] = 0; puVar4 = local_30 + 3; local_30[2] = 0; local_30 = local_30 + 4; *puVar4 = 0x25; } } else { if (puVar2 <= local_30) break; *local_30 = 0; local_30[1] = 0; pcVar3 = local_30 + 3; local_30[2] = 0; local_30 = local_30 + 4; *pcVar3 = *local_40; } } *local_30 = 0; local_30[1] = 0; local_30[2] = 0; local_30[3] = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)local_30 - (long)param_1; }
45,430
find_type_eol
eloqsql/mysys/typelib.c
static int find_type_eol(const char **x, const TYPELIB *typelib, uint flags, const char *eol) { int find,pos; int UNINIT_VAR(findpos); /* guarded by find */ const char *UNINIT_VAR(termptr); const char *i; const char *j; CHARSET_INFO *cs= &my_charset_latin1; DBUG_ENTER("find_type_eol"); DBUG_PRINT("enter",("x: '%s' lib: %p", *x, typelib)); DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM))); if (!typelib->count) { DBUG_PRINT("exit",("no count")); DBUG_RETURN(0); } find=0; for (pos=0 ; (j=typelib->type_names[pos]) ; pos++) { for (i=*x ; i < eol && !is_field_separator(flags, *i) && my_toupper(cs, *i) == my_toupper(cs, *j) ; i++, j++) ; if (! *j) { while (i < eol && *i == ' ') i++; /* skip_end_space */ if (i >= eol || is_field_separator(flags, *i)) { *x= i; DBUG_RETURN(pos+1); } } if ((i >= eol && !is_field_separator(flags, *i)) && (!*j || !(flags & FIND_TYPE_NO_PREFIX))) { find++; findpos=pos; termptr=i; } } if (find == 0 || *x == eol) { DBUG_PRINT("exit",("Couldn't find type")); DBUG_RETURN(0); } else if (find != 1 || (flags & FIND_TYPE_NO_PREFIX)) { DBUG_PRINT("exit",("Too many possibilities")); DBUG_RETURN(-1); } *x= termptr; DBUG_RETURN(findpos+1); }
O0
c
find_type_eol: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) leaq 0x261ee8(%rip), %rax # 0x2f0500 movq %rax, -0x58(%rbp) jmp 0x8e61e jmp 0x8e620 jmp 0x8e622 movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0x8e63d jmp 0x8e62d jmp 0x8e62f jmp 0x8e631 movl $0x0, -0x4(%rbp) jmp 0x8e853 movl $0x0, -0x2c(%rbp) movl $0x0, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movslq -0x30(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0x8e7fb movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x8e6de movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x8e6b0 movq -0x48(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x2c, %ecx movb %al, -0x59(%rbp) je 0x8e6de movq -0x48(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x3d, %ecx movb %al, -0x59(%rbp) je 0x8e6de movq -0x58(%rbp), %rax movq 0x50(%rax), %rax movq -0x48(%rbp), %rcx movzbl (%rcx), %ecx movsbl (%rax,%rcx), %eax movq -0x58(%rbp), %rcx movq 0x50(%rcx), %rcx movq -0x50(%rbp), %rdx movzbl (%rdx), %edx movsbl (%rcx,%rdx), %ecx cmpl %ecx, %eax sete %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x8e6e7 jmp 0x8e706 jmp 0x8e6e9 movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x8e674 movq -0x50(%rbp), %rax cmpb $0x0, (%rax) jne 0x8e793 jmp 0x8e715 movq -0x48(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x5a(%rbp) jae 0x8e734 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x5a(%rbp) movb -0x5a(%rbp), %al testb $0x1, %al jne 0x8e73d jmp 0x8e74b movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) jmp 0x8e715 movq -0x48(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x8e778 movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x8e791 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x2c, %eax je 0x8e778 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x3d, %eax jne 0x8e791 movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x8e853 jmp 0x8e793 movq -0x48(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x8e7eb movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x8e7c0 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x2c, %eax je 0x8e7eb movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x3d, %eax je 0x8e7eb movq -0x50(%rbp), %rax cmpb $0x0, (%rax) je 0x8e7d4 movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x8e7eb movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x8e7ed movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0x8e64b cmpl $0x0, -0x2c(%rbp) je 0x8e80e movq -0x10(%rbp), %rax movq (%rax), %rax cmpq -0x28(%rbp), %rax jne 0x8e81d jmp 0x8e810 jmp 0x8e812 jmp 0x8e814 movl $0x0, -0x4(%rbp) jmp 0x8e853 cmpl $0x1, -0x2c(%rbp) jne 0x8e82e movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x8e83d jmp 0x8e830 jmp 0x8e832 jmp 0x8e834 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x8e853 jmp 0x8e83f movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
find_type_eol: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov eax, [rbp+var_34] mov [rbp+var_34], eax mov rax, [rbp+var_40] mov [rbp+var_40], rax lea rax, my_charset_latin1 mov [rbp+var_58], rax jmp short $+2 loc_8E61E: jmp short $+2 loc_8E620: jmp short $+2 loc_8E622: mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_8E63D jmp short $+2 loc_8E62D: jmp short $+2 loc_8E62F: jmp short $+2 loc_8E631: mov [rbp+var_4], 0 jmp loc_8E853 loc_8E63D: mov [rbp+var_2C], 0 mov [rbp+var_30], 0 loc_8E64B: mov rax, [rbp+var_18] mov rax, [rax+10h] movsxd rcx, [rbp+var_30] mov rax, [rax+rcx*8] mov [rbp+var_50], rax cmp rax, 0 jz loc_8E7FB mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax loc_8E674: mov rcx, [rbp+var_48] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_59], al jnb short loc_8E6DE mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_8E6B0 mov rax, [rbp+var_48] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 2Ch ; ',' mov [rbp+var_59], al jz short loc_8E6DE mov rax, [rbp+var_48] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 3Dh ; '=' mov [rbp+var_59], al jz short loc_8E6DE loc_8E6B0: mov rax, [rbp+var_58] mov rax, [rax+50h] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx] movsx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_58] mov rcx, [rcx+50h] mov rdx, [rbp+var_50] movzx edx, byte ptr [rdx] movsx ecx, byte ptr [rcx+rdx] cmp eax, ecx setz al mov [rbp+var_59], al loc_8E6DE: mov al, [rbp+var_59] test al, 1 jnz short loc_8E6E7 jmp short loc_8E706 loc_8E6E7: jmp short $+2 loc_8E6E9: mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp loc_8E674 loc_8E706: mov rax, [rbp+var_50] cmp byte ptr [rax], 0 jnz loc_8E793 jmp short $+2 loc_8E715: mov rcx, [rbp+var_48] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_5A], al jnb short loc_8E734 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' setz al mov [rbp+var_5A], al loc_8E734: mov al, [rbp+var_5A] test al, 1 jnz short loc_8E73D jmp short loc_8E74B loc_8E73D: mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax jmp short loc_8E715 loc_8E74B: mov rax, [rbp+var_48] cmp rax, [rbp+var_28] jnb short loc_8E778 mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_8E791 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jz short loc_8E778 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 3Dh ; '=' jnz short loc_8E791 loc_8E778: mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax], rcx mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_4], eax jmp loc_8E853 loc_8E791: jmp short $+2 loc_8E793: mov rax, [rbp+var_48] cmp rax, [rbp+var_28] jb short loc_8E7EB mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_8E7C0 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jz short loc_8E7EB mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 3Dh ; '=' jz short loc_8E7EB loc_8E7C0: mov rax, [rbp+var_50] cmp byte ptr [rax], 0 jz short loc_8E7D4 mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jnz short loc_8E7EB loc_8E7D4: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax mov eax, [rbp+var_30] mov [rbp+var_34], eax mov rax, [rbp+var_48] mov [rbp+var_40], rax loc_8E7EB: jmp short $+2 loc_8E7ED: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp loc_8E64B loc_8E7FB: cmp [rbp+var_2C], 0 jz short loc_8E80E mov rax, [rbp+var_10] mov rax, [rax] cmp rax, [rbp+var_28] jnz short loc_8E81D loc_8E80E: jmp short $+2 loc_8E810: jmp short $+2 loc_8E812: jmp short $+2 loc_8E814: mov [rbp+var_4], 0 jmp short loc_8E853 loc_8E81D: cmp [rbp+var_2C], 1 jnz short loc_8E82E mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jz short loc_8E83D loc_8E82E: jmp short $+2 loc_8E830: jmp short $+2 loc_8E832: jmp short $+2 loc_8E834: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_8E853 loc_8E83D: jmp short $+2 loc_8E83F: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax], rcx mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_4], eax loc_8E853: mov eax, [rbp+var_4] pop rbp retn
long long find_type_eol(_BYTE **a1, long long a2, char a3, _BYTE *a4) { bool v5; // [rsp+0h] [rbp-5Ah] bool v6; // [rsp+1h] [rbp-59h] _BYTE *v7; // [rsp+Ah] [rbp-50h] _BYTE *j; // [rsp+12h] [rbp-48h] _BYTE *v9; // [rsp+1Ah] [rbp-40h] int v10; // [rsp+26h] [rbp-34h] int i; // [rsp+2Ah] [rbp-30h] int v12; // [rsp+2Eh] [rbp-2Ch] if ( *(_DWORD *)a2 ) { v12 = 0; for ( i = 0; ; ++i ) { v7 = *(_BYTE **)(*(_QWORD *)(a2 + 16) + 8LL * i); if ( !v7 ) break; for ( j = *a1; ; ++j ) { v6 = 0; if ( j < a4 ) { if ( (a3 & 8) == 0 || (v6 = 0, *j != 44) && (v6 = 0, *j != 61) ) v6 = *(char *)(*((_QWORD *)&my_charset_latin1 + 10) + (unsigned __int8)*j) == *(char *)(*((_QWORD *)&my_charset_latin1 + 10) + (unsigned __int8)*v7); } if ( !v6 ) break; ++v7; } if ( !*v7 ) { while ( 1 ) { v5 = 0; if ( j < a4 ) v5 = *j == 32; if ( !v5 ) break; ++j; } if ( j >= a4 || (a3 & 8) != 0 && (*j == 44 || *j == 61) ) { *a1 = j; return (unsigned int)(i + 1); } } if ( j >= a4 && ((a3 & 8) == 0 || *j != 44 && *j != 61) && (!*v7 || (a3 & 1) == 0) ) { ++v12; v10 = i; v9 = j; } } if ( v12 && *a1 != a4 ) { if ( v12 == 1 && (a3 & 1) == 0 ) { *a1 = v9; return (unsigned int)(v10 + 1); } else { return (unsigned int)-1; } } else { return 0; } } else { return 0; } }
find_type_eol: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0x3f0500] MOV qword ptr [RBP + -0x58],RAX JMP 0x0018e61e LAB_0018e61e: JMP 0x0018e620 LAB_0018e620: JMP 0x0018e622 LAB_0018e622: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x0018e63d JMP 0x0018e62d LAB_0018e62d: JMP 0x0018e62f LAB_0018e62f: JMP 0x0018e631 LAB_0018e631: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018e853 LAB_0018e63d: MOV dword ptr [RBP + -0x2c],0x0 MOV dword ptr [RBP + -0x30],0x0 LAB_0018e64b: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x0018e7fb MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_0018e674: MOV RCX,qword ptr [RBP + -0x48] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x59],AL JNC 0x0018e6de MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x0018e6b0 MOV RAX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x2c MOV byte ptr [RBP + -0x59],AL JZ 0x0018e6de MOV RAX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x3d MOV byte ptr [RBP + -0x59],AL JZ 0x0018e6de LAB_0018e6b0: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x50] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX] MOVSX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RCX + 0x50] MOV RDX,qword ptr [RBP + -0x50] MOVZX EDX,byte ptr [RDX] MOVSX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX SETZ AL MOV byte ptr [RBP + -0x59],AL LAB_0018e6de: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x0018e6e7 JMP 0x0018e706 LAB_0018e6e7: JMP 0x0018e6e9 LAB_0018e6e9: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0018e674 LAB_0018e706: MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX],0x0 JNZ 0x0018e793 JMP 0x0018e715 LAB_0018e715: MOV RCX,qword ptr [RBP + -0x48] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x5a],AL JNC 0x0018e734 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x5a],AL LAB_0018e734: MOV AL,byte ptr [RBP + -0x5a] TEST AL,0x1 JNZ 0x0018e73d JMP 0x0018e74b LAB_0018e73d: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x0018e715 LAB_0018e74b: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x28] JNC 0x0018e778 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x0018e791 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JZ 0x0018e778 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3d JNZ 0x0018e791 LAB_0018e778: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0018e853 LAB_0018e791: JMP 0x0018e793 LAB_0018e793: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x28] JC 0x0018e7eb MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x0018e7c0 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JZ 0x0018e7eb MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3d JZ 0x0018e7eb LAB_0018e7c0: MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX],0x0 JZ 0x0018e7d4 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0018e7eb LAB_0018e7d4: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX LAB_0018e7eb: JMP 0x0018e7ed LAB_0018e7ed: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x0018e64b LAB_0018e7fb: CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0018e80e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0018e81d LAB_0018e80e: JMP 0x0018e810 LAB_0018e810: JMP 0x0018e812 LAB_0018e812: JMP 0x0018e814 LAB_0018e814: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018e853 LAB_0018e81d: CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x0018e82e MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JZ 0x0018e83d LAB_0018e82e: JMP 0x0018e830 LAB_0018e830: JMP 0x0018e832 LAB_0018e832: JMP 0x0018e834 LAB_0018e834: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0018e853 LAB_0018e83d: JMP 0x0018e83f LAB_0018e83f: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX LAB_0018e853: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int find_type_eol(int8 *param_1,int *param_2,uint param_3,byte *param_4) { bool bVar1; byte *local_58; byte *local_50; byte *local_48; int local_3c; int local_38; int local_34; int local_c; if (*param_2 == 0) { local_c = 0; } else { local_34 = 0; local_38 = 0; while (local_58 = *(byte **)(*(long *)(param_2 + 4) + (long)local_38 * 8), local_58 != (byte *)0x0) { local_50 = (byte *)*param_1; while( true ) { bVar1 = false; if ((local_50 < param_4) && (((param_3 & 8) == 0 || ((bVar1 = false, *local_50 != 0x2c && (bVar1 = false, *local_50 != 0x3d)))))) { bVar1 = PTR_to_upper_latin1_003f0550[*local_50] == PTR_to_upper_latin1_003f0550[*local_58] ; } if (!bVar1) break; local_50 = local_50 + 1; local_58 = local_58 + 1; } if (*local_58 == 0) { while( true ) { bVar1 = false; if (local_50 < param_4) { bVar1 = *local_50 == 0x20; } if (!bVar1) break; local_50 = local_50 + 1; } if ((param_4 <= local_50) || (((param_3 & 8) != 0 && ((*local_50 == 0x2c || (*local_50 == 0x3d)))))) { *param_1 = local_50; return local_38 + 1; } } if (((param_4 <= local_50) && (((param_3 & 8) == 0 || ((*local_50 != 0x2c && (*local_50 != 0x3d)))))) && ((*local_58 == 0 || ((param_3 & 1) == 0)))) { local_34 = local_34 + 1; local_3c = local_38; local_48 = local_50; } local_38 = local_38 + 1; } if ((local_34 == 0) || ((byte *)*param_1 == param_4)) { local_c = 0; } else if ((local_34 == 1) && ((param_3 & 1) == 0)) { *param_1 = local_48; local_c = local_3c + 1; } else { local_c = -1; } } return local_c; }
45,431
ma_get_static_key
eloqsql/storage/maria/ma_search.c
uint _ma_get_static_key(MARIA_KEY *key, uint page_flag, uint nod_flag, register uchar **page) { register MARIA_KEYDEF *keyinfo= key->keyinfo; uint key_length= keyinfo->keylength; key->ref_length= keyinfo->share->rec_reflength; key->data_length= key_length - key->ref_length; key->flag= 0; if (page_flag & KEYPAGE_FLAG_HAS_TRANSID) { uchar *end= *page + keyinfo->keylength; if (key_has_transid(end-1)) { uint trans_length= transid_packed_length(end); key->ref_length+= trans_length; key_length+= trans_length; key->flag= SEARCH_PAGE_KEY_HAS_TRANSID; } } key_length+= nod_flag; memcpy(key->data, *page, key_length); *page+= key_length; return key_length - nod_flag; }
O3
c
ma_get_static_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r14d movl %esi, %eax movq 0x8(%rdi), %rdx movzwl 0xaa(%rdx), %r15d movq (%rdx), %rcx movl 0x740(%rcx), %ecx movl %ecx, 0x14(%rdi) movl %r15d, %esi subl %ecx, %esi movl %esi, 0x10(%rdi) movl $0x0, 0x18(%rdi) movq (%rbx), %rsi testb $0x2, %al je 0x56fef movzwl 0xaa(%rdx), %eax testb $0x1, -0x1(%rsi,%rax) je 0x56fef movzbl (%rsi,%rax), %eax leal -0xf8(%rax), %edx cmpl $0xf3, %eax movl $0x1, %eax cmovael %edx, %eax addl %eax, %ecx movl %ecx, 0x14(%rdi) addl %eax, %r15d movl $0x100000, 0x18(%rdi) # imm = 0x100000 movq (%rbx), %rsi addl %r15d, %r14d movq (%rdi), %rdi movq %r14, %rdx callq 0x29080 addq %r14, (%rbx) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_get_static_key: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rcx mov r14d, edx mov eax, esi mov rdx, [rdi+8] movzx r15d, word ptr [rdx+0AAh] mov rcx, [rdx] mov ecx, [rcx+740h] mov [rdi+14h], ecx mov esi, r15d sub esi, ecx mov [rdi+10h], esi mov dword ptr [rdi+18h], 0 mov rsi, [rbx] test al, 2 jz short loc_56FEF movzx eax, word ptr [rdx+0AAh] test byte ptr [rsi+rax-1], 1 jz short loc_56FEF movzx eax, byte ptr [rsi+rax] lea edx, [rax-0F8h] cmp eax, 0F3h mov eax, 1 cmovnb eax, edx add ecx, eax mov [rdi+14h], ecx add r15d, eax mov dword ptr [rdi+18h], offset xmmword_100000 mov rsi, [rbx] loc_56FEF: add r14d, r15d mov rdi, [rdi] mov rdx, r14 call _memcpy add [rbx], r14 mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_get_static_key(long long a1, char a2, int a3, long long *a4) { unsigned __int16 *v7; // rdx unsigned int v8; // r15d int v9; // ecx long long v10; // rsi long long v11; // rax unsigned int v12; // eax int v13; // edx bool v14; // cf int v15; // eax long long v16; // r14 v7 = *(unsigned __int16 **)(a1 + 8); v8 = v7[85]; v9 = *(_DWORD *)(*(_QWORD *)v7 + 1856LL); *(_DWORD *)(a1 + 20) = v9; *(_DWORD *)(a1 + 16) = v8 - v9; *(_DWORD *)(a1 + 24) = 0; v10 = *a4; if ( (a2 & 2) != 0 ) { v11 = v7[85]; if ( (*(_BYTE *)(v10 + v11 - 1) & 1) != 0 ) { v12 = *(unsigned __int8 *)(v10 + v11); v13 = v12 - 248; v14 = v12 < 0xF3; v15 = 1; if ( !v14 ) v15 = v13; *(_DWORD *)(a1 + 20) = v15 + v9; v8 += v15; *(_DWORD *)(a1 + 24) = (_DWORD)&xmmword_100000; v10 = *a4; } } v16 = v8 + a3; memcpy(*(_QWORD *)a1, v10, v16); *a4 += v16; return v8; }
_ma_get_static_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14D,EDX MOV EAX,ESI MOV RDX,qword ptr [RDI + 0x8] MOVZX R15D,word ptr [RDX + 0xaa] MOV RCX,qword ptr [RDX] MOV ECX,dword ptr [RCX + 0x740] MOV dword ptr [RDI + 0x14],ECX MOV ESI,R15D SUB ESI,ECX MOV dword ptr [RDI + 0x10],ESI MOV dword ptr [RDI + 0x18],0x0 MOV RSI,qword ptr [RBX] TEST AL,0x2 JZ 0x00156fef MOVZX EAX,word ptr [RDX + 0xaa] TEST byte ptr [RSI + RAX*0x1 + -0x1],0x1 JZ 0x00156fef MOVZX EAX,byte ptr [RSI + RAX*0x1] LEA EDX,[RAX + -0xf8] CMP EAX,0xf3 MOV EAX,0x1 CMOVNC EAX,EDX ADD ECX,EAX MOV dword ptr [RDI + 0x14],ECX ADD R15D,EAX MOV dword ptr [RDI + 0x18],0x100000 MOV RSI,qword ptr [RBX] LAB_00156fef: ADD R14D,R15D MOV RDI,qword ptr [RDI] MOV RDX,R14 CALL 0x00129080 ADD qword ptr [RBX],R14 MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
uint _ma_get_static_key(int8 *param_1,uint param_2,int param_3,long *param_4) { byte bVar1; ushort uVar2; int iVar3; long *plVar4; int iVar5; void *__src; uint uVar6; plVar4 = (long *)param_1[1]; uVar2 = *(ushort *)((long)plVar4 + 0xaa); uVar6 = (uint)uVar2; iVar3 = *(int *)(*plVar4 + 0x740); *(int *)((long)param_1 + 0x14) = iVar3; *(uint *)(param_1 + 2) = uVar6 - iVar3; *(int4 *)(param_1 + 3) = 0; __src = (void *)*param_4; if (((param_2 & 2) != 0) && ((*(byte *)((long)__src + ((ulong)*(ushort *)((long)plVar4 + 0xaa) - 1)) & 1) != 0)) { bVar1 = *(byte *)((long)__src + (ulong)*(ushort *)((long)plVar4 + 0xaa)); iVar5 = 1; if (0xf2 < bVar1) { iVar5 = bVar1 - 0xf8; } *(int *)((long)param_1 + 0x14) = iVar3 + iVar5; uVar6 = (uint)uVar2 + iVar5; *(int4 *)(param_1 + 3) = 0x100000; __src = (void *)*param_4; } memcpy((void *)*param_1,__src,(ulong)(param_3 + uVar6)); *param_4 = *param_4 + (ulong)(param_3 + uVar6); return uVar6; }
45,432
(anonymous namespace)::IsValidURISchemeFormat(char const*)
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_plugin.cc
bool IsValidURISchemeFormat(const char* prefix) { int len; // prefix is NULL or empty if (prefix == nullptr || !(len = std::strlen(prefix))) { return false; } // first character must be a letter if (!std::isalpha(prefix[0])) { return false; } for (int i = 1; i < len; i++) { // each following character must be a letter, digit, '+', '.', or '-' if (!std::isalnum(prefix[i]) && (prefix[i] != '+') && (prefix[i] != '.') && (prefix[i] != '-')) { return false; } } return true; }
O0
cpp
(anonymous namespace)::IsValidURISchemeFormat(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) je 0xe80e4 movq 0x8(%rsp), %rdi callq 0x4a0e0 movl %eax, 0x4(%rsp) cmpl $0x0, %eax jne 0xe80ee movb $0x0, 0x17(%rsp) jmp 0xe817d movq 0x8(%rsp), %rax movsbl (%rax), %edi callq 0x4a0f0 cmpl $0x0, %eax jne 0xe8107 movb $0x0, 0x17(%rsp) jmp 0xe817d movl $0x1, (%rsp) movl (%rsp), %eax cmpl 0x4(%rsp), %eax jge 0xe8178 movq 0x8(%rsp), %rax movslq (%rsp), %rcx movsbl (%rax,%rcx), %edi callq 0x4a100 cmpl $0x0, %eax jne 0xe816b movq 0x8(%rsp), %rax movslq (%rsp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2b, %eax je 0xe816b movq 0x8(%rsp), %rax movslq (%rsp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2e, %eax je 0xe816b movq 0x8(%rsp), %rax movslq (%rsp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2d, %eax je 0xe816b movb $0x0, 0x17(%rsp) jmp 0xe817d jmp 0xe816d movl (%rsp), %eax addl $0x1, %eax movl %eax, (%rsp) jmp 0xe810e movb $0x1, 0x17(%rsp) movb 0x17(%rsp), %al andb $0x1, %al addq $0x18, %rsp retq nopl (%rax,%rax)
_ZN12_GLOBAL__N_122IsValidURISchemeFormatEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi cmp [rsp+18h+var_10], 0 jz short loc_E80E4 mov rdi, [rsp+18h+var_10] call _strlen mov [rsp+18h+var_14], eax cmp eax, 0 jnz short loc_E80EE loc_E80E4: mov [rsp+18h+var_1], 0 jmp loc_E817D loc_E80EE: mov rax, [rsp+18h+var_10] movsx edi, byte ptr [rax] call _isalpha cmp eax, 0 jnz short loc_E8107 mov [rsp+18h+var_1], 0 jmp short loc_E817D loc_E8107: mov [rsp+18h+var_18], 1 loc_E810E: mov eax, [rsp+18h+var_18] cmp eax, [rsp+18h+var_14] jge short loc_E8178 mov rax, [rsp+18h+var_10] movsxd rcx, [rsp+18h+var_18] movsx edi, byte ptr [rax+rcx] call _isalnum cmp eax, 0 jnz short loc_E816B mov rax, [rsp+18h+var_10] movsxd rcx, [rsp+18h+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 2Bh ; '+' jz short loc_E816B mov rax, [rsp+18h+var_10] movsxd rcx, [rsp+18h+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 2Eh ; '.' jz short loc_E816B mov rax, [rsp+18h+var_10] movsxd rcx, [rsp+18h+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 2Dh ; '-' jz short loc_E816B mov [rsp+18h+var_1], 0 jmp short loc_E817D loc_E816B: jmp short $+2 loc_E816D: mov eax, [rsp+18h+var_18] add eax, 1 mov [rsp+18h+var_18], eax jmp short loc_E810E loc_E8178: mov [rsp+18h+var_1], 1 loc_E817D: mov al, [rsp+18h+var_1] and al, 1 add rsp, 18h retn
char `anonymous namespace'::IsValidURISchemeFormat(_anonymous_namespace_ *this, const char *a2) { int i; // [rsp+0h] [rbp-18h] int v4; // [rsp+4h] [rbp-14h] if ( !this ) return 0; v4 = strlen(this, a2); if ( !v4 ) return 0; if ( !(unsigned int)isalpha((unsigned int)*(char *)this) ) return 0; for ( i = 1; i < v4; ++i ) { if ( !(unsigned int)isalnum((unsigned int)*((char *)this + i)) && *((_BYTE *)this + i) != 43 && *((_BYTE *)this + i) != 46 && *((_BYTE *)this + i) != 45 ) { return 0; } } return 1; }
IsValidURISchemeFormat: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI CMP qword ptr [RSP + 0x8],0x0 JZ 0x001e80e4 MOV RDI,qword ptr [RSP + 0x8] CALL 0x0014a0e0 MOV dword ptr [RSP + 0x4],EAX CMP EAX,0x0 JNZ 0x001e80ee LAB_001e80e4: MOV byte ptr [RSP + 0x17],0x0 JMP 0x001e817d LAB_001e80ee: MOV RAX,qword ptr [RSP + 0x8] MOVSX EDI,byte ptr [RAX] CALL 0x0014a0f0 CMP EAX,0x0 JNZ 0x001e8107 MOV byte ptr [RSP + 0x17],0x0 JMP 0x001e817d LAB_001e8107: MOV dword ptr [RSP],0x1 LAB_001e810e: MOV EAX,dword ptr [RSP] CMP EAX,dword ptr [RSP + 0x4] JGE 0x001e8178 MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP] MOVSX EDI,byte ptr [RAX + RCX*0x1] CALL 0x0014a100 CMP EAX,0x0 JNZ 0x001e816b MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2b JZ 0x001e816b MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2e JZ 0x001e816b MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2d JZ 0x001e816b MOV byte ptr [RSP + 0x17],0x0 JMP 0x001e817d LAB_001e816b: JMP 0x001e816d LAB_001e816d: MOV EAX,dword ptr [RSP] ADD EAX,0x1 MOV dword ptr [RSP],EAX JMP 0x001e810e LAB_001e8178: MOV byte ptr [RSP + 0x17],0x1 LAB_001e817d: MOV AL,byte ptr [RSP + 0x17] AND AL,0x1 ADD RSP,0x18 RET
/* (anonymous namespace)::IsValidURISchemeFormat(char const*) */ int1 (anonymous_namespace)::IsValidURISchemeFormat(char *param_1) { int iVar1; size_t sVar2; int local_18; if (param_1 != (char *)0x0) { sVar2 = strlen(param_1); if ((int)sVar2 != 0) { iVar1 = isalpha((int)*param_1); if (iVar1 == 0) { return 0; } local_18 = 1; while( true ) { if ((int)sVar2 <= local_18) { return 1; } iVar1 = isalnum((int)param_1[local_18]); if ((((iVar1 == 0) && (param_1[local_18] != '+')) && (param_1[local_18] != '.')) && (param_1[local_18] != '-')) break; local_18 = local_18 + 1; } return 0; } } return 0; }
45,433
fmt::v8::appender fmt::v8::detail::write_float<fmt::v8::appender, fmt::v8::detail::dragonbox::decimal_fp<float>, char>(fmt::v8::appender, fmt::v8::detail::dragonbox::decimal_fp<float> const&, fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::float_specs, char)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/format.h
auto write_float(OutputIt out, const DecimalFP& fp, const basic_format_specs<Char>& specs, float_specs fspecs, Char decimal_point) -> OutputIt { auto significand = fp.significand; int significand_size = get_significand_size(fp); static const Char zero = static_cast<Char>('0'); auto sign = fspecs.sign; size_t size = to_unsigned(significand_size) + (sign ? 1 : 0); using iterator = reserve_iterator<OutputIt>; int output_exp = fp.exponent + significand_size - 1; auto use_exp_format = [=]() { if (fspecs.format == float_format::exp) return true; if (fspecs.format != float_format::general) return false; // Use the fixed notation if the exponent is in [exp_lower, exp_upper), // e.g. 0.0001 instead of 1e-04. Otherwise use the exponent notation. const int exp_lower = -4, exp_upper = 16; return output_exp < exp_lower || output_exp >= (fspecs.precision > 0 ? fspecs.precision : exp_upper); }; if (use_exp_format()) { int num_zeros = 0; if (fspecs.showpoint) { num_zeros = fspecs.precision - significand_size; if (num_zeros < 0) num_zeros = 0; size += to_unsigned(num_zeros); } else if (significand_size == 1) { decimal_point = Char(); } auto abs_output_exp = output_exp >= 0 ? output_exp : -output_exp; int exp_digits = 2; if (abs_output_exp >= 100) exp_digits = abs_output_exp >= 1000 ? 4 : 3; size += to_unsigned((decimal_point ? 1 : 0) + 2 + exp_digits); char exp_char = fspecs.upper ? 'E' : 'e'; auto write = [=](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); // Insert a decimal point after the first digit and add an exponent. it = write_significand(it, significand, significand_size, 1, decimal_point); if (num_zeros > 0) it = detail::fill_n(it, num_zeros, zero); *it++ = static_cast<Char>(exp_char); return write_exponent<Char>(output_exp, it); }; return specs.width > 0 ? write_padded<align::right>(out, specs, size, write) : base_iterator(out, write(reserve(out, size))); } int exp = fp.exponent + significand_size; if (fp.exponent >= 0) { // 1234e5 -> 123400000[.0+] size += to_unsigned(fp.exponent); int num_zeros = fspecs.precision - exp; #ifdef FMT_FUZZ if (num_zeros > 5000) throw std::runtime_error("fuzz mode - avoiding excessive cpu use"); #endif if (fspecs.showpoint) { if (num_zeros <= 0 && fspecs.format != float_format::fixed) num_zeros = 1; if (num_zeros > 0) size += to_unsigned(num_zeros) + 1; } return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); it = write_significand<Char>(it, significand, significand_size); it = detail::fill_n(it, fp.exponent, zero); if (!fspecs.showpoint) return it; *it++ = decimal_point; return num_zeros > 0 ? detail::fill_n(it, num_zeros, zero) : it; }); } else if (exp > 0) { // 1234e-2 -> 12.34[0+] int num_zeros = fspecs.showpoint ? fspecs.precision - significand_size : 0; size += 1 + to_unsigned(num_zeros > 0 ? num_zeros : 0); return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); it = write_significand(it, significand, significand_size, exp, decimal_point); return num_zeros > 0 ? detail::fill_n(it, num_zeros, zero) : it; }); } // 1234e-6 -> 0.001234 int num_zeros = -exp; if (significand_size == 0 && fspecs.precision >= 0 && fspecs.precision < num_zeros) { num_zeros = fspecs.precision; } bool pointy = num_zeros != 0 || significand_size != 0 || fspecs.showpoint; size += 1 + (pointy ? 1 : 0) + to_unsigned(num_zeros); return write_padded<align::right>(out, specs, size, [&](iterator it) { if (sign) *it++ = static_cast<Char>(data::signs[sign]); *it++ = zero; if (!pointy) return it; *it++ = decimal_point; it = detail::fill_n(it, num_zeros, zero); return write_significand<Char>(it, significand, significand_size); }); }
O3
c
fmt::v8::appender fmt::v8::detail::write_float<fmt::v8::appender, fmt::v8::detail::dragonbox::decimal_fp<float>, char>(fmt::v8::appender, fmt::v8::detail::dragonbox::decimal_fp<float> const&, fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::float_specs, char): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %rcx, %rax movq %rdi, %r9 movq %rcx, 0x28(%rsp) movb %r8b, 0xa(%rsp) movq (%rsi), %rbx movq %rbx, 0x18(%rsp) movl 0x8(%rsi), %r10d movl %r10d, 0x14(%rsp) movq %rcx, %rdi shrq $0x20, %rdi movq %rcx, %r14 shrq $0x28, %r14 movl $0xff, %ebp xorl %ecx, %ecx andl %ebp, %r14d movl %r14d, 0x10(%rsp) setne %cl addl %r10d, %ecx movl 0xc(%rsi), %r15d leal (%r15,%r10), %r11d cmpb $0x1, %dil je 0x2ecd0 andl %edi, %ebp jne 0x2ec8a testl %eax, %eax movl $0x10, %ebp cmovgl %eax, %ebp cmpl $-0x3, %r11d jl 0x2ecd0 cmpl %ebp, %r11d jg 0x2ecd0 movl %r11d, 0x24(%rsp) testl %r15d, %r15d js 0x2ed95 addq %r15, %rcx subl %r11d, %eax movl %eax, 0xc(%rsp) btl $0x14, %edi jae 0x2ee14 testl %eax, %eax setg %r8b cmpb $0x2, %dil sete %dil orb %r8b, %dil je 0x2edff testl %eax, %eax jg 0x2ee0c jmp 0x2ee14 leal (%r15,%r10), %esi decl %esi btl $0x14, %edi jb 0x2eced xorl %r15d, %r15d cmpl $0x1, %r10d movzbl %r8b, %r8d cmovel %r15d, %r8d jmp 0x2ecfc subl %r10d, %eax xorl %r15d, %r15d testl %eax, %eax cmovgl %eax, %r15d addq %r15, %rcx btl $0x10, %edi setae %al shlb $0x5, %al orb $0x45, %al movl %r14d, 0x30(%rsp) movq %rbx, 0x38(%rsp) movl %r10d, 0x40(%rsp) movb %r8b, 0x44(%rsp) movl %r15d, 0x48(%rsp) movb %al, 0x4c(%rsp) movl %esi, 0x50(%rsp) cmpl $0x0, (%rdx) jle 0x2ed83 cmpb $0x1, %r8b movl $0x3, %eax sbbq $0x0, %rax movl $0x1, %edi subl %r11d, %edi testl %r11d, %r11d cmovlel %edi, %esi xorl %edi, %edi cmpl $0x3e8, %esi # imm = 0x3E8 setge %dil addq $0x3, %rdi cmpl $0x64, %esi movl $0x2, %esi cmovgeq %rdi, %rsi addq %rax, %rcx addq %rsi, %rcx leaq 0x30(%rsp), %r8 movq %r9, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x2f0a5 jmp 0x2ee60 leaq 0x30(%rsp), %rdi movq %r9, %rsi callq 0x2ef94 jmp 0x2ee60 testl %r11d, %r11d jle 0x2ee6b shll $0xb, %edi sarl $0x1f, %edi subl %r10d, %eax xorl %esi, %esi andl %edi, %eax leaq 0xc(%rsp), %rdi movl %eax, (%rdi) cmovlel %esi, %eax leaq 0x1(%rax,%rcx), %rcx leaq 0x10(%rsp), %rax leaq 0x30(%rsp), %r8 movq %rax, (%r8) leaq 0x18(%rsp), %rax movq %rax, 0x8(%r8) leaq 0x14(%rsp), %rax movq %rax, 0x10(%r8) leaq 0x24(%rsp), %rax movq %rax, 0x18(%r8) leaq 0xa(%rsp), %rax movq %rax, 0x20(%r8) movq %rdi, 0x28(%r8) movq %r9, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x2f2ab jmp 0x2ee60 movl $0x1, 0xc(%rsp) movl $0x1, %eax movl %eax, %eax addq %rax, %rcx incq %rcx leaq 0x10(%rsp), %rax leaq 0x30(%rsp), %r8 movq %rax, (%r8) leaq 0x18(%rsp), %rax movq %rax, 0x8(%r8) leaq 0x14(%rsp), %rax movq %rax, 0x10(%r8) movq %rsi, 0x18(%r8) leaq 0x28(%rsp), %rax movq %rax, 0x20(%r8) leaq 0xa(%rsp), %rax movq %rax, 0x28(%r8) leaq 0xc(%rsp), %rax movq %rax, 0x30(%r8) movq %r9, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x2f13f addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq negl %r11d cmpl %r11d, %eax movl %r11d, %esi cmovll %eax, %esi testl %eax, %eax cmovsl %r11d, %esi testl %r10d, %r10d cmovnel %r11d, %esi movl %esi, 0xc(%rsp) orl %esi, %r10d je 0x2ee94 movb $0x1, 0xb(%rsp) jmp 0x2eeac andl $0x100000, %edi # imm = 0x100000 movl %edi, %eax shrl $0x14, %eax movb %al, 0xb(%rsp) movl $0x1, %eax testl %edi, %edi je 0x2eeb1 movl $0x2, %eax addl %esi, %eax addq %rcx, %rax leaq 0x10(%rsp), %rcx leaq 0x30(%rsp), %r8 movq %rcx, (%r8) leaq 0xb(%rsp), %rcx movq %rcx, 0x8(%r8) leaq 0xa(%rsp), %rcx movq %rcx, 0x10(%r8) leaq 0xc(%rsp), %rcx movq %rcx, 0x18(%r8) leaq 0x18(%rsp), %rcx movq %rcx, 0x20(%r8) leaq 0x14(%rsp), %rcx movq %rcx, 0x28(%r8) movq %r9, %rdi movq %rdx, %rsi movq %rax, %rdx movq %rax, %rcx callq 0x2f42a jmp 0x2ee60
_ZN3fmt2v86detail11write_floatINS0_8appenderENS1_14big_decimal_fpEcEET_S5_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsESA_: push rbp push r15 push r14 push rbx sub rsp, 68h mov rax, rcx mov r9, rdi mov [rsp+88h+var_60], rcx mov [rsp+88h+var_7E], r8b mov rbx, [rsi] mov [rsp+88h+var_70], rbx mov r10d, [rsi+8] mov [rsp+88h+var_74], r10d mov rdi, rcx shr rdi, 20h mov r14, rcx shr r14, 28h mov ebp, 0FFh xor ecx, ecx and r14d, ebp mov [rsp+88h+var_78], r14d setnz cl add ecx, r10d mov r15d, [rsi+0Ch] lea r11d, [r15+r10] cmp dil, 1 jz short loc_2ECD0 and ebp, edi jnz short loc_2EC8A test eax, eax mov ebp, 10h cmovg ebp, eax cmp r11d, 0FFFFFFFDh jl short loc_2ECD0 cmp r11d, ebp jg short loc_2ECD0 loc_2EC8A: mov [rsp+88h+var_64], r11d test r15d, r15d js loc_2ED95 add rcx, r15 sub eax, r11d mov [rsp+88h+var_7C], eax bt edi, 14h jnb loc_2EE14 test eax, eax setnle r8b cmp dil, 2 setz dil or dil, r8b jz loc_2EDFF test eax, eax jg loc_2EE0C jmp loc_2EE14 loc_2ECD0: lea esi, [r15+r10] dec esi bt edi, 14h jb short loc_2ECED xor r15d, r15d cmp r10d, 1 movzx r8d, r8b cmovz r8d, r15d jmp short loc_2ECFC loc_2ECED: sub eax, r10d xor r15d, r15d test eax, eax cmovg r15d, eax add rcx, r15 loc_2ECFC: bt edi, 10h setnb al shl al, 5 or al, 45h mov [rsp+88h+var_58], r14d mov [rsp+88h+var_50], rbx mov [rsp+88h+var_48], r10d mov [rsp+88h+var_44], r8b mov [rsp+88h+var_40], r15d mov [rsp+88h+var_3C], al mov [rsp+88h+var_38], esi cmp dword ptr [rdx], 0 jle short loc_2ED83 cmp r8b, 1 mov eax, 3 sbb rax, 0 mov edi, 1 sub edi, r11d test r11d, r11d cmovle esi, edi xor edi, edi cmp esi, 3E8h setnl dil add rdi, 3 cmp esi, 64h ; 'd' mov esi, 2 cmovge rsi, rdi add rcx, rax add rcx, rsi lea r8, [rsp+88h+var_58] mov rdi, r9 mov rsi, rdx mov rdx, rcx call _ZN3fmt2v86detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_11write_floatIS5_NS1_14big_decimal_fpEcEET_S8_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsESD_EUlS5_E_EES9_S9_SG_mmOT2_; fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#1} &>(fmt::v8::detail::big_decimal_fp,fmt::v8::basic_format_specs<char> const&,ulong,ulong,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#1} &) jmp loc_2EE60 loc_2ED83: lea rdi, [rsp+88h+var_58] mov rsi, r9 call _ZZN3fmt2v86detail11write_floatINS0_8appenderENS1_14big_decimal_fpEcEET_S5_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsESA_ENKUlS3_E_clES3_; fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#1}::operator()(fmt::v8::appender) jmp loc_2EE60 loc_2ED95: test r11d, r11d jle loc_2EE6B shl edi, 0Bh sar edi, 1Fh sub eax, r10d xor esi, esi and eax, edi lea rdi, [rsp+88h+var_7C] mov [rdi], eax cmovle eax, esi lea rcx, [rax+rcx+1] lea rax, [rsp+88h+var_78] lea r8, [rsp+88h+var_58] mov [r8], rax lea rax, [rsp+88h+var_70] mov [r8+8], rax lea rax, [rsp+88h+var_74] mov [r8+10h], rax lea rax, [rsp+88h+var_64] mov [r8+18h], rax lea rax, [rsp+88h+var_7E] mov [r8+20h], rax mov [r8+28h], rdi mov rdi, r9 mov rsi, rdx mov rdx, rcx call _ZN3fmt2v86detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_11write_floatIS5_NS1_14big_decimal_fpEcEET_S8_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsESD_EUlS5_E1_EES9_S9_SG_mmOT2_; fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#3} &>(fmt::v8::detail::big_decimal_fp,fmt::v8::basic_format_specs<char> const&,ulong,ulong,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#3} &) jmp short loc_2EE60 loc_2EDFF: mov [rsp+88h+var_7C], 1 mov eax, 1 loc_2EE0C: mov eax, eax add rcx, rax inc rcx loc_2EE14: lea rax, [rsp+88h+var_78] lea r8, [rsp+88h+var_58] mov [r8], rax lea rax, [rsp+88h+var_70] mov [r8+8], rax lea rax, [rsp+88h+var_74] mov [r8+10h], rax mov [r8+18h], rsi lea rax, [rsp+88h+var_60] mov [r8+20h], rax lea rax, [rsp+88h+var_7E] mov [r8+28h], rax lea rax, [rsp+88h+var_7C] mov [r8+30h], rax mov rdi, r9 mov rsi, rdx mov rdx, rcx call _ZN3fmt2v86detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_11write_floatIS5_NS1_14big_decimal_fpEcEET_S8_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsESD_EUlS5_E0_EES9_S9_SG_mmOT2_; fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#2} &>(fmt::v8::detail::big_decimal_fp,fmt::v8::basic_format_specs<char> const&,ulong,ulong,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#2} &) loc_2EE60: add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_2EE6B: neg r11d cmp eax, r11d mov esi, r11d cmovl esi, eax test eax, eax cmovs esi, r11d test r10d, r10d cmovnz esi, r11d mov [rsp+88h+var_7C], esi or r10d, esi jz short loc_2EE94 mov [rsp+88h+var_7D], 1 jmp short loc_2EEAC loc_2EE94: and edi, 100000h mov eax, edi shr eax, 14h mov [rsp+88h+var_7D], al mov eax, 1 test edi, edi jz short loc_2EEB1 loc_2EEAC: mov eax, 2 loc_2EEB1: add eax, esi add rax, rcx lea rcx, [rsp+88h+var_78] lea r8, [rsp+88h+var_58] mov [r8], rcx lea rcx, [rsp+88h+var_7D] mov [r8+8], rcx lea rcx, [rsp+88h+var_7E] mov [r8+10h], rcx lea rcx, [rsp+88h+var_7C] mov [r8+18h], rcx lea rcx, [rsp+88h+var_70] mov [r8+20h], rcx lea rcx, [rsp+88h+var_74] mov [r8+28h], rcx mov rdi, r9 mov rsi, rdx mov rdx, rax mov rcx, rax call _ZN3fmt2v86detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_11write_floatIS5_NS1_14big_decimal_fpEcEET_S8_RKT0_RKNS0_18basic_format_specsIT1_EENS1_11float_specsESD_EUlS5_E2_EES9_S9_SG_mmOT2_; fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#4} &>(fmt::v8::detail::big_decimal_fp,fmt::v8::basic_format_specs<char> const&,ulong,ulong,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#4} &) jmp loc_2EE60
long long fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>( long long a1, int *a2, int *a3, unsigned long long a4, char a5) { int v5; // eax char *v7; // rbx int v8; // r10d unsigned long long v9; // rdi int v10; // r14d long long v11; // rcx long long v12; // r15 int v13; // r11d int v14; // ebp long long v15; // rcx int v16; // eax int v17; // esi long long v18; // r15 int v19; // eax long long v20; // rdi bool v21; // cc long long v22; // rsi long long v24; // rax int v25; // r11d int v26; // esi unsigned int v27; // edi int v28; // eax char v29; // [rsp+Ah] [rbp-7Eh] BYREF char v30; // [rsp+Bh] [rbp-7Dh] BYREF int v31; // [rsp+Ch] [rbp-7Ch] BYREF int v32; // [rsp+10h] [rbp-78h] BYREF int v33; // [rsp+14h] [rbp-74h] BYREF char *v34; // [rsp+18h] [rbp-70h] BYREF int v35; // [rsp+24h] [rbp-64h] BYREF unsigned long long v36; // [rsp+28h] [rbp-60h] BYREF int *v37; // [rsp+30h] [rbp-58h] BYREF char *v38; // [rsp+38h] [rbp-50h] int *v39; // [rsp+40h] [rbp-48h] int *v40; // [rsp+48h] [rbp-40h] long long *v41; // [rsp+50h] [rbp-38h] int *v42; // [rsp+58h] [rbp-30h] int *v43; // [rsp+60h] [rbp-28h] v5 = a4; v36 = a4; v29 = a5; v7 = *(char **)a2; v34 = *(char **)a2; v8 = a2[2]; v33 = v8; v9 = HIDWORD(a4); v10 = BYTE5(a4); v32 = BYTE5(a4); v11 = v8 + (unsigned int)(BYTE5(a4) != 0); v12 = (unsigned int)a2[3]; v13 = v12 + v8; if ( (_BYTE)v9 != 1 ) { if ( (_BYTE)v9 ) goto LABEL_7; v14 = 16; if ( v5 > 0 ) v14 = v5; if ( v13 >= -3 && v13 <= v14 ) { LABEL_7: v35 = v12 + v8; if ( (int)v12 >= 0 ) { v15 = v12 + v11; v16 = v5 - v13; v31 = v16; if ( (v9 & 0x100000) != 0 ) { if ( v16 > 0 || (_BYTE)v9 == 2 ) { if ( v16 <= 0 ) goto LABEL_32; } else { v31 = 1; v16 = 1; } v15 += (unsigned int)v16 + 1LL; } LABEL_32: v37 = &v32; v38 = (char *)&v34; v39 = &v33; v40 = a2; v41 = (long long *)&v36; v42 = (int *)&v29; v43 = &v31; return fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::appender fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#2} &>( a1, a3, v15); } if ( v13 > 0 ) { v24 = ((int)((_DWORD)v9 << 11) >> 31) & (unsigned int)(v5 - v8); v31 = v24; if ( (int)v24 <= 0 ) v24 = 0LL; v37 = &v32; v38 = (char *)&v34; v39 = &v33; v40 = &v35; v41 = (long long *)&v29; v42 = &v31; return fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::appender fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#3} &>( a1, a3, v24 + v11 + 1); } v25 = -v13; v26 = v25; if ( v5 < v25 ) v26 = v5; if ( v5 < 0 ) v26 = v25; if ( v8 ) v26 = v25; v31 = v26; if ( v26 | v8 ) { v30 = 1; } else { v27 = v9 & 0x100000; v30 = v27 >> 20; v28 = 1; if ( !v27 ) { LABEL_43: v37 = &v32; v38 = &v30; v39 = (int *)&v29; v40 = &v31; v41 = (long long *)&v34; v42 = &v33; return fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::appender fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#4} &>( a1, a3, v11 + (unsigned int)(v26 + v28), v11 + (unsigned int)(v26 + v28)); } } v28 = 2; goto LABEL_43; } } v17 = v12 + v8 - 1; if ( (v9 & 0x100000) != 0 ) { v19 = v5 - v8; v18 = 0LL; if ( v19 > 0 ) v18 = (unsigned int)v19; v11 += v18; } else { LODWORD(v18) = 0; if ( v8 == 1 ) a5 = 0; } LODWORD(v37) = v10; v38 = v7; LODWORD(v39) = v8; BYTE4(v39) = a5; LODWORD(v40) = v18; BYTE4(v40) = (32 * ((v9 & 0x10000) == 0)) | 0x45; LODWORD(v41) = v17; if ( *a3 <= 0 ) return fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#1}::operator()( &v37, a1, a3, v11); if ( v13 <= 0 ) v17 = 1 - v13; v20 = (v17 >= 1000) + 3LL; v21 = v17 < 100; v22 = 2LL; if ( !v21 ) v22 = v20; return fmt::v8::detail::write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::appender fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp const&,fmt::v8::basic_format_specs<char> const&,fmt::v8::detail::float_specs,char)::{lambda(fmt::v8::appender)#1} &>( a1, a3, v22 + 3LL - (a5 == 0) + v11, v22 + 3LL - (a5 == 0) + v11, &v37); }
write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV RAX,RCX MOV R9,RDI MOV qword ptr [RSP + 0x28],RCX MOV byte ptr [RSP + 0xa],R8B MOV RBX,qword ptr [RSI] MOV qword ptr [RSP + 0x18],RBX MOV R10D,dword ptr [RSI + 0x8] MOV dword ptr [RSP + 0x14],R10D MOV RDI,RCX SHR RDI,0x20 MOV R14,RCX SHR R14,0x28 MOV EBP,0xff XOR ECX,ECX AND R14D,EBP MOV dword ptr [RSP + 0x10],R14D SETNZ CL ADD ECX,R10D MOV R15D,dword ptr [RSI + 0xc] LEA R11D,[R15 + R10*0x1] CMP DIL,0x1 JZ 0x0012ecd0 AND EBP,EDI JNZ 0x0012ec8a TEST EAX,EAX MOV EBP,0x10 CMOVG EBP,EAX CMP R11D,-0x3 JL 0x0012ecd0 CMP R11D,EBP JG 0x0012ecd0 LAB_0012ec8a: MOV dword ptr [RSP + 0x24],R11D TEST R15D,R15D JS 0x0012ed95 ADD RCX,R15 SUB EAX,R11D MOV dword ptr [RSP + 0xc],EAX BT EDI,0x14 JNC 0x0012ee14 TEST EAX,EAX SETG R8B CMP DIL,0x2 SETZ DIL OR DIL,R8B JZ 0x0012edff TEST EAX,EAX JG 0x0012ee0c JMP 0x0012ee14 LAB_0012ecd0: LEA ESI,[R15 + R10*0x1] DEC ESI BT EDI,0x14 JC 0x0012eced XOR R15D,R15D CMP R10D,0x1 MOVZX R8D,R8B CMOVZ R8D,R15D JMP 0x0012ecfc LAB_0012eced: SUB EAX,R10D XOR R15D,R15D TEST EAX,EAX CMOVG R15D,EAX ADD RCX,R15 LAB_0012ecfc: BT EDI,0x10 SETNC AL SHL AL,0x5 OR AL,0x45 MOV dword ptr [RSP + 0x30],R14D MOV qword ptr [RSP + 0x38],RBX MOV dword ptr [RSP + 0x40],R10D MOV byte ptr [RSP + 0x44],R8B MOV dword ptr [RSP + 0x48],R15D MOV byte ptr [RSP + 0x4c],AL MOV dword ptr [RSP + 0x50],ESI CMP dword ptr [RDX],0x0 JLE 0x0012ed83 CMP R8B,0x1 MOV EAX,0x3 SBB RAX,0x0 MOV EDI,0x1 SUB EDI,R11D TEST R11D,R11D CMOVLE ESI,EDI XOR EDI,EDI CMP ESI,0x3e8 SETGE DIL ADD RDI,0x3 CMP ESI,0x64 MOV ESI,0x2 CMOVGE RSI,RDI ADD RCX,RAX ADD RCX,RSI LEA R8,[RSP + 0x30] MOV RDI,R9 MOV RSI,RDX MOV RDX,RCX CALL 0x0012f0a5 JMP 0x0012ee60 LAB_0012ed83: LEA RDI,[RSP + 0x30] MOV RSI,R9 CALL 0x0012ef94 JMP 0x0012ee60 LAB_0012ed95: TEST R11D,R11D JLE 0x0012ee6b SHL EDI,0xb SAR EDI,0x1f SUB EAX,R10D XOR ESI,ESI AND EAX,EDI LEA RDI,[RSP + 0xc] MOV dword ptr [RDI],EAX CMOVLE EAX,ESI LEA RCX,[RAX + RCX*0x1 + 0x1] LEA RAX,[RSP + 0x10] LEA R8,[RSP + 0x30] MOV qword ptr [R8],RAX LEA RAX,[RSP + 0x18] MOV qword ptr [R8 + 0x8],RAX LEA RAX,[RSP + 0x14] MOV qword ptr [R8 + 0x10],RAX LEA RAX,[RSP + 0x24] MOV qword ptr [R8 + 0x18],RAX LEA RAX,[RSP + 0xa] MOV qword ptr [R8 + 0x20],RAX MOV qword ptr [R8 + 0x28],RDI MOV RDI,R9 MOV RSI,RDX MOV RDX,RCX CALL 0x0012f2ab JMP 0x0012ee60 LAB_0012edff: MOV dword ptr [RSP + 0xc],0x1 MOV EAX,0x1 LAB_0012ee0c: MOV EAX,EAX ADD RCX,RAX INC RCX LAB_0012ee14: LEA RAX,[RSP + 0x10] LEA R8,[RSP + 0x30] MOV qword ptr [R8],RAX LEA RAX,[RSP + 0x18] MOV qword ptr [R8 + 0x8],RAX LEA RAX,[RSP + 0x14] MOV qword ptr [R8 + 0x10],RAX MOV qword ptr [R8 + 0x18],RSI LEA RAX,[RSP + 0x28] MOV qword ptr [R8 + 0x20],RAX LEA RAX,[RSP + 0xa] MOV qword ptr [R8 + 0x28],RAX LEA RAX,[RSP + 0xc] MOV qword ptr [R8 + 0x30],RAX MOV RDI,R9 MOV RSI,RDX MOV RDX,RCX CALL 0x0012f13f LAB_0012ee60: ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_0012ee6b: NEG R11D CMP EAX,R11D MOV ESI,R11D CMOVL ESI,EAX TEST EAX,EAX CMOVS ESI,R11D TEST R10D,R10D CMOVNZ ESI,R11D MOV dword ptr [RSP + 0xc],ESI OR R10D,ESI JZ 0x0012ee94 MOV byte ptr [RSP + 0xb],0x1 JMP 0x0012eeac LAB_0012ee94: AND EDI,0x100000 MOV EAX,EDI SHR EAX,0x14 MOV byte ptr [RSP + 0xb],AL MOV EAX,0x1 TEST EDI,EDI JZ 0x0012eeb1 LAB_0012eeac: MOV EAX,0x2 LAB_0012eeb1: ADD EAX,ESI ADD RAX,RCX LEA RCX,[RSP + 0x10] LEA R8,[RSP + 0x30] MOV qword ptr [R8],RCX LEA RCX,[RSP + 0xb] MOV qword ptr [R8 + 0x8],RCX LEA RCX,[RSP + 0xa] MOV qword ptr [R8 + 0x10],RCX LEA RCX,[RSP + 0xc] MOV qword ptr [R8 + 0x18],RCX LEA RCX,[RSP + 0x18] MOV qword ptr [R8 + 0x20],RCX LEA RCX,[RSP + 0x14] MOV qword ptr [R8 + 0x28],RCX MOV RDI,R9 MOV RSI,RDX MOV RDX,RAX MOV RCX,RAX CALL 0x0012f42a JMP 0x0012ee60
/* fmt::v8::appender fmt::v8::detail::write_float<fmt::v8::appender, fmt::v8::detail::big_decimal_fp, char>(fmt::v8::appender, fmt::v8::detail::big_decimal_fp const&, fmt::v8::basic_format_specs<char> const&, fmt::v8::detail::float_specs, char) */ void fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char> (int8 param_1,int8 *param_2,int *param_3,ulong param_4,ulong param_5) { uint uVar1; uint uVar2; ulong uVar3; long lVar4; ulong uVar5; uint uVar6; int iVar7; char cVar8; ulong uVar9; uint uVar10; char local_7e; int1 local_7d; uint local_7c; uint local_78; int local_74; int8 local_70; int local_64; ulong local_60; int8 local_58; int8 *local_50; int8 local_48; int8 local_40; ulong *local_38; uint *local_30; uint *local_28; local_7e = (char)param_5; local_70 = *param_2; local_74 = *(int *)(param_2 + 1); uVar1 = (uint)(param_4 >> 0x20); local_78 = uVar1 >> 8 & 0xff; uVar5 = (ulong)((uint)(local_78 != 0) + local_74); uVar10 = *(uint *)((long)param_2 + 0xc); local_64 = uVar10 + local_74; cVar8 = (char)(param_4 >> 0x20); uVar2 = (uint)param_4; local_60 = param_4; if (cVar8 == '\x01') { LAB_0012ecd0: iVar7 = uVar10 + local_74 + -1; if ((uVar1 >> 0x14 & 1) == 0) { uVar3 = 0; uVar9 = param_5 & 0xff; if (local_74 == 1) { uVar9 = uVar3; } cVar8 = (char)uVar9; } else { uVar3 = 0; if (0 < (int)(uVar2 - local_74)) { uVar3 = (ulong)(uVar2 - local_74); } uVar5 = uVar5 + uVar3; cVar8 = local_7e; } local_58 = (uint *)(CONCAT44(local_58._4_4_,uVar1 >> 8) & 0xffffffff000000ff); local_48._0_5_ = CONCAT14(cVar8,local_74); local_40 = (uint *)(CONCAT35(local_40._5_3_,CONCAT14(((uVar1 >> 0x10 & 1) == 0) << 5,(int)uVar3) ) | 0x4500000000); local_38 = (ulong *)CONCAT44(local_38._4_4_,iVar7); local_50 = (int8 *)local_70; if (0 < *param_3) { if (local_64 < 1) { iVar7 = 1 - local_64; } lVar4 = 2; if (99 < iVar7) { lVar4 = (ulong)(999 < iVar7) + 3; } lVar4 = uVar5 + (3 - (ulong)(cVar8 == '\0')) + lVar4; write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp_const&,fmt::v8::basic_format_specs<char>const&,fmt::v8::detail::float_specs,char)::_lambda(fmt::v8::appender)_1_&> (param_1,param_3,lVar4,lVar4,&local_58); return; } write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp_const&,fmt::v8::basic_format_specs<char>const&,fmt::v8::detail::float_specs,char) ::{lambda(fmt::v8::appender)#1}::operator()((_lambda_fmt__v8__appender__1_ *)&local_58,param_1); return; } if ((param_4 & 0xff00000000) == 0) { uVar6 = 0x10; if (0 < (int)uVar2) { uVar6 = uVar2; } if ((local_64 < -3) || ((int)uVar6 < local_64)) goto LAB_0012ecd0; } if (-1 < (int)uVar10) { lVar4 = uVar5 + uVar10; local_7c = uVar2 - local_64; if ((uVar1 >> 0x14 & 1) != 0) { if (cVar8 == '\x02' || 0 < (int)local_7c) { if ((int)local_7c < 1) goto LAB_0012ee14; } else { local_7c = 1; } lVar4 = lVar4 + (ulong)local_7c + 1; } LAB_0012ee14: local_58 = &local_78; local_50 = &local_70; local_48 = &local_74; local_38 = &local_60; local_30 = (uint *)&local_7e; local_28 = &local_7c; local_40 = (uint *)param_2; write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp_const&,fmt::v8::basic_format_specs<char>const&,fmt::v8::detail::float_specs,char)::_lambda(fmt::v8::appender)_2_&> (param_1,param_3,lVar4); return; } if (0 < local_64) { local_7c = uVar2 - local_74 & (int)(uVar1 << 0xb) >> 0x1f; local_30 = &local_7c; uVar3 = (ulong)local_7c; if ((int)local_7c < 1) { uVar3 = 0; } local_58 = &local_78; local_50 = &local_70; local_48 = &local_74; local_40 = (uint *)&local_64; local_38 = (ulong *)&local_7e; write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp_const&,fmt::v8::basic_format_specs<char>const&,fmt::v8::detail::float_specs,char)::_lambda(fmt::v8::appender)_3_&> (param_1,param_3,uVar3 + 1 + uVar5); return; } uVar10 = -local_64; local_7c = uVar10; if (SBORROW4(uVar2,uVar10) != (int)(uVar2 + local_64) < 0) { local_7c = uVar2; } if ((int)uVar2 < 0) { local_7c = uVar10; } if (local_74 != 0) { local_7c = uVar10; } if (local_74 == 0 && local_7c == 0) { local_7d = (int1)((uVar1 & 0x100000) >> 0x14); iVar7 = 1; if ((param_4 & 0x10000000000000) == 0) goto LAB_0012eeb1; } else { local_7d = 1; } iVar7 = 2; LAB_0012eeb1: lVar4 = (iVar7 + local_7c) + uVar5; local_58 = &local_78; local_50 = (int8 *)&local_7d; local_48 = (int *)&local_7e; local_40 = &local_7c; local_38 = &local_70; local_30 = (uint *)&local_74; write_padded<(fmt::v8::align::type)2,fmt::v8::appender,char,fmt::v8::detail::write_float<fmt::v8::appender,fmt::v8::detail::big_decimal_fp,char>(fmt::v8::appender,fmt::v8::detail::big_decimal_fp_const&,fmt::v8::basic_format_specs<char>const&,fmt::v8::detail::float_specs,char)::_lambda(fmt::v8::appender)_4_&> (param_1,param_3,lVar4,lVar4); return; }
45,434
translog_buffer_lock
eloqsql/storage/maria/ma_loghandler.c
static void translog_buffer_lock(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_buffer_lock"); DBUG_PRINT("enter", ("Lock buffer #%u: %p", buffer->buffer_no, buffer)); mysql_mutex_lock(&buffer->mutex); DBUG_VOID_RETURN; }
O3
c
translog_buffer_lock: pushq %rbp movq %rsp, %rbp movq %rdi, %rax addq $0x100090, %rdi # imm = 0x100090 cmpq $0x0, 0x1000d0(%rax) jne 0x32611 popq %rbp jmp 0x29200 leaq 0xa706a(%rip), %rsi # 0xd9682 movl $0x6cb, %edx # imm = 0x6CB popq %rbp jmp 0x2eb6f
translog_buffer_lock: push rbp mov rbp, rsp mov rax, rdi add rdi, 100090h cmp ds:qword_1000D0[rax], 0 jnz short loc_32611 pop rbp jmp _pthread_mutex_lock loc_32611: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 6CBh pop rbp jmp psi_mutex_lock
long long translog_buffer_lock(long long a1) { long long v2; // rdi v2 = a1 + 1048720; if ( *(long long *)((char *)&qword_1000D0 + a1) ) return psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x6CBu); else return pthread_mutex_lock(v2); }
translog_buffer_lock: PUSH RBP MOV RBP,RSP MOV RAX,RDI ADD RDI,0x100090 CMP qword ptr [RAX + 0x1000d0],0x0 JNZ 0x00132611 POP RBP JMP 0x00129200 LAB_00132611: LEA RSI,[0x1d9682] MOV EDX,0x6cb POP RBP JMP 0x0012eb6f
void translog_buffer_lock(long param_1) { pthread_mutex_t *__mutex; __mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1); if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + param_1) == 0) { pthread_mutex_lock(__mutex); return; } psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x6cb); return; }
45,435
ma_test_if_reopen
eloqsql/storage/maria/ma_open.c
MARIA_HA *_ma_test_if_reopen(const char *filename) { LIST *pos; for (pos=maria_open_list ; pos ; pos=pos->next) { MARIA_HA *info=(MARIA_HA*) pos->data; MARIA_SHARE *share= info->s; if (!strcmp(share->unique_file_name.str,filename) && share->last_version) return info; } return 0; }
O3
c
ma_test_if_reopen: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx leaq 0x3ab4b2(%rip), %rax # 0x3fca90 movq (%rax), %r15 testq %r15, %r15 je 0x51618 movq %rdi, %rbx movq 0x10(%r15), %r14 movq (%r14), %r12 movq 0x5b0(%r12), %rdi movq %rbx, %rsi callq 0x296a0 testl %eax, %eax jne 0x5160f cmpq $0x0, 0x718(%r12) jne 0x5161b movq 0x8(%r15), %r15 testq %r15, %r15 jne 0x515e9 xorl %r14d, %r14d movq %r14, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ma_test_if_reopen: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx lea rax, maria_open_list mov r15, [rax] test r15, r15 jz short loc_51618 mov rbx, rdi loc_515E9: mov r14, [r15+10h] mov r12, [r14] mov rdi, [r12+5B0h] mov rsi, rbx call _strcmp test eax, eax jnz short loc_5160F cmp qword ptr [r12+718h], 0 jnz short loc_5161B loc_5160F: mov r15, [r15+8] test r15, r15 jnz short loc_515E9 loc_51618: xor r14d, r14d loc_5161B: mov rax, r14 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long * ma_test_if_reopen(long long a1) { long long v1; // r15 long long *v2; // r14 long long v3; // r12 v1 = maria_open_list; if ( !maria_open_list ) return 0LL; while ( 1 ) { v2 = *(long long **)(v1 + 16); v3 = *v2; if ( !(unsigned int)strcmp(*(_QWORD *)(*v2 + 1456), a1) ) { if ( *(_QWORD *)(v3 + 1816) ) break; } v1 = *(_QWORD *)(v1 + 8); if ( !v1 ) return 0LL; } return v2; }
_ma_test_if_reopen: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX LEA RAX,[0x4fca90] MOV R15,qword ptr [RAX] TEST R15,R15 JZ 0x00151618 MOV RBX,RDI LAB_001515e9: MOV R14,qword ptr [R15 + 0x10] MOV R12,qword ptr [R14] MOV RDI,qword ptr [R12 + 0x5b0] MOV RSI,RBX CALL 0x001296a0 TEST EAX,EAX JNZ 0x0015160f CMP qword ptr [R12 + 0x718],0x0 JNZ 0x0015161b LAB_0015160f: MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001515e9 LAB_00151618: XOR R14D,R14D LAB_0015161b: MOV RAX,R14 POP RBX POP R12 POP R14 POP R15 POP RBP RET
long * _ma_test_if_reopen(char *param_1) { long *plVar1; long lVar2; int iVar3; long lVar4; lVar4 = maria_open_list; if (maria_open_list != 0) { do { plVar1 = *(long **)(lVar4 + 0x10); lVar2 = *plVar1; iVar3 = strcmp(*(char **)(lVar2 + 0x5b0),param_1); if ((iVar3 == 0) && (*(long *)(lVar2 + 0x718) != 0)) { return plVar1; } plVar1 = (long *)(lVar4 + 8); lVar4 = *plVar1; } while (*plVar1 != 0); } return (long *)0x0; }
45,436
Loader_Sprintf::step()
untodesu[P]riteg/riteg/loader_sprintf.cc
void Loader_Sprintf::step(void) { if(!m_is_done && m_frame <= m_limit) { m_buffer.resize(2 + std::snprintf(nullptr, 0, m_format.c_str(), static_cast<int>(m_frame))); std::snprintf(m_buffer.data(), m_buffer.size(), m_format.c_str(), static_cast<int>(m_frame)); if(!project::load_input_RGBA(m_buffer)) { // Consider this a completeion m_is_done = true; return; } m_frame += 1; } }
O1
cpp
Loader_Sprintf::step(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp cmpb $0x0, 0x58(%rdi) jne 0x104e8 movq %rdi, %rbx movq 0x48(%rdi), %rcx cmpq 0x50(%rdi), %rcx ja 0x104e8 leaq 0x28(%rbx), %r14 movq 0x8(%rbx), %rdx xorl %edi, %edi xorl %esi, %esi xorl %eax, %eax callq 0xcd90 addl $0x2, %eax movslq %eax, %rsi movq %r14, %rdi xorl %edx, %edx callq 0xc220 movq 0x8(%rbx), %rdx movq 0x28(%rbx), %rdi movq 0x30(%rbx), %rsi movl 0x48(%rbx), %ecx xorl %eax, %eax callq 0xcd90 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi movl $0x2, %edx callq 0x10506 movq %r15, %rdi callq 0x14d73 movl %eax, %ebp movq %rsp, %rdi callq 0xe29a testb %bpl, %bpl je 0x104e4 incq 0x48(%rbx) jmp 0x104e8 movb $0x1, 0x58(%rbx) addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %rsp, %rdi callq 0xe29a movq %rbx, %rdi callq 0xcf00
_ZN14Loader_Sprintf4stepEv: push rbp push r15 push r14 push rbx sub rsp, 28h cmp byte ptr [rdi+58h], 0 jnz short loc_104E8 mov rbx, rdi mov rcx, [rdi+48h] cmp rcx, [rdi+50h] ja short loc_104E8 lea r14, [rbx+28h] mov rdx, [rbx+8] xor edi, edi xor esi, esi xor eax, eax call _snprintf add eax, 2 movsxd rsi, eax mov rdi, r14 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rdx, [rbx+8] mov rdi, [rbx+28h] mov rsi, [rbx+30h] mov ecx, [rbx+48h] xor eax, eax call _snprintf mov r15, rsp mov rdi, r15; this mov rsi, r14; std::filesystem::__cxx11::path * mov edx, 2 call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format) mov rdi, r15; this call _ZN7project15load_input_RGBAERKNSt10filesystem7__cxx114pathE; project::load_input_RGBA(std::filesystem::__cxx11::path const&) mov ebp, eax mov rdi, rsp; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() test bpl, bpl jz short loc_104E4 inc qword ptr [rbx+48h] jmp short loc_104E8 loc_104E4: mov byte ptr [rbx+58h], 1 loc_104E8: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, rsp; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov rdi, rbx call __Unwind_Resume
void Loader_Sprintf::step(Loader_Sprintf *this) { int v1; // eax char input_RGBA; // bp _BYTE v3[72]; // [rsp+0h] [rbp-48h] BYREF if ( !*((_BYTE *)this + 88) && *((_QWORD *)this + 9) <= *((_QWORD *)this + 10) ) { v1 = snprintf(0LL, 0LL, *((_QWORD *)this + 1)); std::string::resize((char *)this + 40, v1 + 2, 0LL); snprintf(*((_QWORD *)this + 5), *((_QWORD *)this + 6), *((_QWORD *)this + 1)); std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v3); input_RGBA = project::load_input_RGBA((project *)v3, (Loader_Sprintf *)((char *)this + 40)); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v3); if ( input_RGBA ) ++*((_QWORD *)this + 9); else *((_BYTE *)this + 88) = 1; } }
step: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 CMP byte ptr [RDI + 0x58],0x0 JNZ 0x001104e8 MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x48] CMP RCX,qword ptr [RDI + 0x50] JA 0x001104e8 LEA R14,[RBX + 0x28] MOV RDX,qword ptr [RBX + 0x8] XOR EDI,EDI XOR ESI,ESI XOR EAX,EAX CALL 0x0010cd90 ADD EAX,0x2 MOVSXD RSI,EAX MOV RDI,R14 XOR EDX,EDX CALL 0x0010c220 MOV RDX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RBX + 0x28] MOV RSI,qword ptr [RBX + 0x30] MOV ECX,dword ptr [RBX + 0x48] XOR EAX,EAX CALL 0x0010cd90 MOV R15,RSP MOV RDI,R15 MOV RSI,R14 MOV EDX,0x2 CALL 0x00110506 LAB_001104c7: MOV RDI,R15 CALL 0x00114d73 LAB_001104cf: MOV EBP,EAX MOV RDI,RSP CALL 0x0010e29a TEST BPL,BPL JZ 0x001104e4 INC qword ptr [RBX + 0x48] JMP 0x001104e8 LAB_001104e4: MOV byte ptr [RBX + 0x58],0x1 LAB_001104e8: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* Loader_Sprintf::step() */ void __thiscall Loader_Sprintf::step(Loader_Sprintf *this) { char cVar1; int iVar2; path apStack_48 [40]; if ((this[0x58] == (Loader_Sprintf)0x0) && (*(ulong *)(this + 0x48) <= *(ulong *)(this + 0x50))) { iVar2 = snprintf((char *)0x0,0,*(char **)(this + 8)); std::__cxx11::string::resize((ulong)(this + 0x28),(char)iVar2 + '\x02'); snprintf(*(char **)(this + 0x28),*(size_t *)(this + 0x30),*(char **)(this + 8), (ulong)*(uint *)(this + 0x48)); std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path> (apStack_48,this + 0x28,2); /* try { // try from 001104c7 to 001104ce has its CatchHandler @ 001104f3 */ cVar1 = project::load_input_RGBA(apStack_48); std::filesystem::__cxx11::path::~path(apStack_48); if (cVar1 == '\0') { this[0x58] = (Loader_Sprintf)0x1; } else { *(long *)(this + 0x48) = *(long *)(this + 0x48) + 1; } } return; }
45,437
Loader_Sprintf::step()
untodesu[P]riteg/riteg/loader_sprintf.cc
void Loader_Sprintf::step(void) { if(!m_is_done && m_frame <= m_limit) { m_buffer.resize(2 + std::snprintf(nullptr, 0, m_format.c_str(), static_cast<int>(m_frame))); std::snprintf(m_buffer.data(), m_buffer.size(), m_format.c_str(), static_cast<int>(m_frame)); if(!project::load_input_RGBA(m_buffer)) { // Consider this a completeion m_is_done = true; return; } m_frame += 1; } }
O2
cpp
Loader_Sprintf::step(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp cmpb $0x0, 0x58(%rdi) jne 0xe574 movq %rdi, %rbx movq 0x48(%rdi), %rcx cmpq 0x50(%rdi), %rcx ja 0xe574 leaq 0x28(%rbx), %r14 movq 0x8(%rbx), %rdx xorl %edi, %edi xorl %esi, %esi xorl %eax, %eax callq 0xbd60 addl $0x2, %eax movslq %eax, %rsi movq %r14, %rdi callq 0xbaf0 movq 0x8(%rbx), %rdx movq 0x28(%rbx), %rdi movq 0x30(%rbx), %rsi movl 0x48(%rbx), %ecx xorl %eax, %eax callq 0xbd60 movq %rsp, %r15 pushq $0x2 popq %rdx movq %r15, %rdi movq %r14, %rsi callq 0xe5ea movq %r15, %rdi callq 0x11ff4 movl %eax, %ebp movq %rsp, %rdi callq 0xc8fa testb %bpl, %bpl je 0xe570 incq 0x48(%rbx) jmp 0xe574 movb $0x1, 0x58(%rbx) addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %rsp, %rdi callq 0xc8fa movq %rbx, %rdi callq 0xbec0
_ZN14Loader_Sprintf4stepEv: push rbp push r15 push r14 push rbx sub rsp, 28h cmp byte ptr [rdi+58h], 0 jnz short loc_E574 mov rbx, rdi mov rcx, [rdi+48h] cmp rcx, [rdi+50h] ja short loc_E574 lea r14, [rbx+28h] mov rdx, [rbx+8] xor edi, edi xor esi, esi xor eax, eax call _snprintf add eax, 2 movsxd rsi, eax mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong) mov rdx, [rbx+8] mov rdi, [rbx+28h] mov rsi, [rbx+30h] mov ecx, [rbx+48h] xor eax, eax call _snprintf mov r15, rsp push 2 pop rdx mov rdi, r15; this mov rsi, r14; std::filesystem::__cxx11::path * call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format) mov rdi, r15; this call _ZN7project15load_input_RGBAERKNSt10filesystem7__cxx114pathE; project::load_input_RGBA(std::filesystem::__cxx11::path const&) mov ebp, eax mov rdi, rsp; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() test bpl, bpl jz short loc_E570 inc qword ptr [rbx+48h] jmp short loc_E574 loc_E570: mov byte ptr [rbx+58h], 1 loc_E574: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, rsp; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov rdi, rbx call __Unwind_Resume
void Loader_Sprintf::step(Loader_Sprintf *this) { int v1; // eax char input_RGBA; // bp _BYTE v3[72]; // [rsp+0h] [rbp-48h] BYREF if ( !*((_BYTE *)this + 88) && *((_QWORD *)this + 9) <= *((_QWORD *)this + 10) ) { v1 = snprintf(0LL, 0LL, *((_QWORD *)this + 1)); std::string::resize((char *)this + 40, v1 + 2); snprintf(*((_QWORD *)this + 5), *((_QWORD *)this + 6), *((_QWORD *)this + 1)); std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v3); input_RGBA = project::load_input_RGBA((project *)v3, (Loader_Sprintf *)((char *)this + 40)); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v3); if ( input_RGBA ) ++*((_QWORD *)this + 9); else *((_BYTE *)this + 88) = 1; } }
step: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 CMP byte ptr [RDI + 0x58],0x0 JNZ 0x0010e574 MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x48] CMP RCX,qword ptr [RDI + 0x50] JA 0x0010e574 LEA R14,[RBX + 0x28] MOV RDX,qword ptr [RBX + 0x8] XOR EDI,EDI XOR ESI,ESI XOR EAX,EAX CALL 0x0010bd60 ADD EAX,0x2 MOVSXD RSI,EAX MOV RDI,R14 CALL 0x0010baf0 MOV RDX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RBX + 0x28] MOV RSI,qword ptr [RBX + 0x30] MOV ECX,dword ptr [RBX + 0x48] XOR EAX,EAX CALL 0x0010bd60 MOV R15,RSP PUSH 0x2 POP RDX MOV RDI,R15 MOV RSI,R14 CALL 0x0010e5ea LAB_0010e553: MOV RDI,R15 CALL 0x00111ff4 LAB_0010e55b: MOV EBP,EAX MOV RDI,RSP CALL 0x0010c8fa TEST BPL,BPL JZ 0x0010e570 INC qword ptr [RBX + 0x48] JMP 0x0010e574 LAB_0010e570: MOV byte ptr [RBX + 0x58],0x1 LAB_0010e574: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* Loader_Sprintf::step() */ void __thiscall Loader_Sprintf::step(Loader_Sprintf *this) { char cVar1; path apStack_48 [40]; if ((this[0x58] == (Loader_Sprintf)0x0) && (*(ulong *)(this + 0x48) <= *(ulong *)(this + 0x50))) { snprintf((char *)0x0,0,*(char **)(this + 8)); std::__cxx11::string::resize((ulong)(this + 0x28)); snprintf(*(char **)(this + 0x28),*(size_t *)(this + 0x30),*(char **)(this + 8), (ulong)*(uint *)(this + 0x48)); std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path> (apStack_48,this + 0x28,2); /* try { // try from 0010e553 to 0010e55a has its CatchHandler @ 0010e57f */ cVar1 = project::load_input_RGBA(apStack_48); std::filesystem::__cxx11::path::~path(apStack_48); if (cVar1 == '\0') { this[0x58] = (Loader_Sprintf)0x1; } else { *(long *)(this + 0x48) = *(long *)(this + 0x48) + 1; } } return; }
45,438
Loader_Sprintf::step()
untodesu[P]riteg/riteg/loader_sprintf.cc
void Loader_Sprintf::step(void) { if(!m_is_done && m_frame <= m_limit) { m_buffer.resize(2 + std::snprintf(nullptr, 0, m_format.c_str(), static_cast<int>(m_frame))); std::snprintf(m_buffer.data(), m_buffer.size(), m_format.c_str(), static_cast<int>(m_frame)); if(!project::load_input_RGBA(m_buffer)) { // Consider this a completeion m_is_done = true; return; } m_frame += 1; } }
O3
cpp
Loader_Sprintf::step(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp cmpb $0x0, 0x58(%rdi) jne 0x103f8 movq %rdi, %rbx movq 0x48(%rdi), %rcx cmpq 0x50(%rdi), %rcx ja 0x103f8 leaq 0x28(%rbx), %r14 movq 0x8(%rbx), %rdx xorl %edi, %edi xorl %esi, %esi xorl %eax, %eax callq 0xcd90 addl $0x2, %eax movslq %eax, %rsi movq %r14, %rdi xorl %edx, %edx callq 0xc220 movq 0x8(%rbx), %rdx movq 0x28(%rbx), %rdi movq 0x30(%rbx), %rsi movl 0x48(%rbx), %ecx xorl %eax, %eax callq 0xcd90 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi movl $0x2, %edx callq 0x10416 movq %r15, %rdi callq 0x14c77 movl %eax, %ebp movq %rsp, %rdi callq 0xe222 testb %bpl, %bpl je 0x103f4 incq 0x48(%rbx) jmp 0x103f8 movb $0x1, 0x58(%rbx) addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %rsp, %rdi callq 0xe222 movq %rbx, %rdi callq 0xcf00
_ZN14Loader_Sprintf4stepEv: push rbp push r15 push r14 push rbx sub rsp, 28h cmp byte ptr [rdi+58h], 0 jnz short loc_103F8 mov rbx, rdi mov rcx, [rdi+48h] cmp rcx, [rdi+50h] ja short loc_103F8 lea r14, [rbx+28h] mov rdx, [rbx+8] xor edi, edi xor esi, esi xor eax, eax call _snprintf add eax, 2 movsxd rsi, eax mov rdi, r14 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rdx, [rbx+8] mov rdi, [rbx+28h] mov rsi, [rbx+30h] mov ecx, [rbx+48h] xor eax, eax call _snprintf mov r15, rsp mov rdi, r15; this mov rsi, r14; std::filesystem::__cxx11::path * mov edx, 2 call _ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>(std::string const&,std::filesystem::__cxx11::path::format) mov rdi, r15; this call _ZN7project15load_input_RGBAERKNSt10filesystem7__cxx114pathE; project::load_input_RGBA(std::filesystem::__cxx11::path const&) mov ebp, eax mov rdi, rsp; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() test bpl, bpl jz short loc_103F4 inc qword ptr [rbx+48h] jmp short loc_103F8 loc_103F4: mov byte ptr [rbx+58h], 1 loc_103F8: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, rsp; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov rdi, rbx call __Unwind_Resume
void Loader_Sprintf::step(Loader_Sprintf *this) { int v1; // eax char input_RGBA; // bp _BYTE v3[72]; // [rsp+0h] [rbp-48h] BYREF if ( !*((_BYTE *)this + 88) && *((_QWORD *)this + 9) <= *((_QWORD *)this + 10) ) { v1 = snprintf(0LL, 0LL, *((_QWORD *)this + 1)); std::string::resize((char *)this + 40, v1 + 2, 0LL); snprintf(*((_QWORD *)this + 5), *((_QWORD *)this + 6), *((_QWORD *)this + 1)); std::filesystem::__cxx11::path::path<std::string,std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v3); input_RGBA = project::load_input_RGBA((project *)v3, (Loader_Sprintf *)((char *)this + 40)); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v3); if ( input_RGBA ) ++*((_QWORD *)this + 9); else *((_BYTE *)this + 88) = 1; } }
step: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 CMP byte ptr [RDI + 0x58],0x0 JNZ 0x001103f8 MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x48] CMP RCX,qword ptr [RDI + 0x50] JA 0x001103f8 LEA R14,[RBX + 0x28] MOV RDX,qword ptr [RBX + 0x8] XOR EDI,EDI XOR ESI,ESI XOR EAX,EAX CALL 0x0010cd90 ADD EAX,0x2 MOVSXD RSI,EAX MOV RDI,R14 XOR EDX,EDX CALL 0x0010c220 MOV RDX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RBX + 0x28] MOV RSI,qword ptr [RBX + 0x30] MOV ECX,dword ptr [RBX + 0x48] XOR EAX,EAX CALL 0x0010cd90 MOV R15,RSP MOV RDI,R15 MOV RSI,R14 MOV EDX,0x2 CALL 0x00110416 LAB_001103d7: MOV RDI,R15 CALL 0x00114c77 LAB_001103df: MOV EBP,EAX MOV RDI,RSP CALL 0x0010e222 TEST BPL,BPL JZ 0x001103f4 INC qword ptr [RBX + 0x48] JMP 0x001103f8 LAB_001103f4: MOV byte ptr [RBX + 0x58],0x1 LAB_001103f8: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* Loader_Sprintf::step() */ void __thiscall Loader_Sprintf::step(Loader_Sprintf *this) { char cVar1; int iVar2; path apStack_48 [40]; if ((this[0x58] == (Loader_Sprintf)0x0) && (*(ulong *)(this + 0x48) <= *(ulong *)(this + 0x50))) { iVar2 = snprintf((char *)0x0,0,*(char **)(this + 8)); std::__cxx11::string::resize((ulong)(this + 0x28),(char)iVar2 + '\x02'); snprintf(*(char **)(this + 0x28),*(size_t *)(this + 0x30),*(char **)(this + 8), (ulong)*(uint *)(this + 0x48)); std::filesystem::__cxx11::path::path<std::__cxx11::string,std::filesystem::__cxx11::path> (apStack_48,this + 0x28,2); /* try { // try from 001103d7 to 001103de has its CatchHandler @ 00110403 */ cVar1 = project::load_input_RGBA(apStack_48); std::filesystem::__cxx11::path::~path(apStack_48); if (cVar1 == '\0') { this[0x58] = (Loader_Sprintf)0x1; } else { *(long *)(this + 0x48) = *(long *)(this + 0x48) + 1; } } return; }
45,439
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const
monkey531[P]llama/common/minja.hpp
bool peekSymbols(const std::vector<std::string> & symbols) const { for (const auto & symbol : symbols) { if (std::distance(it, end) >= (int64_t) symbol.size() && std::string(it, it + symbol.size()) == symbol) { return true; } } return false; }
O2
cpp
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rsi), %rbx movq 0x8(%rsi), %r12 leaq 0x18(%rsp), %r13 leaq 0x8(%rsp), %r15 cmpq %r12, %rbx je 0x62cbf movq 0x18(%r14), %rax movq 0x20(%r14), %rsi subq %rsi, %rax movq 0x8(%rbx), %rdx cmpq %rdx, %rax jl 0x62cb9 addq %rsi, %rdx movq %r13, 0x8(%rsp) movq %r15, %rdi callq 0x4688c movq %r15, %rdi movq %rbx, %rsi callq 0x2a7d4 movl %eax, %ebp movq %r15, %rdi callq 0x22078 testb %bpl, %bpl jne 0x62cbf addq $0x20, %rbx jmp 0x62c76 cmpq %r12, %rbx setne %al addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZNK5minja6Parser11peekSymbolsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rdi mov rbx, [rsi] mov r12, [rsi+8] lea r13, [rsp+58h+var_40] lea r15, [rsp+58h+var_50] loc_62C76: cmp rbx, r12 jz short loc_62CBF mov rax, [r14+18h] mov rsi, [r14+20h] sub rax, rsi mov rdx, [rbx+8] cmp rax, rdx jl short loc_62CB9 add rdx, rsi mov [rsp+58h+var_50], r13 mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rdi, r15 mov rsi, rbx call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ mov ebp, eax mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_62CBF loc_62CB9: add rbx, 20h ; ' ' jmp short loc_62C76 loc_62CBF: cmp rbx, r12 setnz al add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool minja::Parser::peekSymbols(long long a1, long long **a2) { long long *v2; // rbx long long *v3; // r12 _BYTE *v4; // rsi long long v5; // rdx bool v6; // bp long long v8[2]; // [rsp+8h] [rbp-50h] BYREF char v9; // [rsp+18h] [rbp-40h] BYREF v2 = *a2; v3 = a2[1]; while ( v2 != v3 ) { v4 = *(_BYTE **)(a1 + 32); v5 = v2[1]; if ( *(_QWORD *)(a1 + 24) - (_QWORD)v4 >= v5 ) { v8[0] = (long long)&v9; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>( (long long)v8, v4, (long long)&v4[v5]); v6 = std::operator==<char>(v8, v2); std::string::~string(v8); if ( v6 ) break; } v2 += 4; } return v2 != v3; }
peekSymbols: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RBX,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] LEA R13,[RSP + 0x18] LEA R15,[RSP + 0x8] LAB_00162c76: CMP RBX,R12 JZ 0x00162cbf MOV RAX,qword ptr [R14 + 0x18] MOV RSI,qword ptr [R14 + 0x20] SUB RAX,RSI MOV RDX,qword ptr [RBX + 0x8] CMP RAX,RDX JL 0x00162cb9 ADD RDX,RSI MOV qword ptr [RSP + 0x8],R13 MOV RDI,R15 CALL 0x0014688c MOV RDI,R15 MOV RSI,RBX CALL 0x0012a7d4 MOV EBP,EAX MOV RDI,R15 CALL 0x00122078 TEST BPL,BPL JNZ 0x00162cbf LAB_00162cb9: ADD RBX,0x20 JMP 0x00162c76 LAB_00162cbf: CMP RBX,R12 SETNZ AL ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::Parser::peekSymbols(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) const */ bool __thiscall minja::Parser::peekSymbols(Parser *this,vector *param_1) { string *psVar1; long lVar2; char cVar3; string *psVar4; int1 *local_50 [2]; int1 local_40 [16]; psVar1 = *(string **)(param_1 + 8); for (psVar4 = *(string **)param_1; psVar4 != psVar1; psVar4 = psVar4 + 0x20) { lVar2 = *(long *)(this + 0x20); if (*(long *)(psVar4 + 8) <= *(long *)(this + 0x18) - lVar2) { local_50[0] = local_40; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> ((string *)local_50,lVar2,*(long *)(psVar4 + 8) + lVar2); cVar3 = std::operator==((string *)local_50,psVar4); std::__cxx11::string::~string((string *)local_50); if (cVar3 != '\0') break; } } return psVar4 != psVar1; }
45,440
nglog::LogDestination::FlushLogFilesUnsafe(int)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::FlushLogFilesUnsafe(int min_severity) { // assume we have the log_mutex or we simply don't care // about it std::for_each(std::next(std::begin(log_destinations_), min_severity), std::end(log_destinations_), [now = std::chrono::system_clock::now()]( std::unique_ptr<LogDestination>& log) { if (log != nullptr) { // Flush the base fileobject_ logger directly instead of // going through any wrappers to reduce chance of deadlock. log->fileobject_.FlushUnlocked(now); } }); }
O2
cpp
nglog::LogDestination::FlushLogFilesUnsafe(int): pushq %rbx movslq %edi, %rax leaq 0x206b9(%rip), %rcx # 0x3c2a0 leaq (%rcx,%rax,8), %rbx callq 0x14090 leaq 0x206c9(%rip), %rsi # 0x3c2c0 movq %rbx, %rdi movq %rax, %rdx popq %rbx jmp 0x1ca7f nop
_ZN5nglog14LogDestination19FlushLogFilesUnsafeEi: push rbx movsxd rax, edi lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ lea rbx, [rcx+rax*8] call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) lea rsi, _ZN5nglog12_GLOBAL__N_125g_application_fingerprintB5cxx11E; nglog::`anonymous namespace'::g_application_fingerprint mov rdi, rbx mov rdx, rax pop rbx jmp _ZSt8for_eachIPSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS2_EEZNS2_19FlushLogFilesUnsafeEiEUlRS5_E_ET0_T_SA_S9_; std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>(std::unique_ptr<nglog::LogDestination> *,std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1})
long long nglog::LogDestination::FlushLogFilesUnsafe(nglog::LogDestination *this) { long long v1; // rax v1 = std::chrono::_V2::system_clock::now(this); return std::for_each<std::unique_ptr<nglog::LogDestination> *,nglog::LogDestination::FlushLogFilesUnsafe(int)::{lambda(std::unique_ptr<nglog::LogDestination>&)#1}>( &nglog::LogDestination::log_destinations_[(int)this], &nglog::`anonymous namespace'::g_application_fingerprint[abi:cxx11], v1); }
FlushLogFilesUnsafe: PUSH RBX MOVSXD RAX,EDI LEA RCX,[0x13c2a0] LEA RBX,[RCX + RAX*0x8] CALL 0x00114090 LEA RSI,[0x13c2c0] MOV RDI,RBX MOV RDX,RAX POP RBX JMP 0x0011ca7f
/* nglog::LogDestination::FlushLogFilesUnsafe(int) */ void nglog::LogDestination::FlushLogFilesUnsafe(int param_1) { int8 uVar1; uVar1 = std::chrono::_V2::system_clock::now(); std:: for_each<std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>*,nglog::LogDestination::FlushLogFilesUnsafe(int)::_lambda(std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>&)_1_> (&log_destinations_ + param_1, (anonymous_namespace)::g_application_fingerprint_abi_cxx11_,uVar1); return; }
45,441
LefDefParser::lefiGeometries::getPathIter(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
lefiGeomPathIter * lefiGeometries::getPathIter(int index) const { char msg[160]; if (index < 0 || index >= numItems_) { sprintf(msg, "ERROR (LEFPARS-1364): The index number %d given for the geometry PATH ITERATE is invalid.\nValid index is from 0 to %d", index, numItems_); lefiError(0, 1364, msg); return 0; } return (lefiGeomPathIter*) (items_[index]); }
O3
cpp
LefDefParser::lefiGeometries::getPathIter(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx testl %esi, %esi setns %al movl (%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x118e0 movq 0x10(%rdi), %rax movl %edx, %ecx movq (%rax,%rcx,8), %rbx jmp 0x11905 leaq 0x3b9f9(%rip), %rsi # 0x4d2e0 xorl %ebx, %ebx movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x554, %esi # imm = 0x554 movq %r14, %rdx callq 0x27ae8 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r14 retq nop
_ZNK12LefDefParser14lefiGeometries11getPathIterEi: push r14 push rbx sub rsp, 0A8h mov edx, esi test esi, esi setns al mov ecx, [rdi] cmp ecx, esi setnle sil test al, sil jz short loc_118E0 mov rax, [rdi+10h] mov ecx, edx mov rbx, [rax+rcx*8] jmp short loc_11905 loc_118E0: lea rsi, aErrorLefpars13_3; "ERROR (LEFPARS-1364): The index number "... xor ebx, ebx mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf xor edi, edi; this mov esi, 554h; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) loc_11905: mov rax, rbx add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::lefiGeometries::getPathIter(LefDefParser::lefiGeometries *this, signed int a2) { long long v2; // rbx const char *v3; // rcx _BYTE v5[184]; // [rsp+0h] [rbp-B8h] BYREF if ( *(_DWORD *)this > a2 && a2 >= 0 ) return *(_QWORD *)(*((_QWORD *)this + 2) + 8LL * (unsigned int)a2); v2 = 0LL; sprintf( v5, "ERROR (LEFPARS-1364): The index number %d given for the geometry PATH ITERATE is invalid.\n" "Valid index is from 0 to %d", a2, *(_DWORD *)this); LefDefParser::lefiError(0LL, 1364, (int)v5, v3); return v2; }
getPathIter: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x001118e0 MOV RAX,qword ptr [RDI + 0x10] MOV ECX,EDX MOV RBX,qword ptr [RAX + RCX*0x8] JMP 0x00111905 LAB_001118e0: LEA RSI,[0x14d2e0] XOR EBX,EBX MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x554 MOV RDX,R14 CALL 0x00127ae8 LAB_00111905: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::lefiGeometries::getPathIter(int) const */ int8 __thiscall LefDefParser::lefiGeometries::getPathIter(lefiGeometries *this,int param_1) { int8 uVar1; char acStack_b8 [168]; if (param_1 < 0 || *(int *)this <= param_1) { uVar1 = 0; sprintf(acStack_b8, "ERROR (LEFPARS-1364): The index number %d given for the geometry PATH ITERATE is invalid.\nValid index is from 0 to %d" ); lefiError(0,0x554,acStack_b8); } else { uVar1 = *(int8 *)(*(long *)(this + 0x10) + (ulong)(uint)param_1 * 8); } return uVar1; }
45,442
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O3
c
my_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x33eeb6(%rip), %rax # 0x363bb8 cmpb $0x0, (%rax) je 0x24d0e xorl %eax, %eax jmp 0x24df6 leaq 0x33eea7(%rip), %rcx # 0x363bbc incl (%rcx) movb $0x1, (%rax) leaq 0x2c8617(%rip), %r14 # 0x2ed338 movl $0x1b0, (%r14) # imm = 0x1B0 leaq 0x2c860d(%rip), %rbx # 0x2ed33c movl $0x1c0, (%rbx) # imm = 0x1C0 leaq 0x33f34c(%rip), %rax # 0x364088 movq $0x0, (%rax) leaq 0x352ba(%rip), %rdi # 0x5a004 callq 0x24370 testq %rax, %rax je 0x24d64 movq %rax, %rdi callq 0x24e32 orl $0x180, %eax # imm = 0x180 movl %eax, (%r14) leaq 0x3529f(%rip), %rdi # 0x5a00a callq 0x24370 testq %rax, %rax je 0x24d84 movq %rax, %rdi callq 0x24e32 orl $0x1c0, %eax # imm = 0x1C0 movl %eax, (%rbx) callq 0x28078 movq 0x2c8230(%rip), %rax # 0x2ecfc0 movq (%rax), %rax movq %rax, 0x33ee2e(%rip) # 0x363bc8 leaq 0x33ee27(%rip), %rax # 0x363bc8 movq $0x0, 0x33ee24(%rip) # 0x363bd0 leaq 0x33ee0d(%rip), %rcx # 0x363bc0 movq %rax, (%rcx) leaq 0x35257(%rip), %rax # 0x5a014 leaq 0x33eea4(%rip), %r14 # 0x363c68 movq %rax, (%r14) leaq 0x33ee92(%rip), %rax # 0x363c60 movq (%rax), %rbx testq %rbx, %rbx je 0x24de4 movq %rbx, %rdi callq 0x28d48 addq %rbx, %rax movq %rax, (%r14) callq 0x25d34 callq 0x258fc movl %eax, %ecx movb $0x1, %al testb %cl, %cl je 0x24dfb popq %rbx popq %r14 popq %rbp retq leaq 0x3521a(%rip), %rdi # 0x5a01c callq 0x24370 leaq 0x33ee4a(%rip), %rbx # 0x363c58 movq %rax, (%rbx) testq %rax, %rax je 0x24e28 leaq 0x33f053(%rip), %rdi # 0x363e70 movq %rax, %rsi callq 0x2901d movq %rax, (%rbx) callq 0x29a3c jmp 0x24d07
my_init: push rbp mov rbp, rsp push r14 push rbx lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_24D0E loc_24D07: xor eax, eax jmp loc_24DF6 loc_24D0E: lea rcx, mysys_usage_id inc dword ptr [rcx] mov byte ptr [rax], 1 lea r14, my_umask mov dword ptr [r14], 1B0h lea rbx, my_umask_dir mov dword ptr [rbx], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv test rax, rax jz short loc_24D64 mov rdi, rax call atoi_octal or eax, 180h mov [r14], eax loc_24D64: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv test rax, rax jz short loc_24D84 mov rdi, rax call atoi_octal or eax, 1C0h mov [rbx], eax loc_24D84: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax lea rax, instrumented_stdin mov cs:qword_363BD0, 0 lea rcx, mysql_stdin mov [rcx], rax lea rax, aUnknown; "unknown" lea r14, my_progname_short mov [r14], rax lea rax, my_progname mov rbx, [rax] test rbx, rbx jz short loc_24DE4 mov rdi, rbx call dirname_length add rax, rbx mov [r14], rax loc_24DE4: call my_mutex_init call my_thread_global_init mov ecx, eax mov al, 1 test cl, cl jz short loc_24DFB loc_24DF6: pop rbx pop r14 pop rbp retn loc_24DFB: lea rdi, aHome; "HOME" call _getenv lea rbx, home_dir mov [rbx], rax test rax, rax jz short loc_24E28 lea rdi, home_dir_buff mov rsi, rax call intern_filename mov [rbx], rax loc_24E28: call my_time_init jmp loc_24D07
char my_init() { char result; // al long long v1; // rax long long v2; // rax long long v3; // rbx char v4; // cl long long v5; // rax if ( my_init_done ) return 0; ++mysys_usage_id; my_init_done = 1; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v1 = getenv("UMASK"); if ( v1 ) my_umask = atoi_octal(v1) | 0x180; v2 = getenv("UMASK_DIR"); if ( v2 ) my_umask_dir = atoi_octal(v2) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_363BD0 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; v3 = my_progname; if ( my_progname ) my_progname_short = v3 + dirname_length(my_progname); my_mutex_init(); v4 = my_thread_global_init(); result = 1; if ( !v4 ) { v5 = getenv("HOME"); home_dir = v5; if ( v5 ) home_dir = intern_filename(&home_dir_buff, v5); my_time_init(); return 0; } return result; }
my_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0x463bb8] CMP byte ptr [RAX],0x0 JZ 0x00124d0e LAB_00124d07: XOR EAX,EAX JMP 0x00124df6 LAB_00124d0e: LEA RCX,[0x463bbc] INC dword ptr [RCX] MOV byte ptr [RAX],0x1 LEA R14,[0x3ed338] MOV dword ptr [R14],0x1b0 LEA RBX,[0x3ed33c] MOV dword ptr [RBX],0x1c0 LEA RAX,[0x464088] MOV qword ptr [RAX],0x0 LEA RDI,[0x15a004] CALL 0x00124370 TEST RAX,RAX JZ 0x00124d64 MOV RDI,RAX CALL 0x00124e32 OR EAX,0x180 MOV dword ptr [R14],EAX LAB_00124d64: LEA RDI,[0x15a00a] CALL 0x00124370 TEST RAX,RAX JZ 0x00124d84 MOV RDI,RAX CALL 0x00124e32 OR EAX,0x1c0 MOV dword ptr [RBX],EAX LAB_00124d84: CALL 0x00128078 MOV RAX,qword ptr [0x003ecfc0] MOV RAX,qword ptr [RAX] MOV qword ptr [0x00463bc8],RAX LEA RAX,[0x463bc8] MOV qword ptr [0x00463bd0],0x0 LEA RCX,[0x463bc0] MOV qword ptr [RCX],RAX LEA RAX,[0x15a014] LEA R14,[0x463c68] MOV qword ptr [R14],RAX LEA RAX,[0x463c60] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x00124de4 MOV RDI,RBX CALL 0x00128d48 ADD RAX,RBX MOV qword ptr [R14],RAX LAB_00124de4: CALL 0x00125d34 CALL 0x001258fc MOV ECX,EAX MOV AL,0x1 TEST CL,CL JZ 0x00124dfb LAB_00124df6: POP RBX POP R14 POP RBP RET LAB_00124dfb: LEA RDI,[0x15a01c] CALL 0x00124370 LEA RBX,[0x463c58] MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x00124e28 LEA RDI,[0x463e70] MOV RSI,RAX CALL 0x0012901d MOV qword ptr [RBX],RAX LAB_00124e28: CALL 0x00129a3c JMP 0x00124d07
int8 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; if (my_init_done == '\0') { mysys_usage_id = mysys_usage_id + 1; my_init_done = '\x01'; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_003ecfc0; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar5 + lVar1); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 != '\0') { return 1; } home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); } return 0; }
45,443
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const
hkr04[P]cpp-mcp/common/json.hpp
std::string get_token_string() const { // escape control characters std::string result; for (const auto c : token_string) { if (static_cast<unsigned char>(c) <= '\x1F') { // escape control characters std::array<char, 9> cs{{}}; static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) result += cs.data(); } else { // add character as is result.push_back(static_cast<std::string::value_type>(c)); } } return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x38(%rsi), %r13 movq 0x40(%rsi), %rbp cmpq %rbp, %r13 je 0x48f71 leaq 0x11e6b(%rip), %r14 # 0x5ad8d leaq 0x8(%rsp), %r15 movzbl (%r13), %ecx cmpl $0x1f, %ecx ja 0x48f5e movb $0x0, 0x10(%rsp) movq $0x0, 0x8(%rsp) movl $0x9, %esi movq %r15, %rdi movq %r14, %rdx xorl %eax, %eax callq 0xa920 movq %rbx, %rdi movq %r15, %rsi callq 0xab10 jmp 0x48f69 movsbl %cl, %esi movq %rbx, %rdi callq 0xa560 incq %r13 cmpq %rbp, %r13 jne 0x48f27 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x48f85 movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0x48f9c movq (%r12), %rsi incq %rsi callq 0xa630 movq %r14, %rdi callq 0xaa50
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov r13, [rsi+38h] mov rbp, [rsi+40h] cmp r13, rbp jz short loc_48F71 lea r14, aU4x; "<U+%.4X>" lea r15, [rsp+48h+var_40] loc_48F27: movzx ecx, byte ptr [r13+0] cmp ecx, 1Fh ja short loc_48F5E mov [rsp+48h+var_38], 0 mov [rsp+48h+var_40], 0 mov esi, 9 mov rdi, r15 mov rdx, r14 xor eax, eax call _snprintf mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_48F69 loc_48F5E: movsx esi, cl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_48F69: inc r13 cmp r13, rbp jnz short loc_48F27 loc_48F71: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_48F85: mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_48F9C mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_48F9C: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( long long a1, long long a2) { unsigned __int8 *v2; // r13 unsigned __int8 *i; // rbp unsigned int v4; // ecx long long v6; // [rsp+8h] [rbp-40h] BYREF char v7; // [rsp+10h] [rbp-38h] *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v2 = *(unsigned __int8 **)(a2 + 56); for ( i = *(unsigned __int8 **)(a2 + 64); v2 != i; ++v2 ) { v4 = *v2; if ( v4 > 0x1F ) { std::string::push_back(a1, (unsigned int)(char)v4); } else { v7 = 0; v6 = 0LL; snprintf(&v6, 9LL, "<U+%.4X>", v4); std::string::append(a1, &v6); } } return a1; }
get_token_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV R13,qword ptr [RSI + 0x38] MOV RBP,qword ptr [RSI + 0x40] CMP R13,RBP JZ 0x00148f71 LEA R14,[0x15ad8d] LEA R15,[RSP + 0x8] LAB_00148f27: MOVZX ECX,byte ptr [R13] CMP ECX,0x1f JA 0x00148f5e MOV byte ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x8],0x0 MOV ESI,0x9 MOV RDI,R15 MOV RDX,R14 XOR EAX,EAX CALL 0x0010a920 LAB_00148f51: MOV RDI,RBX MOV RSI,R15 CALL 0x0010ab10 JMP 0x00148f69 LAB_00148f5e: MOVSX ESI,CL MOV RDI,RBX CALL 0x0010a560 LAB_00148f69: INC R13 CMP R13,RBP JNZ 0x00148f27 LAB_00148f71: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get_token_string() const */ void nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(void) { byte *pbVar1; long in_RSI; long *in_RDI; byte *pbVar2; char local_40 [16]; *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; pbVar2 = *(byte **)(in_RSI + 0x38); pbVar1 = *(byte **)(in_RSI + 0x40); if (pbVar2 != pbVar1) { do { if (*pbVar2 < 0x20) { local_40[8] = 0; local_40[0] = '\0'; local_40[1] = '\0'; local_40[2] = '\0'; local_40[3] = '\0'; local_40[4] = '\0'; local_40[5] = '\0'; local_40[6] = '\0'; local_40[7] = '\0'; snprintf(local_40,9,"<U+%.4X>"); /* try { // try from 00148f51 to 00148f5b has its CatchHandler @ 00148f85 */ std::__cxx11::string::append((char *)in_RDI); } else { /* try { // try from 00148f5e to 00148f68 has its CatchHandler @ 00148f83 */ std::__cxx11::string::push_back((char)in_RDI); } pbVar2 = pbVar2 + 1; } while (pbVar2 != pbVar1); } return; }
45,444
coro::detail::when_all_task<unsigned long&&> coro::detail::make_when_all_task<coro::task<unsigned long>, unsigned long&&>(coro::task<unsigned long>) (.resume)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp
static auto make_when_all_task(awaitable a) -> when_all_task<return_type> { if constexpr (std::is_void_v<return_type>) { co_await static_cast<awaitable&&>(a); co_return; } else { co_yield co_await static_cast<awaitable&&>(a); } }
O3
cpp
coro::detail::when_all_task<unsigned long&&> coro::detail::make_when_all_task<coro::task<unsigned long>, unsigned long&&>(coro::task<unsigned long>) (.resume): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movzbl 0x38(%rdi), %eax cmpl $0x2, %eax je 0x277c cmpl $0x1, %eax jne 0x271b movq 0x28(%rbx), %rdi jmp 0x273e movq 0x30(%rbx), %rdi movq %rdi, 0x28(%rbx) cmpq $0x0, (%rdi) je 0x273e movb $0x1, 0x38(%rbx) movq %rbx, 0x10(%rdi) movq 0x28(%rbx), %rdi addq $0x8, %rsp popq %rbx popq %r14 jmpq *(%rdi) leaq 0x10(%rbx), %r14 addq $0x10, %rdi callq 0x309a movq %rax, 0x20(%rbx) movb $0x2, 0x38(%rbx) movq 0x10(%rbx), %rax lock decq (%rax) jne 0x2797 movq 0x8(%rax), %rdi callq *(%rdi) jmp 0x2797 jmp 0x27b2 movq %rax, %rdi callq 0x2090 movq %r14, %rdi callq 0x3cda callq 0x2250 movq $0x0, (%rbx) movb $0x3, 0x38(%rbx) movq 0x10(%rbx), %rax lock decq (%rax) jne 0x2797 movq 0x8(%rax), %rdi callq *(%rdi) addq $0x8, %rsp popq %rbx popq %r14 retq movq $0x0, (%rbx) movb $0x3, 0x38(%rbx) movq %rax, %rdi callq 0x22a0 movq %rax, %rdi callq 0x2ed6
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskImEEOmEENS0_13when_all_taskIT0_EET__resume: push r14 push rbx push rax mov rbx, rdi movzx eax, byte ptr [rdi+38h] cmp eax, 2 jz short loc_277C cmp eax, 1 jnz short loc_271B mov rdi, [rbx+28h] jmp short loc_273E loc_271B: mov rdi, [rbx+30h] mov [rbx+28h], rdi cmp qword ptr [rdi], 0 jz short loc_273E mov byte ptr [rbx+38h], 1 mov [rdi+10h], rbx mov rdi, [rbx+28h] add rsp, 8 pop rbx pop r14 jmp qword ptr [rdi] loc_273E: lea r14, [rbx+10h] add rdi, 10h call _ZNO4coro6detail7promiseImE6resultEv; coro::detail::promise<ulong>::result(void) mov [rbx+20h], rax mov byte ptr [rbx+38h], 2 mov rax, [rbx+10h] lock dec qword ptr [rax] jnz short loc_2797 mov rdi, [rax+8] call qword ptr [rdi] jmp short loc_2797 jmp short loc_27B2 mov rdi, rax; void * call ___cxa_begin_catch mov rdi, r14 call _ZN4coro6detail21when_all_task_promiseIOmE19unhandled_exceptionEv; coro::detail::when_all_task_promise<ulong &&>::unhandled_exception(void) call ___cxa_end_catch loc_277C: mov qword ptr [rbx], 0 mov byte ptr [rbx+38h], 3 mov rax, [rbx+10h] lock dec qword ptr [rax] jnz short loc_2797 mov rdi, [rax+8] call qword ptr [rdi] loc_2797: add rsp, 8 pop rbx pop r14 retn mov qword ptr [rbx], 0 mov byte ptr [rbx+38h], 3 mov rdi, rax call __Unwind_Resume loc_27B2: mov rdi, rax call __clang_call_terminate
long long ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskImEEOmEENS0_13when_all_taskIT0_EET__resume( long long a1) { int v2; // eax _QWORD *v3; // rdi long long result; // rax v2 = *(unsigned __int8 *)(a1 + 56); if ( v2 == 2 ) { *(_QWORD *)a1 = 0LL; *(_BYTE *)(a1 + 56) = 3; result = *(_QWORD *)(a1 + 16); if ( _InterlockedDecrement64((volatile signed long long *)result) ) return result; return (**(long long ( ***)(_QWORD))(result + 8))(*(_QWORD *)(result + 8)); } if ( v2 == 1 ) { v3 = *(_QWORD **)(a1 + 40); } else { v3 = *(_QWORD **)(a1 + 48); *(_QWORD *)(a1 + 40) = v3; if ( *v3 ) { *(_BYTE *)(a1 + 56) = 1; v3[2] = a1; return (**(long long (***)(void))(a1 + 40))(); } } *(_QWORD *)(a1 + 32) = coro::detail::promise<unsigned long>::result(v3 + 2); *(_BYTE *)(a1 + 56) = 2; result = *(_QWORD *)(a1 + 16); if ( !_InterlockedDecrement64((volatile signed long long *)result) ) return (**(long long ( ***)(_QWORD))(result + 8))(*(_QWORD *)(result + 8)); return result; }
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskImEEOmEENS0_13when_all_taskIT0_EET_.resume: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOVZX EAX,byte ptr [RDI + 0x38] CMP EAX,0x2 JZ 0x0010277c CMP EAX,0x1 JNZ 0x0010271b MOV RDI,qword ptr [RBX + 0x28] JMP 0x0010273e LAB_0010271b: MOV RDI,qword ptr [RBX + 0x30] MOV qword ptr [RBX + 0x28],RDI CMP qword ptr [RDI],0x0 JZ 0x0010273e MOV byte ptr [RBX + 0x38],0x1 MOV qword ptr [RDI + 0x10],RBX MOV RDI,qword ptr [RBX + 0x28] ADD RSP,0x8 POP RBX POP R14 JMP qword ptr [RDI] LAB_0010273e: LEA R14,[RBX + 0x10] ADD RDI,0x10 LAB_00102746: CALL 0x0010309a MOV qword ptr [RBX + 0x20],RAX MOV byte ptr [RBX + 0x38],0x2 MOV RAX,qword ptr [RBX + 0x10] DEC.LOCK qword ptr [RAX] JNZ 0x00102797 MOV RDI,qword ptr [RAX + 0x8] LAB_00102761: CALL qword ptr [RDI] LAB_00102763: JMP 0x00102797 LAB_0010277c: MOV qword ptr [RBX],0x0 MOV byte ptr [RBX + 0x38],0x3 MOV RAX,qword ptr [RBX + 0x10] DEC.LOCK qword ptr [RAX] JNZ 0x00102797 MOV RDI,qword ptr [RAX + 0x8] LAB_00102795: CALL qword ptr [RDI] LAB_00102797: ADD RSP,0x8 POP RBX POP R14 RET
void _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskImEEOmEENS0_13when_all_taskIT0_EET__resume (int8 *param_1) { int8 uVar1; long *plVar2; if (*(char *)(param_1 + 7) == '\x02') { *param_1 = 0; *(int1 *)(param_1 + 7) = 3; plVar2 = (long *)param_1[2]; LOCK(); *plVar2 = *plVar2 + -1; UNLOCK(); if (*plVar2 == 0) { /* try { // try from 00102795 to 00102796 has its CatchHandler @ 001027b2 */ (**(code **)plVar2[1])(); } } else { if (*(char *)(param_1 + 7) == '\x01') { plVar2 = (long *)param_1[5]; } else { plVar2 = (long *)param_1[6]; param_1[5] = plVar2; if (*plVar2 != 0) { *(int1 *)(param_1 + 7) = 1; plVar2[2] = (long)param_1; /* WARNING: Could not recover jumptable at 0x0010273c. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)param_1[5])(); return; } } /* try { // try from 00102746 to 0010274a has its CatchHandler @ 00102767 */ uVar1 = coro::detail::promise<unsigned_long>::result((promise<unsigned_long> *)(plVar2 + 2)); param_1[4] = uVar1; *(int1 *)(param_1 + 7) = 2; plVar2 = (long *)param_1[2]; LOCK(); *plVar2 = *plVar2 + -1; UNLOCK(); if (*plVar2 == 0) { /* try { // try from 00102761 to 00102762 has its CatchHandler @ 00102765 */ (**(code **)plVar2[1])(); } } return; }
45,445
get_deepest_feature_layer
llama.cpp/examples/llava/clip.cpp
int get_deepest_feature_layer(const struct clip_ctx * ctx) { // Get the index of the second to last layer; this is the // default for models that have a llava projector const auto & hparams = ctx->vision_model.hparams; int n_layer = hparams.n_layer - 1; int deepest_feature_layer = -1; // Handle other projectors; incrementing here indicates that we // should use the last encoder layer for the vision features. if (ctx->has_minicpmv_projector || ctx->has_glm_projector || ctx->has_qwen2vl_merger) { n_layer += 1; } // If we set explicit vision feature layers, only go up to the deepest one for (const auto & feature_layer : hparams.vision_feature_layer) { if (feature_layer > deepest_feature_layer) { deepest_feature_layer = feature_layer; } } return deepest_feature_layer < 0 ? n_layer : deepest_feature_layer; }
O3
cpp
get_deepest_feature_layer: movl 0x28(%rdi), %ecx cmpb $0x0, 0x3(%rdi) jne 0x282ae cmpb $0x0, 0x4(%rdi) jne 0x282ae cmpb $0x1, 0x5(%rdi) je 0x282ae decl %ecx movq 0x68(%rdi), %rdx testq %rdx, %rdx je 0x282d1 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl 0x8(%rdx), %esi cmpl %eax, %esi cmovgl %esi, %eax movq (%rdx), %rdx testq %rdx, %rdx jne 0x282bc testl %eax, %eax js 0x282d1 retq movl %ecx, %eax retq
get_deepest_feature_layer: mov ecx, [rdi+28h] cmp byte ptr [rdi+3], 0 jnz short loc_282AE cmp byte ptr [rdi+4], 0 jnz short loc_282AE cmp byte ptr [rdi+5], 1 jz short loc_282AE dec ecx loc_282AE: mov rdx, [rdi+68h] test rdx, rdx jz short loc_282D1 mov eax, 0FFFFFFFFh loc_282BC: mov esi, [rdx+8] cmp esi, eax cmovg eax, esi mov rdx, [rdx] test rdx, rdx jnz short loc_282BC test eax, eax js short loc_282D1 retn loc_282D1: mov eax, ecx retn
long long get_deepest_feature_layer(long long a1) { unsigned int v1; // ecx long long *v2; // rdx long long result; // rax int v4; // esi v1 = *(_DWORD *)(a1 + 40); if ( !*(_BYTE *)(a1 + 3) && !*(_BYTE *)(a1 + 4) && *(_BYTE *)(a1 + 5) != 1 ) --v1; v2 = *(long long **)(a1 + 104); if ( !v2 ) return v1; result = 0xFFFFFFFFLL; do { v4 = *((_DWORD *)v2 + 2); if ( v4 > (int)result ) result = (unsigned int)v4; v2 = (long long *)*v2; } while ( v2 ); if ( (int)result < 0 ) return v1; return result; }
get_deepest_feature_layer: MOV ECX,dword ptr [RDI + 0x28] CMP byte ptr [RDI + 0x3],0x0 JNZ 0x001282ae CMP byte ptr [RDI + 0x4],0x0 JNZ 0x001282ae CMP byte ptr [RDI + 0x5],0x1 JZ 0x001282ae DEC ECX LAB_001282ae: MOV RDX,qword ptr [RDI + 0x68] TEST RDX,RDX JZ 0x001282d1 MOV EAX,0xffffffff LAB_001282bc: MOV ESI,dword ptr [RDX + 0x8] CMP ESI,EAX CMOVG EAX,ESI MOV RDX,qword ptr [RDX] TEST RDX,RDX JNZ 0x001282bc TEST EAX,EAX JS 0x001282d1 RET LAB_001282d1: MOV EAX,ECX RET
int get_deepest_feature_layer(long param_1) { int iVar1; int iVar2; long *plVar3; iVar2 = *(int *)(param_1 + 0x28); if (((*(char *)(param_1 + 3) == '\0') && (*(char *)(param_1 + 4) == '\0')) && (*(char *)(param_1 + 5) != '\x01')) { iVar2 = iVar2 + -1; } plVar3 = *(long **)(param_1 + 0x68); if (plVar3 != (long *)0x0) { iVar1 = -1; do { if (iVar1 < (int)plVar3[1]) { iVar1 = (int)plVar3[1]; } plVar3 = (long *)*plVar3; } while (plVar3 != (long *)0x0); if (-1 < iVar1) { return iVar1; } } return iVar2; }
45,446
testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line) : severity_(severity) { const char* const marker = severity == GTEST_INFO ? "[ INFO ]" : severity == GTEST_WARNING ? "[WARNING]" : severity == GTEST_ERROR ? "[ ERROR ]" : "[ FATAL ]"; GetStream() << ::std::endl << marker << " " << FormatFileLocation(file, line).c_str() << ": "; }
O0
cpp
testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x60(%rbp) movl -0xc(%rbp), %ecx movl %ecx, (%rax) cmpl $0x0, -0xc(%rbp) jne 0x1f4c9 leaq 0x5b5a9(%rip), %rax # 0x7aa6c movq %rax, -0x68(%rbp) jmp 0x1f50c cmpl $0x1, -0xc(%rbp) jne 0x1f4dc leaq 0x5b5a0(%rip), %rax # 0x7aa76 movq %rax, -0x70(%rbp) jmp 0x1f504 cmpl $0x2, -0xc(%rbp) jne 0x1f4ef leaq 0x5b597(%rip), %rax # 0x7aa80 movq %rax, -0x78(%rbp) jmp 0x1f4fc leaq 0x5b594(%rip), %rax # 0x7aa8a movq %rax, -0x78(%rbp) jmp 0x1f4fc movq -0x78(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rdi movq -0x68(%rbp), %rax movq %rax, -0x28(%rbp) callq 0x14d40 movq %rax, %rdi movq 0x8ea81(%rip), %rsi # 0xadfa8 callq 0xa690 movq %rax, %rdi movq -0x28(%rbp), %rsi callq 0xa600 movq %rax, %rdi leaq 0x5bc4b(%rip), %rsi # 0x7b18d callq 0xa600 movq %rax, -0x88(%rbp) movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx leaq -0x48(%rbp), %rdi movq %rdi, -0x90(%rbp) callq 0x1f110 movq -0x90(%rbp), %rdi callq 0xa260 movq -0x88(%rbp), %rdi movq %rax, %rsi callq 0xa600 movq %rax, -0x80(%rbp) jmp 0x1f586 movq -0x80(%rbp), %rdi leaq 0x5c76f(%rip), %rsi # 0x7bd00 callq 0xa600 jmp 0x1f598 leaq -0x48(%rbp), %rdi callq 0xad98 addq $0x90, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x48(%rbp), %rdi callq 0xad98 movq -0x50(%rbp), %rdi callq 0xac00 nopl (%rax,%rax)
_ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov rax, [rbp+var_8] mov [rbp+var_60], rax mov ecx, [rbp+var_C] mov [rax], ecx cmp [rbp+var_C], 0 jnz short loc_1F4C9 lea rax, aInfo; "[ INFO ]" mov [rbp+var_68], rax jmp short loc_1F50C loc_1F4C9: cmp [rbp+var_C], 1 jnz short loc_1F4DC lea rax, aWarning; "[WARNING]" mov [rbp+var_70], rax jmp short loc_1F504 loc_1F4DC: cmp [rbp+var_C], 2 jnz short loc_1F4EF lea rax, aError; "[ ERROR ]" mov [rbp+var_78], rax jmp short loc_1F4FC loc_1F4EF: lea rax, aFatal; "[ FATAL ]" mov [rbp+var_78], rax jmp short $+2 loc_1F4FC: mov rax, [rbp+var_78] mov [rbp+var_70], rax loc_1F504: mov rax, [rbp+var_70] mov [rbp+var_68], rax loc_1F50C: mov rdi, [rbp+var_60]; this mov rax, [rbp+var_68] mov [rbp+var_28], rax call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov rdi, rax mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) mov rdi, rax mov rsi, [rbp+var_28] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, asc_7B18B+2; " " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_88], rax mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] lea rdi, [rbp+var_48] mov [rbp+var_90], rdi call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int) mov rdi, [rbp+var_90] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rbp+var_88] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_80], rax jmp short $+2 loc_1F586: mov rdi, [rbp+var_80] lea rsi, asc_7BCFF+1; ": " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_1F598: lea rdi, [rbp+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 90h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_50] call __Unwind_Resume
void testing::internal::GTestLog::GTestLog(testing::internal::GTestLog *a1, int a2, const char *a3, int a4) { void *Stream; // rax long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // [rsp+8h] [rbp-88h] long long v9; // [rsp+10h] [rbp-80h] const char *v10; // [rsp+18h] [rbp-78h] const char *v11; // [rsp+20h] [rbp-70h] const char *v12; // [rsp+28h] [rbp-68h] _BYTE v13[32]; // [rsp+48h] [rbp-48h] BYREF const char *v14; // [rsp+68h] [rbp-28h] int v15; // [rsp+74h] [rbp-1Ch] const char *v16; // [rsp+78h] [rbp-18h] int v17; // [rsp+84h] [rbp-Ch] testing::internal::GTestLog *v18; // [rsp+88h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; *(_DWORD *)a1 = a2; if ( v17 ) { if ( v17 == 1 ) { v11 = "[WARNING]"; } else { if ( v17 == 2 ) v10 = "[ ERROR ]"; else v10 = "[ FATAL ]"; v11 = v10; } v12 = v11; } else { v12 = "[ INFO ]"; } v14 = v12; Stream = testing::internal::GTestLog::GetStream(a1); v5 = std::ostream::operator<<(Stream, &std::endl<char,std::char_traits<char>>); v6 = std::operator<<<std::char_traits<char>>(v5, v12); v8 = std::operator<<<std::char_traits<char>>(v6, " "); testing::internal::FormatFileLocation[abi:cxx11]((long long)v13, v16, v15); v7 = std::string::c_str(v13); v9 = std::operator<<<std::char_traits<char>>(v8, v7); std::operator<<<std::char_traits<char>>(v9, ": "); std::string::~string(v13); }
GTestLog: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x60],RAX MOV ECX,dword ptr [RBP + -0xc] MOV dword ptr [RAX],ECX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x0011f4c9 LEA RAX,[0x17aa6c] MOV qword ptr [RBP + -0x68],RAX JMP 0x0011f50c LAB_0011f4c9: CMP dword ptr [RBP + -0xc],0x1 JNZ 0x0011f4dc LEA RAX,[0x17aa76] MOV qword ptr [RBP + -0x70],RAX JMP 0x0011f504 LAB_0011f4dc: CMP dword ptr [RBP + -0xc],0x2 JNZ 0x0011f4ef LEA RAX,[0x17aa80] MOV qword ptr [RBP + -0x78],RAX JMP 0x0011f4fc LAB_0011f4ef: LEA RAX,[0x17aa8a] MOV qword ptr [RBP + -0x78],RAX JMP 0x0011f4fc LAB_0011f4fc: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x70],RAX LAB_0011f504: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x68],RAX LAB_0011f50c: MOV RDI,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x28],RAX CALL 0x00114d40 MOV RDI,RAX MOV RSI,qword ptr [0x001adfa8] CALL 0x0010a690 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x28] CALL 0x0010a600 MOV RDI,RAX LEA RSI,[0x17b18d] CALL 0x0010a600 MOV qword ptr [RBP + -0x88],RAX MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] LEA RDI,[RBP + -0x48] MOV qword ptr [RBP + -0x90],RDI CALL 0x0011f110 MOV RDI,qword ptr [RBP + -0x90] CALL 0x0010a260 MOV RDI,qword ptr [RBP + -0x88] MOV RSI,RAX LAB_0011f57b: CALL 0x0010a600 MOV qword ptr [RBP + -0x80],RAX JMP 0x0011f586 LAB_0011f586: MOV RDI,qword ptr [RBP + -0x80] LEA RSI,[0x17bd00] CALL 0x0010a600 LAB_0011f596: JMP 0x0011f598 LAB_0011f598: LEA RDI,[RBP + -0x48] CALL 0x0010ad98 ADD RSP,0x90 POP RBP RET
/* testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity, char const*, int) */ void __thiscall testing::internal::GTestLog::GTestLog(GTestLog *this,int param_2,char *param_3,int param_4) { ostream *poVar1; char *pcVar2; char *local_80; char *local_78; char *local_70; internal local_50 [32]; char *local_30; int local_24; char *local_20; int local_14; GTestLog *local_10; *(int *)this = param_2; if (param_2 == 0) { local_70 = "[ INFO ]"; } else { if (param_2 == 1) { local_78 = "[WARNING]"; } else { if (param_2 == 2) { local_80 = "[ ERROR ]"; } else { local_80 = "[ FATAL ]"; } local_78 = local_80; } local_70 = local_78; } local_30 = local_70; local_24 = param_4; local_20 = param_3; local_14 = param_2; local_10 = this; poVar1 = (ostream *)GetStream(); poVar1 = (ostream *) std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_001adfa8); poVar1 = std::operator<<(poVar1,local_30); poVar1 = std::operator<<(poVar1," "); FormatFileLocation_abi_cxx11_(local_50,local_20,local_24); pcVar2 = (char *)std::__cxx11::string::c_str(); /* try { // try from 0011f57b to 0011f595 has its CatchHandler @ 0011f5aa */ poVar1 = std::operator<<(poVar1,pcVar2); std::operator<<(poVar1,": "); std::__cxx11::string::~string((string *)local_50); return; }
45,447
my_rnd_ssl
eloqsql/mysys/my_rnd.c
double my_rnd_ssl(struct my_rnd_struct *rand_st) { #if defined(HAVE_OPENSSL) rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int)); if (rc) return (double)res / (double)UINT_MAX; #endif /* defined(HAVE_OPENSSL) */ return my_rnd(rand_st); }
O3
c
my_rnd_ssl: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rsi leaq (%rax,%rax,2), %rax addq %rsi, %rax movq 0x10(%rdi), %r8 xorl %edx, %edx divq %r8 movq %rdx, %rcx leaq (%rsi,%rdx), %rax addq $0x21, %rax xorl %edx, %edx divq %r8 movq %rdx, 0x8(%rdi) movq %rcx, (%rdi) movq %rcx, %xmm1 punpckldq 0x2eded(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] subpd 0x2edf5(%rip), %xmm1 # 0xde130 movapd %xmm1, %xmm0 unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1] addsd %xmm1, %xmm0 divsd 0x18(%rdi), %xmm0 popq %rbp retq nop
my_rnd_ssl: push rbp mov rbp, rsp mov rax, [rdi] mov rsi, [rdi+8] lea rax, [rax+rax*2] add rax, rsi mov r8, [rdi+10h] xor edx, edx div r8 mov rcx, rdx lea rax, [rsi+rdx] add rax, 21h ; '!' xor edx, edx div r8 mov [rdi+8], rdx mov [rdi], rcx movq xmm1, rcx punpckldq xmm1, cs:xmmword_DE120 subpd xmm1, cs:xmmword_DE130 movapd xmm0, xmm1 unpckhpd xmm0, xmm1 addsd xmm0, xmm1 divsd xmm0, qword ptr [rdi+18h] pop rbp retn
double my_rnd_ssl(long long a1) { long long v1; // rsi unsigned long long v2; // r8 unsigned long long v3; // rcx __m128d v4; // xmm1 v1 = *(_QWORD *)(a1 + 8); v2 = *(_QWORD *)(a1 + 16); v3 = (v1 + 3LL * *(_QWORD *)a1) % v2; *(_QWORD *)(a1 + 8) = (v1 + v3 + 33) % v2; *(_QWORD *)a1 = v3; v4 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v3, (__m128i)xmmword_DE120), (__m128d)xmmword_DE130); return (_mm_unpackhi_pd(v4, v4).m128d_f64[0] + v4.m128d_f64[0]) / *(double *)(a1 + 24); }
my_rnd_ssl: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] LEA RAX,[RAX + RAX*0x2] ADD RAX,RSI MOV R8,qword ptr [RDI + 0x10] XOR EDX,EDX DIV R8 MOV RCX,RDX LEA RAX,[RSI + RDX*0x1] ADD RAX,0x21 XOR EDX,EDX DIV R8 MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RDI],RCX MOVQ XMM1,RCX PUNPCKLDQ XMM1,xmmword ptr [0x001de120] SUBPD XMM1,xmmword ptr [0x001de130] MOVAPD XMM0,XMM1 UNPCKHPD XMM0,XMM1 ADDSD XMM0,XMM1 DIVSD XMM0,qword ptr [RDI + 0x18] POP RBP RET
ulong my_rnd_ssl(ulong *param_1) { ulong uVar1; ulong uVar2; ulong uVar3; uVar1 = param_1[2]; uVar3 = (*param_1 * 3 + param_1[1]) % uVar1; uVar2 = param_1[1] + uVar3 + 0x21; param_1[1] = uVar2 % uVar1; *param_1 = uVar3; return uVar2 / uVar1; }
45,448
check_mb_ujis
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_ujis(const char *start, const char *end) { if (*(uchar*)start < 0x80) { return 0; /* invalid ujis character */ } if (valid_ujis(*(start)) && valid_ujis(*((start)+1))) { return 2; } if (valid_ujis_ss2(*(start)) && valid_ujis_kata(*((start)+1))) { return 2; } if (valid_ujis_ss3(*(start)) && (end-start) > 2 && valid_ujis(*((start)+1)) && valid_ujis(*((start)+2))) { return 3; } return 0; }
O0
c
check_mb_ujis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x9dd96 movl $0x0, -0x4(%rbp) jmp 0x9deca movq -0x10(%rbp), %rax movsbl (%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x9ddf6 movq -0x10(%rbp), %rax movsbl (%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x9ddf6 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x9ddf6 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x9ddf6 movl $0x2, -0x4(%rbp) jmp 0x9deca movq -0x10(%rbp), %rax movsbl (%rax), %eax andl $0xff, %eax cmpl $0x8e, %eax jne 0x9de40 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x9de40 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax andl $0xff, %eax cmpl $0xdf, %eax jg 0x9de40 movl $0x2, -0x4(%rbp) jmp 0x9deca movq -0x10(%rbp), %rax movsbl (%rax), %eax andl $0xff, %eax cmpl $0x8f, %eax jne 0x9dec3 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax cmpq $0x2, %rax jle 0x9dec3 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x9dec3 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x9dec3 movq -0x10(%rbp), %rax movsbl 0x2(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x9dec3 movq -0x10(%rbp), %rax movsbl 0x2(%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x9dec3 movl $0x3, -0x4(%rbp) jmp 0x9deca movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
check_mb_ujis: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_9DD96 mov [rbp+var_4], 0 jmp loc_9DECA loc_9DD96: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_9DDF6 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] and eax, 0FFh cmp eax, 0FEh jg short loc_9DDF6 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+1] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_9DDF6 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] and eax, 0FFh cmp eax, 0FEh jg short loc_9DDF6 mov [rbp+var_4], 2 jmp loc_9DECA loc_9DDF6: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] and eax, 0FFh cmp eax, 8Eh jnz short loc_9DE40 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+1] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_9DE40 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] and eax, 0FFh cmp eax, 0DFh jg short loc_9DE40 mov [rbp+var_4], 2 jmp loc_9DECA loc_9DE40: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] and eax, 0FFh cmp eax, 8Fh jnz short loc_9DEC3 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx cmp rax, 2 jle short loc_9DEC3 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+1] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_9DEC3 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] and eax, 0FFh cmp eax, 0FEh jg short loc_9DEC3 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+2] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_9DEC3 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+2] and eax, 0FFh cmp eax, 0FEh jg short loc_9DEC3 mov [rbp+var_4], 3 jmp short loc_9DECA loc_9DEC3: mov [rbp+var_4], 0 loc_9DECA: mov eax, [rbp+var_4] pop rbp retn
long long check_mb_ujis(unsigned __int8 *a1, long long a2) { if ( *a1 >= 0x80u ) { if ( *a1 < 0xA1u || *a1 == 255 || a1[1] < 0xA1u || a1[1] == 255 ) { if ( *a1 == 142 && a1[1] >= 0xA1u && a1[1] <= 0xDFu ) { return 2; } else if ( *a1 != 143 || a2 - (long long)a1 <= 2 || a1[1] < 0xA1u || a1[1] == 255 || a1[2] < 0xA1u || a1[2] == 255 ) { return 0; } else { return 3; } } else { return 2; } } else { return 0; } }
check_mb_ujis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x0019dd96 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019deca LAB_0019dd96: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x0019ddf6 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] AND EAX,0xff CMP EAX,0xfe JG 0x0019ddf6 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x1] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x0019ddf6 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] AND EAX,0xff CMP EAX,0xfe JG 0x0019ddf6 MOV dword ptr [RBP + -0x4],0x2 JMP 0x0019deca LAB_0019ddf6: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] AND EAX,0xff CMP EAX,0x8e JNZ 0x0019de40 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x1] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x0019de40 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] AND EAX,0xff CMP EAX,0xdf JG 0x0019de40 MOV dword ptr [RBP + -0x4],0x2 JMP 0x0019deca LAB_0019de40: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] AND EAX,0xff CMP EAX,0x8f JNZ 0x0019dec3 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX CMP RAX,0x2 JLE 0x0019dec3 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x1] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x0019dec3 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] AND EAX,0xff CMP EAX,0xfe JG 0x0019dec3 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x2] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x0019dec3 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x2] AND EAX,0xff CMP EAX,0xfe JG 0x0019dec3 MOV dword ptr [RBP + -0x4],0x3 JMP 0x0019deca LAB_0019dec3: MOV dword ptr [RBP + -0x4],0x0 LAB_0019deca: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 check_mb_ujis(byte *param_1,long param_2) { int4 local_c; if (*param_1 < 0x80) { local_c = 0; } else if ((((*param_1 < 0xa1) || (0xfe < *param_1)) || (param_1[1] < 0xa1)) || (0xfe < param_1[1])) { if (((*param_1 == 0x8e) && (0xa0 < param_1[1])) && (param_1[1] < 0xe0)) { local_c = 2; } else if (((*param_1 == 0x8f) && (2 < param_2 - (long)param_1)) && ((0xa0 < param_1[1] && (((param_1[1] < 0xff && (0xa0 < param_1[2])) && (param_1[2] < 0xff)))))) { local_c = 3; } else { local_c = 0; } } else { local_c = 2; } return local_c; }
45,449
pretty_print_str(st_io_cache*, char const*, unsigned long, bool)
eloqsql/sql/log_event_client.cc
static bool pretty_print_str(IO_CACHE* cache, const char* str, size_t len, bool identifier) { const char* end = str + len; if (my_b_write_byte(cache, identifier ? '`' : '\'')) goto err; while (str < end) { char c; int error; switch ((c=*str++)) { case '\n': error= my_b_write(cache, (uchar*)"\\n", 2); break; case '\r': error= my_b_write(cache, (uchar*)"\\r", 2); break; case '\\': error= my_b_write(cache, (uchar*)"\\\\", 2); break; case '\b': error= my_b_write(cache, (uchar*)"\\b", 2); break; case '\t': error= my_b_write(cache, (uchar*)"\\t", 2); break; case '\'': error= my_b_write(cache, (uchar*)"\\'", 2); break; case 0 : error= my_b_write(cache, (uchar*)"\\0", 2); break; default: error= my_b_write_byte(cache, c); break; } if (unlikely(error)) goto err; } return my_b_write_byte(cache, identifier ? '`' : '\''); err: return 1; }
O0
cpp
pretty_print_str(st_io_cache*, char const*, unsigned long, bool): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) andb $0x1, %al movb %al, -0x21(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movb -0x21(%rbp), %cl movb $0x60, %al movb $0x27, %dl movb %dl, -0x3a(%rbp) testb $0x1, %cl movb %al, -0x39(%rbp) jne 0x65117 movb -0x3a(%rbp), %al movb %al, -0x39(%rbp) movq -0x48(%rbp), %rdi movb -0x39(%rbp), %al movzbl %al, %esi callq 0x528f0 cmpb $0x0, %al je 0x6512f jmp 0x652c4 jmp 0x65131 movq -0x18(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x65289 movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movsbl (%rax), %eax movl %eax, -0x4c(%rbp) movb %al, %cl movb %cl, -0x31(%rbp) testl %eax, %eax je 0x6524f jmp 0x65162 movl -0x4c(%rbp), %eax subl $0x8, %eax je 0x65201 jmp 0x65170 movl -0x4c(%rbp), %eax subl $0x9, %eax je 0x6521b jmp 0x6517e movl -0x4c(%rbp), %eax subl $0xa, %eax je 0x651ad jmp 0x65188 movl -0x4c(%rbp), %eax subl $0xd, %eax je 0x651ca jmp 0x65192 movl -0x4c(%rbp), %eax subl $0x27, %eax je 0x65235 jmp 0x651a0 movl -0x4c(%rbp), %eax subl $0x5c, %eax je 0x651e7 jmp 0x65269 movq -0x10(%rbp), %rdi leaq 0xad503(%rip), %rsi # 0x1126bb movl $0x2, %edx callq 0x53060 movl %eax, -0x38(%rbp) jmp 0x6527c movq -0x10(%rbp), %rdi leaq 0xad4e9(%rip), %rsi # 0x1126be movl $0x2, %edx callq 0x53060 movl %eax, -0x38(%rbp) jmp 0x6527c movq -0x10(%rbp), %rdi leaq 0xad4c0(%rip), %rsi # 0x1126b2 movl $0x2, %edx callq 0x53060 movl %eax, -0x38(%rbp) jmp 0x6527c movq -0x10(%rbp), %rdi leaq 0xaf701(%rip), %rsi # 0x11490d movl $0x2, %edx callq 0x53060 movl %eax, -0x38(%rbp) jmp 0x6527c movq -0x10(%rbp), %rdi leaq 0xaf6ea(%rip), %rsi # 0x114910 movl $0x2, %edx callq 0x53060 movl %eax, -0x38(%rbp) jmp 0x6527c movq -0x10(%rbp), %rdi leaq 0xad478(%rip), %rsi # 0x1126b8 movl $0x2, %edx callq 0x53060 movl %eax, -0x38(%rbp) jmp 0x6527c movq -0x10(%rbp), %rdi leaq 0xad45b(%rip), %rsi # 0x1126b5 movl $0x2, %edx callq 0x53060 movl %eax, -0x38(%rbp) jmp 0x6527c movq -0x10(%rbp), %rdi movzbl -0x31(%rbp), %esi callq 0x528f0 movsbl %al, %eax movl %eax, -0x38(%rbp) cmpl $0x0, -0x38(%rbp) je 0x65284 jmp 0x652c4 jmp 0x65131 movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movb -0x21(%rbp), %cl movb $0x60, %al movb $0x27, %dl movb %dl, -0x4e(%rbp) testb $0x1, %cl movb %al, -0x4d(%rbp) jne 0x652a9 movb -0x4e(%rbp), %al movb %al, -0x4d(%rbp) movq -0x58(%rbp), %rdi movb -0x4d(%rbp), %al movzbl %al, %esi callq 0x528f0 cmpb $0x0, %al setne %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x652c8 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZL16pretty_print_strP11st_io_cachePKcmb: push rbp mov rbp, rsp sub rsp, 60h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx and al, 1 mov [rbp+var_21], al mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov [rbp+var_48], rax mov cl, [rbp+var_21] mov al, 60h ; '`' mov dl, 27h ; ''' mov [rbp+var_3A], dl test cl, 1 mov [rbp+var_39], al jnz short loc_65117 mov al, [rbp+var_3A] mov [rbp+var_39], al loc_65117: mov rdi, [rbp+var_48] mov al, [rbp+var_39] movzx esi, al call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar) cmp al, 0 jz short loc_6512F jmp loc_652C4 loc_6512F: jmp short $+2 loc_65131: mov rax, [rbp+var_18] cmp rax, [rbp+var_30] jnb loc_65289 mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movsx eax, byte ptr [rax] mov [rbp+var_4C], eax mov cl, al mov [rbp+var_31], cl test eax, eax jz loc_6524F jmp short $+2 loc_65162: mov eax, [rbp+var_4C] sub eax, 8 jz loc_65201 jmp short $+2 loc_65170: mov eax, [rbp+var_4C] sub eax, 9 jz loc_6521B jmp short $+2 loc_6517E: mov eax, [rbp+var_4C] sub eax, 0Ah jz short loc_651AD jmp short $+2 loc_65188: mov eax, [rbp+var_4C] sub eax, 0Dh jz short loc_651CA jmp short $+2 loc_65192: mov eax, [rbp+var_4C] sub eax, 27h ; ''' jz loc_65235 jmp short $+2 loc_651A0: mov eax, [rbp+var_4C] sub eax, 5Ch ; '\' jz short loc_651E7 jmp loc_65269 loc_651AD: mov rdi, [rbp+var_10] lea rsi, aN; "\\n" mov edx, 2 call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong) mov [rbp+var_38], eax jmp loc_6527C loc_651CA: mov rdi, [rbp+var_10] lea rsi, aR; "\\r" mov edx, 2 call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong) mov [rbp+var_38], eax jmp loc_6527C loc_651E7: mov rdi, [rbp+var_10] lea rsi, asc_1126B2; "\\\\" mov edx, 2 call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong) mov [rbp+var_38], eax jmp short loc_6527C loc_65201: mov rdi, [rbp+var_10] lea rsi, aB; "\\b" mov edx, 2 call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong) mov [rbp+var_38], eax jmp short loc_6527C loc_6521B: mov rdi, [rbp+var_10] lea rsi, aT; "\\t" mov edx, 2 call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong) mov [rbp+var_38], eax jmp short loc_6527C loc_65235: mov rdi, [rbp+var_10] lea rsi, asc_1126B8; "\\'" mov edx, 2 call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong) mov [rbp+var_38], eax jmp short loc_6527C loc_6524F: mov rdi, [rbp+var_10] lea rsi, a0; "\\0" mov edx, 2 call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong) mov [rbp+var_38], eax jmp short loc_6527C loc_65269: mov rdi, [rbp+var_10] movzx esi, [rbp+var_31] call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar) movsx eax, al mov [rbp+var_38], eax loc_6527C: cmp [rbp+var_38], 0 jz short loc_65284 jmp short loc_652C4 loc_65284: jmp loc_65131 loc_65289: mov rax, [rbp+var_10] mov [rbp+var_58], rax mov cl, [rbp+var_21] mov al, 60h ; '`' mov dl, 27h ; ''' mov [rbp+var_4E], dl test cl, 1 mov [rbp+var_4D], al jnz short loc_652A9 mov al, [rbp+var_4E] mov [rbp+var_4D], al loc_652A9: mov rdi, [rbp+var_58] mov al, [rbp+var_4D] movzx esi, al call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar) cmp al, 0 setnz al and al, 1 mov [rbp+var_1], al jmp short loc_652C8 loc_652C4: mov [rbp+var_1], 1 loc_652C8: mov al, [rbp+var_1] and al, 1 add rsp, 60h pop rbp retn
bool pretty_print_str(long long a1, char *a2, long long a3, char a4) { char *v4; // rax char v6; // [rsp+13h] [rbp-4Dh] int v7; // [rsp+14h] [rbp-4Ch] char v8; // [rsp+27h] [rbp-39h] int v9; // [rsp+28h] [rbp-38h] unsigned long long v10; // [rsp+30h] [rbp-30h] char v11; // [rsp+3Fh] [rbp-21h] char *v12; // [rsp+48h] [rbp-18h] v12 = a2; v11 = a4 & 1; v10 = (unsigned long long)&a2[a3]; v8 = 96; if ( (a4 & 1) == 0 ) v8 = 39; if ( my_b_write_byte(a1, v8) ) { return 1; } else { while ( (unsigned long long)v12 < v10 ) { v4 = v12++; v7 = *v4; if ( *v4 ) { switch ( v7 ) { case 8: v9 = my_b_write(a1, (long long)"\\b", 2LL); break; case 9: v9 = my_b_write(a1, (long long)"\\t", 2LL); break; case 10: v9 = my_b_write(a1, (long long)"\\n", 2LL); break; case 13: v9 = my_b_write(a1, (long long)"\\r", 2LL); break; case 39: v9 = my_b_write(a1, (long long)"\\'", 2LL); break; case 92: v9 = my_b_write(a1, (long long)"\\\\", 2LL); break; default: v9 = my_b_write_byte(a1, *v4); break; } } else { v9 = my_b_write(a1, (long long)"\\0", 2LL); } if ( v9 ) return 1; } v6 = 96; if ( (v11 & 1) == 0 ) v6 = 39; return my_b_write_byte(a1, v6) != 0; } }
pretty_print_str: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX AND AL,0x1 MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX MOV CL,byte ptr [RBP + -0x21] MOV AL,0x60 MOV DL,0x27 MOV byte ptr [RBP + -0x3a],DL TEST CL,0x1 MOV byte ptr [RBP + -0x39],AL JNZ 0x00165117 MOV AL,byte ptr [RBP + -0x3a] MOV byte ptr [RBP + -0x39],AL LAB_00165117: MOV RDI,qword ptr [RBP + -0x48] MOV AL,byte ptr [RBP + -0x39] MOVZX ESI,AL CALL 0x001528f0 CMP AL,0x0 JZ 0x0016512f JMP 0x001652c4 LAB_0016512f: JMP 0x00165131 LAB_00165131: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00165289 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x4c],EAX MOV CL,AL MOV byte ptr [RBP + -0x31],CL TEST EAX,EAX JZ 0x0016524f JMP 0x00165162 LAB_00165162: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x8 JZ 0x00165201 JMP 0x00165170 LAB_00165170: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x9 JZ 0x0016521b JMP 0x0016517e LAB_0016517e: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0xa JZ 0x001651ad JMP 0x00165188 LAB_00165188: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0xd JZ 0x001651ca JMP 0x00165192 LAB_00165192: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x27 JZ 0x00165235 JMP 0x001651a0 LAB_001651a0: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x5c JZ 0x001651e7 JMP 0x00165269 LAB_001651ad: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x2126bb] MOV EDX,0x2 CALL 0x00153060 MOV dword ptr [RBP + -0x38],EAX JMP 0x0016527c LAB_001651ca: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x2126be] MOV EDX,0x2 CALL 0x00153060 MOV dword ptr [RBP + -0x38],EAX JMP 0x0016527c LAB_001651e7: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x2126b2] MOV EDX,0x2 CALL 0x00153060 MOV dword ptr [RBP + -0x38],EAX JMP 0x0016527c LAB_00165201: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x21490d] MOV EDX,0x2 CALL 0x00153060 MOV dword ptr [RBP + -0x38],EAX JMP 0x0016527c LAB_0016521b: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x214910] MOV EDX,0x2 CALL 0x00153060 MOV dword ptr [RBP + -0x38],EAX JMP 0x0016527c LAB_00165235: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x2126b8] MOV EDX,0x2 CALL 0x00153060 MOV dword ptr [RBP + -0x38],EAX JMP 0x0016527c LAB_0016524f: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x2126b5] MOV EDX,0x2 CALL 0x00153060 MOV dword ptr [RBP + -0x38],EAX JMP 0x0016527c LAB_00165269: MOV RDI,qword ptr [RBP + -0x10] MOVZX ESI,byte ptr [RBP + -0x31] CALL 0x001528f0 MOVSX EAX,AL MOV dword ptr [RBP + -0x38],EAX LAB_0016527c: CMP dword ptr [RBP + -0x38],0x0 JZ 0x00165284 JMP 0x001652c4 LAB_00165284: JMP 0x00165131 LAB_00165289: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV CL,byte ptr [RBP + -0x21] MOV AL,0x60 MOV DL,0x27 MOV byte ptr [RBP + -0x4e],DL TEST CL,0x1 MOV byte ptr [RBP + -0x4d],AL JNZ 0x001652a9 MOV AL,byte ptr [RBP + -0x4e] MOV byte ptr [RBP + -0x4d],AL LAB_001652a9: MOV RDI,qword ptr [RBP + -0x58] MOV AL,byte ptr [RBP + -0x4d] MOVZX ESI,AL CALL 0x001528f0 CMP AL,0x0 SETNZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x001652c8 LAB_001652c4: MOV byte ptr [RBP + -0x1],0x1 LAB_001652c8: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x60 POP RBP RET
/* pretty_print_str(st_io_cache*, char const*, unsigned long, bool) */ bool pretty_print_str(st_io_cache *param_1,char *param_2,ulong param_3,bool param_4) { uchar uVar1; char cVar2; uchar local_55; uchar local_41; int local_40; uchar *local_20; local_41 = '`'; if (!param_4) { local_41 = '\''; } cVar2 = my_b_write_byte(param_1,local_41); local_20 = (uchar *)param_2; if (cVar2 == '\0') { do { if (param_2 + param_3 <= local_20) { local_55 = '`'; if (!param_4) { local_55 = '\''; } cVar2 = my_b_write_byte(param_1,local_55); return cVar2 != '\0'; } uVar1 = *local_20; if (uVar1 == '\0') { local_40 = my_b_write(param_1,"\\0",2); } else if (uVar1 == '\b') { local_40 = my_b_write(param_1,"\\b",2); } else if (uVar1 == '\t') { local_40 = my_b_write(param_1,"\\t",2); } else if (uVar1 == '\n') { local_40 = my_b_write(param_1,"\\n",2); } else if (uVar1 == '\r') { local_40 = my_b_write(param_1,"\\r",2); } else if (uVar1 == '\'') { local_40 = my_b_write(param_1,"\\\'",2); } else if (uVar1 == '\\') { local_40 = my_b_write(param_1,"\\\\",2); } else { cVar2 = my_b_write_byte(param_1,uVar1); local_40 = (int)cVar2; } local_20 = local_20 + 1; } while (local_40 == 0); } return true; }
45,450
StartTree::UPGMA_Matrix<float>::cluster(unsigned long, unsigned long)
iqtree3/utils/bionj2.cpp
virtual void cluster(size_t a, size_t b) { double aLength = rows[b][a] * 0.5; double bLength = aLength; size_t aCount = clusters[rowToCluster[a]].countOfExteriorNodes; size_t bCount = clusters[rowToCluster[b]].countOfExteriorNodes; size_t tCount = aCount + bCount; double lambda = (double)aCount / (double)tCount; double mu = 1.0 - lambda; for (size_t i=0; i<n; ++i) { if (i!=a && i!=b) { T Dai = rows[a][i]; T Dbi = rows[b][i]; T Dci = lambda * Dai + mu * Dbi; rows[a][i] = Dci; rows[i][a] = Dci; } } clusters.addCluster ( rowToCluster[a], aLength, rowToCluster[b], bLength); rowToCluster[a] = clusters.size()-1; rowToCluster[b] = rowToCluster[n-1]; removeRowAndColumn(b); }
O0
cpp
StartTree::UPGMA_Matrix<float>::cluster(unsigned long, unsigned long): subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq %rdx, 0x90(%rsp) movq 0xa0(%rsp), %rdi movq %rdi, 0x28(%rsp) movq 0x20(%rdi), %rax movq 0x90(%rsp), %rcx movq (%rax,%rcx,8), %rax movq 0x98(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 cvtss2sd %xmm0, %xmm0 movsd 0x28b0b(%rip), %xmm1 # 0x694e0 mulsd %xmm1, %xmm0 movsd %xmm0, 0x88(%rsp) movsd 0x88(%rsp), %xmm0 movsd %xmm0, 0x80(%rsp) movq %rdi, %rax addq $0x48, %rax movq %rax, 0x38(%rsp) addq $0x30, %rdi movq %rdi, 0x30(%rsp) movq 0x98(%rsp), %rsi callq 0x42750 movq 0x38(%rsp), %rdi movq (%rax), %rsi callq 0x42730 movq 0x30(%rsp), %rdi movq (%rax), %rax movq %rax, 0x78(%rsp) movq 0x90(%rsp), %rsi callq 0x42750 movq 0x38(%rsp), %rdi movq (%rax), %rsi callq 0x42730 movq (%rax), %rax movq %rax, 0x70(%rsp) movq 0x78(%rsp), %rax movq 0x70(%rsp), %rcx addq %rcx, %rax movq %rax, 0x68(%rsp) movaps 0x28c25(%rip), %xmm3 # 0x69690 movq 0x78(%rsp), %xmm0 punpckldq %xmm3, %xmm0 # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1] movapd 0x28c23(%rip), %xmm2 # 0x696a0 subpd %xmm2, %xmm0 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1] addsd %xmm1, %xmm0 movq 0x68(%rsp), %xmm1 punpckldq %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1] subpd %xmm2, %xmm1 movaps %xmm1, %xmm2 unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1] addsd %xmm2, %xmm1 divsd %xmm1, %xmm0 movsd %xmm0, 0x60(%rsp) movsd 0x28a31(%rip), %xmm0 # 0x694e8 subsd 0x60(%rsp), %xmm0 movsd %xmm0, 0x58(%rsp) movq $0x0, 0x50(%rsp) movq 0x28(%rsp), %rcx movq 0x50(%rsp), %rax cmpq 0x8(%rcx), %rax jae 0x40bd6 movq 0x50(%rsp), %rax cmpq 0x98(%rsp), %rax je 0x40bc1 movq 0x50(%rsp), %rax cmpq 0x90(%rsp), %rax je 0x40bc1 movq 0x28(%rsp), %rax movq 0x20(%rax), %rcx movq 0x98(%rsp), %rdx movq (%rcx,%rdx,8), %rcx movq 0x50(%rsp), %rdx movss (%rcx,%rdx,4), %xmm0 movss %xmm0, 0x4c(%rsp) movq 0x20(%rax), %rcx movq 0x90(%rsp), %rdx movq (%rcx,%rdx,8), %rcx movq 0x50(%rsp), %rdx movss (%rcx,%rdx,4), %xmm0 movss %xmm0, 0x48(%rsp) movsd 0x60(%rsp), %xmm0 movss 0x4c(%rsp), %xmm1 cvtss2sd %xmm1, %xmm2 movsd 0x58(%rsp), %xmm1 movss 0x48(%rsp), %xmm3 cvtss2sd %xmm3, %xmm3 mulsd %xmm3, %xmm1 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0x44(%rsp) movss 0x44(%rsp), %xmm0 movq 0x20(%rax), %rcx movq 0x98(%rsp), %rdx movq (%rcx,%rdx,8), %rcx movq 0x50(%rsp), %rdx movss %xmm0, (%rcx,%rdx,4) movss 0x44(%rsp), %xmm0 movq 0x20(%rax), %rax movq 0x50(%rsp), %rcx movq (%rax,%rcx,8), %rax movq 0x98(%rsp), %rcx movss %xmm0, (%rax,%rcx,4) jmp 0x40bc3 movq 0x50(%rsp), %rax addq $0x1, %rax movq %rax, 0x50(%rsp) jmp 0x40acc movq 0x28(%rsp), %rdi movq %rdi, %rax addq $0x48, %rax movq %rax, (%rsp) addq $0x30, %rdi movq 0x98(%rsp), %rsi callq 0x42750 movq 0x28(%rsp), %rdi movq (%rax), %rax movq %rax, 0x8(%rsp) movsd 0x88(%rsp), %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0x14(%rsp) addq $0x30, %rdi movq 0x90(%rsp), %rsi callq 0x42750 movq (%rsp), %rdi movq 0x8(%rsp), %rsi movss 0x14(%rsp), %xmm0 movq (%rax), %rdx movsd 0x80(%rsp), %xmm1 cvtsd2ss %xmm1, %xmm1 callq 0x42770 movq 0x28(%rsp), %rdi addq $0x48, %rdi callq 0x42880 movq 0x28(%rsp), %rdi subq $0x1, %rax movq %rax, 0x18(%rsp) addq $0x30, %rdi movq 0x98(%rsp), %rsi callq 0x42750 movq 0x18(%rsp), %rdx movq %rax, %rcx movq 0x28(%rsp), %rax movq %rdx, (%rcx) movq %rax, %rdi addq $0x30, %rdi movq 0x8(%rax), %rsi subq $0x1, %rsi callq 0x42750 movq 0x28(%rsp), %rdi movq (%rax), %rax movq %rax, 0x20(%rsp) addq $0x30, %rdi movq 0x90(%rsp), %rsi callq 0x42750 movq 0x20(%rsp), %rcx movq 0x28(%rsp), %rdi movq %rcx, (%rax) movq 0x90(%rsp), %rsi callq 0x428a0 addq $0xa8, %rsp retq nopl (%rax)
_ZN9StartTree12UPGMA_MatrixIfE7clusterEmm: sub rsp, 0A8h mov [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_18], rdx mov rdi, [rsp+0A8h+var_8] mov [rsp+0A8h+var_80], rdi mov rax, [rdi+20h] mov rcx, [rsp+0A8h+var_18] mov rax, [rax+rcx*8] mov rcx, [rsp+0A8h+var_10] movss xmm0, dword ptr [rax+rcx*4] cvtss2sd xmm0, xmm0 movsd xmm1, cs:qword_694E0 mulsd xmm0, xmm1 movsd [rsp+0A8h+var_20], xmm0 movsd xmm0, [rsp+0A8h+var_20] movsd [rsp+0A8h+var_28], xmm0 mov rax, rdi add rax, 48h ; 'H' mov [rsp+0A8h+var_70], rax add rdi, 30h ; '0' mov [rsp+0A8h+var_78], rdi mov rsi, [rsp+0A8h+var_10] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+0A8h+var_70] mov rsi, [rax] call _ZNSt6vectorIN9StartTree7ClusterIfEESaIS2_EEixEm; std::vector<StartTree::Cluster<float>>::operator[](ulong) mov rdi, [rsp+0A8h+var_78] mov rax, [rax] mov [rsp+0A8h+var_30], rax mov rsi, [rsp+0A8h+var_18] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+0A8h+var_70] mov rsi, [rax] call _ZNSt6vectorIN9StartTree7ClusterIfEESaIS2_EEixEm; std::vector<StartTree::Cluster<float>>::operator[](ulong) mov rax, [rax] mov [rsp+0A8h+var_38], rax mov rax, [rsp+0A8h+var_30] mov rcx, [rsp+0A8h+var_38] add rax, rcx mov [rsp+0A8h+var_40], rax movaps xmm3, cs:xmmword_69690 movq xmm0, [rsp+0A8h+var_30] punpckldq xmm0, xmm3 movapd xmm2, cs:xmmword_696A0 subpd xmm0, xmm2 movaps xmm1, xmm0 unpckhpd xmm0, xmm0 addsd xmm0, xmm1 movq xmm1, [rsp+0A8h+var_40] punpckldq xmm1, xmm3 subpd xmm1, xmm2 movaps xmm2, xmm1 unpckhpd xmm1, xmm1 addsd xmm1, xmm2 divsd xmm0, xmm1 movsd [rsp+0A8h+var_48], xmm0 movsd xmm0, cs:qword_694E8 subsd xmm0, [rsp+0A8h+var_48] movsd [rsp+0A8h+var_50], xmm0 mov [rsp+0A8h+var_58], 0 loc_40ACC: mov rcx, [rsp+0A8h+var_80] mov rax, [rsp+0A8h+var_58] cmp rax, [rcx+8] jnb loc_40BD6 mov rax, [rsp+0A8h+var_58] cmp rax, [rsp+0A8h+var_10] jz loc_40BC1 mov rax, [rsp+0A8h+var_58] cmp rax, [rsp+0A8h+var_18] jz loc_40BC1 mov rax, [rsp+0A8h+var_80] mov rcx, [rax+20h] mov rdx, [rsp+0A8h+var_10] mov rcx, [rcx+rdx*8] mov rdx, [rsp+0A8h+var_58] movss xmm0, dword ptr [rcx+rdx*4] movss [rsp+0A8h+var_5C], xmm0 mov rcx, [rax+20h] mov rdx, [rsp+0A8h+var_18] mov rcx, [rcx+rdx*8] mov rdx, [rsp+0A8h+var_58] movss xmm0, dword ptr [rcx+rdx*4] movss [rsp+0A8h+var_60], xmm0 movsd xmm0, [rsp+0A8h+var_48] movss xmm1, [rsp+0A8h+var_5C] cvtss2sd xmm2, xmm1 movsd xmm1, [rsp+0A8h+var_50] movss xmm3, [rsp+0A8h+var_60] cvtss2sd xmm3, xmm3 mulsd xmm1, xmm3 mulsd xmm0, xmm2 addsd xmm0, xmm1 cvtsd2ss xmm0, xmm0 movss [rsp+0A8h+var_64], xmm0 movss xmm0, [rsp+0A8h+var_64] mov rcx, [rax+20h] mov rdx, [rsp+0A8h+var_10] mov rcx, [rcx+rdx*8] mov rdx, [rsp+0A8h+var_58] movss dword ptr [rcx+rdx*4], xmm0 movss xmm0, [rsp+0A8h+var_64] mov rax, [rax+20h] mov rcx, [rsp+0A8h+var_58] mov rax, [rax+rcx*8] mov rcx, [rsp+0A8h+var_10] movss dword ptr [rax+rcx*4], xmm0 loc_40BC1: jmp short $+2 loc_40BC3: mov rax, [rsp+0A8h+var_58] add rax, 1 mov [rsp+0A8h+var_58], rax jmp loc_40ACC loc_40BD6: mov rdi, [rsp+0A8h+var_80] mov rax, rdi add rax, 48h ; 'H' mov [rsp+0A8h+var_A8], rax add rdi, 30h ; '0' mov rsi, [rsp+0A8h+var_10] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+0A8h+var_80] mov rax, [rax] mov [rsp+0A8h+var_A0], rax movsd xmm0, [rsp+0A8h+var_20] cvtsd2ss xmm0, xmm0 movss [rsp+0A8h+var_94], xmm0 add rdi, 30h ; '0' mov rsi, [rsp+0A8h+var_18] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+0A8h+var_A8] mov rsi, [rsp+0A8h+var_A0] movss xmm0, [rsp+0A8h+var_94] mov rdx, [rax] movsd xmm1, [rsp+0A8h+var_28] cvtsd2ss xmm1, xmm1 call _ZN9StartTree11ClusterTreeIfE10addClusterEmfmf; StartTree::ClusterTree<float>::addCluster(ulong,float,ulong,float) mov rdi, [rsp+0A8h+var_80] add rdi, 48h ; 'H' call _ZNKSt6vectorIN9StartTree7ClusterIfEESaIS2_EE4sizeEv; std::vector<StartTree::Cluster<float>>::size(void) mov rdi, [rsp+0A8h+var_80] sub rax, 1 mov [rsp+0A8h+var_90], rax add rdi, 30h ; '0' mov rsi, [rsp+0A8h+var_10] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdx, [rsp+0A8h+var_90] mov rcx, rax mov rax, [rsp+0A8h+var_80] mov [rcx], rdx mov rdi, rax add rdi, 30h ; '0' mov rsi, [rax+8] sub rsi, 1 call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+0A8h+var_80] mov rax, [rax] mov [rsp+0A8h+var_88], rax add rdi, 30h ; '0' mov rsi, [rsp+0A8h+var_18] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rcx, [rsp+0A8h+var_88] mov rdi, [rsp+0A8h+var_80] mov [rax], rcx mov rsi, [rsp+0A8h+var_18] call _ZN9StartTree6MatrixIfE18removeRowAndColumnEm; StartTree::Matrix<float>::removeRowAndColumn(ulong) add rsp, 0A8h retn
long long StartTree::UPGMA_Matrix<float>::cluster(long long a1, long long a2, long long a3) { _QWORD *v3; // rax _QWORD *v4; // rax __m128d v5; // xmm0 __m128d v6; // xmm2 float v7; // xmm0_4 float v8; // xmm0_4 _QWORD *v9; // rax float v10; // xmm1_4 int v11; // ecx int v12; // r8d int v13; // r9d long long v15; // [rsp+8h] [rbp-A0h] long long v16; // [rsp+18h] [rbp-90h] long long v17; // [rsp+20h] [rbp-88h] unsigned long long i; // [rsp+50h] [rbp-58h] double v19; // [rsp+60h] [rbp-48h] __m128i v20; // [rsp+68h] [rbp-40h] BYREF __m128i v21; // [rsp+78h] [rbp-30h] BYREF double v22; // [rsp+88h] [rbp-20h] long long v23; // [rsp+90h] [rbp-18h] long long v24; // [rsp+98h] [rbp-10h] long long v25; // [rsp+A0h] [rbp-8h] v25 = a1; v24 = a2; v23 = a3; v22 = *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * a3) + 4 * a2) * 0.5; *(double *)&v21.m128i_i64[1] = v22; v3 = (_QWORD *)std::vector<unsigned long>::operator[](a1 + 48, a2); v21.m128i_i64[0] = *(_QWORD *)std::vector<StartTree::Cluster<float>>::operator[](a1 + 72, *v3); v4 = (_QWORD *)std::vector<unsigned long>::operator[](a1 + 48, v23); v20.m128i_i64[1] = *(_QWORD *)std::vector<StartTree::Cluster<float>>::operator[](a1 + 72, *v4); v20.m128i_i64[0] = v20.m128i_i64[1] + v21.m128i_i64[0]; v5 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v21), (__m128i)xmmword_69690), (__m128d)xmmword_696A0); v6 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v20), (__m128i)xmmword_69690), (__m128d)xmmword_696A0); v19 = (_mm_unpackhi_pd(v5, v5).m128d_f64[0] + v5.m128d_f64[0]) / (_mm_unpackhi_pd(v6, v6).m128d_f64[0] + v6.m128d_f64[0]); for ( i = 0LL; i < *(_QWORD *)(a1 + 8); ++i ) { if ( i != v24 && i != v23 ) { v7 = v19 * *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v24) + 4 * i) + (1.0 - v19) * *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v23) + 4 * i); *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v24) + 4 * i) = v7; *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * i) + 4 * v24) = v7; } } v15 = *(_QWORD *)std::vector<unsigned long>::operator[](a1 + 48, v24); v8 = v22; v9 = (_QWORD *)std::vector<unsigned long>::operator[](a1 + 48, v23); v10 = *(double *)&v21.m128i_i64[1]; StartTree::ClusterTree<float>::addCluster(a1 + 72, v15, *v9, v11, v12, v13, a1 + 72, v15); v16 = std::vector<StartTree::Cluster<float>>::size(a1 + 72, v8, v10) - 1; *(_QWORD *)std::vector<unsigned long>::operator[](a1 + 48, v24) = v16; v17 = *(_QWORD *)std::vector<unsigned long>::operator[](a1 + 48, *(_QWORD *)(a1 + 8) - 1LL); *(_QWORD *)std::vector<unsigned long>::operator[](a1 + 48, v23) = v17; return StartTree::Matrix<float>::removeRowAndColumn(a1, v23); }
cluster: SUB RSP,0xa8 MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0x90],RDX MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x28],RDI MOV RAX,qword ptr [RDI + 0x20] MOV RCX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RSP + 0x98] MOVSS XMM0,dword ptr [RAX + RCX*0x4] CVTSS2SD XMM0,XMM0 MOVSD XMM1,qword ptr [0x001694e0] MULSD XMM0,XMM1 MOVSD qword ptr [RSP + 0x88],XMM0 MOVSD XMM0,qword ptr [RSP + 0x88] MOVSD qword ptr [RSP + 0x80],XMM0 MOV RAX,RDI ADD RAX,0x48 MOV qword ptr [RSP + 0x38],RAX ADD RDI,0x30 MOV qword ptr [RSP + 0x30],RDI MOV RSI,qword ptr [RSP + 0x98] CALL 0x00142750 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RAX] CALL 0x00142730 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x78],RAX MOV RSI,qword ptr [RSP + 0x90] CALL 0x00142750 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RAX] CALL 0x00142730 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x70] ADD RAX,RCX MOV qword ptr [RSP + 0x68],RAX MOVAPS XMM3,xmmword ptr [0x00169690] MOVQ XMM0,qword ptr [RSP + 0x78] PUNPCKLDQ XMM0,XMM3 MOVAPD XMM2,xmmword ptr [0x001696a0] SUBPD XMM0,XMM2 MOVAPS XMM1,XMM0 UNPCKHPD XMM0,XMM0 ADDSD XMM0,XMM1 MOVQ XMM1,qword ptr [RSP + 0x68] PUNPCKLDQ XMM1,XMM3 SUBPD XMM1,XMM2 MOVAPS XMM2,XMM1 UNPCKHPD XMM1,XMM1 ADDSD XMM1,XMM2 DIVSD XMM0,XMM1 MOVSD qword ptr [RSP + 0x60],XMM0 MOVSD XMM0,qword ptr [0x001694e8] SUBSD XMM0,qword ptr [RSP + 0x60] MOVSD qword ptr [RSP + 0x58],XMM0 MOV qword ptr [RSP + 0x50],0x0 LAB_00140acc: MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RCX + 0x8] JNC 0x00140bd6 MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RSP + 0x98] JZ 0x00140bc1 MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RSP + 0x90] JZ 0x00140bc1 MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RCX + RDX*0x8] MOV RDX,qword ptr [RSP + 0x50] MOVSS XMM0,dword ptr [RCX + RDX*0x4] MOVSS dword ptr [RSP + 0x4c],XMM0 MOV RCX,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RCX + RDX*0x8] MOV RDX,qword ptr [RSP + 0x50] MOVSS XMM0,dword ptr [RCX + RDX*0x4] MOVSS dword ptr [RSP + 0x48],XMM0 MOVSD XMM0,qword ptr [RSP + 0x60] MOVSS XMM1,dword ptr [RSP + 0x4c] CVTSS2SD XMM2,XMM1 MOVSD XMM1,qword ptr [RSP + 0x58] MOVSS XMM3,dword ptr [RSP + 0x48] CVTSS2SD XMM3,XMM3 MULSD XMM1,XMM3 MULSD XMM0,XMM2 ADDSD XMM0,XMM1 CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RSP + 0x44],XMM0 MOVSS XMM0,dword ptr [RSP + 0x44] MOV RCX,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RCX + RDX*0x8] MOV RDX,qword ptr [RSP + 0x50] MOVSS dword ptr [RCX + RDX*0x4],XMM0 MOVSS XMM0,dword ptr [RSP + 0x44] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RSP + 0x98] MOVSS dword ptr [RAX + RCX*0x4],XMM0 LAB_00140bc1: JMP 0x00140bc3 LAB_00140bc3: MOV RAX,qword ptr [RSP + 0x50] ADD RAX,0x1 MOV qword ptr [RSP + 0x50],RAX JMP 0x00140acc LAB_00140bd6: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,RDI ADD RAX,0x48 MOV qword ptr [RSP],RAX ADD RDI,0x30 MOV RSI,qword ptr [RSP + 0x98] CALL 0x00142750 MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX MOVSD XMM0,qword ptr [RSP + 0x88] CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RSP + 0x14],XMM0 ADD RDI,0x30 MOV RSI,qword ptr [RSP + 0x90] CALL 0x00142750 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOVSS XMM0,dword ptr [RSP + 0x14] MOV RDX,qword ptr [RAX] MOVSD XMM1,qword ptr [RSP + 0x80] CVTSD2SS XMM1,XMM1 CALL 0x00142770 MOV RDI,qword ptr [RSP + 0x28] ADD RDI,0x48 CALL 0x00142880 MOV RDI,qword ptr [RSP + 0x28] SUB RAX,0x1 MOV qword ptr [RSP + 0x18],RAX ADD RDI,0x30 MOV RSI,qword ptr [RSP + 0x98] CALL 0x00142750 MOV RDX,qword ptr [RSP + 0x18] MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RCX],RDX MOV RDI,RAX ADD RDI,0x30 MOV RSI,qword ptr [RAX + 0x8] SUB RSI,0x1 CALL 0x00142750 MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX ADD RDI,0x30 MOV RSI,qword ptr [RSP + 0x90] CALL 0x00142750 MOV RCX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX MOV RSI,qword ptr [RSP + 0x90] CALL 0x001428a0 ADD RSP,0xa8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* StartTree::UPGMA_Matrix<float>::cluster(unsigned long, unsigned long) */ void __thiscall StartTree::UPGMA_Matrix<float>::cluster(UPGMA_Matrix<float> *this,ulong param_1,ulong param_2) { ulong uVar1; int8 uVar2; ulong *puVar3; long *plVar4; long lVar5; long lVar6; int8 *puVar7; float fVar8; double dVar9; double dVar10; double dVar11; int1 auVar12 [16]; int1 auVar13 [16]; ulong local_58; dVar9 = (double)*(float *)(*(long *)(*(long *)(this + 0x20) + param_2 * 8) + param_1 * 4) * DAT_001694e0; puVar3 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), param_1); plVar4 = (long *)std::vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>> ::operator[]((vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>> *)(this + 0x48),*puVar3); lVar6 = *plVar4; puVar3 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), param_2); plVar4 = (long *)std::vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>> ::operator[]((vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>> *)(this + 0x48),*puVar3); lVar5 = lVar6 + *plVar4; auVar12._8_4_ = (int)((ulong)lVar6 >> 0x20); auVar12._0_8_ = lVar6; auVar12._12_4_ = _UNK_00169694; auVar13._8_4_ = (int)((ulong)lVar5 >> 0x20); auVar13._0_8_ = lVar5; auVar13._12_4_ = _UNK_00169694; dVar10 = ((auVar12._8_8_ - _UNK_001696a8) + ((double)CONCAT44(_DAT_00169690,(int)lVar6) - _DAT_001696a0)) / ((auVar13._8_8_ - _UNK_001696a8) + ((double)CONCAT44(_DAT_00169690,(int)lVar5) - _DAT_001696a0)); dVar11 = DAT_001694e8 - dVar10; for (local_58 = 0; local_58 < *(ulong *)(this + 8); local_58 = local_58 + 1) { if ((local_58 != param_1) && (local_58 != param_2)) { fVar8 = (float)(dVar10 * (double)*(float *)(*(long *)(*(long *)(this + 0x20) + param_1 * 8) + local_58 * 4) + dVar11 * (double)*(float *)(*(long *)(*(long *)(this + 0x20) + param_2 * 8) + local_58 * 4)); *(float *)(*(long *)(*(long *)(this + 0x20) + param_1 * 8) + local_58 * 4) = fVar8; *(float *)(*(long *)(*(long *)(this + 0x20) + local_58 * 8) + param_1 * 4) = fVar8; } } puVar3 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), param_1); uVar1 = *puVar3; puVar3 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), param_2); ClusterTree<float>::addCluster ((ClusterTree<float> *)(this + 0x48),uVar1,(float)dVar9,*puVar3,(float)dVar9); lVar6 = std::vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>>::size ((vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>> *) (this + 0x48)); plVar4 = (long *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), param_1); *plVar4 = lVar6 + -1; puVar7 = (int8 *) std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), *(long *)(this + 8) - 1); uVar2 = *puVar7; puVar7 = (int8 *) std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30),param_2); *puVar7 = uVar2; Matrix<float>::removeRowAndColumn((Matrix<float> *)this,param_2); return; }
45,451
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O1
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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, minja::Value>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0xb9474 movq %rdx, %r15 movq %rdi, %r14 subq %rbx, %r15 movq %r15, %rbp sarq $0x5, %rbp movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %rbp movq (%rdi), %rax movq %rax, (%rsp) movq %rbx, %r12 leaq (%r12,%r15), %r13 movq 0x8(%r14), %rsi cmpq %rsi, %r13 je 0xb944d movq %r12, %rdi callq 0xb1d44 movq %r12, %rdi movq %r13, %rsi callq 0xb9486 addq $0x60, %r12 jmp 0xb9427 subq (%r14), %rsi subq (%rsp), %rbx sarq $0x5, %rsi movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %rsi subq %rbp, %rsi movq %r14, %rdi callq 0xb9512 addq (%r14), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz short loc_B9474 mov r15, rdx mov r14, rdi sub r15, rbx mov rbp, r15 sar rbp, 5 mov rax, 0AAAAAAAAAAAAAAABh imul rbp, rax mov rax, [rdi] mov [rsp+38h+var_38], rax mov r12, rbx loc_B9427: lea r13, [r12+r15] mov rsi, [r14+8] cmp r13, rsi jz short loc_B944D mov rdi, r12 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair() mov rdi, r12 mov rsi, r13 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&) add r12, 60h ; '`' jmp short loc_B9427 loc_B944D: sub rsi, [r14] sub rbx, [rsp+38h+var_38] sar rsi, 5 mov rax, 0AAAAAAAAAAAAAAABh imul rsi, rax sub rsi, rbp mov rdi, r14 call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong) add rbx, [r14] loc_B9474: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r15 unsigned long long v5; // rbp long long i; // r12 long long v7; // rsi long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = a3 - a2; v5 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5); v9 = *a1; for ( i = a2; ; i += 96LL ) { v7 = a1[1]; if ( i + v4 == v7 ) break; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(i); std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair( i, i + v4); } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize( a1, 0xAAAAAAAAAAAAAAABLL * ((v7 - *a1) >> 5) - v5); return *a1 + v3 - v9; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP RSI,RDX JZ 0x001b9474 MOV R15,RDX MOV R14,RDI SUB R15,RBX MOV RBP,R15 SAR RBP,0x5 MOV RAX,-0x5555555555555555 IMUL RBP,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX MOV R12,RBX LAB_001b9427: LEA R13,[R12 + R15*0x1] MOV RSI,qword ptr [R14 + 0x8] CMP R13,RSI JZ 0x001b944d MOV RDI,R12 CALL 0x001b1d44 MOV RDI,R12 MOV RSI,R13 CALL 0x001b9486 ADD R12,0x60 JMP 0x001b9427 LAB_001b944d: SUB RSI,qword ptr [R14] SUB RBX,qword ptr [RSP] SAR RSI,0x5 MOV RAX,-0x5555555555555555 IMUL RSI,RAX SUB RSI,RBP MOV RDI,R14 CALL 0x001b9512 ADD RBX,qword ptr [R14] LAB_001b9474: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >) */ pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_2, pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_3) { long lVar1; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *this_00; if (param_2 != param_3) { lVar1 = *(long *)this; this_00 = param_2; while( true ) { if ((pair *)(this_00 + ((long)param_3 - (long)param_2)) == *(pair **)(this + 8)) break; std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::~pair(this_00); std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::pair(this_00,(pair *)(this_00 + ((long)param_3 - (long)param_2))); this_00 = this_00 + 0x60; } std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,((long)*(pair **)(this + 8) - *(long *)this >> 5) * -0x5555555555555555 + ((long)param_3 - (long)param_2 >> 5) * 0x5555555555555555); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
45,452
unicode_find_name
bluesky950520[P]quickjs/libunicode.c
static int unicode_find_name(const char *name_table, const char *name) { const char *p, *r; int pos; size_t name_len, len; p = name_table; pos = 0; name_len = strlen(name); while (*p) { for(;;) { r = strchr(p, ','); if (!r) len = strlen(p); else len = r - p; if (len == name_len && !memcmp(p, name, name_len)) return pos; p += len + 1; if (!r) break; } pos++; } return -1; }
O2
c
unicode_find_name: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0xe280 movq %rax, %r15 xorl %eax, %eax pushq $0x2c popq %r12 cmpb $0x0, (%r14) je 0x83c44 movl %eax, 0x4(%rsp) movq %r14, %rdi movl %r12d, %esi callq 0xe2b0 movq %rax, %rbp testq %rax, %rax je 0x83bfc movq %rbp, %r13 subq %r14, %r13 jmp 0x83c07 movq %r14, %rdi callq 0xe280 movq %rax, %r13 cmpq %r15, %r13 jne 0x83c1e movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0xe730 testl %eax, %eax je 0x83c31 addq %r13, %r14 incq %r14 testq %rbp, %rbp jne 0x83be1 movl 0x4(%rsp), %eax incl %eax jmp 0x83bd7 movl 0x4(%rsp), %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $-0x1 popq %rax jmp 0x83c35
unicode_find_name: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsi call _strlen mov r15, rax xor eax, eax push 2Ch ; ',' pop r12 loc_83BD7: cmp byte ptr [r14], 0 jz short loc_83C44 mov [rsp+38h+var_34], eax loc_83BE1: mov rdi, r14 mov esi, r12d call _strchr mov rbp, rax test rax, rax jz short loc_83BFC mov r13, rbp sub r13, r14 jmp short loc_83C07 loc_83BFC: mov rdi, r14 call _strlen mov r13, rax loc_83C07: cmp r13, r15 jnz short loc_83C1E mov rdi, r14 mov rsi, rbx mov rdx, r15 call _bcmp test eax, eax jz short loc_83C31 loc_83C1E: add r14, r13 inc r14 test rbp, rbp jnz short loc_83BE1 mov eax, [rsp+38h+var_34] inc eax jmp short loc_83BD7 loc_83C31: mov eax, [rsp+38h+var_34] loc_83C35: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_83C44: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_83C35
long long unicode_find_name(_BYTE *a1, long long a2) { long long v3; // r15 unsigned int v4; // eax long long v5; // rax long long v6; // rcx long long v7; // rbp long long v8; // r13 unsigned int v10; // [rsp+0h] [rbp-34h] v3 = strlen(a2); v4 = 0; LABEL_2: if ( !*a1 ) return -1LL; v10 = v4; while ( 1 ) { v5 = strchr(a1, 44LL); v7 = v5; v8 = v5 ? v5 - (_QWORD)a1 : strlen(a1); if ( v8 == v3 && !(unsigned int)bcmp(a1, a2, v3, v6) ) return v10; a1 += v8 + 1; if ( !v7 ) { v4 = v10 + 1; goto LABEL_2; } } }
unicode_find_name: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x0010e280 MOV R15,RAX XOR EAX,EAX PUSH 0x2c POP R12 LAB_00183bd7: CMP byte ptr [R14],0x0 JZ 0x00183c44 MOV dword ptr [RSP + 0x4],EAX LAB_00183be1: MOV RDI,R14 MOV ESI,R12D CALL 0x0010e2b0 MOV RBP,RAX TEST RAX,RAX JZ 0x00183bfc MOV R13,RBP SUB R13,R14 JMP 0x00183c07 LAB_00183bfc: MOV RDI,R14 CALL 0x0010e280 MOV R13,RAX LAB_00183c07: CMP R13,R15 JNZ 0x00183c1e MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0010e730 TEST EAX,EAX JZ 0x00183c31 LAB_00183c1e: ADD R14,R13 INC R14 TEST RBP,RBP JNZ 0x00183be1 MOV EAX,dword ptr [RSP + 0x4] INC EAX JMP 0x00183bd7 LAB_00183c31: MOV EAX,dword ptr [RSP + 0x4] LAB_00183c35: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183c44: PUSH -0x1 POP RAX JMP 0x00183c35
ulong unicode_find_name(char *param_1,char *param_2) { int iVar1; uint uVar2; size_t __n; char *pcVar3; size_t sVar4; __n = strlen(param_2); uVar2 = 0; do { if (*param_1 == '\0') { return 0xffffffffffffffff; } do { pcVar3 = strchr(param_1,0x2c); if (pcVar3 == (char *)0x0) { sVar4 = strlen(param_1); } else { sVar4 = (long)pcVar3 - (long)param_1; } if ((sVar4 == __n) && (iVar1 = bcmp(param_1,param_2,__n), iVar1 == 0)) { return (ulong)uVar2; } param_1 = param_1 + sVar4 + 1; } while (pcVar3 != (char *)0x0); uVar2 = uVar2 + 1; } while( true ); }
45,453
R3D_SetLightTarget
r3d/src/r3d_lighting.c
void R3D_SetLightTarget(R3D_Light id, Vector3 target) { r3d_get_and_check_light(light, id); light->direction = Vector3Normalize(Vector3Subtract(target, light->position)); }
O3
c
R3D_SetLightTarget: pushq %rbp movq %rsp, %rbp movl %edi, %edx testl %edi, %edi je 0xbdffa leaq 0xf1df0(%rip), %rsi # 0x1afdb0 cmpl %edx, 0x168(%rsi) jbe 0xbdffa movq 0x128(%rsi), %rcx leal -0x1(%rdx), %eax cmpb $0x1, (%rcx,%rax) jne 0xbdffa movq 0x108(%rsi), %rcx cmpq %rax, 0x110(%rsi) setbe %dil testq %rcx, %rcx sete %r8b orb %dil, %r8b cmpb $0x1, %r8b jne 0xbe00e leaq 0x53ddd(%rip), %rsi # 0x111dde movl $0x5, %edi xorl %eax, %eax popq %rbp jmp 0xa9d0d imulq 0x120(%rsi), %rax movsd 0x74(%rcx,%rax), %xmm2 subps %xmm2, %xmm0 movaps %xmm0, %xmm2 shufps $0x55, %xmm0, %xmm2 # xmm2 = xmm2[1,1],xmm0[1,1] subss 0x7c(%rcx,%rax), %xmm1 movaps %xmm2, %xmm3 mulss %xmm2, %xmm3 movaps %xmm0, %xmm4 mulss %xmm0, %xmm4 addss %xmm3, %xmm4 movaps %xmm1, %xmm3 mulss %xmm1, %xmm3 addss %xmm4, %xmm3 sqrtss %xmm3, %xmm3 xorps %xmm4, %xmm4 ucomiss %xmm4, %xmm3 jne 0xbe057 jnp 0xbe072 movss 0x23fb5(%rip), %xmm4 # 0xe2014 divss %xmm3, %xmm4 mulss %xmm4, %xmm0 mulss %xmm4, %xmm2 unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] mulss %xmm4, %xmm1 movlps %xmm0, 0x80(%rcx,%rax) movss %xmm1, 0x88(%rcx,%rax) popq %rbp retq
R3D_SetLightTarget: push rbp mov rbp, rsp mov edx, edi test edi, edi jz short loc_BDFFA lea rsi, R3D cmp [rsi+168h], edx jbe short loc_BDFFA mov rcx, [rsi+128h] lea eax, [rdx-1] cmp byte ptr [rcx+rax], 1 jnz short loc_BDFFA mov rcx, [rsi+108h] cmp [rsi+110h], rax setbe dil test rcx, rcx setz r8b or r8b, dil cmp r8b, 1 jnz short loc_BE00E loc_BDFFA: lea rsi, aLightIdIIsNotV; "Light [ID %i] is not valid" mov edi, 5 xor eax, eax pop rbp jmp TraceLog loc_BE00E: imul rax, [rsi+120h] movsd xmm2, qword ptr [rcx+rax+74h] subps xmm0, xmm2 movaps xmm2, xmm0 shufps xmm2, xmm0, 55h ; 'U' subss xmm1, dword ptr [rcx+rax+7Ch] movaps xmm3, xmm2 mulss xmm3, xmm2 movaps xmm4, xmm0 mulss xmm4, xmm0 addss xmm4, xmm3 movaps xmm3, xmm1 mulss xmm3, xmm1 addss xmm3, xmm4 sqrtss xmm3, xmm3 xorps xmm4, xmm4 ucomiss xmm3, xmm4 jnz short loc_BE057 jnp short loc_BE072 loc_BE057: movss xmm4, cs:dword_E2014 divss xmm4, xmm3 mulss xmm0, xmm4 mulss xmm2, xmm4 unpcklps xmm0, xmm2 mulss xmm1, xmm4 loc_BE072: movlps qword ptr [rcx+rax+80h], xmm0 movss dword ptr [rcx+rax+88h], xmm1 pop rbp retn
void R3D_SetLightTarget(unsigned int a1, __m128 a2, float a3) { unsigned long long v3; // rax long long v4; // rcx long long v5; // rax __m128 v6; // xmm0 __m128 v7; // xmm2 float v8; // xmm1_4 float v9; // xmm3_4 if ( a1 && *((_DWORD *)&R3D + 90) > a1 && (v3 = a1 - 1, *(_BYTE *)(*((_QWORD *)&R3D + 37) + v3) == 1) && (v4 = *((_QWORD *)&R3D + 33), *((_QWORD *)&R3D + 34) > v3 && v4 != 0) ) { v5 = *((_QWORD *)&R3D + 36) * v3; v6 = _mm_sub_ps(a2, (__m128)*(unsigned long long *)(v4 + v5 + 116)); v7 = _mm_shuffle_ps(v6, v6, 85); v8 = a3 - *(float *)(v4 + v5 + 124); v9 = fsqrt( (float)(v8 * v8) + (float)((float)(v6.m128_f32[0] * v6.m128_f32[0]) + (float)(v7.m128_f32[0] * v7.m128_f32[0]))); if ( v9 != 0.0 ) { v6.m128_f32[0] = v6.m128_f32[0] * (float)(1.0 / v9); v7.m128_f32[0] = v7.m128_f32[0] * (float)(1.0 / v9); v6 = _mm_unpacklo_ps(v6, v7); v8 = v8 * (float)(1.0 / v9); } _mm_storel_ps((double *)(v4 + v5 + 128), v6); *(float *)(v4 + v5 + 136) = v8; } else { TraceLog(5, (long long)"Light [ID %i] is not valid", a1); } }
R3D_SetLightTarget: PUSH RBP MOV RBP,RSP MOV EDX,EDI TEST EDI,EDI JZ 0x001bdffa LEA RSI,[0x2afdb0] CMP dword ptr [RSI + 0x168],EDX JBE 0x001bdffa MOV RCX,qword ptr [RSI + 0x128] LEA EAX,[RDX + -0x1] CMP byte ptr [RCX + RAX*0x1],0x1 JNZ 0x001bdffa MOV RCX,qword ptr [RSI + 0x108] CMP qword ptr [RSI + 0x110],RAX SETBE DIL TEST RCX,RCX SETZ R8B OR R8B,DIL CMP R8B,0x1 JNZ 0x001be00e LAB_001bdffa: LEA RSI,[0x211dde] MOV EDI,0x5 XOR EAX,EAX POP RBP JMP 0x001a9d0d LAB_001be00e: IMUL RAX,qword ptr [RSI + 0x120] MOVSD XMM2,qword ptr [RCX + RAX*0x1 + 0x74] SUBPS XMM0,XMM2 MOVAPS XMM2,XMM0 SHUFPS XMM2,XMM0,0x55 SUBSS XMM1,dword ptr [RCX + RAX*0x1 + 0x7c] MOVAPS XMM3,XMM2 MULSS XMM3,XMM2 MOVAPS XMM4,XMM0 MULSS XMM4,XMM0 ADDSS XMM4,XMM3 MOVAPS XMM3,XMM1 MULSS XMM3,XMM1 ADDSS XMM3,XMM4 SQRTSS XMM3,XMM3 XORPS XMM4,XMM4 UCOMISS XMM3,XMM4 JNZ 0x001be057 JNP 0x001be072 LAB_001be057: MOVSS XMM4,dword ptr [0x001e2014] DIVSS XMM4,XMM3 MULSS XMM0,XMM4 MULSS XMM2,XMM4 UNPCKLPS XMM0,XMM2 MULSS XMM1,XMM4 LAB_001be072: MOVLPS qword ptr [RCX + RAX*0x1 + 0x80],XMM0 MOVSS dword ptr [RCX + RAX*0x1 + 0x88],XMM1 POP RBP RET
void R3D_SetLightTarget(int8 param_1,float param_2,uint param_3) { int8 uVar1; long lVar2; ulong uVar3; long lVar4; float fVar5; float fVar6; float fVar7; lVar2 = DAT_002afeb8; if ((param_3 != 0) && (param_3 < DAT_002aff18)) { uVar3 = (ulong)(param_3 - 1); if (*(char *)(DAT_002afed8 + uVar3) == '\x01') { if (DAT_002afeb8 != 0 && uVar3 < DAT_002afec0) { lVar4 = uVar3 * DAT_002afed0; uVar1 = *(int8 *)(DAT_002afeb8 + 0x74 + lVar4); fVar5 = (float)param_1 - (float)uVar1; fVar6 = (float)((ulong)param_1 >> 0x20) - (float)((ulong)uVar1 >> 0x20); param_2 = param_2 - *(float *)(DAT_002afeb8 + 0x7c + lVar4); fVar7 = SQRT(param_2 * param_2 + fVar5 * fVar5 + fVar6 * fVar6); if ((fVar7 != 0.0) || (NAN(fVar7))) { fVar7 = DAT_001e2014 / fVar7; fVar5 = fVar5 * fVar7; fVar6 = fVar6 * fVar7; param_2 = param_2 * fVar7; } *(ulong *)(DAT_002afeb8 + 0x80 + lVar4) = CONCAT44(fVar6,fVar5); *(float *)(lVar2 + 0x88 + lVar4) = param_2; return; } } } TraceLog(5,"Light [ID %i] is not valid"); return; }
45,454
mysql_close_memory
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mysql_close_memory(MYSQL *mysql) { ma_clear_session_state(mysql); free(mysql->host_info); free(mysql->host); free(mysql->user); free(mysql->passwd); free(mysql->db); free(mysql->unix_socket); free(mysql->server_version); mysql->host_info= mysql->host= mysql->unix_socket= mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; }
O0
c
mysql_close_memory: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x260e0 movq -0x8(%rbp), %rax movq 0x2d8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2b0(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2b8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2e8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2c8(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq 0x2d0(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rax movq $0x0, 0x2e8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2c0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2b8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2d0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2c8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2b0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2d8(%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_close_memory: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call ma_clear_session_state mov rax, [rbp+var_8] mov rdi, [rax+2D8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2B0h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2B8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2C0h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2E8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2C8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2D0h] call _free mov rax, [rbp+var_8] mov qword ptr [rax+2E8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2C0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2B8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2D0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2C8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2B0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2D8h], 0 add rsp, 10h pop rbp retn
_QWORD * mysql_close_memory(_QWORD *a1) { _QWORD *result; // rax ma_clear_session_state(a1); free(a1[91]); free(a1[86]); free(a1[87]); free(a1[88]); free(a1[93]); free(a1[89]); free(a1[90]); a1[93] = 0LL; a1[88] = 0LL; a1[87] = 0LL; a1[90] = 0LL; a1[89] = 0LL; a1[86] = 0LL; result = a1; a1[91] = 0LL; return result; }
mysql_close_memory: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x001260e0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2d8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2b0] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2b8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2c0] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2e8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2c8] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2d0] CALL 0x00113520 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2e8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2d0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2d8],0x0 ADD RSP,0x10 POP RBP RET
void mysql_close_memory(long param_1) { ma_clear_session_state(param_1); free(*(void **)(param_1 + 0x2d8)); free(*(void **)(param_1 + 0x2b0)); free(*(void **)(param_1 + 0x2b8)); free(*(void **)(param_1 + 0x2c0)); free(*(void **)(param_1 + 0x2e8)); free(*(void **)(param_1 + 0x2c8)); free(*(void **)(param_1 + 0x2d0)); *(int8 *)(param_1 + 0x2e8) = 0; *(int8 *)(param_1 + 0x2c0) = 0; *(int8 *)(param_1 + 0x2b8) = 0; *(int8 *)(param_1 + 0x2d0) = 0; *(int8 *)(param_1 + 0x2c8) = 0; *(int8 *)(param_1 + 0x2b0) = 0; *(int8 *)(param_1 + 0x2d8) = 0; return; }
45,455
mysql_close_memory
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mysql_close_memory(MYSQL *mysql) { ma_clear_session_state(mysql); free(mysql->host_info); free(mysql->host); free(mysql->user); free(mysql->passwd); free(mysql->db); free(mysql->unix_socket); free(mysql->server_version); mysql->host_info= mysql->host= mysql->unix_socket= mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; }
O3
c
mysql_close_memory: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x1f5ef movq 0x2d8(%rbx), %rdi callq 0x13570 movq 0x2b0(%rbx), %rdi callq 0x13570 movq 0x2b8(%rbx), %rdi callq 0x13570 movq 0x2c0(%rbx), %rdi callq 0x13570 movq 0x2e8(%rbx), %rdi callq 0x13570 movq 0x2c8(%rbx), %rdi callq 0x13570 movq 0x2d0(%rbx), %rdi callq 0x13570 movq $0x0, 0x2e8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x2b0(%rbx) movups %xmm0, 0x2c0(%rbx) movups %xmm0, 0x2d0(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_close_memory: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call ma_clear_session_state mov rdi, [rbx+2D8h] call _free mov rdi, [rbx+2B0h] call _free mov rdi, [rbx+2B8h] call _free mov rdi, [rbx+2C0h] call _free mov rdi, [rbx+2E8h] call _free mov rdi, [rbx+2C8h] call _free mov rdi, [rbx+2D0h] call _free mov qword ptr [rbx+2E8h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+2B0h], xmm0 movups xmmword ptr [rbx+2C0h], xmm0 movups xmmword ptr [rbx+2D0h], xmm0 add rsp, 8 pop rbx pop rbp retn
long long mysql_close_memory(_QWORD *a1) { long long result; // rax ma_clear_session_state(a1); free(a1[91]); free(a1[86]); free(a1[87]); free(a1[88]); free(a1[93]); free(a1[89]); result = free(a1[90]); a1[93] = 0LL; *((_OWORD *)a1 + 43) = 0LL; *((_OWORD *)a1 + 44) = 0LL; *((_OWORD *)a1 + 45) = 0LL; return result; }
mysql_close_memory: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0011f5ef MOV RDI,qword ptr [RBX + 0x2d8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2b0] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2b8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2c0] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2e8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2c8] CALL 0x00113570 MOV RDI,qword ptr [RBX + 0x2d0] CALL 0x00113570 MOV qword ptr [RBX + 0x2e8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x2b0],XMM0 MOVUPS xmmword ptr [RBX + 0x2c0],XMM0 MOVUPS xmmword ptr [RBX + 0x2d0],XMM0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_close_memory(long param_1) { ma_clear_session_state(); free(*(void **)(param_1 + 0x2d8)); free(*(void **)(param_1 + 0x2b0)); free(*(void **)(param_1 + 0x2b8)); free(*(void **)(param_1 + 0x2c0)); free(*(void **)(param_1 + 0x2e8)); free(*(void **)(param_1 + 0x2c8)); free(*(void **)(param_1 + 0x2d0)); *(int8 *)(param_1 + 0x2e8) = 0; *(int8 *)(param_1 + 0x2b0) = 0; *(int8 *)(param_1 + 0x2b8) = 0; *(int8 *)(param_1 + 0x2c0) = 0; *(int8 *)(param_1 + 0x2c8) = 0; *(int8 *)(param_1 + 0x2d0) = 0; *(int8 *)(param_1 + 0x2d8) = 0; return; }
45,456
cpu_get_num_math()
monkey531[P]llama/common/common.cpp
int32_t cpu_get_num_math() { #if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__) int n_cpu = sysconf(_SC_NPROCESSORS_ONLN); if (n_cpu < 1) { return cpu_get_num_physical_cores(); } if (is_hybrid_cpu()) { cpu_set_t affinity; if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) { int result = cpu_count_math_cpus(n_cpu); pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity); if (result > 0) { return result; } } } #endif return cpu_get_num_physical_cores(); }
O3
cpp
cpu_get_num_math(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x100, %rsp # imm = 0x100 movl $0x54, %edi callq 0x18480 movq %rax, %rbx testl %ebx, %ebx jle 0x20c65 movl $0x7, %eax xorl %ecx, %ecx movq %rbx, %rsi cpuid xchgq %rbx, %rsi testw %dx, %dx jns 0x20c8e callq 0x18610 movq %rax, %r14 leaq 0x80(%rsp), %rdx movl $0x80, %esi movq %rax, %rdi callq 0x18c30 testl %eax, %eax jne 0x20c8e xorl %r15d, %r15d movq %rsp, %r12 xorl %ebp, %ebp xorps %xmm0, %xmm0 movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) cmpl $0x3ff, %r15d # imm = 0x3FF ja 0x20c07 movl $0x1, %eax movl %r15d, %ecx shlq %cl, %rax movl %r15d, %ecx shrl $0x6, %ecx orq %rax, (%rsp,%rcx,8) movl $0x80, %esi movq %r14, %rdi movq %r12, %rdx callq 0x18c00 testl %eax, %eax jne 0x20c79 xorl %ecx, %ecx movl $0x1a, %eax movq %rbx, %rsi cpuid xchgq %rbx, %rsi andl $0xff000000, %eax # imm = 0xFF000000 xorl %ecx, %ecx cmpl $0x20000000, %eax # imm = 0x20000000 setne %cl addl %ecx, %ebp addl %ecx, %r15d incl %r15d cmpl %ebx, %r15d jl 0x20bbf leaq 0x80(%rsp), %rdx movl $0x80, %esi movq %r14, %rdi callq 0x18c00 testl %ebp, %ebp jne 0x20c95 jmp 0x20c8e addq $0x100, %rsp # imm = 0x100 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x207e4 leaq 0x80(%rsp), %rdx movl $0x80, %esi movq %r14, %rdi callq 0x18c00 callq 0x207e4 movl %eax, %ebp movl %ebp, %eax addq $0x100, %rsp # imm = 0x100 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_Z16cpu_get_num_mathv: push rbp push r15 push r14 push r12 push rbx sub rsp, 100h mov edi, 54h ; 'T' call _sysconf mov rbx, rax test ebx, ebx jle loc_20C65 mov eax, 7 xor ecx, ecx mov rsi, rbx cpuid xchg rsi, rbx test dx, dx jns loc_20C8E call _pthread_self mov r14, rax lea rdx, [rsp+128h+var_A8] mov esi, 80h mov rdi, rax call _pthread_getaffinity_np test eax, eax jnz loc_20C8E xor r15d, r15d mov r12, rsp xor ebp, ebp loc_20BBF: xorps xmm0, xmm0 movaps [rsp+128h+var_B8], xmm0 movaps [rsp+128h+var_C8], xmm0 movaps [rsp+128h+var_D8], xmm0 movaps [rsp+128h+var_E8], xmm0 movaps [rsp+128h+var_F8], xmm0 movaps [rsp+128h+var_108], xmm0 movaps [rsp+128h+var_118], xmm0 movaps [rsp+128h+var_128], xmm0 cmp r15d, 3FFh ja short loc_20C07 mov eax, 1 mov ecx, r15d shl rax, cl mov ecx, r15d shr ecx, 6 or qword ptr [rsp+rcx*8+128h+var_128], rax loc_20C07: mov esi, 80h mov rdi, r14 mov rdx, r12 call _pthread_setaffinity_np test eax, eax jnz short loc_20C79 xor ecx, ecx mov eax, 1Ah mov rsi, rbx cpuid xchg rsi, rbx and eax, 0FF000000h xor ecx, ecx cmp eax, 20000000h setnz cl add ebp, ecx add r15d, ecx inc r15d cmp r15d, ebx jl loc_20BBF lea rdx, [rsp+128h+var_A8] mov esi, 80h mov rdi, r14 call _pthread_setaffinity_np test ebp, ebp jnz short loc_20C95 jmp short loc_20C8E loc_20C65: add rsp, 100h pop rbx pop r12 pop r14 pop r15 pop rbp jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void) loc_20C79: lea rdx, [rsp+128h+var_A8] mov esi, 80h mov rdi, r14 call _pthread_setaffinity_np loc_20C8E: call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void) mov ebp, eax loc_20C95: mov eax, ebp add rsp, 100h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long cpu_get_num_math(void) { long long v0; // rbx long long v2; // rsi long long v7; // rbx long long v8; // rsi long long v9; // rt0 long long v10; // r14 unsigned int v11; // r15d unsigned int v12; // ebp long long v13; // rcx long long v14; // r8 long long v15; // r9 long long v17; // rsi long long v22; // rcx __int128 v24; // [rsp+0h] [rbp-128h] BYREF __int128 v25; // [rsp+10h] [rbp-118h] __int128 v26; // [rsp+20h] [rbp-108h] __int128 v27; // [rsp+30h] [rbp-F8h] __int128 v28; // [rsp+40h] [rbp-E8h] __int128 v29; // [rsp+50h] [rbp-D8h] __int128 v30; // [rsp+60h] [rbp-C8h] __int128 v31; // [rsp+70h] [rbp-B8h] _BYTE v32[168]; // [rsp+80h] [rbp-A8h] BYREF v0 = sysconf(84LL); if ( (int)v0 <= 0 ) return cpu_get_num_physical_cores(); _RAX = 7LL; v2 = v0; __asm { cpuid } v9 = v2; v8 = _RBX; v7 = v9; if ( (_RDX & 0x8000u) != 0LL ) { v10 = pthread_self(84LL, v8, _RDX, _RCX); if ( !(unsigned int)pthread_getaffinity_np(v10, 128LL, v32) ) { v11 = 0; v12 = 0; do { v31 = 0LL; v30 = 0LL; v29 = 0LL; v28 = 0LL; v27 = 0LL; v26 = 0LL; v25 = 0LL; v24 = 0LL; if ( v11 <= 0x3FF ) *((_QWORD *)&v24 + (v11 >> 6)) |= 1LL << v11; if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)( v10, 128LL, &v24) ) { pthread_setaffinity_np( v10, 128LL, v32, v13, v14, v15, v24, *((_QWORD *)&v24 + 1), v25, *((_QWORD *)&v25 + 1), v26, *((_QWORD *)&v26 + 1), v27, *((_QWORD *)&v27 + 1), v28, *((_QWORD *)&v28 + 1), v29, *((_QWORD *)&v29 + 1), v30, *((_QWORD *)&v30 + 1), v31, *((_QWORD *)&v31 + 1)); return (unsigned int)cpu_get_num_physical_cores(); } _RAX = 26LL; v17 = v7; __asm { cpuid } v7 = v17; v22 = (_RAX & 0xFF000000) != 0x20000000; v12 += v22; v11 += v22 + 1; } while ( (int)v11 < (int)v17 ); pthread_setaffinity_np( v10, 128LL, v32, v22, v14, v15, v24, *((_QWORD *)&v24 + 1), v25, *((_QWORD *)&v25 + 1), v26, *((_QWORD *)&v26 + 1), v27, *((_QWORD *)&v27 + 1), v28, *((_QWORD *)&v28 + 1), v29, *((_QWORD *)&v29 + 1), v30, *((_QWORD *)&v30 + 1), v31, *((_QWORD *)&v31 + 1)); if ( v12 ) return v12; } } return (unsigned int)cpu_get_num_physical_cores(); }
cpu_get_num_math: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x100 MOV EDI,0x54 CALL 0x00118480 MOV RBX,RAX TEST EBX,EBX JLE 0x00120c65 MOV EAX,0x7 XOR ECX,ECX MOV RSI,RBX CPUID XCHG RBX,RSI TEST DX,DX JNS 0x00120c8e CALL 0x00118610 MOV R14,RAX LEA RDX,[RSP + 0x80] MOV ESI,0x80 MOV RDI,RAX CALL 0x00118c30 TEST EAX,EAX JNZ 0x00120c8e XOR R15D,R15D MOV R12,RSP XOR EBP,EBP LAB_00120bbf: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 CMP R15D,0x3ff JA 0x00120c07 MOV EAX,0x1 MOV ECX,R15D SHL RAX,CL MOV ECX,R15D SHR ECX,0x6 OR qword ptr [RSP + RCX*0x8],RAX LAB_00120c07: MOV ESI,0x80 MOV RDI,R14 MOV RDX,R12 CALL 0x00118c00 TEST EAX,EAX JNZ 0x00120c79 XOR ECX,ECX MOV EAX,0x1a MOV RSI,RBX CPUID XCHG RBX,RSI AND EAX,0xff000000 XOR ECX,ECX CMP EAX,0x20000000 SETNZ CL ADD EBP,ECX ADD R15D,ECX INC R15D CMP R15D,EBX JL 0x00120bbf LEA RDX,[RSP + 0x80] MOV ESI,0x80 MOV RDI,R14 CALL 0x00118c00 TEST EBP,EBP JNZ 0x00120c95 JMP 0x00120c8e LAB_00120c65: ADD RSP,0x100 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001207e4 LAB_00120c79: LEA RDX,[RSP + 0x80] MOV ESI,0x80 MOV RDI,R14 CALL 0x00118c00 LAB_00120c8e: CALL 0x001207e4 MOV EBP,EAX LAB_00120c95: MOV EAX,EBP ADD RSP,0x100 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00120c25) */ /* WARNING: Removing unreachable block (ram,0x00120b84) */ /* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cpu_get_num_math() */ ulong cpu_get_num_math(void) { long lVar1; uint *puVar2; uint uVar3; int iVar4; long lVar5; pthread_t __th; ulong uVar6; uint uVar7; uint uVar8; cpu_set_t local_128; cpu_set_t local_a8; lVar5 = sysconf(0x54); if ((int)lVar5 < 1) { uVar6 = cpu_get_num_physical_cores(); return uVar6; } lVar1 = cpuid_Extended_Feature_Enumeration_info(7); if ((short)*(int4 *)(lVar1 + 8) < 0) { __th = pthread_self(); iVar4 = pthread_getaffinity_np(__th,0x80,&local_a8); if (iVar4 == 0) { uVar8 = 0; uVar7 = 0; do { local_128.__bits[0xe] = 0; local_128.__bits[0xf] = 0; local_128.__bits[0xc] = 0; local_128.__bits[0xd] = 0; local_128.__bits[10] = 0; local_128.__bits[0xb] = 0; local_128.__bits[8] = 0; local_128.__bits[9] = 0; local_128.__bits[6] = 0; local_128.__bits[7] = 0; local_128.__bits[4] = 0; local_128.__bits[5] = 0; local_128.__bits[2] = 0; local_128.__bits[3] = 0; local_128.__bits[0] = 0; local_128.__bits[1] = 0; if (uVar8 < 0x400) { local_128.__bits[uVar8 >> 6] = local_128.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f); } iVar4 = pthread_setaffinity_np(__th,0x80,&local_128); if (iVar4 != 0) { pthread_setaffinity_np(__th,0x80,&local_a8); goto LAB_00120c8e; } puVar2 = (uint *)cpuid(0x1a); uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000); uVar7 = uVar7 + uVar3; uVar8 = uVar8 + uVar3 + 1; } while ((int)uVar8 < (int)lVar5); pthread_setaffinity_np(__th,0x80,&local_a8); if (uVar7 != 0) goto LAB_00120c95; } } LAB_00120c8e: uVar7 = cpu_get_num_physical_cores(); LAB_00120c95: return (ulong)uVar7; }
45,457
js_array_buffer_slice
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_buffer_slice(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int class_id) { JSArrayBuffer *abuf, *new_abuf; int64_t len, start, end, new_len; JSValue ctor, new_obj; abuf = JS_GetOpaque2(ctx, this_val, class_id); if (!abuf) return JS_EXCEPTION; if (abuf->detached) return JS_ThrowTypeErrorDetachedArrayBuffer(ctx); len = abuf->byte_length; if (JS_ToInt64Clamp(ctx, &start, argv[0], 0, len, len)) return JS_EXCEPTION; end = len; if (!JS_IsUndefined(argv[1])) { if (JS_ToInt64Clamp(ctx, &end, argv[1], 0, len, len)) return JS_EXCEPTION; } new_len = max_int64(end - start, 0); ctor = JS_SpeciesConstructor(ctx, this_val, JS_UNDEFINED); if (JS_IsException(ctor)) return ctor; if (JS_IsUndefined(ctor)) { new_obj = js_array_buffer_constructor2(ctx, JS_UNDEFINED, new_len, NULL, class_id); } else { JSValue args[1]; args[0] = js_int64(new_len); new_obj = JS_CallConstructor(ctx, ctor, 1, args); JS_FreeValue(ctx, ctor); JS_FreeValue(ctx, args[0]); } if (JS_IsException(new_obj)) return new_obj; new_abuf = JS_GetOpaque2(ctx, new_obj, class_id); if (!new_abuf) goto fail; if (js_same_value(ctx, new_obj, this_val)) { JS_ThrowTypeError(ctx, "cannot use identical ArrayBuffer"); goto fail; } if (new_abuf->detached) { JS_ThrowTypeErrorDetachedArrayBuffer(ctx); goto fail; } if (new_abuf->byte_length < new_len) { JS_ThrowTypeError(ctx, "new ArrayBuffer is too small"); goto fail; } /* must test again because of side effects */ if (abuf->detached) { JS_ThrowTypeErrorDetachedArrayBuffer(ctx); goto fail; } memcpy(new_abuf->data, abuf->data + start, new_len); return new_obj; fail: JS_FreeValue(ctx, new_obj); return JS_EXCEPTION; }
O1
c
js_array_buffer_slice: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, %ebx movq %r8, %r13 movq %rdx, %r15 movq %rdi, %r14 movq %rsi, 0x18(%rsp) movl %r9d, %ecx callq 0x275b5 movl $0x6, %ebp testq %rax, %rax je 0x8007a movq %rax, %r12 cmpb $0x0, 0x8(%rax) je 0x7fe42 leaq 0x225c9(%rip), %rsi # 0xa23f9 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x22567 jmp 0x8007d movq %r15, 0x10(%rsp) movslq (%r12), %rbp movq (%r13), %rdx movq 0x8(%r13), %rcx subq $0x8, %rsp xorl %r15d, %r15d leaq 0x40(%rsp), %rsi movq %r14, %rdi xorl %r8d, %r8d movq %rbp, %r9 pushq %rbp callq 0x27858 addq $0x10, %rsp testl %eax, %eax je 0x7fe82 xorl %ecx, %ecx movl $0x6, %ebp jmp 0x8007f movq %rbp, 0x20(%rsp) movq 0x18(%r13), %rcx cmpl $0x3, %ecx je 0x7feb7 movq 0x10(%r13), %rdx subq $0x8, %rsp xorl %r15d, %r15d leaq 0x28(%rsp), %rsi movq %r14, %rdi xorl %r8d, %r8d movq %rbp, %r9 pushq %rbp callq 0x27858 addq $0x10, %rsp testl %eax, %eax jne 0x7fe76 movq 0x20(%rsp), %r13 movq 0x38(%rsp), %rbp subq %rbp, %r13 xorl %eax, %eax testq %r13, %r13 cmovgq %r13, %rax movq %rax, (%rsp) movl $0x3, %r8d movq %r14, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx xorl %ecx, %ecx callq 0x440b7 cmpl $0x3, %edx je 0x7ff10 movq %rax, %r15 cmpl $0x6, %edx jne 0x7ff4c movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r15, %rcx andq %rax, %rcx movq %rdx, %rbp jmp 0x8007f movq %rbp, 0x8(%rsp) xorl %eax, %eax leaq -0x47065(%rip), %r10 # 0x38eb9 movl $0x3, %edx movq %r14, %rdi xorl %esi, %esi movq (%rsp), %rcx xorl %r8d, %r8d movl %ebx, %r9d pushq $0x1 pushq %rax pushq %r10 pushq %rax callq 0x38c19 addq $0x20, %rsp movq %rax, %r15 movq %rdx, %r13 jmp 0x7ffda movq %rbp, 0x8(%rsp) xorl %eax, %eax movl $0x80000000, %ecx # imm = 0x80000000 cmpq %rcx, %r13 movq (%rsp), %rcx cvtsi2sd %rcx, %xmm0 movl %ecx, %ecx movq %xmm0, %rsi cmovlq %rcx, %rsi movl $0x7, %ecx cmovlq %rax, %rcx leaq 0x40(%rsp), %rbp movq %rsi, (%rbp) movq %rcx, 0x8(%rbp) movq %r14, %rdi movq %r15, %rsi movq %r15, %rcx movq %rdx, %r13 movq %rdx, %r8 movl $0x1, %r9d pushq $0x2 pushq %rbp callq 0x2fa61 addq $0x10, %rsp movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x18(%r14), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x1d8c6 movq (%rbp), %rsi movq 0x8(%rbp), %rdx movq 0x18(%r14), %rdi callq 0x1d8c6 movq 0x28(%rsp), %r15 movq 0x30(%rsp), %r13 cmpl $0x6, %r13d movl $0x6, %ebp jne 0x7fffd movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r15, %rcx andq %rax, %rcx movq %r13, %rbp jmp 0x8007f movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx movl %ebx, %ecx callq 0x275b5 testq %rax, %rax je 0x8006b movq %rax, %rbx movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx movq 0x18(%rsp), %rcx movq 0x10(%rsp), %r8 callq 0x26461 testl %eax, %eax je 0x8003a leaq 0x2257e(%rip), %rsi # 0xa25b6 jmp 0x80061 leaq 0x223b8(%rip), %rsi # 0xa23f9 cmpb $0x0, 0x8(%rbx) jne 0x80061 movslq (%rbx), %rax cmpq %rax, (%rsp) jle 0x80059 leaq 0x22580(%rip), %rsi # 0xa25d7 jmp 0x80061 cmpb $0x0, 0x8(%r12) je 0x80097 movq %r14, %rdi xorl %eax, %eax callq 0x22567 movq 0x18(%r14), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x1d8c6 xorl %r15d, %r15d xorl %ecx, %ecx movl %r15d, %eax orq %rcx, %rax movq %rbp, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x10(%rbx), %rdi movq 0x8(%rsp), %rsi addq 0x10(%r12), %rsi movq (%rsp), %rdx callq 0xe5b0 jmp 0x7ffe5
js_array_buffer_slice: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebx, r9d mov r13, r8 mov r15, rdx mov r14, rdi mov [rsp+88h+var_70], rsi mov ecx, r9d call JS_GetOpaque2 mov ebp, 6 test rax, rax jz loc_8007A mov r12, rax cmp byte ptr [rax+8], 0 jz short loc_7FE42 lea rsi, aArraybufferIsD; "ArrayBuffer is detached" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp loc_8007D loc_7FE42: mov [rsp+88h+var_78], r15 movsxd rbp, dword ptr [r12] mov rdx, [r13+0] mov rcx, [r13+8] sub rsp, 8 xor r15d, r15d lea rsi, [rsp+90h+var_50] mov rdi, r14 xor r8d, r8d mov r9, rbp push rbp call JS_ToInt64Clamp add rsp, 10h test eax, eax jz short loc_7FE82 loc_7FE76: xor ecx, ecx mov ebp, 6 jmp loc_8007F loc_7FE82: mov [rsp+88h+var_68], rbp mov rcx, [r13+18h] cmp ecx, 3 jz short loc_7FEB7 mov rdx, [r13+10h] sub rsp, 8 xor r15d, r15d lea rsi, [rsp+90h+var_68] mov rdi, r14 xor r8d, r8d mov r9, rbp push rbp call JS_ToInt64Clamp add rsp, 10h test eax, eax jnz short loc_7FE76 loc_7FEB7: mov r13, [rsp+88h+var_68] mov rbp, [rsp+88h+var_50] sub r13, rbp xor eax, eax test r13, r13 cmovg rax, r13 mov [rsp+88h+var_88], rax mov r8d, 3 mov rdi, r14 mov rsi, [rsp+88h+var_70] mov rdx, [rsp+88h+var_78] xor ecx, ecx call JS_SpeciesConstructor cmp edx, 3 jz short loc_7FF10 mov r15, rax cmp edx, 6 jnz short loc_7FF4C mov rax, 0FFFFFFFF00000000h mov rcx, r15 and rcx, rax mov rbp, rdx jmp loc_8007F loc_7FF10: mov [rsp+88h+var_80], rbp xor eax, eax lea r10, js_array_buffer_free mov edx, 3 mov rdi, r14 xor esi, esi mov rcx, [rsp+88h+var_88] xor r8d, r8d mov r9d, ebx push 1 push rax push r10 push rax call js_array_buffer_constructor3 add rsp, 20h mov r15, rax mov r13, rdx jmp loc_7FFDA loc_7FF4C: mov [rsp+88h+var_80], rbp xor eax, eax mov ecx, 80000000h cmp r13, rcx mov rcx, [rsp+88h+var_88] cvtsi2sd xmm0, rcx mov ecx, ecx movq rsi, xmm0 cmovl rsi, rcx mov ecx, 7 cmovl rcx, rax lea rbp, [rsp+88h+var_48] mov [rbp+0], rsi mov [rbp+8], rcx mov rdi, r14 mov rsi, r15 mov rcx, r15 mov r13, rdx mov r8, rdx mov r9d, 1 push 2 push rbp call JS_CallConstructorInternal add rsp, 10h mov [rsp+88h+var_60], rax mov [rsp+88h+var_58], rdx mov rdi, [r14+18h] mov rsi, r15 mov rdx, r13 call JS_FreeValueRT mov rsi, [rbp+0] mov rdx, [rbp+8] mov rdi, [r14+18h] call JS_FreeValueRT mov r15, [rsp+88h+var_60] mov r13, [rsp+88h+var_58] loc_7FFDA: cmp r13d, 6 mov ebp, 6 jnz short loc_7FFFD loc_7FFE5: mov rax, 0FFFFFFFF00000000h mov rcx, r15 and rcx, rax mov rbp, r13 jmp loc_8007F loc_7FFFD: mov rdi, r14 loc_80000: mov rsi, r15 loc_80003: mov rdx, r13 mov ecx, ebx call JS_GetOpaque2 test rax, rax jz short loc_8006B mov rbx, rax mov rdi, r14 mov rsi, r15 mov rdx, r13 mov rcx, [rsp+88h+var_70] mov r8, [rsp+88h+var_78] call js_same_value test eax, eax jz short loc_8003A lea rsi, aCannotUseIdent; "cannot use identical ArrayBuffer" jmp short loc_80061 loc_8003A: lea rsi, aArraybufferIsD; "ArrayBuffer is detached" cmp byte ptr [rbx+8], 0 jnz short loc_80061 movsxd rax, dword ptr [rbx] cmp [rsp+88h+var_88], rax jle short loc_80059 lea rsi, aNewArraybuffer; "new ArrayBuffer is too small" jmp short loc_80061 loc_80059: cmp byte ptr [r12+8], 0 jz short loc_80097 loc_80061: mov rdi, r14 xor eax, eax call JS_ThrowTypeError loc_8006B: mov rdi, [r14+18h] mov rsi, r15 mov rdx, r13 call JS_FreeValueRT loc_8007A: xor r15d, r15d loc_8007D: xor ecx, ecx loc_8007F: mov eax, r15d or rax, rcx mov rdx, rbp add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_80097: mov rdi, [rbx+10h] mov rsi, [rsp+88h+var_80] add rsi, [r12+10h] mov rdx, [rsp+88h+var_88] call _memcpy jmp loc_7FFE5
unsigned long long js_array_buffer_slice( long long a1, _DWORD *a2, unsigned long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13, unsigned int a14) { unsigned long long v16; // r15 int *Opaque2; // rax long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 int *v24; // r12 signed long long v25; // rbp long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 unsigned long long v29; // rcx long long v30; // rcx unsigned long long v31; // rbp long long v32; // r13 signed long long v33; // rax unsigned long long v34; // rax long long v35; // rdx __m128 v36; // xmm4 __m128 v37; // xmm5 long long v38; // rdx long long v39; // r13 double v40; // rsi long long v41; // rcx long long v42; // r13 long long v43; // rdx long long v44; // rax int *v45; // rbx long long v46; // rdx long long v47; // rcx long long v48; // r8 long long v49; // r9 __m128 v50; // xmm4 __m128 v51; // xmm5 const char *v52; // rsi char v54; // [rsp+0h] [rbp-88h] signed long long v55; // [rsp+0h] [rbp-88h] unsigned long long v56; // [rsp+8h] [rbp-80h] long long v57; // [rsp+10h] [rbp-78h] signed long long v59; // [rsp+20h] [rbp-68h] BYREF unsigned long long v60; // [rsp+28h] [rbp-60h] long long v61; // [rsp+30h] [rbp-58h] unsigned long long v62; // [rsp+38h] [rbp-50h] BYREF double v63; // [rsp+40h] [rbp-48h] BYREF long long v64; // [rsp+48h] [rbp-40h] v16 = a3; Opaque2 = (int *)JS_GetOpaque2(a1, (long long)a2, a3, a14); if ( !Opaque2 ) goto LABEL_30; v24 = Opaque2; if ( *((_BYTE *)Opaque2 + 8) ) { LODWORD(v16) = 0; JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached", v18, v19, v20, v21, a4, a5, a6, a7, v22, v23, a10, a11, v54); LABEL_31: v29 = 0LL; return v29 | (unsigned int)v16; } v57 = v16; v25 = *Opaque2; LODWORD(v16) = 0; if ( !(unsigned int)JS_ToInt64Clamp(a1, &v62, *(_DWORD **)a13, *(_QWORD *)(a13 + 8), 0LL, v25, v25) ) { v59 = v25; v30 = *(_QWORD *)(a13 + 24); if ( (_DWORD)v30 == 3 || (LODWORD(v16) = 0, !(unsigned int)JS_ToInt64Clamp(a1, (unsigned long long *)&v59, *(_DWORD **)(a13 + 16), v30, 0LL, v25, v25)) ) { v31 = v62; v32 = v59 - v62; v33 = 0LL; if ( (long long)(v59 - v62) > 0 ) v33 = v59 - v62; v55 = v33; v34 = (unsigned long long)JS_SpeciesConstructor( a1, (long long)a2, v57, 0LL, 3LL, v26, a4, a5, a6, a7, v27, v28, a10, a11); if ( (_DWORD)v35 == 3 ) { v56 = v31; v16 = js_array_buffer_constructor3( a1, 0LL, 3LL, v55, 0LL, a14, a4, a5, a6, a7, v36, v37, a10, a11, 0LL, (long long ( *)())js_array_buffer_free, 0LL, 1); v39 = v38; } else { v16 = v34; if ( (_DWORD)v35 == 6 ) { v29 = v34 & 0xFFFFFFFF00000000LL; return v29 | (unsigned int)v16; } v56 = v31; *(double *)a4.m128_u64 = (double)(int)v55; v40 = (double)(int)v55; if ( v32 < 0x80000000LL ) *(_QWORD *)&v40 = (unsigned int)v55; v41 = 7LL; if ( v32 < 0x80000000LL ) v41 = 0LL; v63 = v40; v64 = v41; v42 = v35; v60 = JS_CallConstructorInternal( a1, v34, v35, v34, v35, 1LL, a4, a5, a6, a7, v36, v37, a10, a11, (long long)&v63, 2); v61 = v43; JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v16, v42); JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)&v63, v64); v16 = v60; v39 = v61; } if ( (_DWORD)v39 == 6 ) { LABEL_20: v29 = v16 & 0xFFFFFFFF00000000LL; return v29 | (unsigned int)v16; } v44 = JS_GetOpaque2(a1, v16, v39, a14); if ( v44 ) { v45 = (int *)v44; if ( (unsigned int)js_same_value(a1, (_DWORD *)v16, v39, a2, v57) ) { v52 = "cannot use identical ArrayBuffer"; } else { v52 = "ArrayBuffer is detached"; if ( !*((_BYTE *)v45 + 8) ) { if ( v55 <= *v45 ) { if ( !*((_BYTE *)v24 + 8) ) { memcpy(*((_QWORD *)v45 + 2), *((_QWORD *)v24 + 2) + v56, v55); goto LABEL_20; } } else { v52 = "new ArrayBuffer is too small"; } } } JS_ThrowTypeError(a1, (long long)v52, v46, v47, v48, v49, a4, a5, a6, a7, v50, v51, a10, a11, v55); } JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v16, v39); LABEL_30: LODWORD(v16) = 0; goto LABEL_31; } } v29 = 0LL; return v29 | (unsigned int)v16; }
js_array_buffer_slice: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBX,R9D MOV R13,R8 MOV R15,RDX MOV R14,RDI MOV qword ptr [RSP + 0x18],RSI MOV ECX,R9D CALL 0x001275b5 MOV EBP,0x6 TEST RAX,RAX JZ 0x0018007a MOV R12,RAX CMP byte ptr [RAX + 0x8],0x0 JZ 0x0017fe42 LEA RSI,[0x1a23f9] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 JMP 0x0018007d LAB_0017fe42: MOV qword ptr [RSP + 0x10],R15 MOVSXD RBP,dword ptr [R12] MOV RDX,qword ptr [R13] MOV RCX,qword ptr [R13 + 0x8] SUB RSP,0x8 XOR R15D,R15D LEA RSI,[RSP + 0x40] MOV RDI,R14 XOR R8D,R8D MOV R9,RBP PUSH RBP CALL 0x00127858 ADD RSP,0x10 TEST EAX,EAX JZ 0x0017fe82 LAB_0017fe76: XOR ECX,ECX MOV EBP,0x6 JMP 0x0018007f LAB_0017fe82: MOV qword ptr [RSP + 0x20],RBP MOV RCX,qword ptr [R13 + 0x18] CMP ECX,0x3 JZ 0x0017feb7 MOV RDX,qword ptr [R13 + 0x10] SUB RSP,0x8 XOR R15D,R15D LEA RSI,[RSP + 0x28] MOV RDI,R14 XOR R8D,R8D MOV R9,RBP PUSH RBP CALL 0x00127858 ADD RSP,0x10 TEST EAX,EAX JNZ 0x0017fe76 LAB_0017feb7: MOV R13,qword ptr [RSP + 0x20] MOV RBP,qword ptr [RSP + 0x38] SUB R13,RBP XOR EAX,EAX TEST R13,R13 CMOVG RAX,R13 MOV qword ptr [RSP],RAX MOV R8D,0x3 MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] XOR ECX,ECX CALL 0x001440b7 CMP EDX,0x3 JZ 0x0017ff10 MOV R15,RAX CMP EDX,0x6 JNZ 0x0017ff4c MOV RAX,-0x100000000 MOV RCX,R15 AND RCX,RAX MOV RBP,RDX JMP 0x0018007f LAB_0017ff10: MOV qword ptr [RSP + 0x8],RBP XOR EAX,EAX LEA R10,[0x138eb9] MOV EDX,0x3 MOV RDI,R14 XOR ESI,ESI MOV RCX,qword ptr [RSP] XOR R8D,R8D MOV R9D,EBX PUSH 0x1 PUSH RAX PUSH R10 PUSH RAX CALL 0x00138c19 ADD RSP,0x20 MOV R15,RAX MOV R13,RDX JMP 0x0017ffda LAB_0017ff4c: MOV qword ptr [RSP + 0x8],RBP XOR EAX,EAX MOV ECX,0x80000000 CMP R13,RCX MOV RCX,qword ptr [RSP] CVTSI2SD XMM0,RCX MOV ECX,ECX MOVQ RSI,XMM0 CMOVL RSI,RCX MOV ECX,0x7 CMOVL RCX,RAX LEA RBP,[RSP + 0x40] MOV qword ptr [RBP],RSI MOV qword ptr [RBP + 0x8],RCX MOV RDI,R14 MOV RSI,R15 MOV RCX,R15 MOV R13,RDX MOV R8,RDX MOV R9D,0x1 PUSH 0x2 PUSH RBP CALL 0x0012fa61 ADD RSP,0x10 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R15 MOV RDX,R13 CALL 0x0011d8c6 MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] MOV RDI,qword ptr [R14 + 0x18] CALL 0x0011d8c6 MOV R15,qword ptr [RSP + 0x28] MOV R13,qword ptr [RSP + 0x30] LAB_0017ffda: CMP R13D,0x6 MOV EBP,0x6 JNZ 0x0017fffd LAB_0017ffe5: MOV RAX,-0x100000000 MOV RCX,R15 AND RCX,RAX MOV RBP,R13 JMP 0x0018007f LAB_0017fffd: MOV RDI,R14 MOV RSI,R15 MOV RDX,R13 MOV ECX,EBX CALL 0x001275b5 TEST RAX,RAX JZ 0x0018006b MOV RBX,RAX MOV RDI,R14 MOV RSI,R15 MOV RDX,R13 MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x10] CALL 0x00126461 TEST EAX,EAX JZ 0x0018003a LEA RSI,[0x1a25b6] JMP 0x00180061 LAB_0018003a: LEA RSI,[0x1a23f9] CMP byte ptr [RBX + 0x8],0x0 JNZ 0x00180061 MOVSXD RAX,dword ptr [RBX] CMP qword ptr [RSP],RAX JLE 0x00180059 LEA RSI,[0x1a25d7] JMP 0x00180061 LAB_00180059: CMP byte ptr [R12 + 0x8],0x0 JZ 0x00180097 LAB_00180061: MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 LAB_0018006b: MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R15 MOV RDX,R13 CALL 0x0011d8c6 LAB_0018007a: XOR R15D,R15D LAB_0018007d: XOR ECX,ECX LAB_0018007f: MOV EAX,R15D OR RAX,RCX MOV RDX,RBP ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00180097: MOV RDI,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RSP + 0x8] ADD RSI,qword ptr [R12 + 0x10] MOV RDX,qword ptr [RSP] CALL 0x0010e5b0 JMP 0x0017ffe5
int1 [16] js_array_buffer_slice (long param_1,int8 param_2,int8 param_3,int8 param_4,int8 *param_5 ,int4 param_6) { int iVar1; int *piVar2; ulong __n; int *piVar3; ulong uVar4; long lVar5; char *pcVar6; ulong uVar7; int8 uVar8; int1 auVar9 [16]; int1 auVar10 [16]; long local_68; int1 local_60 [16]; long local_50; double local_48; int8 local_40; piVar2 = (int *)JS_GetOpaque2(); if (piVar2 != (int *)0x0) { if ((char)piVar2[2] == '\0') { lVar5 = (long)*piVar2; iVar1 = JS_ToInt64Clamp(param_1,&local_50,*param_5,param_5[1],0,lVar5,lVar5); if ((iVar1 != 0) || ((local_68 = lVar5, (int)param_5[3] != 3 && (iVar1 = JS_ToInt64Clamp(param_1,&local_68,param_5[2],param_5[3],0,lVar5,lVar5), iVar1 != 0)))) { uVar4 = 0; auVar9 = ZEXT816(6) << 0x40; goto LAB_0018007f; } uVar7 = local_68 - local_50; __n = 0; if (0 < (long)uVar7) { __n = uVar7; } auVar9 = JS_SpeciesConstructor(param_1,param_2,param_3,0,3); uVar8 = auVar9._8_8_; uVar4 = auVar9._0_8_; if (auVar9._8_4_ == 3) { auVar9 = js_array_buffer_constructor3(param_1,0,3,__n,0,param_6,0,js_array_buffer_free,0,1); } else { if (auVar9._8_4_ == 6) { uVar4 = uVar4 & 0xffffffff00000000; goto LAB_0018007f; } local_48 = (double)(long)__n; if ((long)uVar7 < 0x80000000) { local_48 = (double)(__n & 0xffffffff); } local_40 = 7; if ((long)uVar7 < 0x80000000) { local_40 = 0; } local_60 = JS_CallConstructorInternal(param_1,uVar4,uVar8,uVar4,uVar8,1,&local_48,2); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar8); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,local_40); auVar9 = local_60; } uVar8 = auVar9._8_8_; uVar4 = auVar9._0_8_; if (auVar9._8_4_ == 6) { LAB_0017ffe5: uVar4 = uVar4 & 0xffffffff00000000; goto LAB_0018007f; } piVar3 = (int *)JS_GetOpaque2(param_1,uVar4,uVar8,param_6); if (piVar3 != (int *)0x0) { iVar1 = js_same_value(param_1,uVar4,uVar8,param_2,param_3); if (iVar1 == 0) { pcVar6 = "ArrayBuffer is detached"; if ((char)piVar3[2] == '\0') { if ((long)*piVar3 < (long)__n) { pcVar6 = "new ArrayBuffer is too small"; } else if ((char)piVar2[2] == '\0') { memcpy(*(void **)(piVar3 + 4),(void *)(local_50 + *(long *)(piVar2 + 4)),__n); goto LAB_0017ffe5; } } } else { pcVar6 = "cannot use identical ArrayBuffer"; } JS_ThrowTypeError(param_1,pcVar6); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar8); } else { JS_ThrowTypeError(param_1,"ArrayBuffer is detached"); } } auVar9 = ZEXT816(6) << 0x40; uVar4 = 0; LAB_0018007f: auVar10._0_8_ = auVar9._0_8_ & 0xffffffff | uVar4; auVar10._8_8_ = auVar9._8_8_; return auVar10; }
45,458
my_mb_wc_utf16_quick
eloqsql/strings/ctype-utf16.h
static inline int my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { if (s + 2 > e) return MY_CS_TOOSMALL2; /* High bytes: 0xD[89AB] = B'110110??' Low bytes: 0xD[CDEF] = B'110111??' Surrogate mask: 0xFC = B'11111100' */ if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */ { if (s + 4 > e) return MY_CS_TOOSMALL4; if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]); return 4; } if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC2(s[0], s[1]); return 2; }
O0
c
my_mb_wc_utf16_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x5a40a movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x5a4e8 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xd8, %eax jne 0x5a4a7 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x5a43b movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x5a4e8 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax je 0x5a45b movl $0x0, -0x4(%rbp) jmp 0x5a4e8 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0x3, %eax shll $0x12, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0xa, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx andl $0x3, %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx addl %ecx, %eax addl $0x10000, %eax # imm = 0x10000 movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x5a4e8 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax jne 0x5a4c3 movl $0x0, -0x4(%rbp) jmp 0x5a4e8 movq -0x18(%rbp), %rax movzbl (%rax), %eax shll $0x8, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_mb_wc_utf16_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] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_5A40A mov [rbp+var_4], 0FFFFFF9Ah jmp loc_5A4E8 loc_5A40A: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0D8h jnz loc_5A4A7 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_5A43B mov [rbp+var_4], 0FFFFFF98h jmp loc_5A4E8 loc_5A43B: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] and eax, 0FCh cmp eax, 0DCh jz short loc_5A45B mov [rbp+var_4], 0 jmp loc_5A4E8 loc_5A45B: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 3 shl eax, 12h mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 0Ah add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] and ecx, 3 shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] add eax, ecx add eax, 10000h movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_5A4E8 loc_5A4A7: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0DCh jnz short loc_5A4C3 mov [rbp+var_4], 0 jmp short loc_5A4E8 loc_5A4C3: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] shl eax, 8 mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 loc_5A4E8: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf16_quick_0(_QWORD *a1, unsigned __int8 *a2, unsigned long long a3) { if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (*a2 & 0xFC) == 0xD8 ) { if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[2] & 0xFC) == 0xDC ) { *a1 = a2[3] + ((a2[2] & 3) << 8) + (a2[1] << 10) + ((*a2 & 3) << 18) + 0x10000; return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (*a2 & 0xFC) == 0xDC ) { return 0; } else { *a1 = a2[1] + (*a2 << 8); return 2; } } else { return (unsigned int)-102; } }
my_mb_wc_utf16_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] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0015a40a MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0015a4e8 LAB_0015a40a: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xd8 JNZ 0x0015a4a7 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0015a43b MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x0015a4e8 LAB_0015a43b: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] AND EAX,0xfc CMP EAX,0xdc JZ 0x0015a45b MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015a4e8 LAB_0015a45b: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x3 SHL EAX,0x12 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0xa ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] AND ECX,0x3 SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] ADD EAX,ECX ADD EAX,0x10000 MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x0015a4e8 LAB_0015a4a7: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xdc JNZ 0x0015a4c3 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015a4e8 LAB_0015a4c3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 LAB_0015a4e8: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf16_quick(long *param_1,byte *param_2,byte *param_3) { int4 local_c; if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((*param_2 & 0xfc) == 0xd8) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((param_2[2] & 0xfc) == 0xdc) { *param_1 = (long)(int)((*param_2 & 3) * 0x40000 + (uint)param_2[1] * 0x400 + (param_2[2] & 3) * 0x100 + (uint)param_2[3] + 0x10000); local_c = 4; } else { local_c = 0; } } else if ((*param_2 & 0xfc) == 0xdc) { local_c = 0; } else { *param_1 = (long)(int)((uint)*param_2 * 0x100 + (uint)param_2[1]); local_c = 2; } return local_c; }
45,459
long minja::Value::get<long>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O0
cpp
long minja::Value::get<long>() const: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x2244c0 testb $0x1, %al jne 0x22dd7e jmp 0x22dd91 movq 0x8(%rsp), %rdi addq $0x40, %rdi callq 0x16de20 addq $0x68, %rsp retq movb $0x1, 0x13(%rsp) movl $0x10, %edi callq 0x64880 movq 0x8(%rsp), %rsi movq %rax, (%rsp) leaq 0x20(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x222df0 jmp 0x22ddbc leaq 0xc4837(%rip), %rsi # 0x2f25fa leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x98c80 jmp 0x22ddd4 movq (%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x64640 jmp 0x22dde4 movq (%rsp), %rdi movb $0x0, 0x13(%rsp) movq 0x18b1b4(%rip), %rsi # 0x3b8fa8 movq 0x18b175(%rip), %rdx # 0x3b8f70 callq 0x64d60 jmp 0x22de62 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x22de44 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x22de3a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x40(%rsp), %rdi callq 0x65a60 leaq 0x20(%rsp), %rdi callq 0x65a60 testb $0x1, 0x13(%rsp) jne 0x22de4d jmp 0x22de56 movq (%rsp), %rdi callq 0x652b0 jmp 0x22de58 movq 0x18(%rsp), %rdi callq 0x64e40 nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK5minja5Value3getIlEET_v: sub rsp, 68h mov [rsp+68h+var_8], rdi mov rdi, [rsp+68h+var_8]; this mov [rsp+68h+var_60], rdi call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, 1 jnz short loc_22DD7E jmp short loc_22DD91 loc_22DD7E: mov rdi, [rsp+68h+var_60] add rdi, 40h ; '@' call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3getIllEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS0_6detail12priority_tagILj4EEEEEEv add rsp, 68h retn loc_22DD91: mov [rsp+68h+var_55], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+68h+var_60] mov [rsp+68h+var_68], rax lea rdi, [rsp+68h+var_48] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_22DDBC: lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... lea rdi, [rsp+68h+var_28] lea rdx, [rsp+68h+var_48] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_22DDD4: mov rdi, [rsp+68h+var_68] lea rsi, [rsp+68h+var_28] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_22DDE4: mov rdi, [rsp+68h+var_68]; void * mov [rsp+68h+var_55], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw
long long minja::Value::get<long>(minja::Value *a1) { void *exception; // [rsp+0h] [rbp-68h] _BYTE v3[32]; // [rsp+20h] [rbp-48h] BYREF _BYTE v4[32]; // [rsp+40h] [rbp-28h] BYREF minja::Value *v5; // [rsp+60h] [rbp-8h] v5 = a1; if ( (minja::Value::is_primitive(a1) & 1) == 0 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get<long,long>((long long)a1 + 64); }
_Vector_base: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0022dd90 ADD RSP,0x18 RET
/* std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > > >::_Vector_base(std::_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > > >&&) */ void __thiscall std:: _Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::_Vector_base(_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> *this,_Vector_base *param_1) { _Vector_impl::_Vector_impl((_Vector_impl *)this,(_Vector_impl *)param_1); return; }
45,460
long minja::Value::get<long>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O1
cpp
long minja::Value::get<long>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rdi) jne 0xfb767 cmpq $0x0, 0x20(%r14) jne 0xfb767 cmpq $0x0, 0x30(%r14) jne 0xfb767 addq $0x40, %r14 movq %rsp, %rbx movl $0x0, (%rbx) movq %r14, %rdi movq %rbx, %rsi callq 0x7753b movl (%rbx), %eax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1f550 movq %rax, %rbx leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xf9faa leaq 0x60343(%rip), %rsi # 0x15bad2 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xf0667 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x20190 xorl %ebp, %ebp movq 0xaf835(%rip), %rsi # 0x1aafe8 movq 0xaf79e(%rip), %rdx # 0x1aaf58 movq %rbx, %rdi callq 0x202e0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xfb7e8 movq 0x10(%rsp), %rsi incq %rsi callq 0x1fae0 jmp 0xfb7e8 movq %rax, %r14 movb $0x1, %bpl leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xfb80b movq 0x30(%rsp), %rsi incq %rsi callq 0x1fae0 jmp 0xfb80b movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xfb818 movq %rbx, %rdi callq 0x1f7e0 movq %r14, %rdi callq 0x20380
_ZNK5minja5Value3getIiEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rdi+10h], 0 jnz short loc_FB767 cmp qword ptr [r14+20h], 0 jnz short loc_FB767 cmp qword ptr [r14+30h], 0 jnz short loc_FB767 add r14, 40h ; '@' mov rbx, rsp mov dword ptr [rbx], 0 mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ mov eax, [rbx] add rsp, 40h pop rbx pop r14 pop rbp retn loc_FB767: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_FB7E8 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_FB7E8 mov r14, rax mov bpl, 1 loc_FB7E8: lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_FB80B mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_FB80B mov r14, rax mov bpl, 1 loc_FB80B: test bpl, bpl jz short loc_FB818 mov rdi, rbx; void * call ___cxa_free_exception loc_FB818: mov rdi, r14 call __Unwind_Resume
long long minja::Value::get<int>(long long a1) { void *exception; // rbx _DWORD v3[4]; // [rsp+0h] [rbp-58h] BYREF _BYTE v4[16]; // [rsp+20h] [rbp-38h] BYREF if ( *(_QWORD *)(a1 + 16) || *(_QWORD *)(a1 + 32) || *(_QWORD *)(a1 + 48) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v4, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v3, (long long)"get<T> not defined for this value type: ", (long long)v4); std::runtime_error::runtime_error(exception, v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3[0] = 0; ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( (unsigned __int8 *)(a1 + 64), v3); return v3[0]; }
get<int>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RDI + 0x10],0x0 JNZ 0x001fb767 CMP qword ptr [R14 + 0x20],0x0 JNZ 0x001fb767 CMP qword ptr [R14 + 0x30],0x0 JNZ 0x001fb767 ADD R14,0x40 MOV RBX,RSP MOV dword ptr [RBX],0x0 MOV RDI,R14 MOV RSI,RBX CALL 0x0017753b MOV EAX,dword ptr [RBX] ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001fb767: MOV EDI,0x10 CALL 0x0011f550 MOV RBX,RAX LAB_001fb774: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001f9faa LAB_001fb788: LEA RSI,[0x25bad2] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001f0667 MOV BPL,0x1 LAB_001fb79f: MOV RSI,RSP MOV RDI,RBX CALL 0x00120190 XOR EBP,EBP MOV RSI,qword ptr [0x002aafe8] MOV RDX,qword ptr [0x002aaf58] MOV RDI,RBX CALL 0x001202e0
/* int minja::Value::get<int>() const */ int __thiscall minja::Value::get<int>(Value *this) { runtime_error *this_00; int local_58 [8]; int1 local_38 [32]; if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) && (*(long *)(this + 0x30) == 0)) { local_58[0] = 0; _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (this + 0x40,local_58); return local_58[0]; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001fb774 to 001fb787 has its CatchHandler @ 001fb805 */ dump_abi_cxx11_((int)local_38,SUB81(this,0)); /* try { // try from 001fb788 to 001fb79b has its CatchHandler @ 001fb7e2 */ std::operator+((char *)local_58,(string *)"get<T> not defined for this value type: "); /* try { // try from 001fb79f to 001fb7c1 has its CatchHandler @ 001fb7c2 */ std::runtime_error::runtime_error(this_00,(string *)local_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_002aafe8,PTR__runtime_error_002aaf58); }
45,461
long minja::Value::get<long>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O2
cpp
long minja::Value::get<long>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 callq 0xb6144 testb %al, %al je 0xb5f5e addq $0x40, %r14 movq %r14, %rdi addq $0x40, %rsp popq %rbx popq %r14 popq %rbp jmp 0x6d788 pushq $0x10 popq %rdi callq 0x28580 movq %rax, %rbx movq %rsp, %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0xb5618 leaq 0x4b982(%rip), %rsi # 0x101902 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x3bd5f movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x291e0 xorl %ebp, %ebp movq 0xb104a(%rip), %rsi # 0x166ff0 movq 0xb0fab(%rip), %rdx # 0x166f58 movq %rbx, %rdi callq 0x29320 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x29678 jmp 0xb5fca movq %rax, %r14 movb $0x1, %bpl movq %rsp, %rdi callq 0x29678 testb %bpl, %bpl jne 0xb5fdc jmp 0xb5fe4 movq %rax, %r14 movq %rbx, %rdi callq 0x28830 movq %r14, %rdi callq 0x293c0
_ZNK5minja5Value3getIdEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_B5F5E add r14, 40h ; '@' mov rdi, r14 add rsp, 40h pop rbx pop r14 pop rbp jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE loc_B5F5E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_B5FCA mov r14, rax mov bpl, 1 loc_B5FCA: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_B5FDC jmp short loc_B5FE4 mov r14, rax loc_B5FDC: mov rdi, rbx; void * call ___cxa_free_exception loc_B5FE4: mov rdi, r14 call __Unwind_Resume
double minja::Value::get<double>(minja::Value *a1) { void *exception; // rbx _BYTE v3[32]; // [rsp+0h] [rbp-58h] BYREF _BYTE v4[56]; // [rsp+20h] [rbp-38h] BYREF if ( !(unsigned __int8)minja::Value::is_primitive(a1) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v4, (long long)"get<T> not defined for this value type: ", (long long)v3); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((long long)a1 + 64); }
get<double>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CALL 0x001b6144 TEST AL,AL JZ 0x001b5f5e ADD R14,0x40 MOV RDI,R14 ADD RSP,0x40 POP RBX POP R14 POP RBP JMP 0x0016d788 LAB_001b5f5e: PUSH 0x10 POP RDI CALL 0x00128580 MOV RBX,RAX LAB_001b5f69: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x001b5618 LAB_001b5f79: LEA RSI,[0x201902] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0013bd5f MOV BPL,0x1 LAB_001b5f90: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x001291e0 XOR EBP,EBP MOV RSI,qword ptr [0x00266ff0] MOV RDX,qword ptr [0x00266f58] MOV RDI,RBX CALL 0x00129320
/* double minja::Value::get<double>() const */ double __thiscall minja::Value::get<double>(Value *this) { runtime_error *this_00; char cVar1; double dVar2; int1 auStack_58 [32]; string local_38 [32]; cVar1 = is_primitive(this); if (cVar1 != '\0') { dVar2 = (double)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (this + 0x40); return dVar2; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b5f69 to 001b5f78 has its CatchHandler @ 001b5fd9 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001b5f79 to 001b5f8c has its CatchHandler @ 001b5fc4 */ std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: "); /* try { // try from 001b5f90 to 001b5fb4 has its CatchHandler @ 001b5fb5 */ std::runtime_error::runtime_error(this_00,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58); }
45,462
minja::Value::keys()
monkey531[P]llama/common/./minja.hpp
std::vector<Value> keys() { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); std::vector<Value> res; for (const auto& item : *object_) { res.push_back(item.first); } return res; }
O0
cpp
minja::Value::keys(): subq $0xf8, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0xf0(%rsp) movq %rsi, 0xe8(%rsp) movq 0xe8(%rsp), %rdi movq %rdi, 0x20(%rsp) addq $0x20, %rdi callq 0x9ffa0 testb $0x1, %al jne 0xd9930 movb $0x1, 0x9b(%rsp) movl $0x10, %edi callq 0x50540 movq 0x20(%rsp), %rsi movq %rax, 0x8(%rsp) leaq 0xa8(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x9feb0 jmp 0xd9864 leaq 0xf7dc2(%rip), %rsi # 0x1d162d leaq 0xc8(%rsp), %rdi leaq 0xa8(%rsp), %rdx callq 0x7a6e0 jmp 0xd9882 movq 0x8(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x50390 jmp 0xd9896 movq 0x8(%rsp), %rdi movb $0x0, 0x9b(%rsp) movq 0x17a706(%rip), %rsi # 0x253fb0 movq 0x17a6c7(%rip), %rdx # 0x253f78 callq 0x508f0 jmp 0xd9a63 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0xd9915 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0xd9908 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0xc8(%rsp), %rdi callq 0x510c0 leaq 0xa8(%rsp), %rdi callq 0x510c0 testb $0x1, 0x9b(%rsp) jne 0xd9921 jmp 0xd992b movq 0x8(%rsp), %rdi callq 0x50c40 jmp 0xd9a56 movq 0x10(%rsp), %rdi movb $0x0, 0x9a(%rsp) callq 0xcb0f0 movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0xc69f0 movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rdi callq 0xa1ae0 movq %rax, 0x88(%rsp) movq 0x90(%rsp), %rdi callq 0xa1b50 movq %rax, 0x80(%rsp) leaq 0x88(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0xa1b10 testb $0x1, %al jne 0xd99a0 jmp 0xd9a23 leaq 0x88(%rsp), %rdi callq 0xca440 movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0xc64d0 jmp 0xd99c3 movq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xc7180 jmp 0xd99d4 leaq 0x28(%rsp), %rdi callq 0x9f7a0 leaq 0x88(%rsp), %rdi callq 0xa1ef0 jmp 0xd9982 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0xd9a4c movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0x28(%rsp), %rdi callq 0x9f7a0 jmp 0xd9a4c movb $0x1, 0x9a(%rsp) testb $0x1, 0x9a(%rsp) jne 0xd9a3f movq 0x10(%rsp), %rdi callq 0xcb220 movq 0x18(%rsp), %rax addq $0xf8, %rsp retq movq 0x10(%rsp), %rdi callq 0xcb220 movq 0xa0(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5minja5Value4keysEv: sub rsp, 0F8h mov [rsp+0F8h+var_E8], rdi mov rax, rdi mov [rsp+0F8h+var_E0], rax mov [rsp+0F8h+var_8], rdi mov [rsp+0F8h+var_10], rsi mov rdi, [rsp+0F8h+var_10] mov [rsp+0F8h+var_D8], rdi add rdi, 20h ; ' ' call _ZNKSt12__shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz loc_D9930 mov [rsp+0F8h+var_5D], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+0F8h+var_D8] mov [rsp+0F8h+var_F0], rax lea rdi, [rsp+0F8h+var_50] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_D9864: lea rsi, aValueIsNotAnOb; "Value is not an object: " lea rdi, [rsp+0F8h+var_30] lea rdx, [rsp+0F8h+var_50] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_D9882: mov rdi, [rsp+0F8h+var_F0] lea rsi, [rsp+0F8h+var_30] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_D9896: mov rdi, [rsp+0F8h+var_F0]; void * mov [rsp+0F8h+var_5D], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_D9A63 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_D9915 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_D9908 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D9908: lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D9915: test [rsp+arg_93], 1 jnz short loc_D9921 jmp short loc_D992B loc_D9921: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_D992B: jmp loc_D9A56 loc_D9930: mov rdi, [rsp+0F8h+var_E8] mov [rsp+0F8h+var_5E], 0 call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2Ev; std::vector<minja::Value>::vector(void) mov rdi, [rsp+0F8h+var_D8] add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov [rsp+0F8h+var_68], rax mov rdi, [rsp+0F8h+var_68] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void) mov [rsp+0F8h+var_70], rax mov rdi, [rsp+0F8h+var_68] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void) mov [rsp+0F8h+var_78], rax loc_D9982: lea rdi, [rsp+0F8h+var_70] lea rsi, [rsp+0F8h+var_78] call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&) test al, 1 jnz short loc_D99A0 jmp loc_D9A23 loc_D99A0: lea rdi, [rsp+0F8h+var_70] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator*(void) mov [rsp+0F8h+var_80], rax mov rsi, [rsp+0F8h+var_80] lea rdi, [rsp+0F8h+var_D0] call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short $+2 loc_D99C3: mov rdi, [rsp+0F8h+var_E8] lea rsi, [rsp+0F8h+var_D0] call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backEOS1_; std::vector<minja::Value>::push_back(minja::Value&&) jmp short $+2 loc_D99D4: lea rdi, [rsp+0F8h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+0F8h+var_70] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void) jmp short loc_D9982 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_D9A4C mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_20]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_D9A4C loc_D9A23: mov [rsp+0F8h+var_5E], 1 test [rsp+0F8h+var_5E], 1 jnz short loc_D9A3F mov rdi, [rsp+0F8h+var_E8] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() loc_D9A3F: mov rax, [rsp+0F8h+var_E0] add rsp, 0F8h retn loc_D9A4C: mov rdi, [rsp+arg_8] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() loc_D9A56: mov rdi, [rsp+arg_98] call __Unwind_Resume loc_D9A63: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
minja::Value * minja::Value::keys(minja::Value *this, long long a2) { void *exception; // [rsp+8h] [rbp-F0h] _BYTE v4[80]; // [rsp+28h] [rbp-D0h] BYREF _BYTE *v5; // [rsp+78h] [rbp-80h] long long v6; // [rsp+80h] [rbp-78h] BYREF long long v7; // [rsp+88h] [rbp-70h] BYREF long long v8; // [rsp+90h] [rbp-68h] char v9; // [rsp+9Ah] [rbp-5Eh] char v10; // [rsp+9Bh] [rbp-5Dh] _BYTE v11[32]; // [rsp+A8h] [rbp-50h] BYREF _BYTE v12[32]; // [rsp+C8h] [rbp-30h] BYREF long long v13; // [rsp+E8h] [rbp-10h] minja::Value *v14; // [rsp+F0h] [rbp-8h] v14 = this; v13 = a2; if ( !std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 32)) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v11, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v12, (long long)"Value is not an object: ", (long long)v11); std::runtime_error::runtime_error(exception, v12); v10 = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v9 = 0; std::vector<minja::Value>::vector((long long)this); v8 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(a2 + 32); v7 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(v8); v6 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(v8); while ( __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>( (long long)&v7, (long long)&v6) ) { v5 = (_BYTE *)__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator*((long long)&v7); minja::Value::Value((long long)v4, v5); std::vector<minja::Value>::push_back((long long)this, (long long)v4); minja::Value::~Value((minja::Value *)v4); __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&v7); } return this; }
keys: SUB RSP,0xf8 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xf0],RDI MOV qword ptr [RSP + 0xe8],RSI MOV RDI,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0x20],RDI ADD RDI,0x20 CALL 0x0019ffa0 TEST AL,0x1 JNZ 0x001d9930 MOV byte ptr [RSP + 0x9b],0x1 MOV EDI,0x10 CALL 0x00150540 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX LAB_001d984e: LEA RDI,[RSP + 0xa8] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0019feb0 JMP 0x001d9864 LAB_001d9864: LEA RSI,[0x2d162d] LEA RDI,[RSP + 0xc8] LEA RDX,[RSP + 0xa8] CALL 0x0017a6e0 JMP 0x001d9882 LAB_001d9882: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0xc8] CALL 0x00150390 JMP 0x001d9896 LAB_001d9896: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x9b],0x0 MOV RSI,qword ptr [0x00353fb0] MOV RDX,qword ptr [0x00353f78] CALL 0x001508f0 LAB_001d9930: MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x9a],0x0 CALL 0x001cb0f0 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x001c69f0 MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x001a1ae0 MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x001a1b50 MOV qword ptr [RSP + 0x80],RAX LAB_001d9982: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x80] CALL 0x001a1b10 TEST AL,0x1 JNZ 0x001d99a0 JMP 0x001d9a23 LAB_001d99a0: LEA RDI,[RSP + 0x88] CALL 0x001ca440 MOV qword ptr [RSP + 0x78],RAX MOV RSI,qword ptr [RSP + 0x78] LAB_001d99b7: LEA RDI,[RSP + 0x28] CALL 0x001c64d0 JMP 0x001d99c3 LAB_001d99c3: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x28] CALL 0x001c7180 LAB_001d99d2: JMP 0x001d99d4 LAB_001d99d4: LEA RDI,[RSP + 0x28] CALL 0x0019f7a0 LEA RDI,[RSP + 0x88] CALL 0x001a1ef0 JMP 0x001d9982 LAB_001d9a23: MOV byte ptr [RSP + 0x9a],0x1 TEST byte ptr [RSP + 0x9a],0x1 JNZ 0x001d9a3f MOV RDI,qword ptr [RSP + 0x10] CALL 0x001cb220 LAB_001d9a3f: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0xf8 RET
/* WARNING: Removing unreachable block (ram,0x001d9a35) */ /* minja::Value::keys() */ vector<minja::Value,std::allocator<minja::Value>> * minja::Value::keys(void) { bool bVar1; runtime_error *this; long in_RSI; vector<minja::Value,std::allocator<minja::Value>> *in_RDI; Value local_d0 [80]; basic_json *local_80; int8 local_78; int8 local_70; vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *local_68; int1 local_5e; int1 local_5d; int1 local_50 [32]; string local_30 [48]; bVar1 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)(in_RSI + 0x20)); if (bVar1) { local_5e = 0; std::vector<minja::Value,std::allocator<minja::Value>>::vector(in_RDI); local_68 = (vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)std:: __shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator*((__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(in_RSI + 0x20)); local_70 = std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::begin(local_68); local_78 = std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::end(local_68); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_70,(__normal_iterator *)&local_78), bVar1) { local_80 = (basic_json *) __gnu_cxx:: __normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> ::operator*((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> *)&local_70); /* try { // try from 001d99b7 to 001d99c0 has its CatchHandler @ 001d99ed */ Value(local_d0,local_80); /* try { // try from 001d99c3 to 001d99d1 has its CatchHandler @ 001d9a03 */ std::vector<minja::Value,std::allocator<minja::Value>>::push_back(in_RDI,local_d0); ~Value(local_d0); __gnu_cxx:: __normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> ::operator++((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> *)&local_70); } return in_RDI; } local_5d = 1; this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001d984e to 001d9861 has its CatchHandler @ 001d98bb */ dump_abi_cxx11_((int)local_50,SUB81(in_RSI,0)); /* try { // try from 001d9864 to 001d987f has its CatchHandler @ 001d98d1 */ std::operator+((char *)local_30,(string *)"Value is not an object: "); /* try { // try from 001d9882 to 001d98b5 has its CatchHandler @ 001d98e7 */ std::runtime_error::runtime_error(this,local_30); local_5d = 0; /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78); }
45,463
evmone::VM::get_execution_state(unsigned long)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/vm.cpp
ExecutionState& VM::get_execution_state(size_t depth) noexcept { // Vector already has the capacity for all possible depths, // so reallocation never happens (therefore: noexcept). // The ExecutionStates are lazily created because they pre-allocate EVM memory and stack. assert(depth < m_execution_states.capacity()); if (m_execution_states.size() <= depth) m_execution_states.resize(depth + 1); return m_execution_states[depth]; }
O0
cpp
evmone::VM::get_execution_state(unsigned long): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) addq $0x40, %rdi callq 0x37770 movq %rax, %rcx movq -0x18(%rbp), %rax cmpq %rcx, %rax jae 0x37577 jmp 0x37596 leaq 0xa47d4(%rip), %rdi # 0xdbd52 leaq 0xa47f3(%rip), %rsi # 0xdbd78 movl $0x5e, %edx leaq 0xa4864(%rip), %rcx # 0xdbdf5 callq 0x23160 movq -0x20(%rbp), %rdi addq $0x40, %rdi callq 0x377a0 cmpq -0x10(%rbp), %rax ja 0x375c1 movq -0x20(%rbp), %rdi addq $0x40, %rdi movq -0x10(%rbp), %rsi incq %rsi callq 0x377d0 jmp 0x375bf jmp 0x375c1 movq -0x20(%rbp), %rdi addq $0x40, %rdi movq -0x10(%rbp), %rsi callq 0x37860 addq $0x20, %rsp popq %rbp retq movq %rax, %rdi callq 0x36420
_ZN6evmone2VM19get_execution_stateEm: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_20], rdi mov rax, [rbp+var_10] mov [rbp+var_18], rax add rdi, 40h ; '@' call _ZNKSt6vectorIN6evmone14ExecutionStateESaIS1_EE8capacityEv; std::vector<evmone::ExecutionState>::capacity(void) mov rcx, rax mov rax, [rbp+var_18] cmp rax, rcx jnb short loc_37577 jmp short loc_37596 loc_37577: lea rdi, aDepthMExecutio; "depth < m_execution_states.capacity()" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 5Eh ; '^' lea rcx, aExecutionstate; "ExecutionState &evmone::VM::get_executi"... call ___assert_fail loc_37596: mov rdi, [rbp+var_20] add rdi, 40h ; '@' call _ZNKSt6vectorIN6evmone14ExecutionStateESaIS1_EE4sizeEv; std::vector<evmone::ExecutionState>::size(void) cmp rax, [rbp+var_10] ja short loc_375C1 mov rdi, [rbp+var_20] add rdi, 40h ; '@' mov rsi, [rbp+var_10] inc rsi call _ZNSt6vectorIN6evmone14ExecutionStateESaIS1_EE6resizeEm; std::vector<evmone::ExecutionState>::resize(ulong) jmp short $+2 loc_375BF: jmp short $+2 loc_375C1: mov rdi, [rbp+var_20] add rdi, 40h ; '@' mov rsi, [rbp+var_10] call _ZNSt6vectorIN6evmone14ExecutionStateESaIS1_EEixEm; std::vector<evmone::ExecutionState>::operator[](ulong) add rsp, 20h pop rbp retn mov rdi, rax call __clang_call_terminate
long long evmone::VM::get_execution_state(evmone::VM *this, unsigned long long a2) { if ( a2 >= std::vector<evmone::ExecutionState>::capacity((char *)this + 64) ) __assert_fail( "depth < m_execution_states.capacity()", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/vm.cpp", 94LL, "ExecutionState &evmone::VM::get_execution_state(size_t)"); if ( std::vector<evmone::ExecutionState>::size((char *)this + 64) <= a2 ) std::vector<evmone::ExecutionState>::resize((char *)this + 64, a2 + 1); return std::vector<evmone::ExecutionState>::operator[]((char *)this + 64, a2); }
get_execution_state: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX ADD RDI,0x40 CALL 0x00137770 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,RCX JNC 0x00137577 JMP 0x00137596 LAB_00137577: LEA RDI,[0x1dbd52] LEA RSI,[0x1dbd78] MOV EDX,0x5e LEA RCX,[0x1dbdf5] CALL 0x00123160 LAB_00137596: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x40 CALL 0x001377a0 CMP RAX,qword ptr [RBP + -0x10] JA 0x001375c1 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x40 MOV RSI,qword ptr [RBP + -0x10] INC RSI LAB_001375b8: CALL 0x001377d0 JMP 0x001375bf LAB_001375bf: JMP 0x001375c1 LAB_001375c1: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x40 MOV RSI,qword ptr [RBP + -0x10] CALL 0x00137860 ADD RSP,0x20 POP RBP RET
/* evmone::VM::get_execution_state(unsigned long) */ void __thiscall evmone::VM::get_execution_state(VM *this,ulong param_1) { ulong uVar1; uVar1 = std::vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>>::capacity ((vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>> *) (this + 0x40)); if (param_1 < uVar1) { uVar1 = std::vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>>::size ((vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>> *) (this + 0x40)); if (uVar1 <= param_1) { /* try { // try from 001375b8 to 001375bc has its CatchHandler @ 001375d8 */ std::vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>>::resize ((vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>> *) (this + 0x40),param_1 + 1); } std::vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>>::operator[] ((vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>> *) (this + 0x40),param_1); return; } /* WARNING: Subroutine does not return */ __assert_fail("depth < m_execution_states.capacity()", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/vm.cpp" ,0x5e,"ExecutionState &evmone::VM::get_execution_state(size_t)"); }
45,464
run_plugin_auth
eloqsql/libmariadb/plugins/auth/my_auth.c
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len, const char *data_plugin, const char *db) { const char *auth_plugin_name= NULL; auth_plugin_t *auth_plugin; MCPVIO_EXT mpvio; ulong pkt_length; int res; /* determine the default/initial plugin to use */ if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH) { if (mysql->options.extension && mysql->options.extension->default_auth) auth_plugin_name= mysql->options.extension->default_auth; else if (data_plugin) auth_plugin_name= data_plugin; } if (!auth_plugin_name) { if (mysql->server_capabilities & CLIENT_PROTOCOL_41) auth_plugin_name= native_password_plugin_name; else auth_plugin_name= "mysql_old_password"; } if (!(auth_plugin= (auth_plugin_t*) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; mysql->net.last_errno= 0; /* just in case */ if (data_plugin && strcmp(data_plugin, auth_plugin_name)) { /* data was prepared for a different plugin, so we don't send any data */ data= 0; data_len= 0; } mpvio.mysql_change_user= data_plugin == 0; mpvio.cached_server_reply.pkt= (uchar*)data; mpvio.cached_server_reply.pkt_len= data_len; mpvio.read_packet= client_mpvio_read_packet; mpvio.write_packet= client_mpvio_write_packet; mpvio.info= client_mpvio_info; mpvio.mysql= mysql; mpvio.packets_read= mpvio.packets_written= 0; mpvio.db= db; retry: mpvio.plugin= auth_plugin; if (auth_plugin_name && mysql->options.extension && mysql->options.extension->restricted_auth) { if (!strstr(mysql->options.extension->restricted_auth, auth_plugin_name)) { my_set_error(mysql, CR_PLUGIN_NOT_ALLOWED, SQLSTATE_UNKNOWN, 0, data_plugin); return 1; } } mysql->net.read_pos[0]= 0; res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql); if ((res == CR_ERROR && !mysql->net.buff) || (res > CR_OK && mysql->net.read_pos[0] != 254)) { /* the plugin returned an error. write it down in mysql, unless the error code is CR_ERROR and mysql->net.last_errno is already set (the plugin has done it) */ if (res > CR_ERROR) my_set_error(mysql, res, SQLSTATE_UNKNOWN, 0); else if (!mysql->net.last_errno) { my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); } return 1; } /* read the OK packet (or use the cached value in mysql->net.read_pos */ if (res == CR_OK) pkt_length= ma_net_safe_read(mysql); else /* res == CR_OK_HANDSHAKE_COMPLETE or an error */ pkt_length= mpvio.last_read_packet_len; if (pkt_length == packet_error) { if (mysql->net.last_errno == CR_SERVER_LOST) my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN, ER(CR_SERVER_LOST_EXTENDED), "reading authorization packet", errno); return 1; } if (mysql->net.read_pos[0] == 254) { /* The server asked to use a different authentication plugin */ if (pkt_length == 1) { /* old "use short scramble" packet */ auth_plugin_name= old_password_plugin_name; mpvio.cached_server_reply.pkt= (uchar*)mysql->scramble_buff; mpvio.cached_server_reply.pkt_len= SCRAMBLE_LENGTH + 1; } else { /* new "use different plugin" packet */ uint len; auth_plugin_name= (char*)mysql->net.read_pos + 1; len= (uint)strlen(auth_plugin_name); /* safe as ma_net_read always appends \0 */ mpvio.cached_server_reply.pkt_len= pkt_length - len - 2; mpvio.cached_server_reply.pkt= mysql->net.read_pos + len + 2; } if (!(auth_plugin= (auth_plugin_t *) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; goto retry; } /* net->read_pos[0] should always be 0 here if the server implements the protocol correctly */ if (mysql->net.read_pos[0] == 0) return ma_read_ok_packet(mysql, mysql->net.read_pos + 1, pkt_length); return 1; }
O3
c
run_plugin_auth: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r8, -0x38(%rbp) movq %rcx, %r15 movl %edx, -0x30(%rbp) movq %rsi, %r14 movq %rdi, %rbx movq 0x370(%rdi), %rax btl $0x13, %eax jb 0x9e9ab btl $0x9, %eax leaq 0x59304(%rip), %rax # 0xf7ca2 leaq 0x59310(%rip), %r12 # 0xf7cb5 cmovaeq %rax, %r12 jmp 0x9e9c8 movq 0x480(%rbx), %rcx testq %rcx, %rcx je 0x9e9c0 movq 0x8(%rcx), %r12 testq %r12, %r12 jne 0x9e9c8 movq %r15, %r12 testq %r15, %r15 je 0x9e993 movq %rbx, %rdi movq %r12, %rsi movl $0x2, %edx callq 0x987b8 movq %rax, %r13 testq %rax, %rax jne 0x9e9e7 leaq 0x303ef1(%rip), %r13 # 0x3a28d8 movl $0x0, 0x90(%rbx) testq %r15, %r15 je 0x9ea11 movq %r15, %rdi movq %r12, %rsi callq 0x39890 xorl %ecx, %ecx testl %eax, %eax movl -0x30(%rbp), %eax cmovnel %ecx, %eax cmovneq %rcx, %r14 jmp 0x9ea14 movl -0x30(%rbp), %eax movq %r15, -0x30(%rbp) testq %r15, %r15 leaq -0x88(%rbp), %rcx sete 0x48(%rcx) movq %r14, 0x30(%rcx) movl %eax, 0x38(%rcx) leaq 0x22a(%rip), %rax # 0x9ec5e movq %rax, (%rcx) leaq 0x2c2(%rip), %rax # 0x9ed00 movq %rax, 0x8(%rcx) leaq 0xa41(%rip), %rax # 0x9f48a movq %rax, 0x10(%rcx) movq %rbx, 0x18(%rcx) movq $0x0, 0x40(%rcx) movq -0x38(%rbp), %rax movq %rax, 0x28(%rcx) leaq 0x48e(%rbx), %r15 movq %r13, -0x68(%rbp) movq 0x480(%rbx), %rax testq %rax, %rax je 0x9ea95 movq 0x150(%rax), %rdi testq %rdi, %rdi je 0x9ea95 movq %r12, %rsi callq 0x39480 testq %rax, %rax je 0x9ec0d movq 0x20(%rbx), %rax movb $0x0, (%rax) leaq -0x88(%rbp), %rdi movq %rbx, %rsi callq *0x58(%r13) testl %eax, %eax je 0x9eabe js 0x9ead7 movq 0x20(%rbx), %rcx cmpb $-0x2, (%rcx) je 0x9eadc jmp 0x9ec2e cmpq $0x0, 0x8(%rbx) je 0x9ebe1 movq 0x20(%rbx), %rax cmpb $-0x2, (%rax) je 0x9eadc jmp 0x9ebe1 cmpl $-0x1, %eax je 0x9eb57 movslq -0x3c(%rbp), %r14 movq 0x20(%rbx), %r13 movzbl (%r13), %eax cmpl $0xfe, %eax jne 0x9ebc7 movl $0x15, %eax movq %r15, %rcx leaq 0x5919f(%rip), %r12 # 0xf7ca2 cmpq $0x1, %r14 je 0x9eb28 leaq 0x1(%r13), %r12 movq %r12, %rdi callq 0x39400 movl %eax, %ecx subl %eax, %r14d addl $-0x2, %r14d addq %r13, %rcx addq $0x2, %rcx movl %r14d, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x50(%rbp) movq %rbx, %rdi movq %r12, %rsi movl $0x2, %edx callq 0x987b8 movq %rax, %r13 testq %rax, %rax jne 0x9ea68 leaq 0x303d86(%rip), %r13 # 0x3a28d8 jmp 0x9ea68 movq %rbx, %rdi callq 0x8624f movq %rax, %r14 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 jne 0x9eae0 movl $0x1, %r14d cmpl $0x7dd, 0x90(%rbx) # imm = 0x7DD jne 0x9ec4c leaq 0x304a33(%rip), %rax # 0x3a35c0 movq (%rax), %r15 leaq 0x304a39(%rip), %rax # 0x3a35d0 movq 0x1b8(%rax), %r12 callq 0x39a20 movl (%rax), %r9d leaq 0x5960a(%rip), %r8 # 0xf81b7 movq %rbx, %rdi movl $0x7dd, %esi # imm = 0x7DD movq %r15, %rdx movq %r12, %rcx xorl %eax, %eax callq 0x864e9 jmp 0x9ec4c testl %eax, %eax jne 0x9ec46 incq %r13 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x8b536 movl %eax, %r14d jmp 0x9ec4c movl $0x1, %r14d cmpl $0x0, 0x90(%rbx) jne 0x9ec4c leaq 0x3049c9(%rip), %rax # 0x3a35c0 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d0, %esi # imm = 0x7D0 xorl %ecx, %ecx xorl %eax, %eax callq 0x864e9 jmp 0x9ec4c leaq 0x3049ac(%rip), %rax # 0x3a35c0 movq (%rax), %rdx movq %rbx, %rdi movl $0x1392, %esi # imm = 0x1392 xorl %ecx, %ecx movq -0x30(%rbp), %r8 xorl %eax, %eax callq 0x864e9 jmp 0x9ec46 leaq 0x30498b(%rip), %rcx # 0x3a35c0 movq (%rcx), %rdx movq %rbx, %rdi movl %eax, %esi xorl %ecx, %ecx xorl %eax, %eax callq 0x864e9 movl $0x1, %r14d movl %r14d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
run_plugin_auth: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rbp+var_38], r8 mov r15, rcx mov dword ptr [rbp+var_30], edx mov r14, rsi mov rbx, rdi mov rax, [rdi+370h] bt eax, 13h jb short loc_9E9AB loc_9E993: bt eax, 9 lea rax, aMysqlOldPasswo; "mysql_old_password" lea r12, aMysqlNativePas; "mysql_native_password" cmovnb r12, rax jmp short loc_9E9C8 loc_9E9AB: mov rcx, [rbx+480h] test rcx, rcx jz short loc_9E9C0 mov r12, [rcx+8] test r12, r12 jnz short loc_9E9C8 loc_9E9C0: mov r12, r15 test r15, r15 jz short loc_9E993 loc_9E9C8: mov rdi, rbx mov rsi, r12 mov edx, 2 call mysql_client_find_plugin mov r13, rax test rax, rax jnz short loc_9E9E7 lea r13, dummy_fallback_client_plugin loc_9E9E7: mov dword ptr [rbx+90h], 0 test r15, r15 jz short loc_9EA11 mov rdi, r15 mov rsi, r12 call _strcmp xor ecx, ecx test eax, eax mov eax, dword ptr [rbp+var_30] cmovnz eax, ecx cmovnz r14, rcx jmp short loc_9EA14 loc_9EA11: mov eax, dword ptr [rbp+var_30] loc_9EA14: mov [rbp+var_30], r15 test r15, r15 lea rcx, [rbp+var_88] setz byte ptr [rcx+48h] mov [rcx+30h], r14 mov [rcx+38h], eax lea rax, client_mpvio_read_packet mov [rcx], rax lea rax, client_mpvio_write_packet mov [rcx+8], rax lea rax, client_mpvio_info mov [rcx+10h], rax mov [rcx+18h], rbx mov qword ptr [rcx+40h], 0 mov rax, [rbp+var_38] mov [rcx+28h], rax lea r15, [rbx+48Eh] loc_9EA68: mov [rbp+var_68], r13 mov rax, [rbx+480h] test rax, rax jz short loc_9EA95 mov rdi, [rax+150h] test rdi, rdi jz short loc_9EA95 mov rsi, r12 call _strstr test rax, rax jz loc_9EC0D loc_9EA95: mov rax, [rbx+20h] mov byte ptr [rax], 0 lea rdi, [rbp+var_88] mov rsi, rbx call qword ptr [r13+58h] test eax, eax jz short loc_9EABE js short loc_9EAD7 mov rcx, [rbx+20h] cmp byte ptr [rcx], 0FEh jz short loc_9EADC jmp loc_9EC2E loc_9EABE: cmp qword ptr [rbx+8], 0 jz loc_9EBE1 mov rax, [rbx+20h] cmp byte ptr [rax], 0FEh jz short loc_9EADC jmp loc_9EBE1 loc_9EAD7: cmp eax, 0FFFFFFFFh jz short loc_9EB57 loc_9EADC: movsxd r14, [rbp+var_3C] loc_9EAE0: mov r13, [rbx+20h] movzx eax, byte ptr [r13+0] cmp eax, 0FEh jnz loc_9EBC7 mov eax, 15h mov rcx, r15 lea r12, aMysqlOldPasswo; "mysql_old_password" cmp r14, 1 jz short loc_9EB28 lea r12, [r13+1] mov rdi, r12 call _strlen mov ecx, eax sub r14d, eax add r14d, 0FFFFFFFEh add rcx, r13 add rcx, 2 mov eax, r14d loc_9EB28: mov [rbp+var_58], rcx mov [rbp+var_50], eax mov rdi, rbx mov rsi, r12 mov edx, 2 call mysql_client_find_plugin mov r13, rax test rax, rax jnz loc_9EA68 lea r13, dummy_fallback_client_plugin jmp loc_9EA68 loc_9EB57: mov rdi, rbx call ma_net_safe_read mov r14, rax mov eax, 0FFFFFFFFh cmp r14, rax jnz loc_9EAE0 mov r14d, 1 cmp dword ptr [rbx+90h], 7DDh jnz loc_9EC4C lea rax, SQLSTATE_UNKNOWN mov r15, [rax] lea rax, client_errors mov r12, [rax+1B8h] call ___errno_location mov r9d, [rax] lea r8, aReadingAuthori; "reading authorization packet" mov rdi, rbx mov esi, 7DDh mov rdx, r15 mov rcx, r12 xor eax, eax call my_set_error jmp loc_9EC4C loc_9EBC7: test eax, eax jnz short loc_9EC46 inc r13 mov rdi, rbx mov rsi, r13 mov rdx, r14 call ma_read_ok_packet mov r14d, eax jmp short loc_9EC4C loc_9EBE1: mov r14d, 1 cmp dword ptr [rbx+90h], 0 jnz short loc_9EC4C lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D0h xor ecx, ecx xor eax, eax call my_set_error jmp short loc_9EC4C loc_9EC0D: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 1392h xor ecx, ecx mov r8, [rbp+var_30] xor eax, eax call my_set_error jmp short loc_9EC46 loc_9EC2E: lea rcx, SQLSTATE_UNKNOWN mov rdx, [rcx] mov rdi, rbx mov esi, eax xor ecx, ecx xor eax, eax call my_set_error loc_9EC46: mov r14d, 1 loc_9EC4C: mov eax, r14d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long run_plugin_auth( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { const char *v14; // r15 long long v17; // rax const char *v18; // r12 long long ( **plugin)(_QWORD *, long long); // r13 bool v20; // zf int v21; // eax long long v22; // rax long long v23; // rdi int v24; // eax long long v25; // rdx long long v26; // rcx unsigned long long v27; // r8 long long v28; // r9 double v29; // xmm4_8 double v30; // xmm5_8 unsigned long long v31; // r14 unsigned __int8 *v32; // r13 int v33; // eax long long v34; // rcx int v35; // eax unsigned int v36; // r14d char *v37; // r15 char *v38; // r12 unsigned int *v39; // rax char v41; // [rsp+0h] [rbp-90h] char v42; // [rsp+0h] [rbp-90h] _QWORD v43[6]; // [rsp+8h] [rbp-88h] BYREF long long v44; // [rsp+38h] [rbp-58h] int v45; // [rsp+40h] [rbp-50h] long long v46; // [rsp+48h] [rbp-48h] bool v47; // [rsp+50h] [rbp-40h] int v48; // [rsp+54h] [rbp-3Ch] long long v49; // [rsp+58h] [rbp-38h] const char *v50; // [rsp+60h] [rbp-30h] v49 = a5; v14 = (const char *)a4; LODWORD(v50) = a3; v17 = *(_QWORD *)(a1 + 880); if ( (v17 & 0x80000) == 0 || ((a4 = *(_QWORD *)(a1 + 1152)) == 0 || (v18 = *(const char **)(a4 + 8)) == 0LL) && (v18 = v14) == 0LL ) { v18 = "mysql_native_password"; if ( (v17 & 0x200) == 0 ) v18 = "mysql_old_password"; } plugin = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin( a1, v18, 2, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6, v41); if ( !plugin ) plugin = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin; *(_DWORD *)(a1 + 144) = 0; if ( v14 ) { v20 = (unsigned int)strcmp(v14, v18) == 0; v21 = (int)v50; if ( !v20 ) { v21 = 0; a2 = 0LL; } } else { v21 = (int)v50; } v50 = v14; v47 = v14 == 0LL; v44 = a2; v45 = v21; v43[0] = client_mpvio_read_packet; v43[1] = client_mpvio_write_packet; v43[2] = client_mpvio_info; v43[3] = a1; v46 = 0LL; v43[5] = v49; while ( 1 ) { v43[4] = plugin; v22 = *(_QWORD *)(a1 + 1152); if ( v22 ) { v23 = *(_QWORD *)(v22 + 336); if ( v23 ) { if ( !strstr(v23, v18) ) { my_set_error(a1, 5010, (long long)SQLSTATE_UNKNOWN, 0LL, v50); return 1; } } } **(_BYTE **)(a1 + 32) = 0; v24 = plugin[11](v43, a1); if ( !v24 ) break; if ( v24 >= 0 ) { if ( **(_BYTE **)(a1 + 32) != 0xFE ) { my_set_error(a1, v24, (long long)SQLSTATE_UNKNOWN, 0LL); return 1; } goto LABEL_27; } if ( v24 != -1 ) goto LABEL_27; v31 = ma_net_safe_read(a1, a1, v25, v26, v27, v28); if ( v31 == 0xFFFFFFFF ) { v36 = 1; if ( *(_DWORD *)(a1 + 144) == 2013 ) { v37 = SQLSTATE_UNKNOWN; v38 = client_errors[55]; v39 = (unsigned int *)__errno_location(a1); my_set_error(a1, 2013, (long long)v37, v38, "reading authorization packet", *v39); } return v36; } LABEL_28: v32 = *(unsigned __int8 **)(a1 + 32); if ( *v32 != 254 ) { if ( !*v32 ) return (unsigned int)ma_read_ok_packet(a1, v32 + 1, v31); return 1; } v33 = 21; v34 = a1 + 1166; v18 = "mysql_old_password"; if ( v31 != 1 ) { v18 = (const char *)(v32 + 1); v35 = strlen(v32 + 1); v34 = (long long)&v32[v35 + 2]; v33 = v31 - v35 - 2; } v44 = v34; v45 = v33; plugin = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin( a1, v18, 2, a7, a8, a9, a10, v29, v30, a13, a14, v34, v27, v28, v42); if ( !plugin ) plugin = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin; } if ( *(_QWORD *)(a1 + 8) && **(_BYTE **)(a1 + 32) == 0xFE ) { LABEL_27: v31 = v48; goto LABEL_28; } v36 = 1; if ( !*(_DWORD *)(a1 + 144) ) my_set_error(a1, 2000, (long long)SQLSTATE_UNKNOWN, 0LL); return v36; }
run_plugin_auth: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x38],R8 MOV R15,RCX MOV dword ptr [RBP + -0x30],EDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x370] BT EAX,0x13 JC 0x0019e9ab LAB_0019e993: BT EAX,0x9 LEA RAX,[0x1f7ca2] LEA R12,[0x1f7cb5] CMOVNC R12,RAX JMP 0x0019e9c8 LAB_0019e9ab: MOV RCX,qword ptr [RBX + 0x480] TEST RCX,RCX JZ 0x0019e9c0 MOV R12,qword ptr [RCX + 0x8] TEST R12,R12 JNZ 0x0019e9c8 LAB_0019e9c0: MOV R12,R15 TEST R15,R15 JZ 0x0019e993 LAB_0019e9c8: MOV RDI,RBX MOV RSI,R12 MOV EDX,0x2 CALL 0x001987b8 MOV R13,RAX TEST RAX,RAX JNZ 0x0019e9e7 LEA R13,[0x4a28d8] LAB_0019e9e7: MOV dword ptr [RBX + 0x90],0x0 TEST R15,R15 JZ 0x0019ea11 MOV RDI,R15 MOV RSI,R12 CALL 0x00139890 XOR ECX,ECX TEST EAX,EAX MOV EAX,dword ptr [RBP + -0x30] CMOVNZ EAX,ECX CMOVNZ R14,RCX JMP 0x0019ea14 LAB_0019ea11: MOV EAX,dword ptr [RBP + -0x30] LAB_0019ea14: MOV qword ptr [RBP + -0x30],R15 TEST R15,R15 LEA RCX,[RBP + -0x88] SETZ byte ptr [RCX + 0x48] MOV qword ptr [RCX + 0x30],R14 MOV dword ptr [RCX + 0x38],EAX LEA RAX,[0x19ec5e] MOV qword ptr [RCX],RAX LEA RAX,[0x19ed00] MOV qword ptr [RCX + 0x8],RAX LEA RAX,[0x19f48a] MOV qword ptr [RCX + 0x10],RAX MOV qword ptr [RCX + 0x18],RBX MOV qword ptr [RCX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RCX + 0x28],RAX LEA R15,[RBX + 0x48e] LAB_0019ea68: MOV qword ptr [RBP + -0x68],R13 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x0019ea95 MOV RDI,qword ptr [RAX + 0x150] TEST RDI,RDI JZ 0x0019ea95 MOV RSI,R12 CALL 0x00139480 TEST RAX,RAX JZ 0x0019ec0d LAB_0019ea95: MOV RAX,qword ptr [RBX + 0x20] MOV byte ptr [RAX],0x0 LEA RDI,[RBP + -0x88] MOV RSI,RBX CALL qword ptr [R13 + 0x58] TEST EAX,EAX JZ 0x0019eabe JS 0x0019ead7 MOV RCX,qword ptr [RBX + 0x20] CMP byte ptr [RCX],0xfe JZ 0x0019eadc JMP 0x0019ec2e LAB_0019eabe: CMP qword ptr [RBX + 0x8],0x0 JZ 0x0019ebe1 MOV RAX,qword ptr [RBX + 0x20] CMP byte ptr [RAX],0xfe JZ 0x0019eadc JMP 0x0019ebe1 LAB_0019ead7: CMP EAX,-0x1 JZ 0x0019eb57 LAB_0019eadc: MOVSXD R14,dword ptr [RBP + -0x3c] LAB_0019eae0: MOV R13,qword ptr [RBX + 0x20] MOVZX EAX,byte ptr [R13] CMP EAX,0xfe JNZ 0x0019ebc7 MOV EAX,0x15 MOV RCX,R15 LEA R12,[0x1f7ca2] CMP R14,0x1 JZ 0x0019eb28 LEA R12,[R13 + 0x1] MOV RDI,R12 CALL 0x00139400 MOV ECX,EAX SUB R14D,EAX ADD R14D,-0x2 ADD RCX,R13 ADD RCX,0x2 MOV EAX,R14D LAB_0019eb28: MOV qword ptr [RBP + -0x58],RCX MOV dword ptr [RBP + -0x50],EAX MOV RDI,RBX MOV RSI,R12 MOV EDX,0x2 CALL 0x001987b8 MOV R13,RAX TEST RAX,RAX JNZ 0x0019ea68 LEA R13,[0x4a28d8] JMP 0x0019ea68 LAB_0019eb57: MOV RDI,RBX CALL 0x0018624f MOV R14,RAX MOV EAX,0xffffffff CMP R14,RAX JNZ 0x0019eae0 MOV R14D,0x1 CMP dword ptr [RBX + 0x90],0x7dd JNZ 0x0019ec4c LEA RAX,[0x4a35c0] MOV R15,qword ptr [RAX] LEA RAX,[0x4a35d0] MOV R12,qword ptr [RAX + 0x1b8] CALL 0x00139a20 MOV R9D,dword ptr [RAX] LEA R8,[0x1f81b7] MOV RDI,RBX MOV ESI,0x7dd MOV RDX,R15 MOV RCX,R12 XOR EAX,EAX CALL 0x001864e9 JMP 0x0019ec4c LAB_0019ebc7: TEST EAX,EAX JNZ 0x0019ec46 INC R13 MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0018b536 MOV R14D,EAX JMP 0x0019ec4c LAB_0019ebe1: MOV R14D,0x1 CMP dword ptr [RBX + 0x90],0x0 JNZ 0x0019ec4c LEA RAX,[0x4a35c0] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d0 XOR ECX,ECX XOR EAX,EAX CALL 0x001864e9 JMP 0x0019ec4c LAB_0019ec0d: LEA RAX,[0x4a35c0] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x1392 XOR ECX,ECX MOV R8,qword ptr [RBP + -0x30] XOR EAX,EAX CALL 0x001864e9 JMP 0x0019ec46 LAB_0019ec2e: LEA RCX,[0x4a35c0] MOV RDX,qword ptr [RCX] MOV RDI,RBX MOV ESI,EAX XOR ECX,ECX XOR EAX,EAX CALL 0x001864e9 LAB_0019ec46: MOV R14D,0x1 LAB_0019ec4c: MOV EAX,R14D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 run_plugin_auth(long param_1,char *param_2,int4 param_3,char *param_4,int8 param_5) { char *pcVar1; int *puVar2; int *puVar3; uint uVar4; int iVar5; int4 uVar6; int1 *puVar7; size_t sVar8; int *piVar9; char *pcVar10; char *pcVar11; long lVar12; code *local_90; code *local_88; code *local_80; long local_78; int1 *local_70; int8 local_68; char *local_60; int local_58; int8 local_50; int1 local_48; int local_44; int8 local_40; char *local_38; local_38 = (char *)CONCAT44(local_38._4_4_,param_3); uVar4 = (uint)*(int8 *)(param_1 + 0x370); if ((((uVar4 >> 0x13 & 1) == 0) || (((*(long *)(param_1 + 0x480) == 0 || (pcVar11 = *(char **)(*(long *)(param_1 + 0x480) + 8), pcVar11 == (char *)0x0)) && (pcVar11 = param_4, param_4 == (char *)0x0)))) && (pcVar11 = "mysql_native_password", (uVar4 >> 9 & 1) == 0)) { pcVar11 = "mysql_old_password"; } local_40 = param_5; puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2); if (puVar7 == (int1 *)0x0) { puVar7 = dummy_fallback_client_plugin; } *(int4 *)(param_1 + 0x90) = 0; local_60 = param_2; if (param_4 == (char *)0x0) { local_58 = (int)local_38; } else { iVar5 = strcmp(param_4,pcVar11); local_58 = (int)local_38; if (iVar5 != 0) { local_60 = (char *)0x0; local_58 = 0; } } local_48 = param_4 == (char *)0x0; local_90 = client_mpvio_read_packet; local_88 = client_mpvio_write_packet; local_80 = client_mpvio_info; local_50 = 0; local_68 = local_40; local_78 = param_1; local_38 = param_4; do { local_70 = puVar7; if (((*(long *)(param_1 + 0x480) != 0) && (pcVar1 = *(char **)(*(long *)(param_1 + 0x480) + 0x150), pcVar1 != (char *)0x0)) && (pcVar11 = strstr(pcVar1,pcVar11), pcVar11 == (char *)0x0)) { my_set_error(param_1,0x1392,SQLSTATE_UNKNOWN,0,local_38); goto LAB_0019ec46; } **(int1 **)(param_1 + 0x20) = 0; iVar5 = (**(code **)(puVar7 + 0x58))(&local_90,param_1); if (iVar5 == 0) { if ((*(long *)(param_1 + 8) == 0) || (**(char **)(param_1 + 0x20) != -2)) { if (*(int *)(param_1 + 0x90) != 0) { return 1; } my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0); return 1; } LAB_0019eadc: lVar12 = (long)local_44; } else { if (-1 < iVar5) { if (**(char **)(param_1 + 0x20) == -2) goto LAB_0019eadc; my_set_error(param_1,iVar5,SQLSTATE_UNKNOWN,0); goto LAB_0019ec46; } if (iVar5 != -1) goto LAB_0019eadc; lVar12 = ma_net_safe_read(param_1); puVar3 = PTR_s_Lost_connection_to_server_at___s_004a3788; puVar2 = SQLSTATE_UNKNOWN; if (lVar12 == 0xffffffff) { if (*(int *)(param_1 + 0x90) != 0x7dd) { return 1; } piVar9 = __errno_location(); my_set_error(param_1,0x7dd,puVar2,puVar3,"reading authorization packet",*piVar9); return 1; } } pcVar1 = *(char **)(param_1 + 0x20); if (*pcVar1 != -2) { if (*pcVar1 == '\0') { uVar6 = ma_read_ok_packet(param_1,pcVar1 + 1,lVar12); } else { LAB_0019ec46: uVar6 = 1; } return uVar6; } iVar5 = 0x15; pcVar11 = "mysql_old_password"; pcVar10 = (char *)(param_1 + 0x48e); if (lVar12 != 1) { pcVar11 = pcVar1 + 1; sVar8 = strlen(pcVar11); iVar5 = ((int)lVar12 - (int)sVar8) + -2; pcVar10 = pcVar1 + (sVar8 & 0xffffffff) + 2; } local_60 = pcVar10; local_58 = iVar5; puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2); if (puVar7 == (int1 *)0x0) { puVar7 = dummy_fallback_client_plugin; } } while( true ); }
45,465
PFS_statements_digest_stat::reset_data(unsigned char*, unsigned long)
eloqsql/storage/perfschema/pfs_digest.cc
void PFS_statements_digest_stat::reset_data(unsigned char *token_array, size_t length) { pfs_dirty_state dirty_state; m_lock.set_dirty(& dirty_state); m_digest_storage.reset(token_array, length); m_stat.reset(); m_first_seen= 0; m_last_seen= 0; m_lock.dirty_to_free(& dirty_state); }
O0
cpp
PFS_statements_digest_stat::reset_data(unsigned char*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) leaq -0x1c(%rbp), %rsi callq 0x55f30 movq -0x28(%rbp), %rdi addq $0xd8, %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x37700 movq -0x28(%rbp), %rdi addq $0x108, %rdi # imm = 0x108 callq 0x374f0 movq -0x28(%rbp), %rdi movq $0x0, 0x1c0(%rdi) movq $0x0, 0x1c8(%rdi) leaq -0x1c(%rbp), %rsi callq 0x55ef0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN26PFS_statements_digest_stat10reset_dataEPhm: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov [rbp+var_28], rdi lea rsi, [rbp+var_1C] call _ZN8pfs_lock9set_dirtyEP15pfs_dirty_state; pfs_lock::set_dirty(pfs_dirty_state *) mov rdi, [rbp+var_28] add rdi, 0D8h; this mov rsi, [rbp+var_10]; unsigned __int8 * mov rdx, [rbp+var_18]; unsigned __int64 call _ZN18sql_digest_storage5resetEPhm; sql_digest_storage::reset(uchar *,ulong) mov rdi, [rbp+var_28] add rdi, 108h; this call _ZN18PFS_statement_stat5resetEv; PFS_statement_stat::reset(void) mov rdi, [rbp+var_28] mov qword ptr [rdi+1C0h], 0 mov qword ptr [rdi+1C8h], 0 lea rsi, [rbp+var_1C] call _ZN8pfs_lock13dirty_to_freeEPK15pfs_dirty_state; pfs_lock::dirty_to_free(pfs_dirty_state const*) add rsp, 30h pop rbp retn
long long PFS_statements_digest_stat::reset_data( PFS_statements_digest_stat *this, unsigned __int8 *a2, unsigned long long a3) { _BYTE v4[4]; // [rsp+14h] [rbp-1Ch] BYREF unsigned long long v5; // [rsp+18h] [rbp-18h] unsigned __int8 *v6; // [rsp+20h] [rbp-10h] PFS_statements_digest_stat *v7; // [rsp+28h] [rbp-8h] v7 = this; v6 = a2; v5 = a3; pfs_lock::set_dirty(this, v4); sql_digest_storage::reset((PFS_statements_digest_stat *)((char *)this + 216), v6, v5); PFS_statement_stat::reset((PFS_statements_digest_stat *)((char *)this + 264)); *((_QWORD *)this + 56) = 0LL; *((_QWORD *)this + 57) = 0LL; return pfs_lock::dirty_to_free(this, v4); }
reset_data: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI LEA RSI,[RBP + -0x1c] CALL 0x00155f30 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xd8 MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00137700 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x108 CALL 0x001374f0 MOV RDI,qword ptr [RBP + -0x28] MOV qword ptr [RDI + 0x1c0],0x0 MOV qword ptr [RDI + 0x1c8],0x0 LEA RSI,[RBP + -0x1c] CALL 0x00155ef0 ADD RSP,0x30 POP RBP RET
/* PFS_statements_digest_stat::reset_data(unsigned char*, unsigned long) */ void __thiscall PFS_statements_digest_stat::reset_data (PFS_statements_digest_stat *this,uchar *param_1,ulong param_2) { pfs_dirty_state local_24 [4]; ulong local_20; uchar *local_18; PFS_statements_digest_stat *local_10; local_20 = param_2; local_18 = param_1; local_10 = this; pfs_lock::set_dirty((pfs_lock *)this,local_24); sql_digest_storage::reset((sql_digest_storage *)(this + 0xd8),local_18,local_20); PFS_statement_stat::reset((PFS_statement_stat *)(this + 0x108)); *(int8 *)(this + 0x1c0) = 0; *(int8 *)(this + 0x1c8) = 0; pfs_lock::dirty_to_free((pfs_lock *)this,local_24); return; }
45,466
minja::SliceExpr::~SliceExpr()
monkey531[P]llama/common/minja.hpp
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e) : Expression(location), start(std::move(s)), end(std::move(e)) {}
O3
cpp
minja::SliceExpr::~SliceExpr(): pushq %rbx movq %rdi, %rbx leaq 0x9b66b(%rip), %rax # 0x12f6d8 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x94082 callq 0x267a6 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x94090 callq 0x267a6 leaq 0x9b311(%rip), %rax # 0x12f3a8 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x940ad popq %rbx jmp 0x267a6 popq %rbx retq nop
_ZN5minja9SliceExprD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_94082 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_94082: mov rdi, [rbx+28h] test rdi, rdi jz short loc_94090 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_94090: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_940AD pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_940AD: pop rbx retn
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi volatile signed __int32 *v4; // rdi *(_QWORD *)this = &`vtable for'minja::SliceExpr + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); v3 = (volatile signed __int32 *)*((_QWORD *)this + 5); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v4 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); }
~SliceExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x22f6d8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x00194082 CALL 0x001267a6 LAB_00194082: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x00194090 CALL 0x001267a6 LAB_00194090: LEA RAX,[0x22f3a8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x001940ad POP RBX JMP 0x001267a6 LAB_001940ad: POP RBX RET
/* minja::SliceExpr::~SliceExpr() */ void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this) { *(int ***)this = &PTR_do_evaluate_0022f6e8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28)); } *(int ***)this = &PTR___cxa_pure_virtual_0022f3b8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); return; } return; }
45,467
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O3
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r12 movq %rsi, %rbx movq (%rdi), %rsi movq 0x8(%rdi), %rax subq %rsi, %rax cmpq $0x20, %rax jne 0x290d3 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x47318 movq (%rbx), %rdi movq (%rdi), %rax movq %r14, %rsi movq %r12, %rdx callq *0x28(%rax) leaq 0x48(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x426e2 movq %rbx, %rdi callq 0x4f2d0 movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x29089 callq 0x348da movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x29098 callq 0x348da movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x290a7 callq 0x348da movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x291f5 movq 0xb9edc(%rip), %rax # 0xe2f98 cmpb $0x0, (%rax) je 0x291e0 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x291ea movq %rbx, (%rsp) cmpq $0x0, 0x10(%r12) je 0x29204 movq %rdi, %r15 movq %r12, %rdi callq 0x565a6 movq (%r15), %rsi movq 0x8(%r15), %rcx movq %rcx, %rdx subq %rsi, %rdx sarq $0x5, %rdx cmpq %rdx, %rax jne 0x29204 cmpq %rsi, %rcx je 0x291f5 xorl %ebx, %ebx leaq 0x8(%rsp), %r13 xorl %ebp, %ebp movq (%rsp), %rax movq (%rax), %r14 addq %rbx, %rsi movq %r13, %rdi callq 0x47318 movq %r12, %rdi movq %rbp, %rsi callq 0x56706 movq (%r14), %rcx movq %r14, %rdi movq %r13, %rsi movq %rax, %rdx callq *0x28(%rcx) leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x426e2 movq %r14, %rdi callq 0x4f2d0 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x2916c callq 0x348da movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x2917b callq 0x348da movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x2918a callq 0x348da movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x291c0 movq 0xb9dfd(%rip), %rax # 0xe2f98 cmpb $0x0, (%rax) je 0x291ab movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x291b5 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x291c0 movq (%rdi), %rax callq *0x18(%rax) incq %rbp movq (%r15), %rsi movq 0x8(%r15), %rax subq %rsi, %rax sarq $0x5, %rax addq $0x20, %rbx cmpq %rax, %rbp jb 0x2911a jmp 0x291f5 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x291f5 movq (%rdi), %rax callq *0x18(%rax) addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1a390 movq %rax, %r14 leaq 0x88544(%rip), %rsi # 0xb175c movq %rax, %rdi callq 0x1a290 movq 0xb9dc9(%rip), %rsi # 0xe2ff0 movq 0xb9d42(%rip), %rdx # 0xe2f70 movq %r14, %rdi callq 0x1acd0 movq %rax, %rbx movq %r14, %rdi callq 0x1a530 jmp 0x29252 jmp 0x29245 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x42656 movq %rbx, %rdi callq 0x1ad30
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r12, rdx mov rbx, rsi mov rsi, [rdi] mov rax, [rdi+8] sub rax, rsi cmp rax, 20h ; ' ' jnz loc_290D3 lea r14, [rsp+88h+var_80] mov rdi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rbx] mov rax, [rdi] mov rsi, r14 mov rdx, r12 call qword ptr [rax+28h] lea rbx, [rsp+88h+var_40] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_29089 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_29089: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_29098 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_29098: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_290A7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_290A7: mov rdi, [rsp+88h+var_78] test rdi, rdi jz loc_291F5 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_291E0 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp loc_291EA loc_290D3: mov [rsp+88h+var_88], rbx cmp qword ptr [r12+10h], 0 jz loc_29204 mov r15, rdi mov rdi, r12; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov rsi, [r15] mov rcx, [r15+8] mov rdx, rcx sub rdx, rsi sar rdx, 5 cmp rax, rdx jnz loc_29204 cmp rcx, rsi jz loc_291F5 xor ebx, ebx lea r13, [rsp+88h+var_80] xor ebp, ebp loc_2911A: mov rax, [rsp+88h+var_88] mov r14, [rax] add rsi, rbx mov rdi, r13 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r12; this mov rsi, rbp; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov rcx, [r14] mov rdi, r14 mov rsi, r13 mov rdx, rax call qword ptr [rcx+28h] lea r14, [rsp+88h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+88h+var_48] test rdi, rdi jz short loc_2916C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2916C: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_2917B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2917B: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_2918A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2918A: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_291C0 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_291AB mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_291B5 loc_291AB: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_291B5: cmp eax, 1 jnz short loc_291C0 mov rax, [rdi] call qword ptr [rax+18h] loc_291C0: inc rbp mov rsi, [r15] mov rax, [r15+8] sub rax, rsi sar rax, 5 add rbx, 20h ; ' ' cmp rbp, rax jb loc_2911A jmp short loc_291F5 loc_291E0: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_291EA: cmp eax, 1 jnz short loc_291F5 mov rax, [rdi] call qword ptr [rax+18h] loc_291F5: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_29204: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_29252 jmp short $+2 loc_29245: mov rbx, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_29252: mov rdi, rbx call __Unwind_Resume
unsigned long long minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3) { unsigned long long result; // rax long long v5; // rdi long long v7; // rsi long long v8; // rbx unsigned long long v9; // rbp long long v10; // r14 long long v11; // rax long long v12; // rdi signed __int32 v13; // eax std::runtime_error *exception; // r14 _BYTE v16[8]; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] long long v18; // [rsp+20h] [rbp-68h] long long v19; // [rsp+30h] [rbp-58h] long long v20; // [rsp+40h] [rbp-48h] _BYTE v21[64]; // [rsp+48h] [rbp-40h] BYREF if ( a1[1] - *a1 == 32LL ) { minja::Value::Value(v16, *a1); (*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v16, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v21, 0LL); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v18 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); v5 = v17; if ( v17 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v17 + 12); *(_DWORD *)(v17 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long))(*(_QWORD *)v5 + 24LL))(v5); } } else { if ( !*((_QWORD *)a3 + 2) || (result = minja::Value::size(a3), v7 = *a1, result != (long long)(a1[1] - *a1) >> 5) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( a1[1] != v7 ) { v8 = 0LL; v9 = 0LL; do { v10 = *a2; minja::Value::Value(v16, v8 + v7); v11 = minja::Value::at(a3, v9); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v10 + 40LL))(v10, v16, v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( v21, 0LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); v12 = v17; if ( v17 ) { if ( _libc_single_threaded ) { v13 = *(_DWORD *)(v17 + 12); *(_DWORD *)(v17 + 12) = v13 - 1; } else { v13 = _InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( v13 == 1 ) (*(void ( **)(long long))(*(_QWORD *)v12 + 24LL))(v12); } ++v9; v7 = *a1; result = (long long)(a1[1] - *a1) >> 5; v8 += 32LL; } while ( v9 < result ); } } return result; }
destructuring_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,RDX MOV RBX,RSI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RSI CMP RAX,0x20 JNZ 0x001290d3 LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00147318 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] LAB_0012905b: MOV RSI,R14 MOV RDX,R12 CALL qword ptr [RAX + 0x28] LAB_00129064: LEA RBX,[RSP + 0x48] MOV RDI,RBX XOR ESI,ESI CALL 0x001426e2 MOV RDI,RBX CALL 0x0014f2d0 MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x00129089 CALL 0x001348da LAB_00129089: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00129098 CALL 0x001348da LAB_00129098: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001290a7 CALL 0x001348da LAB_001290a7: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001291f5 MOV RAX,qword ptr [0x001e2f98] CMP byte ptr [RAX],0x0 JZ 0x001291e0 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001291ea LAB_001290d3: MOV qword ptr [RSP],RBX CMP qword ptr [R12 + 0x10],0x0 JZ 0x00129204 MOV R15,RDI MOV RDI,R12 CALL 0x001565a6 MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,RCX SUB RDX,RSI SAR RDX,0x5 CMP RAX,RDX JNZ 0x00129204 CMP RCX,RSI JZ 0x001291f5 XOR EBX,EBX LEA R13,[RSP + 0x8] XOR EBP,EBP LAB_0012911a: MOV RAX,qword ptr [RSP] MOV R14,qword ptr [RAX] ADD RSI,RBX MOV RDI,R13 CALL 0x00147318 LAB_0012912c: MOV RDI,R12 MOV RSI,RBP CALL 0x00156706 MOV RCX,qword ptr [R14] MOV RDI,R14 MOV RSI,R13 MOV RDX,RAX CALL qword ptr [RCX + 0x28] LAB_00129146: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x001426e2 MOV RDI,R14 CALL 0x0014f2d0 MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0012916c CALL 0x001348da LAB_0012916c: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0012917b CALL 0x001348da LAB_0012917b: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0012918a CALL 0x001348da LAB_0012918a: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001291c0 MOV RAX,qword ptr [0x001e2f98] CMP byte ptr [RAX],0x0 JZ 0x001291ab MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001291b5 LAB_001291ab: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001291b5: CMP EAX,0x1 JNZ 0x001291c0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001291c0: INC RBP MOV RSI,qword ptr [R15] MOV RAX,qword ptr [R15 + 0x8] SUB RAX,RSI SAR RAX,0x5 ADD RBX,0x20 CMP RBP,RAX JC 0x0012911a JMP 0x001291f5 LAB_001291e0: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001291ea: CMP EAX,0x1 JNZ 0x001291f5 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001291f5: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00129204: MOV EDI,0x10 CALL 0x0011a390 MOV R14,RAX LAB_00129211: LEA RSI,[0x1b175c] MOV RDI,RAX CALL 0x0011a290 LAB_00129220: MOV RSI,qword ptr [0x001e2ff0] MOV RDX,qword ptr [0x001e2f70] MOV RDI,R14 CALL 0x0011acd0
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { int *piVar1; long *plVar2; int iVar3; long lVar4; int8 uVar5; runtime_error *this; ulong uVar6; long lVar7; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) { Value::Value(local_80,*(string **)param_1); /* try { // try from 0012905b to 00129063 has its CatchHandler @ 00129243 */ (**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001e2f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } return; } if (*(long *)(param_3 + 0x10) != 0) { lVar4 = Value::size(param_3); lVar7 = *(long *)param_1; if (lVar4 == *(long *)(param_1 + 8) - lVar7 >> 5) { if (*(long *)(param_1 + 8) == lVar7) { return; } lVar4 = 0; uVar6 = 0; do { plVar2 = *(long **)param_2; Value::Value(local_80,(string *)(lVar7 + lVar4)); /* try { // try from 0012912c to 00129145 has its CatchHandler @ 00129245 */ uVar5 = Value::at(param_3,uVar6); (**(code **)(*plVar2 + 0x28))(plVar2,local_80,uVar5); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001e2f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } uVar6 = uVar6 + 1; lVar7 = *(long *)param_1; lVar4 = lVar4 + 0x20; } while (uVar6 < (ulong)(*(long *)(param_1 + 8) - lVar7 >> 5)); return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00129211 to 0012921f has its CatchHandler @ 00129236 */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f70); }
45,468
JS_ReadRegExp
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ReadRegExp(BCReaderState *s) { JSContext *ctx = s->ctx; JSString *pattern; JSString *bc; pattern = JS_ReadString(s); if (!pattern) return JS_EXCEPTION; bc = JS_ReadString(s); if (!bc) { js_free_string(ctx->rt, pattern); return JS_EXCEPTION; } if (bc->is_wide_char) { js_free_string(ctx->rt, pattern); js_free_string(ctx->rt, bc); return JS_ThrowInternalError(ctx, "bad regexp bytecode"); } if (is_be()) lre_byte_swap(bc->u.str8, bc->len, /*is_byte_swapped*/TRUE); return js_regexp_constructor_internal(ctx, JS_UNDEFINED, JS_MKPTR(JS_TAG_STRING, pattern), JS_MKPTR(JS_TAG_STRING, bc)); }
O3
c
JS_ReadRegExp: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r12 movq (%rdi), %r14 callq 0x46a4d movl $0x6, %ebx testq %rax, %rax je 0x47c24 movq %rax, %r15 movq %r12, %rdi callq 0x46a4d testq %rax, %rax je 0x47b89 movq %rax, %r12 testb $-0x80, 0x7(%rax) jne 0x47bd0 movq %r12, 0x18(%rsp) movq $-0x7, 0x20(%rsp) movups 0x18(%rsp), %xmm0 movups %xmm0, (%rsp) movl $0x3, %edx movq %r14, %rdi xorl %esi, %esi movq %r15, %rcx movq $-0x7, %r8 callq 0x402e0 movq %rdx, %rbx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r15d jmp 0x47c97 movq 0x18(%r14), %r14 movl (%r15), %eax leal -0x1(%rax), %ecx movl %ecx, (%r15) cmpl $0x1, %eax jg 0x47c24 movq 0x4(%r15), %rax shrq $0x3e, %rax jne 0x47c19 decq 0x28(%r14) movq %r15, %rdi callq *0x20(%r14) movq 0x30(%r14), %rcx movq 0x40(%r14), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r14) movq %r15, %rsi callq *0x10(%r14) jmp 0x47c24 movabsq $0x4000000000000000, %rbp # imm = 0x4000000000000000 movq 0x18(%r14), %r13 movl (%r15), %eax leal -0x1(%rax), %ecx movl %ecx, (%r15) cmpl $0x1, %eax jg 0x47c34 cmpq %rbp, 0x4(%r15) jae 0x47c29 decq 0x28(%r13) movq %r15, %rdi callq *0x20(%r13) movq 0x30(%r13), %rcx movq 0x40(%r13), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r13) movq %r15, %rsi callq *0x10(%r13) jmp 0x47c34 movq %r14, %rdi movq %r15, %rsi callq 0x3c2d5 xorl %r15d, %r15d jmp 0x47c95 movq %r13, %rdi movq %r15, %rsi callq 0x3c2d5 movq 0x18(%r14), %r15 movl (%r12), %eax leal -0x1(%rax), %ecx movl %ecx, (%r12) cmpl $0x1, %eax jg 0x47c81 cmpq %rbp, 0x4(%r12) jae 0x47c76 decq 0x28(%r15) movq %r12, %rdi callq *0x20(%r15) movq 0x30(%r15), %rcx movq 0x40(%r15), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r15) movq %r12, %rsi callq *0x10(%r15) jmp 0x47c81 movq %r15, %rdi movq %r12, %rsi callq 0x3c2d5 leaq 0x5965d(%rip), %rsi # 0xa12e5 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x2227b xorl %ecx, %ecx orq %rcx, %r15 movq %r15, %rax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_ReadRegExp: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, rdi mov r14, [rdi] call JS_ReadString mov ebx, 6 test rax, rax jz loc_47C24 mov r15, rax mov rdi, r12 call JS_ReadString test rax, rax jz short loc_47B89 mov r12, rax test byte ptr [rax+7], 80h jnz loc_47BD0 mov qword ptr [rsp+58h+var_40], r12 mov qword ptr [rsp+58h+var_40+8], 0FFFFFFFFFFFFFFF9h movups xmm0, [rsp+58h+var_40] movups [rsp+58h+var_58], xmm0 mov edx, 3 mov rdi, r14 xor esi, esi mov rcx, r15 mov r8, 0FFFFFFFFFFFFFFF9h call js_regexp_constructor_internal mov rbx, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r15d, eax jmp loc_47C97 loc_47B89: mov r14, [r14+18h] mov eax, [r15] lea ecx, [rax-1] mov [r15], ecx cmp eax, 1 jg loc_47C24 mov rax, [r15+4] shr rax, 3Eh jnz short loc_47C19 dec qword ptr [r14+28h] mov rdi, r15 call qword ptr [r14+20h] mov rcx, [r14+30h] mov rdi, [r14+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rcx mov rsi, r15 call qword ptr [r14+10h] jmp short loc_47C24 loc_47BD0: mov rbp, 4000000000000000h mov r13, [r14+18h] mov eax, [r15] lea ecx, [rax-1] mov [r15], ecx cmp eax, 1 jg short loc_47C34 cmp [r15+4], rbp jnb short loc_47C29 dec qword ptr [r13+28h] mov rdi, r15 call qword ptr [r13+20h] mov rcx, [r13+30h] mov rdi, [r13+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r13+30h], rcx mov rsi, r15 call qword ptr [r13+10h] jmp short loc_47C34 loc_47C19: mov rdi, r14 mov rsi, r15 call JS_FreeAtomStruct loc_47C24: xor r15d, r15d jmp short loc_47C95 loc_47C29: mov rdi, r13 mov rsi, r15 call JS_FreeAtomStruct loc_47C34: mov r15, [r14+18h] mov eax, [r12] lea ecx, [rax-1] mov [r12], ecx cmp eax, 1 jg short loc_47C81 cmp [r12+4], rbp jnb short loc_47C76 dec qword ptr [r15+28h] mov rdi, r12 call qword ptr [r15+20h] mov rcx, [r15+30h] mov rdi, [r15+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r15+30h], rcx mov rsi, r12 call qword ptr [r15+10h] jmp short loc_47C81 loc_47C76: mov rdi, r15 mov rsi, r12 call JS_FreeAtomStruct loc_47C81: lea rsi, aBadRegexpBytec; "bad regexp bytecode" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowInternalError loc_47C95: xor ecx, ecx loc_47C97: or r15, rcx mov rax, r15 mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long JS_ReadRegExp( long long *a1, long long a2, long long a3, int a4, int a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long v14; // r14 long long String; // rax long long v16; // rdx int v17; // ecx int v18; // r8d int v19; // r9d double v20; // xmm4_8 double v21; // xmm5_8 _QWORD *v22; // r15 long long v23; // rax long long v24; // rdx long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 long long v29; // r12 unsigned long long v30; // rax unsigned long long v31; // rcx long long v32; // r15 long long v33; // r14 int v34; // eax long long v35; // rax long long v36; // rdi long long v37; // r13 int v38; // eax long long v39; // rax long long v40; // rdi long long v41; // r15 int v42; // eax long long v43; // rcx long long v44; // rax long long v45; // rdi char v47; // [rsp+0h] [rbp-58h] __m128 v48; // [rsp+18h] [rbp-40h] v14 = *a1; String = JS_ReadString((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6); if ( !String ) { LABEL_12: v32 = 0LL; LABEL_19: v31 = 0LL; return v31 | v32; } v22 = (_QWORD *)String; v23 = JS_ReadString((long long)a1, a7, a8, a9, a10, v20, v21, a13, a14, a2, v16, v17, v18, v19); if ( !v23 ) { v33 = *(_QWORD *)(v14 + 24); v34 = (*(_DWORD *)v22)--; if ( v34 <= 1 ) { if ( *(_QWORD *)((char *)v22 + 4) >> 62 ) { JS_FreeAtomStruct(v33, (long long)v22); } else { --*(_QWORD *)(v33 + 40); v35 = (*(long long ( **)(_QWORD *))(v33 + 32))(v22); v36 = *(_QWORD *)(v33 + 64); *(_QWORD *)(v33 + 48) = *(_QWORD *)(v33 + 48) - v35 - 8; (*(void ( **)(long long, _QWORD *))(v33 + 16))(v36, v22); } } goto LABEL_12; } v29 = v23; if ( *(char *)(v23 + 7) < 0 ) { v37 = *(_QWORD *)(v14 + 24); v38 = (*(_DWORD *)v22)--; if ( v38 <= 1 ) { if ( *(_QWORD *)((char *)v22 + 4) >= 0x4000000000000000uLL ) { JS_FreeAtomStruct(v37, (long long)v22); } else { --*(_QWORD *)(v37 + 40); v39 = (*(long long ( **)(_QWORD *))(v37 + 32))(v22); v40 = *(_QWORD *)(v37 + 64); *(_QWORD *)(v37 + 48) = *(_QWORD *)(v37 + 48) - v39 - 8; (*(void ( **)(long long, _QWORD *))(v37 + 16))(v40, v22); } } v41 = *(_QWORD *)(v14 + 24); v42 = *(_DWORD *)v29; v43 = (unsigned int)(*(_DWORD *)v29 - 1); *(_DWORD *)v29 = v43; if ( v42 <= 1 ) { if ( *(_QWORD *)(v29 + 4) >= 0x4000000000000000uLL ) { JS_FreeAtomStruct(v41, v29); } else { --*(_QWORD *)(v41 + 40); v44 = (*(long long ( **)(long long))(v41 + 32))(v29); v45 = *(_QWORD *)(v41 + 64); *(_QWORD *)(v41 + 48) = *(_QWORD *)(v41 + 48) - v44 - 8; (*(void ( **)(long long, long long))(v41 + 16))(v45, v29); } } v32 = 0LL; JS_ThrowInternalError( v14, (long long)"bad regexp bytecode", v24, v43, v25, v26, a7, a8, a9, a10, v27, v28, a13, a14, v47); goto LABEL_19; } v48.m128_u64[0] = v23; v48.m128_u64[1] = -7LL; v30 = js_regexp_constructor_internal( v14, 0LL, 3LL, v22, -7LL, v26, v48, a8, a9, a10, v27, v28, a13, a14, (_QWORD *)v23, -7LL); v31 = v30 & 0xFFFFFFFF00000000LL; v32 = (unsigned int)v30; return v31 | v32; }
JS_ReadRegExp: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,RDI MOV R14,qword ptr [RDI] CALL 0x00146a4d MOV EBX,0x6 TEST RAX,RAX JZ 0x00147c24 MOV R15,RAX MOV RDI,R12 CALL 0x00146a4d TEST RAX,RAX JZ 0x00147b89 MOV R12,RAX TEST byte ptr [RAX + 0x7],0x80 JNZ 0x00147bd0 MOV qword ptr [RSP + 0x18],R12 MOV qword ptr [RSP + 0x20],-0x7 MOVUPS XMM0,xmmword ptr [RSP + 0x18] MOVUPS xmmword ptr [RSP],XMM0 MOV EDX,0x3 MOV RDI,R14 XOR ESI,ESI MOV RCX,R15 MOV R8,-0x7 CALL 0x001402e0 MOV RBX,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R15D,EAX JMP 0x00147c97 LAB_00147b89: MOV R14,qword ptr [R14 + 0x18] MOV EAX,dword ptr [R15] LEA ECX,[RAX + -0x1] MOV dword ptr [R15],ECX CMP EAX,0x1 JG 0x00147c24 MOV RAX,qword ptr [R15 + 0x4] SHR RAX,0x3e JNZ 0x00147c19 DEC qword ptr [R14 + 0x28] MOV RDI,R15 CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x30] MOV RDI,qword ptr [R14 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R14 + 0x30],RCX MOV RSI,R15 CALL qword ptr [R14 + 0x10] JMP 0x00147c24 LAB_00147bd0: MOV RBP,0x4000000000000000 MOV R13,qword ptr [R14 + 0x18] MOV EAX,dword ptr [R15] LEA ECX,[RAX + -0x1] MOV dword ptr [R15],ECX CMP EAX,0x1 JG 0x00147c34 CMP qword ptr [R15 + 0x4],RBP JNC 0x00147c29 DEC qword ptr [R13 + 0x28] MOV RDI,R15 CALL qword ptr [R13 + 0x20] MOV RCX,qword ptr [R13 + 0x30] MOV RDI,qword ptr [R13 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R13 + 0x30],RCX MOV RSI,R15 CALL qword ptr [R13 + 0x10] JMP 0x00147c34 LAB_00147c19: MOV RDI,R14 MOV RSI,R15 CALL 0x0013c2d5 LAB_00147c24: XOR R15D,R15D JMP 0x00147c95 LAB_00147c29: MOV RDI,R13 MOV RSI,R15 CALL 0x0013c2d5 LAB_00147c34: MOV R15,qword ptr [R14 + 0x18] MOV EAX,dword ptr [R12] LEA ECX,[RAX + -0x1] MOV dword ptr [R12],ECX CMP EAX,0x1 JG 0x00147c81 CMP qword ptr [R12 + 0x4],RBP JNC 0x00147c76 DEC qword ptr [R15 + 0x28] MOV RDI,R12 CALL qword ptr [R15 + 0x20] MOV RCX,qword ptr [R15 + 0x30] MOV RDI,qword ptr [R15 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R15 + 0x30],RCX MOV RSI,R12 CALL qword ptr [R15 + 0x10] JMP 0x00147c81 LAB_00147c76: MOV RDI,R15 MOV RSI,R12 CALL 0x0013c2d5 LAB_00147c81: LEA RSI,[0x1a12e5] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0012227b LAB_00147c95: XOR ECX,ECX LAB_00147c97: OR R15,RCX MOV RAX,R15 MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] JS_ReadRegExp(long *param_1) { int iVar1; long lVar2; int *piVar3; int *piVar4; long lVar5; long lVar6; ulong uVar7; int8 uVar8; int8 in_R9; ulong uVar9; int1 auVar10 [16]; int4 local_40; lVar2 = *param_1; piVar3 = (int *)JS_ReadString(); uVar8 = 6; if (piVar3 != (int *)0x0) { piVar4 = (int *)JS_ReadString(param_1); if (piVar4 == (int *)0x0) { lVar2 = *(long *)(lVar2 + 0x18); iVar1 = *piVar3; *piVar3 = iVar1 + -1; if (iVar1 < 2) { if (*(ulong *)(piVar3 + 1) >> 0x3e == 0) { *(long *)(lVar2 + 0x28) = *(long *)(lVar2 + 0x28) + -1; lVar5 = (**(code **)(lVar2 + 0x20))(piVar3); *(long *)(lVar2 + 0x30) = (*(long *)(lVar2 + 0x30) - lVar5) + -8; (**(code **)(lVar2 + 0x10))(*(int8 *)(lVar2 + 0x40),piVar3); } else { JS_FreeAtomStruct(lVar2,piVar3); } } } else { if ((*(byte *)((long)piVar4 + 7) & 0x80) == 0) { local_40 = SUB84(piVar4,0); auVar10 = js_regexp_constructor_internal (lVar2,0,3,piVar3,0xfffffffffffffff9,in_R9,local_40,0xfffffff9); uVar8 = auVar10._8_8_; uVar7 = auVar10._0_8_ & 0xffffffff00000000; uVar9 = auVar10._0_8_ & 0xffffffff; goto LAB_00147c97; } lVar5 = *(long *)(lVar2 + 0x18); iVar1 = *piVar3; *piVar3 = iVar1 + -1; if (iVar1 < 2) { if (*(ulong *)(piVar3 + 1) < 0x4000000000000000) { *(long *)(lVar5 + 0x28) = *(long *)(lVar5 + 0x28) + -1; lVar6 = (**(code **)(lVar5 + 0x20))(piVar3); *(long *)(lVar5 + 0x30) = (*(long *)(lVar5 + 0x30) - lVar6) + -8; (**(code **)(lVar5 + 0x10))(*(int8 *)(lVar5 + 0x40),piVar3); } else { JS_FreeAtomStruct(lVar5,piVar3); } } lVar5 = *(long *)(lVar2 + 0x18); iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (iVar1 < 2) { if (*(ulong *)(piVar4 + 1) < 0x4000000000000000) { *(long *)(lVar5 + 0x28) = *(long *)(lVar5 + 0x28) + -1; lVar6 = (**(code **)(lVar5 + 0x20))(piVar4); *(long *)(lVar5 + 0x30) = (*(long *)(lVar5 + 0x30) - lVar6) + -8; (**(code **)(lVar5 + 0x10))(*(int8 *)(lVar5 + 0x40),piVar4); } else { JS_FreeAtomStruct(lVar5,piVar4); } } JS_ThrowInternalError(lVar2,"bad regexp bytecode"); } } uVar9 = 0; uVar7 = 0; LAB_00147c97: auVar10._8_8_ = uVar8; auVar10._0_8_ = uVar9 | uVar7; return auVar10; }
45,469
MatrixRotateY
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixRotateY(float angle) { Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; // MatrixIdentity() float cosres = cosf(angle); float sinres = sinf(angle); result.m0 = cosres; result.m2 = -sinres; result.m8 = sinres; result.m10 = cosres; return result; }
O2
c
MatrixRotateY: pushq %rbx subq $0x10, %rsp movss %xmm0, 0x8(%rsp) movq %rdi, %rbx xorps %xmm1, %xmm1 movups %xmm1, 0x14(%rdi) movups %xmm1, 0x24(%rdi) andq $0x0, 0x34(%rdi) movups %xmm1, 0x4(%rdi) movl $0x3f800000, %eax # imm = 0x3F800000 movl %eax, 0x14(%rdi) movl %eax, 0x3c(%rdi) callq 0x9390 movss %xmm0, 0xc(%rsp) movss 0x8(%rsp), %xmm0 callq 0x9410 movss 0xc(%rsp), %xmm2 movss %xmm2, (%rbx) movaps 0x5c5ef(%rip), %xmm1 # 0xb5140 xorps %xmm0, %xmm1 movss %xmm1, 0x20(%rbx) movss %xmm0, 0x8(%rbx) movss %xmm2, 0x28(%rbx) movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
MatrixRotateY: push rbx sub rsp, 10h movss [rsp+18h+var_10], xmm0 mov rbx, rdi xorps xmm1, xmm1 movups xmmword ptr [rdi+14h], xmm1 movups xmmword ptr [rdi+24h], xmm1 and qword ptr [rdi+34h], 0 movups xmmword ptr [rdi+4], xmm1 mov eax, 3F800000h mov [rdi+14h], eax mov [rdi+3Ch], eax call _cosf movss [rsp+18h+var_C], xmm0 movss xmm0, [rsp+18h+var_10] call _sinf movss xmm2, [rsp+18h+var_C] movss dword ptr [rbx], xmm2 movaps xmm1, cs:xmmword_B5140 xorps xmm1, xmm0 movss dword ptr [rbx+20h], xmm1 movss dword ptr [rbx+8], xmm0 movss dword ptr [rbx+28h], xmm2 mov rax, rbx add rsp, 10h pop rbx retn
long long MatrixRotateY(long long a1, float a2) { double v2; // xmm0_8 double v3; // xmm0_8 int v6; // [rsp+Ch] [rbp-Ch] *(_OWORD *)(a1 + 20) = 0LL; *(_OWORD *)(a1 + 36) = 0LL; *(_QWORD *)(a1 + 52) = 0LL; *(_OWORD *)(a1 + 4) = 0LL; *(_DWORD *)(a1 + 20) = 1065353216; *(_DWORD *)(a1 + 60) = 1065353216; v2 = cosf(a2); v6 = LODWORD(v2); v3 = sinf(a2); *(_DWORD *)a1 = v6; *(float *)(a1 + 32) = -*(float *)&v3; *(_DWORD *)(a1 + 8) = LODWORD(v3); *(_DWORD *)(a1 + 40) = v6; return a1; }
MatrixRotateY: PUSH RBX SUB RSP,0x10 MOVSS dword ptr [RSP + 0x8],XMM0 MOV RBX,RDI XORPS XMM1,XMM1 MOVUPS xmmword ptr [RDI + 0x14],XMM1 MOVUPS xmmword ptr [RDI + 0x24],XMM1 AND qword ptr [RDI + 0x34],0x0 MOVUPS xmmword ptr [RDI + 0x4],XMM1 MOV EAX,0x3f800000 MOV dword ptr [RDI + 0x14],EAX MOV dword ptr [RDI + 0x3c],EAX CALL 0x00109390 MOVSS dword ptr [RSP + 0xc],XMM0 MOVSS XMM0,dword ptr [RSP + 0x8] CALL 0x00109410 MOVSS XMM2,dword ptr [RSP + 0xc] MOVSS dword ptr [RBX],XMM2 MOVAPS XMM1,xmmword ptr [0x001b5140] XORPS XMM1,XMM0 MOVSS dword ptr [RBX + 0x20],XMM1 MOVSS dword ptr [RBX + 0x8],XMM0 MOVSS dword ptr [RBX + 0x28],XMM2 MOV RAX,RBX ADD RSP,0x10 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ float * MatrixRotateY(float param_1,float *param_2) { float fVar1; float fVar2; param_2[5] = 0.0; param_2[6] = 0.0; param_2[7] = 0.0; param_2[8] = 0.0; param_2[9] = 0.0; param_2[10] = 0.0; param_2[0xb] = 0.0; param_2[0xc] = 0.0; param_2[0xd] = 0.0; param_2[0xe] = 0.0; param_2[1] = 0.0; param_2[2] = 0.0; param_2[3] = 0.0; param_2[4] = 0.0; param_2[5] = 1.0; param_2[0xf] = 1.0; fVar1 = cosf(param_1); fVar2 = sinf(param_1); *param_2 = fVar1; param_2[8] = (float)(_DAT_001b5140 ^ (uint)fVar2); param_2[2] = fVar2; param_2[10] = fVar1; return param_2; }
45,470
ggml_diag_mask_inf_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_diag_mask_inf_impl( struct ggml_context * ctx, struct ggml_tensor * a, int n_past, bool inplace) { struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); int32_t params[] = { n_past }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_DIAG_MASK_INF; result->src[0] = a; return result; }
O0
c
ggml_diag_mask_inf_impl: subq $0x38, %rsp movb %cl, %al movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movl %edx, 0x24(%rsp) andb $0x1, %al movb %al, 0x23(%rsp) testb $0x1, 0x23(%rsp) je 0x4eb37 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x408f0 movq %rax, 0x8(%rsp) jmp 0x4eb4b movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x43c20 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x18(%rsp) movl 0x24(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x18(%rsp), %rdi leaq 0x14(%rsp), %rsi movl $0x4, %edx callq 0x4c4d0 movq 0x18(%rsp), %rax movl $0x29, 0x50(%rax) movq 0x28(%rsp), %rcx movq 0x18(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x18(%rsp), %rax addq $0x38, %rsp retq nopl (%rax,%rax)
ggml_diag_mask_inf_impl: sub rsp, 38h mov al, cl mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_14], edx and al, 1 mov [rsp+38h+var_15], al test [rsp+38h+var_15], 1 jz short loc_4EB37 mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call _ggml_view_tensor mov [rsp+38h+var_30], rax jmp short loc_4EB4B loc_4EB37: mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call _ggml_dup_tensor mov [rsp+38h+var_30], rax loc_4EB4B: mov rax, [rsp+38h+var_30] mov [rsp+38h+var_20], rax mov eax, [rsp+38h+var_14] mov [rsp+38h+var_24], eax mov rdi, [rsp+38h+var_20] lea rsi, [rsp+38h+var_24] mov edx, 4 call ggml_set_op_params mov rax, [rsp+38h+var_20] mov dword ptr [rax+50h], 29h ; ')' mov rcx, [rsp+38h+var_10] mov rax, [rsp+38h+var_20] mov [rax+98h], rcx mov rax, [rsp+38h+var_20] add rsp, 38h retn
long long ggml_diag_mask_inf_impl( long long a1, unsigned int *a2, int a3, char a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v13; // [rsp+8h] [rbp-30h] int v14; // [rsp+14h] [rbp-24h] BYREF long long v15; // [rsp+18h] [rbp-20h] char v16; // [rsp+23h] [rbp-15h] int v17; // [rsp+24h] [rbp-14h] unsigned int *v18; // [rsp+28h] [rbp-10h] long long v19; // [rsp+30h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4 & 1; if ( (a4 & 1) != 0 ) v13 = (long long)ggml_view_tensor(v19, (long long)v18, a5, a6, a7, a8, a9, a10, a11, a12); else v13 = ggml_dup_tensor(v19, v18); v15 = v13; v14 = v17; ggml_set_op_params(v13, (long long)&v14, 4LL); *(_DWORD *)(v15 + 80) = 41; *(_QWORD *)(v15 + 152) = v18; return v15; }
ggml_diag_mask_inf_impl: SUB RSP,0x38 MOV AL,CL MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV dword ptr [RSP + 0x24],EDX AND AL,0x1 MOV byte ptr [RSP + 0x23],AL TEST byte ptr [RSP + 0x23],0x1 JZ 0x0014eb37 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001408f0 MOV qword ptr [RSP + 0x8],RAX JMP 0x0014eb4b LAB_0014eb37: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00143c20 MOV qword ptr [RSP + 0x8],RAX LAB_0014eb4b: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x14] MOV EDX,0x4 CALL 0x0014c4d0 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x50],0x29 MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x38 RET
long ggml_diag_mask_inf_impl(int8 param_1,int8 param_2,int4 param_3,byte param_4) { long local_30; int4 local_24; long local_20; byte local_15; int4 local_14; int8 local_10; int8 local_8; local_15 = param_4 & 1; local_14 = param_3; local_10 = param_2; local_8 = param_1; if (local_15 == 0) { local_30 = ggml_dup_tensor(param_1,param_2); } else { local_30 = ggml_view_tensor(param_1,param_2); } local_20 = local_30; local_24 = local_14; ggml_set_op_params(local_30,&local_24,4); *(int4 *)(local_20 + 0x50) = 0x29; *(int8 *)(local_20 + 0x98) = local_10; return local_20; }
45,471
aggregate_all_stages(PFS_stage_stat*, PFS_stage_stat*)
eloqsql/storage/perfschema/pfs_instr.cc
void aggregate_all_stages(PFS_stage_stat *from_array, PFS_stage_stat *to_array) { PFS_stage_stat *from; PFS_stage_stat *from_last; PFS_stage_stat *to; from= from_array; from_last= from_array + stage_class_max; to= to_array; for ( ; from < from_last ; from++, to++) { if (from->m_timer1_stat.m_count > 0) { to->aggregate(from); from->reset(); } } }
O3
cpp
aggregate_all_stages(PFS_stage_stat*, PFS_stage_stat*): pushq %rbp movq %rsp, %rbp leaq 0x358c09(%rip), %rax # 0x391410 movq (%rax), %rax testq %rax, %rax jle 0x38871 shlq $0x5, %rax addq %rdi, %rax addq $0x18, %rsi xorps %xmm0, %xmm0 movq (%rdi), %rcx testq %rcx, %rcx je 0x38857 addq %rcx, -0x18(%rsi) movq 0x8(%rdi), %rcx addq %rcx, -0x10(%rsi) movq 0x10(%rdi), %rcx cmpq %rcx, -0x8(%rsi) ja 0x38866 movq 0x18(%rdi), %rcx cmpq %rcx, (%rsi) jb 0x3886c movups %xmm0, (%rdi) movq $-0x1, 0x10(%rdi) movq $0x0, 0x18(%rdi) addq $0x20, %rdi addq $0x20, %rsi cmpq %rax, %rdi jb 0x3881d jmp 0x38871 movq %rcx, -0x8(%rsi) jmp 0x3883b movq %rcx, (%rsi) jmp 0x38844 popq %rbp retq
_Z20aggregate_all_stagesP14PFS_stage_statS0_: push rbp mov rbp, rsp lea rax, stage_class_max mov rax, [rax] test rax, rax jle short loc_38871 shl rax, 5 add rax, rdi add rsi, 18h xorps xmm0, xmm0 loc_3881D: mov rcx, [rdi] test rcx, rcx jz short loc_38857 add [rsi-18h], rcx mov rcx, [rdi+8] add [rsi-10h], rcx mov rcx, [rdi+10h] cmp [rsi-8], rcx ja short loc_38866 loc_3883B: mov rcx, [rdi+18h] cmp [rsi], rcx jb short loc_3886C loc_38844: movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0FFFFFFFFFFFFFFFFh mov qword ptr [rdi+18h], 0 loc_38857: add rdi, 20h ; ' ' add rsi, 20h ; ' ' cmp rdi, rax jb short loc_3881D jmp short loc_38871 loc_38866: mov [rsi-8], rcx jmp short loc_3883B loc_3886C: mov [rsi], rcx jmp short loc_38844 loc_38871: pop rbp retn
unsigned long long aggregate_all_stages(_QWORD *a1, long long a2) { unsigned long long result; // rax unsigned long long *v3; // rsi unsigned long long v4; // rcx unsigned long long v5; // rcx result = stage_class_max; if ( stage_class_max > 0 ) { result = (unsigned long long)&a1[4 * stage_class_max]; v3 = (unsigned long long *)(a2 + 24); do { if ( *a1 ) { *(v3 - 3) += *a1; *(v3 - 2) += a1[1]; v4 = a1[2]; if ( *(v3 - 1) > v4 ) *(v3 - 1) = v4; v5 = a1[3]; if ( *v3 < v5 ) *v3 = v5; *(_OWORD *)a1 = 0LL; a1[2] = -1LL; a1[3] = 0LL; } a1 += 4; v3 += 4; } while ( (unsigned long long)a1 < result ); } return result; }
aggregate_all_stages: PUSH RBP MOV RBP,RSP LEA RAX,[0x491410] MOV RAX,qword ptr [RAX] TEST RAX,RAX JLE 0x00138871 SHL RAX,0x5 ADD RAX,RDI ADD RSI,0x18 XORPS XMM0,XMM0 LAB_0013881d: MOV RCX,qword ptr [RDI] TEST RCX,RCX JZ 0x00138857 ADD qword ptr [RSI + -0x18],RCX MOV RCX,qword ptr [RDI + 0x8] ADD qword ptr [RSI + -0x10],RCX MOV RCX,qword ptr [RDI + 0x10] CMP qword ptr [RSI + -0x8],RCX JA 0x00138866 LAB_0013883b: MOV RCX,qword ptr [RDI + 0x18] CMP qword ptr [RSI],RCX JC 0x0013886c LAB_00138844: MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],-0x1 MOV qword ptr [RDI + 0x18],0x0 LAB_00138857: ADD RDI,0x20 ADD RSI,0x20 CMP RDI,RAX JC 0x0013881d JMP 0x00138871 LAB_00138866: MOV qword ptr [RSI + -0x8],RCX JMP 0x0013883b LAB_0013886c: MOV qword ptr [RSI],RCX JMP 0x00138844 LAB_00138871: POP RBP RET
/* aggregate_all_stages(PFS_stage_stat*, PFS_stage_stat*) */ void aggregate_all_stages(PFS_stage_stat *param_1,PFS_stage_stat *param_2) { PFS_stage_stat *pPVar1; PFS_stage_stat *pPVar2; if (0 < stage_class_max) { pPVar1 = param_1 + stage_class_max * 0x20; pPVar2 = param_2 + 0x18; do { if (*(long *)param_1 != 0) { *(ulong *)(pPVar2 + -0x18) = *(ulong *)(pPVar2 + -0x18) + *(long *)param_1; *(ulong *)(pPVar2 + -0x10) = *(ulong *)(pPVar2 + -0x10) + *(long *)(param_1 + 8); if (*(ulong *)(param_1 + 0x10) < *(ulong *)(pPVar2 + -8)) { *(ulong *)(pPVar2 + -8) = *(ulong *)(param_1 + 0x10); } if (*(ulong *)pPVar2 < *(ulong *)(param_1 + 0x18)) { *(ulong *)pPVar2 = *(ulong *)(param_1 + 0x18); } *(long *)param_1 = 0; *(long *)(param_1 + 8) = 0; *(long *)(param_1 + 0x10) = -1; *(long *)(param_1 + 0x18) = 0; } param_1 = param_1 + 0x20; pPVar2 = pPVar2 + 0x20; } while (param_1 < pPVar1); } return; }
45,472
my_load_path
eloqsql/mysys/mf_loadpath.c
char * my_load_path(char * to, const char *path, const char *own_path_prefix) { char buff[FN_REFLEN+1]; const char *from= buff; int is_cur; DBUG_ENTER("my_load_path"); DBUG_PRINT("enter",("path: %s prefix: %s",path, own_path_prefix ? own_path_prefix : "")); if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) || test_if_hard_path(path)) from= path; else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) || (is_prefix(path,FN_PARENTDIR)) || ! own_path_prefix) { if (is_cur) is_cur=2; /* Remove current dir */ if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0))) { size_t length= strlen(buff); (void) strmake(buff + length, path+is_cur, FN_REFLEN - length); } else from= path; /* Return org file name */ } else (void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS); strmake(to, from, FN_REFLEN-1); DBUG_PRINT("exit",("to: %s",to)); DBUG_RETURN(to); }
O0
c
my_load_path: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x6595d movq -0x220(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x6597c movq -0x220(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2f, %eax je 0x6598d movq -0x220(%rbp), %rdi callq 0x672a0 cmpl $0x0, %eax je 0x659a0 movq -0x220(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x65ae4 movq -0x220(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x2e, %ecx movb %al, -0x241(%rbp) jne 0x659ce movq -0x220(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2f, %eax sete %al movb %al, -0x241(%rbp) movb -0x241(%rbp), %al movb %al, %cl andb $0x1, %cl movzbl %cl, %ecx movl %ecx, -0x234(%rbp) testb $0x1, %al jne 0x65a0c movq -0x220(%rbp), %rdi leaq 0x4c667(%rip), %rsi # 0xb205b callq 0xaa910 cmpl $0x0, %eax jne 0x65a0c cmpq $0x0, -0x228(%rbp) jne 0x65abc cmpl $0x0, -0x234(%rbp) je 0x65a1f movl $0x2, -0x234(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x250(%rbp) movq -0x220(%rbp), %rdi callq 0x26150 movq -0x250(%rbp), %rdi movq %rax, %rcx movl $0x200, %eax # imm = 0x200 subq %rcx, %rax movslq -0x234(%rbp), %rcx addq %rcx, %rax movl %eax, %eax movl %eax, %esi xorl %eax, %eax movl %eax, %edx callq 0x67050 cmpl $0x0, %eax jne 0x65aac leaq -0x210(%rbp), %rdi callq 0x26150 movq %rax, -0x240(%rbp) leaq -0x210(%rbp), %rdi addq -0x240(%rbp), %rdi movq -0x220(%rbp), %rsi movslq -0x234(%rbp), %rax addq %rax, %rsi movl $0x200, %edx # imm = 0x200 subq -0x240(%rbp), %rdx callq 0xae060 jmp 0x65aba movq -0x220(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x65ae2 leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rdx movq -0x220(%rbp), %rcx movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %r8d movb $0x0, %al callq 0xae280 jmp 0x65ae4 movq -0x218(%rbp), %rdi movq -0x230(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0xae060 jmp 0x65afe jmp 0x65b00 movq -0x218(%rbp), %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x65b30 movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x26370 nopw %cs:(%rax,%rax) nop
my_load_path: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov [rbp+var_228], rdx lea rax, [rbp+var_210] mov [rbp+var_230], rax jmp short $+2 loc_6595D: mov rax, [rbp+var_220] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz short loc_6597C mov rax, [rbp+var_220] movsx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jz short loc_6598D loc_6597C: mov rdi, [rbp+var_220] call test_if_hard_path cmp eax, 0 jz short loc_659A0 loc_6598D: mov rax, [rbp+var_220] mov [rbp+var_230], rax jmp loc_65AE4 loc_659A0: mov rax, [rbp+var_220] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 2Eh ; '.' mov [rbp+var_241], al jnz short loc_659CE mov rax, [rbp+var_220] movsx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' setz al mov [rbp+var_241], al loc_659CE: mov al, [rbp+var_241] mov cl, al and cl, 1 movzx ecx, cl mov [rbp+var_234], ecx test al, 1 jnz short loc_65A0C mov rdi, [rbp+var_220] lea rsi, asc_B205B; ".." call is_prefix cmp eax, 0 jnz short loc_65A0C cmp [rbp+var_228], 0 jnz loc_65ABC loc_65A0C: cmp [rbp+var_234], 0 jz short loc_65A1F mov [rbp+var_234], 2 loc_65A1F: lea rax, [rbp+var_210] mov [rbp+var_250], rax mov rdi, [rbp+var_220] call _strlen mov rdi, [rbp+var_250] mov rcx, rax mov eax, 200h sub rax, rcx movsxd rcx, [rbp+var_234] add rax, rcx mov eax, eax mov esi, eax xor eax, eax mov edx, eax call my_getwd cmp eax, 0 jnz short loc_65AAC lea rdi, [rbp+var_210] call _strlen mov [rbp+var_240], rax lea rdi, [rbp+var_210] add rdi, [rbp+var_240] mov rsi, [rbp+var_220] movsxd rax, [rbp+var_234] add rsi, rax mov edx, 200h sub rdx, [rbp+var_240] call strmake jmp short loc_65ABA loc_65AAC: mov rax, [rbp+var_220] mov [rbp+var_230], rax loc_65ABA: jmp short loc_65AE2 loc_65ABC: lea rdi, [rbp+var_210] mov rdx, [rbp+var_228] mov rcx, [rbp+var_220] mov esi, 200h xor eax, eax mov r8d, eax mov al, 0 call strxnmov loc_65AE2: jmp short $+2 loc_65AE4: mov rdi, [rbp+var_218] mov rsi, [rbp+var_230] mov edx, 1FFh call strmake jmp short $+2 loc_65AFE: jmp short $+2 loc_65B00: mov rax, [rbp+var_218] mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_65B30 mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_65B30: call ___stack_chk_fail
long long my_load_path(long long a1, _BYTE *a2, long long a3) { int v3; // r9d int v4; // eax bool v6; // [rsp+1Fh] [rbp-241h] long long v7; // [rsp+20h] [rbp-240h] int v8; // [rsp+2Ch] [rbp-234h] _BYTE v10[520]; // [rsp+50h] [rbp-210h] BYREF unsigned long long v11; // [rsp+258h] [rbp-8h] v11 = __readfsqword(0x28u); if ( (*a2 != 126 || a2[1] != 47) && !(unsigned int)test_if_hard_path(a2) ) { v6 = 0; if ( *a2 == 46 ) v6 = a2[1] == 47; v8 = v6; if ( v6 || (unsigned int)is_prefix(a2, "..") || !a3 ) { if ( v6 ) v8 = 2; v4 = strlen(a2); if ( (unsigned int)my_getwd(v10, (unsigned int)(v8 + 512 - v4), 0LL) ) goto LABEL_4; v7 = strlen(v10); strmake(&v10[v7], &a2[v8], 512 - v7); } else { strxnmov((unsigned int)v10, 512, a3, (_DWORD)a2, 0, v3); } strmake(a1, v10, 511LL); return a1; } LABEL_4: strmake(a1, a2, 511LL); return a1; }
my_load_path: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x230],RAX JMP 0x0016595d LAB_0016595d: MOV RAX,qword ptr [RBP + -0x220] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x0016597c MOV RAX,qword ptr [RBP + -0x220] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JZ 0x0016598d LAB_0016597c: MOV RDI,qword ptr [RBP + -0x220] CALL 0x001672a0 CMP EAX,0x0 JZ 0x001659a0 LAB_0016598d: MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x230],RAX JMP 0x00165ae4 LAB_001659a0: MOV RAX,qword ptr [RBP + -0x220] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x2e MOV byte ptr [RBP + -0x241],AL JNZ 0x001659ce MOV RAX,qword ptr [RBP + -0x220] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f SETZ AL MOV byte ptr [RBP + -0x241],AL LAB_001659ce: MOV AL,byte ptr [RBP + -0x241] MOV CL,AL AND CL,0x1 MOVZX ECX,CL MOV dword ptr [RBP + -0x234],ECX TEST AL,0x1 JNZ 0x00165a0c MOV RDI,qword ptr [RBP + -0x220] LEA RSI,[0x1b205b] CALL 0x001aa910 CMP EAX,0x0 JNZ 0x00165a0c CMP qword ptr [RBP + -0x228],0x0 JNZ 0x00165abc LAB_00165a0c: CMP dword ptr [RBP + -0x234],0x0 JZ 0x00165a1f MOV dword ptr [RBP + -0x234],0x2 LAB_00165a1f: LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x220] CALL 0x00126150 MOV RDI,qword ptr [RBP + -0x250] MOV RCX,RAX MOV EAX,0x200 SUB RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x234] ADD RAX,RCX MOV EAX,EAX MOV ESI,EAX XOR EAX,EAX MOV EDX,EAX CALL 0x00167050 CMP EAX,0x0 JNZ 0x00165aac LEA RDI,[RBP + -0x210] CALL 0x00126150 MOV qword ptr [RBP + -0x240],RAX LEA RDI,[RBP + -0x210] ADD RDI,qword ptr [RBP + -0x240] MOV RSI,qword ptr [RBP + -0x220] MOVSXD RAX,dword ptr [RBP + -0x234] ADD RSI,RAX MOV EDX,0x200 SUB RDX,qword ptr [RBP + -0x240] CALL 0x001ae060 JMP 0x00165aba LAB_00165aac: MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x230],RAX LAB_00165aba: JMP 0x00165ae2 LAB_00165abc: LEA RDI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x228] MOV RCX,qword ptr [RBP + -0x220] MOV ESI,0x200 XOR EAX,EAX MOV R8D,EAX MOV AL,0x0 CALL 0x001ae280 LAB_00165ae2: JMP 0x00165ae4 LAB_00165ae4: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x230] MOV EDX,0x1ff CALL 0x001ae060 JMP 0x00165afe LAB_00165afe: JMP 0x00165b00 LAB_00165b00: MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00165b30 MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_00165b30: CALL 0x00126370
int8 my_load_path(int8 param_1,char *param_2,long param_3) { int iVar1; size_t sVar2; long in_FS_OFFSET; bool local_249; uint local_23c; char *local_238; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_238 = param_2; if (((*param_2 != '~') || (param_2[1] != '/')) && (iVar1 = test_if_hard_path(param_2), iVar1 == 0) ) { local_249 = false; if (*param_2 == '.') { local_249 = param_2[1] == '/'; } local_23c = (uint)local_249; if (((local_249 == false) && (iVar1 = is_prefix(param_2,&DAT_001b205b), iVar1 == 0)) && (param_3 != 0)) { strxnmov(local_218,0x200,param_3,param_2,0); local_238 = local_218; } else { if (local_23c != 0) { local_23c = 2; } sVar2 = strlen(param_2); iVar1 = my_getwd(local_218,(0x200 - (int)sVar2) + local_23c,0); if (iVar1 == 0) { sVar2 = strlen(local_218); strmake(local_218 + sVar2,param_2 + (int)local_23c,0x200 - sVar2); local_238 = local_218; } } } strmake(param_1,local_238,0x1ff); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return param_1; }
45,473
my_load_path
eloqsql/mysys/mf_loadpath.c
char * my_load_path(char * to, const char *path, const char *own_path_prefix) { char buff[FN_REFLEN+1]; const char *from= buff; int is_cur; DBUG_ENTER("my_load_path"); DBUG_PRINT("enter",("path: %s prefix: %s",path, own_path_prefix ? own_path_prefix : "")); if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) || test_if_hard_path(path)) from= path; else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) || (is_prefix(path,FN_PARENTDIR)) || ! own_path_prefix) { if (is_cur) is_cur=2; /* Remove current dir */ if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0))) { size_t length= strlen(buff); (void) strmake(buff + length, path+is_cur, FN_REFLEN - length); } else from= path; /* Return org file name */ } else (void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS); strmake(to, from, FN_REFLEN-1); DBUG_PRINT("exit",("to: %s",to)); DBUG_RETURN(to); }
O3
c
my_load_path: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpb $0x7e, (%rsi) jne 0x4c8ca cmpb $0x2f, 0x1(%r14) je 0x4c8d6 movq %r14, %rdi callq 0x4d752 testl %eax, %eax je 0x4c911 movq %r14, %r12 movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi movq %r12, %rsi callq 0x7bd58 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4c9b8 movq %rbx, %rax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpb $0x2e, (%r14) jne 0x4c924 movl $0x2, %r13d cmpb $0x2f, 0x1(%r14) je 0x4c963 leaq 0x32724(%rip), %rsi # 0x7f04f movq %r14, %rdi callq 0x7a474 xorl %r13d, %r13d testq %r15, %r15 je 0x4c963 testl %eax, %eax jne 0x4c963 leaq -0x240(%rbp), %r12 movl $0x200, %esi # imm = 0x200 movq %r12, %rdi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d xorl %eax, %eax callq 0x7be78 jmp 0x4c8d9 movq %r14, %rdi callq 0x26150 leal 0x200(%r13), %esi subl %eax, %esi leaq -0x240(%rbp), %r12 movq %r12, %rdi xorl %edx, %edx callq 0x4d5bc testl %eax, %eax jne 0x4c8d6 movq %r12, %rdi callq 0x26150 leaq (%rax,%rbp), %rdi addq $-0x240, %rdi # imm = 0xFDC0 addq %r13, %r14 movl $0x200, %edx # imm = 0x200 subq %rax, %rdx movq %r14, %rsi callq 0x7bd58 jmp 0x4c8d9 callq 0x263b0 nopl (%rax)
my_load_path: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 218h mov r15, rdx mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax cmp byte ptr [rsi], 7Eh ; '~' jnz short loc_4C8CA cmp byte ptr [r14+1], 2Fh ; '/' jz short loc_4C8D6 loc_4C8CA: mov rdi, r14 call test_if_hard_path test eax, eax jz short loc_4C911 loc_4C8D6: mov r12, r14 loc_4C8D9: mov edx, 1FFh mov rdi, rbx mov rsi, r12 call strmake mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_4C9B8 mov rax, rbx add rsp, 218h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4C911: cmp byte ptr [r14], 2Eh ; '.' jnz short loc_4C924 mov r13d, 2 cmp byte ptr [r14+1], 2Fh ; '/' jz short loc_4C963 loc_4C924: lea rsi, asc_7F04F; ".." mov rdi, r14 call is_prefix xor r13d, r13d test r15, r15 jz short loc_4C963 test eax, eax jnz short loc_4C963 lea r12, [rbp+var_240] mov esi, 200h mov rdi, r12 mov rdx, r15 mov rcx, r14 xor r8d, r8d xor eax, eax call strxnmov jmp loc_4C8D9 loc_4C963: mov rdi, r14 call _strlen lea esi, [r13+200h] sub esi, eax lea r12, [rbp+var_240] mov rdi, r12 xor edx, edx call my_getwd test eax, eax jnz loc_4C8D6 mov rdi, r12 call _strlen lea rdi, [rax+rbp] add rdi, 0FFFFFFFFFFFFFDC0h add r14, r13 mov edx, 200h sub rdx, rax mov rsi, r14 call strmake jmp loc_4C8D9 loc_4C9B8: call ___stack_chk_fail
long long my_load_path(long long a1, char *a2, long long a3) { char *v4; // r12 long long v6; // r13 int v7; // eax int v8; // r9d int v9; // eax long long v10; // rax char v11[528]; // [rsp+0h] [rbp-240h] BYREF unsigned long long v12; // [rsp+210h] [rbp-30h] v12 = __readfsqword(0x28u); if ( (*a2 != 126 || a2[1] != 47) && !(unsigned int)test_if_hard_path(a2) ) { if ( *a2 != 46 || (v6 = 2LL, a2[1] != 47) ) { v7 = is_prefix(a2, ".."); v6 = 0LL; if ( a3 ) { if ( !v7 ) { v4 = v11; strxnmov((unsigned int)v11, 512, a3, (_DWORD)a2, 0, v8, v11[0]); goto LABEL_5; } } } v9 = strlen(a2); v4 = v11; if ( !(unsigned int)my_getwd(v11, (unsigned int)(v6 + 512 - v9), 0LL) ) { v10 = strlen(v11); strmake(&v11[v10], &a2[v6], 512 - v10); goto LABEL_5; } } v4 = a2; LABEL_5: strmake(a1, v4, 511LL); return a1; }
my_load_path: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x218 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP byte ptr [RSI],0x7e JNZ 0x0014c8ca CMP byte ptr [R14 + 0x1],0x2f JZ 0x0014c8d6 LAB_0014c8ca: MOV RDI,R14 CALL 0x0014d752 TEST EAX,EAX JZ 0x0014c911 LAB_0014c8d6: MOV R12,R14 LAB_0014c8d9: MOV EDX,0x1ff MOV RDI,RBX MOV RSI,R12 CALL 0x0017bd58 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014c9b8 MOV RAX,RBX ADD RSP,0x218 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014c911: CMP byte ptr [R14],0x2e JNZ 0x0014c924 MOV R13D,0x2 CMP byte ptr [R14 + 0x1],0x2f JZ 0x0014c963 LAB_0014c924: LEA RSI,[0x17f04f] MOV RDI,R14 CALL 0x0017a474 XOR R13D,R13D TEST R15,R15 JZ 0x0014c963 TEST EAX,EAX JNZ 0x0014c963 LEA R12,[RBP + -0x240] MOV ESI,0x200 MOV RDI,R12 MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D XOR EAX,EAX CALL 0x0017be78 JMP 0x0014c8d9 LAB_0014c963: MOV RDI,R14 CALL 0x00126150 LEA ESI,[R13 + 0x200] SUB ESI,EAX LEA R12,[RBP + -0x240] MOV RDI,R12 XOR EDX,EDX CALL 0x0014d5bc TEST EAX,EAX JNZ 0x0014c8d6 MOV RDI,R12 CALL 0x00126150 LEA RDI,[RAX + RBP*0x1] ADD RDI,-0x240 ADD R14,R13 MOV EDX,0x200 SUB RDX,RAX MOV RSI,R14 CALL 0x0017bd58 JMP 0x0014c8d9 LAB_0014c9b8: CALL 0x001263b0
int8 my_load_path(int8 param_1,char *param_2,long param_3) { int iVar1; size_t sVar2; long lVar3; long in_FS_OFFSET; char local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (((*param_2 != '~') || (param_2[1] != '/')) && (iVar1 = test_if_hard_path(param_2), iVar1 == 0) ) { if ((*param_2 != '.') || (lVar3 = 2, param_2[1] != '/')) { iVar1 = is_prefix(param_2,&DAT_0017f04f); lVar3 = 0; if ((param_3 != 0) && (iVar1 == 0)) { strxnmov(local_248,0x200,param_3,param_2,0); param_2 = local_248; goto LAB_0014c8d9; } } sVar2 = strlen(param_2); iVar1 = my_getwd(local_248,((int)lVar3 + 0x200) - (int)sVar2,0); if (iVar1 == 0) { sVar2 = strlen(local_248); strmake(local_248 + sVar2,param_2 + lVar3,0x200 - sVar2); param_2 = local_248; } } LAB_0014c8d9: strmake(param_1,param_2,0x1ff); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return param_1; }
45,474
aria_get_capabilities
eloqsql/storage/maria/ma_backup.c
int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap) { MARIA_SHARE share; int error= 0; uint head_length= sizeof(share.state.header), base_pos; uint aligned_bit_blocks; size_t info_length; uchar *disc_cache; DBUG_ENTER("aria_get_capabilities"); bzero(cap, sizeof(*cap)); if (my_pread(kfile,share.state.header.file_version, head_length, 0, MYF(MY_NABP))) DBUG_RETURN(HA_ERR_NOT_A_TABLE); if (memcmp(share.state.header.file_version, maria_file_magic, 4)) DBUG_RETURN(HA_ERR_NOT_A_TABLE); share.options= mi_uint2korr(share.state.header.options); info_length= mi_uint2korr(share.state.header.header_length); base_pos= mi_uint2korr(share.state.header.base_pos); /* Allocate space for header information and for data that is too big to keep on stack */ if (!(disc_cache= my_malloc(PSI_NOT_INSTRUMENTED, info_length, MYF(MY_WME)))) DBUG_RETURN(ENOMEM); if (my_pread(kfile, disc_cache, info_length, 0L, MYF(MY_NABP))) { error= my_errno; goto err; } _ma_base_info_read(disc_cache + base_pos, &share.base); cap->transactional= share.base.born_transactional; cap->checksum= MY_TEST(share.options & HA_OPTION_PAGE_CHECKSUM); cap->online_backup_safe= cap->transactional && cap->checksum; cap->header_size= share.base.keystart; cap->keypage_header= ((share.base.born_transactional ? LSN_STORE_SIZE + TRANSID_SIZE : 0) + KEYPAGE_KEYID_SIZE + KEYPAGE_FLAG_SIZE + KEYPAGE_USED_SIZE); cap->block_size= share.base.block_size; cap->data_file_type= share.state.header.data_file_type; cap->s3_block_size= share.base.s3_block_size; cap->compression= share.base.compression_algorithm; cap->encrypted= MY_TEST(share.base.extra_options & MA_EXTRA_OPTIONS_ENCRYPTED); if (share.state.header.data_file_type == BLOCK_RECORD) { /* Calulate how man pages the row bitmap covers. From _ma_bitmap_init() */ aligned_bit_blocks= (cap->block_size - PAGE_SUFFIX_SIZE) / 6; /* In each 6 bytes, we have 6*8/3 = 16 pages covered The +1 is to add the bitmap page, as this doesn't have to be covered */ cap->bitmap_pages_covered= aligned_bit_blocks * 16 + 1; } /* Do a check that that we got things right */ if (share.state.header.data_file_type != BLOCK_RECORD && cap->online_backup_safe) error= HA_ERR_NOT_A_TABLE; err: my_free(disc_cache); DBUG_RETURN(error); }
O0
c
aria_get_capabilities: pushq %rbp movq %rsp, %rbp subq $0xc80, %rsp # imm = 0xC80 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0xc48(%rbp) movq %rsi, -0xc50(%rbp) movl $0x0, -0xc54(%rbp) movl $0x18, -0xc58(%rbp) movq -0xc50(%rbp), %rdi xorl %esi, %esi movl $0x30, %edx callq 0x2a2a0 movl -0xc48(%rbp), %edi leaq -0xc40(%rbp), %rsi movl -0xc58(%rbp), %eax movl %eax, %edx xorl %eax, %eax movl %eax, %ecx movl $0x4, %r8d callq 0xf6010 cmpq $0x0, %rax je 0x9e287 jmp 0x9e278 movl $0x82, -0xc44(%rbp) jmp 0x9e54e leaq -0xc40(%rbp), %rax leaq 0x220f6b(%rip), %rcx # 0x2bf200 movl (%rcx), %ecx movl (%rax), %eax subl %ecx, %eax setne %al movzbl %al, %eax cmpl $0x0, %eax je 0x9e2b7 jmp 0x9e2a8 movl $0x82, -0xc44(%rbp) jmp 0x9e54e movzbl -0xc3b(%rbp), %eax movzwl %ax, %eax movzbl -0xc3c(%rbp), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movq %rax, -0x520(%rbp) movzbl -0xc39(%rbp), %eax movzwl %ax, %eax movzbl -0xc3a(%rbp), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movq %rax, -0xc68(%rbp) movzbl -0xc33(%rbp), %eax movzwl %ax, %eax movzbl -0xc34(%rbp), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0xc5c(%rbp) movq -0xc68(%rbp), %rsi xorl %edi, %edi movl $0x10, %edx callq 0xf5210 movq %rax, -0xc70(%rbp) cmpq $0x0, %rax jne 0x9e350 jmp 0x9e341 movl $0xc, -0xc44(%rbp) jmp 0x9e54e movl -0xc48(%rbp), %edi movq -0xc70(%rbp), %rsi movq -0xc68(%rbp), %rdx xorl %eax, %eax movl %eax, %ecx movl $0x4, %r8d callq 0xf6010 cmpq $0x0, %rax je 0x9e38b callq 0xf7a70 movl (%rax), %eax movl %eax, -0xc54(%rbp) jmp 0x9e536 movq -0xc70(%rbp), %rdi movl -0xc5c(%rbp), %eax addq %rax, %rdi leaq -0xc40(%rbp), %rsi addq $0x360, %rsi # imm = 0x360 callq 0x9e580 movb -0x7f4(%rbp), %cl movq -0xc50(%rbp), %rax movb %cl, 0x1d(%rax) movq -0x520(%rbp), %rdx andq $0x800, %rdx # imm = 0x800 xorl %eax, %eax movl $0x1, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x1c(%rax) movq -0xc50(%rbp), %rax movsbl 0x1d(%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0xc71(%rbp) je 0x9e415 movq -0xc50(%rbp), %rax movsbl 0x1c(%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0xc71(%rbp) movb -0xc71(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x1f(%rax) movq -0x8e0(%rbp), %rcx movq -0xc50(%rbp), %rax movq %rcx, (%rax) movsbl -0x7f4(%rbp), %edx xorl %ecx, %ecx movl $0xd, %eax cmpl $0x0, %edx cmovnel %eax, %ecx addl $0x1, %ecx addl $0x1, %ecx addl $0x2, %ecx movq -0xc50(%rbp), %rax movl %ecx, 0x14(%rax) movl -0x824(%rbp), %ecx movq -0xc50(%rbp), %rax movl %ecx, 0x10(%rax) movzbl -0xc2a(%rbp), %ecx movq -0xc50(%rbp), %rax movl %ecx, 0x18(%rax) movq -0x880(%rbp), %rcx movq -0xc50(%rbp), %rax movq %rcx, 0x20(%rax) movl -0x810(%rbp), %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x28(%rax) movl -0x818(%rbp), %edx andl $0x1, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x1e(%rax) movzbl -0xc2a(%rbp), %eax cmpl $0x3, %eax jne 0x9e50e movq -0xc50(%rbp), %rax movl 0x10(%rax), %eax subl $0x4, %eax movl $0x6, %ecx xorl %edx, %edx divl %ecx movl %eax, -0xc60(%rbp) movl -0xc60(%rbp), %eax shll $0x4, %eax addl $0x1, %eax movl %eax, %eax movl %eax, %ecx movq -0xc50(%rbp), %rax movq %rcx, 0x8(%rax) movzbl -0xc2a(%rbp), %eax cmpl $0x3, %eax je 0x9e534 movq -0xc50(%rbp), %rax movsbl 0x1f(%rax), %eax cmpl $0x0, %eax je 0x9e534 movl $0x82, -0xc54(%rbp) jmp 0x9e536 movq -0xc70(%rbp), %rdi callq 0xf5590 movl -0xc54(%rbp), %eax movl %eax, -0xc44(%rbp) movl -0xc44(%rbp), %eax movl %eax, -0xc78(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x9e57b movl -0xc78(%rbp), %eax addq $0xc80, %rsp # imm = 0xC80 popq %rbp retq callq 0x2a250
aria_get_capabilities: push rbp mov rbp, rsp sub rsp, 0C80h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_C48], edi mov [rbp+var_C50], rsi mov [rbp+var_C54], 0 mov [rbp+var_C58], 18h mov rdi, [rbp+var_C50] xor esi, esi mov edx, 30h ; '0' call _memset mov edi, [rbp+var_C48] lea rsi, [rbp+var_C40] mov eax, [rbp+var_C58] mov edx, eax xor eax, eax mov ecx, eax mov r8d, 4 call my_pread cmp rax, 0 jz short loc_9E287 jmp short $+2 loc_9E278: mov [rbp+var_C44], 82h jmp loc_9E54E loc_9E287: lea rax, [rbp+var_C40] lea rcx, maria_file_magic mov ecx, [rcx] mov eax, [rax] sub eax, ecx setnz al movzx eax, al cmp eax, 0 jz short loc_9E2B7 jmp short $+2 loc_9E2A8: mov [rbp+var_C44], 82h jmp loc_9E54E loc_9E2B7: movzx eax, [rbp+var_C3B] movzx eax, ax movzx ecx, [rbp+var_C3C] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_520], rax movzx eax, [rbp+var_C39] movzx eax, ax movzx ecx, [rbp+var_C3A] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_C68], rax movzx eax, [rbp+var_C33] movzx eax, ax movzx ecx, [rbp+var_C34] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_C5C], eax mov rsi, [rbp+var_C68] xor edi, edi mov edx, 10h call my_malloc mov [rbp+var_C70], rax cmp rax, 0 jnz short loc_9E350 jmp short $+2 loc_9E341: mov [rbp+var_C44], 0Ch jmp loc_9E54E loc_9E350: mov edi, [rbp+var_C48] mov rsi, [rbp+var_C70] mov rdx, [rbp+var_C68] xor eax, eax mov ecx, eax mov r8d, 4 call my_pread cmp rax, 0 jz short loc_9E38B call _my_thread_var mov eax, [rax] mov [rbp+var_C54], eax jmp loc_9E536 loc_9E38B: mov rdi, [rbp+var_C70] mov eax, [rbp+var_C5C] add rdi, rax lea rsi, [rbp+var_C40] add rsi, 360h call _ma_base_info_read mov cl, [rbp+var_7F4] mov rax, [rbp+var_C50] mov [rax+1Dh], cl mov rdx, [rbp+var_520] and rdx, 800h xor eax, eax mov ecx, 1 cmp rdx, 0 cmovnz eax, ecx mov cl, al mov rax, [rbp+var_C50] mov [rax+1Ch], cl mov rax, [rbp+var_C50] movsx ecx, byte ptr [rax+1Dh] xor eax, eax cmp ecx, 0 mov [rbp+var_C71], al jz short loc_9E415 mov rax, [rbp+var_C50] movsx eax, byte ptr [rax+1Ch] cmp eax, 0 setnz al mov [rbp+var_C71], al loc_9E415: mov al, [rbp+var_C71] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_C50] mov [rax+1Fh], cl mov rcx, [rbp+var_8E0] mov rax, [rbp+var_C50] mov [rax], rcx movsx edx, [rbp+var_7F4] xor ecx, ecx mov eax, 0Dh cmp edx, 0 cmovnz ecx, eax add ecx, 1 add ecx, 1 add ecx, 2 mov rax, [rbp+var_C50] mov [rax+14h], ecx mov ecx, [rbp+var_824] mov rax, [rbp+var_C50] mov [rax+10h], ecx movzx ecx, [rbp+var_C2A] mov rax, [rbp+var_C50] mov [rax+18h], ecx mov rcx, [rbp+var_880] mov rax, [rbp+var_C50] mov [rax+20h], rcx mov eax, [rbp+var_810] mov cl, al mov rax, [rbp+var_C50] mov [rax+28h], cl mov edx, [rbp+var_818] and edx, 1 xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov cl, al mov rax, [rbp+var_C50] mov [rax+1Eh], cl movzx eax, [rbp+var_C2A] cmp eax, 3 jnz short loc_9E50E mov rax, [rbp+var_C50] mov eax, [rax+10h] sub eax, 4 mov ecx, 6 xor edx, edx div ecx mov [rbp+var_C60], eax mov eax, [rbp+var_C60] shl eax, 4 add eax, 1 mov eax, eax mov ecx, eax mov rax, [rbp+var_C50] mov [rax+8], rcx loc_9E50E: movzx eax, [rbp+var_C2A] cmp eax, 3 jz short loc_9E534 mov rax, [rbp+var_C50] movsx eax, byte ptr [rax+1Fh] cmp eax, 0 jz short loc_9E534 mov [rbp+var_C54], 82h loc_9E534: jmp short $+2 loc_9E536: mov rdi, [rbp+var_C70] call my_free mov eax, [rbp+var_C54] mov [rbp+var_C44], eax loc_9E54E: mov eax, [rbp+var_C44] mov [rbp+var_C78], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_9E57B mov eax, [rbp+var_C78] add rsp, 0C80h pop rbp retn loc_9E57B: call ___stack_chk_fail
long long aria_get_capabilities(unsigned int a1, long long a2) { int v2; // ecx bool v4; // [rsp+Fh] [rbp-C71h] const char *v5; // [rsp+10h] [rbp-C70h] long long v6; // [rsp+18h] [rbp-C68h] int v7; // [rsp+24h] [rbp-C5Ch] unsigned int v8; // [rsp+2Ch] [rbp-C54h] int v10; // [rsp+40h] [rbp-C40h] BYREF unsigned __int16 v11; // [rsp+44h] [rbp-C3Ch] unsigned __int16 v12; // [rsp+46h] [rbp-C3Ah] unsigned __int16 v13; // [rsp+4Ch] [rbp-C34h] unsigned __int8 v14; // [rsp+56h] [rbp-C2Ah] _QWORD v15[23]; // [rsp+3A0h] [rbp-8E0h] BYREF int v16; // [rsp+45Ch] [rbp-824h] int v17; // [rsp+468h] [rbp-818h] int v18; // [rsp+470h] [rbp-810h] char v19; // [rsp+48Ch] [rbp-7F4h] long long v20; // [rsp+760h] [rbp-520h] unsigned long long v21; // [rsp+C78h] [rbp-8h] v21 = __readfsqword(0x28u); v8 = 0; memset(a2, 0LL, 48LL); if ( my_pread(a1, &v10, 24LL, 0LL, 4LL) ) { return 130; } else if ( v10 == maria_file_magic ) { v20 = _byteswap_ushort(v11); v6 = _byteswap_ushort(v12); v7 = _byteswap_ushort(v13); v5 = (const char *)my_malloc(0LL, v6, 16LL); if ( v5 ) { if ( my_pread(a1, v5, v6, 0LL, 4LL) ) { v8 = *(_DWORD *)my_thread_var(a1, v5); } else { ma_base_info_read(&v5[v7], v15); *(_BYTE *)(a2 + 29) = v19; *(_BYTE *)(a2 + 28) = (v20 & 0x800) != 0; v4 = 0; if ( *(_BYTE *)(a2 + 29) ) v4 = *(_BYTE *)(a2 + 28) != 0; *(_BYTE *)(a2 + 31) = v4; *(_QWORD *)a2 = v15[0]; v2 = 0; if ( v19 ) v2 = 13; *(_DWORD *)(a2 + 20) = v2 + 4; *(_DWORD *)(a2 + 16) = v16; *(_DWORD *)(a2 + 24) = v14; *(_QWORD *)(a2 + 32) = v15[12]; *(_BYTE *)(a2 + 40) = v18; *(_BYTE *)(a2 + 30) = (v17 & 1) != 0; if ( v14 == 3 ) *(_QWORD *)(a2 + 8) = 16 * ((*(_DWORD *)(a2 + 16) - 4) / 6u) + 1; if ( v14 != 3 && *(_BYTE *)(a2 + 31) ) v8 = 130; } my_free(v5); return v8; } else { return 12; } } else { return 130; } }
aria_get_capabilities: PUSH RBP MOV RBP,RSP SUB RSP,0xc80 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc48],EDI MOV qword ptr [RBP + -0xc50],RSI MOV dword ptr [RBP + -0xc54],0x0 MOV dword ptr [RBP + -0xc58],0x18 MOV RDI,qword ptr [RBP + -0xc50] XOR ESI,ESI MOV EDX,0x30 CALL 0x0012a2a0 MOV EDI,dword ptr [RBP + -0xc48] LEA RSI,[RBP + -0xc40] MOV EAX,dword ptr [RBP + -0xc58] MOV EDX,EAX XOR EAX,EAX MOV ECX,EAX MOV R8D,0x4 CALL 0x001f6010 CMP RAX,0x0 JZ 0x0019e287 JMP 0x0019e278 LAB_0019e278: MOV dword ptr [RBP + -0xc44],0x82 JMP 0x0019e54e LAB_0019e287: LEA RAX,[RBP + -0xc40] LEA RCX,[0x3bf200] MOV ECX,dword ptr [RCX] MOV EAX,dword ptr [RAX] SUB EAX,ECX SETNZ AL MOVZX EAX,AL CMP EAX,0x0 JZ 0x0019e2b7 JMP 0x0019e2a8 LAB_0019e2a8: MOV dword ptr [RBP + -0xc44],0x82 JMP 0x0019e54e LAB_0019e2b7: MOVZX EAX,byte ptr [RBP + -0xc3b] MOVZX EAX,AX MOVZX ECX,byte ptr [RBP + -0xc3c] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV qword ptr [RBP + -0x520],RAX MOVZX EAX,byte ptr [RBP + -0xc39] MOVZX EAX,AX MOVZX ECX,byte ptr [RBP + -0xc3a] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV qword ptr [RBP + -0xc68],RAX MOVZX EAX,byte ptr [RBP + -0xc33] MOVZX EAX,AX MOVZX ECX,byte ptr [RBP + -0xc34] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0xc5c],EAX MOV RSI,qword ptr [RBP + -0xc68] XOR EDI,EDI MOV EDX,0x10 CALL 0x001f5210 MOV qword ptr [RBP + -0xc70],RAX CMP RAX,0x0 JNZ 0x0019e350 JMP 0x0019e341 LAB_0019e341: MOV dword ptr [RBP + -0xc44],0xc JMP 0x0019e54e LAB_0019e350: MOV EDI,dword ptr [RBP + -0xc48] MOV RSI,qword ptr [RBP + -0xc70] MOV RDX,qword ptr [RBP + -0xc68] XOR EAX,EAX MOV ECX,EAX MOV R8D,0x4 CALL 0x001f6010 CMP RAX,0x0 JZ 0x0019e38b CALL 0x001f7a70 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc54],EAX JMP 0x0019e536 LAB_0019e38b: MOV RDI,qword ptr [RBP + -0xc70] MOV EAX,dword ptr [RBP + -0xc5c] ADD RDI,RAX LEA RSI,[RBP + -0xc40] ADD RSI,0x360 CALL 0x0019e580 MOV CL,byte ptr [RBP + -0x7f4] MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1d],CL MOV RDX,qword ptr [RBP + -0x520] AND RDX,0x800 XOR EAX,EAX MOV ECX,0x1 CMP RDX,0x0 CMOVNZ EAX,ECX MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1c],CL MOV RAX,qword ptr [RBP + -0xc50] MOVSX ECX,byte ptr [RAX + 0x1d] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0xc71],AL JZ 0x0019e415 MOV RAX,qword ptr [RBP + -0xc50] MOVSX EAX,byte ptr [RAX + 0x1c] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0xc71],AL LAB_0019e415: MOV AL,byte ptr [RBP + -0xc71] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1f],CL MOV RCX,qword ptr [RBP + -0x8e0] MOV RAX,qword ptr [RBP + -0xc50] MOV qword ptr [RAX],RCX MOVSX EDX,byte ptr [RBP + -0x7f4] XOR ECX,ECX MOV EAX,0xd CMP EDX,0x0 CMOVNZ ECX,EAX ADD ECX,0x1 ADD ECX,0x1 ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0xc50] MOV dword ptr [RAX + 0x14],ECX MOV ECX,dword ptr [RBP + -0x824] MOV RAX,qword ptr [RBP + -0xc50] MOV dword ptr [RAX + 0x10],ECX MOVZX ECX,byte ptr [RBP + -0xc2a] MOV RAX,qword ptr [RBP + -0xc50] MOV dword ptr [RAX + 0x18],ECX MOV RCX,qword ptr [RBP + -0x880] MOV RAX,qword ptr [RBP + -0xc50] MOV qword ptr [RAX + 0x20],RCX MOV EAX,dword ptr [RBP + -0x810] MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x28],CL MOV EDX,dword ptr [RBP + -0x818] AND EDX,0x1 XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1e],CL MOVZX EAX,byte ptr [RBP + -0xc2a] CMP EAX,0x3 JNZ 0x0019e50e MOV RAX,qword ptr [RBP + -0xc50] MOV EAX,dword ptr [RAX + 0x10] SUB EAX,0x4 MOV ECX,0x6 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0xc60],EAX MOV EAX,dword ptr [RBP + -0xc60] SHL EAX,0x4 ADD EAX,0x1 MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xc50] MOV qword ptr [RAX + 0x8],RCX LAB_0019e50e: MOVZX EAX,byte ptr [RBP + -0xc2a] CMP EAX,0x3 JZ 0x0019e534 MOV RAX,qword ptr [RBP + -0xc50] MOVSX EAX,byte ptr [RAX + 0x1f] CMP EAX,0x0 JZ 0x0019e534 MOV dword ptr [RBP + -0xc54],0x82 LAB_0019e534: JMP 0x0019e536 LAB_0019e536: MOV RDI,qword ptr [RBP + -0xc70] CALL 0x001f5590 MOV EAX,dword ptr [RBP + -0xc54] MOV dword ptr [RBP + -0xc44],EAX LAB_0019e54e: MOV EAX,dword ptr [RBP + -0xc44] MOV dword ptr [RBP + -0xc78],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0019e57b MOV EAX,dword ptr [RBP + -0xc78] ADD RSP,0xc80 POP RBP RET LAB_0019e57b: CALL 0x0012a250
int4 aria_get_capabilities(int4 param_1,int8 *param_2) { long lVar1; long lVar2; int4 *puVar3; int iVar4; long in_FS_OFFSET; bool local_c79; int4 local_c5c; int4 local_c4c; int local_c48; int1 local_c44; int1 local_c43; int1 local_c42; int1 local_c41; int1 local_c3c; int1 local_c3b; byte local_c32; int8 local_8e8 [12]; int8 local_888; int4 local_82c; uint local_820; int1 local_818; char local_7fc; ulong local_528; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c5c = 0; memset(param_2,0,0x30); lVar1 = my_pread(param_1,&local_c48,0x18,0,4); if (lVar1 == 0) { if (local_c48 == maria_file_magic) { local_528 = (ulong)CONCAT11(local_c44,local_c43); lVar1 = my_malloc(0,CONCAT11(local_c42,local_c41),0x10); if (lVar1 == 0) { local_c4c = 0xc; } else { lVar2 = my_pread(param_1,lVar1,CONCAT11(local_c42,local_c41),0,4); if (lVar2 == 0) { _ma_base_info_read(lVar1 + (ulong)CONCAT11(local_c3c,local_c3b),local_8e8); *(char *)((long)param_2 + 0x1d) = local_7fc; *(bool *)((long)param_2 + 0x1c) = (local_528 & 0x800) != 0; local_c79 = false; if (*(char *)((long)param_2 + 0x1d) != '\0') { local_c79 = *(char *)((long)param_2 + 0x1c) != '\0'; } *(bool *)((long)param_2 + 0x1f) = local_c79; *param_2 = local_8e8[0]; iVar4 = 0; if (local_7fc != '\0') { iVar4 = 0xd; } *(int *)((long)param_2 + 0x14) = iVar4 + 4; *(int4 *)(param_2 + 2) = local_82c; *(uint *)(param_2 + 3) = (uint)local_c32; param_2[4] = local_888; *(int1 *)(param_2 + 5) = local_818; *(bool *)((long)param_2 + 0x1e) = (local_820 & 1) != 0; if (local_c32 == 3) { param_2[1] = (ulong)(((*(int *)(param_2 + 2) - 4U) / 6) * 0x10 + 1); } else if (*(char *)((long)param_2 + 0x1f) != '\0') { local_c5c = 0x82; } } else { puVar3 = (int4 *)_my_thread_var(); local_c5c = *puVar3; } my_free(lVar1); local_c4c = local_c5c; } } else { local_c4c = 0x82; } } else { local_c4c = 0x82; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_c4c; }
45,475
testing::internal::UniversalTersePrinter<wchar_t const*>::Print(wchar_t const*, std::ostream*)
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/include/gtest/gtest-printers.h
static void Print(const wchar_t* str, ::std::ostream* os) { if (str == nullptr) { *os << "NULL"; } else { UniversalPrint(::std::wstring(str), os); } }
O3
c
testing::internal::UniversalTersePrinter<wchar_t const*>::Print(wchar_t const*, std::ostream*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx testq %rdi, %rdi je 0x3c574 movq %rdi, %r14 leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) callq 0x93f0 leaq (%r14,%rax,4), %rdx leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x3c5ba movq (%r15), %rdi movq 0x8(%r15), %rsi movq %rbx, %rdx callq 0x1c342 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3c568 movq 0x18(%rsp), %rax leaq 0x4(,%rax,4), %rsi callq 0x94c0 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x4251(%rip), %rsi # 0x407cc movl $0x4, %edx movq %rbx, %rdi addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x95a0 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3c5b2 movq 0x18(%rsp), %rax leaq 0x4(,%rax,4), %rsi callq 0x94c0 movq %rbx, %rdi callq 0x99a0
_ZN7testing8internal21UniversalTersePrinterIPKwE5PrintES3_PSo: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rsi test rdi, rdi jz short loc_3C574 mov r14, rdi lea r12, [rsp+48h+var_30] mov [r12-10h], r12 call _wcslen lea rdx, [r14+rax*4] lea r15, [rsp+48h+var_40] mov rdi, r15 mov rsi, r14 call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag; std::wstring::_M_construct<wchar_t const*>(wchar_t const*,wchar_t const*,std::forward_iterator_tag) mov rdi, [r15] mov rsi, [r15+8] mov rdx, rbx call _ZN7testing8internalL20PrintCharsAsStringToIwEENS0_10CharFormatEPKT_mPSo; testing::internal::PrintCharsAsStringTo<wchar_t>(wchar_t const*,ulong,std::ostream *) mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_3C568 mov rax, [rsp+48h+var_30] lea rsi, ds:4[rax*4]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3C568: add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_3C574: lea rsi, aNull_0; "NULL" mov edx, 4 mov rdi, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_3C5B2 mov rax, [rsp+arg_10] lea rsi, ds:4[rax*4]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3C5B2: mov rdi, rbx call __Unwind_Resume
void testing::internal::UniversalTersePrinter<wchar_t const*>::Print(long long a1, long long a2) { long long v2; // rax void *v3[2]; // [rsp+8h] [rbp-40h] BYREF _QWORD v4[6]; // [rsp+18h] [rbp-30h] BYREF if ( a1 ) { v3[0] = v4; v2 = wcslen(a1); std::wstring::_M_construct<wchar_t const*>(v3, a1, a1 + 4 * v2); testing::internal::PrintCharsAsStringTo<wchar_t>((long long)v3[0], (long long)v3[1], a2); if ( v3[0] != v4 ) operator delete(v3[0], 4LL * v4[0] + 4); } else { std::__ostream_insert<char,std::char_traits<char>>(a2, "NULL", 4LL); } }
Print: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RSI TEST RDI,RDI JZ 0x0013c574 MOV R14,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 CALL 0x001093f0 LEA RDX,[R14 + RAX*0x4] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 CALL 0x0013c5ba MOV RDI,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x8] LAB_0013c544: MOV RDX,RBX CALL 0x0011c342 LAB_0013c54c: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0013c568 MOV RAX,qword ptr [RSP + 0x18] LEA RSI,[0x4 + RAX*0x4] CALL 0x001094c0 LAB_0013c568: ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_0013c574: LEA RSI,[0x1407cc] MOV EDX,0x4 MOV RDI,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 JMP 0x001095a0
/* testing::internal::UniversalTersePrinter<wchar_t const*>::Print(wchar_t const*, std::ostream*) */ void testing::internal::UniversalTersePrinter<wchar_t_const*>::Print (wchar_t *param_1,ostream *param_2) { size_t sVar1; wchar_t *local_40; ulong local_38; long local_30 [2]; if (param_1 != (wchar_t *)0x0) { local_40 = (wchar_t *)local_30; sVar1 = wcslen(param_1); std::__cxx11::wstring::_M_construct<wchar_t_const*>(&local_40,param_1,param_1 + sVar1); /* try { // try from 0013c544 to 0013c54b has its CatchHandler @ 0013c593 */ PrintCharsAsStringTo<wchar_t>(local_40,local_38,param_2); if (local_40 != (wchar_t *)local_30) { operator_delete(local_40,local_30[0] * 4 + 4); } return; } std::__ostream_insert<char,std::char_traits<char>>(param_2,"NULL",4); return; }
45,476
my_strnncoll_simple
eloqsql/strings/ctype-simple.c
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } /* We can't use (slen - tlen) here as the result may be outside of the precision of a signed int */ return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; }
O3
c
my_strnncoll_simple: pushq %rbp movq %rsp, %rbp cmpq %r8, %rdx movq %r8, %r10 cmovbq %rdx, %r10 movq 0x58(%rdi), %rdi testb %r9b, %r9b cmovneq %r10, %rdx xorl %r9d, %r9d cmpq %r9, %r10 je 0x36ff6 movzbl (%rsi,%r9), %eax movzbl (%rdi,%rax), %eax movzbl (%rcx,%r9), %r11d movzbl (%rdi,%r11), %r11d incq %r9 cmpb %r11b, %al je 0x36fd1 subl %r11d, %eax jmp 0x37008 xorl %ecx, %ecx cmpq %r8, %rdx sbbl %ecx, %ecx cmpq %r8, %rdx movl $0x1, %eax cmovbel %ecx, %eax popq %rbp retq
my_strnncoll_simple: push rbp mov rbp, rsp cmp rdx, r8 mov r10, r8 cmovb r10, rdx mov rdi, [rdi+58h] test r9b, r9b cmovnz rdx, r10 xor r9d, r9d loc_36FD1: cmp r10, r9 jz short loc_36FF6 movzx eax, byte ptr [rsi+r9] movzx eax, byte ptr [rdi+rax] movzx r11d, byte ptr [rcx+r9] movzx r11d, byte ptr [rdi+r11] inc r9 cmp al, r11b jz short loc_36FD1 sub eax, r11d jmp short loc_37008 loc_36FF6: xor ecx, ecx cmp rdx, r8 sbb ecx, ecx cmp rdx, r8 mov eax, 1 cmovbe eax, ecx loc_37008: pop rbp retn
long long my_strnncoll_simple( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, char a6) { unsigned long long v6; // r10 long long v7; // rdi long long v8; // r9 int v9; // eax int v10; // r11d long long result; // rax v6 = a5; if ( a3 < a5 ) v6 = a3; v7 = *(_QWORD *)(a1 + 88); if ( a6 ) a3 = v6; v8 = 0LL; while ( v6 != v8 ) { v9 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a2 + v8)); v10 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a4 + v8++)); if ( (_BYTE)v9 != (_BYTE)v10 ) return (unsigned int)(v9 - v10); } result = 1LL; if ( a3 <= a5 ) return (unsigned int)-(a3 < a5); return result; }
my_strnncoll_simple: PUSH RBP MOV RBP,RSP CMP RDX,R8 MOV R10,R8 CMOVC R10,RDX MOV RDI,qword ptr [RDI + 0x58] TEST R9B,R9B CMOVNZ RDX,R10 XOR R9D,R9D LAB_00136fd1: CMP R10,R9 JZ 0x00136ff6 MOVZX EAX,byte ptr [RSI + R9*0x1] MOVZX EAX,byte ptr [RDI + RAX*0x1] MOVZX R11D,byte ptr [RCX + R9*0x1] MOVZX R11D,byte ptr [RDI + R11*0x1] INC R9 CMP AL,R11B JZ 0x00136fd1 SUB EAX,R11D JMP 0x00137008 LAB_00136ff6: XOR ECX,ECX CMP RDX,R8 SBB ECX,ECX CMP RDX,R8 MOV EAX,0x1 CMOVBE EAX,ECX LAB_00137008: POP RBP RET
int my_strnncoll_simple(long param_1,long param_2,ulong param_3,long param_4,ulong param_5, char param_6) { byte bVar1; byte bVar2; ulong uVar3; ulong uVar4; uVar4 = param_5; if (param_3 < param_5) { uVar4 = param_3; } if (param_6 != '\0') { param_3 = uVar4; } uVar3 = 0; do { if (uVar4 == uVar3) { if (param_5 < param_3) { return 1; } return -(uint)(param_3 < param_5); } bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar3)); bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar3)); uVar3 = uVar3 + 1; } while (bVar1 == bVar2); return (uint)bVar1 - (uint)bVar2; }
45,477
JS_SetModuleExportList
bluesky950520[P]quickjs/quickjs.c
int JS_SetModuleExportList(JSContext *ctx, JSModuleDef *m, const JSCFunctionListEntry *tab, int len) { int i; JSValue val; for(i = 0; i < len; i++) { const JSCFunctionListEntry *e = &tab[i]; switch(e->def_type) { case JS_DEF_CFUNC: val = JS_NewCFunction2(ctx, e->u.func.cfunc.generic, e->name, e->u.func.length, e->u.func.cproto, e->magic); break; case JS_DEF_PROP_STRING: /* `e->u.str` may be pure ASCII or UTF-8 encoded */ val = JS_NewString(ctx, e->u.str); break; case JS_DEF_PROP_INT32: val = js_int32(e->u.i32); break; case JS_DEF_PROP_INT64: val = js_int64(e->u.i64); break; case JS_DEF_PROP_DOUBLE: val = js_float64(e->u.f64); break; case JS_DEF_OBJECT: val = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, val, e->u.prop_list.tab, e->u.prop_list.len); break; default: abort(); } if (JS_SetModuleExport(ctx, m, e->name, val)) return -1; } return 0; }
O1
c
JS_SetModuleExportList: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, 0x20(%rsp) testl %ecx, %ecx jle 0x331f0 movq %rdx, %rbx movq %rdi, %r15 leaq 0x48(%rdi), %rax movq %rax, 0x18(%rsp) movl %ecx, %ebp shlq $0x5, %rbp xorl %r14d, %r14d movzbl 0x9(%rbx,%r14), %eax cmpq $0x8, %rax ja 0x33208 leaq 0x697a8(%rip), %rcx # 0x9c894 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq (%rbx,%r14), %rdx movq 0x18(%rbx,%r14), %rsi movzbl 0x10(%rbx,%r14), %ecx movzbl 0x11(%rbx,%r14), %r8d movswl 0xa(%rbx,%r14), %r9d movq 0x18(%rsp), %rax movupd (%rax), %xmm0 movupd %xmm0, (%rsp) movq %r15, %rdi callq 0x21006 jmp 0x33153 movq 0x10(%rbx,%r14), %r12 movl $0x7, %r13d jmp 0x331c8 movq 0x10(%rbx,%r14), %r12 movq %r12, %rdi callq 0xe240 movq %r15, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x1ff07 movq %rax, %r12 movq %rdx, %r13 jmp 0x331c8 movq 0x40(%r15), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %r15, %rdi movl $0x1, %ecx callq 0x20f05 movq %rax, %r12 movq %rdx, %r13 movq 0x10(%rbx,%r14), %rcx movl 0x18(%rbx,%r14), %r8d movq %r15, %rdi movq %rax, %rsi callq 0x32c67 jmp 0x331c8 movl 0x10(%rbx,%r14), %r12d xorl %r13d, %r13d jmp 0x331c8 movq 0x10(%rbx,%r14), %rax movslq %eax, %rcx cmpq %rax, %rcx xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movl %ecx, %eax movq %xmm0, %r12 cmoveq %rax, %r12 movl $0x7, %r13d movl $0x0, %eax cmoveq %rax, %r13 movq (%rbx,%r14), %rdx movq %r15, %rdi movq 0x20(%rsp), %rsi movq %r12, %rcx movq %r13, %r8 callq 0x30a3c testl %eax, %eax jne 0x331f4 addq $0x20, %r14 cmpq %r14, %rbp jne 0x330d5 xorl %eax, %eax jmp 0x331f9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xe090
JS_SetModuleExportList: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rsp+58h+var_38], rsi test ecx, ecx jle loc_331F0 mov rbx, rdx mov r15, rdi lea rax, [rdi+48h] mov [rsp+58h+var_40], rax mov ebp, ecx shl rbp, 5 xor r14d, r14d loc_330D5: movzx eax, byte ptr [rbx+r14+9] cmp rax, 8; switch 9 cases ja def_330F3; jumptable 00000000000330F3 default case, cases 1,2,7 lea rcx, jpt_330F3 movsxd rax, ds:(jpt_330F3 - 9C894h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_330F5: mov rdx, [rbx+r14]; jumptable 00000000000330F3 case 0 mov rsi, [rbx+r14+18h] movzx ecx, byte ptr [rbx+r14+10h] movzx r8d, byte ptr [rbx+r14+11h] movsx r9d, word ptr [rbx+r14+0Ah] mov rax, [rsp+58h+var_40] movupd xmm0, xmmword ptr [rax] movupd [rsp+58h+var_58], xmm0 mov rdi, r15 call JS_NewCFunction3 jmp short loc_33153 loc_33128: mov r12, [rbx+r14+10h]; jumptable 00000000000330F3 case 6 mov r13d, 7 jmp loc_331C8 loc_33138: mov r12, [rbx+r14+10h]; jumptable 00000000000330F3 case 3 mov rdi, r12 call _strlen mov rdi, r15 mov rsi, r12 mov rdx, rax call JS_NewStringLen loc_33153: mov r12, rax mov r13, rdx jmp short loc_331C8 loc_3315B: mov rax, [r15+40h]; jumptable 00000000000330F3 case 8 mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, r15 mov ecx, 1 call JS_NewObjectProtoClass mov r12, rax mov r13, rdx mov rcx, [rbx+r14+10h] mov r8d, [rbx+r14+18h] mov rdi, r15 mov rsi, rax call JS_SetPropertyFunctionList jmp short loc_331C8 loc_33191: mov r12d, [rbx+r14+10h]; jumptable 00000000000330F3 case 4 xor r13d, r13d jmp short loc_331C8 loc_3319B: mov rax, [rbx+r14+10h]; jumptable 00000000000330F3 case 5 movsxd rcx, eax cmp rcx, rax xorps xmm0, xmm0 cvtsi2sd xmm0, rax mov eax, ecx movq r12, xmm0 cmovz r12, rax mov r13d, 7 mov eax, 0 cmovz r13, rax loc_331C8: mov rdx, [rbx+r14] mov rdi, r15 mov rsi, [rsp+58h+var_38] mov rcx, r12 mov r8, r13 call JS_SetModuleExport test eax, eax jnz short loc_331F4 add r14, 20h ; ' ' cmp rbp, r14 jnz loc_330D5 loc_331F0: xor eax, eax jmp short loc_331F9 loc_331F4: mov eax, 0FFFFFFFFh loc_331F9: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn def_330F3: call _abort; jumptable 00000000000330F3 default case, cases 1,2,7
long long JS_SetModuleExportList( const char *a1, long long a2, long long a3, int a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v13; // r15 long long v14; // rbp long long v15; // r14 long long v16; // rax long long v17; // rdx double v18; // r12 long long v19; // r13 char *v20; // r12 long long v21; // rax long long v22; // rdx double v23; // xmm4_8 double v24; // xmm5_8 long long v25; // rax long long *v27; // [rsp+18h] [rbp-40h] if ( a4 <= 0 ) return 0LL; v13 = (long long)a1; v27 = (long long *)(a1 + 72); v14 = 32LL * (unsigned int)a4; v15 = 0LL; while ( 1 ) { switch ( *(_BYTE *)(a3 + v15 + 9) ) { case 0: a5 = *(__m128 *)v27; v16 = JS_NewCFunction3( (_DWORD *)v13, *(_QWORD *)(a3 + v15 + 24), *(unsigned __int8 **)(a3 + v15), *(unsigned __int8 *)(a3 + v15 + 16), *(unsigned __int8 *)(a3 + v15 + 17), *(_WORD *)(a3 + v15 + 10), *v27, v27[1]); goto LABEL_7; case 3: v20 = *(char **)(a3 + v15 + 16); v21 = strlen(v20); v16 = (long long)JS_NewStringLen(v13, v20, v21); LABEL_7: v18 = *(double *)&v16; v19 = v17; break; case 4: *(_QWORD *)&v18 = *(unsigned int *)(a3 + v15 + 16); v19 = 0LL; break; case 5: v25 = *(_QWORD *)(a3 + v15 + 16); *(double *)a5.m128_u64 = (double)(int)v25; v18 = (double)(int)v25; if ( (int)v25 == v25 ) *(_QWORD *)&v18 = (unsigned int)v25; v19 = 7LL; if ( (int)v25 == v25 ) v19 = 0LL; break; case 6: v18 = *(double *)(a3 + v15 + 16); v19 = 7LL; break; case 8: v18 = COERCE_DOUBLE( JS_NewObjectProtoClass( v13, *(_QWORD *)(*(_QWORD *)(v13 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(v13 + 64) + 24LL), 1u)); v19 = v22; JS_SetPropertyFunctionList( v13, *(unsigned long long *)&v18, v22, *(const char ***)(a3 + v15 + 16), *(_DWORD *)(a3 + v15 + 24), *(double *)a5.m128_u64, a6, a7, a8, v23, v24, a11, a12); break; default: abort(a1); } a1 = (const char *)v13; if ( (unsigned int)JS_SetModuleExport(v13, a2, *(unsigned __int8 **)(a3 + v15), *(_DWORD **)&v18, v19) ) return 0xFFFFFFFFLL; v15 += 32LL; if ( v14 == v15 ) return 0LL; } }
JS_SetModuleExportList: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RSI TEST ECX,ECX JLE 0x001331f0 MOV RBX,RDX MOV R15,RDI LEA RAX,[RDI + 0x48] MOV qword ptr [RSP + 0x18],RAX MOV EBP,ECX SHL RBP,0x5 XOR R14D,R14D LAB_001330d5: MOVZX EAX,byte ptr [RBX + R14*0x1 + 0x9] CMP RAX,0x8 JA 0x00133208 LEA RCX,[0x19c894] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RDX,qword ptr [RBX + R14*0x1] MOV RSI,qword ptr [RBX + R14*0x1 + 0x18] MOVZX ECX,byte ptr [RBX + R14*0x1 + 0x10] MOVZX R8D,byte ptr [RBX + R14*0x1 + 0x11] MOVSX R9D,word ptr [RBX + R14*0x1 + 0xa] MOV RAX,qword ptr [RSP + 0x18] MOVUPD XMM0,xmmword ptr [RAX] MOVUPD xmmword ptr [RSP],XMM0 MOV RDI,R15 CALL 0x00121006 JMP 0x00133153 caseD_6: MOV R12,qword ptr [RBX + R14*0x1 + 0x10] MOV R13D,0x7 JMP 0x001331c8 caseD_3: MOV R12,qword ptr [RBX + R14*0x1 + 0x10] MOV RDI,R12 CALL 0x0010e240 MOV RDI,R15 MOV RSI,R12 MOV RDX,RAX CALL 0x0011ff07 LAB_00133153: MOV R12,RAX MOV R13,RDX JMP 0x001331c8 caseD_8: MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,R15 MOV ECX,0x1 CALL 0x00120f05 MOV R12,RAX MOV R13,RDX MOV RCX,qword ptr [RBX + R14*0x1 + 0x10] MOV R8D,dword ptr [RBX + R14*0x1 + 0x18] MOV RDI,R15 MOV RSI,RAX CALL 0x00132c67 JMP 0x001331c8 caseD_4: MOV R12D,dword ptr [RBX + R14*0x1 + 0x10] XOR R13D,R13D JMP 0x001331c8 caseD_5: MOV RAX,qword ptr [RBX + R14*0x1 + 0x10] MOVSXD RCX,EAX CMP RCX,RAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MOV EAX,ECX MOVQ R12,XMM0 CMOVZ R12,RAX MOV R13D,0x7 MOV EAX,0x0 CMOVZ R13,RAX LAB_001331c8: MOV RDX,qword ptr [RBX + R14*0x1] MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x20] MOV RCX,R12 MOV R8,R13 CALL 0x00130a3c TEST EAX,EAX JNZ 0x001331f4 ADD R14,0x20 CMP RBP,R14 JNZ 0x001330d5 LAB_001331f0: XOR EAX,EAX JMP 0x001331f9 LAB_001331f4: MOV EAX,0xffffffff LAB_001331f9: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET caseD_1: CALL 0x0010e090
int8 JS_SetModuleExportList(long param_1,int8 param_2,long param_3,uint param_4) { char *__s; ulong uVar1; int iVar2; size_t sVar3; double dVar4; long lVar5; bool bVar6; int1 auVar7 [16]; if (0 < (int)param_4) { lVar5 = 0; do { switch(*(int1 *)(param_3 + 9 + lVar5)) { case 0: auVar7 = JS_NewCFunction3(param_1,*(int8 *)(param_3 + 0x18 + lVar5), *(int8 *)(param_3 + lVar5), *(int1 *)(param_3 + 0x10 + lVar5), *(int1 *)(param_3 + 0x11 + lVar5), (int)*(short *)(param_3 + 10 + lVar5), *(int4 *)(param_1 + 0x48),*(int4 *)(param_1 + 0x50)); break; default: /* WARNING: Subroutine does not return */ abort(); case 3: __s = *(char **)(param_3 + 0x10 + lVar5); sVar3 = strlen(__s); auVar7 = JS_NewStringLen(param_1,__s,sVar3); break; case 4: auVar7 = ZEXT416(*(uint *)(param_3 + 0x10 + lVar5)); break; case 5: uVar1 = *(ulong *)(param_3 + 0x10 + lVar5); bVar6 = (long)(int)uVar1 == uVar1; dVar4 = (double)(long)uVar1; if (bVar6) { dVar4 = (double)(uVar1 & 0xffffffff); } auVar7._8_8_ = 7; auVar7._0_8_ = dVar4; if (bVar6) { auVar7._8_8_ = 0; } break; case 6: auVar7._8_8_ = 7; auVar7._0_8_ = *(int8 *)(param_3 + 0x10 + lVar5); break; case 8: auVar7 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); JS_SetPropertyFunctionList (param_1,auVar7._0_8_,auVar7._8_8_,*(int8 *)(param_3 + 0x10 + lVar5), *(int4 *)(param_3 + 0x18 + lVar5)); } iVar2 = JS_SetModuleExport(param_1,param_2,*(int8 *)(param_3 + lVar5),auVar7._0_8_, auVar7._8_8_); if (iVar2 != 0) { return 0xffffffff; } lVar5 = lVar5 + 0x20; } while ((ulong)param_4 << 5 != lVar5); } return 0; }
45,478
JS_SetModuleExportList
bluesky950520[P]quickjs/quickjs.c
int JS_SetModuleExportList(JSContext *ctx, JSModuleDef *m, const JSCFunctionListEntry *tab, int len) { int i; JSValue val; for(i = 0; i < len; i++) { const JSCFunctionListEntry *e = &tab[i]; switch(e->def_type) { case JS_DEF_CFUNC: val = JS_NewCFunction2(ctx, e->u.func.cfunc.generic, e->name, e->u.func.length, e->u.func.cproto, e->magic); break; case JS_DEF_PROP_STRING: /* `e->u.str` may be pure ASCII or UTF-8 encoded */ val = JS_NewString(ctx, e->u.str); break; case JS_DEF_PROP_INT32: val = js_int32(e->u.i32); break; case JS_DEF_PROP_INT64: val = js_int64(e->u.i64); break; case JS_DEF_PROP_DOUBLE: val = js_float64(e->u.f64); break; case JS_DEF_OBJECT: val = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, val, e->u.prop_list.tab, e->u.prop_list.len); break; default: abort(); } if (JS_SetModuleExport(ctx, m, e->name, val)) return -1; } return 0; }
O2
c
JS_SetModuleExportList: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, 0x8(%rsp) movq %rdi, %r13 xorl %eax, %eax testl %ecx, %ecx cmovlel %eax, %ecx shlq $0x5, %rcx addq $0x20, %rcx movq %rcx, 0x10(%rsp) xorl %r14d, %r14d movq %r14, %r12 addq $0x20, %r14 cmpq %r14, 0x10(%rsp) je 0x2c8aa movzbl 0x9(%r15,%r12), %eax cmpq $0x8, %rax ja 0x2c8bb leaq 0x57033(%rip), %rcx # 0x83834 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq (%r15,%r12), %rdx movq 0x18(%r15,%r12), %rsi movzbl 0x10(%r15,%r12), %ecx movzbl 0x11(%r15,%r12), %r8d movswl 0xa(%r15,%r12), %r9d movq %r13, %rdi callq 0x1b2dd jmp 0x2c880 movq 0x10(%r15,%r12), %rbp pushq $0x7 popq %rbx jmp 0x2c886 movq 0x10(%r15,%r12), %rsi movq %r13, %rdi callq 0x2c8c0 jmp 0x2c880 movq %r13, %rdi callq 0x1b2c9 movq %rax, %rbp movq %rdx, %rbx movq 0x10(%r15,%r12), %rcx movl 0x18(%r15,%r12), %r8d movq %r13, %rdi movq %rax, %rsi callq 0x2c3ff jmp 0x2c886 movl 0x10(%r15,%r12), %ebp xorl %ebx, %ebx jmp 0x2c886 movq 0x10(%r15,%r12), %rdi callq 0x20a0b movq %rax, %rbp movq %rdx, %rbx movq (%r15,%r12), %rdx movq %r13, %rdi movq 0x8(%rsp), %rsi movq %rbp, %rcx movq %rbx, %r8 callq 0x2909b testl %eax, %eax je 0x2c7d8 pushq $-0x1 popq %rax jmp 0x2c8ac xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xe090
JS_SetModuleExportList: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov [rsp+48h+var_40], rsi mov r13, rdi xor eax, eax test ecx, ecx cmovle ecx, eax shl rcx, 5 add rcx, 20h ; ' ' mov [rsp+48h+var_38], rcx xor r14d, r14d loc_2C7D8: mov r12, r14 add r14, 20h ; ' ' cmp [rsp+48h+var_38], r14 jz loc_2C8AA movzx eax, byte ptr [r15+r12+9] cmp rax, 8; switch 9 cases ja def_2C808; jumptable 000000000002C808 default case, cases 1,2,7 lea rcx, jpt_2C808 movsxd rax, ds:(jpt_2C808 - 83834h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2C80A: mov rdx, [r15+r12]; jumptable 000000000002C808 case 0 mov rsi, [r15+r12+18h] movzx ecx, byte ptr [r15+r12+10h] movzx r8d, byte ptr [r15+r12+11h] movsx r9d, word ptr [r15+r12+0Ah] mov rdi, r13 call JS_NewCFunction2 jmp short loc_2C880 loc_2C82F: mov rbp, [r15+r12+10h]; jumptable 000000000002C808 case 6 push 7 pop rbx jmp short loc_2C886 loc_2C839: mov rsi, [r15+r12+10h]; jumptable 000000000002C808 case 3 mov rdi, r13 call JS_NewString_0 jmp short loc_2C880 loc_2C848: mov rdi, r13; jumptable 000000000002C808 case 8 call JS_NewObject mov rbp, rax mov rbx, rdx mov rcx, [r15+r12+10h] mov r8d, [r15+r12+18h] mov rdi, r13 mov rsi, rax call JS_SetPropertyFunctionList jmp short loc_2C886 loc_2C86D: mov ebp, [r15+r12+10h]; jumptable 000000000002C808 case 4 xor ebx, ebx jmp short loc_2C886 loc_2C876: mov rdi, [r15+r12+10h]; jumptable 000000000002C808 case 5 call js_int64 loc_2C880: mov rbp, rax mov rbx, rdx loc_2C886: mov rdx, [r15+r12] mov rdi, r13 mov rsi, [rsp+48h+var_40] mov rcx, rbp mov r8, rbx call JS_SetModuleExport test eax, eax jz loc_2C7D8 push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_2C8AC loc_2C8AA: xor eax, eax loc_2C8AC: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn def_2C808: call _abort; jumptable 000000000002C808 default case, cases 1,2,7
long long JS_SetModuleExportList( const char *a1, long long a2, long long a3, long long a4, double a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { const char *v13; // r13 long long v14; // r14 long long v15; // r12 long long v16; // rax long long v17; // rdx long long v18; // rbp long long v19; // rbx long long v20; // rdx double v21; // xmm4_8 double v22; // xmm5_8 long long v24; // [rsp+10h] [rbp-38h] v13 = a1; if ( (int)a4 <= 0 ) a4 = 0LL; v24 = 32 * a4 + 32; v14 = 0LL; while ( 1 ) { v15 = v14; v14 += 32LL; if ( v24 == v14 ) return 0LL; switch ( *(_BYTE *)(a3 + v15 + 9) ) { case 0: v16 = JS_NewCFunction2( (long long)v13, *(_QWORD *)(a3 + v15 + 24), *(_QWORD *)(a3 + v15), *(unsigned __int8 *)(a3 + v15 + 16), *(unsigned __int8 *)(a3 + v15 + 17), *(__int16 *)(a3 + v15 + 10)); goto LABEL_12; case 3: v16 = JS_NewString_0(v13, *(_QWORD *)(a3 + v15 + 16)); goto LABEL_12; case 4: v18 = *(unsigned int *)(a3 + v15 + 16); v19 = 0LL; break; case 5: v16 = js_int64(*(_QWORD *)(a3 + v15 + 16)); LABEL_12: v18 = v16; v19 = v17; break; case 6: v18 = *(_QWORD *)(a3 + v15 + 16); v19 = 7LL; break; case 8: v18 = JS_NewObject((long long)v13); v19 = v20; JS_SetPropertyFunctionList( v13, v18, v20, *(const char ***)(a3 + v15 + 16), *(_DWORD *)(a3 + v15 + 24), a5, a6, a7, a8, v21, v22, a11, a12); break; default: abort(a1); } a1 = v13; if ( (unsigned int)JS_SetModuleExport((long long)v13, a2, *(unsigned __int8 **)(a3 + v15), v18, v19) ) return -1LL; } }
JS_SetModuleExportList: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV qword ptr [RSP + 0x8],RSI MOV R13,RDI XOR EAX,EAX TEST ECX,ECX CMOVLE ECX,EAX SHL RCX,0x5 ADD RCX,0x20 MOV qword ptr [RSP + 0x10],RCX XOR R14D,R14D LAB_0012c7d8: MOV R12,R14 ADD R14,0x20 CMP qword ptr [RSP + 0x10],R14 JZ 0x0012c8aa MOVZX EAX,byte ptr [R15 + R12*0x1 + 0x9] CMP RAX,0x8 JA 0x0012c8bb LEA RCX,[0x183834] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RDX,qword ptr [R15 + R12*0x1] MOV RSI,qword ptr [R15 + R12*0x1 + 0x18] MOVZX ECX,byte ptr [R15 + R12*0x1 + 0x10] MOVZX R8D,byte ptr [R15 + R12*0x1 + 0x11] MOVSX R9D,word ptr [R15 + R12*0x1 + 0xa] MOV RDI,R13 CALL 0x0011b2dd JMP 0x0012c880 caseD_6: MOV RBP,qword ptr [R15 + R12*0x1 + 0x10] PUSH 0x7 POP RBX JMP 0x0012c886 caseD_3: MOV RSI,qword ptr [R15 + R12*0x1 + 0x10] MOV RDI,R13 CALL 0x0012c8c0 JMP 0x0012c880 caseD_8: MOV RDI,R13 CALL 0x0011b2c9 MOV RBP,RAX MOV RBX,RDX MOV RCX,qword ptr [R15 + R12*0x1 + 0x10] MOV R8D,dword ptr [R15 + R12*0x1 + 0x18] MOV RDI,R13 MOV RSI,RAX CALL 0x0012c3ff JMP 0x0012c886 caseD_4: MOV EBP,dword ptr [R15 + R12*0x1 + 0x10] XOR EBX,EBX JMP 0x0012c886 caseD_5: MOV RDI,qword ptr [R15 + R12*0x1 + 0x10] CALL 0x00120a0b LAB_0012c880: MOV RBP,RAX MOV RBX,RDX LAB_0012c886: MOV RDX,qword ptr [R15 + R12*0x1] MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x8] MOV RCX,RBP MOV R8,RBX CALL 0x0012909b TEST EAX,EAX JZ 0x0012c7d8 PUSH -0x1 POP RAX JMP 0x0012c8ac LAB_0012c8aa: XOR EAX,EAX LAB_0012c8ac: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET caseD_1: CALL 0x0010e090
int8 JS_SetModuleExportList(int8 param_1,int8 param_2,long param_3,uint param_4) { int iVar1; ulong uVar2; long lVar3; int1 auVar4 [16]; uVar2 = (ulong)param_4; if ((int)param_4 < 1) { uVar2 = 0; } lVar3 = 0; do { if (uVar2 * 0x20 + 0x20 == lVar3 + 0x20) { return 0; } switch(*(int1 *)(param_3 + 9 + lVar3)) { case 0: auVar4 = JS_NewCFunction2(param_1,*(int8 *)(param_3 + 0x18 + lVar3), *(int8 *)(param_3 + lVar3), *(int1 *)(param_3 + 0x10 + lVar3), *(int1 *)(param_3 + 0x11 + lVar3), (int)*(short *)(param_3 + 10 + lVar3)); break; default: /* WARNING: Subroutine does not return */ abort(); case 3: auVar4 = JS_NewString(param_1,*(int8 *)(param_3 + 0x10 + lVar3)); break; case 4: auVar4 = ZEXT416(*(uint *)(param_3 + 0x10 + lVar3)); break; case 5: auVar4 = js_int64(*(int8 *)(param_3 + 0x10 + lVar3)); break; case 6: auVar4._8_8_ = 7; auVar4._0_8_ = *(int8 *)(param_3 + 0x10 + lVar3); break; case 8: auVar4 = JS_NewObject(param_1); JS_SetPropertyFunctionList (param_1,auVar4._0_8_,auVar4._8_8_,*(int8 *)(param_3 + 0x10 + lVar3), *(int4 *)(param_3 + 0x18 + lVar3)); } iVar1 = JS_SetModuleExport(param_1,param_2,*(int8 *)(param_3 + lVar3),auVar4._0_8_, auVar4._8_8_); lVar3 = lVar3 + 0x20; } while (iVar1 == 0); return 0xffffffffffffffff; }
45,479
inline_mysql_mutex_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_mutex_init( #ifdef HAVE_PSI_MUTEX_INTERFACE PSI_mutex_key key, #endif mysql_mutex_t *that, const pthread_mutexattr_t *attr #ifdef SAFE_MUTEX , const char *src_name, const char *src_file, uint src_line #endif ) { #ifdef HAVE_PSI_MUTEX_INTERFACE that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex); #else that->m_psi= NULL; #endif #ifdef COROUTINE_ENABLED that->l.data= that; that->l.prev= that->l.next= NULL; #endif #ifdef SAFE_MUTEX return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line); #else return pthread_mutex_init(&that->m_mutex, attr); #endif }
O0
c
inline_mysql_mutex_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1c4776(%rip), %rax # 0x238fa0 movq (%rax), %rax movq 0x40(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x28550 addq $0x20, %rsp popq %rbp retq nopl (%rax)
inline_mysql_mutex_init_1: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+40h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+38h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_mutex_init add rsp, 20h pop rbp retn
long long inline_mysql_mutex_init_1(unsigned int a1, _QWORD *a2, long long a3) { a2[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(a1, a2); a2[7] = a2; a2[6] = 0LL; a2[5] = 0LL; return pthread_mutex_init(a2, a3); }
inline_mysql_mutex_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x338fa0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x40] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00128550 ADD RSP,0x20 POP RBP RET
void inline_mysql_mutex_init (int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2); *(int8 *)((long)param_2 + 0x40) = uVar1; *(pthread_mutex_t **)((long)param_2 + 0x38) = param_2; *(int8 *)((long)param_2 + 0x30) = 0; param_2[1].__align = 0; pthread_mutex_init(param_2,param_3); return; }
45,480
my_strxfrm_pad_desc_and_reverse
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend= strend; } return frmend - str; }
O3
c
my_strxfrm_pad_desc_and_reverse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r13d movq %rcx, %r15 movq %rdx, %r14 movq %rsi, -0x30(%rbp) movq %rdi, %r12 movl 0x10(%rbp), %ecx testl %r8d, %r8d sete %al cmpq %r15, %rdx setae %sil testb $0x40, %r13b sete %dl orb %al, %dl orb %sil, %dl jne 0x99cce movl %r8d, %ebx movl %r15d, %eax subl %r14d, %eax imull 0x98(%r12), %ebx cmpl %eax, %ebx cmovael %eax, %ebx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx callq *0x78(%rax) movl 0x10(%rbp), %ecx addq %rbx, %r14 movq -0x30(%rbp), %rbx movq %rbx, %rdi movq %r14, %rsi movl %r13d, %edx callq 0x9b626 testb %r13b, %r13b jns 0x99d0d cmpq %r15, %r14 jae 0x99d0d movq %r15, %rdx subq %r14, %rdx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi callq *0x78(%rax) movq %r15, %r14 subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strxfrm_pad_desc_and_reverse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13d, r9d mov r15, rcx mov r14, rdx mov [rbp+var_30], rsi mov r12, rdi mov ecx, [rbp+arg_0] test r8d, r8d setz al cmp rdx, r15 setnb sil test r13b, 40h setz dl or dl, al or dl, sil jnz short loc_99CCE mov ebx, r8d mov eax, r15d sub eax, r14d imul ebx, [r12+98h] cmp ebx, eax cmovnb ebx, eax movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 mov rdx, rbx call qword ptr [rax+78h] mov ecx, [rbp+arg_0] add r14, rbx loc_99CCE: mov rbx, [rbp+var_30] mov rdi, rbx mov rsi, r14 mov edx, r13d call my_strxfrm_desc_and_reverse test r13b, r13b jns short loc_99D0D cmp r14, r15 jnb short loc_99D0D mov rdx, r15 sub rdx, r14 movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 call qword ptr [rax+78h] mov r14, r15 loc_99D0D: sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strxfrm_pad_desc_and_reverse( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned long long v9; // r14 long long v10; // rcx long long v11; // rbx v9 = a3; v10 = a7; if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 ) { v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5); if ( (unsigned int)v11 >= (int)a4 - (int)a3 ) v11 = (unsigned int)(a4 - a3); (*(void ( **)(long long, unsigned long long, long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, a3, v11, *(unsigned __int8 *)(a1 + 176)); v10 = a7; v9 += v11; } my_strxfrm_desc_and_reverse(a2, v9, a6, v10); if ( (a6 & 0x80u) != 0 && v9 < a4 ) { (*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, v9, a4 - v9, *(unsigned __int8 *)(a1 + 176)); v9 = a4; } return v9 - a2; }
my_strxfrm_pad_desc_and_reverse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13D,R9D MOV R15,RCX MOV R14,RDX MOV qword ptr [RBP + -0x30],RSI MOV R12,RDI MOV ECX,dword ptr [RBP + 0x10] TEST R8D,R8D SETZ AL CMP RDX,R15 SETNC SIL TEST R13B,0x40 SETZ DL OR DL,AL OR DL,SIL JNZ 0x00199cce MOV EBX,R8D MOV EAX,R15D SUB EAX,R14D IMUL EBX,dword ptr [R12 + 0x98] CMP EBX,EAX CMOVNC EBX,EAX MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + 0x10] ADD R14,RBX LAB_00199cce: MOV RBX,qword ptr [RBP + -0x30] MOV RDI,RBX MOV RSI,R14 MOV EDX,R13D CALL 0x0019b626 TEST R13B,R13B JNS 0x00199d0d CMP R14,R15 JNC 0x00199d0d MOV RDX,R15 SUB RDX,R14 MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 CALL qword ptr [RAX + 0x78] MOV R14,R15 LAB_00199d0d: SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strxfrm_pad_desc_and_reverse (long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6, int4 param_7) { uint uVar1; uint uVar2; if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) { uVar1 = (int)param_4 - (int)param_3; uVar2 = param_5 * *(int *)(param_1 + 0x98); if (uVar1 <= uVar2) { uVar2 = uVar1; } (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,(ulong)uVar2,*(int1 *)(param_1 + 0xb0)); param_3 = param_3 + uVar2; } my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7); if (((char)param_6 < '\0') && (param_3 < param_4)) { (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,param_4 - param_3,*(int1 *)(param_1 + 0xb0)); param_3 = param_4; } return param_3 - param_2; }
45,481
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
hkr04[P]cpp-mcp/common/json.hpp
reference operator[](size_type idx) { // implicitly convert null value to an empty array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(); assert_invariant(); } // operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // fill up array with null values if given idx is outside range if (idx >= m_data.m_value.array->size()) { #if JSON_DIAGNOSTICS // remember array size & capacity before resizing const auto old_size = m_data.m_value.array->size(); const auto old_capacity = m_data.m_value.array->capacity(); #endif m_data.m_value.array->resize(idx + 1); #if JSON_DIAGNOSTICS if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) { // capacity has changed: update all parents set_parents(); } else { // set parent for values added above set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size)); } #endif assert_invariant(); } return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movb (%rdi), %al testb %al, %al jne 0x76b1 movb $0x2, (%r14) movl $0x18, %edi callq 0x5450 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movb (%r14), %al cmpb $0x2, %al jne 0x76ef movq 0x8(%r14), %rdi movq (%rdi), %rax movq 0x8(%rdi), %rcx subq %rax, %rcx sarq $0x4, %rcx cmpq %rbx, %rcx ja 0x76dc leaq 0x1(%rbx), %rsi callq 0xb80e movq 0x8(%r14), %rax movq (%rax), %rax shlq $0x4, %rbx addq %rax, %rbx movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x5200 movq %rax, %rbx movq %r14, %rdi callq 0x8cd8 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x16bdf(%rip), %rsi # 0x1e2f2 leaq 0x10(%rsp), %rdi callq 0x8c4f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x95e2 xorl %ebp, %ebp leaq 0x23132(%rip), %rsi # 0x2a870 leaq 0x18bd(%rip), %rdx # 0x9002 movq %rbx, %rdi callq 0x5720 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x776b movq 0x20(%rsp), %rsi incq %rsi callq 0x5460 testb %bpl, %bpl jne 0x7775 jmp 0x777d movq %rax, %r14 movq %rbx, %rdi callq 0x5300 movq %r14, %rdi callq 0x5740 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi mov al, [rdi] test al, al jnz short loc_76B1 mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov al, [r14] loc_76B1: cmp al, 2 jnz short loc_76EF mov rdi, [r14+8] mov rax, [rdi] mov rcx, [rdi+8] sub rcx, rax sar rcx, 4 cmp rcx, rbx ja short loc_76DC lea rsi, [rbx+1] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::resize(ulong) mov rax, [r14+8] mov rax, [rax] loc_76DC: shl rbx, 4 add rbx, rax mov rax, rbx add rsp, 30h pop rbx pop r14 pop rbp retn loc_76EF: 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, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_776B mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_776B: test bpl, bpl jnz short loc_7775 jmp short loc_777D mov r14, rax loc_7775: mov rdi, rbx; void * call ___cxa_free_exception loc_777D: mov rdi, r14 call __Unwind_Resume
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOV AL,byte ptr [RDI] TEST AL,AL JNZ 0x001076b1 MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x00105450 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV AL,byte ptr [R14] LAB_001076b1: CMP AL,0x2 JNZ 0x001076ef MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] SUB RCX,RAX SAR RCX,0x4 CMP RCX,RBX JA 0x001076dc LEA RSI,[RBX + 0x1] CALL 0x0010b80e MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX] LAB_001076dc: SHL RBX,0x4 ADD RBX,RAX MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001076ef: MOV EDI,0x20 CALL 0x00105200 MOV RBX,RAX MOV RDI,R14 CALL 0x00108cd8 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0010770c: LEA RSI,[0x11e2f2] LEA RDI,[RSP + 0x10] CALL 0x00108c4f MOV BPL,0x1 LAB_00107720: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001095e2 XOR EBP,EBP LEA RSI,[0x12a870] LEA RDX,[0x109002] MOV RDI,RBX CALL 0x00105720
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this_00; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 *puVar2; long lVar3; int8 uVar4; char *local_40; detail local_38 [32]; bVar1 = *this; if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; puVar2 = (int8 *)operator_new(0x18); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; *(int8 **)(this + 8) = puVar2; bVar1 = *this; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8); lVar3 = *(long *)this_00; if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 4) <= param_1) { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::resize(this_00,param_1 + 1); lVar3 = **(long **)(this + 8); } return param_1 * 0x10 + lVar3; } uVar4 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0010770c to 0010771c has its CatchHandler @ 00107772 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 00107720 to 0010774c has its CatchHandler @ 0010774d */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception); }
45,482
js_os_readlink
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_readlink(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; char buf[PATH_MAX]; int err; ssize_t res; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; res = readlink(path, buf, sizeof(buf) - 1); if (res < 0) { buf[0] = '\0'; err = errno; } else { buf[res] = '\0'; err = 0; } JS_FreeCString(ctx, path); return make_string_error(ctx, buf, err); }
O1
c
js_os_readlink: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx xorl %r15d, %r15d xorl %esi, %esi xorl %r8d, %r8d callq 0x1ffe3 testq %rax, %rax je 0x1936a movq %rax, %r14 movq %rsp, %rsi movl $0xfff, %edx # imm = 0xFFF movq %rax, %rdi callq 0xe1a0 testq %rax, %rax js 0x19371 movb $0x0, (%rsp,%rax) xorl %ebp, %ebp jmp 0x1937c movl $0x6, %edx jmp 0x19397 movb $0x0, (%rsp) callq 0xe0b0 movl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x202c9 movq %rsp, %rsi movq %rbx, %rdi movl %ebp, %edx callq 0x19f07 movq %rax, %r15 movq %r15, %rax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %r14 popq %r15 popq %rbp retq
js_os_readlink: push rbp push r15 push r14 push rbx sub rsp, 1008h mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] xor r15d, r15d xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_1936A mov r14, rax mov rsi, rsp mov edx, 0FFFh mov rdi, rax call _readlink test rax, rax js short loc_19371 mov [rsp+rax+1028h+var_1028], 0 xor ebp, ebp jmp short loc_1937C loc_1936A: mov edx, 6 jmp short loc_19397 loc_19371: mov [rsp+1028h+var_1028], 0 call ___errno_location mov ebp, [rax] loc_1937C: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rsi, rsp mov rdi, rbx mov edx, ebp call make_string_error mov r15, rax loc_19397: mov rax, r15 add rsp, 1008h pop rbx pop r14 pop r15 pop rbp retn
long long js_os_readlink(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v6; // r15 long long v7; // rax long long v8; // r14 long long v9; // rdi long long v10; // rax unsigned int v11; // ebp _BYTE v13[4136]; // [rsp+0h] [rbp-1028h] BYREF v6 = 0LL; v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( v7 ) { v8 = v7; v9 = v7; v10 = readlink(v7, v13, 4095LL); if ( v10 < 0 ) { v13[0] = 0; v11 = *(_DWORD *)__errno_location(v9); } else { v13[v10] = 0; v11 = 0; } JS_FreeCString(a1, v8); return make_string_error(a1, v13, v11); } return v6; }
js_os_readlink: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x1008 MOV RBX,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] XOR R15D,R15D XOR ESI,ESI XOR R8D,R8D CALL 0x0011ffe3 TEST RAX,RAX JZ 0x0011936a MOV R14,RAX MOV RSI,RSP MOV EDX,0xfff MOV RDI,RAX CALL 0x0010e1a0 TEST RAX,RAX JS 0x00119371 MOV byte ptr [RSP + RAX*0x1],0x0 XOR EBP,EBP JMP 0x0011937c LAB_0011936a: MOV EDX,0x6 JMP 0x00119397 LAB_00119371: MOV byte ptr [RSP],0x0 CALL 0x0010e0b0 MOV EBP,dword ptr [RAX] LAB_0011937c: MOV RDI,RBX MOV RSI,R14 CALL 0x001202c9 MOV RSI,RSP MOV RDI,RBX MOV EDX,EBP CALL 0x00119f07 MOV R15,RAX LAB_00119397: MOV RAX,R15 ADD RSP,0x1008 POP RBX POP R14 POP R15 POP RBP RET
int8 js_os_readlink(int8 param_1) { char *__path; ssize_t sVar1; int *piVar2; int8 uVar3; int iVar4; int8 *in_R8; char local_1028 [4104]; uVar3 = 0; __path = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); if (__path != (char *)0x0) { sVar1 = readlink(__path,local_1028,0xfff); if (sVar1 < 0) { local_1028[0] = '\0'; piVar2 = __errno_location(); iVar4 = *piVar2; } else { local_1028[sVar1] = '\0'; iVar4 = 0; } JS_FreeCString(param_1,__path); uVar3 = make_string_error(param_1,local_1028,iVar4); } return uVar3; }
45,483
js_os_readlink
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_readlink(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; char buf[PATH_MAX]; int err; ssize_t res; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; res = readlink(path, buf, sizeof(buf) - 1); if (res < 0) { buf[0] = '\0'; err = errno; } else { buf[res] = '\0'; err = 0; } JS_FreeCString(ctx, path); return make_string_error(ctx, buf, err); }
O2
c
js_os_readlink: pushq %rbp pushq %r14 pushq %rbx subq $0x1000, %rsp # imm = 0x1000 movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x10ef0 testq %rax, %rax je 0x13e21 movq %rax, %r14 movq %rsp, %rsi movl $0xfff, %edx # imm = 0xFFF movq %rax, %rdi callq 0xe1b0 testq %rax, %rax js 0x13e28 movb $0x0, (%rsp,%rax) xorl %ebp, %ebp jmp 0x13e33 pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x13e4b movb $0x0, (%rsp) callq 0xe0b0 movl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x1a4db movq %rsp, %rsi movq %rbx, %rdi movl %ebp, %edx callq 0x14c40 addq $0x1000, %rsp # imm = 0x1000 popq %rbx popq %r14 popq %rbp retq
js_os_readlink: push rbp push r14 push rbx sub rsp, 1000h mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToCString test rax, rax jz short loc_13E21 mov r14, rax mov rsi, rsp mov edx, 0FFFh mov rdi, rax call _readlink test rax, rax js short loc_13E28 mov [rsp+rax+1018h+var_1018], 0 xor ebp, ebp jmp short loc_13E33 loc_13E21: push 6 pop rdx xor eax, eax jmp short loc_13E4B loc_13E28: mov [rsp+1018h+var_1018], 0 call ___errno_location mov ebp, [rax] loc_13E33: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rsi, rsp mov rdi, rbx mov edx, ebp call make_string_error loc_13E4B: add rsp, 1000h pop rbx pop r14 pop rbp retn
long long js_os_readlink(long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // r14 long long v8; // rdi long long v9; // rax unsigned int v10; // ebp _BYTE v12[4120]; // [rsp+0h] [rbp-1018h] BYREF v6 = JS_ToCString(a1, *a5, a5[1]); if ( !v6 ) return 0LL; v7 = v6; v8 = v6; v9 = readlink(v6, v12, 4095LL); if ( v9 < 0 ) { v12[0] = 0; v10 = *(_DWORD *)__errno_location(v8); } else { v12[v9] = 0; v10 = 0; } JS_FreeCString(a1, v7); return make_string_error(a1, v12, v10); }
js_os_readlink: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1000 MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x00110ef0 TEST RAX,RAX JZ 0x00113e21 MOV R14,RAX MOV RSI,RSP MOV EDX,0xfff MOV RDI,RAX CALL 0x0010e1b0 TEST RAX,RAX JS 0x00113e28 MOV byte ptr [RSP + RAX*0x1],0x0 XOR EBP,EBP JMP 0x00113e33 LAB_00113e21: PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x00113e4b LAB_00113e28: MOV byte ptr [RSP],0x0 CALL 0x0010e0b0 MOV EBP,dword ptr [RAX] LAB_00113e33: MOV RDI,RBX MOV RSI,R14 CALL 0x0011a4db MOV RSI,RSP MOV RDI,RBX MOV EDX,EBP CALL 0x00114c40 LAB_00113e4b: ADD RSP,0x1000 POP RBX POP R14 POP RBP RET
int8 js_os_readlink(int8 param_1) { char *__path; ssize_t sVar1; int *piVar2; int8 uVar3; int iVar4; int8 *in_R8; char local_1018 [4096]; __path = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]); if (__path == (char *)0x0) { uVar3 = 0; } else { sVar1 = readlink(__path,local_1018,0xfff); if (sVar1 < 0) { local_1018[0] = '\0'; piVar2 = __errno_location(); iVar4 = *piVar2; } else { local_1018[sVar1] = '\0'; iVar4 = 0; } JS_FreeCString(param_1,__path); uVar3 = make_string_error(param_1,local_1018,iVar4); } return uVar3; }
45,484
js_os_readlink
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_readlink(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; char buf[PATH_MAX]; int err; ssize_t res; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; res = readlink(path, buf, sizeof(buf) - 1); if (res < 0) { buf[0] = '\0'; err = errno; } else { buf[res] = '\0'; err = 0; } JS_FreeCString(ctx, path); return make_string_error(ctx, buf, err); }
O3
c
js_os_readlink: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx xorl %r15d, %r15d xorl %esi, %esi xorl %r8d, %r8d callq 0x20717 testq %rax, %rax je 0x19d42 movq %rax, %r14 movq %rsp, %rsi movl $0xfff, %edx # imm = 0xFFF movq %rax, %rdi callq 0xe1a0 testq %rax, %rax js 0x19d49 movb $0x0, (%rsp,%rax) xorl %ebp, %ebp jmp 0x19d54 movl $0x6, %edx jmp 0x19d6f movb $0x0, (%rsp) callq 0xe0b0 movl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x209ed movq %rsp, %rsi movq %rbx, %rdi movl %ebp, %edx callq 0x1a80a movq %rax, %r15 movq %r15, %rax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %r14 popq %r15 popq %rbp retq
js_os_readlink: push rbp push r15 push r14 push rbx sub rsp, 1008h mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] xor r15d, r15d xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_19D42 mov r14, rax mov rsi, rsp mov edx, 0FFFh mov rdi, rax call _readlink test rax, rax js short loc_19D49 mov [rsp+rax+1028h+var_1028], 0 xor ebp, ebp jmp short loc_19D54 loc_19D42: mov edx, 6 jmp short loc_19D6F loc_19D49: mov [rsp+1028h+var_1028], 0 call ___errno_location mov ebp, [rax] loc_19D54: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rsi, rsp mov rdi, rbx mov edx, ebp call make_string_error mov r15, rax loc_19D6F: mov rax, r15 add rsp, 1008h pop rbx pop r14 pop r15 pop rbp retn
long long js_os_readlink(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v6; // r15 long long v7; // rax long long v8; // r14 long long v9; // rdi long long v10; // rax unsigned int v11; // ebp _BYTE v13[4136]; // [rsp+0h] [rbp-1028h] BYREF v6 = 0LL; v7 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( v7 ) { v8 = v7; v9 = v7; v10 = readlink(v7, v13, 4095LL); if ( v10 < 0 ) { v13[0] = 0; v11 = *(_DWORD *)__errno_location(v9); } else { v13[v10] = 0; v11 = 0; } JS_FreeCString(a1, v8); return make_string_error(a1, v13, v11); } return v6; }
js_os_readlink: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x1008 MOV RBX,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] XOR R15D,R15D XOR ESI,ESI XOR R8D,R8D CALL 0x00120717 TEST RAX,RAX JZ 0x00119d42 MOV R14,RAX MOV RSI,RSP MOV EDX,0xfff MOV RDI,RAX CALL 0x0010e1a0 TEST RAX,RAX JS 0x00119d49 MOV byte ptr [RSP + RAX*0x1],0x0 XOR EBP,EBP JMP 0x00119d54 LAB_00119d42: MOV EDX,0x6 JMP 0x00119d6f LAB_00119d49: MOV byte ptr [RSP],0x0 CALL 0x0010e0b0 MOV EBP,dword ptr [RAX] LAB_00119d54: MOV RDI,RBX MOV RSI,R14 CALL 0x001209ed MOV RSI,RSP MOV RDI,RBX MOV EDX,EBP CALL 0x0011a80a MOV R15,RAX LAB_00119d6f: MOV RAX,R15 ADD RSP,0x1008 POP RBX POP R14 POP R15 POP RBP RET
int8 js_os_readlink(int8 param_1) { char *__path; ssize_t sVar1; int *piVar2; int8 uVar3; int iVar4; int8 *in_R8; char local_1028 [4104]; uVar3 = 0; __path = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); if (__path != (char *)0x0) { sVar1 = readlink(__path,local_1028,0xfff); if (sVar1 < 0) { local_1028[0] = '\0'; piVar2 = __errno_location(); iVar4 = *piVar2; } else { local_1028[sVar1] = '\0'; iVar4 = 0; } JS_FreeCString(param_1,__path); uVar3 = make_string_error(param_1,local_1028,iVar4); } return uVar3; }
45,485
minja::Value::operator+(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
Value operator+(const Value& rhs) const { if (is_string() || rhs.is_string()) { return to_str() + rhs.to_str(); } else if (is_number_integer() && rhs.is_number_integer()) { return get<int64_t>() + rhs.get<int64_t>(); } else if (is_array() && rhs.is_array()) { auto res = Value::array(); for (const auto& item : *array_) res.push_back(item); for (const auto& item : *rhs.array_) res.push_back(item); return res; } else { return get<double>() + rhs.get<double>(); } }
O2
cpp
minja::Value::operator+(minja::Value const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movb 0x40(%rsi), %al cmpb $0x3, %al je 0x6c4b3 movb 0x40(%r14), %cl cmpb $0x3, %cl jne 0x6c51e leaq 0x68(%rsp), %rdi movq %r15, %rsi callq 0x6c3d0 leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0x6c3d0 leaq 0x10(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0x46d43 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x628fc leaq 0x10(%rsp), %rdi callq 0x21dc8 leaq 0x48(%rsp), %rdi callq 0x21dc8 leaq 0x68(%rsp), %rdi callq 0x21dc8 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq addb $-0x5, %al addb $-0x5, %cl orb %al, %cl cmpb $0x1, %cl ja 0x6c552 movq %r15, %rdi callq 0x5fd0e movq %rax, %r15 movq %r14, %rdi callq 0x5fd0e addq %r15, %rax leaq 0x10(%rsp), %rsi movq %rax, (%rsi) movq %rbx, %rdi callq 0x5fdc4 jmp 0x6c50c cmpq $0x0, 0x10(%r15) je 0x6c5a5 cmpq $0x0, 0x10(%r14) je 0x6c5a5 xorpd %xmm0, %xmm0 leaq 0x30(%rsp), %rsi movapd %xmm0, (%rsi) andq $0x0, 0x10(%rsi) movq %rbx, %rdi callq 0x6540c leaq 0x30(%rsp), %rdi callq 0x64c1e movq 0x10(%r15), %rax movq (%rax), %r15 movq 0x8(%rax), %r12 cmpq %r12, %r15 je 0x6c5d7 movq %rbx, %rdi movq %r15, %rsi callq 0x65478 addq $0x50, %r15 jmp 0x6c58f movq %r15, %rdi callq 0x5fde2 movsd %xmm0, 0x8(%rsp) movq %r14, %rdi callq 0x5fde2 addsd 0x8(%rsp), %xmm0 leaq 0x10(%rsp), %rsi movsd %xmm0, (%rsi) movq %rbx, %rdi callq 0x5fe98 jmp 0x6c50c movq 0x10(%r14), %rax movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x6c50c movq %rbx, %rdi movq %r14, %rsi callq 0x65478 addq $0x50, %r14 jmp 0x6c5e2 movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x64c1e jmp 0x6c645 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x21dc8 jmp 0x6c61d movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x21dc8 jmp 0x6c62c movq %rax, %r14 leaq 0x68(%rsp), %rdi callq 0x21dc8 jmp 0x6c645 jmp 0x6c63a movq %rax, %r14 movq %rbx, %rdi callq 0x5fcd8 movq %r14, %rdi callq 0x21be0 nop
_ZNK5minja5ValueplERKS0_: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov al, [rsi+40h] cmp al, 3 jz short loc_6C4B3 mov cl, [r14+40h] cmp cl, 3 jnz short loc_6C51E loc_6C4B3: lea rdi, [rsp+0A8h+var_40]; this mov rsi, r15; minja::Value * call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea rdi, [rsp+0A8h+var_60]; this mov rsi, r14; minja::Value * call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea rdi, [rsp+0A8h+var_98] lea rsi, [rsp+0A8h+var_40] lea rdx, [rsp+0A8h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, [rsp+0A8h+var_98] mov rdi, rbx call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) lea rdi, [rsp+0A8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6C50C: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn loc_6C51E: add al, 0FBh add cl, 0FBh or cl, al cmp cl, 1 ja short loc_6C552 mov rdi, r15 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) add rax, r15 lea rsi, [rsp+0A8h+var_98]; __int64 * mov [rsi], rax mov rdi, rbx; this call _ZN5minja5ValueC2ERKl; minja::Value::Value(long const&) jmp short loc_6C50C loc_6C552: cmp qword ptr [r15+10h], 0 jz short loc_6C5A5 cmp qword ptr [r14+10h], 0 jz short loc_6C5A5 xorpd xmm0, xmm0 lea rsi, [rsp+0A8h+var_78] movapd xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 mov rdi, rbx call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) lea rdi, [rsp+0A8h+var_78] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov rax, [r15+10h] mov r15, [rax] mov r12, [rax+8] loc_6C58F: cmp r15, r12 jz short loc_6C5D7 mov rdi, rbx; this mov rsi, r15; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r15, 50h ; 'P' jmp short loc_6C58F loc_6C5A5: mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0A8h+var_A0], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) addsd xmm0, [rsp+0A8h+var_A0] lea rsi, [rsp+0A8h+var_98]; double * movsd qword ptr [rsi], xmm0 mov rdi, rbx; this call _ZN5minja5ValueC2ERKd; minja::Value::Value(double const&) jmp loc_6C50C loc_6C5D7: mov rax, [r14+10h] mov r14, [rax] mov r15, [rax+8] loc_6C5E2: cmp r14, r15 jz loc_6C50C mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r14, 50h ; 'P' jmp short loc_6C5E2 mov r14, rax lea rdi, [rsp+arg_28] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_6C645 mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6C61D mov r14, rax loc_6C61D: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6C62C mov r14, rax loc_6C62C: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6C645 jmp short $+2 loc_6C63A: mov r14, rax mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6C645: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::Value::operator+( minja::Value *this, minja::Value *a2, const minja::Value ***a3, double a4) { char v5; // al char v6; // cl long long v8; // r15 const minja::Value **v9; // rax const minja::Value *v10; // r15 const minja::Value *v11; // r12 const minja::Value **v12; // rax const minja::Value *v13; // r14 const minja::Value *v14; // r15 long long v15[4]; // [rsp+10h] [rbp-98h] BYREF __int128 v16; // [rsp+30h] [rbp-78h] BYREF long long v17; // [rsp+40h] [rbp-68h] _QWORD v18[4]; // [rsp+48h] [rbp-60h] BYREF _QWORD v19[8]; // [rsp+68h] [rbp-40h] BYREF v5 = *((_BYTE *)a2 + 64); if ( v5 == 3 || (v6 = *((_BYTE *)a3 + 64), v6 == 3) ) { minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v19, a2, a4); minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v18, (minja::Value *)a3, a4); std::operator+<char>((long long)v15, v19, v18); minja::Value::Value((long long)this, (long long)v15); std::string::~string(v15); std::string::~string(v18); std::string::~string(v19); } else if ( (unsigned __int8)((v5 - 5) | (v6 - 5)) > 1u ) { if ( *((_QWORD *)a2 + 2) && a3[2] ) { v16 = 0LL; v17 = 0LL; minja::Value::array((long long)this, (long long *)&v16); std::vector<minja::Value>::~vector((long long)&v16); v9 = (const minja::Value **)*((_QWORD *)a2 + 2); v10 = *v9; v11 = v9[1]; while ( v10 != v11 ) { minja::Value::push_back(this, v10); v10 = (const minja::Value *)((char *)v10 + 80); } v12 = a3[2]; v13 = *v12; v14 = v12[1]; while ( v13 != v14 ) { minja::Value::push_back(this, v13); v13 = (const minja::Value *)((char *)v13 + 80); } } else { minja::Value::get<double>(a2); minja::Value::get<double>((minja::Value *)a3); *(double *)v15 = a4 + a4; minja::Value::Value(this, (const double *)v15); } } else { v8 = minja::Value::get<long>(a2); v15[0] = v8 + minja::Value::get<long>((minja::Value *)a3); minja::Value::Value(this, v15); } return this; }
operator+: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] CMP AL,0x3 JZ 0x0016c4b3 MOV CL,byte ptr [R14 + 0x40] CMP CL,0x3 JNZ 0x0016c51e LAB_0016c4b3: LEA RDI,[RSP + 0x68] MOV RSI,R15 CALL 0x0016c3d0 LAB_0016c4c0: LEA RDI,[RSP + 0x48] MOV RSI,R14 CALL 0x0016c3d0 LAB_0016c4cd: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x68] LEA RDX,[RSP + 0x48] CALL 0x00146d43 LAB_0016c4e1: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001628fc LAB_0016c4ee: LEA RDI,[RSP + 0x10] CALL 0x00121dc8 LEA RDI,[RSP + 0x48] CALL 0x00121dc8 LEA RDI,[RSP + 0x68] CALL 0x00121dc8 LAB_0016c50c: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET LAB_0016c51e: ADD AL,0xfb ADD CL,0xfb OR CL,AL CMP CL,0x1 JA 0x0016c552 MOV RDI,R15 CALL 0x0015fd0e MOV R15,RAX MOV RDI,R14 CALL 0x0015fd0e ADD RAX,R15 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX MOV RDI,RBX CALL 0x0015fdc4 JMP 0x0016c50c LAB_0016c552: CMP qword ptr [R15 + 0x10],0x0 JZ 0x0016c5a5 CMP qword ptr [R14 + 0x10],0x0 JZ 0x0016c5a5 XORPD XMM0,XMM0 LEA RSI,[RSP + 0x30] MOVAPD xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_0016c572: MOV RDI,RBX CALL 0x0016540c LEA RDI,[RSP + 0x30] CALL 0x00164c1e MOV RAX,qword ptr [R15 + 0x10] MOV R15,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LAB_0016c58f: CMP R15,R12 JZ 0x0016c5d7 LAB_0016c594: MOV RDI,RBX MOV RSI,R15 CALL 0x00165478 LAB_0016c59f: ADD R15,0x50 JMP 0x0016c58f LAB_0016c5a5: MOV RDI,R15 CALL 0x0015fde2 MOVSD qword ptr [RSP + 0x8],XMM0 MOV RDI,R14 CALL 0x0015fde2 ADDSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x10] MOVSD qword ptr [RSI],XMM0 MOV RDI,RBX CALL 0x0015fe98 JMP 0x0016c50c LAB_0016c5d7: MOV RAX,qword ptr [R14 + 0x10] MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0016c5e2: CMP R14,R15 JZ 0x0016c50c LAB_0016c5eb: MOV RDI,RBX MOV RSI,R14 CALL 0x00165478 LAB_0016c5f6: ADD R14,0x50 JMP 0x0016c5e2
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator+(Value *this,Value *param_1) { Value *pVVar1; long lVar2; long lVar3; Value *in_RDX; Value *pVVar4; double dVar5; double local_98 [4]; int8 local_78; int8 uStack_70; int8 local_68; string local_60 [32]; string local_40 [32]; if ((param_1[0x40] == (Value)0x3) || (in_RDX[0x40] == (Value)0x3)) { to_str_abi_cxx11_(); /* try { // try from 0016c4c0 to 0016c4cc has its CatchHandler @ 0016c629 */ to_str_abi_cxx11_(); /* try { // try from 0016c4cd to 0016c4e0 has its CatchHandler @ 0016c61a */ std::operator+((string *)local_98,local_40); /* try { // try from 0016c4e1 to 0016c4ed has its CatchHandler @ 0016c60b */ Value(this,(string *)local_98); std::__cxx11::string::~string((string *)local_98); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string(local_40); } else if ((byte)((char)in_RDX[0x40] - 5U | (char)param_1[0x40] - 5U) < 2) { lVar2 = get<long>(param_1); lVar3 = get<long>(in_RDX); local_98[0] = (double)(lVar3 + lVar2); Value(this,(long *)local_98); } else if ((*(long *)(param_1 + 0x10) == 0) || (*(long *)(in_RDX + 0x10) == 0)) { dVar5 = get<double>(param_1); local_98[0] = get<double>(in_RDX); local_98[0] = local_98[0] + dVar5; Value(this,local_98); } else { local_78 = 0; uStack_70 = 0; local_68 = 0; /* try { // try from 0016c572 to 0016c579 has its CatchHandler @ 0016c5fc */ array(this); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_78); pVVar1 = (Value *)(*(int8 **)(param_1 + 0x10))[1]; for (pVVar4 = (Value *)**(int8 **)(param_1 + 0x10); pVVar4 != pVVar1; pVVar4 = pVVar4 + 0x50) { /* try { // try from 0016c594 to 0016c59e has its CatchHandler @ 0016c63a */ push_back(this,pVVar4); } pVVar1 = (Value *)(*(int8 **)(in_RDX + 0x10))[1]; for (pVVar4 = (Value *)**(int8 **)(in_RDX + 0x10); pVVar4 != pVVar1; pVVar4 = pVVar4 + 0x50) { /* try { // try from 0016c5eb to 0016c5f5 has its CatchHandler @ 0016c638 */ push_back(this,pVVar4); } } return this; }
45,486
my_valid_mbcharlen_utf8mb3
eloqsql/strings/ctype-utf8.c
static inline int my_valid_mbcharlen_utf8mb3(const uchar *s, const uchar *e) { uchar c; DBUG_ASSERT(s < e); c= s[0]; if (c < 0x80) return 1; if (c < 0xc2) return MY_CS_ILSEQ; 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; return 2; } DBUG_ASSERT(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; return 3; }
O0
c
my_valid_mbcharlen_utf8mb3: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) jmp 0x75e3e movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movzbl -0x19(%rbp), %eax cmpl $0x80, %eax jge 0x75e5e movl $0x1, -0x4(%rbp) jmp 0x75f27 movzbl -0x19(%rbp), %eax cmpl $0xc2, %eax jge 0x75e75 movl $0x0, -0x4(%rbp) jmp 0x75f27 movzbl -0x19(%rbp), %eax cmpl $0xe0, %eax jge 0x75ebe movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jbe 0x75e9a movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x75f27 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x75eb5 movl $0x0, -0x4(%rbp) jmp 0x75f27 movl $0x2, -0x4(%rbp) jmp 0x75f27 jmp 0x75ec0 jmp 0x75ec2 movq -0x10(%rbp), %rax addq $0x3, %rax cmpq -0x18(%rbp), %rax jbe 0x75ed9 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x75f27 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x75f17 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x75f17 movzbl -0x19(%rbp), %eax cmpl $0xe1, %eax jge 0x75f20 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x75f20 movl $0x0, -0x4(%rbp) jmp 0x75f27 movl $0x3, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_valid_mbcharlen_utf8mb3: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi jmp short $+2 loc_75E3E: mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_19], al movzx eax, [rbp+var_19] cmp eax, 80h jge short loc_75E5E mov [rbp+var_4], 1 jmp loc_75F27 loc_75E5E: movzx eax, [rbp+var_19] cmp eax, 0C2h jge short loc_75E75 mov [rbp+var_4], 0 jmp loc_75F27 loc_75E75: movzx eax, [rbp+var_19] cmp eax, 0E0h jge short loc_75EBE mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jbe short loc_75E9A mov [rbp+var_4], 0FFFFFF9Ah jmp loc_75F27 loc_75E9A: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_75EB5 mov [rbp+var_4], 0 jmp short loc_75F27 loc_75EB5: mov [rbp+var_4], 2 jmp short loc_75F27 loc_75EBE: jmp short $+2 loc_75EC0: jmp short $+2 loc_75EC2: mov rax, [rbp+var_10] add rax, 3 cmp rax, [rbp+var_18] jbe short loc_75ED9 mov [rbp+var_4], 0FFFFFF99h jmp short loc_75F27 loc_75ED9: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_75F17 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_75F17 movzx eax, [rbp+var_19] cmp eax, 0E1h jge short loc_75F20 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_75F20 loc_75F17: mov [rbp+var_4], 0 jmp short loc_75F27 loc_75F20: mov [rbp+var_4], 3 loc_75F27: mov eax, [rbp+var_4] pop rbp retn
long long my_valid_mbcharlen_utf8mb3(unsigned __int8 *a1, unsigned long long a2) { unsigned __int8 v3; // [rsp+1h] [rbp-19h] v3 = *a1; if ( *a1 >= 0x80u ) { if ( v3 >= 0xC2u ) { if ( v3 >= 0xE0u ) { if ( (unsigned long long)(a1 + 3) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) ) return 3; else return 0; } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a1 + 2) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 ) return 2; else return 0; } else { return (unsigned int)-102; } } else { return 0; } } else { return 1; } }
my_valid_mbcharlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI JMP 0x00175e3e LAB_00175e3e: MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x80 JGE 0x00175e5e MOV dword ptr [RBP + -0x4],0x1 JMP 0x00175f27 LAB_00175e5e: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xc2 JGE 0x00175e75 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00175f27 LAB_00175e75: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe0 JGE 0x00175ebe MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JBE 0x00175e9a MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00175f27 LAB_00175e9a: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x00175eb5 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00175f27 LAB_00175eb5: MOV dword ptr [RBP + -0x4],0x2 JMP 0x00175f27 LAB_00175ebe: JMP 0x00175ec0 LAB_00175ec0: JMP 0x00175ec2 LAB_00175ec2: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x18] JBE 0x00175ed9 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00175f27 LAB_00175ed9: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00175f17 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00175f17 MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe1 JGE 0x00175f20 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x00175f20 LAB_00175f17: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00175f27 LAB_00175f20: MOV dword ptr [RBP + -0x4],0x3 LAB_00175f27: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_valid_mbcharlen_utf8mb3(byte *param_1,byte *param_2) { byte bVar1; int4 local_c; bVar1 = *param_1; if (bVar1 < 0x80) { local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_2 < param_1 + 2) { local_c = 0xffffff9a; } else if ((param_1[1] ^ 0x80) < 0x40) { local_c = 2; } else { local_c = 0; } } else if (param_2 < param_1 + 3) { local_c = 0xffffff99; } else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_1[1])))) { local_c = 3; } else { local_c = 0; } return local_c; }
45,487
stbi_zlib_decode_noheader_buffer
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) { stbi__zbuf a; a.zbuffer = (stbi_uc *) ibuffer; a.zbuffer_end = (stbi_uc *) ibuffer + ilen; if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) return (int) (a.zout - a.zout_start); else return -1; }
O0
c
stbi_zlib_decode_noheader_buffer: subq $0x1028, %rsp # imm = 0x1028 movq %rdi, 0x1018(%rsp) movl %esi, 0x1014(%rsp) movq %rdx, 0x1008(%rsp) movl %ecx, 0x1004(%rsp) movq 0x1008(%rsp), %rax movq %rax, (%rsp) movq 0x1008(%rsp), %rax movslq 0x1004(%rsp), %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movq 0x1018(%rsp), %rsi movl 0x1014(%rsp), %edx movq %rsp, %rdi xorl %r8d, %r8d movl %r8d, %ecx callq 0xf370 cmpl $0x0, %eax je 0xf721 movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx subq %rcx, %rax movl %eax, 0x1024(%rsp) jmp 0xf72c movl $0xffffffff, 0x1024(%rsp) # imm = 0xFFFFFFFF movl 0x1024(%rsp), %eax addq $0x1028, %rsp # imm = 0x1028 retq nopl (%rax,%rax)
stbi_zlib_decode_noheader_buffer: sub rsp, 1028h mov [rsp+1028h+var_10], rdi mov [rsp+1028h+var_14], esi mov [rsp+1028h+var_20], rdx mov [rsp+1028h+var_24], ecx mov rax, [rsp+1028h+var_20] mov [rsp+1028h+var_1028], rax mov rax, [rsp+1028h+var_20] movsxd rcx, [rsp+1028h+var_24] add rax, rcx mov [rsp+1028h+var_1020], rax mov rsi, [rsp+1028h+var_10] mov edx, [rsp+1028h+var_14] mov rdi, rsp xor r8d, r8d mov ecx, r8d call _ZL13stbi__do_zlibP10stbi__zbufPciii; stbi__do_zlib(stbi__zbuf *,char *,int,int,int) cmp eax, 0 jz short loc_F721 mov rax, [rsp+1028h+var_1010] mov rcx, [rsp+1028h+var_1008] sub rax, rcx mov [rsp+1028h+var_4], eax jmp short loc_F72C loc_F721: mov [rsp+1028h+var_4], 0FFFFFFFFh loc_F72C: mov eax, [rsp+1028h+var_4] add rsp, 1028h retn
long long stbi_zlib_decode_noheader_buffer(long long a1, int a2, long long a3, int a4) { _QWORD v5[3]; // [rsp+0h] [rbp-1028h] BYREF long long v6; // [rsp+18h] [rbp-1010h] long long v7; // [rsp+20h] [rbp-1008h] int v8; // [rsp+1004h] [rbp-24h] long long v9; // [rsp+1008h] [rbp-20h] int v10; // [rsp+1014h] [rbp-14h] long long v11; // [rsp+1018h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v5[0] = a3; v5[1] = a4 + a3; if ( (unsigned int)stbi__do_zlib((long long)v5, a1, a2, 0, 0) ) return (unsigned int)(v6 - v7); else return (unsigned int)-1; }
stbi_zlib_decode_noheader_buffer: SUB RSP,0x1028 MOV qword ptr [RSP + 0x1018],RDI MOV dword ptr [RSP + 0x1014],ESI MOV qword ptr [RSP + 0x1008],RDX MOV dword ptr [RSP + 0x1004],ECX MOV RAX,qword ptr [RSP + 0x1008] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x1008] MOVSXD RCX,dword ptr [RSP + 0x1004] ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x1018] MOV EDX,dword ptr [RSP + 0x1014] MOV RDI,RSP XOR R8D,R8D MOV ECX,R8D CALL 0x0010f370 CMP EAX,0x0 JZ 0x0010f721 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] SUB RAX,RCX MOV dword ptr [RSP + 0x1024],EAX JMP 0x0010f72c LAB_0010f721: MOV dword ptr [RSP + 0x1024],0xffffffff LAB_0010f72c: MOV EAX,dword ptr [RSP + 0x1024] ADD RSP,0x1028 RET
int stbi_zlib_decode_noheader_buffer(char *param_1,int param_2,long param_3,int param_4) { int iVar1; long local_1028; long local_1020; int local_1010; int local_1008; int local_24; long local_20; int local_14; char *local_10; int local_4; local_1020 = param_3 + param_4; local_1028 = param_3; local_24 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; iVar1 = stbi__do_zlib((stbi__zbuf *)&local_1028,param_1,param_2,0,0); if (iVar1 == 0) { local_4 = -1; } else { local_4 = local_1010 - local_1008; } return local_4; }
45,488
stbi_zlib_decode_noheader_buffer
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) { stbi__zbuf a; a.zbuffer = (stbi_uc *) ibuffer; a.zbuffer_end = (stbi_uc *) ibuffer + ilen; if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) return (int) (a.zout - a.zout_start); else return -1; }
O2
c
stbi_zlib_decode_noheader_buffer: pushq %rbp pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movl %esi, %eax movq %rdi, %rsi leaq 0x8(%rsp), %rbx movq %rdx, (%rbx) movslq %ecx, %rcx addq %rdx, %rcx movq %rcx, 0x8(%rbx) xorl %ebp, %ebp movq %rbx, %rdi movl %eax, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0xc9ef movl 0x18(%rbx), %ecx subl 0x20(%rbx), %ecx cmpl $0x1, %eax sbbl %ebp, %ebp orl %ecx, %ebp movl %ebp, %eax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %rbp retq
stbi_zlib_decode_noheader_buffer: push rbp push rbx sub rsp, 1008h mov eax, esi mov rsi, rdi lea rbx, [rsp+1018h+var_1010] mov [rbx], rdx movsxd rcx, ecx add rcx, rdx mov [rbx+8], rcx xor ebp, ebp mov rdi, rbx mov edx, eax xor ecx, ecx xor r8d, r8d call _ZL13stbi__do_zlibP10stbi__zbufPciii; stbi__do_zlib(stbi__zbuf *,char *,int,int,int) mov ecx, [rbx+18h] sub ecx, [rbx+20h] cmp eax, 1 sbb ebp, ebp or ebp, ecx mov eax, ebp add rsp, 1008h pop rbx pop rbp retn
long long stbi_zlib_decode_noheader_buffer(unsigned __int8 *a1, int a2, unsigned __int8 *a3, int a4) { int v4; // eax unsigned __int8 *v6[3]; // [rsp+8h] [rbp-1010h] BYREF int v7; // [rsp+20h] [rbp-FF8h] int v8; // [rsp+28h] [rbp-FF0h] v6[0] = a3; v6[1] = &a3[a4]; v4 = stbi__do_zlib(v6, a1, a2, 0, 0); return (v7 - v8) | (unsigned int)-(v4 == 0); }
stbi_zlib_decode_noheader_buffer: PUSH RBP PUSH RBX SUB RSP,0x1008 MOV EAX,ESI MOV RSI,RDI LEA RBX,[RSP + 0x8] MOV qword ptr [RBX],RDX MOVSXD RCX,ECX ADD RCX,RDX MOV qword ptr [RBX + 0x8],RCX XOR EBP,EBP MOV RDI,RBX MOV EDX,EAX XOR ECX,ECX XOR R8D,R8D CALL 0x0010c9ef MOV ECX,dword ptr [RBX + 0x18] SUB ECX,dword ptr [RBX + 0x20] CMP EAX,0x1 SBB EBP,EBP OR EBP,ECX MOV EAX,EBP ADD RSP,0x1008 POP RBX POP RBP RET
uint stbi_zlib_decode_noheader_buffer(char *param_1,int param_2,long param_3,int param_4) { int iVar1; long local_1010; long local_1008; int local_ff8; int local_ff0; local_1008 = param_4 + param_3; local_1010 = param_3; iVar1 = stbi__do_zlib((stbi__zbuf *)&local_1010,param_1,param_2,0,0); return -(uint)(iVar1 == 0) | local_ff8 - local_ff0; }
45,489
psi_mutex_lock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that, const char *file, uint line) { PSI_mutex_locker_state state; PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait) (&state, that->m_psi, PSI_MUTEX_LOCK, file, line); # ifdef SAFE_MUTEX int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line); # else int result= pthread_mutex_lock(&that->m_mutex); # endif if (locker) PSI_MUTEX_CALL(end_mutex_wait)(locker, result); return result; }
O0
c
psi_mutex_lock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1a76f6(%rip), %rax # 0x1ce530 movq (%rax), %rax movq 0x190(%rax), %rax movq -0x8(%rbp), %rcx movq 0x40(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x24460 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x26e8d leaq 0x1a76b6(%rip), %rax # 0x1ce530 movq (%rax), %rax movq 0x198(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_mutex_lock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+190h] mov rcx, [rbp+var_8] mov rsi, [rcx+40h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] xor edx, edx call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call _pthread_mutex_lock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_26E8D lea rax, PSI_server mov rax, [rax] mov rax, [rax+198h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_26E8D: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_mutex_lock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[50])( v6, *(_QWORD *)(a1 + 64), 0LL, a2, a3); v4 = pthread_mutex_lock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4); return v4; }
psi_mutex_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2ce530] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x190] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124460 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00126e8d LEA RAX,[0x2ce530] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x198] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_00126e8d: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3) { int iVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; pthread_mutex_t *local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 400)) (local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3); iVar1 = pthread_mutex_lock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x198))(lVar2,iVar1); } return iVar1; }
45,490
arena_destroy
tsotchke[P]eshkol/src/core/memory/arena.c
void arena_destroy(Arena* arena) { assert(arena != NULL); // Free all blocks Block* block = arena->first; while (block) { Block* next = block->next; free(block); block = next; } // Free arena control structure free(arena); }
O1
c
arena_destroy: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x2432 movq %rdi, %rbx movq 0x8(%rdi), %rdi testq %rdi, %rdi je 0x2423 movq (%rdi), %r14 callq 0x1030 movq %r14, %rdi testq %r14, %r14 jne 0x2413 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1030 leaq 0xbfb(%rip), %rdi # 0x3034 leaq 0x132c(%rip), %rsi # 0x376c leaq 0x1444(%rip), %rcx # 0x388b movl $0xba, %edx callq 0x1070
arena_destroy: push r14 push rbx push rax test rdi, rdi jz short loc_2432 mov rbx, rdi mov rdi, [rdi+8] test rdi, rdi jz short loc_2423 loc_2413: mov r14, [rdi] call _free mov rdi, r14 test r14, r14 jnz short loc_2413 loc_2423: mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _free loc_2432: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaDestr; "void arena_destroy(Arena *)" mov edx, 0BAh call ___assert_fail
long long arena_destroy(long long a1) { _QWORD *v2; // rdi _QWORD *v3; // r14 if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 186LL, "void arena_destroy(Arena *)"); v2 = *(_QWORD **)(a1 + 8); if ( v2 ) { do { v3 = (_QWORD *)*v2; free(v2); v2 = v3; } while ( v3 ); } return free(a1); }
arena_destroy: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00102432 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] TEST RDI,RDI JZ 0x00102423 LAB_00102413: MOV R14,qword ptr [RDI] CALL 0x00101030 MOV RDI,R14 TEST R14,R14 JNZ 0x00102413 LAB_00102423: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00101030 LAB_00102432: LEA RDI,[0x103034] LEA RSI,[0x10376c] LEA RCX,[0x10388b] MOV EDX,0xba CALL 0x00101070
void arena_destroy(void *param_1) { int8 *puVar1; int8 *__ptr; if (param_1 == (void *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0xba,"void arena_destroy(Arena *)"); } __ptr = *(int8 **)((long)param_1 + 8); while (__ptr != (int8 *)0x0) { puVar1 = (int8 *)*__ptr; free(__ptr); __ptr = puVar1; } free(param_1); return; }
45,491
arena_destroy
tsotchke[P]eshkol/src/core/memory/arena.c
void arena_destroy(Arena* arena) { assert(arena != NULL); // Free all blocks Block* block = arena->first; while (block) { Block* next = block->next; free(block); block = next; } // Free arena control structure free(arena); }
O3
c
arena_destroy: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x2406 movq %rdi, %rbx movq 0x8(%rdi), %rdi testq %rdi, %rdi je 0x23f7 movq (%rdi), %r14 callq 0x1030 movq %r14, %rdi testq %r14, %r14 jne 0x23e7 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1030 leaq 0xc27(%rip), %rdi # 0x3034 leaq 0x134c(%rip), %rsi # 0x3760 leaq 0x1464(%rip), %rcx # 0x387f movl $0xba, %edx callq 0x1070
arena_destroy: push r14 push rbx push rax test rdi, rdi jz short loc_2406 mov rbx, rdi mov rdi, [rdi+8] test rdi, rdi jz short loc_23F7 loc_23E7: mov r14, [rdi] call _free mov rdi, r14 test r14, r14 jnz short loc_23E7 loc_23F7: mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _free loc_2406: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaDestr; "void arena_destroy(Arena *)" mov edx, 0BAh call ___assert_fail
long long arena_destroy(long long a1) { _QWORD *v2; // rdi _QWORD *v3; // r14 if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 186LL, "void arena_destroy(Arena *)"); v2 = *(_QWORD **)(a1 + 8); if ( v2 ) { do { v3 = (_QWORD *)*v2; free(v2); v2 = v3; } while ( v3 ); } return free(a1); }
arena_destroy: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00102406 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] TEST RDI,RDI JZ 0x001023f7 LAB_001023e7: MOV R14,qword ptr [RDI] CALL 0x00101030 MOV RDI,R14 TEST R14,R14 JNZ 0x001023e7 LAB_001023f7: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00101030 LAB_00102406: LEA RDI,[0x103034] LEA RSI,[0x103760] LEA RCX,[0x10387f] MOV EDX,0xba CALL 0x00101070
void arena_destroy(void *param_1) { int8 *puVar1; int8 *__ptr; if (param_1 == (void *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0xba,"void arena_destroy(Arena *)"); } __ptr = *(int8 **)((long)param_1 + 8); while (__ptr != (int8 *)0x0) { puVar1 = (int8 *)*__ptr; free(__ptr); __ptr = puVar1; } free(param_1); return; }
45,492
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>::value_type>(), (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>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>&)
monkey531[P]llama/common/json.hpp
auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) -> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), j.template get<typename ConstructibleArrayType::value_type>(), void()) { if (JSON_HEDLEY_UNLIKELY(!j.is_array())) { JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); } from_json_array_impl(j, arr, priority_tag<3> {}); }
O2
cpp
decltype(from_json_array_impl(fp, fp0, nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>{}), fp.get<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>::value_type>(), (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>, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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>>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x927d5 movq %r14, %rdi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x928b6 pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x43dee leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x25fe0(%rip), %rsi # 0xb87d7 leaq 0x10(%rsp), %rdi callq 0x92858 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63b8a xorl %ebp, %ebp leaq 0x69726(%rip), %rsi # 0xfbf48 leaq -0x51eab(%rip), %rdx # 0x4097e movq %rbx, %rdi callq 0x23f20 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241f8 testb %bpl, %bpl jne 0x92848 jmp 0x92850 movq %rax, %r14 movq %rbx, %rdi callq 0x23690 movq %r14, %rdi callq 0x23fb0
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_927D5 mov rdi, r14 add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_36detail20from_json_array_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_7array_tENS1_12priority_tagILj3EEE; nlohmann::json_abi_v3_11_3::detail::from_json_array_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::array_t &,nlohmann::json_abi_v3_11_3::detail::priority_tag<3u>) loc_927D5: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeArra; "type must be array, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>(char const(&)[28],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_92848 jmp short loc_92850 mov r14, rax loc_92848: mov rdi, rbx; void * call ___cxa_free_exception loc_92850: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_( unsigned __int8 *a1) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v3[56]; // [rsp+10h] [rbp-38h] BYREF if ( *a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__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(&)[28],char const*>( v3, "type must be array, 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, (long long)v3); __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); } return nlohmann::json_abi_v3_11_3::detail::from_json_array_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(a1); }
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x001927d5 MOV RDI,R14 ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001928b6 LAB_001927d5: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x00143dee LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001927f0: LEA RSI,[0x1b87d7] LEA RDI,[RSP + 0x10] CALL 0x00192858 MOV BPL,0x1 LAB_00192804: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163b8a XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x14097e] MOV RDI,RBX CALL 0x00123f20
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EETnNSt9enable_ifIXaaaaaaaasr27is_constructible_array_typeIT_T0_EE5valuentsr28is_constructible_object_typeISJ_SK_EE5valuentsr28is_constructible_string_typeISJ_SK_EE5valuentsr3std7is_sameISK_NSJ_8binary_tEEE5valuentsr13is_basic_jsonISK_EE5valueEiE4typeELi0EEEDTcmcmcl20from_json_array_implfp_fp0_tlNS1_12priority_tagILj3EEEEEcldtfp_3getINSK_10value_typeEEEcvv_EERKSJ_RSK_ (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) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { nlohmann::json_abi_v3_11_3::detail:: from_json_array_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (param_1); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001927f0 to 00192800 has its CatchHandler @ 00192845 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*> (local_38,"type must be array, but is ",&local_40); /* try { // try from 00192804 to 00192830 has its CatchHandler @ 00192831 */ _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,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
45,493
translog_destroy
eloqsql/storage/maria/ma_loghandler.c
void translog_destroy() { TRANSLOG_FILE **file; uint i; uint8 current_buffer; DBUG_ENTER("translog_destroy"); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); translog_lock(); current_buffer= log_descriptor.bc.buffer_no; translog_status= (translog_status == TRANSLOG_READONLY ? TRANSLOG_UNINITED : TRANSLOG_SHUTDOWN); if (log_descriptor.bc.buffer->file != NULL) translog_finish_page(&log_descriptor.horizon, &log_descriptor.bc); translog_unlock(); for (i= 0; i < TRANSLOG_BUFFERS_NO; i++) { struct st_translog_buffer *buffer= (log_descriptor.buffers + ((i + current_buffer + 1) % TRANSLOG_BUFFERS_NO)); translog_buffer_destroy(buffer); } translog_status= TRANSLOG_UNINITED; /* close files */ while ((file= (TRANSLOG_FILE **)pop_dynamic(&log_descriptor.open_files))) translog_close_log_file(*file); mysql_mutex_destroy(&log_descriptor.sent_to_disk_lock); mysql_mutex_destroy(&log_descriptor.file_header_lock); mysql_mutex_destroy(&log_descriptor.unfinished_files_lock); mysql_mutex_destroy(&log_descriptor.purger_lock); mysql_mutex_destroy(&log_descriptor.log_flush_lock); mysql_mutex_destroy(&log_descriptor.dirty_buffer_mask_lock); mysql_cond_destroy(&log_descriptor.log_flush_cond); mysql_cond_destroy(&log_descriptor.new_goal_cond); mysql_rwlock_destroy(&log_descriptor.open_files_lock); delete_dynamic(&log_descriptor.open_files); delete_dynamic(&log_descriptor.unfinished_files); if (log_descriptor.directory_fd >= 0) mysql_file_close(log_descriptor.directory_fd, MYF(MY_WME)); if (id_to_share != NULL) my_free(id_to_share + 1); DBUG_VOID_RETURN; }
O3
c
translog_destroy: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp callq 0x32e3f movzbl 0xbc95da(%rip), %r15d # 0xbfecb6 xorl %eax, %eax cmpl $0x2, 0x3c773b(%rip) # 0x3fce20 setne %al leal (%rax,%rax,2), %eax movl %eax, 0x3c772f(%rip) # 0x3fce20 movq 0xbc95b0(%rip), %rbx # 0xbfeca8 cmpq $0x0, 0x100038(%rbx) je 0x3571c leaq 0xbc956f(%rip), %rdi # 0xbfec78 leaq 0xbc9570(%rip), %rsi # 0xbfec80 callq 0x35a36 movq 0xbc958c(%rip), %rbx # 0xbfeca8 movq 0x1000d0(%rbx), %rdi testq %rdi, %rdi jne 0x359f7 addq $0x100090, %rbx # imm = 0x100090 movq %rbx, %rdi callq 0x291d0 incl %r15d xorl %r12d, %r12d leaq 0x3c88e8(%rip), %r13 # 0x3fe030 leaq 0x3508c1(%rip), %r14 # 0x386010 leal (%r15,%r12), %eax andl $0x7, %eax imulq $0x100120, %rax, %rax # imm = 0x100120 leaq (%rax,%r13), %rbx addq $0x2f8, %rbx # imm = 0x2F8 cmpq $0x0, 0x100038(%rbx) je 0x3579a movq %rbx, %rdi callq 0x32edf movq %rbx, %rdi callq 0x36bad movq 0x1000d0(%rbx), %rdi testq %rdi, %rdi jne 0x35800 leaq 0x100090(%rbx), %rdi callq 0x291d0 movq 0x1000d0(%rbx), %rdi testq %rdi, %rdi je 0x357b7 movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0x1000d0(%rbx) leaq 0x100090(%rbx), %rdi callq 0x290c0 movq 0x100070(%rbx), %rdi testq %rdi, %rdi jne 0x357ed addq $0x100040, %rbx # imm = 0x100040 movq %rbx, %rdi callq 0x29270 incl %r12d cmpl $0x8, %r12d jne 0x3574f jmp 0x3580b movq (%r14), %rax callq *0x68(%rax) movq $0x0, 0x100070(%rbx) jmp 0x357cf movq (%r14), %rax callq *0x160(%rax) jmp 0x3578e movl $0x0, 0x3c760b(%rip) # 0x3fce20 leaq 0x3c8a3c(%rip), %rdi # 0x3fe258 callq 0x92407 testq %rax, %rax je 0x35842 leaq 0x3c8a2b(%rip), %rbx # 0x3fe258 movq (%rax), %rdi callq 0x35b1c movq %rbx, %rdi callq 0x92407 testq %rax, %rax jne 0x3582d movq 0xbc94e7(%rip), %rdi # 0xbfed30 testq %rdi, %rdi je 0x3585f movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0xbc94d1(%rip) # 0xbfed30 leaq 0xbc948a(%rip), %rdi # 0xbfecf0 callq 0x290c0 movq 0xbc95be(%rip), %rdi # 0xbfee30 testq %rdi, %rdi je 0x35888 movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0xbc95a8(%rip) # 0xbfee30 leaq 0xbc9561(%rip), %rdi # 0xbfedf0 callq 0x290c0 movq 0xbc95dd(%rip), %rdi # 0xbfee78 testq %rdi, %rdi je 0x358b1 movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0xbc95c7(%rip) # 0xbfee78 leaq 0xbc9580(%rip), %rdi # 0xbfee38 callq 0x290c0 movq 0xbc962c(%rip), %rdi # 0xbfeef0 testq %rdi, %rdi je 0x358da movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0xbc9616(%rip) # 0xbfeef0 leaq 0xbc95cf(%rip), %rdi # 0xbfeeb0 callq 0x290c0 movq 0xbc948b(%rip), %rdi # 0xbfed78 testq %rdi, %rdi je 0x35903 movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0xbc9475(%rip) # 0xbfed78 leaq 0xbc942e(%rip), %rdi # 0xbfed38 callq 0x290c0 movq 0xbc935a(%rip), %rdi # 0xbfec70 testq %rdi, %rdi je 0x3592c movq (%r14), %rax callq *0x48(%rax) movq $0x0, 0xbc9344(%rip) # 0xbfec70 leaq 0xbc92fd(%rip), %rdi # 0xbfec30 callq 0x290c0 movq 0xbc9471(%rip), %rdi # 0xbfedb0 testq %rdi, %rdi jne 0x35a0c leaq 0xbc9431(%rip), %rdi # 0xbfed80 callq 0x29270 movq 0xbc948d(%rip), %rdi # 0xbfede8 testq %rdi, %rdi jne 0x35a16 leaq 0xbc944d(%rip), %rdi # 0xbfedb8 callq 0x29270 movq 0x3c89a1(%rip), %rdi # 0x3fe318 testq %rdi, %rdi jne 0x35a20 leaq 0x3c8901(%rip), %rdi # 0x3fe288 callq 0xa4c7c leaq 0x3c88c5(%rip), %rdi # 0x3fe258 callq 0x9256c leaq 0xbc94e1(%rip), %rdi # 0xbfee80 callq 0x9256c movl 0x3c8976(%rip), %ebx # 0x3fe320 testl %ebx, %ebx js 0x359d3 movq (%r14), %rax leaq -0x70(%rbp), %rdi movl %ebx, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x35a2a movl $0x10, %esi movl %ebx, %edi callq 0xa0e75 movq 0xbc956e(%rip), %rdi # 0xbfef48 testq %rdi, %rdi je 0x359e8 addq $0x8, %rdi callq 0xa08ce addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x350612(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x3572c callq 0x2bca5 jmp 0x35948 callq 0x2bcc0 jmp 0x35964 callq 0x2bcdb jmp 0x35980 movq %rax, %rdi movl %ebx, %esi callq 0x2bcf6 jmp 0x359d3
translog_destroy: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h call translog_lock movzx r15d, byte ptr cs:xmmword_BFECB0+6 xor eax, eax cmp cs:translog_status, 2 setnz al lea eax, [rax+rax*2] mov cs:translog_status, eax mov rbx, qword ptr cs:xmmword_BFECA0+8 cmp ds:qword_100038[rbx], 0 jz short loc_3571C lea rdi, qword_BFEC78 lea rsi, xmmword_BFEC80 call translog_finish_page mov rbx, qword ptr cs:xmmword_BFECA0+8 loc_3571C: mov rdi, ds:qword_1000D0[rbx] test rdi, rdi jnz loc_359F7 loc_3572C: add rbx, 100090h mov rdi, rbx call _pthread_mutex_unlock inc r15d xor r12d, r12d lea r13, log_descriptor lea r14, PSI_server loc_3574F: lea eax, [r15+r12] and eax, 7 imul rax, 100120h lea rbx, [rax+r13] add rbx, 2F8h cmp ds:qword_100038[rbx], 0 jz short loc_3579A mov rdi, rbx call translog_buffer_lock mov rdi, rbx call translog_buffer_flush mov rdi, ds:qword_1000D0[rbx] test rdi, rdi jnz short loc_35800 loc_3578E: lea rdi, unk_100090[rbx] call _pthread_mutex_unlock loc_3579A: mov rdi, ds:qword_1000D0[rbx] test rdi, rdi jz short loc_357B7 mov rax, [r14] call qword ptr [rax+48h] mov ds:qword_1000D0[rbx], 0 loc_357B7: lea rdi, unk_100090[rbx] call _pthread_mutex_destroy mov rdi, ds:qword_100070[rbx] test rdi, rdi jnz short loc_357ED loc_357CF: add rbx, 100040h mov rdi, rbx call _pthread_cond_destroy inc r12d cmp r12d, 8 jnz loc_3574F jmp short loc_3580B loc_357ED: mov rax, [r14] call qword ptr [rax+68h] mov ds:qword_100070[rbx], 0 jmp short loc_357CF loc_35800: mov rax, [r14] call qword ptr [rax+160h] jmp short loc_3578E loc_3580B: mov cs:translog_status, 0 lea rdi, qword_3FE258 call pop_dynamic test rax, rax jz short loc_35842 lea rbx, qword_3FE258 loc_3582D: mov rdi, [rax] call translog_close_log_file mov rdi, rbx call pop_dynamic test rax, rax jnz short loc_3582D loc_35842: mov rdi, cs:qword_BFED30 test rdi, rdi jz short loc_3585F mov rax, [r14] call qword ptr [rax+48h] mov cs:qword_BFED30, 0 loc_3585F: lea rdi, unk_BFECF0 call _pthread_mutex_destroy mov rdi, cs:qword_BFEE30 test rdi, rdi jz short loc_35888 mov rax, [r14] call qword ptr [rax+48h] mov cs:qword_BFEE30, 0 loc_35888: lea rdi, unk_BFEDF0 call _pthread_mutex_destroy mov rdi, cs:qword_BFEE78 test rdi, rdi jz short loc_358B1 mov rax, [r14] call qword ptr [rax+48h] mov cs:qword_BFEE78, 0 loc_358B1: lea rdi, unk_BFEE38 call _pthread_mutex_destroy mov rdi, cs:qword_BFEEF0 test rdi, rdi jz short loc_358DA mov rax, [r14] call qword ptr [rax+48h] mov cs:qword_BFEEF0, 0 loc_358DA: lea rdi, unk_BFEEB0 call _pthread_mutex_destroy mov rdi, cs:qword_BFED78 test rdi, rdi jz short loc_35903 mov rax, [r14] call qword ptr [rax+48h] mov cs:qword_BFED78, 0 loc_35903: lea rdi, unk_BFED38 call _pthread_mutex_destroy mov rdi, cs:qword_BFEC70 test rdi, rdi jz short loc_3592C mov rax, [r14] call qword ptr [rax+48h] mov cs:qword_BFEC70, 0 loc_3592C: lea rdi, unk_BFEC30 call _pthread_mutex_destroy mov rdi, cs:qword_BFEDB0 test rdi, rdi jnz loc_35A0C loc_35948: lea rdi, unk_BFED80 call _pthread_cond_destroy mov rdi, cs:qword_BFEDE8 test rdi, rdi jnz loc_35A16 loc_35964: lea rdi, unk_BFEDB8 call _pthread_cond_destroy mov rdi, cs:qword_3FE318 test rdi, rdi jnz loc_35A20 loc_35980: lea rdi, unk_3FE288 call my_rw_destroy lea rdi, qword_3FE258 call delete_dynamic lea rdi, qword_BFEE80 call delete_dynamic mov ebx, cs:dword_3FE320 test ebx, ebx js short loc_359D3 mov rax, [r14] lea rdi, [rbp+var_70] mov esi, ebx mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_35A2A mov esi, 10h mov edi, ebx call my_close loc_359D3: mov rdi, cs:id_to_share test rdi, rdi jz short loc_359E8 add rdi, 8 call my_free loc_359E8: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_359F7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_3572C loc_35A0C: call translog_destroy_cold_1 jmp loc_35948 loc_35A16: call translog_destroy_cold_2 jmp loc_35964 loc_35A20: call translog_destroy_cold_3 jmp loc_35980 loc_35A2A: mov rdi, rax mov esi, ebx call translog_destroy_cold_4 jmp short loc_359D3
long long translog_destroy() { char v0; // r15 long long v1; // rbx char v2; // r15 int i; // r12d long long v4; // rax long long *v5; // rbx _QWORD *j; // rax long long result; // rax unsigned int v8; // ebx long long v9; // rax _BYTE v10[112]; // [rsp+0h] [rbp-70h] BYREF translog_lock(); v0 = BYTE6(xmmword_BFECB0); translog_status = 3 * (translog_status != 2); v1 = *((_QWORD *)&xmmword_BFECA0 + 1); if ( *(long long *)((char *)&qword_100038 + *((_QWORD *)&xmmword_BFECA0 + 1)) ) { translog_finish_page(&qword_BFEC78, &xmmword_BFEC80); v1 = *((_QWORD *)&xmmword_BFECA0 + 1); } if ( *(long long *)((char *)&qword_1000D0 + v1) ) PSI_server[44](); pthread_mutex_unlock(v1 + 1048720); v2 = v0 + 1; for ( i = 0; i != 8; ++i ) { v4 = 131108LL * ((v2 + (_BYTE)i) & 7); v5 = &log_descriptor[v4 + 95]; if ( *(long long *)((char *)&qword_100038 + (_QWORD)v5) ) { translog_buffer_lock((long long)&log_descriptor[v4 + 95]); translog_buffer_flush(v5); if ( *(long long *)((char *)&qword_1000D0 + (_QWORD)v5) ) PSI_server[44](); pthread_mutex_unlock((char *)&unk_100090 + (_QWORD)v5); } if ( *(long long *)((char *)&qword_1000D0 + (_QWORD)v5) ) { PSI_server[9](); *(long long *)((char *)&qword_1000D0 + (_QWORD)v5) = 0LL; } pthread_mutex_destroy((char *)&unk_100090 + (_QWORD)v5); if ( *(long long *)((char *)&qword_100070 + (_QWORD)v5) ) { PSI_server[13](); *(long long *)((char *)&qword_100070 + (_QWORD)v5) = 0LL; } pthread_cond_destroy(v5 + 131080); } translog_status = 0; for ( j = (_QWORD *)pop_dynamic(&qword_3FE258); j; j = (_QWORD *)pop_dynamic(&qword_3FE258) ) translog_close_log_file(*j); if ( qword_BFED30 ) { PSI_server[9](); qword_BFED30 = 0LL; } pthread_mutex_destroy(&unk_BFECF0); if ( qword_BFEE30 ) { PSI_server[9](); qword_BFEE30 = 0LL; } pthread_mutex_destroy(&unk_BFEDF0); if ( qword_BFEE78 ) { PSI_server[9](); qword_BFEE78 = 0LL; } pthread_mutex_destroy(&unk_BFEE38); if ( qword_BFEEF0 ) { PSI_server[9](); qword_BFEEF0 = 0LL; } pthread_mutex_destroy(&unk_BFEEB0); if ( qword_BFED78 ) { PSI_server[9](); qword_BFED78 = 0LL; } pthread_mutex_destroy(&unk_BFED38); if ( qword_BFEC70 ) { PSI_server[9](); qword_BFEC70 = 0LL; } pthread_mutex_destroy(&unk_BFEC30); if ( qword_BFEDB0 ) translog_destroy_cold_1(); pthread_cond_destroy(&unk_BFED80); if ( qword_BFEDE8 ) translog_destroy_cold_2(); pthread_cond_destroy(&unk_BFEDB8); if ( qword_3FE318 ) translog_destroy_cold_3(); my_rw_destroy(&unk_3FE288); delete_dynamic(&qword_3FE258); result = delete_dynamic(&qword_BFEE80); v8 = dword_3FE320; if ( dword_3FE320 >= 0 ) { v9 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, (unsigned int)dword_3FE320, 4LL); if ( v9 ) result = translog_destroy_cold_4(v9, v8); else result = my_close(v8, 16LL); } if ( id_to_share ) return my_free(id_to_share + 8); return result; }
translog_destroy: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 CALL 0x00132e3f MOVZX R15D,byte ptr [0x00cfecb6] XOR EAX,EAX CMP dword ptr [0x004fce20],0x2 SETNZ AL LEA EAX,[RAX + RAX*0x2] MOV dword ptr [0x004fce20],EAX MOV RBX,qword ptr [0x00cfeca8] CMP qword ptr [RBX + 0x100038],0x0 JZ 0x0013571c LEA RDI,[0xcfec78] LEA RSI,[0xcfec80] CALL 0x00135a36 MOV RBX,qword ptr [0x00cfeca8] LAB_0013571c: MOV RDI,qword ptr [RBX + 0x1000d0] TEST RDI,RDI JNZ 0x001359f7 LAB_0013572c: ADD RBX,0x100090 MOV RDI,RBX CALL 0x001291d0 INC R15D XOR R12D,R12D LEA R13,[0x4fe030] LEA R14,[0x486010] LAB_0013574f: LEA EAX,[R15 + R12*0x1] AND EAX,0x7 IMUL RAX,RAX,0x100120 LEA RBX,[RAX + R13*0x1] ADD RBX,0x2f8 CMP qword ptr [RBX + 0x100038],0x0 JZ 0x0013579a MOV RDI,RBX CALL 0x00132edf MOV RDI,RBX CALL 0x00136bad MOV RDI,qword ptr [RBX + 0x1000d0] TEST RDI,RDI JNZ 0x00135800 LAB_0013578e: LEA RDI,[RBX + 0x100090] CALL 0x001291d0 LAB_0013579a: MOV RDI,qword ptr [RBX + 0x1000d0] TEST RDI,RDI JZ 0x001357b7 MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x1000d0],0x0 LAB_001357b7: LEA RDI,[RBX + 0x100090] CALL 0x001290c0 MOV RDI,qword ptr [RBX + 0x100070] TEST RDI,RDI JNZ 0x001357ed LAB_001357cf: ADD RBX,0x100040 MOV RDI,RBX CALL 0x00129270 INC R12D CMP R12D,0x8 JNZ 0x0013574f JMP 0x0013580b LAB_001357ed: MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0x100070],0x0 JMP 0x001357cf LAB_00135800: MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x160] JMP 0x0013578e LAB_0013580b: MOV dword ptr [0x004fce20],0x0 LEA RDI,[0x4fe258] CALL 0x00192407 TEST RAX,RAX JZ 0x00135842 LEA RBX,[0x4fe258] LAB_0013582d: MOV RDI,qword ptr [RAX] CALL 0x00135b1c MOV RDI,RBX CALL 0x00192407 TEST RAX,RAX JNZ 0x0013582d LAB_00135842: MOV RDI,qword ptr [0x00cfed30] TEST RDI,RDI JZ 0x0013585f MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [0x00cfed30],0x0 LAB_0013585f: LEA RDI,[0xcfecf0] CALL 0x001290c0 MOV RDI,qword ptr [0x00cfee30] TEST RDI,RDI JZ 0x00135888 MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [0x00cfee30],0x0 LAB_00135888: LEA RDI,[0xcfedf0] CALL 0x001290c0 MOV RDI,qword ptr [0x00cfee78] TEST RDI,RDI JZ 0x001358b1 MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [0x00cfee78],0x0 LAB_001358b1: LEA RDI,[0xcfee38] CALL 0x001290c0 MOV RDI,qword ptr [0x00cfeef0] TEST RDI,RDI JZ 0x001358da MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [0x00cfeef0],0x0 LAB_001358da: LEA RDI,[0xcfeeb0] CALL 0x001290c0 MOV RDI,qword ptr [0x00cfed78] TEST RDI,RDI JZ 0x00135903 MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [0x00cfed78],0x0 LAB_00135903: LEA RDI,[0xcfed38] CALL 0x001290c0 MOV RDI,qword ptr [0x00cfec70] TEST RDI,RDI JZ 0x0013592c MOV RAX,qword ptr [R14] CALL qword ptr [RAX + 0x48] MOV qword ptr [0x00cfec70],0x0 LAB_0013592c: LEA RDI,[0xcfec30] CALL 0x001290c0 MOV RDI,qword ptr [0x00cfedb0] TEST RDI,RDI JNZ 0x00135a0c LAB_00135948: LEA RDI,[0xcfed80] CALL 0x00129270 MOV RDI,qword ptr [0x00cfede8] TEST RDI,RDI JNZ 0x00135a16 LAB_00135964: LEA RDI,[0xcfedb8] CALL 0x00129270 MOV RDI,qword ptr [0x004fe318] TEST RDI,RDI JNZ 0x00135a20 LAB_00135980: LEA RDI,[0x4fe288] CALL 0x001a4c7c LEA RDI,[0x4fe258] CALL 0x0019256c LEA RDI,[0xcfee80] CALL 0x0019256c MOV EBX,dword ptr [0x004fe320] TEST EBX,EBX JS 0x001359d3 MOV RAX,qword ptr [R14] LEA RDI,[RBP + -0x70] MOV ESI,EBX MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00135a2a MOV ESI,0x10 MOV EDI,EBX CALL 0x001a0e75 LAB_001359d3: MOV RDI,qword ptr [0x00cfef48] TEST RDI,RDI JZ 0x001359e8 ADD RDI,0x8 CALL 0x001a08ce LAB_001359e8: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001359f7: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013572c LAB_00135a0c: CALL 0x0012bca5 JMP 0x00135948 LAB_00135a16: CALL 0x0012bcc0 JMP 0x00135964 LAB_00135a20: CALL 0x0012bcdb JMP 0x00135980 LAB_00135a2a: MOV RDI,RAX MOV ESI,EBX CALL 0x0012bcf6 JMP 0x001359d3
void translog_destroy(void) { long lVar1; int8 *puVar2; int iVar3; uint uVar4; int1 local_78 [72]; translog_lock(); uVar4 = (uint)DAT_00cfecb6; translog_status = (uint)(translog_status != 2) * 3; if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00cfeca8 + 0x2f) != 0) { translog_finish_page(&DAT_00cfec78,&DAT_00cfec80); } lVar1 = DAT_00cfeca8; if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00cfeca8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar1)); iVar3 = 0; do { lVar1 = (ulong)(uVar4 + 1 + iVar3 & 7) * 0x100120; if (*(long *)(&DAT_005fe360 + lVar1) != 0) { translog_buffer_lock(&DAT_004fe328 + lVar1); translog_buffer_flush(&DAT_004fe328 + lVar1); if (*(long *)(&DAT_005fe3f8 + lVar1) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x5fe3b8)); } if (*(long *)(&DAT_005fe3f8 + lVar1) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(&DAT_005fe3f8 + lVar1) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(lVar1 + 0x5fe3b8)); if (*(long *)(&DAT_005fe398 + lVar1) != 0) { (**(code **)(PSI_server + 0x68))(); *(int8 *)(&DAT_005fe398 + lVar1) = 0; } pthread_cond_destroy((pthread_cond_t *)(lVar1 + 0x5fe368)); iVar3 = iVar3 + 1; } while (iVar3 != 8); translog_status = 0; puVar2 = (int8 *)pop_dynamic(&DAT_004fe258); while (puVar2 != (int8 *)0x0) { translog_close_log_file(*puVar2); puVar2 = (int8 *)pop_dynamic(&DAT_004fe258); } if (DAT_00cfed30 != 0) { (**(code **)(PSI_server + 0x48))(); DAT_00cfed30 = 0; } pthread_mutex_destroy((pthread_mutex_t *)&DAT_00cfecf0); if (DAT_00cfee30 != 0) { (**(code **)(PSI_server + 0x48))(); DAT_00cfee30 = 0; } pthread_mutex_destroy((pthread_mutex_t *)&DAT_00cfedf0); if (DAT_00cfee78 != 0) { (**(code **)(PSI_server + 0x48))(); DAT_00cfee78 = 0; } pthread_mutex_destroy((pthread_mutex_t *)&DAT_00cfee38); if (DAT_00cfeef0 != 0) { (**(code **)(PSI_server + 0x48))(); DAT_00cfeef0 = 0; } pthread_mutex_destroy((pthread_mutex_t *)&DAT_00cfeeb0); if (DAT_00cfed78 != 0) { (**(code **)(PSI_server + 0x48))(); DAT_00cfed78 = 0; } pthread_mutex_destroy((pthread_mutex_t *)&DAT_00cfed38); if (DAT_00cfec70 != 0) { (**(code **)(PSI_server + 0x48))(); DAT_00cfec70 = 0; } pthread_mutex_destroy((pthread_mutex_t *)&DAT_00cfec30); if (DAT_00cfedb0 != 0) { translog_destroy_cold_1(); } pthread_cond_destroy((pthread_cond_t *)&DAT_00cfed80); if (DAT_00cfede8 != 0) { translog_destroy_cold_2(); } pthread_cond_destroy((pthread_cond_t *)&DAT_00cfedb8); if (DAT_004fe318 != 0) { translog_destroy_cold_3(); } my_rw_destroy(&DAT_004fe288); delete_dynamic(&DAT_004fe258); delete_dynamic(&DAT_00cfee80); iVar3 = DAT_004fe320; if (-1 < DAT_004fe320) { lVar1 = (**(code **)(PSI_server + 0x158))(local_78,DAT_004fe320,4); if (lVar1 == 0) { my_close(iVar3,0x10); } else { translog_destroy_cold_4(lVar1,iVar3); } } if (id_to_share != 0) { my_free(id_to_share + 8); } return; }
45,494
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx cmpq %rdx, %rsi je 0x63d3a movq %rdx, %r15 movq %rdi, %r14 movq %rdx, %rax subq %rbx, %rax sarq $0x4, %rax movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB imulq %rcx, %rax movq %rax, 0x10(%rsp) movq (%rdi), %rax movq %rax, 0x8(%rsp) leaq 0x10(%rbx), %rbp movq %rdx, %r12 negq %r12 cmpq 0x8(%r14), %r15 je 0x63d0a leaq 0x10(%rbp), %r13 movq %r13, %rdi xorl %esi, %esi callq 0x5d708 movq %r13, %rdi callq 0x62bf6 movq -0x10(%rbp), %rdi cmpq %rdi, %rbp je 0x63cf0 movq (%rbp), %rsi incq %rsi callq 0x1b930 leaq -0x10(%rbp), %rdi movq %r15, %rsi callq 0x63d4c addq $0x30, %r15 addq $0x30, %rbp addq $-0x30, %r12 jmp 0x63cbf subq 0x8(%rsp), %rbx addq (%r14), %r12 negq %r12 sarq $0x4, %r12 movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %r12 subq 0x10(%rsp), %r12 movq %r14, %rdi movq %r12, %rsi callq 0x63da4 addq (%r14), %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi cmp rsi, rdx jz loc_63D3A mov r15, rdx mov r14, rdi mov rax, rdx sub rax, rbx sar rax, 4 mov rcx, 0AAAAAAAAAAAAAAABh imul rax, rcx mov [rsp+48h+var_38], rax mov rax, [rdi] mov [rsp+48h+var_40], rax lea rbp, [rbx+10h] mov r12, rdx neg r12 loc_63CBF: cmp r15, [r14+8] jz short loc_63D0A lea r13, [rbp+10h] mov rdi, r13 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbp-10h]; void * cmp rbp, rdi jz short loc_63CF0 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_63CF0: lea rdi, [rbp-10h] mov rsi, r15 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&) add r15, 30h ; '0' add rbp, 30h ; '0' add r12, 0FFFFFFFFFFFFFFD0h jmp short loc_63CBF loc_63D0A: sub rbx, [rsp+48h+var_40] add r12, [r14] neg r12 sar r12, 4 mov rax, 0AAAAAAAAAAAAAAABh imul r12, rax sub r12, [rsp+48h+var_38] mov rdi, r14 mov rsi, r12 call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE6resizeEm; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::resize(ulong) add rbx, [r14] loc_63D3A: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r15 char *v6; // rbp long long v7; // r12 char *v8; // rdi long long v10; // [rsp+8h] [rbp-40h] unsigned long long v11; // [rsp+10h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = a3; v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 4); v10 = *a1; v6 = (char *)(a2 + 16); v7 = -a3; while ( v4 != a1[1] ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6 + 16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v6 + 16); v8 = (char *)*((_QWORD *)v6 - 2); if ( v6 != v8 ) operator delete(v8, *(_QWORD *)v6 + 1LL); std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair( v6 - 16, v4); v4 += 48LL; v6 += 48; v7 -= 48LL; } std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::resize( a1, 0xAAAAAAAAAAAAAAABLL * (-(*a1 + v7) >> 4) - v11); return *a1 + a2 - v10; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI CMP RSI,RDX JZ 0x00163d3a MOV R15,RDX MOV R14,RDI MOV RAX,RDX SUB RAX,RBX SAR RAX,0x4 MOV RCX,-0x5555555555555555 IMUL RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP + 0x8],RAX LEA RBP,[RBX + 0x10] MOV R12,RDX NEG R12 LAB_00163cbf: CMP R15,qword ptr [R14 + 0x8] JZ 0x00163d0a LEA R13,[RBP + 0x10] MOV RDI,R13 XOR ESI,ESI CALL 0x0015d708 MOV RDI,R13 CALL 0x00162bf6 MOV RDI,qword ptr [RBP + -0x10] CMP RBP,RDI JZ 0x00163cf0 MOV RSI,qword ptr [RBP] INC RSI CALL 0x0011b930 LAB_00163cf0: LEA RDI,[RBP + -0x10] MOV RSI,R15 CALL 0x00163d4c ADD R15,0x30 ADD RBP,0x30 ADD R12,-0x30 JMP 0x00163cbf LAB_00163d0a: SUB RBX,qword ptr [RSP + 0x8] ADD R12,qword ptr [R14] NEG R12 SAR R12,0x4 MOV RAX,-0x5555555555555555 IMUL R12,RAX SUB R12,qword ptr [RSP + 0x10] MOV RDI,R14 MOV RSI,R12 CALL 0x00163da4 ADD RBX,qword ptr [R14] LAB_00163d3a: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >*, std::vector<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > >, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >*, std::vector<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > >) */ pair * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::erase(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,pair *param_2,pair *param_3) { long lVar1; long lVar2; long *plVar3; long lVar4; if (param_2 != param_3) { lVar2 = (long)param_3 - (long)param_2; lVar1 = *(long *)this; plVar3 = (long *)(param_2 + 0x10); lVar4 = -(long)param_3; for (; param_3 != *(pair **)(this + 8); param_3 = param_3 + 0x30) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)(plVar3 + 2),0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)(plVar3 + 2)); if (plVar3 != (long *)plVar3[-2]) { operator_delete((long *)plVar3[-2],*plVar3 + 1); } std:: pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::pair((pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)(plVar3 + -2),param_3); plVar3 = plVar3 + 6; lVar4 = lVar4 + -0x30; } std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::resize((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this,(-(lVar4 + *(long *)this) >> 4) * -0x5555555555555555 + (lVar2 >> 4) * 0x5555555555555555); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
45,495
minja::Value::at(minja::Value const&)
monkey531[P]llama/common/./minja.hpp
Value& at(const Value & index) { if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); if (is_array()) return array_->at(index.get<int>()); if (is_object()) return object_->at(index.primitive_); throw std::runtime_error("Value is not an array or object: " + dump()); }
O0
cpp
minja::Value::at(minja::Value const&): subq $0xd8, %rsp movq %rdi, 0xc8(%rsp) movq %rsi, 0xc0(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0xc0(%rsp), %rdi callq 0xcf6e0 testb $0x1, %al jne 0xd9bcc movb $0x1, 0x73(%rsp) movl $0x10, %edi callq 0x50540 movq 0x20(%rsp), %rsi movq %rax, 0x18(%rsp) leaq 0x80(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x9feb0 jmp 0xd9b18 leaq 0xf7b27(%rip), %rsi # 0x1d1646 leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rdx callq 0x7a6e0 jmp 0xd9b36 movq 0x18(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x50390 jmp 0xd9b4a movq 0x18(%rsp), %rdi movb $0x0, 0x73(%rsp) movq 0x17a455(%rip), %rsi # 0x253fb0 movq 0x17a416(%rip), %rdx # 0x253f78 callq 0x508f0 jmp 0xd9d3a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xd9bb4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xd9ba7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0xa0(%rsp), %rdi callq 0x510c0 leaq 0x80(%rsp), %rdi callq 0x510c0 testb $0x1, 0x73(%rsp) jne 0xd9bbd jmp 0xd9bc7 movq 0x18(%rsp), %rdi callq 0x50c40 jmp 0xd9d30 movq 0x20(%rsp), %rdi callq 0xa4990 testb $0x1, %al jne 0xd9bdc jmp 0xd9c16 movq 0x20(%rsp), %rdi addq $0x10, %rdi callq 0xa19f0 movq %rax, 0x10(%rsp) movq 0xc0(%rsp), %rdi callq 0xd41d0 movq 0x10(%rsp), %rdi movslq %eax, %rsi callq 0xd3f80 movq %rax, 0xd0(%rsp) jmp 0xd9d20 movq 0x20(%rsp), %rdi callq 0xa5180 testb $0x1, %al jne 0xd9c26 jmp 0xd9c55 movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0xa1ad0 movq %rax, %rdi movq 0xc0(%rsp), %rsi addq $0x40, %rsi callq 0xdd550 movq %rax, 0xd0(%rsp) jmp 0xd9d20 movb $0x1, 0x2f(%rsp) movl $0x10, %edi callq 0x50540 movq 0x20(%rsp), %rsi movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x9feb0 jmp 0xd9c81 leaq 0xf7b0a(%rip), %rsi # 0x1d1792 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x7a6e0 jmp 0xd9c99 movq 0x8(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x50390 jmp 0xd9caa movq 0x8(%rsp), %rdi movb $0x0, 0x2f(%rsp) movq 0x17a2f5(%rip), %rsi # 0x253fb0 movq 0x17a2b6(%rip), %rdx # 0x253f78 callq 0x508f0 jmp 0xd9d3a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xd9d0b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) jmp 0xd9d01 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0x50(%rsp), %rdi callq 0x510c0 leaq 0x30(%rsp), %rdi callq 0x510c0 testb $0x1, 0x2f(%rsp) jne 0xd9d14 jmp 0xd9d1e movq 0x8(%rsp), %rdi callq 0x50c40 jmp 0xd9d30 movq 0xd0(%rsp), %rax addq $0xd8, %rsp retq movq 0x78(%rsp), %rdi callq 0x50940 nopw (%rax,%rax)
_ZN5minja5Value2atERKS0_: sub rsp, 0D8h mov [rsp+0D8h+var_10], rdi mov [rsp+0D8h+var_18], rsi mov rax, [rsp+0D8h+var_10] mov [rsp+0D8h+var_B8], rax mov rdi, [rsp+0D8h+var_18]; this call _ZNK5minja5Value11is_hashableEv; minja::Value::is_hashable(void) test al, 1 jnz loc_D9BCC mov [rsp+0D8h+var_65], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+0D8h+var_B8] mov [rsp+0D8h+var_C0], rax lea rdi, [rsp+0D8h+var_58] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_D9B18: lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+0D8h+var_38] lea rdx, [rsp+0D8h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_D9B36: mov rdi, [rsp+0D8h+var_C0] lea rsi, [rsp+0D8h+var_38] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_D9B4A: mov rdi, [rsp+0D8h+var_C0]; void * mov [rsp+0D8h+var_65], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_D9D3A mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_D9BB4 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_D9BA7 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax lea rdi, [rsp+arg_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D9BA7: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D9BB4: test [rsp+arg_6B], 1 jnz short loc_D9BBD jmp short loc_D9BC7 loc_D9BBD: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_D9BC7: jmp loc_D9D30 loc_D9BCC: mov rdi, [rsp+0D8h+var_B8]; this call _ZNK5minja5Value8is_arrayEv; minja::Value::is_array(void) test al, 1 jnz short loc_D9BDC jmp short loc_D9C16 loc_D9BDC: mov rdi, [rsp+0D8h+var_B8] add rdi, 10h call _ZNKSt19__shared_ptr_accessISt6vectorIN5minja5ValueESaIS2_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov [rsp+0D8h+var_C8], rax mov rdi, [rsp+0D8h+var_18] call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) mov rdi, [rsp+0D8h+var_C8] movsxd rsi, eax call _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong) mov [rsp+0D8h+var_8], rax jmp loc_D9D20 loc_D9C16: mov rdi, [rsp+0D8h+var_B8]; this call _ZNK5minja5Value9is_objectEv; minja::Value::is_object(void) test al, 1 jnz short loc_D9C26 jmp short loc_D9C55 loc_D9C26: mov rdi, [rsp+0D8h+var_B8] add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rsi, [rsp+0D8h+var_18] add rsi, 40h ; '@' call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov [rsp+0D8h+var_8], rax jmp loc_D9D20 loc_D9C55: mov [rsp+0D8h+var_A9], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+0D8h+var_B8] mov [rsp+0D8h+var_D0], rax lea rdi, [rsp+0D8h+var_A8] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_D9C81: lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " lea rdi, [rsp+0D8h+var_88] lea rdx, [rsp+0D8h+var_A8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_D9C99: mov rdi, [rsp+0D8h+var_D0] lea rsi, [rsp+0D8h+var_88] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_D9CAA: mov rdi, [rsp+0D8h+var_D0]; void * mov [rsp+0D8h+var_A9], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp short loc_D9D3A mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_D9D0B mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax jmp short loc_D9D01 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D9D01: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D9D0B: test [rsp+arg_27], 1 jnz short loc_D9D14 jmp short loc_D9D1E loc_D9D14: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_D9D1E: jmp short loc_D9D30 loc_D9D20: mov rax, [rsp+0D8h+var_8] add rsp, 0D8h retn loc_D9D30: mov rdi, [rsp+arg_70] call __Unwind_Resume loc_D9D3A: nop word ptr [rax+rax+00h]
long long minja::Value::at(minja::Value *this, const minja::Value *a2) { int v2; // eax long long v3; // rax void *v5; // [rsp+8h] [rbp-D0h] _QWORD *v6; // [rsp+10h] [rbp-C8h] void *exception; // [rsp+18h] [rbp-C0h] _BYTE v8[32]; // [rsp+30h] [rbp-A8h] BYREF _BYTE v9[48]; // [rsp+50h] [rbp-88h] BYREF _BYTE v10[32]; // [rsp+80h] [rbp-58h] BYREF _BYTE v11[32]; // [rsp+A0h] [rbp-38h] BYREF minja::Value *v12; // [rsp+C0h] [rbp-18h] minja::Value *v13; // [rsp+C8h] [rbp-10h] v13 = this; v12 = a2; if ( (minja::Value::is_hashable(a2) & 1) == 0 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(exception, v11); v9[35] = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( minja::Value::is_array(this) ) { v6 = (_QWORD *)std::__shared_ptr_access<std::vector<minja::Value>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 16); v2 = minja::Value::get<int>(v12); return std::vector<minja::Value>::at(v6, v2); } else { if ( !minja::Value::is_object(this) ) { v5 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v9, (long long)"Value is not an array or object: ", (long long)v8); std::runtime_error::runtime_error(v5, v9); __cxa_throw( v5, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)this + 32); return nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at( v3, (char *)v12 + 64); } }
at: SUB RSP,0xd8 MOV qword ptr [RSP + 0xc8],RDI MOV qword ptr [RSP + 0xc0],RSI MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0xc0] CALL 0x001cf6e0 TEST AL,0x1 JNZ 0x001d9bcc MOV byte ptr [RSP + 0x73],0x1 MOV EDI,0x10 CALL 0x00150540 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX LAB_001d9b02: LEA RDI,[RSP + 0x80] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0019feb0 JMP 0x001d9b18 LAB_001d9b18: LEA RSI,[0x2d1646] LEA RDI,[RSP + 0xa0] LEA RDX,[RSP + 0x80] CALL 0x0017a6e0 JMP 0x001d9b36 LAB_001d9b36: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xa0] CALL 0x00150390 JMP 0x001d9b4a LAB_001d9b4a: MOV RDI,qword ptr [RSP + 0x18] MOV byte ptr [RSP + 0x73],0x0 MOV RSI,qword ptr [0x00353fb0] MOV RDX,qword ptr [0x00353f78] CALL 0x001508f0 LAB_001d9bcc: MOV RDI,qword ptr [RSP + 0x20] CALL 0x001a4990 TEST AL,0x1 JNZ 0x001d9bdc JMP 0x001d9c16 LAB_001d9bdc: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x10 CALL 0x001a19f0 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0xc0] CALL 0x001d41d0 MOV RDI,qword ptr [RSP + 0x10] MOVSXD RSI,EAX CALL 0x001d3f80 MOV qword ptr [RSP + 0xd0],RAX JMP 0x001d9d20 LAB_001d9c16: MOV RDI,qword ptr [RSP + 0x20] CALL 0x001a5180 TEST AL,0x1 JNZ 0x001d9c26 JMP 0x001d9c55 LAB_001d9c26: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x001a1ad0 MOV RDI,RAX MOV RSI,qword ptr [RSP + 0xc0] ADD RSI,0x40 CALL 0x001dd550 MOV qword ptr [RSP + 0xd0],RAX JMP 0x001d9d20 LAB_001d9c55: MOV byte ptr [RSP + 0x2f],0x1 MOV EDI,0x10 CALL 0x00150540 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX LAB_001d9c6e: LEA RDI,[RSP + 0x30] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0019feb0 JMP 0x001d9c81 LAB_001d9c81: LEA RSI,[0x2d1792] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x30] CALL 0x0017a6e0 JMP 0x001d9c99 LAB_001d9c99: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x50] CALL 0x00150390 JMP 0x001d9caa LAB_001d9caa: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x2f],0x0 MOV RSI,qword ptr [0x00353fb0] MOV RDX,qword ptr [0x00353f78] CALL 0x001508f0 LAB_001d9d20: MOV RAX,qword ptr [RSP + 0xd0] ADD RSP,0xd8 RET
/* minja::Value::at(minja::Value const&) */ int8 __thiscall minja::Value::at(Value *this,Value *param_1) { int iVar1; ulong uVar2; runtime_error *prVar3; vector<minja::Value,std::allocator<minja::Value>> *this_00; ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this_01; int1 local_a8 [32]; string local_88 [35]; int1 local_65; int1 local_58 [32]; string local_38 [32]; Value *local_18; Value *local_10; int8 local_8; local_18 = param_1; local_10 = this; uVar2 = is_hashable(param_1); if ((uVar2 & 1) == 0) { local_65 = 1; prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001d9b02 to 001d9b15 has its CatchHandler @ 001d9b6c */ dump_abi_cxx11_((int)local_58,SUB81(this,0)); /* try { // try from 001d9b18 to 001d9b33 has its CatchHandler @ 001d9b7c */ std::operator+((char *)local_38,(string *)"Unashable type: "); /* try { // try from 001d9b36 to 001d9b66 has its CatchHandler @ 001d9b8c */ std::runtime_error::runtime_error(prVar3,local_38); local_65 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78); } uVar2 = is_array(this); if ((uVar2 & 1) == 0) { uVar2 = is_object(this); if ((uVar2 & 1) == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001d9c6e to 001d9c7e has its CatchHandler @ 001d9cc9 */ dump_abi_cxx11_((int)local_a8,SUB81(this,0)); /* try { // try from 001d9c81 to 001d9c96 has its CatchHandler @ 001d9cd9 */ std::operator+((char *)local_88,(string *)"Value is not an array or object: "); /* try { // try from 001d9c99 to 001d9cc6 has its CatchHandler @ 001d9ce9 */ std::runtime_error::runtime_error(prVar3,local_88); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78); } this_01 = (ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)std:: __shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x20)); local_8 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::at(this_01,(basic_json *)(local_18 + 0x40)); } else { this_00 = (vector<minja::Value,std::allocator<minja::Value>> *) std:: __shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<std::vector<minja::Value,std::allocator<minja::Value>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0x10)); iVar1 = get<int>(local_18); local_8 = std::vector<minja::Value,std::allocator<minja::Value>>::at(this_00,(long)iVar1); } return local_8; }
45,496
minja::Value::at(minja::Value const&)
monkey531[P]llama/common/./minja.hpp
Value& at(const Value & index) { if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); if (is_array()) return array_->at(index.get<int>()); if (is_object()) return object_->at(index.primitive_); throw std::runtime_error("Value is not an array or object: " + dump()); }
O3
cpp
minja::Value::at(minja::Value const&): pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rsi) jne 0x54869 cmpq $0x0, 0x20(%rsi) jne 0x54869 cmpq $0x0, 0x30(%rsi) jne 0x54869 movq 0x10(%r14), %rbx testq %rbx, %rbx je 0x5484f movq %rsi, %rdi callq 0x51e3a movslq %eax, %rsi movq (%rbx), %rax movq 0x8(%rbx), %rcx subq %rax, %rcx sarq $0x4, %rcx movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD imulq %rcx, %rdx cmpq %rsi, %rdx jbe 0x548c6 leaq (%rsi,%rsi,4), %rcx shlq $0x4, %rcx addq %rcx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x20(%r14), %rdi testq %rdi, %rdi je 0x548d4 addq $0x40, %rsi addq $0x40, %rsp popq %rbx popq %r14 popq %rbp jmp 0x55d88 movl $0x10, %edi callq 0x18360 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x3dcdc leaq 0x66601(%rip), %rsi # 0xbae90 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x30c3b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x18a80 xorl %ebp, %ebp movq 0x9b73b(%rip), %rsi # 0xefff0 movq 0x9b6c4(%rip), %rdx # 0xeff80 movq %rbx, %rdi callq 0x18b30 jmp 0x5492f leaq 0x66731(%rip), %rdi # 0xbaffe xorl %eax, %eax callq 0x189e0 movl $0x10, %edi callq 0x18360 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x3dcdc leaq 0x666e2(%rip), %rsi # 0xbafdc leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x30c3b movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x18a80 xorl %ebp, %ebp movq 0x9b6d0(%rip), %rsi # 0xefff0 movq 0x9b659(%rip), %rdx # 0xeff80 movq %rbx, %rdi callq 0x18b30 jmp 0x54935 jmp 0x54975 jmp 0x54995 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x54953 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5496e movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x54998 jmp 0x549a0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x54998 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x54998 movq %rax, %r14 movq %rbx, %rdi callq 0x18500 movq %r14, %rdi callq 0x18b90
_ZN5minja5Value2atERKS0_: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rsi+10h], 0 jnz short loc_54869 cmp qword ptr [rsi+20h], 0 jnz short loc_54869 cmp qword ptr [rsi+30h], 0 jnz short loc_54869 mov rbx, [r14+10h] test rbx, rbx jz short loc_5484F mov rdi, rsi call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) movsxd rsi, eax mov rax, [rbx] mov rcx, [rbx+8] sub rcx, rax sar rcx, 4 mov rdx, 0CCCCCCCCCCCCCCCDh imul rdx, rcx cmp rdx, rsi jbe loc_548C6 lea rcx, [rsi+rsi*4] shl rcx, 4 add rax, rcx add rsp, 40h pop rbx pop r14 pop rbp retn loc_5484F: mov rdi, [r14+20h] test rdi, rdi jz short loc_548D4 add rsi, 40h ; '@' add rsp, 40h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::at(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&) loc_54869: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_5492F loc_548C6: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) loc_548D4: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_5492F: jmp short loc_54935 jmp short loc_54975 jmp short loc_54995 loc_54935: mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_54953 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_54953: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5496E mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5496E: test bpl, bpl jnz short loc_54998 jmp short loc_549A0 loc_54975: mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_54998 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_54998 loc_54995: mov r14, rax loc_54998: mov rdi, rbx; void * call ___cxa_free_exception loc_549A0: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Value::at(minja::Value *this, const minja::Value *a2) { _QWORD *v3; // rbx unsigned long long v4; // rsi unsigned long long v5; // rdx long long v7; // rdi void *exception; // rbx void *v9; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v11[16]; // [rsp+20h] [rbp-38h] BYREF if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(exception, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = (_QWORD *)*((_QWORD *)this + 2); if ( v3 ) { v4 = (int)minja::Value::get<int>(a2); v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4); if ( v5 <= v4 ) std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v4, v5); return 80 * v4 + *v3; } else { v7 = *((_QWORD *)this + 4); if ( !v7 ) { v9 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Value is not an array or object: ", (long long)v10); std::runtime_error::runtime_error(v9, v11); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at( v7, (char *)a2 + 64); } }
at: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RSI + 0x10],0x0 JNZ 0x00154869 CMP qword ptr [RSI + 0x20],0x0 JNZ 0x00154869 CMP qword ptr [RSI + 0x30],0x0 JNZ 0x00154869 MOV RBX,qword ptr [R14 + 0x10] TEST RBX,RBX JZ 0x0015484f MOV RDI,RSI CALL 0x00151e3a MOVSXD RSI,EAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] SUB RCX,RAX SAR RCX,0x4 MOV RDX,-0x3333333333333333 IMUL RDX,RCX CMP RDX,RSI JBE 0x001548c6 LEA RCX,[RSI + RSI*0x4] SHL RCX,0x4 ADD RAX,RCX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_0015484f: MOV RDI,qword ptr [R14 + 0x20] TEST RDI,RDI JZ 0x001548d4 ADD RSI,0x40 ADD RSP,0x40 POP RBX POP R14 POP RBP JMP 0x00155d88 LAB_00154869: MOV EDI,0x10 CALL 0x00118360 MOV RBX,RAX LAB_00154876: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0013dcdc LAB_00154888: LEA RSI,[0x1bae90] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00130c3b MOV BPL,0x1 LAB_0015489f: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00118a80 XOR EBP,EBP MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,RBX CALL 0x00118b30 LAB_001548c6: LEA RDI,[0x1baffe] XOR EAX,EAX CALL 0x001189e0 LAB_001548d4: MOV EDI,0x10 CALL 0x00118360 MOV RBX,RAX LAB_001548e1: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0013dcdc LAB_001548f3: LEA RSI,[0x1bafdc] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00130c3b MOV BPL,0x1 LAB_0015490a: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00118a80 XOR EBP,EBP MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,RBX CALL 0x00118b30
/* minja::Value::at(minja::Value const&) */ long __thiscall minja::Value::at(Value *this,Value *param_1) { long *plVar1; int iVar2; long lVar3; runtime_error *prVar4; ulong uVar5; ulong uVar6; int1 auStack_58 [32]; string local_38 [32]; if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { plVar1 = *(long **)(this + 0x10); if (plVar1 == (long *)0x0) { if (*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20) != (ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)0x0) { lVar3 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::at(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20),(basic_json *)(param_1 + 0x40)); return lVar3; } } else { iVar2 = get<int>(param_1); uVar6 = (ulong)iVar2; uVar5 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333; if (uVar6 <= uVar5 && uVar5 - uVar6 != 0) { return *plVar1 + uVar6 * 0x50; } std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"); } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001548e1 to 001548f2 has its CatchHandler @ 00154933 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001548f3 to 00154906 has its CatchHandler @ 00154931 */ std::operator+((char *)local_38,(string *)"Value is not an array or object: "); /* try { // try from 0015490a to 0015492e has its CatchHandler @ 0015492f */ std::runtime_error::runtime_error(prVar4,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00154876 to 00154887 has its CatchHandler @ 00154995 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 00154888 to 0015489b has its CatchHandler @ 00154975 */ std::operator+((char *)local_38,(string *)"Unashable type: "); /* try { // try from 0015489f to 001548c3 has its CatchHandler @ 00154935 */ std::runtime_error::runtime_error(prVar4,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); }
45,497
blst_p1_affine_compress
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c
void blst_p1_affine_compress(unsigned char out[48], const POINTonE1_affine *in) { if (vec_is_zero(in->X, 2*sizeof(in->X))) { bytes_zero(out, 48); out[0] = 0xc0; /* compressed and infinity bits */ } else { limb_t sign = POINTonE1_affine_Compress_BE(out, in); out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4)); } }
O0
c
blst_p1_affine_compress: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0x60, %esi callq 0x23820 cmpq $0x0, %rax je 0x23c4b movq -0x8(%rbp), %rdi movl $0x30, %esi callq 0x23ad0 movq -0x8(%rbp), %rax movb $-0x40, (%rax) jmp 0x23c7c movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x23c90 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax andq $0x2, %rax shlq $0x4, %rax orq $0x80, %rax movzbl %al, %edx movq -0x8(%rbp), %rax movzbl (%rax), %ecx orl %edx, %ecx movb %cl, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
blst_p1_affine_compress: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] mov esi, 60h ; '`' call vec_is_zero cmp rax, 0 jz short loc_23C4B mov rdi, [rbp+var_8] mov esi, 30h ; '0' call bytes_zero mov rax, [rbp+var_8] mov byte ptr [rax], 0C0h jmp short loc_23C7C loc_23C4B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call POINTonE1_affine_Compress_BE mov [rbp+var_18], rax mov rax, [rbp+var_18] and rax, 2 shl rax, 4 or rax, 80h movzx edx, al mov rax, [rbp+var_8] movzx ecx, byte ptr [rax] or ecx, edx mov [rax], cl loc_23C7C: add rsp, 20h pop rbp retn
_BYTE * blst_p1_affine_compress(_BYTE *a1, long long a2) { _BYTE *result; // rax char v3; // dl if ( vec_is_zero(a2, 0x60uLL) ) { bytes_zero((long long)a1, 0x30uLL); result = a1; *a1 = -64; } else { v3 = (16 * (POINTonE1_affine_Compress_BE(a1, a2) & 2)) | 0x80; result = a1; *a1 |= v3; } return result; }
blst_p1_affine_compress: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x60 CALL 0x00123820 CMP RAX,0x0 JZ 0x00123c4b MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x30 CALL 0x00123ad0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0xc0 JMP 0x00123c7c LAB_00123c4b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00123c90 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x2 SHL RAX,0x4 OR RAX,0x80 MOVZX EDX,AL MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX] OR ECX,EDX MOV byte ptr [RAX],CL LAB_00123c7c: ADD RSP,0x20 POP RBP RET
void blst_p1_affine_compress(byte *param_1,int8 param_2) { long lVar1; ulong uVar2; lVar1 = vec_is_zero(param_2,0x60); if (lVar1 == 0) { uVar2 = POINTonE1_affine_Compress_BE(param_1,param_2); *param_1 = *param_1 | (byte)((uVar2 & 2) << 4) | 0x80; } else { bytes_zero(param_1,0x30); *param_1 = 0xc0; } return; }
45,498
re_parse_disjunction
bluesky950520[P]quickjs/libregexp.c
static int re_parse_disjunction(REParseState *s, BOOL is_backward_dir) { int start, len, pos; if (lre_check_stack_overflow(s->opaque, 0)) return re_parse_error(s, "stack overflow"); start = s->byte_code.size; if (re_parse_alternative(s, is_backward_dir)) return -1; while (*s->buf_ptr == '|') { s->buf_ptr++; len = s->byte_code.size - start; /* insert a split before the first alternative */ if (dbuf_insert(&s->byte_code, start, 5)) { return re_parse_out_of_memory(s); } s->byte_code.buf[start] = REOP_split_next_first; put_u32(s->byte_code.buf + start + 1, len + 5); pos = re_emit_op_u32(s, REOP_goto, 0); if (re_parse_alternative(s, is_backward_dir)) return -1; /* patch the goto */ len = s->byte_code.size - (pos + 4); put_u32(s->byte_code.buf + pos, len); } return 0; }
O3
c
re_parse_disjunction: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %r14d movq %rdi, %rbx movq 0x68(%rdi), %rdi xorl %esi, %esi callq 0x3373f testl %eax, %eax je 0x96a52 leaq 0xe303(%rip), %rsi # 0xa4d41 movq %rbx, %rdi xorl %eax, %eax callq 0x96b33 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0x96b22 movq 0x8(%rbx), %r15 movq %rbx, %rdi movl %r14d, %esi callq 0x97d01 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testl %eax, %eax jne 0x96b22 movq 0x30(%rbx), %rax cmpb $0x7c, (%rax) jne 0x96b0d movslq %r15d, %r13 incq %rax movq %rax, 0x30(%rbx) movq 0x8(%rbx), %r12 movq %rbx, %rdi movl %r15d, %esi movl $0x5, %edx callq 0x990b1 testl %eax, %eax jne 0x96b11 subl %r15d, %r12d movq (%rbx), %rax movb $0xa, (%rax,%r13) movq (%rbx), %rax addl $0x5, %r12d movl %r12d, 0x1(%rax,%r13) movq %rbx, %rdi movl $0x8, %esi callq 0x1b1c5 movq 0x8(%rbx), %r12 movl $0x0, 0x4(%rsp) movl $0x4, %edx movq %rbx, %rdi leaq 0x4(%rsp), %rsi callq 0x1b116 movq %rbx, %rdi movl %r14d, %esi callq 0x97d01 testl %eax, %eax jne 0x96b22 movl 0x8(%rbx), %eax subl %r12d, %eax addl $-0x4, %eax movq (%rbx), %rcx movslq %r12d, %rdx movl %eax, (%rcx,%rdx) movq 0x30(%rbx), %rax cmpb $0x7c, (%rax) je 0x96a7e xorl %ebp, %ebp jmp 0x96b22 leaq 0x9a30(%rip), %rsi # 0xa0548 movq %rbx, %rdi xorl %eax, %eax callq 0x96b33 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
re_parse_disjunction: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, esi mov rbx, rdi mov rdi, [rdi+68h] xor esi, esi call lre_check_stack_overflow test eax, eax jz short loc_96A52 lea rsi, aStackOverflow; "stack overflow" mov rdi, rbx xor eax, eax call re_parse_error mov ebp, 0FFFFFFFFh jmp loc_96B22 loc_96A52: mov r15, [rbx+8] mov rdi, rbx mov esi, r14d call re_parse_alternative mov ebp, 0FFFFFFFFh test eax, eax jnz loc_96B22 mov rax, [rbx+30h] cmp byte ptr [rax], 7Ch ; '|' jnz loc_96B0D movsxd r13, r15d loc_96A7E: inc rax mov [rbx+30h], rax mov r12, [rbx+8] mov rdi, rbx mov esi, r15d mov edx, 5 call dbuf_insert test eax, eax jnz short loc_96B11 sub r12d, r15d mov rax, [rbx] mov byte ptr [rax+r13], 0Ah mov rax, [rbx] add r12d, 5 mov [rax+r13+1], r12d mov rdi, rbx mov esi, 8 call dbuf_putc mov r12, [rbx+8] mov [rsp+38h+var_34], 0 mov edx, 4 mov rdi, rbx lea rsi, [rsp+38h+var_34] call dbuf_put mov rdi, rbx mov esi, r14d call re_parse_alternative test eax, eax jnz short loc_96B22 mov eax, [rbx+8] sub eax, r12d add eax, 0FFFFFFFCh mov rcx, [rbx] movsxd rdx, r12d mov [rcx+rdx], eax mov rax, [rbx+30h] cmp byte ptr [rax], 7Ch ; '|' jz loc_96A7E loc_96B0D: xor ebp, ebp jmp short loc_96B22 loc_96B11: lea rsi, aOutOfMemory; "out of memory" mov rdi, rbx xor eax, eax call re_parse_error loc_96B22: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long re_parse_disjunction(_QWORD *a1, unsigned int a2) { long long v2; // rax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d unsigned int v7; // ebp long long v8; // r15 _BYTE *v9; // rax long long v10; // r12 int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d long long v15; // r12 _DWORD v17[13]; // [rsp+0h] [rbp-34h] BYREF v17[0] = HIDWORD(v2); if ( lre_check_stack_overflow(a1[13], 0LL) ) { re_parse_error((_DWORD)a1, (unsigned int)"stack overflow", v3, v4, v5, v6); return (unsigned int)-1; } else { v8 = a1[1]; v7 = -1; if ( !(unsigned int)re_parse_alternative(a1, a2) ) { v9 = (_BYTE *)a1[6]; if ( *v9 == 124 ) { while ( 1 ) { a1[6] = v9 + 1; v10 = a1[1]; if ( (unsigned int)dbuf_insert(a1, (unsigned int)v8, 5LL) ) break; *(_BYTE *)(*a1 + (int)v8) = 10; *(_DWORD *)(*a1 + (int)v8 + 1LL) = v10 - v8 + 5; dbuf_putc(a1, 8); v15 = a1[1]; v17[0] = 0; dbuf_put(a1, (long long)v17, 4LL); if ( (unsigned int)re_parse_alternative(a1, a2) ) return v7; *(_DWORD *)(*a1 + (int)v15) = *((_DWORD *)a1 + 2) - v15 - 4; v9 = (_BYTE *)a1[6]; if ( *v9 != 124 ) return 0; } re_parse_error((_DWORD)a1, (unsigned int)"out of memory", v11, v12, v13, v14); } else { return 0; } } } return v7; }
re_parse_disjunction: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,ESI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x68] XOR ESI,ESI CALL 0x0013373f TEST EAX,EAX JZ 0x00196a52 LEA RSI,[0x1a4d41] MOV RDI,RBX XOR EAX,EAX CALL 0x00196b33 MOV EBP,0xffffffff JMP 0x00196b22 LAB_00196a52: MOV R15,qword ptr [RBX + 0x8] MOV RDI,RBX MOV ESI,R14D CALL 0x00197d01 MOV EBP,0xffffffff TEST EAX,EAX JNZ 0x00196b22 MOV RAX,qword ptr [RBX + 0x30] CMP byte ptr [RAX],0x7c JNZ 0x00196b0d MOVSXD R13,R15D LAB_00196a7e: INC RAX MOV qword ptr [RBX + 0x30],RAX MOV R12,qword ptr [RBX + 0x8] MOV RDI,RBX MOV ESI,R15D MOV EDX,0x5 CALL 0x001990b1 TEST EAX,EAX JNZ 0x00196b11 SUB R12D,R15D MOV RAX,qword ptr [RBX] MOV byte ptr [RAX + R13*0x1],0xa MOV RAX,qword ptr [RBX] ADD R12D,0x5 MOV dword ptr [RAX + R13*0x1 + 0x1],R12D MOV RDI,RBX MOV ESI,0x8 CALL 0x0011b1c5 MOV R12,qword ptr [RBX + 0x8] MOV dword ptr [RSP + 0x4],0x0 MOV EDX,0x4 MOV RDI,RBX LEA RSI,[RSP + 0x4] CALL 0x0011b116 MOV RDI,RBX MOV ESI,R14D CALL 0x00197d01 TEST EAX,EAX JNZ 0x00196b22 MOV EAX,dword ptr [RBX + 0x8] SUB EAX,R12D ADD EAX,-0x4 MOV RCX,qword ptr [RBX] MOVSXD RDX,R12D MOV dword ptr [RCX + RDX*0x1],EAX MOV RAX,qword ptr [RBX + 0x30] CMP byte ptr [RAX],0x7c JZ 0x00196a7e LAB_00196b0d: XOR EBP,EBP JMP 0x00196b22 LAB_00196b11: LEA RSI,[0x1a0548] MOV RDI,RBX XOR EAX,EAX CALL 0x00196b33 LAB_00196b22: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 re_parse_disjunction(long *param_1,int4 param_2) { ulong uVar1; long lVar2; int iVar3; int iVar4; ulong in_RAX; char *pcVar5; int8 uVar6; int8 uStack_38; uStack_38 = in_RAX; iVar3 = lre_check_stack_overflow(param_1[0xd],0); if (iVar3 == 0) { uVar1 = param_1[1]; iVar3 = re_parse_alternative(param_1,param_2); uVar6 = 0xffffffff; if (iVar3 == 0) { pcVar5 = (char *)param_1[6]; if (*pcVar5 == '|') { iVar3 = (int)uVar1; do { param_1[6] = (long)(pcVar5 + 1); lVar2 = param_1[1]; iVar4 = dbuf_insert(param_1,uVar1 & 0xffffffff,5); if (iVar4 != 0) { re_parse_error(param_1,"out of memory"); return 0xffffffff; } *(int1 *)(*param_1 + (long)iVar3) = 10; *(int *)(*param_1 + 1 + (long)iVar3) = ((int)lVar2 - iVar3) + 5; dbuf_putc(param_1,8); lVar2 = param_1[1]; uStack_38 = uStack_38 & 0xffffffff; dbuf_put(param_1,(long)&uStack_38 + 4,4); iVar4 = re_parse_alternative(param_1,param_2); if (iVar4 != 0) { return 0xffffffff; } *(int *)(*param_1 + (long)(int)lVar2) = ((int)param_1[1] - (int)lVar2) + -4; pcVar5 = (char *)param_1[6]; } while (*pcVar5 == '|'); } uVar6 = 0; } } else { re_parse_error(param_1,"stack overflow"); uVar6 = 0xffffffff; } return uVar6; }
45,499
ftxui::borderRounded(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/border.cpp
Element borderRounded(Element child) { return std::make_shared<Border>(unpack(std::move(child)), ROUNDED); }
O2
cpp
ftxui::borderRounded(std::shared_ptr<ftxui::Node>): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 leaq 0x28(%rsp), %rbx movups (%rsi), %xmm0 andq $0x0, 0x8(%rsi) movaps %xmm0, -0x8(%rbx) andq $0x0, (%rsi) leaq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x1d99c leaq 0x4(%rsp), %rdx movl $0x4, (%rdx) leaq 0x30(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x1c48a leaq 0x38(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%r14) andq $0x0, -0x8(%rdi) callq 0x13452 leaq 0x8(%rsp), %rdi callq 0x13b2c movq %rbx, %rdi callq 0x13452 movq %r14, %rax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x13b2c jmp 0x1c973 movq %rax, %r14 movq %rbx, %rdi callq 0x13452 movq %r14, %rdi callq 0xc7f0
_ZN5ftxui13borderRoundedESt10shared_ptrINS_4NodeEE: push r14 push rbx sub rsp, 48h mov r14, rdi lea rbx, [rsp+58h+var_30] movups xmm0, xmmword ptr [rsi] and qword ptr [rsi+8], 0 movaps xmmword ptr [rbx-8], xmm0 and qword ptr [rsi], 0 lea rdi, [rsp+58h+var_50] lea rsi, [rsp+58h+var_38] call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>) lea rdx, [rsp+58h+var_54] mov dword ptr [rdx], 4 lea rdi, [rsp+58h+var_28] lea rsi, [rsp+58h+var_50] call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_16BorderEJSt6vectorISt10shared_ptrINS0_4NodeEESaIS6_EENS0_11BorderStyleEEES4_IT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::Border,std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle>(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle &&) lea rdi, [rsp+58h+var_20] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [r14], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+58h+var_50] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, r14 add rsp, 48h pop rbx pop r14 retn mov r14, rax lea rdi, [rsp+arg_0] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_1C973 mov r14, rax loc_1C973: mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
_OWORD * ftxui::borderRounded(_OWORD *a1, __int128 *a2) { __int128 v2; // xmm0 __int128 v3; // xmm0 unsigned int v5; // [rsp+4h] [rbp-54h] BYREF __int128 v6; // [rsp+8h] [rbp-50h] BYREF __int128 v7; // [rsp+20h] [rbp-38h] BYREF _OWORD v8[2]; // [rsp+30h] [rbp-28h] BYREF v2 = *a2; *((_QWORD *)a2 + 1) = 0LL; v7 = v2; *(_QWORD *)a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>>(&v6, &v7); v5 = 4; std::make_shared<ftxui::`anonymous namespace'::Border,std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle>( v8, &v6, &v5); v3 = v8[0]; *((_QWORD *)&v8[0] + 1) = 0LL; *a1 = v3; *(_QWORD *)&v8[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v8 + 1); std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v6); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v7 + 1); return a1; }
borderRounded: PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI LEA RBX,[RSP + 0x28] MOVUPS XMM0,xmmword ptr [RSI] AND qword ptr [RSI + 0x8],0x0 MOVAPS xmmword ptr [RBX + -0x8],XMM0 AND qword ptr [RSI],0x0 LAB_0011c900: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x20] CALL 0x0011d99c LEA RDX,[RSP + 0x4] MOV dword ptr [RDX],0x4 LAB_0011c91a: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x8] CALL 0x0011c48a LAB_0011c929: LEA RDI,[RSP + 0x38] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [R14],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x00113452 LEA RDI,[RSP + 0x8] CALL 0x00113b2c MOV RDI,RBX CALL 0x00113452 MOV RAX,R14 ADD RSP,0x48 POP RBX POP R14 RET
/* ftxui::borderRounded(std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::borderRounded(ftxui *this,int8 *param_2) { int8 uVar1; ftxui local_50 [24]; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; int8 local_28; int8 auStack_20 [2]; local_38 = *(int4 *)param_2; uStack_34 = *(int4 *)((long)param_2 + 4); uStack_30 = *(int4 *)(param_2 + 1); uStack_2c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 0011c900 to 0011c90e has its CatchHandler @ 0011c970 */ unpack<std::shared_ptr<ftxui::Node>>(local_50,&local_38); /* try { // try from 0011c91a to 0011c928 has its CatchHandler @ 0011c961 */ std:: make_shared<ftxui::(anonymous_namespace)::Border,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>,ftxui::BorderStyle> ((vector *)&local_28,(BorderStyle *)local_50); uVar1 = auStack_20[0]; auStack_20[0] = 0; *(int8 *)this = local_28; *(int8 *)(this + 8) = uVar1; local_28 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_20); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) local_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30); return this; }