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
21,900
mag_machine_probe_cpu_name
magnetron/magnetron/magnetron.c
static void MAG_COLDPROC mag_machine_probe_cpu_name(char (*out_cpu_name)[128]) { /* Get CPU name */ #ifdef _WIN32 HKEY key; if (mag_unlikely(RegOpenKeyExA(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_READ, &key))) return; char tmp[64+1] = {0}; DWORD len = sizeof(tmp); if (mag_unlikely(RegQueryValueExA(key, "ProcessorNameString", NULL, NULL, (LPBYTE)tmp, &len))) return; if (mag_likely(strlen(tmp))) tmp[strlen(tmp)-1] = '\0'; snprintf(*out_cpu_name, sizeof(*out_cpu_name), "%s", tmp); #elif defined(__APPLE__) size_t len; uint8_t tmp[256]; if (mag_likely(mag_sysctl_key(&tmp, &len, "machdep.cpu.brand_string") && len && *tmp)) snprintf(*out_cpu_name, sizeof(*out_cpu_name), "%s", (const char*)tmp); #else char cpu_name[128]; if (mag_likely((mag_cpuinfo_parse_value("model name", &cpu_name) && *cpu_name) || (mag_cpuinfo_parse_value("Model", &cpu_name) && *cpu_name))) snprintf(*out_cpu_name, sizeof(*out_cpu_name), "%s", cpu_name); #endif }
O0
c
mag_machine_probe_cpu_name: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) leaq 0x1a8857(%rip), %rdi # 0x1c398d leaq -0x90(%rbp), %rsi callq 0x1be20 testb $0x1, %al jne 0x1b148 jmp 0x1b15c movsbl -0x90(%rbp), %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x91(%rbp) jne 0x1b19f leaq 0x1a8835(%rip), %rdi # 0x1c3998 leaq -0x90(%rbp), %rsi callq 0x1be20 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0x92(%rbp) jne 0x1b180 jmp 0x1b193 movsbl -0x90(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x92(%rbp) movb -0x92(%rbp), %al movb %al, -0x91(%rbp) movb -0x91(%rbp), %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x1b1d4 movq -0x8(%rbp), %rdi leaq -0x90(%rbp), %rcx movl $0x80, %esi leaq 0x1aaab0(%rip), %rdx # 0x1c5c7d movb $0x0, %al callq 0xf280 addq $0xa0, %rsp popq %rbp retq nopl (%rax)
mag_machine_probe_cpu_name: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_8], rdi lea rdi, aModelName; "model name" lea rsi, [rbp+var_90] call mag_cpuinfo_parse_value test al, 1 jnz short loc_1B148 jmp short loc_1B15C loc_1B148: movsx ecx, [rbp+var_90] mov al, 1 cmp ecx, 0 mov [rbp+var_91], al jnz short loc_1B19F loc_1B15C: lea rdi, aModel; "Model" lea rsi, [rbp+var_90] call mag_cpuinfo_parse_value mov cl, al xor eax, eax test cl, 1 mov [rbp+var_92], al jnz short loc_1B180 jmp short loc_1B193 loc_1B180: movsx eax, [rbp+var_90] cmp eax, 0 setnz al mov [rbp+var_92], al loc_1B193: mov al, [rbp+var_92] mov [rbp+var_91], al loc_1B19F: mov al, [rbp+var_91] xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_1B1D4 mov rdi, [rbp+var_8] lea rcx, [rbp+var_90] mov esi, 80h lea rdx, aSDAssertionFai_50+4Eh; "%s" mov al, 0 call _snprintf loc_1B1D4: add rsp, 0A0h pop rbp retn
long long mag_machine_probe_cpu_name(long long a1) { long long result; // rax bool v2; // [rsp+Eh] [rbp-92h] char v3; // [rsp+Fh] [rbp-91h] char v4[136]; // [rsp+10h] [rbp-90h] BYREF long long v5; // [rsp+98h] [rbp-8h] v5 = a1; if ( (mag_cpuinfo_parse_value("model name", v4) & 1) == 0 || (v3 = 1, !v4[0]) ) { v2 = 0; if ( (mag_cpuinfo_parse_value("Model", v4) & 1) != 0 ) v2 = v4[0] != 0; v3 = v2; } result = v3 & 1; if ( (v3 & 1) != 0 ) return snprintf(v5, 128LL, "%s", v4); return result; }
mag_machine_probe_cpu_name: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x8],RDI LEA RDI,[0x2c398d] LEA RSI,[RBP + -0x90] CALL 0x0011be20 TEST AL,0x1 JNZ 0x0011b148 JMP 0x0011b15c LAB_0011b148: MOVSX ECX,byte ptr [RBP + -0x90] MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x91],AL JNZ 0x0011b19f LAB_0011b15c: LEA RDI,[0x2c3998] LEA RSI,[RBP + -0x90] CALL 0x0011be20 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RBP + -0x92],AL JNZ 0x0011b180 JMP 0x0011b193 LAB_0011b180: MOVSX EAX,byte ptr [RBP + -0x90] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x92],AL LAB_0011b193: MOV AL,byte ptr [RBP + -0x92] MOV byte ptr [RBP + -0x91],AL LAB_0011b19f: MOV AL,byte ptr [RBP + -0x91] XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0011b1d4 MOV RDI,qword ptr [RBP + -0x8] LEA RCX,[RBP + -0x90] MOV ESI,0x80 LEA RDX,[0x2c5c7d] MOV AL,0x0 CALL 0x0010f280 LAB_0011b1d4: ADD RSP,0xa0 POP RBP RET
void mag_machine_probe_cpu_name(char *param_1) { uint uVar1; ulong uVar2; bool local_9a; char local_98 [136]; char *local_10; local_10 = param_1; uVar2 = mag_cpuinfo_parse_value("model name",local_98); if (((uVar2 & 1) == 0) || (local_9a = true, local_98[0] == '\0')) { uVar1 = mag_cpuinfo_parse_value("Model",local_98); local_9a = (uVar1 & 1) != 0 && local_98[0] != '\0'; } if (local_9a) { snprintf(local_10,0x80,"%s",local_98); } return; }
21,901
nglog::LogMessage::Flush()
ng-log[P]ng-log/src/logging.cc
void LogMessage::Flush() { if (data_->has_been_flushed_ || data_->severity_ < FLAGS_minloglevel) { return; } data_->num_chars_to_log_ = data_->stream_.pcount(); data_->num_chars_to_syslog_ = data_->num_chars_to_log_ - data_->num_prefix_chars_; // Do we need to add a \n to the end of this message? bool append_newline = (data_->message_text_[data_->num_chars_to_log_ - 1] != '\n'); char original_final_char = '\0'; // If we do need to add a \n, we'll do it by violating the memory of the // ostrstream buffer. This is quick, and we'll make sure to undo our // modification before anything else is done with the ostrstream. It // would be preferable not to do things this way, but it seems to be // the best way to deal with this. if (append_newline) { original_final_char = data_->message_text_[data_->num_chars_to_log_]; data_->message_text_[data_->num_chars_to_log_++] = '\n'; } data_->message_text_[data_->num_chars_to_log_] = '\0'; // Prevent any subtle race conditions by wrapping a mutex lock around // the actual logging action per se. { std::lock_guard<std::mutex> l{log_mutex}; (this->*(data_->send_method_))(); ++num_messages_[static_cast<int>(data_->severity_)]; } LogDestination::WaitForSinks(data_); if (append_newline) { // Fix the ostrstream back how it was before we screwed with it. // It's 99.44% certain that we don't need to worry about doing this. data_->message_text_[data_->num_chars_to_log_ - 1] = original_final_char; } // If errno was already set before we enter the logging call, we'll // set it back to that value when we return from the logging call. // It happens often that we log an error message after a syscall // failure, which can potentially set the errno to some other // values. We would like to preserve the original errno. if (data_->preserved_errno_ != 0) { errno = data_->preserved_errno_; } // Note that this message is now safely logged. If we're asked to flush // again, as a result of destruction, say, we'll do nothing on future calls. data_->has_been_flushed_ = true; }
O3
cpp
nglog::LogMessage::Flush(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq 0x8(%rdi), %rax cmpb $0x0, 0x76e0(%rax) jne 0xa9b6 movl 0x7698(%rax), %ecx leaq 0x25188(%rip), %rdx # 0x2f9c8 cmpl (%rdx), %ecx jl 0xa9b6 movq %rdi, %rbx movq 0x7568(%rax), %rcx subq 0x7560(%rax), %rcx movq %rcx, 0x76c0(%rax) movq %rcx, %rdx subq 0x76b8(%rax), %rdx movq %rdx, 0x76c8(%rax) movb 0x3(%rcx,%rax), %r14b cmpb $0xa, %r14b jne 0xa880 xorl %ebp, %ebp jmp 0xa8a0 movb 0x4(%rax,%rcx), %bpl leaq 0x1(%rcx), %rdx movq %rdx, 0x76c0(%rax) movb $0xa, 0x4(%rax,%rcx) movq 0x8(%rbx), %rax movq 0x76c0(%rax), %rcx movb $0x0, 0x4(%rax,%rcx) leaq 0x343ac(%rip), %rdi # 0x3ec58 callq 0x7810 testl %eax, %eax jne 0xa9bf movq 0x8(%rbx), %rcx movq 0x76a0(%rcx), %rax movq 0x76a8(%rcx), %rdi addq %rbx, %rdi testb $0x1, %al je 0xa8da movq (%rdi), %rcx movq -0x1(%rcx,%rax), %rax callq *%rax movq 0x8(%rbx), %rax movslq 0x7698(%rax), %rax leaq 0x251e2(%rip), %rcx # 0x2fad0 incq (%rcx,%rax,8) leaq 0x3435f(%rip), %rdi # 0x3ec58 callq 0x73e0 movq 0x8(%rbx), %r15 leaq 0x2524f(%rip), %rdi # 0x2fb58 callq 0x117b2 movq 0x2523b(%rip), %rax # 0x2fb50 testq %rax, %rax je 0xa941 movq 0x8(%rax), %r12 subq (%rax), %r12 sarq $0x3, %r12 subq $0x1, %r12 jb 0xa941 movq 0x2521e(%rip), %rax # 0x2fb50 movq (%rax), %rax movq (%rax,%r12,8), %rdi movq (%rdi), %rax callq *0x18(%rax) jmp 0xa925 movq 0x76a0(%r15), %rax cmpq 0x246a1(%rip), %rax # 0x2eff0 setne %cl cmpq 0x2464f(%rip), %rax # 0x2efa8 setne %al testb %al, %cl jne 0xa97c cmpq $0x0, 0x76a8(%r15) jne 0xa97c movq 0x76b0(%r15), %rdi testq %rdi, %rdi je 0xa97c movq (%rdi), %rax callq *0x18(%rax) leaq 0x251d5(%rip), %rdi # 0x2fb58 callq 0x7720 cmpb $0xa, %r14b je 0xa99e movq 0x8(%rbx), %rax movq 0x76c0(%rax), %rcx movb %bpl, 0x3(%rcx,%rax) movq 0x8(%rbx), %rbx movl (%rbx), %ebp testl %ebp, %ebp je 0xa9af callq 0x7050 movl %ebp, (%rax) movb $0x1, 0x76e0(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7350 jmp 0xa9d9 movq %rax, %rbx leaq 0x34286(%rip), %rdi # 0x3ec58 callq 0x73e0 jmp 0xa9e8 movq %rax, %rbx leaq 0x25175(%rip), %rdi # 0x2fb58 callq 0x7720 movq %rbx, %rdi callq 0x7970
_ZN5nglog10LogMessage5FlushEv: push rbp push r15 push r14 push r12 push rbx mov rax, [rdi+8] cmp byte ptr [rax+76E0h], 0 jnz loc_A9B6 mov ecx, [rax+7698h] lea rdx, _ZN3fLI17FLAGS_minloglevelE; fLI::FLAGS_minloglevel cmp ecx, [rdx] jl loc_A9B6 mov rbx, rdi mov rcx, [rax+7568h] sub rcx, [rax+7560h] mov [rax+76C0h], rcx mov rdx, rcx sub rdx, [rax+76B8h] mov [rax+76C8h], rdx mov r14b, [rcx+rax+3] cmp r14b, 0Ah jnz short loc_A880 xor ebp, ebp jmp short loc_A8A0 loc_A880: mov bpl, [rax+rcx+4] lea rdx, [rcx+1] mov [rax+76C0h], rdx mov byte ptr [rax+rcx+4], 0Ah mov rax, [rbx+8] mov rcx, [rax+76C0h] loc_A8A0: mov byte ptr [rax+rcx+4], 0 lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_A9BF mov rcx, [rbx+8] mov rax, [rcx+76A0h] mov rdi, [rcx+76A8h] add rdi, rbx test al, 1 jz short loc_A8DA mov rcx, [rdi] mov rax, [rcx+rax-1] loc_A8DA: call rax mov rax, [rbx+8] movsxd rax, dword ptr [rax+7698h] lea rcx, _ZN5nglog10LogMessage13num_messages_E; nglog::LogMessage::num_messages_ inc qword ptr [rcx+rax*8] lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock mov r15, [rbx+8] lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rax, rax jz short loc_A941 mov r12, [rax+8] sub r12, [rax] sar r12, 3 loc_A925: sub r12, 1 jb short loc_A941 mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov rax, [rax] mov rdi, [rax+r12*8] mov rax, [rdi] call qword ptr [rax+18h] jmp short loc_A925 loc_A941: mov rax, [r15+76A0h] cmp rax, cs:_ZN5nglog10LogMessage10SendToSinkEv_ptr setnz cl cmp rax, cs:_ZN5nglog10LogMessage16SendToSinkAndLogEv_ptr setnz al test cl, al jnz short loc_A97C cmp qword ptr [r15+76A8h], 0 jnz short loc_A97C mov rdi, [r15+76B0h] test rdi, rdi jz short loc_A97C mov rax, [rdi] call qword ptr [rax+18h] loc_A97C: lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock cmp r14b, 0Ah jz short loc_A99E mov rax, [rbx+8] mov rcx, [rax+76C0h] mov [rcx+rax+3], bpl loc_A99E: mov rbx, [rbx+8] mov ebp, [rbx] test ebp, ebp jz short loc_A9AF call ___errno_location mov [rax], ebp loc_A9AF: mov byte ptr [rbx+76E0h], 1 loc_A9B6: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A9BF: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short loc_A9D9 mov rbx, rax lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock jmp short loc_A9E8 loc_A9D9: mov rbx, rax lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock loc_A9E8: mov rdi, rbx call __Unwind_Resume
long long nglog::LogMessage::Flush(nglog::LogMessage *this) { long long result; // rax long long v3; // rcx char v4; // r14 char v5; // bp int v6; // eax long long v7; // rcx void ( *v8)(_QWORD); // rax _QWORD *v9; // rdi long long v10; // rax _QWORD *v11; // r15 long long i; // r12 long long v14; // rdi int *v15; // rbx int v16; // ebp result = *((_QWORD *)this + 1); if ( !*(_BYTE *)(result + 30432) && *(_DWORD *)(result + 30360) >= fLI::FLAGS_minloglevel ) { v3 = *(_QWORD *)(result + 30056) - *(_QWORD *)(result + 30048); *(_QWORD *)(result + 30400) = v3; *(_QWORD *)(result + 30408) = v3 - *(_QWORD *)(result + 30392); v4 = *(_BYTE *)(v3 + result + 3); if ( v4 == 10 ) { v5 = 0; } else { v5 = *(_BYTE *)(result + v3 + 4); *(_QWORD *)(result + 30400) = v3 + 1; *(_BYTE *)(result + v3 + 4) = 10; result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30400); } *(_BYTE *)(result + v3 + 4) = 0; v6 = pthread_mutex_lock(&nglog::log_mutex); if ( v6 ) std::__throw_system_error(v6); v7 = *((_QWORD *)this + 1); v8 = *(void ( **)(_QWORD))(v7 + 30368); v9 = (_QWORD *)((char *)this + *(_QWORD *)(v7 + 30376)); if ( ((unsigned __int8)v8 & 1) != 0 ) v8 = *(void ( **)(_QWORD))((char *)v8 + *v9 - 1); v8(v9); v10 = *(int *)(*((_QWORD *)this + 1) + 30360LL); ++nglog::LogMessage::num_messages_[v10]; pthread_mutex_unlock(&nglog::log_mutex); v11 = (_QWORD *)*((_QWORD *)this + 1); std::__shared_mutex_pthread::lock_shared((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_); if ( nglog::LogDestination::sinks_ ) { for ( i = (long long)(*(_QWORD *)(nglog::LogDestination::sinks_ + 8) - *(_QWORD *)nglog::LogDestination::sinks_) >> 3; i-- != 0; (*(void ( **)(_QWORD))(**(_QWORD **)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i) + 24LL))(*(_QWORD *)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i)) ) { ; } } if ( (v11[3796] == (_QWORD)nglog::LogMessage::SendToSinkAndLog || v11[3796] == (_QWORD)nglog::LogMessage::SendToSink) && !v11[3797] ) { v14 = v11[3798]; if ( v14 ) (*(void ( **)(long long))(*(_QWORD *)v14 + 24LL))(v14); } result = pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_); if ( v4 != 10 ) { result = *((_QWORD *)this + 1); *(_BYTE *)(*(_QWORD *)(result + 30400) + result + 3) = v5; } v15 = (int *)*((_QWORD *)this + 1); v16 = *v15; if ( *v15 ) { result = __errno_location(); *(_DWORD *)result = v16; } *((_BYTE *)v15 + 30432) = 1; } return result; }
Flush: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RAX,qword ptr [RDI + 0x8] CMP byte ptr [RAX + 0x76e0],0x0 JNZ 0x0010a9b6 MOV ECX,dword ptr [RAX + 0x7698] LEA RDX,[0x12f9c8] CMP ECX,dword ptr [RDX] JL 0x0010a9b6 MOV RBX,RDI MOV RCX,qword ptr [RAX + 0x7568] SUB RCX,qword ptr [RAX + 0x7560] MOV qword ptr [RAX + 0x76c0],RCX MOV RDX,RCX SUB RDX,qword ptr [RAX + 0x76b8] MOV qword ptr [RAX + 0x76c8],RDX MOV R14B,byte ptr [RCX + RAX*0x1 + 0x3] CMP R14B,0xa JNZ 0x0010a880 XOR EBP,EBP JMP 0x0010a8a0 LAB_0010a880: MOV BPL,byte ptr [RAX + RCX*0x1 + 0x4] LEA RDX,[RCX + 0x1] MOV qword ptr [RAX + 0x76c0],RDX MOV byte ptr [RAX + RCX*0x1 + 0x4],0xa MOV RAX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RAX + 0x76c0] LAB_0010a8a0: MOV byte ptr [RAX + RCX*0x1 + 0x4],0x0 LEA RDI,[0x13ec58] CALL 0x00107810 TEST EAX,EAX JNZ 0x0010a9bf MOV RCX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RCX + 0x76a0] MOV RDI,qword ptr [RCX + 0x76a8] ADD RDI,RBX TEST AL,0x1 JZ 0x0010a8da MOV RCX,qword ptr [RDI] MOV RAX,qword ptr [RCX + RAX*0x1 + -0x1] LAB_0010a8da: CALL RAX LAB_0010a8dc: MOV RAX,qword ptr [RBX + 0x8] MOVSXD RAX,dword ptr [RAX + 0x7698] LEA RCX,[0x12fad0] INC qword ptr [RCX + RAX*0x8] LEA RDI,[0x13ec58] CALL 0x001073e0 MOV R15,qword ptr [RBX + 0x8] LEA RDI,[0x12fb58] CALL 0x001117b2 MOV RAX,qword ptr [0x0012fb50] TEST RAX,RAX JZ 0x0010a941 MOV R12,qword ptr [RAX + 0x8] SUB R12,qword ptr [RAX] SAR R12,0x3 LAB_0010a925: SUB R12,0x1 JC 0x0010a941 MOV RAX,qword ptr [0x0012fb50] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + R12*0x8] MOV RAX,qword ptr [RDI] LAB_0010a93c: CALL qword ptr [RAX + 0x18] JMP 0x0010a925 LAB_0010a941: MOV RAX,qword ptr [R15 + 0x76a0] CMP RAX,qword ptr [0x0012eff0] SETNZ CL CMP RAX,qword ptr [0x0012efa8] SETNZ AL TEST CL,AL JNZ 0x0010a97c CMP qword ptr [R15 + 0x76a8],0x0 JNZ 0x0010a97c MOV RDI,qword ptr [R15 + 0x76b0] TEST RDI,RDI JZ 0x0010a97c MOV RAX,qword ptr [RDI] LAB_0010a979: CALL qword ptr [RAX + 0x18] LAB_0010a97c: LEA RDI,[0x12fb58] CALL 0x00107720 CMP R14B,0xa JZ 0x0010a99e MOV RAX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RAX + 0x76c0] MOV byte ptr [RCX + RAX*0x1 + 0x3],BPL LAB_0010a99e: MOV RBX,qword ptr [RBX + 0x8] MOV EBP,dword ptr [RBX] TEST EBP,EBP JZ 0x0010a9af CALL 0x00107050 MOV dword ptr [RAX],EBP LAB_0010a9af: MOV byte ptr [RBX + 0x76e0],0x1 LAB_0010a9b6: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010a9bf: MOV EDI,EAX CALL 0x00107350
/* nglog::LogMessage::Flush() */ void __thiscall nglog::LogMessage::Flush(LogMessage *this) { char cVar1; int *piVar2; int iVar3; long lVar4; code *pcVar5; int *piVar6; long lVar7; int1 uVar8; bool bVar9; lVar4 = *(long *)(this + 8); if ((*(char *)(lVar4 + 0x76e0) == '\0') && (fLI::FLAGS_minloglevel <= *(int *)(lVar4 + 0x7698))) { lVar7 = *(long *)(lVar4 + 0x7568) - *(long *)(lVar4 + 0x7560); *(long *)(lVar4 + 0x76c0) = lVar7; *(long *)(lVar4 + 0x76c8) = lVar7 - *(long *)(lVar4 + 0x76b8); cVar1 = *(char *)(lVar7 + 3 + lVar4); if (cVar1 == '\n') { uVar8 = 0; } else { uVar8 = *(int1 *)(lVar4 + 4 + lVar7); *(long *)(lVar4 + 0x76c0) = lVar7 + 1; *(int1 *)(lVar4 + 4 + lVar7) = 10; lVar4 = *(long *)(this + 8); lVar7 = *(long *)(lVar4 + 0x76c0); } *(int1 *)(lVar4 + 4 + lVar7) = 0; iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar3 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } pcVar5 = *(code **)(*(long *)(this + 8) + 0x76a0); if (((ulong)pcVar5 & 1) != 0) { pcVar5 = *(code **)(pcVar5 + *(long *)(this + *(long *)(*(long *)(this + 8) + 0x76a8)) + -1); } /* try { // try from 0010a8da to 0010a8db has its CatchHandler @ 0010a9c8 */ (*pcVar5)(); *(long *)(num_messages_ + (long)*(int *)(*(long *)(this + 8) + 0x7698) * 8) = *(long *)(num_messages_ + (long)*(int *)(*(long *)(this + 8) + 0x7698) * 8) + 1; pthread_mutex_unlock((pthread_mutex_t *)log_mutex); lVar4 = *(long *)(this + 8); std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)LogDestination::sink_mutex_); if (LogDestination::sinks_ != (long *)0x0) { lVar7 = LogDestination::sinks_[1] - *LogDestination::sinks_ >> 3; while (bVar9 = lVar7 != 0, lVar7 = lVar7 + -1, bVar9) { /* try { // try from 0010a93c to 0010a93e has its CatchHandler @ 0010a9d9 */ (**(code **)(**(long **)(*LogDestination::sinks_ + lVar7 * 8) + 0x18))(); } } if (((*(int **)(lVar4 + 0x76a0) == PTR_SendToSink_0012eff0 || *(int **)(lVar4 + 0x76a0) == PTR_SendToSinkAndLog_0012efa8) && (*(long *)(lVar4 + 0x76a8) == 0)) && (*(long **)(lVar4 + 0x76b0) != (long *)0x0)) { /* try { // try from 0010a979 to 0010a97b has its CatchHandler @ 0010a9c6 */ (**(code **)(**(long **)(lVar4 + 0x76b0) + 0x18))(); } pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_); if (cVar1 != '\n') { *(int1 *)(*(long *)(*(long *)(this + 8) + 0x76c0) + 3 + *(long *)(this + 8)) = uVar8; } piVar2 = *(int **)(this + 8); iVar3 = *piVar2; if (iVar3 != 0) { piVar6 = __errno_location(); *piVar6 = iVar3; } *(int1 *)(piVar2 + 0x1db8) = 1; } return; }
21,902
bf_print_str
bluesky950520[P]quickjs/libbf.c
void bf_print_str(const char *str, const bf_t *a) { slimb_t i; printf("%s=", str); if (a->expn == BF_EXP_NAN) { printf("NaN"); } else { if (a->sign) putchar('-'); if (a->expn == BF_EXP_ZERO) { putchar('0'); } else if (a->expn == BF_EXP_INF) { printf("Inf"); } else { printf("0x0."); for(i = a->len - 1; i >= 0; i--) printf(FMT_LIMB, a->tab[i]); printf("p%" PRId_LIMB, a->expn); } } printf("\n"); }
O1
c
bf_print_str: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %rsi leaq 0x1ddd5(%rip), %rdi # 0xa313e xorl %eax, %eax callq 0xe280 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, 0x10(%rbx) jne 0x85389 leaq 0x1b2e0(%rip), %rdi # 0xa0667 jmp 0x853c4 cmpl $0x0, 0x8(%rbx) je 0x85399 movl $0x2d, %edi callq 0xe080 movq 0x10(%rbx), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x853bd negq %rax jno 0x853da movl $0x30, %edi callq 0xe080 jmp 0x853cb leaq 0x1dd7e(%rip), %rdi # 0xa3142 xorl %eax, %eax callq 0xe280 movl $0xa, %edi popq %rbx popq %r14 popq %r15 jmp 0xe080 leaq 0x1dd65(%rip), %rdi # 0xa3146 xorl %eax, %eax callq 0xe280 movq 0x18(%rbx), %r15 movq %r15, %rax decq %rax js 0x85416 leaq 0x1dd3c(%rip), %r14 # 0xa3137 movq 0x20(%rbx), %rax movq -0x8(%rax,%r15,8), %rsi movq %r14, %rdi xorl %eax, %eax callq 0xe280 decq %r15 testq %r15, %r15 jg 0x853fb movq 0x10(%rbx), %rsi leaq 0x1dd2a(%rip), %rdi # 0xa314b xorl %eax, %eax callq 0xe280 jmp 0x853cb
bf_print_str: push r15 push r14 push rbx mov rbx, rsi mov rsi, rdi lea rdi, aS_2; "%s=" xor eax, eax call _printf mov rax, 7FFFFFFFFFFFFFFFh cmp [rbx+10h], rax jnz short loc_85389 lea rdi, aDateValueIsNan+0Eh; "NaN" jmp short loc_853C4 loc_85389: cmp dword ptr [rbx+8], 0 jz short loc_85399 mov edi, 2Dh ; '-' call _putchar loc_85399: mov rax, [rbx+10h] mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_853BD neg rax jno short loc_853DA mov edi, 30h ; '0' call _putchar jmp short loc_853CB loc_853BD: lea rdi, aInf; "Inf" loc_853C4: xor eax, eax call _printf loc_853CB: mov edi, 0Ah pop rbx pop r14 pop r15 jmp _putchar loc_853DA: lea rdi, a0x0; "0x0." xor eax, eax call _printf mov r15, [rbx+18h] mov rax, r15 dec rax js short loc_85416 lea r14, a016lx; "%016lx" loc_853FB: mov rax, [rbx+20h] mov rsi, [rax+r15*8-8] mov rdi, r14 xor eax, eax call _printf dec r15 test r15, r15 jg short loc_853FB loc_85416: mov rsi, [rbx+10h] lea rdi, aPLd; "p%ld" xor eax, eax call _printf jmp short loc_853CB
long long bf_print_str(const char *a1, long long a2) { long long v2; // rax long long v4; // r15 printf("%s=", a1); if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL ) { printf("NaN"); } else { if ( *(_DWORD *)(a2 + 8) ) putchar(45LL); v2 = *(_QWORD *)(a2 + 16); if ( v2 == 0x7FFFFFFFFFFFFFFELL ) { printf("Inf"); } else if ( __OFSUB__(-v2, 1LL) ) { putchar(48LL); } else { printf("0x0."); v4 = *(_QWORD *)(a2 + 24); if ( v4 - 1 >= 0 ) { do printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * v4-- - 8)); while ( v4 > 0 ); } printf("p%ld", *(_QWORD *)(a2 + 16)); } } return putchar(10LL); }
bf_print_str: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV RSI,RDI LEA RDI,[0x1a313e] XOR EAX,EAX CALL 0x0010e280 MOV RAX,0x7fffffffffffffff CMP qword ptr [RBX + 0x10],RAX JNZ 0x00185389 LEA RDI,[0x1a0667] JMP 0x001853c4 LAB_00185389: CMP dword ptr [RBX + 0x8],0x0 JZ 0x00185399 MOV EDI,0x2d CALL 0x0010e080 LAB_00185399: MOV RAX,qword ptr [RBX + 0x10] MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x001853bd NEG RAX JNO 0x001853da MOV EDI,0x30 CALL 0x0010e080 JMP 0x001853cb LAB_001853bd: LEA RDI,[0x1a3142] LAB_001853c4: XOR EAX,EAX CALL 0x0010e280 LAB_001853cb: MOV EDI,0xa POP RBX POP R14 POP R15 JMP 0x0010e080 LAB_001853da: LEA RDI,[0x1a3146] XOR EAX,EAX CALL 0x0010e280 MOV R15,qword ptr [RBX + 0x18] MOV RAX,R15 DEC RAX JS 0x00185416 LEA R14,[0x1a3137] LAB_001853fb: MOV RAX,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RAX + R15*0x8 + -0x8] MOV RDI,R14 XOR EAX,EAX CALL 0x0010e280 DEC R15 TEST R15,R15 JG 0x001853fb LAB_00185416: MOV RSI,qword ptr [RBX + 0x10] LEA RDI,[0x1a314b] XOR EAX,EAX CALL 0x0010e280 JMP 0x001853cb
/* WARNING: Removing unreachable block (ram,0x001853b1) */ void bf_print_str(int8 param_1,long param_2) { char *__format; long lVar1; printf("%s=",param_1); if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) { __format = "NaN"; } else { if (*(int *)(param_2 + 8) != 0) { putchar(0x2d); } if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) { printf("0x0."); lVar1 = *(long *)(param_2 + 0x18); if (-1 < lVar1 + -1) { do { printf("%016lx",*(int8 *)(*(long *)(param_2 + 0x20) + -8 + lVar1 * 8)); lVar1 = lVar1 + -1; } while (0 < lVar1); } printf("p%ld",*(int8 *)(param_2 + 0x10)); goto LAB_001853cb; } __format = "Inf"; } printf(__format); LAB_001853cb: putchar(10); return; }
21,903
bf_print_str
bluesky950520[P]quickjs/libbf.c
void bf_print_str(const char *str, const bf_t *a) { slimb_t i; printf("%s=", str); if (a->expn == BF_EXP_NAN) { printf("NaN"); } else { if (a->sign) putchar('-'); if (a->expn == BF_EXP_ZERO) { putchar('0'); } else if (a->expn == BF_EXP_INF) { printf("Inf"); } else { printf("0x0."); for(i = a->len - 1; i >= 0; i--) printf(FMT_LIMB, a->tab[i]); printf("p%" PRId_LIMB, a->expn); } } printf("\n"); }
O2
c
bf_print_str: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %rsi leaq 0x1a3d2(%rip), %rdi # 0x8a07e xorl %eax, %eax callq 0xe290 movq 0x10(%rbx), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, %rax jne 0x6fccf leaq 0x178d4(%rip), %rdi # 0x875a1 jmp 0x6fd06 cmpl $0x0, 0x8(%rbx) je 0x6fce1 pushq $0x2d popq %rdi callq 0xe080 movq 0x10(%rbx), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x6fcff negq %rax jno 0x6fd1a pushq $0x30 popq %rdi callq 0xe080 jmp 0x6fd0d leaq 0x1a37c(%rip), %rdi # 0x8a082 xorl %eax, %eax callq 0xe290 pushq $0xa popq %rdi popq %rbx popq %r14 popq %r15 jmp 0xe080 leaq 0x1a365(%rip), %rdi # 0x8a086 xorl %eax, %eax callq 0xe290 movq 0x18(%rbx), %r15 decq %r15 leaq 0x1a341(%rip), %r14 # 0x8a077 testq %r15, %r15 js 0x6fd52 movq 0x20(%rbx), %rax movq (%rax,%r15,8), %rsi movq %r14, %rdi xorl %eax, %eax callq 0xe290 decq %r15 jmp 0x6fd36 movq 0x10(%rbx), %rsi leaq 0x1a32e(%rip), %rdi # 0x8a08b xorl %eax, %eax callq 0xe290 jmp 0x6fd0d
bf_print_str: push r15 push r14 push rbx mov rbx, rsi mov rsi, rdi lea rdi, aS_2; "%s=" xor eax, eax call _printf mov rax, [rbx+10h] mov rcx, 7FFFFFFFFFFFFFFFh cmp rax, rcx jnz short loc_6FCCF lea rdi, aDateValueIsNan+0Eh; "NaN" jmp short loc_6FD06 loc_6FCCF: cmp dword ptr [rbx+8], 0 jz short loc_6FCE1 push 2Dh ; '-' pop rdi call _putchar mov rax, [rbx+10h] loc_6FCE1: mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_6FCFF neg rax jno short loc_6FD1A push 30h ; '0' pop rdi call _putchar jmp short loc_6FD0D loc_6FCFF: lea rdi, aInf; "Inf" loc_6FD06: xor eax, eax call _printf loc_6FD0D: push 0Ah pop rdi pop rbx pop r14 pop r15 jmp _putchar loc_6FD1A: lea rdi, a0x0; "0x0." xor eax, eax call _printf mov r15, [rbx+18h] dec r15 lea r14, a016lx; "%016lx" loc_6FD36: test r15, r15 js short loc_6FD52 mov rax, [rbx+20h] mov rsi, [rax+r15*8] mov rdi, r14 xor eax, eax call _printf dec r15 jmp short loc_6FD36 loc_6FD52: mov rsi, [rbx+10h] lea rdi, aPLd; "p%ld" xor eax, eax call _printf jmp short loc_6FD0D
long long bf_print_str(const char *a1, long long a2) { long long v2; // rax long long i; // r15 printf("%s=", a1); v2 = *(_QWORD *)(a2 + 16); if ( v2 == 0x7FFFFFFFFFFFFFFFLL ) { printf("NaN"); } else { if ( *(_DWORD *)(a2 + 8) ) { putchar(45LL); v2 = *(_QWORD *)(a2 + 16); } if ( v2 == 0x7FFFFFFFFFFFFFFELL ) { printf("Inf"); } else if ( __OFSUB__(-v2, 1LL) ) { putchar(48LL); } else { printf("0x0."); for ( i = *(_QWORD *)(a2 + 24) - 1LL; i >= 0; --i ) printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * i)); printf("p%ld", *(_QWORD *)(a2 + 16)); } } return putchar(10LL); }
bf_print_str: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV RSI,RDI LEA RDI,[0x18a07e] XOR EAX,EAX CALL 0x0010e290 MOV RAX,qword ptr [RBX + 0x10] MOV RCX,0x7fffffffffffffff CMP RAX,RCX JNZ 0x0016fccf LEA RDI,[0x1875a1] JMP 0x0016fd06 LAB_0016fccf: CMP dword ptr [RBX + 0x8],0x0 JZ 0x0016fce1 PUSH 0x2d POP RDI CALL 0x0010e080 MOV RAX,qword ptr [RBX + 0x10] LAB_0016fce1: MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x0016fcff NEG RAX JNO 0x0016fd1a PUSH 0x30 POP RDI CALL 0x0010e080 JMP 0x0016fd0d LAB_0016fcff: LEA RDI,[0x18a082] LAB_0016fd06: XOR EAX,EAX CALL 0x0010e290 LAB_0016fd0d: PUSH 0xa POP RDI POP RBX POP R14 POP R15 JMP 0x0010e080 LAB_0016fd1a: LEA RDI,[0x18a086] XOR EAX,EAX CALL 0x0010e290 MOV R15,qword ptr [RBX + 0x18] DEC R15 LEA R14,[0x18a077] LAB_0016fd36: TEST R15,R15 JS 0x0016fd52 MOV RAX,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RAX + R15*0x8] MOV RDI,R14 XOR EAX,EAX CALL 0x0010e290 DEC R15 JMP 0x0016fd36 LAB_0016fd52: MOV RSI,qword ptr [RBX + 0x10] LEA RDI,[0x18a08b] XOR EAX,EAX CALL 0x0010e290 JMP 0x0016fd0d
/* WARNING: Removing unreachable block (ram,0x0016fcf5) */ void bf_print_str(int8 param_1,long param_2) { char *__format; long lVar1; printf("%s=",param_1); lVar1 = *(long *)(param_2 + 0x10); if (lVar1 == 0x7fffffffffffffff) { __format = "NaN"; } else { if (*(int *)(param_2 + 8) != 0) { putchar(0x2d); lVar1 = *(long *)(param_2 + 0x10); } if (lVar1 != 0x7ffffffffffffffe) { printf("0x0."); lVar1 = *(long *)(param_2 + 0x18); while (lVar1 = lVar1 + -1, -1 < lVar1) { printf("%016lx",*(int8 *)(*(long *)(param_2 + 0x20) + lVar1 * 8)); } printf("p%ld",*(int8 *)(param_2 + 0x10)); goto LAB_0016fd0d; } __format = "Inf"; } printf(__format); LAB_0016fd0d: putchar(10); return; }
21,904
bf_print_str
bluesky950520[P]quickjs/libbf.c
void bf_print_str(const char *str, const bf_t *a) { slimb_t i; printf("%s=", str); if (a->expn == BF_EXP_NAN) { printf("NaN"); } else { if (a->sign) putchar('-'); if (a->expn == BF_EXP_ZERO) { putchar('0'); } else if (a->expn == BF_EXP_INF) { printf("Inf"); } else { printf("0x0."); for(i = a->len - 1; i >= 0; i--) printf(FMT_LIMB, a->tab[i]); printf("p%" PRId_LIMB, a->expn); } } printf("\n"); }
O3
c
bf_print_str: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %rsi leaq 0x1e34f(%rip), %rdi # 0xa60ee xorl %eax, %eax callq 0xe280 movq 0x10(%rbx), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, %rax jne 0x87dc2 leaq 0x1b851(%rip), %rdi # 0xa3611 jmp 0x87dfd cmpl $0x0, 0x8(%rbx) je 0x87dd6 movl $0x2d, %edi callq 0xe080 movq 0x10(%rbx), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x87df6 negq %rax jno 0x87e13 movl $0x30, %edi callq 0xe080 jmp 0x87e04 leaq 0x1e2f5(%rip), %rdi # 0xa60f2 xorl %eax, %eax callq 0xe280 movl $0xa, %edi popq %rbx popq %r14 popq %r15 jmp 0xe080 leaq 0x1e2dc(%rip), %rdi # 0xa60f6 xorl %eax, %eax callq 0xe280 movq 0x18(%rbx), %r15 movq %r15, %rax decq %rax js 0x87e4c leaq 0x1e2b3(%rip), %r14 # 0xa60e7 movq 0x20(%rbx), %rax movq -0x8(%rax,%r15,8), %rsi movq %r14, %rdi xorl %eax, %eax callq 0xe280 decq %r15 jne 0x87e34 movq 0x10(%rbx), %rsi leaq 0x1e2a4(%rip), %rdi # 0xa60fb xorl %eax, %eax callq 0xe280 jmp 0x87e04
bf_print_str: push r15 push r14 push rbx mov rbx, rsi mov rsi, rdi lea rdi, aS_2; "%s=" xor eax, eax call _printf mov rax, [rbx+10h] mov rcx, 7FFFFFFFFFFFFFFFh cmp rax, rcx jnz short loc_87DC2 lea rdi, aDateValueIsNan+0Eh; "NaN" jmp short loc_87DFD loc_87DC2: cmp dword ptr [rbx+8], 0 jz short loc_87DD6 mov edi, 2Dh ; '-' call _putchar mov rax, [rbx+10h] loc_87DD6: mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_87DF6 neg rax jno short loc_87E13 mov edi, 30h ; '0' call _putchar jmp short loc_87E04 loc_87DF6: lea rdi, aInf; "Inf" loc_87DFD: xor eax, eax call _printf loc_87E04: mov edi, 0Ah pop rbx pop r14 pop r15 jmp _putchar loc_87E13: lea rdi, a0x0; "0x0." xor eax, eax call _printf mov r15, [rbx+18h] mov rax, r15 dec rax js short loc_87E4C lea r14, a016lx; "%016lx" loc_87E34: mov rax, [rbx+20h] mov rsi, [rax+r15*8-8] mov rdi, r14 xor eax, eax call _printf dec r15 jnz short loc_87E34 loc_87E4C: mov rsi, [rbx+10h] lea rdi, aPLd; "p%ld" xor eax, eax call _printf jmp short loc_87E04
long long bf_print_str(const char *a1, long long a2) { long long v2; // rax long long v4; // r15 printf("%s=", a1); v2 = *(_QWORD *)(a2 + 16); if ( v2 == 0x7FFFFFFFFFFFFFFFLL ) { printf("NaN"); } else { if ( *(_DWORD *)(a2 + 8) ) { putchar(45LL); v2 = *(_QWORD *)(a2 + 16); } if ( v2 == 0x7FFFFFFFFFFFFFFELL ) { printf("Inf"); } else if ( __OFSUB__(-v2, 1LL) ) { putchar(48LL); } else { printf("0x0."); v4 = *(_QWORD *)(a2 + 24); if ( v4 - 1 >= 0 ) { do printf("%016lx", *(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * v4-- - 8)); while ( v4 ); } printf("p%ld", *(_QWORD *)(a2 + 16)); } } return putchar(10LL); }
bf_print_str: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV RSI,RDI LEA RDI,[0x1a60ee] XOR EAX,EAX CALL 0x0010e280 MOV RAX,qword ptr [RBX + 0x10] MOV RCX,0x7fffffffffffffff CMP RAX,RCX JNZ 0x00187dc2 LEA RDI,[0x1a3611] JMP 0x00187dfd LAB_00187dc2: CMP dword ptr [RBX + 0x8],0x0 JZ 0x00187dd6 MOV EDI,0x2d CALL 0x0010e080 MOV RAX,qword ptr [RBX + 0x10] LAB_00187dd6: MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x00187df6 NEG RAX JNO 0x00187e13 MOV EDI,0x30 CALL 0x0010e080 JMP 0x00187e04 LAB_00187df6: LEA RDI,[0x1a60f2] LAB_00187dfd: XOR EAX,EAX CALL 0x0010e280 LAB_00187e04: MOV EDI,0xa POP RBX POP R14 POP R15 JMP 0x0010e080 LAB_00187e13: LEA RDI,[0x1a60f6] XOR EAX,EAX CALL 0x0010e280 MOV R15,qword ptr [RBX + 0x18] MOV RAX,R15 DEC RAX JS 0x00187e4c LEA R14,[0x1a60e7] LAB_00187e34: MOV RAX,qword ptr [RBX + 0x20] MOV RSI,qword ptr [RAX + R15*0x8 + -0x8] MOV RDI,R14 XOR EAX,EAX CALL 0x0010e280 DEC R15 JNZ 0x00187e34 LAB_00187e4c: MOV RSI,qword ptr [RBX + 0x10] LEA RDI,[0x1a60fb] XOR EAX,EAX CALL 0x0010e280 JMP 0x00187e04
/* WARNING: Removing unreachable block (ram,0x00187dea) */ void bf_print_str(int8 param_1,long param_2) { char *__format; long lVar1; printf("%s=",param_1); lVar1 = *(long *)(param_2 + 0x10); if (lVar1 == 0x7fffffffffffffff) { __format = "NaN"; } else { if (*(int *)(param_2 + 8) != 0) { putchar(0x2d); lVar1 = *(long *)(param_2 + 0x10); } if (lVar1 != 0x7ffffffffffffffe) { printf("0x0."); lVar1 = *(long *)(param_2 + 0x18); if (-1 < lVar1 + -1) { do { printf("%016lx",*(int8 *)(*(long *)(param_2 + 0x20) + -8 + lVar1 * 8)); lVar1 = lVar1 + -1; } while (lVar1 != 0); } printf("p%ld",*(int8 *)(param_2 + 0x10)); goto LAB_00187e04; } __format = "Inf"; } printf(__format); LAB_00187e04: putchar(10); return; }
21,905
st_select_lex_unit::is_unit_op()
eloqsql/sql/sql_lex.h
inline bool st_select_lex_unit::is_unit_op () { if (!first_select()->next_select()) { if (first_select()->tvc) return 1; else return 0; } enum sub_select_type linkage= first_select()->next_select()->linkage; return linkage == UNION_TYPE || linkage == INTERSECT_TYPE || linkage == EXCEPT_TYPE; }
O0
c
st_select_lex_unit::is_unit_op(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x20(%rbp) callq 0x7fb3e0 movq %rax, %rdi callq 0x8a9850 cmpq $0x0, %rax jne 0x8a9ea6 movq -0x20(%rbp), %rdi callq 0x7fb3e0 cmpq $0x0, 0x118(%rax) je 0x8a9ea0 movb $0x1, -0x1(%rbp) jmp 0x8a9ee5 movb $0x0, -0x1(%rbp) jmp 0x8a9ee5 movq -0x20(%rbp), %rdi callq 0x7fb3e0 movq %rax, %rdi callq 0x8a9850 movl 0x30(%rax), %eax movl %eax, -0x14(%rbp) movb $0x1, %al cmpl $0x1, -0x14(%rbp) movb %al, -0x21(%rbp) je 0x8a9edd movb $0x1, %al cmpl $0x2, -0x14(%rbp) movb %al, -0x21(%rbp) je 0x8a9edd cmpl $0x3, -0x14(%rbp) sete %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq
_ZN18st_select_lex_unit10is_unit_opEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rdi, [rbp+var_10]; this mov [rbp+var_20], rdi call _ZN18st_select_lex_unit12first_selectEv; st_select_lex_unit::first_select(void) mov rdi, rax; this call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void) cmp rax, 0 jnz short loc_8A9EA6 mov rdi, [rbp+var_20]; this call _ZN18st_select_lex_unit12first_selectEv; st_select_lex_unit::first_select(void) cmp qword ptr [rax+118h], 0 jz short loc_8A9EA0 mov [rbp+var_1], 1 jmp short loc_8A9EE5 loc_8A9EA0: mov [rbp+var_1], 0 jmp short loc_8A9EE5 loc_8A9EA6: mov rdi, [rbp+var_20]; this call _ZN18st_select_lex_unit12first_selectEv; st_select_lex_unit::first_select(void) mov rdi, rax; this call _ZN13st_select_lex11next_selectEv; st_select_lex::next_select(void) mov eax, [rax+30h] mov [rbp+var_14], eax mov al, 1 cmp [rbp+var_14], 1 mov [rbp+var_21], al jz short loc_8A9EDD mov al, 1 cmp [rbp+var_14], 2 mov [rbp+var_21], al jz short loc_8A9EDD cmp [rbp+var_14], 3 setz al mov [rbp+var_21], al loc_8A9EDD: mov al, [rbp+var_21] and al, 1 mov [rbp+var_1], al loc_8A9EE5: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
bool st_select_lex_unit::is_unit_op(st_select_lex_unit *this) { st_select_lex *select; // rax st_select_lex *v2; // rax bool v4; // [rsp+Fh] [rbp-21h] int v5; // [rsp+1Ch] [rbp-14h] select = (st_select_lex *)st_select_lex_unit::first_select(this); if ( st_select_lex::next_select(select) ) { v2 = (st_select_lex *)st_select_lex_unit::first_select(this); v5 = *(_DWORD *)(st_select_lex::next_select(v2) + 48); v4 = 1; if ( v5 != 1 ) { v4 = 1; if ( v5 != 2 ) return v5 == 3; } return v4; } else { return *(_QWORD *)(st_select_lex_unit::first_select(this) + 280) != 0LL; } }
__cxx_global_var_init.8: PUSH RBP MOV RBP,RSP LEA RDI,[0x264b4e8] MOV ESI,0x1800000 CALL 0x008db900 POP RBP RET
void __cxx_global_var_init_8(void) { date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_NO_ZEROS,0x1800000); return; }
21,906
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFieldNames(google::protobuf::compiler::cpp::Formatter&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/parse_function_generator.cc
void ParseFunctionGenerator::GenerateFieldNames(Formatter& format) { // First, we output the size of each string, as an unsigned byte. The first // string is the message name. int count = 1; format("\""); FormatOctal(format, std::min(static_cast<int>(descriptor_->full_name().size()), 255)); for (const auto& entry : tc_table_info_->field_entries) { FormatOctal(format, entry.field->name().size()); ++count; } while (count & 7) { // align to an 8-byte boundary format("\\0"); ++count; } format("\"\n"); // The message name is stored at the beginning of the string std::string message_name = descriptor_->full_name(); if (message_name.size() > kMaxNameLength) { static constexpr int kNameHalfLength = (kMaxNameLength - 3) / 2; message_name = StrCat( message_name.substr(0, kNameHalfLength), "...", message_name.substr(message_name.size() - kNameHalfLength)); } format("\"$1$\"\n", message_name); // Then we output the actual field names for (const auto& entry : tc_table_info_->field_entries) { const FieldDescriptor* field = entry.field; format("\"$1$\"\n", field->name()); } }
O3
cpp
google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFieldNames(google::protobuf::compiler::cpp::Formatter&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 movq %rsi, %rbx movq %rdi, %r14 leaq 0x1080e2(%rip), %rsi # 0x1a0338 movq %rbx, %rdi callq 0x39938 movq (%r14), %rax movq 0x8(%rax), %rax movl 0x28(%rax), %eax movl $0xff, %ecx cmpl %ecx, %eax cmovll %eax, %ecx movl %ecx, %eax shrl $0x6, %eax andl $0x3, %eax imull $0x64, %eax, %eax movl %ecx, %edx shrl $0x3, %edx andl $0x7, %edx leal (%rdx,%rdx,4), %edx andl $0x7, %ecx leal (%rcx,%rdx,2), %ecx addl %eax, %ecx leaq 0x68(%rsp), %rdx movl %ecx, (%rdx) leaq 0x11eb35(%rip), %rsi # 0x1b6dd3 movq %rbx, %rdi callq 0x7d7f4 movq %r14, (%rsp) movq 0x48(%r14), %rax movq 0x18(%rax), %r13 movq 0x20(%rax), %r14 movl $0x1, %ebp cmpq %r14, %r13 je 0x98318 leaq 0x11eb0c(%rip), %r15 # 0x1b6dd3 leaq 0x68(%rsp), %r12 movq (%r13), %rax movq 0x8(%rax), %rax movl 0x8(%rax), %eax movl %eax, %ecx shrl $0x6, %ecx andl $0x3, %ecx imull $0x64, %ecx, %ecx movl %eax, %edx shrl $0x3, %edx andl $0x7, %edx leal (%rdx,%rdx,4), %edx andl $0x7, %eax leal (%rax,%rdx,2), %eax addl %ecx, %eax movl %eax, 0x68(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x7d7f4 incl %ebp addq $0x18, %r13 cmpq %r14, %r13 jne 0x982cc testb $0x7, %bpl je 0x9833b incl %ebp leaq 0x11d92a(%rip), %r15 # 0x1b5c4b movl %ebp, %r14d movq %rbx, %rdi movq %r15, %rsi callq 0x39938 incl %r14d testb $0x7, %bpl movl %r14d, %ebp jne 0x98324 leaq 0x11040b(%rip), %rsi # 0x1a874d movq %rbx, %rdi callq 0x39938 movq (%rsp), %r14 movq (%r14), %rax movq 0x8(%rax), %rax leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x2586a cmpq $0x100, 0x8(%r15) # imm = 0x100 jb 0x98458 leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rsi movl $0x7e, %ecx xorl %edx, %edx callq 0x1f510 movups 0x48(%rsp), %xmm0 movups %xmm0, 0x68(%rsp) leaq 0x111290(%rip), %rax # 0x1a963c movq %rax, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) leaq 0x8(%rsp), %rsi movq 0x8(%rsi), %rdx addq $-0x7e, %rdx leaq 0x28(%rsp), %rdi movq $-0x1, %rcx callq 0x1f510 movups 0x28(%rsp), %xmm0 leaq 0xe8(%rsp), %rcx movups %xmm0, (%rcx) leaq 0x98(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0xb8(%rsp), %rdx callq 0x10b516 leaq 0x8(%rsp), %rdi leaq 0x98(%rsp), %r15 movq %r15, %rsi callq 0x1f5d0 movq (%r15), %rdi leaq 0xa8(%rsp), %rax cmpq %rax, %rdi je 0x98432 callq 0x1f4a0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98445 callq 0x1f4a0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x98458 callq 0x1f4a0 leaq 0x112c5e(%rip), %rsi # 0x1ab0bd leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x39a78 movq 0x48(%r14), %rax movq 0x18(%rax), %r15 movq 0x20(%rax), %r13 cmpq %r13, %r15 je 0x9849f leaq 0x112c39(%rip), %r14 # 0x1ab0bd movq (%r15), %rax movq 0x8(%rax), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x39a78 addq $0x18, %r15 cmpq %r13, %r15 jne 0x98484 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x984ae callq 0x1f4a0 addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x984db callq 0x1f4a0 jmp 0x984db movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x984f7 callq 0x1f4a0 jmp 0x984f7 jmp 0x984f4 jmp 0x984f4 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x98506 callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler3cpp22ParseFunctionGenerator18GenerateFieldNamesERNS2_9FormatterE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov rbx, rsi mov r14, rdi lea rsi, asc_1A0335+3; "\"" mov rdi, rbx call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ mov rax, [r14] mov rax, [rax+8] mov eax, [rax+28h] mov ecx, 0FFh cmp eax, ecx cmovl ecx, eax mov eax, ecx shr eax, 6 and eax, 3 imul eax, 64h ; 'd' mov edx, ecx shr edx, 3 and edx, 7 lea edx, [rdx+rdx*4] and ecx, 7 lea ecx, [rcx+rdx*2] add ecx, eax lea rdx, [rsp+148h+var_E0] mov [rdx], ecx lea rsi, a1_10; "\\$1$" mov rdi, rbx call _ZNK6google8protobuf8compiler3cpp9FormatterclIJiEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<int>(char const*,int const&) mov qword ptr [rsp+148h+var_148], r14; char mov rax, [r14+48h] mov r13, [rax+18h] mov r14, [rax+20h] mov ebp, 1 cmp r13, r14 jz short loc_98318 lea r15, a1_10; "\\$1$" lea r12, [rsp+148h+var_E0] loc_982CC: mov rax, [r13+0] mov rax, [rax+8] mov eax, [rax+8] mov ecx, eax shr ecx, 6 and ecx, 3 imul ecx, 64h ; 'd' mov edx, eax shr edx, 3 and edx, 7 lea edx, [rdx+rdx*4] and eax, 7 lea eax, [rax+rdx*2] add eax, ecx mov dword ptr [rsp+148h+var_E0], eax mov rdi, rbx mov rsi, r15 mov rdx, r12 call _ZNK6google8protobuf8compiler3cpp9FormatterclIJiEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<int>(char const*,int const&) inc ebp add r13, 18h cmp r13, r14 jnz short loc_982CC test bpl, 7 jz short loc_9833B loc_98318: inc ebp lea r15, a0_3; "\\0" mov r14d, ebp loc_98324: mov rdi, rbx mov rsi, r15 call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ inc r14d test bpl, 7 mov ebp, r14d jnz short loc_98324 loc_9833B: lea rsi, aCodingUtf8Gene+8Ch; "\"\n" mov rdi, rbx call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ mov r14, qword ptr [rsp+148h+var_148] mov rax, [r14] mov rax, [rax+8] lea r12, [rsp+148h+var_130] mov [r12-10h], r12 mov rsi, [rax+20h] mov rdx, [rax+28h] add rdx, rsi lea r15, [rsp+148h+var_140] mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) cmp qword ptr [r15+8], 100h jb loc_98458 lea rdi, [rsp+148h+var_100] lea rsi, [rsp+148h+var_140] mov ecx, 7Eh ; '~' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) movups xmm0, [rsp+148h+var_100] movups [rsp+148h+var_E0], xmm0 lea rax, asc_1A9639+3; "..." mov [rsp+148h+var_90], rax mov [rsp+148h+var_88], 3 lea rsi, [rsp+148h+var_140] mov rdx, [rsi+8] add rdx, 0FFFFFFFFFFFFFF82h lea rdi, [rsp+148h+var_120] mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) movups xmm0, [rsp+148h+var_120] lea rcx, [rsp+148h+var_60] movups xmmword ptr [rcx], xmm0 lea rdi, [rsp+148h+var_B0] lea rsi, [rsp+148h+var_E0] lea rdx, [rsp+148h+var_90] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) lea rdi, [rsp+148h+var_140] lea r15, [rsp+148h+var_B0] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * lea rax, [rsp+148h+var_A0] cmp rdi, rax jz short loc_98432 call __ZdlPv; operator delete(void *) loc_98432: lea rax, [rsp+148h+var_110] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98445 call __ZdlPv; operator delete(void *) loc_98445: lea rax, [rsp+148h+var_F0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_98458 call __ZdlPv; operator delete(void *) loc_98458: lea rsi, a1_5; "\"$1$\"\n" lea rdx, [rsp+148h+var_140]; int mov rdi, rbx; int call _ZNK6google8protobuf8compiler3cpp9FormatterclIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<std::string>(char const*,std::string const&) mov rax, [r14+48h] mov r15, [rax+18h] mov r13, [rax+20h] cmp r15, r13 jz short loc_9849F lea r14, a1_5; "\"$1$\"\n" loc_98484: mov rax, [r15] mov rdx, [rax+8]; int mov rdi, rbx; int mov rsi, r14; int call _ZNK6google8protobuf8compiler3cpp9FormatterclIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<std::string>(char const*,std::string const&) add r15, 18h cmp r15, r13 jnz short loc_98484 loc_9849F: mov rdi, [rsp+148h+var_140]; void * cmp rdi, r12 jz short loc_984AE call __ZdlPv; operator delete(void *) loc_984AE: add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_984DB call __ZdlPv; operator delete(void *) jmp short loc_984DB mov rbx, rax loc_984DB: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_984F7 call __ZdlPv; operator delete(void *) jmp short loc_984F7 jmp short loc_984F4 jmp short $+2 loc_984F4: mov rbx, rax loc_984F7: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_98506 call __ZdlPv; operator delete(void *) loc_98506: mov rdi, rbx call __Unwind_Resume
void google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFieldNames( _QWORD *a1, google::protobuf::io::Printer **a2) { unsigned int v2; // ecx long long v3; // rax long long v4; // r13 long long v5; // r14 int v6; // ebp int v7; // ebp int v8; // r14d bool v9; // zf long long v10; // rax long long v11; // rax long long v12; // r15 long long i; // r13 void *v14; // [rsp+8h] [rbp-140h] BYREF unsigned long long v15; // [rsp+10h] [rbp-138h] _BYTE v16[16]; // [rsp+18h] [rbp-130h] BYREF __int128 v17; // [rsp+28h] [rbp-120h] BYREF char v18; // [rsp+38h] [rbp-110h] BYREF __int128 v19; // [rsp+48h] [rbp-100h] BYREF char v20; // [rsp+58h] [rbp-F0h] BYREF unsigned int v21[12]; // [rsp+68h] [rbp-E0h] BYREF void *v22[2]; // [rsp+98h] [rbp-B0h] BYREF char v23; // [rsp+A8h] [rbp-A0h] BYREF char *v24; // [rsp+B8h] [rbp-90h] long long v25; // [rsp+C0h] [rbp-88h] __int128 v26; // [rsp+E8h] [rbp-60h] google::protobuf::compiler::cpp::Formatter::operator()<>(a2, "\""); v2 = 255; if ( *(int *)(*(_QWORD *)(*a1 + 8LL) + 40LL) < 255 ) v2 = *(_DWORD *)(*(_QWORD *)(*a1 + 8LL) + 40LL); v21[0] = 100 * ((unsigned __int8)v2 >> 6) + (v2 & 7) + 10 * ((v2 >> 3) & 7); google::protobuf::compiler::cpp::Formatter::operator()<int>(a2, (unsigned int)"\\$1$", v21); v3 = a1[9]; v4 = *(_QWORD *)(v3 + 24); v5 = *(_QWORD *)(v3 + 32); v6 = 1; if ( v4 == v5 ) goto LABEL_6; do { v21[0] = 100 * ((*(_DWORD *)(*(_QWORD *)(*(_QWORD *)v4 + 8LL) + 8LL) >> 6) & 3) + (*(_DWORD *)(*(_QWORD *)(*(_QWORD *)v4 + 8LL) + 8LL) & 7) + 10 * ((*(_DWORD *)(*(_QWORD *)(*(_QWORD *)v4 + 8LL) + 8LL) >> 3) & 7); google::protobuf::compiler::cpp::Formatter::operator()<int>(a2, (unsigned int)"\\$1$", v21); ++v6; v4 += 24LL; } while ( v4 != v5 ); if ( (v6 & 7) != 0 ) { LABEL_6: v7 = v6 + 1; v8 = v7; do { google::protobuf::compiler::cpp::Formatter::operator()<>(a2, "\\0"); ++v8; v9 = (v7 & 7) == 0; LOBYTE(v7) = v8; } while ( !v9 ); } google::protobuf::compiler::cpp::Formatter::operator()<>(a2, "\"\n"); v10 = *(_QWORD *)(*a1 + 8LL); v14 = v16; std::string::_M_construct<char *>((long long)&v14, *(_BYTE **)(v10 + 32), *(_QWORD *)(v10 + 32) + *(_QWORD *)(v10 + 40)); if ( v15 >= 0x100 ) { std::string::substr(&v19, &v14, 0LL, 126LL); *(_OWORD *)v21 = v19; v24 = "..."; v25 = 3LL; std::string::substr(&v17, &v14, v15 - 126, -1LL); v26 = v17; google::protobuf::StrCat[abi:cxx11](v22); std::string::operator=(&v14, v22); if ( v22[0] != &v23 ) operator delete(v22[0]); if ( (char *)v17 != &v18 ) operator delete((void *)v17); if ( (char *)v19 != &v20 ) operator delete((void *)v19); } google::protobuf::compiler::cpp::Formatter::operator()<std::string>(a2, (int)"\"$1$\"\n", (long long)&v14); v11 = a1[9]; v12 = *(_QWORD *)(v11 + 24); for ( i = *(_QWORD *)(v11 + 32); v12 != i; v12 += 24LL ) google::protobuf::compiler::cpp::Formatter::operator()<std::string>( a2, (int)"\"$1$\"\n", *(_QWORD *)(*(_QWORD *)v12 + 8LL)); if ( v14 != v16 ) operator delete(v14); }
GenerateFieldNames: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV RBX,RSI MOV R14,RDI LEA RSI,[0x2a0338] MOV RDI,RBX CALL 0x00139938 MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x28] MOV ECX,0xff CMP EAX,ECX CMOVL ECX,EAX MOV EAX,ECX SHR EAX,0x6 AND EAX,0x3 IMUL EAX,EAX,0x64 MOV EDX,ECX SHR EDX,0x3 AND EDX,0x7 LEA EDX,[RDX + RDX*0x4] AND ECX,0x7 LEA ECX,[RCX + RDX*0x2] ADD ECX,EAX LEA RDX,[RSP + 0x68] MOV dword ptr [RDX],ECX LEA RSI,[0x2b6dd3] MOV RDI,RBX CALL 0x0017d7f4 MOV qword ptr [RSP],R14 MOV RAX,qword ptr [R14 + 0x48] MOV R13,qword ptr [RAX + 0x18] MOV R14,qword ptr [RAX + 0x20] MOV EBP,0x1 CMP R13,R14 JZ 0x00198318 LEA R15,[0x2b6dd3] LEA R12,[RSP + 0x68] LAB_001982cc: MOV RAX,qword ptr [R13] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x8] MOV ECX,EAX SHR ECX,0x6 AND ECX,0x3 IMUL ECX,ECX,0x64 MOV EDX,EAX SHR EDX,0x3 AND EDX,0x7 LEA EDX,[RDX + RDX*0x4] AND EAX,0x7 LEA EAX,[RAX + RDX*0x2] ADD EAX,ECX MOV dword ptr [RSP + 0x68],EAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x0017d7f4 INC EBP ADD R13,0x18 CMP R13,R14 JNZ 0x001982cc TEST BPL,0x7 JZ 0x0019833b LAB_00198318: INC EBP LEA R15,[0x2b5c4b] MOV R14D,EBP LAB_00198324: MOV RDI,RBX MOV RSI,R15 CALL 0x00139938 INC R14D TEST BPL,0x7 MOV EBP,R14D JNZ 0x00198324 LAB_0019833b: LEA RSI,[0x2a874d] MOV RDI,RBX CALL 0x00139938 MOV R14,qword ptr [RSP] MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + 0x8] LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] ADD RDX,RSI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0012586a CMP qword ptr [R15 + 0x8],0x100 JC 0x00198458 LAB_00198385: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x8] MOV ECX,0x7e XOR EDX,EDX CALL 0x0011f510 MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP + 0x68],XMM0 LEA RAX,[0x2a963c] MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],0x3 LEA RSI,[RSP + 0x8] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,-0x7e LAB_001983cd: LEA RDI,[RSP + 0x28] MOV RCX,-0x1 CALL 0x0011f510 MOVUPS XMM0,xmmword ptr [RSP + 0x28] LEA RCX,[RSP + 0xe8] MOVUPS xmmword ptr [RCX],XMM0 LAB_001983ee: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x68] LEA RDX,[RSP + 0xb8] CALL 0x0020b516 LEA RDI,[RSP + 0x8] LEA R15,[RSP + 0x98] MOV RSI,R15 CALL 0x0011f5d0 MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0xa8] CMP RDI,RAX JZ 0x00198432 CALL 0x0011f4a0 LAB_00198432: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00198445 CALL 0x0011f4a0 LAB_00198445: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00198458 CALL 0x0011f4a0 LAB_00198458: LEA RSI,[0x2ab0bd] LEA RDX,[RSP + 0x8] MOV RDI,RBX CALL 0x00139a78 MOV RAX,qword ptr [R14 + 0x48] MOV R15,qword ptr [RAX + 0x18] MOV R13,qword ptr [RAX + 0x20] CMP R15,R13 JZ 0x0019849f LEA R14,[0x2ab0bd] LAB_00198484: MOV RAX,qword ptr [R15] MOV RDX,qword ptr [RAX + 0x8] LAB_0019848b: MOV RDI,RBX MOV RSI,R14 CALL 0x00139a78 LAB_00198496: ADD R15,0x18 CMP R15,R13 JNZ 0x00198484 LAB_0019849f: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x001984ae CALL 0x0011f4a0 LAB_001984ae: ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFieldNames(google::protobuf::compiler::cpp::Formatter&) */ void __thiscall google::protobuf::compiler::cpp::ParseFunctionGenerator::GenerateFieldNames (ParseFunctionGenerator *this,Formatter *param_1) { long *plVar1; long lVar2; uint uVar3; uint uVar4; long *plVar5; int1 *local_140; ulong local_138; int1 local_130 [16]; int1 *local_120; int8 uStack_118; int1 local_110 [16]; int1 *local_100; int8 uStack_f8; int1 local_f0 [16]; int1 *local_e0; int8 uStack_d8; int1 *local_b0 [2]; int1 local_a0 [16]; int *local_90; int8 local_88; int1 *local_60; int8 uStack_58; Formatter::operator()<>(param_1,"\""); uVar4 = *(uint *)(*(long *)(*(long *)this + 8) + 0x28); uVar3 = 0xff; if ((int)uVar4 < 0xff) { uVar3 = uVar4; } local_e0 = (int1 *) CONCAT44(local_e0._4_4_,(uVar3 & 7) + (uVar3 >> 3 & 7) * 10 + (uVar3 >> 6 & 3) * 100); Formatter::operator()(param_1,"\\$1$",(int *)&local_e0); plVar5 = *(long **)(*(long *)(this + 0x48) + 0x18); plVar1 = *(long **)(*(long *)(this + 0x48) + 0x20); uVar4 = 1; if (plVar5 != plVar1) { do { uVar3 = *(uint *)(*(long *)(*plVar5 + 8) + 8); local_e0 = (int1 *) CONCAT44(local_e0._4_4_, (uVar3 & 7) + (uVar3 >> 3 & 7) * 10 + (uVar3 >> 6 & 3) * 100); Formatter::operator()(param_1,"\\$1$",(int *)&local_e0); uVar4 = uVar4 + 1; plVar5 = plVar5 + 3; } while (plVar5 != plVar1); if ((uVar4 & 7) == 0) goto LAB_0019833b; } do { uVar4 = uVar4 + 1; Formatter::operator()<>(param_1,"\\0"); } while ((uVar4 & 7) != 0); LAB_0019833b: Formatter::operator()<>(param_1,"\"\n"); lVar2 = *(long *)(*(long *)(*(long *)this + 8) + 0x20); local_140 = local_130; std::__cxx11::string::_M_construct<char*> (&local_140,lVar2,*(long *)(*(long *)(*(long *)this + 8) + 0x28) + lVar2); if (0xff < local_138) { /* try { // try from 00198385 to 0019839a has its CatchHandler @ 001984f0 */ std::__cxx11::string::substr((ulong)&local_100,(ulong)&local_140); local_e0 = local_100; uStack_d8 = uStack_f8; local_90 = &DAT_002a963c; local_88 = 3; /* try { // try from 001983cd to 001983dd has its CatchHandler @ 001984d8 */ std::__cxx11::string::substr((ulong)&local_120,(ulong)&local_140); local_60 = local_120; uStack_58 = uStack_118; /* try { // try from 001983ee to 00198407 has its CatchHandler @ 001984c0 */ StrCat_abi_cxx11_((protobuf *)local_b0,(AlphaNum *)&local_e0,(AlphaNum *)&local_90, (AlphaNum *)&local_60); std::__cxx11::string::operator=((string *)&local_140,(string *)local_b0); if (local_b0[0] != local_a0) { operator_delete(local_b0[0]); } if (local_120 != local_110) { operator_delete(local_120); } if (local_100 != local_f0) { operator_delete(local_100); } } /* try { // try from 00198458 to 0019846b has its CatchHandler @ 001984f2 */ Formatter::operator()(param_1,"\"$1$\"\n",(string *)&local_140); plVar1 = *(long **)(*(long *)(this + 0x48) + 0x20); for (plVar5 = *(long **)(*(long *)(this + 0x48) + 0x18); plVar5 != plVar1; plVar5 = plVar5 + 3) { /* try { // try from 0019848b to 00198495 has its CatchHandler @ 001984f4 */ Formatter::operator()(param_1,"\"$1$\"\n",*(string **)(*plVar5 + 8)); } if (local_140 != local_130) { operator_delete(local_140); } return; }
21,907
js_TA_get_float16
bluesky950520[P]quickjs/quickjs.c
static JSValue js_TA_get_float16(JSContext *ctx, const void *a) { return js_float64(fromfp16(*(const uint16_t *)a)); }
O1
c
js_TA_get_float16: pushq %rbx movzwl (%rsi), %ebx movl $0x7c00, %edx # imm = 0x7C00 movl %ebx, %eax andl %edx, %eax movl %ebx, %ecx andl $0x3ff, %ecx # imm = 0x3FF cmpl %edx, %eax jne 0x82d5c xorl %eax, %eax testl %ecx, %ecx sete %al leaq 0x1b9fb(%rip), %rcx # 0x9e750 movsd (%rcx,%rax,8), %xmm0 jmp 0x82d89 cvtsi2sd %ecx, %xmm0 mulsd 0x1bb18(%rip), %xmm0 # 0x9e880 movl %eax, %edi shrl $0xa, %edi addl $-0xf, %edi testl %eax, %eax je 0x82d7c addsd 0x1baec(%rip), %xmm0 # 0x9e868 movl $0xfffffff2, %eax # imm = 0xFFFFFFF2 cmovel %eax, %edi callq 0xe670 testw %bx, %bx jns 0x82d96 xorpd 0x1b9ca(%rip), %xmm0 # 0x9e760 movq %xmm0, %rax movl $0x7, %edx popq %rbx retq
js_TA_get_float16: push rbx movzx ebx, word ptr [rsi] mov edx, 7C00h mov eax, ebx and eax, edx mov ecx, ebx and ecx, 3FFh cmp eax, edx jnz short loc_82D5C xor eax, eax test ecx, ecx setz al lea rcx, dbl_9E750 movsd xmm0, qword ptr [rcx+rax*8] jmp short loc_82D89 loc_82D5C: cvtsi2sd xmm0, ecx mulsd xmm0, cs:qword_9E880 mov edi, eax shr edi, 0Ah add edi, 0FFFFFFF1h test eax, eax jz short loc_82D7C addsd xmm0, cs:qword_9E868 loc_82D7C: mov eax, 0FFFFFFF2h cmovz edi, eax call _scalbn loc_82D89: test bx, bx jns short loc_82D96 xorpd xmm0, cs:xmmword_9E760 loc_82D96: movq rax, xmm0 mov edx, 7 pop rbx retn
long long js_TA_get_float16(long long a1, __int16 *a2) { __int16 v2; // bx unsigned int v3; // eax int v4; // ecx double v5; // xmm0_8 long long v6; // rdi v2 = *a2; v3 = *a2 & 0x7C00; v4 = *a2 & 0x3FF; if ( v3 == 31744 ) { v5 = dbl_9E750[v4 == 0]; } else { v5 = (double)v4 * 0.0009765625; v6 = (v3 >> 10) - 15; if ( (*a2 & 0x7C00) != 0 ) v5 = v5 + 1.0; else v6 = 4294967282LL; scalbn(v6, v5); } if ( v2 < 0 ) v5 = -v5; return *(_QWORD *)&v5; }
js_TA_get_float16: PUSH RBX MOVZX EBX,word ptr [RSI] MOV EDX,0x7c00 MOV EAX,EBX AND EAX,EDX MOV ECX,EBX AND ECX,0x3ff CMP EAX,EDX JNZ 0x00182d5c XOR EAX,EAX TEST ECX,ECX SETZ AL LEA RCX,[0x19e750] MOVSD XMM0,qword ptr [RCX + RAX*0x8] JMP 0x00182d89 LAB_00182d5c: CVTSI2SD XMM0,ECX MULSD XMM0,qword ptr [0x0019e880] MOV EDI,EAX SHR EDI,0xa ADD EDI,-0xf TEST EAX,EAX JZ 0x00182d7c ADDSD XMM0,qword ptr [0x0019e868] LAB_00182d7c: MOV EAX,0xfffffff2 CMOVZ EDI,EAX CALL 0x0010e670 LAB_00182d89: TEST BX,BX JNS 0x00182d96 XORPD XMM0,xmmword ptr [0x0019e760] LAB_00182d96: MOVQ RAX,XMM0 MOV EDX,0x7 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 [16] js_TA_get_float16(int8 param_1,ushort *param_2) { ushort uVar1; int __n; double dVar2; int1 auVar3 [16]; uVar1 = *param_2; if ((uVar1 & 0x7c00) == 0x7c00) { dVar2 = *(double *)(&DAT_0019e750 + (ulong)((uVar1 & 0x3ff) == 0) * 8); } else { dVar2 = (double)(uVar1 & 0x3ff) * _DAT_0019e880; __n = ((uVar1 & 0x7c00) >> 10) - 0xf; if ((uVar1 & 0x7c00) == 0) { __n = -0xe; } else { dVar2 = dVar2 + DAT_0019e868; } dVar2 = scalbn(dVar2,__n); } if ((short)uVar1 < 0) { dVar2 = (double)((ulong)dVar2 ^ _DAT_0019e760); } auVar3._8_8_ = 7; auVar3._0_8_ = dVar2; return auVar3; }
21,908
js_generator_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_generator_finalizer(JSRuntime *rt, JSValue obj) { JSGeneratorData *s = JS_GetOpaque(obj, JS_CLASS_GENERATOR); if (s) { free_generator_stack_rt(rt, s); js_free_rt(rt, s); } }
O1
c
js_generator_finalizer: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsi, (%rsp) cmpl $-0x1, %edx jne 0x3a771 movq (%rsp), %rax cmpw $0x2f, 0x6(%rax) jne 0x3a771 movq 0x30(%rax), %r14 jmp 0x3a774 xorl %r14d, %r14d testq %r14, %r14 je 0x3a7bf cmpl $0x4, (%r14) je 0x3a792 leaq 0x8(%r14), %rsi movq %rbx, %rdi callq 0x3a8b6 movl $0x4, (%r14) decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x10(%rbx), %rcx movq 0x30(%rbx), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%rbx) movq 0x40(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r14 retq
js_generator_finalizer: push r14 push rbx push rax mov rbx, rdi mov [rsp+18h+var_18], rsi cmp edx, 0FFFFFFFFh jnz short loc_3A771 mov rax, [rsp+18h+var_18] cmp word ptr [rax+6], 2Fh ; '/' jnz short loc_3A771 mov r14, [rax+30h] jmp short loc_3A774 loc_3A771: xor r14d, r14d loc_3A774: test r14, r14 jz short loc_3A7BF cmp dword ptr [r14], 4 jz short loc_3A792 lea rsi, [r14+8] mov rdi, rbx call async_func_free mov dword ptr [r14], 4 loc_3A792: dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+10h] mov rdx, [rbx+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx mov rdi, [rbx+40h] mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp rcx loc_3A7BF: add rsp, 8 pop rbx pop r14 retn
void js_generator_finalizer(long long a1, long long a2, long long a3) { _DWORD *v3; // r14 long long v4; // rax void ( *v5)(_QWORD, _DWORD *); // rcx if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 47 ) v3 = *(_DWORD **)(a2 + 48); else v3 = 0LL; if ( v3 ) { if ( *v3 != 4 ) { async_func_free(a1, v3 + 2, a3); *v3 = 4; } --*(_QWORD *)(a1 + 40); v4 = (*(long long ( **)(_DWORD *))(a1 + 32))(v3); v5 = *(void ( **)(_QWORD, _DWORD *))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v4 - 8; v5(*(_QWORD *)(a1 + 64), v3); } }
js_generator_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV qword ptr [RSP],RSI CMP EDX,-0x1 JNZ 0x0013a771 MOV RAX,qword ptr [RSP] CMP word ptr [RAX + 0x6],0x2f JNZ 0x0013a771 MOV R14,qword ptr [RAX + 0x30] JMP 0x0013a774 LAB_0013a771: XOR R14D,R14D LAB_0013a774: TEST R14,R14 JZ 0x0013a7bf CMP dword ptr [R14],0x4 JZ 0x0013a792 LEA RSI,[R14 + 0x8] MOV RDI,RBX CALL 0x0013a8b6 MOV dword ptr [R14],0x4 LAB_0013a792: DEC qword ptr [RBX + 0x28] MOV RDI,R14 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP RCX LAB_0013a7bf: ADD RSP,0x8 POP RBX POP R14 RET
void js_generator_finalizer(long param_1,long param_2,int param_3) { long lVar1; int *piVar2; if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x2f)) { piVar2 = *(int **)(param_2 + 0x30); } else { piVar2 = (int *)0x0; } if (piVar2 != (int *)0x0) { if (*piVar2 != 4) { async_func_free(param_1,piVar2 + 2); *piVar2 = 4; } *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar1 = (**(code **)(param_1 + 0x20))(piVar2); lVar1 = (*(long *)(param_1 + 0x30) - lVar1) + -8; *(long *)(param_1 + 0x30) = lVar1; /* WARNING: Could not recover jumptable at 0x0013a7bd. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),piVar2,lVar1,*(code **)(param_1 + 0x10)); return; } return; }
21,909
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 0x93ae8 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 0x93b1f
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_93AE8 mov rdx, [r15+8] xor r12d, r12d loc_93AE8: 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 0x00193ae8 MOV RDX,qword ptr [R15 + 0x8] XOR R12D,R12D LAB_00193ae8: 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 0x00193b1f
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; }
21,910
evmone::EOF1Header::get_code(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, unsigned long) const
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.hpp
[[nodiscard]] bytes_view get_code(bytes_view container, size_t code_idx) const noexcept { assert(code_idx < code_offsets.size()); return container.substr(code_offsets[code_idx], code_sizes[code_idx]); }
O3
cpp
evmone::EOF1Header::get_code(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, unsigned long) const: pushq %rax movq %rsi, %r8 movq 0x28(%rdi), %rax movq 0x30(%rdi), %rsi subq %rax, %rsi sarq %rsi cmpq %rcx, %rsi jbe 0x31682 movzwl (%rax,%rcx,2), %r9d movq %r8, %rsi subq %r9, %rsi jb 0x316a1 movq 0x10(%rdi), %rax movzwl (%rax,%rcx,2), %eax cmpq %rax, %rsi cmovbq %rsi, %rax addq %r9, %rdx popq %rcx retq leaq 0x51bf1(%rip), %rdi # 0x8327a leaq 0x51c09(%rip), %rsi # 0x83299 leaq 0x51c80(%rip), %rcx # 0x83317 movl $0x75, %edx callq 0x22110 leaq 0x51ccb(%rip), %rdi # 0x83373 leaq 0x51caa(%rip), %rsi # 0x83359 movq %r9, %rdx movq %r8, %rcx xorl %eax, %eax callq 0x22050 movq %rax, %rdi callq 0x30061
_ZNK6evmone10EOF1Header8get_codeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEm: push rax mov r8, rsi mov rax, [rdi+28h] mov rsi, [rdi+30h] sub rsi, rax sar rsi, 1 cmp rsi, rcx jbe short loc_31682 movzx r9d, word ptr [rax+rcx*2] mov rsi, r8 sub rsi, r9 jb short loc_316A1 mov rax, [rdi+10h] movzx eax, word ptr [rax+rcx*2] cmp rsi, rax cmovb rax, rsi add rdx, r9 pop rcx retn loc_31682: lea rdi, aCodeIdxCodeOff; "code_idx < code_offsets.size()" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBytesViewEvmon; "bytes_view evmone::EOF1Header::get_code"... mov edx, 75h ; 'u' call ___assert_fail loc_316A1: lea rdi, aSPosWhichIsZuS; "%s: __pos (which is %zu) > __size (whic"... lea rsi, aBasicStringVie; "basic_string_view::substr" mov rdx, r9 mov rcx, r8 xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) mov rdi, rax call __clang_call_terminate
unsigned long long evmone::EOF1Header::get_code( _QWORD *a1, unsigned long long a2, long long a3, unsigned long long a4) { long long v4; // rax unsigned long long v5; // r9 unsigned long long result; // rax v4 = a1[5]; if ( (a1[6] - v4) >> 1 <= a4 ) __assert_fail( "code_idx < code_offsets.size()", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.hpp", 117LL, "bytes_view evmone::EOF1Header::get_code(bytes_view, size_t) const"); v5 = *(unsigned __int16 *)(v4 + 2 * a4); if ( a2 < v5 ) std::__throw_out_of_range_fmt( "%s: __pos (which is %zu) > __size (which is %zu)", "basic_string_view::substr", *(unsigned __int16 *)(v4 + 2 * a4), a2); result = *(unsigned __int16 *)(a1[2] + 2 * a4); if ( a2 - v5 < result ) return a2 - v5; return result; }
get_code: PUSH RAX MOV R8,RSI MOV RAX,qword ptr [RDI + 0x28] MOV RSI,qword ptr [RDI + 0x30] SUB RSI,RAX SAR RSI,0x1 CMP RSI,RCX JBE 0x00131682 MOVZX R9D,word ptr [RAX + RCX*0x2] MOV RSI,R8 SUB RSI,R9 JC 0x001316a1 MOV RAX,qword ptr [RDI + 0x10] MOVZX EAX,word ptr [RAX + RCX*0x2] CMP RSI,RAX CMOVC RAX,RSI ADD RDX,R9 POP RCX RET LAB_00131682: LEA RDI,[0x18327a] LEA RSI,[0x183299] LEA RCX,[0x183317] MOV EDX,0x75 CALL 0x00122110 LAB_001316a1: LEA RDI,[0x183373] LEA RSI,[0x183359] MOV RDX,R9 MOV RCX,R8 XOR EAX,EAX CALL 0x00122050
/* evmone::EOF1Header::get_code(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char> >, unsigned long) const */ int1 [16] evmone::EOF1Header::get_code(long param_1,ulong param_2,long param_3,ulong param_4) { ulong uVar1; ulong uVar2; int1 auVar3 [16]; if ((ulong)(*(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28) >> 1) <= param_4) { /* WARNING: Subroutine does not return */ __assert_fail("code_idx < code_offsets.size()", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.hpp" ,0x75,"bytes_view evmone::EOF1Header::get_code(bytes_view, size_t) const"); } uVar2 = (ulong)*(ushort *)(*(long *)(param_1 + 0x28) + param_4 * 2); if (uVar2 <= param_2) { uVar1 = (ulong)*(ushort *)(*(long *)(param_1 + 0x10) + param_4 * 2); if (param_2 - uVar2 < uVar1) { uVar1 = param_2 - uVar2; } auVar3._8_8_ = param_3 + uVar2; auVar3._0_8_ = uVar1; return auVar3; } /* try { // try from 001316a1 to 001316bb has its CatchHandler @ 001316bc */ /* WARNING: Subroutine does not return */ std::__throw_out_of_range_fmt ("%s: __pos (which is %zu) > __size (which is %zu)","basic_string_view::substr",uVar2, param_2); }
21,911
ulight::(anonymous namespace)::append_html_escaped(ulight::Non_Owning_Buffer<char>&, std::basic_string_view<char, std::char_traits<char>>)
ulight/src/main/cpp/ulight.cpp
void append_html_escaped(Non_Owning_Buffer<char>& out, std::string_view text) { while (!text.empty()) { const std::size_t bracket_pos = text.find_first_of("<>&"); const auto snippet = text.substr(0, std::min(text.length(), bracket_pos)); out.append_range(snippet); if (bracket_pos == std::string_view::npos) { break; } out.append_range(html_entity_of(text[bracket_pos])); text = text.substr(bracket_pos + 1); } }
O0
cpp
ulight::(anonymous namespace)::append_html_escaped(ulight::Non_Owning_Buffer<char>&, std::basic_string_view<char, std::char_traits<char>>): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rsi, -0x10(%rbp) movq %rdx, -0x8(%rbp) movq %rdi, -0x18(%rbp) leaq -0x10(%rbp), %rdi callq 0x8110 xorb $-0x1, %al testb $0x1, %al jne 0x6218 jmp 0x62df leaq -0x10(%rbp), %rdi leaq 0x1555a(%rip), %rsi # 0x1b77d xorl %eax, %eax movl %eax, %edx callq 0x8130 movq %rax, -0x20(%rbp) leaq -0x10(%rbp), %rdi callq 0x6d20 movq %rax, -0x38(%rbp) leaq -0x38(%rbp), %rdi leaq -0x20(%rbp), %rsi callq 0x7720 movq (%rax), %rdx leaq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x73a0 movq %rax, -0x30(%rbp) movq %rdx, -0x28(%rbp) movq -0x18(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x7b50 cmpq $-0x1, -0x20(%rbp) jne 0x6278 jmp 0x62df movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rsi leaq -0x10(%rbp), %rdi callq 0x8180 movsbl (%rax), %edi callq 0x6710 movq -0x60(%rbp), %rdi movq %rax, -0x48(%rbp) movq %rdx, -0x40(%rbp) leaq -0x48(%rbp), %rsi callq 0x7c50 movq -0x20(%rbp), %rsi addq $0x1, %rsi leaq -0x10(%rbp), %rdi movq $-0x1, %rdx callq 0x73a0 movq %rax, -0x58(%rbp) movq %rdx, -0x50(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x6204 addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6ulight12_GLOBAL__N_119append_html_escapedERNS_17Non_Owning_BufferIcEESt17basic_string_viewIcSt11char_traitsIcEE: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rsi mov [rbp+var_8], rdx mov [rbp+var_18], rdi loc_6204: lea rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void) xor al, 0FFh test al, 1 jnz short loc_6218 jmp loc_62DF loc_6218: lea rdi, [rbp+var_10] lea rsi, asc_1B77D; "<>&" xor eax, eax mov edx, eax call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE13find_first_ofEPKcm; std::string_view::find_first_of(char const*,ulong) mov qword ptr [rbp+var_20], rax lea rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void) mov [rbp+var_38], rax lea rdi, [rbp+var_38] lea rsi, [rbp+var_20] call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rdx, [rax] lea rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm; std::string_view::substr(ulong,ulong) mov [rbp+var_30], rax mov [rbp+var_28], rdx mov rdi, [rbp+var_18] lea rsi, [rbp+var_30] call _ZN6ulight17Non_Owning_BufferIcE12append_rangeITkNSt6ranges11input_rangeERKSt17basic_string_viewIcSt11char_traitsIcEEQsr3stdE14convertible_toIDTdeclsr3stdE7declvalIRDTclsr6ranges8__accessE7__beginclsr3stdE7declvalIRTL0__EEEEEEET_EEEvOSF_ cmp qword ptr [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_6278 jmp short loc_62DF loc_6278: mov rax, [rbp+var_18] mov [rbp+var_60], rax mov rsi, qword ptr [rbp+var_20]; char lea rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEEixEm; std::string_view::operator[](ulong) movsx edi, byte ptr [rax]; this call _ZN6ulight12_GLOBAL__N_114html_entity_ofEc; ulight::`anonymous namespace'::html_entity_of(char) mov rdi, [rbp+var_60] mov [rbp+var_48], rax mov [rbp+var_40], rdx lea rsi, [rbp+var_48] call _ZN6ulight17Non_Owning_BufferIcE12append_rangeITkNSt6ranges11input_rangeESt17basic_string_viewIcSt11char_traitsIcEEQsr3stdE14convertible_toIDTdeclsr3stdE7declvalIRDTclsr6ranges8__accessE7__beginclsr3stdE7declvalIRTL0__EEEEEEET_EEEvOSD_ mov rsi, qword ptr [rbp+var_20] add rsi, 1 lea rdi, [rbp+var_10] mov rdx, 0FFFFFFFFFFFFFFFFh call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm; std::string_view::substr(ulong,ulong) mov [rbp+var_58], rax mov [rbp+var_50], rdx mov rax, [rbp+var_58] mov [rbp+var_10], rax mov rax, [rbp+var_50] mov [rbp+var_8], rax jmp loc_6204 loc_62DF: add rsp, 60h pop rbp retn
char ulight::`anonymous namespace'::append_html_escaped(long long a1, long long a2, long long a3) { char result; // al _QWORD *v4; // rax long long v5; // rdx char v6; // si char *v7; // rax long long v8; // rdx long long v9; // rdx long long v10; // [rsp+0h] [rbp-60h] _QWORD v11[2]; // [rsp+18h] [rbp-48h] BYREF long long v12; // [rsp+28h] [rbp-38h] BYREF _QWORD v13[2]; // [rsp+30h] [rbp-30h] BYREF char v14[8]; // [rsp+40h] [rbp-20h] BYREF long long v15; // [rsp+48h] [rbp-18h] long long v16; // [rsp+50h] [rbp-10h] BYREF long long v17; // [rsp+58h] [rbp-8h] v16 = a2; v17 = a3; v15 = a1; while ( 1 ) { result = ~(unsigned __int8)std::string_view::empty(&v16); if ( (result & 1) == 0 ) break; *(_QWORD *)v14 = std::string_view::find_first_of(&v16, "<>&", 0LL); v12 = std::string_view::length(&v16); v4 = (_QWORD *)std::min<unsigned long>(&v12, v14); v13[0] = std::string_view::substr(&v16, 0LL, *v4); v13[1] = v5; result = ZN6ulight17Non_Owning_BufferIcE12append_rangeITkNSt6ranges11input_rangeERKSt17basic_string_viewIcSt11char_traitsIcEEQsr3stdE14convertible_toIDTdeclsr3stdE7declvalIRDTclsr6ranges8__accessE7__beginclsr3stdE7declvalIRTL0__EEEEEEET_EEEvOSF_( v15, v13); if ( *(_QWORD *)v14 == -1LL ) break; v10 = v15; v6 = v14[0]; v7 = (char *)std::string_view::operator[](&v16, *(_QWORD *)v14); v11[0] = ulight::`anonymous namespace'::html_entity_of((ulight::_anonymous_namespace_ *)(unsigned int)*v7, v6); v11[1] = v8; ZN6ulight17Non_Owning_BufferIcE12append_rangeITkNSt6ranges11input_rangeESt17basic_string_viewIcSt11char_traitsIcEEQsr3stdE14convertible_toIDTdeclsr3stdE7declvalIRDTclsr6ranges8__accessE7__beginclsr3stdE7declvalIRTL0__EEEEEEET_EEEvOSD_( v10, v11); v16 = std::string_view::substr(&v16, *(_QWORD *)v14 + 1LL, -1LL); v17 = v9; } return result; }
append_html_escaped: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x8],RDX MOV qword ptr [RBP + -0x18],RDI LAB_00106204: LEA RDI,[RBP + -0x10] CALL 0x00108110 XOR AL,0xff TEST AL,0x1 JNZ 0x00106218 JMP 0x001062df LAB_00106218: LEA RDI,[RBP + -0x10] LEA RSI,[0x11b77d] XOR EAX,EAX MOV EDX,EAX CALL 0x00108130 MOV qword ptr [RBP + -0x20],RAX LEA RDI,[RBP + -0x10] CALL 0x00106d20 MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x20] CALL 0x00107720 MOV RDX,qword ptr [RAX] LEA RDI,[RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001073a0 MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x28],RDX MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x30] CALL 0x00107b50 CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x00106278 JMP 0x001062df LAB_00106278: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x10] CALL 0x00108180 MOVSX EDI,byte ptr [RAX] CALL 0x00106710 MOV RDI,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x40],RDX LEA RSI,[RBP + -0x48] CALL 0x00107c50 MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x1 LEA RDI,[RBP + -0x10] MOV RDX,-0x1 CALL 0x001073a0 MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x50],RDX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX JMP 0x00106204 LAB_001062df: ADD RSP,0x60 POP RBP RET
/* ulight::(anonymous namespace)::append_html_escaped(ulight::Non_Owning_Buffer<char>&, std::basic_string_view<char, std::char_traits<char> >) */ void __thiscall ulight::(anonymous_namespace)::append_html_escaped (_anonymous_namespace_ *this,int8 param_1,int8 param_3) { _anonymous_namespace_ *p_Var1; ulong uVar2; ulong *puVar3; char *pcVar4; int1 auVar5 [16]; int1 local_50 [16]; ulong local_40; int1 local_38 [16]; ulong local_28; _anonymous_namespace_ *local_20; basic_string_view<char,std::char_traits<char>> local_18 [16]; auVar5._8_8_ = param_3; auVar5._0_8_ = param_1; local_20 = this; while( true ) { local_18 = (basic_string_view<char,std::char_traits<char>> [16])auVar5; uVar2 = std::basic_string_view<char,std::char_traits<char>>::empty(local_18); if (((uVar2 ^ 0xff) & 1) == 0) { return; } local_28 = std::basic_string_view<char,std::char_traits<char>>::find_first_of(local_18,"<>&",0); local_40 = std::basic_string_view<char,std::char_traits<char>>::length(local_18); puVar3 = std::min<unsigned_long>(&local_40,&local_28); auVar5 = std::basic_string_view<char,std::char_traits<char>>::substr(local_18,0,*puVar3); local_38 = auVar5; _ZN6ulight17Non_Owning_BufferIcE12append_rangeITkNSt6ranges11input_rangeERKSt17basic_string_viewIcSt11char_traitsIcEEQsr3stdE14convertible_toIDTdeclsr3stdE7declvalIRDTclsr6ranges8__accessE7__beginclsr3stdE7declvalIRTL0__EEEEEEET_EEEvOSF_ (local_20,local_38); p_Var1 = local_20; if (local_28 == 0xffffffffffffffff) break; pcVar4 = (char *)std::basic_string_view<char,std::char_traits<char>>::operator[] (local_18,local_28); auVar5 = html_entity_of(*pcVar4); local_50 = auVar5; _ZN6ulight17Non_Owning_BufferIcE12append_rangeITkNSt6ranges11input_rangeESt17basic_string_viewIcSt11char_traitsIcEEQsr3stdE14convertible_toIDTdeclsr3stdE7declvalIRDTclsr6ranges8__accessE7__beginclsr3stdE7declvalIRTL0__EEEEEEET_EEEvOSD_ (p_Var1,local_50); auVar5 = std::basic_string_view<char,std::char_traits<char>>::substr (local_18,local_28 + 1,0xffffffffffffffff); } return; }
21,912
nglog::tools::GetSymbolFromObjectFile(int, unsigned long, char*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static bool GetSymbolFromObjectFile(const int fd, uint64_t pc, char* out, size_t out_size, uint64_t base_address) { // Read the ELF header. ElfW(Ehdr) elf_header; if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { return false; } ElfW(Shdr) symtab, strtab; // Consult a regular symbol table first. if (GetSectionHeaderByType(fd, elf_header.e_shnum, elf_header.e_shoff, SHT_SYMTAB, &symtab)) { if (!ReadFromOffsetExact( fd, &strtab, sizeof(strtab), elf_header.e_shoff + symtab.sh_link * sizeof(symtab))) { return false; } if (FindSymbol(pc, fd, out, out_size, base_address, &strtab, &symtab)) { return true; // Found the symbol in a regular symbol table. } } // If the symbol is not found, then consult a dynamic symbol table. if (GetSectionHeaderByType(fd, elf_header.e_shnum, elf_header.e_shoff, SHT_DYNSYM, &symtab)) { if (!ReadFromOffsetExact( fd, &strtab, sizeof(strtab), elf_header.e_shoff + symtab.sh_link * sizeof(symtab))) { return false; } if (FindSymbol(pc, fd, out, out_size, base_address, &strtab, &symtab)) { return true; // Found the symbol in a dynamic symbol table. } } return false; }
O0
cpp
nglog::tools::GetSymbolFromObjectFile(int, unsigned long, char*, unsigned long, unsigned long): pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl -0x8(%rbp), %edi leaq -0x68(%rbp), %rsi movl $0x40, %edx xorl %eax, %eax movl %eax, %ecx callq 0x49770 testb $0x1, %al jne 0x4a4c0 movb $0x0, -0x1(%rbp) jmp 0x4a5dc movl -0x8(%rbp), %edi movw -0x2c(%rbp), %ax movq -0x40(%rbp), %rdx movl $0x2, %ecx leaq -0xa8(%rbp), %r8 movzwl %ax, %esi callq 0x4acc0 testb $0x1, %al jne 0x4a4e5 jmp 0x4a54f movl -0x8(%rbp), %edi movq -0x40(%rbp), %rcx movl -0x80(%rbp), %eax shlq $0x6, %rax addq %rax, %rcx leaq -0xe8(%rbp), %rsi movl $0x40, %edx callq 0x49770 testb $0x1, %al jne 0x4a514 movb $0x0, -0x1(%rbp) jmp 0x4a5dc movq -0x10(%rbp), %rdi movl -0x8(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 leaq -0xe8(%rbp), %r9 leaq -0xa8(%rbp), %rax movq %rax, (%rsp) callq 0x4ae70 testb $0x1, %al jne 0x4a544 jmp 0x4a54d movb $0x1, -0x1(%rbp) jmp 0x4a5dc jmp 0x4a54f movl -0x8(%rbp), %edi movw -0x2c(%rbp), %ax movq -0x40(%rbp), %rdx movl $0xb, %ecx leaq -0xa8(%rbp), %r8 movzwl %ax, %esi callq 0x4acc0 testb $0x1, %al jne 0x4a574 jmp 0x4a5d8 movl -0x8(%rbp), %edi movq -0x40(%rbp), %rcx movl -0x80(%rbp), %eax shlq $0x6, %rax addq %rax, %rcx leaq -0xe8(%rbp), %rsi movl $0x40, %edx callq 0x49770 testb $0x1, %al jne 0x4a5a0 movb $0x0, -0x1(%rbp) jmp 0x4a5dc movq -0x10(%rbp), %rdi movl -0x8(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 leaq -0xe8(%rbp), %r9 leaq -0xa8(%rbp), %rax movq %rax, (%rsp) callq 0x4ae70 testb $0x1, %al jne 0x4a5d0 jmp 0x4a5d6 movb $0x1, -0x1(%rbp) jmp 0x4a5dc jmp 0x4a5d8 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0xf0, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN5nglog5toolsL23GetSymbolFromObjectFileEimPcmm: push rbp mov rbp, rsp sub rsp, 0F0h mov dword ptr [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov edi, dword ptr [rbp+var_8]; this lea rsi, [rbp+var_68]; int mov edx, offset dword_40; void * xor eax, eax mov ecx, eax; unsigned __int64 call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, 1 jnz short loc_4A4C0 mov byte ptr [rbp+var_8+7], 0 jmp loc_4A5DC loc_4A4C0: mov edi, dword ptr [rbp+var_8] mov ax, [rbp+var_2C] mov rdx, [rbp+var_40] mov ecx, 2 lea r8, [rbp+var_A8] movzx esi, ax call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, 1 jnz short loc_4A4E5 jmp short loc_4A54F loc_4A4E5: mov edi, dword ptr [rbp+var_8]; this mov rcx, [rbp+var_40] mov eax, [rbp+var_80] shl rax, 6 add rcx, rax; unsigned __int64 lea rsi, [rbp+var_E8]; int mov edx, offset dword_40; void * call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, 1 jnz short loc_4A514 mov byte ptr [rbp+var_8+7], 0 jmp loc_4A5DC loc_4A514: mov rdi, [rbp+var_10] mov esi, dword ptr [rbp+var_8] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] lea r9, [rbp+var_E8] lea rax, [rbp+var_A8] mov [rsp+0F0h+var_F0], rax call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, 1 jnz short loc_4A544 jmp short loc_4A54D loc_4A544: mov byte ptr [rbp+var_8+7], 1 jmp loc_4A5DC loc_4A54D: jmp short $+2 loc_4A54F: mov edi, dword ptr [rbp+var_8] mov ax, [rbp+var_2C] mov rdx, [rbp+var_40] mov ecx, 0Bh lea r8, [rbp+var_A8] movzx esi, ax call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, 1 jnz short loc_4A574 jmp short loc_4A5D8 loc_4A574: mov edi, dword ptr [rbp+var_8]; this mov rcx, [rbp+var_40] mov eax, [rbp+var_80] shl rax, 6 add rcx, rax; unsigned __int64 lea rsi, [rbp+var_E8]; int mov edx, offset dword_40; void * call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, 1 jnz short loc_4A5A0 mov byte ptr [rbp+var_8+7], 0 jmp short loc_4A5DC loc_4A5A0: mov rdi, [rbp+var_10] mov esi, dword ptr [rbp+var_8] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] lea r9, [rbp+var_E8] lea rax, [rbp+var_A8] mov [rsp+0F0h+var_F0], rax call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, 1 jnz short loc_4A5D0 jmp short loc_4A5D6 loc_4A5D0: mov byte ptr [rbp+var_8+7], 1 jmp short loc_4A5DC loc_4A5D6: jmp short $+2 loc_4A5D8: mov byte ptr [rbp+var_8+7], 0 loc_4A5DC: mov al, byte ptr [rbp+var_8+7] and al, 1 add rsp, 0F0h pop rbp retn
char nglog::tools::GetSymbolFromObjectFile( nglog::tools *this, long long a2, long long a3, char *a4, unsigned long long a5) { unsigned long long v5; // r8 unsigned long long v6; // r8 int v8[16]; // [rsp+8h] [rbp-E8h] BYREF _BYTE v9[40]; // [rsp+48h] [rbp-A8h] BYREF unsigned int v10; // [rsp+70h] [rbp-80h] int v11; // [rsp+88h] [rbp-68h] BYREF long long v12; // [rsp+B0h] [rbp-40h] unsigned __int16 v13; // [rsp+C4h] [rbp-2Ch] unsigned long long v14; // [rsp+C8h] [rbp-28h] char *v15; // [rsp+D0h] [rbp-20h] long long v16; // [rsp+D8h] [rbp-18h] long long v17; // [rsp+E0h] [rbp-10h] unsigned int v18; // [rsp+E8h] [rbp-8h] v18 = (unsigned int)this; v17 = a2; v16 = a3; v15 = a4; v14 = a5; if ( nglog::tools::ReadFromOffsetExact((nglog::tools *)(unsigned int)this, (int)&v11, &dword_40, 0LL, a5) ) { if ( (nglog::tools::GetSectionHeaderByType(v18, v13, v12, 2LL, v9) & 1) != 0 ) { if ( !nglog::tools::ReadFromOffsetExact( (nglog::tools *)v18, (int)v8, &dword_40, ((unsigned long long)v10 << 6) + v12, v5) ) return 0; if ( (nglog::tools::FindSymbol(v17, v18, v16, (_DWORD)v15, v14, (unsigned int)v8, (long long)v9) & 1) != 0 ) return 1; } if ( (nglog::tools::GetSectionHeaderByType(v18, v13, v12, 11LL, v9) & 1) != 0 ) { if ( !nglog::tools::ReadFromOffsetExact( (nglog::tools *)v18, (int)v8, &dword_40, ((unsigned long long)v10 << 6) + v12, v6) ) return 0; if ( (nglog::tools::FindSymbol(v17, v18, v16, (_DWORD)v15, v14, (unsigned int)v8, (long long)v9) & 1) != 0 ) return 1; } return 0; } return 0; }
GetSymbolFromObjectFile: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV EDI,dword ptr [RBP + -0x8] LEA RSI,[RBP + -0x68] MOV EDX,0x40 XOR EAX,EAX MOV ECX,EAX CALL 0x00149770 TEST AL,0x1 JNZ 0x0014a4c0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014a5dc LAB_0014a4c0: MOV EDI,dword ptr [RBP + -0x8] MOV AX,word ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x40] MOV ECX,0x2 LEA R8,[RBP + -0xa8] MOVZX ESI,AX CALL 0x0014acc0 TEST AL,0x1 JNZ 0x0014a4e5 JMP 0x0014a54f LAB_0014a4e5: MOV EDI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x80] SHL RAX,0x6 ADD RCX,RAX LEA RSI,[RBP + -0xe8] MOV EDX,0x40 CALL 0x00149770 TEST AL,0x1 JNZ 0x0014a514 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014a5dc LAB_0014a514: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] LEA R9,[RBP + -0xe8] LEA RAX,[RBP + -0xa8] MOV qword ptr [RSP],RAX CALL 0x0014ae70 TEST AL,0x1 JNZ 0x0014a544 JMP 0x0014a54d LAB_0014a544: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014a5dc LAB_0014a54d: JMP 0x0014a54f LAB_0014a54f: MOV EDI,dword ptr [RBP + -0x8] MOV AX,word ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x40] MOV ECX,0xb LEA R8,[RBP + -0xa8] MOVZX ESI,AX CALL 0x0014acc0 TEST AL,0x1 JNZ 0x0014a574 JMP 0x0014a5d8 LAB_0014a574: MOV EDI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x80] SHL RAX,0x6 ADD RCX,RAX LEA RSI,[RBP + -0xe8] MOV EDX,0x40 CALL 0x00149770 TEST AL,0x1 JNZ 0x0014a5a0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014a5dc LAB_0014a5a0: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] LEA R9,[RBP + -0xe8] LEA RAX,[RBP + -0xa8] MOV qword ptr [RSP],RAX CALL 0x0014ae70 TEST AL,0x1 JNZ 0x0014a5d0 JMP 0x0014a5d6 LAB_0014a5d0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014a5dc LAB_0014a5d6: JMP 0x0014a5d8 LAB_0014a5d8: MOV byte ptr [RBP + -0x1],0x0 LAB_0014a5dc: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0xf0 POP RBP RET
/* nglog::tools::GetSymbolFromObjectFile(int, unsigned long, char*, unsigned long, unsigned long) */ int1 nglog::tools::GetSymbolFromObjectFile (int param_1,ulong param_2,char *param_3,ulong param_4,ulong param_5) { ulong uVar1; Elf64_Shdr local_f0; Elf64_Shdr local_b0; int1 local_70 [40]; ulong local_48; ushort local_34; ulong local_30; ulong local_28; char *local_20; ulong local_18; int local_10; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar1 = ReadFromOffsetExact(param_1,local_70,0x40,0); if ((uVar1 & 1) == 0) { return 0; } uVar1 = GetSectionHeaderByType(local_10,local_34,local_48,2,&local_b0); if ((uVar1 & 1) != 0) { uVar1 = ReadFromOffsetExact(local_10,&local_f0,0x40,local_48 + (ulong)local_b0.sh_link * 0x40); if ((uVar1 & 1) == 0) { return 0; } uVar1 = FindSymbol(local_18,local_10,local_20,local_28,local_30,&local_f0,&local_b0); if ((uVar1 & 1) != 0) { return 1; } } uVar1 = GetSectionHeaderByType(local_10,local_34,local_48,0xb,&local_b0); if ((uVar1 & 1) != 0) { uVar1 = ReadFromOffsetExact(local_10,&local_f0,0x40,local_48 + (ulong)local_b0.sh_link * 0x40); if ((uVar1 & 1) == 0) { return 0; } uVar1 = FindSymbol(local_18,local_10,local_20,local_28,local_30,&local_f0,&local_b0); if ((uVar1 & 1) != 0) { return 1; } } return 0; }
21,913
JS_ThrowTypeErrorReadOnly
bluesky950520[P]quickjs/quickjs.c
static int JS_ThrowTypeErrorReadOnly(JSContext *ctx, int flags, JSAtom atom) { if ((flags & JS_PROP_THROW) || ((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) { JS_ThrowTypeErrorAtom(ctx, "'%s' is read-only", atom); return -1; } else { return FALSE; } }
O0
c
JS_ThrowTypeErrorReadOnly: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movl %edx, 0x10(%rsp) movl 0x14(%rsp), %eax andl $0x4000, %eax # imm = 0x4000 cmpl $0x0, %eax jne 0x6100c movl 0x14(%rsp), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax je 0x6103d movq 0x18(%rsp), %rdi callq 0x37f40 cmpl $0x0, %eax je 0x6103d movq 0x18(%rsp), %rdi movl 0x10(%rsp), %esi leaq 0xad17b(%rip), %rdx # 0x10e197 leaq 0xa863d(%rip), %rcx # 0x109660 movb $0x0, %al callq 0x603e0 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x61045 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nop
JS_ThrowTypeErrorReadOnly: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_18], edx mov eax, [rsp+28h+var_14] and eax, 4000h cmp eax, 0 jnz short loc_6100C mov eax, [rsp+28h+var_14] and eax, 8000h cmp eax, 0 jz short loc_6103D mov rdi, [rsp+28h+var_10] call is_strict_mode cmp eax, 0 jz short loc_6103D loc_6100C: mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_18] lea rdx, aSIsReadOnly; "'%s' is read-only" lea rcx, aIncludeQuickjs+1Bh; "" mov al, 0 call __JS_ThrowTypeErrorAtom mov [rsp+28h+var_28], rax mov [rsp+28h+var_20], rdx mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_61045 loc_6103D: mov [rsp+28h+var_4], 0 loc_61045: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long JS_ThrowTypeErrorReadOnly( long long a1, __int16 a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { if ( (a2 & 0x4000) != 0 || a2 < 0 && is_strict_mode(a1) ) { _JS_ThrowTypeErrorAtom(a1, a3, "'%s' is read-only", a4, a5, a6, a7, a8, a9, a10, a11); return (unsigned int)-1; } else { return 0; } }
JS_ThrowTypeErrorReadOnly: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV dword ptr [RSP + 0x10],EDX MOV EAX,dword ptr [RSP + 0x14] AND EAX,0x4000 CMP EAX,0x0 JNZ 0x0016100c MOV EAX,dword ptr [RSP + 0x14] AND EAX,0x8000 CMP EAX,0x0 JZ 0x0016103d MOV RDI,qword ptr [RSP + 0x18] CALL 0x00137f40 CMP EAX,0x0 JZ 0x0016103d LAB_0016100c: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x10] LEA RDX,[0x20e197] LEA RCX,[0x209660] MOV AL,0x0 CALL 0x001603e0 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x00161045 LAB_0016103d: MOV dword ptr [RSP + 0x24],0x0 LAB_00161045: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 JS_ThrowTypeErrorReadOnly(int8 param_1,uint param_2,int4 param_3) { int iVar1; int4 local_4; if ((param_2 & 0x4000) == 0) { if ((param_2 & 0x8000) != 0) { iVar1 = is_strict_mode(param_1); if (iVar1 != 0) goto LAB_0016100c; } local_4 = 0; } else { LAB_0016100c: __JS_ThrowTypeErrorAtom(param_1,param_3,"\'%s\' is read-only",""); local_4 = 0xffffffff; } return local_4; }
21,914
JS_ThrowTypeErrorReadOnly
bluesky950520[P]quickjs/quickjs.c
static int JS_ThrowTypeErrorReadOnly(JSContext *ctx, int flags, JSAtom atom) { if ((flags & JS_PROP_THROW) || ((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) { JS_ThrowTypeErrorAtom(ctx, "'%s' is read-only", atom); return -1; } else { return FALSE; } }
O1
c
JS_ThrowTypeErrorReadOnly: pushq %rbx subq $0x40, %rsp movq %rdi, %rbx btl $0xe, %esi jb 0x3db8d xorl %eax, %eax testw %si, %si jns 0x3dbb2 movq 0x18(%rbx), %rcx movq 0x108(%rcx), %rcx testq %rcx, %rcx je 0x3dbb2 cmpl $0x0, 0x40(%rcx) jns 0x3dbb2 movq 0x18(%rbx), %rdi movq %rsp, %rsi callq 0x221f0 leaq 0x61593(%rip), %rsi # 0x9f133 movq %rbx, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x22567 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x40, %rsp popq %rbx retq
JS_ThrowTypeErrorReadOnly: push rbx sub rsp, 40h mov rbx, rdi bt esi, 0Eh jb short loc_3DB8D xor eax, eax test si, si jns short loc_3DBB2 mov rcx, [rbx+18h] mov rcx, [rcx+108h] test rcx, rcx jz short loc_3DBB2 cmp dword ptr [rcx+40h], 0 jns short loc_3DBB2 loc_3DB8D: mov rdi, [rbx+18h] mov rsi, rsp call JS_AtomGetStrRT lea rsi, aSIsReadOnly; "'%s' is read-only" mov rdi, rbx mov rdx, rax xor eax, eax call JS_ThrowTypeError mov eax, 0FFFFFFFFh loc_3DBB2: add rsp, 40h pop rbx retn
long long JS_ThrowTypeErrorReadOnly( long long a1, __int16 a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long result; // rax long long v12; // rcx unsigned long long StrRT; // rax long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 char v19[72]; // [rsp+0h] [rbp-48h] BYREF if ( (a2 & 0x4000) != 0 || (result = 0LL, a2 < 0) && (v12 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL)) != 0 && *(int *)(v12 + 64) < 0 ) { StrRT = JS_AtomGetStrRT(*(_QWORD *)(a1 + 24), v19, a3); JS_ThrowTypeError( a1, (long long)"'%s' is read-only", StrRT, v14, v15, v16, a4, a5, a6, a7, v17, v18, a10, a11, v19[0]); return 0xFFFFFFFFLL; } return result; }
JS_ThrowTypeErrorReadOnly: PUSH RBX SUB RSP,0x40 MOV RBX,RDI BT ESI,0xe JC 0x0013db8d XOR EAX,EAX TEST SI,SI JNS 0x0013dbb2 MOV RCX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RCX + 0x108] TEST RCX,RCX JZ 0x0013dbb2 CMP dword ptr [RCX + 0x40],0x0 JNS 0x0013dbb2 LAB_0013db8d: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,RSP CALL 0x001221f0 LEA RSI,[0x19f133] MOV RDI,RBX MOV RDX,RAX XOR EAX,EAX CALL 0x00122567 MOV EAX,0xffffffff LAB_0013dbb2: ADD RSP,0x40 POP RBX RET
int8 JS_ThrowTypeErrorReadOnly(long param_1,uint param_2) { long lVar1; int8 uVar2; int1 auStack_48 [64]; if (((param_2 >> 0xe & 1) != 0) || (((uVar2 = 0, (short)param_2 < 0 && (lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x108), lVar1 != 0)) && (*(int *)(lVar1 + 0x40) < 0)))) { uVar2 = JS_AtomGetStrRT(*(int8 *)(param_1 + 0x18),auStack_48); JS_ThrowTypeError(param_1,"\'%s\' is read-only",uVar2); uVar2 = 0xffffffff; } return uVar2; }
21,915
JS_ThrowTypeErrorReadOnly
bluesky950520[P]quickjs/quickjs.c
static int JS_ThrowTypeErrorReadOnly(JSContext *ctx, int flags, JSAtom atom) { if ((flags & JS_PROP_THROW) || ((flags & JS_PROP_THROW_STRICT) && is_strict_mode(ctx))) { JS_ThrowTypeErrorAtom(ctx, "'%s' is read-only", atom); return -1; } else { return FALSE; } }
O2
c
JS_ThrowTypeErrorReadOnly: btl $0xe, %esi jb 0x3638b xorl %eax, %eax testw %si, %si jns 0x3638a movq 0x18(%rdi), %rcx movq 0x108(%rcx), %rcx testq %rcx, %rcx je 0x3638a cmpl $0x0, 0x40(%rcx) js 0x3638b retq pushq %rax leaq 0x4fcf0(%rip), %rax # 0x86083 movl %edx, %esi movq %rax, %rdx callq 0x35e6d pushq $-0x1 popq %rax addq $0x8, %rsp retq
JS_ThrowTypeErrorReadOnly: bt esi, 0Eh jb short loc_3638B xor eax, eax test si, si jns short locret_3638A mov rcx, [rdi+18h] mov rcx, [rcx+108h] test rcx, rcx jz short locret_3638A cmp dword ptr [rcx+40h], 0 js short loc_3638B locret_3638A: retn loc_3638B: push rax lea rax, aSIsReadOnly; "'%s' is read-only" mov esi, edx mov rdx, rax call __JS_ThrowTypeErrorAtom push 0FFFFFFFFFFFFFFFFh pop rax add rsp, 8 retn
long long JS_ThrowTypeErrorReadOnly( long long a1, __int16 a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long result; // rax long long v12; // rcx if ( (a2 & 0x4000) != 0 || (result = 0LL, a2 < 0) && (v12 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL)) != 0 && *(int *)(v12 + 64) < 0 ) { _JS_ThrowTypeErrorAtom(a1, a3, "'%s' is read-only", a4, a5, a6, a7, a8, a9, a10, a11); return -1LL; } return result; }
JS_ThrowTypeErrorReadOnly: BT ESI,0xe JC 0x0013638b XOR EAX,EAX TEST SI,SI JNS 0x0013638a MOV RCX,qword ptr [RDI + 0x18] MOV RCX,qword ptr [RCX + 0x108] TEST RCX,RCX JZ 0x0013638a CMP dword ptr [RCX + 0x40],0x0 JS 0x0013638b LAB_0013638a: RET LAB_0013638b: PUSH RAX LEA RAX,[0x186083] MOV ESI,EDX MOV RDX,RAX CALL 0x00135e6d PUSH -0x1 POP RAX ADD RSP,0x8 RET
int8 JS_ThrowTypeErrorReadOnly(long param_1,uint param_2,int4 param_3) { long lVar1; if ((param_2 >> 0xe & 1) == 0) { if (((-1 < (short)param_2) || (lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x108), lVar1 == 0) ) || (-1 < *(int *)(lVar1 + 0x40))) { return 0; } } __JS_ThrowTypeErrorAtom(param_1,param_3,"\'%s\' is read-only"); return 0xffffffffffffffff; }
21,916
TensorStorage::unsqueeze()
7CodeWizard[P]stablediffusion/model.h
void unsqueeze() { if (n_dims == 2) { n_dims = 4; ne[3] = ne[1]; ne[2] = ne[0]; ne[1] = 1; ne[0] = 1; } }
O0
c
TensorStorage::unsqueeze(): movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movq %rax, -0x10(%rsp) cmpl $0x2, 0x48(%rax) jne 0xc2c41 movq -0x10(%rsp), %rax movl $0x4, 0x48(%rax) movq 0x30(%rax), %rcx movq %rcx, 0x40(%rax) movq 0x28(%rax), %rcx movq %rcx, 0x38(%rax) movq $0x1, 0x30(%rax) movq $0x1, 0x28(%rax) retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN13TensorStorage9unsqueezeEv: mov [rsp+var_8], rdi mov rax, [rsp+var_8] mov [rsp+var_10], rax cmp dword ptr [rax+48h], 2 jnz short locret_C2C41 mov rax, [rsp+var_10] mov dword ptr [rax+48h], 4 mov rcx, [rax+30h] mov [rax+40h], rcx mov rcx, [rax+28h] mov [rax+38h], rcx mov qword ptr [rax+30h], 1 mov qword ptr [rax+28h], 1 locret_C2C41: retn
TensorStorage * TensorStorage::unsqueeze(TensorStorage *this) { TensorStorage *result; // rax result = this; if ( *((_DWORD *)this + 18) == 2 ) { result = this; *((_DWORD *)this + 18) = 4; *((_QWORD *)this + 8) = *((_QWORD *)this + 6); *((_QWORD *)this + 7) = *((_QWORD *)this + 5); *((_QWORD *)this + 6) = 1LL; *((_QWORD *)this + 5) = 1LL; } return result; }
unsqueeze: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RSP + -0x10],RAX CMP dword ptr [RAX + 0x48],0x2 JNZ 0x001c2c41 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0x48],0x4 MOV RCX,qword ptr [RAX + 0x30] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x38],RCX MOV qword ptr [RAX + 0x30],0x1 MOV qword ptr [RAX + 0x28],0x1 LAB_001c2c41: RET
/* TensorStorage::unsqueeze() */ void __thiscall TensorStorage::unsqueeze(TensorStorage *this) { if (*(int *)(this + 0x48) == 2) { *(int4 *)(this + 0x48) = 4; *(int8 *)(this + 0x40) = *(int8 *)(this + 0x30); *(int8 *)(this + 0x38) = *(int8 *)(this + 0x28); *(int8 *)(this + 0x30) = 1; *(int8 *)(this + 0x28) = 1; } return; }
21,917
TensorStorage::unsqueeze()
7CodeWizard[P]stablediffusion/model.h
void unsqueeze() { if (n_dims == 2) { n_dims = 4; ne[3] = ne[1]; ne[2] = ne[0]; ne[1] = 1; ne[0] = 1; } }
O2
c
TensorStorage::unsqueeze(): cmpl $0x2, 0x48(%rdi) jne 0x4a3fe movl $0x4, 0x48(%rdi) movups 0x28(%rdi), %xmm0 movups %xmm0, 0x38(%rdi) pushq $0x1 popq %rax movq %rax, 0x30(%rdi) movq %rax, 0x28(%rdi) retq nop
_ZN13TensorStorage9unsqueezeEv: cmp dword ptr [rdi+48h], 2 jnz short locret_4A3FE mov dword ptr [rdi+48h], 4 movups xmm0, xmmword ptr [rdi+28h] movups xmmword ptr [rdi+38h], xmm0 push 1 pop rax mov [rdi+30h], rax mov [rdi+28h], rax locret_4A3FE: retn
long long TensorStorage::unsqueeze(TensorStorage *this) { long long result; // rax if ( *((_DWORD *)this + 18) == 2 ) { *((_DWORD *)this + 18) = 4; *(_OWORD *)((char *)this + 56) = *(_OWORD *)((char *)this + 40); result = 1LL; *((_QWORD *)this + 6) = 1LL; *((_QWORD *)this + 5) = 1LL; } return result; }
unsqueeze: CMP dword ptr [RDI + 0x48],0x2 JNZ 0x0014a3fe MOV dword ptr [RDI + 0x48],0x4 MOVUPS XMM0,xmmword ptr [RDI + 0x28] MOVUPS xmmword ptr [RDI + 0x38],XMM0 PUSH 0x1 POP RAX MOV qword ptr [RDI + 0x30],RAX MOV qword ptr [RDI + 0x28],RAX LAB_0014a3fe: RET
/* TensorStorage::unsqueeze() */ void __thiscall TensorStorage::unsqueeze(TensorStorage *this) { if (*(int *)(this + 0x48) == 2) { *(int4 *)(this + 0x48) = 4; *(int8 *)(this + 0x38) = *(int8 *)(this + 0x28); *(int8 *)(this + 0x40) = *(int8 *)(this + 0x30); *(int8 *)(this + 0x30) = 1; *(int8 *)(this + 0x28) = 1; } return; }
21,918
ma_report_error
eloqsql/storage/maria/ma_info.c
void _ma_report_error(int errcode, const LEX_STRING *name, myf flags) { size_t length; const char *file_name= name->str; DBUG_ENTER("_ma_report_error"); DBUG_PRINT("enter",("error: %d table: '%s'", errcode, file_name)); if ((length= name->length) > 64) { /* we first remove the directory */ size_t dir_length= dirname_length(file_name); file_name+= dir_length; if ((length-= dir_length) > 64) { /* still too long, chop start of table name */ file_name+= length - 64; } } my_printf_error(errcode, "Got error '%M' for '%s'", flags, (int) errcode, file_name); DBUG_VOID_RETURN; }
O0
c
ma_report_error: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) jmp 0x37ae0 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x40, %rax jbe 0x37b32 movq -0x28(%rbp), %rdi callq 0xe2590 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) cmpq $0x40, %rax jbe 0x37b30 movq -0x20(%rbp), %rax subq $0x40, %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x37b32 movl -0x4(%rbp), %edi movq -0x18(%rbp), %rdx movl -0x4(%rbp), %ecx movq -0x28(%rbp), %r8 leaq 0x122b02(%rip), %rsi # 0x15a649 movb $0x0, %al callq 0xf2c30 jmp 0x37b50 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_report_error: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax jmp short $+2 loc_37AE0: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax cmp rax, 40h ; '@' jbe short loc_37B32 mov rdi, [rbp+var_28] call dirname_length mov [rbp+var_30], rax mov rax, [rbp+var_30] add rax, [rbp+var_28] mov [rbp+var_28], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax cmp rax, 40h ; '@' jbe short loc_37B30 mov rax, [rbp+var_20] sub rax, 40h ; '@' add rax, [rbp+var_28] mov [rbp+var_28], rax loc_37B30: jmp short $+2 loc_37B32: mov edi, [rbp+var_4] mov rdx, [rbp+var_18] mov ecx, [rbp+var_4] mov r8, [rbp+var_28] lea rsi, aGotErrorMForS; "Got error '%M' for '%s'" mov al, 0 call my_printf_error jmp short $+2 loc_37B50: add rsp, 30h pop rbp retn
long long ma_report_error(int a1, long long *a2, int a3, long long a4, long long a5, int a6) { long long v7; // [rsp+0h] [rbp-30h] long long v8; // [rsp+8h] [rbp-28h] unsigned long long v9; // [rsp+10h] [rbp-20h] unsigned long long v10; // [rsp+10h] [rbp-20h] v8 = *a2; v9 = a2[1]; if ( v9 > 0x40 ) { v7 = dirname_length(v8); LODWORD(v8) = v8 + v7; v10 = v9 - v7; if ( v10 > 0x40 ) LODWORD(v8) = v8 + v10 - 64; } return my_printf_error(a1, (unsigned int)"Got error '%M' for '%s'", a3, a1, v8, a6); }
_ma_report_error: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX JMP 0x00137ae0 LAB_00137ae0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x40 JBE 0x00137b32 MOV RDI,qword ptr [RBP + -0x28] CALL 0x001e2590 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x40 JBE 0x00137b30 MOV RAX,qword ptr [RBP + -0x20] SUB RAX,0x40 ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_00137b30: JMP 0x00137b32 LAB_00137b32: MOV EDI,dword ptr [RBP + -0x4] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x4] MOV R8,qword ptr [RBP + -0x28] LEA RSI,[0x25a649] MOV AL,0x0 CALL 0x001f2c30 JMP 0x00137b50 LAB_00137b50: ADD RSP,0x30 POP RBP RET
void _ma_report_error(int4 param_1,long *param_2,int8 param_3) { long lVar1; ulong uVar2; long local_30; local_30 = *param_2; uVar2 = param_2[1]; if (0x40 < uVar2) { lVar1 = dirname_length(local_30); local_30 = lVar1 + local_30; uVar2 = uVar2 - lVar1; if (0x40 < uVar2) { local_30 = (uVar2 - 0x40) + local_30; } } my_printf_error(param_1,"Got error \'%M\' for \'%s\'",param_3,param_1,local_30); return; }
21,919
my_fprintf
eloqsql/strings/my_vsnprintf.c
int my_fprintf(FILE *stream, const char* format, ...) { int result; va_list args; va_start(args, format); result= my_vfprintf(stream, format, args); va_end(args); return result; }
O3
c
my_fprintf: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp leaq -0xd0(%rbp), %r10 movq %rdx, 0x10(%r10) movq %rcx, 0x18(%r10) movq %r8, 0x20(%r10) movq %r9, 0x28(%r10) testb %al, %al je 0xf6c24 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rdx movq %r10, 0x10(%rdx) leaq 0x10(%rbp), %rax movq %rax, 0x8(%rdx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rdx) callq 0xf6ae8 addq $0xd0, %rsp popq %rbp retq nop
my_fprintf: push rbp mov rbp, rsp sub rsp, 0D0h lea r10, [rbp+var_D0] mov [r10+10h], rdx mov [r10+18h], rcx mov [r10+20h], r8 mov [r10+28h], r9 test al, al jz short loc_F6C24 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_F6C24: lea rdx, [rbp+var_20] mov [rdx+10h], r10 lea rax, [rbp+arg_0] mov [rdx+8], rax mov rax, 3000000010h mov [rdx], rax call my_vfprintf add rsp, 0D0h pop rbp retn
long long my_fprintf( long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+10h] [rbp-C0h] long long v18; // [rsp+18h] [rbp-B8h] long long v19; // [rsp+20h] [rbp-B0h] long long v20; // [rsp+28h] [rbp-A8h] __m128 v21; // [rsp+30h] [rbp-A0h] __m128 v22; // [rsp+40h] [rbp-90h] __m128 v23; // [rsp+50h] [rbp-80h] __m128 v24; // [rsp+60h] [rbp-70h] __m128 v25; // [rsp+70h] [rbp-60h] __m128 v26; // [rsp+80h] [rbp-50h] __m128 v27; // [rsp+90h] [rbp-40h] __m128 v28; // [rsp+A0h] [rbp-30h] _QWORD v29[4]; // [rsp+B0h] [rbp-20h] BYREF v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v17 = a3; v18 = a4; v19 = a5; v20 = a6; v29[2] = &v16; v29[1] = &a15; v29[0] = 0x3000000010LL; return my_vfprintf(a1, a2, (unsigned int *)v29); }
my_fprintf: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 LEA R10,[RBP + -0xd0] MOV qword ptr [R10 + 0x10],RDX MOV qword ptr [R10 + 0x18],RCX MOV qword ptr [R10 + 0x20],R8 MOV qword ptr [R10 + 0x28],R9 TEST AL,AL JZ 0x001f6c24 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_001f6c24: LEA RDX,[RBP + -0x20] MOV qword ptr [RDX + 0x10],R10 LEA RAX,[RBP + 0x10] MOV qword ptr [RDX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RDX],RAX CALL 0x001f6ae8 ADD RSP,0xd0 POP RBP RET
void my_fprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000010; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; my_vfprintf(); return; }
21,920
mysql_commit_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_commit_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_commit, (parms->mysql), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_commit_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x227f0 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_commit_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_commit mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_commit_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_BYTE *)(v2 + 8) = mysql_commit(*a1); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_commit_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001227f0 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_commit_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_commit(*param_1); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
21,921
google::protobuf::compiler::objectivec::MessageGenerator::GenerateEnumHeader(google::protobuf::io::Printer*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_message.cc
void MessageGenerator::GenerateEnumHeader(io::Printer* printer) { for (const auto& generator : enum_generators_) { generator->GenerateHeader(printer); } for (const auto& generator : nested_message_generators_) { generator->GenerateEnumHeader(printer); } }
O0
cpp
google::protobuf::compiler::objectivec::MessageGenerator::GenerateEnumHeader(google::protobuf::io::Printer*): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rax movq %rax, (%rsp) addq $0xb8, %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi callq 0x16c170 movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rdi callq 0x16c1a0 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x16c1d0 testb $0x1, %al jne 0x1713a5 jmp 0x1713d7 leaq 0x38(%rsp), %rdi callq 0x16c210 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0x16c220 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x1cb830 leaq 0x38(%rsp), %rdi callq 0x16c230 jmp 0x171390 movq (%rsp), %rax addq $0xd0, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi callq 0x16c090 movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi callq 0x16c0c0 movq %rax, 0x10(%rsp) leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x16c0f0 testb $0x1, %al jne 0x171419 jmp 0x17144b leaq 0x18(%rsp), %rdi callq 0x16c130 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi callq 0x16c140 movq %rax, %rdi movq 0x48(%rsp), %rsi callq 0x171350 leaq 0x18(%rsp), %rdi callq 0x16c150 jmp 0x171404 addq $0x58, %rsp retq
_ZN6google8protobuf8compiler10objectivec16MessageGenerator18GenerateEnumHeaderEPNS0_2io7PrinterE: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov rax, [rsp+58h+var_8] mov [rsp+58h+var_58], rax add rax, 0B8h mov [rsp+58h+var_18], rax mov rdi, [rsp+58h+var_18] call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler10objectivec13EnumGeneratorESt14default_deleteIS5_EESaIS8_EE5beginEv; std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>::begin(void) mov [rsp+58h+var_20], rax mov rdi, [rsp+58h+var_18] call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler10objectivec13EnumGeneratorESt14default_deleteIS5_EESaIS8_EE3endEv; std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>::end(void) mov [rsp+58h+var_28], rax loc_171390: lea rdi, [rsp+58h+var_20] lea rsi, [rsp+58h+var_28] call _ZN9__gnu_cxxneIPSt10unique_ptrIN6google8protobuf8compiler10objectivec13EnumGeneratorESt14default_deleteIS6_EESt6vectorIS9_SaIS9_EEEEbRKNS_17__normal_iteratorIT_T0_EESJ_; __gnu_cxx::operator!=<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>>(__gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>> const&) test al, 1 jnz short loc_1713A5 jmp short loc_1713D7 loc_1713A5: lea rdi, [rsp+58h+var_20] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN6google8protobuf8compiler10objectivec13EnumGeneratorESt14default_deleteIS6_EESt6vectorIS9_SaIS9_EEEdeEv; __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>>::operator*(void) mov [rsp+58h+var_30], rax mov rdi, [rsp+58h+var_30] call _ZNKSt10unique_ptrIN6google8protobuf8compiler10objectivec13EnumGeneratorESt14default_deleteIS4_EEptEv; std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>::operator->(void) mov rdi, rax; this mov rsi, [rsp+58h+var_10]; google::protobuf::io::Printer * call _ZN6google8protobuf8compiler10objectivec13EnumGenerator14GenerateHeaderEPNS0_2io7PrinterE; google::protobuf::compiler::objectivec::EnumGenerator::GenerateHeader(google::protobuf::io::Printer *) lea rdi, [rsp+58h+var_20] call _ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN6google8protobuf8compiler10objectivec13EnumGeneratorESt14default_deleteIS6_EESt6vectorIS9_SaIS9_EEEppEv; __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>>::operator++(void) jmp short loc_171390 loc_1713D7: mov rax, [rsp+58h+var_58] add rax, 0D0h mov [rsp+58h+var_38], rax mov rdi, [rsp+58h+var_38] call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler10objectivec16MessageGeneratorESt14default_deleteIS5_EESaIS8_EE5beginEv; std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>::begin(void) mov [rsp+58h+var_40], rax mov rdi, [rsp+58h+var_38] call _ZNSt6vectorISt10unique_ptrIN6google8protobuf8compiler10objectivec16MessageGeneratorESt14default_deleteIS5_EESaIS8_EE3endEv; std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>::end(void) mov [rsp+58h+var_48], rax loc_171404: lea rdi, [rsp+58h+var_40] lea rsi, [rsp+58h+var_48] call _ZN9__gnu_cxxneIPSt10unique_ptrIN6google8protobuf8compiler10objectivec16MessageGeneratorESt14default_deleteIS6_EESt6vectorIS9_SaIS9_EEEEbRKNS_17__normal_iteratorIT_T0_EESJ_; __gnu_cxx::operator!=<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>>(__gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>> const&) test al, 1 jnz short loc_171419 jmp short loc_17144B loc_171419: lea rdi, [rsp+58h+var_40] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN6google8protobuf8compiler10objectivec16MessageGeneratorESt14default_deleteIS6_EESt6vectorIS9_SaIS9_EEEdeEv; __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>>::operator*(void) mov [rsp+58h+var_50], rax mov rdi, [rsp+58h+var_50] call _ZNKSt10unique_ptrIN6google8protobuf8compiler10objectivec16MessageGeneratorESt14default_deleteIS4_EEptEv; std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>::operator->(void) mov rdi, rax; this mov rsi, [rsp+58h+var_10]; google::protobuf::io::Printer * call _ZN6google8protobuf8compiler10objectivec16MessageGenerator18GenerateEnumHeaderEPNS0_2io7PrinterE; google::protobuf::compiler::objectivec::MessageGenerator::GenerateEnumHeader(google::protobuf::io::Printer *) lea rdi, [rsp+58h+var_40] call _ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN6google8protobuf8compiler10objectivec16MessageGeneratorESt14default_deleteIS6_EESt6vectorIS9_SaIS9_EEEppEv; __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>>::operator++(void) jmp short loc_171404 loc_17144B: add rsp, 58h retn
bool google::protobuf::compiler::objectivec::MessageGenerator::GenerateEnumHeader( google::protobuf::compiler::objectivec::MessageGenerator *this, google::protobuf::io::Printer *a2) { google::protobuf::compiler::objectivec::EnumGenerator *v2; // rax bool result; // al google::protobuf::compiler::objectivec::MessageGenerator *v4; // rax long long v5; // [rsp+8h] [rbp-50h] long long v6; // [rsp+10h] [rbp-48h] BYREF _QWORD v7[2]; // [rsp+18h] [rbp-40h] BYREF long long v8; // [rsp+28h] [rbp-30h] long long v9; // [rsp+30h] [rbp-28h] BYREF _QWORD v10[2]; // [rsp+38h] [rbp-20h] BYREF google::protobuf::io::Printer *v11; // [rsp+48h] [rbp-10h] google::protobuf::compiler::objectivec::MessageGenerator *v12; // [rsp+50h] [rbp-8h] v12 = this; v11 = a2; v10[1] = (char *)this + 184; v10[0] = std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>::begin((long long)this + 184); v9 = std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>::end((long long)this + 184); while ( __gnu_cxx::operator!=<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>>( (long long)v10, (long long)&v9) ) { v8 = __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>>::operator*((long long)v10); v2 = (google::protobuf::compiler::objectivec::EnumGenerator *)std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>::operator->(v8); google::protobuf::compiler::objectivec::EnumGenerator::GenerateHeader(v2, v11); __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::EnumGenerator>>>::operator++(v10); } v7[1] = (char *)this + 208; v7[0] = std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>::begin((long long)this + 208); v6 = std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>::end((long long)this + 208); while ( 1 ) { result = __gnu_cxx::operator!=<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>>( (long long)v7, (long long)&v6); if ( !result ) break; v5 = __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>>::operator*((long long)v7); v4 = (google::protobuf::compiler::objectivec::MessageGenerator *)std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>::operator->(v5); google::protobuf::compiler::objectivec::MessageGenerator::GenerateEnumHeader(v4, v11); __gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator> *,std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::MessageGenerator>>>::operator++(v7); } return result; }
GenerateSerializationCode: 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] MOV RAX,qword ptr [RDI] MOV EDX,0x1 CALL qword ptr [RAX + 0x58] ADD RSP,0x18 RET
/* google::protobuf::compiler::csharp::WrapperOneofFieldGenerator::GenerateSerializationCode(google::protobuf::io::Printer*) */ void __thiscall google::protobuf::compiler::csharp::WrapperOneofFieldGenerator::GenerateSerializationCode (WrapperOneofFieldGenerator *this,Printer *param_1) { (**(code **)(*(long *)this + 0x58))(this,param_1,1); return; }
21,922
LefDefParser::defiGroup::setup(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiGroup.cpp
void defiGroup::setup(const char* name) { int len = strlen(name) + 1; if (len > nameLength_) { if (name_) free(name_); nameLength_ = len; name_ = (char*)malloc(len); } strcpy(name_, defData->DEFCASE(name)); clear(); }
O3
cpp
LefDefParser::defiGroup::setup(char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi callq 0x70d0 movq %rax, %r12 incl %r12d movq (%rbx), %r15 cmpl 0x8(%rbx), %r12d jle 0x2e2aa testq %r15, %r15 je 0x2e298 movq %r15, %rdi callq 0x7220 movl %r12d, 0x8(%rbx) movslq %r12d, %rdi callq 0x7270 movq %rax, %r15 movq %rax, (%rbx) movq 0x88(%rbx), %rdi movq %r14, %rsi callq 0x1b638 movq %r15, %rdi movq %rax, %rsi callq 0x7190 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x2e20c nop
_ZN12LefDefParser9defiGroup5setupEPKc: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov rdi, rsi call _strlen mov r12, rax inc r12d mov r15, [rbx] cmp r12d, [rbx+8] jle short loc_2E2AA test r15, r15 jz short loc_2E298 mov rdi, r15 call _free loc_2E298: mov [rbx+8], r12d movsxd rdi, r12d call _malloc mov r15, rax mov [rbx], rax loc_2E2AA: mov rdi, [rbx+88h]; this mov rsi, r14; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, r15 mov rsi, rax call _strcpy mov rdi, rbx; this add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZN12LefDefParser9defiGroup5clearEv; LefDefParser::defiGroup::clear(void)
long long LefDefParser::defiGroup::setup(LefDefParser::defiGroup *this, const char *a2) { int v2; // r12d void *v3; // r15 const char *v4; // rax v2 = strlen(a2) + 1; v3 = *(void **)this; if ( v2 > *((_DWORD *)this + 2) ) { if ( v3 ) free(*(void **)this); *((_DWORD *)this + 2) = v2; v3 = (void *)malloc(v2); *(_QWORD *)this = v3; } v4 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 17), a2); strcpy(v3, v4); return LefDefParser::defiGroup::clear(this); }
setup: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x001070d0 MOV R12,RAX INC R12D MOV R15,qword ptr [RBX] CMP R12D,dword ptr [RBX + 0x8] JLE 0x0012e2aa TEST R15,R15 JZ 0x0012e298 MOV RDI,R15 CALL 0x00107220 LAB_0012e298: MOV dword ptr [RBX + 0x8],R12D MOVSXD RDI,R12D CALL 0x00107270 MOV R15,RAX MOV qword ptr [RBX],RAX LAB_0012e2aa: MOV RDI,qword ptr [RBX + 0x88] MOV RSI,R14 CALL 0x0011b638 MOV RDI,R15 MOV RSI,RAX CALL 0x00107190 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0012e20c
/* LefDefParser::defiGroup::setup(char const*) */ void __thiscall LefDefParser::defiGroup::setup(defiGroup *this,char *param_1) { size_t sVar1; char *__dest; char *__src; int iVar2; sVar1 = strlen(param_1); iVar2 = (int)sVar1 + 1; __dest = *(char **)this; if (*(int *)(this + 8) < iVar2) { if (__dest != (char *)0x0) { free(__dest); } *(int *)(this + 8) = iVar2; __dest = (char *)malloc((long)iVar2); *(char **)this = __dest; } __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x88),param_1); strcpy(__dest,__src); clear(this); return; }
21,923
translog_write_file_header
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_file_header() { TRANSLOG_FILE *file; ulonglong timestamp; uchar page_buff[TRANSLOG_PAGE_SIZE], *page= page_buff; my_bool rc; DBUG_ENTER("translog_write_file_header"); /* file tag */ memcpy(page, maria_trans_file_magic, sizeof(maria_trans_file_magic)); page+= sizeof(maria_trans_file_magic); /* timestamp */ timestamp= my_hrtime().val; int8store(page, timestamp); page+= 8; /* maria version */ int4store(page, TRANSLOG_VERSION_ID); page+= 4; /* mysql version (MYSQL_VERSION_ID) */ int4store(page, log_descriptor.server_version); page+= 4; /* server ID */ int4store(page, log_descriptor.server_id); page+= 4; /* loghandler page_size */ int2store(page, TRANSLOG_PAGE_SIZE - 1); page+= 2; /* file number */ int3store(page, LSN_FILE_NO(log_descriptor.horizon)); page+= 3; lsn_store(page, LSN_IMPOSSIBLE); page+= LSN_STORE_SIZE; memset(page, TRANSLOG_FILLER, sizeof(page_buff) - (page- page_buff)); file= get_current_logfile(); rc= my_pwrite(file->handler.file, page_buff, sizeof(page_buff), 0, log_write_flags) != 0; /* Dropping the flag in such way can make false alarm: signalling than the file in not sync when it is sync, but the situation is quite rare and protections with mutexes give much more overhead to the whole engine */ file->is_sync= 0; DBUG_RETURN(rc); }
O0
c
translog_write_file_header: pushq %rbp movq %rsp, %rbp subq $0x2070, %rsp # imm = 0x2070 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0x2010(%rbp), %rax movq %rax, -0x2028(%rbp) movq -0x2028(%rbp), %rax movq 0x2643a4(%rip), %rcx # 0x2bcff8 movq %rcx, (%rax) movl 0x2643a3(%rip), %ecx # 0x2bd000 movl %ecx, 0x8(%rax) movq -0x2028(%rbp), %rax addq $0xc, %rax movq %rax, -0x2028(%rbp) callq 0xefa80 movq %rax, -0x2038(%rbp) movq -0x2038(%rbp), %rax movq %rax, -0x2020(%rbp) movq -0x2028(%rbp), %rax movq %rax, -0x2040(%rbp) movq -0x2020(%rbp), %rcx movq -0x2040(%rbp), %rax movq %rcx, (%rax) movq -0x2028(%rbp), %rax addq $0x8, %rax movq %rax, -0x2028(%rbp) movq -0x2028(%rbp), %rax movq %rax, -0x2048(%rbp) movq -0x2048(%rbp), %rax movl $0x2710, (%rax) # imm = 0x2710 movq -0x2028(%rbp), %rax addq $0x4, %rax movq %rax, -0x2028(%rbp) movq -0x2028(%rbp), %rax movq %rax, -0x2050(%rbp) movl 0x41f6d6(%rip), %ecx # 0x4783d4 movq -0x2050(%rbp), %rax movl %ecx, (%rax) movq -0x2028(%rbp), %rax addq $0x4, %rax movq %rax, -0x2028(%rbp) movq -0x2028(%rbp), %rax movq %rax, -0x2058(%rbp) movl 0x41f6ab(%rip), %ecx # 0x4783d8 movq -0x2058(%rbp), %rax movl %ecx, (%rax) movq -0x2028(%rbp), %rax addq $0x4, %rax movq %rax, -0x2028(%rbp) movq -0x2028(%rbp), %rax movq %rax, -0x2060(%rbp) movq -0x2060(%rbp), %rax movw $0x1fff, (%rax) # imm = 0x1FFF movq -0x2028(%rbp), %rax addq $0x2, %rax movq %rax, -0x2028(%rbp) movq 0xc2028d(%rip), %rax # 0xc79008 sarq $0x20, %rax movb %al, %cl movq -0x2028(%rbp), %rax movb %cl, (%rax) movq 0xc20277(%rip), %rax # 0xc79008 sarq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x2028(%rbp), %rax movb %cl, 0x1(%rax) movq 0xc2025d(%rip), %rax # 0xc79008 sarq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x2028(%rbp), %rax movb %cl, 0x2(%rax) movq -0x2028(%rbp), %rax addq $0x3, %rax movq %rax, -0x2028(%rbp) jmp 0x58dd2 movq -0x2028(%rbp), %rax movb $0x0, (%rax) movq -0x2028(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x2028(%rbp), %rax movb $0x0, 0x2(%rax) jmp 0x58df4 movq -0x2028(%rbp), %rax addq $0x3, %rax movq %rax, -0x2068(%rbp) movq -0x2068(%rbp), %rax movl $0x0, (%rax) jmp 0x58e15 movq -0x2028(%rbp), %rax addq $0x7, %rax movq %rax, -0x2028(%rbp) movq -0x2028(%rbp), %rdi movq -0x2028(%rbp), %rax leaq -0x2010(%rbp), %rcx subq %rcx, %rax movl $0x2000, %edx # imm = 0x2000 subq %rax, %rdx movl $0xff, %esi callq 0x2a2c0 callq 0x5c7e0 movq %rax, -0x2018(%rbp) movq -0x2018(%rbp), %rax movl 0x18(%rax), %edi leaq -0x2010(%rbp), %rsi movl $0x2000, %edx # imm = 0x2000 xorl %eax, %eax movl %eax, %ecx movl $0x34, %r8d callq 0xf4240 cmpq $0x0, %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x2029(%rbp) movq -0x2018(%rbp), %rax movb $0x0, 0x51(%rax) movb -0x2029(%rbp), %al movb %al, -0x2069(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x58ecc movb -0x2069(%rbp), %al addq $0x2070, %rsp # imm = 0x2070 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
translog_write_file_header: push rbp mov rbp, rsp sub rsp, 2070h mov rax, fs:28h mov [rbp+var_8], rax lea rax, [rbp+var_2010] mov [rbp+var_2028], rax mov rax, [rbp+var_2028] mov rcx, cs:maria_trans_file_magic mov [rax], rcx mov ecx, cs:dword_2BD000 mov [rax+8], ecx mov rax, [rbp+var_2028] add rax, 0Ch mov [rbp+var_2028], rax call my_hrtime mov [rbp+var_2038], rax mov rax, [rbp+var_2038] mov [rbp+var_2020], rax mov rax, [rbp+var_2028] mov [rbp+var_2040], rax mov rcx, [rbp+var_2020] mov rax, [rbp+var_2040] mov [rax], rcx mov rax, [rbp+var_2028] add rax, 8 mov [rbp+var_2028], rax mov rax, [rbp+var_2028] mov [rbp+var_2048], rax mov rax, [rbp+var_2048] mov dword ptr [rax], 2710h mov rax, [rbp+var_2028] add rax, 4 mov [rbp+var_2028], rax mov rax, [rbp+var_2028] mov [rbp+var_2050], rax mov ecx, cs:dword_4783D4 mov rax, [rbp+var_2050] mov [rax], ecx mov rax, [rbp+var_2028] add rax, 4 mov [rbp+var_2028], rax mov rax, [rbp+var_2028] mov [rbp+var_2058], rax mov ecx, cs:dword_4783D8 mov rax, [rbp+var_2058] mov [rax], ecx mov rax, [rbp+var_2028] add rax, 4 mov [rbp+var_2028], rax mov rax, [rbp+var_2028] mov [rbp+var_2060], rax mov rax, [rbp+var_2060] mov word ptr [rax], 1FFFh mov rax, [rbp+var_2028] add rax, 2 mov [rbp+var_2028], rax mov rax, cs:qword_C79008 sar rax, 20h mov cl, al mov rax, [rbp+var_2028] mov [rax], cl mov rax, cs:qword_C79008 sar rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_2028] mov [rax+1], cl mov rax, cs:qword_C79008 sar rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_2028] mov [rax+2], cl mov rax, [rbp+var_2028] add rax, 3 mov [rbp+var_2028], rax jmp short $+2 loc_58DD2: mov rax, [rbp+var_2028] mov byte ptr [rax], 0 mov rax, [rbp+var_2028] mov byte ptr [rax+1], 0 mov rax, [rbp+var_2028] mov byte ptr [rax+2], 0 jmp short $+2 loc_58DF4: mov rax, [rbp+var_2028] add rax, 3 mov [rbp+var_2068], rax mov rax, [rbp+var_2068] mov dword ptr [rax], 0 jmp short $+2 loc_58E15: mov rax, [rbp+var_2028] add rax, 7 mov [rbp+var_2028], rax mov rdi, [rbp+var_2028] mov rax, [rbp+var_2028] lea rcx, [rbp+var_2010] sub rax, rcx mov edx, 2000h sub rdx, rax mov esi, 0FFh call _memset call get_current_logfile mov [rbp+var_2018], rax mov rax, [rbp+var_2018] mov edi, [rax+18h] lea rsi, [rbp+var_2010] mov edx, 2000h xor eax, eax mov ecx, eax mov r8d, 34h ; '4' call my_pwrite cmp rax, 0 setnz al and al, 1 movzx eax, al mov [rbp+var_2029], al mov rax, [rbp+var_2018] mov byte ptr [rax+51h], 0 mov al, [rbp+var_2029] mov [rbp+var_2069], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_58ECC mov al, [rbp+var_2069] add rsp, 2070h pop rbp retn loc_58ECC: call ___stack_chk_fail
bool translog_write_file_header(long long a1, long long a2, long long a3) { long long v3; // rax long long current_logfile; // [rsp+58h] [rbp-2018h] long long v6; // [rsp+60h] [rbp-2010h] BYREF int v7; // [rsp+68h] [rbp-2008h] long long v8; // [rsp+6Ch] [rbp-2004h] int v9; // [rsp+74h] [rbp-1FFCh] int v10; // [rsp+78h] [rbp-1FF8h] int v11; // [rsp+7Ch] [rbp-1FF4h] __int16 v12; // [rsp+80h] [rbp-1FF0h] __int16 v13; // [rsp+82h] [rbp-1FEEh] char v14; // [rsp+84h] [rbp-1FECh] char v15; // [rsp+85h] [rbp-1FEBh] char v16; // [rsp+86h] [rbp-1FEAh] char v17; // [rsp+87h] [rbp-1FE9h] int v18; // [rsp+88h] [rbp-1FE8h] _BYTE v19[8164]; // [rsp+8Ch] [rbp-1FE4h] BYREF *(_QWORD *)&v19[8156] = __readfsqword(0x28u); v6 = maria_trans_file_magic; v7 = dword_2BD000; v8 = my_hrtime(a1, a2, a3); v9 = 10000; v10 = dword_4783D4; v11 = dword_4783D8; v12 = 0x1FFF; v13 = WORD2(qword_C79008); v14 = BYTE6(qword_C79008); v15 = 0; v16 = 0; v17 = 0; v18 = 0; memset(v19, 255LL, 0x2000 - (v19 - (_BYTE *)&v6)); current_logfile = get_current_logfile(); v3 = my_pwrite(*(unsigned int *)(current_logfile + 24), &v6, 0x2000LL, 0LL); *(_BYTE *)(current_logfile + 81) = 0; return v3 != 0; }
translog_write_file_header: PUSH RBP MOV RBP,RSP SUB RSP,0x2070 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RAX,[RBP + -0x2010] MOV qword ptr [RBP + -0x2028],RAX MOV RAX,qword ptr [RBP + -0x2028] MOV RCX,qword ptr [0x003bcff8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [0x003bd000] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0xc MOV qword ptr [RBP + -0x2028],RAX CALL 0x001efa80 MOV qword ptr [RBP + -0x2038],RAX MOV RAX,qword ptr [RBP + -0x2038] MOV qword ptr [RBP + -0x2020],RAX MOV RAX,qword ptr [RBP + -0x2028] MOV qword ptr [RBP + -0x2040],RAX MOV RCX,qword ptr [RBP + -0x2020] MOV RAX,qword ptr [RBP + -0x2040] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x8 MOV qword ptr [RBP + -0x2028],RAX MOV RAX,qword ptr [RBP + -0x2028] MOV qword ptr [RBP + -0x2048],RAX MOV RAX,qword ptr [RBP + -0x2048] MOV dword ptr [RAX],0x2710 MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x4 MOV qword ptr [RBP + -0x2028],RAX MOV RAX,qword ptr [RBP + -0x2028] MOV qword ptr [RBP + -0x2050],RAX MOV ECX,dword ptr [0x005783d4] MOV RAX,qword ptr [RBP + -0x2050] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x4 MOV qword ptr [RBP + -0x2028],RAX MOV RAX,qword ptr [RBP + -0x2028] MOV qword ptr [RBP + -0x2058],RAX MOV ECX,dword ptr [0x005783d8] MOV RAX,qword ptr [RBP + -0x2058] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x4 MOV qword ptr [RBP + -0x2028],RAX MOV RAX,qword ptr [RBP + -0x2028] MOV qword ptr [RBP + -0x2060],RAX MOV RAX,qword ptr [RBP + -0x2060] MOV word ptr [RAX],0x1fff MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x2 MOV qword ptr [RBP + -0x2028],RAX MOV RAX,qword ptr [0x00d79008] SAR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x2028] MOV byte ptr [RAX],CL MOV RAX,qword ptr [0x00d79008] SAR RAX,0x20 SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x2028] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [0x00d79008] SAR RAX,0x20 SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x2028] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x3 MOV qword ptr [RBP + -0x2028],RAX JMP 0x00158dd2 LAB_00158dd2: MOV RAX,qword ptr [RBP + -0x2028] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x2028] MOV byte ptr [RAX + 0x1],0x0 MOV RAX,qword ptr [RBP + -0x2028] MOV byte ptr [RAX + 0x2],0x0 JMP 0x00158df4 LAB_00158df4: MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x3 MOV qword ptr [RBP + -0x2068],RAX MOV RAX,qword ptr [RBP + -0x2068] MOV dword ptr [RAX],0x0 JMP 0x00158e15 LAB_00158e15: MOV RAX,qword ptr [RBP + -0x2028] ADD RAX,0x7 MOV qword ptr [RBP + -0x2028],RAX MOV RDI,qword ptr [RBP + -0x2028] MOV RAX,qword ptr [RBP + -0x2028] LEA RCX,[RBP + -0x2010] SUB RAX,RCX MOV EDX,0x2000 SUB RDX,RAX MOV ESI,0xff CALL 0x0012a2c0 CALL 0x0015c7e0 MOV qword ptr [RBP + -0x2018],RAX MOV RAX,qword ptr [RBP + -0x2018] MOV EDI,dword ptr [RAX + 0x18] LEA RSI,[RBP + -0x2010] MOV EDX,0x2000 XOR EAX,EAX MOV ECX,EAX MOV R8D,0x34 CALL 0x001f4240 CMP RAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x2029],AL MOV RAX,qword ptr [RBP + -0x2018] MOV byte ptr [RAX + 0x51],0x0 MOV AL,byte ptr [RBP + -0x2029] MOV byte ptr [RBP + -0x2069],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00158ecc MOV AL,byte ptr [RBP + -0x2069] ADD RSP,0x2070 POP RBP RET LAB_00158ecc: CALL 0x0012a270
int8 translog_write_file_header(void) { long lVar1; long lVar2; long in_FS_OFFSET; int8 local_2018; int4 local_2010; int8 local_200c; int4 local_2004; int4 local_2000; int4 local_1ffc; int2 local_1ff8; int1 local_1ff6; int1 local_1ff5; int1 local_1ff4; int1 local_1ff3; int1 local_1ff2; int1 local_1ff1; int4 local_1ff0; int1 auStack_1fec [8156]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2018 = maria_trans_file_magic; local_2010 = DAT_003bd000; local_200c = my_hrtime(); local_2004 = 10000; local_2000 = DAT_005783d4; local_1ffc = DAT_005783d8; local_1ff8 = 0x1fff; local_1ff6 = (int1)((ulong)DAT_00d79008 >> 0x20); local_1ff5 = (int1)((ulong)DAT_00d79008 >> 0x28); local_1ff4 = (int1)((ulong)DAT_00d79008 >> 0x30); local_1ff3 = 0; local_1ff2 = 0; local_1ff1 = 0; local_1ff0 = 0; memset(auStack_1fec,0xff,0x2000 - ((long)auStack_1fec - (long)&local_2018)); lVar1 = get_current_logfile(); lVar2 = my_pwrite(*(int4 *)(lVar1 + 0x18),&local_2018,0x2000,0,0x34); *(int1 *)(lVar1 + 0x51) = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar2 != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
21,924
ggml_get_f32_1d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
float ggml_get_f32_1d(const struct ggml_tensor * tensor, int i) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); return ggml_get_f32_nd(tensor, id[0], id[1], id[2], id[3]); } switch (tensor->type) { case GGML_TYPE_I8: { return ((int8_t *)(tensor->data))[i]; } case GGML_TYPE_I16: { return ((int16_t *)(tensor->data))[i]; } case GGML_TYPE_I32: { return ((int32_t *)(tensor->data))[i]; } case GGML_TYPE_F16: { return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]); } case GGML_TYPE_BF16: { return GGML_BF16_TO_FP32(((ggml_bf16_t *)(tensor->data))[i]); } case GGML_TYPE_F32: { return ((float *)(tensor->data))[i]; } default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_get_f32_1d: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rdi callq 0xd280 testb $0x1, %al jne 0xff91 leaq -0x40(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0xd560 movq -0x10(%rbp), %rdi movslq -0x14(%rbp), %rsi leaq -0x40(%rbp), %rdx leaq -0x40(%rbp), %rcx addq $0x8, %rcx leaq -0x40(%rbp), %r8 addq $0x10, %r8 leaq -0x40(%rbp), %r9 addq $0x18, %r9 callq 0xd850 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rax movl %eax, %esi movq -0x38(%rbp), %rax movl %eax, %edx movq -0x30(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movl %eax, %r8d callq 0xd150 vmovss %xmm0, -0x4(%rbp) jmp 0x10089 movq -0x10(%rbp), %rax movl (%rax), %eax movq %rax, -0x48(%rbp) subq $0x1e, %rax ja 0x1006f movq -0x48(%rbp), %rax leaq 0x63338(%rip), %rcx # 0x732e8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rbp), %rcx movsbl (%rax,%rcx), %eax vcvtsi2ss %eax, %xmm0, %xmm0 vmovss %xmm0, -0x4(%rbp) jmp 0x10089 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rbp), %rcx movswl (%rax,%rcx,2), %eax vcvtsi2ss %eax, %xmm0, %xmm0 vmovss %xmm0, -0x4(%rbp) jmp 0x10089 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rbp), %rcx vcvtsi2ssl (%rax,%rcx,4), %xmm0, %xmm0 vmovss %xmm0, -0x4(%rbp) jmp 0x10089 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rbp), %rcx movzwl (%rax,%rcx,2), %edi callq 0xfab0 vmovss %xmm0, -0x4(%rbp) jmp 0x10089 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rbp), %rcx movzwl (%rax,%rcx,2), %edi callq 0xfae0 vmovss %xmm0, -0x4(%rbp) jmp 0x10089 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rbp), %rcx vmovss (%rax,%rcx,4), %xmm0 vmovss %xmm0, -0x4(%rbp) jmp 0x10089 leaq 0x63aec(%rip), %rdi # 0x73b62 movl $0xacc, %esi # imm = 0xACC leaq 0x63d3b(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 vmovss -0x4(%rbp), %xmm0 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ggml_get_f32_1d: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rdi, [rbp+var_10] call _ggml_is_contiguous test al, 1 jnz short loc_FF91 lea rdi, [rbp+var_40] xor esi, esi mov edx, 20h ; ' ' call _memset mov rdi, [rbp+var_10] movsxd rsi, [rbp+var_14] lea rdx, [rbp+var_40] lea rcx, [rbp+var_40] add rcx, 8 lea r8, [rbp+var_40] add r8, 10h lea r9, [rbp+var_40] add r9, 18h call _ggml_unravel_index mov rdi, [rbp+var_10] mov rax, [rbp+var_40] mov esi, eax mov rax, [rbp+var_38] mov edx, eax mov rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_28] mov r8d, eax call _ggml_get_f32_nd vmovss [rbp+var_4], xmm0 jmp loc_10089 loc_FF91: mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_48], rax sub rax, 1Eh; switch 31 cases ja def_FFB7; jumptable 000000000000FFB7 default case, cases 2-23,27-29 mov rax, [rbp+var_48] lea rcx, jpt_FFB7 movsxd rax, ds:(jpt_FFB7 - 732E8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_FFB9: mov rax, [rbp+var_10]; jumptable 000000000000FFB7 case 24 mov rax, [rax+0F8h] movsxd rcx, [rbp+var_14] movsx eax, byte ptr [rax+rcx] vcvtsi2ss xmm0, xmm0, eax vmovss [rbp+var_4], xmm0 jmp loc_10089 loc_FFDA: mov rax, [rbp+var_10]; jumptable 000000000000FFB7 case 25 mov rax, [rax+0F8h] movsxd rcx, [rbp+var_14] movsx eax, word ptr [rax+rcx*2] vcvtsi2ss xmm0, xmm0, eax vmovss [rbp+var_4], xmm0 jmp loc_10089 loc_FFFB: mov rax, [rbp+var_10]; jumptable 000000000000FFB7 case 26 mov rax, [rax+0F8h] movsxd rcx, [rbp+var_14] vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] vmovss [rbp+var_4], xmm0 jmp short loc_10089 loc_10016: mov rax, [rbp+var_10]; jumptable 000000000000FFB7 case 1 mov rax, [rax+0F8h] movsxd rcx, [rbp+var_14] movzx edi, word ptr [rax+rcx*2] call ggml_lookup_fp16_to_fp32 vmovss [rbp+var_4], xmm0 jmp short loc_10089 loc_10035: mov rax, [rbp+var_10]; jumptable 000000000000FFB7 case 30 mov rax, [rax+0F8h] movsxd rcx, [rbp+var_14] movzx edi, word ptr [rax+rcx*2] call ggml_compute_bf16_to_fp32 vmovss [rbp+var_4], xmm0 jmp short loc_10089 loc_10054: mov rax, [rbp+var_10]; jumptable 000000000000FFB7 case 0 mov rax, [rax+0F8h] movsxd rcx, [rbp+var_14] vmovss xmm0, dword ptr [rax+rcx*4] vmovss [rbp+var_4], xmm0 jmp short loc_10089 def_FFB7: lea rdi, aWorkspaceLlm4b_0; jumptable 000000000000FFB7 default case, cases 2-23,27-29 mov esi, 0ACCh lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_10089: vmovss xmm0, [rbp+var_4] add rsp, 50h pop rbp retn
__int128 __usercall ggml_get_f32_1d@<xmm0>(long long a1@<rdi>, int a2@<esi>, __m128 _XMM0@<xmm0>) { __int128 result; // xmm0 long long v12; // [rsp+10h] [rbp-40h] BYREF long long v13; // [rsp+18h] [rbp-38h] BYREF long long v14; // [rsp+20h] [rbp-30h] BYREF long long v15; // [rsp+28h] [rbp-28h] BYREF int v16; // [rsp+3Ch] [rbp-14h] long long v17; // [rsp+40h] [rbp-10h] v17 = a1; v16 = a2; if ( (ggml_is_contiguous(a1) & 1) != 0 ) { switch ( *(_DWORD *)v17 ) { case 0: _RAX = *(_QWORD *)(v17 + 248); _RCX = v16; __asm { vmovss xmm0, dword ptr [rax+rcx*4] vmovss [rbp+var_4], xmm0 } break; case 1: _XMM0 = ggml_lookup_fp16_to_fp32(*(_WORD *)(*(_QWORD *)(v17 + 248) + 2LL * v16)); __asm { vmovss [rbp+var_4], xmm0 } break; case 0x18: __asm { vcvtsi2ss xmm0, xmm0, eax vmovss [rbp+var_4], xmm0 } break; case 0x19: __asm { vcvtsi2ss xmm0, xmm0, eax vmovss [rbp+var_4], xmm0 } break; case 0x1A: __asm { vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] vmovss [rbp+var_4], xmm0 } break; case 0x1E: _XMM0 = ggml_compute_bf16_to_fp32(*(_WORD *)(*(_QWORD *)(v17 + 248) + 2LL * v16)); __asm { vmovss [rbp+var_4], xmm0 } break; default: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 2764LL, "fatal error"); break; } } else { memset(&v12, 0LL, 32LL); ggml_unravel_index(v17, v16, &v12, &v13, &v14, &v15); *(double *)_XMM0.m128_u64 = ggml_get_f32_nd( v17, (unsigned int)v12, (unsigned int)v13, (unsigned int)v14, (unsigned int)v15); __asm { vmovss [rbp+var_4], xmm0 } } __asm { vmovss xmm0, [rbp+var_4] } return result; }
ggml_get_f32_1d: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d280 TEST AL,0x1 JNZ 0x0010ff91 LEA RDI,[RBP + -0x40] XOR ESI,ESI MOV EDX,0x20 CALL 0x0010d560 MOV RDI,qword ptr [RBP + -0x10] MOVSXD RSI,dword ptr [RBP + -0x14] LEA RDX,[RBP + -0x40] LEA RCX,[RBP + -0x40] ADD RCX,0x8 LEA R8,[RBP + -0x40] ADD R8,0x10 LEA R9,[RBP + -0x40] ADD R9,0x18 CALL 0x0010d850 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x40] MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x38] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV R8D,EAX CALL 0x0010d150 VMOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x00110089 LAB_0010ff91: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX SUB RAX,0x1e JA 0x0011006f MOV RAX,qword ptr [RBP + -0x48] LEA RCX,[0x1732e8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_18: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x14] MOVSX EAX,byte ptr [RAX + RCX*0x1] VCVTSI2SS XMM0,XMM0,EAX VMOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x00110089 caseD_19: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x14] MOVSX EAX,word ptr [RAX + RCX*0x2] VCVTSI2SS XMM0,XMM0,EAX VMOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x00110089 caseD_1a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x14] VCVTSI2SS XMM0,XMM0,dword ptr [RAX + RCX*0x4] VMOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x00110089 caseD_1: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x14] MOVZX EDI,word ptr [RAX + RCX*0x2] CALL 0x0010fab0 VMOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x00110089 caseD_1e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x14] MOVZX EDI,word ptr [RAX + RCX*0x2] CALL 0x0010fae0 VMOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x00110089 caseD_0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x14] VMOVSS XMM0,dword ptr [RAX + RCX*0x4] VMOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x00110089 caseD_2: LEA RDI,[0x173b62] MOV ESI,0xacc LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00110089: VMOVSS XMM0,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
float ggml_get_f32_1d(int4 *param_1,int param_2) { ulong uVar1; ulong local_48; ulong local_40; ulong local_38; ulong local_30 [2]; int local_1c; int4 *local_18; float local_c; local_1c = param_2; local_18 = param_1; uVar1 = ggml_is_contiguous(param_1); if ((uVar1 & 1) == 0) { memset(&local_48,0,0x20); ggml_unravel_index(local_18,(long)local_1c,&local_48,&local_40,&local_38,local_30); local_c = (float)ggml_get_f32_nd(local_18,local_48 & 0xffffffff,local_40 & 0xffffffff, local_38 & 0xffffffff,local_30[0] & 0xffffffff); } else { switch(*local_18) { case 0: local_c = *(float *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 4); break; case 1: local_c = (float)ggml_lookup_fp16_to_fp32 (*(int2 *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 2)); break; default: ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0xacc,"fatal error"); break; case 0x18: local_c = (float)(int)*(char *)(*(long *)(local_18 + 0x3e) + (long)local_1c); break; case 0x19: local_c = (float)(int)*(short *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 2); break; case 0x1a: local_c = (float)*(int *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 4); break; case 0x1e: local_c = (float)ggml_compute_bf16_to_fp32 (*(int2 *)(*(long *)(local_18 + 0x3e) + (long)local_1c * 2)); } } return local_c; }
21,925
ggml_get_f32_1d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
float ggml_get_f32_1d(const struct ggml_tensor * tensor, int i) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); return ggml_get_f32_nd(tensor, id[0], id[1], id[2], id[3]); } switch (tensor->type) { case GGML_TYPE_I8: { return ((int8_t *)(tensor->data))[i]; } case GGML_TYPE_I16: { return ((int16_t *)(tensor->data))[i]; } case GGML_TYPE_I32: { return ((int32_t *)(tensor->data))[i]; } case GGML_TYPE_F16: { return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]); } case GGML_TYPE_BF16: { return GGML_BF16_TO_FP32(((ggml_bf16_t *)(tensor->data))[i]); } case GGML_TYPE_F32: { return ((float *)(tensor->data))[i]; } default: { GGML_ABORT("fatal error"); } } }
O2
c
ggml_get_f32_1d: pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movl %esi, %ebp movq %rdi, %rbx callq 0x81e0 testb %al, %al je 0x9f1a movl (%rbx), %eax leal -0x18(%rax), %ecx cmpl $0x6, %ecx ja 0x9f5f leaq 0x291a7(%rip), %rax # 0x330a8 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movq 0xf8(%rbx), %rax movslq %ebp, %rcx movsbl (%rax,%rcx), %eax jmp 0x9f92 vpxor %xmm0, %xmm0, %xmm0 leaq 0x8(%rsp), %rcx vmovdqu %ymm0, -0x8(%rcx) movslq %ebp, %rsi leaq 0x10(%rsp), %r8 leaq 0x18(%rsp), %r9 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rdx vzeroupper callq 0x8570 movl (%r14), %esi movl 0x8(%r14), %edx movl 0x10(%r14), %ecx movl 0x18(%r14), %r8d movq %rbx, %rdi callq 0x8110 jmp 0x9fcf testl %eax, %eax je 0x9fc0 cmpl $0x1, %eax jne 0x9fd8 movq 0xf8(%rbx), %rax movslq %ebp, %rcx movzwl (%rax,%rcx,2), %eax movq 0x3bfeb(%rip), %rcx # 0x45f68 vmovd (%rcx,%rax,4), %xmm0 jmp 0x9fcf movq 0xf8(%rbx), %rax movslq %ebp, %rcx movswl (%rax,%rcx,2), %eax vcvtsi2ss %eax, %xmm0, %xmm0 jmp 0x9fcf movq 0xf8(%rbx), %rax movslq %ebp, %rcx vcvtsi2ssl (%rax,%rcx,4), %xmm0, %xmm0 jmp 0x9fcf movq 0xf8(%rbx), %rax movslq %ebp, %rcx movzwl (%rax,%rcx,2), %eax shll $0x10, %eax vmovd %eax, %xmm0 jmp 0x9fcf movq 0xf8(%rbx), %rax movslq %ebp, %rcx vmovd (%rax,%rcx,4), %xmm0 addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x2977b(%rip), %rdi # 0x3375a leaq 0x299cf(%rip), %rdx # 0x339b5 movl $0xacc, %esi # imm = 0xACC xorl %eax, %eax callq 0x8b10
ggml_get_f32_1d: push rbp push r14 push rbx sub rsp, 20h mov ebp, esi mov rbx, rdi call _ggml_is_contiguous test al, al jz short loc_9F1A mov eax, [rbx] lea ecx, [rax-18h]; switch 7 cases cmp ecx, 6 ja short def_9F08; jumptable 0000000000009F08 default case lea rax, jpt_9F08 movsxd rcx, ds:(jpt_9F08 - 330A8h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_9F0A: mov rax, [rbx+0F8h]; jumptable 0000000000009F08 case 24 movsxd rcx, ebp movsx eax, byte ptr [rax+rcx] jmp short loc_9F92 loc_9F1A: vpxor xmm0, xmm0, xmm0 lea rcx, [rsp+38h+var_30] vmovdqu ymmword ptr [rcx-8], ymm0 movsxd rsi, ebp lea r8, [rsp+38h+var_28] lea r9, [rsp+38h+var_20] mov r14, rsp mov rdi, rbx mov rdx, r14 vzeroupper call _ggml_unravel_index mov esi, [r14] mov edx, [r14+8] mov ecx, [r14+10h] mov r8d, [r14+18h] mov rdi, rbx call _ggml_get_f32_nd jmp short loc_9FCF def_9F08: test eax, eax; jumptable 0000000000009F08 default case jz short loc_9FC0 cmp eax, 1 jnz short loc_9FD8; jumptable 0000000000009F08 cases 27-29 mov rax, [rbx+0F8h] movsxd rcx, ebp movzx eax, word ptr [rax+rcx*2] mov rcx, cs:ggml_table_f32_f16_ptr vmovd xmm0, dword ptr [rcx+rax*4] jmp short loc_9FCF loc_9F84: mov rax, [rbx+0F8h]; jumptable 0000000000009F08 case 25 movsxd rcx, ebp movsx eax, word ptr [rax+rcx*2] loc_9F92: vcvtsi2ss xmm0, xmm0, eax jmp short loc_9FCF loc_9F98: mov rax, [rbx+0F8h]; jumptable 0000000000009F08 case 26 movsxd rcx, ebp vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] jmp short loc_9FCF loc_9FA9: mov rax, [rbx+0F8h]; jumptable 0000000000009F08 case 30 movsxd rcx, ebp movzx eax, word ptr [rax+rcx*2] shl eax, 10h vmovd xmm0, eax jmp short loc_9FCF loc_9FC0: mov rax, [rbx+0F8h] movsxd rcx, ebp vmovd xmm0, dword ptr [rax+rcx*4] loc_9FCF: add rsp, 20h pop rbx pop r14 pop rbp retn loc_9FD8: lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000009F08 cases 27-29 lea rdx, aFatalError; "fatal error" mov esi, 0ACCh xor eax, eax call _ggml_abort
long long ggml_get_f32_1d(int *a1, int a2, __m128 _XMM0) { int v4; // eax long long result; // rax unsigned int v15; // [rsp+0h] [rbp-38h] BYREF unsigned int v16; // [rsp+8h] [rbp-30h] BYREF unsigned int v17; // [rsp+10h] [rbp-28h] BYREF _DWORD v18[8]; // [rsp+18h] [rbp-20h] BYREF if ( (unsigned __int8)ggml_is_contiguous() ) { v4 = *a1; switch ( *a1 ) { case 24: result = (unsigned int)*(char *)(*((_QWORD *)a1 + 31) + a2); goto LABEL_9; case 25: result = (unsigned int)*(__int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2); LABEL_9: __asm { vcvtsi2ss xmm0, xmm0, eax } return result; case 26: result = *((_QWORD *)a1 + 31); __asm { vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] } return result; case 27: case 28: case 29: goto LABEL_14; case 30: result = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2) << 16; __asm { vmovd xmm0, eax } return result; default: if ( v4 ) { if ( v4 == 1 ) { result = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2); _RCX = &ggml_table_f32_f16; __asm { vmovd xmm0, dword ptr [rcx+rax*4] } } else { LABEL_14: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 2764LL, "fatal error"); result = ggml_get_f32_nd(); } } else { result = *((_QWORD *)a1 + 31); _RCX = a2; __asm { vmovd xmm0, dword ptr [rax+rcx*4] } } break; } } else { __asm { vpxor xmm0, xmm0, xmm0 } _RCX = &v16; __asm { vmovdqu ymmword ptr [rcx-8], ymm0 vzeroupper } ggml_unravel_index(a1, a2, &v15, &v16, &v17, v18, *(double *)&_XMM0); return ggml_get_f32_nd(a1, v15, v16, v17, v18[0]); } return result; }
ggml_get_f32_1d: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV EBP,ESI MOV RBX,RDI CALL 0x001081e0 TEST AL,AL JZ 0x00109f1a MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x18] CMP ECX,0x6 JA 0x00109f5f LEA RAX,[0x1330a8] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_18: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVSX EAX,byte ptr [RAX + RCX*0x1] JMP 0x00109f92 LAB_00109f1a: VPXOR XMM0,XMM0,XMM0 LEA RCX,[RSP + 0x8] VMOVDQU ymmword ptr [RCX + -0x8],YMM0 MOVSXD RSI,EBP LEA R8,[RSP + 0x10] LEA R9,[RSP + 0x18] MOV R14,RSP MOV RDI,RBX MOV RDX,R14 VZEROUPPER CALL 0x00108570 MOV ESI,dword ptr [R14] MOV EDX,dword ptr [R14 + 0x8] MOV ECX,dword ptr [R14 + 0x10] MOV R8D,dword ptr [R14 + 0x18] MOV RDI,RBX CALL 0x00108110 JMP 0x00109fcf default: TEST EAX,EAX JZ 0x00109fc0 CMP EAX,0x1 JNZ 0x00109fd8 MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [0x00145f68] VMOVD XMM0,dword ptr [RCX + RAX*0x4] JMP 0x00109fcf caseD_19: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVSX EAX,word ptr [RAX + RCX*0x2] LAB_00109f92: VCVTSI2SS XMM0,XMM0,EAX JMP 0x00109fcf caseD_1a: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP VCVTSI2SS XMM0,XMM0,dword ptr [RAX + RCX*0x4] JMP 0x00109fcf caseD_1e: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVZX EAX,word ptr [RAX + RCX*0x2] SHL EAX,0x10 VMOVD XMM0,EAX JMP 0x00109fcf LAB_00109fc0: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP VMOVD XMM0,dword ptr [RAX + RCX*0x4] LAB_00109fcf: ADD RSP,0x20 POP RBX POP R14 POP RBP RET caseD_1b: LEA RDI,[0x13375a] LEA RDX,[0x1339b5] MOV ESI,0xacc XOR EAX,EAX CALL 0x00108b10
ulong ggml_get_f32_1d(int *param_1,int param_2) { char cVar1; int iVar2; int8 extraout_XMM0_Qa; ulong uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int1 extraout_var [56]; ulong local_38; ulong uStack_30; ulong uStack_28; ulong uStack_20; int1 auVar6 [64]; cVar1 = ggml_is_contiguous(); auVar6._8_56_ = extraout_var; auVar6._0_8_ = extraout_XMM0_Qa; if (cVar1 == '\0') { local_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; ggml_unravel_index(param_1,(long)param_2,&local_38,&uStack_30,&uStack_28,&uStack_20); uVar3 = ggml_get_f32_nd(param_1,local_38 & 0xffffffff,uStack_30 & 0xffffffff, uStack_28 & 0xffffffff,uStack_20 & 0xffffffff); return uVar3; } iVar2 = *param_1; auVar4._4_12_ = auVar6._4_12_; switch(iVar2) { case 0x18: iVar2 = (int)*(char *)(*(long *)(param_1 + 0x3e) + (long)param_2); goto LAB_00109f92; case 0x19: iVar2 = (int)*(short *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2); LAB_00109f92: auVar4._0_4_ = (float)iVar2; uVar3 = auVar4._0_8_; break; case 0x1a: auVar5._0_4_ = (float)*(int *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4); auVar5._4_12_ = auVar4._4_12_; uVar3 = auVar5._0_8_; break; case 0x1b: case 0x1c: case 0x1d: switchD_00109f08_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0xacc,"fatal error"); case 0x1e: uVar3 = (ulong)*(ushort *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) << 0x10; break; default: if (iVar2 == 0) { uVar3 = (ulong)*(uint *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4); } else { if (iVar2 != 1) goto switchD_00109f08_caseD_1b; uVar3 = (ulong)*(uint *)(PTR_ggml_table_f32_f16_00145f68 + (ulong)*(ushort *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) * 4) ; } } return uVar3; }
21,926
js_object_getOwnPropertyDescriptor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_getOwnPropertyDescriptor(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue prop; JSAtom atom; JSValue ret, obj; JSPropertyDescriptor desc; int res, flags; if (magic) { /* Reflect.getOwnPropertyDescriptor case */ if (JS_VALUE_GET_TAG(argv[0]) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); obj = js_dup(argv[0]); } else { obj = JS_ToObject(ctx, argv[0]); if (JS_IsException(obj)) return obj; } prop = argv[1]; atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) goto exception; ret = JS_UNDEFINED; if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) { res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), atom); if (res < 0) goto exception; if (res) { ret = JS_NewObject(ctx); if (JS_IsException(ret)) goto exception1; flags = JS_PROP_C_W_E | JS_PROP_THROW; if (desc.flags & JS_PROP_GETSET) { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_get, js_dup(desc.getter), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_set, js_dup(desc.setter), flags) < 0) goto exception1; } else { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_value, js_dup(desc.value), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_writable, js_bool(desc.flags & JS_PROP_WRITABLE), flags) < 0) goto exception1; } if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_enumerable, js_bool(desc.flags & JS_PROP_ENUMERABLE), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_configurable, js_bool(desc.flags & JS_PROP_CONFIGURABLE), flags) < 0) goto exception1; js_free_desc(ctx, &desc); } } JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return ret; exception1: js_free_desc(ctx, &desc); JS_FreeValue(ctx, ret); exception: JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
js_object_getOwnPropertyDescriptor: subq $0x198, %rsp # imm = 0x198 movq %rsi, 0x178(%rsp) movq %rdx, 0x180(%rsp) movq %rdi, 0x170(%rsp) movl %ecx, 0x16c(%rsp) movq %r8, 0x160(%rsp) movl %r9d, 0x15c(%rsp) cmpl $0x0, 0x15c(%rsp) je 0xbdffc movq 0x160(%rsp), %rax movq 0x8(%rax), %rax cmpl $-0x1, %eax je 0xbdfb3 movq 0x170(%rsp), %rdi callq 0x2e2e0 movq %rax, 0x188(%rsp) movq %rdx, 0x190(%rsp) jmp 0xbe54d movq 0x160(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x20410 movq %rax, 0xd0(%rsp) movq %rdx, 0xd8(%rsp) movq 0xd0(%rsp), %rax movq %rax, 0x120(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x128(%rsp) jmp 0xbe089 movq 0x170(%rsp), %rdi movq 0x160(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x364b0 movq %rax, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0x120(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x128(%rsp) movq 0x120(%rsp), %rdi movq 0x128(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0xbe087 movq 0x120(%rsp), %rax movq %rax, 0x188(%rsp) movq 0x128(%rsp), %rax movq %rax, 0x190(%rsp) jmp 0xbe54d jmp 0xbe089 movq 0x160(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x148(%rsp) movq 0x18(%rax), %rax movq %rax, 0x150(%rsp) movq 0x170(%rsp), %rdi movq 0x148(%rsp), %rsi movq 0x150(%rsp), %rdx callq 0x2ff40 movl %eax, 0x144(%rsp) cmpl $0x0, 0x144(%rsp) sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xbe0ee jmp 0xbe505 movl $0x0, 0xb0(%rsp) movq $0x3, 0xb8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x130(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x128(%rsp), %rax cmpl $-0x1, %eax jne 0xbe480 movq 0x170(%rsp), %rdi movq 0x120(%rsp), %rdx movl 0x144(%rsp), %ecx leaq 0xe8(%rsp), %rsi callq 0x2ef00 movl %eax, 0xe4(%rsp) cmpl $0x0, 0xe4(%rsp) jge 0xbe170 jmp 0xbe505 cmpl $0x0, 0xe4(%rsp) je 0xbe47e movq 0x170(%rsp), %rdi callq 0x292b0 movq %rax, 0xa0(%rsp) movq %rdx, 0xa8(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x130(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x130(%rsp), %rdi movq 0x138(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0xbe1da jmp 0xbe4d3 movl $0x4007, 0xe0(%rsp) # imm = 0x4007 movl 0xe8(%rsp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xbe2e2 movq 0x170(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x100(%rsp), %rdi movq 0x108(%rsp), %rsi callq 0x20410 movq 0x38(%rsp), %rdi movq %rax, 0x90(%rsp) movq %rdx, 0x98(%rsp) movl 0xe0(%rsp), %eax movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx movq 0x90(%rsp), %r8 movq 0x98(%rsp), %r9 movl $0x42, %ecx movl %eax, (%rsp) callq 0x35ef0 cmpl $0x0, %eax jl 0xbe2d8 movq 0x170(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x110(%rsp), %rdi movq 0x118(%rsp), %rsi callq 0x20410 movq 0x30(%rsp), %rdi movq %rax, 0x80(%rsp) movq %rdx, 0x88(%rsp) movl 0xe0(%rsp), %eax movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx movq 0x80(%rsp), %r8 movq 0x88(%rsp), %r9 movl $0x43, %ecx movl %eax, (%rsp) callq 0x35ef0 cmpl $0x0, %eax jge 0xbe2dd jmp 0xbe4d3 jmp 0xbe3ab movq 0x170(%rsp), %rax movq %rax, 0x28(%rsp) movq 0xf0(%rsp), %rdi movq 0xf8(%rsp), %rsi callq 0x20410 movq 0x28(%rsp), %rdi movq %rax, 0x70(%rsp) movq %rdx, 0x78(%rsp) movl 0xe0(%rsp), %eax movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx movq 0x70(%rsp), %r8 movq 0x78(%rsp), %r9 movl $0x41, %ecx movl %eax, (%rsp) callq 0x35ef0 cmpl $0x0, %eax jl 0xbe3a4 movq 0x170(%rsp), %rax movq %rax, 0x20(%rsp) movl 0xe8(%rsp), %edi andl $0x2, %edi callq 0x55f90 movq 0x20(%rsp), %rdi movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movl 0xe0(%rsp), %eax movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx movq 0x60(%rsp), %r8 movq 0x68(%rsp), %r9 movl $0x3f, %ecx movl %eax, (%rsp) callq 0x35ef0 cmpl $0x0, %eax jge 0xbe3a9 jmp 0xbe4d3 jmp 0xbe3ab movq 0x170(%rsp), %rax movq %rax, 0x18(%rsp) movl 0xe8(%rsp), %edi andl $0x4, %edi callq 0x55f90 movq 0x18(%rsp), %rdi movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movl 0xe0(%rsp), %eax movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx movq 0x50(%rsp), %r8 movq 0x58(%rsp), %r9 movl $0x40, %ecx movl %eax, (%rsp) callq 0x35ef0 cmpl $0x0, %eax jl 0xbe467 movq 0x170(%rsp), %rax movq %rax, 0x10(%rsp) movl 0xe8(%rsp), %edi andl $0x1, %edi callq 0x55f90 movq 0x10(%rsp), %rdi movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movl 0xe0(%rsp), %eax movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx movq 0x40(%rsp), %r8 movq 0x48(%rsp), %r9 movl $0x3e, %ecx movl %eax, (%rsp) callq 0x35ef0 cmpl $0x0, %eax jge 0xbe469 jmp 0xbe4d3 movq 0x170(%rsp), %rdi leaq 0xe8(%rsp), %rsi callq 0x5f740 jmp 0xbe480 movq 0x170(%rsp), %rdi movl 0x144(%rsp), %esi callq 0x27d80 movq 0x170(%rsp), %rdi movq 0x120(%rsp), %rsi movq 0x128(%rsp), %rdx callq 0x229d0 movq 0x130(%rsp), %rax movq %rax, 0x188(%rsp) movq 0x138(%rsp), %rax movq %rax, 0x190(%rsp) jmp 0xbe54d movq 0x170(%rsp), %rdi leaq 0xe8(%rsp), %rsi callq 0x5f740 movq 0x170(%rsp), %rdi movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx callq 0x229d0 movq 0x170(%rsp), %rdi movl 0x144(%rsp), %esi callq 0x27d80 movq 0x170(%rsp), %rdi movq 0x120(%rsp), %rsi movq 0x128(%rsp), %rdx callq 0x229d0 movl $0x0, 0x188(%rsp) movq $0x6, 0x190(%rsp) movq 0x188(%rsp), %rax movq 0x190(%rsp), %rdx addq $0x198, %rsp # imm = 0x198 retq nopw %cs:(%rax,%rax)
js_object_getOwnPropertyDescriptor: sub rsp, 198h mov [rsp+198h+var_20], rsi mov [rsp+198h+var_18], rdx mov [rsp+198h+var_28], rdi mov [rsp+198h+var_2C], ecx mov [rsp+198h+var_38], r8 mov [rsp+198h+var_3C], r9d cmp [rsp+198h+var_3C], 0 jz short loc_BDFFC mov rax, [rsp+198h+var_38] mov rax, [rax+8] cmp eax, 0FFFFFFFFh jz short loc_BDFB3 mov rdi, [rsp+198h+var_28] call JS_ThrowTypeErrorNotAnObject mov [rsp+198h+var_10], rax mov [rsp+198h+var_8], rdx jmp loc_BE54D loc_BDFB3: mov rax, [rsp+198h+var_38] mov rdi, [rax] mov rsi, [rax+8] call js_dup mov [rsp+198h+var_C8], rax mov [rsp+198h+var_C0], rdx mov rax, [rsp+198h+var_C8] mov [rsp+198h+var_78], rax mov rax, [rsp+198h+var_C0] mov [rsp+198h+var_70], rax jmp loc_BE089 loc_BDFFC: mov rdi, [rsp+198h+var_28] mov rax, [rsp+198h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToObject mov [rsp+198h+var_D8], rax mov [rsp+198h+var_D0], rdx mov rax, [rsp+198h+var_D8] mov [rsp+198h+var_78], rax mov rax, [rsp+198h+var_D0] mov [rsp+198h+var_70], rax mov rdi, [rsp+198h+var_78] mov rsi, [rsp+198h+var_70] call JS_IsException_1 cmp eax, 0 jz short loc_BE087 mov rax, [rsp+198h+var_78] mov [rsp+198h+var_10], rax mov rax, [rsp+198h+var_70] mov [rsp+198h+var_8], rax jmp loc_BE54D loc_BE087: jmp short $+2 loc_BE089: mov rax, [rsp+198h+var_38] mov rcx, [rax+10h] mov [rsp+198h+var_50], rcx mov rax, [rax+18h] mov [rsp+198h+var_48], rax mov rdi, [rsp+198h+var_28] mov rsi, [rsp+198h+var_50] mov rdx, [rsp+198h+var_48] call JS_ValueToAtom mov [rsp+198h+var_54], eax cmp [rsp+198h+var_54], 0 setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_BE0EE jmp loc_BE505 loc_BE0EE: mov dword ptr [rsp+198h+var_E8], 0 mov [rsp+198h+var_E0], 3 mov rax, [rsp+198h+var_E8] mov [rsp+198h+var_68], rax mov rax, [rsp+198h+var_E0] mov [rsp+198h+var_60], rax mov rax, [rsp+198h+var_70] cmp eax, 0FFFFFFFFh jnz loc_BE480 mov rdi, [rsp+198h+var_28] mov rdx, [rsp+198h+var_78] mov ecx, [rsp+198h+var_54] lea rsi, [rsp+198h+var_B0] call JS_GetOwnPropertyInternal mov [rsp+198h+var_B4], eax cmp [rsp+198h+var_B4], 0 jge short loc_BE170 jmp loc_BE505 loc_BE170: cmp [rsp+198h+var_B4], 0 jz loc_BE47E mov rdi, [rsp+198h+var_28] call JS_NewObject mov [rsp+198h+var_F8], rax mov [rsp+198h+var_F0], rdx mov rax, [rsp+198h+var_F8] mov [rsp+198h+var_68], rax mov rax, [rsp+198h+var_F0] mov [rsp+198h+var_60], rax mov rdi, [rsp+198h+var_68] mov rsi, [rsp+198h+var_60] call JS_IsException_1 cmp eax, 0 jz short loc_BE1DA jmp loc_BE4D3 loc_BE1DA: mov [rsp+198h+var_B8], 4007h mov eax, [rsp+198h+var_B0] and eax, 10h cmp eax, 0 jz loc_BE2E2 mov rax, [rsp+198h+var_28] mov [rsp+198h+var_160], rax mov rdi, [rsp+198h+var_98] mov rsi, [rsp+198h+var_90] call js_dup mov rdi, [rsp+198h+var_160] mov [rsp+198h+var_108], rax mov [rsp+198h+var_100], rdx mov eax, [rsp+198h+var_B8] mov rsi, [rsp+198h+var_68] mov rdx, [rsp+198h+var_60] mov r8, [rsp+198h+var_108] mov r9, [rsp+198h+var_100] mov ecx, 42h ; 'B' mov [rsp+198h+var_198], eax call JS_DefinePropertyValue cmp eax, 0 jl short loc_BE2D8 mov rax, [rsp+198h+var_28] mov [rsp+198h+var_168], rax mov rdi, [rsp+198h+var_88] mov rsi, [rsp+198h+var_80] call js_dup mov rdi, [rsp+198h+var_168] mov [rsp+198h+var_118], rax mov [rsp+198h+var_110], rdx mov eax, [rsp+198h+var_B8] mov rsi, [rsp+198h+var_68] mov rdx, [rsp+198h+var_60] mov r8, [rsp+198h+var_118] mov r9, [rsp+198h+var_110] mov ecx, 43h ; 'C' mov [rsp+198h+var_198], eax call JS_DefinePropertyValue cmp eax, 0 jge short loc_BE2DD loc_BE2D8: jmp loc_BE4D3 loc_BE2DD: jmp loc_BE3AB loc_BE2E2: mov rax, [rsp+198h+var_28] mov [rsp+198h+var_170], rax mov rdi, [rsp+198h+var_A8] mov rsi, [rsp+198h+var_A0] call js_dup mov rdi, [rsp+198h+var_170] mov [rsp+198h+var_128], rax mov [rsp+198h+var_120], rdx mov eax, [rsp+198h+var_B8] mov rsi, [rsp+198h+var_68] mov rdx, [rsp+198h+var_60] mov r8, [rsp+198h+var_128] mov r9, [rsp+198h+var_120] mov ecx, 41h ; 'A' mov [rsp+198h+var_198], eax call JS_DefinePropertyValue cmp eax, 0 jl short loc_BE3A4 mov rax, [rsp+198h+var_28] mov [rsp+198h+var_178], rax mov edi, [rsp+198h+var_B0] and edi, 2 call js_bool mov rdi, [rsp+198h+var_178] mov [rsp+198h+var_138], rax mov [rsp+198h+var_130], rdx mov eax, [rsp+198h+var_B8] mov rsi, [rsp+198h+var_68] mov rdx, [rsp+198h+var_60] mov r8, [rsp+198h+var_138] mov r9, [rsp+198h+var_130] mov ecx, 3Fh ; '?' mov [rsp+198h+var_198], eax call JS_DefinePropertyValue cmp eax, 0 jge short loc_BE3A9 loc_BE3A4: jmp loc_BE4D3 loc_BE3A9: jmp short $+2 loc_BE3AB: mov rax, [rsp+198h+var_28] mov [rsp+198h+var_180], rax mov edi, [rsp+198h+var_B0] and edi, 4 call js_bool mov rdi, [rsp+198h+var_180] mov [rsp+198h+var_148], rax mov [rsp+198h+var_140], rdx mov eax, [rsp+198h+var_B8] mov rsi, [rsp+198h+var_68] mov rdx, [rsp+198h+var_60] mov r8, [rsp+198h+var_148] mov r9, [rsp+198h+var_140] mov ecx, 40h ; '@' mov [rsp+198h+var_198], eax call JS_DefinePropertyValue cmp eax, 0 jl short loc_BE467 mov rax, [rsp+198h+var_28] mov [rsp+198h+var_188], rax mov edi, [rsp+198h+var_B0] and edi, 1 call js_bool mov rdi, [rsp+198h+var_188] mov [rsp+198h+var_158], rax mov [rsp+198h+var_150], rdx mov eax, [rsp+198h+var_B8] mov rsi, [rsp+198h+var_68] mov rdx, [rsp+198h+var_60] mov r8, [rsp+198h+var_158] mov r9, [rsp+198h+var_150] mov ecx, 3Eh ; '>' mov [rsp+198h+var_198], eax call JS_DefinePropertyValue cmp eax, 0 jge short loc_BE469 loc_BE467: jmp short loc_BE4D3 loc_BE469: mov rdi, [rsp+198h+var_28] lea rsi, [rsp+198h+var_B0] call js_free_desc loc_BE47E: jmp short $+2 loc_BE480: mov rdi, [rsp+198h+var_28] mov esi, [rsp+198h+var_54] call JS_FreeAtom mov rdi, [rsp+198h+var_28] mov rsi, [rsp+198h+var_78] mov rdx, [rsp+198h+var_70] call JS_FreeValue mov rax, [rsp+198h+var_68] mov [rsp+198h+var_10], rax mov rax, [rsp+198h+var_60] mov [rsp+198h+var_8], rax jmp short loc_BE54D loc_BE4D3: mov rdi, [rsp+198h+var_28] lea rsi, [rsp+198h+var_B0] call js_free_desc mov rdi, [rsp+198h+var_28] mov rsi, [rsp+198h+var_68] mov rdx, [rsp+198h+var_60] call JS_FreeValue loc_BE505: mov rdi, [rsp+198h+var_28] mov esi, [rsp+198h+var_54] call JS_FreeAtom mov rdi, [rsp+198h+var_28] mov rsi, [rsp+198h+var_78] mov rdx, [rsp+198h+var_70] call JS_FreeValue mov dword ptr [rsp+198h+var_10], 0 mov [rsp+198h+var_8], 6 loc_BE54D: mov rax, [rsp+198h+var_10] mov rdx, [rsp+198h+var_8] add rsp, 198h retn
_DWORD * js_object_getOwnPropertyDescriptor( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rdx long long v15; // rdx long long v16; // rdx long long v17; // rdx long long v18; // rdx __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rdx __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // rdx __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rdx __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rdx __m128 v31; // xmm4 __m128 v32; // xmm5 long long v33; // rdx __m128 v34; // xmm4 __m128 v35; // xmm5 long long v37; // [rsp+10h] [rbp-188h] long long v38; // [rsp+18h] [rbp-180h] long long v39; // [rsp+20h] [rbp-178h] long long v40; // [rsp+28h] [rbp-170h] long long v41; // [rsp+30h] [rbp-168h] long long v42; // [rsp+38h] [rbp-160h] _DWORD *v43; // [rsp+40h] [rbp-158h] _DWORD *v44; // [rsp+50h] [rbp-148h] _DWORD *v45; // [rsp+60h] [rbp-138h] _DWORD *v46; // [rsp+70h] [rbp-128h] _DWORD *v47; // [rsp+80h] [rbp-118h] _DWORD *v48; // [rsp+90h] [rbp-108h] long long v49; // [rsp+B0h] [rbp-E8h] int OwnPropertyInternal; // [rsp+E4h] [rbp-B4h] long long v51[2]; // [rsp+E8h] [rbp-B0h] BYREF long long v52; // [rsp+F8h] [rbp-A0h] _DWORD *v53; // [rsp+100h] [rbp-98h] long long v54; // [rsp+108h] [rbp-90h] _DWORD *v55; // [rsp+110h] [rbp-88h] long long v56; // [rsp+118h] [rbp-80h] _DWORD *v57; // [rsp+120h] [rbp-78h] long long v58; // [rsp+128h] [rbp-70h] _DWORD *v59; // [rsp+130h] [rbp-68h] long long v60; // [rsp+138h] [rbp-60h] unsigned int v61; // [rsp+144h] [rbp-54h] long long v62; // [rsp+148h] [rbp-50h] long long v63; // [rsp+150h] [rbp-48h] int v64; // [rsp+15Ch] [rbp-3Ch] long long v65; // [rsp+160h] [rbp-38h] int v66; // [rsp+16Ch] [rbp-2Ch] long long v67; // [rsp+170h] [rbp-28h] long long v68; // [rsp+178h] [rbp-20h] long long v69; // [rsp+180h] [rbp-18h] _DWORD *v70; // [rsp+188h] [rbp-10h] long long v71; // [rsp+190h] [rbp-8h] v68 = a2; v69 = a3; v67 = a1; v66 = a4; v65 = a5; v64 = a6; if ( !(_DWORD)a6 ) { v57 = JS_ToObject(v67, *(_DWORD **)v65, *(_QWORD *)(v65 + 8), a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6); v58 = v16; if ( JS_IsException_1((long long)v57, v16) ) { v70 = v57; v71 = v58; return v70; } LABEL_7: v62 = *(_QWORD *)(v65 + 16); v63 = *(_QWORD *)(v65 + 24); v61 = JS_ValueToAtom(v67, v62, v63); if ( v61 ) { LODWORD(v49) = 0; v59 = (_DWORD *)v49; v60 = 3LL; if ( (_DWORD)v58 != -1 ) goto LABEL_24; OwnPropertyInternal = JS_GetOwnPropertyInternal(v67, (long long)v51, (long long)v57, v61); if ( OwnPropertyInternal >= 0 ) { if ( OwnPropertyInternal ) { v59 = (_DWORD *)JS_NewObject(v67); v60 = v17; if ( JS_IsException_1((long long)v59, v17) ) goto LABEL_25; if ( (v51[0] & 0x10) != 0 ) { v42 = v67; v48 = js_dup(v53, v54); if ( (int)JS_DefinePropertyValue( v42, (long long)v59, v60, 0x42u, v48, v18, a7, a8, a9, a10, v19, v20, a13, a14, 16391) < 0 ) goto LABEL_25; v41 = v67; v47 = js_dup(v55, v56); if ( (int)JS_DefinePropertyValue( v41, (long long)v59, v60, 0x43u, v47, v21, a7, a8, a9, a10, v22, v23, a13, a14, 16391) < 0 ) goto LABEL_25; } else { v40 = v67; v46 = js_dup((_DWORD *)v51[1], v52); if ( (int)JS_DefinePropertyValue( v40, (long long)v59, v60, 0x41u, v46, v24, a7, a8, a9, a10, v25, v26, a13, a14, 16391) < 0 ) goto LABEL_25; v39 = v67; v45 = (_DWORD *)js_bool(v51[0] & 2); if ( (int)JS_DefinePropertyValue( v39, (long long)v59, v60, 0x3Fu, v45, v27, a7, a8, a9, a10, v28, v29, a13, a14, 16391) < 0 ) goto LABEL_25; } v38 = v67; v44 = (_DWORD *)js_bool(v51[0] & 4); if ( (int)JS_DefinePropertyValue( v38, (long long)v59, v60, 0x40u, v44, v30, a7, a8, a9, a10, v31, v32, a13, a14, 16391) < 0 || (v37 = v67, v43 = (_DWORD *)js_bool(v51[0] & 1), (int)JS_DefinePropertyValue( v37, (long long)v59, v60, 0x3Eu, v43, v33, a7, a8, a9, a10, v34, v35, a13, a14, 16391) < 0) ) { LABEL_25: js_free_desc(v67, v51); JS_FreeValue(v67, (long long)v59, v60); goto LABEL_26; } js_free_desc(v67, v51); } LABEL_24: JS_FreeAtom(v67, v61); JS_FreeValue(v67, (long long)v57, v58); v70 = v59; v71 = v60; return v70; } } LABEL_26: JS_FreeAtom(v67, v61); JS_FreeValue(v67, (long long)v57, v58); LODWORD(v70) = 0; v71 = 6LL; return v70; } if ( (unsigned int)*(_QWORD *)(v65 + 8) == -1 ) { v57 = js_dup(*(_DWORD **)v65, *(_QWORD *)(v65 + 8)); v58 = v15; goto LABEL_7; } v70 = (_DWORD *)JS_ThrowTypeErrorNotAnObject(v67, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6); v71 = v14; return v70; }
js_object_getOwnPropertyDescriptor: SUB RSP,0x198 MOV qword ptr [RSP + 0x178],RSI MOV qword ptr [RSP + 0x180],RDX MOV qword ptr [RSP + 0x170],RDI MOV dword ptr [RSP + 0x16c],ECX MOV qword ptr [RSP + 0x160],R8 MOV dword ptr [RSP + 0x15c],R9D CMP dword ptr [RSP + 0x15c],0x0 JZ 0x001bdffc MOV RAX,qword ptr [RSP + 0x160] MOV RAX,qword ptr [RAX + 0x8] CMP EAX,-0x1 JZ 0x001bdfb3 MOV RDI,qword ptr [RSP + 0x170] CALL 0x0012e2e0 MOV qword ptr [RSP + 0x188],RAX MOV qword ptr [RSP + 0x190],RDX JMP 0x001be54d LAB_001bdfb3: MOV RAX,qword ptr [RSP + 0x160] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00120410 MOV qword ptr [RSP + 0xd0],RAX MOV qword ptr [RSP + 0xd8],RDX MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x128],RAX JMP 0x001be089 LAB_001bdffc: MOV RDI,qword ptr [RSP + 0x170] MOV RAX,qword ptr [RSP + 0x160] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001364b0 MOV qword ptr [RSP + 0xc0],RAX MOV qword ptr [RSP + 0xc8],RDX MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x128],RAX MOV RDI,qword ptr [RSP + 0x120] MOV RSI,qword ptr [RSP + 0x128] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001be087 MOV RAX,qword ptr [RSP + 0x120] MOV qword ptr [RSP + 0x188],RAX MOV RAX,qword ptr [RSP + 0x128] MOV qword ptr [RSP + 0x190],RAX JMP 0x001be54d LAB_001be087: JMP 0x001be089 LAB_001be089: MOV RAX,qword ptr [RSP + 0x160] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x148],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x150],RAX MOV RDI,qword ptr [RSP + 0x170] MOV RSI,qword ptr [RSP + 0x148] MOV RDX,qword ptr [RSP + 0x150] CALL 0x0012ff40 MOV dword ptr [RSP + 0x144],EAX CMP dword ptr [RSP + 0x144],0x0 SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001be0ee JMP 0x001be505 LAB_001be0ee: MOV dword ptr [RSP + 0xb0],0x0 MOV qword ptr [RSP + 0xb8],0x3 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x138],RAX MOV RAX,qword ptr [RSP + 0x128] CMP EAX,-0x1 JNZ 0x001be480 MOV RDI,qword ptr [RSP + 0x170] MOV RDX,qword ptr [RSP + 0x120] MOV ECX,dword ptr [RSP + 0x144] LEA RSI,[RSP + 0xe8] CALL 0x0012ef00 MOV dword ptr [RSP + 0xe4],EAX CMP dword ptr [RSP + 0xe4],0x0 JGE 0x001be170 JMP 0x001be505 LAB_001be170: CMP dword ptr [RSP + 0xe4],0x0 JZ 0x001be47e MOV RDI,qword ptr [RSP + 0x170] CALL 0x001292b0 MOV qword ptr [RSP + 0xa0],RAX MOV qword ptr [RSP + 0xa8],RDX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x138],RAX MOV RDI,qword ptr [RSP + 0x130] MOV RSI,qword ptr [RSP + 0x138] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001be1da JMP 0x001be4d3 LAB_001be1da: MOV dword ptr [RSP + 0xe0],0x4007 MOV EAX,dword ptr [RSP + 0xe8] AND EAX,0x10 CMP EAX,0x0 JZ 0x001be2e2 MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x108] CALL 0x00120410 MOV RDI,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x90],RAX MOV qword ptr [RSP + 0x98],RDX MOV EAX,dword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] MOV R8,qword ptr [RSP + 0x90] MOV R9,qword ptr [RSP + 0x98] MOV ECX,0x42 MOV dword ptr [RSP],EAX CALL 0x00135ef0 CMP EAX,0x0 JL 0x001be2d8 MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x110] MOV RSI,qword ptr [RSP + 0x118] CALL 0x00120410 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],RDX MOV EAX,dword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] MOV R8,qword ptr [RSP + 0x80] MOV R9,qword ptr [RSP + 0x88] MOV ECX,0x43 MOV dword ptr [RSP],EAX CALL 0x00135ef0 CMP EAX,0x0 JGE 0x001be2dd LAB_001be2d8: JMP 0x001be4d3 LAB_001be2dd: JMP 0x001be3ab LAB_001be2e2: MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xf8] CALL 0x00120410 MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x78],RDX MOV EAX,dword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] MOV R8,qword ptr [RSP + 0x70] MOV R9,qword ptr [RSP + 0x78] MOV ECX,0x41 MOV dword ptr [RSP],EAX CALL 0x00135ef0 CMP EAX,0x0 JL 0x001be3a4 MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x20],RAX MOV EDI,dword ptr [RSP + 0xe8] AND EDI,0x2 CALL 0x00155f90 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV EAX,dword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] MOV R8,qword ptr [RSP + 0x60] MOV R9,qword ptr [RSP + 0x68] MOV ECX,0x3f MOV dword ptr [RSP],EAX CALL 0x00135ef0 CMP EAX,0x0 JGE 0x001be3a9 LAB_001be3a4: JMP 0x001be4d3 LAB_001be3a9: JMP 0x001be3ab LAB_001be3ab: MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x18],RAX MOV EDI,dword ptr [RSP + 0xe8] AND EDI,0x4 CALL 0x00155f90 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV EAX,dword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] MOV R8,qword ptr [RSP + 0x50] MOV R9,qword ptr [RSP + 0x58] MOV ECX,0x40 MOV dword ptr [RSP],EAX CALL 0x00135ef0 CMP EAX,0x0 JL 0x001be467 MOV RAX,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x10],RAX MOV EDI,dword ptr [RSP + 0xe8] AND EDI,0x1 CALL 0x00155f90 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV EAX,dword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] MOV R8,qword ptr [RSP + 0x40] MOV R9,qword ptr [RSP + 0x48] MOV ECX,0x3e MOV dword ptr [RSP],EAX CALL 0x00135ef0 CMP EAX,0x0 JGE 0x001be469 LAB_001be467: JMP 0x001be4d3 LAB_001be469: MOV RDI,qword ptr [RSP + 0x170] LEA RSI,[RSP + 0xe8] CALL 0x0015f740 LAB_001be47e: JMP 0x001be480 LAB_001be480: MOV RDI,qword ptr [RSP + 0x170] MOV ESI,dword ptr [RSP + 0x144] CALL 0x00127d80 MOV RDI,qword ptr [RSP + 0x170] MOV RSI,qword ptr [RSP + 0x120] MOV RDX,qword ptr [RSP + 0x128] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x130] MOV qword ptr [RSP + 0x188],RAX MOV RAX,qword ptr [RSP + 0x138] MOV qword ptr [RSP + 0x190],RAX JMP 0x001be54d LAB_001be4d3: MOV RDI,qword ptr [RSP + 0x170] LEA RSI,[RSP + 0xe8] CALL 0x0015f740 MOV RDI,qword ptr [RSP + 0x170] MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] CALL 0x001229d0 LAB_001be505: MOV RDI,qword ptr [RSP + 0x170] MOV ESI,dword ptr [RSP + 0x144] CALL 0x00127d80 MOV RDI,qword ptr [RSP + 0x170] MOV RSI,qword ptr [RSP + 0x120] MOV RDX,qword ptr [RSP + 0x128] CALL 0x001229d0 MOV dword ptr [RSP + 0x188],0x0 MOV qword ptr [RSP + 0x190],0x6 LAB_001be54d: MOV RAX,qword ptr [RSP + 0x188] MOV RDX,qword ptr [RSP + 0x190] ADD RSP,0x198 RET
int1 [16] js_object_getOwnPropertyDescriptor (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5,int param_6) { int1 auVar1 [16]; int8 uVar2; int iVar3; int1 auVar4 [16]; uint uStack_e4; uint local_b0 [2]; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; int8 local_80; int1 local_78 [16]; int1 local_68 [16]; int local_54; int8 local_50; int8 local_48; int local_3c; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_3c = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; if (param_6 == 0) { local_78 = JS_ToObject(param_1,*param_5,param_5[1]); iVar3 = JS_IsException(local_78._0_8_,local_78._8_8_); if (iVar3 != 0) { local_10 = local_78._0_4_; uStack_c = local_78._4_4_; local_8 = local_78._8_8_; goto LAB_001be54d; } } else { if ((int)param_5[1] != -1) { auVar4 = JS_ThrowTypeErrorNotAnObject(param_1); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; goto LAB_001be54d; } local_78 = js_dup(*param_5,param_5[1]); } local_50 = local_38[2]; local_48 = local_38[3]; local_54 = JS_ValueToAtom(local_28,local_50,local_48); if (local_54 != 0) { local_68._0_8_ = (ulong)uStack_e4 << 0x20; local_68._8_8_ = 3; auVar4._8_8_ = 3; auVar4._0_8_ = local_68._0_8_; if (local_78._8_4_ != -1) { LAB_001be480: local_68 = auVar4; JS_FreeAtom(local_28,local_54); JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); local_10 = local_68._0_4_; uStack_c = local_68._4_4_; local_8 = local_68._8_8_; goto LAB_001be54d; } iVar3 = JS_GetOwnPropertyInternal(local_28,local_b0,local_78._0_8_,local_54); if (-1 < iVar3) { auVar4 = local_68; if (iVar3 == 0) goto LAB_001be480; local_68 = JS_NewObject(local_28); iVar3 = JS_IsException(local_68._0_8_,local_68._8_8_); uVar2 = local_28; if (iVar3 == 0) { if ((local_b0[0] & 0x10) == 0) { auVar4 = js_dup(local_a8,local_a0); iVar3 = JS_DefinePropertyValue (uVar2,local_68._0_8_,local_68._8_8_,0x41,auVar4._0_8_,auVar4._8_8_, 0x4007); uVar2 = local_28; if (-1 < iVar3) { auVar4 = js_bool(local_b0[0] & 2); iVar3 = JS_DefinePropertyValue (uVar2,local_68._0_8_,local_68._8_8_,0x3f,auVar4._0_8_,auVar4._8_8_, 0x4007); uVar2 = local_28; goto joined_r0x001be3a2; } } else { auVar4 = js_dup(local_98,local_90); iVar3 = JS_DefinePropertyValue (uVar2,local_68._0_8_,local_68._8_8_,0x42,auVar4._0_8_,auVar4._8_8_, 0x4007); uVar2 = local_28; if (-1 < iVar3) { auVar4 = js_dup(local_88,local_80); iVar3 = JS_DefinePropertyValue (uVar2,local_68._0_8_,local_68._8_8_,0x43,auVar4._0_8_,auVar4._8_8_, 0x4007); uVar2 = local_28; joined_r0x001be3a2: local_28 = uVar2; if (-1 < iVar3) { auVar4 = js_bool(local_b0[0] & 4); iVar3 = JS_DefinePropertyValue (uVar2,local_68._0_8_,local_68._8_8_,0x40,auVar4._0_8_,auVar4._8_8_, 0x4007); uVar2 = local_28; if (-1 < iVar3) { auVar4 = js_bool(local_b0[0] & 1); iVar3 = JS_DefinePropertyValue (uVar2,local_68._0_8_,local_68._8_8_,0x3e,auVar4._0_8_, auVar4._8_8_,0x4007); if (-1 < iVar3) { js_free_desc(local_28,local_b0); auVar4 = local_68; goto LAB_001be480; } } } } } } js_free_desc(local_28,local_b0); JS_FreeValue(local_28,local_68._0_8_,local_68._8_8_); } } JS_FreeAtom(local_28,local_54); JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); local_10 = 0; local_8 = 6; LAB_001be54d: auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
21,927
js_object_getOwnPropertyDescriptor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_getOwnPropertyDescriptor(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue prop; JSAtom atom; JSValue ret, obj; JSPropertyDescriptor desc; int res, flags; if (magic) { /* Reflect.getOwnPropertyDescriptor case */ if (JS_VALUE_GET_TAG(argv[0]) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); obj = js_dup(argv[0]); } else { obj = JS_ToObject(ctx, argv[0]); if (JS_IsException(obj)) return obj; } prop = argv[1]; atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) goto exception; ret = JS_UNDEFINED; if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) { res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), atom); if (res < 0) goto exception; if (res) { ret = JS_NewObject(ctx); if (JS_IsException(ret)) goto exception1; flags = JS_PROP_C_W_E | JS_PROP_THROW; if (desc.flags & JS_PROP_GETSET) { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_get, js_dup(desc.getter), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_set, js_dup(desc.setter), flags) < 0) goto exception1; } else { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_value, js_dup(desc.value), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_writable, js_bool(desc.flags & JS_PROP_WRITABLE), flags) < 0) goto exception1; } if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_enumerable, js_bool(desc.flags & JS_PROP_ENUMERABLE), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_configurable, js_bool(desc.flags & JS_PROP_CONFIGURABLE), flags) < 0) goto exception1; js_free_desc(ctx, &desc); } } JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return ret; exception1: js_free_desc(ctx, &desc); JS_FreeValue(ctx, ret); exception: JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O1
c
js_object_getOwnPropertyDescriptor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %r13 movq %rdi, %rbx testl %r9d, %r9d je 0x6f9e8 movq 0x8(%r13), %r14 cmpl $-0x1, %r14d jne 0x6fabf movsd (%r13), %xmm0 movsd %xmm0, 0x20(%rsp) movq 0x20(%rsp), %rax incl (%rax) movsd %xmm0, 0x18(%rsp) jmp 0x6fa10 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi callq 0x261c9 movq %rax, %r12 movq %rdx, %r14 movq %rax, 0x18(%rsp) movq %rdx, %r15 cmpl $0x6, %r14d je 0x6faff movq 0x10(%r13), %rsi movq 0x18(%r13), %rdx movq %rbx, %rdi callq 0x2347f movl %eax, %ebp testl %eax, %eax je 0x6fa99 movl $0x3, %r15d cmpl $-0x1, %r14d jne 0x6fadb movq 0x18(%rsp), %rdx leaq 0x20(%rsp), %rsi movq %rbx, %rdi movl %ebp, %ecx callq 0x22fc5 testl %eax, %eax js 0x6fa99 je 0x6fadb movq 0x40(%rbx), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %rbx, %rdi movl $0x1, %ecx callq 0x202f1 movq %rax, %r12 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x6fb14 leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x3ccaf movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1ccb2 movq %rbx, %rdi movl %ebp, %esi callq 0x1fbc4 movq 0x18(%rsp), %rsi movq 0x18(%rbx), %rdi movq %r14, %rdx callq 0x1ccb2 movl $0x6, %r15d xorl %r12d, %r12d jmp 0x6faff leaq 0x2de57(%rip), %rsi # 0x9d91d xorl %r12d, %r12d movq %rbx, %rdi xorl %eax, %eax callq 0x21953 movl $0x6, %r15d jmp 0x6faff xorl %r12d, %r12d xorl %r13d, %r13d orq %r13, %r12 movq %rbx, %rdi movl %ebp, %esi callq 0x1fbc4 movq 0x18(%rsp), %rsi movq 0x18(%rbx), %rdi movq %r14, %rdx callq 0x1ccb2 movq %r12, %rax movq %r15, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x10, 0x20(%rsp) jne 0x6fb82 movq 0x28(%rsp), %r8 movq 0x30(%rsp), %r9 movq %r8, 0x10(%rsp) cmpl $-0x9, %r9d jb 0x6fb37 movq 0x10(%rsp), %rax incl (%rax) movl $0x4007, (%rsp) # imm = 0x4007 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x41, %ecx callq 0x25ea7 testl %eax, %eax js 0x6fa7d movl 0x20(%rsp), %r8d shrl %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 movl $0x1, %r9d movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x3f, %ecx jmp 0x6fbf1 movq 0x38(%rsp), %r8 movq 0x40(%rsp), %r9 movq %r8, 0x10(%rsp) cmpl $-0x9, %r9d jb 0x6fb9e movq 0x10(%rsp), %rax incl (%rax) movl $0x4007, (%rsp) # imm = 0x4007 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x42, %ecx callq 0x25ea7 testl %eax, %eax js 0x6fa7d movq 0x48(%rsp), %r8 movq 0x50(%rsp), %r9 movq %r8, 0x10(%rsp) cmpl $-0x9, %r9d jb 0x6fbdc movq 0x10(%rsp), %rax incl (%rax) movl $0x4007, (%rsp) # imm = 0x4007 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x43, %ecx callq 0x25ea7 testl %eax, %eax js 0x6fa7d movl 0x20(%rsp), %r8d shrl $0x2, %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 movl $0x1, %r9d movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x40, %ecx callq 0x25ea7 testl %eax, %eax js 0x6fa7d movl 0x20(%rsp), %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 movl $0x1, %r9d movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movl $0x3e, %ecx callq 0x25ea7 testl %eax, %eax js 0x6fa7d movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r12, %r13 andq %rax, %r13 leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x3ccaf movl %r12d, %r12d jmp 0x6fae1
js_object_getOwnPropertyDescriptor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r13, r8 mov rbx, rdi test r9d, r9d jz short loc_6F9E8 mov r14, [r13+8] cmp r14d, 0FFFFFFFFh jnz loc_6FABF movsd xmm0, qword ptr [r13+0] movsd [rsp+88h+var_68], xmm0 mov rax, [rsp+88h+var_68] inc dword ptr [rax] movsd [rsp+88h+var_70], xmm0 jmp short loc_6FA10 loc_6F9E8: mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx call JS_ToObject mov r12, rax mov r14, rdx mov [rsp+88h+var_70], rax mov r15, rdx cmp r14d, 6 jz loc_6FAFF loc_6FA10: mov rsi, [r13+10h] mov rdx, [r13+18h] mov rdi, rbx call JS_ValueToAtom mov ebp, eax test eax, eax jz short loc_6FA99 mov r15d, 3 cmp r14d, 0FFFFFFFFh jnz loc_6FADB mov rdx, [rsp+88h+var_70] lea rsi, [rsp+88h+var_68] mov rdi, rbx mov ecx, ebp call JS_GetOwnPropertyInternal test eax, eax js short loc_6FA99 jz loc_6FADB mov rax, [rbx+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, rbx mov ecx, 1 call JS_NewObjectProtoClass mov r12, rax mov r15, rdx cmp r15d, 6 jnz loc_6FB14 loc_6FA7D: lea rsi, [rsp+88h+var_68] mov rdi, rbx call js_free_desc mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT loc_6FA99: mov rdi, rbx mov esi, ebp call JS_FreeAtom mov rsi, [rsp+88h+var_70] mov rdi, [rbx+18h] mov rdx, r14 call JS_FreeValueRT mov r15d, 6 xor r12d, r12d jmp short loc_6FAFF loc_6FABF: lea rsi, aOperandPrototy+20h; "not an object" xor r12d, r12d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r15d, 6 jmp short loc_6FAFF loc_6FADB: xor r12d, r12d xor r13d, r13d loc_6FAE1: or r12, r13 mov rdi, rbx mov esi, ebp call JS_FreeAtom mov rsi, [rsp+88h+var_70] mov rdi, [rbx+18h] mov rdx, r14 call JS_FreeValueRT loc_6FAFF: mov rax, r12 mov rdx, r15 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6FB14: test byte ptr [rsp+88h+var_68], 10h jnz short loc_6FB82 mov r8, [rsp+88h+var_60] mov r9, [rsp+88h+var_58] mov [rsp+88h+var_78], r8 cmp r9d, 0FFFFFFF7h jb short loc_6FB37 mov rax, [rsp+88h+var_78] inc dword ptr [rax] loc_6FB37: mov [rsp+88h+var_88], 4007h mov rdi, rbx mov rsi, r12 mov rdx, r15 mov ecx, 41h ; 'A' call JS_DefinePropertyValue test eax, eax js loc_6FA7D mov r8d, dword ptr [rsp+88h+var_68] shr r8d, 1 and r8d, 1 mov [rsp+88h+var_88], 4007h mov r9d, 1 mov rdi, rbx mov rsi, r12 mov rdx, r15 mov ecx, 3Fh ; '?' jmp short loc_6FBF1 loc_6FB82: mov r8, [rsp+88h+var_50] mov r9, [rsp+88h+var_48] mov [rsp+88h+var_78], r8 cmp r9d, 0FFFFFFF7h jb short loc_6FB9E mov rax, [rsp+88h+var_78] inc dword ptr [rax] loc_6FB9E: mov [rsp+88h+var_88], 4007h mov rdi, rbx mov rsi, r12 mov rdx, r15 mov ecx, 42h ; 'B' call JS_DefinePropertyValue test eax, eax js loc_6FA7D mov r8, [rsp+88h+var_40] mov r9, [rsp+88h+var_38] mov [rsp+88h+var_78], r8 cmp r9d, 0FFFFFFF7h jb short loc_6FBDC mov rax, [rsp+88h+var_78] inc dword ptr [rax] loc_6FBDC: mov [rsp+88h+var_88], 4007h mov rdi, rbx mov rsi, r12 mov rdx, r15 mov ecx, 43h ; 'C' loc_6FBF1: call JS_DefinePropertyValue test eax, eax js loc_6FA7D mov r8d, dword ptr [rsp+88h+var_68] shr r8d, 2 and r8d, 1 mov [rsp+88h+var_88], 4007h mov r9d, 1 mov rdi, rbx mov rsi, r12 mov rdx, r15 mov ecx, 40h ; '@' call JS_DefinePropertyValue test eax, eax js loc_6FA7D mov r8d, dword ptr [rsp+88h+var_68] and r8d, 1 mov [rsp+88h+var_88], 4007h mov r9d, 1 mov rdi, rbx mov rsi, r12 mov rdx, r15 mov ecx, 3Eh ; '>' call JS_DefinePropertyValue test eax, eax js loc_6FA7D mov rax, 0FFFFFFFF00000000h mov r13, r12 and r13, rax lea rsi, [rsp+88h+var_68] mov rdi, rbx call js_free_desc mov r12d, r12d jmp loc_6FAE1
_DWORD * js_object_getOwnPropertyDescriptor( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long *a13, long long a14) { long long v15; // r14 _DWORD *v16; // r12 long long v17; // rdx int v18; // eax int v19; // ebp int OwnPropertyInternal; // eax long long v21; // rdx unsigned long long v22; // r12 __m128 v23; // xmm4 __m128 v24; // xmm5 long long v25; // r15 unsigned long long v26; // r13 _DWORD *v28; // r8 long long v29; // r9 __m128 v30; // xmm4 __m128 v31; // xmm5 int v32; // eax __m128 v33; // xmm4 __m128 v34; // xmm5 _DWORD *v35; // r8 long long v36; // r9 __m128 v37; // xmm4 __m128 v38; // xmm5 _DWORD *v39; // r8 long long v40; // r9 __m128 v41; // xmm4 __m128 v42; // xmm5 char v43; // [rsp+0h] [rbp-88h] _DWORD *v44; // [rsp+18h] [rbp-70h] unsigned long long v45; // [rsp+20h] [rbp-68h] BYREF _DWORD *v46; // [rsp+28h] [rbp-60h] long long v47; // [rsp+30h] [rbp-58h] _DWORD *v48; // [rsp+38h] [rbp-50h] long long v49; // [rsp+40h] [rbp-48h] _DWORD *v50; // [rsp+48h] [rbp-40h] long long v51; // [rsp+50h] [rbp-38h] if ( (_DWORD)a14 ) { v15 = a13[1]; if ( (_DWORD)v15 != -1 ) { v16 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a11, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v43); return v16; } v45 = *a13; a2.m128_u64[0] = v45; ++*(_DWORD *)v45; v44 = (_DWORD *)a2.m128_u64[0]; LABEL_5: v18 = JS_ValueToAtom(a1, a13[2], a13[3]); v19 = v18; if ( v18 ) { if ( (_DWORD)v15 != -1 ) goto LABEL_13; OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)&v45, (long long)v44, v18); if ( OwnPropertyInternal >= 0 ) { if ( OwnPropertyInternal ) { v22 = JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 1u); v25 = v21; if ( (_DWORD)v21 == 6 ) goto LABEL_10; if ( (v45 & 0x10) != 0 ) { v35 = v48; v36 = v49; if ( (unsigned int)v49 >= 0xFFFFFFF7 ) ++*v48; if ( (int)JS_DefinePropertyValue( a1, v22, v21, 66LL, v35, v36, *(double *)a2.m128_u64, a3, a4, a5, v23, v24, a8, a9, 16391) < 0 ) goto LABEL_10; v39 = v50; v40 = v51; if ( (unsigned int)v51 >= 0xFFFFFFF7 ) ++*v50; v32 = JS_DefinePropertyValue( a1, v22, v25, 67LL, v39, v40, *(double *)a2.m128_u64, a3, a4, a5, v37, v38, a8, a9, 16391); } else { v28 = v46; v29 = v47; if ( (unsigned int)v47 >= 0xFFFFFFF7 ) ++*v46; if ( (int)JS_DefinePropertyValue( a1, v22, v21, 65LL, v28, v29, *(double *)a2.m128_u64, a3, a4, a5, v23, v24, a8, a9, 16391) < 0 ) goto LABEL_10; v32 = JS_DefinePropertyValue( a1, v22, v25, 63LL, (_DWORD *)(((unsigned int)v45 >> 1) & 1), 1LL, *(double *)a2.m128_u64, a3, a4, a5, v30, v31, a8, a9, 16391); } if ( v32 < 0 || (int)JS_DefinePropertyValue( a1, v22, v25, 64LL, (_DWORD *)(((unsigned int)v45 >> 2) & 1), 1LL, *(double *)a2.m128_u64, a3, a4, a5, v33, v34, a8, a9, 16391) < 0 || (int)JS_DefinePropertyValue( a1, v22, v25, 62LL, (_DWORD *)(v45 & 1), 1LL, *(double *)a2.m128_u64, a3, a4, a5, v41, v42, a8, a9, 16391) < 0 ) { LABEL_10: js_free_desc(a1, (long long)&v45); JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v22, v25); goto LABEL_11; } v26 = v22 & 0xFFFFFFFF00000000LL; js_free_desc(a1, (long long)&v45); v22 = (unsigned int)v22; LABEL_14: v16 = (_DWORD *)(v26 | v22); JS_FreeAtom(a1, v19); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v44, v15); return v16; } LABEL_13: v22 = 0LL; v26 = 0LL; goto LABEL_14; } } LABEL_11: JS_FreeAtom(a1, v19); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v44, v15); return 0LL; } v16 = JS_ToObject(a1, *a13, a13[1], a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9); v15 = v17; v44 = v16; if ( (_DWORD)v17 != 6 ) goto LABEL_5; return v16; }
js_object_getOwnPropertyDescriptor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R13,R8 MOV RBX,RDI TEST R9D,R9D JZ 0x0016f9e8 MOV R14,qword ptr [R13 + 0x8] CMP R14D,-0x1 JNZ 0x0016fabf MOVSD XMM0,qword ptr [R13] MOVSD qword ptr [RSP + 0x20],XMM0 MOV RAX,qword ptr [RSP + 0x20] INC dword ptr [RAX] MOVSD qword ptr [RSP + 0x18],XMM0 JMP 0x0016fa10 LAB_0016f9e8: MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x001261c9 MOV R12,RAX MOV R14,RDX MOV qword ptr [RSP + 0x18],RAX MOV R15,RDX CMP R14D,0x6 JZ 0x0016faff LAB_0016fa10: MOV RSI,qword ptr [R13 + 0x10] MOV RDX,qword ptr [R13 + 0x18] MOV RDI,RBX CALL 0x0012347f MOV EBP,EAX TEST EAX,EAX JZ 0x0016fa99 MOV R15D,0x3 CMP R14D,-0x1 JNZ 0x0016fadb MOV RDX,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x20] MOV RDI,RBX MOV ECX,EBP CALL 0x00122fc5 TEST EAX,EAX JS 0x0016fa99 JZ 0x0016fadb MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,RBX MOV ECX,0x1 CALL 0x001202f1 MOV R12,RAX MOV R15,RDX CMP R15D,0x6 JNZ 0x0016fb14 LAB_0016fa7d: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0013ccaf MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011ccb2 LAB_0016fa99: MOV RDI,RBX MOV ESI,EBP CALL 0x0011fbc4 MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RBX + 0x18] MOV RDX,R14 CALL 0x0011ccb2 MOV R15D,0x6 XOR R12D,R12D JMP 0x0016faff LAB_0016fabf: LEA RSI,[0x19d91d] XOR R12D,R12D MOV RDI,RBX XOR EAX,EAX CALL 0x00121953 MOV R15D,0x6 JMP 0x0016faff LAB_0016fadb: XOR R12D,R12D XOR R13D,R13D LAB_0016fae1: OR R12,R13 MOV RDI,RBX MOV ESI,EBP CALL 0x0011fbc4 MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RBX + 0x18] MOV RDX,R14 CALL 0x0011ccb2 LAB_0016faff: MOV RAX,R12 MOV RDX,R15 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016fb14: TEST byte ptr [RSP + 0x20],0x10 JNZ 0x0016fb82 MOV R8,qword ptr [RSP + 0x28] MOV R9,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],R8 CMP R9D,-0x9 JC 0x0016fb37 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_0016fb37: MOV dword ptr [RSP],0x4007 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV ECX,0x41 CALL 0x00125ea7 TEST EAX,EAX JS 0x0016fa7d MOV R8D,dword ptr [RSP + 0x20] SHR R8D,0x1 AND R8D,0x1 MOV dword ptr [RSP],0x4007 MOV R9D,0x1 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV ECX,0x3f JMP 0x0016fbf1 LAB_0016fb82: MOV R8,qword ptr [RSP + 0x38] MOV R9,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],R8 CMP R9D,-0x9 JC 0x0016fb9e MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_0016fb9e: MOV dword ptr [RSP],0x4007 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV ECX,0x42 CALL 0x00125ea7 TEST EAX,EAX JS 0x0016fa7d MOV R8,qword ptr [RSP + 0x48] MOV R9,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x10],R8 CMP R9D,-0x9 JC 0x0016fbdc MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_0016fbdc: MOV dword ptr [RSP],0x4007 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV ECX,0x43 LAB_0016fbf1: CALL 0x00125ea7 TEST EAX,EAX JS 0x0016fa7d MOV R8D,dword ptr [RSP + 0x20] SHR R8D,0x2 AND R8D,0x1 MOV dword ptr [RSP],0x4007 MOV R9D,0x1 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV ECX,0x40 CALL 0x00125ea7 TEST EAX,EAX JS 0x0016fa7d MOV R8D,dword ptr [RSP + 0x20] AND R8D,0x1 MOV dword ptr [RSP],0x4007 MOV R9D,0x1 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV ECX,0x3e CALL 0x00125ea7 TEST EAX,EAX JS 0x0016fa7d MOV RAX,-0x100000000 MOV R13,R12 AND R13,RAX LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0013ccaf MOV R12D,R12D JMP 0x0016fae1
int1 [16] js_object_getOwnPropertyDescriptor(long param_1) { int iVar1; int iVar2; int8 uVar3; int8 *in_R8; int in_R9D; ulong uVar4; ulong uVar5; int8 uVar6; int1 auVar7 [16]; int1 auVar8 [16]; int8 local_70; int *local_68; int *local_60; int8 local_58; int *local_50; int8 local_48; int *local_40; int8 local_38; if (in_R9D == 0) { auVar7 = JS_ToObject(param_1,*in_R8,in_R8[1]); if (auVar7._8_4_ == 6) { return auVar7; } } else { if ((int)in_R8[1] != -1) { JS_ThrowTypeError(param_1,"not an object"); return ZEXT816(6) << 0x40; } local_68 = (int *)*in_R8; auVar7._8_8_ = in_R8[1]; auVar7._0_8_ = local_68; *local_68 = *local_68 + 1; } local_70 = auVar7._0_8_; iVar1 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]); if (iVar1 == 0) goto LAB_0016fa99; uVar6 = 3; if (auVar7._8_4_ == -1) { iVar2 = JS_GetOwnPropertyInternal(param_1,&local_68,local_70,iVar1); if (iVar2 < 0) goto LAB_0016fa99; if (iVar2 != 0) { auVar8 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); uVar6 = auVar8._8_8_; uVar4 = auVar8._0_8_; if (auVar8._8_4_ != 6) { if (((ulong)local_68 & 0x10) == 0) { if (0xfffffff6 < (uint)local_58) { *local_60 = *local_60 + 1; } iVar2 = JS_DefinePropertyValue(param_1,uVar4,uVar6,0x41,local_60,local_58,0x4007); if (-1 < iVar2) { local_40 = (int *)(ulong)((uint)local_68 >> 1 & 1); local_38 = 1; uVar3 = 0x3f; LAB_0016fbf1: iVar2 = JS_DefinePropertyValue(param_1,uVar4,uVar6,uVar3,local_40,local_38,0x4007); if (-1 < iVar2) { iVar2 = JS_DefinePropertyValue (param_1,uVar4,uVar6,0x40,(uint)local_68 >> 2 & 1,1,0x4007); if (-1 < iVar2) { iVar2 = JS_DefinePropertyValue(param_1,uVar4,uVar6,0x3e,(uint)local_68 & 1,1,0x4007) ; if (-1 < iVar2) { uVar5 = uVar4 & 0xffffffff00000000; js_free_desc(param_1,&local_68); uVar4 = uVar4 & 0xffffffff; goto LAB_0016fae1; } } } } } else { if (0xfffffff6 < (uint)local_48) { *local_50 = *local_50 + 1; } iVar2 = JS_DefinePropertyValue(param_1,uVar4,uVar6,0x42,local_50,local_48,0x4007); if (-1 < iVar2) { if (0xfffffff6 < (uint)local_38) { *local_40 = *local_40 + 1; } uVar3 = 0x43; goto LAB_0016fbf1; } } } js_free_desc(param_1,&local_68); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar6); LAB_0016fa99: JS_FreeAtom(param_1,iVar1); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_70,auVar7._8_8_); return ZEXT816(6) << 0x40; } } uVar4 = 0; uVar5 = 0; LAB_0016fae1: auVar8._8_8_ = uVar6; auVar8._0_8_ = uVar4 | uVar5; JS_FreeAtom(param_1,iVar1); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_70,auVar7._8_8_); return auVar8; }
21,928
js_object_getOwnPropertyDescriptor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_getOwnPropertyDescriptor(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue prop; JSAtom atom; JSValue ret, obj; JSPropertyDescriptor desc; int res, flags; if (magic) { /* Reflect.getOwnPropertyDescriptor case */ if (JS_VALUE_GET_TAG(argv[0]) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); obj = js_dup(argv[0]); } else { obj = JS_ToObject(ctx, argv[0]); if (JS_IsException(obj)) return obj; } prop = argv[1]; atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) goto exception; ret = JS_UNDEFINED; if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) { res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), atom); if (res < 0) goto exception; if (res) { ret = JS_NewObject(ctx); if (JS_IsException(ret)) goto exception1; flags = JS_PROP_C_W_E | JS_PROP_THROW; if (desc.flags & JS_PROP_GETSET) { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_get, js_dup(desc.getter), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_set, js_dup(desc.setter), flags) < 0) goto exception1; } else { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_value, js_dup(desc.value), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_writable, js_bool(desc.flags & JS_PROP_WRITABLE), flags) < 0) goto exception1; } if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_enumerable, js_bool(desc.flags & JS_PROP_ENUMERABLE), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_configurable, js_bool(desc.flags & JS_PROP_CONFIGURABLE), flags) < 0) goto exception1; js_free_desc(ctx, &desc); } } JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return ret; exception1: js_free_desc(ctx, &desc); JS_FreeValue(ctx, ret); exception: JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
js_object_getOwnPropertyDescriptor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %rbp movq %rdi, %r14 testl %r9d, %r9d je 0x71da4 movq 0x8(%rbp), %rbx cmpl $-0x1, %ebx jne 0x71ead movq (%rbp), %r13 incl (%r13) jmp 0x71dc9 movq (%rbp), %rsi movq 0x8(%rbp), %rdx movq %r14, %rdi callq 0x268d8 movq %rax, %r13 movq %rdx, %rbx movq %rax, %r15 movq %rdx, %r12 cmpl $0x6, %ebx je 0x72045 movq 0x10(%rbp), %rsi movq 0x18(%rbp), %rdx movq %r14, %rdi callq 0x23ad1 testl %eax, %eax je 0x7200e movl $0x3, %r12d cmpl $-0x1, %ebx jne 0x71ecc leaq 0x10(%rsp), %rsi movq %r14, %rdi movq %r13, %rdx movl %eax, %ecx movl %eax, 0xc(%rsp) callq 0x237bd testl %eax, %eax movl 0xc(%rsp), %eax js 0x7200e je 0x71ecc movq 0x40(%r14), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %r14, %rdi movl $0x1, %ecx callq 0x20a15 movq %rax, %rbp movq %rdx, %r12 cmpl $0x6, %r12d je 0x71ff7 testb $0x10, 0x10(%rsp) jne 0x71f07 movq 0x18(%rsp), %r8 movq 0x20(%rsp), %r9 cmpl $-0x9, %r9d jb 0x71e5f incl (%r8) movl $0x4007, (%rsp) # imm = 0x4007 movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx movl $0x41, %ecx callq 0x26541 testl %eax, %eax js 0x71ff7 movl 0x10(%rsp), %r8d shrl %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 movl $0x1, %r9d movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx movl $0x3f, %ecx jmp 0x71f64 leaq 0x2ea39(%rip), %rsi # 0xa08ed xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %r12d jmp 0x72045 xorl %ebp, %ebp xorl %r15d, %r15d movq %r14, %rdi movl %eax, %esi callq 0x202f5 cmpl $-0x9, %ebx jb 0x71eff movq 0x18(%r14), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x71eff movq %r13, %rsi movq %rbx, %rdx callq 0x20d90 orq %rbp, %r15 jmp 0x72045 movq 0x28(%rsp), %r8 movq 0x30(%rsp), %r9 cmpl $-0x9, %r9d jb 0x71f1a incl (%r8) movl $0x4007, (%rsp) # imm = 0x4007 movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx movl $0x42, %ecx callq 0x26541 testl %eax, %eax js 0x71ff7 movq 0x38(%rsp), %r8 movq 0x40(%rsp), %r9 cmpl $-0x9, %r9d jb 0x71f4f incl (%r8) movl $0x4007, (%rsp) # imm = 0x4007 movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx movl $0x43, %ecx callq 0x26541 testl %eax, %eax js 0x71ff7 movl 0x10(%rsp), %r8d shrl $0x2, %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 movl $0x1, %r9d movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx movl $0x40, %ecx callq 0x26541 testl %eax, %eax js 0x71ff7 movl 0x10(%rsp), %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 movl $0x1, %r9d movq %r14, %rdi movq %rbp, %rsi movq %r12, %rdx movl $0x3e, %ecx callq 0x26541 testl %eax, %eax js 0x71ff7 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbp, %r15 andq %rax, %r15 leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x3e21f movl %ebp, %ebp movl 0xc(%rsp), %eax jmp 0x71ed1 leaq 0x10(%rsp), %rsi movq %r14, %rdi movq %r12, %rdx movq %rbp, %rcx callq 0x14239 movl 0xc(%rsp), %eax movq %r14, %rdi movl %eax, %esi callq 0x202f5 movl $0x6, %r12d cmpl $-0x9, %ebx jb 0x72042 movq 0x18(%r14), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x72042 movq %r13, %rsi movq %rbx, %rdx callq 0x20d90 xorl %r15d, %r15d movq %r15, %rax movq %r12, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_object_getOwnPropertyDescriptor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbp, r8 mov r14, rdi test r9d, r9d jz short loc_71DA4 mov rbx, [rbp+8] cmp ebx, 0FFFFFFFFh jnz loc_71EAD mov r13, [rbp+0] inc dword ptr [r13+0] jmp short loc_71DC9 loc_71DA4: mov rsi, [rbp+0] mov rdx, [rbp+8] mov rdi, r14 call JS_ToObject mov r13, rax mov rbx, rdx mov r15, rax mov r12, rdx cmp ebx, 6 jz loc_72045 loc_71DC9: mov rsi, [rbp+10h] mov rdx, [rbp+18h] mov rdi, r14 call JS_ValueToAtom test eax, eax jz loc_7200E mov r12d, 3 cmp ebx, 0FFFFFFFFh jnz loc_71ECC lea rsi, [rsp+78h+var_68] mov rdi, r14 mov rdx, r13 mov ecx, eax mov [rsp+78h+var_6C], eax call JS_GetOwnPropertyInternal test eax, eax mov eax, [rsp+78h+var_6C] js loc_7200E jz loc_71ECC mov rax, [r14+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, r14 mov ecx, 1 call JS_NewObjectProtoClass mov rbp, rax mov r12, rdx cmp r12d, 6 jz loc_71FF7 test byte ptr [rsp+78h+var_68], 10h jnz loc_71F07 mov r8, [rsp+78h+var_60] mov r9, [rsp+78h+var_58] cmp r9d, 0FFFFFFF7h jb short loc_71E5F inc dword ptr [r8] loc_71E5F: mov [rsp+78h+var_78], 4007h mov rdi, r14 mov rsi, rbp mov rdx, r12 mov ecx, 41h ; 'A' call JS_DefinePropertyValue test eax, eax js loc_71FF7 mov r8d, [rsp+78h+var_68] shr r8d, 1 and r8d, 1 mov [rsp+78h+var_78], 4007h mov r9d, 1 mov rdi, r14 mov rsi, rbp mov rdx, r12 mov ecx, 3Fh ; '?' jmp loc_71F64 loc_71EAD: lea rsi, aOperandPrototy+20h; "not an object" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError mov r12d, 6 jmp loc_72045 loc_71ECC: xor ebp, ebp xor r15d, r15d loc_71ED1: mov rdi, r14 mov esi, eax call JS_FreeAtom cmp ebx, 0FFFFFFF7h jb short loc_71EFF mov rdi, [r14+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg short loc_71EFF mov rsi, r13 mov rdx, rbx call js_free_value_rt loc_71EFF: or r15, rbp jmp loc_72045 loc_71F07: mov r8, [rsp+78h+var_50] mov r9, [rsp+78h+var_48] cmp r9d, 0FFFFFFF7h jb short loc_71F1A inc dword ptr [r8] loc_71F1A: mov [rsp+78h+var_78], 4007h mov rdi, r14 mov rsi, rbp mov rdx, r12 mov ecx, 42h ; 'B' call JS_DefinePropertyValue test eax, eax js loc_71FF7 mov r8, [rsp+78h+var_40] mov r9, [rsp+78h+var_38] cmp r9d, 0FFFFFFF7h jb short loc_71F4F inc dword ptr [r8] loc_71F4F: mov [rsp+78h+var_78], 4007h mov rdi, r14 mov rsi, rbp mov rdx, r12 mov ecx, 43h ; 'C' loc_71F64: call JS_DefinePropertyValue test eax, eax js loc_71FF7 mov r8d, [rsp+78h+var_68] shr r8d, 2 and r8d, 1 mov [rsp+78h+var_78], 4007h mov r9d, 1 mov rdi, r14 mov rsi, rbp mov rdx, r12 mov ecx, 40h ; '@' call JS_DefinePropertyValue test eax, eax js short loc_71FF7 mov r8d, [rsp+78h+var_68] and r8d, 1 mov [rsp+78h+var_78], 4007h mov r9d, 1 mov rdi, r14 mov rsi, rbp mov rdx, r12 mov ecx, 3Eh ; '>' call JS_DefinePropertyValue test eax, eax js short loc_71FF7 mov rax, 0FFFFFFFF00000000h mov r15, rbp and r15, rax lea rsi, [rsp+78h+var_68] mov rdi, r14 call js_free_desc mov ebp, ebp mov eax, [rsp+78h+var_6C] jmp loc_71ED1 loc_71FF7: lea rsi, [rsp+78h+var_68] mov rdi, r14 mov rdx, r12 mov rcx, rbp call js_object_getOwnPropertyDescriptor_cold_1 mov eax, [rsp+78h+var_6C] loc_7200E: mov rdi, r14 mov esi, eax call JS_FreeAtom mov r12d, 6 cmp ebx, 0FFFFFFF7h jb short loc_72042 mov rdi, [r14+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg short loc_72042 mov rsi, r13 mov rdx, rbx call js_free_value_rt loc_72042: xor r15d, r15d loc_72045: mov rax, r15 mov rdx, r12 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_object_getOwnPropertyDescriptor( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long *a13, long long a14) { long long v15; // rbx _QWORD *v16; // r13 long long v17; // rdx _QWORD *v18; // r15 unsigned int v19; // eax int v20; // eax bool v21; // zf bool v22; // sf long long v23; // rax long long v24; // rdx __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rbp long long v28; // r12 int *v29; // r8 long long v30; // r9 __m128 v31; // xmm4 __m128 v32; // xmm5 int v33; // eax __m128 v34; // xmm4 __m128 v35; // xmm5 unsigned long long v36; // r15 long long v37; // r8 long long v38; // r9 long long v39; // rdi int v40; // eax long long v41; // rcx int *v42; // r8 long long v43; // r9 __m128 v44; // xmm4 __m128 v45; // xmm5 int *v46; // r8 long long v47; // r9 __m128 v48; // xmm4 __m128 v49; // xmm5 long long v50; // rdx long long v51; // rcx long long v52; // r8 long long v53; // r9 long long v54; // r8 long long v55; // r9 long long v56; // rdi int v57; // eax long long v58; // rcx char v60; // [rsp+0h] [rbp-78h] unsigned int v61; // [rsp+Ch] [rbp-6Ch] long long v62; // [rsp+10h] [rbp-68h] BYREF int *v63; // [rsp+18h] [rbp-60h] long long v64; // [rsp+20h] [rbp-58h] int *v65; // [rsp+28h] [rbp-50h] long long v66; // [rsp+30h] [rbp-48h] int *v67; // [rsp+38h] [rbp-40h] long long v68; // [rsp+40h] [rbp-38h] if ( (_DWORD)a14 ) { v15 = a13[1]; if ( (_DWORD)v15 != -1 ) { v18 = 0LL; JS_ThrowTypeError(a1, (long long)"not an object", a11, a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v60); return (unsigned long long)v18; } v16 = (_QWORD *)*a13; ++*(_DWORD *)*a13; } else { v16 = (_QWORD *)JS_ToObject(a1, *a13, a13[1], a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9); v15 = v17; v18 = v16; if ( (_DWORD)v17 == 6 ) return (unsigned long long)v18; } v19 = JS_ValueToAtom(a1, a13[2], a13[3]); if ( !v19 ) goto LABEL_32; if ( (_DWORD)v15 != -1 ) goto LABEL_16; v61 = v19; LOBYTE(v20) = JS_GetOwnPropertyInternal(a1, (long long)&v62, (long long)v16, v19); v21 = v20 == 0; v22 = v20 < 0; v19 = v61; if ( v22 ) goto LABEL_32; if ( v21 ) { LABEL_16: v27 = 0LL; v36 = 0LL; goto LABEL_17; } v23 = JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 1u); v27 = v23; v28 = v24; if ( (_DWORD)v24 != 6 ) { if ( (v62 & 0x10) != 0 ) { v42 = v65; v43 = v66; if ( (unsigned int)v66 >= 0xFFFFFFF7 ) ++*v65; if ( (int)JS_DefinePropertyValue( a1, v23, v24, 66LL, v42, v43, *(double *)a2.m128_u64, a3, a4, a5, v25, v26, a8, a9, 16391) >= 0 ) { v46 = v67; v47 = v68; if ( (unsigned int)v68 >= 0xFFFFFFF7 ) ++*v67; v33 = JS_DefinePropertyValue( a1, v27, v28, 67LL, v46, v47, *(double *)a2.m128_u64, a3, a4, a5, v44, v45, a8, a9, 16391); LABEL_27: if ( v33 >= 0 && (int)JS_DefinePropertyValue( a1, v27, v28, 64LL, (int *)(((unsigned int)v62 >> 2) & 1), 1LL, *(double *)a2.m128_u64, a3, a4, a5, v34, v35, a8, a9, 16391) >= 0 && (int)JS_DefinePropertyValue( a1, v27, v28, 62LL, (int *)(v62 & 1), 1LL, *(double *)a2.m128_u64, a3, a4, a5, v48, v49, a8, a9, 16391) >= 0 ) { v36 = v27 & 0xFFFFFFFF00000000LL; js_free_desc(a1, &v62, v50, v51, v52, v53); v27 = (unsigned int)v27; v19 = v61; LABEL_17: JS_FreeAtom(a1, v19); if ( (unsigned int)v15 >= 0xFFFFFFF7 ) { v39 = *(_QWORD *)(a1 + 24); v40 = *(_DWORD *)v16; v41 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v41; if ( v40 <= 1 ) js_free_value_rt(v39, v16, v15, v41, v37, v38); } return v27 | v36; } } } else { v29 = v63; v30 = v64; if ( (unsigned int)v64 >= 0xFFFFFFF7 ) ++*v63; if ( (int)JS_DefinePropertyValue( a1, v23, v24, 65LL, v29, v30, *(double *)a2.m128_u64, a3, a4, a5, v25, v26, a8, a9, 16391) >= 0 ) { v33 = JS_DefinePropertyValue( a1, v27, v28, 63LL, (int *)(((unsigned int)v62 >> 1) & 1), 1LL, *(double *)a2.m128_u64, a3, a4, a5, v31, v32, a8, a9, 16391); goto LABEL_27; } } } js_object_getOwnPropertyDescriptor_cold_1(a1, (long long)&v62, v28, (_DWORD *)v27); v19 = v61; LABEL_32: JS_FreeAtom(a1, v19); if ( (unsigned int)v15 >= 0xFFFFFFF7 ) { v56 = *(_QWORD *)(a1 + 24); v57 = *(_DWORD *)v16; v58 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v58; if ( v57 <= 1 ) js_free_value_rt(v56, v16, v15, v58, v54, v55); } return 0LL; }
js_object_getOwnPropertyDescriptor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBP,R8 MOV R14,RDI TEST R9D,R9D JZ 0x00171da4 MOV RBX,qword ptr [RBP + 0x8] CMP EBX,-0x1 JNZ 0x00171ead MOV R13,qword ptr [RBP] INC dword ptr [R13] JMP 0x00171dc9 LAB_00171da4: MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] MOV RDI,R14 CALL 0x001268d8 MOV R13,RAX MOV RBX,RDX MOV R15,RAX MOV R12,RDX CMP EBX,0x6 JZ 0x00172045 LAB_00171dc9: MOV RSI,qword ptr [RBP + 0x10] MOV RDX,qword ptr [RBP + 0x18] MOV RDI,R14 CALL 0x00123ad1 TEST EAX,EAX JZ 0x0017200e MOV R12D,0x3 CMP EBX,-0x1 JNZ 0x00171ecc LEA RSI,[RSP + 0x10] MOV RDI,R14 MOV RDX,R13 MOV ECX,EAX MOV dword ptr [RSP + 0xc],EAX CALL 0x001237bd TEST EAX,EAX MOV EAX,dword ptr [RSP + 0xc] JS 0x0017200e JZ 0x00171ecc MOV RAX,qword ptr [R14 + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,R14 MOV ECX,0x1 CALL 0x00120a15 MOV RBP,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00171ff7 TEST byte ptr [RSP + 0x10],0x10 JNZ 0x00171f07 MOV R8,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x20] CMP R9D,-0x9 JC 0x00171e5f INC dword ptr [R8] LAB_00171e5f: MOV dword ptr [RSP],0x4007 MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 MOV ECX,0x41 CALL 0x00126541 TEST EAX,EAX JS 0x00171ff7 MOV R8D,dword ptr [RSP + 0x10] SHR R8D,0x1 AND R8D,0x1 MOV dword ptr [RSP],0x4007 MOV R9D,0x1 MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 MOV ECX,0x3f JMP 0x00171f64 LAB_00171ead: LEA RSI,[0x1a08ed] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0012214f MOV R12D,0x6 JMP 0x00172045 LAB_00171ecc: XOR EBP,EBP XOR R15D,R15D LAB_00171ed1: MOV RDI,R14 MOV ESI,EAX CALL 0x001202f5 CMP EBX,-0x9 JC 0x00171eff MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x00171eff MOV RSI,R13 MOV RDX,RBX CALL 0x00120d90 LAB_00171eff: OR R15,RBP JMP 0x00172045 LAB_00171f07: MOV R8,qword ptr [RSP + 0x28] MOV R9,qword ptr [RSP + 0x30] CMP R9D,-0x9 JC 0x00171f1a INC dword ptr [R8] LAB_00171f1a: MOV dword ptr [RSP],0x4007 MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 MOV ECX,0x42 CALL 0x00126541 TEST EAX,EAX JS 0x00171ff7 MOV R8,qword ptr [RSP + 0x38] MOV R9,qword ptr [RSP + 0x40] CMP R9D,-0x9 JC 0x00171f4f INC dword ptr [R8] LAB_00171f4f: MOV dword ptr [RSP],0x4007 MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 MOV ECX,0x43 LAB_00171f64: CALL 0x00126541 TEST EAX,EAX JS 0x00171ff7 MOV R8D,dword ptr [RSP + 0x10] SHR R8D,0x2 AND R8D,0x1 MOV dword ptr [RSP],0x4007 MOV R9D,0x1 MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 MOV ECX,0x40 CALL 0x00126541 TEST EAX,EAX JS 0x00171ff7 MOV R8D,dword ptr [RSP + 0x10] AND R8D,0x1 MOV dword ptr [RSP],0x4007 MOV R9D,0x1 MOV RDI,R14 MOV RSI,RBP MOV RDX,R12 MOV ECX,0x3e CALL 0x00126541 TEST EAX,EAX JS 0x00171ff7 MOV RAX,-0x100000000 MOV R15,RBP AND R15,RAX LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x0013e21f MOV EBP,EBP MOV EAX,dword ptr [RSP + 0xc] JMP 0x00171ed1 LAB_00171ff7: LEA RSI,[RSP + 0x10] MOV RDI,R14 MOV RDX,R12 MOV RCX,RBP CALL 0x00114239 MOV EAX,dword ptr [RSP + 0xc] LAB_0017200e: MOV RDI,R14 MOV ESI,EAX CALL 0x001202f5 MOV R12D,0x6 CMP EBX,-0x9 JC 0x00172042 MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x00172042 MOV RSI,R13 MOV RDX,RBX CALL 0x00120d90 LAB_00172042: XOR R15D,R15D LAB_00172045: MOV RAX,R15 MOV RDX,R12 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_object_getOwnPropertyDescriptor(long param_1) { int iVar1; int iVar2; int8 uVar3; uint uVar4; ulong uVar5; int8 *in_R8; int in_R9D; int8 uVar6; int *piVar7; ulong uVar8; int1 auVar9 [16]; int1 auVar10 [16]; uint local_68 [2]; int *local_60; int8 local_58; int *local_50; int8 local_48; int *local_40; int8 local_38; if (in_R9D == 0) { auVar9 = JS_ToObject(param_1,*in_R8,in_R8[1]); if (auVar9._8_4_ == 6) { return auVar9; } } else { if ((int)in_R8[1] != -1) { JS_ThrowTypeError(param_1,"not an object"); return ZEXT816(6) << 0x40; } piVar7 = (int *)*in_R8; auVar9._8_8_ = in_R8[1]; auVar9._0_8_ = piVar7; *piVar7 = *piVar7 + 1; } piVar7 = auVar9._0_8_; iVar1 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]); uVar4 = auVar9._8_4_; if (iVar1 == 0) goto LAB_0017200e; uVar6 = 3; if (uVar4 == 0xffffffff) { iVar2 = JS_GetOwnPropertyInternal(param_1,local_68,piVar7,iVar1); if (iVar2 < 0) goto LAB_0017200e; if (iVar2 != 0) { auVar10 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); uVar6 = auVar10._8_8_; uVar5 = auVar10._0_8_; if (auVar10._8_4_ != 6) { if ((local_68[0] & 0x10) == 0) { if (0xfffffff6 < (uint)local_58) { *local_60 = *local_60 + 1; } iVar2 = JS_DefinePropertyValue(param_1,uVar5,uVar6,0x41,local_60,local_58,0x4007); if (-1 < iVar2) { local_40 = (int *)(ulong)(local_68[0] >> 1 & 1); local_38 = 1; uVar3 = 0x3f; LAB_00171f64: iVar2 = JS_DefinePropertyValue(param_1,uVar5,uVar6,uVar3,local_40,local_38,0x4007); if (((-1 < iVar2) && (iVar2 = JS_DefinePropertyValue (param_1,uVar5,uVar6,0x40,local_68[0] >> 2 & 1,1,0x4007), -1 < iVar2)) && (iVar2 = JS_DefinePropertyValue(param_1,uVar5,uVar6,0x3e,local_68[0] & 1,1,0x4007), -1 < iVar2)) { uVar8 = uVar5 & 0xffffffff00000000; js_free_desc(param_1,local_68); uVar5 = uVar5 & 0xffffffff; goto LAB_00171ed1; } } } else { if (0xfffffff6 < (uint)local_48) { *local_50 = *local_50 + 1; } iVar2 = JS_DefinePropertyValue(param_1,uVar5,uVar6,0x42,local_50,local_48,0x4007); if (-1 < iVar2) { if (0xfffffff6 < (uint)local_38) { *local_40 = *local_40 + 1; } uVar3 = 0x43; goto LAB_00171f64; } } } js_object_getOwnPropertyDescriptor_cold_1(param_1,local_68,uVar6,uVar5); LAB_0017200e: JS_FreeAtom(param_1,iVar1); if (0xfffffff6 < uVar4) { uVar6 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar7; *piVar7 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar6,piVar7,auVar9._8_8_); } } return ZEXT816(6) << 0x40; } } uVar5 = 0; uVar8 = 0; LAB_00171ed1: JS_FreeAtom(param_1,iVar1); if (0xfffffff6 < uVar4) { uVar3 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar7; *piVar7 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar3,piVar7,auVar9._8_8_); } } auVar10._8_8_ = uVar6; auVar10._0_8_ = uVar8 | uVar5; return auVar10; }
21,929
js_worker_set_onmessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_set_onmessage(JSContext *ctx, JSValue this_val, JSValue func) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessageHandler *port; if (!worker) return JS_EXCEPTION; port = worker->msg_handler; if (JS_IsNull(func)) { if (port) { js_free_port(rt, port); worker->msg_handler = NULL; } } else { if (!JS_IsFunction(ctx, func)) return JS_ThrowTypeError(ctx, "not a function"); if (!port) { port = js_mallocz(ctx, sizeof(*port)); if (!port) return JS_EXCEPTION; port->recv_pipe = js_dup_message_pipe(worker->recv_pipe); port->on_message_func = JS_NULL; list_add_tail(&port->link, &ts->port_list); worker->msg_handler = port; } JS_FreeValue(ctx, port->on_message_func); port->on_message_func = JS_DupValue(ctx, func); } return JS_UNDEFINED; }
O0
c
js_worker_set_onmessage: subq $0x88, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x58(%rsp) movq %r8, 0x60(%rsp) movq %rdi, 0x50(%rsp) movq 0x50(%rsp), %rdi callq 0x2e1f0 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi callq 0x178c0 movq %rax, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movl 0x7c(%rax), %ecx movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x3e6a0 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x1d840 movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x1d9d9 movq 0x38(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x30(%rsp) movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x1cb10 cmpl $0x0, %eax je 0x1d88b cmpq $0x0, 0x30(%rsp) je 0x1d886 movq 0x48(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x1d2e0 movq 0x38(%rsp), %rax movq $0x0, 0x10(%rax) jmp 0x1d9c5 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x34800 cmpl $0x0, %eax jne 0x1d8c9 movq 0x50(%rsp), %rdi leaq 0xf7c6a(%rip), %rsi # 0x11551a movb $0x0, %al callq 0x335f0 movq %rax, 0x78(%rsp) movq %rdx, 0x80(%rsp) jmp 0x1d9d9 cmpq $0x0, 0x30(%rsp) jne 0x1d96c movq 0x50(%rsp), %rdi movl $0x28, %esi callq 0x28020 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x1d90a movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x1d9d9 movq 0x38(%rsp), %rax movq (%rax), %rdi callq 0x1da90 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x30(%rsp), %rax movl $0x0, 0x20(%rsp) movq $0x2, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x18(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x30(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x30, %rsi callq 0x1da10 movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rax movq 0x18(%rax), %rsi movq 0x20(%rax), %rdx callq 0x29f80 movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x27980 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, 0x18(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x20(%rax) movl $0x0, 0x78(%rsp) movq $0x3, 0x80(%rsp) movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0x88, %rsp retq nop
js_worker_set_onmessage: sub rsp, 88h mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_30], rcx mov [rsp+88h+var_28], r8 mov [rsp+88h+var_38], rdi mov rdi, [rsp+88h+var_38] call JS_GetRuntime mov [rsp+88h+var_40], rax mov rdi, [rsp+88h+var_40] call js_get_thread_state mov [rsp+88h+var_48], rax mov rdi, [rsp+88h+var_38] mov rax, [rsp+88h+var_48] mov ecx, [rax+7Ch] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_GetOpaque2 mov [rsp+88h+var_50], rax cmp [rsp+88h+var_50], 0 jnz short loc_1D840 mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 6 jmp loc_1D9D9 loc_1D840: mov rax, [rsp+88h+var_50] mov rax, [rax+10h] mov [rsp+88h+var_58], rax mov rdi, [rsp+88h+var_30] mov rsi, [rsp+88h+var_28] call JS_IsNull_0 cmp eax, 0 jz short loc_1D88B cmp [rsp+88h+var_58], 0 jz short loc_1D886 mov rdi, [rsp+88h+var_40] mov rsi, [rsp+88h+var_58] call js_free_port mov rax, [rsp+88h+var_50] mov qword ptr [rax+10h], 0 loc_1D886: jmp loc_1D9C5 loc_1D88B: mov rdi, [rsp+88h+var_38] mov rsi, [rsp+88h+var_30] mov rdx, [rsp+88h+var_28] call JS_IsFunction cmp eax, 0 jnz short loc_1D8C9 mov rdi, [rsp+88h+var_38] lea rsi, aSetAddIsNotAFu+0Bh; "not a function" mov al, 0 call JS_ThrowTypeError mov [rsp+88h+var_10], rax mov [rsp+88h+var_8], rdx jmp loc_1D9D9 loc_1D8C9: cmp [rsp+88h+var_58], 0 jnz loc_1D96C mov rdi, [rsp+88h+var_38] mov esi, 28h ; '(' call js_mallocz mov [rsp+88h+var_58], rax cmp [rsp+88h+var_58], 0 jnz short loc_1D90A mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 6 jmp loc_1D9D9 loc_1D90A: mov rax, [rsp+88h+var_50] mov rdi, [rax] call js_dup_message_pipe mov rcx, rax mov rax, [rsp+88h+var_58] mov [rax+10h], rcx mov rax, [rsp+88h+var_58] mov dword ptr [rsp+88h+var_68], 0 mov [rsp+88h+var_60], 2 mov rcx, [rsp+88h+var_68] mov [rax+18h], rcx mov rcx, [rsp+88h+var_60] mov [rax+20h], rcx mov rdi, [rsp+88h+var_58] mov rsi, [rsp+88h+var_48] add rsi, 30h ; '0' call list_add_tail_0 mov rcx, [rsp+88h+var_58] mov rax, [rsp+88h+var_50] mov [rax+10h], rcx loc_1D96C: mov rdi, [rsp+88h+var_38] mov rax, [rsp+88h+var_58] mov rsi, [rax+18h] mov rdx, [rax+20h] call JS_FreeValue mov rax, [rsp+88h+var_58] mov [rsp+88h+var_80], rax mov rdi, [rsp+88h+var_38] mov rsi, [rsp+88h+var_30] mov rdx, [rsp+88h+var_28] call JS_DupValue mov rcx, rax mov rax, [rsp+88h+var_80] mov [rsp+88h+var_78], rcx mov [rsp+88h+var_70], rdx mov rcx, [rsp+88h+var_78] mov [rax+18h], rcx mov rcx, [rsp+88h+var_70] mov [rax+20h], rcx loc_1D9C5: mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 3 loc_1D9D9: mov rax, [rsp+88h+var_10] mov rdx, [rsp+88h+var_8] add rsp, 88h retn
long long js_worker_set_onmessage(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 int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long v13; // rdx long long v15; // [rsp+20h] [rbp-68h] long long *v16; // [rsp+30h] [rbp-58h] _QWORD *Opaque2; // [rsp+38h] [rbp-50h] long long thread_state; // [rsp+40h] [rbp-48h] long long Runtime; // [rsp+48h] [rbp-40h] long long v23; // [rsp+78h] [rbp-10h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8); Opaque2 = (_QWORD *)JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 124)); if ( Opaque2 ) { v16 = (long long *)Opaque2[2]; if ( JS_IsNull_0(a4, a5) ) { if ( v16 ) { js_free_port(Runtime, v16); Opaque2[2] = 0LL; } } else { if ( !(unsigned int)JS_IsFunction(a1, a4, a5) ) return JS_ThrowTypeError(a1, (unsigned int)"not a function", v9, v10, v11, v12); if ( !v16 ) { v16 = (long long *)js_mallocz(a1, 40LL); if ( !v16 ) { LODWORD(v23) = 0; return v23; } v16[2] = js_dup_message_pipe(*Opaque2); LODWORD(v15) = 0; v16[3] = v15; v16[4] = 2LL; list_add_tail_0(v16, thread_state + 48); Opaque2[2] = v16; } JS_FreeValue(a1, v16[3], v16[4]); v16[3] = JS_DupValue(a1, a4, a5); v16[4] = v13; } LODWORD(v23) = 0; return v23; } LODWORD(v23) = 0; return v23; }
js_worker_set_onmessage: SUB RSP,0x88 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x60],R8 MOV qword ptr [RSP + 0x50],RDI MOV RDI,qword ptr [RSP + 0x50] CALL 0x0012e1f0 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x001178c0 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RAX + 0x7c] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x0013e6a0 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x0011d840 MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0011d9d9 LAB_0011d840: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x0011cb10 CMP EAX,0x0 JZ 0x0011d88b CMP qword ptr [RSP + 0x30],0x0 JZ 0x0011d886 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x30] CALL 0x0011d2e0 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x10],0x0 LAB_0011d886: JMP 0x0011d9c5 LAB_0011d88b: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] CALL 0x00134800 CMP EAX,0x0 JNZ 0x0011d8c9 MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x21551a] MOV AL,0x0 CALL 0x001335f0 MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],RDX JMP 0x0011d9d9 LAB_0011d8c9: CMP qword ptr [RSP + 0x30],0x0 JNZ 0x0011d96c MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x28 CALL 0x00128020 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x0011d90a MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0011d9d9 LAB_0011d90a: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RAX] CALL 0x0011da90 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x2 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x20],RCX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x30 CALL 0x0011da10 MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x10],RCX LAB_0011d96c: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RAX + 0x20] CALL 0x00129f80 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] CALL 0x00127980 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],RDX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x20],RCX LAB_0011d9c5: MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x3 LAB_0011d9d9: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
int1 [16] js_worker_set_onmessage (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]; uint uStack_64; long local_58; int4 local_10; int4 uStack_c; int8 local_8; uVar2 = JS_GetRuntime(param_1); lVar3 = js_get_thread_state(uVar2); puVar4 = (int8 *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar3 + 0x7c)); if (puVar4 == (int8 *)0x0) { local_10 = 0; local_8 = 6; } else { local_58 = puVar4[2]; iVar1 = JS_IsNull(param_4,param_5); if (iVar1 == 0) { iVar1 = JS_IsFunction(param_1,param_4,param_5); if (iVar1 == 0) { auVar5 = JS_ThrowTypeError(param_1,"not a function"); local_8 = auVar5._8_8_; local_10 = auVar5._0_4_; uStack_c = auVar5._4_4_; goto LAB_0011d9d9; } if (local_58 == 0) { local_58 = js_mallocz(param_1,0x28); if (local_58 == 0) { local_10 = 0; local_8 = 6; goto LAB_0011d9d9; } uVar2 = js_dup_message_pipe(*puVar4); *(int8 *)(local_58 + 0x10) = uVar2; *(ulong *)(local_58 + 0x18) = (ulong)uStack_64 << 0x20; *(int8 *)(local_58 + 0x20) = 2; list_add_tail(local_58,lVar3 + 0x30); puVar4[2] = local_58; } JS_FreeValue(param_1,*(int8 *)(local_58 + 0x18),*(int8 *)(local_58 + 0x20)); auVar5 = JS_DupValue(param_1,param_4,param_5); *(int1 (*) [16])(local_58 + 0x18) = auVar5; } else if (local_58 != 0) { js_free_port(uVar2,local_58); puVar4[2] = 0; } local_10 = 0; local_8 = 3; } LAB_0011d9d9: auVar5._4_4_ = uStack_c; auVar5._0_4_ = local_10; auVar5._8_8_ = local_8; return auVar5; }
21,930
js_worker_set_onmessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_set_onmessage(JSContext *ctx, JSValue this_val, JSValue func) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessageHandler *port; if (!worker) return JS_EXCEPTION; port = worker->msg_handler; if (JS_IsNull(func)) { if (port) { js_free_port(rt, port); worker->msg_handler = NULL; } } else { if (!JS_IsFunction(ctx, func)) return JS_ThrowTypeError(ctx, "not a function"); if (!port) { port = js_mallocz(ctx, sizeof(*port)); if (!port) return JS_EXCEPTION; port->recv_pipe = js_dup_message_pipe(worker->recv_pipe); port->on_message_func = JS_NULL; list_add_tail(&port->link, &ts->port_list); worker->msg_handler = port; } JS_FreeValue(ctx, port->on_message_func); port->on_message_func = JS_DupValue(ctx, func); } return JS_UNDEFINED; }
O2
c
js_worker_set_onmessage: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r12 movq %rcx, 0x10(%rsp) movq %rdx, %rbx movq %rsi, %r13 movq %rdi, %r15 callq 0x1dd35 movq %rax, %r14 movq %rax, %rdi callq 0x13e3a movq %rax, 0x8(%rsp) movl 0x7c(%rax), %ecx movq %r15, %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x24db7 pushq $0x6 popq %rbx testq %rax, %rax je 0x16e34 movq %rax, %rbp movq 0x10(%rax), %r13 cmpl $0x2, %r12d jne 0x16d99 pushq $0x3 popq %rbx testq %r13, %r13 je 0x16e34 movq %r14, %rdi movq %r13, %rsi callq 0x16a8f andq $0x0, 0x10(%rbp) jmp 0x16e34 movq %r12, %rdx movq %r15, %rdi movq 0x10(%rsp), %r12 movq %r12, %rsi movq %rdx, %r14 callq 0x20a2d testl %eax, %eax je 0x16e4d testq %r13, %r13 jne 0x16e0b pushq $0x28 popq %rsi movq %r15, %rdi callq 0x1adf1 testq %rax, %rax je 0x16e34 movq %rax, %r13 movq (%rbp), %rax lock incl (%rax) movq %rax, 0x10(%r13) andl $0x0, 0x18(%r13) movq $0x2, 0x20(%r13) movq 0x8(%rsp), %rdx movq %rdx, %rax addq $0x30, %rax movq 0x30(%rdx), %rcx movq %r13, 0x8(%rcx) movq %rcx, (%r13) movq %rax, 0x8(%r13) movq %r13, 0x30(%rdx) movq %r13, 0x10(%rbp) movq 0x18(%r13), %rsi movq 0x20(%r13), %rdx movq %r15, %rdi callq 0x1bbce movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x1abab movq %rax, 0x18(%r13) movq %rdx, 0x20(%r13) pushq $0x3 popq %rbx xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x73614(%rip), %rsi # 0x8a468 movq %r15, %rdi xorl %eax, %eax callq 0x201fd movq %rdx, %rbx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0x16e38
js_worker_set_onmessage: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, r8 mov [rsp+48h+var_38], rcx mov rbx, rdx mov r13, rsi mov r15, rdi call JS_GetRuntime mov r14, rax mov rdi, rax call js_get_thread_state mov [rsp+48h+var_40], rax mov ecx, [rax+7Ch] mov rdi, r15 mov rsi, r13 mov rdx, rbx call JS_GetOpaque2 push 6 pop rbx test rax, rax jz loc_16E34 mov rbp, rax mov r13, [rax+10h] cmp r12d, 2 jnz short loc_16D99 push 3 pop rbx test r13, r13 jz loc_16E34 mov rdi, r14 mov rsi, r13 call js_free_port and qword ptr [rbp+10h], 0 jmp loc_16E34 loc_16D99: mov rdx, r12 mov rdi, r15 mov r12, [rsp+48h+var_38] mov rsi, r12 mov r14, rdx call JS_IsFunction test eax, eax jz loc_16E4D test r13, r13 jnz short loc_16E0B push 28h ; '(' pop rsi mov rdi, r15 call js_mallocz test rax, rax jz short loc_16E34 mov r13, rax mov rax, [rbp+0] lock inc dword ptr [rax] mov [r13+10h], rax and dword ptr [r13+18h], 0 mov qword ptr [r13+20h], 2 mov rdx, [rsp+48h+var_40] mov rax, rdx add rax, 30h ; '0' mov rcx, [rdx+30h] mov [rcx+8], r13 mov [r13+0], rcx mov [r13+8], rax mov [rdx+30h], r13 mov [rbp+10h], r13 loc_16E0B: mov rsi, [r13+18h] mov rdx, [r13+20h] mov rdi, r15 call JS_FreeValue mov rdi, r15 mov rsi, r12 mov rdx, r14 call JS_DupValue mov [r13+18h], rax mov [r13+20h], rdx push 3 pop rbx loc_16E34: xor eax, eax xor ecx, ecx loc_16E38: or rax, rcx mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_16E4D: lea rsi, aSetAddIsNotAFu+0Bh; "not a function" mov rdi, r15 xor eax, eax call JS_ThrowTypeError mov rbx, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp short loc_16E38
unsigned long long js_worker_set_onmessage(long long a1, long long a2, long long a3, long long a4, long long a5) { long long Runtime; // r14 int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long Opaque2; // rax long long v13; // rbp long long v14; // r13 int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d long long v19; // rax volatile signed __int32 *v20; // roff long long v21; // rcx long long v22; // rdx long long v23; // rax unsigned long long v24; // rcx char v26; // [rsp+0h] [rbp-48h] long long thread_state; // [rsp+8h] [rbp-40h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v8, v9, v10, v11, v26); Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 124)); if ( !Opaque2 ) goto LABEL_10; v13 = Opaque2; v14 = *(_QWORD *)(Opaque2 + 16); if ( (_DWORD)a5 == 2 ) { if ( v14 ) { js_free_port(Runtime, *(long long **)(Opaque2 + 16)); *(_QWORD *)(v13 + 16) = 0LL; } goto LABEL_10; } if ( !(unsigned int)JS_IsFunction(a1, a4, a5) ) { v23 = JS_ThrowTypeError(a1, (unsigned int)"not a function", v15, v16, v17, v18); v24 = v23 & 0xFFFFFFFF00000000LL; v23 = (unsigned int)v23; return v24 | v23; } if ( v14 ) goto LABEL_9; v19 = js_mallocz(a1, 40LL); if ( v19 ) { v14 = v19; v20 = *(volatile signed __int32 **)v13; _InterlockedIncrement(*(volatile signed __int32 **)v13); *(_QWORD *)(v19 + 16) = v20; *(_DWORD *)(v19 + 24) = 0; *(_QWORD *)(v19 + 32) = 2LL; v21 = *(_QWORD *)(thread_state + 48); *(_QWORD *)(v21 + 8) = v19; *(_QWORD *)v19 = v21; *(_QWORD *)(v19 + 8) = thread_state + 48; *(_QWORD *)(thread_state + 48) = v19; *(_QWORD *)(v13 + 16) = v19; LABEL_9: JS_FreeValue(a1, *(_QWORD *)(v14 + 24)); *(_QWORD *)(v14 + 24) = JS_DupValue(a1, a4, a5); *(_QWORD *)(v14 + 32) = v22; } LABEL_10: v23 = 0LL; v24 = 0LL; return v24 | v23; }
js_worker_set_onmessage: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,R8 MOV qword ptr [RSP + 0x10],RCX MOV RBX,RDX MOV R13,RSI MOV R15,RDI CALL 0x0011dd35 MOV R14,RAX MOV RDI,RAX CALL 0x00113e3a MOV qword ptr [RSP + 0x8],RAX MOV ECX,dword ptr [RAX + 0x7c] MOV RDI,R15 MOV RSI,R13 MOV RDX,RBX CALL 0x00124db7 PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x00116e34 MOV RBP,RAX MOV R13,qword ptr [RAX + 0x10] CMP R12D,0x2 JNZ 0x00116d99 PUSH 0x3 POP RBX TEST R13,R13 JZ 0x00116e34 MOV RDI,R14 MOV RSI,R13 CALL 0x00116a8f AND qword ptr [RBP + 0x10],0x0 JMP 0x00116e34 LAB_00116d99: MOV RDX,R12 MOV RDI,R15 MOV R12,qword ptr [RSP + 0x10] MOV RSI,R12 MOV R14,RDX CALL 0x00120a2d TEST EAX,EAX JZ 0x00116e4d TEST R13,R13 JNZ 0x00116e0b PUSH 0x28 POP RSI MOV RDI,R15 CALL 0x0011adf1 TEST RAX,RAX JZ 0x00116e34 MOV R13,RAX MOV RAX,qword ptr [RBP] INC.LOCK dword ptr [RAX] MOV qword ptr [R13 + 0x10],RAX AND dword ptr [R13 + 0x18],0x0 MOV qword ptr [R13 + 0x20],0x2 MOV RDX,qword ptr [RSP + 0x8] MOV RAX,RDX ADD RAX,0x30 MOV RCX,qword ptr [RDX + 0x30] MOV qword ptr [RCX + 0x8],R13 MOV qword ptr [R13],RCX MOV qword ptr [R13 + 0x8],RAX MOV qword ptr [RDX + 0x30],R13 MOV qword ptr [RBP + 0x10],R13 LAB_00116e0b: MOV RSI,qword ptr [R13 + 0x18] MOV RDX,qword ptr [R13 + 0x20] MOV RDI,R15 CALL 0x0011bbce MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 CALL 0x0011abab MOV qword ptr [R13 + 0x18],RAX MOV qword ptr [R13 + 0x20],RDX PUSH 0x3 POP RBX LAB_00116e34: XOR EAX,EAX XOR ECX,ECX LAB_00116e38: OR RAX,RCX MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00116e4d: LEA RSI,[0x18a468] MOV RDI,R15 XOR EAX,EAX CALL 0x001201fd MOV RBX,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX JMP 0x00116e38
int1 [16] js_worker_set_onmessage (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int *piVar1; long lVar2; int iVar3; int8 uVar4; long lVar5; int8 *puVar6; long *plVar7; ulong uVar8; ulong uVar9; int8 uVar10; int1 auVar11 [16]; uVar4 = JS_GetRuntime(); lVar5 = js_get_thread_state(uVar4); puVar6 = (int8 *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar5 + 0x7c)); uVar10 = 6; if (puVar6 != (int8 *)0x0) { plVar7 = (long *)puVar6[2]; if ((int)param_5 == 2) { uVar10 = 3; if (plVar7 != (long *)0x0) { js_free_port(uVar4,plVar7); puVar6[2] = 0; } } else { iVar3 = JS_IsFunction(param_1,param_4); if (iVar3 == 0) { auVar11 = JS_ThrowTypeError(param_1,"not a function"); uVar10 = auVar11._8_8_; uVar9 = auVar11._0_8_ & 0xffffffff00000000; uVar8 = auVar11._0_8_ & 0xffffffff; goto LAB_00116e38; } if (plVar7 == (long *)0x0) { plVar7 = (long *)js_mallocz(param_1,0x28); if (plVar7 == (long *)0x0) goto LAB_00116e34; piVar1 = (int *)*puVar6; LOCK(); *piVar1 = *piVar1 + 1; UNLOCK(); plVar7[2] = (long)piVar1; *(int4 *)(plVar7 + 3) = 0; plVar7[4] = 2; lVar2 = *(long *)(lVar5 + 0x30); *(long **)(lVar2 + 8) = plVar7; *plVar7 = lVar2; plVar7[1] = lVar5 + 0x30; *(long **)(lVar5 + 0x30) = plVar7; puVar6[2] = plVar7; } JS_FreeValue(param_1,plVar7[3],plVar7[4]); auVar11 = JS_DupValue(param_1,param_4,param_5); *(int1 (*) [16])(plVar7 + 3) = auVar11; uVar10 = 3; } } LAB_00116e34: uVar8 = 0; uVar9 = 0; LAB_00116e38: auVar11._0_8_ = uVar8 | uVar9; auVar11._8_8_ = uVar10; return auVar11; }
21,931
CodepointToUTF8
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
const char *CodepointToUTF8(int codepoint, int *utf8Size) { static char utf8[6] = { 0 }; memset(utf8, 0, 6); // Clear static array int size = 0; // Byte size of codepoint if (codepoint <= 0x7f) { utf8[0] = (char)codepoint; size = 1; } else if (codepoint <= 0x7ff) { utf8[0] = (char)(((codepoint >> 6) & 0x1f) | 0xc0); utf8[1] = (char)((codepoint & 0x3f) | 0x80); size = 2; } else if (codepoint <= 0xffff) { utf8[0] = (char)(((codepoint >> 12) & 0x0f) | 0xe0); utf8[1] = (char)(((codepoint >> 6) & 0x3f) | 0x80); utf8[2] = (char)((codepoint & 0x3f) | 0x80); size = 3; } else if (codepoint <= 0x10ffff) { utf8[0] = (char)(((codepoint >> 18) & 0x07) | 0xf0); utf8[1] = (char)(((codepoint >> 12) & 0x3f) | 0x80); utf8[2] = (char)(((codepoint >> 6) & 0x3f) | 0x80); utf8[3] = (char)((codepoint & 0x3f) | 0x80); size = 4; } *utf8Size = size; return utf8; }
O0
c
CodepointToUTF8: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) leaq 0x13c62a(%rip), %rdi # 0x223e00 xorl %esi, %esi movl $0x6, %edx callq 0xa2d0 movl $0x0, -0x14(%rbp) cmpl $0x7f, -0x4(%rbp) jg 0xe7804 movl -0x4(%rbp), %eax movb %al, 0x13c608(%rip) # 0x223e00 movl $0x1, -0x14(%rbp) jmp 0xe78ec cmpl $0x7ff, -0x4(%rbp) # imm = 0x7FF jg 0xe783e movl -0x4(%rbp), %eax sarl $0x6, %eax andl $0x1f, %eax orl $0xc0, %eax movb %al, 0x13c5df(%rip) # 0x223e00 movl -0x4(%rbp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, 0x13c5cf(%rip) # 0x223e01 movl $0x2, -0x14(%rbp) jmp 0xe78ea cmpl $0xffff, -0x4(%rbp) # imm = 0xFFFF jg 0xe7889 movl -0x4(%rbp), %eax sarl $0xc, %eax andl $0xf, %eax orl $0xe0, %eax movb %al, 0x13c5a5(%rip) # 0x223e00 movl -0x4(%rbp), %eax sarl $0x6, %eax andl $0x3f, %eax orl $0x80, %eax movb %al, 0x13c592(%rip) # 0x223e01 movl -0x4(%rbp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, 0x13c582(%rip) # 0x223e02 movl $0x3, -0x14(%rbp) jmp 0xe78e8 cmpl $0x10ffff, -0x4(%rbp) # imm = 0x10FFFF jg 0xe78e6 movl -0x4(%rbp), %eax sarl $0x12, %eax andl $0x7, %eax orl $0xf0, %eax movb %al, 0x13c55a(%rip) # 0x223e00 movl -0x4(%rbp), %eax sarl $0xc, %eax andl $0x3f, %eax orl $0x80, %eax movb %al, 0x13c547(%rip) # 0x223e01 movl -0x4(%rbp), %eax sarl $0x6, %eax andl $0x3f, %eax orl $0x80, %eax movb %al, 0x13c534(%rip) # 0x223e02 movl -0x4(%rbp), %eax andl $0x3f, %eax orl $0x80, %eax movb %al, 0x13c524(%rip) # 0x223e03 movl $0x4, -0x14(%rbp) jmp 0xe78e8 jmp 0xe78ea jmp 0xe78ec movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) leaq 0x13c504(%rip), %rax # 0x223e00 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
CodepointToUTF8: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi lea rdi, CodepointToUTF8_utf8 xor esi, esi mov edx, 6 call _memset mov [rbp+var_14], 0 cmp [rbp+var_4], 7Fh jg short loc_E7804 mov eax, [rbp+var_4] mov cs:CodepointToUTF8_utf8, al mov [rbp+var_14], 1 jmp loc_E78EC loc_E7804: cmp [rbp+var_4], 7FFh jg short loc_E783E mov eax, [rbp+var_4] sar eax, 6 and eax, 1Fh or eax, 0C0h mov cs:CodepointToUTF8_utf8, al mov eax, [rbp+var_4] and eax, 3Fh or eax, 80h mov cs:byte_223E01, al mov [rbp+var_14], 2 jmp loc_E78EA loc_E783E: cmp [rbp+var_4], 0FFFFh jg short loc_E7889 mov eax, [rbp+var_4] sar eax, 0Ch and eax, 0Fh or eax, 0E0h mov cs:CodepointToUTF8_utf8, al mov eax, [rbp+var_4] sar eax, 6 and eax, 3Fh or eax, 80h mov cs:byte_223E01, al mov eax, [rbp+var_4] and eax, 3Fh or eax, 80h mov cs:byte_223E02, al mov [rbp+var_14], 3 jmp short loc_E78E8 loc_E7889: cmp [rbp+var_4], 10FFFFh jg short loc_E78E6 mov eax, [rbp+var_4] sar eax, 12h and eax, 7 or eax, 0F0h mov cs:CodepointToUTF8_utf8, al mov eax, [rbp+var_4] sar eax, 0Ch and eax, 3Fh or eax, 80h mov cs:byte_223E01, al mov eax, [rbp+var_4] sar eax, 6 and eax, 3Fh or eax, 80h mov cs:byte_223E02, al mov eax, [rbp+var_4] and eax, 3Fh or eax, 80h mov cs:byte_223E03, al mov [rbp+var_14], 4 loc_E78E6: jmp short $+2 loc_E78E8: jmp short $+2 loc_E78EA: jmp short $+2 loc_E78EC: mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax], ecx lea rax, CodepointToUTF8_utf8 add rsp, 20h pop rbp retn
char * CodepointToUTF8(int a1, int *a2) { int v3; // [rsp+Ch] [rbp-14h] memset(&CodepointToUTF8_utf8, 0LL, 6LL); v3 = 0; if ( a1 > 127 ) { if ( a1 > 2047 ) { if ( a1 > 0xFFFF ) { if ( a1 <= 1114111 ) { CodepointToUTF8_utf8 = (a1 >> 18) & 7 | 0xF0; byte_223E01 = (a1 >> 12) & 0x3F | 0x80; byte_223E02 = (a1 >> 6) & 0x3F | 0x80; byte_223E03 = a1 & 0x3F | 0x80; v3 = 4; } } else { CodepointToUTF8_utf8 = (a1 >> 12) & 0xF | 0xE0; byte_223E01 = (a1 >> 6) & 0x3F | 0x80; byte_223E02 = a1 & 0x3F | 0x80; v3 = 3; } } else { CodepointToUTF8_utf8 = (a1 >> 6) & 0x1F | 0xC0; byte_223E01 = a1 & 0x3F | 0x80; v3 = 2; } } else { CodepointToUTF8_utf8 = a1; v3 = 1; } *a2 = v3; return &CodepointToUTF8_utf8; }
CodepointToUTF8: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI LEA RDI,[0x323e00] XOR ESI,ESI MOV EDX,0x6 CALL 0x0010a2d0 MOV dword ptr [RBP + -0x14],0x0 CMP dword ptr [RBP + -0x4],0x7f JG 0x001e7804 MOV EAX,dword ptr [RBP + -0x4] MOV byte ptr [0x00323e00],AL MOV dword ptr [RBP + -0x14],0x1 JMP 0x001e78ec LAB_001e7804: CMP dword ptr [RBP + -0x4],0x7ff JG 0x001e783e MOV EAX,dword ptr [RBP + -0x4] SAR EAX,0x6 AND EAX,0x1f OR EAX,0xc0 MOV byte ptr [0x00323e00],AL MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x3f OR EAX,0x80 MOV byte ptr [0x00323e01],AL MOV dword ptr [RBP + -0x14],0x2 JMP 0x001e78ea LAB_001e783e: CMP dword ptr [RBP + -0x4],0xffff JG 0x001e7889 MOV EAX,dword ptr [RBP + -0x4] SAR EAX,0xc AND EAX,0xf OR EAX,0xe0 MOV byte ptr [0x00323e00],AL MOV EAX,dword ptr [RBP + -0x4] SAR EAX,0x6 AND EAX,0x3f OR EAX,0x80 MOV byte ptr [0x00323e01],AL MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x3f OR EAX,0x80 MOV byte ptr [0x00323e02],AL MOV dword ptr [RBP + -0x14],0x3 JMP 0x001e78e8 LAB_001e7889: CMP dword ptr [RBP + -0x4],0x10ffff JG 0x001e78e6 MOV EAX,dword ptr [RBP + -0x4] SAR EAX,0x12 AND EAX,0x7 OR EAX,0xf0 MOV byte ptr [0x00323e00],AL MOV EAX,dword ptr [RBP + -0x4] SAR EAX,0xc AND EAX,0x3f OR EAX,0x80 MOV byte ptr [0x00323e01],AL MOV EAX,dword ptr [RBP + -0x4] SAR EAX,0x6 AND EAX,0x3f OR EAX,0x80 MOV byte ptr [0x00323e02],AL MOV EAX,dword ptr [RBP + -0x4] AND EAX,0x3f OR EAX,0x80 MOV byte ptr [0x00323e03],AL MOV dword ptr [RBP + -0x14],0x4 LAB_001e78e6: JMP 0x001e78e8 LAB_001e78e8: JMP 0x001e78ea LAB_001e78ea: JMP 0x001e78ec LAB_001e78ec: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LEA RAX,[0x323e00] ADD RSP,0x20 POP RBP RET
int6 * CodepointToUTF8(int param_1,int4 *param_2) { byte bVar1; byte bVar2; byte bVar3; int4 local_1c; memset(&CodepointToUTF8_utf8,0,6); local_1c = 0; bVar3 = (byte)param_1; if (param_1 < 0x80) { local_1c = 1; CodepointToUTF8_utf8._0_1_ = bVar3; } else { bVar1 = (byte)(param_1 >> 6); if (param_1 < 0x800) { CodepointToUTF8_utf8._0_1_ = bVar1 & 0x1f | 0xc0; CodepointToUTF8_utf8._1_1_ = bVar3 & 0x3f | 0x80; local_1c = 2; } else { bVar2 = (byte)(param_1 >> 0xc); if (param_1 < 0x10000) { CodepointToUTF8_utf8._0_1_ = bVar2 & 0xf | 0xe0; CodepointToUTF8_utf8._1_1_ = bVar1 & 0x3f | 0x80; CodepointToUTF8_utf8._2_1_ = bVar3 & 0x3f | 0x80; local_1c = 3; } else if (param_1 < 0x110000) { CodepointToUTF8_utf8._0_1_ = (byte)(param_1 >> 0x12) & 7 | 0xf0; CodepointToUTF8_utf8._1_1_ = bVar2 & 0x3f | 0x80; CodepointToUTF8_utf8._2_1_ = bVar1 & 0x3f | 0x80; CodepointToUTF8_utf8._3_1_ = bVar3 & 0x3f | 0x80; local_1c = 4; } } } *param_2 = local_1c; return &CodepointToUTF8_utf8; }
21,932
mi_seq_search
eloqsql/storage/myisam/mi_search.c
int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, my_bool *last_key) { int UNINIT_VAR(flag); uint nod_flag,UNINIT_VAR(length),not_used[2]; uchar t_buff[HA_MAX_KEY_BUFF],*end; DBUG_ENTER("_mi_seq_search"); end= page+mi_getint(page); nod_flag=mi_test_if_nod(page); page+=2+nod_flag; *ret_pos=page; t_buff[0]=0; /* Avoid bugs */ while (page < end) { length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff); if (length == 0 || page > end) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_PRINT("error", ("Found wrong key: length: %u page: %p end: %p", length, page, end)); DBUG_RETURN(MI_FOUND_WRONG_KEY); } if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag, not_used)) >= 0) break; #ifdef EXTRA_DEBUG DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff, flag)); #endif memcpy(buff,t_buff,length); *ret_pos=page; } if (flag == 0) memcpy(buff,t_buff,length); /* Result is first key */ *last_key= page == end; DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos)); DBUG_RETURN(flag); }
O3
c
mi_seq_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x508, %rsp # imm = 0x508 movl %r9d, -0x508(%rbp) movl %r8d, -0x504(%rbp) movq %rcx, -0x520(%rbp) movq %rsi, -0x510(%rbp) movq 0x10(%rbp), %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movzbl 0x1(%rdx), %ecx movzbl (%rdx), %r9d movl %r9d, %eax andl $0x7f, %eax shll $0x8, %eax orq %rcx, %rax xorl %esi, %esi testb %r9b, %r9b jns 0x858ac movq (%rdi), %rcx movl 0x17c(%rcx), %esi movq %rdi, -0x518(%rbp) leaq (%rdx,%rax), %rcx movq %rcx, -0x500(%rbp) leal 0x2(%rsi), %ecx addq %rcx, %rdx movq %rdx, -0x4f8(%rbp) movq %rdx, (%rbx) movb $0x0, -0x4f0(%rbp) cmpl %ecx, %eax jbe 0x859bb leaq -0x4f0(%rbp), %rcx movq -0x510(%rbp), %rdi movq %rsi, %r12 leaq -0x4f8(%rbp), %rdx movq %rcx, %r13 callq *0x48(%rdi) testl %eax, %eax je 0x85975 movl %eax, %r15d movq -0x500(%rbp), %rax cmpq %rax, -0x4f8(%rbp) ja 0x85975 movq -0x510(%rbp), %rax movq 0x28(%rax), %rdi movq %r13, %rsi movq -0x520(%rbp), %rdx movl -0x504(%rbp), %ecx movl -0x508(%rbp), %r8d leaq -0x528(%rbp), %r9 callq 0x9f74e movl %eax, %r14d testl %eax, %eax jns 0x859a3 movl %r15d, %edx movq 0x18(%rbp), %rdi movq %r13, %rsi callq 0x29080 movq -0x4f8(%rbp), %rax movq %rax, (%rbx) cmpq -0x500(%rbp), %rax movq %r12, %rsi movq %r13, %rcx jb 0x858e4 jmp 0x859bb movq -0x518(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x7be7a callq 0xa2a4e movl $0x7e, (%rax) movl $0x7fffffff, %r14d # imm = 0x7FFFFFFF jmp 0x859d0 jne 0x859bb movl %r15d, %edx leaq -0x4f0(%rbp), %rsi movq 0x18(%rbp), %rdi callq 0x29080 xorl %r14d, %r14d movq -0x500(%rbp), %rax cmpq %rax, -0x4f8(%rbp) movq 0x20(%rbp), %rax sete (%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x859f4 movl %r14d, %eax addq $0x508, %rsp # imm = 0x508 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
_mi_seq_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 508h mov [rbp+var_508], r9d mov [rbp+var_504], r8d mov [rbp+var_520], rcx mov [rbp+var_510], rsi mov rbx, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_30], rax movzx ecx, byte ptr [rdx+1] movzx r9d, byte ptr [rdx] mov eax, r9d and eax, 7Fh shl eax, 8 or rax, rcx xor esi, esi test r9b, r9b jns short loc_858AC mov rcx, [rdi] mov esi, [rcx+17Ch] loc_858AC: mov [rbp+var_518], rdi lea rcx, [rdx+rax] mov [rbp+var_500], rcx lea ecx, [rsi+2] add rdx, rcx mov [rbp+var_4F8], rdx mov [rbx], rdx mov [rbp+var_4F0], 0 cmp eax, ecx jbe loc_859BB lea rcx, [rbp+var_4F0] loc_858E4: mov rdi, [rbp+var_510] mov r12, rsi lea rdx, [rbp+var_4F8] mov r13, rcx call qword ptr [rdi+48h] test eax, eax jz short loc_85975 mov r15d, eax mov rax, [rbp+var_500] cmp [rbp+var_4F8], rax ja short loc_85975 mov rax, [rbp+var_510] mov rdi, [rax+28h] mov rsi, r13 mov rdx, [rbp+var_520] mov ecx, [rbp+var_504] mov r8d, [rbp+var_508] lea r9, [rbp+var_528] call ha_key_cmp mov r14d, eax test eax, eax jns short loc_859A3 mov edx, r15d mov rdi, [rbp+arg_8] mov rsi, r13 call _memcpy mov rax, [rbp+var_4F8] mov [rbx], rax cmp rax, [rbp+var_500] mov rsi, r12 mov rcx, r13 jb loc_858E4 jmp short loc_859BB loc_85975: mov rax, [rbp+var_518] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov r14d, 7FFFFFFFh jmp short loc_859D0 loc_859A3: jnz short loc_859BB mov edx, r15d lea rsi, [rbp+var_4F0] mov rdi, [rbp+arg_8] call _memcpy xor r14d, r14d loc_859BB: mov rax, [rbp+var_500] cmp [rbp+var_4F8], rax mov rax, [rbp+arg_10] setz byte ptr [rax] loc_859D0: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_859F4 mov eax, r14d add rsp, 508h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_859F4: call ___stack_chk_fail
long long mi_seq_search( long long a1, long long a2, char *a3, long long a4, unsigned int a5, unsigned int a6, char **a7, long long a8, bool *a9) { unsigned int v9; // r14d unsigned long long v10; // rax long long v11; // rsi long long v12; // rcx _BYTE *v13; // rcx _BYTE *v14; // r13 unsigned int v15; // eax unsigned int v16; // r15d int v17; // eax char *v18; // rax const char *v19; // rsi char v21[8]; // [rsp+8h] [rbp-528h] BYREF long long v22; // [rsp+10h] [rbp-520h] long long v23; // [rsp+18h] [rbp-518h] long long v24; // [rsp+20h] [rbp-510h] unsigned int v25; // [rsp+28h] [rbp-508h] unsigned int v26; // [rsp+2Ch] [rbp-504h] char *v27; // [rsp+30h] [rbp-500h] char *v28; // [rsp+38h] [rbp-4F8h] BYREF _BYTE v29[1216]; // [rsp+40h] [rbp-4F0h] BYREF unsigned long long v30; // [rsp+500h] [rbp-30h] v25 = a6; v26 = a5; v22 = a4; v24 = a2; v30 = __readfsqword(0x28u); v10 = (unsigned __int8)a3[1] | (unsigned long long)((unsigned __int8)(*a3 & 0x7F) << 8); v11 = 0LL; if ( *a3 < 0 ) v11 = *(unsigned int *)(*(_QWORD *)a1 + 380LL); v23 = a1; v27 = &a3[v10]; v12 = (unsigned int)(v11 + 2); v28 = &a3[v12]; *a7 = &a3[v12]; v29[0] = 0; if ( (unsigned int)v10 > (unsigned int)v12 ) { v13 = v29; while ( 1 ) { v14 = v13; v15 = (*(long long ( **)(long long, long long, char **))(v24 + 72))(v24, v11, &v28); if ( !v15 || (v16 = v15, v28 > v27) ) { v19 = *(const char **)(*(_QWORD *)v23 + 616LL); mi_report_error(126, (long long)v19); *(_DWORD *)my_thread_var(126LL, v19) = 126; return 0x7FFFFFFF; } v17 = ha_key_cmp(*(_QWORD *)(v24 + 40), v14, v22, v26, v25, v21); v9 = v17; if ( v17 >= 0 ) break; memcpy(a8, v14, v16); v18 = v28; *a7 = v28; v13 = v14; if ( v18 >= v27 ) goto LABEL_13; } if ( !v17 ) { memcpy(a8, v29, v16); v9 = 0; } } LABEL_13: *a9 = v28 == v27; return v9; }
_mi_seq_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x508 MOV dword ptr [RBP + -0x508],R9D MOV dword ptr [RBP + -0x504],R8D MOV qword ptr [RBP + -0x520],RCX MOV qword ptr [RBP + -0x510],RSI MOV RBX,qword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOVZX ECX,byte ptr [RDX + 0x1] MOVZX R9D,byte ptr [RDX] MOV EAX,R9D AND EAX,0x7f SHL EAX,0x8 OR RAX,RCX XOR ESI,ESI TEST R9B,R9B JNS 0x001858ac MOV RCX,qword ptr [RDI] MOV ESI,dword ptr [RCX + 0x17c] LAB_001858ac: MOV qword ptr [RBP + -0x518],RDI LEA RCX,[RDX + RAX*0x1] MOV qword ptr [RBP + -0x500],RCX LEA ECX,[RSI + 0x2] ADD RDX,RCX MOV qword ptr [RBP + -0x4f8],RDX MOV qword ptr [RBX],RDX MOV byte ptr [RBP + -0x4f0],0x0 CMP EAX,ECX JBE 0x001859bb LEA RCX,[RBP + -0x4f0] LAB_001858e4: MOV RDI,qword ptr [RBP + -0x510] MOV R12,RSI LEA RDX,[RBP + -0x4f8] MOV R13,RCX CALL qword ptr [RDI + 0x48] TEST EAX,EAX JZ 0x00185975 MOV R15D,EAX MOV RAX,qword ptr [RBP + -0x500] CMP qword ptr [RBP + -0x4f8],RAX JA 0x00185975 MOV RAX,qword ptr [RBP + -0x510] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,R13 MOV RDX,qword ptr [RBP + -0x520] MOV ECX,dword ptr [RBP + -0x504] MOV R8D,dword ptr [RBP + -0x508] LEA R9,[RBP + -0x528] CALL 0x0019f74e MOV R14D,EAX TEST EAX,EAX JNS 0x001859a3 MOV EDX,R15D MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R13 CALL 0x00129080 MOV RAX,qword ptr [RBP + -0x4f8] MOV qword ptr [RBX],RAX CMP RAX,qword ptr [RBP + -0x500] MOV RSI,R12 MOV RCX,R13 JC 0x001858e4 JMP 0x001859bb LAB_00185975: MOV RAX,qword ptr [RBP + -0x518] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x0017be7a CALL 0x001a2a4e MOV dword ptr [RAX],0x7e MOV R14D,0x7fffffff JMP 0x001859d0 LAB_001859a3: JNZ 0x001859bb MOV EDX,R15D LEA RSI,[RBP + -0x4f0] MOV RDI,qword ptr [RBP + 0x18] CALL 0x00129080 XOR R14D,R14D LAB_001859bb: MOV RAX,qword ptr [RBP + -0x500] CMP qword ptr [RBP + -0x4f8],RAX MOV RAX,qword ptr [RBP + 0x20] SETZ byte ptr [RAX] LAB_001859d0: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001859f4 MOV EAX,R14D ADD RSP,0x508 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001859f4: CALL 0x00129270
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5, int4 param_6,int8 *param_7,void *param_8,int8 param_9) { uint uVar1; ulong uVar2; int4 *puVar3; int iVar4; int unaff_R14D; long in_FS_OFFSET; int1 local_530 [8]; int8 local_528; long *local_520; long local_518; int4 local_510; int4 local_50c; byte *local_508; byte *local_500; int1 local_4f8 [1216]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = (ulong)((*param_3 & 0x7f) << 8) | (ulong)param_3[1]; iVar4 = 0; if ((char)*param_3 < '\0') { iVar4 = *(int *)(*param_1 + 0x17c); } local_508 = param_3 + uVar2; local_500 = param_3 + (iVar4 + 2U); *param_7 = local_500; local_4f8[0] = 0; local_528 = param_4; local_520 = param_1; local_518 = param_2; local_510 = param_6; local_50c = param_5; if (iVar4 + 2U < (uint)uVar2) { do { uVar1 = (**(code **)(local_518 + 0x48))(local_518,iVar4,&local_500); if ((uVar1 == 0) || (local_508 < local_500)) { mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268)); puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x7e; unaff_R14D = 0x7fffffff; goto LAB_001859d0; } unaff_R14D = ha_key_cmp(*(int8 *)(local_518 + 0x28),local_4f8,local_528,local_50c, local_510,local_530); if (-1 < unaff_R14D) { if (unaff_R14D == 0) { memcpy(param_8,local_4f8,(ulong)uVar1); unaff_R14D = 0; } break; } memcpy(param_8,local_4f8,(ulong)uVar1); *param_7 = local_500; } while (local_500 < local_508); } *(bool *)param_9 = local_500 == local_508; LAB_001859d0: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return unaff_R14D; }
21,933
nlohmann::json_abi_v3_12_0::detail::dtoa_impl::format_buffer(char*, int, int, int, int)
shubhamoy[P]dir2txt/include/nlohmann/json.hpp
inline char* format_buffer(char* buf, int len, int decimal_exponent, int min_exp, int max_exp) { JSON_ASSERT(min_exp < 0); JSON_ASSERT(max_exp > 0); const int k = len; const int n = len + decimal_exponent; // v = buf * 10^(n-k) // k is the length of the buffer (number of decimal digits) // n is the position of the decimal point relative to the start of the buffer. if (k <= n && n <= max_exp) { // digits[000] // len <= max_exp + 2 std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k)); // Make it look like a floating-point number (#362, #378) buf[n + 0] = '.'; buf[n + 1] = '0'; return buf + (static_cast<size_t>(n) + 2); } if (0 < n && n <= max_exp) { // dig.its // len <= max_digits10 + 1 JSON_ASSERT(k > n); std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n)); buf[n] = '.'; return buf + (static_cast<size_t>(k) + 1U); } if (min_exp < n && n <= 0) { // 0.[000]digits // len <= 2 + (-min_exp - 1) + max_digits10 std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k)); buf[0] = '0'; buf[1] = '.'; std::memset(buf + 2, '0', static_cast<size_t>(-n)); return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k)); } if (k == 1) { // dE+123 // len <= 1 + 5 buf += 1; } else { // d.igitsE+123 // len <= max_digits10 + 1 + 5 std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1); buf[1] = '.'; buf += 1 + static_cast<size_t>(k); } *buf++ = 'e'; return append_exponent(buf, n - 1); }
O2
cpp
nlohmann::json_abi_v3_12_0::detail::dtoa_impl::format_buffer(char*, int, int, int, int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testl %ecx, %ecx jns 0x2be4d testl %r8d, %r8d jle 0x2be6c movq %rdi, %rbx leal (%rdx,%rsi), %r14d testl %edx, %edx sets %al cmpl %r8d, %r14d setg %dil orb %al, %dil je 0x2bd9c cmpl %r8d, %r14d setg %al testl %r14d, %r14d setle %dil orb %al, %dil je 0x2bdc5 testl %r14d, %r14d setg %al cmpl %ecx, %r14d setle %cl orb %al, %cl jne 0x2be09 negl %r14d leaq (%rbx,%r14), %r15 addq $0x2, %r15 movslq %esi, %r12 movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x8580 movw $0x2e30, (%rbx) # imm = 0x2E30 addq $0x2, %rbx pushq $0x30 popq %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x8240 addq %r12, %r15 jmp 0x2bdfa movslq %esi, %rax leaq (%rbx,%rax), %rdi movslq %r14d, %r14 movq %r14, %rdx subq %rax, %rdx pushq $0x30 popq %rsi callq 0x8240 leaq (%rbx,%r14), %r15 addq $0x2, %r15 movw $0x302e, -0x2(%r15) # imm = 0x302E jmp 0x2bdfa testl %edx, %edx jns 0x2be8b movl %r14d, %ecx leaq (%rbx,%rcx), %rax leaq (%rbx,%rcx), %r14 incq %r14 movl %esi, %r15d movq %r15, %rdx subq %rcx, %rdx movq %r14, %rdi movq %rax, %rsi callq 0x8580 movb $0x2e, -0x1(%r14) addq %rbx, %r15 incq %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq cmpl $0x1, %esi je 0x2be2c leaq 0x2(%rbx), %rdi leaq 0x1(%rbx), %rax movslq %esi, %r15 leaq -0x1(%r15), %rdx movq %rax, %rsi callq 0x8580 movb $0x2e, 0x1(%rbx) addq %r15, %rbx movb $0x65, 0x1(%rbx) addq $0x2, %rbx decl %r14d movq %rbx, %rdi movl %r14d, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x2c7ce leaq 0x80fb(%rip), %rdi # 0x33f4f leaq 0x539c(%rip), %rsi # 0x311f7 leaq 0x80f9(%rip), %rcx # 0x33f5b movl $0x48aa, %edx # imm = 0x48AA callq 0x82b0 leaq 0x8135(%rip), %rdi # 0x33fa8 leaq 0x537d(%rip), %rsi # 0x311f7 leaq 0x80da(%rip), %rcx # 0x33f5b movl $0x48ab, %edx # imm = 0x48AB callq 0x82b0 leaq 0x8122(%rip), %rdi # 0x33fb4 leaq 0x535e(%rip), %rsi # 0x311f7 leaq 0x80bb(%rip), %rcx # 0x33f5b movl $0x48c5, %edx # imm = 0x48C5 callq 0x82b0
_ZN8nlohmann16json_abi_v3_12_06detail9dtoa_impl13format_bufferEPciiii: push r15 push r14 push r12 push rbx push rax test ecx, ecx jns loc_2BE4D test r8d, r8d jle loc_2BE6C mov rbx, rdi lea r14d, [rdx+rsi] test edx, edx sets al cmp r14d, r8d setnle dil or dil, al jz short loc_2BD9C cmp r14d, r8d setnle al test r14d, r14d setle dil or dil, al jz short loc_2BDC5 test r14d, r14d setnle al cmp r14d, ecx setle cl or cl, al jnz loc_2BE09 neg r14d lea r15, [rbx+r14] add r15, 2 movsxd r12, esi mov rdi, r15 mov rsi, rbx mov rdx, r12 call _memmove mov word ptr [rbx], 2E30h add rbx, 2 push 30h ; '0' pop rsi mov rdi, rbx mov rdx, r14 call _memset add r15, r12 jmp short loc_2BDFA loc_2BD9C: movsxd rax, esi lea rdi, [rbx+rax] movsxd r14, r14d mov rdx, r14 sub rdx, rax push 30h ; '0' pop rsi call _memset lea r15, [rbx+r14] add r15, 2 mov word ptr [r15-2], 302Eh jmp short loc_2BDFA loc_2BDC5: test edx, edx jns loc_2BE8B mov ecx, r14d lea rax, [rbx+rcx] lea r14, [rbx+rcx] inc r14 mov r15d, esi mov rdx, r15 sub rdx, rcx mov rdi, r14 mov rsi, rax call _memmove mov byte ptr [r14-1], 2Eh ; '.' add r15, rbx inc r15 loc_2BDFA: mov rax, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_2BE09: cmp esi, 1 jz short loc_2BE2C lea rdi, [rbx+2] lea rax, [rbx+1] movsxd r15, esi lea rdx, [r15-1] mov rsi, rax call _memmove mov byte ptr [rbx+1], 2Eh ; '.' add rbx, r15 loc_2BE2C: mov byte ptr [rbx+1], 65h ; 'e' add rbx, 2 dec r14d mov rdi, rbx; this mov esi, r14d; char * add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZN8nlohmann16json_abi_v3_12_06detail9dtoa_impl15append_exponentEPci; nlohmann::json_abi_v3_12_0::detail::dtoa_impl::append_exponent(char *,int) loc_2BE4D: lea rdi, aMinExp0; "min_exp < 0" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCharNlohmannDe_0; "char *nlohmann::detail::dtoa_impl::form"... mov edx, 48AAh call ___assert_fail loc_2BE6C: lea rdi, aMaxExp0; "max_exp > 0" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCharNlohmannDe_0; "char *nlohmann::detail::dtoa_impl::form"... mov edx, 48ABh call ___assert_fail loc_2BE8B: lea rdi, aKN; "k > n" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCharNlohmannDe_0; "char *nlohmann::detail::dtoa_impl::form"... mov edx, 48C5h call ___assert_fail
char * nlohmann::json_abi_v3_12_0::detail::dtoa_impl::format_buffer( nlohmann::json_abi_v3_12_0::detail::dtoa_impl *this, char *a2, int a3, int a4, int a5) { nlohmann::json_abi_v3_12_0::detail::dtoa_impl *v5; // rbx int v6; // r14d long long v7; // r14 char *v8; // r15 long long v9; // rcx char *v10; // r14 if ( a4 >= 0 ) __assert_fail( "min_exp < 0", "/workspace/llm4binary/github/2025_star3/shubhamoy[P]dir2txt/include/nlohmann/json.hpp", 18602LL, "char *nlohmann::detail::dtoa_impl::format_buffer(char *, int, int, int, int)"); if ( a5 <= 0 ) __assert_fail( "max_exp > 0", "/workspace/llm4binary/github/2025_star3/shubhamoy[P]dir2txt/include/nlohmann/json.hpp", 18603LL, "char *nlohmann::detail::dtoa_impl::format_buffer(char *, int, int, int, int)"); v5 = this; v6 = a3 + (_DWORD)a2; if ( a3 >= 0 && a3 + (int)a2 <= a5 ) { memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2); v8 = (char *)this + v6 + 2; *(_WORD *)((char *)this + v6) = 12334; return v8; } if ( v6 <= a5 && v6 > 0 ) { if ( a3 >= 0 ) __assert_fail( "k > n", "/workspace/llm4binary/github/2025_star3/shubhamoy[P]dir2txt/include/nlohmann/json.hpp", 18629LL, "char *nlohmann::detail::dtoa_impl::format_buffer(char *, int, int, int, int)"); v9 = (unsigned int)v6; v10 = (char *)this + (unsigned int)v6 + 1; memmove(v10, (char *)this + v9); *(v10 - 1) = 46; return (char *)this + (unsigned int)a2 + 1; } if ( v6 <= 0 && v6 > a4 ) { v7 = (unsigned int)-v6; memmove((char *)this + v7 + 2, this); *(_WORD *)this = 11824; memset((char *)this + 2, 48LL, v7); return (char *)this + v7 + (int)a2 + 2; } if ( (_DWORD)a2 != 1 ) { memmove((char *)this + 2, (char *)this + 1); *((_BYTE *)this + 1) = 46; v5 = (nlohmann::json_abi_v3_12_0::detail::dtoa_impl *)((char *)this + (int)a2); } *((_BYTE *)v5 + 1) = 101; return (char *)nlohmann::json_abi_v3_12_0::detail::dtoa_impl::append_exponent( (nlohmann::json_abi_v3_12_0::detail::dtoa_impl *)((char *)v5 + 2), (char *)(unsigned int)(v6 - 1), a3); }
format_buffer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST ECX,ECX JNS 0x0012be4d TEST R8D,R8D JLE 0x0012be6c MOV RBX,RDI LEA R14D,[RDX + RSI*0x1] TEST EDX,EDX SETS AL CMP R14D,R8D SETG DIL OR DIL,AL JZ 0x0012bd9c CMP R14D,R8D SETG AL TEST R14D,R14D SETLE DIL OR DIL,AL JZ 0x0012bdc5 TEST R14D,R14D SETG AL CMP R14D,ECX SETLE CL OR CL,AL JNZ 0x0012be09 NEG R14D LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOVSXD R12,ESI MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 CALL 0x00108580 MOV word ptr [RBX],0x2e30 ADD RBX,0x2 PUSH 0x30 POP RSI MOV RDI,RBX MOV RDX,R14 CALL 0x00108240 ADD R15,R12 JMP 0x0012bdfa LAB_0012bd9c: MOVSXD RAX,ESI LEA RDI,[RBX + RAX*0x1] MOVSXD R14,R14D MOV RDX,R14 SUB RDX,RAX PUSH 0x30 POP RSI CALL 0x00108240 LEA R15,[RBX + R14*0x1] ADD R15,0x2 MOV word ptr [R15 + -0x2],0x302e JMP 0x0012bdfa LAB_0012bdc5: TEST EDX,EDX JNS 0x0012be8b MOV ECX,R14D LEA RAX,[RBX + RCX*0x1] LEA R14,[RBX + RCX*0x1] INC R14 MOV R15D,ESI MOV RDX,R15 SUB RDX,RCX MOV RDI,R14 MOV RSI,RAX CALL 0x00108580 MOV byte ptr [R14 + -0x1],0x2e ADD R15,RBX INC R15 LAB_0012bdfa: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0012be09: CMP ESI,0x1 JZ 0x0012be2c LEA RDI,[RBX + 0x2] LEA RAX,[RBX + 0x1] MOVSXD R15,ESI LEA RDX,[R15 + -0x1] MOV RSI,RAX CALL 0x00108580 MOV byte ptr [RBX + 0x1],0x2e ADD RBX,R15 LAB_0012be2c: MOV byte ptr [RBX + 0x1],0x65 ADD RBX,0x2 DEC R14D MOV RDI,RBX MOV ESI,R14D ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0012c7ce LAB_0012be4d: LEA RDI,[0x133f4f] LEA RSI,[0x1311f7] LEA RCX,[0x133f5b] MOV EDX,0x48aa CALL 0x001082b0 LAB_0012be6c: LEA RDI,[0x133fa8] LEA RSI,[0x1311f7] LEA RCX,[0x133f5b] MOV EDX,0x48ab CALL 0x001082b0 LAB_0012be8b: LEA RDI,[0x133fb4] LEA RSI,[0x1311f7] LEA RCX,[0x133f5b] MOV EDX,0x48c5 CALL 0x001082b0
/* nlohmann::json_abi_v3_12_0::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */ char * nlohmann::json_abi_v3_12_0::detail::dtoa_impl::format_buffer (char *param_1,int param_2,int param_3,int param_4,int param_5) { char *pcVar1; ulong uVar2; uint uVar3; char *pcVar4; if (-1 < param_4) { /* WARNING: Subroutine does not return */ __assert_fail("min_exp < 0", "/workspace/llm4binary/github/2025_star3/shubhamoy[P]dir2txt/include/nlohmann/json.hpp" ,0x48aa, "char *nlohmann::detail::dtoa_impl::format_buffer(char *, int, int, int, int)"); } if (0 < param_5) { uVar3 = param_3 + param_2; if (param_5 < (int)uVar3 || param_3 < 0) { if ((int)uVar3 < 1 || param_5 < (int)uVar3) { if ((int)uVar3 <= param_4 || 0 < (int)uVar3) { if (param_2 != 1) { memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1); param_1[1] = '.'; param_1 = param_1 + param_2; } param_1[1] = 'e'; pcVar1 = (char *)append_exponent(param_1 + 2,uVar3 - 1); return pcVar1; } memmove(param_1 + (ulong)-uVar3 + 2,param_1,(long)param_2); param_1[0] = '0'; param_1[1] = '.'; memset(param_1 + 2,0x30,(ulong)-uVar3); pcVar4 = param_1 + (ulong)-uVar3 + 2 + param_2; } else { if (-1 < param_3) { /* WARNING: Subroutine does not return */ __assert_fail("k > n", "/workspace/llm4binary/github/2025_star3/shubhamoy[P]dir2txt/include/nlohmann/json.hpp" ,0x48c5, "char *nlohmann::detail::dtoa_impl::format_buffer(char *, int, int, int, int)" ); } uVar2 = (ulong)uVar3; memmove(param_1 + uVar2 + 1,param_1 + uVar2,(uint)param_2 - uVar2); param_1[uVar2] = '.'; pcVar4 = param_1 + (ulong)(uint)param_2 + 1; } } else { memset(param_1 + param_2,0x30,(long)(int)uVar3 - (long)param_2); pcVar1 = param_1 + (int)uVar3; pcVar4 = pcVar1 + 2; pcVar1[0] = '.'; pcVar1[1] = '0'; } return pcVar4; } /* WARNING: Subroutine does not return */ __assert_fail("max_exp > 0", "/workspace/llm4binary/github/2025_star3/shubhamoy[P]dir2txt/include/nlohmann/json.hpp" ,0x48ab, "char *nlohmann::detail::dtoa_impl::format_buffer(char *, int, int, int, int)"); }
21,934
psi_prlock_rdlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait) (&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line); int result= rw_pr_rdlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); return result; }
O3
c
psi_prlock_rdlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x360d3c(%rip), %r15 # 0x390ed8 movq (%r15), %rax movq 0x68(%rdi), %rsi leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *0x1a0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0xab857 movl %eax, %r14d testq %rbx, %rbx je 0x301d1 movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1a8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_prlock_rdlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+68h] lea rdi, [rbp+var_48] xor edx, edx call qword ptr [rax+1A0h] mov rbx, rax mov rdi, r14 call rw_pr_rdlock mov r14d, eax test rbx, rbx jz short loc_301D1 mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1A8h] loc_301D1: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_prlock_rdlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[52])( v6, *(_QWORD *)(a1 + 104), 0LL, a2, a3); v4 = rw_pr_rdlock(a1); if ( v3 ) ((void ( *)(long long, _QWORD))PSI_server[53])(v3, v4); return v4; }
psi_prlock_rdlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x490ed8] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x68] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL qword ptr [RAX + 0x1a0] MOV RBX,RAX MOV RDI,R14 CALL 0x001ab857 MOV R14D,EAX TEST RBX,RBX JZ 0x001301d1 MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1a8] LAB_001301d1: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_prlock_rdlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1a0)) (local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3); uVar1 = rw_pr_rdlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1a8))(lVar2,uVar1); } return uVar1; }
21,935
testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int)
seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/src/gtest-internal-inl.h
void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) override { SendLn("event=TestIterationStart&iteration=" + StreamableToString(iteration)); }
O2
c
testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl %edx, (%rsi) leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x263bc leaq 0x88f3(%rip), %rsi # 0x34704 leaq 0x8(%rsp), %rdi movq %r14, %rdx callq 0x26675 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x2c7dc leaq 0x8(%rsp), %rdi callq 0x9af8 leaq 0x28(%rsp), %rdi callq 0x9af8 addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x9af8 jmp 0x2be59 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x9af8 movq %rbx, %rdi callq 0x99d0 nop
_ZN7testing8internal17StreamingListener20OnTestIterationStartERKNS_8UnitTestEi: push r14 push rbx sub rsp, 48h mov rbx, rdi lea rsi, [rsp+58h+var_54] mov [rsi], edx lea r14, [rsp+58h+var_30] mov rdi, r14 call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&) lea rsi, aEventTestitera; "event=TestIterationStart&iteration=" lea rdi, [rsp+58h+var_50] mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZN7testing8internal17StreamingListener6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::SendLn(std::string const&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+58h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 48h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2BE59 mov rbx, rax loc_2BE59: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
void testing::internal::StreamingListener::OnTestIterationStart( testing::internal::StreamingListener *this, const testing::UnitTest *a2, int a3) { int v3; // [rsp+4h] [rbp-54h] BYREF _BYTE v4[32]; // [rsp+8h] [rbp-50h] BYREF _BYTE v5[48]; // [rsp+28h] [rbp-30h] BYREF v3 = a3; testing::internal::StreamableToString<int>((long long)v5, (long long)&v3); std::operator+<char>((long long)v4, (long long)"event=TestIterationStart&iteration=", (long long)v5); testing::internal::StreamingListener::SendLn(this, v4); std::string::~string(v4); std::string::~string(v5); }
OnTestIterationStart: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],EDX LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x001263bc LAB_0012be0a: LEA RSI,[0x134704] LEA RDI,[RSP + 0x8] MOV RDX,R14 CALL 0x00126675 LAB_0012be1e: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0012c7dc LAB_0012be2b: LEA RDI,[RSP + 0x8] CALL 0x00109af8 LEA RDI,[RSP + 0x28] CALL 0x00109af8 ADD RSP,0x48 POP RBX POP R14 RET
/* testing::internal::StreamingListener::OnTestIterationStart(testing::UnitTest const&, int) */ void __thiscall testing::internal::StreamingListener::OnTestIterationStart (StreamingListener *this,UnitTest *param_1,int param_2) { int local_54; string local_50 [32]; internal local_30 [32]; local_54 = param_2; StreamableToString<int>(local_30,&local_54); /* try { // try from 0012be0a to 0012be1d has its CatchHandler @ 0012be56 */ std::operator+((char *)local_50,(string *)"event=TestIterationStart&iteration="); /* try { // try from 0012be1e to 0012be2a has its CatchHandler @ 0012be47 */ SendLn(this,local_50); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)local_30); return; }
21,936
ma_alloc_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void * ma_alloc_root(MA_MEM_ROOT *mem_root, size_t Size) { #if defined(HAVE_purify) && defined(EXTRA_DEBUG) reg1 MA_USED_MEM *next; Size+=ALIGN_SIZE(sizeof(MA_USED_MEM)); if (!(next = (MA_USED_MEM*) malloc(Size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } next->next=mem_root->used; mem_root->used=next; return (void *) (((char*) next)+ALIGN_SIZE(sizeof(MA_USED_MEM))); #else size_t get_size; void * point; reg1 MA_USED_MEM *next= 0; reg2 MA_USED_MEM **prev; Size= ALIGN_SIZE(Size); if ((*(prev= &mem_root->free))) { if ((*prev)->left < Size && mem_root->first_block_usage++ >= 16 && (*prev)->left < 4096) { next= *prev; *prev= next->next; next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev; next && next->left < Size; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= MAX(Size+ALIGN_SIZE(sizeof(MA_USED_MEM)), (mem_root->block_size & ~1) * (mem_root->block_num >> 2)); if (!(next = (MA_USED_MEM*) malloc(get_size))) { if (mem_root->error_handler) (*mem_root->error_handler)(); return((void *) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(MA_USED_MEM)); *prev=next; } point= (void *) ((char*) next+ (next->size-next->left)); if ((next->left-= Size) < mem_root->min_malloc) { /* Full block */ *prev=next->next; /* Remove block from list */ next->next=mem_root->used; mem_root->used=next; mem_root->first_block_usage= 0; } return(point); #endif }
O3
c
ma_alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx addq $0x7, %r14 andq $-0x8, %r14 movq (%rdi), %rax movq %rdi, %r12 testq %rax, %rax je 0x22ef1 cmpq %r14, 0x8(%rax) jae 0x22ed8 movl 0x2c(%rbx), %ecx leal 0x1(%rcx), %edx movl %edx, 0x2c(%rbx) cmpl $0x10, %ecx jb 0x22ed8 cmpq $0xfff, 0x8(%rax) # imm = 0xFFF ja 0x22ed8 movq (%rax), %rcx movq %rcx, (%rbx) movq 0x8(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) movq %rbx, %rax movq %rax, %r12 movq (%rax), %rax testq %rax, %rax je 0x22ef1 movq 0x8(%rax), %rdx cmpq %r14, %rdx jb 0x22edb jmp 0x22f42 leaq 0x18(%r14), %rax movq 0x20(%rbx), %rcx andq $-0x2, %rcx movl 0x28(%rbx), %r13d movl %r13d, %r15d shrl $0x2, %r15d imulq %rcx, %r15 cmpq %r15, %rax cmovaq %rax, %r15 movq %r15, %rdi callq 0x13600 testq %rax, %rax je 0x22f74 incl %r13d movl %r13d, 0x28(%rbx) movq (%r12), %rcx movq %rcx, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r12) movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx addq %rax, %rcx subq %r14, %rdx movq %rdx, 0x8(%rax) cmpq 0x18(%rbx), %rdx jae 0x22f81 movq (%rax), %rdx movq %rdx, (%r12) movq 0x8(%rbx), %rdx movq %rdx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) jmp 0x22f81 movq 0x30(%rbx), %rax testq %rax, %rax je 0x22f7f callq *%rax xorl %ecx, %ecx movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_alloc_root: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h mov rax, [rdi] mov r12, rdi test rax, rax jz short loc_22EF1 cmp [rax+8], r14 jnb short loc_22ED8 mov ecx, [rbx+2Ch] lea edx, [rcx+1] mov [rbx+2Ch], edx cmp ecx, 10h jb short loc_22ED8 cmp qword ptr [rax+8], 0FFFh ja short loc_22ED8 mov rcx, [rax] mov [rbx], rcx mov rcx, [rbx+8] mov [rax], rcx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 loc_22ED8: mov rax, rbx loc_22EDB: mov r12, rax mov rax, [rax] test rax, rax jz short loc_22EF1 mov rdx, [rax+8] cmp rdx, r14 jb short loc_22EDB jmp short loc_22F42 loc_22EF1: lea rax, [r14+18h] mov rcx, [rbx+20h] and rcx, 0FFFFFFFFFFFFFFFEh mov r13d, [rbx+28h] mov r15d, r13d shr r15d, 2 imul r15, rcx cmp rax, r15 cmova r15, rax mov rdi, r15 call _malloc test rax, rax jz short loc_22F74 inc r13d mov [rbx+28h], r13d mov rcx, [r12] mov [rax], rcx mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r12], rax mov rdx, [rax+8] loc_22F42: mov rcx, [rax+10h] sub rcx, rdx add rcx, rax sub rdx, r14 mov [rax+8], rdx cmp rdx, [rbx+18h] jnb short loc_22F81 mov rdx, [rax] mov [r12], rdx mov rdx, [rbx+8] mov [rax], rdx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 jmp short loc_22F81 loc_22F74: mov rax, [rbx+30h] test rax, rax jz short loc_22F7F call rax loc_22F7F: xor ecx, ecx loc_22F81: mov rax, rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char * ma_alloc_root(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // rax _QWORD *v4; // r12 unsigned int v5; // ecx _QWORD *v6; // rax unsigned long long v7; // rdx unsigned int v8; // r13d unsigned long long v9; // r15 char *v10; // rcx unsigned long long v11; // rdx void ( *v12)(unsigned long long); // rax v2 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = *(_QWORD **)a1; v4 = (_QWORD *)a1; if ( *(_QWORD *)a1 ) { if ( v3[1] < v2 ) { v5 = *(_DWORD *)(a1 + 44); *(_DWORD *)(a1 + 44) = v5 + 1; if ( v5 >= 0x10 && v3[1] <= 0xFFFuLL ) { *(_QWORD *)a1 = *v3; *v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v3; *(_DWORD *)(a1 + 44) = 0; } } v6 = (_QWORD *)a1; while ( 1 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( !v6 ) break; v7 = v6[1]; if ( v7 >= v2 ) goto LABEL_14; } } v8 = *(_DWORD *)(a1 + 40); v9 = (*(_QWORD *)(a1 + 32) & 0xFFFFFFFFFFFFFFFELL) * (v8 >> 2); if ( v2 + 24 > v9 ) v9 = v2 + 24; v6 = (_QWORD *)malloc(v9); if ( v6 ) { *(_DWORD *)(a1 + 40) = v8 + 1; *v6 = *v4; v6[2] = v9; v6[1] = v9 - 24; *v4 = v6; v7 = v6[1]; LABEL_14: v10 = (char *)v6 + v6[2] - v7; v11 = v7 - v2; v6[1] = v11; if ( v11 < *(_QWORD *)(a1 + 24) ) { *v4 = *v6; *v6 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 44) = 0; } } else { v12 = *(void ( **)(unsigned long long))(a1 + 48); if ( v12 ) v12(v9); return 0LL; } return v10; }
ma_alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI ADD R14,0x7 AND R14,-0x8 MOV RAX,qword ptr [RDI] MOV R12,RDI TEST RAX,RAX JZ 0x00122ef1 CMP qword ptr [RAX + 0x8],R14 JNC 0x00122ed8 MOV ECX,dword ptr [RBX + 0x2c] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x2c],EDX CMP ECX,0x10 JC 0x00122ed8 CMP qword ptr [RAX + 0x8],0xfff JA 0x00122ed8 MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 LAB_00122ed8: MOV RAX,RBX LAB_00122edb: MOV R12,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00122ef1 MOV RDX,qword ptr [RAX + 0x8] CMP RDX,R14 JC 0x00122edb JMP 0x00122f42 LAB_00122ef1: LEA RAX,[R14 + 0x18] MOV RCX,qword ptr [RBX + 0x20] AND RCX,-0x2 MOV R13D,dword ptr [RBX + 0x28] MOV R15D,R13D SHR R15D,0x2 IMUL R15,RCX CMP RAX,R15 CMOVA R15,RAX MOV RDI,R15 CALL 0x00113600 TEST RAX,RAX JZ 0x00122f74 INC R13D MOV dword ptr [RBX + 0x28],R13D MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R12],RAX MOV RDX,qword ptr [RAX + 0x8] LAB_00122f42: MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX ADD RCX,RAX SUB RDX,R14 MOV qword ptr [RAX + 0x8],RDX CMP RDX,qword ptr [RBX + 0x18] JNC 0x00122f81 MOV RDX,qword ptr [RAX] MOV qword ptr [R12],RDX MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RDX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 JMP 0x00122f81 LAB_00122f74: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x00122f7f CALL RAX LAB_00122f7f: XOR ECX,ECX LAB_00122f81: MOV RAX,RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; ulong uVar6; ulong uVar7; uVar6 = param_2 + 7U & 0xfffffffffffffff8; plVar2 = (long *)*param_1; plVar5 = param_1; if (plVar2 == (long *)0x0) { LAB_00122ef1: uVar1 = *(uint *)(param_1 + 5); uVar7 = (ulong)(uVar1 >> 2) * (param_1[4] & 0xfffffffffffffffeU); if (uVar7 < uVar6 + 0x18) { uVar7 = uVar6 + 0x18; } plVar4 = (long *)malloc(uVar7); if (plVar4 == (long *)0x0) { if ((code *)param_1[6] != (code *)0x0) { (*(code *)param_1[6])(); } return 0; } *(uint *)(param_1 + 5) = uVar1 + 1; *plVar4 = *plVar5; plVar4[2] = uVar7; plVar4[1] = uVar7 - 0x18; *plVar5 = (long)plVar4; uVar7 = plVar4[1]; } else { plVar4 = param_1; if ((((ulong)plVar2[1] < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 0xf < uVar1)) && ((ulong)plVar2[1] < 0x1000)) { *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } do { plVar5 = plVar4; plVar4 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_00122ef1; uVar7 = plVar4[1]; } while (uVar7 < uVar6); } lVar3 = plVar4[2]; plVar4[1] = uVar7 - uVar6; if (uVar7 - uVar6 < (ulong)param_1[3]) { *plVar5 = *plVar4; *plVar4 = param_1[1]; param_1[1] = (long)plVar4; *(int4 *)((long)param_1 + 0x2c) = 0; } return (lVar3 - uVar7) + (long)plVar4; }
21,937
CLI::detail::split_long(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/Split_inl.hpp
CLI11_INLINE bool split_long(const std::string &current, std::string &name, std::string &value) { if(current.size() > 2 && current.substr(0, 2) == "--" && valid_first_char(current[2])) { auto loc = current.find_first_of('='); if(loc != std::string::npos) { name = current.substr(2, loc - 2); value = current.substr(loc + 1); } else { name = current.substr(2); value = ""; } return true; } return false; }
O1
cpp
CLI::detail::split_long(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movq 0x8(%rdi), %rbp xorl %ebx, %ebx cmpq $0x3, %rbp jb 0x2135d leaq 0x28(%rsp), %r13 movl $0x2, %ecx movq %r13, %rdi movq %r15, %rsi xorl %edx, %edx callq 0x7460 leaq 0x1618f(%rip), %rsi # 0x374c6 movq %r13, %rdi callq 0x7130 testl %eax, %eax jne 0x2135d movq (%r15), %rax movb 0x2(%rax), %cl movb $0x1, %bl cmpb $0x2d, %cl ja 0x2135d movabsq $0x1ffcfffffbff, %rbx # imm = 0x1FFCFFFFFBFF shrq %cl, %rbx cmpq $0x3, %rbp jb 0x2137e leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2137e movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 testb $0x1, %bl je 0x2147c movq %r15, %rdi movl $0x3d, %esi xorl %edx, %edx callq 0x7540 cmpq $-0x1, %rax je 0x21422 movq %rax, %r13 leaq -0x2(%rax), %rcx leaq 0x8(%rsp), %rbp movl $0x2, %edx movq %rbp, %rdi movq %r15, %rsi callq 0x7460 movq %r12, %rdi movq %rbp, %rsi callq 0x7510 movq (%rbp), %rdi leaq 0x18(%rsp), %rbp cmpq %rbp, %rdi je 0x213e2 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 incq %r13 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r13, %rdx movq $-0x1, %rcx callq 0x7460 movq %r14, %rdi movq %r12, %rsi callq 0x7510 movq (%r12), %rdi cmpq %rbp, %rdi je 0x2147c movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x2147c leaq 0x8(%rsp), %r13 movl $0x2, %edx movq %r13, %rdi movq %r15, %rsi movq $-0x1, %rcx callq 0x7460 movq %r12, %rdi movq %r13, %rsi callq 0x7510 movq (%r13), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x21464 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 movq 0x8(%r14), %rdx leaq 0x16915(%rip), %rcx # 0x37d84 movq %r14, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x7660 andb $0x1, %bl movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN3CLI6detail10split_longERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_S9_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rdx mov r12, rsi mov r15, rdi mov rbp, [rdi+8] xor ebx, ebx cmp rbp, 3 jb short loc_2135D lea r13, [rsp+78h+var_50] mov ecx, 2 mov rdi, r13 mov rsi, r15 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, asc_374C6; "--" mov rdi, r13 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_2135D mov rax, [r15] mov cl, [rax+2] mov bl, 1 cmp cl, 2Dh ; '-' ja short loc_2135D mov rbx, 1FFCFFFFFBFFh shr rbx, cl loc_2135D: cmp rbp, 3 jb short loc_2137E lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2137E mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2137E: test bl, 1 jz loc_2147C mov rdi, r15 mov esi, 3Dh ; '=' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_21422 mov r13, rax lea rcx, [rax-2] lea rbp, [rsp+78h+var_70] mov edx, 2 mov rdi, rbp mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, r12 mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbp+0]; void * lea rbp, [rsp+78h+var_60] cmp rdi, rbp jz short loc_213E2 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_213E2: inc r13 lea r12, [rsp+78h+var_70] mov rdi, r12 mov rsi, r15 mov rdx, r13 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, r14 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * cmp rdi, rbp jz short loc_2147C mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2147C loc_21422: lea r13, [rsp+78h+var_70] mov edx, 2 mov rdi, r13 mov rsi, r15 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, r12 mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r13+0]; void * lea rax, [rsp+78h+var_60] cmp rdi, rax jz short loc_21464 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_21464: mov rdx, [r14+8] lea rcx, asc_37D82+2; "" mov rdi, r14 xor esi, esi xor r8d, r8d call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_2147C: and bl, 1 mov eax, ebx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long CLI::detail::split_long(_QWORD *a1, long long a2, long long a3) { unsigned long long v4; // rbp unsigned long long v5; // rbx unsigned __int8 v6; // cl long long v7; // rax long long v8; // r13 void *v10[2]; // [rsp+8h] [rbp-70h] BYREF _QWORD v11[2]; // [rsp+18h] [rbp-60h] BYREF void *v12[2]; // [rsp+28h] [rbp-50h] BYREF long long v13; // [rsp+38h] [rbp-40h] BYREF v4 = a1[1]; LODWORD(v5) = 0; if ( v4 >= 3 ) { std::string::substr(v12, a1, 0LL, 2LL); if ( !(unsigned int)std::string::compare(v12, "--") ) { v6 = *(_BYTE *)(*a1 + 2LL); LOBYTE(v5) = 1; if ( v6 <= 0x2Du ) v5 = 0x1FFCFFFFFBFFuLL >> v6; } } if ( v4 >= 3 && v12[0] != &v13 ) operator delete(v12[0], v13 + 1); if ( (v5 & 1) != 0 ) { v7 = std::string::find(a1, 61LL, 0LL); if ( v7 == -1 ) { std::string::substr(v10, a1, 2LL, -1LL); std::string::operator=(a2, v10); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); std::string::_M_replace(a3, 0LL, *(_QWORD *)(a3 + 8), "", 0LL); } else { v8 = v7; std::string::substr(v10, a1, 2LL, v7 - 2); std::string::operator=(a2, v10); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); std::string::substr(v10, a1, v8 + 1, -1LL); std::string::operator=(a3, v10); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); } } LOBYTE(v5) = v5 & 1; return (unsigned int)v5; }
split_long: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV RBP,qword ptr [RDI + 0x8] XOR EBX,EBX CMP RBP,0x3 JC 0x0012135d LEA R13,[RSP + 0x28] MOV ECX,0x2 MOV RDI,R13 MOV RSI,R15 XOR EDX,EDX CALL 0x00107460 LEA RSI,[0x1374c6] MOV RDI,R13 CALL 0x00107130 TEST EAX,EAX JNZ 0x0012135d MOV RAX,qword ptr [R15] MOV CL,byte ptr [RAX + 0x2] MOV BL,0x1 CMP CL,0x2d JA 0x0012135d MOV RBX,0x1ffcfffffbff SHR RBX,CL LAB_0012135d: CMP RBP,0x3 JC 0x0012137e LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012137e MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00107430 LAB_0012137e: TEST BL,0x1 JZ 0x0012147c MOV RDI,R15 MOV ESI,0x3d XOR EDX,EDX CALL 0x00107540 CMP RAX,-0x1 JZ 0x00121422 MOV R13,RAX LEA RCX,[RAX + -0x2] LEA RBP,[RSP + 0x8] MOV EDX,0x2 MOV RDI,RBP MOV RSI,R15 CALL 0x00107460 MOV RDI,R12 MOV RSI,RBP CALL 0x00107510 MOV RDI,qword ptr [RBP] LEA RBP,[RSP + 0x18] CMP RDI,RBP JZ 0x001213e2 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_001213e2: INC R13 LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 MOV RDX,R13 MOV RCX,-0x1 CALL 0x00107460 MOV RDI,R14 MOV RSI,R12 CALL 0x00107510 MOV RDI,qword ptr [R12] CMP RDI,RBP JZ 0x0012147c MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 JMP 0x0012147c LAB_00121422: LEA R13,[RSP + 0x8] MOV EDX,0x2 MOV RDI,R13 MOV RSI,R15 MOV RCX,-0x1 CALL 0x00107460 MOV RDI,R12 MOV RSI,R13 CALL 0x00107510 MOV RDI,qword ptr [R13] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00121464 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_00121464: MOV RDX,qword ptr [R14 + 0x8] LEA RCX,[0x137d84] MOV RDI,R14 XOR ESI,ESI XOR R8D,R8D CALL 0x00107660 LAB_0012147c: AND BL,0x1 MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* CLI::detail::split_long(std::__cxx11::string const&, std::__cxx11::string&, std::__cxx11::string&) */ ulong CLI::detail::split_long(string *param_1,string *param_2,string *param_3) { ulong uVar1; int iVar2; long lVar3; ulong uVar4; long *local_70 [2]; long local_60 [2]; long *local_50 [2]; long local_40 [2]; uVar1 = *(ulong *)(param_1 + 8); uVar4 = 0; if (2 < uVar1) { std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); iVar2 = std::__cxx11::string::compare((char *)local_50); if (iVar2 == 0) { uVar4 = 1; if (*(byte *)(*(long *)param_1 + 2) < 0x2e) { uVar4 = 0x1ffcfffffbff >> (*(byte *)(*(long *)param_1 + 2) & 0x3f); } } } if ((2 < uVar1) && (local_50[0] != local_40)) { operator_delete(local_50[0],local_40[0] + 1); } if ((uVar4 & 1) != 0) { lVar3 = std::__cxx11::string::find((char)param_1,0x3d); if (lVar3 == -1) { std::__cxx11::string::substr((ulong)local_70,(ulong)param_1); std::__cxx11::string::operator=(param_2,(string *)local_70); if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } std::__cxx11::string::_M_replace((ulong)param_3,0,*(char **)(param_3 + 8),0x137d84); } else { std::__cxx11::string::substr((ulong)local_70,(ulong)param_1); std::__cxx11::string::operator=(param_2,(string *)local_70); if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } std::__cxx11::string::substr((ulong)local_70,(ulong)param_1); std::__cxx11::string::operator=(param_3,(string *)local_70); if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } } } return uVar4 & 0xffffff01; }
21,938
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, int /*iteration*/) { ColoredPrintf(GTestColor::kGreen, "[==========] "); printf("%s from %s ran.", FormatTestCount(unit_test.test_to_run_count()).c_str(), FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); if (GTEST_FLAG_GET(print_time)) { printf(" (%s ms total)", internal::StreamableToString(unit_test.elapsed_time()).c_str()); } printf("\n"); ColoredPrintf(GTestColor::kGreen, "[ PASSED ] "); printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str()); const int skipped_test_count = unit_test.skipped_test_count(); if (skipped_test_count > 0) { ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] "); printf("%s, listed below:\n", FormatTestCount(skipped_test_count).c_str()); PrintSkippedTests(unit_test); } if (!unit_test.Passed()) { PrintFailedTests(unit_test); PrintFailedTestSuites(unit_test); } int num_disabled = unit_test.reportable_disabled_test_count(); if (num_disabled && !GTEST_FLAG_GET(also_run_disabled_tests)) { if (unit_test.Passed()) { printf("\n"); // Add a spacer if no FAILURE banner is displayed. } ColoredPrintf(GTestColor::kYellow, " YOU HAVE %d DISABLED %s\n\n", num_disabled, num_disabled == 1 ? "TEST" : "TESTS"); } // Ensure that Google Test output is printed before, e.g., heapchecker output. fflush(stdout); }
O3
cpp
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx leaq 0x1ffed(%rip), %rsi # 0x432c7 xorl %ebp, %ebp movl $0x2, %edi xorl %eax, %eax callq 0x22129 movq 0x40(%rbx), %rdi callq 0x1c862 leaq 0x1efb6(%rip), %rdx # 0x422ae leaq 0x1f3bb(%rip), %rcx # 0x426ba leaq 0x8(%rsp), %rdi movl %eax, %esi callq 0x228b2 movq 0x40(%rbx), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rcx cmpq %rcx, %rax je 0x23336 xorl %ebp, %ebp movq (%rax), %rdx movzbl 0x70(%rdx), %edx addl %edx, %ebp addq $0x8, %rax cmpq %rcx, %rax jne 0x23324 movq 0x8(%rsp), %r14 leaq 0x20faa(%rip), %rdx # 0x442ec leaq 0x20fae(%rip), %rcx # 0x442f7 leaq 0x28(%rsp), %rdi movl %ebp, %esi callq 0x228b2 leaq 0x38(%rsp), %r15 movq -0x10(%r15), %rdx leaq 0x20099(%rip), %rdi # 0x433fe movq %r14, %rsi xorl %eax, %eax callq 0x8080 movq -0x10(%r15), %rdi cmpq %r15, %rdi je 0x23385 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x18(%rsp), %r15 movq -0x10(%r15), %rdi cmpq %r15, %rdi je 0x233a0 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 cmpb $0x1, 0x3634a(%rip) # 0x596f1 jne 0x233ef movq 0x40(%rbx), %rax movq 0x2a0(%rax), %rax leaq 0x28(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x3471e movq (%r14), %rsi leaq 0x2003b(%rip), %rdi # 0x4340e xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x233ef movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movl $0xa, %edi callq 0x8790 leaq 0x2001d(%rip), %rsi # 0x4341d movl $0x2, %edi xorl %eax, %eax callq 0x22129 movq 0x40(%rbx), %rdi callq 0x1c45c leaq 0x1ee92(%rip), %rdx # 0x422ae leaq 0x1f297(%rip), %rcx # 0x426ba leaq 0x8(%rsp), %r14 movq %r14, %rdi movl %eax, %esi callq 0x228b2 movq (%r14), %rsi leaq 0x1fe51(%rip), %rdi # 0x4328d xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x23458 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x40(%rbx), %rdi callq 0x1c4e2 testl %eax, %eax jle 0x234c5 movl %eax, %ebp leaq 0x1fed0(%rip), %rsi # 0x4333e movl $0x2, %edi xorl %eax, %eax callq 0x22129 leaq 0x1ee2d(%rip), %rdx # 0x422ae leaq 0x1f232(%rip), %rcx # 0x426ba leaq 0x8(%rsp), %r14 movq %r14, %rdi movl %ebp, %esi callq 0x228b2 movq (%r14), %rsi leaq 0x1fede(%rip), %rdi # 0x4337f xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x234bd movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x23142 movq 0x40(%rbx), %rdi callq 0x34788 testb %al, %al jne 0x234e2 movq %rbx, %rdi callq 0x22dd4 movq %rbx, %rdi callq 0x2302e movq 0x40(%rbx), %r14 movq %r14, %rdi callq 0x1c622 testl %eax, %eax je 0x2353d cmpb $0x0, 0x3618a(%rip) # 0x59683 jne 0x2353d movl %eax, %ebx movq %r14, %rdi callq 0x34788 testb %al, %al je 0x23513 movl $0xa, %edi callq 0x8790 cmpl $0x1, %ebx leaq 0x1fe8b(%rip), %rax # 0x433a8 leaq 0x1fe89(%rip), %rcx # 0x433ad cmoveq %rax, %rcx leaq 0x1fefc(%rip), %rsi # 0x4342b movl $0x3, %edi movl %ebx, %edx xorl %eax, %eax callq 0x22129 movq 0x35a3c(%rip), %rax # 0x58f80 movq (%rax), %rdi callq 0x8600 addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x23575 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal27PrettyUnitTestResultPrinter18OnTestIterationEndERKNS_8UnitTestEi: push rbp push r15 push r14 push rbx sub rsp, 48h mov rbx, rsi lea rsi, asc_432C7; "[==========] " xor ebp, ebp mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl17test_to_run_countEv; testing::internal::UnitTestImpl::test_to_run_count(void) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea rdi, [rsp+68h+var_60]; int mov esi, eax; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rcx, [rbx+40h] mov rax, [rcx+0B8h] mov rcx, [rcx+0C0h] cmp rax, rcx jz short loc_23336 xor ebp, ebp loc_23324: mov rdx, [rax] movzx edx, byte ptr [rdx+70h] add ebp, edx add rax, 8 cmp rax, rcx jnz short loc_23324 loc_23336: mov r14, qword ptr [rsp+68h+var_60] lea rdx, aTestSuite; "test suite" lea rcx, aTestSuites; "test suites" lea rdi, [rsp+68h+var_40]; int mov esi, ebp; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) lea r15, [rsp+68h+var_30] mov rdx, [r15-10h] lea rdi, aSFromSRan; "%s from %s ran." mov rsi, r14 xor eax, eax call _printf mov rdi, [r15-10h]; void * cmp rdi, r15 jz short loc_23385 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23385: lea r15, [rsp+68h+var_50] mov rdi, [r15-10h]; void * cmp rdi, r15 jz short loc_233A0 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_233A0: cmp cs:_ZN7testing22FLAGS_gtest_print_timeE, 1; testing::FLAGS_gtest_print_time jnz short loc_233EF mov rax, [rbx+40h] mov rax, [rax+2A0h] lea rsi, [rsp+68h+var_40] mov [rsi], rax lea r14, [rsp+68h+var_60] mov rdi, r14 call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&) mov rsi, [r14] lea rdi, aSMsTotal; " (%s ms total)" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_233EF mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_233EF: mov edi, 0Ah call _putchar lea rsi, aPassed; "[ PASSED ] " mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl21successful_test_countEv; testing::internal::UnitTestImpl::successful_test_count(void) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea r14, [rsp+68h+var_60] mov rdi, r14; int mov esi, eax; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rsi, [r14] lea rdi, aNoteThisIsTest+1Fh; "%s.\n" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_23458 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23458: mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl18skipped_test_countEv; testing::internal::UnitTestImpl::skipped_test_count(void) test eax, eax jle short loc_234C5 mov ebp, eax lea rsi, aSkipped_0; "[ SKIPPED ] " mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea r14, [rsp+68h+var_60] mov rdi, r14; int mov esi, ebp; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rsi, [r14] lea rdi, aSListedBelow; "%s, listed below:\n" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_234BD mov rsi, [rsp+68h+var_50] inc rsi; testing::UnitTest * call __ZdlPvm; operator delete(void *,ulong) loc_234BD: mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter17PrintSkippedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&) loc_234C5: mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void) test al, al jnz short loc_234E2 mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter16PrintFailedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(testing::UnitTest const&) mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter21PrintFailedTestSuitesERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites(testing::UnitTest const&) loc_234E2: mov r14, [rbx+40h] mov rdi, r14; this call _ZNK7testing8internal12UnitTestImpl30reportable_disabled_test_countEv; testing::internal::UnitTestImpl::reportable_disabled_test_count(void) test eax, eax jz short loc_2353D cmp cs:_ZN7testing35FLAGS_gtest_also_run_disabled_testsE, 0; testing::FLAGS_gtest_also_run_disabled_tests jnz short loc_2353D mov ebx, eax mov rdi, r14; this call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void) test al, al jz short loc_23513 mov edi, 0Ah call _putchar loc_23513: cmp ebx, 1 lea rax, aTest_0; "TEST" lea rcx, aTests; "TESTS" cmovz rcx, rax lea rsi, aYouHaveDDisabl; " YOU HAVE %d DISABLED %s\n\n" mov edi, 3 mov edx, ebx xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) loc_2353D: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_23575 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23575: mov rdi, rbx call __Unwind_Resume
long long testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd( testing::internal::PrettyUnitTestResultPrinter *this, testing::internal::UnitTestImpl **a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v15; // ebp int v16; // eax testing::internal::UnitTestImpl *v17; // rcx long long v18; // rax long long v19; // rcx const char *v20; // r14 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 int v27; // eax const testing::UnitTest *v28; // rsi int v29; // eax long long v30; // rdx long long v31; // rcx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 int v36; // ebp double v37; // xmm4_8 double v38; // xmm5_8 double v39; // xmm4_8 double v40; // xmm5_8 double v41; // xmm4_8 double v42; // xmm5_8 testing::internal::UnitTestImpl *v43; // r14 unsigned int v44; // eax unsigned int v45; // ebx long long v46; // r8 long long v47; // r9 __m128 v48; // xmm4 __m128 v49; // xmm5 const char *v50; // rcx char v52; // [rsp+0h] [rbp-68h] char v53; // [rsp+0h] [rbp-68h] char v54; // [rsp+0h] [rbp-68h] int v55[2]; // [rsp+8h] [rbp-60h] BYREF _QWORD v56[2]; // [rsp+18h] [rbp-50h] BYREF char *v57; // [rsp+28h] [rbp-40h] BYREF long long v58; // [rsp+38h] [rbp-30h] BYREF v15 = 0; testing::internal::ColoredPrintf( 2, (long long)"[==========] ", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v52); v16 = testing::internal::UnitTestImpl::test_to_run_count(a2[8]); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v16, "test", "tests"); v17 = a2[8]; v18 = *((_QWORD *)v17 + 23); v19 = *((_QWORD *)v17 + 24); if ( v18 != v19 ) { v15 = 0; do { v15 += *(unsigned __int8 *)(*(_QWORD *)v18 + 112LL); v18 += 8LL; } while ( v18 != v19 ); } v20 = *(const char **)v55; testing::FormatCountableNoun[abi:cxx11]((long long)&v57, v15, "test suite", "test suites"); printf("%s from %s ran.", v20, v57); if ( v57 != (char *)&v58 ) operator delete(v57, v58 + 1); if ( *(_QWORD **)v55 != v56 ) operator delete(*(void **)v55, v56[0] + 1LL); if ( testing::FLAGS_gtest_print_time == 1 ) { v57 = (char *)*((_QWORD *)a2[8] + 84); testing::internal::StreamableToString<long>(v55); printf(" (%s ms total)", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) operator delete(*(void **)v55, v56[0] + 1LL); } putchar(10LL); testing::internal::ColoredPrintf( 2, (long long)"[ PASSED ] ", v21, v22, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14, v53); v27 = testing::internal::UnitTestImpl::successful_test_count(a2[8]); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v27, "test", "tests"); v28 = *(const testing::UnitTest **)v55; printf("%s.\n", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) { v28 = (const testing::UnitTest *)(v56[0] + 1LL); operator delete(*(void **)v55, v56[0] + 1LL); } v29 = testing::internal::UnitTestImpl::skipped_test_count(a2[8]); if ( v29 > 0 ) { v36 = v29; testing::internal::ColoredPrintf( 2, (long long)"[ SKIPPED ] ", v30, v31, v32, v33, a7, a8, a9, a10, v34, v35, a13, a14, v54); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v36, "test", "tests"); v28 = *(const testing::UnitTest **)v55; printf("%s, listed below:\n", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) { v28 = (const testing::UnitTest *)(v56[0] + 1LL); operator delete(*(void **)v55, v56[0] + 1LL); } testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(a2, v28, a7, a8, a9, a10, v37, v38, a13, a14); } if ( !(unsigned __int8)testing::internal::UnitTestImpl::Passed(a2[8]) ) { testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(a2, v28, a7, a8, a9, a10, v39, v40, a13, a14); testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites( (testing::internal::PrettyUnitTestResultPrinter *)a2, v28, a7, a8, a9, a10, v41, v42, a13, a14); } v43 = a2[8]; v44 = testing::internal::UnitTestImpl::reportable_disabled_test_count(v43); if ( v44 && !testing::FLAGS_gtest_also_run_disabled_tests ) { v45 = v44; if ( (unsigned __int8)testing::internal::UnitTestImpl::Passed(v43) ) putchar(10LL); v50 = "TESTS"; if ( v45 == 1 ) v50 = "TEST"; testing::internal::ColoredPrintf( 3, (long long)" YOU HAVE %d DISABLED %s\n\n", v45, (long long)v50, v46, v47, a7, a8, a9, a10, v48, v49, a13, a14, v54); } return fflush(stdout); }
OnTestIterationEnd: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI LEA RSI,[0x1432c7] XOR EBP,EBP MOV EDI,0x2 XOR EAX,EAX CALL 0x00122129 MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c862 LEA RDX,[0x1422ae] LEA RCX,[0x1426ba] LEA RDI,[RSP + 0x8] MOV ESI,EAX CALL 0x001228b2 MOV RCX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RCX,qword ptr [RCX + 0xc0] CMP RAX,RCX JZ 0x00123336 XOR EBP,EBP LAB_00123324: MOV RDX,qword ptr [RAX] MOVZX EDX,byte ptr [RDX + 0x70] ADD EBP,EDX ADD RAX,0x8 CMP RAX,RCX JNZ 0x00123324 LAB_00123336: MOV R14,qword ptr [RSP + 0x8] LAB_0012333b: LEA RDX,[0x1442ec] LEA RCX,[0x1442f7] LEA RDI,[RSP + 0x28] MOV ESI,EBP CALL 0x001228b2 LAB_00123355: LEA R15,[RSP + 0x38] MOV RDX,qword ptr [R15 + -0x10] LEA RDI,[0x1433fe] MOV RSI,R14 XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R15 + -0x10] CMP RDI,R15 JZ 0x00123385 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001084e0 LAB_00123385: LEA R15,[RSP + 0x18] MOV RDI,qword ptr [R15 + -0x10] CMP RDI,R15 JZ 0x001233a0 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001233a0: CMP byte ptr [0x001596f1],0x1 JNZ 0x001233ef MOV RAX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RAX + 0x2a0] LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x0013471e MOV RSI,qword ptr [R14] LEA RDI,[0x14340e] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x001233ef MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001233ef: MOV EDI,0xa CALL 0x00108790 LEA RSI,[0x14341d] MOV EDI,0x2 XOR EAX,EAX CALL 0x00122129 MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c45c LEA RDX,[0x1422ae] LEA RCX,[0x1426ba] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,EAX CALL 0x001228b2 MOV RSI,qword ptr [R14] LEA RDI,[0x14328d] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x00123458 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_00123458: MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c4e2 TEST EAX,EAX JLE 0x001234c5 MOV EBP,EAX LEA RSI,[0x14333e] MOV EDI,0x2 XOR EAX,EAX CALL 0x00122129 LEA RDX,[0x1422ae] LEA RCX,[0x1426ba] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,EBP CALL 0x001228b2 MOV RSI,qword ptr [R14] LEA RDI,[0x14337f] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x001234bd MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001234bd: MOV RDI,RBX CALL 0x00123142 LAB_001234c5: MOV RDI,qword ptr [RBX + 0x40] CALL 0x00134788 TEST AL,AL JNZ 0x001234e2 MOV RDI,RBX CALL 0x00122dd4 MOV RDI,RBX CALL 0x0012302e LAB_001234e2: MOV R14,qword ptr [RBX + 0x40] MOV RDI,R14 CALL 0x0011c622 TEST EAX,EAX JZ 0x0012353d CMP byte ptr [0x00159683],0x0 JNZ 0x0012353d MOV EBX,EAX MOV RDI,R14 CALL 0x00134788 TEST AL,AL JZ 0x00123513 MOV EDI,0xa CALL 0x00108790 LAB_00123513: CMP EBX,0x1 LEA RAX,[0x1433a8] LEA RCX,[0x1433ad] CMOVZ RCX,RAX LEA RSI,[0x14342b] MOV EDI,0x3 MOV EDX,EBX XOR EAX,EAX CALL 0x00122129 LAB_0012353d: MOV RAX,qword ptr [0x00158f80] MOV RDI,qword ptr [RAX] CALL 0x00108600 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int) */ void testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd (UnitTest *param_1,int param_2) { long *plVar1; UnitTestImpl *this; long *plVar2; char cVar3; uint uVar4; int iVar5; long *plVar6; char *pcVar7; uint uVar8; int4 in_register_00000034; UnitTest *pUVar9; long *local_60 [2]; long local_50 [2]; long *local_40 [2]; long local_30 [2]; pUVar9 = (UnitTest *)CONCAT44(in_register_00000034,param_2); uVar8 = 0; ColoredPrintf(2,"[==========] "); uVar4 = UnitTestImpl::test_to_run_count(*(UnitTestImpl **)(pUVar9 + 0x40)); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); plVar2 = local_60[0]; plVar6 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xb8); plVar1 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xc0); if (plVar6 != plVar1) { uVar8 = 0; do { uVar8 = uVar8 + *(byte *)(*plVar6 + 0x70); plVar6 = plVar6 + 1; } while (plVar6 != plVar1); } /* try { // try from 0012333b to 00123354 has its CatchHandler @ 00123557 */ FormatCountableNoun_abi_cxx11_((int)local_40,(char *)(ulong)uVar8,"test suite"); printf("%s from %s ran.",plVar2,local_40[0]); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (FLAGS_gtest_print_time == '\x01') { local_40[0] = *(long **)(*(long *)(pUVar9 + 0x40) + 0x2a0); StreamableToString<long>((long *)local_60); printf(" (%s ms total)",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } } putchar(10); ColoredPrintf(2,"[ PASSED ] "); uVar4 = UnitTestImpl::successful_test_count(*(UnitTestImpl **)(pUVar9 + 0x40)); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); printf("%s.\n",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } uVar4 = UnitTestImpl::skipped_test_count(*(UnitTestImpl **)(pUVar9 + 0x40)); if (0 < (int)uVar4) { ColoredPrintf(2,"[ SKIPPED ] "); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); printf("%s, listed below:\n",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } PrintSkippedTests(pUVar9); } cVar3 = UnitTestImpl::Passed(*(UnitTestImpl **)(pUVar9 + 0x40)); if (cVar3 == '\0') { PrintFailedTests(pUVar9); PrintFailedTestSuites(pUVar9); } this = *(UnitTestImpl **)(pUVar9 + 0x40); iVar5 = UnitTestImpl::reportable_disabled_test_count(this); if ((iVar5 != 0) && (FLAGS_gtest_also_run_disabled_tests == '\0')) { cVar3 = UnitTestImpl::Passed(this); if (cVar3 != '\0') { putchar(10); } pcVar7 = "TESTS"; if (iVar5 == 1) { pcVar7 = "TEST"; } ColoredPrintf(3," YOU HAVE %d DISABLED %s\n\n",iVar5,pcVar7); } fflush(*(FILE **)PTR_stdout_00158f80); return; }
21,939
engine
qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/qshell/enginecmd.c
int32_t _engine (SVC_SHELL_IF_T * pif, char** argv, int argc, uint32_t filter) { uint32_t idx = 0 ; int found = 0 ; if (argc < 2) { engine_loginstance ((uint32_t)-1, 0) ; engine_logfilter (ENGINE_LOG_FILTER_DEFAULT, (uint16_t)-1) ; for (idx=0; idx<engine_statemachine_count(); idx++) { svc_shell_print(pif, SVC_SHELL_OUT_STD, "%s\r\n" , engine_statemachine_name(idx)) ; } svc_shell_print(pif, SVC_SHELL_OUT_STD, "statemachine logging disabled\r\n") ; return EOK ; } else { if (engine_logfilter(0,0) == ENGINE_LOG_FILTER_DEFAULT) { engine_logfilter (0, (uint16_t)-1) ; engine_loginstance (0, (uint32_t)-1) ; } for (idx=0; idx<engine_statemachine_count(); idx++) { int n ; for (n = 1; n < argc; n++) { if (strcmp(engine_statemachine_name(idx), argv[n]) == 0) { engine_loginstance (1 << idx, 0) ; engine_logfilter (filter, 0) ; svc_shell_print(pif, SVC_SHELL_OUT_STD, "statemachine '%s' logging enabled\r\n" , engine_statemachine_name(idx)) ; found++ ; } } } } svc_shell_print(pif, SVC_SHELL_OUT_STD, "engine set %d logging instance 0x%x, filter 0x%x\r\n" , found, engine_loginstance(0,0), engine_logfilter(0,0)) ; return EOK ; }
O0
c
engine: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl %ecx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl $0x0, -0x28(%rbp) cmpl $0x2, -0x1c(%rbp) jge 0x12c8c movl $0xffffffff, %edi # imm = 0xFFFFFFFF xorl %esi, %esi callq 0x13220 movl $0x6, %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x131d0 movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x30(%rbp) callq 0x12e80 movl %eax, %ecx movl -0x30(%rbp), %eax cmpl %ecx, %eax jae 0x12c69 movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x24(%rbp), %edi callq 0x12e90 movq -0x38(%rbp), %rdi movq %rax, %rcx movl $0x1, %esi leaq 0x253b9(%rip), %rdx # 0x38010 movb $0x0, %al callq 0x20ef0 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x12c20 movq -0x10(%rbp), %rdi movl $0x1, %esi leaq 0x21703(%rip), %rdx # 0x3437c movb $0x0, %al callq 0x20ef0 movl $0x0, -0x4(%rbp) jmp 0x12dc3 xorl %esi, %esi movl %esi, %edi callq 0x131d0 cmpl $0x6, %eax jne 0x12cb2 xorl %edi, %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x131d0 xorl %edi, %edi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x13220 movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x3c(%rbp) callq 0x12e80 movl %eax, %ecx movl -0x3c(%rbp), %eax cmpl %ecx, %eax jae 0x12d76 movl $0x1, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x12d66 movl -0x24(%rbp), %edi callq 0x12e90 movq %rax, %rdi movq -0x18(%rbp), %rax movslq -0x2c(%rbp), %rcx movq (%rax,%rcx,8), %rsi callq 0x6330 cmpl $0x0, %eax jne 0x12d56 movl -0x24(%rbp), %ecx movl $0x1, %edi shll %cl, %edi xorl %esi, %esi callq 0x13220 movl -0x20(%rbp), %eax xorl %esi, %esi movzwl %ax, %edi callq 0x131d0 movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x24(%rbp), %edi callq 0x12e90 movq -0x48(%rbp), %rdi movq %rax, %rcx movl $0x1, %esi leaq 0x21656(%rip), %rdx # 0x3439c movb $0x0, %al callq 0x20ef0 movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x12d58 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x12cd8 jmp 0x12d68 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x12cb9 jmp 0x12d78 movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movl -0x28(%rbp), %eax movl %eax, -0x50(%rbp) xorl %esi, %esi movl %esi, %edi callq 0x13220 movl %eax, -0x4c(%rbp) xorl %esi, %esi movl %esi, %edi callq 0x131d0 movq -0x58(%rbp), %rdi movl -0x50(%rbp), %ecx movl -0x4c(%rbp), %r8d movl %eax, %r9d movl $0x1, %esi leaq 0x2160b(%rip), %rdx # 0x343c0 movb $0x0, %al callq 0x20ef0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
_engine: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_20], ecx mov [rbp+var_24], 0 mov [rbp+var_28], 0 cmp [rbp+var_1C], 2 jge loc_12C8C mov edi, 0FFFFFFFFh xor esi, esi call engine_loginstance mov edi, 6 mov esi, 0FFFFh call engine_logfilter mov [rbp+var_24], 0 loc_12C20: mov eax, [rbp+var_24] mov [rbp+var_30], eax call engine_statemachine_count mov ecx, eax mov eax, [rbp+var_30] cmp eax, ecx jnb short loc_12C69 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov edi, [rbp+var_24] call engine_statemachine_name mov rdi, [rbp+var_38] mov rcx, rax mov esi, 1 lea rdx, a4x4d2d2d2d2d2d+23h; "%s\r\n" mov al, 0 call svc_shell_print mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_12C20 loc_12C69: mov rdi, [rbp+var_10] mov esi, 1 lea rdx, aStatemachineLo; "statemachine logging disabled\r\n" mov al, 0 call svc_shell_print mov [rbp+var_4], 0 jmp loc_12DC3 loc_12C8C: xor esi, esi mov edi, esi call engine_logfilter cmp eax, 6 jnz short loc_12CB2 xor edi, edi mov esi, 0FFFFh call engine_logfilter xor edi, edi mov esi, 0FFFFFFFFh call engine_loginstance loc_12CB2: mov [rbp+var_24], 0 loc_12CB9: mov eax, [rbp+var_24] mov [rbp+var_3C], eax call engine_statemachine_count mov ecx, eax mov eax, [rbp+var_3C] cmp eax, ecx jnb loc_12D76 mov [rbp+var_2C], 1 loc_12CD8: mov eax, [rbp+var_2C] cmp eax, [rbp+var_1C] jge loc_12D66 mov edi, [rbp+var_24] call engine_statemachine_name mov rdi, rax mov rax, [rbp+var_18] movsxd rcx, [rbp+var_2C] mov rsi, [rax+rcx*8] call _strcmp cmp eax, 0 jnz short loc_12D56 mov ecx, [rbp+var_24] mov edi, 1 shl edi, cl xor esi, esi call engine_loginstance mov eax, [rbp+var_20] xor esi, esi movzx edi, ax call engine_logfilter mov rax, [rbp+var_10] mov [rbp+var_48], rax mov edi, [rbp+var_24] call engine_statemachine_name mov rdi, [rbp+var_48] mov rcx, rax mov esi, 1 lea rdx, aStatemachineSL; "statemachine '%s' logging enabled\r\n" mov al, 0 call svc_shell_print mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax loc_12D56: jmp short $+2 loc_12D58: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_12CD8 loc_12D66: jmp short $+2 loc_12D68: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_12CB9 loc_12D76: jmp short $+2 loc_12D78: mov rax, [rbp+var_10] mov [rbp+var_58], rax mov eax, [rbp+var_28] mov [rbp+var_50], eax xor esi, esi mov edi, esi call engine_loginstance mov [rbp+var_4C], eax xor esi, esi mov edi, esi call engine_logfilter mov rdi, [rbp+var_58] mov ecx, [rbp+var_50] mov r8d, [rbp+var_4C] mov r9d, eax mov esi, 1 lea rdx, aEngineSetDLogg; "engine set %d logging instance 0x%x, fi"... mov al, 0 call svc_shell_print mov [rbp+var_4], 0 loc_12DC3: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long engine(int a1, long long a2, int a3, unsigned __int16 a4) { unsigned int v4; // ecx int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d int v9; // r9d long long v10; // rax int v11; // eax int v12; // r8d int v13; // r9d int v14; // eax char v16; // [rsp+0h] [rbp-60h] int v17; // [rsp+14h] [rbp-4Ch] int j; // [rsp+34h] [rbp-2Ch] int v19; // [rsp+38h] [rbp-28h] unsigned int k; // [rsp+3Ch] [rbp-24h] unsigned int i; // [rsp+3Ch] [rbp-24h] v19 = 0; if ( a3 >= 2 ) { if ( (unsigned int)engine_logfilter(0LL, 0LL) == 6 ) { engine_logfilter(0LL, 0xFFFFLL); engine_loginstance(0LL, 0xFFFFFFFFLL); } for ( i = 0; i < (unsigned int)engine_statemachine_count(); ++i ) { for ( j = 1; j < a3; ++j ) { v10 = engine_statemachine_name(i); if ( !(unsigned int)strcmp(v10, *(_QWORD *)(a2 + 8LL * j)) ) { engine_loginstance((unsigned int)(1 << i), 0LL); engine_logfilter(a4, 0LL); v11 = engine_statemachine_name(i); svc_shell_print(a1, 1, (unsigned int)aStatemachineSL, v11, v12, v13, v16); ++v19; } } } v17 = engine_loginstance(0LL, 0LL); v14 = engine_logfilter(0LL, 0LL); svc_shell_print(a1, 1, (unsigned int)aEngineSetDLogg, v19, v17, v14, v16); } else { engine_loginstance(0xFFFFFFFFLL, 0LL); engine_logfilter(6LL, 0xFFFFLL); for ( k = 0; ; ++k ) { v4 = engine_statemachine_count(); if ( k >= v4 ) break; v7 = engine_statemachine_name(k); svc_shell_print(a1, 1, (unsigned int)&a4x4d2d2d2d2d2d[35], v7, v8, v9, v16); } svc_shell_print(a1, 1, (unsigned int)aStatemachineLo, v4, v5, v6, v16); } return 0LL; }
_engine: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x20],ECX MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x28],0x0 CMP dword ptr [RBP + -0x1c],0x2 JGE 0x00112c8c MOV EDI,0xffffffff XOR ESI,ESI CALL 0x00113220 MOV EDI,0x6 MOV ESI,0xffff CALL 0x001131d0 MOV dword ptr [RBP + -0x24],0x0 LAB_00112c20: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x30],EAX CALL 0x00112e80 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x30] CMP EAX,ECX JNC 0x00112c69 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV EDI,dword ptr [RBP + -0x24] CALL 0x00112e90 MOV RDI,qword ptr [RBP + -0x38] MOV RCX,RAX MOV ESI,0x1 LEA RDX,[0x138010] MOV AL,0x0 CALL 0x00120ef0 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00112c20 LAB_00112c69: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 LEA RDX,[0x13437c] MOV AL,0x0 CALL 0x00120ef0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00112dc3 LAB_00112c8c: XOR ESI,ESI MOV EDI,ESI CALL 0x001131d0 CMP EAX,0x6 JNZ 0x00112cb2 XOR EDI,EDI MOV ESI,0xffff CALL 0x001131d0 XOR EDI,EDI MOV ESI,0xffffffff CALL 0x00113220 LAB_00112cb2: MOV dword ptr [RBP + -0x24],0x0 LAB_00112cb9: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x3c],EAX CALL 0x00112e80 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x3c] CMP EAX,ECX JNC 0x00112d76 MOV dword ptr [RBP + -0x2c],0x1 LAB_00112cd8: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x00112d66 MOV EDI,dword ptr [RBP + -0x24] CALL 0x00112e90 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RAX + RCX*0x8] CALL 0x00106330 CMP EAX,0x0 JNZ 0x00112d56 MOV ECX,dword ptr [RBP + -0x24] MOV EDI,0x1 SHL EDI,CL XOR ESI,ESI CALL 0x00113220 MOV EAX,dword ptr [RBP + -0x20] XOR ESI,ESI MOVZX EDI,AX CALL 0x001131d0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX MOV EDI,dword ptr [RBP + -0x24] CALL 0x00112e90 MOV RDI,qword ptr [RBP + -0x48] MOV RCX,RAX MOV ESI,0x1 LEA RDX,[0x13439c] MOV AL,0x0 CALL 0x00120ef0 MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX LAB_00112d56: JMP 0x00112d58 LAB_00112d58: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00112cd8 LAB_00112d66: JMP 0x00112d68 LAB_00112d68: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00112cb9 LAB_00112d76: JMP 0x00112d78 LAB_00112d78: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x50],EAX XOR ESI,ESI MOV EDI,ESI CALL 0x00113220 MOV dword ptr [RBP + -0x4c],EAX XOR ESI,ESI MOV EDI,ESI CALL 0x001131d0 MOV RDI,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x50] MOV R8D,dword ptr [RBP + -0x4c] MOV R9D,EAX MOV ESI,0x1 LEA RDX,[0x1343c0] MOV AL,0x0 CALL 0x00120ef0 MOV dword ptr [RBP + -0x4],0x0 LAB_00112dc3: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 _engine(int8 param_1,long param_2,int param_3,int2 param_4) { uint uVar1; int iVar2; int4 uVar3; int4 uVar4; int8 uVar5; char *__s1; int local_34; int local_30; uint local_2c; local_30 = 0; if (param_3 < 2) { engine_loginstance(0xffffffff,0); engine_logfilter(6,0xffff); local_2c = 0; while( true ) { uVar1 = engine_statemachine_count(); if (uVar1 <= local_2c) break; uVar5 = engine_statemachine_name(local_2c); svc_shell_print(param_1,1,&DAT_00138010,uVar5); local_2c = local_2c + 1; } svc_shell_print(param_1,1,s_statemachine_logging_disabled_0013437c); } else { iVar2 = engine_logfilter(0); if (iVar2 == 6) { engine_logfilter(0,0xffff); engine_loginstance(0,0xffffffff); } local_2c = 0; while( true ) { uVar1 = engine_statemachine_count(); if (uVar1 <= local_2c) break; for (local_34 = 1; local_34 < param_3; local_34 = local_34 + 1) { __s1 = (char *)engine_statemachine_name(local_2c); iVar2 = strcmp(__s1,*(char **)(param_2 + (long)local_34 * 8)); if (iVar2 == 0) { engine_loginstance(1 << ((byte)local_2c & 0x1f),0); engine_logfilter(param_4,0); uVar5 = engine_statemachine_name(local_2c); svc_shell_print(param_1,1,s_statemachine___s__logging_enable_0013439c,uVar5); local_30 = local_30 + 1; } } local_2c = local_2c + 1; } uVar3 = engine_loginstance(0); uVar4 = engine_logfilter(0); svc_shell_print(param_1,1,s_engine_set__d_logging_instance_0_001343c0,local_30,uVar3,uVar4); } return 0; }
21,940
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 0x252b58(%rip), %rax # 0x280050 movq %rax, -0x58(%rbp) jmp 0x2d4fe jmp 0x2d500 jmp 0x2d502 movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0x2d51d jmp 0x2d50d jmp 0x2d50f jmp 0x2d511 movl $0x0, -0x4(%rbp) jmp 0x2d733 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 0x2d6db 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 0x2d5be movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x2d590 movq -0x48(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x2c, %ecx movb %al, -0x59(%rbp) je 0x2d5be movq -0x48(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x3d, %ecx movb %al, -0x59(%rbp) je 0x2d5be 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 0x2d5c7 jmp 0x2d5e6 jmp 0x2d5c9 movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x2d554 movq -0x50(%rbp), %rax cmpb $0x0, (%rax) jne 0x2d673 jmp 0x2d5f5 movq -0x48(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x5a(%rbp) jae 0x2d614 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x5a(%rbp) movb -0x5a(%rbp), %al testb $0x1, %al jne 0x2d61d jmp 0x2d62b movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x48(%rbp) jmp 0x2d5f5 movq -0x48(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x2d658 movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x2d671 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x2c, %eax je 0x2d658 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x3d, %eax jne 0x2d671 movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x2d733 jmp 0x2d673 movq -0x48(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x2d6cb movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x2d6a0 movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x2c, %eax je 0x2d6cb movq -0x48(%rbp), %rax movsbl (%rax), %eax cmpl $0x3d, %eax je 0x2d6cb movq -0x50(%rbp), %rax cmpb $0x0, (%rax) je 0x2d6b4 movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x2d6cb 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 0x2d6cd movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0x2d52b cmpl $0x0, -0x2c(%rbp) je 0x2d6ee movq -0x10(%rbp), %rax movq (%rax), %rax cmpq -0x28(%rbp), %rax jne 0x2d6fd jmp 0x2d6f0 jmp 0x2d6f2 jmp 0x2d6f4 movl $0x0, -0x4(%rbp) jmp 0x2d733 cmpl $0x1, -0x2c(%rbp) jne 0x2d70e movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x2d71d jmp 0x2d710 jmp 0x2d712 jmp 0x2d714 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x2d733 jmp 0x2d71f 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_2D4FE: jmp short $+2 loc_2D500: jmp short $+2 loc_2D502: mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_2D51D jmp short $+2 loc_2D50D: jmp short $+2 loc_2D50F: jmp short $+2 loc_2D511: mov [rbp+var_4], 0 jmp loc_2D733 loc_2D51D: mov [rbp+var_2C], 0 mov [rbp+var_30], 0 loc_2D52B: 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_2D6DB mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax loc_2D554: mov rcx, [rbp+var_48] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_59], al jnb short loc_2D5BE mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_2D590 mov rax, [rbp+var_48] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 2Ch ; ',' mov [rbp+var_59], al jz short loc_2D5BE mov rax, [rbp+var_48] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 3Dh ; '=' mov [rbp+var_59], al jz short loc_2D5BE loc_2D590: 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_2D5BE: mov al, [rbp+var_59] test al, 1 jnz short loc_2D5C7 jmp short loc_2D5E6 loc_2D5C7: jmp short $+2 loc_2D5C9: 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_2D554 loc_2D5E6: mov rax, [rbp+var_50] cmp byte ptr [rax], 0 jnz loc_2D673 jmp short $+2 loc_2D5F5: mov rcx, [rbp+var_48] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_5A], al jnb short loc_2D614 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' setz al mov [rbp+var_5A], al loc_2D614: mov al, [rbp+var_5A] test al, 1 jnz short loc_2D61D jmp short loc_2D62B loc_2D61D: mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_48], rax jmp short loc_2D5F5 loc_2D62B: mov rax, [rbp+var_48] cmp rax, [rbp+var_28] jnb short loc_2D658 mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_2D671 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jz short loc_2D658 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 3Dh ; '=' jnz short loc_2D671 loc_2D658: 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_2D733 loc_2D671: jmp short $+2 loc_2D673: mov rax, [rbp+var_48] cmp rax, [rbp+var_28] jb short loc_2D6CB mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jz short loc_2D6A0 mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jz short loc_2D6CB mov rax, [rbp+var_48] movsx eax, byte ptr [rax] cmp eax, 3Dh ; '=' jz short loc_2D6CB loc_2D6A0: mov rax, [rbp+var_50] cmp byte ptr [rax], 0 jz short loc_2D6B4 mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jnz short loc_2D6CB loc_2D6B4: 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_2D6CB: jmp short $+2 loc_2D6CD: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp loc_2D52B loc_2D6DB: cmp [rbp+var_2C], 0 jz short loc_2D6EE mov rax, [rbp+var_10] mov rax, [rax] cmp rax, [rbp+var_28] jnz short loc_2D6FD loc_2D6EE: jmp short $+2 loc_2D6F0: jmp short $+2 loc_2D6F2: jmp short $+2 loc_2D6F4: mov [rbp+var_4], 0 jmp short loc_2D733 loc_2D6FD: cmp [rbp+var_2C], 1 jnz short loc_2D70E mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jz short loc_2D71D loc_2D70E: jmp short $+2 loc_2D710: jmp short $+2 loc_2D712: jmp short $+2 loc_2D714: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_2D733 loc_2D71D: jmp short $+2 loc_2D71F: 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_2D733: 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,[0x380050] MOV qword ptr [RBP + -0x58],RAX JMP 0x0012d4fe LAB_0012d4fe: JMP 0x0012d500 LAB_0012d500: JMP 0x0012d502 LAB_0012d502: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x0012d51d JMP 0x0012d50d LAB_0012d50d: JMP 0x0012d50f LAB_0012d50f: JMP 0x0012d511 LAB_0012d511: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012d733 LAB_0012d51d: MOV dword ptr [RBP + -0x2c],0x0 MOV dword ptr [RBP + -0x30],0x0 LAB_0012d52b: 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 0x0012d6db MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_0012d554: MOV RCX,qword ptr [RBP + -0x48] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x59],AL JNC 0x0012d5be MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x0012d590 MOV RAX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x2c MOV byte ptr [RBP + -0x59],AL JZ 0x0012d5be MOV RAX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x3d MOV byte ptr [RBP + -0x59],AL JZ 0x0012d5be LAB_0012d590: 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_0012d5be: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x0012d5c7 JMP 0x0012d5e6 LAB_0012d5c7: JMP 0x0012d5c9 LAB_0012d5c9: 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 0x0012d554 LAB_0012d5e6: MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX],0x0 JNZ 0x0012d673 JMP 0x0012d5f5 LAB_0012d5f5: MOV RCX,qword ptr [RBP + -0x48] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x5a],AL JNC 0x0012d614 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x5a],AL LAB_0012d614: MOV AL,byte ptr [RBP + -0x5a] TEST AL,0x1 JNZ 0x0012d61d JMP 0x0012d62b LAB_0012d61d: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x0012d5f5 LAB_0012d62b: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x28] JNC 0x0012d658 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x0012d671 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JZ 0x0012d658 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3d JNZ 0x0012d671 LAB_0012d658: 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 0x0012d733 LAB_0012d671: JMP 0x0012d673 LAB_0012d673: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x28] JC 0x0012d6cb MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JZ 0x0012d6a0 MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JZ 0x0012d6cb MOV RAX,qword ptr [RBP + -0x48] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3d JZ 0x0012d6cb LAB_0012d6a0: MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX],0x0 JZ 0x0012d6b4 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0012d6cb LAB_0012d6b4: 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_0012d6cb: JMP 0x0012d6cd LAB_0012d6cd: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x0012d52b LAB_0012d6db: CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0012d6ee MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0012d6fd LAB_0012d6ee: JMP 0x0012d6f0 LAB_0012d6f0: JMP 0x0012d6f2 LAB_0012d6f2: JMP 0x0012d6f4 LAB_0012d6f4: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012d733 LAB_0012d6fd: CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x0012d70e MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JZ 0x0012d71d LAB_0012d70e: JMP 0x0012d710 LAB_0012d710: JMP 0x0012d712 LAB_0012d712: JMP 0x0012d714 LAB_0012d714: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0012d733 LAB_0012d71d: JMP 0x0012d71f LAB_0012d71f: 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_0012d733: 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_003800a0[*local_50] == PTR_to_upper_latin1_003800a0[*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; }
21,941
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); }
O3
c
find_type_eol: xorl %eax, %eax cmpl $0x0, (%rsi) je 0x2acd1 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x10(%rsi), %r8 movq (%r8), %r13 testq %r13, %r13 je 0x2acc7 movq (%rdi), %r10 leaq 0x2f238d(%rip), %rax # 0x31cf40 movq 0x50(%rax), %rbx movq %rcx, %r14 subq %r10, %r14 xorl %eax, %eax xorl %r11d, %r11d cmpq %rcx, %r10 jae 0x2ac05 leaq (%r14,%r13), %r9 movq %r10, %r15 movzbl (%r15), %r12d testb $0x8, %dl je 0x2abe3 cmpq $0x2c, %r12 je 0x2ac08 cmpl $0x3d, %r12d je 0x2ac08 movb (%rbx,%r12), %sil movzbl (%r13), %r12d cmpb (%rbx,%r12), %sil jne 0x2ac0c incq %r15 incq %r13 cmpq %rcx, %r15 jne 0x2abce movq %rcx, %r15 movq %r9, %r13 jmp 0x2ac08 movq %r10, %r15 movb (%r13), %r12b testb %r12b, %r12b je 0x2ac1d cmpq %rcx, %r15 jb 0x2ac81 testb $0x8, %dl jne 0x2ac5d jmp 0x2ac6d cmpq %rcx, %r15 jae 0x2acc2 movq %rcx, %r9 subq %r15, %r9 movzbl (%r15), %r13d cmpl $0x20, %r13d jne 0x2ac40 incq %r15 decq %r9 jne 0x2ac2c jmp 0x2acbf testb $0x8, %dl jne 0x2ac4c cmpq %rcx, %r15 jae 0x2ac6d jmp 0x2ac81 cmpl $0x3d, %r13d je 0x2acc2 cmpl $0x2c, %r13d je 0x2acc2 cmpq %rcx, %r15 jb 0x2ac81 movzbl (%r15), %r9d cmpl $0x2c, %r9d je 0x2ac81 cmpl $0x3d, %r9d je 0x2ac81 testb $0x1, %dl je 0x2ac77 testb %r12b, %r12b jne 0x2ac81 incl %r11d movl %eax, -0x2c(%rbp) movq %r15, -0x38(%rbp) movq 0x8(%r8,%rax,8), %r13 incq %rax testq %r13, %r13 jne 0x2abc2 xorl %eax, %eax testl %r11d, %r11d je 0x2acc7 cmpq %rcx, (%rdi) je 0x2acc7 cmpl $0x1, %r11d setne %cl movl $0xffffffff, %eax # imm = 0xFFFFFFFF orb %cl, %dl testb $0x1, %dl jne 0x2acc7 movl -0x2c(%rbp), %eax incl %eax movq -0x38(%rbp), %rcx movq %rcx, (%rdi) jmp 0x2acc7 movq %rcx, %r15 movq %r15, (%rdi) incl %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
find_type_eol: xor eax, eax cmp dword ptr [rsi], 0 jz locret_2ACD1 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r8, [rsi+10h] mov r13, [r8] test r13, r13 jz loc_2ACC7 mov r10, [rdi] lea rax, my_charset_latin1 mov rbx, [rax+50h] mov r14, rcx sub r14, r10 xor eax, eax xor r11d, r11d loc_2ABC2: cmp r10, rcx jnb short loc_2AC05 lea r9, [r14+r13] mov r15, r10 loc_2ABCE: movzx r12d, byte ptr [r15] test dl, 8 jz short loc_2ABE3 cmp r12, 2Ch ; ',' jz short loc_2AC08 cmp r12d, 3Dh ; '=' jz short loc_2AC08 loc_2ABE3: mov sil, [rbx+r12] movzx r12d, byte ptr [r13+0] cmp sil, [rbx+r12] jnz short loc_2AC0C inc r15 inc r13 cmp r15, rcx jnz short loc_2ABCE mov r15, rcx mov r13, r9 jmp short loc_2AC08 loc_2AC05: mov r15, r10 loc_2AC08: mov r12b, [r13+0] loc_2AC0C: test r12b, r12b jz short loc_2AC1D cmp r15, rcx jb short loc_2AC81 test dl, 8 jnz short loc_2AC5D jmp short loc_2AC6D loc_2AC1D: cmp r15, rcx jnb loc_2ACC2 mov r9, rcx sub r9, r15 loc_2AC2C: movzx r13d, byte ptr [r15] cmp r13d, 20h ; ' ' jnz short loc_2AC40 inc r15 dec r9 jnz short loc_2AC2C jmp short loc_2ACBF loc_2AC40: test dl, 8 jnz short loc_2AC4C cmp r15, rcx jnb short loc_2AC6D jmp short loc_2AC81 loc_2AC4C: cmp r13d, 3Dh ; '=' jz short loc_2ACC2 cmp r13d, 2Ch ; ',' jz short loc_2ACC2 cmp r15, rcx jb short loc_2AC81 loc_2AC5D: movzx r9d, byte ptr [r15] cmp r9d, 2Ch ; ',' jz short loc_2AC81 cmp r9d, 3Dh ; '=' jz short loc_2AC81 loc_2AC6D: test dl, 1 jz short loc_2AC77 test r12b, r12b jnz short loc_2AC81 loc_2AC77: inc r11d mov [rbp-2Ch], eax mov [rbp-38h], r15 loc_2AC81: mov r13, [r8+rax*8+8] inc rax test r13, r13 jnz loc_2ABC2 xor eax, eax test r11d, r11d jz short loc_2ACC7 cmp [rdi], rcx jz short loc_2ACC7 cmp r11d, 1 setnz cl mov eax, 0FFFFFFFFh or dl, cl test dl, 1 jnz short loc_2ACC7 mov eax, [rbp-2Ch] inc eax mov rcx, [rbp-38h] mov [rdi], rcx jmp short loc_2ACC7 loc_2ACBF: mov r15, rcx loc_2ACC2: mov [rdi], r15 inc eax loc_2ACC7: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_2ACD1: retn
long long find_type_eol(_QWORD *a1, long long a2, char a3, unsigned __int8 *a4) { long long result; // rax _BYTE **v5; // r8 _BYTE *v6; // r13 unsigned __int8 *v7; // r10 long long v8; // rbx unsigned __int8 *v9; // r14 long long v10; // rax int v11; // r11d _BYTE *v12; // r9 unsigned __int8 *v13; // r15 long long v14; // r12 char v15; // si long long v16; // r12 signed long long v17; // r9 int v18; // r13d int v19; // r9d long long v20; // [rsp-8h] [rbp-8h] result = 0LL; if ( !*(_DWORD *)a2 ) return result; v5 = *(_BYTE ***)(a2 + 16); v6 = *v5; if ( !*v5 ) return result; v7 = (unsigned __int8 *)*a1; v8 = *((_QWORD *)&my_charset_latin1 + 10); v9 = &a4[-*a1]; v10 = 0LL; v11 = 0; do { if ( v7 >= a4 ) { v13 = v7; } else { v12 = &v6[(_QWORD)v9]; v13 = v7; while ( 1 ) { v14 = *v13; if ( (a3 & 8) != 0 && (v14 == 44 || (_DWORD)v14 == 61) ) break; v15 = *(_BYTE *)(v8 + v14); v16 = (unsigned __int8)*v6; if ( v15 != *(_BYTE *)(v8 + v16) ) goto LABEL_14; ++v13; ++v6; if ( v13 == a4 ) { v13 = a4; v6 = v12; break; } } } LOBYTE(v16) = *v6; LABEL_14: if ( (_BYTE)v16 ) { if ( v13 < a4 ) goto LABEL_34; if ( (a3 & 8) != 0 ) { LABEL_29: v19 = *v13; if ( v19 == 44 || v19 == 61 ) goto LABEL_34; } LABEL_31: if ( (a3 & 1) == 0 || !(_BYTE)v16 ) { ++v11; *((_DWORD *)&v20 - 11) = v10; *(&v20 - 7) = (long long)v13; } goto LABEL_34; } if ( v13 >= a4 ) goto LABEL_39; v17 = a4 - v13; while ( 1 ) { v18 = *v13; if ( v18 != 32 ) break; ++v13; if ( !--v17 ) { v13 = a4; goto LABEL_39; } } if ( (a3 & 8) == 0 ) { if ( v13 < a4 ) goto LABEL_34; goto LABEL_31; } if ( v18 == 61 || v18 == 44 ) { LABEL_39: *a1 = v13; return (unsigned int)(v10 + 1); } if ( v13 >= a4 ) goto LABEL_29; LABEL_34: v6 = v5[++v10]; } while ( v6 ); result = 0LL; if ( v11 && (unsigned __int8 *)*a1 != a4 ) { result = 0xFFFFFFFFLL; if ( !((v11 != 1) | a3 & 1) ) { result = (unsigned int)(*((_DWORD *)&v20 - 11) + 1); *a1 = *(&v20 - 7); } } return result; }
find_type_eol: XOR EAX,EAX CMP dword ptr [RSI],0x0 JZ 0x0012acd1 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R8,qword ptr [RSI + 0x10] MOV R13,qword ptr [R8] TEST R13,R13 JZ 0x0012acc7 MOV R10,qword ptr [RDI] LEA RAX,[0x41cf40] MOV RBX,qword ptr [RAX + 0x50] MOV R14,RCX SUB R14,R10 XOR EAX,EAX XOR R11D,R11D LAB_0012abc2: CMP R10,RCX JNC 0x0012ac05 LEA R9,[R14 + R13*0x1] MOV R15,R10 LAB_0012abce: MOVZX R12D,byte ptr [R15] TEST DL,0x8 JZ 0x0012abe3 CMP R12,0x2c JZ 0x0012ac08 CMP R12D,0x3d JZ 0x0012ac08 LAB_0012abe3: MOV SIL,byte ptr [RBX + R12*0x1] MOVZX R12D,byte ptr [R13] CMP SIL,byte ptr [RBX + R12*0x1] JNZ 0x0012ac0c INC R15 INC R13 CMP R15,RCX JNZ 0x0012abce MOV R15,RCX MOV R13,R9 JMP 0x0012ac08 LAB_0012ac05: MOV R15,R10 LAB_0012ac08: MOV R12B,byte ptr [R13] LAB_0012ac0c: TEST R12B,R12B JZ 0x0012ac1d CMP R15,RCX JC 0x0012ac81 TEST DL,0x8 JNZ 0x0012ac5d JMP 0x0012ac6d LAB_0012ac1d: CMP R15,RCX JNC 0x0012acc2 MOV R9,RCX SUB R9,R15 LAB_0012ac2c: MOVZX R13D,byte ptr [R15] CMP R13D,0x20 JNZ 0x0012ac40 INC R15 DEC R9 JNZ 0x0012ac2c JMP 0x0012acbf LAB_0012ac40: TEST DL,0x8 JNZ 0x0012ac4c CMP R15,RCX JNC 0x0012ac6d JMP 0x0012ac81 LAB_0012ac4c: CMP R13D,0x3d JZ 0x0012acc2 CMP R13D,0x2c JZ 0x0012acc2 CMP R15,RCX JC 0x0012ac81 LAB_0012ac5d: MOVZX R9D,byte ptr [R15] CMP R9D,0x2c JZ 0x0012ac81 CMP R9D,0x3d JZ 0x0012ac81 LAB_0012ac6d: TEST DL,0x1 JZ 0x0012ac77 TEST R12B,R12B JNZ 0x0012ac81 LAB_0012ac77: INC R11D MOV dword ptr [RBP + -0x2c],EAX MOV qword ptr [RBP + -0x38],R15 LAB_0012ac81: MOV R13,qword ptr [R8 + RAX*0x8 + 0x8] INC RAX TEST R13,R13 JNZ 0x0012abc2 XOR EAX,EAX TEST R11D,R11D JZ 0x0012acc7 CMP qword ptr [RDI],RCX JZ 0x0012acc7 CMP R11D,0x1 SETNZ CL MOV EAX,0xffffffff OR DL,CL TEST DL,0x1 JNZ 0x0012acc7 MOV EAX,dword ptr [RBP + -0x2c] INC EAX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RDI],RCX JMP 0x0012acc7 LAB_0012acbf: MOV R15,RCX LAB_0012acc2: MOV qword ptr [RDI],R15 INC EAX LAB_0012acc7: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0012acd1: RET
int find_type_eol(int8 *param_1,int *param_2,byte param_3,byte *param_4) { byte *pbVar1; byte bVar2; byte *pbVar3; int iVar4; long lVar5; long lVar6; int iVar7; byte bVar8; byte *pbVar9; byte *pbVar10; byte *pbVar11; byte *pbVar12; byte *local_40; int local_34; iVar4 = 0; if (*param_2 != 0) { pbVar9 = (byte *)**(int8 **)(param_2 + 4); if (pbVar9 != (byte *)0x0) { pbVar3 = (byte *)*param_1; lVar5 = 0; iVar7 = 0; do { pbVar10 = pbVar9; pbVar12 = pbVar3; if (pbVar3 < param_4) { pbVar1 = pbVar9 + ((long)param_4 - (long)pbVar3); pbVar11 = pbVar3; do { bVar2 = *pbVar11; pbVar12 = pbVar11; if (((param_3 & 8) != 0) && ((pbVar10 = pbVar9, (ulong)bVar2 == 0x2c || (bVar2 == 0x3d)))) break; bVar8 = *pbVar9; if (PTR_to_upper_latin1_0041cf90[bVar2] != PTR_to_upper_latin1_0041cf90[bVar8]) goto LAB_0012ac0c; pbVar11 = pbVar11 + 1; pbVar9 = pbVar9 + 1; pbVar10 = pbVar1; pbVar12 = param_4; } while (pbVar11 != param_4); } bVar8 = *pbVar10; LAB_0012ac0c: if (bVar8 == 0) { pbVar9 = pbVar12; if (param_4 <= pbVar12) { LAB_0012acc2: *param_1 = pbVar9; return (int)lVar5 + 1; } lVar6 = (long)param_4 - (long)pbVar12; while (bVar2 = *pbVar12, bVar2 == 0x20) { pbVar12 = pbVar12 + 1; lVar6 = lVar6 + -1; pbVar9 = param_4; if (lVar6 == 0) goto LAB_0012acc2; } if ((param_3 & 8) == 0) { if (param_4 <= pbVar12) goto LAB_0012ac6d; } else { pbVar9 = pbVar12; if ((bVar2 == 0x3d) || (bVar2 == 0x2c)) goto LAB_0012acc2; if (param_4 <= pbVar12) goto LAB_0012ac5d; } } else if (param_4 <= pbVar12) { if ((param_3 & 8) != 0) { LAB_0012ac5d: if ((*pbVar12 == 0x2c) || (*pbVar12 == 0x3d)) goto LAB_0012ac81; } LAB_0012ac6d: if (((param_3 & 1) == 0) || (bVar8 == 0)) { iVar7 = iVar7 + 1; local_40 = pbVar12; local_34 = (int)lVar5; } } LAB_0012ac81: pbVar9 = (byte *)(*(int8 **)(param_2 + 4))[lVar5 + 1]; lVar5 = lVar5 + 1; } while (pbVar9 != (byte *)0x0); iVar4 = 0; if (((iVar7 != 0) && ((byte *)*param_1 != param_4)) && (iVar4 = -1, (param_3 & 1) == 0 && iVar7 == 1)) { iVar4 = local_34 + 1; *param_1 = local_40; } } } return iVar4; }
21,942
rlCheckErrors
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void rlCheckErrors(void) { #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) int check = 1; while (check) { const GLenum err = glGetError(); switch (err) { case GL_NO_ERROR: check = 0; break; case 0x0500: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_ENUM"); break; case 0x0501: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_VALUE"); break; case 0x0502: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_OPERATION"); break; case 0x0503: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_STACK_OVERFLOW"); break; case 0x0504: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_STACK_UNDERFLOW"); break; case 0x0505: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_OUT_OF_MEMORY"); break; case 0x0506: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_FRAMEBUFFER_OPERATION"); break; default: TRACELOG(RL_LOG_WARNING, "GL: Error detected: Unknown error code: %x", err); break; } } #endif }
O0
c
rlCheckErrors: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x1, -0x4(%rbp) cmpl $0x0, -0x4(%rbp) je 0xb31a5 movq 0x165b88(%rip), %rax # 0x218bf8 callq *%rax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax movl %eax, -0xc(%rbp) testl %eax, %eax je 0xb30e8 jmp 0xb3081 movl -0xc(%rbp), %eax subl $0x500, %eax # imm = 0x500 je 0xb30f4 jmp 0xb308d movl -0xc(%rbp), %eax subl $0x501, %eax # imm = 0x501 je 0xb310c jmp 0xb3099 movl -0xc(%rbp), %eax subl $0x502, %eax # imm = 0x502 je 0xb3121 jmp 0xb30a5 movl -0xc(%rbp), %eax subl $0x503, %eax # imm = 0x503 je 0xb3136 jmp 0xb30b5 movl -0xc(%rbp), %eax subl $0x504, %eax # imm = 0x504 je 0xb314b jmp 0xb30c5 movl -0xc(%rbp), %eax subl $0x505, %eax # imm = 0x505 je 0xb3160 jmp 0xb30d5 movl -0xc(%rbp), %eax subl $0x506, %eax # imm = 0x506 je 0xb3175 jmp 0xb318a movl $0x0, -0x4(%rbp) jmp 0xb31a0 movl $0x4, %edi leaq 0x10134a(%rip), %rsi # 0x1b444a movb $0x0, %al callq 0x182c40 jmp 0xb31a0 movl $0x4, %edi leaq 0x101356(%rip), %rsi # 0x1b446e movb $0x0, %al callq 0x182c40 jmp 0xb31a0 movl $0x4, %edi leaq 0x101366(%rip), %rsi # 0x1b4493 movb $0x0, %al callq 0x182c40 jmp 0xb31a0 movl $0x4, %edi leaq 0x10137a(%rip), %rsi # 0x1b44bc movb $0x0, %al callq 0x182c40 jmp 0xb31a0 movl $0x4, %edi leaq 0x10138b(%rip), %rsi # 0x1b44e2 movb $0x0, %al callq 0x182c40 jmp 0xb31a0 movl $0x4, %edi leaq 0x10139d(%rip), %rsi # 0x1b4509 movb $0x0, %al callq 0x182c40 jmp 0xb31a0 movl $0x4, %edi leaq 0x1013ad(%rip), %rsi # 0x1b452e movb $0x0, %al callq 0x182c40 jmp 0xb31a0 movl -0x8(%rbp), %edx movl $0x4, %edi leaq 0x1013ca(%rip), %rsi # 0x1b4563 movb $0x0, %al callq 0x182c40 jmp 0xb305f addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
rlCheckErrors: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], 1 loc_B305F: cmp [rbp+var_4], 0 jz loc_B31A5 mov rax, cs:glad_glGetError call rax ; glad_glGetError mov [rbp+var_8], eax mov eax, [rbp+var_8] mov [rbp+var_C], eax test eax, eax jz short loc_B30E8 jmp short $+2 loc_B3081: mov eax, [rbp+var_C] sub eax, 500h jz short loc_B30F4 jmp short $+2 loc_B308D: mov eax, [rbp+var_C] sub eax, 501h jz short loc_B310C jmp short $+2 loc_B3099: mov eax, [rbp+var_C] sub eax, 502h jz short loc_B3121 jmp short $+2 loc_B30A5: mov eax, [rbp+var_C] sub eax, 503h jz loc_B3136 jmp short $+2 loc_B30B5: mov eax, [rbp+var_C] sub eax, 504h jz loc_B314B jmp short $+2 loc_B30C5: mov eax, [rbp+var_C] sub eax, 505h jz loc_B3160 jmp short $+2 loc_B30D5: mov eax, [rbp+var_C] sub eax, 506h jz loc_B3175 jmp loc_B318A loc_B30E8: mov [rbp+var_4], 0 jmp loc_B31A0 loc_B30F4: mov edi, 4 lea rsi, aGlErrorDetecte; "GL: Error detected: GL_INVALID_ENUM" mov al, 0 call TraceLog jmp loc_B31A0 loc_B310C: mov edi, 4 lea rsi, aGlErrorDetecte_0; "GL: Error detected: GL_INVALID_VALUE" mov al, 0 call TraceLog jmp short loc_B31A0 loc_B3121: mov edi, 4 lea rsi, aGlErrorDetecte_1; "GL: Error detected: GL_INVALID_OPERATIO"... mov al, 0 call TraceLog jmp short loc_B31A0 loc_B3136: mov edi, 4 lea rsi, aGlErrorDetecte_2; "GL: Error detected: GL_STACK_OVERFLOW" mov al, 0 call TraceLog jmp short loc_B31A0 loc_B314B: mov edi, 4 lea rsi, aGlErrorDetecte_3; "GL: Error detected: GL_STACK_UNDERFLOW" mov al, 0 call TraceLog jmp short loc_B31A0 loc_B3160: mov edi, 4 lea rsi, aGlErrorDetecte_4; "GL: Error detected: GL_OUT_OF_MEMORY" mov al, 0 call TraceLog jmp short loc_B31A0 loc_B3175: mov edi, 4 lea rsi, aGlErrorDetecte_5; "GL: Error detected: GL_INVALID_FRAMEBUF"... mov al, 0 call TraceLog jmp short loc_B31A0 loc_B318A: mov edx, [rbp+var_8] mov edi, 4 lea rsi, aGlErrorDetecte_6; "GL: Error detected: Unknown error code:"... mov al, 0 call TraceLog loc_B31A0: jmp loc_B305F loc_B31A5: add rsp, 10h pop rbp retn
void rlCheckErrors() { int v0; // edx int v1; // ecx int v2; // r8d int v3; // r9d int Error; // [rsp+8h] [rbp-8h] int v5; // [rsp+Ch] [rbp-4h] v5 = 1; while ( v5 ) { Error = glad_glGetError(); if ( Error ) { switch ( Error ) { case 1280: TraceLog(4, (unsigned int)"GL: Error detected: GL_INVALID_ENUM", v0, v1, v2, v3); break; case 1281: TraceLog(4, (unsigned int)"GL: Error detected: GL_INVALID_VALUE", v0, v1, v2, v3); break; case 1282: TraceLog(4, (unsigned int)"GL: Error detected: GL_INVALID_OPERATION", v0, v1, v2, v3); break; case 1283: TraceLog(4, (unsigned int)"GL: Error detected: GL_STACK_OVERFLOW", v0, v1, v2, v3); break; case 1284: TraceLog(4, (unsigned int)"GL: Error detected: GL_STACK_UNDERFLOW", v0, v1, v2, v3); break; case 1285: TraceLog(4, (unsigned int)"GL: Error detected: GL_OUT_OF_MEMORY", v0, v1, v2, v3); break; case 1286: TraceLog(4, (unsigned int)"GL: Error detected: GL_INVALID_FRAMEBUFFER_OPERATION", v0, v1, v2, v3); break; default: TraceLog(4, (unsigned int)"GL: Error detected: Unknown error code: %x", Error, v1, v2, v3); break; } } else { v5 = 0; } } }
rlCheckErrors: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],0x1 LAB_001b305f: CMP dword ptr [RBP + -0x4],0x0 JZ 0x001b31a5 MOV RAX,qword ptr [0x00318bf8] CALL RAX MOV dword ptr [RBP + -0x8],EAX MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0xc],EAX TEST EAX,EAX JZ 0x001b30e8 JMP 0x001b3081 LAB_001b3081: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x500 JZ 0x001b30f4 JMP 0x001b308d LAB_001b308d: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x501 JZ 0x001b310c JMP 0x001b3099 LAB_001b3099: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x502 JZ 0x001b3121 JMP 0x001b30a5 LAB_001b30a5: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x503 JZ 0x001b3136 JMP 0x001b30b5 LAB_001b30b5: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x504 JZ 0x001b314b JMP 0x001b30c5 LAB_001b30c5: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x505 JZ 0x001b3160 JMP 0x001b30d5 LAB_001b30d5: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x506 JZ 0x001b3175 JMP 0x001b318a LAB_001b30e8: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001b31a0 LAB_001b30f4: MOV EDI,0x4 LEA RSI,[0x2b444a] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b31a0 LAB_001b310c: MOV EDI,0x4 LEA RSI,[0x2b446e] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b31a0 LAB_001b3121: MOV EDI,0x4 LEA RSI,[0x2b4493] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b31a0 LAB_001b3136: MOV EDI,0x4 LEA RSI,[0x2b44bc] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b31a0 LAB_001b314b: MOV EDI,0x4 LEA RSI,[0x2b44e2] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b31a0 LAB_001b3160: MOV EDI,0x4 LEA RSI,[0x2b4509] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b31a0 LAB_001b3175: MOV EDI,0x4 LEA RSI,[0x2b452e] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b31a0 LAB_001b318a: MOV EDX,dword ptr [RBP + -0x8] MOV EDI,0x4 LEA RSI,[0x2b4563] MOV AL,0x0 CALL 0x00282c40 LAB_001b31a0: JMP 0x001b305f LAB_001b31a5: ADD RSP,0x10 POP RBP RET
void rlCheckErrors(void) { bool bVar1; int iVar2; bVar1 = true; while (bVar1) { iVar2 = (*glad_glGetError)(); if (iVar2 == 0) { bVar1 = false; } else if (iVar2 == 0x500) { TraceLog(4,"GL: Error detected: GL_INVALID_ENUM"); } else if (iVar2 == 0x501) { TraceLog(4,"GL: Error detected: GL_INVALID_VALUE"); } else if (iVar2 == 0x502) { TraceLog(4,"GL: Error detected: GL_INVALID_OPERATION"); } else if (iVar2 == 0x503) { TraceLog(4,"GL: Error detected: GL_STACK_OVERFLOW"); } else if (iVar2 == 0x504) { TraceLog(4,"GL: Error detected: GL_STACK_UNDERFLOW"); } else if (iVar2 == 0x505) { TraceLog(4,"GL: Error detected: GL_OUT_OF_MEMORY"); } else if (iVar2 == 0x506) { TraceLog(4,"GL: Error detected: GL_INVALID_FRAMEBUFFER_OPERATION"); } else { TraceLog(4,"GL: Error detected: Unknown error code: %x",iVar2); } } return; }
21,943
rlCheckErrors
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void rlCheckErrors(void) { #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) int check = 1; while (check) { const GLenum err = glGetError(); switch (err) { case GL_NO_ERROR: check = 0; break; case 0x0500: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_ENUM"); break; case 0x0501: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_VALUE"); break; case 0x0502: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_OPERATION"); break; case 0x0503: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_STACK_OVERFLOW"); break; case 0x0504: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_STACK_UNDERFLOW"); break; case 0x0505: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_OUT_OF_MEMORY"); break; case 0x0506: TRACELOG(RL_LOG_WARNING, "GL: Error detected: GL_INVALID_FRAMEBUFFER_OPERATION"); break; default: TRACELOG(RL_LOG_WARNING, "GL: Error detected: Unknown error code: %x", err); break; } } #endif }
O2
c
rlCheckErrors: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax pushq $0x1 popq %r12 pushq $0x4 popq %rbp leaq 0x704dd(%rip), %r13 # 0xc36d0 leaq 0x71a10(%rip), %rbx # 0xc4c0a leaq 0x71a30(%rip), %r14 # 0xc4c31 leaq 0x71a4e(%rip), %r15 # 0xc4c56 movl %r12d, %eax testl %eax, %eax je 0x5328d callq *0xd2943(%rip) # 0x125b58 leal -0x500(%rax), %ecx cmpl $0x6, %ecx jbe 0x53238 testl %eax, %eax je 0x5320b movl %ebp, %edi leaq 0x71a5e(%rip), %rsi # 0xc4c8b movl %eax, %edx xorl %eax, %eax callq 0xa128b jmp 0x53208 movslq (%r13,%rcx,4), %rax addq %r13, %rax jmpq *%rax movl %ebp, %edi leaq 0x71927(%rip), %rsi # 0xc4b72 jmp 0x53281 movl %ebp, %edi movq %rbx, %rsi jmp 0x53281 movl %ebp, %edi leaq 0x7195e(%rip), %rsi # 0xc4bbb jmp 0x53281 movl %ebp, %edi leaq 0x7197c(%rip), %rsi # 0xc4be4 jmp 0x53281 movl %ebp, %edi leaq 0x71923(%rip), %rsi # 0xc4b96 jmp 0x53281 movl %ebp, %edi movq %r14, %rsi jmp 0x53281 movl %ebp, %edi movq %r15, %rsi xorl %eax, %eax callq 0xa128b jmp 0x53208 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
rlCheckErrors: push rbp push r15 push r14 push r13 push r12 push rbx push rax push 1 pop r12 push 4 pop rbp lea r13, jpt_53240 lea rbx, aGlErrorDetecte; "GL: Error detected: GL_STACK_UNDERFLOW" lea r14, aGlErrorDetecte_0; "GL: Error detected: GL_OUT_OF_MEMORY" lea r15, aGlErrorDetecte_1; "GL: Error detected: GL_INVALID_FRAMEBUF"... loc_53208: mov eax, r12d loc_5320B: test eax, eax jz short loc_5328D call cs:glad_glGetError lea ecx, [rax-500h]; switch 7 cases cmp ecx, 6 jbe short loc_53238 def_53240: test eax, eax; jumptable 0000000000053240 default case jz short loc_5320B mov edi, ebp lea rsi, aGlErrorDetecte_2; "GL: Error detected: Unknown error code:"... mov edx, eax xor eax, eax call TraceLog jmp short loc_53208 loc_53238: movsxd rax, ds:(jpt_53240 - 0C36D0h)[r13+rcx*4] add rax, r13 jmp rax; switch jump loc_53242: mov edi, ebp; jumptable 0000000000053240 case 1280 lea rsi, aGlErrorDetecte_3; "GL: Error detected: GL_INVALID_ENUM" jmp short loc_53281 loc_5324D: mov edi, ebp; jumptable 0000000000053240 case 1284 mov rsi, rbx jmp short loc_53281 loc_53254: mov edi, ebp; jumptable 0000000000053240 case 1282 lea rsi, aGlErrorDetecte_4; "GL: Error detected: GL_INVALID_OPERATIO"... jmp short loc_53281 loc_5325F: mov edi, ebp; jumptable 0000000000053240 case 1283 lea rsi, aGlErrorDetecte_5; "GL: Error detected: GL_STACK_OVERFLOW" jmp short loc_53281 loc_5326A: mov edi, ebp; jumptable 0000000000053240 case 1281 lea rsi, aGlErrorDetecte_6; "GL: Error detected: GL_INVALID_VALUE" jmp short loc_53281 loc_53275: mov edi, ebp; jumptable 0000000000053240 case 1285 mov rsi, r14 jmp short loc_53281 loc_5327C: mov edi, ebp; jumptable 0000000000053240 case 1286 mov rsi, r15 loc_53281: xor eax, eax call TraceLog jmp loc_53208 loc_5328D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long rlCheckErrors(long long a1) { long long result; // rax int v2; // edx int v3; // r8d int v4; // r9d int v5; // ecx const char *v6; // rsi while ( 1 ) { result = 1LL; LABEL_2: if ( !(_DWORD)result ) return result; result = glad_glGetError(a1); v5 = result - 1280; switch ( (int)result ) { case 1280: a1 = 4LL; v6 = "GL: Error detected: GL_INVALID_ENUM"; goto LABEL_14; case 1281: a1 = 4LL; v6 = "GL: Error detected: GL_INVALID_VALUE"; goto LABEL_14; case 1282: a1 = 4LL; v6 = "GL: Error detected: GL_INVALID_OPERATION"; goto LABEL_14; case 1283: a1 = 4LL; v6 = "GL: Error detected: GL_STACK_OVERFLOW"; goto LABEL_14; case 1284: a1 = 4LL; v6 = "GL: Error detected: GL_STACK_UNDERFLOW"; goto LABEL_14; case 1285: a1 = 4LL; v6 = "GL: Error detected: GL_OUT_OF_MEMORY"; goto LABEL_14; case 1286: a1 = 4LL; v6 = "GL: Error detected: GL_INVALID_FRAMEBUFFER_OPERATION"; LABEL_14: TraceLog(4, (_DWORD)v6, v2, v5, v3, v4); continue; default: if ( !(_DWORD)result ) goto LABEL_2; a1 = 4LL; TraceLog(4, (unsigned int)"GL: Error detected: Unknown error code: %x", result, v5, v3, v4); break; } } }
rlCheckErrors: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX PUSH 0x1 POP R12 PUSH 0x4 POP RBP LEA R13,[0x1c36d0] LEA RBX,[0x1c4c0a] LEA R14,[0x1c4c31] LEA R15,[0x1c4c56] LAB_00153208: MOV EAX,R12D LAB_0015320b: TEST EAX,EAX JZ 0x0015328d CALL qword ptr [0x00225b58] LEA ECX,[RAX + -0x500] CMP ECX,0x6 JBE 0x00153238 default: TEST EAX,EAX JZ 0x0015320b MOV EDI,EBP LEA RSI,[0x1c4c8b] MOV EDX,EAX XOR EAX,EAX CALL 0x001a128b JMP 0x00153208 LAB_00153238: MOVSXD RAX,dword ptr [R13 + RCX*0x4] ADD RAX,R13 switchD: JMP RAX caseD_500: MOV EDI,EBP LEA RSI,[0x1c4b72] JMP 0x00153281 caseD_504: MOV EDI,EBP MOV RSI,RBX JMP 0x00153281 caseD_502: MOV EDI,EBP LEA RSI,[0x1c4bbb] JMP 0x00153281 caseD_503: MOV EDI,EBP LEA RSI,[0x1c4be4] JMP 0x00153281 caseD_501: MOV EDI,EBP LEA RSI,[0x1c4b96] JMP 0x00153281 caseD_505: MOV EDI,EBP MOV RSI,R14 JMP 0x00153281 caseD_506: MOV EDI,EBP MOV RSI,R15 LAB_00153281: XOR EAX,EAX CALL 0x001a128b JMP 0x00153208 LAB_0015328d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void rlCheckErrors(void) { int iVar1; char *pcVar2; LAB_00153208: iVar1 = 1; LAB_0015320b: if (iVar1 == 0) { return; } iVar1 = (*glad_glGetError)(); switch(iVar1) { case 0x500: pcVar2 = "GL: Error detected: GL_INVALID_ENUM"; break; case 0x501: pcVar2 = "GL: Error detected: GL_INVALID_VALUE"; break; case 0x502: pcVar2 = "GL: Error detected: GL_INVALID_OPERATION"; break; case 0x503: pcVar2 = "GL: Error detected: GL_STACK_OVERFLOW"; break; case 0x504: pcVar2 = "GL: Error detected: GL_STACK_UNDERFLOW"; break; case 0x505: pcVar2 = "GL: Error detected: GL_OUT_OF_MEMORY"; break; case 0x506: pcVar2 = "GL: Error detected: GL_INVALID_FRAMEBUFFER_OPERATION"; break; default: goto switchD_00153240_default; } TraceLog(4,pcVar2); goto LAB_00153208; switchD_00153240_default: if (iVar1 != 0) goto code_r0x00153224; goto LAB_0015320b; code_r0x00153224: TraceLog(4,"GL: Error detected: Unknown error code: %x",iVar1); goto LAB_00153208; }
21,944
ma_search
eloqsql/storage/maria/ma_search.c
int _ma_search(register MARIA_HA *info, MARIA_KEY *key, uint32 nextflag, my_off_t pos) { int error; MARIA_PINNED_PAGE *page_link; uchar *page_buff; info->page_changed= 1; /* If page not saved */ if (!(error= _ma_search_no_save(info, key, nextflag, pos, &page_link, &page_buff))) { if (nextflag & SEARCH_SAVE_BUFF) { memcpy(info->keyread_buff, page_buff, info->s->block_size); /* Save position for a possible read next / previous */ info->int_keypos= info->keyread_buff + info->keypos_offset; info->int_maxpos= info->keyread_buff + info->maxpos_offset; info->int_keytree_version= key->keyinfo->version; info->last_search_keypage= info->last_keypage; info->page_changed= 0; info->keyread_buff_used= 0; } } _ma_unpin_all_pages(info, LSN_IMPOSSIBLE); return (error); }
O0
c
ma_search: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movb $0x1, 0x684(%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx leaq -0x30(%rbp), %r8 leaq -0x38(%rbp), %r9 callq 0x705f0 movl %eax, -0x24(%rbp) cmpl $0x0, %eax jne 0x705d8 movl -0x14(%rbp), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x705d6 movq -0x8(%rbp), %rax movq 0x380(%rax), %rdi movq -0x38(%rbp), %rsi movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x7bc(%rax), %eax movl %eax, %edx callq 0x2a0c0 movq -0x8(%rbp), %rax movq 0x380(%rax), %rcx movq -0x8(%rbp), %rax movl 0x3c0(%rax), %eax addq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x3b0(%rax) movq -0x8(%rbp), %rax movq 0x380(%rax), %rcx movq -0x8(%rbp), %rax movl 0x3c4(%rax), %eax addq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x3b8(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl 0xb8(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x3d4(%rax) movq -0x8(%rbp), %rax movq 0x440(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x448(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x684(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x685(%rax) jmp 0x705d8 movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x77280 movl -0x24(%rbp), %eax addq $0x40, %rsp popq %rbp retq nop
_ma_search: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov byte ptr [rax+684h], 1 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] lea r8, [rbp+var_30] lea r9, [rbp+var_38] call _ma_search_no_save mov [rbp+var_24], eax cmp eax, 0 jnz loc_705D8 mov eax, [rbp+var_14] and eax, 20h cmp eax, 0 jz loc_705D6 mov rax, [rbp+var_8] mov rdi, [rax+380h] mov rsi, [rbp+var_38] mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+7BCh] mov edx, eax call _memcpy mov rax, [rbp+var_8] mov rcx, [rax+380h] mov rax, [rbp+var_8] mov eax, [rax+3C0h] add rcx, rax mov rax, [rbp+var_8] mov [rax+3B0h], rcx mov rax, [rbp+var_8] mov rcx, [rax+380h] mov rax, [rbp+var_8] mov eax, [rax+3C4h] add rcx, rax mov rax, [rbp+var_8] mov [rax+3B8h], rcx mov rax, [rbp+var_10] mov rax, [rax+8] mov ecx, [rax+0B8h] mov rax, [rbp+var_8] mov [rax+3D4h], ecx mov rax, [rbp+var_8] mov rcx, [rax+440h] mov rax, [rbp+var_8] mov [rax+448h], rcx mov rax, [rbp+var_8] mov byte ptr [rax+684h], 0 mov rax, [rbp+var_8] mov byte ptr [rax+685h], 0 loc_705D6: jmp short $+2 loc_705D8: mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call _ma_unpin_all_pages mov eax, [rbp+var_24] add rsp, 40h pop rbp retn
long long ma_search(long long a1, long long a2, unsigned int a3, long long a4) { long long v5; // [rsp+8h] [rbp-38h] BYREF _BYTE v6[12]; // [rsp+10h] [rbp-30h] BYREF unsigned int v7; // [rsp+1Ch] [rbp-24h] long long v8; // [rsp+20h] [rbp-20h] unsigned int v9; // [rsp+2Ch] [rbp-14h] long long v10; // [rsp+30h] [rbp-10h] long long v11; // [rsp+38h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; *(_BYTE *)(a1 + 1668) = 1; v7 = ma_search_no_save(v11, v10, v9, v8, v6, &v5); if ( !v7 && (v9 & 0x20) != 0 ) { memcpy(*(_QWORD *)(v11 + 896), v5, *(unsigned int *)(*(_QWORD *)v11 + 1980LL)); *(_QWORD *)(v11 + 944) = *(unsigned int *)(v11 + 960) + *(_QWORD *)(v11 + 896); *(_QWORD *)(v11 + 952) = *(unsigned int *)(v11 + 964) + *(_QWORD *)(v11 + 896); *(_DWORD *)(v11 + 980) = *(_DWORD *)(*(_QWORD *)(v10 + 8) + 184LL); *(_QWORD *)(v11 + 1096) = *(_QWORD *)(v11 + 1088); *(_BYTE *)(v11 + 1668) = 0; *(_BYTE *)(v11 + 1669) = 0; } ma_unpin_all_pages(v11, 0LL); return v7; }
_ma_search: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x684],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] LEA R8,[RBP + -0x30] LEA R9,[RBP + -0x38] CALL 0x001705f0 MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 JNZ 0x001705d8 MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x20 CMP EAX,0x0 JZ 0x001705d6 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x380] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x7bc] MOV EDX,EAX CALL 0x0012a0c0 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x380] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x3c0] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x3b0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x380] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x3c4] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x3b8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RAX + 0xb8] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x3d4],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x440] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x448],RCX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x684],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x685],0x0 LAB_001705d6: JMP 0x001705d8 LAB_001705d8: MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x00177280 MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x40 POP RBP RET
int _ma_search(long *param_1,long param_2,uint param_3,int8 param_4) { void *local_40; int1 local_38 [12]; int local_2c; int8 local_28; uint local_1c; long local_18; long *local_10; *(int1 *)((long)param_1 + 0x684) = 1; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_2c = _ma_search_no_save(param_1,param_2,param_3,param_4,local_38,&local_40); if ((local_2c == 0) && ((local_1c & 0x20) != 0)) { memcpy((void *)local_10[0x70],local_40,(ulong)*(uint *)(*local_10 + 0x7bc)); local_10[0x76] = local_10[0x70] + (ulong)*(uint *)(local_10 + 0x78); local_10[0x77] = local_10[0x70] + (ulong)*(uint *)((long)local_10 + 0x3c4); *(int4 *)((long)local_10 + 0x3d4) = *(int4 *)(*(long *)(local_18 + 8) + 0xb8); local_10[0x89] = local_10[0x88]; *(int1 *)((long)local_10 + 0x684) = 0; *(int1 *)((long)local_10 + 0x685) = 0; } _ma_unpin_all_pages(local_10,0); return local_2c; }
21,945
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::~ImplicitProducer()
AlayaLite/build_O0/_deps/concurrentqueue-src/concurrentqueue.h
~ImplicitProducer() { // Note that since we're in the destructor we can assume that all enqueue/dequeue operations // completed already; this means that all undequeued elements are placed contiguously across // contiguous blocks, and that only the first and last remaining blocks can be only partially // empty (all other remaining blocks must be completely full). #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED // Unregister ourselves for thread termination notification if (!this->inactive.load(std::memory_order_relaxed)) { details::ThreadExitNotifier::unsubscribe(&threadExitListener); } #endif // Destroy all remaining elements! auto tail = this->tailIndex.load(std::memory_order_relaxed); auto index = this->headIndex.load(std::memory_order_relaxed); Block* block = nullptr; assert(index == tail || details::circular_less_than(index, tail)); bool forceFreeLastBlock = index != tail; // If we enter the loop, then the last (tail) block will not be freed while (index != tail) { if ((index & static_cast<index_t>(BLOCK_SIZE - 1)) == 0 || block == nullptr) { if (block != nullptr) { // Free the old block this->parent->add_block_to_free_list(block); } block = get_block_index_entry_for_index(index)->value.load(std::memory_order_relaxed); } ((*block)[index])->~T(); ++index; } // Even if the queue is empty, there's still one block that's not on the free list // (unless the head index reached the end of it, in which case the tail will be poised // to create a new block). if (this->tailBlock != nullptr && (forceFreeLastBlock || (tail & static_cast<index_t>(BLOCK_SIZE - 1)) != 0)) { this->parent->add_block_to_free_list(this->tailBlock); } // Destroy block index auto localBlockIndex = blockIndex.load(std::memory_order_relaxed); if (localBlockIndex != nullptr) { for (size_t i = 0; i != localBlockIndex->capacity; ++i) { localBlockIndex->index[i]->~BlockIndexEntry(); } do { auto prev = localBlockIndex->prev; localBlockIndex->~BlockIndexHeader(); (Traits::free)(localBlockIndex); localBlockIndex = prev; } while (localBlockIndex != nullptr); } }
O0
c
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::~ImplicitProducer(): subq $0xa8, %rsp movq %rdi, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x15ee63(%rip), %rcx # 0x1cc780 addq $0x10, %rcx movq %rcx, (%rax) addq $0x20, %rax movq %rax, 0xa0(%rsp) movl $0x0, 0x9c(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x28(%rsp) movl 0x9c(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x24460 movl %eax, 0x98(%rsp) movl 0x9c(%rsp), %eax movl %eax, 0x34(%rsp) decl %eax subl $0x2, %eax jb 0x6d991 jmp 0x6d974 movl 0x34(%rsp), %eax subl $0x5, %eax je 0x6d9a3 jmp 0x6d97f movq 0x28(%rsp), %rax movq (%rax), %rax movq %rax, 0x90(%rsp) jmp 0x6d9b3 movq 0x28(%rsp), %rax movq (%rax), %rax movq %rax, 0x90(%rsp) jmp 0x6d9b3 movq 0x28(%rsp), %rax movq (%rax), %rax movq %rax, 0x90(%rsp) movq 0x20(%rsp), %rax movq 0x90(%rsp), %rcx movq %rcx, 0x68(%rsp) addq $0x28, %rax movq %rax, 0x88(%rsp) movl $0x0, 0x84(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) movl 0x84(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x24460 movl %eax, 0x80(%rsp) movl 0x84(%rsp), %eax movl %eax, 0x1c(%rsp) decl %eax subl $0x2, %eax jb 0x6da2f jmp 0x6da15 movl 0x1c(%rsp), %eax subl $0x5, %eax je 0x6da3e jmp 0x6da20 movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x78(%rsp) jmp 0x6da4b movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x78(%rsp) jmp 0x6da4b movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x60(%rsp) movq $0x0, 0x58(%rsp) movq 0x60(%rsp), %rax cmpq 0x68(%rsp), %rax setne %al andb $0x1, %al movb %al, 0x57(%rsp) movq 0x60(%rsp), %rax cmpq 0x68(%rsp), %rax je 0x6db04 movq 0x60(%rsp), %rax andq $0x1f, %rax cmpq $0x0, %rax je 0x6da98 cmpq $0x0, 0x58(%rsp) jne 0x6dae2 cmpq $0x0, 0x58(%rsp) je 0x6dab7 movq 0x20(%rsp), %rax movq 0x50(%rax), %rdi movq 0x58(%rsp), %rsi callq 0x6c980 jmp 0x6dab5 jmp 0x6dab7 movq 0x20(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x6ddd0 movq %rax, 0x8(%rsp) jmp 0x6dacd movq 0x8(%rsp), %rdi addq $0x8, %rdi xorl %esi, %esi callq 0x68c10 movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x6c960 movq 0x60(%rsp), %rax addq $0x1, %rax movq %rax, 0x60(%rsp) jmp 0x6da71 movq 0x20(%rsp), %rax cmpq $0x0, 0x40(%rax) je 0x6db3c testb $0x1, 0x57(%rsp) jne 0x6db26 movq 0x68(%rsp), %rax andq $0x1f, %rax cmpq $0x0, %rax je 0x6db3c movq 0x20(%rsp), %rax movq 0x40(%rax), %rsi movq 0x50(%rax), %rdi callq 0x6c980 jmp 0x6db3a jmp 0x6db3c movq 0x20(%rsp), %rdi addq $0x60, %rdi xorl %esi, %esi callq 0x6dc20 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) je 0x6dbaf movq $0x0, 0x40(%rsp) movq 0x40(%rsp), %rax movq 0x48(%rsp), %rcx cmpq (%rcx), %rax je 0x6db81 movq 0x40(%rsp), %rax addq $0x1, %rax movq %rax, 0x40(%rsp) jmp 0x6db62 jmp 0x6db83 movq 0x48(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x38(%rsp) movq 0x48(%rsp), %rdi callq 0x68be0 movq 0x38(%rsp), %rax movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jne 0x6db83 jmp 0x6dbaf movq 0x20(%rsp), %rdi callq 0x6c750 addq $0xa8, %rsp retq movq %rax, %rdi callq 0x1f240 nopl (%rax)
_ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducerD2Ev: sub rsp, 0A8h mov [rsp+0A8h+var_38], rdi mov rax, [rsp+0A8h+var_38] mov [rsp+0A8h+var_88], rax lea rcx, _ZTVN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducerE; `vtable for'moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer add rcx, 10h mov [rax], rcx add rax, 20h ; ' ' mov [rsp+0A8h+var_8], rax mov [rsp+0A8h+var_C], 0 mov rax, [rsp+0A8h+var_8] mov [rsp+0A8h+var_80], rax mov edi, [rsp+0A8h+var_C] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+0A8h+var_10], eax mov eax, [rsp+0A8h+var_C] mov [rsp+0A8h+var_74], eax dec eax sub eax, 2 jb short loc_6D991 jmp short $+2 loc_6D974: mov eax, [rsp+0A8h+var_74] sub eax, 5 jz short loc_6D9A3 jmp short $+2 loc_6D97F: mov rax, [rsp+0A8h+var_80] mov rax, [rax] mov [rsp+0A8h+var_18], rax jmp short loc_6D9B3 loc_6D991: mov rax, [rsp+0A8h+var_80] mov rax, [rax] mov [rsp+0A8h+var_18], rax jmp short loc_6D9B3 loc_6D9A3: mov rax, [rsp+0A8h+var_80] mov rax, [rax] mov [rsp+0A8h+var_18], rax loc_6D9B3: mov rax, [rsp+0A8h+var_88] mov rcx, [rsp+0A8h+var_18] mov [rsp+0A8h+var_40], rcx add rax, 28h ; '(' mov [rsp+0A8h+var_20], rax mov [rsp+0A8h+var_24], 0 mov rax, [rsp+0A8h+var_20] mov [rsp+0A8h+var_98], rax mov edi, [rsp+0A8h+var_24] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+0A8h+var_28], eax mov eax, [rsp+0A8h+var_24] mov [rsp+0A8h+var_8C], eax dec eax sub eax, 2 jb short loc_6DA2F jmp short $+2 loc_6DA15: mov eax, [rsp+0A8h+var_8C] sub eax, 5 jz short loc_6DA3E jmp short $+2 loc_6DA20: mov rax, [rsp+0A8h+var_98] mov rax, [rax] mov [rsp+0A8h+var_30], rax jmp short loc_6DA4B loc_6DA2F: mov rax, [rsp+0A8h+var_98] mov rax, [rax] mov [rsp+0A8h+var_30], rax jmp short loc_6DA4B loc_6DA3E: mov rax, [rsp+0A8h+var_98] mov rax, [rax] mov [rsp+0A8h+var_30], rax loc_6DA4B: mov rax, [rsp+0A8h+var_30] mov [rsp+0A8h+var_48], rax mov [rsp+0A8h+var_50], 0 mov rax, [rsp+0A8h+var_48] cmp rax, [rsp+0A8h+var_40] setnz al and al, 1 mov [rsp+0A8h+var_51], al loc_6DA71: mov rax, [rsp+0A8h+var_48] cmp rax, [rsp+0A8h+var_40] jz loc_6DB04 mov rax, [rsp+0A8h+var_48] and rax, 1Fh cmp rax, 0 jz short loc_6DA98 cmp [rsp+0A8h+var_50], 0 jnz short loc_6DAE2 loc_6DA98: cmp [rsp+0A8h+var_50], 0 jz short loc_6DAB7 mov rax, [rsp+0A8h+var_88] mov rdi, [rax+50h] mov rsi, [rsp+0A8h+var_50] call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE22add_block_to_free_listEPNS5_5BlockE; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block *) jmp short $+2 loc_6DAB5: jmp short $+2 loc_6DAB7: mov rdi, [rsp+0A8h+var_88] mov rsi, [rsp+0A8h+var_48] call _ZNK10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer31get_block_index_entry_for_indexEm; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_entry_for_index(ulong) mov [rsp+0A8h+var_A0], rax jmp short $+2 loc_6DACD: mov rdi, [rsp+0A8h+var_A0] add rdi, 8 xor esi, esi call _ZNKSt6atomicIPN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS0_28ConcurrentQueueDefaultTraitsEE5BlockEE4loadESt12memory_order; std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block *>::load(std::memory_order) mov [rsp+0A8h+var_50], rax loc_6DAE2: mov rdi, [rsp+0A8h+var_50] mov rsi, [rsp+0A8h+var_48] call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE5BlockixEm; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block::operator[](ulong) mov rax, [rsp+0A8h+var_48] add rax, 1 mov [rsp+0A8h+var_48], rax jmp loc_6DA71 loc_6DB04: mov rax, [rsp+0A8h+var_88] cmp qword ptr [rax+40h], 0 jz short loc_6DB3C test [rsp+0A8h+var_51], 1 jnz short loc_6DB26 mov rax, [rsp+0A8h+var_40] and rax, 1Fh cmp rax, 0 jz short loc_6DB3C loc_6DB26: mov rax, [rsp+0A8h+var_88] mov rsi, [rax+40h] mov rdi, [rax+50h] call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE22add_block_to_free_listEPNS5_5BlockE; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block *) jmp short $+2 loc_6DB3A: jmp short $+2 loc_6DB3C: mov rdi, [rsp+0A8h+var_88] add rdi, 60h ; '`' xor esi, esi; void * call _ZNKSt6atomicIPN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS0_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer16BlockIndexHeaderEE4loadESt12memory_order; std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader *>::load(std::memory_order) mov [rsp+0A8h+var_60], rax cmp [rsp+0A8h+var_60], 0 jz short loc_6DBAF mov [rsp+0A8h+var_68], 0 loc_6DB62: mov rax, [rsp+0A8h+var_68] mov rcx, [rsp+0A8h+var_60] cmp rax, [rcx] jz short loc_6DB81 mov rax, [rsp+0A8h+var_68] add rax, 1 mov [rsp+0A8h+var_68], rax jmp short loc_6DB62 loc_6DB81: jmp short $+2 loc_6DB83: mov rax, [rsp+0A8h+var_60] mov rax, [rax+20h] mov [rsp+0A8h+var_70], rax mov rdi, [rsp+0A8h+var_60]; this call _ZN10moodycamel28ConcurrentQueueDefaultTraits4freeEPv; moodycamel::ConcurrentQueueDefaultTraits::free(void *) mov rax, [rsp+0A8h+var_70] mov [rsp+0A8h+var_60], rax cmp [rsp+0A8h+var_60], 0 jnz short loc_6DB83 jmp short $+2 loc_6DBAF: mov rdi, [rsp+0A8h+var_88] call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE12ProducerBaseD2Ev; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::~ProducerBase() add rsp, 0A8h retn mov rdi, rax call __clang_call_terminate
void moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::~ImplicitProducer( _QWORD *a1) { long long block_index_entry_for_index; // [rsp+8h] [rbp-A0h] moodycamel::ConcurrentQueueDefaultTraits *v2; // [rsp+38h] [rbp-70h] long long i; // [rsp+40h] [rbp-68h] moodycamel::ConcurrentQueueDefaultTraits *v4; // [rsp+48h] [rbp-60h] _BYTE v5[9]; // [rsp+57h] [rbp-51h] long long v6; // [rsp+60h] [rbp-48h] long long v7; // [rsp+90h] [rbp-18h] *a1 = &`vtable for'moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer + 2; std::operator&(0, 0xFFFF); v7 = a1[4]; std::operator&(0, 0xFFFF); v6 = a1[5]; v5[8] = 0; *(_QWORD *)v5 = v6 != v7; while ( v6 != v7 ) { if ( (v6 & 0x1F) == 0 || !*(_QWORD *)&v5[1] ) { if ( *(_QWORD *)&v5[1] ) moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list( a1[10], *(long long *)&v5[1]); block_index_entry_for_index = moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::get_block_index_entry_for_index( a1, v6); *(_QWORD *)&v5[1] = std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block *>::load( block_index_entry_for_index + 8, 0); } moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block::operator[]( *(long long *)&v5[1], v6++); } if ( a1[8] && ((v5[0] & 1) != 0 || (v7 & 0x1F) != 0) ) moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::add_block_to_free_list( a1[10], a1[8]); v4 = (moodycamel::ConcurrentQueueDefaultTraits *)std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader *>::load( a1 + 12, 0LL); if ( v4 ) { for ( i = 0LL; i != *(_QWORD *)v4; ++i ) ; do { v2 = (moodycamel::ConcurrentQueueDefaultTraits *)*((_QWORD *)v4 + 4); moodycamel::ConcurrentQueueDefaultTraits::free(v4, 0LL); v4 = v2; } while ( v2 ); } moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::~ProducerBase(); }
~ImplicitProducer: SUB RSP,0xa8 MOV qword ptr [RSP + 0x70],RDI MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x20],RAX LEA RCX,[0x2cc780] ADD RCX,0x10 MOV qword ptr [RAX],RCX ADD RAX,0x20 MOV qword ptr [RSP + 0xa0],RAX MOV dword ptr [RSP + 0x9c],0x0 MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x28],RAX MOV EDI,dword ptr [RSP + 0x9c] MOV ESI,0xffff CALL 0x00124460 MOV dword ptr [RSP + 0x98],EAX MOV EAX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0x34],EAX DEC EAX SUB EAX,0x2 JC 0x0016d991 JMP 0x0016d974 LAB_0016d974: MOV EAX,dword ptr [RSP + 0x34] SUB EAX,0x5 JZ 0x0016d9a3 JMP 0x0016d97f LAB_0016d97f: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x90],RAX JMP 0x0016d9b3 LAB_0016d991: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x90],RAX JMP 0x0016d9b3 LAB_0016d9a3: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x90],RAX LAB_0016d9b3: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x68],RCX ADD RAX,0x28 MOV qword ptr [RSP + 0x88],RAX MOV dword ptr [RSP + 0x84],0x0 MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x10],RAX MOV EDI,dword ptr [RSP + 0x84] MOV ESI,0xffff CALL 0x00124460 MOV dword ptr [RSP + 0x80],EAX MOV EAX,dword ptr [RSP + 0x84] MOV dword ptr [RSP + 0x1c],EAX DEC EAX SUB EAX,0x2 JC 0x0016da2f JMP 0x0016da15 LAB_0016da15: MOV EAX,dword ptr [RSP + 0x1c] SUB EAX,0x5 JZ 0x0016da3e JMP 0x0016da20 LAB_0016da20: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x78],RAX JMP 0x0016da4b LAB_0016da2f: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x78],RAX JMP 0x0016da4b LAB_0016da3e: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x78],RAX LAB_0016da4b: MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x58],0x0 MOV RAX,qword ptr [RSP + 0x60] CMP RAX,qword ptr [RSP + 0x68] SETNZ AL AND AL,0x1 MOV byte ptr [RSP + 0x57],AL LAB_0016da71: MOV RAX,qword ptr [RSP + 0x60] CMP RAX,qword ptr [RSP + 0x68] JZ 0x0016db04 MOV RAX,qword ptr [RSP + 0x60] AND RAX,0x1f CMP RAX,0x0 JZ 0x0016da98 CMP qword ptr [RSP + 0x58],0x0 JNZ 0x0016dae2 LAB_0016da98: CMP qword ptr [RSP + 0x58],0x0 JZ 0x0016dab7 MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x50] MOV RSI,qword ptr [RSP + 0x58] LAB_0016daae: CALL 0x0016c980 JMP 0x0016dab5 LAB_0016dab5: JMP 0x0016dab7 LAB_0016dab7: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x60] CALL 0x0016ddd0 MOV qword ptr [RSP + 0x8],RAX JMP 0x0016dacd LAB_0016dacd: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 XOR ESI,ESI CALL 0x00168c10 MOV qword ptr [RSP + 0x58],RAX LAB_0016dae2: MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x0016c960 MOV RAX,qword ptr [RSP + 0x60] ADD RAX,0x1 MOV qword ptr [RSP + 0x60],RAX JMP 0x0016da71 LAB_0016db04: MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0016db3c TEST byte ptr [RSP + 0x57],0x1 JNZ 0x0016db26 MOV RAX,qword ptr [RSP + 0x68] AND RAX,0x1f CMP RAX,0x0 JZ 0x0016db3c LAB_0016db26: MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x40] MOV RDI,qword ptr [RAX + 0x50] CALL 0x0016c980 JMP 0x0016db3a LAB_0016db3a: JMP 0x0016db3c LAB_0016db3c: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x60 XOR ESI,ESI CALL 0x0016dc20 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JZ 0x0016dbaf MOV qword ptr [RSP + 0x40],0x0 LAB_0016db62: MOV RAX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0x48] CMP RAX,qword ptr [RCX] JZ 0x0016db81 MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x1 MOV qword ptr [RSP + 0x40],RAX JMP 0x0016db62 LAB_0016db81: JMP 0x0016db83 LAB_0016db83: MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00168be0 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JNZ 0x0016db83 JMP 0x0016dbaf LAB_0016dbaf: MOV RDI,qword ptr [RSP + 0x20] CALL 0x0016c750 ADD RSP,0xa8 RET
/* WARNING: Removing unreachable block (ram,0x0016da3e) */ /* WARNING: Removing unreachable block (ram,0x0016d9a3) */ /* WARNING: Removing unreachable block (ram,0x0016d991) */ /* WARNING: Removing unreachable block (ram,0x0016da2f) */ /* moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::~ImplicitProducer() */ void __thiscall moodycamel:: ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>:: ImplicitProducer::~ImplicitProducer(ImplicitProducer *this) { ulong uVar1; long *plVar2; long lVar3; bool bVar4; long local_68; long *local_60; Block *local_50; ulong local_48; *(int ***)this = &PTR__ImplicitProducer_002cc790; std::operator&(0,0xffff); uVar1 = *(ulong *)(this + 0x20); std::operator&(0,0xffff); local_48 = *(ulong *)(this + 0x28); local_50 = (Block *)0x0; bVar4 = local_48 != uVar1; for (; local_48 != uVar1; local_48 = local_48 + 1) { if (((local_48 & 0x1f) == 0) || (local_50 == (Block *)0x0)) { if (local_50 != (Block *)0x0) { /* try { // try from 0016daae to 0016db37 has its CatchHandler @ 0016dbc1 */ add_block_to_free_list (*(ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits> **)(this + 0x50),local_50); } lVar3 = get_block_index_entry_for_index(this,local_48); local_50 = (Block *)std:: atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block*> ::load((atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block*> *)(lVar3 + 8),0); } Block::operator[](local_50,local_48); } if ((*(long *)(this + 0x40) != 0) && ((bVar4 || ((uVar1 & 0x1f) != 0)))) { add_block_to_free_list (*(ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits> **)(this + 0x50),*(Block **)(this + 0x40)); } local_60 = (long *)std:: atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*> ::load((atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*> *)(this + 0x60),0); if (local_60 != (long *)0x0) { for (local_68 = 0; local_68 != *local_60; local_68 = local_68 + 1) { } do { plVar2 = (long *)local_60[4]; ConcurrentQueueDefaultTraits::free(local_60); local_60 = plVar2; } while (plVar2 != (long *)0x0); } ProducerBase::~ProducerBase((ProducerBase *)this); return; }
21,946
my_strcasecmp_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t) { MY_UNICASE_INFO *uni_plane= cs->caseinfo; while (s[0] && t[0]) { my_wc_t s_wc,t_wc; if ((uchar) s[0] < 128) { /* s[0] is between 0 and 127. It represents a single byte character. Convert it into weight according to collation. */ s_wc= my_unicase_default_page00[(uchar) s[0]].tolower; s++; } else { int res; /* Scan a multibyte character. In the future it is worth to write a special version of my_utf8mb3_uni() for 0-terminated strings which will not take in account length. Now we call the regular version of my_utf8mb3_uni() with s+3 in the last argument. s+3 is enough to scan any multibyte sequence. Calling the regular version of my_utf8mb3_uni is safe for 0-terminated strings: we will never lose the end of the string: If we have 0 character in the middle of a multibyte sequence, then my_utf8mb3_uni will always return a negative number, so the loop with finish. */ res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3); /* In the case of wrong multibyte sequence we will call strcmp() for byte-to-byte comparison. */ if (res <= 0) return strcmp(s, t); s+= res; /* Convert Unicode code into weight according to collation */ my_tolower_utf8mb3(uni_plane, &s_wc); } /* Do the same for the second string */ if ((uchar) t[0] < 128) { /* Convert single byte character into weight */ t_wc= my_unicase_default_page00[(uchar) t[0]].tolower; t++; } else { int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3); if (res <= 0) return strcmp(s, t); t+= res; /* Convert code into weight */ my_tolower_utf8mb3(uni_plane, &t_wc); } /* Now we have two weights, let's compare them */ if ( s_wc != t_wc ) return ((int) s_wc) - ((int) t_wc); } return ((int)(uchar)s[0]) - ((int) (uchar) t[0]); }
O3
c
my_strcasecmp_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r13 movb (%rsi), %al testb %al, %al je 0xd58e8 movq %rsi, %r14 movq 0x78(%rdi), %r15 leaq 0x30df13(%rip), %r12 # 0x3e3730 cmpb $0x0, (%r13) je 0xd58e3 testb %al, %al js 0xd5841 movzbl %al, %eax leaq (%rax,%rax,2), %rax movl 0x4(%r12,%rax,4), %ebx movq %rbx, -0x30(%rbp) incq %r14 jmp 0xd5881 leaq 0x3(%r14), %rcx leaq -0x30(%rbp), %rsi movq %r14, %rdx callq 0xd4397 testl %eax, %eax jle 0xd5906 movl %eax, %eax addq %rax, %r14 movq 0x8(%r15), %rax movq -0x30(%rbp), %rbx movzbl %bh, %ecx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0xd5881 movzbl %bl, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x4(%rax,%rcx,4), %ebx movq %rbx, -0x30(%rbp) movsbq (%r13), %rax testq %rax, %rax js 0xd5899 leaq (%rax,%rax,2), %rax movl 0x4(%r12,%rax,4), %eax incq %r13 jmp 0xd58d1 leaq 0x3(%r13), %rcx leaq -0x38(%rbp), %rsi movq %r13, %rdx callq 0xd4397 testl %eax, %eax jle 0xd5906 movl %eax, %eax addq %rax, %r13 movq 0x8(%r15), %rcx movq -0x38(%rbp), %rax movzbl %ah, %edx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0xd58d1 movzbl %al, %eax leaq (%rax,%rax,2), %rax movl 0x4(%rcx,%rax,4), %eax cmpq %rax, %rbx jne 0xd5902 movb (%r14), %al testb %al, %al jne 0xd581d xorl %eax, %eax movzbl %al, %ebx jmp 0xd58ea xorl %ebx, %ebx movzbl (%r13), %eax subl %eax, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq subl %eax, %ebx jmp 0xd58f1 movq %r14, %rdi movq %r13, %rsi callq 0x2a690 movl %eax, %ebx jmp 0xd58f1
my_strcasecmp_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rdx mov al, [rsi] test al, al jz loc_D58E8 mov r14, rsi mov r15, [rdi+78h] lea r12, my_unicase_default_page00 loc_D581D: cmp byte ptr [r13+0], 0 jz loc_D58E3 test al, al js short loc_D5841 movzx eax, al lea rax, [rax+rax*2] mov ebx, [r12+rax*4+4] mov [rbp+var_30], rbx inc r14 jmp short loc_D5881 loc_D5841: lea rcx, [r14+3] lea rsi, [rbp+var_30] mov rdx, r14 call my_utf8mb3_uni test eax, eax jle loc_D5906 mov eax, eax add r14, rax mov rax, [r15+8] mov rbx, [rbp+var_30] movzx ecx, bh mov rax, [rax+rcx*8] test rax, rax jz short loc_D5881 movzx ecx, bl lea rcx, [rcx+rcx*2] mov ebx, [rax+rcx*4+4] mov [rbp+var_30], rbx loc_D5881: movsx rax, byte ptr [r13+0] test rax, rax js short loc_D5899 lea rax, [rax+rax*2] mov eax, [r12+rax*4+4] inc r13 jmp short loc_D58D1 loc_D5899: lea rcx, [r13+3] lea rsi, [rbp+var_38] mov rdx, r13 call my_utf8mb3_uni test eax, eax jle short loc_D5906 mov eax, eax add r13, rax mov rcx, [r15+8] mov rax, [rbp+var_38] movzx edx, ah mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_D58D1 movzx eax, al lea rax, [rax+rax*2] mov eax, [rcx+rax*4+4] loc_D58D1: cmp rbx, rax jnz short loc_D5902 mov al, [r14] test al, al jnz loc_D581D xor eax, eax loc_D58E3: movzx ebx, al jmp short loc_D58EA loc_D58E8: xor ebx, ebx loc_D58EA: movzx eax, byte ptr [r13+0] sub ebx, eax loc_D58F1: mov eax, ebx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D5902: sub ebx, eax jmp short loc_D58F1 loc_D5906: mov rdi, r14 mov rsi, r13 call _strcmp mov ebx, eax jmp short loc_D58F1
long long my_strcasecmp_utf8mb3(long long a1, unsigned __int8 *a2, unsigned __int8 *a3) { unsigned __int8 v4; // al unsigned __int8 *v5; // r14 long long v6; // r15 unsigned long long v7; // rbx int v8; // eax long long v9; // rax long long v10; // rax unsigned long long v11; // rax int v12; // eax long long v13; // rcx int v14; // ebx unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF unsigned long long v18; // [rsp+10h] [rbp-30h] BYREF v4 = *a2; if ( *a2 ) { v5 = a2; v6 = *(_QWORD *)(a1 + 120); while ( 1 ) { if ( !*a3 ) goto LABEL_17; if ( (v4 & 0x80u) != 0 ) { v8 = my_utf8mb3_uni(a1, &v18, v5, (unsigned long long)(v5 + 3)); if ( v8 <= 0 ) return (unsigned int)strcmp(v5, a3); v5 += (unsigned int)v8; v7 = v18; v9 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v18)); if ( v9 ) { v7 = *(unsigned int *)(v9 + 12LL * (unsigned __int8)v18 + 4); v18 = v7; } } else { v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1]; v18 = v7; ++v5; } v10 = (char)*a3; if ( v10 < 0 ) { v12 = my_utf8mb3_uni(a1, &v17, a3, (unsigned long long)(a3 + 3)); if ( v12 <= 0 ) return (unsigned int)strcmp(v5, a3); a3 += (unsigned int)v12; v11 = v17; v13 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v17)); if ( v13 ) v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4); } else { v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1]; ++a3; } if ( v7 != v11 ) return (unsigned int)(v7 - v11); v4 = *v5; if ( !*v5 ) { v4 = 0; LABEL_17: v14 = v4; return (unsigned int)(v14 - *a3); } } } v14 = 0; return (unsigned int)(v14 - *a3); }
my_strcasecmp_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RDX MOV AL,byte ptr [RSI] TEST AL,AL JZ 0x001d58e8 MOV R14,RSI MOV R15,qword ptr [RDI + 0x78] LEA R12,[0x4e3730] LAB_001d581d: CMP byte ptr [R13],0x0 JZ 0x001d58e3 TEST AL,AL JS 0x001d5841 MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] MOV EBX,dword ptr [R12 + RAX*0x4 + 0x4] MOV qword ptr [RBP + -0x30],RBX INC R14 JMP 0x001d5881 LAB_001d5841: LEA RCX,[R14 + 0x3] LEA RSI,[RBP + -0x30] MOV RDX,R14 CALL 0x001d4397 TEST EAX,EAX JLE 0x001d5906 MOV EAX,EAX ADD R14,RAX MOV RAX,qword ptr [R15 + 0x8] MOV RBX,qword ptr [RBP + -0x30] MOVZX ECX,BH MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001d5881 MOVZX ECX,BL LEA RCX,[RCX + RCX*0x2] MOV EBX,dword ptr [RAX + RCX*0x4 + 0x4] MOV qword ptr [RBP + -0x30],RBX LAB_001d5881: MOVSX RAX,byte ptr [R13] TEST RAX,RAX JS 0x001d5899 LEA RAX,[RAX + RAX*0x2] MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4] INC R13 JMP 0x001d58d1 LAB_001d5899: LEA RCX,[R13 + 0x3] LEA RSI,[RBP + -0x38] MOV RDX,R13 CALL 0x001d4397 TEST EAX,EAX JLE 0x001d5906 MOV EAX,EAX ADD R13,RAX MOV RCX,qword ptr [R15 + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOVZX EDX,AH MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x001d58d1 MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4] LAB_001d58d1: CMP RBX,RAX JNZ 0x001d5902 MOV AL,byte ptr [R14] TEST AL,AL JNZ 0x001d581d XOR EAX,EAX LAB_001d58e3: MOVZX EBX,AL JMP 0x001d58ea LAB_001d58e8: XOR EBX,EBX LAB_001d58ea: MOVZX EAX,byte ptr [R13] SUB EBX,EAX LAB_001d58f1: MOV EAX,EBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d5902: SUB EBX,EAX JMP 0x001d58f1 LAB_001d5906: MOV RDI,R14 MOV RSI,R13 CALL 0x0012a690 MOV EBX,EAX JMP 0x001d58f1
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3) { long lVar1; long lVar2; byte bVar3; uint uVar4; int iVar5; ulong uVar6; ulong local_40; ulong local_38; bVar3 = *param_2; if (bVar3 == 0) { uVar4 = 0; } else { lVar1 = *(long *)(param_1 + 0x78); do { if (*param_3 == 0) goto LAB_001d58e3; if ((char)bVar3 < '\0') { uVar4 = my_utf8mb3_uni(); if ((int)uVar4 < 1) goto LAB_001d5906; param_2 = param_2 + uVar4; lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_38 >> 8 & 0xff) * 8); if (lVar2 != 0) { local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc); } } else { local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar3 * 0xc + 4); param_2 = param_2 + 1; } bVar3 = *param_3; if ((long)(char)bVar3 < 0) { uVar4 = my_utf8mb3_uni(); if ((int)uVar4 < 1) { LAB_001d5906: iVar5 = strcmp((char *)param_2,(char *)param_3); return iVar5; } param_3 = param_3 + uVar4; lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8); uVar6 = local_40; if (lVar2 != 0) { uVar6 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc); } } else { param_3 = param_3 + 1; uVar6 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar3 * 0xc + 4); } if (local_38 != uVar6) { return (int)local_38 - (int)uVar6; } bVar3 = *param_2; } while (bVar3 != 0); bVar3 = 0; LAB_001d58e3: uVar4 = (uint)bVar3; } return uVar4 - *param_3; }
21,947
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
hkr04[P]cpp-mcp/common/json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movsd %xmm0, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movsd 0x18(%rsp), %xmm0 callq 0x7ac40 testb $0x1, %al jne 0x7a2a9 movq 0x8(%rsp), %rdi callq 0x78c40 movq %rax, %rdi movq (%rdi), %rax leaq 0x53b58(%rip), %rsi # 0xcddf7 movl $0x4, %edx callq *0x8(%rax) jmp 0x7a2b9 movq 0x8(%rsp), %rdi movsd 0x18(%rsp), %xmm0 callq 0x7ac80 addq $0x28, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: sub rsp, 28h mov [rsp+28h+var_8], rdi movsd [rsp+28h+var_10], xmm0 mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax movsd xmm0, [rsp+28h+var_10]; double call _ZSt8isfinited; std::isfinite(double) test al, 1 jnz short loc_7A2A9 mov rdi, [rsp+28h+var_20] call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rdi] lea rsi, aNull; "null" mov edx, 4 call qword ptr [rax+8] jmp short loc_7A2B9 loc_7A2A9: mov rdi, [rsp+28h+var_20] movsd xmm0, [rsp+28h+var_10] call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEdSt17integral_constantIbLb1EE; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::dump_float(double,std::integral_constant<bool,true>) loc_7A2B9: add rsp, 28h retn
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( long long a1, double a2) { long long v2; // rax if ( (std::isfinite(a2) & 1) != 0 ) return nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( a1, a2); v2 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1); return (*(long long ( **)(long long, const char *, long long))(*(_QWORD *)v2 + 8LL))(v2, "null", 4LL); }
dump_float: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOVSD qword ptr [RSP + 0x18],XMM0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOVSD XMM0,qword ptr [RSP + 0x18] CALL 0x0017ac40 TEST AL,0x1 JNZ 0x0017a2a9 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00178c40 MOV RDI,RAX MOV RAX,qword ptr [RDI] LEA RSI,[0x1cddf7] MOV EDX,0x4 CALL qword ptr [RAX + 0x8] JMP 0x0017a2b9 LAB_0017a2a9: MOV RDI,qword ptr [RSP + 0x8] MOVSD XMM0,qword ptr [RSP + 0x18] CALL 0x0017ac80 LAB_0017a2b9: ADD RSP,0x28 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::dump_float(double) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::dump_float(serializer<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,double param_1) { ulong uVar1; long *plVar2; uVar1 = std::isfinite(param_1); if ((uVar1 & 1) == 0) { plVar2 = (long *)std:: __shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false> *)this); (**(code **)(*plVar2 + 8))(plVar2,&DAT_001cddf7,4); } else { dump_float(param_1,this); } return; }
21,948
ModbusRtuPort::readBuffer(unsigned char&, unsigned char&, unsigned char*, unsigned short, unsigned short*)
serhmarch[P]ModbusBridge/modbus/src/ModbusRtuPort.cpp
StatusCode ModbusRtuPort::readBuffer(uint8_t& unit, uint8_t& func, uint8_t *buff, uint16_t maxSzBuff, uint16_t *szOutBuff) { ModbusSerialPortPrivate *d = d_ModbusSerialPort(d_ptr); uint16_t crc; if (d->sz < 4) // Note: Unit + Func + 2 bytes CRC return d->setError(Status_BadNotCorrectRequest, StringLiteral("RTU. Not correct input. Input data length to small")); crc = d->buff[d->sz-2] | (d->buff[d->sz-1] << 8); if (Modbus::crc16(d->buff, d->sz-2) != crc) return d->setError(Status_BadCrc, StringLiteral("RTU. Wrong CRC")); unit = d->buff[0]; func = d->buff[1]; d->sz -= 4; if (d->sz > maxSzBuff) return d->setError(Status_BadReadBufferOverflow, StringLiteral("RTU. Read-buffer overflow")); memcpy(buff, &d->buff[2], d->sz); *szOutBuff = d->sz; return Status_Good; }
O2
cpp
ModbusRtuPort::readBuffer(unsigned char&, unsigned char&, unsigned char*, unsigned short, unsigned short*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq 0x8(%rdi), %rbx movzwl 0x82(%rbx), %eax cmpl $0x3, %eax ja 0x8f5e leaq 0x9bc5(%rip), %rsi # 0x12ae8 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x8b48 movl $0x1000102, 0x10(%rbx) # imm = 0x1000102 addq $0x18, %rbx leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x51e0 leaq 0x10(%rsp), %rdi callq 0x5190 movl $0x1000102, %eax # imm = 0x1000102 jmp 0x9063 movl %r8d, %ebp movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %r9, 0x30(%rsp) movq 0x78(%rbx), %rdi leal -0x2(%rax), %esi movzbl (%rdi,%rsi), %ecx movl %eax, %eax movzbl -0x1(%rdi,%rax), %r14d shll $0x8, %r14d orl %ecx, %r14d callq 0x6e92 movzwl %ax, %eax cmpl %eax, %r14d jne 0x9000 movq 0x78(%rbx), %rax movb (%rax), %al movb %al, (%r13) movq 0x78(%rbx), %rax movb 0x1(%rax), %al movb %al, (%r12) movzwl 0x82(%rbx), %eax addl $-0x4, %eax movw %ax, 0x82(%rbx) cmpw %bp, %ax jbe 0x903f leaq 0x9b62(%rip), %rsi # 0x12b2a leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x8b48 movl $0x1000105, 0x10(%rbx) # imm = 0x1000105 addq $0x18, %rbx leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x51e0 leaq 0x10(%rsp), %rdi callq 0x5190 movl $0x1000105, %eax # imm = 0x1000105 jmp 0x9063 leaq 0x9b14(%rip), %rsi # 0x12b1b leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x8b48 movl $0x1000401, 0x10(%rbx) # imm = 0x1000401 addq $0x18, %rbx leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x51e0 leaq 0x10(%rsp), %rdi callq 0x5190 movl $0x1000401, %eax # imm = 0x1000401 jmp 0x9063 movq 0x78(%rbx), %rsi addq $0x2, %rsi movzwl %ax, %edx movq %r15, %rdi callq 0x52b0 movzwl 0x82(%rbx), %eax movq 0x30(%rsp), %rcx movw %ax, (%rcx) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x907a jmp 0x9089 jmp 0x907a jmp 0x9089 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x5190 jmp 0x908c movq %rax, %rbx movq %rbx, %rdi callq 0x5570
_ZN13ModbusRtuPort10readBufferERhS0_PhtPt: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, [rdi+8] movzx eax, word ptr [rbx+82h] cmp eax, 3 ja short loc_8F5E lea rsi, aRtuNotCorrectI; "RTU. Not correct input. Input data leng"... lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_59] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov dword ptr [rbx+10h], 1000102h add rbx, 18h lea rsi, [rsp+68h+var_58] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rsp+68h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, 1000102h jmp loc_9063 loc_8F5E: mov ebp, r8d mov r15, rcx mov r12, rdx mov r13, rsi mov [rsp+68h+var_38], r9 mov rdi, [rbx+78h] lea esi, [rax-2] movzx ecx, byte ptr [rdi+rsi] mov eax, eax movzx r14d, byte ptr [rdi+rax-1] shl r14d, 8 or r14d, ecx call crc16 movzx eax, ax cmp r14d, eax jnz short loc_9000 mov rax, [rbx+78h] mov al, [rax] mov [r13+0], al mov rax, [rbx+78h] mov al, [rax+1] mov [r12], al movzx eax, word ptr [rbx+82h] add eax, 0FFFFFFFCh mov [rbx+82h], ax cmp ax, bp jbe short loc_903F lea rsi, aRtuReadBufferO; "RTU. Read-buffer overflow" lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_59] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov dword ptr [rbx+10h], 1000105h add rbx, 18h lea rsi, [rsp+68h+var_58] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rsp+68h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, 1000105h jmp short loc_9063 loc_9000: lea rsi, aRtuWrongCrc; "RTU. Wrong CRC" lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_59] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov dword ptr [rbx+10h], 1000401h add rbx, 18h lea rsi, [rsp+68h+var_58] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rsp+68h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, 1000401h jmp short loc_9063 loc_903F: mov rsi, [rbx+78h] add rsi, 2 movzx edx, ax mov rdi, r15 call _memcpy movzx eax, word ptr [rbx+82h] mov rcx, [rsp+68h+var_38] mov [rcx], ax xor eax, eax loc_9063: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_907A jmp short loc_9089 jmp short loc_907A jmp short loc_9089 loc_907A: mov rbx, rax lea rdi, [rsp+arg_8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_908C loc_9089: mov rbx, rax loc_908C: mov rdi, rbx call __Unwind_Resume
long long ModbusRtuPort::readBuffer( ModbusRtuPort *this, unsigned __int8 *a2, unsigned __int8 *a3, unsigned __int8 *a4, unsigned __int16 a5, unsigned __int16 *a6) { long long v6; // rbx unsigned int v7; // eax long long v13; // rdi long long v14; // rsi int v15; // r14d unsigned __int16 v16; // ax _QWORD v17[4]; // [rsp+10h] [rbp-58h] BYREF unsigned __int16 *v18; // [rsp+30h] [rbp-38h] v6 = *((_QWORD *)this + 1); v7 = *(unsigned __int16 *)(v6 + 130); if ( v7 > 3 ) { v18 = a6; v13 = *(_QWORD *)(v6 + 120); v14 = v7 - 2; v15 = *(unsigned __int8 *)(v13 + v14) | (*(unsigned __int8 *)(v13 + v7 - 1) << 8); if ( v15 == crc16(v13, v14) ) { *a2 = **(_BYTE **)(v6 + 120); *a3 = *(_BYTE *)(*(_QWORD *)(v6 + 120) + 1LL); v16 = *(_WORD *)(v6 + 130) - 4; *(_WORD *)(v6 + 130) = v16; if ( v16 <= a5 ) { memcpy(a4, *(_QWORD *)(v6 + 120) + 2LL, v16); *v18 = *(_WORD *)(v6 + 130); return 0LL; } else { std::string::basic_string<std::allocator<char>>(v17, (long long)"RTU. Read-buffer overflow"); *(_DWORD *)(v6 + 16) = 16777477; std::string::_M_assign(v6 + 24, v17); std::string::~string(v17); return 16777477LL; } } else { std::string::basic_string<std::allocator<char>>(v17, (long long)"RTU. Wrong CRC"); *(_DWORD *)(v6 + 16) = 16778241; std::string::_M_assign(v6 + 24, v17); std::string::~string(v17); return 16778241LL; } } else { std::string::basic_string<std::allocator<char>>(v17, (long long)"RTU. Not correct input. Input data length to small"); *(_DWORD *)(v6 + 16) = 16777474; std::string::_M_assign(v6 + 24, v17); std::string::~string(v17); return 16777474LL; } }
readBuffer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,qword ptr [RDI + 0x8] MOVZX EAX,word ptr [RBX + 0x82] CMP EAX,0x3 JA 0x00108f5e LAB_00108f1c: LEA RSI,[0x112ae8] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00108b48 MOV dword ptr [RBX + 0x10],0x1000102 ADD RBX,0x18 LAB_00108f3d: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001051e0 LAB_00108f4a: LEA RDI,[RSP + 0x10] CALL 0x00105190 MOV EAX,0x1000102 JMP 0x00109063 LAB_00108f5e: MOV EBP,R8D MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV qword ptr [RSP + 0x30],R9 MOV RDI,qword ptr [RBX + 0x78] LEA ESI,[RAX + -0x2] MOVZX ECX,byte ptr [RDI + RSI*0x1] MOV EAX,EAX MOVZX R14D,byte ptr [RDI + RAX*0x1 + -0x1] SHL R14D,0x8 OR R14D,ECX CALL 0x00106e92 MOVZX EAX,AX CMP R14D,EAX JNZ 0x00109000 MOV RAX,qword ptr [RBX + 0x78] MOV AL,byte ptr [RAX] MOV byte ptr [R13],AL MOV RAX,qword ptr [RBX + 0x78] MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [R12],AL MOVZX EAX,word ptr [RBX + 0x82] ADD EAX,-0x4 MOV word ptr [RBX + 0x82],AX CMP AX,BP JBE 0x0010903f LAB_00108fc1: LEA RSI,[0x112b2a] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00108b48 MOV dword ptr [RBX + 0x10],0x1000105 ADD RBX,0x18 LAB_00108fe2: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001051e0 LEA RDI,[RSP + 0x10] CALL 0x00105190 MOV EAX,0x1000105 JMP 0x00109063 LAB_00109000: LEA RSI,[0x112b1b] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00108b48 MOV dword ptr [RBX + 0x10],0x1000401 ADD RBX,0x18 LAB_00109021: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001051e0 LAB_0010902e: LEA RDI,[RSP + 0x10] CALL 0x00105190 MOV EAX,0x1000401 JMP 0x00109063 LAB_0010903f: MOV RSI,qword ptr [RBX + 0x78] ADD RSI,0x2 MOVZX EDX,AX MOV RDI,R15 CALL 0x001052b0 MOVZX EAX,word ptr [RBX + 0x82] MOV RCX,qword ptr [RSP + 0x30] MOV word ptr [RCX],AX XOR EAX,EAX LAB_00109063: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ModbusRtuPort::readBuffer(unsigned char&, unsigned char&, unsigned char*, unsigned short, unsigned short*) */ int8 __thiscall ModbusRtuPort::readBuffer (ModbusRtuPort *this,uchar *param_1,uchar *param_2,uchar *param_3,ushort param_4, ushort *param_5) { int1 uVar1; int1 uVar2; long lVar3; short sVar4; ushort uVar5; int8 uVar6; allocator local_59; string local_58 [32]; ushort *local_38; lVar3 = *(long *)(this + 8); uVar5 = *(ushort *)(lVar3 + 0x82); if (uVar5 < 4) { /* try { // try from 00108f1c to 00108f31 has its CatchHandler @ 00109089 */ std::__cxx11::string::string<std::allocator<char>> (local_58,"RTU. Not correct input. Input data length to small",&local_59); *(int4 *)(lVar3 + 0x10) = 0x1000102; /* try { // try from 00108f3d to 00108f49 has its CatchHandler @ 0010907a */ std::__cxx11::string::_M_assign((string *)(lVar3 + 0x18)); std::__cxx11::string::~string(local_58); uVar6 = 0x1000102; } else { uVar1 = *(int1 *)(*(long *)(lVar3 + 0x78) + (ulong)(uVar5 - 2)); uVar2 = *(int1 *)(*(long *)(lVar3 + 0x78) + -1 + (ulong)(uint)uVar5); local_38 = param_5; sVar4 = crc16(); if (CONCAT11(uVar2,uVar1) == sVar4) { *param_1 = **(uchar **)(lVar3 + 0x78); *param_2 = *(uchar *)(*(long *)(lVar3 + 0x78) + 1); uVar5 = *(short *)(lVar3 + 0x82) - 4; *(ushort *)(lVar3 + 0x82) = uVar5; if (param_4 < uVar5) { /* try { // try from 00108fc1 to 00108fd6 has its CatchHandler @ 00109074 */ std::__cxx11::string::string<std::allocator<char>> (local_58,"RTU. Read-buffer overflow",&local_59); *(int4 *)(lVar3 + 0x10) = 0x1000105; /* try { // try from 00108fe2 to 00108fee has its CatchHandler @ 00109072 */ std::__cxx11::string::_M_assign((string *)(lVar3 + 0x18)); std::__cxx11::string::~string(local_58); uVar6 = 0x1000105; } else { memcpy(param_3,(void *)(*(long *)(lVar3 + 0x78) + 2),(ulong)uVar5); *local_38 = *(ushort *)(lVar3 + 0x82); uVar6 = 0; } } else { /* try { // try from 00109000 to 00109015 has its CatchHandler @ 00109078 */ std::__cxx11::string::string<std::allocator<char>>(local_58,"RTU. Wrong CRC",&local_59); *(int4 *)(lVar3 + 0x10) = 0x1000401; /* try { // try from 00109021 to 0010902d has its CatchHandler @ 00109076 */ std::__cxx11::string::_M_assign((string *)(lVar3 + 0x18)); std::__cxx11::string::~string(local_58); uVar6 = 0x1000401; } } return uVar6; }
21,949
ModbusRtuPort::readBuffer(unsigned char&, unsigned char&, unsigned char*, unsigned short, unsigned short*)
serhmarch[P]ModbusBridge/modbus/src/ModbusRtuPort.cpp
StatusCode ModbusRtuPort::readBuffer(uint8_t& unit, uint8_t& func, uint8_t *buff, uint16_t maxSzBuff, uint16_t *szOutBuff) { ModbusSerialPortPrivate *d = d_ModbusSerialPort(d_ptr); uint16_t crc; if (d->sz < 4) // Note: Unit + Func + 2 bytes CRC return d->setError(Status_BadNotCorrectRequest, StringLiteral("RTU. Not correct input. Input data length to small")); crc = d->buff[d->sz-2] | (d->buff[d->sz-1] << 8); if (Modbus::crc16(d->buff, d->sz-2) != crc) return d->setError(Status_BadCrc, StringLiteral("RTU. Wrong CRC")); unit = d->buff[0]; func = d->buff[1]; d->sz -= 4; if (d->sz > maxSzBuff) return d->setError(Status_BadReadBufferOverflow, StringLiteral("RTU. Read-buffer overflow")); memcpy(buff, &d->buff[2], d->sz); *szOutBuff = d->sz; return Status_Good; }
O3
cpp
ModbusRtuPort::readBuffer(unsigned char&, unsigned char&, unsigned char*, unsigned short, unsigned short*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq 0x8(%rdi), %rbx movzwl 0x82(%rbx), %eax cmpl $0x3, %eax ja 0x96e5 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xf447(%rip), %rsi # 0x18ae7 leaq 0xf472(%rip), %rdx # 0x18b19 movq %rsp, %rdi callq 0x92a8 movl $0x1000102, 0x10(%rbx) # imm = 0x1000102 addq $0x18, %rbx movq %rsp, %rsi movq %rbx, %rdi callq 0x51c0 movq (%rsp), %rdi cmpq %r14, %rdi je 0x96db movq 0x10(%rsp), %rsi incq %rsi callq 0x5310 movl $0x1000102, %eax # imm = 0x1000102 jmp 0x9818 movl %r8d, %ebp movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %r9, 0x20(%rsp) movq 0x78(%rbx), %rdi leal -0x2(%rax), %esi movzbl (%rdi,%rsi), %ecx movl %eax, %eax movzbl -0x1(%rdi,%rax), %r14d shll $0x8, %r14d orl %ecx, %r14d callq 0x7a7a movzwl %ax, %eax cmpl %eax, %r14d jne 0x97a2 movq 0x78(%rbx), %rax movb (%rax), %al movb %al, (%r13) movq 0x78(%rbx), %rax movb 0x1(%rax), %al movb %al, (%r12) movzwl 0x82(%rbx), %eax addl $-0x4, %eax movw %ax, 0x82(%rbx) cmpw %bp, %ax jbe 0x97f4 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xf3c9(%rip), %rsi # 0x18b29 leaq 0xf3db(%rip), %rdx # 0x18b42 movq %rsp, %rdi callq 0x92a8 movl $0x1000105, 0x10(%rbx) # imm = 0x1000105 addq $0x18, %rbx movq %rsp, %rsi movq %rbx, %rdi callq 0x51c0 movq (%rsp), %rdi cmpq %r14, %rdi je 0x979b movq 0x10(%rsp), %rsi incq %rsi callq 0x5310 movl $0x1000105, %eax # imm = 0x1000105 jmp 0x9818 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xf368(%rip), %rsi # 0x18b1a leaq 0xf36f(%rip), %rdx # 0x18b28 movq %rsp, %rdi callq 0x92a8 movl $0x1000401, 0x10(%rbx) # imm = 0x1000401 addq $0x18, %rbx movq %rsp, %rsi movq %rbx, %rdi callq 0x51c0 movq (%rsp), %rdi cmpq %r14, %rdi je 0x97ed movq 0x10(%rsp), %rsi incq %rsi callq 0x5310 movl $0x1000401, %eax # imm = 0x1000401 jmp 0x9818 movq 0x78(%rbx), %rsi addq $0x2, %rsi movzwl %ax, %edx movq %r15, %rdi callq 0x52a0 movzwl 0x82(%rbx), %eax movq 0x20(%rsp), %rcx movw %ax, (%rcx) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x982f jmp 0x984a jmp 0x982f jmp 0x984a movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x984d movq 0x10(%rsp), %rsi incq %rsi callq 0x5310 jmp 0x984d movq %rax, %rbx movq %rbx, %rdi callq 0x5550 nop
_ZN13ModbusRtuPort10readBufferERhS0_PhtPt: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, [rdi+8] movzx eax, word ptr [rbx+82h] cmp eax, 3 ja short loc_96E5 lea r14, [rsp+58h+var_48] mov [r14-10h], r14 lea rsi, aRtuNotCorrectI; "RTU. Not correct input. Input data leng"... lea rdx, aRtuNotCorrectI+32h; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov dword ptr [rbx+10h], 1000102h add rbx, 18h mov rsi, rsp mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+58h+var_58]; void * cmp rdi, r14 jz short loc_96DB mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96DB: mov eax, 1000102h jmp loc_9818 loc_96E5: mov ebp, r8d mov r15, rcx mov r12, rdx mov r13, rsi mov [rsp+58h+var_38], r9 mov rdi, [rbx+78h] lea esi, [rax-2] movzx ecx, byte ptr [rdi+rsi] mov eax, eax movzx r14d, byte ptr [rdi+rax-1] shl r14d, 8 or r14d, ecx call crc16 movzx eax, ax cmp r14d, eax jnz loc_97A2 mov rax, [rbx+78h] mov al, [rax] mov [r13+0], al mov rax, [rbx+78h] mov al, [rax+1] mov [r12], al movzx eax, word ptr [rbx+82h] add eax, 0FFFFFFFCh mov [rbx+82h], ax cmp ax, bp jbe loc_97F4 lea r14, [rsp+58h+var_48] mov [r14-10h], r14 lea rsi, aRtuReadBufferO; "RTU. Read-buffer overflow" lea rdx, aRtuReadBufferO+19h; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov dword ptr [rbx+10h], 1000105h add rbx, 18h mov rsi, rsp mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+58h+var_58]; void * cmp rdi, r14 jz short loc_979B mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_979B: mov eax, 1000105h jmp short loc_9818 loc_97A2: lea r14, [rsp+58h+var_48] mov [r14-10h], r14 lea rsi, aRtuWrongCrc; "RTU. Wrong CRC" lea rdx, aRtuWrongCrc+0Eh; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov dword ptr [rbx+10h], 1000401h add rbx, 18h mov rsi, rsp mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+58h+var_58]; void * cmp rdi, r14 jz short loc_97ED mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_97ED: mov eax, 1000401h jmp short loc_9818 loc_97F4: mov rsi, [rbx+78h] add rsi, 2 movzx edx, ax mov rdi, r15 call _memcpy movzx eax, word ptr [rbx+82h] mov rcx, [rsp+58h+var_38] mov [rcx], ax xor eax, eax loc_9818: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_982F jmp short loc_984A jmp short loc_982F jmp short loc_984A loc_982F: mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r14 jz short loc_984D mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_984D loc_984A: mov rbx, rax loc_984D: mov rdi, rbx call __Unwind_Resume
long long ModbusRtuPort::readBuffer( ModbusRtuPort *this, unsigned __int8 *a2, unsigned __int8 *a3, unsigned __int8 *a4, unsigned __int16 a5, unsigned __int16 *a6) { long long v6; // rbx unsigned int v7; // eax long long v13; // rdi long long v14; // rsi int v15; // r14d unsigned __int16 v16; // ax void *v17[2]; // [rsp+0h] [rbp-58h] BYREF _QWORD v18[2]; // [rsp+10h] [rbp-48h] BYREF unsigned __int16 *v19; // [rsp+20h] [rbp-38h] v6 = *((_QWORD *)this + 1); v7 = *(unsigned __int16 *)(v6 + 130); if ( v7 > 3 ) { v19 = a6; v13 = *(_QWORD *)(v6 + 120); v14 = v7 - 2; v15 = *(unsigned __int8 *)(v13 + v14) | (*(unsigned __int8 *)(v13 + v7 - 1) << 8); if ( v15 == crc16(v13, v14) ) { *a2 = **(_BYTE **)(v6 + 120); *a3 = *(_BYTE *)(*(_QWORD *)(v6 + 120) + 1LL); v16 = *(_WORD *)(v6 + 130) - 4; *(_WORD *)(v6 + 130) = v16; if ( v16 <= a5 ) { memcpy(a4, *(_QWORD *)(v6 + 120) + 2LL, v16); *v19 = *(_WORD *)(v6 + 130); return 0LL; } else { v17[0] = v18; std::string::_M_construct<char const*>((long long)v17, "RTU. Read-buffer overflow", (long long)""); *(_DWORD *)(v6 + 16) = 16777477; std::string::_M_assign(v6 + 24, v17); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); return 16777477LL; } } else { v17[0] = v18; std::string::_M_construct<char const*>((long long)v17, "RTU. Wrong CRC", (long long)""); *(_DWORD *)(v6 + 16) = 16778241; std::string::_M_assign(v6 + 24, v17); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); return 16778241LL; } } else { v17[0] = v18; std::string::_M_construct<char const*>( (long long)v17, "RTU. Not correct input. Input data length to small", (long long)""); *(_DWORD *)(v6 + 16) = 16777474; std::string::_M_assign(v6 + 24, v17); if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); return 16777474LL; } }
readBuffer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,qword ptr [RDI + 0x8] MOVZX EAX,word ptr [RBX + 0x82] CMP EAX,0x3 JA 0x001096e5 LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 LAB_00109699: LEA RSI,[0x118ae7] LEA RDX,[0x118b19] MOV RDI,RSP CALL 0x001092a8 MOV dword ptr [RBX + 0x10],0x1000102 ADD RBX,0x18 LAB_001096ba: MOV RSI,RSP MOV RDI,RBX CALL 0x001051c0 LAB_001096c5: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x001096db MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105310 LAB_001096db: MOV EAX,0x1000102 JMP 0x00109818 LAB_001096e5: MOV EBP,R8D MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV qword ptr [RSP + 0x20],R9 MOV RDI,qword ptr [RBX + 0x78] LEA ESI,[RAX + -0x2] MOVZX ECX,byte ptr [RDI + RSI*0x1] MOV EAX,EAX MOVZX R14D,byte ptr [RDI + RAX*0x1 + -0x1] SHL R14D,0x8 OR R14D,ECX CALL 0x00107a7a MOVZX EAX,AX CMP R14D,EAX JNZ 0x001097a2 MOV RAX,qword ptr [RBX + 0x78] MOV AL,byte ptr [RAX] MOV byte ptr [R13],AL MOV RAX,qword ptr [RBX + 0x78] MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [R12],AL MOVZX EAX,word ptr [RBX + 0x82] ADD EAX,-0x4 MOV word ptr [RBX + 0x82],AX CMP AX,BP JBE 0x001097f4 LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 LAB_00109759: LEA RSI,[0x118b29] LEA RDX,[0x118b42] MOV RDI,RSP CALL 0x001092a8 MOV dword ptr [RBX + 0x10],0x1000105 ADD RBX,0x18 LAB_0010977a: MOV RSI,RSP MOV RDI,RBX CALL 0x001051c0 MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x0010979b MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105310 LAB_0010979b: MOV EAX,0x1000105 JMP 0x00109818 LAB_001097a2: LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 LAB_001097ab: LEA RSI,[0x118b1a] LEA RDX,[0x118b28] MOV RDI,RSP CALL 0x001092a8 MOV dword ptr [RBX + 0x10],0x1000401 ADD RBX,0x18 LAB_001097cc: MOV RSI,RSP MOV RDI,RBX CALL 0x001051c0 LAB_001097d7: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x001097ed MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105310 LAB_001097ed: MOV EAX,0x1000401 JMP 0x00109818 LAB_001097f4: MOV RSI,qword ptr [RBX + 0x78] ADD RSI,0x2 MOVZX EDX,AX MOV RDI,R15 CALL 0x001052a0 MOVZX EAX,word ptr [RBX + 0x82] MOV RCX,qword ptr [RSP + 0x20] MOV word ptr [RCX],AX XOR EAX,EAX LAB_00109818: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ModbusRtuPort::readBuffer(unsigned char&, unsigned char&, unsigned char*, unsigned short, unsigned short*) */ int8 __thiscall ModbusRtuPort::readBuffer (ModbusRtuPort *this,uchar *param_1,uchar *param_2,uchar *param_3,ushort param_4, ushort *param_5) { int1 uVar1; int1 uVar2; long lVar3; short sVar4; ushort uVar5; int8 uVar6; long *local_58 [2]; long local_48 [2]; ushort *local_38; lVar3 = *(long *)(this + 8); uVar5 = *(ushort *)(lVar3 + 0x82); if (uVar5 < 4) { local_58[0] = local_48; /* try { // try from 00109699 to 001096ae has its CatchHandler @ 0010984a */ std::__cxx11::string::_M_construct<char_const*> (local_58,"RTU. Not correct input. Input data length to small",""); *(int4 *)(lVar3 + 0x10) = 0x1000102; /* try { // try from 001096ba to 001096c4 has its CatchHandler @ 0010982f */ std::__cxx11::string::_M_assign((string *)(lVar3 + 0x18)); if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } uVar6 = 0x1000102; } else { uVar1 = *(int1 *)(*(long *)(lVar3 + 0x78) + (ulong)(uVar5 - 2)); uVar2 = *(int1 *)(*(long *)(lVar3 + 0x78) + -1 + (ulong)(uint)uVar5); local_38 = param_5; sVar4 = crc16(); if (CONCAT11(uVar2,uVar1) == sVar4) { *param_1 = **(uchar **)(lVar3 + 0x78); *param_2 = *(uchar *)(*(long *)(lVar3 + 0x78) + 1); uVar5 = *(short *)(lVar3 + 0x82) - 4; *(ushort *)(lVar3 + 0x82) = uVar5; if (param_4 < uVar5) { local_58[0] = local_48; /* try { // try from 00109759 to 0010976e has its CatchHandler @ 00109829 */ std::__cxx11::string::_M_construct<char_const*>(local_58,"RTU. Read-buffer overflow",""); *(int4 *)(lVar3 + 0x10) = 0x1000105; /* try { // try from 0010977a to 00109784 has its CatchHandler @ 00109827 */ std::__cxx11::string::_M_assign((string *)(lVar3 + 0x18)); if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } uVar6 = 0x1000105; } else { memcpy(param_3,(void *)(*(long *)(lVar3 + 0x78) + 2),(ulong)uVar5); *local_38 = *(ushort *)(lVar3 + 0x82); uVar6 = 0; } } else { local_58[0] = local_48; /* try { // try from 001097ab to 001097c0 has its CatchHandler @ 0010982d */ std::__cxx11::string::_M_construct<char_const*>(local_58,"RTU. Wrong CRC",""); *(int4 *)(lVar3 + 0x10) = 0x1000401; /* try { // try from 001097cc to 001097d6 has its CatchHandler @ 0010982b */ std::__cxx11::string::_M_assign((string *)(lVar3 + 0x18)); if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } uVar6 = 0x1000401; } } return uVar6; }
21,950
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<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>(int, 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
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<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>(int, 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 %rbx subq $0x88, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x64cbb(%rip), %rsi # 0xcf3be leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x2ac52 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x65530 leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x695c4 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %r14, %rcx callq 0x654c7 leaq 0x8(%rsp), %rdi callq 0x27998 leaq 0x48(%rsp), %rdi callq 0x27998 leaq 0x28(%rsp), %rdi callq 0x27998 movq 0x68(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x6ac1e leaq 0x68(%rsp), %rdi callq 0x27998 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x68(%rsp), %rdi jmp 0x6a7bf movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x27998 jmp 0x6a7ab movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x27998 jmp 0x6a7ba movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x27998 jmp 0x6a7c9 movq %rax, %rbx movq %rbx, %rdi callq 0x27660
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push rbx sub rsp, 88h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi lea rsi, aTypeError; "type_error" lea rdi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] mov edx, ebp call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea rdi, [rsp+0A8h+var_A0] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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*) lea rdi, [rsp+0A8h+var_40] lea rsi, [rsp+0A8h+var_60] lea rdx, [rsp+0A8h+var_A0] mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) lea rdi, [rsp+0A8h+var_A0]; 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_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdx, [rsp+0A8h+var_40]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail10type_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::type_error::type_error(int,char const*) lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_60] jmp short loc_6A7BF mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6A7AB mov rbx, rax loc_6A7AB: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6A7BA mov rbx, rax loc_6A7BA: lea rdi, [rsp+arg_20]; void * loc_6A7BF: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6A7C9 mov rbx, rax loc_6A7C9: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::type_error * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::type_error *this, int a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF char *v8[8]; // [rsp+68h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(v6, (long long)"type_error"); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(v5); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>( (long long)v8, (long long)v7, (long long)v5, a3); std::string::~string(v5); std::string::~string(v7); std::string::~string(v6); nlohmann::json_abi_v3_11_3::detail::type_error::type_error(this, a2, v8[0]); std::string::~string(v8); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x88 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LAB_0016a6fc: LEA RSI,[0x1cf3be] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x0012ac52 LAB_0016a712: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x00165530 LAB_0016a723: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x001695c4 LAB_0016a730: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x48] LEA RDX,[RSP + 0x8] MOV RCX,R14 CALL 0x001654c7 LEA RDI,[RSP + 0x8] CALL 0x00127998 LEA RDI,[RSP + 0x48] CALL 0x00127998 LEA RDI,[RSP + 0x28] CALL 0x00127998 MOV RDX,qword ptr [RSP + 0x68] LAB_0016a76a: MOV RDI,RBX MOV ESI,EBP CALL 0x0016ac1e LAB_0016a774: LEA RDI,[RSP + 0x68] CALL 0x00127998 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R14 POP R15 POP RBP RET
type_error * _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (type_error *param_1,int param_2,string *param_3) { allocator local_a1; string local_a0 [32]; string local_80 [32]; exception local_60 [32]; char *local_40 [4]; /* try { // try from 0016a6fc to 0016a711 has its CatchHandler @ 0016a7c6 */ std::__cxx11::string::string<std::allocator<char>>(local_80,"type_error",&local_a1); /* try { // try from 0016a712 to 0016a722 has its CatchHandler @ 0016a7b7 */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2); /* try { // try from 0016a723 to 0016a72f has its CatchHandler @ 0016a7a8 */ nlohmann::json_abi_v3_11_3::detail::exception:: diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (local_a0); /* try { // try from 0016a730 to 0016a746 has its CatchHandler @ 0016a799 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&> ((detail *)local_40,(string *)local_60,local_a0,param_3); std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string(local_80); /* try { // try from 0016a76a to 0016a773 has its CatchHandler @ 0016a78f */ nlohmann::json_abi_v3_11_3::detail::type_error::type_error(param_1,param_2,local_40[0]); std::__cxx11::string::~string((string *)local_40); return param_1; }
21,951
insert_events_waits_history_long(PFS_events_waits*)
eloqsql/storage/perfschema/pfs_events_waits.cc
void insert_events_waits_history_long(PFS_events_waits *wait) { if (unlikely(events_waits_history_long_size == 0)) return; uint index= PFS_atomic::add_u32(&events_waits_history_long_index.m_u32, 1); index= index % events_waits_history_long_size; if (index == 0) events_waits_history_long_full= true; /* See related comment in insert_events_waits_history. */ copy_events_waits(&events_waits_history_long_array[index], wait); }
O0
cpp
insert_events_waits_history_long(PFS_events_waits*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, 0x3d90ec(%rip) # 0x40e380 sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x352a3 jmp 0x352f4 leaq 0x3d9296(%rip), %rdi # 0x40e540 movl $0x1, %esi callq 0x33c80 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax xorl %ecx, %ecx movl %ecx, %edx divq 0x3d90bb(%rip) # 0x40e380 movl %edx, %eax movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) jne 0x352d7 movb $0x1, 0x3d9229(%rip) # 0x40e500 movq 0x3d92a2(%rip), %rdi # 0x40e580 movl -0xc(%rbp), %eax imulq $0xb0, %rax, %rax addq %rax, %rdi movq -0x8(%rbp), %rsi callq 0x35250 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_Z32insert_events_waits_history_longP16PFS_events_waits: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp cs:events_waits_history_long_size, 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_352A3 jmp short loc_352F4 loc_352A3: lea rdi, events_waits_history_long_index; this mov esi, (offset dword_0+1); unsigned int * call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint) mov [rbp+var_C], eax mov eax, [rbp+var_C] xor ecx, ecx mov edx, ecx div cs:events_waits_history_long_size mov eax, edx mov [rbp+var_C], eax cmp [rbp+var_C], 0 jnz short loc_352D7 mov cs:events_waits_history_long_full, 1 loc_352D7: mov rdi, cs:events_waits_history_long_array mov eax, [rbp+var_C] imul rax, 0B0h add rdi, rax mov rsi, [rbp+var_8] call _ZL17copy_events_waitsP16PFS_events_waitsPKS_; copy_events_waits(PFS_events_waits *,PFS_events_waits const*) loc_352F4: add rsp, 10h pop rbp retn
long long insert_events_waits_history_long(long long a1) { long long result; // rax unsigned int v2; // [rsp+4h] [rbp-Ch] result = events_waits_history_long_size == 0; if ( events_waits_history_long_size ) { v2 = (unsigned int)PFS_atomic::add_u32( (PFS_atomic *)&events_waits_history_long_index, (unsigned int *)((char *)&dword_0 + 1)) % (unsigned long long)events_waits_history_long_size; if ( !v2 ) events_waits_history_long_full = 1; return copy_events_waits(176LL * v2 + events_waits_history_long_array, a1); } return result; }
insert_events_waits_history_long: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [0x0050e380],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001352a3 JMP 0x001352f4 LAB_001352a3: LEA RDI,[0x50e540] MOV ESI,0x1 CALL 0x00133c80 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] XOR ECX,ECX MOV EDX,ECX DIV qword ptr [0x0050e380] MOV EAX,EDX MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x001352d7 MOV byte ptr [0x0050e500],0x1 LAB_001352d7: MOV RDI,qword ptr [0x0050e580] MOV EAX,dword ptr [RBP + -0xc] IMUL RAX,RAX,0xb0 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x8] CALL 0x00135250 LAB_001352f4: ADD RSP,0x10 POP RBP RET
/* insert_events_waits_history_long(PFS_events_waits*) */ void insert_events_waits_history_long(PFS_events_waits *param_1) { uint uVar1; if (events_waits_history_long_size != 0) { uVar1 = PFS_atomic::add_u32((uint *)events_waits_history_long_index,1); if ((int)((ulong)uVar1 % events_waits_history_long_size) == 0) { events_waits_history_long_full = 1; } copy_events_waits((PFS_events_waits *) (events_waits_history_long_array + ((ulong)uVar1 % events_waits_history_long_size & 0xffffffff) * 0xb0),param_1); } return; }
21,952
JS_DetachArrayBuffer
bluesky950520[P]quickjs/quickjs.c
void JS_DetachArrayBuffer(JSContext *ctx, JSValue obj) { JSArrayBuffer *abuf = JS_GetOpaque(obj, JS_CLASS_ARRAY_BUFFER); struct list_head *el; if (!abuf || abuf->detached) return; if (abuf->free_func) abuf->free_func(ctx->rt, abuf->opaque, abuf->data); abuf->data = NULL; abuf->byte_length = 0; abuf->detached = TRUE; list_for_each(el, &abuf->array_list) { JSTypedArray *ta; JSObject *p; ta = list_entry(el, JSTypedArray, link); p = ta->obj; /* Note: the typed array length and offset fields are not modified */ if (p->class_id != JS_CLASS_DATAVIEW) { p->u.array.count = 0; p->u.array.u.ptr = NULL; } } }
O0
c
JS_DetachArrayBuffer: subq $0x38, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movl $0x13, %edx callq 0x3e640 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) je 0x5e232 movq 0x18(%rsp), %rax movzbl 0x8(%rax), %eax cmpl $0x0, %eax je 0x5e237 jmp 0x5e2f8 movq 0x18(%rsp), %rax cmpq $0x0, 0x30(%rax) je 0x5e269 movq 0x18(%rsp), %rax movq 0x30(%rax), %rax movq 0x20(%rsp), %rcx movq 0x18(%rcx), %rdi movq 0x18(%rsp), %rcx movq 0x28(%rcx), %rsi movq 0x18(%rsp), %rcx movq 0x10(%rcx), %rdx callq *%rax movq 0x18(%rsp), %rax movq $0x0, 0x10(%rax) movq 0x18(%rsp), %rax movl $0x0, (%rax) movq 0x18(%rsp), %rax movb $0x1, 0x8(%rax) movq 0x18(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx addq $0x18, %rcx cmpq %rcx, %rax je 0x5e2f8 movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movq %rax, (%rsp) movq (%rsp), %rax movzwl 0x6(%rax), %eax cmpl $0x21, %eax je 0x5e2e6 movq (%rsp), %rax movl $0x0, 0x40(%rax) movq (%rsp), %rax movq $0x0, 0x38(%rax) jmp 0x5e2e8 movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x5e298 addq $0x38, %rsp retq nopl (%rax)
JS_DetachArrayBuffer: sub rsp, 38h mov [rsp+38h+var_10], rsi mov [rsp+38h+var_8], rdx mov [rsp+38h+var_18], rdi mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_8] mov edx, 13h call JS_GetOpaque mov [rsp+38h+var_20], rax cmp [rsp+38h+var_20], 0 jz short loc_5E232 mov rax, [rsp+38h+var_20] movzx eax, byte ptr [rax+8] cmp eax, 0 jz short loc_5E237 loc_5E232: jmp loc_5E2F8 loc_5E237: mov rax, [rsp+38h+var_20] cmp qword ptr [rax+30h], 0 jz short loc_5E269 mov rax, [rsp+38h+var_20] mov rax, [rax+30h] mov rcx, [rsp+38h+var_18] mov rdi, [rcx+18h] mov rcx, [rsp+38h+var_20] mov rsi, [rcx+28h] mov rcx, [rsp+38h+var_20] mov rdx, [rcx+10h] call rax loc_5E269: mov rax, [rsp+38h+var_20] mov qword ptr [rax+10h], 0 mov rax, [rsp+38h+var_20] mov dword ptr [rax], 0 mov rax, [rsp+38h+var_20] mov byte ptr [rax+8], 1 mov rax, [rsp+38h+var_20] mov rax, [rax+20h] mov [rsp+38h+var_28], rax loc_5E298: mov rax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_20] add rcx, 18h cmp rax, rcx jz short loc_5E2F8 mov rax, [rsp+38h+var_28] mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_30] mov rax, [rax+10h] mov [rsp+38h+var_38], rax mov rax, [rsp+38h+var_38] movzx eax, word ptr [rax+6] cmp eax, 21h ; '!' jz short loc_5E2E6 mov rax, [rsp+38h+var_38] mov dword ptr [rax+40h], 0 mov rax, [rsp+38h+var_38] mov qword ptr [rax+38h], 0 loc_5E2E6: jmp short $+2 loc_5E2E8: mov rax, [rsp+38h+var_28] mov rax, [rax+8] mov [rsp+38h+var_28], rax jmp short loc_5E298 loc_5E2F8: add rsp, 38h retn
long long JS_DetachArrayBuffer(long long a1, long long a2, int a3) { long long result; // rax long long v4; // [rsp+0h] [rbp-38h] long long i; // [rsp+10h] [rbp-28h] long long v6; // [rsp+18h] [rbp-20h] result = JS_GetOpaque(a2, a3, 19); v6 = result; if ( result ) { result = *(unsigned __int8 *)(result + 8); if ( !*(_BYTE *)(v6 + 8) ) { if ( *(_QWORD *)(v6 + 48) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v6 + 48))( *(_QWORD *)(a1 + 24), *(_QWORD *)(v6 + 40), *(_QWORD *)(v6 + 16)); *(_QWORD *)(v6 + 16) = 0LL; *(_DWORD *)v6 = 0; *(_BYTE *)(v6 + 8) = 1; for ( i = *(_QWORD *)(v6 + 32); ; i = *(_QWORD *)(i + 8) ) { result = i; if ( i == v6 + 24 ) break; v4 = *(_QWORD *)(i + 16); if ( *(_WORD *)(v4 + 6) != 33 ) { *(_DWORD *)(v4 + 64) = 0; *(_QWORD *)(v4 + 56) = 0LL; } } } } return result; }
JS_DetachArrayBuffer: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV EDX,0x13 CALL 0x0013e640 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x0015e232 MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX + 0x8] CMP EAX,0x0 JZ 0x0015e237 LAB_0015e232: JMP 0x0015e2f8 LAB_0015e237: MOV RAX,qword ptr [RSP + 0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x0015e269 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RCX + 0x18] MOV RCX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RCX + 0x10] CALL RAX LAB_0015e269: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x8],0x1 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x10],RAX LAB_0015e298: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x18 CMP RAX,RCX JZ 0x0015e2f8 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0x21 JZ 0x0015e2e6 MOV RAX,qword ptr [RSP] MOV dword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x38],0x0 LAB_0015e2e6: JMP 0x0015e2e8 LAB_0015e2e8: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x0015e298 LAB_0015e2f8: ADD RSP,0x38 RET
void JS_DetachArrayBuffer(long param_1,int8 param_2,int8 param_3) { long lVar1; int4 *puVar2; int4 *local_28; puVar2 = (int4 *)JS_GetOpaque(param_2,param_3,0x13); if ((puVar2 != (int4 *)0x0) && (*(char *)(puVar2 + 2) == '\0')) { if (*(long *)(puVar2 + 0xc) != 0) { (**(code **)(puVar2 + 0xc)) (*(int8 *)(param_1 + 0x18),*(int8 *)(puVar2 + 10), *(int8 *)(puVar2 + 4)); } *(int8 *)(puVar2 + 4) = 0; *puVar2 = 0; *(int1 *)(puVar2 + 2) = 1; for (local_28 = *(int4 **)(puVar2 + 8); local_28 != puVar2 + 6; local_28 = *(int4 **)(local_28 + 2)) { lVar1 = *(long *)(local_28 + 4); if (*(short *)(lVar1 + 6) != 0x21) { *(int4 *)(lVar1 + 0x40) = 0; *(int8 *)(lVar1 + 0x38) = 0; } } } return; }
21,953
JS_DetachArrayBuffer
bluesky950520[P]quickjs/quickjs.c
void JS_DetachArrayBuffer(JSContext *ctx, JSValue obj) { JSArrayBuffer *abuf = JS_GetOpaque(obj, JS_CLASS_ARRAY_BUFFER); struct list_head *el; if (!abuf || abuf->detached) return; if (abuf->free_func) abuf->free_func(ctx->rt, abuf->opaque, abuf->data); abuf->data = NULL; abuf->byte_length = 0; abuf->detached = TRUE; list_for_each(el, &abuf->array_list) { JSTypedArray *ta; JSObject *p; ta = list_entry(el, JSTypedArray, link); p = ta->obj; /* Note: the typed array length and offset fields are not modified */ if (p->class_id != JS_CLASS_DATAVIEW) { p->u.array.count = 0; p->u.array.u.ptr = NULL; } } }
O2
c
JS_DetachArrayBuffer: cmpl $-0x1, %edx jne 0x35c1a pushq %rbx cmpw $0x13, 0x6(%rsi) jne 0x35c19 movq 0x30(%rsi), %rbx testq %rbx, %rbx je 0x35c19 cmpb $0x0, 0x8(%rbx) je 0x35c1b popq %rbx retq movq 0x30(%rbx), %rax testq %rax, %rax je 0x35c32 movq 0x18(%rdi), %rdi movq 0x10(%rbx), %rdx movq 0x28(%rbx), %rsi callq *%rax andq $0x0, 0x10(%rbx) andl $0x0, (%rbx) movb $0x1, 0x8(%rbx) leaq 0x18(%rbx), %rax addq $0x20, %rbx movq (%rbx), %rbx cmpq %rax, %rbx je 0x35c19 movq 0x10(%rbx), %rcx cmpw $0x21, 0x6(%rcx) je 0x35c62 andl $0x0, 0x40(%rcx) andq $0x0, 0x38(%rcx) addq $0x8, %rbx jmp 0x35c46
JS_DetachArrayBuffer: cmp edx, 0FFFFFFFFh jnz short locret_35C1A push rbx cmp word ptr [rsi+6], 13h jnz short loc_35C19 mov rbx, [rsi+30h] test rbx, rbx jz short loc_35C19 cmp byte ptr [rbx+8], 0 jz short loc_35C1B loc_35C19: pop rbx locret_35C1A: retn loc_35C1B: mov rax, [rbx+30h] test rax, rax jz short loc_35C32 mov rdi, [rdi+18h] mov rdx, [rbx+10h] mov rsi, [rbx+28h] call rax loc_35C32: and qword ptr [rbx+10h], 0 and dword ptr [rbx], 0 mov byte ptr [rbx+8], 1 lea rax, [rbx+18h] add rbx, 20h ; ' ' loc_35C46: mov rbx, [rbx] cmp rbx, rax jz short loc_35C19 mov rcx, [rbx+10h] cmp word ptr [rcx+6], 21h ; '!' jz short loc_35C62 and dword ptr [rcx+40h], 0 and qword ptr [rcx+38h], 0 loc_35C62: add rbx, 8 jmp short loc_35C46
void JS_DetachArrayBuffer(long long a1, long long a2, int a3) { long long v3; // rbx void ( *v4)(_QWORD, _QWORD, _QWORD); // rax long long v5; // rax long long *i; // rbx long long v7; // rbx long long v8; // rcx if ( a3 == -1 && *(_WORD *)(a2 + 6) == 19 ) { v3 = *(_QWORD *)(a2 + 48); if ( v3 ) { if ( !*(_BYTE *)(v3 + 8) ) { v4 = *(void ( **)(_QWORD, _QWORD, _QWORD))(v3 + 48); if ( v4 ) v4(*(_QWORD *)(a1 + 24), *(_QWORD *)(v3 + 40), *(_QWORD *)(v3 + 16)); *(_QWORD *)(v3 + 16) = 0LL; *(_DWORD *)v3 = 0; *(_BYTE *)(v3 + 8) = 1; v5 = v3 + 24; for ( i = (long long *)(v3 + 32); ; i = (long long *)(v7 + 8) ) { v7 = *i; if ( v7 == v5 ) break; v8 = *(_QWORD *)(v7 + 16); if ( *(_WORD *)(v8 + 6) != 33 ) { *(_DWORD *)(v8 + 64) = 0; *(_QWORD *)(v8 + 56) = 0LL; } } } } } }
JS_DetachArrayBuffer: CMP EDX,-0x1 JNZ 0x00135c1a PUSH RBX CMP word ptr [RSI + 0x6],0x13 JNZ 0x00135c19 MOV RBX,qword ptr [RSI + 0x30] TEST RBX,RBX JZ 0x00135c19 CMP byte ptr [RBX + 0x8],0x0 JZ 0x00135c1b LAB_00135c19: POP RBX LAB_00135c1a: RET LAB_00135c1b: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x00135c32 MOV RDI,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RBX + 0x28] CALL RAX LAB_00135c32: AND qword ptr [RBX + 0x10],0x0 AND dword ptr [RBX],0x0 MOV byte ptr [RBX + 0x8],0x1 LEA RAX,[RBX + 0x18] ADD RBX,0x20 LAB_00135c46: MOV RBX,qword ptr [RBX] CMP RBX,RAX JZ 0x00135c19 MOV RCX,qword ptr [RBX + 0x10] CMP word ptr [RCX + 0x6],0x21 JZ 0x00135c62 AND dword ptr [RCX + 0x40],0x0 AND qword ptr [RCX + 0x38],0x0 LAB_00135c62: ADD RBX,0x8 JMP 0x00135c46
void JS_DetachArrayBuffer(long param_1,long param_2,int param_3) { int4 *puVar1; int4 *puVar2; long lVar3; int8 *puVar4; if ((((param_3 == -1) && (*(short *)(param_2 + 6) == 0x13)) && (puVar1 = *(int4 **)(param_2 + 0x30), puVar1 != (int4 *)0x0)) && (*(char *)(puVar1 + 2) == '\0')) { if (*(code **)(puVar1 + 0xc) != (code *)0x0) { (**(code **)(puVar1 + 0xc)) (*(int8 *)(param_1 + 0x18),*(int8 *)(puVar1 + 10), *(int8 *)(puVar1 + 4)); } *(int8 *)(puVar1 + 4) = 0; *puVar1 = 0; *(int1 *)(puVar1 + 2) = 1; puVar4 = (int8 *)(puVar1 + 8); while (puVar2 = (int4 *)*puVar4, puVar2 != puVar1 + 6) { lVar3 = *(long *)(puVar2 + 4); if (*(short *)(lVar3 + 6) != 0x21) { *(int4 *)(lVar3 + 0x40) = 0; *(int8 *)(lVar3 + 0x38) = 0; } puVar4 = (int8 *)(puVar2 + 2); } } return; }
21,954
ulight::cpp::match_integer_literal(std::basic_string_view<char8_t, std::char_traits<char8_t>>)
ulight/src/main/cpp/cpp.cpp
Literal_Match_Result match_integer_literal // NOLINT(bugprone-exception-escape) (std::u8string_view s) noexcept { if (s.empty() || !is_ascii_digit(s[0])) { return { Literal_Match_Status::no_digits, 0, {} }; } if (s.starts_with(u8"0b")) { const std::size_t digits = match_digits(s.substr(2), 2); if (digits == 0) { return { Literal_Match_Status::no_digits_following_prefix, 2, Integer_Literal_Type::binary }; } return { Literal_Match_Status::ok, digits + 2, Integer_Literal_Type::binary }; } if (s.starts_with(u8"0x")) { const std::size_t digits = match_digits(s.substr(2), 16); if (digits == 0) { return { Literal_Match_Status::no_digits_following_prefix, 2, Integer_Literal_Type::hexadecimal }; } return { Literal_Match_Status::ok, digits + 2, Integer_Literal_Type::hexadecimal }; } if (s[0] == '0') { const std::size_t digits = match_digits(s, 8); return { Literal_Match_Status::ok, digits, digits == 1 ? Integer_Literal_Type::decimal : Integer_Literal_Type::octal }; } const std::size_t digits = match_digits(s, 10); return { Literal_Match_Status::ok, digits, Integer_Literal_Type::decimal }; }
O0
cpp
ulight::cpp::match_integer_literal(std::basic_string_view<char8_t, std::char_traits<char8_t>>): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x90(%rbp) movq %rdi, -0x88(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x8(%rbp) leaq -0x10(%rbp), %rdi callq 0xb350 testb $0x1, %al jne 0x93c7 xorl %eax, %eax movl %eax, %esi leaq -0x10(%rbp), %rdi callq 0xb3a0 movzbl (%rax), %edi callq 0xb370 movb %al, -0x91(%rbp) jmp 0x93bb movb -0x91(%rbp), %al testb $0x1, %al jne 0x93ed jmp 0x93c7 movq -0x90(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x50c0 movq -0x90(%rbp), %rax movb $0x1, (%rax) movb $0x0, 0x10(%rax) jmp 0x9634 leaq -0x10(%rbp), %rdi leaq 0x12527(%rip), %rsi # 0x1b91f callq 0xb190 testb $0x1, %al jne 0x9406 jmp 0x94a8 leaq -0x10(%rbp), %rdi movl $0x2, %esi movq $-0x1, %rdx callq 0xb1d0 movq %rdx, -0xa8(%rbp) movq %rax, -0xa0(%rbp) jmp 0x942b movq -0xa8(%rbp), %rax movq -0xa0(%rbp), %rcx movq %rcx, -0x28(%rbp) movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movl $0x2, %edx callq 0x191c0 movq %rax, -0xb0(%rbp) jmp 0x945c movq -0xb0(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x9489 movq -0x90(%rbp), %rax movb $0x2, (%rax) movq $0x2, 0x8(%rax) movb $0x0, 0x10(%rax) jmp 0x9634 movq -0x90(%rbp), %rax movb $0x0, (%rax) movq -0x18(%rbp), %rcx addq $0x2, %rcx movq %rcx, 0x8(%rax) movb $0x0, 0x10(%rax) jmp 0x9634 leaq -0x10(%rbp), %rdi leaq 0x1246f(%rip), %rsi # 0x1b922 callq 0xb190 testb $0x1, %al jne 0x94c1 jmp 0x9563 leaq -0x10(%rbp), %rdi movl $0x2, %esi movq $-0x1, %rdx callq 0xb1d0 movq %rdx, -0xc0(%rbp) movq %rax, -0xb8(%rbp) jmp 0x94e6 movq -0xc0(%rbp), %rax movq -0xb8(%rbp), %rcx movq %rcx, -0x40(%rbp) movq %rax, -0x38(%rbp) movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x10, %edx callq 0x191c0 movq %rax, -0xc8(%rbp) jmp 0x9517 movq -0xc8(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x9544 movq -0x90(%rbp), %rax movb $0x2, (%rax) movq $0x2, 0x8(%rax) movb $0x3, 0x10(%rax) jmp 0x9634 movq -0x90(%rbp), %rax movb $0x0, (%rax) movq -0x30(%rbp), %rcx addq $0x2, %rcx movq %rcx, 0x8(%rax) movb $0x3, 0x10(%rax) jmp 0x9634 leaq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xb3a0 movzbl (%rax), %eax cmpl $0x30, %eax jne 0x95f0 movups -0x10(%rbp), %xmm0 movaps %xmm0, -0x60(%rbp) movq -0x60(%rbp), %rdi movq -0x58(%rbp), %rsi movl $0x8, %edx callq 0x191c0 movq %rax, -0xd0(%rbp) jmp 0x959b movq -0x90(%rbp), %rax movq -0xd0(%rbp), %rcx movq %rcx, -0x48(%rbp) movb $0x0, (%rax) movq -0x48(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x48(%rbp), %rcx movb $0x2, %al movb $0x1, %dl movb %dl, -0xd2(%rbp) cmpq $0x1, %rcx movb %al, -0xd1(%rbp) je 0x95de movb -0xd2(%rbp), %al movb %al, -0xd1(%rbp) movq -0x90(%rbp), %rax movb -0xd1(%rbp), %cl movb %cl, 0x10(%rax) jmp 0x9634 movups -0x10(%rbp), %xmm0 movaps %xmm0, -0x80(%rbp) movq -0x80(%rbp), %rdi movq -0x78(%rbp), %rsi movl $0xa, %edx callq 0x191c0 movq %rax, -0xe0(%rbp) jmp 0x9613 movq -0x90(%rbp), %rax movq -0xe0(%rbp), %rcx movq %rcx, -0x68(%rbp) movb $0x0, (%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x8(%rax) movb $0x2, 0x10(%rax) movq -0x88(%rbp), %rax addq $0xe0, %rsp popq %rbp retq movq %rax, %rdi callq 0x6830 nopl (%rax)
_ZN6ulight3cpp21match_integer_literalESt17basic_string_viewIDuSt11char_traitsIDuEE: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_90], rdi mov [rbp+var_88], rdi mov qword ptr [rbp+var_10], rsi mov qword ptr [rbp+var_10+8], rdx lea rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE5emptyEv; std::u8string_view::empty(void) test al, 1 jnz short loc_93C7 xor eax, eax mov esi, eax lea rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong) movzx edi, byte ptr [rax] call _ZN6ulight14is_ascii_digitEDu; ulight::is_ascii_digit(char8_t) mov [rbp+var_91], al jmp short $+2 loc_93BB: mov al, [rbp+var_91] test al, 1 jnz short loc_93ED jmp short $+2 loc_93C7: mov rdi, [rbp+var_90] xor esi, esi mov edx, 18h call _memset mov rax, [rbp+var_90] mov byte ptr [rax], 1 mov byte ptr [rax+10h], 0 jmp loc_9634 loc_93ED: lea rdi, [rbp+var_10] lea rsi, a0b; "0b" call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE11starts_withEPKDu; std::u8string_view::starts_with(char8_t const*) test al, 1 jnz short loc_9406 jmp loc_94A8 loc_9406: lea rdi, [rbp+var_10] mov esi, 2 mov rdx, 0FFFFFFFFFFFFFFFFh call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6substrEmm; std::u8string_view::substr(ulong,ulong) mov [rbp+var_A8], rdx mov [rbp+var_A0], rax jmp short $+2 loc_942B: mov rax, [rbp+var_A8] mov rcx, [rbp+var_A0] mov [rbp+var_28], rcx mov [rbp+var_20], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov edx, 2 call _ZN6ulight12match_digitsESt17basic_string_viewIDuSt11char_traitsIDuEEi; ulight::match_digits(std::u8string_view,int) mov [rbp+var_B0], rax jmp short $+2 loc_945C: mov rax, [rbp+var_B0] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_9489 mov rax, [rbp+var_90] mov byte ptr [rax], 2 mov qword ptr [rax+8], 2 mov byte ptr [rax+10h], 0 jmp loc_9634 loc_9489: mov rax, [rbp+var_90] mov byte ptr [rax], 0 mov rcx, [rbp+var_18] add rcx, 2 mov [rax+8], rcx mov byte ptr [rax+10h], 0 jmp loc_9634 loc_94A8: lea rdi, [rbp+var_10] lea rsi, a0x; "0x" call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE11starts_withEPKDu; std::u8string_view::starts_with(char8_t const*) test al, 1 jnz short loc_94C1 jmp loc_9563 loc_94C1: lea rdi, [rbp+var_10] mov esi, 2 mov rdx, 0FFFFFFFFFFFFFFFFh call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6substrEmm; std::u8string_view::substr(ulong,ulong) mov [rbp+var_C0], rdx mov [rbp+var_B8], rax jmp short $+2 loc_94E6: mov rax, [rbp+var_C0] mov rcx, [rbp+var_B8] mov [rbp+var_40], rcx mov [rbp+var_38], rax mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov edx, 10h call _ZN6ulight12match_digitsESt17basic_string_viewIDuSt11char_traitsIDuEEi; ulight::match_digits(std::u8string_view,int) mov [rbp+var_C8], rax jmp short $+2 loc_9517: mov rax, [rbp+var_C8] mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_9544 mov rax, [rbp+var_90] mov byte ptr [rax], 2 mov qword ptr [rax+8], 2 mov byte ptr [rax+10h], 3 jmp loc_9634 loc_9544: mov rax, [rbp+var_90] mov byte ptr [rax], 0 mov rcx, [rbp+var_30] add rcx, 2 mov [rax+8], rcx mov byte ptr [rax+10h], 3 jmp loc_9634 loc_9563: lea rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong) movzx eax, byte ptr [rax] cmp eax, 30h ; '0' jnz short loc_95F0 movups xmm0, [rbp+var_10] movaps [rbp+var_60], xmm0 mov rdi, qword ptr [rbp+var_60] mov rsi, qword ptr [rbp+var_60+8] mov edx, 8 call _ZN6ulight12match_digitsESt17basic_string_viewIDuSt11char_traitsIDuEEi; ulight::match_digits(std::u8string_view,int) mov [rbp+var_D0], rax jmp short $+2 loc_959B: mov rax, [rbp+var_90] mov rcx, [rbp+var_D0] mov [rbp+var_48], rcx mov byte ptr [rax], 0 mov rcx, [rbp+var_48] mov [rax+8], rcx mov rcx, [rbp+var_48] mov al, 2 mov dl, 1 mov [rbp+var_D2], dl cmp rcx, 1 mov [rbp+var_D1], al jz short loc_95DE mov al, [rbp+var_D2] mov [rbp+var_D1], al loc_95DE: mov rax, [rbp+var_90] mov cl, [rbp+var_D1] mov [rax+10h], cl jmp short loc_9634 loc_95F0: movups xmm0, [rbp+var_10] movaps [rbp+var_80], xmm0 mov rdi, qword ptr [rbp+var_80] mov rsi, qword ptr [rbp+var_80+8] mov edx, 0Ah call _ZN6ulight12match_digitsESt17basic_string_viewIDuSt11char_traitsIDuEEi; ulight::match_digits(std::u8string_view,int) mov [rbp+var_E0], rax jmp short $+2 loc_9613: mov rax, [rbp+var_90] mov rcx, [rbp+var_E0] mov [rbp+var_68], rcx mov byte ptr [rax], 0 mov rcx, [rbp+var_68] mov [rax+8], rcx mov byte ptr [rax+10h], 2 loc_9634: mov rax, [rbp+var_88] add rsp, 0E0h pop rbp retn mov rdi, rax call __clang_call_terminate
long long ulight::cpp::match_integer_literal(long long a1, long long a2, long long a3) { long long v3; // rdi long long v4; // rax long long v5; // rdx long long v6; // rax long long v7; // rdx long long v9; // [rsp+0h] [rbp-E0h] char v10; // [rsp+Fh] [rbp-D1h] long long v11; // [rsp+10h] [rbp-D0h] long long v14; // [rsp+B0h] [rbp-30h] long long matched; // [rsp+C8h] [rbp-18h] long long v16; // [rsp+D0h] [rbp-10h] BYREF long long v17; // [rsp+D8h] [rbp-8h] v16 = a2; v17 = a3; if ( (std::u8string_view::empty(&v16) & 1) == 0 && (v3 = *(unsigned __int8 *)std::u8string_view::operator[](&v16, 0LL), (ulight::is_ascii_digit(v3) & 1) != 0) ) { if ( (std::u8string_view::starts_with(&v16, "0b") & 1) != 0 ) { v4 = std::u8string_view::substr(&v16, 2LL, -1LL); matched = ulight::match_digits(v4, v5, 2LL); if ( matched ) { *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = matched + 2; } else { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = 2LL; } *(_BYTE *)(a1 + 16) = 0; } else if ( (std::u8string_view::starts_with(&v16, "0x") & 1) != 0 ) { v6 = std::u8string_view::substr(&v16, 2LL, -1LL); v14 = ulight::match_digits(v6, v7, 16LL); if ( v14 ) { *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = v14 + 2; } else { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = 2LL; } *(_BYTE *)(a1 + 16) = 3; } else if ( *(_BYTE *)std::u8string_view::operator[](&v16, 0LL) == 48 ) { v11 = ulight::match_digits(v16, v17, 8LL); *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = v11; v10 = 2; if ( v11 != 1 ) v10 = 1; *(_BYTE *)(a1 + 16) = v10; } else { v9 = ulight::match_digits(v16, v17, 10LL); *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = v9; *(_BYTE *)(a1 + 16) = 2; } } else { memset(a1, 0LL, 24LL); *(_BYTE *)a1 = 1; *(_BYTE *)(a1 + 16) = 0; } return a1; }
match_integer_literal: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x90],RDI MOV qword ptr [RBP + -0x88],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x8],RDX LEA RDI,[RBP + -0x10] CALL 0x0010b350 TEST AL,0x1 JNZ 0x001093c7 XOR EAX,EAX MOV ESI,EAX LEA RDI,[RBP + -0x10] CALL 0x0010b3a0 MOVZX EDI,byte ptr [RAX] LAB_001093ae: CALL 0x0010b370 LAB_001093b3: MOV byte ptr [RBP + -0x91],AL JMP 0x001093bb LAB_001093bb: MOV AL,byte ptr [RBP + -0x91] TEST AL,0x1 JNZ 0x001093ed JMP 0x001093c7 LAB_001093c7: MOV RDI,qword ptr [RBP + -0x90] XOR ESI,ESI MOV EDX,0x18 CALL 0x001050c0 MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RAX],0x1 MOV byte ptr [RAX + 0x10],0x0 JMP 0x00109634 LAB_001093ed: LEA RDI,[RBP + -0x10] LEA RSI,[0x11b91f] CALL 0x0010b190 TEST AL,0x1 JNZ 0x00109406 JMP 0x001094a8 LAB_00109406: LEA RDI,[RBP + -0x10] MOV ESI,0x2 MOV RDX,-0x1 CALL 0x0010b1d0 MOV qword ptr [RBP + -0xa8],RDX MOV qword ptr [RBP + -0xa0],RAX JMP 0x0010942b LAB_0010942b: MOV RAX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,0x2 CALL 0x001191c0 MOV qword ptr [RBP + -0xb0],RAX JMP 0x0010945c LAB_0010945c: MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00109489 MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RAX],0x2 MOV qword ptr [RAX + 0x8],0x2 MOV byte ptr [RAX + 0x10],0x0 JMP 0x00109634 LAB_00109489: MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x2 MOV qword ptr [RAX + 0x8],RCX MOV byte ptr [RAX + 0x10],0x0 JMP 0x00109634 LAB_001094a8: LEA RDI,[RBP + -0x10] LEA RSI,[0x11b922] CALL 0x0010b190 TEST AL,0x1 JNZ 0x001094c1 JMP 0x00109563 LAB_001094c1: LEA RDI,[RBP + -0x10] MOV ESI,0x2 MOV RDX,-0x1 CALL 0x0010b1d0 MOV qword ptr [RBP + -0xc0],RDX MOV qword ptr [RBP + -0xb8],RAX JMP 0x001094e6 LAB_001094e6: MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x10 CALL 0x001191c0 MOV qword ptr [RBP + -0xc8],RAX JMP 0x00109517 LAB_00109517: MOV RAX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00109544 MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RAX],0x2 MOV qword ptr [RAX + 0x8],0x2 MOV byte ptr [RAX + 0x10],0x3 JMP 0x00109634 LAB_00109544: MOV RAX,qword ptr [RBP + -0x90] MOV byte ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x30] ADD RCX,0x2 MOV qword ptr [RAX + 0x8],RCX MOV byte ptr [RAX + 0x10],0x3 JMP 0x00109634 LAB_00109563: LEA RDI,[RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x0010b3a0 MOVZX EAX,byte ptr [RAX] CMP EAX,0x30 JNZ 0x001095f0 MOVUPS XMM0,xmmword ptr [RBP + -0x10] MOVAPS xmmword ptr [RBP + -0x60],XMM0 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x58] MOV EDX,0x8 CALL 0x001191c0 MOV qword ptr [RBP + -0xd0],RAX JMP 0x0010959b LAB_0010959b: MOV RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RBP + -0xd0] MOV qword ptr [RBP + -0x48],RCX MOV byte ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x48] MOV AL,0x2 MOV DL,0x1 MOV byte ptr [RBP + -0xd2],DL CMP RCX,0x1 MOV byte ptr [RBP + -0xd1],AL JZ 0x001095de MOV AL,byte ptr [RBP + -0xd2] MOV byte ptr [RBP + -0xd1],AL LAB_001095de: MOV RAX,qword ptr [RBP + -0x90] MOV CL,byte ptr [RBP + -0xd1] MOV byte ptr [RAX + 0x10],CL JMP 0x00109634 LAB_001095f0: MOVUPS XMM0,xmmword ptr [RBP + -0x10] MOVAPS xmmword ptr [RBP + -0x80],XMM0 MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,0xa CALL 0x001191c0 MOV qword ptr [RBP + -0xe0],RAX JMP 0x00109613 LAB_00109613: MOV RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RBP + -0xe0] MOV qword ptr [RBP + -0x68],RCX MOV byte ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV byte ptr [RAX + 0x10],0x2 LAB_00109634: MOV RAX,qword ptr [RBP + -0x88] ADD RSP,0xe0 POP RBP RET
/* ulight::cpp::match_integer_literal(std::basic_string_view<char8_t, std::char_traits<char8_t> >) */ int1 * ulight::cpp::match_integer_literal(int1 *param_1,ulight *param_2,int8 param_3) { byte bVar1; ulong uVar2; uchar *puVar3; char *pcVar4; long lVar5; int8 uVar6; int1 auVar7 [16]; int1 local_d9; ulight *local_18; int8 uStack_10; local_18 = param_2; uStack_10 = param_3; uVar2 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::empty ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_18); if ((uVar2 & 1) == 0) { puVar3 = (uchar *)std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[] ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_18,0 ); /* try { // try from 001093ae to 001093b2 has its CatchHandler @ 00109644 */ bVar1 = is_ascii_digit(*puVar3); if ((bVar1 & 1) != 0) { uVar2 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::starts_with ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_18,"0b"); if ((uVar2 & 1) != 0) { /* try { // try from 00109406 to 00109609 has its CatchHandler @ 00109644 */ auVar7 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::substr ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_18,2, 0xffffffffffffffff); lVar5 = match_digits(auVar7._0_8_,auVar7._8_8_,2); if (lVar5 == 0) { *param_1 = 2; *(int8 *)(param_1 + 8) = 2; param_1[0x10] = 0; return param_1; } *param_1 = 0; *(long *)(param_1 + 8) = lVar5 + 2; param_1[0x10] = 0; return param_1; } uVar2 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::starts_with ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_18,"0x"); if ((uVar2 & 1) == 0) { pcVar4 = (char *)std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[] ((basic_string_view<char8_t,std::char_traits<char8_t>> *) &local_18,0); if (*pcVar4 == '0') { lVar5 = match_digits(local_18,uStack_10,8); *param_1 = 0; *(long *)(param_1 + 8) = lVar5; local_d9 = 2; if (lVar5 != 1) { local_d9 = 1; } param_1[0x10] = local_d9; return param_1; } uVar6 = match_digits(local_18,uStack_10,10); *param_1 = 0; *(int8 *)(param_1 + 8) = uVar6; param_1[0x10] = 2; return param_1; } auVar7 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::substr ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_18,2, 0xffffffffffffffff); lVar5 = match_digits(auVar7._0_8_,auVar7._8_8_,0x10); if (lVar5 == 0) { *param_1 = 2; *(int8 *)(param_1 + 8) = 2; param_1[0x10] = 3; return param_1; } *param_1 = 0; *(long *)(param_1 + 8) = lVar5 + 2; param_1[0x10] = 3; return param_1; } } memset(param_1,0,0x18); *param_1 = 1; param_1[0x10] = 0; return param_1; }
21,955
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/./minja.hpp
std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); return match[0].str(); } it = start; return ""; }
O0
cpp
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): subq $0xb8, %rsp movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) movl %ecx, 0x9c(%rsp) movq 0xa8(%rsp), %rdi movq %rdi, 0x38(%rsp) movq 0x20(%rdi), %rax movq %rax, 0x90(%rsp) movl 0x9c(%rsp), %esi callq 0x9b0b0 leaq 0x70(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x76d30 movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx movq 0x20(%rax), %rcx movq %rcx, 0x68(%rsp) movq 0x18(%rax), %rax movq %rax, 0x60(%rsp) movq 0xa0(%rsp), %rcx movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi xorl %r8d, %r8d callq 0x7a3f0 movb %al, 0x4e(%rsp) jmp 0x77943 movb 0x4e(%rsp), %al testb $0x1, %al jne 0x77950 jmp 0x779e0 xorl %eax, %eax movl %eax, %esi leaq 0x70(%rsp), %rdi callq 0x7a490 movq %rax, 0x20(%rsp) jmp 0x77965 movq 0x20(%rsp), %rax cmpq $0x0, %rax jne 0x779e0 xorl %eax, %eax movl %eax, %esi leaq 0x70(%rsp), %rdi callq 0x9b140 movq %rax, 0x18(%rsp) jmp 0x77985 movq 0x18(%rsp), %rdi callq 0x9b1b0 movq 0x38(%rsp), %rdi movq %rax, %rsi addq $0x20, %rdi callq 0x9b220 xorl %eax, %eax movl %eax, %esi leaq 0x70(%rsp), %rdi callq 0x9b140 movq %rax, 0x10(%rsp) jmp 0x779b5 movq 0x10(%rsp), %rsi movq 0x28(%rsp), %rdi callq 0x9b2c0 jmp 0x779c6 movl $0x1, 0x50(%rsp) jmp 0x77a46 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0x77a5d movq 0x38(%rsp), %rax movq 0x90(%rsp), %rcx movq %rcx, 0x20(%rax) leaq 0x4f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x50d60 movq 0x28(%rsp), %rdi movq 0x8(%rsp), %rdx leaq 0x15363f(%rip), %rsi # 0x1cb050 callq 0x61bd0 jmp 0x77a18 leaq 0x4f(%rsp), %rdi callq 0x510a0 movl $0x1, 0x50(%rsp) jmp 0x77a46 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x4f(%rsp), %rdi callq 0x510a0 jmp 0x77a5d leaq 0x70(%rsp), %rdi callq 0x7a7a0 movq 0x30(%rsp), %rax addq $0xb8, %rsp retq leaq 0x70(%rsp), %rdi callq 0x7a7a0 movq 0x58(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: sub rsp, 0B8h mov [rsp+0B8h+var_90], rdi mov rax, rdi mov [rsp+0B8h+var_88], rax mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_1C], ecx mov rdi, [rsp+0B8h+var_10] mov [rsp+0B8h+var_80], rdi mov rax, [rdi+20h] mov [rsp+0B8h+var_28], rax mov esi, [rsp+0B8h+var_1C] call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) lea rdi, [rsp+0B8h+var_48] mov [rsp+0B8h+var_78], rdi call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEC2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results(void) mov rax, [rsp+0B8h+var_80] mov rdx, [rsp+0B8h+var_78] mov rcx, [rax+20h] mov [rsp+0B8h+var_50], rcx mov rax, [rax+18h] mov [rsp+0B8h+var_58], rax mov rcx, [rsp+0B8h+var_18] mov rdi, [rsp+0B8h+var_50] mov rsi, [rsp+0B8h+var_58] xor r8d, r8d call _ZSt12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS4_9sub_matchISA_EEEcNS4_12regex_traitsIcEEEbT_SG_RNS4_13match_resultsISG_T0_EERKNS4_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rsp+0B8h+var_6A], al jmp short $+2 loc_77943: mov al, [rsp+0B8h+var_6A] test al, 1 jnz short loc_77950 jmp loc_779E0 loc_77950: xor eax, eax mov esi, eax lea rdi, [rsp+0B8h+var_48] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong) mov [rsp+0B8h+var_98], rax jmp short $+2 loc_77965: mov rax, [rsp+0B8h+var_98] cmp rax, 0 jnz short loc_779E0 xor eax, eax mov esi, eax lea rdi, [rsp+0B8h+var_48] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEixEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](ulong) mov [rsp+0B8h+var_A0], rax jmp short $+2 loc_77985: mov rdi, [rsp+0B8h+var_A0] call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE6lengthEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(void) mov rdi, [rsp+0B8h+var_80] mov rsi, rax add rdi, 20h ; ' ' call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEpLEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+=(long) xor eax, eax mov esi, eax lea rdi, [rsp+0B8h+var_48] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEixEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](ulong) mov [rsp+0B8h+var_A8], rax jmp short $+2 loc_779B5: mov rsi, [rsp+0B8h+var_A8] mov rdi, [rsp+0B8h+var_90] call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) jmp short $+2 loc_779C6: mov [rsp+0B8h+var_68], 1 jmp short loc_77A46 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_77A5D loc_779E0: mov rax, [rsp+0B8h+var_80] mov rcx, [rsp+0B8h+var_28] mov [rax+20h], rcx lea rdi, [rsp+0B8h+var_69] mov [rsp+0B8h+var_B0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+0B8h+var_90] mov rdx, [rsp+0B8h+var_B0] lea rsi, aSJinja+16h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_77A18: lea rdi, [rsp+0B8h+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rsp+0B8h+var_68], 1 jmp short loc_77A46 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_47] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_77A5D loc_77A46: lea rdi, [rsp+0B8h+var_48] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rax, [rsp+0B8h+var_88] add rsp, 0B8h retn loc_77A5D: lea rdi, [rsp+arg_68] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rdi, [rsp+arg_50] call __Unwind_Resume
long long minja::Parser::consumeToken(long long a1, long long a2, long long a3, unsigned int a4) { long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v10; // [rsp+10h] [rbp-A8h] long long v11; // [rsp+18h] [rbp-A0h] char v12; // [rsp+4Fh] [rbp-69h] BYREF int v13; // [rsp+50h] [rbp-68h] long long v14; // [rsp+60h] [rbp-58h] long long v15; // [rsp+68h] [rbp-50h] _BYTE v16[32]; // [rsp+70h] [rbp-48h] BYREF long long v17; // [rsp+90h] [rbp-28h] unsigned int v18; // [rsp+9Ch] [rbp-1Ch] long long v19; // [rsp+A0h] [rbp-18h] long long v20; // [rsp+A8h] [rbp-10h] long long v21; // [rsp+B0h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results((long long)v16); v15 = *(_QWORD *)(a2 + 32); v14 = *(_QWORD *)(a2 + 24); if ( (std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( v15, v14, v16, v19, 0LL) & 1) == 0 || std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(v16, 0LL) ) { *(_QWORD *)(a2 + 32) = v17; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v12); std::allocator<char>::~allocator(&v12); v13 = 1; } else { v11 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](v16, 0LL); v4 = std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(v11); __gnu_cxx::__normal_iterator<char const*,std::string>::operator+=(a2 + 32, v4); v10 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](v16, 0LL); std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(a1, v10, v5, v6, v7, v8); v13 = 1; } std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results(v16); return a1; }
consumeToken: SUB RSP,0xb8 MOV qword ptr [RSP + 0x28],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0xb0],RDI MOV qword ptr [RSP + 0xa8],RSI MOV qword ptr [RSP + 0xa0],RDX MOV dword ptr [RSP + 0x9c],ECX MOV RDI,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x38],RDI MOV RAX,qword ptr [RDI + 0x20] MOV qword ptr [RSP + 0x90],RAX MOV ESI,dword ptr [RSP + 0x9c] CALL 0x0019b0b0 LEA RDI,[RSP + 0x70] MOV qword ptr [RSP + 0x40],RDI CALL 0x00176d30 MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x68],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x60],RAX MOV RCX,qword ptr [RSP + 0xa0] MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] LAB_00177935: XOR R8D,R8D CALL 0x0017a3f0 MOV byte ptr [RSP + 0x4e],AL JMP 0x00177943 LAB_00177943: MOV AL,byte ptr [RSP + 0x4e] TEST AL,0x1 JNZ 0x00177950 JMP 0x001779e0 LAB_00177950: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x70] CALL 0x0017a490 MOV qword ptr [RSP + 0x20],RAX JMP 0x00177965 LAB_00177965: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,0x0 JNZ 0x001779e0 XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x70] CALL 0x0019b140 MOV qword ptr [RSP + 0x18],RAX JMP 0x00177985 LAB_00177985: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0019b1b0 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,RAX ADD RDI,0x20 CALL 0x0019b220 XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x70] CALL 0x0019b140 MOV qword ptr [RSP + 0x10],RAX JMP 0x001779b5 LAB_001779b5: MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x28] CALL 0x0019b2c0 JMP 0x001779c6 LAB_001779c6: MOV dword ptr [RSP + 0x50],0x1 JMP 0x00177a46 LAB_001779e0: MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x90] MOV qword ptr [RAX + 0x20],RCX LEA RDI,[RSP + 0x4f] MOV qword ptr [RSP + 0x8],RDI CALL 0x00150d60 MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x8] LAB_00177a0a: LEA RSI,[0x2cb050] CALL 0x00161bd0 LAB_00177a16: JMP 0x00177a18 LAB_00177a18: LEA RDI,[RSP + 0x4f] CALL 0x001510a0 MOV dword ptr [RSP + 0x50],0x1 JMP 0x00177a46 LAB_00177a46: LEA RDI,[RSP + 0x70] CALL 0x0017a7a0 MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0xb8 RET
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ string * minja::Parser::consumeToken (string *param_1,Parser *param_2,int8 param_3,int4 param_4) { bool bVar1; long lVar2; sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> *this; allocator local_69; int4 local_68; int8 local_58; int8 local_50; match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> local_48 [32]; int8 local_28; int4 local_1c; int8 local_18; Parser *local_10; string *local_8; local_28 = *(int8 *)(param_2 + 0x20); local_1c = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; consumeSpaces(param_2,param_4); std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::match_results(local_48); local_50 = *(int8 *)(param_2 + 0x20); local_58 = *(int8 *)(param_2 + 0x18); /* try { // try from 00177935 to 001779c3 has its CatchHandler @ 001779d0 */ bVar1 = std:: regex_search<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>> (local_50,local_58,local_48,local_18,0); if ((bVar1) && (lVar2 = std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::position(local_48,0), lVar2 == 0)) { this = (sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> *) std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::operator[](local_48,0); lVar2 = std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> ::length(this); __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator+= ((__normal_iterator<char_const*,std::__cxx11::string> *)(param_2 + 0x20),lVar2); std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::operator[](local_48,0); std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str(); } else { *(int8 *)(param_2 + 0x20) = local_28; std::allocator<char>::allocator(); /* try { // try from 00177a0a to 00177a15 has its CatchHandler @ 00177a2c */ std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_69); std::allocator<char>::~allocator((allocator<char> *)&local_69); } local_68 = 1; std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::~match_results(local_48); return param_1; }
21,956
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/./minja.hpp
std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); return match[0].str(); } it = start; return ""; }
O3
cpp
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0x3bcc2 xorps %xmm0, %xmm0 movq %rsp, %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x5a370 testb %al, %al je 0x2fdef movq 0x18(%rsp), %rsi movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %rdx subq %rax, %rdx je 0x2fdd6 movq (%rax), %r8 cmpq $0x48, %rdx jne 0x2fde7 cmpq %rsi, %r8 jne 0x2fdef jmp 0x2fddd cmpq %rsi, -0x48(%rax,%rdx) jne 0x2fdef leaq (%rax,%rdx), %rdi addq $-0x48, %rdi jmp 0x2fe31 movq %rax, %rdi cmpq %rsi, %r8 je 0x2fe31 movq %r12, 0x20(%r14) leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x8563a(%rip), %rdx # 0xb543b movq %rbx, %rdi movq %rdx, %rsi callq 0x590a2 movq (%rsp), %rdi testq %rdi, %rdi je 0x2fe22 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x186a0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x8(%rdi), %r8 subq %rsi, %r8 xorl %esi, %esi cmpb $0x0, 0x10(%rdi) cmovneq %r8, %rsi addq %rsi, 0x20(%r14) cmpq $0x48, %rdx leaq -0x48(%rax,%rdx), %rsi movq %rax, %rdx cmoveq %rsi, %rdx cmpq %rcx, %rax cmoveq %rsi, %rdx cmpb $0x1, 0x10(%rdx) jne 0x2fe7b movq (%rdx), %rsi movq 0x8(%rdx), %rdx leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %rbx, %rdi callq 0x5c3c6 jmp 0x2fe0c leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) jmp 0x2fe0c jmp 0x2fe95 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x2feae movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18b90
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 mov rdx, rsp movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov rcx, r15 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_2FDEF mov rsi, [rsp+48h+var_30] mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov rdx, rcx sub rdx, rax jz short loc_2FDD6 mov r8, [rax] cmp rdx, 48h ; 'H' jnz short loc_2FDE7 cmp r8, rsi jnz short loc_2FDEF jmp short loc_2FDDD loc_2FDD6: cmp [rax+rdx-48h], rsi jnz short loc_2FDEF loc_2FDDD: lea rdi, [rax+rdx] add rdi, 0FFFFFFFFFFFFFFB8h jmp short loc_2FE31 loc_2FDE7: mov rdi, rax cmp r8, rsi jz short loc_2FE31 loc_2FDEF: mov [r14+20h], r12 lea rax, [rbx+10h] mov [rbx], rax lea rdx, aSJinja+16h; "" mov rdi, rbx mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_2FE0C: mov rdi, [rsp+48h+var_48]; void * test rdi, rdi jz short loc_2FE22 mov rsi, [rsp+48h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2FE22: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn loc_2FE31: mov r8, [rdi+8] sub r8, rsi xor esi, esi cmp byte ptr [rdi+10h], 0 cmovnz rsi, r8 add [r14+20h], rsi cmp rdx, 48h ; 'H' lea rsi, [rax+rdx-48h] mov rdx, rax cmovz rdx, rsi cmp rax, rcx cmovz rdx, rsi cmp byte ptr [rdx+10h], 1 jnz short loc_2FE7B mov rsi, [rdx] mov rdx, [rdx+8] lea rax, [rbx+10h] mov [rbx], rax mov rdi, rbx 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) jmp short loc_2FE0C loc_2FE7B: lea rax, [rbx+10h] mov [rbx], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 jmp loc_2FE0C jmp short $+2 loc_2FE95: mov rbx, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_2FEAE mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2FEAE: mov rdi, rbx call __Unwind_Resume
long long minja::Parser::consumeToken(long long a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 long long v9; // rdx long long v10; // r8 long long v11; // rdi long long v13; // rsi bool v14; // zf long long v15; // rsi long long v16; // rdx long long v17; // rsi long long v18; // rdx __int128 v19; // [rsp+0h] [rbp-48h] BYREF __int128 v20; // [rsp+10h] [rbp-38h] v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v20 = 0LL; v19 = 0LL; if ( !(unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( *(_QWORD *)(a2 + 32), *(_QWORD *)(a2 + 24), &v19, a3, 0LL) ) goto LABEL_9; v8 = v19; v9 = *((_QWORD *)&v19 + 1) - v19; if ( *((_QWORD *)&v19 + 1) != (_QWORD)v19 ) { v10 = *(_QWORD *)v19; if ( v9 == 72 ) { if ( v10 == *((_QWORD *)&v20 + 1) ) goto LABEL_7; } else { v11 = v19; if ( v10 == *((_QWORD *)&v20 + 1) ) goto LABEL_13; } LABEL_9: *(_QWORD *)(a2 + 32) = v7; *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, "", ""); goto LABEL_10; } if ( *(_QWORD *)(*((_QWORD *)&v19 + 1) - 72LL) != *((_QWORD *)&v20 + 1) ) goto LABEL_9; LABEL_7: v11 = *((_QWORD *)&v19 + 1) - 72LL; LABEL_13: v13 = 0LL; if ( *(_BYTE *)(v11 + 16) ) v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v20 + 1); *(_QWORD *)(a2 + 32) += v13; v14 = v9 == 72; v15 = v8 + v9 - 72; v16 = v8; if ( v14 ) v16 = v15; if ( (_QWORD)v8 == *((_QWORD *)&v8 + 1) ) v16 = v15; if ( *(_BYTE *)(v16 + 16) == 1 ) { v17 = *(_QWORD *)v16; v18 = *(_QWORD *)(v16 + 8); *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(a1, v17, v18); } else { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; } LABEL_10: if ( (_QWORD)v19 ) operator delete((void *)v19, v20 - v19); return a1; }
consumeToken: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x0013bcc2 XORPS XMM0,XMM0 MOV RDX,RSP MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_0012fda1: MOV RCX,R15 XOR R8D,R8D CALL 0x0015a370 TEST AL,AL JZ 0x0012fdef MOV RSI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDX,RCX SUB RDX,RAX JZ 0x0012fdd6 MOV R8,qword ptr [RAX] CMP RDX,0x48 JNZ 0x0012fde7 CMP R8,RSI JNZ 0x0012fdef JMP 0x0012fddd LAB_0012fdd6: CMP qword ptr [RAX + RDX*0x1 + -0x48],RSI JNZ 0x0012fdef LAB_0012fddd: LEA RDI,[RAX + RDX*0x1] ADD RDI,-0x48 JMP 0x0012fe31 LAB_0012fde7: MOV RDI,RAX CMP R8,RSI JZ 0x0012fe31 LAB_0012fdef: MOV qword ptr [R14 + 0x20],R12 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_0012fdfa: LEA RDX,[0x1b543b] MOV RDI,RBX MOV RSI,RDX CALL 0x001590a2 LAB_0012fe0c: MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0012fe22 MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x001186a0 LAB_0012fe22: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET LAB_0012fe31: MOV R8,qword ptr [RDI + 0x8] SUB R8,RSI XOR ESI,ESI CMP byte ptr [RDI + 0x10],0x0 CMOVNZ RSI,R8 ADD qword ptr [R14 + 0x20],RSI CMP RDX,0x48 LEA RSI,[RAX + RDX*0x1 + -0x48] MOV RDX,RAX CMOVZ RDX,RSI CMP RAX,RCX CMOVZ RDX,RSI CMP byte ptr [RDX + 0x10],0x1 JNZ 0x0012fe7b MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_0012fe71: MOV RDI,RBX CALL 0x0015c3c6 LAB_0012fe79: JMP 0x0012fe0c LAB_0012fe7b: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 JMP 0x0012fe0c
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ long * minja::Parser::consumeToken (long *param_1,Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; bool bVar2; long lVar3; long *plVar4; long lVar5; long *plVar6; long *local_48; long *plStack_40; long local_38; long lStack_30; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_38 = 0; lStack_30 = 0; local_48 = (long *)0x0; plStack_40 = (long *)0x0; /* try { // try from 0012fda1 to 0012fdab has its CatchHandler @ 0012fe95 */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_48, param_3,0); if (bVar2) { lVar3 = (long)plStack_40 - (long)local_48; if (lVar3 == 0) { lVar5 = local_48[-9]; joined_r0x0012fddb: if (lVar5 != lStack_30) goto LAB_0012fdef; plVar6 = (long *)((long)local_48 + lVar3 + -0x48); } else { lVar5 = *local_48; if (lVar3 == 0x48) goto joined_r0x0012fddb; plVar6 = local_48; if (lVar5 != lStack_30) goto LAB_0012fdef; } lVar5 = 0; if ((char)plVar6[2] != '\0') { lVar5 = plVar6[1] - lStack_30; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar5; plVar6 = (long *)((long)local_48 + lVar3 + -0x48); plVar4 = local_48; if (lVar3 == 0x48) { plVar4 = plVar6; } if (local_48 == plStack_40) { plVar4 = plVar6; } if ((char)plVar4[2] == '\x01') { lVar3 = *plVar4; lVar5 = plVar4[1]; *param_1 = (long)(param_1 + 2); /* try { // try from 0012fe71 to 0012fe78 has its CatchHandler @ 0012fe95 */ std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (param_1,lVar3,lVar5); } else { *param_1 = (long)(param_1 + 2); param_1[1] = 0; *(int1 *)(param_1 + 2) = 0; } } else { LAB_0012fdef: *(int8 *)(param_2 + 0x20) = uVar1; *param_1 = (long)(param_1 + 2); /* try { // try from 0012fdfa to 0012fe0b has its CatchHandler @ 0012fe93 */ std::__cxx11::string::_M_construct<char_const*>(param_1,""); } if (local_48 != (long *)0x0) { operator_delete(local_48,local_38 - (long)local_48); } return param_1; }
21,957
my_wildcmp_unicode_impl
eloqsql/strings/ctype-utf8.c
static int my_wildcmp_unicode_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, MY_UNICASE_INFO *weights, int recurse_level) { int result= -1; /* Not found, using wildcards */ my_wc_t s_wc, w_wc; int scan; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (1) { my_bool escaped= 0; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { result= 1; /* Found an anchor char */ break; } wildstr+= scan; if (w_wc == (my_wc_t) escape && wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; escaped= 1; } if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; if (!escaped && w_wc == (my_wc_t) w_one) { result= 1; /* Found an anchor char */ } else { if (weights) { my_tosort_unicode(weights, &s_wc, cs->state); my_tosort_unicode(weights, &w_wc, cs->state); } if (s_wc != w_wc) return 1; /* No match */ } if (wildstr == wildend) return (str != str_end); /* Match if both are at end */ } if (w_wc == (my_wc_t) w_many) { /* Found w_many */ /* Remove any '%' and '_' from the wild search string */ for ( ; wildstr != wildend ; ) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { wildstr+= scan; continue; } if (w_wc == (my_wc_t) w_one) { wildstr+= scan; if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; continue; } break; /* Not a wild character */ } if (wildstr == wildend) return 0; /* Ok if w_many is last */ if (str == str_end) return -1; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; if (w_wc == (my_wc_t) escape) { if (wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; } } while (1) { /* Skip until the first character from wildstr is found */ while (str != str_end) { if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; if (weights) { my_tosort_unicode(weights, &s_wc, cs->state); my_tosort_unicode(weights, &w_wc, cs->state); } if (s_wc == w_wc) break; str+= scan; } if (str == str_end) return -1; str+= scan; result= my_wildcmp_unicode_impl(cs, str, str_end, wildstr, wildend, escape, w_one, w_many, weights, recurse_level + 1); if (result <= 0) return result; } } } return (str != str_end ? 1 : 0); }
O3
c
my_wildcmp_unicode_impl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, -0x54(%rbp) movq %r8, %r12 movq %rcx, %r13 movq %rdx, -0x50(%rbp) movq %rsi, -0x38(%rbp) movq %rdi, %r15 movl 0x28(%rbp), %eax movq %rax, -0x60(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) leaq 0xb3da37(%rip), %rax # 0xc08de8 movq (%rax), %rax testq %rax, %rax je 0xcb3cb movl 0x28(%rbp), %edi callq *%rax movl $0x1, %ebx testl %eax, %eax jne 0xcb75b cmpq %r12, %r13 je 0xcb55a movl 0x18(%rbp), %eax movl 0x10(%rbp), %ecx cltq movq %rax, -0x78(%rbp) movslq -0x54(%rbp), %rax movq %rax, -0x70(%rbp) movslq %ecx, %rax movq %rax, -0x68(%rbp) movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx movq -0x40(%rbp), %r14 callq *%r14 testl %eax, %eax jle 0xcb756 movq -0x30(%rbp), %rcx cmpq -0x78(%rbp), %rcx je 0xcb56c movl %eax, %eax addq %rax, %r13 cmpq -0x70(%rbp), %rcx jne 0xcb472 cmpq %r12, %r13 jae 0xcb472 movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0xcb756 movl %eax, %ebx movq %r15, %rdi leaq -0x48(%rbp), %rsi movq %r14, %rax movq -0x38(%rbp), %r14 movq %r14, %rdx movq -0x50(%rbp), %rcx callq *%rax testl %eax, %eax jle 0xcb756 movl %ebx, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, %r14 movq %r14, -0x38(%rbp) jmp 0xcb4a6 movq %r15, %rdi leaq -0x48(%rbp), %rsi movq -0x38(%rbp), %rbx movq %rbx, %rdx movq -0x50(%rbp), %rcx callq *%r14 testl %eax, %eax jle 0xcb756 movl %eax, %eax addq %rax, %rbx movq %rbx, -0x38(%rbp) movq -0x68(%rbp), %rax cmpq %rax, -0x30(%rbp) je 0xcb551 movq -0x48(%rbp), %rax movq 0x20(%rbp), %r8 testq %r8, %r8 je 0xcb53f movl 0xc(%r15), %ecx movq (%r8), %rdx movl $0xfffd, %esi # imm = 0xFFFD cmpq %rdx, %rax ja 0xcb4f4 movq 0x8(%r8), %rsi movq %rax, %rdi shrq $0x8, %rdi movq (%rsi,%rdi,8), %rsi testq %rsi, %rsi je 0xcb4fb xorl %edi, %edi testw %cx, %cx setns %dil movzbl %al, %eax leaq (%rax,%rax,2), %rax leaq (%rsi,%rax,4), %rax movl 0x4(%rax,%rdi,4), %esi movq %rsi, -0x48(%rbp) movq %rsi, %rax movq -0x30(%rbp), %rsi movl $0xfffd, %edi # imm = 0xFFFD cmpq %rdx, %rsi ja 0xcb536 movq 0x8(%r8), %rdx movq %rsi, %rdi shrq $0x8, %rdi movq (%rdx,%rdi,8), %rdx testq %rdx, %rdx je 0xcb543 xorl %edi, %edi testw %cx, %cx setns %dil movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rdx,%rcx,4), %rcx movl 0x4(%rcx,%rdi,4), %edi movq %rdi, -0x30(%rbp) movq %rdi, %rsi jmp 0xcb543 movq -0x30(%rbp), %rsi movl $0x1, %ebx cmpq %rsi, %rax jne 0xcb75b cmpq %r12, %r13 jne 0xcb3ef xorl %ebx, %ebx movq -0x50(%rbp), %rax cmpq %rax, -0x38(%rbp) setne %bl jmp 0xcb75b xorl %ebx, %ebx cmpq %r12, %r13 je 0xcb75b movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0xcb756 movl %eax, %r14d movq -0x30(%rbp), %rax cmpq -0x78(%rbp), %rax jne 0xcb5b0 movl %r14d, %eax addq %rax, %r13 cmpq %r12, %r13 movq -0x40(%rbp), %r14 jne 0xcb577 jmp 0xcb75b cmpq -0x68(%rbp), %rax jne 0xcb5de movq %r15, %rdi leaq -0x48(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x50(%rbp), %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0xcb756 movl %r14d, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, -0x38(%rbp) jmp 0xcb5a2 movq -0x50(%rbp), %r14 cmpq %r14, -0x38(%rbp) je 0xcb76c leaq -0x30(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0xcb756 movl %eax, %eax addq %rax, %r13 movq -0x70(%rbp), %rax cmpq %rax, -0x30(%rbp) jne 0xcb635 cmpq %r12, %r13 jae 0xcb635 leaq -0x30(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0xcb756 movl %eax, %eax addq %rax, %r13 movq -0x60(%rbp), %rax incl %eax movq %rax, -0x60(%rbp) movq -0x38(%rbp), %rbx cmpq %r14, %rbx je 0xcb76c movq %r15, %rdi leaq -0x48(%rbp), %rsi movq %rbx, %rdx movq %r14, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0xcb756 movq -0x48(%rbp), %rcx movq 0x20(%rbp), %rsi testq %rsi, %rsi je 0xcb70a movl 0xc(%r15), %edx movq (%rsi), %rsi movl $0xfffd, %edi # imm = 0xFFFD cmpq %rsi, %rcx ja 0xcb6b8 movq 0x20(%rbp), %rdi movq 0x8(%rdi), %rdi movq %rcx, %r8 shrq $0x8, %r8 movq (%rdi,%r8,8), %rdi testq %rdi, %rdi je 0xcb6bf xorl %r8d, %r8d testw %dx, %dx setns %r8b movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rdi,%rcx,4), %rcx movl 0x4(%rcx,%r8,4), %edi movq %rdi, -0x48(%rbp) movq %rdi, %rcx movq -0x30(%rbp), %rdi movl $0xfffd, %r8d # imm = 0xFFFD cmpq %rsi, %rdi ja 0xcb701 movq 0x20(%rbp), %rsi movq 0x8(%rsi), %rsi movq %rdi, %r8 shrq $0x8, %r8 movq (%rsi,%r8,8), %rsi testq %rsi, %rsi je 0xcb70e xorl %r8d, %r8d testw %dx, %dx setns %r8b movzbl %dil, %edx leaq (%rdx,%rdx,2), %rdx leaq (%rsi,%rdx,4), %rdx movl 0x4(%rdx,%r8,4), %r8d movq %r8, -0x30(%rbp) movq %r8, %rdi jmp 0xcb70e movq -0x30(%rbp), %rdi movl %eax, %eax addq %rax, %rbx cmpq %rdi, %rcx jne 0xcb643 movq %r15, %rdi movq %rbx, -0x38(%rbp) movq %rbx, %rsi movq %r14, %rdx movq %r13, %rcx movq %r12, %r8 movl -0x54(%rbp), %r9d pushq -0x60(%rbp) pushq 0x20(%rbp) movl 0x18(%rbp), %eax pushq %rax movl 0x10(%rbp), %eax pushq %rax callq 0xcb36e addq $0x20, %rsp movl %eax, %ebx testl %eax, %eax jg 0xcb63f jmp 0xcb75b movl $0x1, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0xcb75b
my_wildcmp_unicode_impl: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_54], r9d mov r12, r8 mov r13, rcx mov [rbp+var_50], rdx mov [rbp+var_38], rsi mov r15, rdi mov eax, [rbp+arg_18] mov [rbp+var_60], rax mov rax, [rdi+0B8h] mov rax, [rax+28h] mov [rbp+var_40], rax lea rax, my_string_stack_guard mov rax, [rax] test rax, rax jz short loc_CB3CB mov edi, [rbp+arg_18] call rax mov ebx, 1 test eax, eax jnz loc_CB75B loc_CB3CB: cmp r13, r12 jz loc_CB55A mov eax, [rbp+arg_8] mov ecx, [rbp+arg_0] cdqe mov [rbp+var_78], rax movsxd rax, [rbp+var_54] mov [rbp+var_70], rax movsxd rax, ecx mov [rbp+var_68], rax loc_CB3EF: mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 mov r14, [rbp+var_40] call r14 test eax, eax jle loc_CB756 mov rcx, [rbp+var_30] cmp rcx, [rbp+var_78] jz loc_CB56C mov eax, eax add r13, rax cmp rcx, [rbp+var_70] jnz short loc_CB472 cmp r13, r12 jnb short loc_CB472 mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_CB756 mov ebx, eax mov rdi, r15 lea rsi, [rbp+var_48] mov rax, r14 mov r14, [rbp+var_38] mov rdx, r14 mov rcx, [rbp+var_50] call rax test eax, eax jle loc_CB756 mov ecx, ebx add r13, rcx mov eax, eax add r14, rax mov [rbp+var_38], r14 jmp short loc_CB4A6 loc_CB472: mov rdi, r15 lea rsi, [rbp+var_48] mov rbx, [rbp+var_38] mov rdx, rbx mov rcx, [rbp+var_50] call r14 test eax, eax jle loc_CB756 mov eax, eax add rbx, rax mov [rbp+var_38], rbx mov rax, [rbp+var_68] cmp [rbp+var_30], rax jz loc_CB551 loc_CB4A6: mov rax, [rbp+var_48] mov r8, [rbp+arg_10] test r8, r8 jz loc_CB53F mov ecx, [r15+0Ch] mov rdx, [r8] mov esi, 0FFFDh cmp rax, rdx ja short loc_CB4F4 mov rsi, [r8+8] mov rdi, rax shr rdi, 8 mov rsi, [rsi+rdi*8] test rsi, rsi jz short loc_CB4FB xor edi, edi test cx, cx setns dil movzx eax, al lea rax, [rax+rax*2] lea rax, [rsi+rax*4] mov esi, [rax+rdi*4+4] loc_CB4F4: mov [rbp+var_48], rsi mov rax, rsi loc_CB4FB: mov rsi, [rbp+var_30] mov edi, 0FFFDh cmp rsi, rdx ja short loc_CB536 mov rdx, [r8+8] mov rdi, rsi shr rdi, 8 mov rdx, [rdx+rdi*8] test rdx, rdx jz short loc_CB543 xor edi, edi test cx, cx setns dil movzx ecx, sil lea rcx, [rcx+rcx*2] lea rcx, [rdx+rcx*4] mov edi, [rcx+rdi*4+4] loc_CB536: mov [rbp+var_30], rdi mov rsi, rdi jmp short loc_CB543 loc_CB53F: mov rsi, [rbp+var_30] loc_CB543: mov ebx, 1 cmp rax, rsi jnz loc_CB75B loc_CB551: cmp r13, r12 jnz loc_CB3EF loc_CB55A: xor ebx, ebx mov rax, [rbp+var_50] cmp [rbp+var_38], rax setnz bl jmp loc_CB75B loc_CB56C: xor ebx, ebx cmp r13, r12 jz loc_CB75B loc_CB577: mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_CB756 mov r14d, eax mov rax, [rbp+var_30] cmp rax, [rbp+var_78] jnz short loc_CB5B0 mov eax, r14d add r13, rax loc_CB5A2: cmp r13, r12 mov r14, [rbp+var_40] jnz short loc_CB577 jmp loc_CB75B loc_CB5B0: cmp rax, [rbp+var_68] jnz short loc_CB5DE mov rdi, r15 lea rsi, [rbp+var_48] mov rdx, [rbp+var_38] mov rcx, [rbp+var_50] call [rbp+var_40] test eax, eax jle loc_CB756 mov ecx, r14d add r13, rcx mov eax, eax add [rbp+var_38], rax jmp short loc_CB5A2 loc_CB5DE: mov r14, [rbp+var_50] cmp [rbp+var_38], r14 jz loc_CB76C lea rsi, [rbp+var_30] mov rdi, r15 mov rdx, r13 mov rcx, r12 call [rbp+var_40] test eax, eax jle loc_CB756 mov eax, eax add r13, rax mov rax, [rbp+var_70] cmp [rbp+var_30], rax jnz short loc_CB635 cmp r13, r12 jnb short loc_CB635 lea rsi, [rbp+var_30] mov rdi, r15 mov rdx, r13 mov rcx, r12 call [rbp+var_40] test eax, eax jle loc_CB756 mov eax, eax add r13, rax loc_CB635: mov rax, [rbp+var_60] inc eax mov [rbp+var_60], rax loc_CB63F: mov rbx, [rbp+var_38] loc_CB643: cmp rbx, r14 jz loc_CB76C mov rdi, r15 lea rsi, [rbp+var_48] mov rdx, rbx mov rcx, r14 call [rbp+var_40] test eax, eax jle loc_CB756 mov rcx, [rbp+var_48] mov rsi, [rbp+arg_10] test rsi, rsi jz loc_CB70A mov edx, [r15+0Ch] mov rsi, [rsi] mov edi, 0FFFDh cmp rcx, rsi ja short loc_CB6B8 mov rdi, [rbp+arg_10] mov rdi, [rdi+8] mov r8, rcx shr r8, 8 mov rdi, [rdi+r8*8] test rdi, rdi jz short loc_CB6BF xor r8d, r8d test dx, dx setns r8b movzx ecx, cl lea rcx, [rcx+rcx*2] lea rcx, [rdi+rcx*4] mov edi, [rcx+r8*4+4] loc_CB6B8: mov [rbp+var_48], rdi mov rcx, rdi loc_CB6BF: mov rdi, [rbp+var_30] mov r8d, 0FFFDh cmp rdi, rsi ja short loc_CB701 mov rsi, [rbp+arg_10] mov rsi, [rsi+8] mov r8, rdi shr r8, 8 mov rsi, [rsi+r8*8] test rsi, rsi jz short loc_CB70E xor r8d, r8d test dx, dx setns r8b movzx edx, dil lea rdx, [rdx+rdx*2] lea rdx, [rsi+rdx*4] mov r8d, [rdx+r8*4+4] loc_CB701: mov [rbp+var_30], r8 mov rdi, r8 jmp short loc_CB70E loc_CB70A: mov rdi, [rbp+var_30] loc_CB70E: mov eax, eax add rbx, rax cmp rcx, rdi jnz loc_CB643 mov rdi, r15 mov [rbp+var_38], rbx mov rsi, rbx mov rdx, r14 mov rcx, r13 mov r8, r12 mov r9d, [rbp+var_54] push [rbp+var_60] push [rbp+arg_10] mov eax, [rbp+arg_8] push rax mov eax, [rbp+arg_0] push rax call my_wildcmp_unicode_impl add rsp, 20h mov ebx, eax test eax, eax jg loc_CB63F jmp short loc_CB75B loc_CB756: mov ebx, 1 loc_CB75B: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CB76C: mov ebx, 0FFFFFFFFh jmp short loc_CB75B
long long my_wildcmp_unicode_impl( long long a1, long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5, int a6, int a7, int a8, unsigned long long *a9, unsigned int a10) { unsigned int v13; // ebx long long ( *v14)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // r14 int v15; // eax int v16; // eax unsigned int v17; // ebx long long ( *v18)(long long, unsigned long long *, long long, long long); // rax long long v19; // r14 int v20; // eax long long v21; // rbx int v22; // eax long long v23; // rax int v24; // ecx unsigned long long v25; // rdx long long v26; // rsi long long v27; // rsi long long v28; // rsi long long v29; // rdi long long v30; // rdx int v31; // eax unsigned int v32; // r14d int v33; // eax int v34; // eax unsigned long long v35; // r13 int v36; // eax unsigned long long v37; // rbx int v38; // eax long long v39; // rcx int v40; // edx unsigned long long v41; // rsi long long v42; // rdi long long v43; // rdi long long v44; // rdi long long v45; // r8 long long v46; // rsi unsigned long long v50; // [rsp+38h] [rbp-48h] BYREF long long ( *v51)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // [rsp+40h] [rbp-40h] long long v52; // [rsp+48h] [rbp-38h] unsigned __int8 v53[48]; // [rsp+50h] [rbp-30h] BYREF v52 = a2; v51 = *(long long ( **)(long long, unsigned __int8 *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( my_string_stack_guard ) { v13 = 1; if ( (unsigned int)my_string_stack_guard(a10) ) return v13; } if ( a4 == a5 ) return v52 != a3; while ( 1 ) { v14 = v51; v15 = v51(a1, v53, a4, a5); if ( v15 <= 0 ) return 1; if ( *(_QWORD *)v53 == a8 ) break; a4 += (unsigned int)v15; if ( *(_QWORD *)v53 == a6 && a4 < a5 ) { v16 = v14(a1, v53, a4, a5); if ( v16 <= 0 ) return 1; v17 = v16; v18 = (long long ( *)(long long, unsigned long long *, long long, long long))v14; v19 = v52; v20 = v18(a1, &v50, v52, a3); if ( v20 <= 0 ) return 1; a4 += v17; v52 = (unsigned int)v20 + v19; LABEL_13: v23 = v50; if ( a9 ) { v24 = *(_DWORD *)(a1 + 12); v25 = *a9; v26 = 65533LL; if ( v50 > *a9 ) goto LABEL_17; v27 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8)); if ( v27 ) { v26 = *(unsigned int *)(v27 + 12LL * (unsigned __int8)v50 + 4LL * ((v24 & 0x8000u) == 0) + 4); LABEL_17: v50 = v26; v23 = v26; } v28 = *(_QWORD *)v53; v29 = 65533LL; if ( *(_QWORD *)v53 > v25 ) { LABEL_21: *(_QWORD *)v53 = v29; v28 = v29; } else { v30 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8)); if ( v30 ) { v29 = *(unsigned int *)(v30 + 12LL * v53[0] + 4LL * ((v24 & 0x8000u) == 0) + 4); goto LABEL_21; } } } else { v28 = *(_QWORD *)v53; } v13 = 1; if ( v23 != v28 ) return v13; goto LABEL_24; } v21 = v52; v22 = v14(a1, (unsigned __int8 *)&v50, v52, a3); if ( v22 <= 0 ) return 1; v52 = (unsigned int)v22 + v21; if ( *(_QWORD *)v53 != a7 ) goto LABEL_13; LABEL_24: if ( a4 == a5 ) return v52 != a3; } v13 = 0; if ( a4 == a5 ) return v13; while ( 2 ) { v31 = v14(a1, v53, a4, a5); if ( v31 <= 0 ) return 1; v32 = v31; if ( *(_QWORD *)v53 == a8 ) { a4 += (unsigned int)v31; LABEL_30: v14 = v51; if ( a4 == a5 ) return v13; continue; } break; } if ( *(_QWORD *)v53 == a7 ) { v33 = v51(a1, (unsigned __int8 *)&v50, v52, a3); if ( v33 <= 0 ) return 1; a4 += v32; v52 += (unsigned int)v33; goto LABEL_30; } if ( v52 == a3 ) return (unsigned int)-1; v34 = v51(a1, v53, a4, a5); if ( v34 <= 0 ) return 1; v35 = (unsigned int)v34 + a4; if ( *(_QWORD *)v53 != a6 || v35 >= a5 ) { LABEL_41: v37 = v52; while ( 1 ) { if ( v37 == a3 ) return (unsigned int)-1; v38 = v51(a1, (unsigned __int8 *)&v50, v37, a3); if ( v38 <= 0 ) return 1; v39 = v50; if ( !a9 ) { v44 = *(_QWORD *)v53; goto LABEL_54; } v40 = *(_DWORD *)(a1 + 12); v41 = *a9; v42 = 65533LL; if ( v50 <= *a9 ) { v43 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8)); if ( !v43 ) goto LABEL_49; v42 = *(unsigned int *)(v43 + 12LL * (unsigned __int8)v50 + 4LL * ((v40 & 0x8000u) == 0) + 4); } v50 = v42; v39 = v42; LABEL_49: v44 = *(_QWORD *)v53; v45 = 65533LL; if ( *(_QWORD *)v53 > v41 ) goto LABEL_52; v46 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8)); if ( v46 ) { v45 = *(unsigned int *)(v46 + 12LL * v53[0] + 4LL * ((v40 & 0x8000u) == 0) + 4); LABEL_52: *(_QWORD *)v53 = v45; v44 = v45; } LABEL_54: v37 += (unsigned int)v38; if ( v39 == v44 ) { v52 = v37; v13 = my_wildcmp_unicode_impl(a1, v37, a3, v35, a5, a6, a7, a8, (long long)a9, a10 + 1); if ( (int)v13 > 0 ) goto LABEL_41; return v13; } } } v36 = v51(a1, v53, v35, a5); if ( v36 > 0 ) { LODWORD(v35) = v36 + v35; goto LABEL_41; } return 1; }
my_wildcmp_unicode_impl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RBP + -0x54],R9D MOV R12,R8 MOV R13,RCX MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x38],RSI MOV R15,RDI MOV EAX,dword ptr [RBP + 0x28] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0xd08de8] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001cb3cb MOV EDI,dword ptr [RBP + 0x28] CALL RAX MOV EBX,0x1 TEST EAX,EAX JNZ 0x001cb75b LAB_001cb3cb: CMP R13,R12 JZ 0x001cb55a MOV EAX,dword ptr [RBP + 0x18] MOV ECX,dword ptr [RBP + 0x10] CDQE MOV qword ptr [RBP + -0x78],RAX MOVSXD RAX,dword ptr [RBP + -0x54] MOV qword ptr [RBP + -0x70],RAX MOVSXD RAX,ECX MOV qword ptr [RBP + -0x68],RAX LAB_001cb3ef: MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 MOV R14,qword ptr [RBP + -0x40] CALL R14 TEST EAX,EAX JLE 0x001cb756 MOV RCX,qword ptr [RBP + -0x30] CMP RCX,qword ptr [RBP + -0x78] JZ 0x001cb56c MOV EAX,EAX ADD R13,RAX CMP RCX,qword ptr [RBP + -0x70] JNZ 0x001cb472 CMP R13,R12 JNC 0x001cb472 MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x001cb756 MOV EBX,EAX MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RAX,R14 MOV R14,qword ptr [RBP + -0x38] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x50] CALL RAX TEST EAX,EAX JLE 0x001cb756 MOV ECX,EBX ADD R13,RCX MOV EAX,EAX ADD R14,RAX MOV qword ptr [RBP + -0x38],R14 JMP 0x001cb4a6 LAB_001cb472: MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RBX,qword ptr [RBP + -0x38] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x50] CALL R14 TEST EAX,EAX JLE 0x001cb756 MOV EAX,EAX ADD RBX,RAX MOV qword ptr [RBP + -0x38],RBX MOV RAX,qword ptr [RBP + -0x68] CMP qword ptr [RBP + -0x30],RAX JZ 0x001cb551 LAB_001cb4a6: MOV RAX,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + 0x20] TEST R8,R8 JZ 0x001cb53f MOV ECX,dword ptr [R15 + 0xc] MOV RDX,qword ptr [R8] MOV ESI,0xfffd CMP RAX,RDX JA 0x001cb4f4 MOV RSI,qword ptr [R8 + 0x8] MOV RDI,RAX SHR RDI,0x8 MOV RSI,qword ptr [RSI + RDI*0x8] TEST RSI,RSI JZ 0x001cb4fb XOR EDI,EDI TEST CX,CX SETNS DIL MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] LEA RAX,[RSI + RAX*0x4] MOV ESI,dword ptr [RAX + RDI*0x4 + 0x4] LAB_001cb4f4: MOV qword ptr [RBP + -0x48],RSI MOV RAX,RSI LAB_001cb4fb: MOV RSI,qword ptr [RBP + -0x30] MOV EDI,0xfffd CMP RSI,RDX JA 0x001cb536 MOV RDX,qword ptr [R8 + 0x8] MOV RDI,RSI SHR RDI,0x8 MOV RDX,qword ptr [RDX + RDI*0x8] TEST RDX,RDX JZ 0x001cb543 XOR EDI,EDI TEST CX,CX SETNS DIL MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RDX + RCX*0x4] MOV EDI,dword ptr [RCX + RDI*0x4 + 0x4] LAB_001cb536: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RDI JMP 0x001cb543 LAB_001cb53f: MOV RSI,qword ptr [RBP + -0x30] LAB_001cb543: MOV EBX,0x1 CMP RAX,RSI JNZ 0x001cb75b LAB_001cb551: CMP R13,R12 JNZ 0x001cb3ef LAB_001cb55a: XOR EBX,EBX MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RBP + -0x38],RAX SETNZ BL JMP 0x001cb75b LAB_001cb56c: XOR EBX,EBX CMP R13,R12 JZ 0x001cb75b LAB_001cb577: MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x001cb756 MOV R14D,EAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x78] JNZ 0x001cb5b0 MOV EAX,R14D ADD R13,RAX LAB_001cb5a2: CMP R13,R12 MOV R14,qword ptr [RBP + -0x40] JNZ 0x001cb577 JMP 0x001cb75b LAB_001cb5b0: CMP RAX,qword ptr [RBP + -0x68] JNZ 0x001cb5de MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001cb756 MOV ECX,R14D ADD R13,RCX MOV EAX,EAX ADD qword ptr [RBP + -0x38],RAX JMP 0x001cb5a2 LAB_001cb5de: MOV R14,qword ptr [RBP + -0x50] CMP qword ptr [RBP + -0x38],R14 JZ 0x001cb76c LEA RSI,[RBP + -0x30] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001cb756 MOV EAX,EAX ADD R13,RAX MOV RAX,qword ptr [RBP + -0x70] CMP qword ptr [RBP + -0x30],RAX JNZ 0x001cb635 CMP R13,R12 JNC 0x001cb635 LEA RSI,[RBP + -0x30] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001cb756 MOV EAX,EAX ADD R13,RAX LAB_001cb635: MOV RAX,qword ptr [RBP + -0x60] INC EAX MOV qword ptr [RBP + -0x60],RAX LAB_001cb63f: MOV RBX,qword ptr [RBP + -0x38] LAB_001cb643: CMP RBX,R14 JZ 0x001cb76c MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RDX,RBX MOV RCX,R14 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001cb756 MOV RCX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + 0x20] TEST RSI,RSI JZ 0x001cb70a MOV EDX,dword ptr [R15 + 0xc] MOV RSI,qword ptr [RSI] MOV EDI,0xfffd CMP RCX,RSI JA 0x001cb6b8 MOV RDI,qword ptr [RBP + 0x20] MOV RDI,qword ptr [RDI + 0x8] MOV R8,RCX SHR R8,0x8 MOV RDI,qword ptr [RDI + R8*0x8] TEST RDI,RDI JZ 0x001cb6bf XOR R8D,R8D TEST DX,DX SETNS R8B MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RDI + RCX*0x4] MOV EDI,dword ptr [RCX + R8*0x4 + 0x4] LAB_001cb6b8: MOV qword ptr [RBP + -0x48],RDI MOV RCX,RDI LAB_001cb6bf: MOV RDI,qword ptr [RBP + -0x30] MOV R8D,0xfffd CMP RDI,RSI JA 0x001cb701 MOV RSI,qword ptr [RBP + 0x20] MOV RSI,qword ptr [RSI + 0x8] MOV R8,RDI SHR R8,0x8 MOV RSI,qword ptr [RSI + R8*0x8] TEST RSI,RSI JZ 0x001cb70e XOR R8D,R8D TEST DX,DX SETNS R8B MOVZX EDX,DIL LEA RDX,[RDX + RDX*0x2] LEA RDX,[RSI + RDX*0x4] MOV R8D,dword ptr [RDX + R8*0x4 + 0x4] LAB_001cb701: MOV qword ptr [RBP + -0x30],R8 MOV RDI,R8 JMP 0x001cb70e LAB_001cb70a: MOV RDI,qword ptr [RBP + -0x30] LAB_001cb70e: MOV EAX,EAX ADD RBX,RAX CMP RCX,RDI JNZ 0x001cb643 MOV RDI,R15 MOV qword ptr [RBP + -0x38],RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R13 MOV R8,R12 MOV R9D,dword ptr [RBP + -0x54] PUSH qword ptr [RBP + -0x60] PUSH qword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] PUSH RAX MOV EAX,dword ptr [RBP + 0x10] PUSH RAX CALL 0x001cb36e ADD RSP,0x20 MOV EBX,EAX TEST EAX,EAX JG 0x001cb63f JMP 0x001cb75b LAB_001cb756: MOV EBX,0x1 LAB_001cb75b: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001cb76c: MOV EBX,0xffffffff JMP 0x001cb75b
uint my_wildcmp_unicode_impl (long param_1,long param_2,long param_3,ulong param_4,ulong param_5,int param_6, int param_7,int param_8,ulong *param_9,int param_10) { long lVar1; code *pcVar2; ulong uVar3; int iVar4; uint uVar5; uint uVar6; short sVar7; long lVar8; ulong local_50; code *local_48; long local_40; ulong local_38; local_48 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); local_40 = param_2; if ((my_string_stack_guard != (code *)0x0) && (iVar4 = (*my_string_stack_guard)(param_10), iVar4 != 0)) { return 1; } if (param_4 != param_5) { do { pcVar2 = local_48; uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); lVar8 = local_40; if ((int)uVar5 < 1) { return 1; } if (local_38 == (long)param_8) { do { if (param_4 == param_5) { return 0; } uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5); if ((int)uVar5 < 1) { return 1; } if (local_38 != (long)param_8) { if (local_38 != (long)param_7) { if (local_40 == param_3) { return 0xffffffff; } uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); if (0 < (int)uVar5) { param_4 = param_4 + uVar5; if ((local_38 == (long)param_6) && (param_4 < param_5)) { uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); if ((int)uVar5 < 1) { return 1; } param_4 = param_4 + uVar5; } lVar8 = local_40; while( true ) { if (lVar8 == param_3) { return 0xffffffff; } uVar5 = (*local_48)(param_1,&local_50,lVar8,param_3); if ((int)uVar5 < 1) break; uVar3 = local_38; if (param_9 != (ulong *)0x0) { sVar7 = (short)*(int4 *)(param_1 + 0xc); uVar3 = 0xfffd; if ((local_50 <= *param_9) && (lVar1 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar1 != 0)) { uVar3 = (ulong)*(uint *)(lVar1 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } local_50 = uVar3; uVar3 = 0xfffd; if ((local_38 <= *param_9) && (lVar1 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar1 != 0)) { uVar3 = (ulong)*(uint *)(lVar1 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } } local_38 = uVar3; lVar8 = lVar8 + (ulong)uVar5; if ((local_50 == local_38) && (local_40 = lVar8, uVar5 = my_wildcmp_unicode_impl (param_1,lVar8,param_3,param_4,param_5,param_6,param_7, param_8,param_9,param_10 + 1), lVar8 = local_40, (int)uVar5 < 1)) { return uVar5; } } return 1; } return 1; } uVar6 = (*local_48)(param_1,&local_50,local_40,param_3); if ((int)uVar6 < 1) { return 1; } local_40 = local_40 + (ulong)uVar6; } param_4 = param_4 + uVar5; pcVar2 = local_48; } while( true ); } param_4 = param_4 + uVar5; if ((local_38 == (long)param_6) && (param_4 < param_5)) { uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5); lVar8 = local_40; if ((int)uVar5 < 1) { return 1; } uVar6 = (*pcVar2)(param_1,&local_50,local_40,param_3); if ((int)uVar6 < 1) { return 1; } param_4 = param_4 + uVar5; local_40 = lVar8 + (ulong)uVar6; LAB_001cb4a6: uVar3 = local_38; if (param_9 != (ulong *)0x0) { sVar7 = (short)*(int4 *)(param_1 + 0xc); uVar3 = 0xfffd; if ((local_50 <= *param_9) && (lVar8 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar8 != 0)) { uVar3 = (ulong)*(uint *)(lVar8 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } local_50 = uVar3; uVar3 = 0xfffd; if ((local_38 <= *param_9) && (lVar8 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar8 != 0)) { uVar3 = (ulong)*(uint *)(lVar8 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } } local_38 = uVar3; if (local_50 != local_38) { return 1; } } else { uVar5 = (*pcVar2)(param_1,&local_50,local_40,param_3); if ((int)uVar5 < 1) { return 1; } local_40 = lVar8 + (ulong)uVar5; if (local_38 != (long)param_7) goto LAB_001cb4a6; } } while (param_4 != param_5); } return (uint)(local_40 != param_3); }
21,958
HDL_set_probe
xtate/src/xcmd.c
static void HDL_set_probe(void *conf, char *subcmd) { XConf *xconf = conf; Probe *probe = get_probe_module_by_name(subcmd); if (!probe) { LOG(LEVEL_ERROR, "no such probe module named %s\n", subcmd); return; } xconf->probe = probe; LOG(LEVEL_HINT, "set probe module successfully.\n"); }
O3
c
HDL_set_probe: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x2d5b8 testq %rax, %rax je 0x5799c movq %rax, 0x4e0(%r14) leaq 0x1f068(%rip), %rsi # 0x769f1 movl $0xfffffffe, %edi # imm = 0xFFFFFFFE xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 jmp 0x536da leaq 0x273e0(%rip), %rsi # 0x7ed83 movl $0xffffffff, %edi # imm = 0xFFFFFFFF movq %rbx, %rdx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 jmp 0x536da
HDL_set_probe: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsi call get_probe_module_by_name test rax, rax jz short loc_5799C mov [r14+4E0h], rax lea rsi, aSetProbeModule; "set probe module successfully.\n" mov edi, 0FFFFFFFEh xor eax, eax add rsp, 8 pop rbx pop r14 jmp LOG loc_5799C: lea rsi, aFailSNoSuchPro_0+9; "no such probe module named %s\n" mov edi, 0FFFFFFFFh mov rdx, rbx xor eax, eax add rsp, 8 pop rbx pop r14 jmp LOG
long long HDL_set_probe( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, long long a14, char a15) { char **probe_module_by_name; // rax long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 probe_module_by_name = get_probe_module_by_name(a2); if ( !probe_module_by_name ) return LOG( -1, (long long)"no such probe module named %s\n", a2, v17, v18, v19, a3, a4, a5, a6, v20, v21, a9, a10, a15); *(_QWORD *)(a1 + 1248) = probe_module_by_name; return LOG( -2, (long long)"set probe module successfully.\n", v16, v17, v18, v19, a3, a4, a5, a6, v20, v21, a9, a10, a15); }
HDL_set_probe: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x0012d5b8 TEST RAX,RAX JZ 0x0015799c MOV qword ptr [R14 + 0x4e0],RAX LEA RSI,[0x1769f1] MOV EDI,0xfffffffe XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 JMP 0x001536da LAB_0015799c: LEA RSI,[0x17ed83] MOV EDI,0xffffffff MOV RDX,RBX XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 JMP 0x001536da
void HDL_set_probe(long param_1,int8 param_2) { long lVar1; lVar1 = get_probe_module_by_name(param_2); if (lVar1 != 0) { *(long *)(param_1 + 0x4e0) = lVar1; LOG(0xfffffffe,"set probe module successfully.\n"); return; } LOG(0xffffffff,"no such probe module named %s\n",param_2); return; }
21,959
mysql_stmt_fetch_column
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset) { if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count || stmt->state == MYSQL_STMT_FETCH_DONE) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->bind[column].u.row_ptr) { /* we set row_ptr only for columns which contain data, so this must be a NULL column */ if (bind[0].is_null) *bind[0].is_null= 1; } else { unsigned char *save_ptr; if (bind[0].length) *bind[0].length= *stmt->bind[column].length; else bind[0].length= &stmt->bind[column].length_value; if (bind[0].is_null) *bind[0].is_null= 0; else bind[0].is_null= &bind[0].is_null_value; if (!bind[0].error) bind[0].error= &bind[0].error_value; *bind[0].error= 0; bind[0].offset= offset; save_ptr= stmt->bind[column].u.row_ptr; mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr); stmt->bind[column].u.row_ptr= save_ptr; } return(0); }
O3
c
mysql_stmt_fetch_column: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x50(%rdi), %eax cmpl $0x5, %eax jae 0x20654 movl $0x803, 0x108(%rbx) # imm = 0x803 leaq 0x30d(%rbx), %rdi leaq 0x283f9(%rip), %rax # 0x48a00 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x283e4(%rip), %rax # 0x48a10 movq 0x198(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq cmpl $0x6, %eax je 0x205ef cmpl %edx, 0x60(%rbx) jbe 0x205ef movq 0x78(%rbx), %rax movl %edx, %edi imulq $0x70, %rdi, %r14 cmpq $0x0, 0x20(%rax,%r14) je 0x20686 addq %r14, %rax movq (%rsi), %rdx testq %rdx, %rdx je 0x20696 movq (%rax), %rax movq (%rax), %rax movq %rax, (%rdx) jmp 0x2069d movq 0x8(%rsi), %rcx xorl %eax, %eax testq %rcx, %rcx je 0x20649 movb $0x1, (%rcx) jmp 0x20649 addq $0x50, %rax movq %rax, (%rsi) movq 0x8(%rsi), %rax testq %rax, %rax je 0x206ab movb $0x0, (%rax) jmp 0x206b3 leaq 0x67(%rsi), %rax movq %rax, 0x8(%rsi) movq 0x18(%rsi), %rax testq %rax, %rax jne 0x206c4 leaq 0x64(%rsi), %rax movq %rax, 0x18(%rsi) movb $0x0, (%rax) movq %rcx, 0x48(%rsi) movq 0x58(%rbx), %rcx movq 0x78(%rbx), %rax leaq (%rax,%r14), %rdx addq $0x20, %rdx movq (%rdx), %r15 shlq $0x7, %rdi leaq (%rcx,%rdi), %rax movl 0x70(%rcx,%rdi), %ecx leaq (%rcx,%rcx,2), %rcx leaq 0x2884b(%rip), %r8 # 0x48f40 movq %rsi, %rdi movq %rax, %rsi callq *(%r8,%rcx,8) movq 0x78(%rbx), %rax movq %r15, 0x20(%rax,%r14) xorl %eax, %eax jmp 0x20649
mysql_stmt_fetch_column: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+50h] cmp eax, 5 jnb short loc_20654 loc_205EF: mov dword ptr [rbx+108h], 803h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+198h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov eax, 1 loc_20649: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_20654: cmp eax, 6 jz short loc_205EF cmp [rbx+60h], edx jbe short loc_205EF mov rax, [rbx+78h] mov edi, edx imul r14, rdi, 70h ; 'p' cmp qword ptr [rax+r14+20h], 0 jz short loc_20686 add rax, r14 mov rdx, [rsi] test rdx, rdx jz short loc_20696 mov rax, [rax] mov rax, [rax] mov [rdx], rax jmp short loc_2069D loc_20686: mov rcx, [rsi+8] xor eax, eax test rcx, rcx jz short loc_20649 mov byte ptr [rcx], 1 jmp short loc_20649 loc_20696: add rax, 50h ; 'P' mov [rsi], rax loc_2069D: mov rax, [rsi+8] test rax, rax jz short loc_206AB mov byte ptr [rax], 0 jmp short loc_206B3 loc_206AB: lea rax, [rsi+67h] mov [rsi+8], rax loc_206B3: mov rax, [rsi+18h] test rax, rax jnz short loc_206C4 lea rax, [rsi+64h] mov [rsi+18h], rax loc_206C4: mov byte ptr [rax], 0 mov [rsi+48h], rcx mov rcx, [rbx+58h] mov rax, [rbx+78h] lea rdx, [rax+r14] add rdx, 20h ; ' ' mov r15, [rdx] shl rdi, 7 lea rax, [rcx+rdi] mov ecx, [rcx+rdi+70h] lea rcx, [rcx+rcx*2] lea r8, mysql_ps_fetch_functions mov rdi, rsi mov rsi, rax call qword ptr [r8+rcx*8] mov rax, [rbx+78h] mov [rax+r14+20h], r15 xor eax, eax jmp loc_20649
long long mysql_stmt_fetch_column(long long a1, long long a2, unsigned int a3, long long a4) { unsigned int v4; // eax long long result; // rax long long v6; // rax long long v7; // r14 _QWORD **v8; // rax _BYTE *v9; // rcx _BYTE *v10; // rax _BYTE *v11; // rax long long v12; // r15 v4 = *(_DWORD *)(a1 + 80); if ( v4 < 5 || v4 == 6 || *(_DWORD *)(a1 + 96) <= a3 ) { *(_DWORD *)(a1 + 264) = 2051; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[51], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1LL; } else { v6 = *(_QWORD *)(a1 + 120); v7 = 112LL * a3; if ( *(_QWORD *)(v6 + v7 + 32) ) { v8 = (_QWORD **)(v7 + v6); if ( *(_QWORD *)a2 ) **(_QWORD **)a2 = **v8; else *(_QWORD *)a2 = v8 + 10; v10 = *(_BYTE **)(a2 + 8); if ( v10 ) *v10 = 0; else *(_QWORD *)(a2 + 8) = a2 + 103; v11 = *(_BYTE **)(a2 + 24); if ( !v11 ) { v11 = (_BYTE *)(a2 + 100); *(_QWORD *)(a2 + 24) = a2 + 100; } *v11 = 0; *(_QWORD *)(a2 + 72) = a4; v12 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32); (*(void ( **)(long long, unsigned long long))&mysql_ps_fetch_functions[6 * *(unsigned int *)(*(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7) + 112)])( a2, *(_QWORD *)(a1 + 88) + ((unsigned long long)a3 << 7)); *(_QWORD *)(*(_QWORD *)(a1 + 120) + v7 + 32) = v12; return 0LL; } else { v9 = *(_BYTE **)(a2 + 8); result = 0LL; if ( v9 ) *v9 = 1; } } return result; }
mysql_stmt_fetch_column: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x50] CMP EAX,0x5 JNC 0x00120654 LAB_001205ef: MOV dword ptr [RBX + 0x108],0x803 LEA RDI,[RBX + 0x30d] LEA RAX,[0x148a00] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x148a10] MOV RSI,qword ptr [RAX + 0x198] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV EAX,0x1 LAB_00120649: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00120654: CMP EAX,0x6 JZ 0x001205ef CMP dword ptr [RBX + 0x60],EDX JBE 0x001205ef MOV RAX,qword ptr [RBX + 0x78] MOV EDI,EDX IMUL R14,RDI,0x70 CMP qword ptr [RAX + R14*0x1 + 0x20],0x0 JZ 0x00120686 ADD RAX,R14 MOV RDX,qword ptr [RSI] TEST RDX,RDX JZ 0x00120696 MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RDX],RAX JMP 0x0012069d LAB_00120686: MOV RCX,qword ptr [RSI + 0x8] XOR EAX,EAX TEST RCX,RCX JZ 0x00120649 MOV byte ptr [RCX],0x1 JMP 0x00120649 LAB_00120696: ADD RAX,0x50 MOV qword ptr [RSI],RAX LAB_0012069d: MOV RAX,qword ptr [RSI + 0x8] TEST RAX,RAX JZ 0x001206ab MOV byte ptr [RAX],0x0 JMP 0x001206b3 LAB_001206ab: LEA RAX,[RSI + 0x67] MOV qword ptr [RSI + 0x8],RAX LAB_001206b3: MOV RAX,qword ptr [RSI + 0x18] TEST RAX,RAX JNZ 0x001206c4 LEA RAX,[RSI + 0x64] MOV qword ptr [RSI + 0x18],RAX LAB_001206c4: MOV byte ptr [RAX],0x0 MOV qword ptr [RSI + 0x48],RCX MOV RCX,qword ptr [RBX + 0x58] MOV RAX,qword ptr [RBX + 0x78] LEA RDX,[RAX + R14*0x1] ADD RDX,0x20 MOV R15,qword ptr [RDX] SHL RDI,0x7 LEA RAX,[RCX + RDI*0x1] MOV ECX,dword ptr [RCX + RDI*0x1 + 0x70] LEA RCX,[RCX + RCX*0x2] LEA R8,[0x148f40] MOV RDI,RSI MOV RSI,RAX CALL qword ptr [R8 + RCX*0x8] MOV RAX,qword ptr [RBX + 0x78] MOV qword ptr [RAX + R14*0x1 + 0x20],R15 XOR EAX,EAX JMP 0x00120649
int8 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4) { int8 uVar1; int8 *puVar2; int1 *puVar3; long lVar4; long lVar5; if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x50) == 6)) || (*(uint *)(param_1 + 0x60) <= param_3)) { *(int4 *)(param_1 + 0x108) = 0x803; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s__00148ba8,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar1 = 1; } else { lVar5 = (ulong)param_3 * 0x70; if (*(long *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) == 0) { uVar1 = 0; if ((int1 *)param_2[1] != (int1 *)0x0) { *(int1 *)param_2[1] = 1; } } else { puVar2 = (int8 *)(*(long *)(param_1 + 0x78) + lVar5); if ((int8 *)*param_2 == (int8 *)0x0) { *param_2 = (long)(puVar2 + 10); } else { *(int8 *)*param_2 = *(int8 *)*puVar2; } if ((int1 *)param_2[1] == (int1 *)0x0) { param_2[1] = (long)param_2 + 0x67; } else { *(int1 *)param_2[1] = 0; } puVar3 = (int1 *)param_2[3]; if (puVar3 == (int1 *)0x0) { puVar3 = (int1 *)((long)param_2 + 100); param_2[3] = (long)puVar3; } *puVar3 = 0; param_2[9] = param_4; uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + lVar5 + 0x20); lVar4 = (ulong)param_3 * 0x80; (*(code *)(&mysql_ps_fetch_functions) [(ulong)*(uint *)(*(long *)(param_1 + 0x58) + 0x70 + lVar4) * 3]) (param_2,*(long *)(param_1 + 0x58) + lVar4); *(int8 *)(*(long *)(param_1 + 0x78) + 0x20 + lVar5) = uVar1; uVar1 = 0; } } return uVar1; }
21,960
bc_get_atom
bluesky950520[P]quickjs/quickjs.c
static int bc_get_atom(BCReaderState *s, JSAtom *patom) { uint32_t v; if (bc_get_leb128(s, &v)) return -1; if (v & 1) { *patom = __JS_AtomFromUInt32(v >> 1); return 0; } else { return bc_idx_to_atom(s, patom, v >> 1); } }
O0
c
bc_get_atom: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x18(%rsp), %rdi leaq 0xc(%rsp), %rsi callq 0x78f20 cmpl $0x0, %eax je 0x7bc0c movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x7bc4f movl 0xc(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x7bc36 movl 0xc(%rsp), %edi shrl %edi callq 0x272f0 movl %eax, %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) movl $0x0, 0x24(%rsp) jmp 0x7bc4f movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi movl 0xc(%rsp), %edx shrl %edx callq 0x7c070 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
bc_get_atom: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rdi, [rsp+28h+var_10] lea rsi, [rsp+28h+var_1C] call bc_get_leb128 cmp eax, 0 jz short loc_7BC0C mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_7BC4F loc_7BC0C: mov eax, [rsp+28h+var_1C] and eax, 1 cmp eax, 0 jz short loc_7BC36 mov edi, [rsp+28h+var_1C] shr edi, 1 call __JS_AtomFromUInt32 mov ecx, eax mov rax, [rsp+28h+var_18] mov [rax], ecx mov [rsp+28h+var_4], 0 jmp short loc_7BC4F loc_7BC36: mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_18] mov edx, [rsp+28h+var_1C] shr edx, 1 call bc_idx_to_atom mov [rsp+28h+var_4], eax loc_7BC4F: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long bc_get_atom(long long a1, _DWORD *a2) { unsigned int v3; // [rsp+Ch] [rbp-1Ch] BYREF _DWORD *v4; // [rsp+10h] [rbp-18h] long long v5; // [rsp+18h] [rbp-10h] v5 = a1; v4 = a2; if ( (unsigned int)bc_get_leb128(a1, &v3) ) { return (unsigned int)-1; } else if ( (v3 & 1) != 0 ) { *v4 = _JS_AtomFromUInt32(v3 >> 1); return 0; } else { return (unsigned int)bc_idx_to_atom(v5, v4, v3 >> 1); } }
bc_get_atom: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xc] CALL 0x00178f20 CMP EAX,0x0 JZ 0x0017bc0c MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x0017bc4f LAB_0017bc0c: MOV EAX,dword ptr [RSP + 0xc] AND EAX,0x1 CMP EAX,0x0 JZ 0x0017bc36 MOV EDI,dword ptr [RSP + 0xc] SHR EDI,0x1 CALL 0x001272f0 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x24],0x0 JMP 0x0017bc4f LAB_0017bc36: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc] SHR EDX,0x1 CALL 0x0017c070 MOV dword ptr [RSP + 0x24],EAX LAB_0017bc4f: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 bc_get_atom(int8 param_1,int4 *param_2) { int iVar1; int4 uVar2; uint local_1c; int4 *local_18; int8 local_10; int4 local_4; local_18 = param_2; local_10 = param_1; iVar1 = bc_get_leb128(param_1,&local_1c); if (iVar1 == 0) { if ((local_1c & 1) == 0) { local_4 = bc_idx_to_atom(local_10,local_18,local_1c >> 1); } else { uVar2 = __JS_AtomFromUInt32(local_1c >> 1); *local_18 = uVar2; local_4 = 0; } } else { local_4 = 0xffffffff; } return local_4; }
21,961
bc_get_atom
bluesky950520[P]quickjs/quickjs.c
static int bc_get_atom(BCReaderState *s, JSAtom *patom) { uint32_t v; if (bc_get_leb128(s, &v)) return -1; if (v & 1) { *patom = __JS_AtomFromUInt32(v >> 1); return 0; } else { return bc_idx_to_atom(s, patom, v >> 1); } }
O1
c
bc_get_atom: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x4(%rsp), %rsi callq 0x44e61 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x462e9 movl 0x4(%rsp), %eax movl %eax, %edx shrl %edx testb $0x1, %al jne 0x462df movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x463fa orl $0x80000000, %edx # imm = 0x80000000 movl %edx, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
bc_get_atom: push r14 push rbx push rax mov rbx, rsi mov r14, rdi lea rsi, [rsp+18h+var_14] call bc_get_leb128 mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_462E9 mov eax, [rsp+18h+var_14] mov edx, eax shr edx, 1 test al, 1 jnz short loc_462DF mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp bc_idx_to_atom loc_462DF: or edx, 80000000h mov [rbx], edx xor eax, eax loc_462E9: add rsp, 8 pop rbx pop r14 retn
long long bc_get_atom(long long a1, _DWORD *a2, long long a3, int a4, unsigned long long a5) { long long v5; // rax int leb128; // ecx long long result; // rax long long v8; // rdx _DWORD v9[5]; // [rsp+0h] [rbp-14h] BYREF v9[0] = HIDWORD(v5); leb128 = bc_get_leb128(a1, v9, a3, a4, a5); result = 0xFFFFFFFFLL; if ( !leb128 ) { v8 = v9[0] >> 1; if ( (v9[0] & 1) != 0 ) { *a2 = v8 | 0x80000000; return 0LL; } else { return bc_idx_to_atom(a1, a2, v8); } } return result; }
bc_get_atom: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA RSI,[RSP + 0x4] CALL 0x00144e61 MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x001462e9 MOV EAX,dword ptr [RSP + 0x4] MOV EDX,EAX SHR EDX,0x1 TEST AL,0x1 JNZ 0x001462df MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001463fa LAB_001462df: OR EDX,0x80000000 MOV dword ptr [RBX],EDX XOR EAX,EAX LAB_001462e9: ADD RSP,0x8 POP RBX POP R14 RET
int8 bc_get_atom(int8 param_1,uint *param_2) { int iVar1; int8 in_RAX; int8 uVar2; uint local_14; local_14 = (uint)((ulong)in_RAX >> 0x20); iVar1 = bc_get_leb128(param_1,&local_14); uVar2 = 0xffffffff; if (iVar1 == 0) { if ((local_14 & 1) == 0) { uVar2 = bc_idx_to_atom(param_1,param_2); return uVar2; } *param_2 = local_14 >> 1 | 0x80000000; uVar2 = 0; } return uVar2; }
21,962
ma_flush_table_files
eloqsql/storage/maria/ma_extra.c
int _ma_flush_table_files(MARIA_HA *info, uint flush_data_or_index, enum flush_type flush_type_for_data, enum flush_type flush_type_for_index) { int error= 0; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_flush_table_files"); /* flush data file first because it's more critical */ if (flush_data_or_index & MARIA_FLUSH_DATA) { if ((info->opt_flag & WRITE_CACHE_USED) && flush_type_for_data != FLUSH_IGNORE_CHANGED && flush_io_cache(&info->rec_cache)) error= 1; if (share->data_file_type == BLOCK_RECORD) { if (flush_type_for_data != FLUSH_IGNORE_CHANGED) { if (_ma_bitmap_flush(share)) error= 1; } else { mysql_mutex_lock(&share->bitmap.bitmap_lock); share->bitmap.changed= 0; share->bitmap.changed_not_flushed= 0; mysql_mutex_unlock(&share->bitmap.bitmap_lock); } if (flush_pagecache_blocks(share->pagecache, &info->dfile, flush_type_for_data)) error= 1; } } if ((flush_data_or_index & MARIA_FLUSH_INDEX) && flush_pagecache_blocks(share->pagecache, &share->kfile, flush_type_for_index)) error= 1; if (!error) DBUG_RETURN(0); _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(1); }
O3
c
ma_flush_table_files: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %r12d movq %rdi, %rbx movq (%rdi), %r15 testb $0x1, %r12b jne 0x5c2fc xorl %r14d, %r14d movl $0x0, %r13d testb $0x2, %r12b jne 0x5c3d8 jmp 0x5c410 movl %edx, %r13d xorl %r14d, %r14d cmpl $0x2, %edx je 0x5c332 movl 0x61c(%rbx), %eax andl $0x10, %eax je 0x5c332 leaq 0x4b8(%rbx), %rdi movl $0x1, %esi movl %ecx, %r14d callq 0xb0e3d movl %r14d, %ecx xorl %r14d, %r14d testl %eax, %eax setne %r14b cmpl $0x3, 0x7d0(%r15) jne 0x5c3c8 cmpl $0x2, %r13d movl %ecx, -0x2c(%rbp) je 0x5c35e movq %r15, %rdi callq 0x3ca59 testb %al, %al movl $0x1, %eax cmovnel %eax, %r14d jmp 0x5c39f leaq 0xa98(%r15), %rdi cmpq $0x0, 0xad8(%r15) movq %rdi, -0x38(%rbp) jne 0x5c422 callq 0x2a230 movw $0x0, 0xa30(%r15) movq 0xad8(%r15), %rdi testq %rdi, %rdi jne 0x5c438 movq -0x38(%rbp), %rdi callq 0x2a1f0 movq 0x600(%r15), %rdi leaq 0x470(%rbx), %rsi movl %r13d, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x4ddb0 testl %eax, %eax movl $0x1, %eax cmovnel %eax, %r14d movl -0x2c(%rbp), %ecx testb $0x2, %r12b jne 0x5c3d8 testl %r14d, %r14d jne 0x5c3fd xorl %r13d, %r13d jmp 0x5c410 movq 0x600(%r15), %rdi addq $0x750, %r15 # imm = 0x750 xorl %r13d, %r13d movq %r15, %rsi movl %ecx, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x4ddb0 orl %r14d, %eax je 0x5c410 movq %rbx, %rdi movl $0x7e, %esi callq 0x5cab0 movl $0x1, %r13d movl %r13d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9f492(%rip), %rsi # 0xfb8bb movl $0x28c, %edx # imm = 0x28C callq 0x312ea jmp 0x5c37c leaq 0x3525d9(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x160(%rax) jmp 0x5c396
_ma_flush_table_files: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12d, esi mov rbx, rdi mov r15, [rdi] test r12b, 1 jnz short loc_5C2FC xor r14d, r14d mov r13d, 0 test r12b, 2 jnz loc_5C3D8 jmp loc_5C410 loc_5C2FC: mov r13d, edx xor r14d, r14d cmp edx, 2 jz short loc_5C332 mov eax, [rbx+61Ch] and eax, 10h jz short loc_5C332 lea rdi, [rbx+4B8h] mov esi, 1 mov r14d, ecx call my_b_flush_io_cache mov ecx, r14d xor r14d, r14d test eax, eax setnz r14b loc_5C332: cmp dword ptr [r15+7D0h], 3 jnz loc_5C3C8 cmp r13d, 2 mov [rbp+var_2C], ecx jz short loc_5C35E mov rdi, r15 call _ma_bitmap_flush test al, al mov eax, 1 cmovnz r14d, eax jmp short loc_5C39F loc_5C35E: lea rdi, [r15+0A98h] cmp qword ptr [r15+0AD8h], 0 mov [rbp+var_38], rdi jnz loc_5C422 call _pthread_mutex_lock loc_5C37C: mov word ptr [r15+0A30h], 0 mov rdi, [r15+0AD8h] test rdi, rdi jnz loc_5C438 loc_5C396: mov rdi, [rbp+var_38] call _pthread_mutex_unlock loc_5C39F: mov rdi, [r15+600h] lea rsi, [rbx+470h] mov edx, r13d xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax mov eax, 1 cmovnz r14d, eax mov ecx, [rbp+var_2C] loc_5C3C8: test r12b, 2 jnz short loc_5C3D8 test r14d, r14d jnz short loc_5C3FD xor r13d, r13d jmp short loc_5C410 loc_5C3D8: mov rdi, [r15+600h] add r15, 750h xor r13d, r13d mov rsi, r15 mov edx, ecx xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter or eax, r14d jz short loc_5C410 loc_5C3FD: mov rdi, rbx mov esi, 7Eh ; '~' call _ma_set_fatal_error mov r13d, 1 loc_5C410: mov eax, r13d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5C422: lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 28Ch call psi_mutex_lock jmp loc_5C37C loc_5C438: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_5C396
long long ma_flush_table_files(long long a1, char a2, unsigned int a3, unsigned int a4) { long long v5; // r15 BOOL v6; // r14d unsigned int v7; // r13d unsigned int v9; // r14d int v10; // eax long long v11; // rdi unsigned int v13; // [rsp+14h] [rbp-2Ch] v5 = *(_QWORD *)a1; if ( (a2 & 1) == 0 ) { v6 = 0; v7 = 0; if ( (a2 & 2) == 0 ) return v7; LABEL_23: v7 = 0; if ( v6 | (unsigned int)flush_pagecache_blocks_with_filter(*(_QWORD *)(v5 + 1536), v5 + 1872, a4, 0LL, 0LL) ) goto LABEL_24; return v7; } v6 = 0; if ( a3 != 2 && (*(_DWORD *)(a1 + 1564) & 0x10) != 0 ) { v9 = a4; v10 = my_b_flush_io_cache(a1 + 1208, 1LL); a4 = v9; v6 = v10 != 0; } if ( *(_DWORD *)(v5 + 2000) == 3 ) { v13 = a4; if ( a3 == 2 ) { v11 = v5 + 2712; if ( *(_QWORD *)(v5 + 2776) ) psi_mutex_lock(v11, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c", 0x28Cu); else pthread_mutex_lock(v11); *(_WORD *)(v5 + 2608) = 0; if ( *(_QWORD *)(v5 + 2776) ) PSI_server[44](); pthread_mutex_unlock(v5 + 2712); } else if ( (unsigned __int8)ma_bitmap_flush(v5) ) { v6 = 1; } if ( (unsigned int)flush_pagecache_blocks_with_filter(*(_QWORD *)(v5 + 1536), a1 + 1136, a3, 0LL, 0LL) ) v6 = 1; a4 = v13; } if ( (a2 & 2) != 0 ) goto LABEL_23; if ( v6 ) { LABEL_24: ma_set_fatal_error(a1, 126LL); return 1; } return 0; }
_ma_flush_table_files: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12D,ESI MOV RBX,RDI MOV R15,qword ptr [RDI] TEST R12B,0x1 JNZ 0x0015c2fc XOR R14D,R14D MOV R13D,0x0 TEST R12B,0x2 JNZ 0x0015c3d8 JMP 0x0015c410 LAB_0015c2fc: MOV R13D,EDX XOR R14D,R14D CMP EDX,0x2 JZ 0x0015c332 MOV EAX,dword ptr [RBX + 0x61c] AND EAX,0x10 JZ 0x0015c332 LEA RDI,[RBX + 0x4b8] MOV ESI,0x1 MOV R14D,ECX CALL 0x001b0e3d MOV ECX,R14D XOR R14D,R14D TEST EAX,EAX SETNZ R14B LAB_0015c332: CMP dword ptr [R15 + 0x7d0],0x3 JNZ 0x0015c3c8 CMP R13D,0x2 MOV dword ptr [RBP + -0x2c],ECX JZ 0x0015c35e MOV RDI,R15 CALL 0x0013ca59 TEST AL,AL MOV EAX,0x1 CMOVNZ R14D,EAX JMP 0x0015c39f LAB_0015c35e: LEA RDI,[R15 + 0xa98] CMP qword ptr [R15 + 0xad8],0x0 MOV qword ptr [RBP + -0x38],RDI JNZ 0x0015c422 CALL 0x0012a230 LAB_0015c37c: MOV word ptr [R15 + 0xa30],0x0 MOV RDI,qword ptr [R15 + 0xad8] TEST RDI,RDI JNZ 0x0015c438 LAB_0015c396: MOV RDI,qword ptr [RBP + -0x38] CALL 0x0012a1f0 LAB_0015c39f: MOV RDI,qword ptr [R15 + 0x600] LEA RSI,[RBX + 0x470] MOV EDX,R13D XOR ECX,ECX XOR R8D,R8D CALL 0x0014ddb0 TEST EAX,EAX MOV EAX,0x1 CMOVNZ R14D,EAX MOV ECX,dword ptr [RBP + -0x2c] LAB_0015c3c8: TEST R12B,0x2 JNZ 0x0015c3d8 TEST R14D,R14D JNZ 0x0015c3fd XOR R13D,R13D JMP 0x0015c410 LAB_0015c3d8: MOV RDI,qword ptr [R15 + 0x600] ADD R15,0x750 XOR R13D,R13D MOV RSI,R15 MOV EDX,ECX XOR ECX,ECX XOR R8D,R8D CALL 0x0014ddb0 OR EAX,R14D JZ 0x0015c410 LAB_0015c3fd: MOV RDI,RBX MOV ESI,0x7e CALL 0x0015cab0 MOV R13D,0x1 LAB_0015c410: MOV EAX,R13D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015c422: LEA RSI,[0x1fb8bb] MOV EDX,0x28c CALL 0x001312ea JMP 0x0015c37c LAB_0015c438: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0015c396
int8 _ma_flush_table_files(long *param_1,uint param_2,int param_3,int4 param_4) { pthread_mutex_t *__mutex; long lVar1; char cVar2; int iVar3; bool bVar4; lVar1 = *param_1; if ((param_2 & 1) == 0) { bVar4 = false; if ((param_2 & 2) == 0) { return 0; } } else { bVar4 = false; if ((param_3 != 2) && ((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0)) { iVar3 = my_b_flush_io_cache(param_1 + 0x97,1); bVar4 = iVar3 != 0; } if (*(int *)(lVar1 + 2000) == 3) { if (param_3 == 2) { __mutex = (pthread_mutex_t *)(lVar1 + 0xa98); if (*(long *)(lVar1 + 0xad8) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c" ,0x28c); } *(int2 *)(lVar1 + 0xa30) = 0; if (*(long *)(lVar1 + 0xad8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } else { cVar2 = _ma_bitmap_flush(lVar1); if (cVar2 != '\0') { bVar4 = true; } } iVar3 = flush_pagecache_blocks_with_filter (*(int8 *)(lVar1 + 0x600),param_1 + 0x8e,param_3,0,0); if (iVar3 != 0) { bVar4 = true; } } if ((param_2 & 2) == 0) { if (!bVar4) { return 0; } goto LAB_0015c3fd; } } iVar3 = flush_pagecache_blocks_with_filter (*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,param_4,0,0); if (iVar3 == 0 && !bVar4) { return 0; } LAB_0015c3fd: _ma_set_fatal_error(param_1,0x7e); return 1; }
21,963
translog_finish_page
eloqsql/storage/maria/ma_loghandler.c
static void translog_finish_page(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { uint16 left= TRANSLOG_PAGE_SIZE - cursor->current_page_fill; uchar *page= cursor->ptr - cursor->current_page_fill; DBUG_ENTER("translog_finish_page"); DBUG_PRINT("enter", ("Buffer: #%u %p " "Buffer addr: " LSN_FMT " " "Page addr: " LSN_FMT " " "size:%u (%u) Pg:%u left:%u", (uint) cursor->buffer_no, cursor->buffer, LSN_IN_PARTS(cursor->buffer->offset), (uint)LSN_FILE_NO(*horizon), (uint)(LSN_OFFSET(*horizon) - cursor->current_page_fill), (uint) cursor->buffer->size, (uint) (cursor->ptr -cursor->buffer->buffer), (uint) cursor->current_page_fill, (uint) left)); DBUG_ASSERT(LSN_FILE_NO(*horizon) == LSN_FILE_NO(cursor->buffer->offset) || translog_status == TRANSLOG_UNINITED); if ((LSN_FILE_NO(*horizon) != LSN_FILE_NO(cursor->buffer->offset))) DBUG_VOID_RETURN; // everything wrong do not write to awoid more problems translog_check_cursor(cursor); if (cursor->protected) { DBUG_PRINT("info", ("Already protected and finished")); DBUG_VOID_RETURN; } cursor->protected= 1; DBUG_ASSERT(left < TRANSLOG_PAGE_SIZE); if (left != 0) { DBUG_PRINT("info", ("left: %u", (uint) left)); memset(cursor->ptr, TRANSLOG_FILLER, left); cursor->ptr+= left; (*horizon)+= left; /* offset increasing */ if (!cursor->chaser) cursor->buffer->size+= left; /* We are finishing the page so reset the counter */ cursor->current_page_fill= 0; DBUG_PRINT("info", ("Finish Page buffer #%u: %p " "chaser: %d Size: %lu (%lu)", (uint) cursor->buffer->buffer_no, cursor->buffer, cursor->chaser, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer))); translog_check_cursor(cursor); } /* When we are finishing the page other thread might not finish the page header yet (in case if we started from the middle of the page) so we have to read log_descriptor.flags but not the flags from the page. */ if (log_descriptor.flags & TRANSLOG_SECTOR_PROTECTION) { translog_put_sector_protection(page, cursor); DBUG_PRINT("info", ("drop write_counter")); cursor->write_counter= 0; cursor->previous_offset= 0; } if (log_descriptor.flags & TRANSLOG_PAGE_CRC) { uint32 crc= translog_crc(page + log_descriptor.page_overhead, TRANSLOG_PAGE_SIZE - log_descriptor.page_overhead); DBUG_PRINT("info", ("CRC: %lx", (ulong) crc)); /* We have page number, file number and flag before crc */ int4store(page + 3 + 3 + 1, crc); } DBUG_VOID_RETURN; }
O3
c
translog_finish_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x28(%rsi), %rax movq 0x100010(%rax), %rax xorq (%rdi), %rax shrq $0x20, %rax jne 0x46361 movq %rsi, %r14 cmpb $0x0, 0x38(%rsi) jne 0x46361 movzwl 0x30(%r14), %r13d movq 0x20(%r14), %rbx movb $0x1, 0x38(%r14) movzwl %r13w, %eax cmpl $0x2000, %eax # imm = 0x2000 je 0x46315 movq %rdi, %r15 movl $0x2000, %eax # imm = 0x2000 subl %r13d, %eax movzwl %ax, %r12d movq %rbx, %rdi movl $0xff, %esi movq %r12, %rdx callq 0x2a2e0 addq %r12, 0x20(%r14) addq %r12, (%r15) cmpb $0x0, 0x37(%r14) jne 0x4630e movq 0x28(%r14), %rax addl %r12d, 0x100030(%rax) movw $0x0, 0x30(%r14) subq %r13, %rbx movl 0x3e089a(%rip), %eax # 0x426bb8 testb $0x2, %al je 0x46341 movl 0x34(%r14), %edx movzwl 0x32(%r14), %esi movq %rbx, %rdi callq 0x49b61 movl $0x0, 0x32(%r14) movl 0x3e0877(%rip), %eax # 0x426bb8 testb $0x1, %al je 0x46361 movzwl 0x3e0888(%rip), %eax # 0x426bd4 leaq (%rbx,%rax), %rsi movl $0x2000, %edx # imm = 0x2000 subl %eax, %edx xorl %edi, %edi callq 0xc7f80 movl %eax, 0x7(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
translog_finish_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rax, [rsi+28h] mov rax, [rax+100010h] xor rax, [rdi] shr rax, 20h jnz loc_46361 mov r14, rsi cmp byte ptr [rsi+38h], 0 jnz loc_46361 movzx r13d, word ptr [r14+30h] mov rbx, [r14+20h] mov byte ptr [r14+38h], 1 movzx eax, r13w cmp eax, 2000h jz short loc_46315 mov r15, rdi mov eax, 2000h sub eax, r13d movzx r12d, ax mov rdi, rbx mov esi, 0FFh mov rdx, r12 call _memset add [r14+20h], r12 add [r15], r12 cmp byte ptr [r14+37h], 0 jnz short loc_4630E mov rax, [r14+28h] add [rax+100030h], r12d loc_4630E: mov word ptr [r14+30h], 0 loc_46315: sub rbx, r13 mov eax, cs:dword_426BB8 test al, 2 jz short loc_46341 mov edx, [r14+34h] movzx esi, word ptr [r14+32h] mov rdi, rbx call translog_put_sector_protection mov dword ptr [r14+32h], 0 mov eax, cs:dword_426BB8 loc_46341: test al, 1 jz short loc_46361 movzx eax, cs:word_426BD4 lea rsi, [rbx+rax] mov edx, 2000h sub edx, eax xor edi, edi call my_checksum mov [rbx+7], eax loc_46361: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long translog_finish_page(_QWORD *a1, long long a2) { long long result; // rax long long v3; // r13 long long v4; // rbx long long v5; // r12 long long v6; // rbx result = (*a1 ^ *(_QWORD *)(*(_QWORD *)(a2 + 40) + 1048592LL)) >> 32; if ( !result && !*(_BYTE *)(a2 + 56) ) { v3 = *(unsigned __int16 *)(a2 + 48); v4 = *(_QWORD *)(a2 + 32); *(_BYTE *)(a2 + 56) = 1; if ( (unsigned __int16)v3 != 0x2000 ) { v5 = (unsigned __int16)(0x2000 - v3); memset(v4, 255LL, v5); *(_QWORD *)(a2 + 32) += v5; *a1 += v5; if ( !*(_BYTE *)(a2 + 55) ) *(_DWORD *)(*(_QWORD *)(a2 + 40) + 1048624LL) += v5; *(_WORD *)(a2 + 48) = 0; } v6 = v4 - v3; result = (unsigned int)dword_426BB8; if ( (dword_426BB8 & 2) != 0 ) { translog_put_sector_protection(v6, *(unsigned __int16 *)(a2 + 50), *(unsigned int *)(a2 + 52)); *(_DWORD *)(a2 + 50) = 0; result = (unsigned int)dword_426BB8; } if ( (result & 1) != 0 ) { result = my_checksum( 0LL, v6 + (unsigned __int16)word_426BD4, 0x2000 - (unsigned int)(unsigned __int16)word_426BD4); *(_DWORD *)(v6 + 7) = result; } } return result; }
translog_finish_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RAX,qword ptr [RSI + 0x28] MOV RAX,qword ptr [RAX + 0x100010] XOR RAX,qword ptr [RDI] SHR RAX,0x20 JNZ 0x00146361 MOV R14,RSI CMP byte ptr [RSI + 0x38],0x0 JNZ 0x00146361 MOVZX R13D,word ptr [R14 + 0x30] MOV RBX,qword ptr [R14 + 0x20] MOV byte ptr [R14 + 0x38],0x1 MOVZX EAX,R13W CMP EAX,0x2000 JZ 0x00146315 MOV R15,RDI MOV EAX,0x2000 SUB EAX,R13D MOVZX R12D,AX MOV RDI,RBX MOV ESI,0xff MOV RDX,R12 CALL 0x0012a2e0 ADD qword ptr [R14 + 0x20],R12 ADD qword ptr [R15],R12 CMP byte ptr [R14 + 0x37],0x0 JNZ 0x0014630e MOV RAX,qword ptr [R14 + 0x28] ADD dword ptr [RAX + 0x100030],R12D LAB_0014630e: MOV word ptr [R14 + 0x30],0x0 LAB_00146315: SUB RBX,R13 MOV EAX,dword ptr [0x00526bb8] TEST AL,0x2 JZ 0x00146341 MOV EDX,dword ptr [R14 + 0x34] MOVZX ESI,word ptr [R14 + 0x32] MOV RDI,RBX CALL 0x00149b61 MOV dword ptr [R14 + 0x32],0x0 MOV EAX,dword ptr [0x00526bb8] LAB_00146341: TEST AL,0x1 JZ 0x00146361 MOVZX EAX,word ptr [0x00526bd4] LEA RSI,[RBX + RAX*0x1] MOV EDX,0x2000 SUB EDX,EAX XOR EDI,EDI CALL 0x001c7f80 MOV dword ptr [RBX + 0x7],EAX LAB_00146361: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void translog_finish_page(ulong *param_1,long param_2) { ushort uVar1; void *__s; int4 uVar2; long lVar3; uint uVar4; ulong __n; if (((*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 7) ^ *param_1) >> 0x20 == 0) && (*(char *)(param_2 + 0x38) == '\0')) { uVar1 = *(ushort *)(param_2 + 0x30); __s = *(void **)(param_2 + 0x20); *(int1 *)(param_2 + 0x38) = 1; if (uVar1 != 0x2000) { uVar4 = 0x2000 - uVar1 & 0xffff; __n = (ulong)uVar4; memset(__s,0xff,__n); *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + __n; *param_1 = *param_1 + __n; if (*(char *)(param_2 + 0x37) == '\0') { *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) = *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) + uVar4; } *(int2 *)(param_2 + 0x30) = 0; } lVar3 = (long)__s - (ulong)uVar1; if ((DAT_00526bb8 & 2) != 0) { translog_put_sector_protection (lVar3,*(int2 *)(param_2 + 0x32),*(int4 *)(param_2 + 0x34)); *(int4 *)(param_2 + 0x32) = 0; } if ((DAT_00526bb8 & 1) != 0) { uVar2 = my_checksum(0,lVar3 + (ulong)(uint)DAT_00526bd4,0x2000 - (uint)DAT_00526bd4); *(int4 *)(lVar3 + 7) = uVar2; } } return; }
21,964
stbi_load
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) { FILE *f = stbi__fopen(filename, "rb"); unsigned char *result; if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); result = stbi_load_from_file(f,x,y,comp,req_comp); fclose(f); return result; }
O1
c
stbi_load: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %r8d, %ebx movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 leaq 0xe8056(%rip), %rsi # 0x1104f5 callq 0x1de50 testq %rax, %rax je 0x284d0 movq %rax, %r13 movq %rax, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movl %ebx, %r8d callq 0x284f6 movq %rax, %rbx movq %r13, %rdi callq 0x1dc00 movq %rbx, %rax jmp 0x284ec movq %fs:0x0, %rax leaq 0xe51b5(%rip), %rcx # 0x10d698 movq %rcx, -0x20(%rax) xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
stbi_load: push r15 push r14 push r13 push r12 push rbx mov ebx, r8d mov r14, rcx mov r15, rdx mov r12, rsi lea rsi, aCrb+2; "rb" call _fopen test rax, rax jz short loc_284D0 mov r13, rax mov rdi, rax mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8d, ebx call stbi_load_from_file mov rbx, rax mov rdi, r13 call _fclose mov rax, rbx jmp short loc_284EC loc_284D0: mov rax, fs:0 lea rcx, aCanTFopen; "can't fopen" mov [rax-20h], rcx xor eax, eax loc_284EC: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long stbi_load(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v8; // rax long long v9; // r13 long long v10; // rbx v8 = fopen(a1, "rb"); if ( v8 ) { v9 = v8; v10 = stbi_load_from_file(v8, a2, a3, a4, a5); fclose(v9); return v10; } else { *(_QWORD *)(__readfsqword(0) - 32) = "can't fopen"; return 0LL; } }
stbi_load: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,R8D MOV R14,RCX MOV R15,RDX MOV R12,RSI LEA RSI,[0x2104f5] CALL 0x0011de50 TEST RAX,RAX JZ 0x001284d0 MOV R13,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8D,EBX CALL 0x001284f6 MOV RBX,RAX MOV RDI,R13 CALL 0x0011dc00 MOV RAX,RBX JMP 0x001284ec LAB_001284d0: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20d698] MOV qword ptr [RAX + -0x20],RCX XOR EAX,EAX LAB_001284ec: POP RBX POP R12 POP R13 POP R14 POP R15 RET
int8 stbi_load(char *param_1,int8 param_2,int8 param_3,int8 param_4,int4 param_5) { FILE *__stream; int8 uVar1; long *in_FS_OFFSET; __stream = fopen(param_1,"rb"); if (__stream == (FILE *)0x0) { *(char **)(*in_FS_OFFSET + -0x20) = "can\'t fopen"; uVar1 = 0; } else { uVar1 = stbi_load_from_file(__stream,param_2,param_3,param_4,param_5); fclose(__stream); } return uVar1; }
21,965
stbi_load
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) { FILE *f = stbi__fopen(filename, "rb"); unsigned char *result; if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); result = stbi_load_from_file(f,x,y,comp,req_comp); fclose(f); return result; }
O3
c
stbi_load: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %r8d, %ebx movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 leaq 0xe510e(%rip), %rsi # 0x10d505 callq 0x1de60 testq %rax, %rax je 0x28428 movq %rax, %r13 movq %rax, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movl %ebx, %r8d callq 0x2844e movq %rax, %rbx movq %r13, %rdi callq 0x1dc10 movq %rbx, %rax jmp 0x28444 movq %fs:0x0, %rax leaq 0xe226d(%rip), %rcx # 0x10a6a8 movq %rcx, -0x20(%rax) xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
stbi_load: push r15 push r14 push r13 push r12 push rbx mov ebx, r8d mov r14, rcx mov r15, rdx mov r12, rsi lea rsi, aCrb+2; "rb" call _fopen test rax, rax jz short loc_28428 mov r13, rax mov rdi, rax mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8d, ebx call stbi_load_from_file mov rbx, rax mov rdi, r13 call _fclose mov rax, rbx jmp short loc_28444 loc_28428: mov rax, fs:0 lea rcx, aCanTFopen; "can't fopen" mov [rax-20h], rcx xor eax, eax loc_28444: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long stbi_load(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v8; // rax long long v9; // r13 long long v10; // rbx v8 = fopen(a1, "rb"); if ( v8 ) { v9 = v8; v10 = stbi_load_from_file(v8, a2, a3, a4, a5); fclose(v9); return v10; } else { *(_QWORD *)(__readfsqword(0) - 32) = "can't fopen"; return 0LL; } }
stbi_load: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,R8D MOV R14,RCX MOV R15,RDX MOV R12,RSI LEA RSI,[0x20d505] CALL 0x0011de60 TEST RAX,RAX JZ 0x00128428 MOV R13,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8D,EBX CALL 0x0012844e MOV RBX,RAX MOV RDI,R13 CALL 0x0011dc10 MOV RAX,RBX JMP 0x00128444 LAB_00128428: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x20a6a8] MOV qword ptr [RAX + -0x20],RCX XOR EAX,EAX LAB_00128444: POP RBX POP R12 POP R13 POP R14 POP R15 RET
int8 stbi_load(char *param_1,int8 param_2,int8 param_3,int8 param_4,int4 param_5) { FILE *__stream; int8 uVar1; long *in_FS_OFFSET; __stream = fopen(param_1,"rb"); if (__stream == (FILE *)0x0) { *(char **)(*in_FS_OFFSET + -0x20) = "can\'t fopen"; uVar1 = 0; } else { uVar1 = stbi_load_from_file(__stream,param_2,param_3,param_4,param_5); fclose(__stream); } return uVar1; }
21,966
Rpl_filter::set_wild_do_table(char const*)
eloqsql/sql/rpl_filter.cc
int Rpl_filter::set_wild_do_table(const char* table_spec) { int status; if (wild_do_table_inited) { free_string_array(&wild_do_table); wild_do_table_inited= 0; } status= parse_filter_rule(table_spec, &Rpl_filter::add_wild_do_table); if (wild_do_table_inited && status) { if (!wild_do_table.elements) { delete_dynamic(&wild_do_table); wild_do_table_inited= 0; } } return status; }
O3
cpp
Rpl_filter::set_wild_do_table(char const*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx cmpb $0x1, 0x137(%rdi) jne 0x55183 leaq 0xe0(%rbx), %rsi callq 0x54940 movb $0x0, 0x137(%rbx) leaq -0x1de(%rip), %rdx # 0x54fac movq %rbx, %rdi movq %r14, %rsi xorl %ecx, %ecx callq 0x54c1a movl %eax, %r14d testl %eax, %eax je 0x551c3 cmpb $0x0, 0x137(%rbx) je 0x551c3 cmpl $0x0, 0xe8(%rbx) jne 0x551c3 leaq 0xe0(%rbx), %rdi callq 0x77594 movb $0x0, 0x137(%rbx) movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq nop
_ZN10Rpl_filter17set_wild_do_tableEPKc: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi cmp byte ptr [rdi+137h], 1 jnz short loc_55183 lea rsi, [rbx+0E0h] call _ZN10Rpl_filter17free_string_arrayEP16st_dynamic_array; Rpl_filter::free_string_array(st_dynamic_array *) mov byte ptr [rbx+137h], 0 loc_55183: lea rdx, _ZN10Rpl_filter17add_wild_do_tableEPKc; Rpl_filter::add_wild_do_table(char const*) mov rdi, rbx mov rsi, r14 xor ecx, ecx call _ZN10Rpl_filter17parse_filter_ruleEPKcMS_FiS1_E; Rpl_filter::parse_filter_rule(char const*,int (Rpl_filter::*)(char const*)) mov r14d, eax test eax, eax jz short loc_551C3 cmp byte ptr [rbx+137h], 0 jz short loc_551C3 cmp dword ptr [rbx+0E8h], 0 jnz short loc_551C3 lea rdi, [rbx+0E0h] call delete_dynamic mov byte ptr [rbx+137h], 0 loc_551C3: mov eax, r14d pop rbx pop r14 pop rbp retn
long long Rpl_filter::set_wild_do_table(Rpl_filter *this, const char *a2) { unsigned int v2; // r14d if ( *((_BYTE *)this + 311) == 1 ) { Rpl_filter::free_string_array((long long)this, (long long)this + 224); *((_BYTE *)this + 311) = 0; } v2 = Rpl_filter::parse_filter_rule((long long)this, (long long)a2, (char *)Rpl_filter::add_wild_do_table, 0LL); if ( v2 && *((_BYTE *)this + 311) && !*((_DWORD *)this + 58) ) { delete_dynamic((char *)this + 224); *((_BYTE *)this + 311) = 0; } return v2; }
set_wild_do_table: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI CMP byte ptr [RDI + 0x137],0x1 JNZ 0x00155183 LEA RSI,[RBX + 0xe0] CALL 0x00154940 MOV byte ptr [RBX + 0x137],0x0 LAB_00155183: LEA RDX,[0x154fac] MOV RDI,RBX MOV RSI,R14 XOR ECX,ECX CALL 0x00154c1a MOV R14D,EAX TEST EAX,EAX JZ 0x001551c3 CMP byte ptr [RBX + 0x137],0x0 JZ 0x001551c3 CMP dword ptr [RBX + 0xe8],0x0 JNZ 0x001551c3 LEA RDI,[RBX + 0xe0] CALL 0x00177594 MOV byte ptr [RBX + 0x137],0x0 LAB_001551c3: MOV EAX,R14D POP RBX POP R14 POP RBP RET
/* Rpl_filter::set_wild_do_table(char const*) */ int __thiscall Rpl_filter::set_wild_do_table(Rpl_filter *this,char *param_1) { int iVar1; if (this[0x137] == (Rpl_filter)0x1) { free_string_array(this,(st_dynamic_array *)(this + 0xe0)); this[0x137] = (Rpl_filter)0x0; } iVar1 = parse_filter_rule((char *)this,(_func_int_char_ptr *)param_1); if (((iVar1 != 0) && (this[0x137] != (Rpl_filter)0x0)) && (*(int *)(this + 0xe8) == 0)) { delete_dynamic(this + 0xe0); this[0x137] = (Rpl_filter)0x0; } return iVar1; }
21,967
ma_crypt_data_post_read_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_data_post_read_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint size= share->block_size; const uchar page_type= args->page[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK; const uint32 key_version_offset= (page_type <= TAIL_PAGE) ? KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET; if (res == 0) { const uchar *src= args->page; uchar* dst= args->crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= (page_type <= TAIL_PAGE) ? PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share); const uint tail= CRC_SIZE; const uint32 key_version= uint4korr(src + key_version_offset); /* 1 - copy head */ memcpy(dst, src, head); /* 2 - decrypt page */ res= ma_decrypt(share, share->crypt_data, src + head, dst + head, size - (head + tail), pageno, lsn, key_version); /* 3 - copy tail */ memcpy(dst + size - tail, src + size - tail, tail); /* 4 clear key version to get correct crc */ int4store(dst + key_version_offset, 0); } if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } return maria_page_crc_check_data(res, args); }
O3
c
ma_crypt_data_post_read_hook: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %rbx movl %edi, %r12d testl %edi, %edi jne 0x757a2 movq (%rbx), %r14 movq 0x10(%rbx), %r15 movl 0x7bc(%r15), %ecx movq %rcx, -0x48(%rbp) movb 0x7(%r14), %al andb $0x7, %al xorl %ecx, %ecx cmpb $0x3, %al setb %cl movq 0x18(%rbx), %r12 movl 0x8(%rbx), %eax movl %eax, -0x2c(%rbp) movzwl (%r14), %eax shlq $0x20, %rax movzbl 0x2(%r14), %edx shlq $0x30, %rdx orq %rax, %rdx movl 0x3(%r14), %eax orq %rdx, %rax movq %rax, -0x58(%rbp) movl 0xc18(%r15), %eax leal (,%rcx,4), %edx movq %rdx, -0x50(%rbp) leal 0x8(%rax,%rcx,4), %r13d movl 0x8(%r14,%rdx), %eax movq %rax, -0x40(%rbp) movq %r12, %rdi movq %r12, -0x38(%rbp) movq %r14, %rsi movq %r13, %rdx callq 0x2a0a0 movq %r15, %rdi movq 0xc20(%r15), %rsi leaq (%r14,%r13), %rdx leaq (%r12,%r13), %rcx movq -0x48(%rbp), %r15 movl %r15d, %r8d subl %r13d, %r8d addl $-0x4, %r8d movl -0x2c(%rbp), %r9d pushq -0x40(%rbp) pushq -0x58(%rbp) callq 0x75bec addq $0x10, %rsp movl %eax, %r12d movl -0x4(%r14,%r15), %eax movq -0x38(%rbp), %rdx movl %eax, -0x4(%rdx,%r15) movq -0x50(%rbp), %rax movl $0x0, 0x8(%rdx,%rax) movq 0x18(%rbx), %rax testq %rax, %rax je 0x757be movq (%rbx), %rdi movq %rax, (%rbx) movq $0x0, 0x18(%rbx) callq 0xa71c6 movl %r12d, %edi movq %rbx, %rsi addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x74b8f
ma_crypt_data_post_read_hook: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rsi mov r12d, edi test edi, edi jnz loc_757A2 mov r14, [rbx] mov r15, [rbx+10h] mov ecx, [r15+7BCh] mov [rbp+var_48], rcx mov al, [r14+7] and al, 7 xor ecx, ecx cmp al, 3 setb cl mov r12, [rbx+18h] mov eax, [rbx+8] mov [rbp+var_2C], eax movzx eax, word ptr [r14] shl rax, 20h movzx edx, byte ptr [r14+2] shl rdx, 30h or rdx, rax mov eax, [r14+3] or rax, rdx mov [rbp+var_58], rax mov eax, [r15+0C18h] lea edx, ds:0[rcx*4] mov [rbp+var_50], rdx lea r13d, [rax+rcx*4+8] mov eax, [r14+rdx+8] mov [rbp+var_40], rax mov rdi, r12 mov [rbp+var_38], r12 mov rsi, r14 mov rdx, r13 call _memcpy mov rdi, r15 mov rsi, [r15+0C20h] lea rdx, [r14+r13] lea rcx, [r12+r13] mov r15, [rbp+var_48] mov r8d, r15d sub r8d, r13d add r8d, 0FFFFFFFCh mov r9d, [rbp+var_2C] push [rbp+var_40] push [rbp+var_58] call ma_decrypt add rsp, 10h mov r12d, eax mov eax, [r14+r15-4] mov rdx, [rbp+var_38] mov [rdx+r15-4], eax mov rax, [rbp+var_50] mov dword ptr [rdx+rax+8], 0 loc_757A2: mov rax, [rbx+18h] test rax, rax jz short loc_757BE mov rdi, [rbx] mov [rbx], rax mov qword ptr [rbx+18h], 0 call my_free loc_757BE: mov edi, r12d mov rsi, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp maria_page_crc_check_data
char ma_crypt_data_post_read_hook(int a1, _QWORD *a2) { int v2; // r12d unsigned __int16 *v3; // r14 long long v4; // r15 BOOL v5; // ecx unsigned int v6; // r13d long long v7; // rax long long v8; // rdi unsigned long long v10; // [rsp+8h] [rbp-58h] long long v11; // [rsp+10h] [rbp-50h] long long v12; // [rsp+18h] [rbp-48h] int v13; // [rsp+20h] [rbp-40h] long long v14; // [rsp+28h] [rbp-38h] int v15; // [rsp+34h] [rbp-2Ch] v2 = a1; if ( !a1 ) { v3 = (unsigned __int16 *)*a2; v4 = a2[2]; v12 = *(unsigned int *)(v4 + 1980); v5 = (*(_BYTE *)(*a2 + 7LL) & 7u) < 3; v15 = *((_DWORD *)a2 + 2); v10 = ((unsigned long long)*v3 << 32) | ((unsigned long long)*((unsigned __int8 *)v3 + 2) << 48) | *(unsigned int *)((char *)v3 + 3); v11 = (unsigned int)(4 * v5); v6 = *(_DWORD *)(v4 + 3096) + 4 * v5 + 8; v13 = *(_DWORD *)(*a2 + v11 + 8); v14 = a2[3]; memcpy(v14, *a2, v6); v2 = ma_decrypt( v4, *(_QWORD *)(v4 + 3104), (unsigned int)v3 + v6, (unsigned int)v14 + v6, (unsigned int)v12 - v6 - 4, v15, v10, v13); *(_DWORD *)(v14 + v12 - 4) = *(_DWORD *)((char *)v3 + v12 - 4); *(_DWORD *)(v14 + v11 + 8) = 0; } v7 = a2[3]; if ( v7 ) { v8 = *a2; *a2 = v7; a2[3] = 0LL; my_free(v8); } return maria_page_crc_check_data(v2, (long long)a2); }
ma_crypt_data_post_read_hook: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RSI MOV R12D,EDI TEST EDI,EDI JNZ 0x001757a2 MOV R14,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x10] MOV ECX,dword ptr [R15 + 0x7bc] MOV qword ptr [RBP + -0x48],RCX MOV AL,byte ptr [R14 + 0x7] AND AL,0x7 XOR ECX,ECX CMP AL,0x3 SETC CL MOV R12,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RBX + 0x8] MOV dword ptr [RBP + -0x2c],EAX MOVZX EAX,word ptr [R14] SHL RAX,0x20 MOVZX EDX,byte ptr [R14 + 0x2] SHL RDX,0x30 OR RDX,RAX MOV EAX,dword ptr [R14 + 0x3] OR RAX,RDX MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [R15 + 0xc18] LEA EDX,[RCX*0x4] MOV qword ptr [RBP + -0x50],RDX LEA R13D,[RAX + RCX*0x4 + 0x8] MOV EAX,dword ptr [R14 + RDX*0x1 + 0x8] MOV qword ptr [RBP + -0x40],RAX MOV RDI,R12 MOV qword ptr [RBP + -0x38],R12 MOV RSI,R14 MOV RDX,R13 CALL 0x0012a0a0 MOV RDI,R15 MOV RSI,qword ptr [R15 + 0xc20] LEA RDX,[R14 + R13*0x1] LEA RCX,[R12 + R13*0x1] MOV R15,qword ptr [RBP + -0x48] MOV R8D,R15D SUB R8D,R13D ADD R8D,-0x4 MOV R9D,dword ptr [RBP + -0x2c] PUSH qword ptr [RBP + -0x40] PUSH qword ptr [RBP + -0x58] CALL 0x00175bec ADD RSP,0x10 MOV R12D,EAX MOV EAX,dword ptr [R14 + R15*0x1 + -0x4] MOV RDX,qword ptr [RBP + -0x38] MOV dword ptr [RDX + R15*0x1 + -0x4],EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RDX + RAX*0x1 + 0x8],0x0 LAB_001757a2: MOV RAX,qword ptr [RBX + 0x18] TEST RAX,RAX JZ 0x001757be MOV RDI,qword ptr [RBX] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x18],0x0 CALL 0x001a71c6 LAB_001757be: MOV EDI,R12D MOV RSI,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00174b8f
void ma_crypt_data_post_read_hook(int param_1,long *param_2) { ushort uVar1; uint uVar2; uint uVar3; int4 uVar4; ushort *__src; long lVar5; void *__dest; long lVar6; ushort uVar7; ulong uVar8; uint uVar9; bool bVar10; ulong __n; if (param_1 == 0) { __src = (ushort *)*param_2; lVar5 = param_2[2]; uVar2 = *(uint *)(lVar5 + 0x7bc); bVar10 = (*(byte *)((long)__src + 7) & 7) < 3; __dest = (void *)param_2[3]; lVar6 = param_2[1]; uVar1 = *__src; uVar7 = __src[1]; uVar3 = *(uint *)((long)__src + 3); uVar8 = (ulong)((uint)bVar10 * 4); uVar9 = *(int *)(lVar5 + 0xc18) + 8 + (uint)bVar10 * 4; __n = (ulong)uVar9; uVar4 = *(int4 *)((long)__src + uVar8 + 8); memcpy(__dest,__src,__n); param_1 = ma_decrypt(lVar5,*(int8 *)(lVar5 + 0xc20),(long)__src + __n,(long)__dest + __n, (uVar2 - uVar9) + -4,(int)lVar6, (ulong)uVar3 | (ulong)(byte)uVar7 << 0x30 | (ulong)uVar1 << 0x20,uVar4); *(int4 *)((long)__dest + ((ulong)uVar2 - 4)) = *(int4 *)((long)__src + ((ulong)uVar2 - 4)); *(int4 *)((long)__dest + uVar8 + 8) = 0; } if (param_2[3] != 0) { lVar5 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(lVar5); } maria_page_crc_check_data(param_1,param_2); return; }
21,968
js_std_await
bluesky950520[P]quickjs/quickjs-libc.c
JSValue js_std_await(JSContext *ctx, JSValue obj) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue ret; int state; for(;;) { state = JS_PromiseState(ctx, obj); if (state == JS_PROMISE_FULFILLED) { ret = JS_PromiseResult(ctx, obj); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_REJECTED) { ret = JS_Throw(ctx, JS_PromiseResult(ctx, obj)); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_PENDING) { JSContext *ctx1; int err; err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); if (err < 0) { js_std_dump_error(ctx1); } if (ts->can_js_os_poll) js_os_poll(ctx); } else { /* not a promise */ ret = obj; break; } } return ret; }
O0
c
js_std_await: subq $0x88, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rdi callq 0x27f00 movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x115d0 movq %rax, 0x50(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x536b0 movl %eax, 0x4c(%rsp) cmpl $0x1, 0x4c(%rsp) jne 0x12321 movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x53700 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x23c90 jmp 0x12405 cmpl $0x2, 0x4c(%rsp) jne 0x12399 movq 0x60(%rsp), %rax movq %rax, (%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x53700 movq (%rsp), %rdi movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x2cf00 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x23c90 jmp 0x12405 cmpl $0x0, 0x4c(%rsp) jne 0x123e3 movq 0x60(%rsp), %rdi callq 0x27f00 movq %rax, %rdi leaq 0x10(%rsp), %rsi callq 0x23ad0 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jge 0x123cc movq 0x10(%rsp), %rdi callq 0x11950 movq 0x50(%rsp), %rax cmpl $0x0, 0x60(%rax) je 0x123e1 movq 0x60(%rsp), %rdi callq 0x11b00 jmp 0x123fc movq 0x68(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x80(%rsp) jmp 0x12405 jmp 0x123fe jmp 0x12400 jmp 0x122b4 movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0x88, %rsp retq nopw (%rax,%rax)
js_std_await: sub rsp, 88h mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_28], rdi mov rdi, [rsp+88h+var_28] call JS_GetRuntime mov [rsp+88h+var_30], rax mov rdi, [rsp+88h+var_30] call js_get_thread_state mov [rsp+88h+var_38], rax loc_122B4: mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_PromiseState mov [rsp+88h+var_3C], eax cmp [rsp+88h+var_3C], 1 jnz short loc_12321 mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_PromiseResult mov [rsp+88h+var_50], rax mov [rsp+88h+var_48], rdx mov rax, [rsp+88h+var_50] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_48] mov [rsp+88h+var_8], rax mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_FreeValue jmp loc_12405 loc_12321: cmp [rsp+88h+var_3C], 2 jnz short loc_12399 mov rax, [rsp+88h+var_28] mov [rsp+88h+var_88], rax mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_PromiseResult mov rdi, [rsp+88h+var_88] mov [rsp+88h+var_70], rax mov [rsp+88h+var_68], rdx mov rsi, [rsp+88h+var_70] mov rdx, [rsp+88h+var_68] call JS_Throw mov [rsp+88h+var_60], rax mov [rsp+88h+var_58], rdx mov rax, [rsp+88h+var_60] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_58] mov [rsp+88h+var_8], rax mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_FreeValue jmp short loc_12405 loc_12399: cmp [rsp+88h+var_3C], 0 jnz short loc_123E3 mov rdi, [rsp+88h+var_28] call JS_GetRuntime mov rdi, rax lea rsi, [rsp+88h+var_78] call JS_ExecutePendingJob mov [rsp+88h+var_7C], eax cmp [rsp+88h+var_7C], 0 jge short loc_123CC mov rdi, [rsp+88h+var_78] call js_std_dump_error loc_123CC: mov rax, [rsp+88h+var_38] cmp dword ptr [rax+60h], 0 jz short loc_123E1 mov rdi, [rsp+88h+var_28] call js_os_poll loc_123E1: jmp short loc_123FC loc_123E3: mov rax, [rsp+88h+var_20] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_18] mov [rsp+88h+var_8], rax jmp short loc_12405 loc_123FC: jmp short $+2 loc_123FE: jmp short $+2 loc_12400: jmp loc_122B4 loc_12405: mov rax, [rsp+88h+var_10] mov rdx, [rsp+88h+var_8] add rsp, 88h retn
long long js_std_await(long long a1, long long a2, long long a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d long long v7; // rdx long long v8; // rdx long long v9; // rdx long long v10; // rax long long v12; // [rsp+0h] [rbp-88h] long long v13; // [rsp+10h] [rbp-78h] BYREF long long v14; // [rsp+18h] [rbp-70h] long long v15; // [rsp+20h] [rbp-68h] long long v16; // [rsp+28h] [rbp-60h] long long v17; // [rsp+30h] [rbp-58h] long long v18; // [rsp+38h] [rbp-50h] long long v19; // [rsp+40h] [rbp-48h] int v20; // [rsp+4Ch] [rbp-3Ch] long long thread_state; // [rsp+50h] [rbp-38h] long long Runtime; // [rsp+58h] [rbp-30h] long long v23; // [rsp+60h] [rbp-28h] long long v24; // [rsp+68h] [rbp-20h] long long v25; // [rsp+70h] [rbp-18h] long long v26; // [rsp+78h] [rbp-10h] long long v27; // [rsp+80h] [rbp-8h] v24 = a2; v25 = a3; v23 = a1; Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v3, v4, v5, v6); while ( 1 ) { v20 = JS_PromiseState(v23, v24, v25); if ( v20 == 1 ) { v18 = JS_PromiseResult(v23, v24, v25); v19 = v7; v26 = v18; v27 = v7; JS_FreeValue(v23, v24, v25); return v26; } if ( v20 == 2 ) { v12 = v23; v14 = JS_PromiseResult(v23, v24, v25); v15 = v8; v16 = JS_Throw(v12, v14, v8); v17 = v9; v26 = v16; v27 = v9; JS_FreeValue(v23, v24, v25); return v26; } if ( v20 ) break; v10 = JS_GetRuntime(v23); if ( (int)JS_ExecutePendingJob(v10, &v13) < 0 ) js_std_dump_error(v13); if ( *(_DWORD *)(thread_state + 96) ) js_os_poll(v23, (long long)&v13); } v26 = v24; v27 = v25; return v26; }
js_std_await: SUB RSP,0x88 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x60],RDI MOV RDI,qword ptr [RSP + 0x60] CALL 0x00127f00 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001115d0 MOV qword ptr [RSP + 0x50],RAX LAB_001122b4: MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x001536b0 MOV dword ptr [RSP + 0x4c],EAX CMP dword ptr [RSP + 0x4c],0x1 JNZ 0x00112321 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00153700 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00123c90 JMP 0x00112405 LAB_00112321: CMP dword ptr [RSP + 0x4c],0x2 JNZ 0x00112399 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00153700 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0012cf00 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00123c90 JMP 0x00112405 LAB_00112399: CMP dword ptr [RSP + 0x4c],0x0 JNZ 0x001123e3 MOV RDI,qword ptr [RSP + 0x60] CALL 0x00127f00 MOV RDI,RAX LEA RSI,[RSP + 0x10] CALL 0x00123ad0 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JGE 0x001123cc MOV RDI,qword ptr [RSP + 0x10] CALL 0x00111950 LAB_001123cc: MOV RAX,qword ptr [RSP + 0x50] CMP dword ptr [RAX + 0x60],0x0 JZ 0x001123e1 MOV RDI,qword ptr [RSP + 0x60] CALL 0x00111b00 LAB_001123e1: JMP 0x001123fc LAB_001123e3: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x80],RAX JMP 0x00112405 LAB_001123fc: JMP 0x001123fe LAB_001123fe: JMP 0x00112400 LAB_00112400: JMP 0x001122b4 LAB_00112405: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
int1 [16] js_std_await(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; int iVar2; int8 uVar3; int8 local_78; int1 local_70 [16]; int1 local_60 [16]; int1 local_50 [16]; int local_3c; long local_38; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int1 local_10 [16]; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_30 = JS_GetRuntime(param_1); local_38 = js_get_thread_state(local_30); while( true ) { local_3c = JS_PromiseState(local_28,local_20,local_18); uVar3 = local_28; if (local_3c == 1) { local_50 = JS_PromiseResult(local_28,local_20,local_18); local_10 = local_50; JS_FreeValue(local_28,local_20,local_18); return local_10; } if (local_3c == 2) break; if (local_3c != 0) { auVar1._8_8_ = local_18; auVar1._0_8_ = local_20; return auVar1; } uVar3 = JS_GetRuntime(local_28); iVar2 = JS_ExecutePendingJob(uVar3,&local_78); if (iVar2 < 0) { js_std_dump_error(local_78); } if (*(int *)(local_38 + 0x60) != 0) { js_os_poll(local_28); } } local_70 = JS_PromiseResult(local_28,local_20,local_18); local_60 = JS_Throw(uVar3,local_70._0_8_,local_70._8_8_); local_10 = local_60; JS_FreeValue(local_28,local_20,local_18); return local_10; }
21,969
js_std_await
bluesky950520[P]quickjs/quickjs-libc.c
JSValue js_std_await(JSContext *ctx, JSValue obj) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue ret; int state; for(;;) { state = JS_PromiseState(ctx, obj); if (state == JS_PROMISE_FULFILLED) { ret = JS_PromiseResult(ctx, obj); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_REJECTED) { ret = JS_Throw(ctx, JS_PromiseResult(ctx, obj)); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_PENDING) { JSContext *ctx1; int err; err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); if (err < 0) { js_std_dump_error(ctx1); } if (ts->can_js_os_poll) js_os_poll(ctx); } else { /* not a promise */ ret = obj; break; } } return ret; }
O2
c
js_std_await: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x1a185 movq %rax, %rdi callq 0x1028a movq %rax, %r12 leaq 0x8(%rsp), %r13 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x2f918 testl %eax, %eax jne 0x10aa4 movq %r15, %rdi callq 0x1a185 movq %rax, %rdi movq %r13, %rsi callq 0x17f5a testl %eax, %eax jns 0x10a92 movq 0x8(%rsp), %rdi callq 0x1049c cmpl $0x0, 0x60(%r12) je 0x10a5f movq %r15, %rdi callq 0x1058a jmp 0x10a5f cmpl $0x2, %eax je 0x10abe cmpl $0x1, %eax jne 0x10af1 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x2f933 jmp 0x10ad7 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x2f933 movq %r15, %rdi movq %rax, %rsi callq 0x1c446 movq %rax, %r12 movq %rdx, %r13 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1801e movq %r12, %r14 movq %r13, %rbx movq %r14, %rax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_std_await: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi call JS_GetRuntime mov rdi, rax call js_get_thread_state mov r12, rax lea r13, [rsp+38h+var_30] loc_10A5F: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_PromiseState test eax, eax jnz short loc_10AA4 mov rdi, r15 call JS_GetRuntime mov rdi, rax mov rsi, r13 call JS_ExecutePendingJob test eax, eax jns short loc_10A92 mov rdi, [rsp+38h+var_30] call js_std_dump_error loc_10A92: cmp dword ptr [r12+60h], 0 jz short loc_10A5F mov rdi, r15 call js_os_poll jmp short loc_10A5F loc_10AA4: cmp eax, 2 jz short loc_10ABE cmp eax, 1 jnz short loc_10AF1 mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_PromiseResult jmp short loc_10AD7 loc_10ABE: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_PromiseResult mov rdi, r15 mov rsi, rax call JS_Throw loc_10AD7: mov r12, rax mov r13, rdx mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue mov r14, r12 mov rbx, r13 loc_10AF1: mov rax, r14 mov rdx, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_std_await(long long a1, long long a2, long long a3) { long long v4; // r14 int Runtime; // eax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d long long thread_state; // r12 int v11; // eax long long v12; // rax long long v13; // rax long long v14; // rax long long v15; // r12 char v17; // [rsp+0h] [rbp-38h] long long v18[6]; // [rsp+8h] [rbp-30h] BYREF v4 = a2; Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v6, v7, v8, v9, v17); while ( 1 ) { v11 = JS_PromiseState(a1, a2, a3); if ( v11 ) break; v12 = JS_GetRuntime(a1); if ( (int)JS_ExecutePendingJob(v12, v18) < 0 ) js_std_dump_error(v18[0]); if ( *(_DWORD *)(thread_state + 96) ) js_os_poll(a1, (long long)v18); } if ( v11 == 2 ) { v14 = JS_PromiseResult(a1, a2, a3); v13 = JS_Throw(a1, v14); goto LABEL_11; } if ( v11 == 1 ) { v13 = JS_PromiseResult(a1, a2, a3); LABEL_11: v15 = v13; JS_FreeValue(a1, a2, a3); return v15; } return v4; }
js_std_await: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x0011a185 MOV RDI,RAX CALL 0x0011028a MOV R12,RAX LEA R13,[RSP + 0x8] LAB_00110a5f: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0012f918 TEST EAX,EAX JNZ 0x00110aa4 MOV RDI,R15 CALL 0x0011a185 MOV RDI,RAX MOV RSI,R13 CALL 0x00117f5a TEST EAX,EAX JNS 0x00110a92 MOV RDI,qword ptr [RSP + 0x8] CALL 0x0011049c LAB_00110a92: CMP dword ptr [R12 + 0x60],0x0 JZ 0x00110a5f MOV RDI,R15 CALL 0x0011058a JMP 0x00110a5f LAB_00110aa4: CMP EAX,0x2 JZ 0x00110abe CMP EAX,0x1 JNZ 0x00110af1 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0012f933 JMP 0x00110ad7 LAB_00110abe: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0012f933 MOV RDI,R15 MOV RSI,RAX CALL 0x0011c446 LAB_00110ad7: MOV R12,RAX MOV R13,RDX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011801e MOV R14,R12 MOV RBX,R13 LAB_00110af1: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_std_await(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int8 uVar2; long lVar3; int1 auVar4 [16]; int8 local_30; auVar4._8_8_ = param_3; auVar4._0_8_ = param_2; uVar2 = JS_GetRuntime(); lVar3 = js_get_thread_state(uVar2); while (iVar1 = JS_PromiseState(param_1,param_2,param_3), iVar1 == 0) { uVar2 = JS_GetRuntime(param_1); iVar1 = JS_ExecutePendingJob(uVar2,&local_30); if (iVar1 < 0) { js_std_dump_error(local_30); } if (*(int *)(lVar3 + 0x60) != 0) { js_os_poll(param_1); } } if (iVar1 == 2) { uVar2 = JS_PromiseResult(param_1,param_2,param_3); auVar4 = JS_Throw(param_1,uVar2); } else { if (iVar1 != 1) { return auVar4; } auVar4 = JS_PromiseResult(param_1,param_2,param_3); } JS_FreeValue(param_1,param_2,param_3); return auVar4; }
21,970
mariadb_set_conf_option
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool _mariadb_set_conf_option(MYSQL *mysql, const char *config_option, const char *config_value) { if (config_option) { int i; char *c; /* CONC-395: replace underscore "_" by dash "-" */ while ((c= strchr(config_option, '_'))) *c= '-'; for (i=0; mariadb_defaults[i].conf_key; i++) { if (!strcmp(mariadb_defaults[i].conf_key, config_option)) { my_bool val_bool; int val_int; size_t val_sizet; int rc; void *option_val= NULL; switch (mariadb_defaults[i].type) { case MARIADB_OPTION_FUNC: return mariadb_defaults[i].u.option_func(mysql, config_option, config_value, -1); break; case MARIADB_OPTION_BOOL: val_bool= 0; if (config_value) val_bool= atoi(config_value); option_val= &val_bool; break; case MARIADB_OPTION_INT: val_int= 0; if (config_value) val_int= atoi(config_value); option_val= &val_int; break; case MARIADB_OPTION_SIZET: val_sizet= 0; if (config_value) val_sizet= strtol(config_value, NULL, 10); option_val= &val_sizet; break; case MARIADB_OPTION_STR: option_val= (void*)config_value; break; case MARIADB_OPTION_NONE: break; } rc= mysql_optionsv(mysql, mariadb_defaults[i].u.option, option_val); return(test(rc)); } } } /* unknown key */ return 1; }
O0
c
mariadb_set_conf_option: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1c28a jmp 0x1c0e1 movq -0x18(%rbp), %rdi movl $0x5f, %esi callq 0x13170 movq %rax, -0x30(%rbp) cmpq $0x0, %rax je 0x1c102 movq -0x30(%rbp), %rax movb $0x2d, (%rax) jmp 0x1c0e1 movl $0x0, -0x24(%rbp) movslq -0x24(%rbp), %rcx leaq 0x4927c(%rip), %rax # 0x65390 imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x10(%rax) je 0x1c288 movslq -0x24(%rbp), %rcx leaq 0x4925f(%rip), %rax # 0x65390 imulq $0x18, %rcx, %rcx addq %rcx, %rax movq 0x10(%rax), %rdi movq -0x18(%rbp), %rsi callq 0x135f0 cmpl $0x0, %eax jne 0x1c278 movq $0x0, -0x50(%rbp) movslq -0x24(%rbp), %rax leaq (%rax,%rax,2), %rcx leaq 0x4922b(%rip), %rax # 0x65390 movl 0x8(%rax,%rcx,8), %eax movq %rax, -0x58(%rbp) subq $0x5, %rax ja 0x1c23d movq -0x58(%rbp), %rax leaq 0x392e2(%rip), %rcx # 0x55464 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movslq -0x24(%rbp), %rcx leaq 0x491fa(%rip), %rax # 0x65390 imulq $0x18, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq $-0x1, %rcx callq *%rax movb %al, -0x1(%rbp) jmp 0x1c28e movb $0x0, -0x31(%rbp) cmpq $0x0, -0x20(%rbp) je 0x1c1d4 movq -0x20(%rbp), %rdi callq 0x136b0 movb %al, -0x31(%rbp) leaq -0x31(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x1c23d movl $0x0, -0x38(%rbp) cmpq $0x0, -0x20(%rbp) je 0x1c1f8 movq -0x20(%rbp), %rdi callq 0x136b0 movl %eax, -0x38(%rbp) leaq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x1c23d movq $0x0, -0x40(%rbp) cmpq $0x0, -0x20(%rbp) je 0x1c227 movq -0x20(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0xa, %edx callq 0x13600 movq %rax, -0x40(%rbp) leaq -0x40(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x1c23d movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x1c23d jmp 0x1c23d movq -0x10(%rbp), %rdi movslq -0x24(%rbp), %rcx leaq 0x49144(%rip), %rax # 0x65390 imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %esi movq -0x50(%rbp), %rdx movb $0x0, %al callq 0x1c2a0 movl %eax, -0x44(%rbp) movl -0x44(%rbp), %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movb %al, -0x1(%rbp) jmp 0x1c28e jmp 0x1c27a movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x1c109 jmp 0x1c28a movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
_mariadb_set_conf_option: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_18], 0 jz loc_1C28A jmp short $+2 loc_1C0E1: mov rdi, [rbp+var_18] mov esi, 5Fh ; '_' call _strchr mov [rbp+var_30], rax cmp rax, 0 jz short loc_1C102 mov rax, [rbp+var_30] mov byte ptr [rax], 2Dh ; '-' jmp short loc_1C0E1 loc_1C102: mov [rbp+var_24], 0 loc_1C109: movsxd rcx, [rbp+var_24] lea rax, mariadb_defaults imul rcx, 18h add rax, rcx cmp qword ptr [rax+10h], 0 jz loc_1C288 movsxd rcx, [rbp+var_24] lea rax, mariadb_defaults imul rcx, 18h add rax, rcx mov rdi, [rax+10h] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz loc_1C278 mov [rbp+var_50], 0 movsxd rax, [rbp+var_24] lea rcx, [rax+rax*2] lea rax, mariadb_defaults mov eax, [rax+rcx*8+8] mov [rbp+var_58], rax sub rax, 5; switch 6 cases ja def_1C189; jumptable 000000000001C189 default case mov rax, [rbp+var_58] lea rcx, jpt_1C189 movsxd rax, ds:(jpt_1C189 - 55464h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1C18B: movsxd rcx, [rbp+var_24]; jumptable 000000000001C189 case 5 lea rax, mariadb_defaults imul rcx, 18h add rax, rcx mov rax, [rax] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, 0FFFFFFFFFFFFFFFFh call rax mov [rbp+var_1], al jmp loc_1C28E loc_1C1BD: mov [rbp+var_31], 0; jumptable 000000000001C189 case 1 cmp [rbp+var_20], 0 jz short loc_1C1D4 mov rdi, [rbp+var_20] call _atoi mov [rbp+var_31], al loc_1C1D4: lea rax, [rbp+var_31] mov [rbp+var_50], rax jmp short def_1C189; jumptable 000000000001C189 default case loc_1C1DE: mov [rbp+var_38], 0; jumptable 000000000001C189 case 2 cmp [rbp+var_20], 0 jz short loc_1C1F8 mov rdi, [rbp+var_20] call _atoi mov [rbp+var_38], eax loc_1C1F8: lea rax, [rbp+var_38] mov [rbp+var_50], rax jmp short def_1C189; jumptable 000000000001C189 default case loc_1C202: mov [rbp+var_40], 0; jumptable 000000000001C189 case 3 cmp [rbp+var_20], 0 jz short loc_1C227 mov rdi, [rbp+var_20] xor eax, eax mov esi, eax mov edx, 0Ah call _strtol mov [rbp+var_40], rax loc_1C227: lea rax, [rbp+var_40] mov [rbp+var_50], rax jmp short def_1C189; jumptable 000000000001C189 default case loc_1C231: mov rax, [rbp+var_20]; jumptable 000000000001C189 case 4 mov [rbp+var_50], rax jmp short def_1C189; jumptable 000000000001C189 default case loc_1C23B: jmp short $+2; jumptable 000000000001C189 case 0 def_1C189: mov rdi, [rbp+var_10]; jumptable 000000000001C189 default case movsxd rcx, [rbp+var_24] lea rax, mariadb_defaults imul rcx, 18h add rax, rcx mov esi, [rax] mov rdx, [rbp+var_50] mov al, 0 call mysql_optionsv mov [rbp+var_44], eax mov edx, [rbp+var_44] xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_1], al jmp short loc_1C28E loc_1C278: jmp short $+2 loc_1C27A: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_1C109 loc_1C288: jmp short $+2 loc_1C28A: mov [rbp+var_1], 1 loc_1C28E: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char mariadb_set_conf_option(long long a1, long long a2, long long a3) { int v3; // r8d int v4; // r9d int v5; // eax int v7; // [rsp+10h] [rbp-50h] long long v8; // [rsp+20h] [rbp-40h] BYREF int v9; // [rsp+28h] [rbp-38h] BYREF char v10; // [rsp+2Fh] [rbp-31h] BYREF _BYTE *v11; // [rsp+30h] [rbp-30h] int i; // [rsp+3Ch] [rbp-24h] long long v13; // [rsp+40h] [rbp-20h] long long v14; // [rsp+48h] [rbp-18h] long long v15; // [rsp+50h] [rbp-10h] bool v16; // [rsp+5Fh] [rbp-1h] v15 = a1; v14 = a2; v13 = a3; if ( a2 ) { while ( 1 ) { v11 = (_BYTE *)strchr(v14, 95LL); if ( !v11 ) break; *v11 = 45; } for ( i = 0; *((_QWORD *)&mariadb_defaults + 3 * i + 2); ++i ) { if ( !(unsigned int)strcmp(*((_QWORD *)&mariadb_defaults + 3 * i + 2), v14) ) { v7 = 0; switch ( *((_DWORD *)&mariadb_defaults + 6 * i + 2) ) { case 1: v10 = 0; if ( v13 ) v10 = atoi(v13); v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v10, 24 * i, v3, v4); goto LABEL_20; case 2: v9 = 0; if ( v13 ) v9 = atoi(v13); v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v9, 24 * i, v3, v4); goto LABEL_20; case 3: v8 = 0LL; if ( v13 ) v8 = strtol(v13, 0LL, 10LL); v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v8, 24 * i, v3, v4); goto LABEL_20; case 4: v7 = v13; goto LABEL_19; case 5: return (*((long long ( **)(long long, long long, long long, long long))&mariadb_defaults + 3 * i))( v15, v14, v13, -1LL); default: LABEL_19: v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), v7, 24 * i, v3, v4); LABEL_20: v16 = v5 != 0; break; } return v16; } } } return 1; }
_mariadb_set_conf_option: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0011c28a JMP 0x0011c0e1 LAB_0011c0e1: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x5f CALL 0x00113170 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JZ 0x0011c102 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x2d JMP 0x0011c0e1 LAB_0011c102: MOV dword ptr [RBP + -0x24],0x0 LAB_0011c109: MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x165390] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP qword ptr [RAX + 0x10],0x0 JZ 0x0011c288 MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x165390] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001135f0 CMP EAX,0x0 JNZ 0x0011c278 MOV qword ptr [RBP + -0x50],0x0 MOVSXD RAX,dword ptr [RBP + -0x24] LEA RCX,[RAX + RAX*0x2] LEA RAX,[0x165390] MOV EAX,dword ptr [RAX + RCX*0x8 + 0x8] MOV qword ptr [RBP + -0x58],RAX SUB RAX,0x5 JA 0x0011c23d MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[0x155464] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x165390] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,-0x1 CALL RAX MOV byte ptr [RBP + -0x1],AL JMP 0x0011c28e caseD_1: MOV byte ptr [RBP + -0x31],0x0 CMP qword ptr [RBP + -0x20],0x0 JZ 0x0011c1d4 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001136b0 MOV byte ptr [RBP + -0x31],AL LAB_0011c1d4: LEA RAX,[RBP + -0x31] MOV qword ptr [RBP + -0x50],RAX JMP 0x0011c23d caseD_2: MOV dword ptr [RBP + -0x38],0x0 CMP qword ptr [RBP + -0x20],0x0 JZ 0x0011c1f8 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001136b0 MOV dword ptr [RBP + -0x38],EAX LAB_0011c1f8: LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX JMP 0x0011c23d caseD_3: MOV qword ptr [RBP + -0x40],0x0 CMP qword ptr [RBP + -0x20],0x0 JZ 0x0011c227 MOV RDI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ESI,EAX MOV EDX,0xa CALL 0x00113600 MOV qword ptr [RBP + -0x40],RAX LAB_0011c227: LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x50],RAX JMP 0x0011c23d caseD_4: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX JMP 0x0011c23d caseD_0: JMP 0x0011c23d default: MOV RDI,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x165390] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ESI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x50] MOV AL,0x0 CALL 0x0011c2a0 MOV dword ptr [RBP + -0x44],EAX MOV EDX,dword ptr [RBP + -0x44] XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV byte ptr [RBP + -0x1],AL JMP 0x0011c28e LAB_0011c278: JMP 0x0011c27a LAB_0011c27a: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0011c109 LAB_0011c288: JMP 0x0011c28a LAB_0011c28a: MOV byte ptr [RBP + -0x1],0x1 LAB_0011c28e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
bool _mariadb_set_conf_option(int8 param_1,char *param_2,long *param_3) { int1 uVar1; int iVar2; long *local_58; long local_48; int local_40; int1 local_39; char *local_38; int local_2c; long *local_28; char *local_20; int8 local_18; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_2 != (char *)0x0) { while (local_38 = strchr(local_20,0x5f), local_38 != (char *)0x0) { *local_38 = '-'; } local_2c = 0; local_38 = (char *)0x0; while (*(long *)(mariadb_defaults + (long)local_2c * 0x18 + 0x10) != 0) { iVar2 = strcmp(*(char **)(mariadb_defaults + (long)local_2c * 0x18 + 0x10),local_20); if (iVar2 == 0) { local_58 = (long *)0x0; switch(*(int4 *)(mariadb_defaults + (long)local_2c * 0x18 + 8)) { case 0: break; case 1: local_39 = 0; if (local_28 != (long *)0x0) { iVar2 = atoi((char *)local_28); local_39 = (int1)iVar2; } local_58 = (long *)&local_39; break; case 2: local_40 = 0; if (local_28 != (long *)0x0) { local_40 = atoi((char *)local_28); } local_58 = (long *)&local_40; break; case 3: local_48 = 0; if (local_28 != (long *)0x0) { local_48 = strtol((char *)local_28,(char **)0x0,10); } local_58 = &local_48; break; case 4: local_58 = local_28; break; case 5: uVar1 = (**(code **)(mariadb_defaults + (long)local_2c * 0x18)) (local_18,local_20,local_28,0xffffffffffffffff); return (bool)uVar1; } iVar2 = mysql_optionsv(local_18,*(int4 *)(mariadb_defaults + (long)local_2c * 0x18), local_58); return iVar2 != 0; } local_2c = local_2c + 1; } } return true; }
21,971
lf_alloc_init
eloqsql/mysys/lf_alloc-pin.c
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset) { lf_pinbox_init(&allocator->pinbox, free_ptr_offset, (lf_pinbox_free_func *)alloc_free, allocator); allocator->top= 0; allocator->mallocs= 0; allocator->element_size= size; allocator->constructor= 0; allocator->destructor= 0; DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset); }
O0
c
lf_alloc_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rdi movl -0x10(%rbp), %esi movq -0x8(%rbp), %rcx leaq 0x4c(%rip), %rdx # 0xc76c0 callq 0xc6fb0 movq -0x8(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x54(%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x60(%rax) jmp 0xc76b4 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
lf_alloc_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rdi, [rbp+var_8] mov esi, [rbp+var_10] mov rcx, [rbp+var_8] lea rdx, alloc_free call lf_pinbox_init mov rax, [rbp+var_8] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+54h], 0 mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+50h], ecx mov rax, [rbp+var_8] mov qword ptr [rax+58h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+60h], 0 jmp short $+2 loc_C76B4: add rsp, 10h pop rbp retn
long long lf_alloc_init(long long a1, int a2, int a3) { long long result; // rax lf_pinbox_init(a1, a3, (long long)alloc_free, a1); *(_QWORD *)(a1 + 72) = 0LL; *(_DWORD *)(a1 + 84) = 0; *(_DWORD *)(a1 + 80) = a2; *(_QWORD *)(a1 + 88) = 0LL; result = a1; *(_QWORD *)(a1 + 96) = 0LL; return result; }
lf_alloc_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] LEA RDX,[0x1c76c0] CALL 0x001c6fb0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x54],0x0 MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],0x0 JMP 0x001c76b4 LAB_001c76b4: ADD RSP,0x10 POP RBP RET
void lf_alloc_init(long param_1,int4 param_2,int4 param_3) { lf_pinbox_init(param_1,param_3,alloc_free,param_1); *(int8 *)(param_1 + 0x48) = 0; *(int4 *)(param_1 + 0x54) = 0; *(int4 *)(param_1 + 0x50) = param_2; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; return; }
21,972
js_regexp_compile
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_compile(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSRegExp *re1, *re; JSValue pattern1, flags1; JSValue bc, pattern; re = js_get_regexp(ctx, this_val, TRUE); if (!re) return JS_EXCEPTION; pattern1 = argv[0]; flags1 = argv[1]; re1 = js_get_regexp(ctx, pattern1, FALSE); if (re1) { if (!JS_IsUndefined(flags1)) return JS_ThrowTypeError(ctx, "flags must be undefined"); pattern = js_dup(JS_MKPTR(JS_TAG_STRING, re1->pattern)); bc = js_dup(JS_MKPTR(JS_TAG_STRING, re1->bytecode)); } else { bc = JS_UNDEFINED; if (JS_IsUndefined(pattern1)) pattern = JS_AtomToString(ctx, JS_ATOM_empty_string); else pattern = JS_ToString(ctx, pattern1); if (JS_IsException(pattern)) goto fail; bc = js_compile_regexp(ctx, pattern, flags1); if (JS_IsException(bc)) goto fail; } JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, re->pattern)); JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, re->bytecode)); re->pattern = JS_VALUE_GET_STRING(pattern); re->bytecode = JS_VALUE_GET_STRING(bc); if (JS_SetProperty(ctx, this_val, JS_ATOM_lastIndex, js_int32(0)) < 0) return JS_EXCEPTION; return js_dup(this_val); fail: JS_FreeValue(ctx, pattern); JS_FreeValue(ctx, bc); return JS_EXCEPTION; }
O1
c
js_regexp_compile: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 movq %rsi, 0x28(%rsp) cmpl $-0x1, %r14d jne 0x48d6b movq 0x28(%rsp), %r13 cmpw $0x12, 0x6(%r13) jne 0x48d6b addq $0x30, %r13 jmp 0x48d7b movq %r12, %rdi movl $0x12, %esi callq 0x275f0 xorl %r13d, %r13d movl $0x6, %ebp testq %r13, %r13 je 0x48dde movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq 0x10(%rbx), %r9 movq 0x18(%rbx), %r8 movq %rsi, 0x28(%rsp) movl %edx, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x48db7 movq 0x28(%rsp), %rcx cmpw $0x12, 0x6(%rcx) jne 0x48db7 addq $0x30, %rcx jmp 0x48db9 xorl %ecx, %ecx testq %rcx, %rcx je 0x48de3 cmpl $0x3, %r8d jne 0x48e0c movq (%rcx), %rax incl (%rax) movq %rax, 0x40(%rsp) movq 0x8(%rcx), %rax incl (%rax) movq %rax, 0x20(%rsp) jmp 0x48ea7 xorl %r13d, %r13d jmp 0x48e20 movl $0x0, 0x20(%rsp) cmpl $0x3, %eax jne 0x48e27 movq 0x18(%r12), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %rbp incl (%rbp) movq $-0x7, %rdx jmp 0x48e40 leaq 0x56da0(%rip), %rsi # 0x9fbb3 xorl %r13d, %r13d movq %r12, %rdi xorl %eax, %eax callq 0x22567 xorl %ecx, %ecx jmp 0x48f6e movq %r12, %rdi xorl %ecx, %ecx movq %r8, %rbx movq %r9, %rbp callq 0x27add movq %rbp, %r9 movq %rbx, %r8 movq %rax, %rbp movq %rbp, 0x40(%rsp) movl $0x3, %ebx cmpl $0x6, %edx je 0x48e79 movq %r12, %rdi movq %rbp, %rsi movq %rdx, 0x38(%rsp) movq 0x38(%rsp), %rdx movq %r9, %rcx callq 0x33562 movq %rdx, %rbx movq 0x38(%rsp), %rdx movq %rax, 0x20(%rsp) cmpl $0x6, %ebx jne 0x48ea7 movq 0x18(%r12), %rdi movq %rbp, %rsi callq 0x1d8c6 movq 0x20(%rsp), %rsi movq 0x18(%r12), %rdi movq %rbx, %rdx callq 0x1d8c6 xorl %r13d, %r13d xorl %ecx, %ecx movl $0x6, %ebp jmp 0x48f6e movq (%r13), %rsi movq 0x18(%r12), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x48ec8 movq $-0x7, %rdx callq 0x21266 movq 0x8(%r13), %rsi movq 0x18(%r12), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax movl $0x6, %ebp jg 0x48eee movq $-0x7, %rdx callq 0x21266 movq 0x40(%rsp), %rax movq %rax, (%r13) movq 0x20(%rsp), %rax movq %rax, 0x8(%r13) movq %r15, 0x28(%rsp) movq %r14, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 xorl %r13d, %r13d movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x56, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x24388 movl $0x0, %ecx testl %eax, %eax js 0x48f6e movq %r15, 0x28(%rsp) cmpl $-0x9, %r14d jb 0x48f5b movq 0x28(%rsp), %rax incl (%rax) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx movl %r15d, %r13d movq %r14, %rbp orq %rcx, %r13 movq %r13, %rax movq %rbp, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_regexp_compile: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, r8 mov r14, rdx mov r15, rsi mov r12, rdi mov qword ptr [rsp+78h+var_50], rsi cmp r14d, 0FFFFFFFFh jnz short loc_48D6B mov r13, qword ptr [rsp+78h+var_50] cmp word ptr [r13+6], 12h jnz short loc_48D6B add r13, 30h ; '0' jmp short loc_48D7B loc_48D6B: mov rdi, r12 mov esi, 12h call JS_ThrowTypeErrorInvalidClass xor r13d, r13d loc_48D7B: mov ebp, 6 test r13, r13 jz short loc_48DDE mov rsi, [rbx] mov rdx, [rbx+8] mov r9, [rbx+10h] mov r8, [rbx+18h] mov qword ptr [rsp+78h+var_50], rsi mov eax, edx mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_48DB7 mov rcx, qword ptr [rsp+78h+var_50] cmp word ptr [rcx+6], 12h jnz short loc_48DB7 add rcx, 30h ; '0' jmp short loc_48DB9 loc_48DB7: xor ecx, ecx loc_48DB9: test rcx, rcx jz short loc_48DE3 cmp r8d, 3 jnz short loc_48E0C mov rax, [rcx] inc dword ptr [rax] mov [rsp+78h+var_38], rax mov rax, [rcx+8] inc dword ptr [rax] mov [rsp+78h+var_58], rax jmp loc_48EA7 loc_48DDE: xor r13d, r13d jmp short loc_48E20 loc_48DE3: mov dword ptr [rsp+78h+var_58], 0 cmp eax, 3 jnz short loc_48E27 mov rax, [r12+18h] mov rax, [rax+68h] mov rbp, [rax+178h] inc dword ptr [rbp+0] mov rdx, 0FFFFFFFFFFFFFFF9h jmp short loc_48E40 loc_48E0C: lea rsi, aFlagsMustBeUnd; "flags must be undefined" xor r13d, r13d mov rdi, r12 xor eax, eax call JS_ThrowTypeError loc_48E20: xor ecx, ecx jmp loc_48F6E loc_48E27: mov rdi, r12 xor ecx, ecx mov rbx, r8 mov rbp, r9 call JS_ToStringInternal mov r9, rbp mov r8, rbx mov rbp, rax loc_48E40: mov [rsp+78h+var_38], rbp mov ebx, 3 cmp edx, 6 jz short loc_48E79 mov rdi, r12 mov rsi, rbp mov [rsp+78h+var_40], rdx mov rdx, [rsp+78h+var_40] mov rcx, r9 call js_compile_regexp mov rbx, rdx mov rdx, [rsp+78h+var_40] mov [rsp+78h+var_58], rax cmp ebx, 6 jnz short loc_48EA7 loc_48E79: mov rdi, [r12+18h] mov rsi, rbp call JS_FreeValueRT mov rsi, [rsp+78h+var_58] mov rdi, [r12+18h] mov rdx, rbx call JS_FreeValueRT xor r13d, r13d xor ecx, ecx mov ebp, 6 jmp loc_48F6E loc_48EA7: mov rsi, [r13+0] mov rdi, [r12+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_48EC8 mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_48EC8: mov rsi, [r13+8] mov rdi, [r12+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 mov ebp, 6 jg short loc_48EEE mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_48EEE: mov rax, [rsp+78h+var_38] mov [r13+0], rax mov rax, [rsp+78h+var_58] mov [r13+8], rax mov qword ptr [rsp+78h+var_50], r15 mov qword ptr [rsp+78h+var_50+8], r14 movups xmm0, [rsp+78h+var_50] movups [rsp+78h+var_78], xmm0 mov [rsp+78h+var_60], 0 mov [rsp+78h+var_68], 4000h xor r13d, r13d mov rdi, r12 mov rsi, r15 mov rdx, r14 mov ecx, 56h ; 'V' xor r8d, r8d xor r9d, r9d call JS_SetPropertyInternal2 mov ecx, 0 test eax, eax js short loc_48F6E mov qword ptr [rsp+78h+var_50], r15 cmp r14d, 0FFFFFFF7h jb short loc_48F5B mov rax, qword ptr [rsp+78h+var_50] inc dword ptr [rax] loc_48F5B: mov rcx, 0FFFFFFFF00000000h and rcx, r15 mov r13d, r15d mov rbp, r14 loc_48F6E: or r13, rcx mov rax, r13 mov rdx, rbp add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_regexp_compile( long long a1, long long a2, unsigned long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long *a13) { long long v17; // r13 long long v18; // rsi long long v19; // rdx long long v20; // r9 long long v21; // r8 _QWORD *v22; // rcx _DWORD *v23; // rax _DWORD *v24; // rax long long v25; // r13 _DWORD *v26; // rbp long long v27; // rdx unsigned long long v28; // rcx long long v29; // rbx long long v30; // rbp unsigned long long v31; // rax long long v32; // rbx unsigned long long v33; // rax long long v34; // rdx int *v35; // rsi long long v36; // rdi int v37; // eax _QWORD *v38; // rsi long long v39; // rdi int v40; // eax int v41; // eax char v43; // [rsp+0h] [rbp-78h] _DWORD *v44; // [rsp+20h] [rbp-58h] long long v45; // [rsp+28h] [rbp-50h] __m128 v46; // [rsp+28h] [rbp-50h] long long v47; // [rsp+38h] [rbp-40h] _DWORD *v48; // [rsp+40h] [rbp-38h] if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 18 ) { v17 = a2 + 48; } else { JS_ThrowTypeErrorInvalidClass(a1, 18, a4, a5, a6, a7, *(double *)a8.m128_u64, *(double *)a9.m128_u64, a10, a11); v17 = 0LL; } if ( !v17 ) { v25 = 0LL; LABEL_17: v28 = 0LL; return v28 | v25; } v18 = *a13; v19 = a13[1]; v20 = a13[2]; v21 = a13[3]; v45 = *a13; if ( (unsigned int)v19 == 0xFFFFFFFFLL && *(_WORD *)(v45 + 6) == 18 ) v22 = (_QWORD *)(v45 + 48); else v22 = 0LL; if ( !v22 ) { LODWORD(v44) = 0; if ( (_DWORD)v19 == 3 ) { v26 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*v26; v27 = -7LL; } else { v29 = a13[3]; v30 = v20; v31 = JS_ToStringInternal(a1, v18, v19, 0, v21, v20, a4, a5, a6, a7, a8, a9, a10, a11); v20 = v30; v21 = v29; v26 = (_DWORD *)v31; } v48 = v26; v32 = 3LL; if ( (_DWORD)v27 == 6 || (v47 = v27, v33 = js_compile_regexp(a1, (long long)v26, v27, v20, v21, v20, a4, a5, a6, a7, a8, a9, a10, a11), v32 = v34, v27 = v47, v44 = (_DWORD *)v33, (_DWORD)v32 == 6) ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v27); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v44, v32); v25 = 0LL; v28 = 0LL; return v28 | v25; } goto LABEL_22; } if ( (_DWORD)v21 != 3 ) { v25 = 0LL; JS_ThrowTypeError( a1, (long long)"flags must be undefined", v19, (long long)v22, v21, v20, a4, a5, a6, a7, a8, a9, a10, a11, v43); goto LABEL_17; } v23 = (_DWORD *)*v22; ++*v23; v48 = v23; v24 = (_DWORD *)v22[1]; ++*v24; v44 = v24; LABEL_22: v35 = *(int **)v17; v36 = *(_QWORD *)(a1 + 24); v37 = **(_DWORD **)v17; **(_DWORD **)v17 = v37 - 1; if ( v37 <= 1 ) js_free_value_rt(v36, v35, -7); v38 = *(_QWORD **)(v17 + 8); v39 = *(_QWORD *)(a1 + 24); v40 = (*(_DWORD *)v38)--; if ( v40 <= 1 ) js_free_value_rt(v39, v38, -7); *(_QWORD *)v17 = v48; *(_QWORD *)(v17 + 8) = v44; v46.m128_u64[0] = a2; v46.m128_u64[1] = a3; v25 = 0LL; v41 = JS_SetPropertyInternal2( a1, a2, a3, 0x56u, 0LL, 0LL, v46, a5, a6, a7, *(double *)a8.m128_u64, *(double *)a9.m128_u64, a10, a11, a2, a3, 0x4000u, 0LL); v28 = 0LL; if ( v41 >= 0 ) { if ( (unsigned int)a3 >= 0xFFFFFFF7 ) ++*(_DWORD *)a2; v28 = a2 & 0xFFFFFFFF00000000LL; v25 = (unsigned int)a2; } return v28 | v25; }
js_regexp_compile: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,R8 MOV R14,RDX MOV R15,RSI MOV R12,RDI MOV qword ptr [RSP + 0x28],RSI CMP R14D,-0x1 JNZ 0x00148d6b MOV R13,qword ptr [RSP + 0x28] CMP word ptr [R13 + 0x6],0x12 JNZ 0x00148d6b ADD R13,0x30 JMP 0x00148d7b LAB_00148d6b: MOV RDI,R12 MOV ESI,0x12 CALL 0x001275f0 XOR R13D,R13D LAB_00148d7b: MOV EBP,0x6 TEST R13,R13 JZ 0x00148dde MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV R9,qword ptr [RBX + 0x10] MOV R8,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x28],RSI MOV EAX,EDX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x00148db7 MOV RCX,qword ptr [RSP + 0x28] CMP word ptr [RCX + 0x6],0x12 JNZ 0x00148db7 ADD RCX,0x30 JMP 0x00148db9 LAB_00148db7: XOR ECX,ECX LAB_00148db9: TEST RCX,RCX JZ 0x00148de3 CMP R8D,0x3 JNZ 0x00148e0c MOV RAX,qword ptr [RCX] INC dword ptr [RAX] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RCX + 0x8] INC dword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX JMP 0x00148ea7 LAB_00148dde: XOR R13D,R13D JMP 0x00148e20 LAB_00148de3: MOV dword ptr [RSP + 0x20],0x0 CMP EAX,0x3 JNZ 0x00148e27 MOV RAX,qword ptr [R12 + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV RBP,qword ptr [RAX + 0x178] INC dword ptr [RBP] MOV RDX,-0x7 JMP 0x00148e40 LAB_00148e0c: LEA RSI,[0x19fbb3] XOR R13D,R13D MOV RDI,R12 XOR EAX,EAX CALL 0x00122567 LAB_00148e20: XOR ECX,ECX JMP 0x00148f6e LAB_00148e27: MOV RDI,R12 XOR ECX,ECX MOV RBX,R8 MOV RBP,R9 CALL 0x00127add MOV R9,RBP MOV R8,RBX MOV RBP,RAX LAB_00148e40: MOV qword ptr [RSP + 0x40],RBP MOV EBX,0x3 CMP EDX,0x6 JZ 0x00148e79 MOV RDI,R12 MOV RSI,RBP MOV qword ptr [RSP + 0x38],RDX MOV RDX,qword ptr [RSP + 0x38] MOV RCX,R9 CALL 0x00133562 MOV RBX,RDX MOV RDX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x20],RAX CMP EBX,0x6 JNZ 0x00148ea7 LAB_00148e79: MOV RDI,qword ptr [R12 + 0x18] MOV RSI,RBP CALL 0x0011d8c6 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [R12 + 0x18] MOV RDX,RBX CALL 0x0011d8c6 XOR R13D,R13D XOR ECX,ECX MOV EBP,0x6 JMP 0x00148f6e LAB_00148ea7: MOV RSI,qword ptr [R13] MOV RDI,qword ptr [R12 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00148ec8 MOV RDX,-0x7 CALL 0x00121266 LAB_00148ec8: MOV RSI,qword ptr [R13 + 0x8] MOV RDI,qword ptr [R12 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 MOV EBP,0x6 JG 0x00148eee MOV RDX,-0x7 CALL 0x00121266 LAB_00148eee: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [R13],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [R13 + 0x8],RAX MOV qword ptr [RSP + 0x28],R15 MOV qword ptr [RSP + 0x30],R14 MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x10],0x4000 XOR R13D,R13D MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 MOV ECX,0x56 XOR R8D,R8D XOR R9D,R9D CALL 0x00124388 MOV ECX,0x0 TEST EAX,EAX JS 0x00148f6e MOV qword ptr [RSP + 0x28],R15 CMP R14D,-0x9 JC 0x00148f5b MOV RAX,qword ptr [RSP + 0x28] INC dword ptr [RAX] LAB_00148f5b: MOV RCX,-0x100000000 AND RCX,R15 MOV R13D,R15D MOV RBP,R14 LAB_00148f6e: OR R13,RCX MOV RAX,R13 MOV RDX,RBP ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_regexp_compile(long param_1,int *param_2,int8 param_3,int8 param_4,long *param_5) { long lVar1; long lVar2; long lVar3; int *piVar4; int iVar5; int8 *puVar6; ulong uVar7; int8 uVar8; int *piVar9; ulong uVar10; uint uVar11; int1 auVar12 [16]; int1 auVar13 [16]; int1 auVar14 [16]; int *local_58; int4 local_50; int *local_38; uVar11 = (uint)param_3; if ((uVar11 == 0xffffffff) && (*(short *)((long)param_2 + 6) == 0x12)) { piVar9 = param_2 + 0xc; } else { JS_ThrowTypeErrorInvalidClass(param_1,0x12); piVar9 = (int *)0x0; } uVar8 = 6; if (piVar9 != (int *)0x0) { lVar1 = *param_5; uVar7 = param_5[1]; lVar2 = param_5[2]; lVar3 = param_5[3]; if (((uVar7 & 0xffffffff) == 0xffffffff) && (*(short *)(lVar1 + 6) == 0x12)) { puVar6 = (int8 *)(lVar1 + 0x30); } else { puVar6 = (int8 *)0x0; } if (puVar6 == (int8 *)0x0) { local_58 = (int *)((ulong)local_58 & 0xffffffff00000000); if ((int)uVar7 == 3) { piVar4 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar4 = *piVar4 + 1; auVar12._8_8_ = 0xfffffffffffffff9; auVar12._0_8_ = piVar4; } else { auVar12 = JS_ToStringInternal(param_1,lVar1,uVar7,0); } local_38 = auVar12._0_8_; auVar13._8_8_ = 3; auVar13._0_8_ = local_58; if (auVar12._8_4_ != 6) { auVar13 = js_compile_regexp(param_1,local_38,auVar12._8_8_,lVar2,lVar3); local_58 = auVar13._0_8_; if (auVar13._8_4_ != 6) goto LAB_00148ea7; } local_58 = auVar13._0_8_; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_38,auVar12._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,auVar13._8_8_); uVar10 = 0; uVar7 = 0; uVar8 = 6; goto LAB_00148f6e; } if ((int)lVar3 == 3) { local_38 = (int *)*puVar6; *local_38 = *local_38 + 1; local_58 = (int *)puVar6[1]; *local_58 = *local_58 + 1; LAB_00148ea7: piVar4 = *(int **)piVar9; uVar8 = *(int8 *)(param_1 + 0x18); iVar5 = *piVar4; *piVar4 = iVar5 + -1; if (iVar5 < 2) { js_free_value_rt(uVar8,piVar4,0xfffffffffffffff9); } piVar4 = *(int **)(piVar9 + 2); uVar8 = *(int8 *)(param_1 + 0x18); iVar5 = *piVar4; *piVar4 = iVar5 + -1; if (iVar5 < 2) { js_free_value_rt(uVar8,piVar4,0xfffffffffffffff9); } *(int **)piVar9 = local_38; *(int **)(piVar9 + 2) = local_58; local_50 = SUB84(param_2,0); uVar10 = 0; iVar5 = JS_SetPropertyInternal2(param_1,param_2,param_3,0x56,0,0,local_50,uVar11,0x4000,0); uVar7 = 0; uVar8 = 6; if (-1 < iVar5) { if (0xfffffff6 < uVar11) { *param_2 = *param_2 + 1; } uVar7 = (ulong)param_2 & 0xffffffff00000000; uVar10 = (ulong)param_2 & 0xffffffff; uVar8 = param_3; } goto LAB_00148f6e; } JS_ThrowTypeError(param_1,"flags must be int"); } uVar10 = 0; uVar7 = 0; LAB_00148f6e: auVar14._8_8_ = uVar8; auVar14._0_8_ = uVar10 | uVar7; return auVar14; }
21,973
js_regexp_compile
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_compile(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSRegExp *re1, *re; JSValue pattern1, flags1; JSValue bc, pattern; re = js_get_regexp(ctx, this_val, TRUE); if (!re) return JS_EXCEPTION; pattern1 = argv[0]; flags1 = argv[1]; re1 = js_get_regexp(ctx, pattern1, FALSE); if (re1) { if (!JS_IsUndefined(flags1)) return JS_ThrowTypeError(ctx, "flags must be undefined"); pattern = js_dup(JS_MKPTR(JS_TAG_STRING, re1->pattern)); bc = js_dup(JS_MKPTR(JS_TAG_STRING, re1->bytecode)); } else { bc = JS_UNDEFINED; if (JS_IsUndefined(pattern1)) pattern = JS_AtomToString(ctx, JS_ATOM_empty_string); else pattern = JS_ToString(ctx, pattern1); if (JS_IsException(pattern)) goto fail; bc = js_compile_regexp(ctx, pattern, flags1); if (JS_IsException(bc)) goto fail; } JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, re->pattern)); JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, re->bytecode)); re->pattern = JS_VALUE_GET_STRING(pattern); re->bytecode = JS_VALUE_GET_STRING(bc); if (JS_SetProperty(ctx, this_val, JS_ATOM_lastIndex, js_int32(0)) < 0) return JS_EXCEPTION; return js_dup(this_val); fail: JS_FreeValue(ctx, pattern); JS_FreeValue(ctx, bc); return JS_EXCEPTION; }
O2
c
js_regexp_compile: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r14 movq %rsi, %r15 movq %rdi, %r12 pushq $0x1 popq %rcx movq %rdx, 0x10(%rsp) callq 0x41310 pushq $0x6 popq %rbp testq %rax, %rax je 0x3ee4d movq %rax, %r13 movq 0x8(%r14), %rdx movq 0x10(%r14), %rcx movq 0x18(%r14), %rbx movl %edx, %eax cmpq $0x3, %rax je 0x3ee63 movq (%r14), %rsi cmpl $-0x1, %eax jne 0x3ee56 cmpw $0x12, 0x6(%rsi) jne 0x3ee56 cmpl $0x3, %ebx jne 0x3ef5c movq 0x30(%rsi), %rax movq %rax, 0x8(%rsp) incl (%rax) movq 0x38(%rsi), %rbx incl (%rbx) jmp 0x3eed2 xorl %ebx, %ebx xorl %ecx, %ecx jmp 0x3ef44 movq %rcx, %rbp movq %r12, %rdi callq 0x1b03c jmp 0x3ee71 movq %rcx, %rbp pushq $0x2f popq %rsi movq %r12, %rdi callq 0x1a990 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x3ee81 pushq $0x3 popq %rbp xorl %ebx, %ebx jmp 0x3eeaa movq %r12, %rdi movq %rax, 0x8(%rsp) movq %rax, %rsi movq %r14, %rdx movq %rbp, %rcx movq %rbx, %r8 callq 0x2cbbd movq %rax, %rbx movq %rdx, %rbp cmpl $0x6, %ebp jne 0x3eecf movq 0x8(%rsp), %rax movq %r12, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x1801e movq %r12, %rdi movq %rbx, %rsi movq %rbp, %rdx callq 0x1801e xorl %ebx, %ebx xorl %ecx, %ecx pushq $0x6 popq %rbp jmp 0x3ef44 pushq $0x6 popq %rbp movq (%r13), %rsi pushq $-0x7 popq %r14 movq %r12, %rdi movq %r14, %rdx callq 0x1801e movq 0x8(%r13), %rsi movq %r12, %rdi movq %r14, %rdx callq 0x1801e movq 0x8(%rsp), %rax movq %rax, (%r13) movq %rbx, 0x8(%r13) xorl %ebx, %ebx pushq $0x56 popq %rcx movq %r12, %rdi movq %r15, %rsi movq 0x10(%rsp), %r14 movq %r14, %rdx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1e446 movl $0x0, %ecx testl %eax, %eax js 0x3ef44 cmpl $-0x9, %r14d jb 0x3ef31 incl (%r15) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r15, %rcx movl %r15d, %ebx movq %r14, %rbp orq %rcx, %rbx movq %rbx, %rax movq %rbp, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x47ba0(%rip), %rsi # 0x86b03 xorl %ebx, %ebx movq %r12, %rdi xorl %eax, %eax callq 0x1c64d jmp 0x3ee4f
js_regexp_compile: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, r8 mov r15, rsi mov r12, rdi push 1 pop rcx mov [rsp+48h+var_38], rdx call js_get_regexp push 6 pop rbp test rax, rax jz short loc_3EE4D mov r13, rax mov rdx, [r14+8] mov rcx, [r14+10h] mov rbx, [r14+18h] mov eax, edx cmp rax, 3 jz short loc_3EE63 mov rsi, [r14] cmp eax, 0FFFFFFFFh jnz short loc_3EE56 cmp word ptr [rsi+6], 12h jnz short loc_3EE56 cmp ebx, 3 jnz loc_3EF5C mov rax, [rsi+30h] mov [rsp+48h+var_40], rax inc dword ptr [rax] mov rbx, [rsi+38h] inc dword ptr [rbx] jmp loc_3EED2 loc_3EE4D: xor ebx, ebx loc_3EE4F: xor ecx, ecx jmp loc_3EF44 loc_3EE56: mov rbp, rcx mov rdi, r12 call JS_ToString jmp short loc_3EE71 loc_3EE63: mov rbp, rcx push 2Fh ; '/' pop rsi mov rdi, r12 call JS_AtomToString loc_3EE71: mov r14, rdx cmp r14d, 6 jnz short loc_3EE81 push 3 pop rbp xor ebx, ebx jmp short loc_3EEAA loc_3EE81: mov rdi, r12 mov [rsp+48h+var_40], rax mov rsi, rax mov rdx, r14 mov rcx, rbp mov r8, rbx call js_compile_regexp mov rbx, rax mov rbp, rdx cmp ebp, 6 jnz short loc_3EECF mov rax, [rsp+48h+var_40] loc_3EEAA: mov rdi, r12 mov rsi, rax mov rdx, r14 call JS_FreeValue mov rdi, r12 mov rsi, rbx mov rdx, rbp call JS_FreeValue xor ebx, ebx xor ecx, ecx push 6 pop rbp jmp short loc_3EF44 loc_3EECF: push 6 pop rbp loc_3EED2: mov rsi, [r13+0] push 0FFFFFFFFFFFFFFF9h pop r14 mov rdi, r12 mov rdx, r14 call JS_FreeValue mov rsi, [r13+8] mov rdi, r12 mov rdx, r14 call JS_FreeValue mov rax, [rsp+48h+var_40] mov [r13+0], rax mov [r13+8], rbx xor ebx, ebx push 56h ; 'V' pop rcx mov rdi, r12 mov rsi, r15 mov r14, [rsp+48h+var_38] mov rdx, r14 xor r8d, r8d xor r9d, r9d call JS_SetProperty mov ecx, 0 test eax, eax js short loc_3EF44 cmp r14d, 0FFFFFFF7h jb short loc_3EF31 inc dword ptr [r15] loc_3EF31: mov rcx, 0FFFFFFFF00000000h and rcx, r15 mov ebx, r15d mov rbp, r14 loc_3EF44: or rbx, rcx mov rax, rbx mov rdx, rbp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3EF5C: lea rsi, aFlagsMustBeUnd; "flags must be undefined" xor ebx, ebx mov rdi, r12 xor eax, eax call JS_ThrowTypeError jmp loc_3EE4F
unsigned long long js_regexp_compile( long long a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long *a13) { long long regexp; // rax long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 long long *v20; // r13 long long v21; // rdx long long v22; // rbx long long v23; // rsi _DWORD *v24; // rbx long long v25; // rbx unsigned long long v26; // rcx long long v27; // rbp long long v28; // rax long long v29; // rdx double v30; // xmm4_8 double v31; // xmm5_8 long long v32; // r14 long long v33; // rbp long long v34; // rdx int v35; // eax char v37; // [rsp+0h] [rbp-48h] _DWORD *v38; // [rsp+8h] [rbp-40h] regexp = js_get_regexp(a1, a2, a3, 1LL); if ( !regexp ) { v25 = 0LL; goto LABEL_8; } v20 = (long long *)regexp; v21 = a13[1]; v22 = a13[3]; if ( (unsigned int)v21 == 3LL ) { v27 = a13[2]; v28 = JS_AtomToString(a1, 47); } else { v23 = *a13; if ( (_DWORD)v21 == -1 && *(_WORD *)(v23 + 6) == 18 ) { if ( (_DWORD)v22 == 3 ) { v38 = *(_DWORD **)(v23 + 48); ++*v38; v24 = *(_DWORD **)(v23 + 56); ++*v24; goto LABEL_16; } v25 = 0LL; JS_ThrowTypeError( a1, (long long)"flags must be undefined", v21, a13[2], v16, v17, a4, a5, a6, a7, v18, v19, a10, a11, v37); LABEL_8: v26 = 0LL; return v26 | v25; } v27 = a13[2]; v28 = JS_ToString(a1, v23, v21); } v32 = v29; if ( (_DWORD)v29 == 6 ) { v33 = 3LL; v24 = 0LL; LABEL_15: JS_FreeValue(a1, v28, v32); JS_FreeValue(a1, (long long)v24, v33); v25 = 0LL; v26 = 0LL; return v26 | v25; } v38 = (_DWORD *)v28; v24 = (_DWORD *)js_compile_regexp(a1, v28, v29, v27, v22, a4, a5, a6, a7, v30, v31, a10, a11); v33 = v34; if ( (_DWORD)v34 == 6 ) { v28 = (long long)v38; goto LABEL_15; } LABEL_16: JS_FreeValue(a1, *v20, -7LL); JS_FreeValue(a1, v20[1], -7LL); *v20 = (long long)v38; v20[1] = (long long)v24; v25 = 0LL; v35 = JS_SetProperty(a1, a2, a3, 86, 0, 0); v26 = 0LL; if ( v35 >= 0 ) { if ( (unsigned int)a3 >= 0xFFFFFFF7 ) ++*(_DWORD *)a2; v26 = a2 & 0xFFFFFFFF00000000LL; v25 = (unsigned int)a2; } return v26 | v25; }
js_regexp_compile: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,R8 MOV R15,RSI MOV R12,RDI PUSH 0x1 POP RCX MOV qword ptr [RSP + 0x10],RDX CALL 0x00141310 PUSH 0x6 POP RBP TEST RAX,RAX JZ 0x0013ee4d MOV R13,RAX MOV RDX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0x10] MOV RBX,qword ptr [R14 + 0x18] MOV EAX,EDX CMP RAX,0x3 JZ 0x0013ee63 MOV RSI,qword ptr [R14] CMP EAX,-0x1 JNZ 0x0013ee56 CMP word ptr [RSI + 0x6],0x12 JNZ 0x0013ee56 CMP EBX,0x3 JNZ 0x0013ef5c MOV RAX,qword ptr [RSI + 0x30] MOV qword ptr [RSP + 0x8],RAX INC dword ptr [RAX] MOV RBX,qword ptr [RSI + 0x38] INC dword ptr [RBX] JMP 0x0013eed2 LAB_0013ee4d: XOR EBX,EBX LAB_0013ee4f: XOR ECX,ECX JMP 0x0013ef44 LAB_0013ee56: MOV RBP,RCX MOV RDI,R12 CALL 0x0011b03c JMP 0x0013ee71 LAB_0013ee63: MOV RBP,RCX PUSH 0x2f POP RSI MOV RDI,R12 CALL 0x0011a990 LAB_0013ee71: MOV R14,RDX CMP R14D,0x6 JNZ 0x0013ee81 PUSH 0x3 POP RBP XOR EBX,EBX JMP 0x0013eeaa LAB_0013ee81: MOV RDI,R12 MOV qword ptr [RSP + 0x8],RAX MOV RSI,RAX MOV RDX,R14 MOV RCX,RBP MOV R8,RBX CALL 0x0012cbbd MOV RBX,RAX MOV RBP,RDX CMP EBP,0x6 JNZ 0x0013eecf MOV RAX,qword ptr [RSP + 0x8] LAB_0013eeaa: MOV RDI,R12 MOV RSI,RAX MOV RDX,R14 CALL 0x0011801e MOV RDI,R12 MOV RSI,RBX MOV RDX,RBP CALL 0x0011801e XOR EBX,EBX XOR ECX,ECX PUSH 0x6 POP RBP JMP 0x0013ef44 LAB_0013eecf: PUSH 0x6 POP RBP LAB_0013eed2: MOV RSI,qword ptr [R13] PUSH -0x7 POP R14 MOV RDI,R12 MOV RDX,R14 CALL 0x0011801e MOV RSI,qword ptr [R13 + 0x8] MOV RDI,R12 MOV RDX,R14 CALL 0x0011801e MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [R13],RAX MOV qword ptr [R13 + 0x8],RBX XOR EBX,EBX PUSH 0x56 POP RCX MOV RDI,R12 MOV RSI,R15 MOV R14,qword ptr [RSP + 0x10] MOV RDX,R14 XOR R8D,R8D XOR R9D,R9D CALL 0x0011e446 MOV ECX,0x0 TEST EAX,EAX JS 0x0013ef44 CMP R14D,-0x9 JC 0x0013ef31 INC dword ptr [R15] LAB_0013ef31: MOV RCX,-0x100000000 AND RCX,R15 MOV EBX,R15D MOV RBP,R14 LAB_0013ef44: OR RBX,RCX MOV RAX,RBX MOV RDX,RBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013ef5c: LEA RSI,[0x186b03] XOR EBX,EBX MOV RDI,R12 XOR EAX,EAX CALL 0x0011c64d JMP 0x0013ee4f
int1 [16] js_regexp_compile(int8 param_1,int *param_2,int8 param_3,int8 param_4, long *param_5) { long lVar1; long lVar2; long lVar3; int iVar4; int8 *puVar5; ulong uVar6; ulong uVar7; int *piVar8; int8 uVar9; int1 auVar10 [16]; int1 auVar11 [16]; int *local_40; puVar5 = (int8 *)js_get_regexp(); uVar9 = 6; if (puVar5 == (int8 *)0x0) { LAB_0013ee4f: uVar7 = 0; uVar6 = 0; goto LAB_0013ef44; } lVar1 = param_5[2]; lVar2 = param_5[3]; if ((param_5[1] & 0xffffffffU) == 3) { auVar10 = JS_AtomToString(param_1,0x2f); LAB_0013ee71: local_40 = auVar10._0_8_; if (auVar10._8_4_ == 6) { auVar11 = ZEXT816(3) << 0x40; } else { auVar11 = js_compile_regexp(param_1,local_40,auVar10._8_8_,lVar1,lVar2); piVar8 = auVar11._0_8_; if (auVar11._8_4_ != 6) goto LAB_0013eed2; } JS_FreeValue(param_1,local_40,auVar10._8_8_); JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_); uVar7 = 0; uVar6 = 0; uVar9 = 6; } else { lVar3 = *param_5; if (((int)param_5[1] != -1) || (*(short *)(lVar3 + 6) != 0x12)) { auVar10 = JS_ToString(param_1); goto LAB_0013ee71; } if ((int)lVar2 != 3) { JS_ThrowTypeError(param_1,"flags must be int"); goto LAB_0013ee4f; } local_40 = *(int **)(lVar3 + 0x30); *local_40 = *local_40 + 1; piVar8 = *(int **)(lVar3 + 0x38); *piVar8 = *piVar8 + 1; LAB_0013eed2: JS_FreeValue(param_1,*puVar5,0xfffffffffffffff9); JS_FreeValue(param_1,puVar5[1],0xfffffffffffffff9); *puVar5 = local_40; puVar5[1] = piVar8; uVar7 = 0; iVar4 = JS_SetProperty(param_1,param_2,param_3,0x56,0,0); uVar6 = 0; uVar9 = 6; if (-1 < iVar4) { if (0xfffffff6 < (uint)param_3) { *param_2 = *param_2 + 1; } uVar6 = (ulong)param_2 & 0xffffffff00000000; uVar7 = (ulong)param_2 & 0xffffffff; uVar9 = param_3; } } LAB_0013ef44: auVar10._8_8_ = uVar9; auVar10._0_8_ = uVar7 | uVar6; return auVar10; }
21,974
lre_is_cased
bluesky950520[P]quickjs/libunicode.c
BOOL lre_is_cased(uint32_t c) { uint32_t v, code, len; int idx, idx_min, idx_max; idx_min = 0; idx_max = countof(case_conv_table1) - 1; while (idx_min <= idx_max) { idx = (unsigned)(idx_max + idx_min) / 2; v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if (c < code) { idx_max = idx - 1; } else if (c >= code + len) { idx_min = idx + 1; } else { return TRUE; } } return lre_is_in_table(c, unicode_prop_Cased1_table, unicode_prop_Cased1_index, sizeof(unicode_prop_Cased1_index) / 3); }
O1
c
lre_is_cased: xorl %edx, %edx movl $0x179, %ecx # imm = 0x179 leaq 0xb32b(%rip), %rax # 0xa3840 leal (%rcx,%rdx), %esi shrl %esi movl (%rax,%rsi,4), %r8d movl %r8d, %r9d shrl $0xf, %r9d cmpl %edi, %r9d jbe 0x98530 decl %esi movl %esi, %ecx jmp 0x98544 shrl $0x8, %r8d andl $0x7f, %r8d addl %r9d, %r8d cmpl %edi, %r8d ja 0x9855d incl %esi movl %esi, %edx cmpl %ecx, %edx jle 0x98515 leaq 0xb8e1(%rip), %rsi # 0xa3e30 leaq 0xb9aa(%rip), %rdx # 0xa3f00 movl $0x6, %ecx jmp 0x98563 movl $0x1, %eax retq
lre_is_cased: xor edx, edx mov ecx, 179h lea rax, case_conv_table1 loc_98515: lea esi, [rcx+rdx] shr esi, 1 mov r8d, [rax+rsi*4] mov r9d, r8d shr r9d, 0Fh cmp r9d, edi jbe short loc_98530 dec esi mov ecx, esi jmp short loc_98544 loc_98530: shr r8d, 8 and r8d, 7Fh add r8d, r9d cmp r8d, edi ja short loc_9855D inc esi mov edx, esi loc_98544: cmp edx, ecx jle short loc_98515 lea rsi, unicode_prop_Cased1_table lea rdx, unicode_prop_Cased1_index mov ecx, 6 jmp short lre_is_in_table loc_9855D: mov eax, 1 retn
long long lre_is_cased(long long a1) { int v1; // edx int v2; // ecx long long v3; // rsi unsigned int v4; // r9d v1 = 0; v2 = 377; while ( 1 ) { v3 = (unsigned int)(v2 + v1) >> 1; v4 = case_conv_table1[v3] >> 15; if ( v4 <= (unsigned int)a1 ) break; v2 = v3 - 1; LABEL_6: if ( v1 > v2 ) return lre_is_in_table(a1, &unicode_prop_Cased1_table, &unicode_prop_Cased1_index, 6LL); } if ( v4 + ((case_conv_table1[v3] >> 8) & 0x7F) <= (unsigned int)a1 ) { v1 = v3 + 1; goto LABEL_6; } return 1LL; }
21,975
lre_is_cased
bluesky950520[P]quickjs/libunicode.c
BOOL lre_is_cased(uint32_t c) { uint32_t v, code, len; int idx, idx_min, idx_max; idx_min = 0; idx_max = countof(case_conv_table1) - 1; while (idx_min <= idx_max) { idx = (unsigned)(idx_max + idx_min) / 2; v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if (c < code) { idx_max = idx - 1; } else if (c >= code + len) { idx_min = idx + 1; } else { return TRUE; } } return lre_is_in_table(c, unicode_prop_Cased1_table, unicode_prop_Cased1_index, sizeof(unicode_prop_Cased1_index) / 3); }
O2
c
lre_is_cased: movl $0x179, %ecx # imm = 0x179 xorl %edx, %edx leaq 0xb477(%rip), %rax # 0x8a750 cmpl %ecx, %edx jg 0x7f30e leal (%rcx,%rdx), %esi shrl %esi movl (%rax,%rsi,4), %r8d movl %r8d, %r9d shrl $0xf, %r9d cmpl %edi, %r9d jbe 0x7f2f8 decl %esi movl %esi, %ecx jmp 0x7f2d9 shrl $0x8, %r8d andl $0x7f, %r8d addl %r9d, %r8d cmpl %edi, %r8d ja 0x7f321 incl %esi movl %esi, %edx jmp 0x7f2d9 leaq 0xba2b(%rip), %rsi # 0x8ad40 leaq 0xbaf4(%rip), %rdx # 0x8ae10 pushq $0x6 popq %rcx jmp 0x7f325 pushq $0x1 popq %rax retq
lre_is_cased: mov ecx, 179h xor edx, edx lea rax, case_conv_table1 loc_7F2D9: cmp edx, ecx jg short loc_7F30E lea esi, [rcx+rdx] shr esi, 1 mov r8d, [rax+rsi*4] mov r9d, r8d shr r9d, 0Fh cmp r9d, edi jbe short loc_7F2F8 dec esi mov ecx, esi jmp short loc_7F2D9 loc_7F2F8: shr r8d, 8 and r8d, 7Fh add r8d, r9d cmp r8d, edi ja short loc_7F321 inc esi mov edx, esi jmp short loc_7F2D9 loc_7F30E: lea rsi, unicode_prop_Cased1_table lea rdx, unicode_prop_Cased1_index push 6 pop rcx jmp short lre_is_in_table loc_7F321: push 1 pop rax retn
long long lre_is_cased(long long a1) { int v1; // ecx int i; // edx long long v3; // rsi unsigned int v4; // r9d v1 = 377; for ( i = 0; ; i = v3 + 1 ) { while ( 1 ) { if ( i > v1 ) return lre_is_in_table(a1, &unicode_prop_Cased1_table, &unicode_prop_Cased1_index, 6LL); v3 = (unsigned int)(v1 + i) >> 1; v4 = case_conv_table1[v3] >> 15; if ( v4 <= (unsigned int)a1 ) break; v1 = v3 - 1; } if ( v4 + ((case_conv_table1[v3] >> 8) & 0x7F) > (unsigned int)a1 ) break; } return 1LL; }
lre_is_cased: MOV ECX,0x179 XOR EDX,EDX LEA RAX,[0x18a750] LAB_0017f2d9: CMP EDX,ECX JG 0x0017f30e LEA ESI,[RCX + RDX*0x1] SHR ESI,0x1 MOV R8D,dword ptr [RAX + RSI*0x4] MOV R9D,R8D SHR R9D,0xf CMP R9D,EDI JBE 0x0017f2f8 DEC ESI MOV ECX,ESI JMP 0x0017f2d9 LAB_0017f2f8: SHR R8D,0x8 AND R8D,0x7f ADD R8D,R9D CMP R8D,EDI JA 0x0017f321 INC ESI MOV EDX,ESI JMP 0x0017f2d9 LAB_0017f30e: LEA RSI,[0x18ad40] LEA RDX,[0x18ae10] PUSH 0x6 POP RCX JMP 0x0017f325 LAB_0017f321: PUSH 0x1 POP RAX RET
int8 lre_is_cased(uint param_1) { int8 uVar1; uint uVar2; int iVar3; int iVar4; uint uVar5; iVar3 = 0x179; iVar4 = 0; while( true ) { while( true ) { if (iVar3 < iVar4) { uVar1 = lre_is_in_table(param_1,unicode_prop_Cased1_table,unicode_prop_Cased1_index,6); return uVar1; } uVar2 = (uint)(iVar3 + iVar4) >> 1; uVar5 = (uint)(&case_conv_table1)[uVar2] >> 0xf; if (uVar5 <= param_1) break; iVar3 = uVar2 - 1; } if (param_1 < ((uint)(&case_conv_table1)[uVar2] >> 8 & 0x7f) + uVar5) break; iVar4 = uVar2 + 1; } return 1; }
21,976
evmone::instr::core::dataload(evmone::StackTop, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline void dataload(StackTop stack, ExecutionState& state) noexcept { const auto data = state.analysis.baseline->eof_data(); auto& index = stack.top(); if (data.size() < index) index = 0; else { const auto begin = static_cast<size_t>(index); const auto end = std::min(begin + 32, data.size()); uint8_t d[32] = {}; for (size_t i = 0; i < (end - begin); ++i) d[i] = data[begin + i]; index = intx::be::unsafe::load<uint256>(d); } }
O2
cpp
evmone::instr::core::dataload(evmone::StackTop, evmone::ExecutionState&): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x1f8(%rsi), %rdi callq 0x3d044 movq %rax, %r15 movq %rdx, %r14 movq %rsp, %rdi movq %rax, (%rdi) movq %rbx, %rsi callq 0x3b654 testb %al, %al je 0x3cfe0 pxor %xmm0, %xmm0 movdqu %xmm0, 0x10(%rbx) movdqu %xmm0, (%rbx) jmp 0x3d039 movq (%rbx), %rcx leaq 0x20(%rcx), %rax cmpq %rax, %r15 cmovbq %r15, %rax xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) subq %rcx, %rax addq %rcx, %r14 xorl %ecx, %ecx cmpq %rcx, %rax je 0x3d013 movb (%r14,%rcx), %dl movb %dl, (%rsp,%rcx) incq %rcx jmp 0x3d002 movdqa 0x10(%rsp), %xmm0 movdqa 0x39d7f(%rip), %xmm1 # 0x76da0 pshufb %xmm1, %xmm0 movdqu %xmm0, (%rbx) movdqa (%rsp), %xmm0 pshufb %xmm1, %xmm0 movdqu %xmm0, 0x10(%rbx) addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN6evmone5instr4core8dataloadENS_8StackTopERNS_14ExecutionStateE: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi mov rdi, [rsi+1F8h]; this call _ZNK6evmone8baseline12CodeAnalysis8eof_dataEv; evmone::baseline::CodeAnalysis::eof_data(void) mov r15, rax mov r14, rdx mov rdi, rsp mov [rdi], rax mov rsi, rbx call _ZN4intxltILj256EmvEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,ulong,void>(ulong const&,intx::uint<256u> const&) test al, al jz short loc_3CFE0 pxor xmm0, xmm0 movdqu xmmword ptr [rbx+10h], xmm0 movdqu xmmword ptr [rbx], xmm0 jmp short loc_3D039 loc_3CFE0: mov rcx, [rbx] lea rax, [rcx+20h] cmp r15, rax cmovb rax, r15 xorps xmm0, xmm0 movaps [rsp+38h+var_28], xmm0 movaps [rsp+38h+var_38], xmm0 sub rax, rcx add r14, rcx xor ecx, ecx loc_3D002: cmp rax, rcx jz short loc_3D013 mov dl, [r14+rcx] mov byte ptr [rsp+rcx+38h+var_38], dl inc rcx jmp short loc_3D002 loc_3D013: movdqa xmm0, [rsp+38h+var_28] movdqa xmm1, cs:xmmword_76DA0 pshufb xmm0, xmm1 movdqu xmmword ptr [rbx], xmm0 movdqa xmm0, [rsp+38h+var_38] pshufb xmm0, xmm1 movdqu xmmword ptr [rbx+10h], xmm0 loc_3D039: add rsp, 20h pop rbx pop r14 pop r15 retn
char evmone::instr::core::dataload(long long a1, long long a2) { unsigned long long v2; // r15 long long v3; // rdx long long v4; // r14 unsigned long long v5; // rax unsigned long long v6; // rcx unsigned long long v7; // rax long long v8; // r14 long long i; // rcx __m128i si128; // xmm1 __m128i v12; // [rsp+0h] [rbp-38h] BYREF __m128i v13[2]; // [rsp+10h] [rbp-28h] BYREF v2 = evmone::baseline::CodeAnalysis::eof_data(*(evmone::baseline::CodeAnalysis **)(a2 + 504)); v4 = v3; v12.m128i_i64[0] = v2; LOBYTE(v5) = intx::operator<<256u,unsigned long,void>((unsigned long long *)&v12, (unsigned long long *)a1); if ( (_BYTE)v5 ) { *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; } else { v6 = *(_QWORD *)a1; v7 = *(_QWORD *)a1 + 32LL; if ( v2 < v7 ) v7 = v2; v13[0] = 0LL; v12 = 0LL; v5 = v7 - v6; v8 = v6 + v4; for ( i = 0LL; v5 != i; ++i ) v12.m128i_i8[i] = *(_BYTE *)(v8 + i); si128 = _mm_load_si128((const __m128i *)&xmmword_76DA0); *(__m128i *)a1 = _mm_shuffle_epi8(_mm_load_si128(v13), si128); *(__m128i *)(a1 + 16) = _mm_shuffle_epi8(_mm_load_si128(&v12), si128); } return v5; }
dataload: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RDI,qword ptr [RSI + 0x1f8] CALL 0x0013d044 MOV R15,RAX MOV R14,RDX MOV RDI,RSP MOV qword ptr [RDI],RAX MOV RSI,RBX CALL 0x0013b654 TEST AL,AL JZ 0x0013cfe0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RBX + 0x10],XMM0 MOVDQU xmmword ptr [RBX],XMM0 JMP 0x0013d039 LAB_0013cfe0: MOV RCX,qword ptr [RBX] LEA RAX,[RCX + 0x20] CMP R15,RAX CMOVC RAX,R15 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 SUB RAX,RCX ADD R14,RCX XOR ECX,ECX LAB_0013d002: CMP RAX,RCX JZ 0x0013d013 MOV DL,byte ptr [R14 + RCX*0x1] MOV byte ptr [RSP + RCX*0x1],DL INC RCX JMP 0x0013d002 LAB_0013d013: MOVDQA XMM0,xmmword ptr [RSP + 0x10] MOVDQA XMM1,xmmword ptr [0x00176da0] PSHUFB XMM0,XMM1 MOVDQU xmmword ptr [RBX],XMM0 MOVDQA XMM0,xmmword ptr [RSP] PSHUFB XMM0,XMM1 MOVDQU xmmword ptr [RBX + 0x10],XMM0 LAB_0013d039: ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* evmone::instr::core::dataload(evmone::StackTop, evmone::ExecutionState&) */ void evmone::instr::core::dataload(uint *param_1,long param_2) { long lVar1; int1 auVar2 [16]; bool bVar3; ulong uVar4; ulong uVar5; long lVar6; int1 extraout_DL; int7 extraout_var; int1 auVar7 [16]; int1 auVar8 [16]; ulong local_38; int8 uStack_30; int8 local_28; int8 uStack_20; uVar4 = baseline::CodeAnalysis::eof_data(*(CodeAnalysis **)(param_2 + 0x1f8)); local_38 = uVar4; bVar3 = intx::operator<(&local_38,param_1); auVar8 = _DAT_00176da0; if (bVar3) { *(int1 (*) [16])(param_1 + 0x10) = (int1 [16])0x0; *(int1 (*) [16])param_1 = (int1 [16])0x0; } else { lVar1 = *(long *)param_1; uVar5 = lVar1 + 0x20U; if (uVar4 < lVar1 + 0x20U) { uVar5 = uVar4; } local_28 = 0; uStack_20 = 0; local_38 = 0; uStack_30 = 0; for (lVar6 = 0; uVar5 - lVar1 != lVar6; lVar6 = lVar6 + 1) { *(int1 *)((long)&local_38 + lVar6) = *(int1 *)(CONCAT71(extraout_var,extraout_DL) + lVar1 + lVar6); } auVar2._8_8_ = uStack_20; auVar2._0_8_ = local_28; auVar7 = pshufb(auVar2,_DAT_00176da0); *(int1 (*) [16])param_1 = auVar7; auVar7._8_8_ = uStack_30; auVar7._0_8_ = local_38; auVar8 = pshufb(auVar7,auVar8); *(int1 (*) [16])(param_1 + 0x10) = auVar8; } return; }
21,977
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[]<char const>(char const*) const
monkey531[P]llama/common/json.hpp
const_reference operator[](T* key) const { return operator[](typename object_t::key_type(key)); }
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> 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>::operator[]<char const>(char const*) const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x256d6 movq %rbx, %rdi movq %r14, %rsi callq 0xcf8f2 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc979d movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc50 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc97c6 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc50 movq %rbx, %rdi callq 0x1e660
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&) mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C979D mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C979D: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C97C6 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C97C6: mov rdi, rbx 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[]<char const>( long long a1, long long a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2); v2 = 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[]( a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2; }
operator[]<char_const>: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x001256d6 LAB_001c9774: MOV RDI,RBX MOV RSI,R14 CALL 0x001cf8f2 LAB_001c977f: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001c979d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc50 LAB_001c979d: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> 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>::operator[]<char const>(char const*) const */ basic_json * __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[]<char_const> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,char *param_1) { basic_json *pbVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001c9774 to 001c977e has its CatchHandler @ 001c97a8 */ pbVar1 = (basic_json *)operator[](this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return pbVar1; }
21,978
dequantize_row_q5_K
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_q5_K(const block_q5_K * restrict x, float * restrict y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int i = 0; i < nb; i++) { const uint8_t * ql = x[i].qs; const uint8_t * qh = x[i].qh; const float d = GGML_FP16_TO_FP32(x[i].d); const float min = GGML_FP16_TO_FP32(x[i].dmin); int is = 0; uint8_t sc, m; uint8_t u1 = 1, u2 = 2; for (int j = 0; j < QK_K; j += 64) { get_scale_min_k4(is + 0, x[i].scales, &sc, &m); const float d1 = d * sc; const float m1 = min * m; get_scale_min_k4(is + 1, x[i].scales, &sc, &m); const float d2 = d * sc; const float m2 = min * m; for (int l = 0; l < 32; ++l) *y++ = d1 * ((ql[l] & 0xF) + (qh[l] & u1 ? 16 : 0)) - m1; for (int l = 0; l < 32; ++l) *y++ = d2 * ((ql[l] >> 4) + (qh[l] & u2 ? 16 : 0)) - m2; ql += 32; is += 2; u1 <<= 2; u2 <<= 2; } } }
O3
c
dequantize_row_q5_K: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, (%rsp) testb %dl, %dl jne 0x308bd sarq $0x8, %rdx testq %rdx, %rdx jle 0x308ae movq (%rsp), %rax addq $0x10, %rax xorl %edi, %edi movaps 0x1b98b(%rip), %xmm0 # 0x4c080 imulq $0xb0, %rdi, %r8 movq (%rsp), %rcx leaq (%rcx,%r8), %r9 leaq (%rcx,%r8), %r10 addq $0x30, %r10 movzwl -0x30(%r10), %r8d movq 0x3d890(%rip), %rcx # 0x6dfa8 movss (%rcx,%r8,4), %xmm1 movzwl -0x2e(%r10), %r8d movss (%rcx,%r8,4), %xmm2 xorps %xmm0, %xmm2 movb $0x1, %r11b movb $0x2, %bl xorl %r14d, %r14d xorl %r15d, %r15d cmpq $0x3, %r14 ja 0x30763 movb 0x4(%r9,%r14), %r13b movb 0x5(%r9,%r14), %r12b andb $0x3f, %r13b movb 0x8(%r9,%r14), %r8b andb $0x3f, %r8b andb $0x3f, %r12b movb 0x9(%r9,%r14), %bpl andb $0x3f, %bpl jmp 0x307c0 movb 0x8(%r9,%r14), %bpl movl %ebp, %r8d andb $0xf, %r8b movb (%r9,%r14), %r13b movb 0x1(%r9,%r14), %r12b shrb $0x2, %r13b andb $0x30, %r13b orb %r8b, %r13b shrb $0x4, %bpl movb 0x4(%r9,%r14), %r8b shrb $0x2, %r8b andb $0x30, %r8b orb %bpl, %r8b movb 0x9(%r9,%r14), %cl movl %ecx, %ebp andb $0xf, %bpl shrb $0x2, %r12b andb $0x30, %r12b orb %bpl, %r12b shrb $0x4, %cl movb 0x5(%r9,%r14), %bpl shrb $0x2, %bpl andb $0x30, %bpl orb %cl, %bpl movzbl %r13b, %ecx xorps %xmm4, %xmm4 cvtsi2ss %ecx, %xmm4 mulss %xmm1, %xmm4 movzbl %r8b, %ecx xorps %xmm5, %xmm5 cvtsi2ss %ecx, %xmm5 movzbl %r12b, %ecx cvtsi2ss %ecx, %xmm3 mulss %xmm1, %xmm3 mulss %xmm2, %xmm5 xorl %r8d, %r8d xorl %r12d, %r12d movzbl (%r10,%r12), %ecx andl $0xf, %ecx xorl %r13d, %r13d testb %r11b, (%rax,%r12) setne %r13b shll $0x4, %r13d orl %ecx, %r13d xorps %xmm6, %xmm6 cvtsi2ss %r13d, %xmm6 mulss %xmm4, %xmm6 addss %xmm5, %xmm6 movss %xmm6, (%rsi,%r12,4) incq %r12 addq $-0x4, %r8 cmpq $0x20, %r12 jne 0x307f0 movzbl %bpl, %ecx xorps %xmm4, %xmm4 cvtsi2ss %ecx, %xmm4 mulss %xmm2, %xmm4 subq %r8, %rsi xorl %r8d, %r8d movzbl (%r10,%r8), %ecx shrl $0x4, %ecx xorl %ebp, %ebp testb %bl, (%rax,%r8) setne %bpl shll $0x4, %ebp orl %ecx, %ebp xorps %xmm5, %xmm5 cvtsi2ss %ebp, %xmm5 mulss %xmm3, %xmm5 addss %xmm4, %xmm5 movss %xmm5, (%rsi) addq $0x4, %rsi incq %r8 cmpq $0x20, %r8 jne 0x30842 addq $0x20, %r10 addq $0x2, %r14 shlb $0x2, %r11b shlb $0x2, %bl leal 0x40(%r15), %ecx cmpl $0xc0, %r15d movl %ecx, %r15d jb 0x30737 incq %rdi addq $0xb0, %rax cmpq %rdx, %rdi jne 0x306f5 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2b818(%rip), %rdi # 0x5c0dc leaq 0x2b429(%rip), %rsi # 0x5bcf4 leaq 0x2ba49(%rip), %rcx # 0x5c31b movl $0x5cb, %edx # imm = 0x5CB callq 0x16b00
dequantize_row_q5_K: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], rdi test dl, dl jnz loc_308BD sar rdx, 8 test rdx, rdx jle loc_308AE mov rax, [rsp+38h+var_38] add rax, 10h xor edi, edi movaps xmm0, cs:xmmword_4C080 loc_306F5: imul r8, rdi, 0B0h mov rcx, [rsp+38h+var_38] lea r9, [rcx+r8] lea r10, [rcx+r8] add r10, 30h ; '0' movzx r8d, word ptr [r10-30h] mov rcx, cs:ggml_table_f32_f16_ptr movss xmm1, dword ptr [rcx+r8*4] movzx r8d, word ptr [r10-2Eh] movss xmm2, dword ptr [rcx+r8*4] xorps xmm2, xmm0 mov r11b, 1 mov bl, 2 xor r14d, r14d xor r15d, r15d loc_30737: cmp r14, 3 ja short loc_30763 mov r13b, [r9+r14+4] mov r12b, [r9+r14+5] and r13b, 3Fh mov r8b, [r9+r14+8] and r8b, 3Fh and r12b, 3Fh mov bpl, [r9+r14+9] and bpl, 3Fh jmp short loc_307C0 loc_30763: mov bpl, [r9+r14+8] mov r8d, ebp and r8b, 0Fh mov r13b, [r9+r14] mov r12b, [r9+r14+1] shr r13b, 2 and r13b, 30h or r13b, r8b shr bpl, 4 mov r8b, [r9+r14+4] shr r8b, 2 and r8b, 30h or r8b, bpl mov cl, [r9+r14+9] mov ebp, ecx and bpl, 0Fh shr r12b, 2 and r12b, 30h or r12b, bpl shr cl, 4 mov bpl, [r9+r14+5] shr bpl, 2 and bpl, 30h or bpl, cl loc_307C0: movzx ecx, r13b xorps xmm4, xmm4 cvtsi2ss xmm4, ecx mulss xmm4, xmm1 movzx ecx, r8b xorps xmm5, xmm5 cvtsi2ss xmm5, ecx movzx ecx, r12b cvtsi2ss xmm3, ecx mulss xmm3, xmm1 mulss xmm5, xmm2 xor r8d, r8d xor r12d, r12d loc_307F0: movzx ecx, byte ptr [r10+r12] and ecx, 0Fh xor r13d, r13d test [rax+r12], r11b setnz r13b shl r13d, 4 or r13d, ecx xorps xmm6, xmm6 cvtsi2ss xmm6, r13d mulss xmm6, xmm4 addss xmm6, xmm5 movss dword ptr [rsi+r12*4], xmm6 inc r12 add r8, 0FFFFFFFFFFFFFFFCh cmp r12, 20h ; ' ' jnz short loc_307F0 movzx ecx, bpl xorps xmm4, xmm4 cvtsi2ss xmm4, ecx mulss xmm4, xmm2 sub rsi, r8 xor r8d, r8d loc_30842: movzx ecx, byte ptr [r10+r8] shr ecx, 4 xor ebp, ebp test [rax+r8], bl setnz bpl shl ebp, 4 or ebp, ecx xorps xmm5, xmm5 cvtsi2ss xmm5, ebp mulss xmm5, xmm3 addss xmm5, xmm4 movss dword ptr [rsi], xmm5 add rsi, 4 inc r8 cmp r8, 20h ; ' ' jnz short loc_30842 add r10, 20h ; ' ' add r14, 2 shl r11b, 2 shl bl, 2 lea ecx, [r15+40h] cmp r15d, 0C0h mov r15d, ecx jb loc_30737 inc rdi add rax, 0B0h cmp rdi, rdx jnz loc_306F5 loc_308AE: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_308BD: lea rdi, aKQkK0; "k % QK_K == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidDequantize_7; "void dequantize_row_q5_K(const block_q5"... mov edx, 5CBh call ___assert_fail
void dequantize_row_q5_K(long long a1, float *a2, long long a3) { long long v3; // rdx long long v4; // rax long long i; // rdi unsigned __int16 *v6; // r9 unsigned __int16 *v7; // r10 float v8; // xmm1_4 float v9; // xmm2_4 char v10; // r11 char v11; // bl unsigned long long v12; // r14 unsigned int v13; // r15d unsigned __int8 v14; // r13 unsigned __int8 v15; // r8 unsigned __int8 v16; // r12 unsigned __int8 v17; // bp unsigned __int8 v18; // bp unsigned __int8 v19; // cl float v20; // xmm3_4 float v21; // xmm5_4 long long v22; // r8 long long j; // r12 long long k; // r8 bool v25; // cf if ( (_BYTE)a3 ) __assert_fail( "k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 1483LL, "void dequantize_row_q5_K(const block_q5_K *restrict, float *restrict, int64_t)"); v3 = a3 >> 8; if ( v3 > 0 ) { v4 = a1 + 16; for ( i = 0LL; i != v3; ++i ) { v6 = (unsigned __int16 *)(a1 + 176 * i); v7 = v6 + 24; v8 = ggml_table_f32_f16[*v6]; v9 = -ggml_table_f32_f16[v6[1]]; v10 = 1; v11 = 2; v12 = 0LL; v13 = 0; do { if ( v12 > 3 ) { v18 = v6[v12 / 2 + 4]; v14 = v18 & 0xF | (LOBYTE(v6[v12 / 2]) >> 2) & 0x30; v15 = (v18 >> 4) | (LOBYTE(v6[v12 / 2 + 2]) >> 2) & 0x30; v19 = HIBYTE(v6[v12 / 2 + 4]); v16 = v19 & 0xF | (HIBYTE(v6[v12 / 2]) >> 2) & 0x30; v17 = (v19 >> 4) | (HIBYTE(v6[v12 / 2 + 2]) >> 2) & 0x30; } else { v14 = v6[v12 / 2 + 2] & 0x3F; v15 = v6[v12 / 2 + 4] & 0x3F; v16 = HIBYTE(v6[v12 / 2 + 2]) & 0x3F; v17 = HIBYTE(v6[v12 / 2 + 4]) & 0x3F; } v20 = (float)v16 * v8; v21 = (float)v15 * v9; v22 = 0LL; for ( j = 0LL; j != 32; ++j ) { a2[j] = (float)((float)(*((_BYTE *)v7 + j) & 0xF | (16 * (((unsigned __int8)v10 & *(_BYTE *)(v4 + j)) != 0))) * (float)((float)v14 * v8)) + v21; v22 -= 4LL; } a2 = (float *)((char *)a2 - v22); for ( k = 0LL; k != 32; ++k ) *a2++ = (float)((float)((*((unsigned __int8 *)v7 + k) >> 4) | (16 * (((unsigned __int8)v11 & *(_BYTE *)(v4 + k)) != 0))) * v20) + (float)((float)v17 * v9); v7 += 16; v12 += 2LL; v10 *= 4; v11 *= 4; v25 = v13 < 0xC0; v13 += 64; } while ( v25 ); v4 += 176LL; } } }
dequantize_row_q5_K: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],RDI TEST DL,DL JNZ 0x001308bd SAR RDX,0x8 TEST RDX,RDX JLE 0x001308ae MOV RAX,qword ptr [RSP] ADD RAX,0x10 XOR EDI,EDI MOVAPS XMM0,xmmword ptr [0x0014c080] LAB_001306f5: IMUL R8,RDI,0xb0 MOV RCX,qword ptr [RSP] LEA R9,[RCX + R8*0x1] LEA R10,[RCX + R8*0x1] ADD R10,0x30 MOVZX R8D,word ptr [R10 + -0x30] MOV RCX,qword ptr [0x0016dfa8] MOVSS XMM1,dword ptr [RCX + R8*0x4] MOVZX R8D,word ptr [R10 + -0x2e] MOVSS XMM2,dword ptr [RCX + R8*0x4] XORPS XMM2,XMM0 MOV R11B,0x1 MOV BL,0x2 XOR R14D,R14D XOR R15D,R15D LAB_00130737: CMP R14,0x3 JA 0x00130763 MOV R13B,byte ptr [R9 + R14*0x1 + 0x4] MOV R12B,byte ptr [R9 + R14*0x1 + 0x5] AND R13B,0x3f MOV R8B,byte ptr [R9 + R14*0x1 + 0x8] AND R8B,0x3f AND R12B,0x3f MOV BPL,byte ptr [R9 + R14*0x1 + 0x9] AND BPL,0x3f JMP 0x001307c0 LAB_00130763: MOV BPL,byte ptr [R9 + R14*0x1 + 0x8] MOV R8D,EBP AND R8B,0xf MOV R13B,byte ptr [R9 + R14*0x1] MOV R12B,byte ptr [R9 + R14*0x1 + 0x1] SHR R13B,0x2 AND R13B,0x30 OR R13B,R8B SHR BPL,0x4 MOV R8B,byte ptr [R9 + R14*0x1 + 0x4] SHR R8B,0x2 AND R8B,0x30 OR R8B,BPL MOV CL,byte ptr [R9 + R14*0x1 + 0x9] MOV EBP,ECX AND BPL,0xf SHR R12B,0x2 AND R12B,0x30 OR R12B,BPL SHR CL,0x4 MOV BPL,byte ptr [R9 + R14*0x1 + 0x5] SHR BPL,0x2 AND BPL,0x30 OR BPL,CL LAB_001307c0: MOVZX ECX,R13B XORPS XMM4,XMM4 CVTSI2SS XMM4,ECX MULSS XMM4,XMM1 MOVZX ECX,R8B XORPS XMM5,XMM5 CVTSI2SS XMM5,ECX MOVZX ECX,R12B CVTSI2SS XMM3,ECX MULSS XMM3,XMM1 MULSS XMM5,XMM2 XOR R8D,R8D XOR R12D,R12D LAB_001307f0: MOVZX ECX,byte ptr [R10 + R12*0x1] AND ECX,0xf XOR R13D,R13D TEST byte ptr [RAX + R12*0x1],R11B SETNZ R13B SHL R13D,0x4 OR R13D,ECX XORPS XMM6,XMM6 CVTSI2SS XMM6,R13D MULSS XMM6,XMM4 ADDSS XMM6,XMM5 MOVSS dword ptr [RSI + R12*0x4],XMM6 INC R12 ADD R8,-0x4 CMP R12,0x20 JNZ 0x001307f0 MOVZX ECX,BPL XORPS XMM4,XMM4 CVTSI2SS XMM4,ECX MULSS XMM4,XMM2 SUB RSI,R8 XOR R8D,R8D LAB_00130842: MOVZX ECX,byte ptr [R10 + R8*0x1] SHR ECX,0x4 XOR EBP,EBP TEST byte ptr [RAX + R8*0x1],BL SETNZ BPL SHL EBP,0x4 OR EBP,ECX XORPS XMM5,XMM5 CVTSI2SS XMM5,EBP MULSS XMM5,XMM3 ADDSS XMM5,XMM4 MOVSS dword ptr [RSI],XMM5 ADD RSI,0x4 INC R8 CMP R8,0x20 JNZ 0x00130842 ADD R10,0x20 ADD R14,0x2 SHL R11B,0x2 SHL BL,0x2 LEA ECX,[R15 + 0x40] CMP R15D,0xc0 MOV R15D,ECX JC 0x00130737 INC RDI ADD RAX,0xb0 CMP RDI,RDX JNZ 0x001306f5 LAB_001308ae: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001308bd: LEA RDI,[0x15c0dc] LEA RSI,[0x15bcf4] LEA RCX,[0x15c31b] MOV EDX,0x5cb CALL 0x00116b00
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void dequantize_row_q5_K(long param_1,float *param_2,long param_3) { long lVar1; ushort *puVar2; float fVar3; uint uVar4; uint uVar5; long lVar6; byte bVar7; byte bVar8; long lVar9; byte bVar10; long lVar11; ushort *puVar12; byte bVar13; byte bVar14; long lVar15; byte bVar16; ulong uVar17; uint uVar18; bool bVar19; uVar5 = _DAT_0014c080; if ((char)param_3 == '\0') { if (0 < param_3 >> 8) { lVar6 = param_1 + 0x10; lVar9 = 0; do { lVar1 = param_1 + lVar9 * 0xb0; puVar2 = (ushort *)(param_1 + lVar9 * 0xb0); puVar12 = puVar2 + 0x18; fVar3 = *(float *)(PTR_ggml_table_f32_f16_0016dfa8 + (ulong)*puVar2 * 4); uVar4 = *(uint *)(PTR_ggml_table_f32_f16_0016dfa8 + (ulong)puVar2[1] * 4); bVar13 = 1; bVar7 = 2; uVar17 = 0; uVar18 = 0; do { if (uVar17 < 4) { bVar16 = *(byte *)(lVar1 + 4 + uVar17) & 0x3f; bVar10 = *(byte *)(lVar1 + 8 + uVar17) & 0x3f; bVar14 = *(byte *)(lVar1 + 5 + uVar17) & 0x3f; bVar8 = *(byte *)(lVar1 + 9 + uVar17) & 0x3f; } else { bVar8 = *(byte *)(lVar1 + 8 + uVar17); bVar16 = *(byte *)(lVar1 + uVar17) >> 2 & 0x30 | bVar8 & 0xf; bVar10 = *(byte *)(lVar1 + 4 + uVar17) >> 2 & 0x30 | bVar8 >> 4; bVar8 = *(byte *)(lVar1 + 9 + uVar17); bVar14 = *(byte *)(lVar1 + 1 + uVar17) >> 2 & 0x30 | bVar8 & 0xf; bVar8 = *(byte *)(lVar1 + 5 + uVar17) >> 2 & 0x30 | bVar8 >> 4; } lVar11 = 0; lVar15 = 0; do { param_2[lVar15] = (float)((uint)((*(byte *)(lVar6 + lVar15) & bVar13) != 0) << 4 | *(byte *)((long)puVar12 + lVar15) & 0xf) * (float)bVar16 * fVar3 + (float)bVar10 * (float)(uVar4 ^ uVar5); lVar15 = lVar15 + 1; lVar11 = lVar11 + -4; } while (lVar15 != 0x20); param_2 = (float *)((long)param_2 - lVar11); lVar11 = 0; do { *param_2 = (float)((uint)((*(byte *)(lVar6 + lVar11) & bVar7) != 0) << 4 | (uint)(*(byte *)((long)puVar12 + lVar11) >> 4)) * (float)bVar14 * fVar3 + (float)bVar8 * (float)(uVar4 ^ uVar5); param_2 = param_2 + 1; lVar11 = lVar11 + 1; } while (lVar11 != 0x20); puVar12 = puVar12 + 0x10; uVar17 = uVar17 + 2; bVar13 = bVar13 << 2; bVar7 = bVar7 << 2; bVar19 = uVar18 < 0xc0; uVar18 = uVar18 + 0x40; } while (bVar19); lVar9 = lVar9 + 1; lVar6 = lVar6 + 0xb0; } while (lVar9 != param_3 >> 8); } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x5cb, "void dequantize_row_q5_K(const block_q5_K *restrict, float *restrict, int64_t)"); }
21,979
LefDefParser::lefwViaForeignStr(char const*, double, double, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwViaForeignStr(const char *foreignName, double xl, // optional double yl, // optional const char *orient) { // optional lefwObsoleteNum = LEFW_VIAFOREIGN; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_VIA_START && lefwState != LEFW_VIA) return LEFW_BAD_ORDER; if (versionNum >= 5.6) return LEFW_OBSOLETE; if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " FOREIGN %s ", foreignName); if (xl || yl) { encPrint(lefwFile, (char*) "%.11g %.11g ", xl, yl); if (orient && *orient != '\0') encPrint(lefwFile, (char*) "%s ", orient); } else if (orient && *orient != '\0') { // assume user has 0 0 for pt encPrint(lefwFile, (char*) "%.11g %.11g ", xl, yl); encPrint(lefwFile, (char*) "%s ", orient); } encPrint(lefwFile, (char*) ";\n"); } else { fprintf(lefwFile, " FOREIGN %s ", foreignName); if (xl || yl) { fprintf(lefwFile, "%.11g %.11g ", xl, yl); if (orient && *orient != '\0') fprintf(lefwFile, "%s ", orient); } else if (orient && *orient != '\0') { // assume user has 0 0 for pt fprintf(lefwFile, "%.11g %.11g ", xl, yl); fprintf(lefwFile, "%s ", orient); } fprintf(lefwFile, ";\n"); } lefwLines++; lefwState = LEFW_VIA; return LEFW_OK; }
O3
cpp
LefDefParser::lefwViaForeignStr(char const*, double, double, char const*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rdx movl $0x49, 0x1676b(%rip) # 0x24d48 leaq 0x1681c(%rip), %r15 # 0x24e00 movq (%r15), %rdi testq %rdi, %rdi je 0xe696 movq %rsi, %rbx leaq 0x16a56(%rip), %r14 # 0x25050 movl (%r14), %ecx cmpl $0x48, %ecx je 0xe610 movl $0x2, %eax cmpl $0xf, %ecx jne 0xe78f movsd 0x16728(%rip), %xmm2 # 0x24d40 movl $0x7, %eax ucomisd 0xaae3(%rip), %xmm2 # 0x19108 jae 0xe78f xorpd %xmm2, %xmm2 movapd %xmm1, 0x10(%rsp) cmpneqpd %xmm2, %xmm1 movapd %xmm0, (%rsp) cmpneqpd %xmm0, %xmm2 orpd %xmm1, %xmm2 movd %xmm2, %ebp cmpb $0x1, 0x16a99(%rip) # 0x250ec jne 0xe6a0 leaq 0xd33b(%rip), %rsi # 0x1b997 xorl %eax, %eax callq 0x18c35 testb $0x1, %bpl je 0xe6e1 movq (%r15), %rdi leaq 0xd860(%rip), %rsi # 0x1bed3 movaps (%rsp), %xmm0 movaps 0x10(%rsp), %xmm1 movb $0x2, %al callq 0x18c35 testq %rbx, %rbx je 0xe719 cmpb $0x0, (%rbx) jne 0xe705 jmp 0xe719 movl $0x1, %eax jmp 0xe78f leaq 0xd2f0(%rip), %rsi # 0x1b997 xorl %eax, %eax callq 0x10f0 testb $0x1, %bpl je 0xe72c movq (%r15), %rdi leaq 0xd815(%rip), %rsi # 0x1bed3 movaps (%rsp), %xmm0 movaps 0x10(%rsp), %xmm1 movb $0x2, %al callq 0x10f0 testq %rbx, %rbx je 0xe764 cmpb $0x0, (%rbx) jne 0xe750 jmp 0xe764 testq %rbx, %rbx movaps 0x10(%rsp), %xmm1 movaps (%rsp), %xmm0 je 0xe719 cmpb $0x0, (%rbx) je 0xe719 movq (%r15), %rdi leaq 0xd7d5(%rip), %rsi # 0x1bed3 movb $0x2, %al callq 0x18c35 movq (%r15), %rdi leaq 0xc01c(%rip), %rsi # 0x1a72b movq %rbx, %rdx xorl %eax, %eax callq 0x18c35 movq (%r15), %rdi leaq 0xbaed(%rip), %rsi # 0x1a210 xorl %eax, %eax callq 0x18c35 jmp 0xe77d testq %rbx, %rbx movaps 0x10(%rsp), %xmm1 movaps (%rsp), %xmm0 je 0xe764 cmpb $0x0, (%rbx) je 0xe764 movq (%r15), %rdi leaq 0xd78a(%rip), %rsi # 0x1bed3 movb $0x2, %al callq 0x10f0 movq (%r15), %rdi leaq 0xbfd1(%rip), %rsi # 0x1a72b movq %rbx, %rdx xorl %eax, %eax callq 0x10f0 movq (%r15), %rcx leaq 0xbaa2(%rip), %rdi # 0x1a210 movl $0x2, %esi movl $0x1, %edx callq 0x1110 leaq 0x168c8(%rip), %rax # 0x2504c incl (%rax) movl $0x48, (%r14) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser17lefwViaForeignStrEPKcddS1_: push rbp push r15 push r14 push rbx sub rsp, 28h mov rdx, rdi mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 49h ; 'I'; LefDefParser::lefwObsoleteNum lea r15, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [r15] test rdi, rdi jz loc_E696 mov rbx, rsi lea r14, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [r14] cmp ecx, 48h ; 'H' jz short loc_E610 mov eax, 2 cmp ecx, 0Fh jnz loc_E78F loc_E610: movsd xmm2, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum mov eax, 7 ucomisd xmm2, cs:dbl_19108 jnb loc_E78F xorpd xmm2, xmm2 movapd [rsp+48h+var_38], xmm1 cmpneqpd xmm1, xmm2 movapd [rsp+48h+var_48], xmm0 cmpneqpd xmm2, xmm0 orpd xmm2, xmm1 movd ebp, xmm2 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_E6A0 lea rsi, aForeignS+3; " FOREIGN %s " xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) test bpl, 1 jz short loc_E6E1 mov rdi, [r15] lea rsi, a11g11g+0Bh; "%.11g %.11g " movaps xmm0, [rsp+48h+var_48] movaps xmm1, [rsp+48h+var_38] mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) test rbx, rbx jz loc_E719 cmp byte ptr [rbx], 0 jnz short loc_E705 jmp loc_E719 loc_E696: mov eax, 1 jmp loc_E78F loc_E6A0: lea rsi, aForeignS+3; " FOREIGN %s " xor eax, eax call _fprintf test bpl, 1 jz short loc_E72C mov rdi, [r15] lea rsi, a11g11g+0Bh; "%.11g %.11g " movaps xmm0, [rsp+48h+var_48] movaps xmm1, [rsp+48h+var_38] mov al, 2 call _fprintf test rbx, rbx jz loc_E764 cmp byte ptr [rbx], 0 jnz short loc_E750 jmp loc_E764 loc_E6E1: test rbx, rbx movaps xmm1, [rsp+48h+var_38] movaps xmm0, [rsp+48h+var_48] jz short loc_E719 cmp byte ptr [rbx], 0 jz short loc_E719 mov rdi, [r15] lea rsi, a11g11g+0Bh; "%.11g %.11g " mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) loc_E705: mov rdi, [r15] lea rsi, aS+6; "%s " mov rdx, rbx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) loc_E719: mov rdi, [r15] lea rsi, aDividercharS+11h; ";\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_E77D loc_E72C: test rbx, rbx movaps xmm1, [rsp+48h+var_38] movaps xmm0, [rsp+48h+var_48] jz short loc_E764 cmp byte ptr [rbx], 0 jz short loc_E764 mov rdi, [r15] lea rsi, a11g11g+0Bh; "%.11g %.11g " mov al, 2 call _fprintf loc_E750: mov rdi, [r15] lea rsi, aS+6; "%s " mov rdx, rbx xor eax, eax call _fprintf loc_E764: mov rcx, [r15] lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite loc_E77D: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [r14], 48h ; 'H' xor eax, eax loc_E78F: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn
long long LefDefParser::lefwViaForeignStr( LefDefParser *this, const char *a2, __m128d a3, __m128d a4, const char *a5, long long a6, int a7, int a8) { long long result; // rax char v9; // bp int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d double v14; // [rsp+0h] [rbp-48h] LefDefParser::lefwObsoleteNum = 73; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; if ( LefDefParser::lefwState == 72 || (result = 2LL, LefDefParser::lefwState == 15) ) { result = 7LL; if ( *(double *)&LefDefParser::versionNum < 5.6 ) { v14 = a3.m128d_f64[0]; v9 = _mm_cvtsi128_si32((__m128i)_mm_or_pd(_mm_cmpneq_pd((__m128d)0LL, a3), _mm_cmpneq_pd(a4, (__m128d)0LL))); if ( LefDefParser::lefwWriteEncrypt == 1 ) { LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" FOREIGN %s ", (_DWORD)this, LefDefParser::lefwState, a7, a8); if ( (v9 & 1) != 0 ) { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g %.11g ", v10, v11, v12, v13); if ( !a2 || !*a2 ) goto LABEL_19; } else { if ( !a2 || !*a2 ) goto LABEL_19; LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g %.11g ", v10, v11, v12, v13); } LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%s ", (_DWORD)a2, v11, v12, v13); LABEL_19: LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v10, v11, v12, v13); LABEL_25: ++LefDefParser::lefwLines; LefDefParser::lefwState = 72; return 0LL; } fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FOREIGN %s ", (const char *)this); if ( (v9 & 1) != 0 ) { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g %.11g ", v14, a4.m128d_f64[0]); if ( !a2 || !*a2 ) goto LABEL_24; } else { if ( !a2 || !*a2 ) goto LABEL_24; fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g %.11g ", v14, a4.m128d_f64[0]); } fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%s ", a2); LABEL_24: fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); goto LABEL_25; } } return result; }
lefwViaForeignStr: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RDX,RDI MOV dword ptr [0x00124d48],0x49 LEA R15,[0x124e00] MOV RDI,qword ptr [R15] TEST RDI,RDI JZ 0x0010e696 MOV RBX,RSI LEA R14,[0x125050] MOV ECX,dword ptr [R14] CMP ECX,0x48 JZ 0x0010e610 MOV EAX,0x2 CMP ECX,0xf JNZ 0x0010e78f LAB_0010e610: MOVSD XMM2,qword ptr [0x00124d40] MOV EAX,0x7 UCOMISD XMM2,qword ptr [0x00119108] JNC 0x0010e78f XORPD XMM2,XMM2 MOVAPD xmmword ptr [RSP + 0x10],XMM1 CMPNEQPD XMM1,XMM2 MOVAPD xmmword ptr [RSP],XMM0 CMPNEQPD XMM2,XMM0 ORPD XMM2,XMM1 MOVD EBP,XMM2 CMP byte ptr [0x001250ec],0x1 JNZ 0x0010e6a0 LEA RSI,[0x11b997] XOR EAX,EAX CALL 0x00118c35 TEST BPL,0x1 JZ 0x0010e6e1 MOV RDI,qword ptr [R15] LEA RSI,[0x11bed3] MOVAPS XMM0,xmmword ptr [RSP] MOVAPS XMM1,xmmword ptr [RSP + 0x10] MOV AL,0x2 CALL 0x00118c35 TEST RBX,RBX JZ 0x0010e719 CMP byte ptr [RBX],0x0 JNZ 0x0010e705 JMP 0x0010e719 LAB_0010e696: MOV EAX,0x1 JMP 0x0010e78f LAB_0010e6a0: LEA RSI,[0x11b997] XOR EAX,EAX CALL 0x001010f0 TEST BPL,0x1 JZ 0x0010e72c MOV RDI,qword ptr [R15] LEA RSI,[0x11bed3] MOVAPS XMM0,xmmword ptr [RSP] MOVAPS XMM1,xmmword ptr [RSP + 0x10] MOV AL,0x2 CALL 0x001010f0 TEST RBX,RBX JZ 0x0010e764 CMP byte ptr [RBX],0x0 JNZ 0x0010e750 JMP 0x0010e764 LAB_0010e6e1: TEST RBX,RBX MOVAPS XMM1,xmmword ptr [RSP + 0x10] MOVAPS XMM0,xmmword ptr [RSP] JZ 0x0010e719 CMP byte ptr [RBX],0x0 JZ 0x0010e719 MOV RDI,qword ptr [R15] LEA RSI,[0x11bed3] MOV AL,0x2 CALL 0x00118c35 LAB_0010e705: MOV RDI,qword ptr [R15] LEA RSI,[0x11a72b] MOV RDX,RBX XOR EAX,EAX CALL 0x00118c35 LAB_0010e719: MOV RDI,qword ptr [R15] LEA RSI,[0x11a210] XOR EAX,EAX CALL 0x00118c35 JMP 0x0010e77d LAB_0010e72c: TEST RBX,RBX MOVAPS XMM1,xmmword ptr [RSP + 0x10] MOVAPS XMM0,xmmword ptr [RSP] JZ 0x0010e764 CMP byte ptr [RBX],0x0 JZ 0x0010e764 MOV RDI,qword ptr [R15] LEA RSI,[0x11bed3] MOV AL,0x2 CALL 0x001010f0 LAB_0010e750: MOV RDI,qword ptr [R15] LEA RSI,[0x11a72b] MOV RDX,RBX XOR EAX,EAX CALL 0x001010f0 LAB_0010e764: MOV RCX,qword ptr [R15] LEA RDI,[0x11a210] MOV ESI,0x2 MOV EDX,0x1 CALL 0x00101110 LAB_0010e77d: LEA RAX,[0x12504c] INC dword ptr [RAX] MOV dword ptr [R14],0x48 XOR EAX,EAX LAB_0010e78f: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* LefDefParser::lefwViaForeignStr(char const*, double, double, char const*) */ int8 LefDefParser::lefwViaForeignStr(char *param_1,double param_2,double param_3,char *param_4) { int4 local_48; int4 local_38; lefwObsoleteNum = 0x49; if (lefwFile == (_IO_FILE *)0x0) { lefwObsoleteNum = 0x49; return 1; } if ((lefwState != 0x48) && (lefwState != 0xf)) { lefwObsoleteNum = 0x49; return 2; } if (DAT_00119108 <= versionNum) { lefwObsoleteNum = 0x49; return 7; } local_48 = SUB84(param_2,0); local_38 = SUB84(param_3,0); if (lefwWriteEncrypt != '\x01') { fprintf(lefwFile," FOREIGN %s ",param_1); if (param_2 == 0.0 && param_3 == 0.0) { if ((param_4 != (char *)0x0) && (*param_4 != '\0')) { fprintf(lefwFile,"%.11g %.11g ",local_48,local_38); goto LAB_0010e750; } } else { fprintf(lefwFile,"%.11g %.11g ",local_48,local_38); if ((param_4 != (char *)0x0) && (*param_4 != '\0')) { LAB_0010e750: fprintf(lefwFile,"%s ",param_4); } } fwrite(";\n",2,1,lefwFile); goto LAB_0010e77d; } encPrint(lefwFile," FOREIGN %s "); if (param_2 == 0.0 && param_3 == 0.0) { if ((param_4 != (char *)0x0) && (*param_4 != '\0')) { encPrint(lefwFile,"%.11g %.11g ",local_48,local_38); goto LAB_0010e705; } } else { local_48 = encPrint(lefwFile,"%.11g %.11g ",local_48,local_38); if ((param_4 != (char *)0x0) && (*param_4 != '\0')) { LAB_0010e705: local_48 = encPrint(lefwFile,"%s ",param_4); } } encPrint(lefwFile,";\n",local_48); LAB_0010e77d: lefwState = 0x48; lefwLines = lefwLines + 1; return 0; }
21,980
google::protobuf::compiler::objectivec::HandleExtremeFloatingPoint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
static std::string HandleExtremeFloatingPoint(std::string val, bool add_float_suffix) { if (val == "nan") { return "NAN"; } else if (val == "inf") { return "INFINITY"; } else if (val == "-inf") { return "-INFINITY"; } else { // float strings with ., e or E need to have f appended if (add_float_suffix && (val.find(".") != std::string::npos || val.find("e") != std::string::npos || val.find("E") != std::string::npos)) { val += "f"; } return val; } }
O3
cpp
google::protobuf::compiler::objectivec::HandleExtremeFloatingPoint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool): pushq %rbp pushq %r14 pushq %rbx movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x1568d5(%rip), %rsi # 0x1a402c movq %r14, %rdi callq 0x1f130 testl %eax, %eax je 0x4d81c leaq 0x1568c7(%rip), %rsi # 0x1a4035 movq %r14, %rdi callq 0x1f130 testl %eax, %eax je 0x4d833 leaq 0x1568af(%rip), %rsi # 0x1a4034 movq %r14, %rdi callq 0x1f130 testl %eax, %eax je 0x4d84a testb %bpl, %bpl je 0x4d7fd leaq 0x1a2bde(%rip), %rsi # 0x1f037f movl $0x1, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x1f840 cmpq $-0x1, %rax jne 0x4d7ee leaq 0x15879b(%rip), %rsi # 0x1a5f58 movl $0x1, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x1f840 cmpq $-0x1, %rax jne 0x4d7ee leaq 0x1a8f5f(%rip), %rsi # 0x1f6738 movl $0x1, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x1f840 cmpq $-0x1, %rax je 0x4d7fd leaq 0x1a0f8d(%rip), %rsi # 0x1ee782 movq %r14, %rdi callq 0x1f8e0 leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq (%r14), %rdx leaq 0x10(%r14), %rax cmpq %rax, %rdx je 0x4d86b movq %rdx, (%rbx) movq (%rax), %rcx movq %rcx, 0x10(%rbx) jmp 0x4d871 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x156806(%rip), %rsi # 0x1a4030 leaq 0x156802(%rip), %rdx # 0x1a4033 jmp 0x4d85f leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x1567f9(%rip), %rsi # 0x1a403a leaq 0x1567fa(%rip), %rdx # 0x1a4042 jmp 0x4d85f leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x1567e1(%rip), %rsi # 0x1a4039 leaq 0x1567e3(%rip), %rdx # 0x1a4042 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x250b2 movups (%rax), %xmm0 movups %xmm0, (%rcx) movq 0x8(%r14), %rcx movq %rcx, 0x8(%rbx) movq %rax, (%r14) movq $0x0, 0x8(%r14) movb $0x0, 0x10(%r14) popq %rbx popq %r14 popq %rbp retq
_ZN6google8protobuf8compiler10objectivecL26HandleExtremeFloatingPointENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: push rbp push r14 push rbx mov ebp, edx mov r14, rsi mov rbx, rdi lea rsi, aNan; "nan" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_4D81C lea rsi, aInf+1; "inf" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_4D833 lea rsi, aInf; "-inf" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_4D84A test bpl, bpl jz short loc_4D7FD lea rsi, aWhichIsNotDefi+77h; "." mov ecx, 1 mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_4D7EE lea rsi, aInterface+8; "e" mov ecx, 1 mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_4D7EE lea rsi, aReachedAnUnint+2Bh; "E" mov ecx, 1 mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_4D7FD loc_4D7EE: lea rsi, a1f+3; "f" mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_4D7FD: lea rcx, [rbx+10h] mov [rbx], rcx mov rdx, [r14] lea rax, [r14+10h] cmp rdx, rax jz short loc_4D86B mov [rbx], rdx mov rcx, [rax] mov [rbx+10h], rcx jmp short loc_4D871 loc_4D81C: lea rax, [rbx+10h] mov [rbx], rax lea rsi, aNan_0; "NAN" lea rdx, aNan_0+3; "" jmp short loc_4D85F loc_4D833: lea rax, [rbx+10h] mov [rbx], rax lea rsi, aInfinity+1; "INFINITY" lea rdx, aInfinity+9; "" jmp short loc_4D85F loc_4D84A: lea rax, [rbx+10h] mov [rbx], rax lea rsi, aInfinity; "-INFINITY" lea rdx, aInfinity+9; "" loc_4D85F: mov rdi, rbx pop rbx pop r14 pop rbp jmp _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_4D86B: movups xmm0, xmmword ptr [rax] movups xmmword ptr [rcx], xmm0 loc_4D871: mov rcx, [r14+8] mov [rbx+8], rcx mov [r14], rax mov qword ptr [r14+8], 0 mov byte ptr [r14+10h], 0 pop rbx pop r14 pop rbp retn
_OWORD * google::protobuf::compiler::objectivec::HandleExtremeFloatingPoint(long long a1, long long a2, char a3) { _OWORD *result; // rax char *v5; // rsi char *v6; // rdx if ( !(unsigned int)std::string::compare(a2, "nan") ) { *(_QWORD *)a1 = a1 + 16; v5 = "NAN"; v6 = ""; return (_OWORD *)std::string::_M_construct<char const*>(a1, v5, (long long)v6); } if ( !(unsigned int)std::string::compare(a2, "inf") ) { *(_QWORD *)a1 = a1 + 16; v5 = "INFINITY"; v6 = ""; return (_OWORD *)std::string::_M_construct<char const*>(a1, v5, (long long)v6); } if ( !(unsigned int)std::string::compare(a2, "-inf") ) { *(_QWORD *)a1 = a1 + 16; v5 = "-INFINITY"; v6 = ""; return (_OWORD *)std::string::_M_construct<char const*>(a1, v5, (long long)v6); } if ( a3 && (std::string::find(a2, ".", 0LL, 1LL) != -1 || std::string::find(a2, "e", 0LL, 1LL) != -1 || std::string::find(a2, "E", 0LL, 1LL) != -1) ) { std::string::append(a2, "f"); } *(_QWORD *)a1 = a1 + 16; result = (_OWORD *)(a2 + 16); if ( *(_QWORD *)a2 == a2 + 16 ) { *(_OWORD *)(a1 + 16) = *result; } else { *(_QWORD *)a1 = *(_QWORD *)a2; *(_QWORD *)(a1 + 16) = *(_QWORD *)result; } *(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8); *(_QWORD *)a2 = result; *(_QWORD *)(a2 + 8) = 0LL; *(_BYTE *)(a2 + 16) = 0; return result; }
HandleExtremeFloatingPoint: PUSH RBP PUSH R14 PUSH RBX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA RSI,[0x2a402c] MOV RDI,R14 CALL 0x0011f130 TEST EAX,EAX JZ 0x0014d81c LEA RSI,[0x2a4035] MOV RDI,R14 CALL 0x0011f130 TEST EAX,EAX JZ 0x0014d833 LEA RSI,[0x2a4034] MOV RDI,R14 CALL 0x0011f130 TEST EAX,EAX JZ 0x0014d84a TEST BPL,BPL JZ 0x0014d7fd LEA RSI,[0x2f037f] MOV ECX,0x1 MOV RDI,R14 XOR EDX,EDX CALL 0x0011f840 CMP RAX,-0x1 JNZ 0x0014d7ee LEA RSI,[0x2a5f58] MOV ECX,0x1 MOV RDI,R14 XOR EDX,EDX CALL 0x0011f840 CMP RAX,-0x1 JNZ 0x0014d7ee LEA RSI,[0x2f6738] MOV ECX,0x1 MOV RDI,R14 XOR EDX,EDX CALL 0x0011f840 CMP RAX,-0x1 JZ 0x0014d7fd LAB_0014d7ee: LEA RSI,[0x2ee782] MOV RDI,R14 CALL 0x0011f8e0 LAB_0014d7fd: LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RDX,qword ptr [R14] LEA RAX,[R14 + 0x10] CMP RDX,RAX JZ 0x0014d86b MOV qword ptr [RBX],RDX MOV RCX,qword ptr [RAX] MOV qword ptr [RBX + 0x10],RCX JMP 0x0014d871 LAB_0014d81c: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2a4030] LEA RDX,[0x2a4033] JMP 0x0014d85f LAB_0014d833: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2a403a] LEA RDX,[0x2a4042] JMP 0x0014d85f LAB_0014d84a: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2a4039] LEA RDX,[0x2a4042] LAB_0014d85f: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001250b2 LAB_0014d86b: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RCX],XMM0 LAB_0014d871: MOV RCX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x8],0x0 MOV byte ptr [R14 + 0x10],0x0 POP RBX POP R14 POP RBP RET
/* google::protobuf::compiler::objectivec::HandleExtremeFloatingPoint(std::__cxx11::string, bool) */ void __thiscall google::protobuf::compiler::objectivec::HandleExtremeFloatingPoint (objectivec *this,long *param_2,char param_3) { long *plVar1; int iVar2; long lVar3; char *pcVar4; char *pcVar5; iVar2 = std::__cxx11::string::compare((char *)param_2); if (iVar2 == 0) { *(objectivec **)this = this + 0x10; pcVar5 = "NAN"; pcVar4 = ""; } else { iVar2 = std::__cxx11::string::compare((char *)param_2); if (iVar2 == 0) { *(objectivec **)this = this + 0x10; pcVar5 = "INFINITY"; pcVar4 = ""; } else { iVar2 = std::__cxx11::string::compare((char *)param_2); if (iVar2 != 0) { if (param_3 != '\0') { lVar3 = std::__cxx11::string::find((char *)param_2,0x2f037f,0); if (lVar3 == -1) { lVar3 = std::__cxx11::string::find((char *)param_2,0x2a5f58,0); if (lVar3 == -1) { lVar3 = std::__cxx11::string::find((char *)param_2,0x2f6738,0); if (lVar3 == -1) goto LAB_0014d7fd; } } std::__cxx11::string::append((char *)param_2); } LAB_0014d7fd: *(objectivec **)this = this + 0x10; plVar1 = param_2 + 2; if ((long *)*param_2 == plVar1) { lVar3 = param_2[3]; *(long *)(this + 0x10) = *plVar1; *(long *)(this + 0x18) = lVar3; } else { *(long *)this = *param_2; *(long *)(this + 0x10) = *plVar1; } *(long *)(this + 8) = param_2[1]; *param_2 = (long)plVar1; param_2[1] = 0; *(int1 *)(param_2 + 2) = 0; return; } *(objectivec **)this = this + 0x10; pcVar5 = "-INFINITY"; pcVar4 = ""; } } std::__cxx11::string::_M_construct<char_const*>(this,pcVar5,pcVar4); return; }
21,981
POINTonE1_in_G1
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/map_to_g1.c
static bool_t POINTonE1_in_G1(const POINTonE1 *P) { POINTonE1 t0, t1; /* Scott, M., https://eprint.iacr.org/2021/1130 */ POINTonE1_times_minus_z(&t0, P); POINTonE1_times_minus_z(&t1, &t0); POINTonE1_cneg(&t1, 1); /* [-z²]P */ sigma(&t0, P); /* σ(P) */ sigma(&t0, &t0); /* σ²(P) */ return POINTonE1_is_equal(&t0, &t1); }
O0
c
POINTonE1_in_G1: pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rsi leaq -0x98(%rbp), %rdi callq 0xb9030 leaq -0x128(%rbp), %rdi leaq -0x98(%rbp), %rsi callq 0xb9030 leaq -0x128(%rbp), %rdi movl $0x1, %esi callq 0xa7210 movq -0x8(%rbp), %rsi leaq -0x98(%rbp), %rdi callq 0xba0d0 leaq -0x98(%rbp), %rsi movq %rsi, %rdi callq 0xba0d0 leaq -0x98(%rbp), %rdi leaq -0x128(%rbp), %rsi callq 0xa90d0 addq $0x130, %rsp # imm = 0x130 popq %rbp retq nop
POINTonE1_in_G1: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_8], rdi mov rsi, [rbp+var_8] lea rdi, [rbp+var_98] call POINTonE1_times_minus_z lea rdi, [rbp+var_128] lea rsi, [rbp+var_98] call POINTonE1_times_minus_z lea rdi, [rbp+var_128] mov esi, 1 call POINTonE1_cneg mov rsi, [rbp+var_8] lea rdi, [rbp+var_98] call sigma lea rsi, [rbp+var_98] mov rdi, rsi call sigma lea rdi, [rbp+var_98] lea rsi, [rbp+var_128] call POINTonE1_is_equal add rsp, 130h pop rbp retn
long long POINTonE1_in_G1(long long a1) { _BYTE v2[144]; // [rsp+8h] [rbp-128h] BYREF _BYTE v3[144]; // [rsp+98h] [rbp-98h] BYREF long long v4; // [rsp+128h] [rbp-8h] v4 = a1; POINTonE1_times_minus_z(v3, a1); POINTonE1_times_minus_z(v2, v3); POINTonE1_cneg((long long)v2, 1LL); sigma(v3, v4); sigma(v3, v3); return POINTonE1_is_equal((long long)v3, (long long)v2); }
POINTonE1_in_G1: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV qword ptr [RBP + -0x8],RDI MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[RBP + -0x98] CALL 0x001b9030 LEA RDI,[RBP + -0x128] LEA RSI,[RBP + -0x98] CALL 0x001b9030 LEA RDI,[RBP + -0x128] MOV ESI,0x1 CALL 0x001a7210 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[RBP + -0x98] CALL 0x001ba0d0 LEA RSI,[RBP + -0x98] MOV RDI,RSI CALL 0x001ba0d0 LEA RDI,[RBP + -0x98] LEA RSI,[RBP + -0x128] CALL 0x001a90d0 ADD RSP,0x130 POP RBP RET
void POINTonE1_in_G1(int8 param_1) { int1 local_130 [144]; int1 local_a0 [144]; int8 local_10; local_10 = param_1; POINTonE1_times_minus_z(local_a0,param_1); POINTonE1_times_minus_z(local_130,local_a0); POINTonE1_cneg(local_130,1); sigma(local_a0,local_10); sigma(local_a0); POINTonE1_is_equal(local_a0,local_130); return; }
21,982
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>>>>>::reset()
monkey531[P]llama/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
O2
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>>>>>::reset(): pushq %rax movq %rdi, %rax andq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x3f5c6 movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x3f43c popq %rax retq movq %rax, %rdi callq 0x27ef3 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi and qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_3F5C6 mov [rax+40h], rcx loc_3F5C6: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> 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>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI AND qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x0013f5c6 MOV qword ptr [RAX + 0x40],RCX LAB_0013f5c6: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_0013f5d0: CALL 0x0013f43c POP RAX 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 > > >::reset() */ int8 __thiscall 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>>> ::reset(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>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 0013f5d0 to 0013f5d4 has its CatchHandler @ 0013f5d7 */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
21,983
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>>>>>::reset()
monkey531[P]llama/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
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>>>>>::reset(): pushq %rax movq %rdi, %rax movq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x5a143 movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x59ff8 popq %rax retq movq %rax, %rdi callq 0x22203
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi mov qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_5A143 mov [rax+40h], rcx loc_5A143: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> 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>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI MOV qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x0015a143 MOV qword ptr [RAX + 0x40],RCX LAB_0015a143: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_0015a14d: CALL 0x00159ff8 POP RAX 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 > > >::reset() */ int8 __thiscall 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>>> ::reset(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>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 0015a14d to 0015a151 has its CatchHandler @ 0015a154 */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
21,984
translog_get_LSN_from_diff
eloqsql/storage/maria/ma_loghandler.c
static uchar *translog_get_LSN_from_diff(LSN base_lsn, uchar *src, uchar *dst) { LSN lsn; uint32 diff; uint32 first_byte; uint32 file_no, rec_offset; uint8 code; DBUG_ENTER("translog_get_LSN_from_diff"); DBUG_PRINT("enter", ("Base: " LSN_FMT " src:%p dst %p", LSN_IN_PARTS(base_lsn), src, dst)); first_byte= *((uint8*) src); code= first_byte >> 6; /* Length is in 2 most significant bits */ first_byte&= 0x3F; src++; /* Skip length + encode */ file_no= LSN_FILE_NO(base_lsn); /* Assume relative */ DBUG_PRINT("info", ("code: %u first byte: %lu", (uint) code, (ulong) first_byte)); switch (code) { case 0: if (first_byte == 0 && *((uint8*)src) == 1) { /* It is full LSN after special 1 diff (which is impossible in real life) */ memcpy(dst, src + 1, LSN_STORE_SIZE); DBUG_PRINT("info", ("Special case of full LSN, new src:%p", src + 1 + LSN_STORE_SIZE)); DBUG_RETURN(src + 1 + LSN_STORE_SIZE); } rec_offset= LSN_OFFSET(base_lsn) - ((first_byte << 8) | *((uint8*)src)); break; case 1: diff= uint2korr(src); rec_offset= LSN_OFFSET(base_lsn) - ((first_byte << 16) | diff); break; case 2: diff= uint3korr(src); rec_offset= LSN_OFFSET(base_lsn) - ((first_byte << 24) | diff); break; case 3: { ulonglong base_offset= LSN_OFFSET(base_lsn); diff= uint4korr(src); if (diff > LSN_OFFSET(base_lsn)) { /* take 1 from file offset */ first_byte++; base_offset+= 0x100000000LL; } file_no= LSN_FILE_NO(base_lsn) - first_byte; DBUG_ASSERT(base_offset - diff <= UINT_MAX); rec_offset= (uint32)(base_offset - diff); break; } default: DBUG_ASSERT(0); DBUG_RETURN(NULL); } lsn= MAKE_LSN(file_no, rec_offset); src+= code + 1; lsn_store(dst, lsn); DBUG_PRINT("info", ("new src:%p", src)); DBUG_RETURN(src); }
O0
c
translog_get_LSN_from_diff: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x96782 movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax shrl $0x6, %eax movb %al, -0x39(%rbp) movl -0x30(%rbp), %eax andl $0x3f, %eax movl %eax, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax sarq $0x20, %rax movl %eax, -0x34(%rbp) jmp 0x967b7 movzbl -0x39(%rbp), %eax movq %rax, -0x58(%rbp) subq $0x3, %rax ja 0x9692b movq -0x58(%rbp), %rax leaq 0xcee74(%rip), %rcx # 0x165648 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax cmpl $0x0, -0x30(%rbp) jne 0x96823 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0x1, %eax jne 0x96823 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x1(%rcx), %edx movl %edx, (%rax) movw 0x5(%rcx), %dx movw %dx, 0x4(%rax) movb 0x7(%rcx), %cl movb %cl, 0x6(%rax) jmp 0x9680c jmp 0x9680e movq -0x18(%rbp), %rax addq $0x1, %rax addq $0x7, %rax movq %rax, -0x8(%rbp) jmp 0x969d2 movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movl -0x30(%rbp), %ecx shll $0x8, %ecx movq -0x18(%rbp), %rdx movzbl (%rdx), %edx orl %edx, %ecx movl %ecx, %ecx subq %rcx, %rax movl %eax, -0x38(%rbp) jmp 0x9693e movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x2c(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movl -0x30(%rbp), %ecx shll $0x10, %ecx orl -0x2c(%rbp), %ecx movl %ecx, %ecx subq %rcx, %rax movl %eax, -0x38(%rbp) jmp 0x9693e movq -0x18(%rbp), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, -0x2c(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movl -0x30(%rbp), %ecx shll $0x18, %ecx orl -0x2c(%rbp), %ecx movl %ecx, %ecx subq %rcx, %rax movl %eax, -0x38(%rbp) jmp 0x9693e movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF andq -0x10(%rbp), %rcx cmpq %rcx, %rax jbe 0x9690c movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) movabsq $0x100000000, %rax # imm = 0x100000000 addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax sarq $0x20, %rax subl -0x30(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0x9691c movq -0x48(%rbp), %rax movl -0x2c(%rbp), %ecx subq %rcx, %rax movl %eax, -0x38(%rbp) jmp 0x9693e jmp 0x9692d jmp 0x9692f jmp 0x96931 movq $0x0, -0x8(%rbp) jmp 0x969d2 movl -0x34(%rbp), %eax shlq $0x20, %rax movl -0x38(%rbp), %ecx orq %rcx, %rax movq %rax, -0x28(%rbp) movzbl -0x39(%rbp), %ecx addl $0x1, %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x96966 movq -0x28(%rbp), %rax sarq $0x20, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movq -0x28(%rbp), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movq -0x28(%rbp), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x2(%rax) jmp 0x969a0 movq -0x20(%rbp), %rax addq $0x3, %rax movq %rax, -0x50(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x28(%rbp), %rax movl %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) jmp 0x969c4 jmp 0x969c6 jmp 0x969c8 jmp 0x969ca movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
translog_get_LSN_from_diff: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_96782: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov [rbp+var_30], eax mov eax, [rbp+var_30] shr eax, 6 mov [rbp+var_39], al mov eax, [rbp+var_30] and eax, 3Fh mov [rbp+var_30], eax mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_10] sar rax, 20h mov [rbp+var_34], eax jmp short $+2 loc_967B7: movzx eax, [rbp+var_39] mov [rbp+var_58], rax sub rax, 3; switch 4 cases ja def_967DB; jumptable 00000000000967DB default case mov rax, [rbp+var_58] lea rcx, jpt_967DB movsxd rax, ds:(jpt_967DB - 165648h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_967DD: cmp [rbp+var_30], 0; jumptable 00000000000967DB case 0 jnz short loc_96823 mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 1 jnz short loc_96823 mov rax, [rbp+var_20] mov rcx, [rbp+var_18] mov edx, [rcx+1] mov [rax], edx mov dx, [rcx+5] mov [rax+4], dx mov cl, [rcx+7] mov [rax+6], cl jmp short $+2 loc_9680C: jmp short $+2 loc_9680E: mov rax, [rbp+var_18] add rax, 1 add rax, 7 mov [rbp+var_8], rax jmp loc_969D2 loc_96823: mov rax, 0FFFFFFFFh and rax, [rbp+var_10] mov ecx, [rbp+var_30] shl ecx, 8 mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx] or ecx, edx mov ecx, ecx sub rax, rcx mov [rbp+var_38], eax jmp loc_9693E loc_9684D: mov rax, [rbp+var_18]; jumptable 00000000000967DB case 1 movzx eax, word ptr [rax] mov [rbp+var_2C], eax mov rax, 0FFFFFFFFh and rax, [rbp+var_10] mov ecx, [rbp+var_30] shl ecx, 10h or ecx, [rbp+var_2C] mov ecx, ecx sub rax, rcx mov [rbp+var_38], eax jmp loc_9693E loc_9687B: mov rax, [rbp+var_18]; jumptable 00000000000967DB case 2 movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov [rbp+var_2C], eax mov rax, 0FFFFFFFFh and rax, [rbp+var_10] mov ecx, [rbp+var_30] shl ecx, 18h or ecx, [rbp+var_2C] mov ecx, ecx sub rax, rcx mov [rbp+var_38], eax jmp short loc_9693E loc_968C0: mov rax, 0FFFFFFFFh; jumptable 00000000000967DB case 3 and rax, [rbp+var_10] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov rcx, 0FFFFFFFFh and rcx, [rbp+var_10] cmp rax, rcx jbe short loc_9690C mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax mov rax, 100000000h add rax, [rbp+var_48] mov [rbp+var_48], rax loc_9690C: mov rax, [rbp+var_10] sar rax, 20h sub eax, [rbp+var_30] mov [rbp+var_34], eax jmp short $+2 loc_9691C: mov rax, [rbp+var_48] mov ecx, [rbp+var_2C] sub rax, rcx mov [rbp+var_38], eax jmp short loc_9693E def_967DB: jmp short $+2; jumptable 00000000000967DB default case loc_9692D: jmp short $+2 loc_9692F: jmp short $+2 loc_96931: mov [rbp+var_8], 0 jmp loc_969D2 loc_9693E: mov eax, [rbp+var_34] shl rax, 20h mov ecx, [rbp+var_38] or rax, rcx mov [rbp+var_28], rax movzx ecx, [rbp+var_39] add ecx, 1 mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax jmp short $+2 loc_96966: mov rax, [rbp+var_28] sar rax, 20h mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov rax, [rbp+var_28] sar rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov rax, [rbp+var_28] sar rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_20] mov [rax+2], cl jmp short $+2 loc_969A0: mov rax, [rbp+var_20] add rax, 3 mov [rbp+var_50], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_28] mov ecx, eax mov rax, [rbp+var_50] mov [rax], ecx jmp short $+2 loc_969C4: jmp short $+2 loc_969C6: jmp short $+2 loc_969C8: jmp short $+2 loc_969CA: mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_969D2: mov rax, [rbp+var_8] pop rbp retn
_BYTE * translog_get_LSN_from_diff(long long a1, long long a2, long long a3) { unsigned __int8 v4; // [rsp+1Fh] [rbp-39h] int v5; // [rsp+20h] [rbp-38h] int v6; // [rsp+24h] [rbp-34h] int v7; // [rsp+28h] [rbp-30h] _BYTE *v8; // [rsp+40h] [rbp-18h] _BYTE *v9; // [rsp+50h] [rbp-8h] v4 = *(_BYTE *)a2 >> 6; v7 = *(_BYTE *)a2 & 0x3F; v8 = (_BYTE *)(a2 + 1); v6 = HIDWORD(a1); switch ( v4 ) { case 0u: if ( (*(_BYTE *)a2 & 0x3F) != 0 || *v8 != 1 ) { v5 = a1 - ((unsigned __int8)*v8 | (v7 << 8)); goto LABEL_12; } *(_DWORD *)a3 = *(_DWORD *)(a2 + 2); *(_WORD *)(a3 + 4) = *(_WORD *)(a2 + 6); *(_BYTE *)(a3 + 6) = *(_BYTE *)(a2 + 8); return (_BYTE *)(a2 + 9); case 1u: v5 = a1 - (*(unsigned __int16 *)v8 | (v7 << 16)); goto LABEL_12; case 2u: v5 = a1 - ((*(unsigned __int8 *)(a2 + 3) << 16) | *(unsigned __int16 *)(a2 + 1) | (v7 << 24)); goto LABEL_12; case 3u: if ( *(unsigned int *)v8 > (unsigned long long)(unsigned int)a1 ) ++v7; v6 = HIDWORD(a1) - v7; v5 = a1 - *(_DWORD *)v8; LABEL_12: *(_WORD *)a3 = v6; *(_BYTE *)(a3 + 2) = BYTE2(v6); *(_DWORD *)(a3 + 3) = v5; v9 = &v8[v4 + 1]; break; default: v9 = 0LL; break; } return v9; }
translog_get_LSN_from_diff: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00196782 LAB_00196782: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x30] SHR EAX,0x6 MOV byte ptr [RBP + -0x39],AL MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x3f MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 MOV dword ptr [RBP + -0x34],EAX JMP 0x001967b7 LAB_001967b7: MOVZX EAX,byte ptr [RBP + -0x39] MOV qword ptr [RBP + -0x58],RAX SUB RAX,0x3 JA 0x0019692b MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[0x265648] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: CMP dword ptr [RBP + -0x30],0x0 JNZ 0x00196823 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JNZ 0x00196823 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RCX + 0x1] MOV dword ptr [RAX],EDX MOV DX,word ptr [RCX + 0x5] MOV word ptr [RAX + 0x4],DX MOV CL,byte ptr [RCX + 0x7] MOV byte ptr [RAX + 0x6],CL JMP 0x0019680c LAB_0019680c: JMP 0x0019680e LAB_0019680e: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 ADD RAX,0x7 MOV qword ptr [RBP + -0x8],RAX JMP 0x001969d2 LAB_00196823: MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x30] SHL ECX,0x8 MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX] OR ECX,EDX MOV ECX,ECX SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX JMP 0x0019693e caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x30] SHL ECX,0x10 OR ECX,dword ptr [RBP + -0x2c] MOV ECX,ECX SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX JMP 0x0019693e caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x2c],EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x30] SHL ECX,0x18 OR ECX,dword ptr [RBP + -0x2c] MOV ECX,ECX SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX JMP 0x0019693e caseD_3: MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,0xffffffff AND RCX,qword ptr [RBP + -0x10] CMP RAX,RCX JBE 0x0019690c MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,0x100000000 ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX LAB_0019690c: MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 SUB EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x34],EAX JMP 0x0019691c LAB_0019691c: MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x2c] SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX JMP 0x0019693e default: JMP 0x0019692d LAB_0019692d: JMP 0x0019692f LAB_0019692f: JMP 0x00196931 LAB_00196931: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001969d2 LAB_0019693e: MOV EAX,dword ptr [RBP + -0x34] SHL RAX,0x20 MOV ECX,dword ptr [RBP + -0x38] OR RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOVZX ECX,byte ptr [RBP + -0x39] ADD ECX,0x1 MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x00196966 LAB_00196966: MOV RAX,qword ptr [RBP + -0x28] SAR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x28] SAR RAX,0x20 SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x28] SAR RAX,0x20 SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2],CL JMP 0x001969a0 LAB_001969a0: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x50],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x28] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX JMP 0x001969c4 LAB_001969c4: JMP 0x001969c6 LAB_001969c6: JMP 0x001969c8 LAB_001969c8: JMP 0x001969ca LAB_001969ca: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_001969d2: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
byte * translog_get_LSN_from_diff(ulong param_1,byte *param_2,int4 *param_3) { byte bVar1; uint *puVar2; int local_40; int local_3c; uint local_38; bVar1 = *param_2; local_38 = bVar1 & 0x3f; puVar2 = (uint *)(param_2 + 1); local_3c = (int)(param_1 >> 0x20); local_40 = (int)param_1; switch(bVar1 >> 6) { case 0: if (((bVar1 & 0x3f) == 0) && ((byte)*puVar2 == 1)) { *param_3 = *(int4 *)(param_2 + 2); *(int2 *)(param_3 + 1) = *(int2 *)(param_2 + 6); *(byte *)((long)param_3 + 6) = param_2[8]; return param_2 + 9; } local_40 = local_40 - (local_38 << 8 | (uint)(byte)*puVar2); break; case 1: local_40 = local_40 - (local_38 << 0x10 | (uint)(ushort)*puVar2); break; case 2: local_40 = local_40 - (local_38 << 0x18 | (uint)(uint3)*puVar2); break; case 3: if ((param_1 & 0xffffffff) < (ulong)*puVar2) { local_38 = local_38 + 1; } local_3c = local_3c - local_38; local_40 = local_40 - *puVar2; break; default: return (byte *)0x0; } *(char *)param_3 = (char)local_3c; *(char *)((long)param_3 + 1) = (char)((uint)local_3c >> 8); *(char *)((long)param_3 + 2) = (char)((uint)local_3c >> 0x10); *(int *)((long)param_3 + 3) = local_40; return (byte *)((long)puVar2 + (long)(int)((bVar1 >> 6) + 1)); }
21,985
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) { SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces); common_grammar_builder builder { /* .add_rule = */ [&](const std::string & name, const std::string & rule) { return converter._add_rule(name, rule); }, /* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) { return converter.visit(schema, name == "root" ? "" : name); }, /* .resolve_refs = */ [&](nlohmann::ordered_json & schema) { converter.resolve_refs(schema, ""); } }; cb(builder); converter.check_errors(); return converter.format_grammar(); }
O3
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&): pushq %r15 pushq %r14 pushq %rbx subq $0x160, %rsp # imm = 0x160 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) leaq 0x2f4(%rip), %rax # 0x3b332 movq %rax, 0x18(%rsi) leaq 0x315(%rip), %rax # 0x3b35e movq %rax, 0x10(%rsi) movzbl (%rdx), %eax movzbl 0x1(%rdx), %ecx leaq 0x68(%rsp), %r15 movq %r15, %rdi movl %eax, %edx callq 0x3e686 movq 0x10(%rsp), %rax testq %rax, %rax je 0x3b07a movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax xorl %eax, %eax movq %rax, 0x8(%rsp) movq %r15, (%rsp) leaq 0x2ea(%rip), %rcx # 0x3b376 movq %rcx, 0x18(%rsp) leaq 0x2f0(%rip), %rcx # 0x3b388 movq %rcx, 0x10(%rsp) movq %rax, 0x28(%rsp) movq %r15, 0x20(%rsp) leaq 0x300(%rip), %rcx # 0x3b3ae movq %rcx, 0x38(%rsp) leaq 0x3a6(%rip), %rcx # 0x3b460 movq %rcx, 0x30(%rsp) movq %rax, 0x48(%rsp) movq %r15, 0x40(%rsp) leaq 0x2e86(%rip), %rcx # 0x3df56 movq %rcx, 0x58(%rsp) leaq 0x2ee4(%rip), %rcx # 0x3dfc0 movq %rcx, 0x50(%rsp) cmpq %rax, 0x10(%r14) je 0x3b1c1 movq %rsp, %rsi movq %r14, %rdi callq *0x18(%r14) leaq 0x68(%rsp), %rdi callq 0x3e888 leaq 0x68(%rsp), %rsi movq %rbx, %rdi callq 0x3ea50 movq 0x50(%rsp), %rax testq %rax, %rax je 0x3b125 leaq 0x40(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0x3b13e leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0x3b155 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x148(%rsp), %rdi callq 0x2a63c leaq 0x130(%rsp), %rdi callq 0x2a63c leaq 0xf8(%rsp), %rdi callq 0x3f264 leaq 0xc0(%rsp), %rdi callq 0x3f302 leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0x3f3e4 movq -0x18(%r14), %rax testq %rax, %rax je 0x3b1b1 leaq 0x68(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x160, %rsp # imm = 0x160 popq %rbx popq %r14 popq %r15 retq callq 0x19270 jmp 0x3b1ec jmp 0x3b1ec jmp 0x3b1ec jmp 0x3b1ec jmp 0x3b1ec movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x3b209 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x3b209 movq %rax, %rdi callq 0x2286d movq %rax, %rbx movq %rsp, %rdi callq 0x3eb5c leaq 0x68(%rsp), %rdi callq 0x3ebb2 movq %rbx, %rdi callq 0x19c00 nop
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options: push r15 push r14 push rbx sub rsp, 160h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp; int movaps xmmword ptr [rsi], xmm0 lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax movzx eax, byte ptr [rdx] movzx ecx, byte ptr [rdx+1]; int lea r15, [rsp+178h+var_110] mov rdi, r15; int mov edx, eax; int call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool,bool) mov rax, [rsp+178h+var_168] test rax, rax jz short loc_3B07A mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_3B07A: xor eax, eax mov [rsp+178h+var_170], rax mov [rsp+178h+var_178], r15 lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&) mov [rsp+178h+var_160], rcx lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_168], rcx mov [rsp+178h+var_150], rax mov [rsp+178h+var_158], r15 lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov [rsp+178h+var_140], rcx lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_148], rcx mov [rsp+178h+var_130], rax mov [rsp+178h+var_138], r15 lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data 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> &) mov [rsp+178h+var_120], rcx lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_128], rcx cmp [r14+10h], rax jz loc_3B1C1 mov rsi, rsp mov rdi, r14 call qword ptr [r14+18h] lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void) lea rsi, [rsp+178h+var_110] mov rdi, rbx call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void) mov rax, [rsp+178h+var_128] test rax, rax jz short loc_3B125 lea rdi, [rsp+178h+var_138] mov rsi, rdi mov edx, 3 call rax loc_3B125: mov rax, [rsp+178h+var_148] test rax, rax jz short loc_3B13E lea rdi, [rsp+178h+var_158] mov rsi, rdi mov edx, 3 call rax loc_3B13E: mov rax, [rsp+178h+var_168] test rax, rax jz short loc_3B155 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_3B155: lea rdi, [rsp+178h+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_80] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() lea rdi, [rsp+178h+var_B8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea r14, [rsp+178h+var_E8] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [r14-18h] test rax, rax jz short loc_3B1B1 lea rdi, [rsp+178h+var_110] mov rsi, rdi mov edx, 3 call rax loc_3B1B1: mov rax, rbx add rsp, 160h pop rbx pop r14 pop r15 retn loc_3B1C1: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short loc_3B1EC jmp short loc_3B1EC jmp short loc_3B1EC jmp short loc_3B1EC jmp short loc_3B1EC mov rbx, rax mov rax, [rsp+178h+var_168] test rax, rax jz short loc_3B209 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_3B209 loc_3B1EC: mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() loc_3B209: mov rdi, rbx call __Unwind_Resume
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int *v11; // [rsp+0h] [rbp-178h] BYREF long long v12; // [rsp+8h] [rbp-170h] long long ( *v13)(); // [rsp+10h] [rbp-168h] void *v14; // [rsp+18h] [rbp-160h] int *v15; // [rsp+20h] [rbp-158h] BYREF long long v16; // [rsp+28h] [rbp-150h] long long ( *v17)(); // [rsp+30h] [rbp-148h] long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h] int *v19; // [rsp+40h] [rbp-138h] BYREF long long v20; // [rsp+48h] [rbp-130h] long long ( *v21)(); // [rsp+50h] [rbp-128h] long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h] int v23; // [rsp+60h] [rbp-118h] int v24[4]; // [rsp+68h] [rbp-110h] BYREF void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h] _BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF _BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF _BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF _BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF _BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF SchemaConverter::SchemaConverter( (int)v24, (int)&v11, *a3, a3[1], a5, a6, 0LL, 0, (long long)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager, (int)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke, v15, v16, (long long)v17); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); v12 = 0LL; v11 = v24; v14 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke; v13 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager; v16 = 0LL; v15 = v24; v18 = std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke; v17 = std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager; v20 = 0LL; v19 = v24; v22 = std::_Function_handler<void ()(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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke; v21 = std::_Function_handler<void ()(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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager; if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, int **))(a2 + 24))(a2, &v11); SchemaConverter::check_errors((SchemaConverter *)v24); SchemaConverter::format_grammar[abi:cxx11]( a1, (unsigned int)v24, v6, v7, v8, v9, (_DWORD)v11, v12, (_DWORD)v13, (_DWORD)v14, (_DWORD)v15, v16, (_DWORD)v17, (_DWORD)v18, (_DWORD)v19, v20, (_DWORD)v21, (_DWORD)v22, v23, v24[0], v24[2], (char)v25); if ( v21 ) ((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL); if ( v17 ) ((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); std::vector<std::string>::~vector((long long)v30); std::vector<std::string>::~vector((long long)v29); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable(v28); std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::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>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v27); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26); if ( v25 ) v25(v24, v24, 3LL); return a1; }
build_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x160 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x13b332] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x13b35e] MOV qword ptr [RSI + 0x10],RAX MOVZX EAX,byte ptr [RDX] MOVZX ECX,byte ptr [RDX + 0x1] LAB_0013b054: LEA R15,[RSP + 0x68] MOV RDI,R15 MOV EDX,EAX CALL 0x0013e686 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0013b07a LAB_0013b06d: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0013b07a: XOR EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP],R15 LEA RCX,[0x13b376] MOV qword ptr [RSP + 0x18],RCX LEA RCX,[0x13b388] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x20],R15 LEA RCX,[0x13b3ae] MOV qword ptr [RSP + 0x38],RCX LEA RCX,[0x13b460] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x40],R15 LEA RCX,[0x13df56] MOV qword ptr [RSP + 0x58],RCX LEA RCX,[0x13dfc0] MOV qword ptr [RSP + 0x50],RCX CMP qword ptr [R14 + 0x10],RAX JZ 0x0013b1c1 LAB_0013b0eb: MOV RSI,RSP MOV RDI,R14 CALL qword ptr [R14 + 0x18] LEA RDI,[RSP + 0x68] CALL 0x0013e888 LEA RSI,[RSP + 0x68] MOV RDI,RBX CALL 0x0013ea50 MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x0013b125 LEA RDI,[RSP + 0x40] LAB_0013b11b: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0013b125: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x0013b13e LEA RDI,[RSP + 0x20] LAB_0013b134: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0013b13e: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0013b155 LAB_0013b148: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0013b155: LEA RDI,[RSP + 0x148] CALL 0x0012a63c LEA RDI,[RSP + 0x130] CALL 0x0012a63c LEA RDI,[RSP + 0xf8] CALL 0x0013f264 LEA RDI,[RSP + 0xc0] CALL 0x0013f302 LEA R14,[RSP + 0x90] MOV RDI,R14 CALL 0x0013f3e4 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x0013b1b1 LAB_0013b1a2: LEA RDI,[RSP + 0x68] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0013b1b1: MOV RAX,RBX ADD RSP,0x160 POP RBX POP R14 POP R15 RET LAB_0013b1c1: CALL 0x00119270
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) */ function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2) { long in_RDX; SchemaConverter *local_178; int8 uStack_170; code *local_168; code *local_160; SchemaConverter *local_158; int8 local_150; code *local_148; code *local_140; SchemaConverter *local_138; int8 local_130; code *local_128; code *local_120; SchemaConverter local_110 [16]; code *local_100; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_e8 [48]; _Hashtable<std::__cxx11::string,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> local_b8 [56]; _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> local_80 [56]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24]; local_178 = (SchemaConverter *)0x0; uStack_170 = 0; local_160 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_invoke; local_168 = std:: _Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_manager; /* try { // try from 0013b054 to 0013b062 has its CatchHandler @ 0013b1d0 */ SchemaConverter::SchemaConverter (local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1)); if (local_168 != (code *)0x0) { /* try { // try from 0013b06d to 0013b079 has its CatchHandler @ 0013b1ce */ (*local_168)(&local_178,&local_178,3); } uStack_170 = 0; local_160 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_invoke; local_168 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_manager; local_150 = 0; local_140 = std:: _Function_handler<std::__cxx11::string(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>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_invoke; local_148 = std:: _Function_handler<std::__cxx11::string(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>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_manager; local_130 = 0; local_120 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_invoke; local_128 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_manager; local_178 = local_110; local_158 = local_110; local_138 = local_110; if (*(long *)(param_2 + 0x10) != 0) { /* try { // try from 0013b0eb to 0013b10b has its CatchHandler @ 0013b1f4 */ (**(code **)(param_2 + 0x18))(param_2,&local_178); SchemaConverter::check_errors(local_110); SchemaConverter::format_grammar_abi_cxx11_(); if (local_128 != (code *)0x0) { /* try { // try from 0013b11b to 0013b124 has its CatchHandler @ 0013b1cc */ (*local_128)(&local_138,&local_138,3); } if (local_148 != (code *)0x0) { /* try { // try from 0013b134 to 0013b13d has its CatchHandler @ 0013b1ca */ (*local_148)(&local_158,&local_158,3); } if (local_168 != (code *)0x0) { /* try { // try from 0013b148 to 0013b154 has its CatchHandler @ 0013b1c8 */ (*local_168)(&local_178,&local_178,3); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable(local_80); std:: _Hashtable<std::__cxx11::string,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>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable(local_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_e8); if (local_100 != (code *)0x0) { /* try { // try from 0013b1a2 to 0013b1b0 has its CatchHandler @ 0013b1c6 */ (*local_100)(local_110,local_110,3); } return param_1; } /* WARNING: Subroutine does not return */ /* try { // try from 0013b1c1 to 0013b1c5 has its CatchHandler @ 0013b1f4 */ std::__throw_bad_function_call(); }
21,986
my_fopen
eloqsql/mysys/my_fopen.c
FILE *my_fopen(const char *filename, int flags, myf MyFlags) { FILE *fd; char type[10]; DBUG_ENTER("my_fopen"); DBUG_PRINT("my",("Name: '%s' flags: %d MyFlags: %lu", filename, flags, MyFlags)); make_ftype(type,flags); #ifdef _WIN32 fd= my_win_fopen(filename, type); #else fd= fopen(filename, type); #endif if (fd != 0) { /* The test works if MY_NFILE < 128. The problem is that fileno() is char on some OS (SUNOS). Actually the filename save isn't that important so we can ignore if this doesn't work. */ int filedesc= my_fileno(fd); if ((uint)filedesc >= my_file_limit) { statistic_increment(my_stream_opened,&THR_LOCK_open); DBUG_RETURN(fd); /* safeguard */ } my_file_info[filedesc].name= my_strdup(key_memory_my_file_info, filename, MyFlags); statistic_increment(my_stream_opened, &THR_LOCK_open); statistic_increment(my_file_total_opened, &THR_LOCK_open); my_file_info[filedesc].type= STREAM_BY_FOPEN; DBUG_PRINT("exit",("stream: %p", fd)); DBUG_RETURN(fd); } else my_errno=errno; DBUG_PRINT("error",("Got error %d on open",my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) my_error((flags & O_RDONLY) ? EE_FILENOTFOUND : EE_CANTCREATEFILE, MYF(ME_BELL), filename, my_errno); DBUG_RETURN((FILE*) 0); }
O3
c
my_fopen: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdx, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) testb $0x1, %sil jne 0x36860 testb $0x2, %sil jne 0x3687a leaq -0x31(%rbp), %rax movb $0x72, -0x1(%rax) jmp 0x368a4 btl $0xa, %esi movl $0x77, %eax movl $0x61, %ecx cmovael %eax, %ecx leaq -0x31(%rbp), %rax movb %cl, -0x1(%rax) jmp 0x368a4 btl $0xa, %esi movl $0x72, %eax movl $0x61, %ecx cmovael %eax, %ecx testl $0x240, %esi # imm = 0x240 movl $0x77, %edx cmovel %ecx, %edx leaq -0x30(%rbp), %rax movb %dl, -0x2(%rax) movb $0x2b, -0x1(%rax) movw $0x65, (%rax) leaq -0x32(%rbp), %rsi movq %rbx, %rdi callq 0x243f0 movq %rax, %r15 testq %rax, %rax je 0x3691e movq %r15, %rdi callq 0x2d14e movl %eax, %r12d leaq 0x2c3da1(%rip), %rax # 0x2fa670 cmpl (%rax), %r12d jae 0x36951 leaq 0x3430f9(%rip), %rax # 0x3799d4 movl (%rax), %edi movq %rbx, %rsi movq %r14, %rdx callq 0x3039c leaq 0x2c3d89(%rip), %rcx # 0x2fa678 movq (%rcx), %rdx movslq %r12d, %rsi shlq $0x4, %rsi movq %rax, (%rdx,%rsi) leaq 0x342b7c(%rip), %rax # 0x379480 incq (%rax) leaq 0x342b82(%rip), %rax # 0x379490 incq (%rax) movq (%rcx), %rax movl $0x3, 0x8(%rax,%rsi) jmp 0x3695b callq 0x24050 movl (%rax), %r12d callq 0x3193e movl %r12d, (%rax) testb $0x19, %r14b je 0x3695b callq 0x3193e movl (%rax), %ecx movl $0x4, %esi movl $0x1, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x2cce7 jmp 0x3695b leaq 0x342b28(%rip), %rax # 0x379480 incq (%rax) movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x3697a movq %r15, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x243e0
my_fopen: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rdx mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax test sil, 1 jnz short loc_36860 test sil, 2 jnz short loc_3687A lea rax, [rbp+var_31] mov byte ptr [rax-1], 72h ; 'r' jmp short loc_368A4 loc_36860: bt esi, 0Ah mov eax, 77h ; 'w' mov ecx, 61h ; 'a' cmovnb ecx, eax lea rax, [rbp+var_31] mov [rax-1], cl jmp short loc_368A4 loc_3687A: bt esi, 0Ah mov eax, 72h ; 'r' mov ecx, 61h ; 'a' cmovnb ecx, eax test esi, 240h mov edx, 77h ; 'w' cmovz edx, ecx lea rax, [rbp+var_30] mov [rax-2], dl mov byte ptr [rax-1], 2Bh ; '+' loc_368A4: mov word ptr [rax], 65h ; 'e' lea rsi, [rbp+var_32] mov rdi, rbx call _fopen64 mov r15, rax test rax, rax jz short loc_3691E mov rdi, r15 call my_fileno mov r12d, eax lea rax, my_file_limit cmp r12d, [rax] jnb short loc_36951 lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, rbx mov rdx, r14 call my_strdup lea rcx, my_file_info mov rdx, [rcx] movsxd rsi, r12d shl rsi, 4 mov [rdx+rsi], rax lea rax, my_stream_opened inc qword ptr [rax] lea rax, my_file_total_opened inc qword ptr [rax] mov rax, [rcx] mov dword ptr [rax+rsi+8], 3 jmp short loc_3695B loc_3691E: call ___errno_location mov r12d, [rax] call _my_thread_var mov [rax], r12d test r14b, 19h jz short loc_3695B call _my_thread_var mov ecx, [rax] mov esi, 4 mov edi, 1 mov rdx, rbx xor eax, eax call my_error jmp short loc_3695B loc_36951: lea rax, my_stream_opened inc qword ptr [rax] loc_3695B: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_3697A mov rax, r15 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_3697A: call ___stack_chk_fail
long long my_fopen(long long a1, __int16 a2, int a3) { char *v4; // rax char v5; // cl char v6; // cl char v7; // dl long long v8; // rax long long v9; // r15 unsigned int v10; // r12d long long v11; // rsi int v12; // r12d unsigned int *v13; // rax char v15; // [rsp+Eh] [rbp-32h] BYREF char v16; // [rsp+Fh] [rbp-31h] BYREF char v17; // [rsp+10h] [rbp-30h] BYREF unsigned long long v18; // [rsp+18h] [rbp-28h] v18 = __readfsqword(0x28u); if ( (a2 & 1) != 0 ) { v5 = 97; if ( (a2 & 0x400) == 0 ) v5 = 119; v4 = &v16; v15 = v5; } else if ( (a2 & 2) != 0 ) { v6 = 97; if ( (a2 & 0x400) == 0 ) v6 = 114; v7 = 119; if ( (a2 & 0x240) == 0 ) v7 = v6; v4 = &v17; v15 = v7; v16 = 43; } else { v4 = &v16; v15 = 114; } *(_WORD *)v4 = 101; v8 = fopen64(a1, &v15); v9 = v8; if ( v8 ) { v10 = my_fileno(v8); if ( v10 >= my_file_limit ) { ++my_stream_opened; } else { v11 = 16LL * (int)v10; *(_QWORD *)((char *)my_file_info + v11) = my_strdup(key_memory_my_file_info, a1, a3); ++my_stream_opened; ++my_file_total_opened; *(_DWORD *)((char *)my_file_info + v11 + 8) = 3; } } else { v12 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v12; if ( (a3 & 0x19) != 0 ) { v13 = (unsigned int *)my_thread_var(); my_error(1u, 4LL, a1, *v13); } } return v9; }
my_fopen: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RDX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX TEST SIL,0x1 JNZ 0x00136860 TEST SIL,0x2 JNZ 0x0013687a LEA RAX,[RBP + -0x31] MOV byte ptr [RAX + -0x1],0x72 JMP 0x001368a4 LAB_00136860: BT ESI,0xa MOV EAX,0x77 MOV ECX,0x61 CMOVNC ECX,EAX LEA RAX,[RBP + -0x31] MOV byte ptr [RAX + -0x1],CL JMP 0x001368a4 LAB_0013687a: BT ESI,0xa MOV EAX,0x72 MOV ECX,0x61 CMOVNC ECX,EAX TEST ESI,0x240 MOV EDX,0x77 CMOVZ EDX,ECX LEA RAX,[RBP + -0x30] MOV byte ptr [RAX + -0x2],DL MOV byte ptr [RAX + -0x1],0x2b LAB_001368a4: MOV word ptr [RAX],0x65 LEA RSI,[RBP + -0x32] MOV RDI,RBX CALL 0x001243f0 MOV R15,RAX TEST RAX,RAX JZ 0x0013691e MOV RDI,R15 CALL 0x0012d14e MOV R12D,EAX LEA RAX,[0x3fa670] CMP R12D,dword ptr [RAX] JNC 0x00136951 LEA RAX,[0x4799d4] MOV EDI,dword ptr [RAX] MOV RSI,RBX MOV RDX,R14 CALL 0x0013039c LEA RCX,[0x3fa678] MOV RDX,qword ptr [RCX] MOVSXD RSI,R12D SHL RSI,0x4 MOV qword ptr [RDX + RSI*0x1],RAX LEA RAX,[0x479480] INC qword ptr [RAX] LEA RAX,[0x479490] INC qword ptr [RAX] MOV RAX,qword ptr [RCX] MOV dword ptr [RAX + RSI*0x1 + 0x8],0x3 JMP 0x0013695b LAB_0013691e: CALL 0x00124050 MOV R12D,dword ptr [RAX] CALL 0x0013193e MOV dword ptr [RAX],R12D TEST R14B,0x19 JZ 0x0013695b CALL 0x0013193e MOV ECX,dword ptr [RAX] MOV ESI,0x4 MOV EDI,0x1 MOV RDX,RBX XOR EAX,EAX CALL 0x0012cce7 JMP 0x0013695b LAB_00136951: LEA RAX,[0x479480] INC qword ptr [RAX] LAB_0013695b: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0013697a MOV RAX,R15 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0013697a: CALL 0x001243e0
FILE * my_fopen(char *param_1,uint param_2,ulong param_3) { int iVar1; uint uVar2; int2 *puVar3; FILE *pFVar4; int8 uVar5; int *piVar6; int4 *puVar7; char cVar8; long in_FS_OFFSET; char local_3a; int1 local_39 [9]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); if ((param_2 & 1) == 0) { if ((param_2 & 2) == 0) { puVar3 = (int2 *)local_39; local_3a = 'r'; } else { cVar8 = 'a'; if ((param_2 >> 10 & 1) == 0) { cVar8 = 'r'; } local_3a = 'w'; if ((param_2 & 0x240) == 0) { local_3a = cVar8; } puVar3 = (int2 *)(local_39 + 1); local_39[0] = 0x2b; } } else { local_3a = 'a'; if ((param_2 >> 10 & 1) == 0) { local_3a = 'w'; } puVar3 = (int2 *)local_39; } *puVar3 = 0x65; pFVar4 = fopen64(param_1,&local_3a); if (pFVar4 == (FILE *)0x0) { piVar6 = __errno_location(); iVar1 = *piVar6; piVar6 = (int *)_my_thread_var(); *piVar6 = iVar1; if ((param_3 & 0x19) != 0) { puVar7 = (int4 *)_my_thread_var(); my_error(1,4,param_1,*puVar7); } } else { uVar2 = my_fileno(pFVar4); if (uVar2 < my_file_limit) { uVar5 = my_strdup(key_memory_my_file_info,param_1,param_3); *(int8 *)(my_file_info + (long)(int)uVar2 * 0x10) = uVar5; my_stream_opened = my_stream_opened + 1; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (long)(int)uVar2 * 0x10 + 8) = 3; } else { my_stream_opened = my_stream_opened + 1; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return pFVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
21,987
codegen_get_c_type
tsotchke[P]eshkol/src/backend/codegen/type_conversion.c
const char* codegen_get_c_type(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); // Get type context TypeInferenceContext* type_context = codegen_context_get_type_context(context); // Get node type Type* type = type_inference_get_type(type_context, node); // Convert to C type if (type) { return codegen_type_to_c_type(type); } else { return "int"; // Default to int } }
O2
c
codegen_get_c_type: pushq %rbx testq %rdi, %rdi je 0x13423 movq %rsi, %rbx testq %rsi, %rsi je 0x1343c callq 0xa5ad movq %rax, %rdi movq %rbx, %rsi callq 0x807c testq %rax, %rax je 0x1341a movq %rax, %rdi popq %rbx jmp 0x13324 leaq 0x6aea(%rip), %rax # 0x19f0b popq %rbx retq leaq 0x4935(%rip), %rdi # 0x17d5f leaq 0xbc4b(%rip), %rsi # 0x1f07c leaq 0xbd3c(%rip), %rcx # 0x1f174 pushq $0x5b jmp 0x13453 leaq 0x648c(%rip), %rdi # 0x198cf leaq 0xbc32(%rip), %rsi # 0x1f07c leaq 0xbd23(%rip), %rcx # 0x1f174 pushq $0x5c popq %rdx callq 0x2180
codegen_get_c_type: push rbx test rdi, rdi jz short loc_13423 mov rbx, rsi test rsi, rsi jz short loc_1343C call codegen_context_get_type_context mov rdi, rax mov rsi, rbx call type_inference_get_type test rax, rax jz short loc_1341A mov rdi, rax pop rbx jmp codegen_type_to_c_type loc_1341A: lea rax, aInt; "int" pop rbx retn loc_13423: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstCharCodeg_0; "const char *codegen_get_c_type(CodegenC"... push 5Bh ; '[' jmp short loc_13453 loc_1343C: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstCharCodeg_0; "const char *codegen_get_c_type(CodegenC"... push 5Ch ; '\' loc_13453: pop rdx call ___assert_fail
const char * codegen_get_c_type(long long a1, long long a2) { _QWORD *type_context; // rax _DWORD *type; // rax if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c", 91LL, "const char *codegen_get_c_type(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c", 92LL, "const char *codegen_get_c_type(CodegenContext *, const AstNode *)"); type_context = (_QWORD *)codegen_context_get_type_context(a1); type = (_DWORD *)type_inference_get_type(type_context, a2); if ( type ) return codegen_type_to_c_type(type); else return "int"; }
codegen_get_c_type: PUSH RBX TEST RDI,RDI JZ 0x00113423 MOV RBX,RSI TEST RSI,RSI JZ 0x0011343c CALL 0x0010a5ad MOV RDI,RAX MOV RSI,RBX CALL 0x0010807c TEST RAX,RAX JZ 0x0011341a MOV RDI,RAX POP RBX JMP 0x00113324 LAB_0011341a: LEA RAX,[0x119f0b] POP RBX RET LAB_00113423: LEA RDI,[0x117d5f] LEA RSI,[0x11f07c] LEA RCX,[0x11f174] PUSH 0x5b JMP 0x00113453 LAB_0011343c: LEA RDI,[0x1198cf] LEA RSI,[0x11f07c] LEA RCX,[0x11f174] PUSH 0x5c LAB_00113453: POP RDX CALL 0x00102180
int * codegen_get_c_type(long param_1,long param_2) { uint __line; int8 uVar1; long lVar2; int *puVar3; char *__assertion; if (param_1 == 0) { __assertion = "context != NULL"; __line = 0x5b; } else { if (param_2 != 0) { uVar1 = codegen_context_get_type_context(); lVar2 = type_inference_get_type(uVar1,param_2); if (lVar2 != 0) { puVar3 = (int *)codegen_type_to_c_type(lVar2); return puVar3; } return &DAT_00119f0b; } __assertion = "node != NULL"; __line = 0x5c; } /* WARNING: Subroutine does not return */ __assert_fail(__assertion, "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c" ,__line,"const char *codegen_get_c_type(CodegenContext *, const AstNode *)"); }
21,988
make_ftype
eloqsql/mysys/my_fopen.c
static void make_ftype(register char * to, register int flag) { /* check some possible invalid combinations */ DBUG_ASSERT((flag & (O_TRUNC | O_APPEND)) != (O_TRUNC | O_APPEND)); DBUG_ASSERT((flag & (O_WRONLY | O_RDWR)) != (O_WRONLY | O_RDWR)); if ((flag & (O_RDONLY|O_WRONLY)) == O_WRONLY) *to++= (flag & O_APPEND) ? 'a' : 'w'; else if (flag & O_RDWR) { /* Add '+' after theese */ if (flag & (O_TRUNC | O_CREAT)) *to++= 'w'; else if (flag & O_APPEND) *to++= 'a'; else *to++= 'r'; *to++= '+'; } else *to++= 'r'; if (flag & FILE_BINARY) *to++='b'; if (O_CLOEXEC) *to++= 'e'; *to='\0'; }
O0
c
make_ftype: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) jmp 0xbd15d jmp 0xbd15f jmp 0xbd161 movl -0xc(%rbp), %eax andl $0x1, %eax cmpl $0x1, %eax jne 0xbd19d movl -0xc(%rbp), %edx andl $0x400, %edx # imm = 0x400 movl $0x77, %eax movl $0x61, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) jmp 0xbd226 movl -0xc(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xbd212 movl -0xc(%rbp), %eax andl $0x240, %eax # imm = 0x240 cmpl $0x0, %eax je 0xbd1c9 movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x77, (%rax) jmp 0xbd1fe movl -0xc(%rbp), %eax andl $0x400, %eax # imm = 0x400 cmpl $0x0, %eax je 0xbd1ea movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x61, (%rax) jmp 0xbd1fc movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x72, (%rax) jmp 0xbd1fe movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x2b, (%rax) jmp 0xbd224 movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x72, (%rax) jmp 0xbd226 movl -0xc(%rbp), %eax andl $0x0, %eax cmpl $0x0, %eax je 0xbd243 movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x62, (%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x65, (%rax) movq -0x8(%rbp), %rax movb $0x0, (%rax) popq %rbp retq nop
make_ftype: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi jmp short $+2 loc_BD15D: jmp short $+2 loc_BD15F: jmp short $+2 loc_BD161: mov eax, [rbp+var_C] and eax, 1 cmp eax, 1 jnz short loc_BD19D mov edx, [rbp+var_C] and edx, 400h mov eax, 77h ; 'w' mov ecx, 61h ; 'a' cmp edx, 0 cmovnz eax, ecx mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl jmp loc_BD226 loc_BD19D: mov eax, [rbp+var_C] and eax, 2 cmp eax, 0 jz short loc_BD212 mov eax, [rbp+var_C] and eax, 240h cmp eax, 0 jz short loc_BD1C9 mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 77h ; 'w' jmp short loc_BD1FE loc_BD1C9: mov eax, [rbp+var_C] and eax, 400h cmp eax, 0 jz short loc_BD1EA mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 61h ; 'a' jmp short loc_BD1FC loc_BD1EA: mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 72h ; 'r' loc_BD1FC: jmp short $+2 loc_BD1FE: mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 2Bh ; '+' jmp short loc_BD224 loc_BD212: mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 72h ; 'r' loc_BD224: jmp short $+2 loc_BD226: mov eax, [rbp+var_C] and eax, 0 cmp eax, 0 jz short loc_BD243 mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 62h ; 'b' loc_BD243: mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 65h ; 'e' mov rax, [rbp+var_8] mov byte ptr [rax], 0 pop rbp retn
_BYTE * make_ftype(char *a1, __int16 a2) { char v2; // al _BYTE *v3; // rax _BYTE *result; // rax _BYTE *v5; // [rsp+4h] [rbp-8h] _BYTE *v6; // [rsp+4h] [rbp-8h] if ( (a2 & 1) == 1 ) { v2 = 119; if ( (a2 & 0x400) != 0 ) v2 = 97; v5 = a1 + 1; *a1 = v2; } else if ( (a2 & 2) != 0 ) { if ( (a2 & 0x240) != 0 ) { v6 = a1 + 1; *a1 = 119; } else { v6 = a1 + 1; if ( (a2 & 0x400) != 0 ) *a1 = 97; else *a1 = 114; } v3 = v6; v5 = v6 + 1; *v3 = 43; } else { v5 = a1 + 1; *a1 = 114; } *v5 = 101; result = v5 + 1; v5[1] = 0; return result; }
make_ftype: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI JMP 0x001bd15d LAB_001bd15d: JMP 0x001bd15f LAB_001bd15f: JMP 0x001bd161 LAB_001bd161: MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x1 CMP EAX,0x1 JNZ 0x001bd19d MOV EDX,dword ptr [RBP + -0xc] AND EDX,0x400 MOV EAX,0x77 MOV ECX,0x61 CMP EDX,0x0 CMOVNZ EAX,ECX MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL JMP 0x001bd226 LAB_001bd19d: MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x2 CMP EAX,0x0 JZ 0x001bd212 MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x240 CMP EAX,0x0 JZ 0x001bd1c9 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x77 JMP 0x001bd1fe LAB_001bd1c9: MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x400 CMP EAX,0x0 JZ 0x001bd1ea MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x61 JMP 0x001bd1fc LAB_001bd1ea: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x72 LAB_001bd1fc: JMP 0x001bd1fe LAB_001bd1fe: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x2b JMP 0x001bd224 LAB_001bd212: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x72 LAB_001bd224: JMP 0x001bd226 LAB_001bd226: MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x0 CMP EAX,0x0 JZ 0x001bd243 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x62 LAB_001bd243: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x65 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0x0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001bd231) */ void make_ftype(int1 *param_1,uint param_2) { int1 uVar1; int1 *local_10; if ((param_2 & 1) == 1) { uVar1 = 0x77; if ((param_2 & 0x400) != 0) { uVar1 = 0x61; } *param_1 = uVar1; local_10 = param_1 + 1; } else if ((param_2 & 2) == 0) { local_10 = param_1 + 1; *param_1 = 0x72; } else { if ((param_2 & 0x240) == 0) { if ((param_2 & 0x400) == 0) { *param_1 = 0x72; } else { *param_1 = 0x61; } } else { *param_1 = 0x77; } local_10 = param_1 + 1; *local_10 = 0x2b; local_10 = param_1 + 2; } *local_10 = 0x65; local_10[1] = 0; return; }
21,989
void unifex::_ch::_visit_for<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type>(void const*, void (*)(unifex::_ci::continuation_info const&, void*), void*)
aimrt_mujoco_sim/_deps/libunifex-src/include/unifex/continuations.hpp
void _visit_for(const void* address, _ci::_continuation_info_vtable::callback_t* cb, void* data) { visit_continuations( const_cast<const Promise&>( coro::coroutine_handle<Promise>::from_address( const_cast<void*>(address)).promise()), [cb, data](const auto& continuation) { cb(continuation_info::from_continuation(continuation), data); }); }
O3
cpp
void unifex::_ch::_visit_for<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type>(void const*, void (*)(unifex::_ci::continuation_info const&, void*), void*): subq $0x18, %rsp movq %rsi, %rax movq 0x10(%rdi), %rcx movq (%rcx), %rcx addq $0x10, %rcx leaq 0x8(%rsp), %rdi movq %rcx, (%rdi) leaq 0x1b9c53(%rip), %rcx # 0x208b80 movq %rcx, 0x8(%rdi) movq %rdx, %rsi callq *%rax addq $0x18, %rsp retq
_ZN6unifex3_ch10_visit_forINS_6_await12_sender_taskINS_17_with_query_value17_receiver_wrapperINS_14_get_scheduler3_fnENS_13_inline_sched9schedulerENS_4_seq19_successor_receiverIONS9_13schedule_taskENS4_7_senderIS7_S9_NS_5_task5_taskIvE4typeEE4typeENS_12_async_scope9_receiverINSA_7_senderISC_SK_E4typeEE4typeEE4typeEE4typeEE4type12promise_typeEEEvPKvPFvRKNS_3_ci17continuation_infoEPvES15_: sub rsp, 18h mov rax, rsi mov rcx, [rdi+10h] mov rcx, [rcx] add rcx, 10h lea rdi, [rsp+18h+var_10] mov [rdi], rcx lea rcx, _ZN6unifex3_ci11_vtable_forINS_12_async_scope9_receiverINS_4_seq7_senderINS_13_inline_sched9scheduler13schedule_taskENS_17_with_query_value7_senderINS_14_get_scheduler3_fnES7_NS_5_task5_taskIvE4typeEE4typeEE4typeEE4typeEEE; unifex::_ci::_vtable_for<unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type> mov [rdi+8], rcx mov rsi, rdx call rax add rsp, 18h retn
long long unifex::_ch::_visit_for<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task &&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>>::type>::type>::type>::type>::type::promise_type>( long long a1, long long ( *a2)(_QWORD *, long long), long long a3) { _QWORD v4[2]; // [rsp+8h] [rbp-10h] BYREF v4[0] = **(_QWORD **)(a1 + 16) + 16LL; v4[1] = unifex::_ci::_vtable_for<unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>; return a2(v4, a3); }
_visit_for<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type>: SUB RSP,0x18 MOV RAX,RSI MOV RCX,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RCX] ADD RCX,0x10 LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RCX LEA RCX,[0x308b80] MOV qword ptr [RDI + 0x8],RCX MOV RSI,RDX CALL RAX ADD RSP,0x18 RET
/* void unifex::_ch::_visit_for<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type, unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type>(void const*, void (*)(unifex::_ci::continuation_info const&, void*), void*) */ void unifex::_ch:: _visit_for<unifex::_await::_sender_task<unifex::_with_query_value::_receiver_wrapper<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_seq::_successor_receiver<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type,unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type>::type>::type>::type::promise_type> (void *param_1,_func_void_continuation_info_ptr_void_ptr *param_2,void *param_3) { long local_10; int1 *local_8; local_10 = **(long **)((long)param_1 + 0x10) + 0x10; local_8 = _ci:: _vtable_for<unifex::_async_scope::_receiver<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<void>::type>::type>::type>::type> ; (*param_2)((continuation_info *)&local_10,param_3); return; }
21,990
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O0
c
str2int: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x30(%rbp), %rax movq $0x0, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) cmpq $0x0, %rax jle 0x7d0f1 xorl %eax, %eax subq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) cmpq $0x0, %rax jle 0x7d109 xorl %eax, %eax subq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax cmpq -0x40(%rbp), %rax jge 0x7d11b movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x7d11d leaq 0x1febdc(%rip), %rax # 0x27bd00 movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x7d14a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x7d11d movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x7d16b movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x7d18c movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x7d18a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movl $0x1, -0x34(%rbp) jmp 0x7d18c movq -0x10(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jne 0x7d1ae movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x7d194 movl $0x0, -0x38(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x7d1df movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jg 0x7d1df movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x30, %eax movl %eax, -0xe4(%rbp) jmp 0x7d25e movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x41, %eax jl 0x7d20c movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5a, %eax jg 0x7d20c movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x41, %eax addl $0xa, %eax movl %eax, -0xe8(%rbp) jmp 0x7d252 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x61, %eax jl 0x7d239 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7a, %eax jg 0x7d239 movq -0x10(%rbp), %rax movsbl (%rax), %eax subl $0x61, %eax addl $0xa, %eax movl %eax, -0xec(%rbp) jmp 0x7d246 movl $0x7f, %eax movl %eax, -0xec(%rbp) jmp 0x7d246 movl -0xec(%rbp), %eax movl %eax, -0xe8(%rbp) movl -0xe8(%rbp), %eax movl %eax, -0xe4(%rbp) movl -0xe4(%rbp), %ecx movslq -0x38(%rbp), %rax movl %ecx, -0xe0(%rbp,%rax,4) xorl %eax, %eax cmpl -0x14(%rbp), %ecx movb %al, -0xed(%rbp) jge 0x7d289 cmpl $0x14, -0x38(%rbp) setl %al movb %al, -0xed(%rbp) movb -0xed(%rbp), %al testb $0x1, %al jne 0x7d295 jmp 0x7d2b1 jmp 0x7d297 movl -0x38(%rbp), %eax addl $0x1, %eax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x7d1b5 movq -0x60(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x7d2d3 callq 0x24040 movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0x7d420 movq $0x0, -0x50(%rbp) movq $-0x1, -0x48(%rbp) movl -0x38(%rbp), %eax addl $-0x1, %eax movl %eax, -0x38(%rbp) cmpl $0x1, %eax jl 0x7d35b movslq -0x38(%rbp), %rax movl -0xe0(%rbp,%rax,4), %ecx movl %ecx, -0x54(%rbp) xorl %eax, %eax subl %ecx, %eax cltq cmpq -0x40(%rbp), %rax jge 0x7d323 callq 0x24040 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x7d420 movq -0x40(%rbp), %rax movslq -0x54(%rbp), %rcx addq %rcx, %rax movslq -0x14(%rbp), %rcx cqto idivq %rcx movq %rax, -0x40(%rbp) movslq -0x54(%rbp), %rax imulq -0x48(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movslq -0x14(%rbp), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x7d2e3 cmpl $0x0, -0x38(%rbp) jne 0x7d3a4 movslq -0x38(%rbp), %rax movl -0xe0(%rbp,%rax,4), %ecx movl %ecx, -0x54(%rbp) xorl %eax, %eax subl %ecx, %eax cltq cmpq -0x40(%rbp), %rax jge 0x7d393 callq 0x24040 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x7d420 movslq -0x54(%rbp), %rax imulq -0x48(%rbp), %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) cmpl $0x0, -0x34(%rbp) jge 0x7d3e1 movabsq $-0x7fffffffffffffff, %rax # imm = 0x8000000000000001 cmpq %rax, -0x50(%rbp) jl 0x7d3ca xorl %eax, %eax subq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) cmpq -0x28(%rbp), %rax jle 0x7d3df callq 0x24040 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x7d420 jmp 0x7d402 movq -0x50(%rbp), %rax cmpq -0x20(%rbp), %rax jge 0x7d400 callq 0x24040 movl $0x22, (%rax) movq $0x0, -0x8(%rbp) jmp 0x7d420 jmp 0x7d402 movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) callq 0x24040 movl $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xf0, %rsp popq %rbp retq nopl (%rax)
str2int: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_30] mov qword ptr [rax], 0 mov rax, [rbp+var_20] mov [rbp+var_40], rax cmp rax, 0 jle short loc_7D0F1 xor eax, eax sub rax, [rbp+var_40] mov [rbp+var_40], rax loc_7D0F1: mov rax, [rbp+var_28] mov [rbp+var_48], rax cmp rax, 0 jle short loc_7D109 xor eax, eax sub rax, [rbp+var_48] mov [rbp+var_48], rax loc_7D109: mov rax, [rbp+var_48] cmp rax, [rbp+var_40] jge short loc_7D11B mov rax, [rbp+var_48] mov [rbp+var_40], rax loc_7D11B: jmp short $+2 loc_7D11D: lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jz short loc_7D14A mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_7D11D loc_7D14A: mov [rbp+var_34], 0FFFFFFFFh mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_7D16B mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_7D18C loc_7D16B: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_7D18A mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov [rbp+var_34], 1 loc_7D18A: jmp short $+2 loc_7D18C: mov rax, [rbp+var_10] mov [rbp+var_60], rax loc_7D194: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jnz short loc_7D1AE mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_7D194 loc_7D1AE: mov [rbp+var_38], 0 loc_7D1B5: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_7D1DF mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jg short loc_7D1DF mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 30h ; '0' mov [rbp+var_E4], eax jmp short loc_7D25E loc_7D1DF: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 41h ; 'A' jl short loc_7D20C mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Ah ; 'Z' jg short loc_7D20C mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_E8], eax jmp short loc_7D252 loc_7D20C: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 61h ; 'a' jl short loc_7D239 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Ah ; 'z' jg short loc_7D239 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_EC], eax jmp short loc_7D246 loc_7D239: mov eax, 7Fh mov [rbp+var_EC], eax jmp short $+2 loc_7D246: mov eax, [rbp+var_EC] mov [rbp+var_E8], eax loc_7D252: mov eax, [rbp+var_E8] mov [rbp+var_E4], eax loc_7D25E: mov ecx, [rbp+var_E4] movsxd rax, [rbp+var_38] mov [rbp+rax*4+var_E0], ecx xor eax, eax cmp ecx, [rbp+var_14] mov [rbp+var_ED], al jge short loc_7D289 cmp [rbp+var_38], 14h setl al mov [rbp+var_ED], al loc_7D289: mov al, [rbp+var_ED] test al, 1 jnz short loc_7D295 jmp short loc_7D2B1 loc_7D295: jmp short $+2 loc_7D297: mov eax, [rbp+var_38] add eax, 1 mov [rbp+var_38], eax mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_7D1B5 loc_7D2B1: mov rax, [rbp+var_60] cmp rax, [rbp+var_10] jnz short loc_7D2D3 call ___errno_location mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp loc_7D420 loc_7D2D3: mov [rbp+var_50], 0 mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh loc_7D2E3: mov eax, [rbp+var_38] add eax, 0FFFFFFFFh mov [rbp+var_38], eax cmp eax, 1 jl short loc_7D35B movsxd rax, [rbp+var_38] mov ecx, [rbp+rax*4+var_E0] mov [rbp+var_54], ecx xor eax, eax sub eax, ecx cdqe cmp rax, [rbp+var_40] jge short loc_7D323 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp loc_7D420 loc_7D323: mov rax, [rbp+var_40] movsxd rcx, [rbp+var_54] add rax, rcx movsxd rcx, [rbp+var_14] cqo idiv rcx mov [rbp+var_40], rax movsxd rax, [rbp+var_54] imul rax, [rbp+var_48] add rax, [rbp+var_50] mov [rbp+var_50], rax movsxd rax, [rbp+var_14] imul rax, [rbp+var_48] mov [rbp+var_48], rax jmp short loc_7D2E3 loc_7D35B: cmp [rbp+var_38], 0 jnz short loc_7D3A4 movsxd rax, [rbp+var_38] mov ecx, [rbp+rax*4+var_E0] mov [rbp+var_54], ecx xor eax, eax sub eax, ecx cdqe cmp rax, [rbp+var_40] jge short loc_7D393 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp loc_7D420 loc_7D393: movsxd rax, [rbp+var_54] imul rax, [rbp+var_48] add rax, [rbp+var_50] mov [rbp+var_50], rax loc_7D3A4: cmp [rbp+var_34], 0 jge short loc_7D3E1 mov rax, 8000000000000001h cmp [rbp+var_50], rax jl short loc_7D3CA xor eax, eax sub rax, [rbp+var_50] mov [rbp+var_50], rax cmp rax, [rbp+var_28] jle short loc_7D3DF loc_7D3CA: call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp short loc_7D420 loc_7D3DF: jmp short loc_7D402 loc_7D3E1: mov rax, [rbp+var_50] cmp rax, [rbp+var_20] jge short loc_7D400 call ___errno_location mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0 jmp short loc_7D420 loc_7D400: jmp short $+2 loc_7D402: mov rcx, [rbp+var_50] mov rax, [rbp+var_30] mov [rax], rcx call ___errno_location mov dword ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_7D420: mov rax, [rbp+var_8] add rsp, 0F0h pop rbp retn
_BYTE * str2int(_BYTE *a1, int a2, long long a3, long long a4, long long *a5) { bool v6; // [rsp+3h] [rbp-EDh] int v7; // [rsp+4h] [rbp-ECh] int v8; // [rsp+8h] [rbp-E8h] int v9; // [rsp+Ch] [rbp-E4h] _DWORD v10[32]; // [rsp+10h] [rbp-E0h] _BYTE *v11; // [rsp+90h] [rbp-60h] int v12; // [rsp+9Ch] [rbp-54h] long long v13; // [rsp+A0h] [rbp-50h] long long i; // [rsp+A8h] [rbp-48h] long long v15; // [rsp+B0h] [rbp-40h] int v16; // [rsp+B8h] [rbp-38h] int v17; // [rsp+BCh] [rbp-34h] long long *v18; // [rsp+C0h] [rbp-30h] long long v19; // [rsp+C8h] [rbp-28h] long long v20; // [rsp+D0h] [rbp-20h] int v21; // [rsp+DCh] [rbp-14h] _BYTE *v22; // [rsp+E0h] [rbp-10h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; *a5 = 0LL; v15 = v20; if ( v20 > 0 ) v15 = -v15; i = v19; if ( v19 > 0 ) i = -i; if ( i < v15 ) v15 = i; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + (unsigned __int8)*v22 + 1LL) & 8) != 0 ) ++v22; v17 = -1; if ( *v22 == 43 ) { ++v22; } else if ( *v22 == 45 ) { ++v22; v17 = 1; } v11 = v22; while ( *v22 == 48 ) ++v22; v16 = 0; while ( 1 ) { if ( (char)*v22 < 48 || (char)*v22 > 57 ) { if ( (char)*v22 < 65 || (char)*v22 > 90 ) { v7 = (char)*v22 < 97 || (char)*v22 > 122 ? 127 : (char)*v22 - 97 + 10; v8 = v7; } else { v8 = (char)*v22 - 65 + 10; } v9 = v8; } else { v9 = (char)*v22 - 48; } v10[v16] = v9; v6 = 0; if ( v9 < v21 ) v6 = v16 < 20; if ( !v6 ) break; ++v16; ++v22; } if ( v11 != v22 ) { v13 = 0LL; for ( i = -1LL; --v16 >= 1; i *= v21 ) { v12 = v10[v16]; if ( -v12 < v15 ) goto LABEL_49; v15 = (v12 + v15) / v21; v13 += i * v12; } if ( !v16 ) { v12 = v10[0]; if ( -v10[0] < v15 ) goto LABEL_49; v13 += i * v12; } if ( v17 < 0 ) { if ( v13 == 0x8000000000000000LL ) goto LABEL_49; v13 = -v13; if ( v13 > v19 ) goto LABEL_49; LABEL_50: *v18 = v13; *(_DWORD *)__errno_location() = 0; return v22; } if ( v13 >= v20 ) goto LABEL_50; LABEL_49: *(_DWORD *)__errno_location() = 34; return 0LL; } *(_DWORD *)__errno_location() = 33; return 0LL; }
str2int: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JLE 0x0017d0f1 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX LAB_0017d0f1: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX CMP RAX,0x0 JLE 0x0017d109 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX LAB_0017d109: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x40] JGE 0x0017d11b MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX LAB_0017d11b: JMP 0x0017d11d LAB_0017d11d: LEA RAX,[0x37bd00] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 JZ 0x0017d14a MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0017d11d LAB_0017d14a: MOV dword ptr [RBP + -0x34],0xffffffff MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x0017d16b MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0017d18c LAB_0017d16b: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x0017d18a MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x34],0x1 LAB_0017d18a: JMP 0x0017d18c LAB_0017d18c: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x60],RAX LAB_0017d194: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JNZ 0x0017d1ae MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0017d194 LAB_0017d1ae: MOV dword ptr [RBP + -0x38],0x0 LAB_0017d1b5: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x0017d1df MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JG 0x0017d1df MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] SUB EAX,0x30 MOV dword ptr [RBP + -0xe4],EAX JMP 0x0017d25e LAB_0017d1df: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x41 JL 0x0017d20c MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5a JG 0x0017d20c MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] SUB EAX,0x41 ADD EAX,0xa MOV dword ptr [RBP + -0xe8],EAX JMP 0x0017d252 LAB_0017d20c: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x61 JL 0x0017d239 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7a JG 0x0017d239 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] SUB EAX,0x61 ADD EAX,0xa MOV dword ptr [RBP + -0xec],EAX JMP 0x0017d246 LAB_0017d239: MOV EAX,0x7f MOV dword ptr [RBP + -0xec],EAX JMP 0x0017d246 LAB_0017d246: MOV EAX,dword ptr [RBP + -0xec] MOV dword ptr [RBP + -0xe8],EAX LAB_0017d252: MOV EAX,dword ptr [RBP + -0xe8] MOV dword ptr [RBP + -0xe4],EAX LAB_0017d25e: MOV ECX,dword ptr [RBP + -0xe4] MOVSXD RAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + RAX*0x4 + -0xe0],ECX XOR EAX,EAX CMP ECX,dword ptr [RBP + -0x14] MOV byte ptr [RBP + -0xed],AL JGE 0x0017d289 CMP dword ptr [RBP + -0x38],0x14 SETL AL MOV byte ptr [RBP + -0xed],AL LAB_0017d289: MOV AL,byte ptr [RBP + -0xed] TEST AL,0x1 JNZ 0x0017d295 JMP 0x0017d2b1 LAB_0017d295: JMP 0x0017d297 LAB_0017d297: MOV EAX,dword ptr [RBP + -0x38] ADD EAX,0x1 MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0017d1b5 LAB_0017d2b1: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0017d2d3 CALL 0x00124040 MOV dword ptr [RAX],0x21 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017d420 LAB_0017d2d3: MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x48],-0x1 LAB_0017d2e3: MOV EAX,dword ptr [RBP + -0x38] ADD EAX,-0x1 MOV dword ptr [RBP + -0x38],EAX CMP EAX,0x1 JL 0x0017d35b MOVSXD RAX,dword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + RAX*0x4 + -0xe0] MOV dword ptr [RBP + -0x54],ECX XOR EAX,EAX SUB EAX,ECX CDQE CMP RAX,qword ptr [RBP + -0x40] JGE 0x0017d323 CALL 0x00124040 MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017d420 LAB_0017d323: MOV RAX,qword ptr [RBP + -0x40] MOVSXD RCX,dword ptr [RBP + -0x54] ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x14] CQO IDIV RCX MOV qword ptr [RBP + -0x40],RAX MOVSXD RAX,dword ptr [RBP + -0x54] IMUL RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOVSXD RAX,dword ptr [RBP + -0x14] IMUL RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x0017d2e3 LAB_0017d35b: CMP dword ptr [RBP + -0x38],0x0 JNZ 0x0017d3a4 MOVSXD RAX,dword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + RAX*0x4 + -0xe0] MOV dword ptr [RBP + -0x54],ECX XOR EAX,EAX SUB EAX,ECX CDQE CMP RAX,qword ptr [RBP + -0x40] JGE 0x0017d393 CALL 0x00124040 MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017d420 LAB_0017d393: MOVSXD RAX,dword ptr [RBP + -0x54] IMUL RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX LAB_0017d3a4: CMP dword ptr [RBP + -0x34],0x0 JGE 0x0017d3e1 MOV RAX,-0x7fffffffffffffff CMP qword ptr [RBP + -0x50],RAX JL 0x0017d3ca XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX CMP RAX,qword ptr [RBP + -0x28] JLE 0x0017d3df LAB_0017d3ca: CALL 0x00124040 MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017d420 LAB_0017d3df: JMP 0x0017d402 LAB_0017d3e1: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x20] JGE 0x0017d400 CALL 0x00124040 MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017d420 LAB_0017d400: JMP 0x0017d402 LAB_0017d402: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX CALL 0x00124040 MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0017d420: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xf0 POP RBP RET
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5) { int *piVar1; int local_f4; int local_f0; int local_ec; int aiStack_e8 [32]; byte *local_68; int local_5c; long local_58; long local_50; long local_48; int local_40; int local_3c; long *local_38; long local_30; long local_28; int local_1c; byte *local_18; byte *local_10; *param_5 = 0; local_48 = param_3; if (0 < param_3) { local_48 = -param_3; } local_50 = param_4; if (0 < param_4) { local_50 = -param_4; } local_18 = param_1; if (local_50 < local_48) { local_48 = local_50; } while ((PTR_ctype_latin1_0037bd40[(ulong)*local_18 + 1] & 8) != 0) { local_18 = local_18 + 1; } local_3c = -1; if (*local_18 == 0x2b) { local_18 = local_18 + 1; } else if (*local_18 == 0x2d) { local_18 = local_18 + 1; local_3c = 1; } local_68 = local_18; for (; *local_18 == 0x30; local_18 = local_18 + 1) { } local_40 = 0; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_1c = param_2; while( true ) { if (((char)*local_18 < '0') || ('9' < (char)*local_18)) { if (((char)*local_18 < 'A') || ('Z' < (char)*local_18)) { if (((char)*local_18 < 'a') || ('z' < (char)*local_18)) { local_f4 = 0x7f; } else { local_f4 = (char)*local_18 + -0x57; } local_f0 = local_f4; } else { local_f0 = (char)*local_18 + -0x37; } local_ec = local_f0; } else { local_ec = (char)*local_18 + -0x30; } aiStack_e8[local_40] = local_ec; if (local_1c <= local_ec || 0x13 < local_40) break; local_40 = local_40 + 1; local_18 = local_18 + 1; } if (local_68 == local_18) { piVar1 = __errno_location(); *piVar1 = 0x21; local_10 = (byte *)0x0; } else { local_58 = 0; local_50 = -1; while (local_40 = local_40 + -1, 0 < local_40) { local_5c = aiStack_e8[local_40]; if (-local_5c < local_48) { piVar1 = __errno_location(); *piVar1 = 0x22; return (byte *)0x0; } local_48 = (local_48 + local_5c) / (long)local_1c; local_58 = local_5c * local_50 + local_58; local_50 = local_1c * local_50; } if (local_40 == 0) { local_5c = aiStack_e8[0]; if (-aiStack_e8[0] < local_48) { piVar1 = __errno_location(); *piVar1 = 0x22; return (byte *)0x0; } local_58 = aiStack_e8[0] * local_50 + local_58; } if (local_3c < 0) { if ((local_58 < -0x7fffffffffffffff) || (local_58 = -local_58, local_30 < local_58)) { piVar1 = __errno_location(); *piVar1 = 0x22; return (byte *)0x0; } } else if (local_58 < local_28) { piVar1 = __errno_location(); *piVar1 = 0x22; return (byte *)0x0; } *local_38 = local_58; piVar1 = __errno_location(); *piVar1 = 0; local_10 = local_18; } return local_10; }
21,991
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O3
c
str2int: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rdx, %r9 movq $0x0, (%r8) movq %rdx, %rax negq %rax cmovsq %rdx, %rax movq %rcx, %rdx negq %rdx cmovnsq %rcx, %rdx leaq 0x2bbef5(%rip), %r10 # 0x319ca0 movq 0x40(%r10), %r11 movzbl (%rdi), %r10d incq %rdi testb $0x8, 0x1(%r11,%r10) jne 0x5ddaf negq %rax cmpq %rax, %rdx cmovlq %rdx, %rax cmpl $0x2b, %r10d je 0x5dddc cmpl $0x2d, %r10d jne 0x5ddd9 xorl %r10d, %r10d jmp 0x5dddf decq %rdi movb $0x1, %r10b leaq -0x1(%rdi), %rbx movb 0x1(%rbx), %r14b incq %rbx cmpb $0x30, %r14b je 0x5dde3 xorl %r11d, %r11d xorl %edx, %edx leal -0x30(%r14), %r15d cmpb $0x9, %r15b ja 0x5de05 movzbl %r15b, %r15d jmp 0x5de31 leal -0x41(%r14), %r15d cmpb $0x19, %r15b ja 0x5de19 movzbl %r14b, %r15d addl $-0x37, %r15d jmp 0x5de31 leal -0x61(%r14), %r12d movl $0x7f, %r15d cmpb $0x19, %r12b ja 0x5de31 movzbl %r14b, %r15d addl $-0x57, %r15d movl %r15d, -0xa0(%rbp,%rdx,4) cmpl %esi, %r15d jge 0x5de53 cmpq $0x13, %rdx ja 0x5de53 incq %rdx movb 0x1(%rbx), %r14b incq %rbx incl %r11d jmp 0x5ddf5 cmpq %rdi, %rbx je 0x5de9b cmpq $0x2, %rdx jb 0x5dea3 movslq %esi, %r14 movq $-0x1, %rdi xorl %esi, %esi decl %r11d movslq -0xa0(%rbp,%r11,4), %r15 movq %r15, %rdx negq %rdx cmpq %rdx, %rax jg 0x5dede addq %r15, %rax cqto idivq %r14 imulq %rdi, %r15 addq %r15, %rsi imulq %r14, %rdi cmpl $0x1, %r11d jg 0x5de6a jmp 0x5deb0 movl $0x21, %r14d jmp 0x5dee4 xorl %esi, %esi decl %edx jne 0x5dec9 movq $-0x1, %rdi movslq -0xa0(%rbp), %rdx movq %rdx, %r11 negq %r11 cmpq %r11, %rax jg 0x5dede imulq %rdx, %rdi addq %rdi, %rsi testb %r10b, %r10b je 0x5df01 negq %rsi seto %al cmpq %rcx, %rsi setg %cl orb %al, %cl je 0x5df06 movl $0x22, %r14d xorl %ebx, %ebx callq 0x24050 movl %r14d, (%rax) movq %rbx, %rax addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq %r9, %rsi jl 0x5dede movq %rsi, (%r8) xorl %r14d, %r14d jmp 0x5dee6 nop
str2int: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 80h mov r9, rdx mov qword ptr [r8], 0 mov rax, rdx neg rax cmovs rax, rdx mov rdx, rcx neg rdx cmovns rdx, rcx lea r10, my_charset_latin1 mov r11, [r10+40h] loc_5DDAF: movzx r10d, byte ptr [rdi] inc rdi test byte ptr [r11+r10+1], 8 jnz short loc_5DDAF neg rax cmp rdx, rax cmovl rax, rdx cmp r10d, 2Bh ; '+' jz short loc_5DDDC cmp r10d, 2Dh ; '-' jnz short loc_5DDD9 xor r10d, r10d jmp short loc_5DDDF loc_5DDD9: dec rdi loc_5DDDC: mov r10b, 1 loc_5DDDF: lea rbx, [rdi-1] loc_5DDE3: mov r14b, [rbx+1] inc rbx cmp r14b, 30h ; '0' jz short loc_5DDE3 xor r11d, r11d xor edx, edx loc_5DDF5: lea r15d, [r14-30h] cmp r15b, 9 ja short loc_5DE05 movzx r15d, r15b jmp short loc_5DE31 loc_5DE05: lea r15d, [r14-41h] cmp r15b, 19h ja short loc_5DE19 movzx r15d, r14b add r15d, 0FFFFFFC9h jmp short loc_5DE31 loc_5DE19: lea r12d, [r14-61h] mov r15d, 7Fh cmp r12b, 19h ja short loc_5DE31 movzx r15d, r14b add r15d, 0FFFFFFA9h loc_5DE31: mov [rbp+rdx*4+var_A0], r15d cmp r15d, esi jge short loc_5DE53 cmp rdx, 13h ja short loc_5DE53 inc rdx mov r14b, [rbx+1] inc rbx inc r11d jmp short loc_5DDF5 loc_5DE53: cmp rbx, rdi jz short loc_5DE9B cmp rdx, 2 jb short loc_5DEA3 movsxd r14, esi mov rdi, 0FFFFFFFFFFFFFFFFh xor esi, esi loc_5DE6A: dec r11d movsxd r15, [rbp+r11*4+var_A0] mov rdx, r15 neg rdx cmp rax, rdx jg short loc_5DEDE add rax, r15 cqo idiv r14 imul r15, rdi add rsi, r15 imul rdi, r14 cmp r11d, 1 jg short loc_5DE6A jmp short loc_5DEB0 loc_5DE9B: mov r14d, 21h ; '!' jmp short loc_5DEE4 loc_5DEA3: xor esi, esi dec edx jnz short loc_5DEC9 mov rdi, 0FFFFFFFFFFFFFFFFh loc_5DEB0: movsxd rdx, [rbp+var_A0] mov r11, rdx neg r11 cmp rax, r11 jg short loc_5DEDE imul rdi, rdx add rsi, rdi loc_5DEC9: test r10b, r10b jz short loc_5DF01 neg rsi seto al cmp rsi, rcx setnle cl or cl, al jz short loc_5DF06 loc_5DEDE: mov r14d, 22h ; '"' loc_5DEE4: xor ebx, ebx loc_5DEE6: call ___errno_location mov [rax], r14d mov rax, rbx add rsp, 80h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_5DF01: cmp rsi, r9 jl short loc_5DEDE loc_5DF06: mov [r8], rsi xor r14d, r14d jmp short loc_5DEE6
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // rdx long long v8; // r10 long long v9; // rax char v10; // r10 long long v11; // rbx unsigned __int8 v12; // r14 long long v13; // r11 unsigned long long i; // rdx int v15; // r15d long long v16; // r14 long long v17; // rsi long long v18; // r15 int v19; // r14d _DWORD v21[40]; // [rsp+0h] [rbp-A0h] *a5 = 0LL; v6 = -a3; if ( a3 > 0 ) v6 = a3; v7 = -a4; if ( a4 <= 0 ) v7 = a4; do v8 = *(unsigned __int8 *)a1++; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 ); v9 = -v6; if ( v7 < v9 ) v9 = v7; if ( (_DWORD)v8 != 43 ) { if ( (_DWORD)v8 == 45 ) { v10 = 0; goto LABEL_13; } --a1; } v10 = 1; LABEL_13: v11 = a1 - 1; do v12 = *(_BYTE *)++v11; while ( v12 == 48 ); LODWORD(v13) = 0; for ( i = 0LL; ; ++i ) { LOBYTE(v15) = v12 - 48; if ( (unsigned __int8)(v12 - 48) > 9u ) { if ( (unsigned __int8)(v12 - 65) > 0x19u ) { v15 = 127; if ( (unsigned __int8)(v12 - 97) <= 0x19u ) v15 = v12 - 87; } else { v15 = v12 - 55; } } else { v15 = (unsigned __int8)v15; } v21[i] = v15; if ( v15 >= a2 || i > 0x13 ) break; v12 = *(_BYTE *)++v11; LODWORD(v13) = v13 + 1; } if ( v11 != a1 ) { if ( i >= 2 ) { v16 = a2; a1 = -1LL; v17 = 0LL; while ( 1 ) { v13 = (unsigned int)(v13 - 1); v18 = (int)v21[v13]; if ( v9 > -v18 ) goto LABEL_38; v9 = (v18 + v9) / v16; v17 += a1 * v18; a1 *= v16; if ( (int)v13 <= 1 ) goto LABEL_34; } } v17 = 0LL; if ( (_DWORD)i == 1 ) { a1 = -1LL; LABEL_34: if ( v9 > -(long long)v21[0] ) goto LABEL_38; a1 *= v21[0]; v17 += a1; } if ( v10 ) { v17 = -v17; if ( __OFSUB__(v17, 1LL) || v17 > a4 ) { LABEL_38: v19 = 34; goto LABEL_39; } } else if ( v17 < a3 ) { goto LABEL_38; } *a5 = v17; v19 = 0; goto LABEL_40; } v19 = 33; LABEL_39: v11 = 0LL; LABEL_40: *(_DWORD *)__errno_location(a1) = v19; return v11; }
str2int: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x80 MOV R9,RDX MOV qword ptr [R8],0x0 MOV RAX,RDX NEG RAX CMOVS RAX,RDX MOV RDX,RCX NEG RDX CMOVNS RDX,RCX LEA R10,[0x419ca0] MOV R11,qword ptr [R10 + 0x40] LAB_0015ddaf: MOVZX R10D,byte ptr [RDI] INC RDI TEST byte ptr [R11 + R10*0x1 + 0x1],0x8 JNZ 0x0015ddaf NEG RAX CMP RDX,RAX CMOVL RAX,RDX CMP R10D,0x2b JZ 0x0015dddc CMP R10D,0x2d JNZ 0x0015ddd9 XOR R10D,R10D JMP 0x0015dddf LAB_0015ddd9: DEC RDI LAB_0015dddc: MOV R10B,0x1 LAB_0015dddf: LEA RBX,[RDI + -0x1] LAB_0015dde3: MOV R14B,byte ptr [RBX + 0x1] INC RBX CMP R14B,0x30 JZ 0x0015dde3 XOR R11D,R11D XOR EDX,EDX LAB_0015ddf5: LEA R15D,[R14 + -0x30] CMP R15B,0x9 JA 0x0015de05 MOVZX R15D,R15B JMP 0x0015de31 LAB_0015de05: LEA R15D,[R14 + -0x41] CMP R15B,0x19 JA 0x0015de19 MOVZX R15D,R14B ADD R15D,-0x37 JMP 0x0015de31 LAB_0015de19: LEA R12D,[R14 + -0x61] MOV R15D,0x7f CMP R12B,0x19 JA 0x0015de31 MOVZX R15D,R14B ADD R15D,-0x57 LAB_0015de31: MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D CMP R15D,ESI JGE 0x0015de53 CMP RDX,0x13 JA 0x0015de53 INC RDX MOV R14B,byte ptr [RBX + 0x1] INC RBX INC R11D JMP 0x0015ddf5 LAB_0015de53: CMP RBX,RDI JZ 0x0015de9b CMP RDX,0x2 JC 0x0015dea3 MOVSXD R14,ESI MOV RDI,-0x1 XOR ESI,ESI LAB_0015de6a: DEC R11D MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0] MOV RDX,R15 NEG RDX CMP RAX,RDX JG 0x0015dede ADD RAX,R15 CQO IDIV R14 IMUL R15,RDI ADD RSI,R15 IMUL RDI,R14 CMP R11D,0x1 JG 0x0015de6a JMP 0x0015deb0 LAB_0015de9b: MOV R14D,0x21 JMP 0x0015dee4 LAB_0015dea3: XOR ESI,ESI DEC EDX JNZ 0x0015dec9 MOV RDI,-0x1 LAB_0015deb0: MOVSXD RDX,dword ptr [RBP + -0xa0] MOV R11,RDX NEG R11 CMP RAX,R11 JG 0x0015dede IMUL RDI,RDX ADD RSI,RDI LAB_0015dec9: TEST R10B,R10B JZ 0x0015df01 NEG RSI SETO AL CMP RSI,RCX SETG CL OR CL,AL JZ 0x0015df06 LAB_0015dede: MOV R14D,0x22 LAB_0015dee4: XOR EBX,EBX LAB_0015dee6: CALL 0x00124050 MOV dword ptr [RAX],R14D MOV RAX,RBX ADD RSP,0x80 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0015df01: CMP RSI,R9 JL 0x0015dede LAB_0015df06: MOV qword ptr [R8],RSI XOR R14D,R14D JMP 0x0015dee6
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5) { long lVar1; int *piVar2; ulong uVar3; byte *pbVar4; long lVar5; byte *pbVar6; long lVar7; ulong uVar8; byte bVar9; int iVar10; uint uVar11; long lVar12; bool bVar13; uint local_a8 [32]; *param_5 = 0; lVar5 = -param_3; if (0 < param_3) { lVar5 = param_3; } lVar7 = -param_4; if (param_4 < 1) { lVar7 = param_4; } do { pbVar4 = param_1; bVar9 = *pbVar4; param_1 = pbVar4 + 1; } while ((PTR_ctype_latin1_00419ce0[(ulong)bVar9 + 1] & 8) != 0); lVar1 = -lVar5; if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) { lVar1 = lVar7; } pbVar6 = param_1; if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) { bVar13 = true; } else { bVar13 = false; pbVar6 = param_1; } pbVar4 = pbVar6 + -1; do { bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; } while (bVar9 == 0x30); uVar8 = 0; uVar3 = 0; while( true ) { if ((byte)(bVar9 - 0x30) < 10) { uVar11 = (uint)(byte)(bVar9 - 0x30); } else if ((byte)(bVar9 + 0xbf) < 0x1a) { uVar11 = bVar9 - 0x37; } else { uVar11 = 0x7f; if ((byte)(bVar9 + 0x9f) < 0x1a) { uVar11 = bVar9 - 0x57; } } local_a8[uVar3] = uVar11; if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break; uVar3 = uVar3 + 1; bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; uVar8 = (ulong)((int)uVar8 + 1); } if (pbVar4 == pbVar6) { iVar10 = 0x21; } else { if (uVar3 < 2) { lVar5 = 0; if ((int)uVar3 == 1) { lVar7 = -1; goto LAB_0015deb0; } LAB_0015dec9: if (bVar13) { lVar7 = -lVar5; bVar13 = -param_4 == lVar5; lVar5 = lVar7; if (bVar13 || lVar7 < param_4) { LAB_0015df06: *param_5 = lVar5; iVar10 = 0; goto LAB_0015dee6; } } else if (param_3 <= lVar5) goto LAB_0015df06; } else { lVar7 = -1; lVar5 = 0; do { uVar11 = (int)uVar8 - 1; uVar8 = (ulong)uVar11; lVar12 = (long)(int)local_a8[uVar8]; if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_0015dede; lVar1 = (lVar1 + lVar12) / (long)param_2; lVar5 = lVar5 + lVar12 * lVar7; lVar7 = lVar7 * param_2; } while (1 < (int)uVar11); LAB_0015deb0: lVar12 = (long)(int)local_a8[0]; if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) { lVar5 = lVar5 + lVar7 * lVar12; goto LAB_0015dec9; } } LAB_0015dede: iVar10 = 0x22; } pbVar4 = (byte *)0x0; LAB_0015dee6: piVar2 = __errno_location(); *piVar2 = iVar10; return pbVar4; }
21,992
ImPlot3D::AddColormap(char const*, ImVec4 const*, int, bool)
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
ImPlot3DColormap AddColormap(const char* name, const ImVec4* colormap, int size, bool qual) { ImPlot3DContext& gp = *GImPlot3D; IM_ASSERT_USER_ERROR(size > 1, "The colormap size must be greater than 1!"); IM_ASSERT_USER_ERROR(gp.ColormapData.GetIndex(name) == -1, "The colormap name has already been used!"); ImVector<ImU32> buffer; buffer.resize(size); for (int i = 0; i < size; i++) buffer[i] = ImGui::ColorConvertFloat4ToU32(colormap[i]); return gp.ColormapData.Append(name, buffer.Data, size, qual); }
O0
cpp
ImPlot3D::AddColormap(char const*, ImVec4 const*, int, bool): subq $0x68, %rsp movb %cl, %al movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movl %edx, 0x54(%rsp) andb $0x1, %al movb %al, 0x53(%rsp) movq 0x5b8cd7(%rip), %rax # 0x68f638 movq %rax, 0x48(%rsp) cmpl $0x1, 0x54(%rsp) jg 0xd6981 leaq 0x4fbf62(%rip), %rdi # 0x5d28d6 callq 0x4f7220 testb $0x1, %al jne 0xd697f jmp 0xd6981 jmp 0xd6981 jmp 0xd6983 jmp 0xd6985 movq 0x48(%rsp), %rdi addq $0x208, %rdi # imm = 0x208 movq 0x60(%rsp), %rsi callq 0xd9cc0 cmpl $-0x1, %eax je 0xd69b4 leaq 0x4fbf59(%rip), %rdi # 0x5d2900 callq 0x4f7220 testb $0x1, %al jne 0xd69b2 jmp 0xd69b4 jmp 0xd69b4 jmp 0xd69b6 leaq 0x38(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xd9d10 movq 0x20(%rsp), %rdi movl 0x54(%rsp), %esi callq 0xd9d30 jmp 0xd69d5 movl $0x0, 0x28(%rsp) movl 0x28(%rsp), %eax cmpl 0x54(%rsp), %eax jge 0xd6a4a movq 0x58(%rsp), %rdi movslq 0x28(%rsp), %rax shlq $0x4, %rax addq %rax, %rdi callq 0x4f4320 movl %eax, 0x1c(%rsp) jmp 0xd6a03 movl 0x28(%rsp), %esi leaq 0x38(%rsp), %rdi callq 0xd9d80 movq %rax, 0x10(%rsp) jmp 0xd6a18 movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movl %ecx, (%rax) movl 0x28(%rsp), %eax addl $0x1, %eax movl %eax, 0x28(%rsp) jmp 0xd69dd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0xd9f70 jmp 0xd6a8c movq 0x48(%rsp), %rdi addq $0x208, %rdi # imm = 0x208 movq 0x60(%rsp), %rsi movq 0x40(%rsp), %rdx movl 0x54(%rsp), %ecx movzbl 0x53(%rsp), %r8d andl $0x1, %r8d callq 0xd9da0 movl %eax, 0xc(%rsp) jmp 0xd6a79 leaq 0x38(%rsp), %rdi callq 0xd9f70 movl 0xc(%rsp), %eax addq $0x68, %rsp retq movq 0x30(%rsp), %rdi callq 0x13540 nopw %cs:(%rax,%rax)
_ZN8ImPlot3D11AddColormapEPKcPK6ImVec4ib: sub rsp, 68h mov al, cl mov [rsp+68h+var_8], rdi mov [rsp+68h+var_14+4], rsi mov dword ptr [rsp+68h+var_14], edx and al, 1 mov [rsp+68h+var_15], al mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D mov [rsp+68h+var_20], rax cmp dword ptr [rsp+68h+var_14], 1 jg short loc_D6981 lea rdi, aTheColormapSiz; "The colormap size must be greater than "... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) test al, 1 jnz short loc_D697F jmp short loc_D6981 loc_D697F: jmp short $+2 loc_D6981: jmp short $+2 loc_D6983: jmp short $+2 loc_D6985: mov rdi, [rsp+68h+var_20] add rdi, 208h; this mov rsi, [rsp+68h+var_8]; char * call _ZNK20ImPlot3DColormapData8GetIndexEPKc; ImPlot3DColormapData::GetIndex(char const*) cmp eax, 0FFFFFFFFh jz short loc_D69B4 lea rdi, aTheColormapNam; "The colormap name has already been used"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) test al, 1 jnz short loc_D69B2 jmp short loc_D69B4 loc_D69B2: jmp short $+2 loc_D69B4: jmp short $+2 loc_D69B6: lea rdi, [rsp+68h+var_30] mov [rsp+68h+var_48], rdi call _ZN8ImVectorIjEC2Ev; ImVector<uint>::ImVector(void) mov rdi, [rsp+68h+var_48] mov esi, dword ptr [rsp+68h+var_14]; ImVec4 * call _ZN8ImVectorIjE6resizeEi; ImVector<uint>::resize(int) jmp short $+2 loc_D69D5: mov [rsp+68h+var_40], 0 loc_D69DD: mov eax, [rsp+68h+var_40] cmp eax, dword ptr [rsp+68h+var_14] jge short loc_D6A4A mov rdi, [rsp+68h+var_14+4] movsxd rax, [rsp+68h+var_40] shl rax, 4 add rdi, rax; this call _ZN5ImGui23ColorConvertFloat4ToU32ERK6ImVec4; ImGui::ColorConvertFloat4ToU32(ImVec4 const&) mov [rsp+68h+var_4C], eax jmp short $+2 loc_D6A03: mov esi, [rsp+68h+var_40] lea rdi, [rsp+68h+var_30] call _ZN8ImVectorIjEixEi; ImVector<uint>::operator[](int) mov [rsp+68h+var_58], rax jmp short $+2 loc_D6A18: mov rax, [rsp+68h+var_58] mov ecx, [rsp+68h+var_4C] mov [rax], ecx mov eax, [rsp+68h+var_40] add eax, 1 mov [rsp+68h+var_40], eax jmp short loc_D69DD mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30] call _ZN8ImVectorIjED2Ev; ImVector<uint>::~ImVector() jmp short loc_D6A8C loc_D6A4A: mov rdi, [rsp+68h+var_20] add rdi, 208h; this mov rsi, [rsp+68h+var_8]; char * mov rdx, [rsp+68h+var_28]; unsigned int * mov ecx, dword ptr [rsp+68h+var_14]; int movzx r8d, [rsp+68h+var_15] and r8d, 1; bool call _ZN20ImPlot3DColormapData6AppendEPKcPKjib; ImPlot3DColormapData::Append(char const*,uint const*,int,bool) mov [rsp+68h+var_5C], eax jmp short $+2 loc_D6A79: lea rdi, [rsp+68h+var_30] call _ZN8ImVectorIjED2Ev; ImVector<uint>::~ImVector() mov eax, [rsp+68h+var_5C] add rsp, 68h retn loc_D6A8C: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long ImPlot3D::AddColormap(ImPlot3D *this, const char *a2, const ImVec4 *a3, char a4) { unsigned long long v4; // rsi unsigned int v6; // [rsp+Ch] [rbp-5Ch] int v7; // [rsp+1Ch] [rbp-4Ch] int i; // [rsp+28h] [rbp-40h] _BYTE v9[8]; // [rsp+38h] [rbp-30h] BYREF unsigned int *v10; // [rsp+40h] [rbp-28h] long long v11; // [rsp+48h] [rbp-20h] char v12; // [rsp+53h] [rbp-15h] int v13[3]; // [rsp+54h] [rbp-14h] char *v14; // [rsp+60h] [rbp-8h] v14 = (char *)this; *(_QWORD *)&v13[1] = a2; v13[0] = (int)a3; v12 = a4 & 1; v11 = ImPlot3D::GImPlot3D; if ( (int)a3 <= 1 ) ImGui::ErrorLog((ImGui *)"The colormap size must be greater than 1!", a2); if ( (unsigned int)ImPlot3DColormapData::GetIndex((ImPlot3DColormapData *)(v11 + 520), v14) != -1 ) ImGui::ErrorLog((ImGui *)"The colormap name has already been used!", v14); ImVector<unsigned int>::ImVector(); v4 = (unsigned int)v13[0]; ImVector<unsigned int>::resize(v9, (unsigned int)v13[0]); for ( i = 0; i < v13[0]; ++i ) { v7 = ImGui::ColorConvertFloat4ToU32((ImGui *)(16LL * i + *(_QWORD *)&v13[1]), (const ImVec4 *)v4); v4 = (unsigned int)i; *(_DWORD *)ImVector<unsigned int>::operator[](v9, (unsigned int)i) = v7; } v6 = ImPlot3DColormapData::Append((ImPlot3DColormapData *)(v11 + 520), v14, v10, v13[0], v12 & 1); ImVector<unsigned int>::~ImVector(v9); return v6; }
AddColormap: SUB RSP,0x68 MOV AL,CL MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV dword ptr [RSP + 0x54],EDX AND AL,0x1 MOV byte ptr [RSP + 0x53],AL MOV RAX,qword ptr [0x0078f638] MOV qword ptr [RSP + 0x48],RAX CMP dword ptr [RSP + 0x54],0x1 JG 0x001d6981 LEA RDI,[0x6d28d6] CALL 0x005f7220 TEST AL,0x1 JNZ 0x001d697f JMP 0x001d6981 LAB_001d697f: JMP 0x001d6981 LAB_001d6981: JMP 0x001d6983 LAB_001d6983: JMP 0x001d6985 LAB_001d6985: MOV RDI,qword ptr [RSP + 0x48] ADD RDI,0x208 MOV RSI,qword ptr [RSP + 0x60] CALL 0x001d9cc0 CMP EAX,-0x1 JZ 0x001d69b4 LEA RDI,[0x6d2900] CALL 0x005f7220 TEST AL,0x1 JNZ 0x001d69b2 JMP 0x001d69b4 LAB_001d69b2: JMP 0x001d69b4 LAB_001d69b4: JMP 0x001d69b6 LAB_001d69b6: LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x20],RDI CALL 0x001d9d10 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x54] LAB_001d69ce: CALL 0x001d9d30 JMP 0x001d69d5 LAB_001d69d5: MOV dword ptr [RSP + 0x28],0x0 LAB_001d69dd: MOV EAX,dword ptr [RSP + 0x28] CMP EAX,dword ptr [RSP + 0x54] JGE 0x001d6a4a MOV RDI,qword ptr [RSP + 0x58] MOVSXD RAX,dword ptr [RSP + 0x28] SHL RAX,0x4 ADD RDI,RAX CALL 0x005f4320 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001d6a03 LAB_001d6a03: MOV ESI,dword ptr [RSP + 0x28] LEA RDI,[RSP + 0x38] CALL 0x001d9d80 MOV qword ptr [RSP + 0x10],RAX JMP 0x001d6a18 LAB_001d6a18: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x1c] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0x28] ADD EAX,0x1 MOV dword ptr [RSP + 0x28],EAX JMP 0x001d69dd LAB_001d6a4a: MOV RDI,qword ptr [RSP + 0x48] ADD RDI,0x208 MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RSP + 0x54] MOVZX R8D,byte ptr [RSP + 0x53] AND R8D,0x1 CALL 0x001d9da0 LAB_001d6a73: MOV dword ptr [RSP + 0xc],EAX JMP 0x001d6a79 LAB_001d6a79: LEA RDI,[RSP + 0x38] CALL 0x001d9f70 MOV EAX,dword ptr [RSP + 0xc] ADD RSP,0x68 RET
/* ImPlot3D::AddColormap(char const*, ImVec4 const*, int, bool) */ int4 ImPlot3D::AddColormap(char *param_1,ImVec4 *param_2,int param_3,bool param_4) { int iVar1; int4 uVar2; int4 *puVar3; int local_40; ImVector<unsigned_int> local_30 [8]; uint *local_28; long local_20; byte local_15; int local_14; ImVec4 *local_10; char *local_8; local_20 = GImPlot3D; local_15 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; if (param_3 < 2) { ImGui::ErrorLog("The colormap size must be greater than 1!"); } iVar1 = ImPlot3DColormapData::GetIndex((ImPlot3DColormapData *)(local_20 + 0x208),local_8); if (iVar1 != -1) { ImGui::ErrorLog("The colormap name has already been used!"); } ImVector<unsigned_int>::ImVector(local_30); /* try { // try from 001d69ce to 001d6a72 has its CatchHandler @ 001d6a30 */ ImVector<unsigned_int>::resize(local_30,local_14); for (local_40 = 0; local_40 < local_14; local_40 = local_40 + 1) { uVar2 = ImGui::ColorConvertFloat4ToU32(local_10 + (long)local_40 * 0x10); puVar3 = (int4 *)ImVector<unsigned_int>::operator[](local_30,local_40); *puVar3 = uVar2; } uVar2 = ImPlot3DColormapData::Append ((ImPlot3DColormapData *)(local_20 + 0x208),local_8,local_28,local_14, (bool)(local_15 & 1)); ImVector<unsigned_int>::~ImVector(local_30); return uVar2; }
21,993
my_caseup_ucs2
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= my_ucs2_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) { my_toupper_ucs2(uni_plane, &wc); if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_caseup_ucs2: movq %rdx, %rax cmpq $0x2, %rdx jl 0x48f0b pushq %rbp movq %rsp, %rbp leaq (%rsi,%rax), %rdx addq %rcx, %r8 movq 0x78(%rdi), %rdi addq $0x2, %rcx movzbl (%rsi), %r9d movzbl 0x1(%rsi), %r10d movq 0x8(%rdi), %r11 movq (%r11,%r9,8), %r11 testq %r11, %r11 je 0x48ed2 leaq (%r10,%r10,2), %r9 movl (%r11,%r9,4), %r9d jmp 0x48ed9 shll $0x8, %r9d orq %r10, %r9 cmpq %r8, %rcx ja 0x48f0a cmpl $0xffff, %r9d # imm = 0xFFFF ja 0x48f0a rolw $0x8, %r9w movw %r9w, -0x2(%rcx) leaq 0x2(%rsi), %r9 cmpq %rdx, %r9 jae 0x48f0a addq $0x4, %rsi addq $0x2, %rcx cmpq %rdx, %rsi movq %r9, %rsi jbe 0x48eb2 popq %rbp retq
my_caseup_ucs2: mov rax, rdx cmp rdx, 2 jl short locret_48F0B push rbp mov rbp, rsp lea rdx, [rsi+rax] add r8, rcx mov rdi, [rdi+78h] add rcx, 2 loc_48EB2: movzx r9d, byte ptr [rsi] movzx r10d, byte ptr [rsi+1] mov r11, [rdi+8] mov r11, [r11+r9*8] test r11, r11 jz short loc_48ED2 lea r9, [r10+r10*2] mov r9d, [r11+r9*4] jmp short loc_48ED9 loc_48ED2: shl r9d, 8 or r9, r10 loc_48ED9: cmp rcx, r8 ja short loc_48F0A cmp r9d, 0FFFFh ja short loc_48F0A rol r9w, 8 mov [rcx-2], r9w lea r9, [rsi+2] cmp r9, rdx jnb short loc_48F0A add rsi, 4 add rcx, 2 cmp rsi, rdx mov rsi, r9 jbe short loc_48EB2 loc_48F0A: pop rbp locret_48F0B: retn
long long my_caseup_ucs2(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5) { long long result; // rax unsigned long long v6; // rdx unsigned long long v7; // r8 long long v8; // rdi unsigned long long v9; // rcx long long v10; // r9 long long v11; // r10 long long v12; // r11 unsigned int v13; // r9d bool v14; // cc result = a3; if ( a3 >= 2 ) { v6 = (unsigned long long)&a2[a3]; v7 = a4 + a5; v8 = *(_QWORD *)(a1 + 120); v9 = a4 + 2; do { v10 = *a2; v11 = a2[1]; v12 = *(_QWORD *)(*(_QWORD *)(v8 + 8) + 8 * v10); if ( v12 ) v13 = *(_DWORD *)(v12 + 12 * v11); else v13 = v11 | ((_DWORD)v10 << 8); if ( v9 > v7 ) break; if ( v13 > 0xFFFF ) break; *(_WORD *)(v9 - 2) = __ROL2__(v13, 8); if ( (unsigned long long)(a2 + 2) >= v6 ) break; v9 += 2LL; v14 = (unsigned long long)(a2 + 4) <= v6; a2 += 2; } while ( v14 ); } return result; }
my_caseup_ucs2: MOV RAX,RDX CMP RDX,0x2 JL 0x00148f0b PUSH RBP MOV RBP,RSP LEA RDX,[RSI + RAX*0x1] ADD R8,RCX MOV RDI,qword ptr [RDI + 0x78] ADD RCX,0x2 LAB_00148eb2: MOVZX R9D,byte ptr [RSI] MOVZX R10D,byte ptr [RSI + 0x1] MOV R11,qword ptr [RDI + 0x8] MOV R11,qword ptr [R11 + R9*0x8] TEST R11,R11 JZ 0x00148ed2 LEA R9,[R10 + R10*0x2] MOV R9D,dword ptr [R11 + R9*0x4] JMP 0x00148ed9 LAB_00148ed2: SHL R9D,0x8 OR R9,R10 LAB_00148ed9: CMP RCX,R8 JA 0x00148f0a CMP R9D,0xffff JA 0x00148f0a ROL R9W,0x8 MOV word ptr [RCX + -0x2],R9W LEA R9,[RSI + 0x2] CMP R9,RDX JNC 0x00148f0a ADD RSI,0x4 ADD RCX,0x2 CMP RSI,RDX MOV RSI,R9 JBE 0x00148eb2 LAB_00148f0a: POP RBP LAB_00148f0b: RET
void my_caseup_ucs2(long param_1,byte *param_2,long param_3,long param_4,long param_5) { long lVar1; long lVar2; ulong uVar3; byte *pbVar4; byte *pbVar5; uint uVar6; if (1 < param_3) { lVar1 = *(long *)(param_1 + 0x78); uVar3 = param_4 + 2; pbVar4 = param_2; while( true ) { lVar2 = *(long *)(*(long *)(lVar1 + 8) + (ulong)*pbVar4 * 8); if (lVar2 == 0) { uVar6 = (uint)CONCAT11(*pbVar4,pbVar4[1]); } else { uVar6 = *(uint *)(lVar2 + (ulong)pbVar4[1] * 0xc); } if (((ulong)(param_5 + param_4) < uVar3) || (0xffff < uVar6)) break; *(ushort *)(uVar3 - 2) = (ushort)uVar6 << 8 | (ushort)uVar6 >> 8; if (param_2 + param_3 <= pbVar4 + 2) { return; } pbVar5 = pbVar4 + 4; uVar3 = uVar3 + 2; pbVar4 = pbVar4 + 2; if (param_2 + param_3 < pbVar5) { return; } } } return; }
21,994
language::find(char const*)
untodesu[P]voxelius/game/client/language.cc
LanguageIterator language::find(const char *ietf) { const auto it = ietf_map.find(ietf); if(it != ietf_map.cend()) return it->second; return manifest.cend(); }
O2
cpp
language::find(char const*): pushq %rbx subq $0x30, %rsp movq %rdi, %rsi leaq 0x10(%rsp), %rbx leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x2a464 leaq 0x2058c7(%rip), %rdi # 0x255248 movq %rbx, %rsi callq 0x50a7a movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x272a8 leaq 0x28(%rbx), %rax testq %rbx, %rbx leaq 0x20585c(%rip), %rcx # 0x255200 cmovneq %rax, %rcx movq (%rcx), %rax addq $0x30, %rsp popq %rbx retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x272a8 movq %rbx, %rdi callq 0x27040
_ZN8language4findEPKc: push rbx sub rsp, 30h mov rsi, rdi lea rbx, [rsp+38h+var_28] lea rdx, [rsp+38h+var_29] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, _ZL8ietf_mapB5cxx11; ietf_map mov rsi, rbx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N9__gnu_cxx17__normal_iteratorIPK12LanguageInfoSt6vectorISA_SaISA_EEEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>,std::allocator<std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov rbx, rax lea rdi, [rsp+38h+var_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rax, [rbx+28h] test rbx, rbx lea rcx, _ZL8manifest+8; manifest cmovnz rcx, rax mov rax, [rcx] add rsp, 30h pop rbx retn mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long language::find(language *this, const char *a2) { long long v2; // rbx char *v3; // rcx _QWORD v5[5]; // [rsp+10h] [rbp-28h] BYREF std::string::basic_string<std::allocator<char>>(v5, (long long)this); v2 = std::_Hashtable<std::string,std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>,std::allocator<std::pair<std::string const,__gnu_cxx::__normal_iterator<LanguageInfo const*,std::vector<LanguageInfo>>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( &ietf_map[abi:cxx11], v5); std::string::~string(v5); v3 = (char *)&manifest + 8; if ( v2 ) v3 = (char *)(v2 + 40); return *(_QWORD *)v3; }
find: PUSH RBX SUB RSP,0x30 MOV RSI,RDI LEA RBX,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,RBX CALL 0x0012a464 LAB_0014f97a: LEA RDI,[0x355248] MOV RSI,RBX CALL 0x00150a7a LAB_0014f989: MOV RBX,RAX LEA RDI,[RSP + 0x10] CALL 0x001272a8 LEA RAX,[RBX + 0x28] TEST RBX,RBX LEA RCX,[0x355200] CMOVNZ RCX,RAX MOV RAX,qword ptr [RCX] ADD RSP,0x30 POP RBX RET
/* language::find(char const*) */ int8 language::find(char *param_1) { long lVar1; int8 *puVar2; allocator local_29; string local_28 [32]; std::__cxx11::string::string<std::allocator<char>>(local_28,param_1,&local_29); /* try { // try from 0014f97a to 0014f988 has its CatchHandler @ 0014f9b1 */ lVar1 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>,std::allocator<std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>,std::allocator<std::pair<std::__cxx11::string_const,__gnu_cxx::__normal_iterator<LanguageInfo_const*,std::vector<LanguageInfo,std::allocator<LanguageInfo>>>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)ietf_map_abi_cxx11_,local_28); std::__cxx11::string::~string(local_28); puVar2 = &DAT_00355200; if (lVar1 != 0) { puVar2 = (int8 *)(lVar1 + 0x28); } return *puVar2; }
21,995
dequantize_row_q5_0
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
void dequantize_row_q5_0(const block_q5_0 * restrict x, float * restrict y, int k) { static const int qk = QK5_0; assert(k % qk == 0); const int nb = k / qk; for (int i = 0; i < nb; i++) { const float d = GGML_FP16_TO_FP32(x[i].d); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); for (int j = 0; j < qk/2; ++j) { const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10; const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10; const int32_t x0 = ((x[i].qs[j] & 0x0F) | xh_0) - 16; const int32_t x1 = ((x[i].qs[j] >> 4) | xh_1) - 16; y[i*qk + j + 0 ] = x0*d; y[i*qk + j + qk/2] = x1*d; } } }
O0
c
dequantize_row_q5_0: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movl %edx, 0x24(%rsp) movl 0x24(%rsp), %eax movl $0x20, %ecx cltd idivl %ecx movl %eax, 0x20(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x20(%rsp), %eax jge 0x16dd05 movq 0x30(%rsp), %rax movslq 0x1c(%rsp), %rcx imulq $0x16, %rcx, %rcx addq %rcx, %rax movzwl (%rax), %edi callq 0x16da00 vmovss %xmm0, 0x18(%rsp) movq 0x30(%rsp), %rax movslq 0x1c(%rsp), %rcx imulq $0x16, %rcx, %rcx addq %rcx, %rax movl 0x2(%rax), %eax movl %eax, 0x14(%rsp) movl $0x0, 0x10(%rsp) cmpl $0x10, 0x10(%rsp) jge 0x16dcf3 movl 0x14(%rsp), %eax movl 0x10(%rsp), %ecx addl $0x0, %ecx shrl %cl, %eax shll $0x4, %eax andl $0x10, %eax movb %al, 0xf(%rsp) movl 0x14(%rsp), %eax movl 0x10(%rsp), %ecx addl $0xc, %ecx shrl %cl, %eax andl $0x10, %eax movb %al, 0xe(%rsp) movq 0x30(%rsp), %rax movslq 0x1c(%rsp), %rcx imulq $0x16, %rcx, %rcx addq %rcx, %rax movslq 0x10(%rsp), %rcx movzbl 0x6(%rax,%rcx), %eax andl $0xf, %eax movzbl 0xf(%rsp), %ecx orl %ecx, %eax subl $0x10, %eax movl %eax, 0x8(%rsp) movq 0x30(%rsp), %rax movslq 0x1c(%rsp), %rcx imulq $0x16, %rcx, %rcx addq %rcx, %rax movslq 0x10(%rsp), %rcx movzbl 0x6(%rax,%rcx), %eax sarl $0x4, %eax movzbl 0xe(%rsp), %ecx orl %ecx, %eax subl $0x10, %eax movl %eax, 0x4(%rsp) vcvtsi2ssl 0x8(%rsp), %xmm0, %xmm0 vmulss 0x18(%rsp), %xmm0, %xmm0 movq 0x28(%rsp), %rax movl 0x1c(%rsp), %ecx shll $0x5, %ecx addl 0x10(%rsp), %ecx addl $0x0, %ecx movslq %ecx, %rcx vmovss %xmm0, (%rax,%rcx,4) vcvtsi2ssl 0x4(%rsp), %xmm0, %xmm0 vmulss 0x18(%rsp), %xmm0, %xmm0 movq 0x28(%rsp), %rax movl 0x1c(%rsp), %ecx shll $0x5, %ecx addl 0x10(%rsp), %ecx addl $0x10, %ecx movslq %ecx, %rcx vmovss %xmm0, (%rax,%rcx,4) movl 0x10(%rsp), %eax addl $0x1, %eax movl %eax, 0x10(%rsp) jmp 0x16dc07 jmp 0x16dcf5 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x16dbba addq $0x38, %rsp retq nopw (%rax,%rax)
dequantize_row_q5_0: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_14], edx mov eax, [rsp+38h+var_14] mov ecx, 20h ; ' ' cdq idiv ecx mov [rsp+38h+var_18], eax mov [rsp+38h+var_1C], 0 loc_16DBBA: mov eax, [rsp+38h+var_1C] cmp eax, [rsp+38h+var_18] jge loc_16DD05 mov rax, [rsp+38h+var_8] movsxd rcx, [rsp+38h+var_1C] imul rcx, 16h add rax, rcx movzx edi, word ptr [rax] call ggml_lookup_fp16_to_fp32_0 vmovss [rsp+38h+var_20], xmm0 mov rax, [rsp+38h+var_8] movsxd rcx, [rsp+38h+var_1C] imul rcx, 16h add rax, rcx mov eax, [rax+2] mov [rsp+38h+var_24], eax mov [rsp+38h+var_28], 0 loc_16DC07: cmp [rsp+38h+var_28], 10h jge loc_16DCF3 mov eax, [rsp+38h+var_24] mov ecx, [rsp+38h+var_28] add ecx, 0 shr eax, cl shl eax, 4 and eax, 10h mov [rsp+38h+var_29], al mov eax, [rsp+38h+var_24] mov ecx, [rsp+38h+var_28] add ecx, 0Ch shr eax, cl and eax, 10h mov [rsp+38h+var_2A], al mov rax, [rsp+38h+var_8] movsxd rcx, [rsp+38h+var_1C] imul rcx, 16h add rax, rcx movsxd rcx, [rsp+38h+var_28] movzx eax, byte ptr [rax+rcx+6] and eax, 0Fh movzx ecx, [rsp+38h+var_29] or eax, ecx sub eax, 10h mov [rsp+38h+var_30], eax mov rax, [rsp+38h+var_8] movsxd rcx, [rsp+38h+var_1C] imul rcx, 16h add rax, rcx movsxd rcx, [rsp+38h+var_28] movzx eax, byte ptr [rax+rcx+6] sar eax, 4 movzx ecx, [rsp+38h+var_2A] or eax, ecx sub eax, 10h mov [rsp+38h+var_34], eax vcvtsi2ss xmm0, xmm0, [rsp+38h+var_30] vmulss xmm0, xmm0, [rsp+38h+var_20] mov rax, [rsp+38h+var_10] mov ecx, [rsp+38h+var_1C] shl ecx, 5 add ecx, [rsp+38h+var_28] add ecx, 0 movsxd rcx, ecx vmovss dword ptr [rax+rcx*4], xmm0 vcvtsi2ss xmm0, xmm0, [rsp+38h+var_34] vmulss xmm0, xmm0, [rsp+38h+var_20] mov rax, [rsp+38h+var_10] mov ecx, [rsp+38h+var_1C] shl ecx, 5 add ecx, [rsp+38h+var_28] add ecx, 10h movsxd rcx, ecx vmovss dword ptr [rax+rcx*4], xmm0 mov eax, [rsp+38h+var_28] add eax, 1 mov [rsp+38h+var_28], eax jmp loc_16DC07 loc_16DCF3: jmp short $+2 loc_16DCF5: mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp loc_16DBBA loc_16DD05: add rsp, 38h retn
long long dequantize_row_q5_0(long long a1, long long a2, int a3) { long long result; // rax int j; // [rsp+10h] [rbp-28h] int i; // [rsp+1Ch] [rbp-1Ch] int v15; // [rsp+20h] [rbp-18h] v15 = a3 / 32; for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= v15 ) break; _XMM0 = ggml_lookup_fp16_to_fp32_0(*(_WORD *)(22LL * i + a1)); __asm { vmovss [rsp+38h+var_20], xmm0 } for ( j = 0; j < 16; ++j ) { __asm { vcvtsi2ss xmm0, xmm0, [rsp+38h+var_30] vmulss xmm0, xmm0, [rsp+38h+var_20] } _RAX = a2; _RCX = j + 32 * i; __asm { vmovss dword ptr [rax+rcx*4], xmm0 vcvtsi2ss xmm0, xmm0, [rsp+38h+var_34] vmulss xmm0, xmm0, [rsp+38h+var_20] } _RAX = a2; _RCX = j + 32 * i + 16; __asm { vmovss dword ptr [rax+rcx*4], xmm0 } } } return result; }
21,996
dequantize_row_q5_0
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
void dequantize_row_q5_0(const block_q5_0 * restrict x, float * restrict y, int k) { static const int qk = QK5_0; assert(k % qk == 0); const int nb = k / qk; for (int i = 0; i < nb; i++) { const float d = GGML_FP16_TO_FP32(x[i].d); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); for (int j = 0; j < qk/2; ++j) { const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10; const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10; const int32_t x0 = ((x[i].qs[j] & 0x0F) | xh_0) - 16; const int32_t x1 = ((x[i].qs[j] >> 4) | xh_1) - 16; y[i*qk + j + 0 ] = x0*d; y[i*qk + j + qk/2] = x1*d; } } }
O1
c
dequantize_row_q5_0: cmpl $0x20, %edx jl 0xb6cf3 shrl $0x5, %edx leaq 0x6(%rdi), %rax addq $0x40, %rsi xorl %ecx, %ecx leaq 0xc766e(%rip), %r8 # 0x17e280 vpmovsxbd 0xee15(%rip), %ymm0 # 0xc5a30 vpbroadcastd 0x12380(%rip), %ymm1 # 0xc8fa4 vpbroadcastd 0x1238f(%rip), %ymm2 # 0xc8fbc vpbroadcastd 0x1237e(%rip), %ymm3 # 0xc8fb4 vpbroadcastd 0x12381(%rip), %ymm4 # 0xc8fc0 vpbroadcastd 0xe638(%rip), %ymm5 # 0xc5280 leaq (%rcx,%rcx,4), %r9 leaq (%rcx,%r9,4), %r9 addq %rcx, %r9 movzwl (%rdi,%r9), %r10d vpbroadcastd 0x2(%rdi,%r9), %ymm6 vbroadcastss (%r8,%r10,4), %ymm7 xorl %r9d, %r9d vmovdqa %ymm0, %ymm8 vmovdqa %ymm0, %ymm9 vpsrlvd %ymm8, %ymm6, %ymm10 vpslld $0x4, %ymm10, %ymm10 vpand %ymm1, %ymm10, %ymm10 vpaddd %ymm2, %ymm9, %ymm11 vpsrlvd %ymm11, %ymm6, %ymm11 vpand %ymm1, %ymm11, %ymm11 vpmovzxbd (%rax,%r9), %ymm12 vpand %ymm3, %ymm12, %ymm13 vpor %ymm13, %ymm10, %ymm10 vpaddd %ymm4, %ymm10, %ymm10 vpsrld $0x4, %ymm12, %ymm12 vpor %ymm12, %ymm11, %ymm11 vpaddd %ymm4, %ymm11, %ymm11 vcvtdq2ps %ymm10, %ymm10 vmulps %ymm7, %ymm10, %ymm10 vmovups %ymm10, -0x40(%rsi,%r9,4) vcvtdq2ps %ymm11, %ymm10 vmulps %ymm7, %ymm10, %ymm10 vmovups %ymm10, (%rsi,%r9,4) addq $0x8, %r9 vpaddd %ymm5, %ymm8, %ymm8 vpaddd %ymm5, %ymm9, %ymm9 cmpq $0x10, %r9 jne 0xb6c70 incq %rcx addq $0x16, %rax subq $-0x80, %rsi cmpq %rdx, %rcx jne 0xb6c48 vzeroupper retq
dequantize_row_q5_0: cmp edx, 20h ; ' ' jl loc_B6CF3 shr edx, 5 lea rax, [rdi+6] add rsi, 40h ; '@' xor ecx, ecx lea r8, ggml_table_f32_f16 vpmovsxbd ymm0, cs:qword_C5A30 vpbroadcastd ymm1, cs:dword_C8FA4 vpbroadcastd ymm2, cs:dword_C8FBC vpbroadcastd ymm3, cs:dword_C8FB4 vpbroadcastd ymm4, cs:dword_C8FC0 vpbroadcastd ymm5, cs:dword_C5280 loc_B6C48: lea r9, [rcx+rcx*4] lea r9, [rcx+r9*4] add r9, rcx movzx r10d, word ptr [rdi+r9] vpbroadcastd ymm6, dword ptr [rdi+r9+2] vbroadcastss ymm7, dword ptr [r8+r10*4] xor r9d, r9d vmovdqa ymm8, ymm0 vmovdqa ymm9, ymm0 loc_B6C70: vpsrlvd ymm10, ymm6, ymm8 vpslld ymm10, ymm10, 4 vpand ymm10, ymm10, ymm1 vpaddd ymm11, ymm9, ymm2 vpsrlvd ymm11, ymm6, ymm11 vpand ymm11, ymm11, ymm1 vpmovzxbd ymm12, qword ptr [rax+r9] vpand ymm13, ymm12, ymm3 vpor ymm10, ymm10, ymm13 vpaddd ymm10, ymm10, ymm4 vpsrld ymm12, ymm12, 4 vpor ymm11, ymm11, ymm12 vpaddd ymm11, ymm11, ymm4 vcvtdq2ps ymm10, ymm10 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4-40h], ymm10 vcvtdq2ps ymm10, ymm11 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4], ymm10 add r9, 8 vpaddd ymm8, ymm8, ymm5 vpaddd ymm9, ymm9, ymm5 cmp r9, 10h jnz short loc_B6C70 inc rcx add rax, 16h sub rsi, 0FFFFFFFFFFFFFF80h cmp rcx, rdx jnz loc_B6C48 loc_B6CF3: vzeroupper retn
void dequantize_row_q5_0(long long _RDI, long long a2, int a3) { long long v3; // rdx long long v6; // rcx if ( a3 >= 32 ) { v3 = (unsigned int)a3 >> 5; _RAX = _RDI + 6; _RSI = a2 + 64; v6 = 0LL; _R8 = &ggml_table_f32_f16; __asm { vpmovsxbd ymm0, cs:qword_C5A30 vpbroadcastd ymm1, cs:dword_C8FA4 vpbroadcastd ymm2, cs:dword_C8FBC vpbroadcastd ymm3, cs:dword_C8FB4 vpbroadcastd ymm4, cs:dword_C8FC0 vpbroadcastd ymm5, cs:dword_C5280 } do { _R9 = 22 * v6; _R10 = *(unsigned __int16 *)(_RDI + 22 * v6); __asm { vpbroadcastd ymm6, dword ptr [rdi+r9+2] vbroadcastss ymm7, dword ptr [r8+r10*4] } _R9 = 0LL; __asm { vmovdqa ymm8, ymm0 vmovdqa ymm9, ymm0 } do { __asm { vpsrlvd ymm10, ymm6, ymm8 vpslld ymm10, ymm10, 4 vpand ymm10, ymm10, ymm1 vpaddd ymm11, ymm9, ymm2 vpsrlvd ymm11, ymm6, ymm11 vpand ymm11, ymm11, ymm1 vpmovzxbd ymm12, qword ptr [rax+r9] vpand ymm13, ymm12, ymm3 vpor ymm10, ymm10, ymm13 vpaddd ymm10, ymm10, ymm4 vpsrld ymm12, ymm12, 4 vpor ymm11, ymm11, ymm12 vpaddd ymm11, ymm11, ymm4 vcvtdq2ps ymm10, ymm10 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4-40h], ymm10 vcvtdq2ps ymm10, ymm11 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4], ymm10 } _R9 += 8LL; __asm { vpaddd ymm8, ymm8, ymm5 vpaddd ymm9, ymm9, ymm5 } } while ( _R9 != 16 ); ++v6; _RAX += 22LL; _RSI += 128LL; } while ( v6 != v3 ); } __asm { vzeroupper } }
21,997
dequantize_row_q5_0
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
void dequantize_row_q5_0(const block_q5_0 * restrict x, float * restrict y, int k) { static const int qk = QK5_0; assert(k % qk == 0); const int nb = k / qk; for (int i = 0; i < nb; i++) { const float d = GGML_FP16_TO_FP32(x[i].d); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); for (int j = 0; j < qk/2; ++j) { const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10; const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10; const int32_t x0 = ((x[i].qs[j] & 0x0F) | xh_0) - 16; const int32_t x1 = ((x[i].qs[j] >> 4) | xh_1) - 16; y[i*qk + j + 0 ] = x0*d; y[i*qk + j + qk/2] = x1*d; } } }
O2
c
dequantize_row_q5_0: pushq %r15 pushq %r14 pushq %rbx movl %edx, %eax movl $0x20, %ecx cltd idivl %ecx xorl %r8d, %r8d testl %eax, %eax cmovlel %r8d, %eax addq $0x40, %rsi leaq 0x6(%rdi), %r9 leaq 0xca625(%rip), %r10 # 0x15d290 cmpq %rax, %r8 je 0x92cf4 imulq $0x16, %r8, %rcx movzwl (%rdi,%rcx), %edx vmovss (%r10,%rdx,4), %xmm0 movl 0x2(%rdi,%rcx), %r11d xorl %edx, %edx cmpq $0x10, %rdx je 0x92ce4 movl %r11d, %ebx movl %edx, %ecx shrl %cl, %ebx leal 0xc(%rdx), %ecx movl %r11d, %r14d shrl %cl, %r14d shll $0x4, %ebx andl $0x10, %ebx andl $0x10, %r14d movzbl (%r9,%rdx), %ecx movl %ecx, %r15d andl $0xf, %r15d addl %r15d, %ebx addl $-0x10, %ebx shrl $0x4, %ecx addl %r14d, %ecx addl $-0x10, %ecx vcvtsi2ss %ebx, %xmm3, %xmm1 vmulss %xmm1, %xmm0, %xmm1 vcvtsi2ss %ecx, %xmm3, %xmm2 vmovss %xmm1, -0x40(%rsi,%rdx,4) vmulss %xmm2, %xmm0, %xmm1 vmovss %xmm1, (%rsi,%rdx,4) incq %rdx jmp 0x92c89 incq %r8 subq $-0x80, %rsi addq $0x16, %r9 jmp 0x92c6b popq %rbx popq %r14 popq %r15 retq
dequantize_row_q5_0: push r15 push r14 push rbx mov eax, edx mov ecx, 20h ; ' ' cdq idiv ecx xor r8d, r8d test eax, eax cmovle eax, r8d add rsi, 40h ; '@' lea r9, [rdi+6] lea r10, ggml_table_f32_f16 loc_92C6B: cmp r8, rax jz loc_92CF4 imul rcx, r8, 16h movzx edx, word ptr [rdi+rcx] vmovss xmm0, dword ptr [r10+rdx*4] mov r11d, [rdi+rcx+2] xor edx, edx loc_92C89: cmp rdx, 10h jz short loc_92CE4 mov ebx, r11d mov ecx, edx shr ebx, cl lea ecx, [rdx+0Ch] mov r14d, r11d shr r14d, cl shl ebx, 4 and ebx, 10h and r14d, 10h movzx ecx, byte ptr [r9+rdx] mov r15d, ecx and r15d, 0Fh add ebx, r15d add ebx, 0FFFFFFF0h shr ecx, 4 add ecx, r14d add ecx, 0FFFFFFF0h vcvtsi2ss xmm1, xmm3, ebx vmulss xmm1, xmm0, xmm1 vcvtsi2ss xmm2, xmm3, ecx vmovss dword ptr [rsi+rdx*4-40h], xmm1 vmulss xmm1, xmm0, xmm2 vmovss dword ptr [rsi+rdx*4], xmm1 inc rdx jmp short loc_92C89 loc_92CE4: inc r8 sub rsi, 0FFFFFFFFFFFFFF80h add r9, 16h jmp loc_92C6B loc_92CF4: pop rbx pop r14 pop r15 retn
long long dequantize_row_q5_0(long long a1, long long a2, int a3, double a4, double a5, double a6, __m128 _XMM3) { long long result; // rax long long v8; // r8 long long v10; // r9 result = (unsigned int)(a3 / 32); v8 = 0LL; if ( (int)result <= 0 ) result = 0LL; _RSI = a2 + 64; v10 = a1 + 6; _R10 = &ggml_table_f32_f16; while ( v8 != result ) { _RDX = *(unsigned __int16 *)(a1 + 22 * v8); __asm { vmovss xmm0, dword ptr [r10+rdx*4] } for ( _RDX = 0LL; _RDX != 16; ++_RDX ) { __asm { vcvtsi2ss xmm1, xmm3, ebx vmulss xmm1, xmm0, xmm1 vcvtsi2ss xmm2, xmm3, ecx vmovss dword ptr [rsi+rdx*4-40h], xmm1 vmulss xmm1, xmm0, xmm2 vmovss dword ptr [rsi+rdx*4], xmm1 } } ++v8; _RSI += 128LL; v10 += 22LL; } return result; }
dequantize_row_q5_0: PUSH R15 PUSH R14 PUSH RBX MOV EAX,EDX MOV ECX,0x20 CDQ IDIV ECX XOR R8D,R8D TEST EAX,EAX CMOVLE EAX,R8D ADD RSI,0x40 LEA R9,[RDI + 0x6] LEA R10,[0x25d290] LAB_00192c6b: CMP R8,RAX JZ 0x00192cf4 IMUL RCX,R8,0x16 MOVZX EDX,word ptr [RDI + RCX*0x1] VMOVSS XMM0,dword ptr [R10 + RDX*0x4] MOV R11D,dword ptr [RDI + RCX*0x1 + 0x2] XOR EDX,EDX LAB_00192c89: CMP RDX,0x10 JZ 0x00192ce4 MOV EBX,R11D MOV ECX,EDX SHR EBX,CL LEA ECX,[RDX + 0xc] MOV R14D,R11D SHR R14D,CL SHL EBX,0x4 AND EBX,0x10 AND R14D,0x10 MOVZX ECX,byte ptr [R9 + RDX*0x1] MOV R15D,ECX AND R15D,0xf ADD EBX,R15D ADD EBX,-0x10 SHR ECX,0x4 ADD ECX,R14D ADD ECX,-0x10 VCVTSI2SS XMM1,XMM3,EBX VMULSS XMM1,XMM0,XMM1 VCVTSI2SS XMM2,XMM3,ECX VMOVSS dword ptr [RSI + RDX*0x4 + -0x40],XMM1 VMULSS XMM1,XMM0,XMM2 VMOVSS dword ptr [RSI + RDX*0x4],XMM1 INC RDX JMP 0x00192c89 LAB_00192ce4: INC R8 SUB RSI,-0x80 ADD R9,0x16 JMP 0x00192c6b LAB_00192cf4: POP RBX POP R14 POP R15 RET
void dequantize_row_q5_0(long param_1,long param_2,int param_3) { float fVar1; byte bVar2; uint uVar3; ulong uVar4; long lVar5; ulong uVar6; long lVar7; uVar6 = 0; uVar4 = (long)param_3 / 0x20 & 0xffffffff; if ((int)((long)param_3 / 0x20) < 1) { uVar4 = uVar6; } param_2 = param_2 + 0x40; lVar7 = param_1 + 6; for (; uVar6 != uVar4; uVar6 = uVar6 + 1) { fVar1 = (float)(&ggml_table_f32_f16)[*(ushort *)(param_1 + uVar6 * 0x16)]; uVar3 = *(uint *)(param_1 + 2 + uVar6 * 0x16); for (lVar5 = 0; lVar5 != 0x10; lVar5 = lVar5 + 1) { bVar2 = *(byte *)(lVar7 + lVar5); *(float *)(param_2 + -0x40 + lVar5 * 4) = fVar1 * (float)(int)((uVar3 >> ((byte)lVar5 & 0x1f) & 1) * 0x10 + (bVar2 & 0xf) + -0x10); *(float *)(param_2 + lVar5 * 4) = fVar1 * (float)(int)((uint)(bVar2 >> 4) + (uVar3 >> ((byte)lVar5 + 0xc & 0x1f) & 0x10) + -0x10); } param_2 = param_2 + 0x80; lVar7 = lVar7 + 0x16; } return; }
21,998
dequantize_row_q5_0
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
void dequantize_row_q5_0(const block_q5_0 * restrict x, float * restrict y, int k) { static const int qk = QK5_0; assert(k % qk == 0); const int nb = k / qk; for (int i = 0; i < nb; i++) { const float d = GGML_FP16_TO_FP32(x[i].d); uint32_t qh; memcpy(&qh, x[i].qh, sizeof(qh)); for (int j = 0; j < qk/2; ++j) { const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10; const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10; const int32_t x0 = ((x[i].qs[j] & 0x0F) | xh_0) - 16; const int32_t x1 = ((x[i].qs[j] >> 4) | xh_1) - 16; y[i*qk + j + 0 ] = x0*d; y[i*qk + j + qk/2] = x1*d; } } }
O3
c
dequantize_row_q5_0: cmpl $0x20, %edx jl 0xb582b shrl $0x5, %edx leaq 0x6(%rdi), %rax addq $0x40, %rsi xorl %ecx, %ecx leaq 0xc6b36(%rip), %r8 # 0x17c280 vpmovsxbd 0xec0d(%rip), %ymm0 # 0xc4360 vpbroadcastd 0x12828(%rip), %ymm1 # 0xc7f84 vpbroadcastd 0x12837(%rip), %ymm2 # 0xc7f9c vpbroadcastd 0x12826(%rip), %ymm3 # 0xc7f94 vpbroadcastd 0x12829(%rip), %ymm4 # 0xc7fa0 vpbroadcastd 0xeb20(%rip), %ymm5 # 0xc42a0 leaq (%rcx,%rcx,4), %r9 leaq (%rcx,%r9,4), %r9 addq %rcx, %r9 movzwl (%rdi,%r9), %r10d vpbroadcastd 0x2(%rdi,%r9), %ymm6 vbroadcastss (%r8,%r10,4), %ymm7 xorl %r9d, %r9d vmovdqa %ymm0, %ymm8 vmovdqa %ymm0, %ymm9 vpsrlvd %ymm8, %ymm6, %ymm10 vpslld $0x4, %ymm10, %ymm10 vpand %ymm1, %ymm10, %ymm10 vpaddd %ymm2, %ymm9, %ymm11 vpsrlvd %ymm11, %ymm6, %ymm11 vpand %ymm1, %ymm11, %ymm11 vpmovzxbd (%rax,%r9), %ymm12 vpand %ymm3, %ymm12, %ymm13 vpor %ymm13, %ymm10, %ymm10 vpaddd %ymm4, %ymm10, %ymm10 vpsrld $0x4, %ymm12, %ymm12 vpor %ymm12, %ymm11, %ymm11 vpaddd %ymm4, %ymm11, %ymm11 vcvtdq2ps %ymm10, %ymm10 vmulps %ymm7, %ymm10, %ymm10 vmovups %ymm10, -0x40(%rsi,%r9,4) vcvtdq2ps %ymm11, %ymm10 vmulps %ymm7, %ymm10, %ymm10 vmovups %ymm10, (%rsi,%r9,4) addq $0x8, %r9 vpaddd %ymm5, %ymm8, %ymm8 vpaddd %ymm5, %ymm9, %ymm9 cmpq $0x10, %r9 jne 0xb57a8 incq %rcx addq $0x16, %rax subq $-0x80, %rsi cmpq %rdx, %rcx jne 0xb5780 vzeroupper retq
dequantize_row_q5_0: cmp edx, 20h ; ' ' jl loc_B582B shr edx, 5 lea rax, [rdi+6] add rsi, 40h ; '@' xor ecx, ecx lea r8, ggml_table_f32_f16 vpmovsxbd ymm0, cs:qword_C4360 vpbroadcastd ymm1, cs:dword_C7F84 vpbroadcastd ymm2, cs:dword_C7F9C vpbroadcastd ymm3, cs:dword_C7F94 vpbroadcastd ymm4, cs:dword_C7FA0 vpbroadcastd ymm5, cs:dword_C42A0 loc_B5780: lea r9, [rcx+rcx*4] lea r9, [rcx+r9*4] add r9, rcx movzx r10d, word ptr [rdi+r9] vpbroadcastd ymm6, dword ptr [rdi+r9+2] vbroadcastss ymm7, dword ptr [r8+r10*4] xor r9d, r9d vmovdqa ymm8, ymm0 vmovdqa ymm9, ymm0 loc_B57A8: vpsrlvd ymm10, ymm6, ymm8 vpslld ymm10, ymm10, 4 vpand ymm10, ymm10, ymm1 vpaddd ymm11, ymm9, ymm2 vpsrlvd ymm11, ymm6, ymm11 vpand ymm11, ymm11, ymm1 vpmovzxbd ymm12, qword ptr [rax+r9] vpand ymm13, ymm12, ymm3 vpor ymm10, ymm10, ymm13 vpaddd ymm10, ymm10, ymm4 vpsrld ymm12, ymm12, 4 vpor ymm11, ymm11, ymm12 vpaddd ymm11, ymm11, ymm4 vcvtdq2ps ymm10, ymm10 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4-40h], ymm10 vcvtdq2ps ymm10, ymm11 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4], ymm10 add r9, 8 vpaddd ymm8, ymm8, ymm5 vpaddd ymm9, ymm9, ymm5 cmp r9, 10h jnz short loc_B57A8 inc rcx add rax, 16h sub rsi, 0FFFFFFFFFFFFFF80h cmp rcx, rdx jnz loc_B5780 loc_B582B: vzeroupper retn
void dequantize_row_q5_0(long long _RDI, long long a2, int a3) { long long v3; // rdx long long v6; // rcx if ( a3 >= 32 ) { v3 = (unsigned int)a3 >> 5; _RAX = _RDI + 6; _RSI = a2 + 64; v6 = 0LL; _R8 = &ggml_table_f32_f16; __asm { vpmovsxbd ymm0, cs:qword_C4360 vpbroadcastd ymm1, cs:dword_C7F84 vpbroadcastd ymm2, cs:dword_C7F9C vpbroadcastd ymm3, cs:dword_C7F94 vpbroadcastd ymm4, cs:dword_C7FA0 vpbroadcastd ymm5, cs:dword_C42A0 } do { _R9 = 22 * v6; _R10 = *(unsigned __int16 *)(_RDI + 22 * v6); __asm { vpbroadcastd ymm6, dword ptr [rdi+r9+2] vbroadcastss ymm7, dword ptr [r8+r10*4] } _R9 = 0LL; __asm { vmovdqa ymm8, ymm0 vmovdqa ymm9, ymm0 } do { __asm { vpsrlvd ymm10, ymm6, ymm8 vpslld ymm10, ymm10, 4 vpand ymm10, ymm10, ymm1 vpaddd ymm11, ymm9, ymm2 vpsrlvd ymm11, ymm6, ymm11 vpand ymm11, ymm11, ymm1 vpmovzxbd ymm12, qword ptr [rax+r9] vpand ymm13, ymm12, ymm3 vpor ymm10, ymm10, ymm13 vpaddd ymm10, ymm10, ymm4 vpsrld ymm12, ymm12, 4 vpor ymm11, ymm11, ymm12 vpaddd ymm11, ymm11, ymm4 vcvtdq2ps ymm10, ymm10 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4-40h], ymm10 vcvtdq2ps ymm10, ymm11 vmulps ymm10, ymm10, ymm7 vmovups ymmword ptr [rsi+r9*4], ymm10 } _R9 += 8LL; __asm { vpaddd ymm8, ymm8, ymm5 vpaddd ymm9, ymm9, ymm5 } } while ( _R9 != 16 ); ++v6; _RAX += 22LL; _RSI += 128LL; } while ( v6 != v3 ); } __asm { vzeroupper } }
21,999
my_convert_fix
eloqsql/strings/ctype.c
size_t my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length, CHARSET_INFO *from_cs, const char *from, size_t from_length, size_t nchars, MY_STRCOPY_STATUS *copy_status, MY_STRCONV_STATUS *conv_status) { int cnvres; my_wc_t wc; my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb; const uchar *from_end= (const uchar*) from + from_length; uchar *to_end= (uchar*) to + to_length; char *to_start= to; DBUG_ASSERT(to_cs != &my_charset_bin); DBUG_ASSERT(from_cs != &my_charset_bin); copy_status->m_well_formed_error_pos= NULL; conv_status->m_cannot_convert_error_pos= NULL; for ( ; nchars; nchars--) { const char *from_prev= from; if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0) from+= cnvres; else if (cnvres == MY_CS_ILSEQ) { if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } else if (cnvres > MY_CS_TOOSMALL) { /* A correct multibyte sequence detected But it doesn't have Unicode mapping. */ if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from; from+= (-cnvres); wc= '?'; } else { if ((uchar *) from >= from_end) break; // End of line // Incomplete byte sequence if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } outp: if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) to+= cnvres; else if (cnvres == MY_CS_ILUNI && wc != '?') { if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from_prev; wc= '?'; goto outp; } else { from= from_prev; break; } } copy_status->m_source_end_pos= from; return to - to_start; }
O3
c
my_convert_fix: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movq %rdx, %r12 movq %rdi, %r13 movq 0x20(%rbp), %rdi movq 0x18(%rbp), %rdx movq 0x10(%rbp), %r8 movq %rcx, -0x60(%rbp) movq 0xb8(%rcx), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq 0xb8(%r13), %rax movq 0x30(%rax), %rax movq %rax, -0x40(%rbp) xorl %eax, %eax movq %rax, 0x8(%rdx) movq %rax, (%rdi) testq %r8, %r8 movq %rsi, -0x48(%rbp) je 0xd6d9f movq %r8, -0x50(%rbp) addq %r14, %r9 movq %r9, -0x38(%rbp) addq %rsi, %r12 movq %rsi, %rbx movq -0x60(%rbp), %rdi leaq -0x30(%rbp), %rsi movq %r14, %rdx movq -0x38(%rbp), %rcx callq *-0x58(%rbp) movl %eax, %r15d testl %eax, %eax jle 0xd6d17 movl %r15d, %r15d addq %r14, %r15 movq -0x30(%rbp), %rsi jmp 0xd6d4f je 0xd6d3a cmpl $-0x64, %r15d jb 0xd6d34 movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0xd6d2c movq %r14, (%rax) negl %r15d addq %r14, %r15 jmp 0xd6d77 cmpq -0x38(%rbp), %r14 jae 0xd6d9a movq 0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0xd6d49 movq %r14, 0x8(%rax) leaq 0x1(%r14), %r15 jmp 0xd6d77 movq %r13, %rdi movq %rbx, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jg 0xd6d86 testl %eax, %eax jne 0xd6d9a cmpq $0x3f, -0x30(%rbp) je 0xd6d9a movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0xd6d77 movq %r14, (%rax) movq $0x3f, -0x30(%rbp) movl $0x3f, %esi jmp 0xd6d4f movl %eax, %eax addq %rax, %rbx movq %r15, %r14 decq -0x50(%rbp) jne 0xd6cf2 jmp 0xd6da5 movq %r14, %r15 jmp 0xd6da5 movq %r14, %r15 movq %rsi, %rbx movq 0x18(%rbp), %rax movq %r15, (%rax) subq -0x48(%rbp), %rbx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_convert_fix: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov r12, rdx mov r13, rdi mov rdi, [rbp+arg_10] mov rdx, [rbp+arg_8] mov r8, [rbp+arg_0] mov [rbp+var_60], rcx mov rax, [rcx+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [r13+0B8h] mov rax, [rax+30h] mov [rbp+var_40], rax xor eax, eax mov [rdx+8], rax mov [rdi], rax test r8, r8 mov [rbp+var_48], rsi jz loc_D6D9F mov [rbp+var_50], r8 add r9, r14 mov [rbp+var_38], r9 add r12, rsi mov rbx, rsi loc_D6CF2: mov rdi, [rbp+var_60] lea rsi, [rbp+var_30] mov rdx, r14 mov rcx, [rbp+var_38] call [rbp+var_58] mov r15d, eax test eax, eax jle short loc_D6D17 mov r15d, r15d add r15, r14 mov rsi, [rbp+var_30] jmp short loc_D6D4F loc_D6D17: jz short loc_D6D3A cmp r15d, 0FFFFFF9Ch jb short loc_D6D34 mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_D6D2C mov [rax], r14 loc_D6D2C: neg r15d add r15, r14 jmp short loc_D6D77 loc_D6D34: cmp r14, [rbp+var_38] jnb short loc_D6D9A loc_D6D3A: mov rax, [rbp+arg_8] cmp qword ptr [rax+8], 0 jnz short loc_D6D49 mov [rax+8], r14 loc_D6D49: lea r15, [r14+1] jmp short loc_D6D77 loc_D6D4F: mov rdi, r13 mov rdx, rbx mov rcx, r12 call [rbp+var_40] test eax, eax jg short loc_D6D86 test eax, eax jnz short loc_D6D9A cmp [rbp+var_30], 3Fh ; '?' jz short loc_D6D9A mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_D6D77 mov [rax], r14 loc_D6D77: mov [rbp+var_30], 3Fh ; '?' mov esi, 3Fh ; '?' jmp short loc_D6D4F loc_D6D86: mov eax, eax add rbx, rax mov r14, r15 dec [rbp+var_50] jnz loc_D6CF2 jmp short loc_D6DA5 loc_D6D9A: mov r15, r14 jmp short loc_D6DA5 loc_D6D9F: mov r15, r14 mov rbx, rsi loc_D6DA5: mov rax, [rbp+arg_8] mov [rax], r15 sub rbx, [rbp+var_48] mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_convert_fix( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, long long a6, long long a7, unsigned long long *a8, unsigned long long *a9) { unsigned long long v9; // r14 long long v10; // r12 long long v11; // rbx int v12; // eax unsigned long long v13; // r15 long long v14; // rsi int v15; // eax long long ( *v18)(long long, long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] long long v19; // [rsp+10h] [rbp-50h] long long ( *v21)(long long, long long, long long, long long); // [rsp+20h] [rbp-40h] unsigned long long v22; // [rsp+28h] [rbp-38h] long long v23[6]; // [rsp+30h] [rbp-30h] BYREF v9 = a5; v18 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a4 + 184) + 40LL); v21 = *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL); a8[1] = 0LL; *a9 = 0LL; if ( a7 ) { v19 = a7; v22 = a5 + a6; v10 = a2 + a3; v11 = a2; while ( 1 ) { v12 = v18(a4, v23, v9, v22); if ( v12 > 0 ) { v13 = v9 + (unsigned int)v12; v14 = v23[0]; goto LABEL_14; } if ( !v12 ) goto LABEL_11; if ( (unsigned int)v12 < 0xFFFFFF9C ) break; if ( !*a9 ) *a9 = v9; v13 = v9 + (unsigned int)-v12; LABEL_19: while ( 1 ) { v23[0] = 63LL; v14 = 63LL; LABEL_14: v15 = v21(a1, v14, v11, v10); if ( v15 > 0 ) break; if ( v15 || v23[0] == 63 ) goto LABEL_22; if ( !*a9 ) *a9 = v9; } v11 += (unsigned int)v15; v9 = v13; if ( !--v19 ) goto LABEL_24; } if ( v9 < v22 ) { LABEL_11: if ( !a8[1] ) a8[1] = v9; v13 = v9 + 1; goto LABEL_19; } LABEL_22: v13 = v9; } else { v13 = a5; v11 = a2; } LABEL_24: *a8 = v13; return v11 - a2; }
my_convert_fix: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV R12,RDX MOV R13,RDI MOV RDI,qword ptr [RBP + 0x20] MOV RDX,qword ptr [RBP + 0x18] MOV R8,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x60],RCX MOV RAX,qword ptr [RCX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [R13 + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x40],RAX XOR EAX,EAX MOV qword ptr [RDX + 0x8],RAX MOV qword ptr [RDI],RAX TEST R8,R8 MOV qword ptr [RBP + -0x48],RSI JZ 0x001d6d9f MOV qword ptr [RBP + -0x50],R8 ADD R9,R14 MOV qword ptr [RBP + -0x38],R9 ADD R12,RSI MOV RBX,RSI LAB_001d6cf2: MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x30] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x58] MOV R15D,EAX TEST EAX,EAX JLE 0x001d6d17 MOV R15D,R15D ADD R15,R14 MOV RSI,qword ptr [RBP + -0x30] JMP 0x001d6d4f LAB_001d6d17: JZ 0x001d6d3a CMP R15D,-0x64 JC 0x001d6d34 MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x001d6d2c MOV qword ptr [RAX],R14 LAB_001d6d2c: NEG R15D ADD R15,R14 JMP 0x001d6d77 LAB_001d6d34: CMP R14,qword ptr [RBP + -0x38] JNC 0x001d6d9a LAB_001d6d3a: MOV RAX,qword ptr [RBP + 0x18] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x001d6d49 MOV qword ptr [RAX + 0x8],R14 LAB_001d6d49: LEA R15,[R14 + 0x1] JMP 0x001d6d77 LAB_001d6d4f: MOV RDI,R13 MOV RDX,RBX MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JG 0x001d6d86 TEST EAX,EAX JNZ 0x001d6d9a CMP qword ptr [RBP + -0x30],0x3f JZ 0x001d6d9a MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x001d6d77 MOV qword ptr [RAX],R14 LAB_001d6d77: MOV qword ptr [RBP + -0x30],0x3f MOV ESI,0x3f JMP 0x001d6d4f LAB_001d6d86: MOV EAX,EAX ADD RBX,RAX MOV R14,R15 DEC qword ptr [RBP + -0x50] JNZ 0x001d6cf2 JMP 0x001d6da5 LAB_001d6d9a: MOV R15,R14 JMP 0x001d6da5 LAB_001d6d9f: MOV R15,R14 MOV RBX,RSI LAB_001d6da5: MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX],R15 SUB RBX,qword ptr [RBP + -0x48] MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_convert_fix(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6, long param_7,ulong *param_8,ulong *param_9) { code *pcVar1; code *pcVar2; uint uVar3; long lVar4; ulong uVar5; ulong uVar6; long local_58; long local_38; pcVar1 = *(code **)(*(long *)(param_4 + 0xb8) + 0x28); pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); param_8[1] = 0; *param_9 = 0; lVar4 = param_2; uVar5 = param_5; if (param_7 != 0) { local_58 = param_7; while( true ) { uVar3 = (*pcVar1)(param_4,&local_38,uVar5,param_6 + param_5); if ((int)uVar3 < 1) break; uVar6 = uVar3 + uVar5; while (uVar3 = (*pcVar2)(param_1,local_38,lVar4,param_3 + param_2), (int)uVar3 < 1) { if ((uVar3 != 0) || (local_38 == 0x3f)) goto LAB_001d6da5; if (*param_9 == 0) { *param_9 = uVar5; } LAB_001d6d77: local_38 = 0x3f; } lVar4 = lVar4 + (ulong)uVar3; local_58 = local_58 + -1; uVar5 = uVar6; if (local_58 == 0) goto LAB_001d6da5; } if (uVar3 != 0) { if (0xffffff9b < uVar3) { if (*param_9 == 0) { *param_9 = uVar5; } uVar6 = -uVar3 + uVar5; goto LAB_001d6d77; } if (param_6 + param_5 <= uVar5) goto LAB_001d6da5; } if (param_8[1] == 0) { param_8[1] = uVar5; } uVar6 = uVar5 + 1; goto LAB_001d6d77; } LAB_001d6da5: *param_8 = uVar5; return lVar4 - param_2; }