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
61,900
translog_enable_purge
eloqsql/storage/maria/ma_loghandler.c
void translog_enable_purge() { mysql_mutex_lock(&log_descriptor.purger_lock); log_purge_disabled--; mysql_mutex_unlock(&log_descriptor.purger_lock); }
O3
c
translog_enable_purge: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0xb9ad08(%rip) # 0xc09900 jne 0x6ec25 leaq 0xb9acbf(%rip), %rdi # 0xc098c0 callq 0x291d0 decl 0x398c04(%rip) # 0x407810 movq 0xb9aced(%rip), %rdi # 0xc09900 testq %rdi, %rdi jne 0x6ec2c leaq 0xb9aca1(%rip), %rdi # 0xc098c0 popq %rbp jmp 0x291a0 callq 0x2d245 jmp 0x6ec06 leaq 0x31e43d(%rip), %rax # 0x38d070 movq (%rax), %rax callq *0x160(%rax) jmp 0x6ec18
translog_enable_purge: push rbp mov rbp, rsp cmp cs:qword_C09900, 0 jnz short loc_6EC25 lea rdi, unk_C098C0 call _pthread_mutex_lock loc_6EC06: dec cs:log_purge_disabled mov rdi, cs:qword_C09900 test rdi, rdi jnz short loc_6EC2C loc_6EC18: lea rdi, unk_C098C0 pop rbp jmp _pthread_mutex_unlock loc_6EC25: call translog_enable_purge_cold_1 jmp short loc_6EC06 loc_6EC2C: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_6EC18
long long translog_enable_purge() { if ( qword_C09900 ) translog_enable_purge_cold_1(); else pthread_mutex_lock(&unk_C098C0); --log_purge_disabled; if ( qword_C09900 ) PSI_server[44](); return pthread_mutex_unlock(&unk_C098C0); }
translog_enable_purge: PUSH RBP MOV RBP,RSP CMP qword ptr [0x00d09900],0x0 JNZ 0x0016ec25 LEA RDI,[0xd098c0] CALL 0x001291d0 LAB_0016ec06: DEC dword ptr [0x00507810] MOV RDI,qword ptr [0x00d09900] TEST RDI,RDI JNZ 0x0016ec2c LAB_0016ec18: LEA RDI,[0xd098c0] POP RBP JMP 0x001291a0 LAB_0016ec25: CALL 0x0012d245 JMP 0x0016ec06 LAB_0016ec2c: LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0016ec18
void translog_enable_purge(void) { if (DAT_00d09900 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d098c0); } else { translog_enable_purge_cold_1(); } log_purge_disabled = log_purge_disabled + -1; if (DAT_00d09900 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d098c0); return; }
61,901
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O0
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x7cf8c movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2f, %eax jne 0x7cf8c xorl %eax, %eax leaq 0x3c888a(%rip), %rcx # 0x4457e8 cmpq $0x0, (%rcx) movb %al, -0x11(%rbp) je 0x7cf7f leaq 0x3c887a(%rip), %rax # 0x4457e8 movq (%rax), %rdi callq 0x7cf30 cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x7cfa8 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x7cfa1 movl $0x1, -0x4(%rbp) jmp 0x7cfa8 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_if_hard_path: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz short loc_7CF8C mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jnz short loc_7CF8C xor eax, eax lea rcx, home_dir cmp qword ptr [rcx], 0 mov [rbp+var_11], al jz short loc_7CF7F lea rax, home_dir mov rdi, [rax] call test_if_hard_path cmp eax, 0 setnz al mov [rbp+var_11], al loc_7CF7F: mov al, [rbp+var_11] and al, 1 movzx eax, al mov [rbp+var_4], eax jmp short loc_7CFA8 loc_7CF8C: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_7CFA1 mov [rbp+var_4], 1 jmp short loc_7CFA8 loc_7CFA1: mov [rbp+var_4], 0 loc_7CFA8: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
_BOOL8 test_if_hard_path(char *a1) { bool v2; // [rsp+Fh] [rbp-11h] if ( *a1 == 126 && a1[1] == 47 ) { v2 = 0; if ( home_dir ) return (unsigned int)test_if_hard_path(home_dir) != 0; return v2; } else { return *a1 == 47; } }
test_if_hard_path: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x0017cf8c MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JNZ 0x0017cf8c XOR EAX,EAX LEA RCX,[0x5457e8] CMP qword ptr [RCX],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x0017cf7f LEA RAX,[0x5457e8] MOV RDI,qword ptr [RAX] CALL 0x0017cf30 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_0017cf7f: MOV AL,byte ptr [RBP + -0x11] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0017cfa8 LAB_0017cf8c: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0017cfa1 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0017cfa8 LAB_0017cfa1: MOV dword ptr [RBP + -0x4],0x0 LAB_0017cfa8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool test_if_hard_path(char *param_1) { int iVar1; bool local_19; if ((*param_1 == '~') && (param_1[1] == '/')) { local_19 = false; if (home_dir != 0) { iVar1 = test_if_hard_path(home_dir); local_19 = iVar1 != 0; } } else if (*param_1 == '/') { local_19 = true; } else { local_19 = false; } return local_19; }
61,902
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O3
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp leaq 0x3aae7b(%rip), %rax # 0x40b7d8 movq (%rax), %rax movb (%rdi), %cl cmpb $0x7e, %cl jne 0x60979 cmpb $0x2f, 0x1(%rdi) jne 0x60979 movq %rax, %rdi testq %rax, %rax jne 0x60960 xorl %eax, %eax jmp 0x60981 xorl %eax, %eax cmpb $0x2f, %cl sete %al popq %rbp retq
test_if_hard_path: push rbp mov rbp, rsp lea rax, home_dir mov rax, [rax] loc_60960: mov cl, [rdi] cmp cl, 7Eh ; '~' jnz short loc_60979 cmp byte ptr [rdi+1], 2Fh ; '/' jnz short loc_60979 mov rdi, rax test rax, rax jnz short loc_60960 xor eax, eax jmp short loc_60981 loc_60979: xor eax, eax cmp cl, 2Fh ; '/' setz al loc_60981: pop rbp retn
_BOOL8 test_if_hard_path(_BYTE *a1) { while ( *a1 == 126 && a1[1] == 47 ) { a1 = (_BYTE *)home_dir; if ( !home_dir ) return 0LL; } return *a1 == 47; }
test_if_hard_path: PUSH RBP MOV RBP,RSP LEA RAX,[0x50b7d8] MOV RAX,qword ptr [RAX] LAB_00160960: MOV CL,byte ptr [RDI] CMP CL,0x7e JNZ 0x00160979 CMP byte ptr [RDI + 0x1],0x2f JNZ 0x00160979 MOV RDI,RAX TEST RAX,RAX JNZ 0x00160960 XOR EAX,EAX JMP 0x00160981 LAB_00160979: XOR EAX,EAX CMP CL,0x2f SETZ AL LAB_00160981: POP RBP RET
bool test_if_hard_path(char *param_1) { while ((*param_1 == '~' && (param_1[1] == '/'))) { param_1 = home_dir; if (home_dir == (char *)0x0) { return false; } } return *param_1 == '/'; }
61,903
ftxui::(anonymous namespace)::Frame::SetBox(ftxui::Box)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/frame.cpp
void SetBox(Box box) override { Node::SetBox(box); auto& selected_box = requirement_.selected_box; Box children_box = box; if (x_frame_) { const int external_dimx = box.x_max - box.x_min; const int internal_dimx = std::max(requirement_.min_x, external_dimx); const int focused_dimx = selected_box.x_max - selected_box.x_min; int dx = selected_box.x_min - external_dimx / 2 + focused_dimx / 2; dx = std::max(0, std::min(internal_dimx - external_dimx - 1, dx)); children_box.x_min = box.x_min - dx; children_box.x_max = box.x_min + internal_dimx - dx; } if (y_frame_) { const int external_dimy = box.y_max - box.y_min; const int internal_dimy = std::max(requirement_.min_y, external_dimy); const int focused_dimy = selected_box.y_max - selected_box.y_min; int dy = selected_box.y_min - external_dimy / 2 + focused_dimy / 2; dy = std::max(0, std::min(internal_dimy - external_dimy - 1, dy)); children_box.y_min = box.y_min - dy; children_box.y_max = box.y_min + internal_dimy - dy; } children_[0]->SetBox(children_box); }
O1
cpp
ftxui::(anonymous namespace)::Frame::SetBox(ftxui::Box): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x24194 movq %r14, %rax shrq $0x20, %rax cmpb $0x1, 0x5c(%r15) jne 0x3968f subl %r14d, %eax movl 0x20(%r15), %ecx movl 0x3c(%r15), %edx cmpl %eax, %ecx cmovlel %eax, %ecx movl 0x40(%r15), %esi subl %edx, %esi movl %eax, %edi shrl $0x1f, %edi addl %eax, %edi sarl %edi subl %edi, %edx movl %esi, %edi shrl $0x1f, %edi addl %esi, %edi sarl %edi addl %edx, %edi notl %eax addl %ecx, %eax cmpl %eax, %edi cmovll %edi, %eax xorl %edx, %edx testl %eax, %eax cmovgl %eax, %edx addl %r14d, %ecx subl %edx, %r14d subl %edx, %ecx movl %ecx, %eax cmpb $0x1, 0x5d(%r15) jne 0x396f1 movq %rbx, %rdx shrq $0x20, %rdx subl %ebx, %edx movl 0x24(%r15), %ecx movl 0x44(%r15), %esi cmpl %edx, %ecx cmovlel %edx, %ecx movl 0x48(%r15), %edi subl %esi, %edi movl %edx, %r8d shrl $0x1f, %r8d addl %edx, %r8d sarl %r8d subl %r8d, %esi movl %edi, %r8d shrl $0x1f, %r8d addl %edi, %r8d sarl %r8d addl %esi, %r8d notl %edx addl %ecx, %edx cmpl %edx, %r8d cmovll %r8d, %edx xorl %esi, %esi testl %edx, %edx cmovgl %edx, %esi addl %ebx, %ecx subl %esi, %ebx subl %esi, %ecx shlq $0x20, %rcx orq %rcx, %rbx movq 0x8(%r15), %rcx movq (%rcx), %rdi shlq $0x20, %rax movl %r14d, %esi orq %rax, %rsi movq (%rdi), %rax movq 0x18(%rax), %rax movq %rbx, %rdx popq %rbx popq %r14 popq %r15 jmpq *%rax nop
_ZN5ftxui12_GLOBAL__N_15Frame6SetBoxENS_3BoxE: push r15 push r14 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi call _ZN5ftxui4Node6SetBoxENS_3BoxE; ftxui::Node::SetBox(ftxui::Box) mov rax, r14 shr rax, 20h cmp byte ptr [r15+5Ch], 1 jnz short loc_3968F sub eax, r14d mov ecx, [r15+20h] mov edx, [r15+3Ch] cmp ecx, eax cmovle ecx, eax mov esi, [r15+40h] sub esi, edx mov edi, eax shr edi, 1Fh add edi, eax sar edi, 1 sub edx, edi mov edi, esi shr edi, 1Fh add edi, esi sar edi, 1 add edi, edx not eax add eax, ecx cmp edi, eax cmovl eax, edi xor edx, edx test eax, eax cmovg edx, eax add ecx, r14d sub r14d, edx sub ecx, edx mov eax, ecx loc_3968F: cmp byte ptr [r15+5Dh], 1 jnz short loc_396F1 mov rdx, rbx shr rdx, 20h sub edx, ebx mov ecx, [r15+24h] mov esi, [r15+44h] cmp ecx, edx cmovle ecx, edx mov edi, [r15+48h] sub edi, esi mov r8d, edx shr r8d, 1Fh add r8d, edx sar r8d, 1 sub esi, r8d mov r8d, edi shr r8d, 1Fh add r8d, edi sar r8d, 1 add r8d, esi not edx add edx, ecx cmp r8d, edx cmovl edx, r8d xor esi, esi test edx, edx cmovg esi, edx add ecx, ebx sub ebx, esi sub ecx, esi shl rcx, 20h or rbx, rcx loc_396F1: mov rcx, [r15+8] mov rdi, [rcx] shl rax, 20h mov esi, r14d or rsi, rax mov rax, [rdi] mov rax, [rax+18h] mov rdx, rbx pop rbx pop r14 pop r15 jmp rax
long long ftxui::`anonymous namespace'::Frame::SetBox(long long a1, unsigned long long a2, long long a3) { unsigned long long v3; // rbx unsigned int v4; // r14d unsigned long long v6; // rax int v7; // eax int v8; // ecx int v9; // edi int v10; // eax int v11; // edx int v12; // edx int v13; // ecx int v14; // r8d int v15; // edx int v16; // esi v3 = a3; v4 = a2; ftxui::Node::SetBox(a1, a2, a3); v6 = HIDWORD(a2); if ( *(_BYTE *)(a1 + 92) == 1 ) { v7 = HIDWORD(a2) - a2; v8 = *(_DWORD *)(a1 + 32); if ( v8 <= HIDWORD(a2) - (int)a2 ) v8 = HIDWORD(a2) - a2; v9 = *(_DWORD *)(a1 + 60) - v7 / 2 + (*(_DWORD *)(a1 + 64) - *(_DWORD *)(a1 + 60)) / 2; v10 = v8 + ~v7; if ( v9 < v10 ) v10 = v9; v11 = 0; if ( v10 > 0 ) v11 = v10; v4 = a2 - v11; v6 = (unsigned int)(a2 + v8 - v11); } if ( *(_BYTE *)(a1 + 93) == 1 ) { v12 = HIDWORD(v3) - v3; v13 = *(_DWORD *)(a1 + 36); if ( v13 <= HIDWORD(v3) - (int)v3 ) v13 = HIDWORD(v3) - v3; v14 = *(_DWORD *)(a1 + 68) - v12 / 2 + (*(_DWORD *)(a1 + 72) - *(_DWORD *)(a1 + 68)) / 2; v15 = v13 + ~v12; if ( v14 < v15 ) v15 = v14; v16 = 0; if ( v15 > 0 ) v16 = v15; v3 = ((unsigned long long)(unsigned int)(v3 + v13 - v16) << 32) | (unsigned int)(v3 - v16); } return (*(long long ( **)(_QWORD, unsigned long long, unsigned long long))(***(_QWORD ***)(a1 + 8) + 24LL))( **(_QWORD **)(a1 + 8), (v6 << 32) | v4, v3); }
SetBox: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x00124194 MOV RAX,R14 SHR RAX,0x20 CMP byte ptr [R15 + 0x5c],0x1 JNZ 0x0013968f SUB EAX,R14D MOV ECX,dword ptr [R15 + 0x20] MOV EDX,dword ptr [R15 + 0x3c] CMP ECX,EAX CMOVLE ECX,EAX MOV ESI,dword ptr [R15 + 0x40] SUB ESI,EDX MOV EDI,EAX SHR EDI,0x1f ADD EDI,EAX SAR EDI,0x1 SUB EDX,EDI MOV EDI,ESI SHR EDI,0x1f ADD EDI,ESI SAR EDI,0x1 ADD EDI,EDX NOT EAX ADD EAX,ECX CMP EDI,EAX CMOVL EAX,EDI XOR EDX,EDX TEST EAX,EAX CMOVG EDX,EAX ADD ECX,R14D SUB R14D,EDX SUB ECX,EDX MOV EAX,ECX LAB_0013968f: CMP byte ptr [R15 + 0x5d],0x1 JNZ 0x001396f1 MOV RDX,RBX SHR RDX,0x20 SUB EDX,EBX MOV ECX,dword ptr [R15 + 0x24] MOV ESI,dword ptr [R15 + 0x44] CMP ECX,EDX CMOVLE ECX,EDX MOV EDI,dword ptr [R15 + 0x48] SUB EDI,ESI MOV R8D,EDX SHR R8D,0x1f ADD R8D,EDX SAR R8D,0x1 SUB ESI,R8D MOV R8D,EDI SHR R8D,0x1f ADD R8D,EDI SAR R8D,0x1 ADD R8D,ESI NOT EDX ADD EDX,ECX CMP R8D,EDX CMOVL EDX,R8D XOR ESI,ESI TEST EDX,EDX CMOVG ESI,EDX ADD ECX,EBX SUB EBX,ESI SUB ECX,ESI SHL RCX,0x20 OR RBX,RCX LAB_001396f1: MOV RCX,qword ptr [R15 + 0x8] MOV RDI,qword ptr [RCX] SHL RAX,0x20 MOV ESI,R14D OR RSI,RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RDX,RBX POP RBX POP R14 POP R15 JMP RAX
/* ftxui::(anonymous namespace)::Frame::SetBox(ftxui::Box) */ void ftxui::(anonymous_namespace)::Frame::SetBox(long param_1,ulong param_2,int8 param_3) { uint uVar1; int iVar2; uint uVar3; ulong uVar4; int iVar5; int iVar6; Node::SetBox(); uVar4 = param_2 >> 0x20; if (*(char *)(param_1 + 0x5c) == '\x01') { iVar5 = (int)param_2; uVar3 = (int)(param_2 >> 0x20) - iVar5; uVar1 = *(uint *)(param_1 + 0x20); if ((int)*(uint *)(param_1 + 0x20) <= (int)uVar3) { uVar1 = uVar3; } iVar6 = (*(int *)(param_1 + 0x40) - *(int *)(param_1 + 0x3c)) / 2 + (*(int *)(param_1 + 0x3c) - (int)uVar3 / 2); iVar2 = ~uVar3 + uVar1; if (iVar6 < (int)(~uVar3 + uVar1)) { iVar2 = iVar6; } iVar6 = 0; if (0 < iVar2) { iVar6 = iVar2; } param_2 = (ulong)(uint)(iVar5 - iVar6); uVar4 = (ulong)((uVar1 + iVar5) - iVar6); } if (*(char *)(param_1 + 0x5d) == '\x01') { iVar5 = (int)param_3; uVar3 = (int)((ulong)param_3 >> 0x20) - iVar5; uVar1 = *(uint *)(param_1 + 0x24); if ((int)*(uint *)(param_1 + 0x24) <= (int)uVar3) { uVar1 = uVar3; } iVar6 = (*(int *)(param_1 + 0x48) - *(int *)(param_1 + 0x44)) / 2 + (*(int *)(param_1 + 0x44) - (int)uVar3 / 2); iVar2 = ~uVar3 + uVar1; if (iVar6 < (int)(~uVar3 + uVar1)) { iVar2 = iVar6; } iVar6 = 0; if (0 < iVar2) { iVar6 = iVar2; } param_3 = CONCAT44((uVar1 + iVar5) - iVar6,iVar5 - iVar6); } /* WARNING: Could not recover jumptable at 0x00139711. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)**(int8 **)(param_1 + 8) + 0x18)) ((long *)**(int8 **)(param_1 + 8),param_2 & 0xffffffff | uVar4 << 0x20,param_3); return; }
61,904
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>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x89421 movb $0x1, (%r14) callq 0x3e1fe movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3e106 jmp 0x89426 cmpl $0x1, %eax jne 0x8943a movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x895b0 pushq $0x20 popq %rdi callq 0x23460 movq %rax, %rbx movq %r14, %rdi callq 0x43be8 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2c2ce(%rip), %rsi # 0xb572a leaq 0x10(%rsp), %rdi callq 0x63c3f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x43a9c xorl %ebp, %ebp leaq 0x72ac1(%rip), %rsi # 0xfbf48 leaq -0x48d16(%rip), %rdx # 0x40778 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x894ad jmp 0x894b5 movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23fc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_89421 mov byte ptr [r14], 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; 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>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_89426 loc_89421: cmp eax, 1 jnz short loc_8943A loc_89426: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_8943A: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_894AD jmp short loc_894B5 mov r14, rax loc_894AD: mov rdi, rbx; void * call ___cxa_free_exception loc_894B5: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; *(_QWORD *)(a1 + 8) = 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>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x00189421 MOV byte ptr [R14],0x1 CALL 0x0013e1fe MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013e106 JMP 0x00189426 LAB_00189421: CMP EAX,0x1 JNZ 0x0018943a LAB_00189426: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001895b0 LAB_0018943a: PUSH 0x20 POP RDI CALL 0x00123460 MOV RBX,RAX MOV RDI,R14 CALL 0x00143be8 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00189455: LEA RSI,[0x1b572a] LEA RDI,[RSP + 0x10] CALL 0x00163c3f MOV BPL,0x1 LAB_00189469: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x00143a9c XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x140778] MOV RDI,RBX CALL 0x00123f30
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(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> > const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,pair *param_1) { ordered_map *poVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; poVar1 = create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> (); *(ordered_map **)(this + 8) = poVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00189455 to 00189465 has its CatchHandler @ 001894aa */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 00189469 to 00189495 has its CatchHandler @ 00189496 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); return; }
61,905
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>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
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>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0xb9098 movb $0x1, (%r14) movl $0x20, %edi callq 0x1a8d0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x591c0 jmp 0xb909d cmpl $0x1, %eax jne 0xb90b1 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0xb92b2 movl $0x20, %edi callq 0x1a440 movq %rax, %rbx movq %r14, %rdi callq 0x5f708 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x38665(%rip), %rsi # 0xf173a leaq 0x10(%rsp), %rdi callq 0x871e5 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x5f4b0 xorl %ebp, %ebp leaq 0x70e58(%rip), %rsi # 0x129f58 leaq -0x5d7c9(%rip), %rdx # 0x5b93e movq %rbx, %rdi callq 0x1af30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb912d movq 0x20(%rsp), %rsi incq %rsi callq 0x1a900 testb %bpl, %bpl jne 0xb9137 jmp 0xb913f movq %rax, %r14 movq %rbx, %rdi callq 0x1a680 movq %r14, %rdi callq 0x1afc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_B9098 mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_B909D loc_B9098: cmp eax, 1 jnz short loc_B90B1 loc_B909D: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_B90B1: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B912D mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B912D: test bpl, bpl jnz short loc_B9137 jmp short loc_B913F mov r14, rax loc_B9137: mov rdi, rbx; void * call ___cxa_free_exception loc_B913F: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; v2 = operator new(0x20uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = 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>::assert_invariant((char *)a1); } return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x001b9098 MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x0011a8d0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x001591c0 JMP 0x001b909d LAB_001b9098: CMP EAX,0x1 JNZ 0x001b90b1 LAB_001b909d: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001b92b2 LAB_001b90b1: MOV EDI,0x20 CALL 0x0011a440 MOV RBX,RAX MOV RDI,R14 CALL 0x0015f708 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001b90ce: LEA RSI,[0x1f173a] LEA RDI,[RSP + 0x10] CALL 0x001871e5 MOV BPL,0x1 LAB_001b90e2: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x0015f4b0 XOR EBP,EBP LEA RSI,[0x229f58] LEA RDX,[0x15b93e] MOV RDI,RBX CALL 0x0011af30
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(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> > const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,pair *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; puVar1 = (int8 *)operator_new(0x20); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001b90ce to 001b90de has its CatchHandler @ 001b9134 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 001b90e2 to 001b910e has its CatchHandler @ 001b910f */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); return; }
61,906
plutovg_canvas_add_text
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
float plutovg_canvas_add_text(plutovg_canvas_t* canvas, const void* text, int length, plutovg_text_encoding_t encoding, float x, float y) { plutovg_state_t* state = canvas->state; if(state->font_face == NULL || state->font_size <= 0.f) return 0.f; plutovg_text_iterator_t it; plutovg_text_iterator_init(&it, text, length, encoding); float advance_width = 0.f; while(plutovg_text_iterator_has_next(&it)) { plutovg_codepoint_t codepoint = plutovg_text_iterator_next(&it); advance_width += plutovg_font_face_get_glyph_path(state->font_face, state->font_size, x + advance_width, y, codepoint, canvas->path); } return advance_width; }
O1
c
plutovg_canvas_add_text: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq 0x18(%rdi), %r15 cmpq $0x0, 0x8(%r15) je 0x242c1 xorps %xmm2, %xmm2 ucomiss 0x88(%r15), %xmm2 jae 0x242c4 movq %rdi, %rbx leaq 0x18(%rsp), %r14 movq %r14, %rdi movss %xmm1, 0x14(%rsp) movss %xmm0, 0x10(%rsp) callq 0x244c4 movq %r14, %rdi callq 0x24548 xorps %xmm0, %xmm0 movss %xmm0, 0xc(%rsp) testb %al, %al je 0x242b9 movss %xmm0, 0xc(%rsp) leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x24552 movq 0x8(%r15), %rdi movss 0x88(%r15), %xmm0 movss 0xc(%rsp), %xmm1 addss 0x10(%rsp), %xmm1 movq 0x10(%rbx), %rdx movss 0x14(%rsp), %xmm2 movl %eax, %esi callq 0x255b8 movss 0xc(%rsp), %xmm1 addss %xmm0, %xmm1 movss %xmm1, 0xc(%rsp) movq %r14, %rdi callq 0x24548 testb %al, %al jne 0x2426b movss 0xc(%rsp), %xmm2 jmp 0x242c4 xorps %xmm2, %xmm2 movaps %xmm2, %xmm0 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq
plutovg_canvas_add_text: push r15 push r14 push rbx sub rsp, 30h mov r15, [rdi+18h] cmp qword ptr [r15+8], 0 jz loc_242C1 xorps xmm2, xmm2 ucomiss xmm2, dword ptr [r15+88h] jnb loc_242C4 mov rbx, rdi lea r14, [rsp+48h+var_30] mov rdi, r14 movss [rsp+48h+var_34], xmm1 movss [rsp+48h+var_38], xmm0 call plutovg_text_iterator_init mov rdi, r14 call plutovg_text_iterator_has_next xorps xmm0, xmm0 movss [rsp+48h+var_3C], xmm0 test al, al jz short loc_242B9 movss [rsp+48h+var_3C], xmm0 lea r14, [rsp+48h+var_30] loc_2426B: mov rdi, r14 call plutovg_text_iterator_next mov rdi, [r15+8] movss xmm0, dword ptr [r15+88h] movss xmm1, [rsp+48h+var_3C] addss xmm1, [rsp+48h+var_38] mov rdx, [rbx+10h] movss xmm2, [rsp+48h+var_34] mov esi, eax call plutovg_font_face_get_glyph_path movss xmm1, [rsp+48h+var_3C] addss xmm1, xmm0 movss [rsp+48h+var_3C], xmm1 mov rdi, r14 call plutovg_text_iterator_has_next test al, al jnz short loc_2426B loc_242B9: movss xmm2, [rsp+48h+var_3C] jmp short loc_242C4 loc_242C1: xorps xmm2, xmm2 loc_242C4: movaps xmm0, xmm2 add rsp, 30h pop rbx pop r14 pop r15 retn
__int128 __usercall plutovg_canvas_add_text@<xmm0>( long long a1@<rdi>, long long a2@<rsi>, long long a3@<rdx>, long long a4@<rcx>, float a5@<xmm0>, float a6@<xmm1>) { long long v6; // r15 __int128 v7; // xmm2 unsigned int v8; // eax float v9; // xmm0_4 double v10; // xmm1_8 float v12; // [rsp+Ch] [rbp-3Ch] _BYTE v15[48]; // [rsp+18h] [rbp-30h] BYREF v6 = *(_QWORD *)(a1 + 24); if ( !*(_QWORD *)(v6 + 8) ) return 0LL; v7 = 0LL; if ( *(float *)(v6 + 136) > 0.0 ) { plutovg_text_iterator_init(v15, a2, a3, a4); v12 = 0.0; if ( (unsigned __int8)plutovg_text_iterator_has_next(v15) ) { v12 = 0.0; do { v8 = plutovg_text_iterator_next(v15); v9 = *(float *)(v6 + 136); *(_QWORD *)&v10 = LODWORD(v12); *(float *)&v10 = v12 + a5; plutovg_font_face_get_glyph_path( *(_QWORD *)(v6 + 8), v8, *(_QWORD *)(a1 + 16), v9, v10, COERCE_DOUBLE((unsigned long long)LODWORD(a6))); v12 = v12 + v9; } while ( (unsigned __int8)plutovg_text_iterator_has_next(v15) ); } return LODWORD(v12); } return v7; }
plutovg_canvas_add_text: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R15,qword ptr [RDI + 0x18] CMP qword ptr [R15 + 0x8],0x0 JZ 0x001242c1 XORPS XMM2,XMM2 UCOMISS XMM2,dword ptr [R15 + 0x88] JNC 0x001242c4 MOV RBX,RDI LEA R14,[RSP + 0x18] MOV RDI,R14 MOVSS dword ptr [RSP + 0x14],XMM1 MOVSS dword ptr [RSP + 0x10],XMM0 CALL 0x001244c4 MOV RDI,R14 CALL 0x00124548 XORPS XMM0,XMM0 MOVSS dword ptr [RSP + 0xc],XMM0 TEST AL,AL JZ 0x001242b9 MOVSS dword ptr [RSP + 0xc],XMM0 LEA R14,[RSP + 0x18] LAB_0012426b: MOV RDI,R14 CALL 0x00124552 MOV RDI,qword ptr [R15 + 0x8] MOVSS XMM0,dword ptr [R15 + 0x88] MOVSS XMM1,dword ptr [RSP + 0xc] ADDSS XMM1,dword ptr [RSP + 0x10] MOV RDX,qword ptr [RBX + 0x10] MOVSS XMM2,dword ptr [RSP + 0x14] MOV ESI,EAX CALL 0x001255b8 MOVSS XMM1,dword ptr [RSP + 0xc] ADDSS XMM1,XMM0 MOVSS dword ptr [RSP + 0xc],XMM1 MOV RDI,R14 CALL 0x00124548 TEST AL,AL JNZ 0x0012426b LAB_001242b9: MOVSS XMM2,dword ptr [RSP + 0xc] JMP 0x001242c4 LAB_001242c1: XORPS XMM2,XMM2 LAB_001242c4: MOVAPS XMM0,XMM2 ADD RSP,0x30 POP RBX POP R14 POP R15 RET
float plutovg_canvas_add_text(float param_1,int4 param_2,long param_3) { long lVar1; char cVar2; int4 uVar3; float fVar4; float local_3c; int1 local_30 [24]; lVar1 = *(long *)(param_3 + 0x18); if (*(long *)(lVar1 + 8) == 0) { local_3c = 0.0; } else { local_3c = 0.0; if (0.0 < *(float *)(lVar1 + 0x88)) { plutovg_text_iterator_init(local_30); cVar2 = plutovg_text_iterator_has_next(local_30); local_3c = 0.0; if (cVar2 != '\0') { local_3c = 0.0; do { uVar3 = plutovg_text_iterator_next(local_30); fVar4 = (float)plutovg_font_face_get_glyph_path (*(int4 *)(lVar1 + 0x88),local_3c + param_1,param_2, *(int8 *)(lVar1 + 8),uVar3,*(int8 *)(param_3 + 0x10) ); local_3c = local_3c + fVar4; cVar2 = plutovg_text_iterator_has_next(local_30); } while (cVar2 != '\0'); } } } return local_3c; }
61,907
my_b_append
eloqsql/mysys/mf_iocache.c
int my_b_append(IO_CACHE *info, const uchar *Buffer, size_t Count) { size_t rest_length,length; MEM_CHECK_DEFINED(Buffer, Count); /* Assert that we cannot come here with a shared cache. If we do one day, we might need to add a call to copy_to_read_buffer(). */ DBUG_ASSERT(!info->share); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); lock_append_buffer(info); rest_length= (size_t) (info->write_end - info->write_pos); if (Count <= rest_length) goto end; memcpy(info->write_pos, Buffer, rest_length); Buffer+=rest_length; Count-=rest_length; info->write_pos+=rest_length; if (my_b_flush_io_cache(info,0)) { unlock_append_buffer(info); return 1; } if (Count >= IO_SIZE) { /* Fill first intern buffer */ length= IO_ROUND_DN(Count); if (mysql_file_write(info->file,Buffer, length, info->myflags | MY_NABP)) { unlock_append_buffer(info); return info->error= -1; } Count-=length; Buffer+=length; info->end_of_file+=length; } end: memcpy(info->write_pos,Buffer,(size_t) Count); info->write_pos+=Count; unlock_append_buffer(info); return 0; }
O0
c
my_b_append: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0xb86a6 jmp 0xb86a8 jmp 0xb86aa movq -0x10(%rbp), %rdi addq $0x50, %rdi leaq 0xb5377(%rip), %rsi # 0x16da30 movl $0x62b, %edx # imm = 0x62B callq 0xb83f0 movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq -0x10(%rbp), %rcx movq 0x40(%rcx), %rcx subq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax ja 0xb86e9 jmp 0xb87fb movq -0x10(%rbp), %rax movq 0x40(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x600e0 movq -0x28(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x40(%rax), %rcx movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0xb7810 cmpl $0x0, %eax je 0xb8752 movq -0x10(%rbp), %rdi addq $0x50, %rdi callq 0xb8520 movl $0x1, -0x4(%rbp) jmp 0xb8834 cmpq $0x1000, -0x20(%rbp) # imm = 0x1000 jb 0xb87f9 movabsq $0xfffff000, %rax # imm = 0xFFFFF000 andq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x30(%rbp), %r8 movq -0x10(%rbp), %rax movq 0xf8(%rax), %r9 orq $0x4, %r9 leaq 0xb5296(%rip), %rdi # 0x16da30 movl $0x63b, %esi # imm = 0x63B callq 0xb8840 cmpq $0x0, %rax je 0xb87ce movq -0x10(%rbp), %rdi addq $0x50, %rdi callq 0xb8520 movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xb8834 movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x8(%rax), %rcx movq %rcx, 0x8(%rax) jmp 0xb87fb movq -0x10(%rbp), %rax movq 0x40(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x600e0 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x40(%rax), %rcx movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rdi addq $0x50, %rdi callq 0xb8520 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_b_append: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_B86A6: jmp short $+2 loc_B86A8: jmp short $+2 loc_B86AA: mov rdi, [rbp+var_10] add rdi, 50h ; 'P' lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 62Bh call inline_mysql_mutex_lock_0 mov rax, [rbp+var_10] mov rax, [rax+48h] mov rcx, [rbp+var_10] mov rcx, [rcx+40h] sub rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_28] ja short loc_B86E9 jmp loc_B87FB loc_B86E9: mov rax, [rbp+var_10] mov rdi, [rax+40h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call _memcpy mov rax, [rbp+var_28] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_28] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax mov rcx, [rbp+var_28] mov rax, [rbp+var_10] add rcx, [rax+40h] mov [rax+40h], rcx mov rdi, [rbp+var_10] xor esi, esi call my_b_flush_io_cache cmp eax, 0 jz short loc_B8752 mov rdi, [rbp+var_10] add rdi, 50h ; 'P' call inline_mysql_mutex_unlock_0 mov [rbp+var_4], 1 jmp loc_B8834 loc_B8752: cmp [rbp+var_20], 1000h jb loc_B87F9 mov rax, 0FFFFF000h and rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_30] mov rax, [rbp+var_10] mov r9, [rax+0F8h] or r9, 4 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 63Bh call inline_mysql_file_write cmp rax, 0 jz short loc_B87CE mov rdi, [rbp+var_10] add rdi, 50h ; 'P' call inline_mysql_mutex_unlock_0 mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp short loc_B8834 loc_B87CE: mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_10] add rcx, [rax+8] mov [rax+8], rcx loc_B87F9: jmp short $+2 loc_B87FB: mov rax, [rbp+var_10] mov rdi, [rax+40h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcpy mov rcx, [rbp+var_20] mov rax, [rbp+var_10] add rcx, [rax+40h] mov [rax+40h], rcx mov rdi, [rbp+var_10] add rdi, 50h ; 'P' call inline_mysql_mutex_unlock_0 mov [rbp+var_4], 0 loc_B8834: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_b_append(long long a1, long long a2, unsigned long long a3) { long long v4; // [rsp+0h] [rbp-30h] unsigned long long v5; // [rsp+8h] [rbp-28h] long long v7; // [rsp+18h] [rbp-18h] v7 = a2; inline_mysql_mutex_lock_0(a1 + 80, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x62Bu); v5 = *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 64); if ( a3 <= v5 ) goto LABEL_8; memcpy(*(_QWORD *)(a1 + 64), a2, v5); v7 = a2 + v5; a3 -= v5; *(_QWORD *)(a1 + 64) += v5; if ( !(unsigned int)my_b_flush_io_cache(a1, 0) ) { if ( a3 >= 0x1000 ) { v4 = (unsigned int)a3 & 0xFFFFF000; if ( inline_mysql_file_write( "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1595LL, *(unsigned int *)(a1 + 212), v7, v4, *(_QWORD *)(a1 + 248) | 4LL) ) { inline_mysql_mutex_unlock_0(a1 + 80); *(_DWORD *)(a1 + 228) = -1; return (unsigned int)-1; } a3 -= v4; v7 += v4; *(_QWORD *)(a1 + 8) += v4; } LABEL_8: memcpy(*(_QWORD *)(a1 + 64), v7, a3); *(_QWORD *)(a1 + 64) += a3; inline_mysql_mutex_unlock_0(a1 + 80); return 0; } inline_mysql_mutex_unlock_0(a1 + 80); return 1; }
my_b_append: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x001b86a6 LAB_001b86a6: JMP 0x001b86a8 LAB_001b86a8: JMP 0x001b86aa LAB_001b86aa: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 LEA RSI,[0x26da30] MOV EDX,0x62b CALL 0x001b83f0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x40] SUB RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JA 0x001b86e9 JMP 0x001b87fb LAB_001b86e9: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001600e0 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x40] MOV qword ptr [RAX + 0x40],RCX MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x001b7810 CMP EAX,0x0 JZ 0x001b8752 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 CALL 0x001b8520 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001b8834 LAB_001b8752: CMP qword ptr [RBP + -0x20],0x1000 JC 0x001b87f9 MOV RAX,0xfffff000 AND RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV R9,qword ptr [RAX + 0xf8] OR R9,0x4 LEA RDI,[0x26da30] MOV ESI,0x63b CALL 0x001b8840 CMP RAX,0x0 JZ 0x001b87ce MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 CALL 0x001b8520 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001b8834 LAB_001b87ce: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_001b87f9: JMP 0x001b87fb LAB_001b87fb: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001600e0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x40] MOV qword ptr [RAX + 0x40],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 CALL 0x001b8520 MOV dword ptr [RBP + -0x4],0x0 LAB_001b8834: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_b_append(long param_1,void *param_2,ulong param_3) { int iVar1; ulong uVar2; long lVar3; size_t local_28; void *local_20; inline_mysql_mutex_lock (param_1 + 0x50,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x62b); uVar2 = *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40); local_28 = param_3; local_20 = param_2; if (uVar2 < param_3) { memcpy(*(void **)(param_1 + 0x40),param_2,uVar2); local_20 = (void *)(uVar2 + (long)param_2); local_28 = param_3 - uVar2; *(ulong *)(param_1 + 0x40) = uVar2 + *(long *)(param_1 + 0x40); iVar1 = my_b_flush_io_cache(param_1,0); if (iVar1 != 0) { inline_mysql_mutex_unlock(param_1 + 0x50); return 1; } if (0xfff < local_28) { uVar2 = local_28 & 0xfffff000; lVar3 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x63b, *(int4 *)(param_1 + 0xd4),local_20,uVar2, *(ulong *)(param_1 + 0xf8) | 4); if (lVar3 != 0) { inline_mysql_mutex_unlock(param_1 + 0x50); *(int4 *)(param_1 + 0xe4) = 0xffffffff; return 0xffffffff; } local_28 = local_28 - uVar2; local_20 = (void *)(uVar2 + (long)local_20); *(ulong *)(param_1 + 8) = uVar2 + *(long *)(param_1 + 8); } } memcpy(*(void **)(param_1 + 0x40),local_20,local_28); *(size_t *)(param_1 + 0x40) = local_28 + *(long *)(param_1 + 0x40); inline_mysql_mutex_unlock(param_1 + 0x50); return 0; }
61,908
js_std_file_seek
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_seek(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f = js_std_file_get(ctx, this_val); int64_t pos; int whence, ret; if (!f) return JS_EXCEPTION; if (JS_ToInt64Ext(ctx, &pos, argv[0])) return JS_EXCEPTION; if (JS_ToInt32(ctx, &whence, argv[1])) return JS_EXCEPTION; #if defined(__linux__) ret = fseeko(f, pos, whence); #else ret = fseek(f, pos, whence); #endif if (ret < 0) ret = -errno; return JS_NewInt32(ctx, ret); }
O0
c
js_std_file_seek: subq $0x78, %rsp movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movl %ecx, 0x2c(%rsp) movq %r8, 0x20(%rsp) movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0x19d70 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x191a3 movl $0x0, 0x48(%rsp) movq $0x6, 0x50(%rsp) jmp 0x19272 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x10(%rsp), %rsi callq 0x3f100 cmpl $0x0, %eax je 0x191d9 movl $0x0, 0x48(%rsp) movq $0x6, 0x50(%rsp) jmp 0x19272 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0xc(%rsp), %rsi callq 0x3f210 cmpl $0x0, %eax je 0x1920d movl $0x0, 0x48(%rsp) movq $0x6, 0x50(%rsp) jmp 0x19272 movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi movl 0xc(%rsp), %edx callq 0xe800 movl %eax, 0x8(%rsp) cmpl $0x0, 0x8(%rsp) jge 0x1923b callq 0xe0b0 movq %rax, %rcx xorl %eax, %eax subl (%rcx), %eax movl %eax, 0x8(%rsp) movq 0x30(%rsp), %rcx movl 0x8(%rsp), %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) movl 0x5c(%rsp), %eax movl %eax, 0x68(%rsp) movq $0x0, 0x70(%rsp) movq 0x68(%rsp), %rcx movq 0x70(%rsp), %rax movq %rcx, 0x48(%rsp) movq %rax, 0x50(%rsp) movq 0x48(%rsp), %rax movq 0x50(%rsp), %rdx addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
js_std_file_seek: sub rsp, 78h mov [rsp+78h+var_40], rsi mov [rsp+78h+var_38], rdx mov [rsp+78h+var_48], rdi mov [rsp+78h+var_4C], ecx mov [rsp+78h+var_58], r8 mov rdi, [rsp+78h+var_48] mov rsi, [rsp+78h+var_40] mov rdx, [rsp+78h+var_38] call js_std_file_get mov [rsp+78h+var_60], rax cmp [rsp+78h+var_60], 0 jnz short loc_191A3 mov dword ptr [rsp+78h+var_30], 0 mov [rsp+78h+var_28], 6 jmp loc_19272 loc_191A3: mov rdi, [rsp+78h+var_48] mov rax, [rsp+78h+var_58] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+78h+var_68] call JS_ToInt64Ext cmp eax, 0 jz short loc_191D9 mov dword ptr [rsp+78h+var_30], 0 mov [rsp+78h+var_28], 6 jmp loc_19272 loc_191D9: mov rdi, [rsp+78h+var_48] mov rax, [rsp+78h+var_58] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+78h+var_6C] call JS_ToInt32 cmp eax, 0 jz short loc_1920D mov dword ptr [rsp+78h+var_30], 0 mov [rsp+78h+var_28], 6 jmp short loc_19272 loc_1920D: mov rdi, [rsp+78h+var_60] mov rsi, [rsp+78h+var_68] mov edx, [rsp+78h+var_6C] call _fseeko mov [rsp+78h+var_70], eax cmp [rsp+78h+var_70], 0 jge short loc_1923B call ___errno_location mov rcx, rax xor eax, eax sub eax, [rcx] mov [rsp+78h+var_70], eax loc_1923B: mov rcx, [rsp+78h+var_48] mov eax, [rsp+78h+var_70] mov [rsp+78h+var_18], rcx mov [rsp+78h+var_1C], eax mov eax, [rsp+78h+var_1C] mov dword ptr [rsp+78h+var_10], eax mov [rsp+78h+var_8], 0 mov rcx, [rsp+78h+var_10] mov rax, [rsp+78h+var_8] mov [rsp+78h+var_30], rcx mov [rsp+78h+var_28], rax loc_19272: mov rax, [rsp+78h+var_30] mov rdx, [rsp+78h+var_28] add rsp, 78h retn
long long js_std_file_seek(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { int v6; // [rsp+8h] [rbp-70h] unsigned int v7; // [rsp+Ch] [rbp-6Ch] BYREF long long v8; // [rsp+10h] [rbp-68h] BYREF long long v9; // [rsp+18h] [rbp-60h] _QWORD *v10; // [rsp+20h] [rbp-58h] int v11; // [rsp+2Ch] [rbp-4Ch] long long v12; // [rsp+30h] [rbp-48h] long long v13; // [rsp+38h] [rbp-40h] long long v14; // [rsp+40h] [rbp-38h] long long v15; // [rsp+48h] [rbp-30h] long long v16; // [rsp+50h] [rbp-28h] int v17; // [rsp+5Ch] [rbp-1Ch] long long v18; // [rsp+60h] [rbp-18h] long long v19; // [rsp+68h] [rbp-10h] long long v20; // [rsp+70h] [rbp-8h] v13 = a2; v14 = a3; v12 = a1; v11 = a4; v10 = a5; v9 = js_std_file_get(a1, a2, a3); if ( v9 ) { if ( (unsigned int)JS_ToInt64Ext(v12, &v8, *v10, v10[1]) ) { LODWORD(v15) = 0; v16 = 6LL; } else if ( (unsigned int)JS_ToInt32(v12, &v7, v10[2], v10[3]) ) { LODWORD(v15) = 0; v16 = 6LL; } else { v6 = fseeko(v9, v8, v7); if ( v6 < 0 ) v6 = -*(_DWORD *)__errno_location(); v18 = v12; v17 = v6; LODWORD(v19) = v6; v20 = 0LL; v15 = v19; v16 = 0LL; } } else { LODWORD(v15) = 0; v16 = 6LL; } return v15; }
js_std_file_seek: SUB RSP,0x78 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x30],RDI MOV dword ptr [RSP + 0x2c],ECX MOV qword ptr [RSP + 0x20],R8 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] CALL 0x00119d70 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001191a3 MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x6 JMP 0x00119272 LAB_001191a3: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x10] CALL 0x0013f100 CMP EAX,0x0 JZ 0x001191d9 MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x6 JMP 0x00119272 LAB_001191d9: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0xc] CALL 0x0013f210 CMP EAX,0x0 JZ 0x0011920d MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x6 JMP 0x00119272 LAB_0011920d: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc] CALL 0x0010e800 MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x8],0x0 JGE 0x0011923b CALL 0x0010e0b0 MOV RCX,RAX XOR EAX,EAX SUB EAX,dword ptr [RCX] MOV dword ptr [RSP + 0x8],EAX LAB_0011923b: MOV RCX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x60],RCX MOV dword ptr [RSP + 0x5c],EAX MOV EAX,dword ptr [RSP + 0x5c] MOV dword ptr [RSP + 0x68],EAX MOV qword ptr [RSP + 0x70],0x0 MOV RCX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x50],RAX LAB_00119272: MOV RAX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RSP,0x78 RET
int1 [16] js_std_file_seek(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; int *piVar3; int local_70; int local_6c; __off_t local_68; FILE *local_60; int8 *local_58; int4 local_4c; int8 local_48; int8 local_40; int8 local_38; int local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; local_58 = param_5; local_4c = param_4; local_48 = param_1; local_40 = param_2; local_38 = param_3; local_60 = (FILE *)js_std_file_get(param_1,param_2,param_3); if (local_60 == (FILE *)0x0) { local_30 = 0; local_28 = 6; } else { iVar2 = JS_ToInt64Ext(local_48,&local_68,*local_58,local_58[1]); if (iVar2 == 0) { iVar2 = JS_ToInt32(local_48,&local_6c,local_58[2],local_58[3]); if (iVar2 == 0) { local_70 = fseeko(local_60,local_68,local_6c); if (local_70 < 0) { piVar3 = __errno_location(); local_70 = -*piVar3; } local_30 = local_70; uStack_2c = uStack_c; local_28 = 0; } else { local_30 = 0; local_28 = 6; } } else { local_30 = 0; local_28 = 6; } } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
61,909
inline_mysql_start_statement(PSI_statement_locker_state_v1*, unsigned int, char const*, unsigned long, charset_info_st const*, PSI_sp_share*, char const*, unsigned int)
eloqsql/include/mysql/psi/mysql_statement.h
static inline struct PSI_statement_locker * inline_mysql_start_statement(PSI_statement_locker_state *state, PSI_statement_key key, const char *db, size_t db_len, CHARSET_INFO *charset, PSI_sp_share *sp_share, const char *src_file, uint src_line) { PSI_statement_locker *locker; locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset, sp_share); if (psi_likely(locker != NULL)) PSI_STATEMENT_CALL(start_statement)(locker, db, (uint)db_len, src_file, src_line); return locker; }
O0
c
inline_mysql_start_statement(PSI_statement_locker_state_v1*, unsigned int, char const*, unsigned long, charset_info_st const*, PSI_sp_share*, char const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl 0x18(%rbp), %eax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x958cf3(%rip), %rax # 0x13feeb0 movq (%rax), %rax movq 0x250(%rax), %rax movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq *%rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0xaa6217 leaq 0x958cbb(%rip), %rax # 0x13feeb0 movq (%rax), %rax movq 0x260(%rax), %rax movq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rcx movl %ecx, %edx movq 0x10(%rbp), %rcx movl 0x18(%rbp), %r8d callq *%rax movq -0x38(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL28inline_mysql_start_statementP29PSI_statement_locker_state_v1jPKcmPK15charset_info_stP12PSI_sp_shareS2_j_3: push rbp mov rbp, rsp sub rsp, 40h mov eax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+250h] mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call rax mov [rbp+var_38], rax cmp [rbp+var_38], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_AA6217 lea rax, PSI_server mov rax, [rax] mov rax, [rax+260h] mov rdi, [rbp+var_38] mov rsi, [rbp+var_18] mov rcx, [rbp+var_20] mov edx, ecx mov rcx, [rbp+arg_0] mov r8d, [rbp+arg_8] call rax loc_AA6217: mov rax, [rbp+var_38] add rsp, 40h pop rbp retn
long long inline_mysql_start_statement( long long a1, unsigned int a2, long long a3, unsigned int a4, long long a5, long long a6, long long a7, unsigned int a8) { long long v9; // [rsp+8h] [rbp-38h] v9 = ((long long ( *)(long long, _QWORD, long long, long long))PSI_server[74])(a1, a2, a5, a6); if ( v9 ) ((void ( *)(long long, long long, _QWORD, long long, _QWORD))PSI_server[76])(v9, a3, a4, a7, a8); return v9; }
~Item_func_soundex: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x00aa6150 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xc8 CALL 0x005b7780 ADD RSP,0x10 POP RBP RET
/* Item_func_soundex::~Item_func_soundex() */ void __thiscall Item_func_soundex::~Item_func_soundex(Item_func_soundex *this) { ~Item_func_soundex(this); Item::operator_delete(this,200); return; }
61,910
ggml_compute_forward_add1_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_add1_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; const struct ggml_tensor * src1 = dst->src[1]; GGML_ASSERT(ggml_are_same_shape(src0, dst)); GGML_ASSERT(ggml_is_scalar(src1)); const int ith = params->ith; const int nth = params->nth; const int nr = ggml_nrows(src0); GGML_TENSOR_UNARY_OP_LOCALS GGML_ASSERT( nb0 == sizeof(float)); GGML_ASSERT(nb00 == sizeof(float)); // rows per thread const int dr = (nr + nth - 1)/nth; // row range for this thread const int ir0 = dr*ith; const int ir1 = MIN(ir0 + dr, nr); for (int ir = ir0; ir < ir1; ++ir) { // src0 and dst are same shape => same indices const int i3 = ir/(ne2*ne1); const int i2 = (ir - i3*ne2*ne1)/ne1; const int i1 = (ir - i3*ne2*ne1 - i2*ne1); #ifdef GGML_USE_ACCELERATE UNUSED(ggml_vec_add1_f32); vDSP_vadd( (float *) ((char *) src0->data + i3*nb03 + i2*nb02 + i1*nb01), 1, (float *) ((char *) src1->data), 0, (float *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*nb1 ), 1, ne0); #else ggml_vec_add1_f32(ne0, (float *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*nb1 ), (float *) ((char *) src0->data + i3*nb03 + i2*nb02 + i1*nb01), *(float *) src1->data); #endif } }
O0
c
ggml_compute_forward_add1_f32: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe260 testb $0x1, %al jne 0x21863 leaq 0x52319(%rip), %rdi # 0x73b62 movl $0x1189, %esi # imm = 0x1189 leaq 0x5236c(%rip), %rdx # 0x73bc1 leaq 0x52a5e(%rip), %rcx # 0x742ba movb $0x0, %al callq 0xe270 movq -0x20(%rbp), %rdi callq 0xe290 testb $0x1, %al jne 0x21891 leaq 0x522eb(%rip), %rdi # 0x73b62 movl $0x118a, %esi # imm = 0x118A leaq 0x5233e(%rip), %rdx # 0x73bc1 leaq 0x52cb3(%rip), %rcx # 0x7453d movb $0x0, %al callq 0xe270 movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0xdc20 movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x88(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x98(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0xa0(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0xa8(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0xb0(%rbp) cmpq $0x4, -0x98(%rbp) je 0x219ad leaq 0x521cf(%rip), %rdi # 0x73b62 movl $0x1193, %esi # imm = 0x1193 leaq 0x52222(%rip), %rdx # 0x73bc1 leaq 0x52933(%rip), %rcx # 0x742d9 movb $0x0, %al callq 0xe270 cmpq $0x4, -0x58(%rbp) je 0x219d5 leaq 0x521a7(%rip), %rdi # 0x73b62 movl $0x1194, %esi # imm = 0x1194 leaq 0x521fa(%rip), %rdx # 0x73bc1 leaq 0x52920(%rip), %rcx # 0x742ee movb $0x0, %al callq 0xe270 movl -0x2c(%rbp), %eax addl -0x28(%rbp), %eax subl $0x1, %eax cltd idivl -0x28(%rbp) movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax imull -0x24(%rbp), %eax movl %eax, -0xb8(%rbp) movl -0xb8(%rbp), %eax addl -0xb4(%rbp), %eax cmpl -0x2c(%rbp), %eax jge 0x21a1d movl -0xb8(%rbp), %eax addl -0xb4(%rbp), %eax movl %eax, -0xd0(%rbp) jmp 0x21a26 movl -0x2c(%rbp), %eax movl %eax, -0xd0(%rbp) movl -0xd0(%rbp), %eax movl %eax, -0xbc(%rbp) movl -0xb8(%rbp), %eax movl %eax, -0xc0(%rbp) movl -0xc0(%rbp), %eax cmpl -0xbc(%rbp), %eax jge 0x21b72 movslq -0xc0(%rbp), %rax movq -0x88(%rbp), %rcx imulq -0x80(%rbp), %rcx cqto idivq %rcx movl %eax, -0xc4(%rbp) movslq -0xc0(%rbp), %rax movslq -0xc4(%rbp), %rcx imulq -0x88(%rbp), %rcx imulq -0x80(%rbp), %rcx subq %rcx, %rax cqto idivq -0x80(%rbp) movl %eax, -0xc8(%rbp) movslq -0xc0(%rbp), %rax movslq -0xc4(%rbp), %rcx imulq -0x88(%rbp), %rcx imulq -0x80(%rbp), %rcx subq %rcx, %rax movslq -0xc8(%rbp), %rcx imulq -0x80(%rbp), %rcx subq %rcx, %rax movl %eax, -0xcc(%rbp) movq -0x78(%rbp), %rax movl %eax, %edi movq -0x10(%rbp), %rax movq 0xf8(%rax), %rsi movslq -0xc4(%rbp), %rax imulq -0xb0(%rbp), %rax addq %rax, %rsi movslq -0xc8(%rbp), %rax imulq -0xa8(%rbp), %rax addq %rax, %rsi movslq -0xcc(%rbp), %rax imulq -0xa0(%rbp), %rax addq %rax, %rsi movq -0x18(%rbp), %rax movq 0xf8(%rax), %rdx movslq -0xc4(%rbp), %rax imulq -0x70(%rbp), %rax addq %rax, %rdx movslq -0xc8(%rbp), %rax imulq -0x68(%rbp), %rax addq %rax, %rdx movslq -0xcc(%rbp), %rax imulq -0x60(%rbp), %rax addq %rax, %rdx movq -0x20(%rbp), %rax movq 0xf8(%rax), %rax vmovss (%rax), %xmm0 callq 0x23360 movl -0xc0(%rbp), %eax addl $0x1, %eax movl %eax, -0xc0(%rbp) jmp 0x21a3e addq $0xd0, %rsp popq %rbp retq nopl (%rax,%rax)
ggml_compute_forward_add1_f32: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+0A0h] mov [rbp+var_20], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] call _ggml_are_same_shape test al, 1 jnz short loc_21863 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1189h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)" mov al, 0 call _ggml_abort loc_21863: mov rdi, [rbp+var_20] call _ggml_is_scalar test al, 1 jnz short loc_21891 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 118Ah lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsScalarSr; "ggml_is_scalar(src1)" mov al, 0 call _ggml_abort loc_21891: mov rax, [rbp+var_8] mov eax, [rax] mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+4] mov [rbp+var_28], eax mov rdi, [rbp+var_18] call _ggml_nrows mov [rbp+var_2C], eax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov rax, [rax+18h] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov rax, [rax+28h] mov [rbp+var_50], rax mov rax, [rbp+var_18] mov rax, [rax+30h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rbp+var_60], rax mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_68], rax mov rax, [rbp+var_18] mov rax, [rax+48h] mov [rbp+var_70], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_80], rax mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_88], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_90], rax mov rax, [rbp+var_10] mov rax, [rax+30h] mov [rbp+var_98], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_A0], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov [rbp+var_A8], rax mov rax, [rbp+var_10] mov rax, [rax+48h] mov [rbp+var_B0], rax cmp [rbp+var_98], 4 jz short loc_219AD lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1193h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNb0SizeofFloat; "nb0 == sizeof(float)" mov al, 0 call _ggml_abort loc_219AD: cmp [rbp+var_58], 4 jz short loc_219D5 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1194h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNb00SizeofFloa; "nb00 == sizeof(float)" mov al, 0 call _ggml_abort loc_219D5: mov eax, [rbp+var_2C] add eax, [rbp+var_28] sub eax, 1 cdq idiv [rbp+var_28] mov [rbp+var_B4], eax mov eax, [rbp+var_B4] imul eax, [rbp+var_24] mov [rbp+var_B8], eax mov eax, [rbp+var_B8] add eax, [rbp+var_B4] cmp eax, [rbp+var_2C] jge short loc_21A1D mov eax, [rbp+var_B8] add eax, [rbp+var_B4] mov [rbp+var_D0], eax jmp short loc_21A26 loc_21A1D: mov eax, [rbp+var_2C] mov [rbp+var_D0], eax loc_21A26: mov eax, [rbp+var_D0] mov [rbp+var_BC], eax mov eax, [rbp+var_B8] mov [rbp+var_C0], eax loc_21A3E: mov eax, [rbp+var_C0] cmp eax, [rbp+var_BC] jge loc_21B72 movsxd rax, [rbp+var_C0] mov rcx, [rbp+var_88] imul rcx, [rbp+var_80] cqo idiv rcx mov [rbp+var_C4], eax movsxd rax, [rbp+var_C0] movsxd rcx, [rbp+var_C4] imul rcx, [rbp+var_88] imul rcx, [rbp+var_80] sub rax, rcx cqo idiv [rbp+var_80] mov [rbp+var_C8], eax movsxd rax, [rbp+var_C0] movsxd rcx, [rbp+var_C4] imul rcx, [rbp+var_88] imul rcx, [rbp+var_80] sub rax, rcx movsxd rcx, [rbp+var_C8] imul rcx, [rbp+var_80] sub rax, rcx mov [rbp+var_CC], eax mov rax, [rbp+var_78] mov edi, eax mov rax, [rbp+var_10] mov rsi, [rax+0F8h] movsxd rax, [rbp+var_C4] imul rax, [rbp+var_B0] add rsi, rax movsxd rax, [rbp+var_C8] imul rax, [rbp+var_A8] add rsi, rax movsxd rax, [rbp+var_CC] imul rax, [rbp+var_A0] add rsi, rax mov rax, [rbp+var_18] mov rdx, [rax+0F8h] movsxd rax, [rbp+var_C4] imul rax, [rbp+var_70] add rdx, rax movsxd rax, [rbp+var_C8] imul rax, [rbp+var_68] add rdx, rax movsxd rax, [rbp+var_CC] imul rax, [rbp+var_60] add rdx, rax mov rax, [rbp+var_20] mov rax, [rax+0F8h] vmovss xmm0, dword ptr [rax] call ggml_vec_add1_f32 mov eax, [rbp+var_C0] add eax, 1 mov [rbp+var_C0], eax jmp loc_21A3E loc_21B72: add rsp, 0D0h pop rbp retn
long long ggml_compute_forward_add1_f32(int *a1, _QWORD *a2) { long long result; // rax int v5; // [rsp+0h] [rbp-D0h] int v6; // [rsp+4h] [rbp-CCh] int v7; // [rsp+8h] [rbp-C8h] int v8; // [rsp+Ch] [rbp-C4h] int i; // [rsp+10h] [rbp-C0h] int v10; // [rsp+1Ch] [rbp-B4h] long long v11; // [rsp+20h] [rbp-B0h] long long v12; // [rsp+28h] [rbp-A8h] long long v13; // [rsp+30h] [rbp-A0h] long long v14; // [rsp+48h] [rbp-88h] long long v15; // [rsp+50h] [rbp-80h] long long v16; // [rsp+58h] [rbp-78h] long long v17; // [rsp+60h] [rbp-70h] long long v18; // [rsp+68h] [rbp-68h] long long v19; // [rsp+70h] [rbp-60h] long long v20; // [rsp+78h] [rbp-58h] int v21; // [rsp+A4h] [rbp-2Ch] int v22; // [rsp+A8h] [rbp-28h] int v23; // [rsp+ACh] [rbp-24h] long long v24; // [rsp+B0h] [rbp-20h] _QWORD *v25; // [rsp+B8h] [rbp-18h] v25 = (_QWORD *)a2[19]; v24 = a2[20]; if ( (ggml_are_same_shape(v25, a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4489LL, "GGML_ASSERT(%s) failed", "ggml_are_same_shape(src0, dst)"); if ( (ggml_is_scalar(v24) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4490LL, "GGML_ASSERT(%s) failed", "ggml_is_scalar(src1)"); v23 = *a1; v22 = a1[1]; v21 = ggml_nrows(v25); v20 = v25[6]; v19 = v25[7]; v18 = v25[8]; v17 = v25[9]; v16 = a2[2]; v15 = a2[3]; v14 = a2[4]; v13 = a2[7]; v12 = a2[8]; v11 = a2[9]; if ( a2[6] != 4LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4499LL, "GGML_ASSERT(%s) failed", "nb0 == sizeof(float)"); if ( v20 != 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4500LL, "GGML_ASSERT(%s) failed", "nb00 == sizeof(float)"); v10 = (v22 + v21 - 1) / v22; if ( v10 + v23 * v10 >= v21 ) v5 = v21; else v5 = v10 + v23 * ((v22 + v21 - 1) / v22); for ( i = v23 * ((v22 + v21 - 1) / v22); ; ++i ) { result = (unsigned int)i; if ( i >= v5 ) break; v8 = i / (v15 * v14); v7 = (i - v15 * v14 * v8) / v15; v6 = (i - v15 * v14 * v8) % v15; _RAX = *(_QWORD *)(v24 + 248); __asm { vmovss xmm0, dword ptr [rax] } ggml_vec_add1_f32( (unsigned int)v16, v13 * v6 + v12 * v7 + v11 * v8 + a2[31], v19 * v6 + v18 * v7 + v17 * v8 + v25[31], *(double *)&_XMM0); } return result; }
ggml_compute_forward_add1_f32: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010e260 TEST AL,0x1 JNZ 0x00121863 LEA RDI,[0x173b62] MOV ESI,0x1189 LEA RDX,[0x173bc1] LEA RCX,[0x1742ba] MOV AL,0x0 CALL 0x0010e270 LAB_00121863: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010e290 TEST AL,0x1 JNZ 0x00121891 LEA RDI,[0x173b62] MOV ESI,0x118a LEA RDX,[0x173bc1] LEA RCX,[0x17453d] MOV AL,0x0 CALL 0x0010e270 LAB_00121891: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x28],EAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010dc20 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0xb0],RAX CMP qword ptr [RBP + -0x98],0x4 JZ 0x001219ad LEA RDI,[0x173b62] MOV ESI,0x1193 LEA RDX,[0x173bc1] LEA RCX,[0x1742d9] MOV AL,0x0 CALL 0x0010e270 LAB_001219ad: CMP qword ptr [RBP + -0x58],0x4 JZ 0x001219d5 LEA RDI,[0x173b62] MOV ESI,0x1194 LEA RDX,[0x173bc1] LEA RCX,[0x1742ee] MOV AL,0x0 CALL 0x0010e270 LAB_001219d5: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,dword ptr [RBP + -0x28] SUB EAX,0x1 CDQ IDIV dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] IMUL EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0xb8],EAX MOV EAX,dword ptr [RBP + -0xb8] ADD EAX,dword ptr [RBP + -0xb4] CMP EAX,dword ptr [RBP + -0x2c] JGE 0x00121a1d MOV EAX,dword ptr [RBP + -0xb8] ADD EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xd0],EAX JMP 0x00121a26 LAB_00121a1d: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0xd0],EAX LAB_00121a26: MOV EAX,dword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0xbc],EAX MOV EAX,dword ptr [RBP + -0xb8] MOV dword ptr [RBP + -0xc0],EAX LAB_00121a3e: MOV EAX,dword ptr [RBP + -0xc0] CMP EAX,dword ptr [RBP + -0xbc] JGE 0x00121b72 MOVSXD RAX,dword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0x88] IMUL RCX,qword ptr [RBP + -0x80] CQO IDIV RCX MOV dword ptr [RBP + -0xc4],EAX MOVSXD RAX,dword ptr [RBP + -0xc0] MOVSXD RCX,dword ptr [RBP + -0xc4] IMUL RCX,qword ptr [RBP + -0x88] IMUL RCX,qword ptr [RBP + -0x80] SUB RAX,RCX CQO IDIV qword ptr [RBP + -0x80] MOV dword ptr [RBP + -0xc8],EAX MOVSXD RAX,dword ptr [RBP + -0xc0] MOVSXD RCX,dword ptr [RBP + -0xc4] IMUL RCX,qword ptr [RBP + -0x88] IMUL RCX,qword ptr [RBP + -0x80] SUB RAX,RCX MOVSXD RCX,dword ptr [RBP + -0xc8] IMUL RCX,qword ptr [RBP + -0x80] SUB RAX,RCX MOV dword ptr [RBP + -0xcc],EAX MOV RAX,qword ptr [RBP + -0x78] MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0xf8] MOVSXD RAX,dword ptr [RBP + -0xc4] IMUL RAX,qword ptr [RBP + -0xb0] ADD RSI,RAX MOVSXD RAX,dword ptr [RBP + -0xc8] IMUL RAX,qword ptr [RBP + -0xa8] ADD RSI,RAX MOVSXD RAX,dword ptr [RBP + -0xcc] IMUL RAX,qword ptr [RBP + -0xa0] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX + 0xf8] MOVSXD RAX,dword ptr [RBP + -0xc4] IMUL RAX,qword ptr [RBP + -0x70] ADD RDX,RAX MOVSXD RAX,dword ptr [RBP + -0xc8] IMUL RAX,qword ptr [RBP + -0x68] ADD RDX,RAX MOVSXD RAX,dword ptr [RBP + -0xcc] IMUL RAX,qword ptr [RBP + -0x60] ADD RDX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xf8] VMOVSS XMM0,dword ptr [RAX] CALL 0x00123360 MOV EAX,dword ptr [RBP + -0xc0] ADD EAX,0x1 MOV dword ptr [RBP + -0xc0],EAX JMP 0x00121a3e LAB_00121b72: ADD RSP,0xd0 POP RBP RET
void ggml_compute_forward_add1_f32(int *param_1,long param_2) { long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; long lVar8; long lVar9; long lVar10; long lVar11; int iVar12; int iVar13; int iVar14; ulong uVar15; int local_d8; int local_c8; lVar1 = *(long *)(param_2 + 0x98); lVar2 = *(long *)(param_2 + 0xa0); uVar15 = ggml_are_same_shape(lVar1,param_2); if ((uVar15 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1189,"GGML_ASSERT(%s) failed","ggml_are_same_shape(src0, dst)"); } uVar15 = ggml_is_scalar(lVar2); if ((uVar15 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x118a,"GGML_ASSERT(%s) failed","ggml_is_scalar(src1)"); } local_c8 = *param_1; iVar12 = param_1[1]; local_d8 = ggml_nrows(lVar1); lVar3 = *(long *)(lVar1 + 0x30); lVar4 = *(long *)(lVar1 + 0x38); lVar5 = *(long *)(lVar1 + 0x40); lVar6 = *(long *)(lVar1 + 0x48); uVar15 = *(ulong *)(param_2 + 0x10); lVar7 = *(long *)(param_2 + 0x18); lVar8 = *(long *)(param_2 + 0x20); lVar9 = *(long *)(param_2 + 0x38); lVar10 = *(long *)(param_2 + 0x40); lVar11 = *(long *)(param_2 + 0x48); if (*(long *)(param_2 + 0x30) != 4) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1193,"GGML_ASSERT(%s) failed","nb0 == sizeof(float)"); } if (lVar3 != 4) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1194,"GGML_ASSERT(%s) failed","nb00 == sizeof(float)"); } iVar12 = (local_d8 + iVar12 + -1) / iVar12; local_c8 = iVar12 * local_c8; if (local_c8 + iVar12 < local_d8) { local_d8 = local_c8 + iVar12; } for (; local_c8 < local_d8; local_c8 = local_c8 + 1) { iVar12 = (int)((long)local_c8 / (lVar8 * lVar7)); iVar13 = (int)(((long)local_c8 - iVar12 * lVar8 * lVar7) / lVar7); iVar14 = (local_c8 - iVar12 * (int)lVar8 * (int)lVar7) - iVar13 * (int)lVar7; ggml_vec_add1_f32(**(int4 **)(lVar2 + 0xf8),uVar15 & 0xffffffff, *(long *)(param_2 + 0xf8) + iVar12 * lVar11 + iVar13 * lVar10 + iVar14 * lVar9 ,*(long *)(lVar1 + 0xf8) + iVar12 * lVar6 + iVar13 * lVar5 + iVar14 * lVar4); } return; }
61,911
mult
eloqsql/strings/dtoa.c
static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc) { Bigint *c; int k, wa, wb, wc; ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; ULong y; ULLong carry, z; if (a->wds < b->wds) { c= a; a= b; b= c; } k= a->k; wa= a->wds; wb= b->wds; wc= wa + wb; if (wc > a->maxwds) k++; c= Balloc(k, alloc); for (x= c->p.x, xa= x + wc; x < xa; x++) *x= 0; xa= a->p.x; xae= xa + wa; xb= b->p.x; xbe= xb + wb; xc0= c->p.x; for (; xb < xbe; xc0++) { if ((y= *xb++)) { x= xa; xc= xc0; carry= 0; do { z= *x++ * (ULLong)y + *xc + carry; carry= z >> 32; *xc++= (ULong) (z & FFFFFFFF); } while (x < xae); *xc= (ULong) carry; } } for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ; c->wds= wc; return c; }
O0
c
mult: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x14(%rcx), %eax jge 0xc3b8f movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x28(%rbp) movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x2c(%rbp) movl -0x28(%rbp), %eax addl -0x2c(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0xc(%rcx), %eax jle 0xc3bcb movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %edi movq -0x18(%rbp), %rsi callq 0xc36f0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movslq -0x30(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0xc3c1b movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x38(%rbp), %rax addq $0x4, %rax movq %rax, -0x38(%rbp) jmp 0xc3bf9 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movslq -0x28(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movslq -0x2c(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jae 0xc3d24 movq -0x50(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x50(%rbp) movl (%rax), %eax movl %eax, -0x6c(%rbp) cmpl $0x0, %eax je 0xc3d11 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x60(%rbp) movq $0x0, -0x78(%rbp) movq -0x38(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x38(%rbp) movl (%rax), %eax movl -0x6c(%rbp), %ecx imulq %rcx, %rax movq -0x60(%rbp), %rcx movl (%rcx), %ecx addq %rcx, %rax addq -0x78(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax shrq $0x20, %rax movq %rax, -0x78(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x80(%rbp), %rax movl %eax, %ecx movq -0x60(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x60(%rbp) movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0xc3ca5 movq -0x78(%rbp), %rax movl %eax, %ecx movq -0x60(%rbp), %rax movl %ecx, (%rax) jmp 0xc3d13 movq -0x68(%rbp), %rax addq $0x4, %rax movq %rax, -0x68(%rbp) jmp 0xc3c62 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movslq -0x30(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) xorl %eax, %eax cmpl $0x0, -0x30(%rbp) movb %al, -0x81(%rbp) jle 0xc3d6e movq -0x60(%rbp), %rax movq %rax, %rcx addq $-0x4, %rcx movq %rcx, -0x60(%rbp) cmpl $0x0, -0x4(%rax) setne %al xorb $-0x1, %al movb %al, -0x81(%rbp) movb -0x81(%rbp), %al testb $0x1, %al jne 0xc3d7a jmp 0xc3d87 jmp 0xc3d7c movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) jmp 0xc3d42 movl -0x30(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x20(%rbp), %rax addq $0x90, %rsp popq %rbp retq nop
mult_0: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+14h] mov rcx, [rbp+var_10] cmp eax, [rcx+14h] jge short loc_C3B8F mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov [rbp+var_8], rax mov rax, [rbp+var_20] mov [rbp+var_10], rax loc_C3B8F: mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+14h] mov [rbp+var_28], eax mov rax, [rbp+var_10] mov eax, [rax+14h] mov [rbp+var_2C], eax mov eax, [rbp+var_28] add eax, [rbp+var_2C] mov [rbp+var_30], eax mov eax, [rbp+var_30] mov rcx, [rbp+var_8] cmp eax, [rcx+0Ch] jle short loc_C3BCB mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax loc_C3BCB: mov edi, [rbp+var_24] mov rsi, [rbp+var_18] call Balloc_0 mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_38] movsxd rcx, [rbp+var_30] shl rcx, 2 add rax, rcx mov [rbp+var_40], rax loc_C3BF9: mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb short loc_C3C1B mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_38] add rax, 4 mov [rbp+var_38], rax jmp short loc_C3BF9 loc_C3C1B: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_40] movsxd rcx, [rbp+var_28] shl rcx, 2 add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_50] movsxd rcx, [rbp+var_2C] shl rcx, 2 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_68], rax loc_C3C62: mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jnb loc_C3D24 mov rax, [rbp+var_50] mov rcx, rax add rcx, 4 mov [rbp+var_50], rcx mov eax, [rax] mov [rbp+var_6C], eax cmp eax, 0 jz loc_C3D11 mov rax, [rbp+var_40] mov [rbp+var_38], rax mov rax, [rbp+var_68] mov [rbp+var_60], rax mov [rbp+var_78], 0 loc_C3CA5: mov rax, [rbp+var_38] mov rcx, rax add rcx, 4 mov [rbp+var_38], rcx mov eax, [rax] mov ecx, [rbp+var_6C] imul rax, rcx mov rcx, [rbp+var_60] mov ecx, [rcx] add rax, rcx add rax, [rbp+var_78] mov [rbp+var_80], rax mov rax, [rbp+var_80] shr rax, 20h mov [rbp+var_78], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_80] mov ecx, eax mov rax, [rbp+var_60] mov rdx, rax add rdx, 4 mov [rbp+var_60], rdx mov [rax], ecx mov rax, [rbp+var_38] cmp rax, [rbp+var_48] jb short loc_C3CA5 mov rax, [rbp+var_78] mov ecx, eax mov rax, [rbp+var_60] mov [rax], ecx loc_C3D11: jmp short $+2 loc_C3D13: mov rax, [rbp+var_68] add rax, 4 mov [rbp+var_68], rax jmp loc_C3C62 loc_C3D24: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_68], rax mov rax, [rbp+var_68] movsxd rcx, [rbp+var_30] shl rcx, 2 add rax, rcx mov [rbp+var_60], rax loc_C3D42: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_81], al jle short loc_C3D6E mov rax, [rbp+var_60] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFCh mov [rbp+var_60], rcx cmp dword ptr [rax-4], 0 setnz al xor al, 0FFh mov [rbp+var_81], al loc_C3D6E: mov al, [rbp+var_81] test al, 1 jnz short loc_C3D7A jmp short loc_C3D87 loc_C3D7A: jmp short $+2 loc_C3D7C: mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax jmp short loc_C3D42 loc_C3D87: mov ecx, [rbp+var_30] mov rax, [rbp+var_20] mov [rax+14h], ecx mov rax, [rbp+var_20] add rsp, 90h pop rbp retn
long long mult_0(unsigned int **a1, unsigned int **a2, long long a3) { unsigned int *v3; // rax unsigned int *v4; // rax _DWORD *v5; // rax long long v6; // rax char v8; // [rsp+Fh] [rbp-81h] unsigned long long v9; // [rsp+10h] [rbp-80h] unsigned long long v10; // [rsp+18h] [rbp-78h] unsigned int v11; // [rsp+24h] [rbp-6Ch] _DWORD *v12; // [rsp+28h] [rbp-68h] _DWORD *v13; // [rsp+30h] [rbp-60h] long long v14; // [rsp+30h] [rbp-60h] unsigned long long v15; // [rsp+38h] [rbp-58h] unsigned int *v16; // [rsp+40h] [rbp-50h] unsigned long long v17; // [rsp+48h] [rbp-48h] unsigned long long v18; // [rsp+50h] [rbp-40h] unsigned int *v19; // [rsp+50h] [rbp-40h] _DWORD *v20; // [rsp+58h] [rbp-38h] unsigned int *v21; // [rsp+58h] [rbp-38h] int v22; // [rsp+60h] [rbp-30h] int v23; // [rsp+64h] [rbp-2Ch] int v24; // [rsp+68h] [rbp-28h] int v25; // [rsp+6Ch] [rbp-24h] long long v26; // [rsp+70h] [rbp-20h] unsigned int **v27; // [rsp+80h] [rbp-10h] unsigned int **v28; // [rsp+88h] [rbp-8h] v28 = a1; v27 = a2; if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) ) { v28 = a2; v27 = a1; } v25 = *((_DWORD *)v28 + 2); v24 = *((_DWORD *)v28 + 5); v23 = *((_DWORD *)v27 + 5); v22 = v23 + v24; if ( v23 + v24 > *((_DWORD *)v28 + 3) ) ++v25; v26 = Balloc_0(v25, a3); v20 = *(_DWORD **)v26; v18 = 4LL * v22 + *(_QWORD *)v26; while ( (unsigned long long)v20 < v18 ) *v20++ = 0; v19 = *v28; v17 = (unsigned long long)&(*v28)[v24]; v16 = *v27; v15 = (unsigned long long)&(*v27)[v23]; v12 = *(_DWORD **)v26; while ( (unsigned long long)v16 < v15 ) { v3 = v16++; v11 = *v3; if ( *v3 ) { v21 = v19; v13 = v12; v10 = 0LL; do { v4 = v21++; v9 = v10 + (unsigned int)*v13 + v11 * (unsigned long long)*v4; v10 = HIDWORD(v9); v5 = v13++; *v5 = v9; } while ( (unsigned long long)v21 < v17 ); *v13 = HIDWORD(v9); } ++v12; } v14 = 4LL * v22 + *(_QWORD *)v26; while ( 1 ) { v8 = 0; if ( v22 > 0 ) { v6 = v14; v14 -= 4LL; v8 = ~(*(_DWORD *)(v6 - 4) != 0); } if ( (v8 & 1) == 0 ) break; --v22; } *(_DWORD *)(v26 + 20) = v22; return v26; }
mult: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x14] JGE 0x001c3b8f MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x10],RAX LAB_001c3b8f: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x28] ADD EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0xc] JLE 0x001c3bcb MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX LAB_001c3bcb: MOV EDI,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001c36f0 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,dword ptr [RBP + -0x30] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_001c3bf9: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001c3c1b MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x4 MOV qword ptr [RBP + -0x38],RAX JMP 0x001c3bf9 LAB_001c3c1b: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOVSXD RCX,dword ptr [RBP + -0x28] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOVSXD RCX,dword ptr [RBP + -0x2c] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX LAB_001c3c62: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JNC 0x001c3d24 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x50],RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x6c],EAX CMP EAX,0x0 JZ 0x001c3d11 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBP + -0x78],0x0 LAB_001c3ca5: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x38],RCX MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0x6c] IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RCX] ADD RAX,RCX ADD RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] SHR RAX,0x20 MOV qword ptr [RBP + -0x78],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x80] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x60],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x48] JC 0x001c3ca5 MOV RAX,qword ptr [RBP + -0x78] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],ECX LAB_001c3d11: JMP 0x001c3d13 LAB_001c3d13: MOV RAX,qword ptr [RBP + -0x68] ADD RAX,0x4 MOV qword ptr [RBP + -0x68],RAX JMP 0x001c3c62 LAB_001c3d24: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOVSXD RCX,dword ptr [RBP + -0x30] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_001c3d42: XOR EAX,EAX CMP dword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x81],AL JLE 0x001c3d6e MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,-0x4 MOV qword ptr [RBP + -0x60],RCX CMP dword ptr [RAX + -0x4],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x81],AL LAB_001c3d6e: MOV AL,byte ptr [RBP + -0x81] TEST AL,0x1 JNZ 0x001c3d7a JMP 0x001c3d87 LAB_001c3d7a: JMP 0x001c3d7c LAB_001c3d7c: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c3d42 LAB_001c3d87: MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x90 POP RBP RET
long * mult(int8 *param_1,int8 *param_2,int8 param_3) { int iVar1; int iVar2; uint uVar3; uint *puVar4; uint *puVar5; long *plVar6; int4 *puVar7; ulong uVar8; uint *puVar9; uint *puVar10; bool bVar11; ulong local_80; uint *local_70; uint *local_68; uint *local_58; uint *local_40; int local_38; int local_2c; int8 *local_18; int8 *local_10; local_18 = param_2; local_10 = param_1; if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) { local_18 = param_1; local_10 = param_2; } local_2c = *(int *)(local_10 + 1); iVar1 = *(int *)((long)local_10 + 0x14); iVar2 = *(int *)((long)local_18 + 0x14); local_38 = iVar1 + iVar2; if (*(int *)((long)local_10 + 0xc) < local_38) { local_2c = local_2c + 1; } plVar6 = (long *)Balloc(local_2c,param_3); local_40 = (uint *)*plVar6; puVar7 = local_40 + local_38; for (; local_40 < puVar7; local_40 = local_40 + 1) { *local_40 = 0; } puVar4 = (uint *)*local_10; puVar5 = (uint *)*local_18; local_70 = (uint *)*plVar6; local_58 = puVar5; while (local_58 < puVar5 + iVar2) { uVar3 = *local_58; if (uVar3 != 0) { local_68 = local_70; local_80 = 0; local_40 = puVar4; do { puVar9 = local_40 + 1; uVar8 = (ulong)*local_40 * (ulong)uVar3 + (ulong)*local_68 + local_80; local_80 = uVar8 >> 0x20; puVar10 = local_68 + 1; *local_68 = (uint)uVar8; local_68 = puVar10; local_40 = puVar9; } while (puVar9 < puVar4 + iVar1); *puVar10 = (uint)(uVar8 >> 0x20); } local_70 = local_70 + 1; local_58 = local_58 + 1; } local_68 = (uint *)(*plVar6 + (long)local_38 * 4); while( true ) { bVar11 = false; if (0 < local_38) { bVar11 = *(int *)((long)local_68 + -4) == 0; local_68 = (uint *)((long)local_68 + -4); } if (!bVar11) break; local_38 = local_38 + -1; } *(int *)((long)plVar6 + 0x14) = local_38; return plVar6; }
61,912
flatbuffers::FlatBufferBuilder::EndTable(unsigned int)
mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h
uoffset_t EndTable(uoffset_t start) { // If you get this assert, a corresponding StartTable wasn't called. FLATBUFFERS_ASSERT(nested); // Write the vtable offset, which is the start of any Table. // We fill it's value later. auto vtableoffsetloc = PushElement<soffset_t>(0); // Write a vtable, which consists entirely of voffset_t elements. // It starts with the number of offsets, followed by a type id, followed // by the offsets themselves. In reverse: // Include space for the last offset and ensure empty tables have a // minimum size. max_voffset_ = (std::max)(static_cast<voffset_t>(max_voffset_ + sizeof(voffset_t)), FieldIndexToOffset(0)); buf_.fill_big(max_voffset_); auto table_object_size = vtableoffsetloc - start; // Vtable use 16bit offsets. FLATBUFFERS_ASSERT(table_object_size < 0x10000); WriteScalar<voffset_t>(buf_.data() + sizeof(voffset_t), static_cast<voffset_t>(table_object_size)); WriteScalar<voffset_t>(buf_.data(), max_voffset_); // Write the offsets into the table for (auto it = buf_.scratch_end() - num_field_loc * sizeof(FieldLoc); it < buf_.scratch_end(); it += sizeof(FieldLoc)) { auto field_location = reinterpret_cast<FieldLoc *>(it); auto pos = static_cast<voffset_t>(vtableoffsetloc - field_location->off); // If this asserts, it means you've set a field twice. FLATBUFFERS_ASSERT( !ReadScalar<voffset_t>(buf_.data() + field_location->id)); WriteScalar<voffset_t>(buf_.data() + field_location->id, pos); } ClearOffsets(); auto vt1 = reinterpret_cast<voffset_t *>(buf_.data()); auto vt1_size = ReadScalar<voffset_t>(vt1); auto vt_use = GetSize(); // See if we already have generated a vtable with this exact same // layout before. If so, make it point to the old one, remove this one. if (dedup_vtables_) { for (auto it = buf_.scratch_data(); it < buf_.scratch_end(); it += sizeof(uoffset_t)) { auto vt_offset_ptr = reinterpret_cast<uoffset_t *>(it); auto vt2 = reinterpret_cast<voffset_t *>(buf_.data_at(*vt_offset_ptr)); auto vt2_size = *vt2; if (vt1_size != vt2_size || memcmp(vt2, vt1, vt1_size)) continue; vt_use = *vt_offset_ptr; buf_.pop(GetSize() - vtableoffsetloc); break; } } // If this is a new vtable, remember it. if (vt_use == GetSize()) { buf_.scratch_push_small(vt_use); } // Fill the vtable offset we created above. // The offset points from the beginning of the object to where the // vtable is stored. // Offsets default direction is downward in memory for future format // flexibility (storing all vtables at the start of the file). WriteScalar(buf_.data_at(vtableoffsetloc), static_cast<soffset_t>(vt_use) - static_cast<soffset_t>(vtableoffsetloc)); nested = false; return vtableoffsetloc; }
O0
c
flatbuffers::FlatBufferBuilder::EndTable(unsigned int): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movl %esi, 0x7c(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) testb $0x1, 0x46(%rax) je 0x12e38 jmp 0x12e57 leaq 0x2a7b0(%rip), %rdi # 0x3d5ef leaq 0x2a723(%rip), %rsi # 0x3d569 movl $0x48f, %edx # imm = 0x48F leaq 0x2a920(%rip), %rcx # 0x3d772 callq 0x30c0 movq 0x20(%rsp), %rdi xorl %esi, %esi callq 0x12d60 movl %eax, %ecx movq 0x20(%rsp), %rax movl %ecx, 0x78(%rsp) movzwl 0x44(%rax), %eax addq $0x2, %rax movw %ax, 0x76(%rsp) xorl %edi, %edi callq 0x13180 movw %ax, 0x74(%rsp) leaq 0x76(%rsp), %rdi leaq 0x74(%rsp), %rsi callq 0x12c20 movq 0x20(%rsp), %rdi movw (%rax), %ax movw %ax, 0x44(%rdi) movzwl 0x44(%rdi), %eax movl %eax, %esi callq 0x131a0 movl 0x78(%rsp), %eax subl 0x7c(%rsp), %eax movl %eax, 0x70(%rsp) cmpl $0x10000, 0x70(%rsp) # imm = 0x10000 jae 0x12ec5 jmp 0x12ee4 leaq 0x2a8e4(%rip), %rdi # 0x3d7b0 leaq 0x2a696(%rip), %rsi # 0x3d569 movl $0x49e, %edx # imm = 0x49E leaq 0x2a893(%rip), %rcx # 0x3d772 callq 0x30c0 movq 0x20(%rsp), %rdi callq 0x13210 movq %rax, %rdi addq $0x2, %rdi movl 0x70(%rsp), %eax movzwl %ax, %esi callq 0x131e0 movq 0x20(%rsp), %rdi callq 0x13210 movq %rax, %rdi movq 0x20(%rsp), %rax movzwl 0x44(%rax), %esi callq 0x131e0 movq 0x20(%rsp), %rdi callq 0x13260 movq 0x20(%rsp), %rcx movl 0x40(%rcx), %ecx movl %ecx, %edx shlq $0x3, %rdx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, 0x68(%rsp) movq 0x20(%rsp), %rdi movq 0x68(%rsp), %rax movq %rax, 0x18(%rsp) callq 0x13260 movq %rax, %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax jae 0x13008 movq 0x20(%rsp), %rdi movq 0x68(%rsp), %rax movq %rax, 0x60(%rsp) movl 0x78(%rsp), %eax movq 0x60(%rsp), %rcx subl (%rcx), %eax movw %ax, 0x5e(%rsp) callq 0x13210 movq %rax, %rdi movq 0x60(%rsp), %rax movzwl 0x4(%rax), %eax cltq addq %rax, %rdi callq 0x132b0 cmpw $0x0, %ax setne %al xorb $-0x1, %al testb $0x1, %al jne 0x12faf jmp 0x12fb1 jmp 0x12fd0 leaq 0x2a814(%rip), %rdi # 0x3d7cc leaq 0x2a5aa(%rip), %rsi # 0x3d569 movl $0x4a9, %edx # imm = 0x4A9 leaq 0x2a7a7(%rip), %rcx # 0x3d772 callq 0x30c0 movq 0x20(%rsp), %rdi callq 0x13210 movq %rax, %rdi movq 0x60(%rsp), %rax movzwl 0x4(%rax), %eax cltq addq %rax, %rdi movzwl 0x5e(%rsp), %esi callq 0x131e0 movq 0x68(%rsp), %rax addq $0x8, %rax movq %rax, 0x68(%rsp) jmp 0x12f41 movq 0x20(%rsp), %rdi callq 0x132d0 movq 0x20(%rsp), %rdi callq 0x13210 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi callq 0x132b0 movq 0x20(%rsp), %rdi movw %ax, 0x4e(%rsp) callq 0xa830 movl %eax, %ecx movq 0x20(%rsp), %rax movl %ecx, 0x48(%rsp) testb $0x1, 0x51(%rax) je 0x1311b movq 0x20(%rsp), %rdi callq 0x13310 movq %rax, 0x40(%rsp) movq 0x20(%rsp), %rdi movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) callq 0x13260 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax jae 0x13119 movq 0x20(%rsp), %rdi movq 0x40(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movl (%rax), %eax movl %eax, %esi callq 0x13360 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movw (%rax), %ax movw %ax, 0x2e(%rsp) movzwl 0x4e(%rsp), %eax movzwl 0x2e(%rsp), %ecx cmpl %ecx, %eax jne 0x130db movq 0x30(%rsp), %rdi movq 0x50(%rsp), %rsi movzwl 0x4e(%rsp), %eax movl %eax, %edx callq 0x32b0 cmpl $0x0, %eax je 0x130dd jmp 0x13106 movq 0x20(%rsp), %rdi movq 0x38(%rsp), %rax movl (%rax), %eax movl %eax, 0x48(%rsp) callq 0xa830 movq 0x20(%rsp), %rdi subl 0x78(%rsp), %eax movl %eax, %eax movl %eax, %esi callq 0x13390 jmp 0x13119 movq 0x40(%rsp), %rax addq $0x4, %rax movq %rax, 0x40(%rsp) jmp 0x1305e jmp 0x1311b movq 0x20(%rsp), %rdi movl 0x48(%rsp), %eax movl %eax, 0xc(%rsp) callq 0xa830 movl %eax, %ecx movl 0xc(%rsp), %eax cmpl %ecx, %eax jne 0x13146 movq 0x20(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x133b0 movq 0x20(%rsp), %rdi movl 0x78(%rsp), %eax movl %eax, %esi callq 0x13360 movq %rax, %rdi movl 0x48(%rsp), %esi subl 0x78(%rsp), %esi callq 0x13400 movq 0x20(%rsp), %rax movb $0x0, 0x46(%rax) movl 0x78(%rsp), %eax addq $0x88, %rsp retq nopl (%rax,%rax)
_ZN11flatbuffers17FlatBufferBuilder8EndTableEj: sub rsp, 88h mov [rsp+88h+var_8], rdi mov dword ptr [rsp+88h+var_10+4], esi mov rax, [rsp+88h+var_8] mov [rsp+88h+var_68], rax test byte ptr [rax+46h], 1 jz short loc_12E38 jmp short loc_12E57 loc_12E38: lea rdi, aNested+1; "nested" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 48Fh lea rcx, aUoffsetTFlatbu_0; "uoffset_t flatbuffers::FlatBufferBuilde"... call ___assert_fail loc_12E57: mov rdi, [rsp+88h+var_68] xor esi, esi; unsigned __int16 call _ZN11flatbuffers17FlatBufferBuilder11PushElementIiEEjT_; flatbuffers::FlatBufferBuilder::PushElement<int>(int) mov ecx, eax mov rax, [rsp+88h+var_68] mov dword ptr [rsp+88h+var_10], ecx movzx eax, word ptr [rax+44h] add rax, 2 mov [rsp+88h+var_12], ax xor edi, edi; this call _ZN11flatbuffers18FieldIndexToOffsetEt; flatbuffers::FieldIndexToOffset(ushort) mov [rsp+88h+var_14], ax lea rdi, [rsp+88h+var_12] lea rsi, [rsp+88h+var_14] call _ZNSt3__13maxB8nn200100ItEERKT_S3_S3_; std::max<ushort>(ushort const&,ushort const&) mov rdi, [rsp+88h+var_68]; this mov ax, [rax] mov [rdi+44h], ax movzx eax, word ptr [rdi+44h] mov esi, eax; unsigned __int64 call _ZN11flatbuffers15vector_downward8fill_bigEm; flatbuffers::vector_downward::fill_big(ulong) mov eax, dword ptr [rsp+88h+var_10] sub eax, dword ptr [rsp+88h+var_10+4] mov [rsp+88h+var_18], eax cmp [rsp+88h+var_18], 10000h jnb short loc_12EC5 jmp short loc_12EE4 loc_12EC5: lea rdi, aTableObjectSiz; "table_object_size < 0x10000" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 49Eh lea rcx, aUoffsetTFlatbu_0; "uoffset_t flatbuffers::FlatBufferBuilde"... call ___assert_fail loc_12EE4: mov rdi, [rsp+88h+var_68]; this call _ZNK11flatbuffers15vector_downward4dataEv; flatbuffers::vector_downward::data(void) mov rdi, rax add rdi, 2 mov eax, [rsp+88h+var_18] movzx esi, ax call _ZN11flatbuffers11WriteScalarItEEvPvT_; flatbuffers::WriteScalar<ushort>(void *,ushort) mov rdi, [rsp+88h+var_68]; this call _ZNK11flatbuffers15vector_downward4dataEv; flatbuffers::vector_downward::data(void) mov rdi, rax mov rax, [rsp+88h+var_68] movzx esi, word ptr [rax+44h] call _ZN11flatbuffers11WriteScalarItEEvPvT_; flatbuffers::WriteScalar<ushort>(void *,ushort) mov rdi, [rsp+88h+var_68]; this call _ZNK11flatbuffers15vector_downward11scratch_endEv; flatbuffers::vector_downward::scratch_end(void) mov rcx, [rsp+88h+var_68] mov ecx, [rcx+40h] mov edx, ecx shl rdx, 3 xor ecx, ecx sub rcx, rdx add rax, rcx mov [rsp+88h+var_20], rax loc_12F41: mov rdi, [rsp+88h+var_68]; this mov rax, [rsp+88h+var_20] mov [rsp+88h+var_70], rax call _ZNK11flatbuffers15vector_downward11scratch_endEv; flatbuffers::vector_downward::scratch_end(void) mov rcx, rax mov rax, [rsp+88h+var_70] cmp rax, rcx jnb loc_13008 mov rdi, [rsp+88h+var_68]; this mov rax, [rsp+88h+var_20] mov [rsp+88h+var_28], rax mov eax, dword ptr [rsp+88h+var_10] mov rcx, [rsp+88h+var_28] sub eax, [rcx] mov [rsp+88h+var_2A], ax call _ZNK11flatbuffers15vector_downward4dataEv; flatbuffers::vector_downward::data(void) mov rdi, rax mov rax, [rsp+88h+var_28] movzx eax, word ptr [rax+4] cdqe add rdi, rax call _ZN11flatbuffers10ReadScalarItEET_PKv; flatbuffers::ReadScalar<ushort>(void const*) cmp ax, 0 setnz al xor al, 0FFh test al, 1 jnz short loc_12FAF jmp short loc_12FB1 loc_12FAF: jmp short loc_12FD0 loc_12FB1: lea rdi, aReadscalarVoff; "!ReadScalar<voffset_t>(buf_.data() + fi"... lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 4A9h lea rcx, aUoffsetTFlatbu_0; "uoffset_t flatbuffers::FlatBufferBuilde"... call ___assert_fail loc_12FD0: mov rdi, [rsp+88h+var_68]; this call _ZNK11flatbuffers15vector_downward4dataEv; flatbuffers::vector_downward::data(void) mov rdi, rax mov rax, [rsp+88h+var_28] movzx eax, word ptr [rax+4] cdqe add rdi, rax movzx esi, [rsp+88h+var_2A] call _ZN11flatbuffers11WriteScalarItEEvPvT_; flatbuffers::WriteScalar<ushort>(void *,ushort) mov rax, [rsp+88h+var_20] add rax, 8 mov [rsp+88h+var_20], rax jmp loc_12F41 loc_13008: mov rdi, [rsp+88h+var_68]; this call _ZN11flatbuffers17FlatBufferBuilder12ClearOffsetsEv; flatbuffers::FlatBufferBuilder::ClearOffsets(void) mov rdi, [rsp+88h+var_68]; this call _ZNK11flatbuffers15vector_downward4dataEv; flatbuffers::vector_downward::data(void) mov [rsp+88h+var_38], rax mov rdi, [rsp+88h+var_38] call _ZN11flatbuffers10ReadScalarItEET_PKv; flatbuffers::ReadScalar<ushort>(void const*) mov rdi, [rsp+88h+var_68]; this mov [rsp+88h+var_3A], ax call _ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv; flatbuffers::FlatBufferBuilder::GetSize(void) mov ecx, eax mov rax, [rsp+88h+var_68] mov [rsp+88h+var_40], ecx test byte ptr [rax+51h], 1 jz loc_1311B mov rdi, [rsp+88h+var_68]; this call _ZNK11flatbuffers15vector_downward12scratch_dataEv; flatbuffers::vector_downward::scratch_data(void) mov [rsp+88h+var_48], rax loc_1305E: mov rdi, [rsp+88h+var_68]; this mov rax, [rsp+88h+var_48] mov [rsp+88h+var_78], rax call _ZNK11flatbuffers15vector_downward11scratch_endEv; flatbuffers::vector_downward::scratch_end(void) mov rcx, rax mov rax, [rsp+88h+var_78] cmp rax, rcx jnb loc_13119 mov rdi, [rsp+88h+var_68]; this mov rax, [rsp+88h+var_48] mov [rsp+88h+var_50], rax mov rax, [rsp+88h+var_50] mov eax, [rax] mov esi, eax; unsigned __int64 call _ZNK11flatbuffers15vector_downward7data_atEm; flatbuffers::vector_downward::data_at(ulong) mov [rsp+88h+var_58], rax mov rax, [rsp+88h+var_58] mov ax, [rax] mov [rsp+88h+var_5A], ax movzx eax, [rsp+88h+var_3A] movzx ecx, [rsp+88h+var_5A] cmp eax, ecx jnz short loc_130DB mov rdi, [rsp+88h+var_58] mov rsi, [rsp+88h+var_38] movzx eax, [rsp+88h+var_3A] mov edx, eax call _memcmp cmp eax, 0 jz short loc_130DD loc_130DB: jmp short loc_13106 loc_130DD: mov rdi, [rsp+88h+var_68]; this mov rax, [rsp+88h+var_50] mov eax, [rax] mov [rsp+88h+var_40], eax call _ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv; flatbuffers::FlatBufferBuilder::GetSize(void) mov rdi, [rsp+88h+var_68]; this sub eax, dword ptr [rsp+88h+var_10] mov eax, eax mov esi, eax; unsigned __int64 call _ZN11flatbuffers15vector_downward3popEm; flatbuffers::vector_downward::pop(ulong) jmp short loc_13119 loc_13106: mov rax, [rsp+88h+var_48] add rax, 4 mov [rsp+88h+var_48], rax jmp loc_1305E loc_13119: jmp short $+2 loc_1311B: mov rdi, [rsp+88h+var_68]; this mov eax, [rsp+88h+var_40] mov [rsp+88h+var_7C], eax call _ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv; flatbuffers::FlatBufferBuilder::GetSize(void) mov ecx, eax mov eax, [rsp+88h+var_7C] cmp eax, ecx jnz short loc_13146 mov rdi, [rsp+88h+var_68] lea rsi, [rsp+88h+var_40] call _ZN11flatbuffers15vector_downward18scratch_push_smallIjEEvRKT_; flatbuffers::vector_downward::scratch_push_small<uint>(uint const&) loc_13146: mov rdi, [rsp+88h+var_68]; this mov eax, dword ptr [rsp+88h+var_10] mov esi, eax; unsigned __int64 call _ZNK11flatbuffers15vector_downward7data_atEm; flatbuffers::vector_downward::data_at(ulong) mov rdi, rax mov esi, [rsp+88h+var_40] sub esi, dword ptr [rsp+88h+var_10] call _ZN11flatbuffers11WriteScalarIiEEvPvT_; flatbuffers::WriteScalar<int>(void *,int) mov rax, [rsp+88h+var_68] mov byte ptr [rax+46h], 0 mov eax, dword ptr [rsp+88h+var_10] add rsp, 88h retn
long long flatbuffers::FlatBufferBuilder::EndTable(flatbuffers::FlatBufferBuilder *this, int a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax int v6; // eax long long v7; // rax _WORD *v9; // [rsp+30h] [rbp-58h] unsigned int *j; // [rsp+40h] [rbp-48h] int Size; // [rsp+48h] [rbp-40h] BYREF unsigned __int16 v12; // [rsp+4Eh] [rbp-3Ah] long long v13; // [rsp+50h] [rbp-38h] unsigned __int16 v14; // [rsp+5Eh] [rbp-2Ah] _WORD *v15; // [rsp+60h] [rbp-28h] _WORD *i; // [rsp+68h] [rbp-20h] int v17; // [rsp+70h] [rbp-18h] __int16 v18; // [rsp+74h] [rbp-14h] BYREF __int16 v19; // [rsp+76h] [rbp-12h] BYREF unsigned int v20; // [rsp+78h] [rbp-10h] int v21; // [rsp+7Ch] [rbp-Ch] flatbuffers::FlatBufferBuilder *v22; // [rsp+80h] [rbp-8h] v22 = this; v21 = a2; if ( (*((_BYTE *)this + 70) & 1) == 0 ) __assert_fail( "nested", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h", 1167LL, "uoffset_t flatbuffers::FlatBufferBuilder::EndTable(uoffset_t)"); v20 = flatbuffers::FlatBufferBuilder::PushElement<int>(this, 0); v19 = *((_WORD *)this + 34) + 2; v18 = flatbuffers::FieldIndexToOffset(0LL, 0); *((_WORD *)this + 34) = *(_WORD *)std::max[abi:nn200100]<unsigned short>((long long)&v19, (long long)&v18); flatbuffers::vector_downward::fill_big(this, *((unsigned __int16 *)this + 34)); v17 = v20 - v21; if ( v20 - v21 >= 0x10000 ) __assert_fail( "table_object_size < 0x10000", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h", 1182LL, "uoffset_t flatbuffers::FlatBufferBuilder::EndTable(uoffset_t)"); v2 = flatbuffers::vector_downward::data(this); flatbuffers::WriteScalar<unsigned short>(v2 + 2, (unsigned __int16)v17); v3 = flatbuffers::vector_downward::data(this); flatbuffers::WriteScalar<unsigned short>(v3, *((unsigned __int16 *)this + 34)); for ( i = (_WORD *)(-8LL * *((unsigned int *)this + 16) + flatbuffers::vector_downward::scratch_end(this)); (unsigned long long)i < flatbuffers::vector_downward::scratch_end(this); i += 4 ) { v15 = i; v14 = v20 - *i; v4 = flatbuffers::vector_downward::data(this); if ( (unsigned __int16)flatbuffers::ReadScalar<unsigned short>((unsigned __int16)i[2] + v4) ) __assert_fail( "!ReadScalar<voffset_t>(buf_.data() + field_location->id)", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h", 1193LL, "uoffset_t flatbuffers::FlatBufferBuilder::EndTable(uoffset_t)"); v5 = flatbuffers::vector_downward::data(this); flatbuffers::WriteScalar<unsigned short>((unsigned __int16)v15[2] + v5, v14); } flatbuffers::FlatBufferBuilder::ClearOffsets(this); v13 = flatbuffers::vector_downward::data(this); v12 = flatbuffers::ReadScalar<unsigned short>(v13); Size = flatbuffers::FlatBufferBuilder::GetSize(this); if ( (*((_BYTE *)this + 81) & 1) != 0 ) { for ( j = (unsigned int *)flatbuffers::vector_downward::scratch_data(this); (unsigned long long)j < flatbuffers::vector_downward::scratch_end(this); ++j ) { v9 = (_WORD *)flatbuffers::vector_downward::data_at(this, *j); if ( v12 == (unsigned __int16)*v9 && !(unsigned int)memcmp(v9, v13, v12) ) { Size = *j; v6 = flatbuffers::FlatBufferBuilder::GetSize(this); flatbuffers::vector_downward::pop(this, v6 - v20); break; } } } if ( Size == (unsigned int)flatbuffers::FlatBufferBuilder::GetSize(this) ) flatbuffers::vector_downward::scratch_push_small<unsigned int>(this, &Size); v7 = flatbuffers::vector_downward::data_at(this, v20); flatbuffers::WriteScalar<int>(v7, Size - v20); *((_BYTE *)this + 70) = 0; return v20; }
EndTable: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV dword ptr [RSP + 0x7c],ESI MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x20],RAX TEST byte ptr [RAX + 0x46],0x1 JZ 0x00112e38 JMP 0x00112e57 LAB_00112e38: LEA RDI,[0x13d5ef] LEA RSI,[0x13d569] MOV EDX,0x48f LEA RCX,[0x13d772] CALL 0x001030c0 LAB_00112e57: MOV RDI,qword ptr [RSP + 0x20] XOR ESI,ESI CALL 0x00112d60 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RSP + 0x78],ECX MOVZX EAX,word ptr [RAX + 0x44] ADD RAX,0x2 MOV word ptr [RSP + 0x76],AX XOR EDI,EDI CALL 0x00113180 MOV word ptr [RSP + 0x74],AX LEA RDI,[RSP + 0x76] LEA RSI,[RSP + 0x74] CALL 0x00112c20 MOV RDI,qword ptr [RSP + 0x20] MOV AX,word ptr [RAX] MOV word ptr [RDI + 0x44],AX MOVZX EAX,word ptr [RDI + 0x44] MOV ESI,EAX CALL 0x001131a0 MOV EAX,dword ptr [RSP + 0x78] SUB EAX,dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x70],EAX CMP dword ptr [RSP + 0x70],0x10000 JNC 0x00112ec5 JMP 0x00112ee4 LAB_00112ec5: LEA RDI,[0x13d7b0] LEA RSI,[0x13d569] MOV EDX,0x49e LEA RCX,[0x13d772] CALL 0x001030c0 LAB_00112ee4: MOV RDI,qword ptr [RSP + 0x20] CALL 0x00113210 MOV RDI,RAX ADD RDI,0x2 MOV EAX,dword ptr [RSP + 0x70] MOVZX ESI,AX CALL 0x001131e0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x00113210 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0x20] MOVZX ESI,word ptr [RAX + 0x44] CALL 0x001131e0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x00113260 MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x40] MOV EDX,ECX SHL RDX,0x3 XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RSP + 0x68],RAX LAB_00112f41: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x18],RAX CALL 0x00113260 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] CMP RAX,RCX JNC 0x00113008 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x60],RAX MOV EAX,dword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x60] SUB EAX,dword ptr [RCX] MOV word ptr [RSP + 0x5e],AX CALL 0x00113210 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0x60] MOVZX EAX,word ptr [RAX + 0x4] CDQE ADD RDI,RAX CALL 0x001132b0 CMP AX,0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x00112faf JMP 0x00112fb1 LAB_00112faf: JMP 0x00112fd0 LAB_00112fb1: LEA RDI,[0x13d7cc] LEA RSI,[0x13d569] MOV EDX,0x4a9 LEA RCX,[0x13d772] CALL 0x001030c0 LAB_00112fd0: MOV RDI,qword ptr [RSP + 0x20] CALL 0x00113210 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0x60] MOVZX EAX,word ptr [RAX + 0x4] CDQE ADD RDI,RAX MOVZX ESI,word ptr [RSP + 0x5e] CALL 0x001131e0 MOV RAX,qword ptr [RSP + 0x68] ADD RAX,0x8 MOV qword ptr [RSP + 0x68],RAX JMP 0x00112f41 LAB_00113008: MOV RDI,qword ptr [RSP + 0x20] CALL 0x001132d0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x00113210 MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x50] CALL 0x001132b0 MOV RDI,qword ptr [RSP + 0x20] MOV word ptr [RSP + 0x4e],AX CALL 0x0010a830 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RSP + 0x48],ECX TEST byte ptr [RAX + 0x51],0x1 JZ 0x0011311b MOV RDI,qword ptr [RSP + 0x20] CALL 0x00113310 MOV qword ptr [RSP + 0x40],RAX LAB_0011305e: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX CALL 0x00113260 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX JNC 0x00113119 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RAX] MOV ESI,EAX CALL 0x00113360 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV AX,word ptr [RAX] MOV word ptr [RSP + 0x2e],AX MOVZX EAX,word ptr [RSP + 0x4e] MOVZX ECX,word ptr [RSP + 0x2e] CMP EAX,ECX JNZ 0x001130db MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x50] MOVZX EAX,word ptr [RSP + 0x4e] MOV EDX,EAX CALL 0x001032b0 CMP EAX,0x0 JZ 0x001130dd LAB_001130db: JMP 0x00113106 LAB_001130dd: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x48],EAX CALL 0x0010a830 MOV RDI,qword ptr [RSP + 0x20] SUB EAX,dword ptr [RSP + 0x78] MOV EAX,EAX MOV ESI,EAX CALL 0x00113390 JMP 0x00113119 LAB_00113106: MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x4 MOV qword ptr [RSP + 0x40],RAX JMP 0x0011305e LAB_00113119: JMP 0x0011311b LAB_0011311b: MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0xc],EAX CALL 0x0010a830 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0xc] CMP EAX,ECX JNZ 0x00113146 MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x48] CALL 0x001133b0 LAB_00113146: MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x78] MOV ESI,EAX CALL 0x00113360 MOV RDI,RAX MOV ESI,dword ptr [RSP + 0x48] SUB ESI,dword ptr [RSP + 0x78] CALL 0x00113400 MOV RAX,qword ptr [RSP + 0x20] MOV byte ptr [RAX + 0x46],0x0 MOV EAX,dword ptr [RSP + 0x78] ADD RSP,0x88 RET
/* flatbuffers::FlatBufferBuilder::EndTable(unsigned int) */ uint __thiscall flatbuffers::FlatBufferBuilder::EndTable(FlatBufferBuilder *this,uint param_1) { uint uVar1; int4 *puVar2; ushort uVar3; int iVar4; uint uVar5; ushort *puVar6; long lVar7; void *pvVar8; int4 *puVar9; uint *puVar10; uint *local_48; uint local_40; ushort local_3a; void *local_38; ushort local_2a; int4 *local_28; int4 *local_20; uint local_18; ushort local_14; ushort local_12; uint local_10; uint local_c; FlatBufferBuilder *local_8; local_c = param_1; local_8 = this; if (((byte)this[0x46] & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("nested", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h" ,0x48f,"uoffset_t flatbuffers::FlatBufferBuilder::EndTable(uoffset_t)"); } local_10 = PushElement<int>(this,0); local_12 = *(short *)(this + 0x44) + 2; local_14 = FieldIndexToOffset(0); puVar6 = std::max_abi_nn200100_<unsigned_short>(&local_12,&local_14); *(ushort *)(this + 0x44) = *puVar6; vector_downward::fill_big((vector_downward *)this,(ulong)*(ushort *)(this + 0x44)); local_18 = local_10 - local_c; if (0xffff < local_18) { /* WARNING: Subroutine does not return */ __assert_fail("table_object_size < 0x10000", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h" ,0x49e,"uoffset_t flatbuffers::FlatBufferBuilder::EndTable(uoffset_t)"); } lVar7 = vector_downward::data((vector_downward *)this); WriteScalar<unsigned_short>((void *)(lVar7 + 2),(ushort)local_18); pvVar8 = (void *)vector_downward::data((vector_downward *)this); WriteScalar<unsigned_short>(pvVar8,*(ushort *)(this + 0x44)); lVar7 = vector_downward::scratch_end((vector_downward *)this); for (local_20 = (int4 *)(lVar7 + (ulong)*(uint *)(this + 0x40) * -8); puVar2 = local_20, puVar9 = (int4 *)vector_downward::scratch_end((vector_downward *)this), puVar2 < puVar9; local_20 = local_20 + 2) { local_28 = local_20; local_2a = (short)local_10 - (short)*local_20; lVar7 = vector_downward::data((vector_downward *)this); uVar3 = ReadScalar<unsigned_short>((void *)(lVar7 + (int)(uint)*(ushort *)(local_28 + 1))); if (uVar3 != 0) { /* WARNING: Subroutine does not return */ __assert_fail("!ReadScalar<voffset_t>(buf_.data() + field_location->id)", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h" ,0x4a9,"uoffset_t flatbuffers::FlatBufferBuilder::EndTable(uoffset_t)"); } lVar7 = vector_downward::data((vector_downward *)this); WriteScalar<unsigned_short>((void *)(lVar7 + (int)(uint)*(ushort *)(local_28 + 1)),local_2a); } ClearOffsets(this); local_38 = (void *)vector_downward::data((vector_downward *)this); local_3a = ReadScalar<unsigned_short>(local_38); local_40 = GetSize(this); if (((byte)this[0x51] & 1) != 0) { for (local_48 = (uint *)vector_downward::scratch_data((vector_downward *)this); puVar10 = (uint *)vector_downward::scratch_end((vector_downward *)this), local_48 < puVar10; local_48 = local_48 + 1) { puVar6 = (ushort *)vector_downward::data_at((vector_downward *)this,(ulong)*local_48); if ((local_3a == *puVar6) && (iVar4 = memcmp(puVar6,local_38,(ulong)local_3a), iVar4 == 0)) { local_40 = *local_48; iVar4 = GetSize(this); vector_downward::pop((vector_downward *)this,(ulong)(iVar4 - local_10)); break; } } } uVar1 = local_40; uVar5 = GetSize(this); if (uVar1 == uVar5) { vector_downward::scratch_push_small<unsigned_int>((vector_downward *)this,&local_40); } pvVar8 = (void *)vector_downward::data_at((vector_downward *)this,(ulong)local_10); WriteScalar<int>(pvVar8,local_40 - local_10); this[0x46] = (FlatBufferBuilder)0x0; return local_10; }
61,913
JS_CompactBigInt1
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_CompactBigInt1(JSContext *ctx, JSValue val) { if (JS_VALUE_GET_TAG(val) != JS_TAG_BIG_INT) return val; /* fail safe */ bf_t *a = JS_GetBigInt(val); if (a->expn == BF_EXP_ZERO && a->sign) { assert(((JSBigInt*)JS_VALUE_GET_PTR(val))->header.ref_count == 1); a->sign = 0; } return val; }
O2
c
JS_CompactBigInt1: movq %rsi, %rdx movq %rdi, %rax cmpq $-0x9, %rsi jne 0x372c9 xorl %ecx, %ecx cmpq 0x18(%rax), %rcx jno 0x372c9 cmpl $0x0, 0x10(%rax) je 0x372c9 andl $0x0, 0x10(%rax) retq
JS_CompactBigInt1: mov rdx, rsi mov rax, rdi cmp rsi, 0FFFFFFFFFFFFFFF7h jnz short locret_372C9 xor ecx, ecx cmp rcx, [rax+18h] jno short locret_372C9 cmp dword ptr [rax+10h], 0 jz short locret_372C9 and dword ptr [rax+10h], 0 locret_372C9: retn
long long JS_CompactBigInt1(long long a1, long long a2) { long long result; // rax result = a1; if ( a2 == -9 && __OFSUB__(0LL, *(_QWORD *)(a1 + 24)) ) { if ( *(_DWORD *)(a1 + 16) ) *(_DWORD *)(a1 + 16) = 0; } return result; }
JS_CompactBigInt1: MOV RDX,RSI MOV RAX,RDI CMP RSI,-0x9 JNZ 0x001372c9 XOR ECX,ECX CMP RCX,qword ptr [RAX + 0x18] JNO 0x001372c9 CMP dword ptr [RAX + 0x10],0x0 JZ 0x001372c9 AND dword ptr [RAX + 0x10],0x0 LAB_001372c9: RET
/* WARNING: Removing unreachable block (ram,0x001372bf) */ /* WARNING: Removing unreachable block (ram,0x001372c5) */ void JS_CompactBigInt1(void) { return; }
61,914
minja::Parser::parseMathPlusMinus()
monkey531[P]llama/common/./minja.hpp
std::shared_ptr<Expression> parseMathPlusMinus() { static std::regex plus_minus_tok(R"(\+|-(?![}%#]\}))"); auto left = parseMathMulDiv(); if (!left) throw std::runtime_error("Expected left side of 'math plus/minus' expression"); std::string op_str; while (!(op_str = consumeToken(plus_minus_tok)).empty()) { auto right = parseMathMulDiv(); if (!right) throw std::runtime_error("Expected right side of 'math plus/minus' expression"); auto op = op_str == "+" ? BinaryOpExpr::Op::Add : BinaryOpExpr::Op::Sub; left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), op); } return left; }
O3
cpp
minja::Parser::parseMathPlusMinus(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %rbp movb 0xb0e52(%rip), %al # 0xf0e60 testb %al, %al movq %rdi, (%rsp) je 0x401fa movq %rbp, %rdi movq %r14, %rsi callq 0x4031a cmpq $0x0, (%rbp) je 0x40255 leaq 0x48(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x18(%rsp), %r12 leaq 0x38(%rsp), %r13 movq %r12, %rdi movq %r14, %rsi leaq 0xb0de5(%rip), %rdx # 0xf0e40 movl $0x1, %ecx callq 0x2fd6a movq %r13, %rdi movq %r12, %rsi callq 0x18800 movq 0x8(%rax), %r15 movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x40090 movq 0x28(%rsp), %rsi incq %rsi callq 0x186a0 testq %r15, %r15 je 0x40195 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x4031a cmpq $0x0, 0x8(%rsp) je 0x401c3 movq %r13, %rdi leaq 0x7b538(%rip), %rsi # 0xbb5f4 callq 0x181a0 cmpl $0x1, %eax movl $0x2, %r15d sbbl $0x0, %r15d movq (%r14), %rax movq %rax, 0x18(%rsp) movq 0x8(%r14), %rax movq %rax, 0x20(%rsp) testq %rax, %rax je 0x400f9 movq 0xafeb5(%rip), %rcx # 0xeffa0 cmpb $0x0, (%rcx) je 0x400f5 incl 0x8(%rax) jmp 0x400f9 lock incl 0x8(%rax) movq 0x20(%r14), %rax movq %r14, %rbx subq 0x10(%r14), %rax movq %rax, 0x28(%rsp) movl $0x58, %edi callq 0x18690 movq %rax, %r13 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r13) leaq 0xae86d(%rip), %rax # 0xee998 movq %rax, (%r13) movq %r13, %r14 addq $0x10, %r14 movq %r14, %rdi movq %r12, %rsi movq (%rsp), %rbp movq %rbp, %rdx leaq 0x8(%rsp), %rcx movl %r15d, %r8d callq 0x56e5a movq %r14, (%rbp) movq 0x8(%rbp), %rdi movq %r13, 0x8(%rbp) testq %rdi, %rdi je 0x40166 callq 0x2f80e movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x40175 callq 0x2f80e movq 0x10(%rsp), %rdi testq %rdi, %rdi leaq 0x38(%rsp), %r13 movq %rbx, %r14 je 0x4004e callq 0x2f80e jmp 0x4004e movq 0x38(%rsp), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0x401b1 movq 0x48(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbp, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18360 movq %rax, %r15 leaq 0x770b0(%rip), %rsi # 0xb7287 movq %rax, %rdi callq 0x18270 movq 0xafe0a(%rip), %rsi # 0xefff0 movq 0xafd93(%rip), %rdx # 0xeff80 movq %r15, %rdi callq 0x18b30 jmp 0x40287 leaq 0xb0c5f(%rip), %rdi # 0xf0e60 callq 0x18be0 testl %eax, %eax je 0x4001a leaq 0xb0c2b(%rip), %rdi # 0xf0e40 leaq 0x77028(%rip), %rsi # 0xb7244 movl $0x10, %edx callq 0x2f87e leaq -0x10947(%rip), %rdi # 0x2f8e6 leaq 0xb0c0c(%rip), %rsi # 0xf0e40 leaq 0xb045d(%rip), %rdx # 0xf0698 callq 0x185d0 leaq 0xb0c19(%rip), %rdi # 0xf0e60 callq 0x18450 movq (%rsp), %rbp jmp 0x4001a movl $0x10, %edi callq 0x18360 movq %rax, %r15 leaq 0x76feb(%rip), %rsi # 0xb7254 movq %rax, %rdi callq 0x18270 movq 0xafd78(%rip), %rsi # 0xefff0 movq 0xafd01(%rip), %rdx # 0xeff80 movq %r15, %rdi callq 0x18b30 movq %rax, %r14 leaq 0xb0bcf(%rip), %rdi # 0xf0e60 callq 0x18440 jmp 0x40312 movq %rax, %r14 jmp 0x40300 movq %rax, %r14 movq %r15, %rdi callq 0x18500 jmp 0x40300 movq %rax, %r14 jmp 0x402d0 movq %rax, %r14 movq %r15, %rdi callq 0x18500 jmp 0x402d0 jmp 0x402e1 movq %rax, %r14 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x402d0 callq 0x2f80e movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x402e4 callq 0x2f80e jmp 0x402e4 movq %rax, %r14 movq 0x38(%rsp), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0x40300 movq 0x48(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rsp), %rax movq 0x8(%rax), %rdi testq %rdi, %rdi je 0x40312 callq 0x2f80e movq %r14, %rdi callq 0x18b90
_ZN5minja6Parser18parseMathPlusMinusEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rsi mov rbp, rdi mov al, cs:_ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok test al, al mov [rsp+88h+var_88], rdi jz loc_401FA loc_4001A: mov rdi, rbp; this mov rsi, r14 call _ZN5minja6Parser15parseMathMulDivEv; minja::Parser::parseMathMulDiv(void) cmp qword ptr [rbp+0], 0 jz loc_40255 lea rax, [rsp+88h+var_40] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r12, [rsp+88h+var_70] lea r13, [rsp+88h+var_50] loc_4004E: mov rdi, r12 mov rsi, r14 lea rdx, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; minja::Parser::parseMathPlusMinus(void)::plus_minus_tok mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, r13 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov r15, [rax+8] mov rdi, [rsp+88h+var_70]; void * lea rax, [rsp+88h+var_60] cmp rdi, rax jz short loc_40090 mov rsi, [rsp+88h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_40090: test r15, r15 jz loc_40195 lea rdi, [rsp+88h+var_80]; this mov rsi, r14 call _ZN5minja6Parser15parseMathMulDivEv; minja::Parser::parseMathMulDiv(void) cmp [rsp+88h+var_80], 0 jz loc_401C3 mov rdi, r13 lea rsi, aSRN_0+0Bh; "+" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) cmp eax, 1 mov r15d, 2 sbb r15d, 0 mov rax, [r14] mov [rsp+88h+var_70], rax mov rax, [r14+8] mov [rsp+88h+var_68], rax test rax, rax jz short loc_400F9 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_400F5 inc dword ptr [rax+8] jmp short loc_400F9 loc_400F5: lock inc dword ptr [rax+8] loc_400F9: mov rax, [r14+20h] mov rbx, r14 sub rax, [r14+10h] mov [rsp+88h+var_60], rax mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax mov rax, 100000001h mov [r13+8], rax lea rax, off_EE998 mov [r13+0], rax mov r14, r13 add r14, 10h mov rdi, r14 mov rsi, r12 mov rbp, [rsp+88h+var_88] mov rdx, rbp lea rcx, [rsp+88h+var_80] mov r8d, r15d call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbp+0], r14 mov rdi, [rbp+8] mov [rbp+8], r13 test rdi, rdi jz short loc_40166 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_40166: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_40175 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_40175: mov rdi, [rsp+88h+var_78] test rdi, rdi lea r13, [rsp+88h+var_50] mov r14, rbx jz loc_4004E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_4004E loc_40195: mov rdi, [rsp+88h+var_50]; void * lea rax, [rsp+88h+var_40] cmp rdi, rax jz short loc_401B1 mov rsi, [rsp+88h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_401B1: mov rax, rbp add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_401C3: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_4; "Expected right side of 'math plus/minus"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp loc_40287 loc_401FA: lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_4001A lea rdi, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; minja::Parser::parseMathPlusMinus(void)::plus_minus_tok lea rsi, asc_B7244; "\\+|-(?![}%#]\\})" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard * call ___cxa_guard_release mov rbp, [rsp+88h+var_88] jmp loc_4001A loc_40255: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_4; "Expected left side of 'math plus/minus'"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_40287: mov r14, rax lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_40312 mov r14, rax jmp short loc_40300 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_40300 mov r14, rax jmp short loc_402D0 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_402D0 jmp short loc_402E1 mov r14, rax mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_402D0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_402D0: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_402E4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_402E4 loc_402E1: mov r14, rax loc_402E4: mov rdi, [rsp+88h+var_50]; void * lea rax, [rsp+88h+var_40] cmp rdi, rax jz short loc_40300 mov rsi, [rsp+88h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_40300: mov rax, [rsp+88h+var_88] mov rdi, [rax+8] test rdi, rdi jz short loc_40312 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_40312: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseMathPlusMinus(volatile signed __int32 **this, long long a2) { minja::Parser *v2; // rbp long long v3; // r15 unsigned int v4; // r15d volatile signed __int32 *v5; // rax volatile signed __int32 *v6; // r13 volatile signed __int32 *v7; // rdi std::runtime_error *v9; // r15 std::runtime_error *exception; // r15 long long v12; // [rsp+8h] [rbp-80h] BYREF volatile signed __int32 *v13; // [rsp+10h] [rbp-78h] void *v14; // [rsp+18h] [rbp-70h] BYREF volatile signed __int32 *v15; // [rsp+20h] [rbp-68h] long long v16; // [rsp+28h] [rbp-60h] BYREF void *v17[2]; // [rsp+38h] [rbp-50h] BYREF _QWORD v18[8]; // [rsp+48h] [rbp-40h] BYREF v2 = (minja::Parser *)this; if ( !(_BYTE)`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11], "\\+|-(?![}%#]\\})", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11]); v2 = (minja::Parser *)this; } minja::Parser::parseMathMulDiv(v2); if ( !*(_QWORD *)v2 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math plus/minus' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v17[0] = v18; v17[1] = 0LL; LOBYTE(v18[0]) = 0; while ( 1 ) { minja::Parser::consumeToken( (long long)&v14, a2, (long long)&minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11], 1u); v3 = *(_QWORD *)(std::string::operator=(v17, &v14) + 8); if ( v14 != &v16 ) operator delete(v14, v16 + 1); if ( !v3 ) break; minja::Parser::parseMathMulDiv((minja::Parser *)&v12); if ( !v12 ) { v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v9, "Expected right side of 'math plus/minus' expression"); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v4 = (((unsigned int)std::string::compare(v17, "+") | 0x200000000uLL) - 1) >> 32; v14 = *(void **)a2; v5 = *(volatile signed __int32 **)(a2 + 8); v15 = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v5 + 2); else _InterlockedIncrement(v5 + 2); } v16 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16); v6 = (volatile signed __int32 *)operator new(0x58uLL); *((_QWORD *)v6 + 1) = 0x100000001LL; *(_QWORD *)v6 = off_EE998; v2 = (minja::Parser *)this; minja::BinaryOpExpr::BinaryOpExpr(v6 + 4, &v14, this, &v12, v4); *this = v6 + 4; v7 = this[1]; this[1] = v6; if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); } if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); return v2; }
parseMathPlusMinus: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV RBP,RDI MOV AL,byte ptr [0x001f0e60] TEST AL,AL MOV qword ptr [RSP],RDI JZ 0x001401fa LAB_0014001a: MOV RDI,RBP MOV RSI,R14 CALL 0x0014031a CMP qword ptr [RBP],0x0 JZ 0x00140255 LEA RAX,[RSP + 0x48] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R12,[RSP + 0x18] LEA R13,[RSP + 0x38] LAB_0014004e: MOV RDI,R12 MOV RSI,R14 LEA RDX,[0x1f0e40] MOV ECX,0x1 CALL 0x0012fd6a MOV RDI,R13 MOV RSI,R12 CALL 0x00118800 MOV R15,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSP + 0x18] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x00140090 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x001186a0 LAB_00140090: TEST R15,R15 JZ 0x00140195 LAB_00140099: LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x0014031a CMP qword ptr [RSP + 0x8],0x0 JZ 0x001401c3 MOV RDI,R13 LEA RSI,[0x1bb5f4] CALL 0x001181a0 CMP EAX,0x1 MOV R15D,0x2 SBB R15D,0x0 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JZ 0x001400f9 MOV RCX,qword ptr [0x001effa0] CMP byte ptr [RCX],0x0 JZ 0x001400f5 INC dword ptr [RAX + 0x8] JMP 0x001400f9 LAB_001400f5: INC.LOCK dword ptr [RAX + 0x8] LAB_001400f9: MOV RAX,qword ptr [R14 + 0x20] MOV RBX,R14 SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x28],RAX LAB_00140109: MOV EDI,0x58 CALL 0x00118690 LAB_00140113: MOV R13,RAX MOV RAX,0x100000001 MOV qword ptr [R13 + 0x8],RAX LEA RAX,[0x1ee998] MOV qword ptr [R13],RAX MOV R14,R13 ADD R14,0x10 MOV RDI,R14 MOV RSI,R12 MOV RBP,qword ptr [RSP] MOV RDX,RBP LEA RCX,[RSP + 0x8] MOV R8D,R15D CALL 0x00156e5a MOV qword ptr [RBP],R14 MOV RDI,qword ptr [RBP + 0x8] MOV qword ptr [RBP + 0x8],R13 TEST RDI,RDI JZ 0x00140166 CALL 0x0012f80e LAB_00140166: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x00140175 CALL 0x0012f80e LAB_00140175: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI LEA R13,[RSP + 0x38] MOV R14,RBX JZ 0x0014004e CALL 0x0012f80e JMP 0x0014004e LAB_00140195: MOV RDI,qword ptr [RSP + 0x38] LEA RAX,[RSP + 0x48] CMP RDI,RAX JZ 0x001401b1 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001186a0 LAB_001401b1: MOV RAX,RBP ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001401c3: MOV EDI,0x10 CALL 0x00118360 MOV R15,RAX LAB_001401d0: LEA RSI,[0x1b7287] MOV RDI,RAX CALL 0x00118270 LAB_001401df: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R15 CALL 0x00118b30 LAB_001401fa: LEA RDI,[0x1f0e60] CALL 0x00118be0 TEST EAX,EAX JZ 0x0014001a LAB_0014020e: LEA RDI,[0x1f0e40] LEA RSI,[0x1b7244] MOV EDX,0x10 CALL 0x0012f87e LAB_00140226: LEA RDI,[0x12f8e6] LEA RSI,[0x1f0e40] LEA RDX,[0x1f0698] CALL 0x001185d0 LEA RDI,[0x1f0e60] CALL 0x00118450 MOV RBP,qword ptr [RSP] JMP 0x0014001a LAB_00140255: MOV EDI,0x10 CALL 0x00118360 MOV R15,RAX LAB_00140262: LEA RSI,[0x1b7254] MOV RDI,RAX CALL 0x00118270 LAB_00140271: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R15 CALL 0x00118b30
/* minja::Parser::parseMathPlusMinus() */ long * minja::Parser::parseMathPlusMinus(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; int iVar1; long lVar2; int8 *puVar3; runtime_error *prVar4; int8 *in_RSI; long *in_RDI; long local_80; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_78; long *local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; long local_60 [2]; int1 *local_50; int8 local_48; int1 local_40; int7 uStack_3f; if (parseMathPlusMinus()::plus_minus_tok_abi_cxx11_ == '\0') { iVar1 = __cxa_guard_acquire(&parseMathPlusMinus()::plus_minus_tok_abi_cxx11_); if (iVar1 != 0) { /* try { // try from 0014020e to 00140225 has its CatchHandler @ 00140287 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseMathPlusMinus()::plus_minus_tok_abi_cxx11_); } } parseMathMulDiv(); if (*in_RDI != 0) { local_50 = &local_40; local_48 = 0; local_40 = 0; while( true ) { /* try { // try from 0014004e to 00140064 has its CatchHandler @ 001402e1 */ consumeToken((string *)&local_70,in_RSI,parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,1); lVar2 = std::__cxx11::string::operator=((string *)&local_50,(string *)&local_70); lVar2 = *(long *)(lVar2 + 8); if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } if (lVar2 == 0) break; /* try { // try from 00140099 to 001400a5 has its CatchHandler @ 001402bc */ parseMathMulDiv(); if (local_80 == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001401d0 to 001401de has its CatchHandler @ 001402af */ std::runtime_error::runtime_error (prVar4,"Expected right side of \'math plus/minus\' expression"); /* try { // try from 001401df to 001401f4 has its CatchHandler @ 001402aa */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); } iVar1 = std::__cxx11::string::compare((char *)&local_50); local_70 = (long *)*in_RSI; local_68 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); *(int *)(local_68 + 8) = *(int *)(local_68 + 8) + 1; UNLOCK(); } else { *(int *)(local_68 + 8) = *(int *)(local_68 + 8) + 1; } } local_60[0] = in_RSI[4] - in_RSI[2]; /* try { // try from 00140109 to 00140112 has its CatchHandler @ 001402be */ puVar3 = (int8 *)operator_new(0x58); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_ptr_inplace_001ee998; BinaryOpExpr::BinaryOpExpr ((BinaryOpExpr *)(puVar3 + 2),(string *)&local_70,in_RDI,&local_80, 2 - (uint)(iVar1 == 0)); *in_RDI = (long)(puVar3 + 2); this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar3; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_78); } } if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } return in_RDI; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00140262 to 00140270 has its CatchHandler @ 0014029d */ std::runtime_error::runtime_error(prVar4,"Expected left side of \'math plus/minus\' expression"); /* try { // try from 00140271 to 00140286 has its CatchHandler @ 00140298 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); }
61,915
ma_hash_password
eloqsql/libmariadb/libmariadb/ma_password.c
void ma_hash_password(ulong *result, const char *password, size_t len) { register ulong nr=1345345333L, add=7, nr2=0x12345671L; ulong tmp; const char *password_end= password + len; for (; password < password_end; password++) { if (*password == ' ' || *password == '\t') continue; /* skip space in password */ tmp= (ulong) (uchar) *password; nr^= (((nr & 63)+add)*tmp)+ (nr << 8); nr2+=(nr2 << 8) ^ nr; add+=tmp; } result[0]=nr & (((ulong) 1L << 31) -1L); /* Don't use sign bit (str2int) */; result[1]=nr2 & (((ulong) 1L << 31) -1L); return; }
O0
c
ma_hash_password: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq $0x50305735, -0x20(%rbp) # imm = 0x50305735 movq $0x7, -0x28(%rbp) movq $0x12345671, -0x30(%rbp) # imm = 0x12345671 movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x49368 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax je 0x49306 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x9, %eax jne 0x49308 jmp 0x49357 movq -0x10(%rbp), %rax movzbl (%rax), %eax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax andq $0x3f, %rax addq -0x28(%rbp), %rax imulq -0x38(%rbp), %rax movq -0x20(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax shlq $0x8, %rax xorq -0x20(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x492e4 movq -0x20(%rbp), %rcx andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rcx andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) popq %rbp retq nop
ma_hash_password: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], 50305735h mov [rbp+var_28], 7 mov [rbp+var_30], 12345671h mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax loc_492E4: mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_49368 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_49306 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 9 jnz short loc_49308 loc_49306: jmp short loc_49357 loc_49308: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] mov [rbp+var_38], rax mov rax, [rbp+var_20] and rax, 3Fh add rax, [rbp+var_28] imul rax, [rbp+var_38] mov rcx, [rbp+var_20] shl rcx, 8 add rax, rcx xor rax, [rbp+var_20] mov [rbp+var_20], rax mov rax, [rbp+var_30] shl rax, 8 xor rax, [rbp+var_20] add rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_38] add rax, [rbp+var_28] mov [rbp+var_28], rax loc_49357: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_492E4 loc_49368: mov rcx, [rbp+var_20] and rcx, 7FFFFFFFh mov rax, [rbp+var_8] mov [rax], rcx mov rcx, [rbp+var_30] and rcx, 7FFFFFFFh mov rax, [rbp+var_8] mov [rax+8], rcx pop rbp retn
_QWORD * ma_hash_password(_QWORD *a1, _BYTE *a2, long long a3) { _QWORD *result; // rax long long v4; // [rsp+8h] [rbp-38h] int v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+18h] [rbp-28h] int v7; // [rsp+20h] [rbp-20h] _BYTE *v8; // [rsp+30h] [rbp-10h] v8 = a2; v7 = 1345345333; v6 = 7LL; v5 = 305419889; while ( v8 < &a2[a3] ) { if ( *v8 != 32 && *v8 != 9 ) { v4 = (unsigned __int8)*v8; v7 ^= (v7 << 8) + v4 * (v6 + (v7 & 0x3F)); v5 += v7 ^ (v5 << 8); v6 += v4; } ++v8; } *a1 = v7 & 0x7FFFFFFF; result = a1; a1[1] = v5 & 0x7FFFFFFF; return result; }
ma_hash_password: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],0x50305735 MOV qword ptr [RBP + -0x28],0x7 MOV qword ptr [RBP + -0x30],0x12345671 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX LAB_001492e4: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00149368 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x00149306 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x9 JNZ 0x00149308 LAB_00149306: JMP 0x00149357 LAB_00149308: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x28] IMUL RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] SHL RAX,0x8 XOR RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_00149357: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001492e4 LAB_00149368: MOV RCX,qword ptr [RBP + -0x20] AND RCX,0x7fffffff MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] AND RCX,0x7fffffff MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX POP RBP RET
void ma_hash_password(ulong *param_1,byte *param_2,long param_3) { ulong local_38; long local_30; ulong local_28; byte *local_18; local_28 = 0x50305735; local_30 = 7; local_38 = 0x12345671; for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) { if ((*local_18 != 0x20) && (*local_18 != 9)) { local_28 = ((local_28 & 0x3f) + local_30) * (ulong)*local_18 + local_28 * 0x100 ^ local_28; local_38 = (local_38 << 8 ^ local_28) + local_38; local_30 = (ulong)*local_18 + local_30; } } *param_1 = local_28 & 0x7fffffff; param_1[1] = local_38 & 0x7fffffff; return; }
61,916
eth_free_codes
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
INTERNAL void eth_free_codes(call_code_t* call_codes) { while (call_codes) { call_code_t* next = call_codes->next; if (call_codes->free) safe_free(call_codes->code.data); safe_free(call_codes); call_codes = next; } }
O0
c
eth_free_codes: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x32949 movq -0x8(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax testb $0x1, 0x30(%rax) je 0x32936 movq -0x8(%rbp), %rax movq 0x28(%rax), %rdi callq 0x9c5a0 movq -0x8(%rbp), %rdi callq 0x9c5a0 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3290c addq $0x10, %rsp popq %rbp retq nop
eth_free_codes: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi loc_3290C: cmp [rbp+var_8], 0 jz short loc_32949 mov rax, [rbp+var_8] mov rax, [rax+38h] mov [rbp+var_10], rax mov rax, [rbp+var_8] test byte ptr [rax+30h], 1 jz short loc_32936 mov rax, [rbp+var_8] mov rdi, [rax+28h] call safe_free loc_32936: mov rdi, [rbp+var_8] call safe_free mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_3290C loc_32949: add rsp, 10h pop rbp retn
long long eth_free_codes(long long a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] while ( a1 ) { v2 = *(_QWORD *)(a1 + 56); if ( (*(_BYTE *)(a1 + 48) & 1) != 0 ) safe_free(*(_QWORD *)(a1 + 40)); safe_free(a1); result = v2; a1 = v2; } return result; }
eth_free_codes: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI LAB_0013290c: CMP qword ptr [RBP + -0x8],0x0 JZ 0x00132949 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] TEST byte ptr [RAX + 0x30],0x1 JZ 0x00132936 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x28] CALL 0x0019c5a0 LAB_00132936: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0019c5a0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013290c LAB_00132949: ADD RSP,0x10 POP RBP RET
void eth_free_codes(long param_1) { long lVar1; int8 local_10; local_10 = param_1; while (local_10 != 0) { lVar1 = *(long *)(local_10 + 0x38); if ((*(byte *)(local_10 + 0x30) & 1) != 0) { safe_free(*(int8 *)(local_10 + 0x28)); } safe_free(local_10); local_10 = lVar1; } return; }
61,917
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
ng-log[P]ng-log/src/logging.cc
CheckOpMessageBuilder::CheckOpMessageBuilder(const char* exprtext) : stream_(new ostringstream) { *stream_ << exprtext << " ("; }
O1
cpp
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 movl $0x178, %edi # imm = 0x178 callq 0x7530 movq %rax, %rbx movq %rax, %rdi callq 0x7760 movq %rbx, (%r15) testq %r14, %r14 je 0xde56 movq %r14, %rdi callq 0x71f0 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x7610 jmp 0xde6f movq (%rbx), %rax movq -0x18(%rax), %rax movq %rbx, %rdi addq %rax, %rdi movl 0x20(%rbx,%rax), %esi orl $0x1, %esi callq 0x7940 leaq 0x149b6(%rip), %rsi # 0x2282c movl $0x2, %edx movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x7610 movq %rax, %r14 movl $0x178, %esi # imm = 0x178 movq %rbx, %rdi callq 0x7540 movq %r14, %rdi callq 0x7980
_ZN5nglog8internal21CheckOpMessageBuilderC2EPKc: push r15; Alternative name is 'nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)' push r14 push rbx mov r14, rsi mov r15, rdi mov edi, 178h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov [r15], rbx test r14, r14 jz short loc_DE56 mov rdi, r14 call _strlen mov rdi, rbx mov rsi, r14 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_DE6F loc_DE56: mov rax, [rbx] mov rax, [rax-18h] mov rdi, rbx add rdi, rax mov esi, [rbx+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_DE6F: lea rsi, asc_2282C; " (" mov edx, 2 mov rdi, rbx pop rbx pop r14 pop r15 jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax mov esi, 178h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
long long nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder( nglog::internal::CheckOpMessageBuilder *this, const char *a2) { _QWORD *v2; // rbx long long v3; // rax v2 = (_QWORD *)operator new(0x178uLL); std::ostringstream::basic_ostringstream(v2); *(_QWORD *)this = v2; if ( a2 ) { v3 = strlen(a2); std::__ostream_insert<char,std::char_traits<char>>(v2, a2, v3); } else { std::ios::clear((char *)v2 + *(_QWORD *)(*v2 - 24LL), *(_DWORD *)((char *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) | 1u); } return std::__ostream_insert<char,std::char_traits<char>>(v2, " (", 2LL); }
CheckOpMessageBuilder: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV R15,RDI MOV EDI,0x178 CALL 0x00107530 MOV RBX,RAX LAB_0010de2e: MOV RDI,RAX CALL 0x00107760 LAB_0010de36: MOV qword ptr [R15],RBX TEST R14,R14 JZ 0x0010de56 MOV RDI,R14 CALL 0x001071f0 MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x00107610 JMP 0x0010de6f LAB_0010de56: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] MOV RDI,RBX ADD RDI,RAX MOV ESI,dword ptr [RBX + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00107940 LAB_0010de6f: LEA RSI,[0x12282c] MOV EDX,0x2 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x00107610
/* nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*) */ void __thiscall nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder (CheckOpMessageBuilder *this,char *param_1) { ostringstream *this_00; size_t sVar1; this_00 = (ostringstream *)operator_new(0x178); /* try { // try from 0010de2e to 0010de35 has its CatchHandler @ 0010de88 */ std::__cxx11::ostringstream::ostringstream(this_00); *(ostringstream **)this = this_00; if (param_1 == (char *)0x0) { std::ios::clear(this_00 + *(long *)(*(long *)this_00 + -0x18), *(uint *)(this_00 + *(long *)(*(long *)this_00 + -0x18) + 0x20) | 1); } else { sVar1 = strlen(param_1); std::__ostream_insert<char,std::char_traits<char>>((ostream *)this_00,param_1,sVar1); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)this_00," (",2); return; }
61,918
DiscreteSchedule::get_sigmas(unsigned int)
7CodeWizard[P]stablediffusion/denoiser.hpp
std::vector<float> get_sigmas(uint32_t n) { std::vector<float> result; int t_max = TIMESTEPS - 1; if (n == 0) { return result; } else if (n == 1) { result.push_back(t_to_sigma((float)t_max)); result.push_back(0); return result; } float step = static_cast<float>(t_max) / static_cast<float>(n - 1); for (uint32_t i = 0; i < n; ++i) { float t = t_max - step * i; result.push_back(t_to_sigma(t)); } result.push_back(0); return result; }
O0
cpp
DiscreteSchedule::get_sigmas(unsigned int): subq $0x78, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movl %edx, 0x64(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) movb $0x0, 0x63(%rsp) callq 0x3e3e0 movl $0x3e7, 0x5c(%rsp) # imm = 0x3E7 cmpl $0x0, 0x64(%rsp) jne 0x4b5d4 movb $0x1, 0x63(%rsp) movl $0x1, 0x58(%rsp) jmp 0x4b714 cmpl $0x1, 0x64(%rsp) jne 0x4b658 movq 0x20(%rsp), %rdi cvtsi2ssl 0x5c(%rsp), %xmm0 callq 0x4b770 movss %xmm0, 0xc(%rsp) jmp 0x4b5f3 movq 0x10(%rsp), %rdi movss 0xc(%rsp), %xmm0 movss %xmm0, 0x54(%rsp) leaq 0x54(%rsp), %rsi callq 0x4b740 jmp 0x4b610 movq 0x10(%rsp), %rdi movl $0x0, 0x40(%rsp) leaq 0x40(%rsp), %rsi callq 0x4b740 jmp 0x4b629 movb $0x1, 0x63(%rsp) movl $0x1, 0x58(%rsp) jmp 0x4b714 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) callq 0x3e280 jmp 0x4b72f jmp 0x4b65a cvtsi2ssl 0x5c(%rsp), %xmm0 movl 0x64(%rsp), %eax decl %eax cvtsi2ss %rax, %xmm1 divss %xmm1, %xmm0 movss %xmm0, 0x3c(%rsp) movl $0x0, 0x38(%rsp) movl 0x38(%rsp), %eax cmpl 0x64(%rsp), %eax jae 0x4b6ee movq 0x20(%rsp), %rdi cvtsi2ssl 0x5c(%rsp), %xmm0 movss 0x3c(%rsp), %xmm1 movl 0x38(%rsp), %eax cvtsi2ss %rax, %xmm2 mulss %xmm2, %xmm1 subss %xmm1, %xmm0 movss %xmm0, 0x34(%rsp) movss 0x34(%rsp), %xmm0 callq 0x4b770 movss %xmm0, 0x8(%rsp) jmp 0x4b6c2 movq 0x10(%rsp), %rdi movss 0x8(%rsp), %xmm0 movss %xmm0, 0x30(%rsp) leaq 0x30(%rsp), %rsi callq 0x4b740 jmp 0x4b6df jmp 0x4b6e1 movl 0x38(%rsp), %eax addl $0x1, %eax movl %eax, 0x38(%rsp) jmp 0x4b67d movq 0x10(%rsp), %rdi movl $0x0, 0x2c(%rsp) leaq 0x2c(%rsp), %rsi callq 0x4b740 jmp 0x4b707 movb $0x1, 0x63(%rsp) movl $0x1, 0x58(%rsp) testb $0x1, 0x63(%rsp) jne 0x4b725 movq 0x10(%rsp), %rdi callq 0x3e280 movq 0x18(%rsp), %rax addq $0x78, %rsp retq movq 0x48(%rsp), %rdi callq 0xbd30 nopl (%rax)
_ZN16DiscreteSchedule10get_sigmasEj: sub rsp, 78h mov [rsp+78h+var_68], rdi mov rax, rdi mov [rsp+78h+var_60], rax mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov [rsp+78h+var_14], edx mov rax, [rsp+78h+var_10] mov [rsp+78h+var_58], rax mov [rsp+78h+var_15], 0 call _ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void) mov [rsp+78h+var_1C], 3E7h cmp [rsp+78h+var_14], 0 jnz short loc_4B5D4 mov [rsp+78h+var_15], 1 mov [rsp+78h+var_20], 1 jmp loc_4B714 loc_4B5D4: cmp [rsp+78h+var_14], 1 jnz short loc_4B658 mov rdi, [rsp+78h+var_58]; this cvtsi2ss xmm0, [rsp+78h+var_1C]; float call _ZN13SigmaSchedule10t_to_sigmaEf; SigmaSchedule::t_to_sigma(float) movss [rsp+78h+var_6C], xmm0 jmp short $+2 loc_4B5F3: mov rdi, [rsp+78h+var_68] movss xmm0, [rsp+78h+var_6C] movss [rsp+78h+var_24], xmm0 lea rsi, [rsp+78h+var_24] call _ZNSt6vectorIfSaIfEE9push_backEOf; std::vector<float>::push_back(float &&) jmp short $+2 loc_4B610: mov rdi, [rsp+78h+var_68] mov [rsp+78h+var_38], 0 lea rsi, [rsp+78h+var_38] call _ZNSt6vectorIfSaIfEE9push_backEOf; std::vector<float>::push_back(float &&) jmp short $+2 loc_4B629: mov [rsp+78h+var_15], 1 mov [rsp+78h+var_20], 1 jmp loc_4B714 mov rdi, [rsp+arg_8] mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() jmp loc_4B72F loc_4B658: jmp short $+2 loc_4B65A: cvtsi2ss xmm0, [rsp+78h+var_1C] mov eax, [rsp+78h+var_14] dec eax cvtsi2ss xmm1, rax divss xmm0, xmm1 movss [rsp+78h+var_3C], xmm0 mov [rsp+78h+var_40], 0 loc_4B67D: mov eax, [rsp+78h+var_40] cmp eax, [rsp+78h+var_14] jnb short loc_4B6EE mov rdi, [rsp+78h+var_58]; this cvtsi2ss xmm0, [rsp+78h+var_1C] movss xmm1, [rsp+78h+var_3C] mov eax, [rsp+78h+var_40] cvtsi2ss xmm2, rax mulss xmm1, xmm2 subss xmm0, xmm1 movss [rsp+78h+var_44], xmm0 movss xmm0, [rsp+78h+var_44]; float call _ZN13SigmaSchedule10t_to_sigmaEf; SigmaSchedule::t_to_sigma(float) movss [rsp+78h+var_70], xmm0 jmp short $+2 loc_4B6C2: mov rdi, [rsp+78h+var_68] movss xmm0, [rsp+78h+var_70] movss [rsp+78h+var_48], xmm0 lea rsi, [rsp+78h+var_48] call _ZNSt6vectorIfSaIfEE9push_backEOf; std::vector<float>::push_back(float &&) jmp short $+2 loc_4B6DF: jmp short $+2 loc_4B6E1: mov eax, [rsp+78h+var_40] add eax, 1 mov [rsp+78h+var_40], eax jmp short loc_4B67D loc_4B6EE: mov rdi, [rsp+78h+var_68] mov [rsp+78h+var_4C], 0 lea rsi, [rsp+78h+var_4C] call _ZNSt6vectorIfSaIfEE9push_backEOf; std::vector<float>::push_back(float &&) jmp short $+2 loc_4B707: mov [rsp+78h+var_15], 1 mov [rsp+78h+var_20], 1 loc_4B714: test [rsp+78h+var_15], 1 jnz short loc_4B725 mov rdi, [rsp+78h+var_68] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() loc_4B725: mov rax, [rsp+78h+var_60] add rsp, 78h retn loc_4B72F: mov rdi, [rsp+arg_40] call __Unwind_Resume
DiscreteSchedule * DiscreteSchedule::get_sigmas(DiscreteSchedule *this, SigmaSchedule *a2, unsigned int a3) { float v3; // xmm0_4 int v5; // [rsp+2Ch] [rbp-4Ch] BYREF float v6; // [rsp+30h] [rbp-48h] BYREF float v7; // [rsp+34h] [rbp-44h] int i; // [rsp+38h] [rbp-40h] float v9; // [rsp+3Ch] [rbp-3Ch] int v10[5]; // [rsp+40h] [rbp-38h] BYREF float v11; // [rsp+54h] [rbp-24h] BYREF int v12; // [rsp+58h] [rbp-20h] int v13; // [rsp+5Ch] [rbp-1Ch] char v14; // [rsp+63h] [rbp-15h] unsigned int v15; // [rsp+64h] [rbp-14h] SigmaSchedule *v16; // [rsp+68h] [rbp-10h] DiscreteSchedule *v17; // [rsp+70h] [rbp-8h] v17 = this; v16 = a2; v15 = a3; v14 = 0; std::vector<float>::vector((long long)this); v13 = 999; if ( v15 ) { if ( v15 == 1 ) { SigmaSchedule::t_to_sigma(a2, (float)v13); v11 = (float)v13; std::vector<float>::push_back(this, &v11); v10[0] = 0; std::vector<float>::push_back(this, v10); v14 = 1; v12 = 1; } else { v9 = (float)v13 / (float)(int)(v15 - 1); for ( i = 0; i < v15; ++i ) { v7 = (float)v13 - (float)(v9 * (float)i); v3 = v7; SigmaSchedule::t_to_sigma(a2, v7); v6 = v3; std::vector<float>::push_back(this, &v6); } v5 = 0; std::vector<float>::push_back(this, &v5); v14 = 1; v12 = 1; } } else { v14 = 1; v12 = 1; } return this; }
get_sigmas: SUB RSP,0x78 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV dword ptr [RSP + 0x64],EDX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x63],0x0 CALL 0x0013e3e0 MOV dword ptr [RSP + 0x5c],0x3e7 CMP dword ptr [RSP + 0x64],0x0 JNZ 0x0014b5d4 MOV byte ptr [RSP + 0x63],0x1 MOV dword ptr [RSP + 0x58],0x1 JMP 0x0014b714 LAB_0014b5d4: CMP dword ptr [RSP + 0x64],0x1 JNZ 0x0014b658 MOV RDI,qword ptr [RSP + 0x20] CVTSI2SS XMM0,dword ptr [RSP + 0x5c] LAB_0014b5e6: CALL 0x0014b770 MOVSS dword ptr [RSP + 0xc],XMM0 JMP 0x0014b5f3 LAB_0014b5f3: MOV RDI,qword ptr [RSP + 0x10] MOVSS XMM0,dword ptr [RSP + 0xc] MOVSS dword ptr [RSP + 0x54],XMM0 LEA RSI,[RSP + 0x54] CALL 0x0014b740 JMP 0x0014b610 LAB_0014b610: MOV RDI,qword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x40],0x0 LEA RSI,[RSP + 0x40] CALL 0x0014b740 JMP 0x0014b629 LAB_0014b629: MOV byte ptr [RSP + 0x63],0x1 MOV dword ptr [RSP + 0x58],0x1 JMP 0x0014b714 LAB_0014b658: JMP 0x0014b65a LAB_0014b65a: CVTSI2SS XMM0,dword ptr [RSP + 0x5c] MOV EAX,dword ptr [RSP + 0x64] DEC EAX CVTSI2SS XMM1,RAX DIVSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x3c],XMM0 MOV dword ptr [RSP + 0x38],0x0 LAB_0014b67d: MOV EAX,dword ptr [RSP + 0x38] CMP EAX,dword ptr [RSP + 0x64] JNC 0x0014b6ee MOV RDI,qword ptr [RSP + 0x20] CVTSI2SS XMM0,dword ptr [RSP + 0x5c] MOVSS XMM1,dword ptr [RSP + 0x3c] MOV EAX,dword ptr [RSP + 0x38] CVTSI2SS XMM2,RAX MULSS XMM1,XMM2 SUBSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x34],XMM0 MOVSS XMM0,dword ptr [RSP + 0x34] CALL 0x0014b770 MOVSS dword ptr [RSP + 0x8],XMM0 JMP 0x0014b6c2 LAB_0014b6c2: MOV RDI,qword ptr [RSP + 0x10] MOVSS XMM0,dword ptr [RSP + 0x8] MOVSS dword ptr [RSP + 0x30],XMM0 LEA RSI,[RSP + 0x30] CALL 0x0014b740 JMP 0x0014b6df LAB_0014b6df: JMP 0x0014b6e1 LAB_0014b6e1: MOV EAX,dword ptr [RSP + 0x38] ADD EAX,0x1 MOV dword ptr [RSP + 0x38],EAX JMP 0x0014b67d LAB_0014b6ee: MOV RDI,qword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x2c],0x0 LEA RSI,[RSP + 0x2c] CALL 0x0014b740 LAB_0014b705: JMP 0x0014b707 LAB_0014b707: MOV byte ptr [RSP + 0x63],0x1 MOV dword ptr [RSP + 0x58],0x1 LAB_0014b714: TEST byte ptr [RSP + 0x63],0x1 JNZ 0x0014b725 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0013e280 LAB_0014b725: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x78 RET
/* WARNING: Removing unreachable block (ram,0x0014b71b) */ /* DiscreteSchedule::get_sigmas(unsigned int) */ vector<float,std::allocator<float>> * DiscreteSchedule::get_sigmas(uint param_1) { uint in_EDX; SigmaSchedule *in_RSI; int4 in_register_0000003c; vector<float,std::allocator<float>> *this; float local_4c; float local_48; float local_44; uint local_40; float local_3c; float local_38 [5]; float local_24 [2]; int local_1c; int1 local_15; uint local_14; vector<float,std::allocator<float>> *local_8; this = (vector<float,std::allocator<float>> *)CONCAT44(in_register_0000003c,param_1); local_15 = 0; local_14 = in_EDX; local_8 = this; std::vector<float,std::allocator<float>>::vector(this); local_1c = 999; if (local_14 != 0) { if (local_14 == 1) { /* try { // try from 0014b5e6 to 0014b704 has its CatchHandler @ 0014b63b */ local_24[0] = (float)SigmaSchedule::t_to_sigma(in_RSI,999.0); std::vector<float,std::allocator<float>>::push_back(this,local_24); local_38[0] = 0.0; std::vector<float,std::allocator<float>>::push_back(this,local_38); } else { local_3c = 999.0 / (float)(local_14 - 1); for (local_40 = 0; local_40 < local_14; local_40 = local_40 + 1) { local_44 = (float)local_1c - local_3c * (float)local_40; local_48 = (float)SigmaSchedule::t_to_sigma(in_RSI,local_44); std::vector<float,std::allocator<float>>::push_back(this,&local_48); } local_4c = 0.0; std::vector<float,std::allocator<float>>::push_back(this,&local_4c); } } return this; }
61,919
DiscreteSchedule::get_sigmas(unsigned int)
7CodeWizard[P]stablediffusion/denoiser.hpp
std::vector<float> get_sigmas(uint32_t n) { std::vector<float> result; int t_max = TIMESTEPS - 1; if (n == 0) { return result; } else if (n == 1) { result.push_back(t_to_sigma((float)t_max)); result.push_back(0); return result; } float step = static_cast<float>(t_max) / static_cast<float>(n - 1); for (uint32_t i = 0; i < n; ++i) { float t = t_max - step * i; result.push_back(t_to_sigma(t)); } result.push_back(0); return result; }
O1
cpp
DiscreteSchedule::get_sigmas(unsigned int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) testl %edx, %edx je 0x3b09b movl %edx, %r15d movq %rsi, %r14 cmpl $0x1, %edx jne 0x3af68 movss 0x2ee4(%r14), %xmm1 xorps %xmm0, %xmm0 mulss %xmm1, %xmm0 addss %xmm1, %xmm0 callq 0xaa50 movss %xmm0, 0x4(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x3b05f movss %xmm0, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3b06c leal -0x1(%r15), %eax xorps %xmm0, %xmm0 cvtsi2ss %rax, %xmm0 movss 0x82988(%rip), %xmm1 # 0xbd904 divss %xmm0, %xmm1 movss %xmm1, 0xc(%rsp) xorl %ebp, %ebp leaq 0x4(%rsp), %r12 movl %ebp, %eax xorps %xmm0, %xmm0 cvtsi2ss %rax, %xmm0 mulss 0xc(%rsp), %xmm0 addss 0x82933(%rip), %xmm0 # 0xbd8d8 movss %xmm0, 0x8(%rsp) callq 0xa1f0 movaps %xmm0, 0x10(%rsp) cvttss2si %xmm0, %r13d movss 0x8(%rsp), %xmm0 callq 0xa320 cvttss2si %xmm0, %eax cvttps2dq 0x10(%rsp), %xmm0 cvtdq2ps %xmm0, %xmm0 movss 0x8(%rsp), %xmm1 subss %xmm0, %xmm1 movss 0x80024(%rip), %xmm0 # 0xbb008 subss %xmm1, %xmm0 cltq mulss 0x1f48(%r14,%rax,4), %xmm1 movslq %r13d, %rax mulss 0x1f48(%r14,%rax,4), %xmm0 addss %xmm1, %xmm0 callq 0xaa50 movss %xmm0, 0x4(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x3b028 movss %xmm0, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3b033 movq %rbx, %rdi movq %r12, %rdx callq 0x3b0d2 incl %ebp cmpl %ebp, %r15d jne 0x3af8d movl $0x0, 0x4(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi jne 0x3b07e leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x3b0d2 jmp 0x3b09b leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x3b0d2 movl $0x0, 0x4(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x3b08e movl $0x0, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3b09b leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x3b0d2 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3b0b3 jmp 0x3b0b3 jmp 0x3b0b3 movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x3b0ca movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0xa5e0 movq %r14, %rdi callq 0xaae0
_ZN16DiscreteSchedule10get_sigmasEj: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 test edx, edx jz loc_3B09B mov r15d, edx mov r14, rsi cmp edx, 1 jnz short loc_3AF68 movss xmm1, dword ptr [r14+2EE4h] xorps xmm0, xmm0 mulss xmm0, xmm1 addss xmm0, xmm1 call _expf movss [rsp+58h+var_54], xmm0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz loc_3B05F movss dword ptr [rsi], xmm0 add rsi, 4 mov [rbx+8], rsi jmp loc_3B06C loc_3AF68: lea eax, [r15-1] xorps xmm0, xmm0 cvtsi2ss xmm0, rax movss xmm1, cs:dword_BD904 divss xmm1, xmm0 movss [rsp+58h+var_4C], xmm1 xor ebp, ebp lea r12, [rsp+58h+var_54] loc_3AF8D: mov eax, ebp xorps xmm0, xmm0 cvtsi2ss xmm0, rax mulss xmm0, [rsp+58h+var_4C] addss xmm0, cs:dword_BD8D8 movss [rsp+58h+var_50], xmm0 call _floorf movaps [rsp+58h+var_48], xmm0 cvttss2si r13d, xmm0 movss xmm0, [rsp+58h+var_50] call _ceilf cvttss2si eax, xmm0 cvttps2dq xmm0, [rsp+58h+var_48] cvtdq2ps xmm0, xmm0 movss xmm1, [rsp+58h+var_50] subss xmm1, xmm0 movss xmm0, cs:dword_BB008 subss xmm0, xmm1 cdqe mulss xmm1, dword ptr [r14+rax*4+1F48h] movsxd rax, r13d mulss xmm0, dword ptr [r14+rax*4+1F48h] addss xmm0, xmm1 call _expf movss [rsp+58h+var_54], xmm0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_3B028 movss dword ptr [rsi], xmm0 add rsi, 4 mov [rbx+8], rsi jmp short loc_3B033 loc_3B028: mov rdi, rbx mov rdx, r12 call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) loc_3B033: inc ebp cmp r15d, ebp jnz loc_3AF8D mov [rsp+58h+var_54], 0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jnz short loc_3B07E lea rdx, [rsp+58h+var_54] mov rdi, rbx call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) jmp short loc_3B09B loc_3B05F: lea rdx, [rsp+58h+var_54] mov rdi, rbx call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) loc_3B06C: mov [rsp+58h+var_54], 0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_3B08E loc_3B07E: mov dword ptr [rsi], 0 add rsi, 4 mov [rbx+8], rsi jmp short loc_3B09B loc_3B08E: lea rdx, [rsp+58h+var_54] mov rdi, rbx call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) loc_3B09B: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_3B0B3 jmp short loc_3B0B3 jmp short $+2 loc_3B0B3: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_3B0CA mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3B0CA: mov rdi, r14 call __Unwind_Resume
DiscreteSchedule * DiscreteSchedule::get_sigmas(DiscreteSchedule *this, long long a2, int a3) { float v5; // xmm0_4 float *v6; // rsi int i; // ebp __m128 v8; // xmm0 int v9; // r13d int v10; // eax float v11; // xmm1_4 float v12; // xmm0_4 float *v13; // rsi _DWORD *v14; // rsi float v16; // [rsp+4h] [rbp-54h] BYREF float v17; // [rsp+8h] [rbp-50h] float v18; // [rsp+Ch] [rbp-4Ch] __m128 v19; // [rsp+10h] [rbp-48h] *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; if ( a3 ) { if ( a3 == 1 ) { v5 = (float)(0.0 * *(float *)(a2 + 12004)) + *(float *)(a2 + 12004); expf(v5); v16 = v5; v6 = (float *)*((_QWORD *)this + 1); if ( v6 == *((float **)this + 2) ) { std::vector<float>::_M_realloc_insert<float>(this, v6, &v16); } else { *v6 = v5; *((_QWORD *)this + 1) = v6 + 1; } v16 = 0.0; v14 = (_DWORD *)*((_QWORD *)this + 1); if ( v14 != *((_DWORD **)this + 2) ) { LABEL_14: *v14 = 0; *((_QWORD *)this + 1) = v14 + 1; return this; } } else { v18 = -999.0 / (float)(a3 - 1); for ( i = 0; i != a3; ++i ) { v8 = 0LL; v17 = (float)((float)i * v18) + 999.0; *(double *)v8.m128_u64 = floorf(); v19 = v8; v9 = (int)v8.m128_f32[0]; v10 = (int)ceilf(v17); v11 = v17 - _mm_cvtepi32_ps(_mm_cvttps_epi32(v19)).m128_f32[0]; v12 = (float)((float)(1.0 - v11) * *(float *)(a2 + 4LL * v9 + 8008)) + (float)(v11 * *(float *)(a2 + 4LL * v10 + 8008)); expf(v12); v16 = v12; v13 = (float *)*((_QWORD *)this + 1); if ( v13 == *((float **)this + 2) ) { std::vector<float>::_M_realloc_insert<float>(this, v13, &v16); } else { *v13 = v12; *((_QWORD *)this + 1) = v13 + 1; } } v16 = 0.0; v14 = (_DWORD *)*((_QWORD *)this + 1); if ( v14 != *((_DWORD **)this + 2) ) goto LABEL_14; } std::vector<float>::_M_realloc_insert<float>(this, v14, &v16); } return this; }
61,920
DiscreteSchedule::get_sigmas(unsigned int)
7CodeWizard[P]stablediffusion/denoiser.hpp
std::vector<float> get_sigmas(uint32_t n) { std::vector<float> result; int t_max = TIMESTEPS - 1; if (n == 0) { return result; } else if (n == 1) { result.push_back(t_to_sigma((float)t_max)); result.push_back(0); return result; } float step = static_cast<float>(t_max) / static_cast<float>(n - 1); for (uint32_t i = 0; i < n; ++i) { float t = t_max - step * i; result.push_back(t_to_sigma(t)); } result.push_back(0); return result; }
O3
cpp
DiscreteSchedule::get_sigmas(unsigned int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) testl %edx, %edx je 0x3a48d movl %edx, %r15d movq %rsi, %r14 cmpl $0x1, %edx jne 0x3a388 movss 0x2ee4(%r14), %xmm1 xorps %xmm0, %xmm0 mulss %xmm1, %xmm0 addss %xmm1, %xmm0 callq 0xaa40 leaq 0x4(%rsp), %rdx movss %xmm0, (%rdx) movq %rbx, %rdi xorl %esi, %esi callq 0x3a4c4 movq 0x8(%rbx), %rsi movl $0x0, 0x4(%rsp) cmpq 0x10(%rbx), %rsi jne 0x3a470 leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x3a4c4 jmp 0x3a48d leal -0x1(%r15), %eax xorps %xmm0, %xmm0 cvtsi2ss %rax, %xmm0 movss 0x82578(%rip), %xmm1 # 0xbc914 divss %xmm0, %xmm1 movss %xmm1, 0xc(%rsp) xorl %ebp, %ebp leaq 0x4(%rsp), %r12 movl %ebp, %eax xorps %xmm0, %xmm0 cvtsi2ss %rax, %xmm0 mulss 0xc(%rsp), %xmm0 addss 0x82523(%rip), %xmm0 # 0xbc8e8 movss %xmm0, 0x8(%rsp) callq 0xa1f0 movaps %xmm0, 0x10(%rsp) cvttss2si %xmm0, %r13d movss 0x8(%rsp), %xmm0 callq 0xa310 cvttss2si %xmm0, %eax cvttps2dq 0x10(%rsp), %xmm0 cvtdq2ps %xmm0, %xmm0 movss 0x8(%rsp), %xmm1 subss %xmm0, %xmm1 movss 0x7fc04(%rip), %xmm0 # 0xba008 subss %xmm1, %xmm0 cltq mulss 0x1f48(%r14,%rax,4), %xmm1 movslq %r13d, %rax mulss 0x1f48(%r14,%rax,4), %xmm0 addss %xmm1, %xmm0 callq 0xaa40 movss %xmm0, 0x4(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x3a448 movss %xmm0, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3a453 movq %rbx, %rdi movq %r12, %rdx callq 0x3a4c4 incl %ebp cmpl %ebp, %r15d jne 0x3a3ad movq 0x8(%rbx), %rsi movl $0x0, 0x4(%rsp) cmpq 0x10(%rbx), %rsi je 0x3a480 movl $0x0, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3a48d leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x3a4c4 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3a4a5 jmp 0x3a4a5 jmp 0x3a4a5 movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x3a4bc movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0xa5d0 movq %r14, %rdi callq 0xaad0
_ZN16DiscreteSchedule10get_sigmasEj: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 test edx, edx jz loc_3A48D mov r15d, edx mov r14, rsi cmp edx, 1 jnz short loc_3A388 movss xmm1, dword ptr [r14+2EE4h] xorps xmm0, xmm0 mulss xmm0, xmm1 addss xmm0, xmm1 call _expf lea rdx, [rsp+58h+var_54] movss dword ptr [rdx], xmm0 mov rdi, rbx xor esi, esi call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) mov rsi, [rbx+8] mov [rsp+58h+var_54], 0 cmp rsi, [rbx+10h] jnz loc_3A470 lea rdx, [rsp+58h+var_54] mov rdi, rbx call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) jmp loc_3A48D loc_3A388: lea eax, [r15-1] xorps xmm0, xmm0 cvtsi2ss xmm0, rax movss xmm1, cs:dword_BC914 divss xmm1, xmm0 movss [rsp+58h+var_4C], xmm1 xor ebp, ebp lea r12, [rsp+58h+var_54] loc_3A3AD: mov eax, ebp xorps xmm0, xmm0 cvtsi2ss xmm0, rax mulss xmm0, [rsp+58h+var_4C] addss xmm0, cs:dword_BC8E8 movss [rsp+58h+var_50], xmm0 call _floorf movaps [rsp+58h+var_48], xmm0 cvttss2si r13d, xmm0 movss xmm0, [rsp+58h+var_50] call _ceilf cvttss2si eax, xmm0 cvttps2dq xmm0, [rsp+58h+var_48] cvtdq2ps xmm0, xmm0 movss xmm1, [rsp+58h+var_50] subss xmm1, xmm0 movss xmm0, cs:dword_BA008 subss xmm0, xmm1 cdqe mulss xmm1, dword ptr [r14+rax*4+1F48h] movsxd rax, r13d mulss xmm0, dword ptr [r14+rax*4+1F48h] addss xmm0, xmm1 call _expf movss [rsp+58h+var_54], xmm0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_3A448 movss dword ptr [rsi], xmm0 add rsi, 4 mov [rbx+8], rsi jmp short loc_3A453 loc_3A448: mov rdi, rbx mov rdx, r12 call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) loc_3A453: inc ebp cmp r15d, ebp jnz loc_3A3AD mov rsi, [rbx+8] mov [rsp+58h+var_54], 0 cmp rsi, [rbx+10h] jz short loc_3A480 loc_3A470: mov dword ptr [rsi], 0 add rsi, 4 mov [rbx+8], rsi jmp short loc_3A48D loc_3A480: lea rdx, [rsp+58h+var_54] mov rdi, rbx call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float &&) loc_3A48D: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_3A4A5 jmp short loc_3A4A5 jmp short $+2 loc_3A4A5: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_3A4BC mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3A4BC: mov rdi, r14 call __Unwind_Resume
DiscreteSchedule * DiscreteSchedule::get_sigmas(DiscreteSchedule *this, long long a2, int a3) { float v5; // xmm0_4 _DWORD *v6; // rsi int i; // ebp __m128 v8; // xmm0 int v9; // r13d int v10; // eax float v11; // xmm1_4 float v12; // xmm0_4 float *v13; // rsi float v15; // [rsp+4h] [rbp-54h] BYREF float v16; // [rsp+8h] [rbp-50h] float v17; // [rsp+Ch] [rbp-4Ch] __m128 v18; // [rsp+10h] [rbp-48h] *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; if ( a3 ) { if ( a3 == 1 ) { v5 = (float)(0.0 * *(float *)(a2 + 12004)) + *(float *)(a2 + 12004); expf(v5); v15 = v5; std::vector<float>::_M_realloc_insert<float>(this, 0LL, &v15); v6 = (_DWORD *)*((_QWORD *)this + 1); v15 = 0.0; if ( v6 == *((_DWORD **)this + 2) ) { LABEL_12: std::vector<float>::_M_realloc_insert<float>(this, v6, &v15); return this; } } else { v17 = -999.0 / (float)(a3 - 1); for ( i = 0; i != a3; ++i ) { v8 = 0LL; v16 = (float)((float)i * v17) + 999.0; *(double *)v8.m128_u64 = floorf(); v18 = v8; v9 = (int)v8.m128_f32[0]; v10 = (int)ceilf(v16); v11 = v16 - _mm_cvtepi32_ps(_mm_cvttps_epi32(v18)).m128_f32[0]; v12 = (float)((float)(1.0 - v11) * *(float *)(a2 + 4LL * v9 + 8008)) + (float)(v11 * *(float *)(a2 + 4LL * v10 + 8008)); expf(v12); v15 = v12; v13 = (float *)*((_QWORD *)this + 1); if ( v13 == *((float **)this + 2) ) { std::vector<float>::_M_realloc_insert<float>(this, v13, &v15); } else { *v13 = v12; *((_QWORD *)this + 1) = v13 + 1; } } v6 = (_DWORD *)*((_QWORD *)this + 1); v15 = 0.0; if ( v6 == *((_DWORD **)this + 2) ) goto LABEL_12; } *v6 = 0; *((_QWORD *)this + 1) = v6 + 1; } return this; }
61,921
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>>>>>::scan_comment()
monkey531[P]llama/common/./json.hpp
bool scan_comment() { switch (get()) { // single-line comments skip input until a newline or EOF is read case '/': { while (true) { switch (get()) { case '\n': case '\r': case char_traits<char_type>::eof(): case '\0': return true; default: break; } } } // multi-line comments skip input until */ is read case '*': { while (true) { switch (get()) { case char_traits<char_type>::eof(): case '\0': { error_message = "invalid comment; missing closing '*/'"; return false; } case '*': { switch (get()) { case '/': return true; default: { unget(); continue; } } } default: continue; } } } // unexpected character after reading '/' default: { error_message = "invalid comment; expecting '/' or '*' after '/'"; return false; } } }
O1
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>>>>>::scan_comment(): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x19de6 cmpl $0x2f, %eax je 0x31f43 cmpl $0x2a, %eax jne 0x31f60 movq %rbx, %rdi callq 0x19de6 leal 0x1(%rax), %ecx cmpl $0x2, %ecx jb 0x31f69 cmpl $0x2a, %eax jne 0x31f17 movq %rbx, %rdi callq 0x19de6 cmpl $0x2f, %eax je 0x31f5c movq %rbx, %rdi callq 0x3282c jmp 0x31f17 movl $0x4803, %ebp # imm = 0x4803 movq %rbx, %rdi callq 0x19de6 incl %eax cmpl $0xf, %eax jae 0x31f48 btl %eax, %ebp jae 0x31f48 movb $0x1, %al jmp 0x31f76 leaq 0x863dd(%rip), %rax # 0xb8344 jmp 0x31f70 leaq 0x863ae(%rip), %rax # 0xb831e movq %rax, 0x70(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv: push rbp push rbx push rax mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 2Fh ; '/' jz short loc_31F43 cmp eax, 2Ah ; '*' jnz short loc_31F60 loc_31F17: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax+1] cmp ecx, 2 jb short loc_31F69 cmp eax, 2Ah ; '*' jnz short loc_31F17 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 2Fh ; '/' jz short loc_31F5C mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) jmp short loc_31F17 loc_31F43: mov ebp, 4803h loc_31F48: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) inc eax cmp eax, 0Fh jnb short loc_31F48 bt ebp, eax jnb short loc_31F48 loc_31F5C: mov al, 1 jmp short loc_31F76 loc_31F60: lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"... jmp short loc_31F70 loc_31F69: lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'" loc_31F70: mov [rbx+70h], rax xor eax, eax loc_31F76: add rsp, 8 pop rbx pop rbp retn
char 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>>>::scan_comment( __m128i *a1) { int v1; // eax int v2; // eax int v3; // ebp unsigned int v4; // eax const char *v6; // rax v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( v1 == 47 ) { v3 = 18435; do { do v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) + 1; while ( v4 >= 0xF ); } while ( !_bittest(&v3, v4) ); return 1; } else { if ( v1 == 42 ) { while ( 1 ) { v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( (unsigned int)(v2 + 1) < 2 ) break; if ( v2 == 42 ) { if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 ) return 1; 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>>>::unget(a1); } } v6 = "invalid comment; missing closing '*/'"; } else { v6 = "invalid comment; expecting '/' or '*' after '/'"; } a1[7].m128i_i64[0] = (long long)v6; return 0; } }
scan_comment: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00119de6 CMP EAX,0x2f JZ 0x00131f43 CMP EAX,0x2a JNZ 0x00131f60 LAB_00131f17: MOV RDI,RBX CALL 0x00119de6 LEA ECX,[RAX + 0x1] CMP ECX,0x2 JC 0x00131f69 CMP EAX,0x2a JNZ 0x00131f17 MOV RDI,RBX CALL 0x00119de6 CMP EAX,0x2f JZ 0x00131f5c MOV RDI,RBX CALL 0x0013282c JMP 0x00131f17 LAB_00131f43: MOV EBP,0x4803 LAB_00131f48: MOV RDI,RBX CALL 0x00119de6 INC EAX CMP EAX,0xf JNC 0x00131f48 BT EBP,EAX JNC 0x00131f48 LAB_00131f5c: MOV AL,0x1 JMP 0x00131f76 LAB_00131f60: LEA RAX,[0x1b8344] JMP 0x00131f70 LAB_00131f69: LEA RAX,[0x1b831e] LAB_00131f70: MOV qword ptr [RBX + 0x70],RAX XOR EAX,EAX LAB_00131f76: ADD RSP,0x8 POP RBX POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan_comment() */ 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>>> ::scan_comment(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) { int iVar1; int8 uVar2; char *pcVar3; iVar1 = get(this); if (iVar1 == 0x2f) { do { do { iVar1 = get(this); } while (0xe < iVar1 + 1U); } while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0); LAB_00131f5c: uVar2 = 1; } else { if (iVar1 == 0x2a) { while (iVar1 = get(this), 1 < iVar1 + 1U) { if (iVar1 == 0x2a) { iVar1 = get(this); if (iVar1 == 0x2f) goto LAB_00131f5c; unget(this); } } pcVar3 = "invalid comment; missing closing \'*/\'"; } else { pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'"; } *(char **)(this + 0x70) = pcVar3; uVar2 = 0; } return uVar2; }
61,922
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::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 invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::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 %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x60f58(%rip), %rsi # 0xabcf3 leaq 0x60f61(%rip), %rdx # 0xabd03 leaq 0x28(%rsp), %rdi callq 0x1ded4 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x3f3d0 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x18a50 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x4ae45 movq 0x78(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4ae60 movq 0x58(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x4ae77 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x3f5cc leaq 0x9157b(%rip), %rax # 0xdc408 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4aeab movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4af39 movq 0x18(%rsp), %rsi jmp 0x4af31 movq %rax, %rbx jmp 0x4af22 movq %rax, %rbx jmp 0x4af39 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4aefb movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x19408 movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x4af39 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18bc0 nop
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aInvalidIterato; "invalid_iterator" lea rdx, aInvalidIterato+10h; "" lea rdi, [rsp+0C8h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_4AE45 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AE45: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4AE60 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AE60: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_4AE77 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AE77: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_4AEAB mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AEAB: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_4AF39 mov rsi, [rsp+arg_10] jmp short loc_4AF31 mov rbx, rax jmp short loc_4AF22 mov rbx, rax jmp short loc_4AF39 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_4AEFB mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AEFB: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1 mov rbx, [r12] loc_4AF22: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_4AF39 mov rsi, [rsp+arg_30] loc_4AF31: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AF39: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, "invalid_iterator", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9); std::string::_M_append(v5, v12); std::string::_M_append(v5, *a3); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0014ad94: LEA RSI,[0x1abcf3] LEA RDX,[0x1abd03] LEA RDI,[RSP + 0x28] CALL 0x0011ded4 LAB_0014adac: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0013f3d0 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0014adeb: LEA RDI,[RSP + 0x8] CALL 0x00118a50 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0014ae45 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001186a0 LAB_0014ae45: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0014ae60 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001186a0 LAB_0014ae60: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0014ae77 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_0014ae77: MOV RDX,qword ptr [RSP + 0x8] LAB_0014ae7c: MOV RDI,RBX MOV ESI,EBP CALL 0x0013f5cc LAB_0014ae86: LEA RAX,[0x1dc408] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0014aeab MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0014aeab: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 0014ad94 to 0014adab has its CatchHandler @ 0014aed9 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator",""); /* try { // try from 0014adac to 0014adbc has its CatchHandler @ 0014aed4 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0014adeb to 0014ae2d has its CatchHandler @ 0014aede */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0014ae7c to 0014ae85 has its CatchHandler @ 0014aec0 */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_001dc418; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
61,923
ft_init_nlq_search
eloqsql/storage/myisam/ft_nlq_search.c
FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query, uint query_len, uint flags, uchar *record) { TREE wtree; ALL_IN_ONE aio; FT_DOC *dptr; FT_INFO *dlist=NULL; my_off_t saved_lastpos=info->lastpos; struct st_mysql_ftparser *parser; MYSQL_FTPARSER_PARAM *ftparser_param; DBUG_ENTER("ft_init_nlq_search"); /* black magic ON */ if ((int) (keynr = _mi_check_index(info,keynr)) < 0) DBUG_RETURN(NULL); if (_mi_readinfo(info,F_RDLCK,1)) DBUG_RETURN(NULL); /* black magic OFF */ aio.info=info; aio.keynr=keynr; aio.charset=info->s->keyinfo[keynr].seg->charset; aio.keybuff=info->lastkey+info->s->base.max_key_length; parser= info->s->keyinfo[keynr].parser; if (! (ftparser_param= ftparser_call_initializer(info, keynr, 0))) goto err; bzero(&wtree,sizeof(wtree)); init_tree(&aio.dtree,0,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp, NULL, NULL, MYF(0)); ft_parse_init(&wtree, aio.charset); ftparser_param->flags= 0; if (ft_parse(&wtree, query, query_len, parser, ftparser_param, &wtree.mem_root)) goto err; if (tree_walk(&wtree, (tree_walk_action)&walk_and_match, &aio, left_root_right)) goto err; if (flags & FT_EXPAND && ft_query_expansion_limit) { QUEUE best; init_queue(&best,ft_query_expansion_limit,0,0, (queue_compare) &FT_DOC_cmp, 0, 0, 0); tree_walk(&aio.dtree, (tree_walk_action) &walk_and_push, &best, left_root_right); while (best.elements) { my_off_t docid= ((FT_DOC *)queue_remove_top(&best))->dpos; if (!(*info->read_record)(info,docid,record)) { info->update|= HA_STATE_AKTIV; ftparser_param->flags= MYSQL_FTFLAGS_NEED_COPY; if (unlikely(_mi_ft_parse(&wtree, info, keynr, record, ftparser_param, &wtree.mem_root))) { delete_queue(&best); goto err; } } } delete_queue(&best); reset_tree(&aio.dtree); if (tree_walk(&wtree, (tree_walk_action)&walk_and_match, &aio, left_root_right)) goto err; } /* If ndocs == 0, this will not allocate RAM for FT_INFO.doc[], so if ndocs == 0, FT_INFO.doc[] must not be accessed. */ dlist=(FT_INFO *)my_malloc(mi_key_memory_FT_INFO, sizeof(FT_INFO)+ sizeof(FT_DOC)* (int)(aio.dtree.elements_in_tree-1), MYF(0)); if (!dlist) goto err; dlist->please= (struct _ft_vft *) & _ft_vft_nlq; dlist->ndocs=aio.dtree.elements_in_tree; dlist->curdoc=-1; dlist->info=aio.info; dptr=dlist->doc; tree_walk(&aio.dtree, (tree_walk_action) &walk_and_copy, &dptr, left_root_right); if (flags & FT_SORTED) my_qsort2(dlist->doc, dlist->ndocs, sizeof(FT_DOC), (qsort2_cmp)&FT_DOC_cmp, 0); err: delete_tree(&aio.dtree, 0); delete_tree(&wtree, 0); info->lastpos=saved_lastpos; DBUG_RETURN(dlist); }
O3
c
ft_init_nlq_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x5b8, %rsp # imm = 0x5B8 movq %r9, -0x50(%rbp) movl %r8d, -0x2c(%rbp) movl %ecx, %r12d movq %rdx, %r15 movq %rdi, %rbx movq 0x170(%rdi), %r14 callq 0x859b8 testl %eax, %eax js 0x7482c movl %eax, %r13d movq %r14, -0x48(%rbp) xorl %r14d, %r14d movq %rbx, %rdi xorl %esi, %esi movl $0x1, %edx callq 0x7e1b3 testl %eax, %eax jne 0x748f7 movq %rbx, -0x338(%rbp) movl %r13d, -0x330(%rbp) movq (%rbx), %rax movq 0x218(%rax), %rcx movl %r13d, %edx imulq $0x70, %rdx, %rdx movq 0x28(%rcx,%rdx), %rsi movq (%rsi), %rsi movq %rsi, -0x328(%rbp) movl 0x194(%rax), %eax addq 0x108(%rbx), %rax movq %rax, -0x320(%rbp) movq 0x38(%rcx,%rdx), %rax movq %rax, -0x40(%rbp) xorl %r14d, %r14d movq %rbx, %rdi movl %r13d, %esi xorl %edx, %edx callq 0x758ad testq %rax, %rax je 0x748d0 leaq -0x5d0(%rbp), %rdi xorl %r14d, %r14d movl $0x298, %edx # imm = 0x298 xorl %esi, %esi movq %rax, -0x38(%rbp) callq 0x29270 leaq -0x318(%rbp), %rdi xorps %xmm0, %xmm0 movups %xmm0, (%rsp) leaq 0x275(%rip), %r8 # 0x7491a xorl %esi, %esi xorl %edx, %edx movl $0x20, %ecx xorl %r9d, %r9d callq 0xa5cb8 leaq -0x318(%rbp), %rax movq -0x10(%rax), %rsi leaq -0x5d0(%rbp), %rdi callq 0x7569e movq -0x38(%rbp), %rax movl $0x0, 0x34(%rax) leaq -0x398(%rbp), %r9 leaq -0x5d0(%rbp), %rdi movq %r15, %rsi movq %rax, %r15 movl %r12d, %edx movq -0x40(%rbp), %rcx movq %rax, %r8 callq 0x756ee testl %eax, %eax jne 0x748d0 leaq 0x229(%rip), %rsi # 0x74933 leaq -0x5d0(%rbp), %rdi leaq -0x338(%rbp), %rdx xorl %r14d, %r14d xorl %ecx, %ecx callq 0xa6947 testl %eax, %eax jne 0x748d0 movl -0x2c(%rbp), %eax shrb $0x2, %al leaq 0x310ad9(%rip), %rcx # 0x385210 movq (%rcx), %rsi testq %rsi, %rsi setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x74834 xorl %r12d, %r12d movl %r12d, 0x8(%rsp) movl %r12d, (%rsp) leaq 0x77a(%rip), %r8 # 0x74ed8 leaq -0x80(%rbp), %r14 movq %r14, %rdi xorl %edx, %edx xorl %ecx, %ecx xorl %r9d, %r9d callq 0xa36c8 leaq 0x78d(%rip), %rsi # 0x74f05 leaq -0x318(%rbp), %rdi movq %r14, %rdx xorl %ecx, %ecx callq 0xa6947 cmpl %r12d, 0x10(%r14) movq -0x50(%rbp), %r12 je 0x747ef movq %r14, %rdi movl $0x1, %esi callq 0xa391a movq (%rax), %rsi movq %rbx, %rdi movq %r12, %rdx callq *0x140(%rbx) testl %eax, %eax jne 0x747e9 orb $0x2, 0x1d0(%rbx) movq %r15, %r8 movl $0x1, 0x34(%r15) leaq -0x5d0(%rbp), %rdi movq %rbx, %rsi movl %r13d, %edx movq %r12, %rcx leaq -0x398(%rbp), %r9 callq 0x75b2a testl %eax, %eax jne 0x7490c cmpl $0x0, -0x70(%rbp) jne 0x74793 leaq -0x80(%rbp), %rdi callq 0xa37f0 leaq -0x318(%rbp), %rdi callq 0xa5eb9 leaq 0x128(%rip), %rsi # 0x74933 leaq -0x5d0(%rbp), %rdi leaq -0x338(%rbp), %rdx xorl %ecx, %ecx callq 0xa6947 testl %eax, %eax je 0x74834 xorl %r14d, %r14d jmp 0x748d0 xorl %r14d, %r14d jmp 0x748f7 leaq 0xb8d1d5(%rip), %rax # 0xc01a10 movl (%rax), %edi movl -0x10c(%rbp), %eax decl %eax movslq %eax, %rsi shlq $0x4, %rsi addq $0x28, %rsi xorl %r14d, %r14d xorl %edx, %edx callq 0xa1359 testq %rax, %rax leaq -0x318(%rbp), %rdi je 0x748d0 movq %rax, %r15 leaq 0x307c90(%rip), %rax # 0x37c500 movq %rax, (%r15) movl -0x10c(%rbp), %eax movl %eax, 0x10(%r15) movl $0xffffffff, 0x14(%r15) # imm = 0xFFFFFFFF movq -0x338(%rbp), %rax movq %rax, 0x8(%r15) movq %r15, %r14 addq $0x18, %r14 leaq -0x80(%rbp), %rdx movq %r14, (%rdx) leaq 0x6a3(%rip), %rsi # 0x74f48 xorl %ecx, %ecx callq 0xa6947 testb $0x2, -0x2c(%rbp) je 0x748cd movslq 0x10(%r15), %rsi leaq 0x61b(%rip), %rcx # 0x74ed8 movl $0x10, %edx movq %r14, %rdi xorl %r8d, %r8d callq 0x9d4d8 movq %r15, %r14 leaq -0x318(%rbp), %rdi xorl %esi, %esi callq 0xa5de2 leaq -0x5d0(%rbp), %rdi xorl %esi, %esi callq 0xa5de2 movq -0x48(%rbp), %rax movq %rax, 0x170(%rbx) movq %r14, %rax addq $0x5b8, %rsp # imm = 0x5B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x80(%rbp), %rdi callq 0xa37f0 jmp 0x74824
ft_init_nlq_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 5B8h mov [rbp+var_50], r9 mov [rbp+var_2C], r8d mov r12d, ecx mov r15, rdx mov rbx, rdi mov r14, [rdi+170h] call _mi_check_index test eax, eax js loc_7482C mov r13d, eax mov [rbp+var_48], r14 xor r14d, r14d mov rdi, rbx xor esi, esi mov edx, 1 call _mi_readinfo test eax, eax jnz loc_748F7 mov [rbp+var_338], rbx mov [rbp+var_330], r13d mov rax, [rbx] mov rcx, [rax+218h] mov edx, r13d imul rdx, 70h ; 'p' mov rsi, [rcx+rdx+28h] mov rsi, [rsi] mov [rbp+var_328], rsi mov eax, [rax+194h] add rax, [rbx+108h] mov [rbp+var_320], rax mov rax, [rcx+rdx+38h] mov [rbp+var_40], rax xor r14d, r14d mov rdi, rbx mov esi, r13d xor edx, edx call ftparser_call_initializer test rax, rax jz loc_748D0 lea rdi, [rbp+var_5D0] xor r14d, r14d mov edx, 298h xor esi, esi mov [rbp+var_38], rax call _memset lea rdi, [rbp+var_318] xorps xmm0, xmm0 movups [rsp+5E0h+var_5E0], xmm0 lea r8, FT_SUPERDOC_cmp xor esi, esi xor edx, edx mov ecx, 20h ; ' ' xor r9d, r9d call init_tree lea rax, [rbp+var_318] mov rsi, [rax-10h] lea rdi, [rbp+var_5D0] call ft_parse_init mov rax, [rbp+var_38] mov dword ptr [rax+34h], 0 lea r9, [rbp+var_398] lea rdi, [rbp+var_5D0] mov rsi, r15 mov r15, rax mov edx, r12d mov rcx, [rbp+var_40] mov r8, rax call ft_parse test eax, eax jnz loc_748D0 lea rsi, walk_and_match lea rdi, [rbp+var_5D0] lea rdx, [rbp+var_338] xor r14d, r14d xor ecx, ecx call tree_walk test eax, eax jnz loc_748D0 mov eax, [rbp+var_2C] shr al, 2 lea rcx, ft_query_expansion_limit mov rsi, [rcx] test rsi, rsi setnz cl and cl, al cmp cl, 1 jnz loc_74834 xor r12d, r12d mov dword ptr [rsp+5E0h+var_5E0+8], r12d mov dword ptr [rsp+5E0h+var_5E0], r12d lea r8, FT_DOC_cmp lea r14, [rbp+var_80] mov rdi, r14 xor edx, edx xor ecx, ecx xor r9d, r9d call init_queue lea rsi, walk_and_push lea rdi, [rbp+var_318] mov rdx, r14 xor ecx, ecx call tree_walk cmp [r14+10h], r12d mov r12, [rbp+var_50] jz short loc_747EF loc_74793: mov rdi, r14 mov esi, 1 call queue_remove mov rsi, [rax] mov rdi, rbx mov rdx, r12 call qword ptr [rbx+140h] test eax, eax jnz short loc_747E9 or byte ptr [rbx+1D0h], 2 mov r8, r15 mov dword ptr [r15+34h], 1 lea rdi, [rbp+var_5D0] mov rsi, rbx mov edx, r13d mov rcx, r12 lea r9, [rbp+var_398] call _mi_ft_parse test eax, eax jnz loc_7490C loc_747E9: cmp [rbp+var_70], 0 jnz short loc_74793 loc_747EF: lea rdi, [rbp+var_80] call delete_queue lea rdi, [rbp+var_318] call reset_tree lea rsi, walk_and_match lea rdi, [rbp+var_5D0] lea rdx, [rbp+var_338] xor ecx, ecx call tree_walk test eax, eax jz short loc_74834 loc_74824: xor r14d, r14d jmp loc_748D0 loc_7482C: xor r14d, r14d jmp loc_748F7 loc_74834: lea rax, mi_key_memory_FT_INFO mov edi, [rax] mov eax, [rbp+var_10C] dec eax movsxd rsi, eax shl rsi, 4 add rsi, 28h ; '(' xor r14d, r14d xor edx, edx call my_malloc test rax, rax lea rdi, [rbp+var_318] jz short loc_748D0 mov r15, rax lea rax, _ft_vft_nlq mov [r15], rax mov eax, [rbp+var_10C] mov [r15+10h], eax mov dword ptr [r15+14h], 0FFFFFFFFh mov rax, [rbp+var_338] mov [r15+8], rax mov r14, r15 add r14, 18h lea rdx, [rbp+var_80] mov [rdx], r14 lea rsi, walk_and_copy_0 xor ecx, ecx call tree_walk test byte ptr [rbp+var_2C], 2 jz short loc_748CD movsxd rsi, dword ptr [r15+10h] lea rcx, FT_DOC_cmp mov edx, 10h mov rdi, r14 xor r8d, r8d call my_qsort2 loc_748CD: mov r14, r15 loc_748D0: lea rdi, [rbp+var_318] xor esi, esi call delete_tree lea rdi, [rbp+var_5D0] xor esi, esi call delete_tree mov rax, [rbp+var_48] mov [rbx+170h], rax loc_748F7: mov rax, r14 add rsp, 5B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7490C: lea rdi, [rbp+var_80] call delete_queue jmp loc_74824
long long ft_init_nlq_search( long long *a1, long long a2, long long a3, unsigned int a4, int a5, long long a6, double a7) { long long v9; // r14 int v10; // eax unsigned int v11; // r13d long long v12; // r14 long long v13; // rax long long v14; // rcx long long v15; // rdx long long v16; // rax long long v17; // rax long long v18; // rsi long long v19; // r15 long long v20; // r12 _QWORD *v21; // rax long long v22; // rax long long v23; // r15 _BYTE v25[568]; // [rsp+10h] [rbp-5D0h] BYREF _BYTE v26[96]; // [rsp+248h] [rbp-398h] BYREF long long *v27; // [rsp+2A8h] [rbp-338h] BYREF unsigned int v28; // [rsp+2B0h] [rbp-330h] long long v29; // [rsp+2B8h] [rbp-328h] long long v30; // [rsp+2C0h] [rbp-320h] _BYTE v31[524]; // [rsp+2C8h] [rbp-318h] BYREF int v32; // [rsp+4D4h] [rbp-10Ch] _QWORD v33[2]; // [rsp+560h] [rbp-80h] BYREF int v34; // [rsp+570h] [rbp-70h] long long v35; // [rsp+590h] [rbp-50h] long long v36; // [rsp+598h] [rbp-48h] long long v37; // [rsp+5A0h] [rbp-40h] long long v38; // [rsp+5A8h] [rbp-38h] int v39; // [rsp+5B4h] [rbp-2Ch] v35 = a6; v39 = a5; v9 = a1[46]; v10 = mi_check_index(a1, a2); if ( v10 < 0 ) return 0LL; v11 = v10; v36 = v9; v12 = 0LL; if ( !(unsigned int)mi_readinfo(a1, 0LL, 1LL) ) { v27 = a1; v28 = v11; v13 = *a1; v14 = *(_QWORD *)(*a1 + 536); v15 = 112LL * v11; v29 = **(_QWORD **)(v14 + v15 + 40); v30 = a1[33] + *(unsigned int *)(v13 + 404); v37 = *(_QWORD *)(v14 + v15 + 56); v12 = 0LL; v16 = ftparser_call_initializer(a1, v11, 0LL, a7); if ( !v16 ) goto LABEL_18; v12 = 0LL; v38 = v16; memset(v25, 0LL, 664LL); init_tree((unsigned int)v31, 0, 0, 32, (unsigned int)FT_SUPERDOC_cmp, 0, 0LL, 0LL); ft_parse_init(v25, v29); v17 = v38; *(_DWORD *)(v38 + 52) = 0; v18 = a3; v19 = v17; if ( (unsigned int)ft_parse(v25, v18, a4, v37, v17, v26) ) goto LABEL_18; v12 = 0LL; if ( (unsigned int)tree_walk(v25, walk_and_match, &v27, 0LL) ) goto LABEL_18; if ( (((unsigned __int8)v39 >> 2) & (ft_query_expansion_limit != 0LL)) == 1 ) { init_queue((unsigned int)v33, ft_query_expansion_limit, 0, 0, (unsigned int)FT_DOC_cmp, 0, 0, 0); tree_walk(v31, walk_and_push, v33, 0LL); v20 = v35; if ( v34 ) { while ( 1 ) { v21 = (_QWORD *)queue_remove(v33, 1LL); if ( !((unsigned int ( *)(long long *, _QWORD, long long))a1[40])(a1, *v21, v20) ) { *((_BYTE *)a1 + 464) |= 2u; *(_DWORD *)(v19 + 52) = 1; if ( (unsigned int)mi_ft_parse(v25, a1, v11, v20, v19, v26) ) break; } if ( !v34 ) goto LABEL_11; } delete_queue(v33); goto LABEL_12; } LABEL_11: delete_queue(v33); reset_tree(v31); if ( (unsigned int)tree_walk(v25, walk_and_match, &v27, 0LL) ) { LABEL_12: v12 = 0LL; LABEL_18: delete_tree(v31, 0LL); delete_tree(v25, 0LL); a1[46] = v36; return v12; } } v12 = 0LL; v22 = my_malloc(mi_key_memory_FT_INFO, 16LL * (v32 - 1) + 40, 0LL); if ( v22 ) { v23 = v22; *(_QWORD *)v22 = ft_vft_nlq; *(_DWORD *)(v22 + 16) = v32; *(_DWORD *)(v22 + 20) = -1; *(_QWORD *)(v22 + 8) = v27; v33[0] = v22 + 24; tree_walk(v31, walk_and_copy_0, v33, 0LL); if ( (v39 & 2) != 0 ) my_qsort2(v23 + 24, *(int *)(v23 + 16), 16LL, FT_DOC_cmp, 0LL); v12 = v23; } goto LABEL_18; } return v12; }
ft_init_nlq_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x5b8 MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [RBP + -0x2c],R8D MOV R12D,ECX MOV R15,RDX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x170] CALL 0x001859b8 TEST EAX,EAX JS 0x0017482c MOV R13D,EAX MOV qword ptr [RBP + -0x48],R14 XOR R14D,R14D MOV RDI,RBX XOR ESI,ESI MOV EDX,0x1 CALL 0x0017e1b3 TEST EAX,EAX JNZ 0x001748f7 MOV qword ptr [RBP + -0x338],RBX MOV dword ptr [RBP + -0x330],R13D MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0x218] MOV EDX,R13D IMUL RDX,RDX,0x70 MOV RSI,qword ptr [RCX + RDX*0x1 + 0x28] MOV RSI,qword ptr [RSI] MOV qword ptr [RBP + -0x328],RSI MOV EAX,dword ptr [RAX + 0x194] ADD RAX,qword ptr [RBX + 0x108] MOV qword ptr [RBP + -0x320],RAX MOV RAX,qword ptr [RCX + RDX*0x1 + 0x38] MOV qword ptr [RBP + -0x40],RAX XOR R14D,R14D MOV RDI,RBX MOV ESI,R13D XOR EDX,EDX CALL 0x001758ad TEST RAX,RAX JZ 0x001748d0 LEA RDI,[RBP + -0x5d0] XOR R14D,R14D MOV EDX,0x298 XOR ESI,ESI MOV qword ptr [RBP + -0x38],RAX CALL 0x00129270 LEA RDI,[RBP + -0x318] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 LEA R8,[0x17491a] XOR ESI,ESI XOR EDX,EDX MOV ECX,0x20 XOR R9D,R9D CALL 0x001a5cb8 LEA RAX,[RBP + -0x318] MOV RSI,qword ptr [RAX + -0x10] LEA RDI,[RBP + -0x5d0] CALL 0x0017569e MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x34],0x0 LEA R9,[RBP + -0x398] LEA RDI,[RBP + -0x5d0] MOV RSI,R15 MOV R15,RAX MOV EDX,R12D MOV RCX,qword ptr [RBP + -0x40] MOV R8,RAX CALL 0x001756ee TEST EAX,EAX JNZ 0x001748d0 LEA RSI,[0x174933] LEA RDI,[RBP + -0x5d0] LEA RDX,[RBP + -0x338] XOR R14D,R14D XOR ECX,ECX CALL 0x001a6947 TEST EAX,EAX JNZ 0x001748d0 MOV EAX,dword ptr [RBP + -0x2c] SHR AL,0x2 LEA RCX,[0x485210] MOV RSI,qword ptr [RCX] TEST RSI,RSI SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x00174834 XOR R12D,R12D MOV dword ptr [RSP + 0x8],R12D MOV dword ptr [RSP],R12D LEA R8,[0x174ed8] LEA R14,[RBP + -0x80] MOV RDI,R14 XOR EDX,EDX XOR ECX,ECX XOR R9D,R9D CALL 0x001a36c8 LEA RSI,[0x174f05] LEA RDI,[RBP + -0x318] MOV RDX,R14 XOR ECX,ECX CALL 0x001a6947 CMP dword ptr [R14 + 0x10],R12D MOV R12,qword ptr [RBP + -0x50] JZ 0x001747ef LAB_00174793: MOV RDI,R14 MOV ESI,0x1 CALL 0x001a391a MOV RSI,qword ptr [RAX] MOV RDI,RBX MOV RDX,R12 CALL qword ptr [RBX + 0x140] TEST EAX,EAX JNZ 0x001747e9 OR byte ptr [RBX + 0x1d0],0x2 MOV R8,R15 MOV dword ptr [R15 + 0x34],0x1 LEA RDI,[RBP + -0x5d0] MOV RSI,RBX MOV EDX,R13D MOV RCX,R12 LEA R9,[RBP + -0x398] CALL 0x00175b2a TEST EAX,EAX JNZ 0x0017490c LAB_001747e9: CMP dword ptr [RBP + -0x70],0x0 JNZ 0x00174793 LAB_001747ef: LEA RDI,[RBP + -0x80] CALL 0x001a37f0 LEA RDI,[RBP + -0x318] CALL 0x001a5eb9 LEA RSI,[0x174933] LEA RDI,[RBP + -0x5d0] LEA RDX,[RBP + -0x338] XOR ECX,ECX CALL 0x001a6947 TEST EAX,EAX JZ 0x00174834 LAB_00174824: XOR R14D,R14D JMP 0x001748d0 LAB_0017482c: XOR R14D,R14D JMP 0x001748f7 LAB_00174834: LEA RAX,[0xd01a10] MOV EDI,dword ptr [RAX] MOV EAX,dword ptr [RBP + -0x10c] DEC EAX MOVSXD RSI,EAX SHL RSI,0x4 ADD RSI,0x28 XOR R14D,R14D XOR EDX,EDX CALL 0x001a1359 TEST RAX,RAX LEA RDI,[RBP + -0x318] JZ 0x001748d0 MOV R15,RAX LEA RAX,[0x47c500] MOV qword ptr [R15],RAX MOV EAX,dword ptr [RBP + -0x10c] MOV dword ptr [R15 + 0x10],EAX MOV dword ptr [R15 + 0x14],0xffffffff MOV RAX,qword ptr [RBP + -0x338] MOV qword ptr [R15 + 0x8],RAX MOV R14,R15 ADD R14,0x18 LEA RDX,[RBP + -0x80] MOV qword ptr [RDX],R14 LEA RSI,[0x174f48] XOR ECX,ECX CALL 0x001a6947 TEST byte ptr [RBP + -0x2c],0x2 JZ 0x001748cd MOVSXD RSI,dword ptr [R15 + 0x10] LEA RCX,[0x174ed8] MOV EDX,0x10 MOV RDI,R14 XOR R8D,R8D CALL 0x0019d4d8 LAB_001748cd: MOV R14,R15 LAB_001748d0: LEA RDI,[RBP + -0x318] XOR ESI,ESI CALL 0x001a5de2 LEA RDI,[RBP + -0x5d0] XOR ESI,ESI CALL 0x001a5de2 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBX + 0x170],RAX LAB_001748f7: MOV RAX,R14 ADD RSP,0x5b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017490c: LEA RDI,[RBP + -0x80] CALL 0x001a37f0 JMP 0x00174824
int8 * ft_init_nlq_search(long *param_1,int8 param_2,int8 param_3,int4 param_4, uint param_5,int8 param_6) { int8 uVar1; uint uVar2; int iVar3; long lVar4; int8 *puVar5; int8 *puVar6; ulong uVar7; ulong uVar8; int1 local_5d8 [568]; int1 local_3a0 [96]; long *local_340; uint local_338; int8 local_330; long local_328; int1 local_320 [524]; int local_114; int8 *local_88 [2]; int local_78; int8 local_58; long local_50; int8 local_48; long local_40; uint local_34; lVar4 = param_1[0x2e]; local_58 = param_6; local_34 = param_5; uVar2 = _mi_check_index(); if ((int)uVar2 < 0) { puVar5 = (int8 *)0x0; } else { puVar5 = (int8 *)0x0; local_50 = lVar4; iVar3 = _mi_readinfo(param_1,0,1); if (iVar3 == 0) { lVar4 = *(long *)(*param_1 + 0x218); local_330 = **(int8 **)(lVar4 + 0x28 + (ulong)uVar2 * 0x70); local_328 = (ulong)*(uint *)(*param_1 + 0x194) + param_1[0x21]; local_48 = *(int8 *)(lVar4 + 0x38 + (ulong)uVar2 * 0x70); local_340 = param_1; local_338 = uVar2; lVar4 = ftparser_call_initializer(param_1,uVar2,0); puVar5 = (int8 *)0x0; if (lVar4 != 0) { local_40 = lVar4; memset(local_5d8,0,0x298); uVar7 = 0; uVar8 = 0; init_tree(local_320,0,0,0x20,FT_SUPERDOC_cmp,0,0,0); ft_parse_init(local_5d8,local_330); lVar4 = local_40; *(int4 *)(local_40 + 0x34) = 0; iVar3 = ft_parse(local_5d8,param_3,param_4,local_48,local_40,local_3a0); puVar5 = (int8 *)0x0; if (iVar3 == 0) { iVar3 = tree_walk(local_5d8,walk_and_match,&local_340,0); puVar5 = (int8 *)0x0; if (iVar3 == 0) { if ((ft_query_expansion_limit != 0 & (byte)local_34 >> 2) == 1) { init_queue(local_88,ft_query_expansion_limit,0,0,FT_DOC_cmp,0, uVar7 & 0xffffffff00000000,uVar8 & 0xffffffff00000000); tree_walk(local_320,walk_and_push,local_88,0); uVar1 = local_58; do { do { if (local_78 == 0) { delete_queue(local_88); reset_tree(local_320); iVar3 = tree_walk(local_5d8,walk_and_match,&local_340,0); if (iVar3 == 0) goto LAB_00174834; goto LAB_00174824; } puVar5 = (int8 *)queue_remove(local_88,1); iVar3 = (*(code *)param_1[0x28])(param_1,*puVar5,uVar1); } while (iVar3 != 0); *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2; *(int4 *)(lVar4 + 0x34) = 1; iVar3 = _mi_ft_parse(local_5d8,param_1,uVar2,uVar1,lVar4,local_3a0); } while (iVar3 == 0); delete_queue(local_88); LAB_00174824: puVar5 = (int8 *)0x0; } else { LAB_00174834: puVar6 = (int8 *) my_malloc(mi_key_memory_FT_INFO,(long)(local_114 + -1) * 0x10 + 0x28,0); puVar5 = (int8 *)0x0; if (puVar6 != (int8 *)0x0) { *puVar6 = _ft_vft_nlq; *(int *)(puVar6 + 2) = local_114; *(int4 *)((long)puVar6 + 0x14) = 0xffffffff; puVar6[1] = local_340; local_88[0] = puVar6 + 3; tree_walk(local_320,walk_and_copy,local_88,0); puVar5 = puVar6; if ((local_34 & 2) != 0) { my_qsort2(puVar6 + 3,(long)*(int *)(puVar6 + 2),0x10,FT_DOC_cmp,0); } } } } } } delete_tree(local_320,0); delete_tree(local_5d8,0); param_1[0x2e] = local_50; } } return puVar5; }
61,924
ma_alloc_dynamic
eloqsql/libmariadb/libmariadb/ma_array.c
unsigned char *ma_alloc_dynamic(DYNAMIC_ARRAY *array) { if (array->elements == array->max_element) { char *new_ptr; if (!(new_ptr=(char*) realloc(array->buffer,(array->max_element+ array->alloc_increment)* array->size_of_element))) return 0; array->buffer=new_ptr; array->max_element+=array->alloc_increment; } return (unsigned char *)array->buffer+(array->elements++ * array->size_of_element); }
O3
c
ma_alloc_dynamic: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movl 0x8(%rdi), %eax movq (%rdi), %rdi cmpl 0xc(%rbx), %eax jne 0x34a71 addl 0x10(%rbx), %eax imull 0x14(%rbx), %eax movq %rax, %rsi callq 0x13730 testq %rax, %rax je 0x34a85 movq %rax, %rdi movq %rax, (%rbx) movl 0x8(%rbx), %eax movl 0x10(%rbx), %ecx addl %ecx, 0xc(%rbx) leal 0x1(%rax), %ecx movl %ecx, 0x8(%rbx) imull 0x14(%rbx), %eax addq %rdi, %rax addq $0x8, %rsp popq %rbx popq %rbp retq xorl %eax, %eax jmp 0x34a7e
ma_alloc_dynamic: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov eax, [rdi+8] mov rdi, [rdi] cmp eax, [rbx+0Ch] jnz short loc_34A71 add eax, [rbx+10h] imul eax, [rbx+14h] mov rsi, rax call _realloc test rax, rax jz short loc_34A85 mov rdi, rax mov [rbx], rax mov eax, [rbx+8] mov ecx, [rbx+10h] add [rbx+0Ch], ecx loc_34A71: lea ecx, [rax+1] mov [rbx+8], ecx imul eax, [rbx+14h] add rax, rdi loc_34A7E: add rsp, 8 pop rbx pop rbp retn loc_34A85: xor eax, eax jmp short loc_34A7E
long long ma_alloc_dynamic(long long a1) { int v2; // eax long long v3; // rdi long long v4; // rax v2 = *(_DWORD *)(a1 + 8); v3 = *(_QWORD *)a1; if ( v2 == *(_DWORD *)(a1 + 12) ) { v4 = realloc(v3, (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 16) + v2))); if ( !v4 ) return 0LL; v3 = v4; *(_QWORD *)a1 = v4; v2 = *(_DWORD *)(a1 + 8); *(_DWORD *)(a1 + 12) += *(_DWORD *)(a1 + 16); } *(_DWORD *)(a1 + 8) = v2 + 1; return v3 + (unsigned int)(*(_DWORD *)(a1 + 20) * v2); }
ma_alloc_dynamic: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI] CMP EAX,dword ptr [RBX + 0xc] JNZ 0x00134a71 ADD EAX,dword ptr [RBX + 0x10] IMUL EAX,dword ptr [RBX + 0x14] MOV RSI,RAX CALL 0x00113730 TEST RAX,RAX JZ 0x00134a85 MOV RDI,RAX MOV qword ptr [RBX],RAX MOV EAX,dword ptr [RBX + 0x8] MOV ECX,dword ptr [RBX + 0x10] ADD dword ptr [RBX + 0xc],ECX LAB_00134a71: LEA ECX,[RAX + 0x1] MOV dword ptr [RBX + 0x8],ECX IMUL EAX,dword ptr [RBX + 0x14] ADD RAX,RDI LAB_00134a7e: ADD RSP,0x8 POP RBX POP RBP RET LAB_00134a85: XOR EAX,EAX JMP 0x00134a7e
long ma_alloc_dynamic(int8 *param_1) { int iVar1; void *__ptr; iVar1 = *(int *)(param_1 + 1); __ptr = (void *)*param_1; if (iVar1 == *(int *)((long)param_1 + 0xc)) { __ptr = realloc(__ptr,(ulong)(uint)((iVar1 + *(int *)(param_1 + 2)) * *(int *)((long)param_1 + 0x14))); if (__ptr == (void *)0x0) { return 0; } *param_1 = __ptr; iVar1 = *(int *)(param_1 + 1); *(int *)((long)param_1 + 0xc) = *(int *)((long)param_1 + 0xc) + *(int *)(param_1 + 2); } *(int *)(param_1 + 1) = iVar1 + 1; return (ulong)(uint)(iVar1 * *(int *)((long)param_1 + 0x14)) + (long)__ptr; }
61,925
ResultCaptureNode::prep(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&)
The-Pocket[P]PocketFlow-CPP/main.cpp
int prep(Context& ctx) override { // Get value from context, provide default if missing auto it = ctx.find("currentValue"); if (it != ctx.end()) { try { return std::any_cast<int>(it->second); } catch(const std::bad_any_cast& ) { // Handle error or return default } } return -999; // Default if not found or bad cast }
O1
cpp
ResultCaptureNode::prep(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 leaq 0x10(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0xa56(%rip), %rsi # 0x11130 leaq 0xa5b(%rip), %rdx # 0x1113c movq %rsp, %rdi callq 0x90e4 movq %rsp, %rsi movq %r14, %rdi callq 0x10f22 movq %rax, %r15 movq (%rsp), %rdi cmpq %rbx, %rdi je 0x1070d movq 0x10(%rsp), %rsi incq %rsi callq 0x5180 addq $0x8, %r14 movl $0xfffffc19, %ebx # imm = 0xFFFFFC19 cmpq %r14, %r15 je 0x1072e addq $0x40, %r15 movq %r15, %rdi callq 0x9352 testq %rax, %rax je 0x1073a movl (%rax), %ebx movl %ebx, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq callq 0x9327 movq %rax, %r14 cmpl $0x2, %edx jne 0x1077c movq %r14, %rdi callq 0x50c0 callq 0x5270 jmp 0x1072e movq %rax, %rdi callq 0x6fa1 movq %rax, %r14 movq (%rsp), %rdi cmpq %rbx, %rdi je 0x1077c movq 0x10(%rsp), %rsi incq %rsi callq 0x5180 jmp 0x1077c movq %rax, %r14 movq %r14, %rdi callq 0x52a0
_ZN17ResultCaptureNode4prepERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4lessIS6_ESaISt4pairIKS6_S7_EEE: push r15 push r14 push rbx sub rsp, 20h mov r14, rsi lea rbx, [rsp+38h+var_28] mov [rbx-10h], rbx lea rsi, aCurrentvalue; "currentValue" lea rdx, aCurrentvalue+0Ch; "" 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 rsi, rsp mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St3anyESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::any>,std::_Select1st<std::pair<std::string const,std::any>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::any>>>::find(std::string const&) mov r15, rax mov rdi, [rsp+38h+var_38]; void * cmp rdi, rbx jz short loc_1070D mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1070D: add r14, 8 mov ebx, 0FFFFFC19h cmp r15, r14 jz short loc_1072E add r15, 40h ; '@' mov rdi, r15; this call _ZSt12__any_casterIiEPvPKSt3any; std::__any_caster<int>(std::any const*) test rax, rax jz short loc_1073A mov ebx, [rax] loc_1072E: mov eax, ebx add rsp, 20h pop rbx pop r14 pop r15 retn loc_1073A: call _ZSt20__throw_bad_any_castv; std::__throw_bad_any_cast(void) mov r14, rax cmp edx, 2 jnz short loc_1077C mov rdi, r14; void * call ___cxa_begin_catch call ___cxa_end_catch jmp short loc_1072E mov rdi, rax call __clang_call_terminate mov r14, rax mov rdi, [rsp+38h+var_38]; void * cmp rdi, rbx jz short loc_1077C mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1077C mov r14, rax loc_1077C: mov rdi, r14 call __Unwind_Resume
long long ResultCaptureNode::prep(long long a1, long long a2) { long long v2; // r15 unsigned int v3; // ebx unsigned int *v4; // rax void *v6[2]; // [rsp+0h] [rbp-38h] BYREF _QWORD v7[5]; // [rsp+10h] [rbp-28h] BYREF v6[0] = v7; std::string::_M_construct<char const*>(v6, "currentValue", (long long)""); v2 = std::_Rb_tree<std::string,std::pair<std::string const,std::any>,std::_Select1st<std::pair<std::string const,std::any>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::any>>>::find( a2, v6); if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); v3 = -999; if ( v2 != a2 + 8 ) { v4 = (unsigned int *)std::__any_caster<int>((std::any *)(v2 + 64)); if ( !v4 ) std::__throw_bad_any_cast(); return *v4; } return v3; }
prep: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RSI LEA RBX,[RSP + 0x10] MOV qword ptr [RBX + -0x10],RBX LAB_001106d3: LEA RSI,[0x111130] LEA RDX,[0x11113c] MOV RDI,RSP CALL 0x001090e4 LAB_001106e9: MOV RSI,RSP MOV RDI,R14 CALL 0x00110f22 MOV R15,RAX MOV RDI,qword ptr [RSP] CMP RDI,RBX JZ 0x0011070d MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105180 LAB_0011070d: ADD R14,0x8 MOV EBX,0xfffffc19 CMP R15,R14 JZ 0x0011072e ADD R15,0x40 LAB_0011071f: MOV RDI,R15 CALL 0x00109352 TEST RAX,RAX JZ 0x0011073a MOV EBX,dword ptr [RAX] LAB_0011072e: MOV EAX,EBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_0011073a: CALL 0x00109327 LAB_0011073f: MOV R14,RAX CMP EDX,0x2 JNZ 0x0011077c MOV RDI,R14 CALL 0x001050c0 CALL 0x00105270 JMP 0x0011072e LAB_0011077c: MOV RDI,R14 CALL 0x001052a0
/* ResultCaptureNode::prep(std::map<std::__cxx11::string, std::any, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::any> > >&) */ int4 __thiscall ResultCaptureNode::prep(ResultCaptureNode *this,map *param_1) { map *pmVar1; int4 *puVar2; int4 uVar3; int1 auVar4 [12]; long *local_38 [2]; long local_28 [2]; local_38[0] = local_28; /* try { // try from 001106d3 to 001106e8 has its CatchHandler @ 00110779 */ std::__cxx11::string::_M_construct<char_const*>((string *)local_38,"currentValue",""); /* try { // try from 001106e9 to 001106f3 has its CatchHandler @ 0011075e */ pmVar1 = (map *)std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::any>,std::_Select1st<std::pair<std::__cxx11::string_const,std::any>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::any>,std::_Select1st<std::pair<std::__cxx11::string_const,std::any>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> *)param_1,(string *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } uVar3 = 0xfffffc19; if (pmVar1 != param_1 + 8) { /* try { // try from 0011071f to 00110726 has its CatchHandler @ 00110756 */ puVar2 = (int4 *)std::__any_caster<int>((any *)(pmVar1 + 0x40)); if (puVar2 == (int4 *)0x0) { /* try { // try from 0011073a to 0011073e has its CatchHandler @ 0011073f */ auVar4 = std::__throw_bad_any_cast(); /* catch(type#2 @ 001171b0, ) { ... } // from try @ 0011073a with catch @ 0011073f */ if (auVar4._8_4_ != 2) { /* WARNING: Subroutine does not return */ _Unwind_Resume(auVar4._0_8_); } __cxa_begin_catch(auVar4._0_8_); __cxa_end_catch(); } else { uVar3 = *puVar2; } } return uVar3; }
61,926
ResultCaptureNode::prep(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&)
The-Pocket[P]PocketFlow-CPP/main.cpp
int prep(Context& ctx) override { // Get value from context, provide default if missing auto it = ctx.find("currentValue"); if (it != ctx.end()) { try { return std::any_cast<int>(it->second); } catch(const std::bad_any_cast& ) { // Handle error or return default } } return -999; // Default if not found or bad cast }
O2
cpp
ResultCaptureNode::prep(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 leaq 0xf09(%rip), %rsi # 0xe114 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x61be leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0xd8cc movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x50e0 addq $0x8, %r14 movl $0xfffffc19, %ebx # imm = 0xFFFFFC19 cmpq %r14, %r15 je 0xd250 addq $0x40, %r15 movq %r15, %rdi callq 0x6439 movl %eax, %ebx movl %ebx, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 cmpl $0x1, %edx jne 0xd285 movq %r14, %rdi callq 0x50c0 callq 0x52a0 jmp 0xd250 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x50e0 jmp 0xd285 movq %rax, %r14 movq %r14, %rdi callq 0x52d0 nop
_ZN17ResultCaptureNode4prepERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4lessIS6_ESaISt4pairIKS6_S7_EEE: push r15 push r14 push rbx sub rsp, 30h mov r14, rsi lea rsi, aCurrentvalue; "currentValue" lea rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+48h+var_38] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St3anyESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::any>,std::_Select1st<std::pair<std::string const,std::any>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::any>>>::find(std::string const&) mov r15, rax lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add r14, 8 mov ebx, 0FFFFFC19h cmp r15, r14 jz short loc_D250 add r15, 40h ; '@' mov rdi, r15 call _ZSt8any_castIiET_RSt3any; std::any_cast<int>(std::any &) mov ebx, eax loc_D250: mov eax, ebx add rsp, 30h pop rbx pop r14 pop r15 retn mov r14, rax cmp edx, 1 jnz short loc_D285 mov rdi, r14; void * call ___cxa_begin_catch call ___cxa_end_catch jmp short loc_D250 mov r14, rax lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_D285 mov r14, rax loc_D285: mov rdi, r14 call __Unwind_Resume
long long ResultCaptureNode::prep(long long a1, long long a2) { long long v2; // r15 unsigned int v3; // ebx _QWORD v5[7]; // [rsp+10h] [rbp-38h] BYREF std::string::basic_string<std::allocator<char>>(v5, (long long)"currentValue"); v2 = std::_Rb_tree<std::string,std::pair<std::string const,std::any>,std::_Select1st<std::pair<std::string const,std::any>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::any>>>::find( a2, v5); std::string::~string(v5); v3 = -999; if ( v2 != a2 + 8 ) return (unsigned int)std::any_cast<int>(v2 + 64); return v3; }
prep: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI LAB_0010d204: LEA RSI,[0x10e114] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x001061be LAB_0010d21a: LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x0010d8cc MOV R15,RAX LEA RDI,[RSP + 0x10] CALL 0x001050e0 ADD R14,0x8 MOV EBX,0xfffffc19 CMP R15,R14 JZ 0x0010d250 ADD R15,0x40 LAB_0010d246: MOV RDI,R15 CALL 0x00106439 LAB_0010d24e: MOV EBX,EAX LAB_0010d250: MOV EAX,EBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ResultCaptureNode::prep(std::map<std::__cxx11::string, std::any, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::any> > >&) */ int __thiscall ResultCaptureNode::prep(ResultCaptureNode *this,map *param_1) { int iVar1; map *pmVar2; allocator local_39; string local_38 [32]; /* try { // try from 0010d204 to 0010d219 has its CatchHandler @ 0010d282 */ std::__cxx11::string::string<std::allocator<char>>(local_38,"currentValue",&local_39); /* try { // try from 0010d21a to 0010d226 has its CatchHandler @ 0010d273 */ pmVar2 = (map *)std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::any>,std::_Select1st<std::pair<std::__cxx11::string_const,std::any>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::any>,std::_Select1st<std::pair<std::__cxx11::string_const,std::any>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> *)param_1,local_38); std::__cxx11::string::~string(local_38); iVar1 = -999; if (pmVar2 != param_1 + 8) { /* try { // try from 0010d246 to 0010d24d has its CatchHandler @ 0010d25c */ iVar1 = std::any_cast<int>((any *)(pmVar2 + 0x40)); } return iVar1; }
61,927
ResultCaptureNode::prep(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&)
The-Pocket[P]PocketFlow-CPP/main.cpp
int prep(Context& ctx) override { // Get value from context, provide default if missing auto it = ctx.find("currentValue"); if (it != ctx.end()) { try { return std::any_cast<int>(it->second); } catch(const std::bad_any_cast& ) { // Handle error or return default } } return -999; // Default if not found or bad cast }
O3
cpp
ResultCaptureNode::prep(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::any, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::any>>>&): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 leaq 0x10(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0xb38(%rip), %rsi # 0x11130 leaq 0xb3d(%rip), %rdx # 0x1113c movq %rsp, %rdi callq 0x9030 movq %rsp, %rsi movq %r14, %rdi callq 0x10e88 movq %rax, %r15 movq (%rsp), %rdi cmpq %rbx, %rdi je 0x1062b movq 0x10(%rsp), %rsi incq %rsi callq 0x5180 addq $0x8, %r14 movl $0xfffffc19, %ebx # imm = 0xFFFFFC19 cmpq %r14, %r15 je 0x1064c addq $0x40, %r15 movq %r15, %rdi callq 0x92a4 testq %rax, %rax je 0x10658 movl (%rax), %ebx movl %ebx, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq callq 0x9279 movq %rax, %r14 cmpl $0x2, %edx jne 0x1069a movq %r14, %rdi callq 0x50c0 callq 0x5270 jmp 0x1064c movq %rax, %rdi callq 0x6f35 movq %rax, %r14 movq (%rsp), %rdi cmpq %rbx, %rdi je 0x1069a movq 0x10(%rsp), %rsi incq %rsi callq 0x5180 jmp 0x1069a movq %rax, %r14 movq %r14, %rdi callq 0x52a0
_ZN17ResultCaptureNode4prepERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4lessIS6_ESaISt4pairIKS6_S7_EEE: push r15 push r14 push rbx sub rsp, 20h mov r14, rsi lea rbx, [rsp+38h+var_28] mov [rbx-10h], rbx lea rsi, aCurrentvalue; "currentValue" lea rdx, aCurrentvalue+0Ch; "" 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 rsi, rsp mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St3anyESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::any>,std::_Select1st<std::pair<std::string const,std::any>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::any>>>::find(std::string const&) mov r15, rax mov rdi, [rsp+38h+var_38]; void * cmp rdi, rbx jz short loc_1062B mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1062B: add r14, 8 mov ebx, 0FFFFFC19h cmp r15, r14 jz short loc_1064C add r15, 40h ; '@' mov rdi, r15; this call _ZSt12__any_casterIiEPvPKSt3any; std::__any_caster<int>(std::any const*) test rax, rax jz short loc_10658 mov ebx, [rax] loc_1064C: mov eax, ebx add rsp, 20h pop rbx pop r14 pop r15 retn loc_10658: call _ZSt20__throw_bad_any_castv; std::__throw_bad_any_cast(void) mov r14, rax cmp edx, 2 jnz short loc_1069A mov rdi, r14; void * call ___cxa_begin_catch call ___cxa_end_catch jmp short loc_1064C mov rdi, rax call __clang_call_terminate mov r14, rax mov rdi, [rsp+38h+var_38]; void * cmp rdi, rbx jz short loc_1069A mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1069A mov r14, rax loc_1069A: mov rdi, r14 call __Unwind_Resume
long long ResultCaptureNode::prep(long long a1, long long a2) { long long v2; // r15 unsigned int v3; // ebx unsigned int *v4; // rax void *v6[2]; // [rsp+0h] [rbp-38h] BYREF _QWORD v7[5]; // [rsp+10h] [rbp-28h] BYREF v6[0] = v7; std::string::_M_construct<char const*>((long long)v6, "currentValue", (long long)""); v2 = std::_Rb_tree<std::string,std::pair<std::string const,std::any>,std::_Select1st<std::pair<std::string const,std::any>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::any>>>::find( a2, v6); if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); v3 = -999; if ( v2 != a2 + 8 ) { v4 = (unsigned int *)std::__any_caster<int>((std::any *)(v2 + 64)); if ( !v4 ) std::__throw_bad_any_cast(); return *v4; } return v3; }
prep: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RSI LEA RBX,[RSP + 0x10] MOV qword ptr [RBX + -0x10],RBX LAB_001105f1: LEA RSI,[0x111130] LEA RDX,[0x11113c] MOV RDI,RSP CALL 0x00109030 LAB_00110607: MOV RSI,RSP MOV RDI,R14 CALL 0x00110e88 MOV R15,RAX MOV RDI,qword ptr [RSP] CMP RDI,RBX JZ 0x0011062b MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105180 LAB_0011062b: ADD R14,0x8 MOV EBX,0xfffffc19 CMP R15,R14 JZ 0x0011064c ADD R15,0x40 LAB_0011063d: MOV RDI,R15 CALL 0x001092a4 TEST RAX,RAX JZ 0x00110658 MOV EBX,dword ptr [RAX] LAB_0011064c: MOV EAX,EBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_00110658: CALL 0x00109279 LAB_0011065d: MOV R14,RAX CMP EDX,0x2 JNZ 0x0011069a MOV RDI,R14 CALL 0x001050c0 CALL 0x00105270 JMP 0x0011064c LAB_0011069a: MOV RDI,R14 CALL 0x001052a0
/* ResultCaptureNode::prep(std::map<std::__cxx11::string, std::any, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::any> > >&) */ int4 __thiscall ResultCaptureNode::prep(ResultCaptureNode *this,map *param_1) { map *pmVar1; int4 *puVar2; int4 uVar3; int1 auVar4 [12]; long *local_38 [2]; long local_28 [2]; local_38[0] = local_28; /* try { // try from 001105f1 to 00110606 has its CatchHandler @ 00110697 */ std::__cxx11::string::_M_construct<char_const*>((string *)local_38,"currentValue",""); /* try { // try from 00110607 to 00110611 has its CatchHandler @ 0011067c */ pmVar1 = (map *)std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::any>,std::_Select1st<std::pair<std::__cxx11::string_const,std::any>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::any>,std::_Select1st<std::pair<std::__cxx11::string_const,std::any>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> *)param_1,(string *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } uVar3 = 0xfffffc19; if (pmVar1 != param_1 + 8) { /* try { // try from 0011063d to 00110644 has its CatchHandler @ 00110674 */ puVar2 = (int4 *)std::__any_caster<int>((any *)(pmVar1 + 0x40)); if (puVar2 == (int4 *)0x0) { /* try { // try from 00110658 to 0011065c has its CatchHandler @ 0011065d */ auVar4 = std::__throw_bad_any_cast(); /* catch(type#2 @ 001171e8, ) { ... } // from try @ 00110658 with catch @ 0011065d */ if (auVar4._8_4_ != 2) { /* WARNING: Subroutine does not return */ _Unwind_Resume(auVar4._0_8_); } __cxa_begin_catch(auVar4._0_8_); __cxa_end_catch(); } else { uVar3 = *puVar2; } } return uVar3; }
61,928
google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*, int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
CopyingInputStreamAdaptor::CopyingInputStreamAdaptor( CopyingInputStream* copying_stream, int block_size) : copying_stream_(copying_stream), owns_copying_stream_(false), failed_(false), position_(0), buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize), buffer_used_(0), backup_bytes_(0) {}
O3
cpp
google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*, int): leaq 0x17f003(%rip), %rax # 0x27b878 movq %rax, (%rdi) movq %rsi, 0x8(%rdi) movw $0x0, 0x10(%rdi) testl %edx, %edx movl $0x2000, %eax # imm = 0x2000 cmovgl %edx, %eax xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rdi) movl %eax, 0x28(%rdi) movq $0x0, 0x2c(%rdi) retq nop
_ZN6google8protobuf2io25CopyingInputStreamAdaptorC2EPNS1_18CopyingInputStreamEi: lea rax, off_27B878 mov [rdi], rax mov [rdi+8], rsi mov word ptr [rdi+10h], 0 test edx, edx mov eax, 2000h cmovg eax, edx xorps xmm0, xmm0 movups xmmword ptr [rdi+18h], xmm0 mov [rdi+28h], eax mov qword ptr [rdi+2Ch], 0 retn
long long google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor( google::protobuf::io::CopyingInputStreamAdaptor *this, google::protobuf::io::CopyingInputStream *a2, int a3) { long long result; // rax *(_QWORD *)this = off_27B878; *((_QWORD *)this + 1) = a2; *((_WORD *)this + 8) = 0; result = 0x2000LL; if ( a3 > 0 ) result = (unsigned int)a3; *(_OWORD *)((char *)this + 24) = 0LL; *((_DWORD *)this + 10) = result; *(_QWORD *)((char *)this + 44) = 0LL; return result; }
CopyingInputStreamAdaptor: LEA RAX,[0x37b878] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],RSI MOV word ptr [RDI + 0x10],0x0 TEST EDX,EDX MOV EAX,0x2000 CMOVG EAX,EDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOV dword ptr [RDI + 0x28],EAX MOV qword ptr [RDI + 0x2c],0x0 RET
/* google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor(google::protobuf::io::CopyingInputStream*, int) */ void __thiscall google::protobuf::io::CopyingInputStreamAdaptor::CopyingInputStreamAdaptor (CopyingInputStreamAdaptor *this,CopyingInputStream *param_1,int param_2) { int iVar1; *(int ***)this = &PTR__CopyingInputStreamAdaptor_0037b878; *(CopyingInputStream **)(this + 8) = param_1; *(int2 *)(this + 0x10) = 0; iVar1 = 0x2000; if (0 < param_2) { iVar1 = param_2; } *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int *)(this + 0x28) = iVar1; *(int8 *)(this + 0x2c) = 0; return; }
61,929
handler::disable_pushed_rowid_filter()
eloqsql/sql/handler.h
virtual void disable_pushed_rowid_filter() { DBUG_ASSERT(pushed_rowid_filter != NULL && save_pushed_rowid_filter == NULL); save_pushed_rowid_filter= pushed_rowid_filter; if (rowid_filter_is_active) save_rowid_filter_is_active= rowid_filter_is_active; pushed_rowid_filter= NULL; rowid_filter_is_active= false; }
O0
c
handler::disable_pushed_rowid_filter(): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x9102 movq -0x10(%rbp), %rax movq 0x430(%rax), %rcx movq %rcx, 0x440(%rax) testb $0x1, 0x438(%rax) je 0x9130 movq -0x10(%rbp), %rax movb 0x438(%rax), %cl andb $0x1, %cl movb %cl, 0x448(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x430(%rax) movb $0x0, 0x438(%rax) popq %rbp retq nopl (%rax,%rax)
_ZN7handler27disable_pushed_rowid_filterEv: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short $+2 loc_9102: mov rax, [rbp+var_10] mov rcx, [rax+430h] mov [rax+440h], rcx test byte ptr [rax+438h], 1 jz short loc_9130 mov rax, [rbp+var_10] mov cl, [rax+438h] and cl, 1 mov [rax+448h], cl loc_9130: mov rax, [rbp+var_10] mov qword ptr [rax+430h], 0 mov byte ptr [rax+438h], 0 pop rbp retn
handler * handler::disable_pushed_rowid_filter(handler *this) { handler *result; // rax *((_QWORD *)this + 136) = *((_QWORD *)this + 134); if ( (*((_BYTE *)this + 1080) & 1) != 0 ) *((_BYTE *)this + 1096) = *((_BYTE *)this + 1080) & 1; result = this; *((_QWORD *)this + 134) = 0LL; *((_BYTE *)this + 1080) = 0; return result; }
disable_pushed_rowid_filter: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x00109102 LAB_00109102: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x430] MOV qword ptr [RAX + 0x440],RCX TEST byte ptr [RAX + 0x438],0x1 JZ 0x00109130 MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x438] AND CL,0x1 MOV byte ptr [RAX + 0x448],CL LAB_00109130: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x430],0x0 MOV byte ptr [RAX + 0x438],0x0 POP RBP RET
/* handler::disable_pushed_rowid_filter() */ void __thiscall handler::disable_pushed_rowid_filter(handler *this) { *(int8 *)(this + 0x440) = *(int8 *)(this + 0x430); if (((byte)this[0x438] & 1) != 0) { this[0x448] = (handler)((byte)this[0x438] & 1); } *(int8 *)(this + 0x430) = 0; this[0x438] = (handler)0x0; return; }
61,930
LexGetStringConstant
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/tool/lex.c
enum LexToken LexGetStringConstant(struct LexState *Lexer, struct Value *Value, char EndChar) { char *AccBuf = NULL; /* Accumulated buffer for the final merged string */ size_t AccAllocated = 0; /* How many bytes we've allocated for AccBuf so far */ size_t AccUsed = 0; /* How many bytes of AccBuf are actually used */ for (;;) { /* --------- Parse a single quoted chunk --------- */ int Escape = FALSE; const char *ChunkStart = Lexer->Pos; const char *ChunkEnd; while (Lexer->Pos != Lexer->End && (*Lexer->Pos != EndChar || Escape)) { if (Escape) { if (*Lexer->Pos == '\r' && (Lexer->Pos+1) != Lexer->End) Lexer->Pos++; if (*Lexer->Pos == '\n' && (Lexer->Pos+1) != Lexer->End) { Lexer->Line++; Lexer->Pos++; Lexer->CharacterPos = 0; } Escape = FALSE; } else if (*Lexer->Pos == '\\') { Escape = TRUE; } LEXER_INC(Lexer); } /* If we never found a closing quote, bail out */ if (Lexer->Pos == Lexer->End) { if (Lexer->cb->Error) Lexer->cb->Error(Lexer, ErrorSyntax, "unterminated string literal"); if (AccBuf) LEX_FREE(AccBuf); return TokenError; } ChunkEnd = Lexer->Pos; /* points to the quote character (or end) */ /* Allocate a buffer to hold the unescaped chunk */ /* The chunk length is (ChunkEnd - ChunkStart), but we allocate exactly that because we'll do actual growth on AccBuf, not on this temp. */ size_t rawLen = (size_t)(ChunkEnd - ChunkStart); char *EscBuf = (char*)LEX_MALLOC(rawLen); if (!EscBuf) { if (Lexer->cb->Error) Lexer->cb->Error(Lexer, ErrorMemory, "out of memory in string parse"); if (AccBuf) LEX_FREE(AccBuf); return TokenError; } /* Unescape into EscBuf */ { const char *p = ChunkStart; char *outp = EscBuf; while (p != ChunkEnd) { *outp++ = LexUnEscapeCharacter(&p, ChunkEnd); } rawLen = (size_t)(outp - EscBuf); /* actual length after unescaping */ } /* Now we append EscBuf into AccBuf. Let's do it the manual "expand if needed" way. */ { size_t needed = AccUsed + rawLen + 1; /* +1 for the final null terminator */ if (needed > AccAllocated) { /* We need to grow AccBuf. Let's pick a new size. Could just do `needed`, or some doubling strategy, e.g. max(needed, AccAllocated*2) for fewer allocations over time. */ size_t newAlloc = (AccAllocated == 0) ? needed : (AccAllocated * 2); if (newAlloc < needed) newAlloc = needed; /* Malloc a bigger chunk, copy from old if any, then free old. */ char *newBuf = (char*)LEX_MALLOC(newAlloc); if (!newBuf) { if (Lexer->cb->Error) Lexer->cb->Error(Lexer, ErrorMemory, "out of memory growing string buffer"); LEX_FREE(EscBuf); if (AccBuf) LEX_FREE(AccBuf); return TokenError; } /* copy existing data */ if (AccBuf) { memcpy(newBuf, AccBuf, AccUsed); LEX_FREE(AccBuf); } AccBuf = newBuf; AccAllocated = newAlloc; } /* Now copy this chunk in */ memcpy(AccBuf + AccUsed, EscBuf, rawLen); AccUsed += rawLen; AccBuf[AccUsed] = '\0'; } /* free the temporary buffer for the chunk */ LEX_FREE(EscBuf); /* Consume the closing quote if present */ if (*Lexer->Pos == EndChar) LEXER_INC(Lexer); /* --------- Check if there's another adjacent string --------- */ /* skip whitespace/newlines to see if there's another quote right after */ while (Lexer->Pos < Lexer->End && isspace((unsigned char)*Lexer->Pos)) { if (*Lexer->Pos == '\n') { Lexer->Line++; Lexer->CharacterPos = 0; } LEXER_INC(Lexer); } /* If next char != EndChar, we stop. */ if (Lexer->Pos >= Lexer->End || *Lexer->Pos != EndChar) break; /* Otherwise, there's another adjacent string chunk. Skip the opening quote and parse the next chunk in the loop. */ LEXER_INC(Lexer); } /* We have the final, merged string in AccBuf. Time to call GetString(). */ if (Lexer->cb->GetString && !Lexer->cb->GetString(Lexer, AccBuf, AccUsed, Value)) { LEX_FREE(AccBuf); if (Lexer->cb->Error) Lexer->cb->Error(Lexer, ErrorMemory, "out of memory storing final string"); return TokenError; } /* done! free our local buffer if the callback didn't store it internally */ LEX_FREE(AccBuf); return TokenStringConstant; }
O3
c
LexGetStringConstant: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %r14 movq (%rdi), %rbx movq 0x8(%rdi), %r15 cmpq %r15, %rbx je 0x89cf movl %edx, %r12d movq %rsi, -0x58(%rbp) xorl %r13d, %r13d movq $0x0, -0x48(%rbp) xorl %edi, %edi movq %r13, -0x30(%rbp) xorl %eax, %eax movq %rbx, %r13 movb (%r13), %cl cmpb %r12b, %cl sete %dl testl %eax, %eax sete %sil testb %dl, %sil jne 0x884b testl %eax, %eax je 0x8805 cmpb $0xd, %cl jne 0x880f leaq 0x1(%r13), %rdx cmpq %r15, %rdx je 0x8835 movq %rdx, (%r14) movb (%rdx), %cl jmp 0x8812 xorl %eax, %eax cmpb $0x5c, %cl sete %al jmp 0x8837 movq %r13, %rdx xorl %eax, %eax cmpb $0xa, %cl jne 0x8830 leaq 0x1(%rdx), %r13 cmpq %r15, %r13 je 0x8830 incl 0x10(%r14) movl $0x0, 0x14(%r14) jmp 0x8837 movq %rdx, %r13 jmp 0x8837 xorl %eax, %eax incq %r13 movq %r13, (%r14) incl 0x14(%r14) cmpq %r15, %r13 jne 0x87d7 jmp 0x89c9 movq %rdi, -0x40(%rbp) movl %r13d, %esi subl %ebx, %esi movl $0x1, %edi callq 0xd948 testq %rax, %rax je 0x8a7f movq %rbx, -0x50(%rbp) movq %rax, -0x38(%rbp) movq %rax, %r15 cmpq %r13, %rbx leaq -0x50(%rbp), %rbx je 0x8896 movq -0x38(%rbp), %r15 movq %rbx, %rdi movq %r13, %rsi callq 0x86a6 movb %al, (%r15) incq %r15 cmpq %r13, -0x50(%rbp) jne 0x887f movq -0x38(%rbp), %rbx subq %rbx, %r15 movq -0x40(%rbp), %rdi leaq (%r15,%rdi), %rax incq %rax movq -0x48(%rbp), %rcx cmpq %rcx, %rax jbe 0x890d testq %rcx, %rcx leaq (%rcx,%rcx), %rbx cmoveq %rax, %rbx cmpq %rax, %rbx cmovbeq %rax, %rbx movl $0x1, %edi movl %ebx, %esi callq 0xd948 testq %rax, %rax je 0x8a9f movq %rax, %r13 movq %rbx, -0x48(%rbp) movq -0x30(%rbp), %rbx testq %rbx, %rbx je 0x8913 movq %r13, %rdi movq %rbx, %rsi movq -0x40(%rbp), %rdx callq 0x6340 movl $0x1, %edi movq %rbx, %rsi callq 0xd999 movq -0x40(%rbp), %rdi movq %r13, %rax jmp 0x891a movq -0x30(%rbp), %rax jmp 0x891e movq %r13, %rax movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rbx leaq (%r15,%rdi), %r13 addq %rax, %rdi movq %rbx, %rsi movq %r15, %rdx movq %rax, %r15 callq 0x6340 movq %r13, -0x30(%rbp) movb $0x0, (%r15,%r13) movl $0x1, %edi movq %rbx, %rsi callq 0xd999 movq (%r14), %rbx cmpb %r12b, (%rbx) movq %r15, %r13 jne 0x895e incq %rbx movq %rbx, (%r14) incl 0x14(%r14) movq 0x8(%r14), %r15 cmpq %r15, %rbx jae 0x8a09 callq 0x65f0 movq %r15, %rcx subq %rbx, %rcx incq %rbx movq (%rax), %rsi movzbl -0x1(%rbx), %edx testb $0x20, 0x1(%rsi,%rdx,2) je 0x89ae cmpb $0xa, %dl jne 0x8997 incl 0x10(%r14) movl $0x1, %edx jmp 0x899d movl 0x14(%r14), %edx incl %edx movq %rbx, (%r14) movl %edx, 0x14(%r14) incq %rbx decq %rcx jne 0x8979 jmp 0x8a09 cmpb %r12b, %dl jne 0x8a09 movq %rbx, (%r14) incl 0x14(%r14) movq -0x30(%rbp), %rdi cmpq %r15, %rbx jne 0x87ce jmp 0x89d2 movq -0x30(%rbp), %r13 jmp 0x89d2 xorl %r13d, %r13d movq 0x18(%r14), %rax movq 0x28(%rax), %rax testq %rax, %rax je 0x89f0 leaq 0x1c4fe(%rip), %rdx # 0x24ee4 movq %r14, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq *%rax movl $0x3a, %ebx testq %r13, %r13 je 0x8a3c movl $0x1, %edi movq %r13, %rsi callq 0xd999 jmp 0x8a3c movq 0x18(%r14), %rax movq 0x10(%rax), %rax testq %rax, %rax je 0x8a2a movq %r14, %rdi movq %r13, %rsi movq -0x30(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax testl %eax, %eax je 0x8a4d movl $0x1, %edi movq %r13, %rsi callq 0xd999 movl $0x30, %ebx movl %ebx, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %edi movq %r13, %rsi callq 0xd999 movq 0x18(%r14), %rax movq 0x28(%rax), %rax movl $0x3a, %ebx testq %rax, %rax je 0x8a3c leaq 0x1c4cf(%rip), %rdx # 0x24f42 movq %r14, %rdi movl $0xfffffffc, %esi # imm = 0xFFFFFFFC callq *%rax jmp 0x8a3c movq 0x18(%r14), %rax movq 0x28(%rax), %rax testq %rax, %rax je 0x8acb leaq 0x1c46d(%rip), %rdx # 0x24f00 movq %r14, %rdi movl $0xfffffffc, %esi # imm = 0xFFFFFFFC callq *%rax jmp 0x8acb movq 0x18(%r14), %rax movq 0x28(%rax), %rax testq %rax, %rax je 0x8abd leaq 0x1c46b(%rip), %rdx # 0x24f1e movq %r14, %rdi movl $0xfffffffc, %esi # imm = 0xFFFFFFFC callq *%rax movl $0x1, %edi movq -0x38(%rbp), %rsi callq 0xd999 movl $0x3a, %ebx movq -0x30(%rbp), %rsi testq %rsi, %rsi je 0x8a3c movl $0x1, %edi jmp 0x8a02
LexGetStringConstant: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rdi mov rbx, [rdi] mov r15, [rdi+8] cmp rbx, r15 jz loc_89CF mov r12d, edx mov [rbp+var_58], rsi xor r13d, r13d mov [rbp+var_48], 0 xor edi, edi loc_87CE: mov [rbp+var_30], r13 xor eax, eax mov r13, rbx loc_87D7: mov cl, [r13+0] cmp cl, r12b setz dl test eax, eax setz sil test sil, dl jnz short loc_884B test eax, eax jz short loc_8805 cmp cl, 0Dh jnz short loc_880F lea rdx, [r13+1] cmp rdx, r15 jz short loc_8835 mov [r14], rdx mov cl, [rdx] jmp short loc_8812 loc_8805: xor eax, eax cmp cl, 5Ch ; '\' setz al jmp short loc_8837 loc_880F: mov rdx, r13 loc_8812: xor eax, eax cmp cl, 0Ah jnz short loc_8830 lea r13, [rdx+1] cmp r13, r15 jz short loc_8830 inc dword ptr [r14+10h] mov dword ptr [r14+14h], 0 jmp short loc_8837 loc_8830: mov r13, rdx jmp short loc_8837 loc_8835: xor eax, eax loc_8837: inc r13 mov [r14], r13 inc dword ptr [r14+14h] cmp r13, r15 jnz short loc_87D7 jmp loc_89C9 loc_884B: mov [rbp+var_40], rdi mov esi, r13d sub esi, ebx mov edi, 1 call engine_port_malloc test rax, rax jz loc_8A7F mov [rbp+var_50], rbx mov [rbp+var_38], rax mov r15, rax cmp rbx, r13 lea rbx, [rbp+var_50] jz short loc_8896 mov r15, [rbp+var_38] loc_887F: mov rdi, rbx mov rsi, r13 call LexUnEscapeCharacter mov [r15], al inc r15 cmp [rbp+var_50], r13 jnz short loc_887F loc_8896: mov rbx, [rbp+var_38] sub r15, rbx mov rdi, [rbp+var_40] lea rax, [r15+rdi] inc rax mov rcx, [rbp+var_48] cmp rax, rcx jbe short loc_890D test rcx, rcx lea rbx, [rcx+rcx] cmovz rbx, rax cmp rbx, rax cmovbe rbx, rax mov edi, 1 mov esi, ebx call engine_port_malloc test rax, rax jz loc_8A9F mov r13, rax mov [rbp+var_48], rbx mov rbx, [rbp+var_30] test rbx, rbx jz short loc_8913 mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_40] call _memcpy mov edi, 1 mov rsi, rbx call engine_port_free mov rdi, [rbp+var_40] mov rax, r13 jmp short loc_891A loc_890D: mov rax, [rbp+var_30] jmp short loc_891E loc_8913: mov rax, r13 mov rdi, [rbp+var_40] loc_891A: mov rbx, [rbp+var_38] loc_891E: lea r13, [r15+rdi] add rdi, rax mov rsi, rbx mov rdx, r15 mov r15, rax call _memcpy mov [rbp+var_30], r13 mov byte ptr [r15+r13], 0 mov edi, 1 mov rsi, rbx call engine_port_free mov rbx, [r14] cmp [rbx], r12b mov r13, r15 jnz short loc_895E inc rbx mov [r14], rbx inc dword ptr [r14+14h] loc_895E: mov r15, [r14+8] cmp rbx, r15 jnb loc_8A09 call ___ctype_b_loc mov rcx, r15 sub rcx, rbx inc rbx loc_8979: mov rsi, [rax] movzx edx, byte ptr [rbx-1] test byte ptr [rsi+rdx*2+1], 20h jz short loc_89AE cmp dl, 0Ah jnz short loc_8997 inc dword ptr [r14+10h] mov edx, 1 jmp short loc_899D loc_8997: mov edx, [r14+14h] inc edx loc_899D: mov [r14], rbx mov [r14+14h], edx inc rbx dec rcx jnz short loc_8979 jmp short loc_8A09 loc_89AE: cmp dl, r12b jnz short loc_8A09 mov [r14], rbx inc dword ptr [r14+14h] mov rdi, [rbp+var_30] cmp rbx, r15 jnz loc_87CE jmp short loc_89D2 loc_89C9: mov r13, [rbp+var_30] jmp short loc_89D2 loc_89CF: xor r13d, r13d loc_89D2: mov rax, [r14+18h] mov rax, [rax+28h] test rax, rax jz short loc_89F0 lea rdx, aUnterminatedSt; "unterminated string literal" mov rdi, r14 mov esi, 0FFFFFFFFh call rax loc_89F0: mov ebx, 3Ah ; ':' test r13, r13 jz short loc_8A3C mov edi, 1 mov rsi, r13 loc_8A02: call engine_port_free jmp short loc_8A3C loc_8A09: mov rax, [r14+18h] mov rax, [rax+10h] test rax, rax jz short loc_8A2A mov rdi, r14 mov rsi, r13 mov rdx, [rbp+var_30] mov rcx, [rbp+var_58] call rax test eax, eax jz short loc_8A4D loc_8A2A: mov edi, 1 mov rsi, r13 call engine_port_free mov ebx, 30h ; '0' loc_8A3C: mov eax, ebx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8A4D: mov edi, 1 mov rsi, r13 call engine_port_free mov rax, [r14+18h] mov rax, [rax+28h] mov ebx, 3Ah ; ':' test rax, rax jz short loc_8A3C lea rdx, aOutOfMemorySto; "out of memory storing final string" mov rdi, r14 mov esi, 0FFFFFFFCh call rax jmp short loc_8A3C loc_8A7F: mov rax, [r14+18h] mov rax, [rax+28h] test rax, rax jz short loc_8ACB lea rdx, aOutOfMemoryInS; "out of memory in string parse" mov rdi, r14 mov esi, 0FFFFFFFCh call rax jmp short loc_8ACB loc_8A9F: mov rax, [r14+18h] mov rax, [rax+28h] test rax, rax jz short loc_8ABD lea rdx, aOutOfMemoryGro; "out of memory growing string buffer" mov rdi, r14 mov esi, 0FFFFFFFCh call rax loc_8ABD: mov edi, 1 mov rsi, [rbp+var_38] call engine_port_free loc_8ACB: mov ebx, 3Ah ; ':' mov rsi, [rbp+var_30] test rsi, rsi jz loc_8A3C mov edi, 1 jmp loc_8A02
long long LexGetStringConstant(long long a1, long long a2, char a3, signed long long a4) { char *v5; // rbx char *v6; // r15 long long v8; // r13 long long v9; // rdi BOOL v10; // eax char *v11; // r13 char *v12; // rdx long long v13; // rax char *v14; // r15 long long v15; // rbx char *v16; // r15 long long v17; // rdi unsigned long long v18; // rax unsigned long long v19; // rbx long long v20; // rax long long v21; // r13 long long v22; // rbx char *v23; // r13 char *v24; // rdx long long v25; // r15 char *v26; // rbx _QWORD *v27; // rax long long v28; // rdx int v29; // edx void ( *v30)(long long, long long, char *, signed long long); // rax unsigned int v31; // ebx long long v32; // rsi unsigned int ( *v33)(long long, long long, long long, long long); // rax void ( *v35)(long long, long long, char *); // rax void ( *v36)(long long, long long, char *); // rax void ( *v37)(long long, long long, char *); // rax char *v38; // [rsp+10h] [rbp-50h] BYREF unsigned long long v39; // [rsp+18h] [rbp-48h] long long v40; // [rsp+20h] [rbp-40h] long long v41; // [rsp+28h] [rbp-38h] long long v42; // [rsp+30h] [rbp-30h] v5 = *(char **)a1; v6 = *(char **)(a1 + 8); if ( *(char **)a1 == v6 ) { v8 = 0LL; goto LABEL_47; } v8 = 0LL; v39 = 0LL; v9 = 0LL; do { v42 = v8; v10 = 0; v11 = v5; while ( 1 ) { LOBYTE(a4) = *v11; if ( *v11 == a3 && !v10 ) break; if ( v10 ) { if ( (_BYTE)a4 != 13 ) { v12 = v11; goto LABEL_11; } v12 = v11 + 1; if ( v11 + 1 != v6 ) { *(_QWORD *)a1 = v12; LOBYTE(a4) = *v12; LABEL_11: v10 = 0; if ( (_BYTE)a4 != 10 || (v11 = v12 + 1, v12 + 1 == v6) ) { v11 = v12; } else { ++*(_DWORD *)(a1 + 16); *(_DWORD *)(a1 + 20) = 0; } goto LABEL_16; } v10 = 0; } else { v10 = (_BYTE)a4 == 92; } LABEL_16: *(_QWORD *)a1 = ++v11; ++*(_DWORD *)(a1 + 20); if ( v11 == v6 ) { v8 = v42; goto LABEL_47; } } v40 = v9; v13 = engine_port_malloc(1LL, (unsigned int)((_DWORD)v11 - (_DWORD)v5)); if ( !v13 ) { v36 = *(void ( **)(long long, long long, char *))(*(_QWORD *)(a1 + 24) + 40LL); if ( v36 ) v36(a1, 4294967292LL, aOutOfMemoryInS); goto LABEL_63; } v38 = v5; v41 = v13; v14 = (char *)v13; if ( v5 != v11 ) { v14 = (char *)v41; do *v14++ = LexUnEscapeCharacter(&v38, (long long)v11); while ( v38 != v11 ); } v15 = v41; v16 = &v14[-v41]; v17 = v40; v18 = (unsigned long long)&v16[v40 + 1]; if ( v18 > v39 ) { v19 = 2 * v39; if ( !v39 ) v19 = (unsigned long long)&v16[v40 + 1]; if ( v19 <= v18 ) v19 = (unsigned long long)&v16[v40 + 1]; v20 = engine_port_malloc(1LL, (unsigned int)v19); if ( v20 ) { v21 = v20; v39 = v19; v22 = v42; if ( v42 ) { memcpy(v20, v42, v40); engine_port_free(1LL, v22); v17 = v40; v20 = v21; } else { v17 = v40; } v15 = v41; goto LABEL_33; } v37 = *(void ( **)(long long, long long, char *))(*(_QWORD *)(a1 + 24) + 40LL); if ( v37 ) v37(a1, 4294967292LL, aOutOfMemoryGro); engine_port_free(1LL, v41); LABEL_63: v31 = 58; v32 = v42; if ( v42 ) LABEL_51: engine_port_free(1LL, v32); return v31; } v20 = v42; LABEL_33: v23 = &v16[v17]; v24 = v16; v25 = v20; memcpy(v20 + v17, v15, v24); v42 = (long long)v23; v23[v25] = 0; engine_port_free(1LL, v15); v26 = *(char **)a1; v8 = v25; if ( **(_BYTE **)a1 == a3 ) { *(_QWORD *)a1 = ++v26; ++*(_DWORD *)(a1 + 20); } v6 = *(char **)(a1 + 8); if ( v26 >= v6 ) goto LABEL_52; v27 = (_QWORD *)__ctype_b_loc(); a4 = v6 - v26; v5 = v26 + 1; while ( 1 ) { v28 = (unsigned __int8)*(v5 - 1); if ( (*(_BYTE *)(*v27 + 2 * v28 + 1) & 0x20) == 0 ) break; if ( (_BYTE)v28 == 10 ) { ++*(_DWORD *)(a1 + 16); v29 = 1; } else { v29 = *(_DWORD *)(a1 + 20) + 1; } *(_QWORD *)a1 = v5; *(_DWORD *)(a1 + 20) = v29; ++v5; if ( !--a4 ) goto LABEL_52; } if ( (_BYTE)v28 != a3 ) { LABEL_52: v33 = *(unsigned int ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 24) + 16LL); if ( v33 && !v33(a1, v8, v42, a2) ) { engine_port_free(1LL, v8); v35 = *(void ( **)(long long, long long, char *))(*(_QWORD *)(a1 + 24) + 40LL); v31 = 58; if ( v35 ) v35(a1, 4294967292LL, aOutOfMemorySto); } else { engine_port_free(1LL, v8); return 48; } return v31; } *(_QWORD *)a1 = v5; ++*(_DWORD *)(a1 + 20); v9 = v42; } while ( v5 != v6 ); LABEL_47: v30 = *(void ( **)(long long, long long, char *, signed long long))(*(_QWORD *)(a1 + 24) + 40LL); if ( v30 ) v30(a1, 0xFFFFFFFFLL, aUnterminatedSt, a4); v31 = 58; if ( v8 ) { v32 = v8; goto LABEL_51; } return v31; }
LexGetStringConstant: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDI MOV RBX,qword ptr [RDI] MOV R15,qword ptr [RDI + 0x8] CMP RBX,R15 JZ 0x001089cf MOV R12D,EDX MOV qword ptr [RBP + -0x58],RSI XOR R13D,R13D MOV qword ptr [RBP + -0x48],0x0 XOR EDI,EDI LAB_001087ce: MOV qword ptr [RBP + -0x30],R13 XOR EAX,EAX MOV R13,RBX LAB_001087d7: MOV CL,byte ptr [R13] CMP CL,R12B SETZ DL TEST EAX,EAX SETZ SIL TEST SIL,DL JNZ 0x0010884b TEST EAX,EAX JZ 0x00108805 CMP CL,0xd JNZ 0x0010880f LEA RDX,[R13 + 0x1] CMP RDX,R15 JZ 0x00108835 MOV qword ptr [R14],RDX MOV CL,byte ptr [RDX] JMP 0x00108812 LAB_00108805: XOR EAX,EAX CMP CL,0x5c SETZ AL JMP 0x00108837 LAB_0010880f: MOV RDX,R13 LAB_00108812: XOR EAX,EAX CMP CL,0xa JNZ 0x00108830 LEA R13,[RDX + 0x1] CMP R13,R15 JZ 0x00108830 INC dword ptr [R14 + 0x10] MOV dword ptr [R14 + 0x14],0x0 JMP 0x00108837 LAB_00108830: MOV R13,RDX JMP 0x00108837 LAB_00108835: XOR EAX,EAX LAB_00108837: INC R13 MOV qword ptr [R14],R13 INC dword ptr [R14 + 0x14] CMP R13,R15 JNZ 0x001087d7 JMP 0x001089c9 LAB_0010884b: MOV qword ptr [RBP + -0x40],RDI MOV ESI,R13D SUB ESI,EBX MOV EDI,0x1 CALL 0x0010d948 TEST RAX,RAX JZ 0x00108a7f MOV qword ptr [RBP + -0x50],RBX MOV qword ptr [RBP + -0x38],RAX MOV R15,RAX CMP RBX,R13 LEA RBX,[RBP + -0x50] JZ 0x00108896 MOV R15,qword ptr [RBP + -0x38] LAB_0010887f: MOV RDI,RBX MOV RSI,R13 CALL 0x001086a6 MOV byte ptr [R15],AL INC R15 CMP qword ptr [RBP + -0x50],R13 JNZ 0x0010887f LAB_00108896: MOV RBX,qword ptr [RBP + -0x38] SUB R15,RBX MOV RDI,qword ptr [RBP + -0x40] LEA RAX,[R15 + RDI*0x1] INC RAX MOV RCX,qword ptr [RBP + -0x48] CMP RAX,RCX JBE 0x0010890d TEST RCX,RCX LEA RBX,[RCX + RCX*0x1] CMOVZ RBX,RAX CMP RBX,RAX CMOVBE RBX,RAX MOV EDI,0x1 MOV ESI,EBX CALL 0x0010d948 TEST RAX,RAX JZ 0x00108a9f MOV R13,RAX MOV qword ptr [RBP + -0x48],RBX MOV RBX,qword ptr [RBP + -0x30] TEST RBX,RBX JZ 0x00108913 MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x40] CALL 0x00106340 MOV EDI,0x1 MOV RSI,RBX CALL 0x0010d999 MOV RDI,qword ptr [RBP + -0x40] MOV RAX,R13 JMP 0x0010891a LAB_0010890d: MOV RAX,qword ptr [RBP + -0x30] JMP 0x0010891e LAB_00108913: MOV RAX,R13 MOV RDI,qword ptr [RBP + -0x40] LAB_0010891a: MOV RBX,qword ptr [RBP + -0x38] LAB_0010891e: LEA R13,[R15 + RDI*0x1] ADD RDI,RAX MOV RSI,RBX MOV RDX,R15 MOV R15,RAX CALL 0x00106340 MOV qword ptr [RBP + -0x30],R13 MOV byte ptr [R15 + R13*0x1],0x0 MOV EDI,0x1 MOV RSI,RBX CALL 0x0010d999 MOV RBX,qword ptr [R14] CMP byte ptr [RBX],R12B MOV R13,R15 JNZ 0x0010895e INC RBX MOV qword ptr [R14],RBX INC dword ptr [R14 + 0x14] LAB_0010895e: MOV R15,qword ptr [R14 + 0x8] CMP RBX,R15 JNC 0x00108a09 CALL 0x001065f0 MOV RCX,R15 SUB RCX,RBX INC RBX LAB_00108979: MOV RSI,qword ptr [RAX] MOVZX EDX,byte ptr [RBX + -0x1] TEST byte ptr [RSI + RDX*0x2 + 0x1],0x20 JZ 0x001089ae CMP DL,0xa JNZ 0x00108997 INC dword ptr [R14 + 0x10] MOV EDX,0x1 JMP 0x0010899d LAB_00108997: MOV EDX,dword ptr [R14 + 0x14] INC EDX LAB_0010899d: MOV qword ptr [R14],RBX MOV dword ptr [R14 + 0x14],EDX INC RBX DEC RCX JNZ 0x00108979 JMP 0x00108a09 LAB_001089ae: CMP DL,R12B JNZ 0x00108a09 MOV qword ptr [R14],RBX INC dword ptr [R14 + 0x14] MOV RDI,qword ptr [RBP + -0x30] CMP RBX,R15 JNZ 0x001087ce JMP 0x001089d2 LAB_001089c9: MOV R13,qword ptr [RBP + -0x30] JMP 0x001089d2 LAB_001089cf: XOR R13D,R13D LAB_001089d2: MOV RAX,qword ptr [R14 + 0x18] MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x001089f0 LEA RDX,[0x124ee4] MOV RDI,R14 MOV ESI,0xffffffff CALL RAX LAB_001089f0: MOV EBX,0x3a TEST R13,R13 JZ 0x00108a3c MOV EDI,0x1 MOV RSI,R13 LAB_00108a02: CALL 0x0010d999 JMP 0x00108a3c LAB_00108a09: MOV RAX,qword ptr [R14 + 0x18] MOV RAX,qword ptr [RAX + 0x10] TEST RAX,RAX JZ 0x00108a2a MOV RDI,R14 MOV RSI,R13 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x58] CALL RAX TEST EAX,EAX JZ 0x00108a4d LAB_00108a2a: MOV EDI,0x1 MOV RSI,R13 CALL 0x0010d999 MOV EBX,0x30 LAB_00108a3c: MOV EAX,EBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00108a4d: MOV EDI,0x1 MOV RSI,R13 CALL 0x0010d999 MOV RAX,qword ptr [R14 + 0x18] MOV RAX,qword ptr [RAX + 0x28] MOV EBX,0x3a TEST RAX,RAX JZ 0x00108a3c LEA RDX,[0x124f42] MOV RDI,R14 MOV ESI,0xfffffffc CALL RAX JMP 0x00108a3c LAB_00108a7f: MOV RAX,qword ptr [R14 + 0x18] MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x00108acb LEA RDX,[0x124f00] MOV RDI,R14 MOV ESI,0xfffffffc CALL RAX JMP 0x00108acb LAB_00108a9f: MOV RAX,qword ptr [R14 + 0x18] MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x00108abd LEA RDX,[0x124f1e] MOV RDI,R14 MOV ESI,0xfffffffc CALL RAX LAB_00108abd: MOV EDI,0x1 MOV RSI,qword ptr [RBP + -0x38] CALL 0x0010d999 LAB_00108acb: MOV EBX,0x3a MOV RSI,qword ptr [RBP + -0x30] TEST RSI,RSI JZ 0x00108a3c MOV EDI,0x1 JMP 0x00108a02
int8 LexGetStringConstant(long *param_1,int8 param_2,byte param_3) { byte *pbVar1; void *pvVar2; int1 uVar3; int iVar4; int1 *puVar5; ulong uVar6; void *__dest; ushort **ppuVar7; byte bVar8; long lVar9; ulong uVar10; byte *pbVar11; byte *pbVar12; byte *pbVar13; size_t __n; bool bVar14; byte *local_58; ulong local_50; void *local_48; int1 *local_40; void *local_38; pbVar11 = (byte *)*param_1; pbVar13 = (byte *)param_1[1]; if (pbVar11 == pbVar13) { __dest = (void *)0x0; pvVar2 = local_38; } else { __dest = (void *)0x0; local_50 = 0; local_38 = (void *)0x0; do { bVar14 = false; pbVar12 = pbVar11; while (bVar8 = *pbVar12, bVar14 || bVar8 != param_3) { if (bVar14) { if (bVar8 == 0xd) { pbVar1 = pbVar12 + 1; if (pbVar1 == pbVar13) { bVar14 = false; goto LAB_00108837; } *param_1 = (long)pbVar1; bVar8 = *pbVar1; pbVar12 = pbVar1; } bVar14 = false; if ((bVar8 == 10) && (pbVar12 + 1 != pbVar13)) { *(int *)(param_1 + 2) = (int)param_1[2] + 1; *(int4 *)((long)param_1 + 0x14) = 0; pbVar12 = pbVar12 + 1; } } else { bVar14 = bVar8 == 0x5c; } LAB_00108837: pbVar12 = pbVar12 + 1; *param_1 = (long)pbVar12; *(int *)((long)param_1 + 0x14) = *(int *)((long)param_1 + 0x14) + 1; pvVar2 = __dest; if (pbVar12 == pbVar13) goto LAB_001089d2; } local_48 = local_38; local_38 = __dest; puVar5 = (int1 *)engine_port_malloc(1,(int)pbVar12 - (int)pbVar11); if (puVar5 == (int1 *)0x0) { if (*(code **)(param_1[3] + 0x28) != (code *)0x0) { (**(code **)(param_1[3] + 0x28)) (param_1,0xfffffffc,s_out_of_memory_in_string_parse_00124f00); } LAB_00108acb: __dest = local_38; if (local_38 == (void *)0x0) { return 0x3a; } goto LAB_00108a02; } local_40 = puVar5; local_58 = pbVar11; __dest = local_38; while (local_38 = __dest, local_58 != pbVar12) { uVar3 = LexUnEscapeCharacter(&local_58,pbVar12); *puVar5 = uVar3; puVar5 = puVar5 + 1; __dest = local_38; } __n = (long)puVar5 - (long)local_40; uVar6 = (long)local_48 + __n + 1; if (local_50 < uVar6) { uVar10 = local_50 * 2; if (local_50 == 0) { uVar10 = uVar6; } if (uVar10 <= uVar6) { uVar10 = uVar6; } __dest = (void *)engine_port_malloc(1,uVar10 & 0xffffffff); pvVar2 = local_38; if (__dest == (void *)0x0) { if (*(code **)(param_1[3] + 0x28) != (code *)0x0) { (**(code **)(param_1[3] + 0x28)) (param_1,0xfffffffc,s_out_of_memory_growing_string_buf_00124f1e); } engine_port_free(1,local_40); goto LAB_00108acb; } local_50 = uVar10; if (local_38 != (void *)0x0) { memcpy(__dest,local_38,(size_t)local_48); engine_port_free(1,pvVar2); } } puVar5 = local_40; pvVar2 = (void *)(__n + (long)local_48); memcpy((void *)((long)local_48 + (long)__dest),local_40,__n); *(int1 *)((long)__dest + (long)pvVar2) = 0; local_38 = pvVar2; engine_port_free(1,puVar5); pbVar12 = (byte *)*param_1; if (*pbVar12 == param_3) { pbVar12 = pbVar12 + 1; *param_1 = (long)pbVar12; *(int *)((long)param_1 + 0x14) = *(int *)((long)param_1 + 0x14) + 1; } pbVar13 = (byte *)param_1[1]; if (pbVar13 <= pbVar12) { LAB_00108a09: if ((*(code **)(param_1[3] + 0x10) != (code *)0x0) && (iVar4 = (**(code **)(param_1[3] + 0x10))(param_1,__dest,local_38,param_2), iVar4 == 0)) { engine_port_free(1,__dest); if (*(code **)(param_1[3] + 0x28) == (code *)0x0) { return 0x3a; } (**(code **)(param_1[3] + 0x28)) (param_1,0xfffffffc,s_out_of_memory_storing_final_stri_00124f42); return 0x3a; } engine_port_free(1,__dest); return 0x30; } ppuVar7 = __ctype_b_loc(); lVar9 = (long)pbVar13 - (long)pbVar12; while( true ) { pbVar11 = pbVar12 + 1; bVar8 = *pbVar12; if ((*(byte *)((long)*ppuVar7 + (ulong)bVar8 * 2 + 1) & 0x20) == 0) break; if (bVar8 == 10) { *(int *)(param_1 + 2) = (int)param_1[2] + 1; iVar4 = 1; } else { iVar4 = *(int *)((long)param_1 + 0x14) + 1; } *param_1 = (long)pbVar11; *(int *)((long)param_1 + 0x14) = iVar4; lVar9 = lVar9 + -1; pbVar12 = pbVar11; if (lVar9 == 0) goto LAB_00108a09; } if (bVar8 != param_3) goto LAB_00108a09; *param_1 = (long)pbVar11; *(int *)((long)param_1 + 0x14) = *(int *)((long)param_1 + 0x14) + 1; pvVar2 = local_38; } while (pbVar11 != pbVar13); } LAB_001089d2: local_38 = pvVar2; if (*(code **)(param_1[3] + 0x28) != (code *)0x0) { (**(code **)(param_1[3] + 0x28))(param_1,0xffffffff,s_unterminated_string_literal_00124ee4); } if (__dest != (void *)0x0) { LAB_00108a02: engine_port_free(1,__dest); } return 0x3a; }
61,931
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::~iteration_proxy_value()
monkey531[P]llama/common/json.hpp
~iteration_proxy_value() = default;
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::~iteration_proxy_value(): pushq %rbx movq %rdi, %rbx movq 0x50(%rdi), %rdi leaq 0x60(%rbx), %rax cmpq %rax, %rdi je 0xafce4 movq (%rax), %rsi incq %rsi callq 0x1b910 movq 0x30(%rbx), %rdi addq $0x40, %rbx cmpq %rbx, %rdi je 0xafcfd movq (%rbx), %rsi incq %rsi popq %rbx jmp 0x1b910 popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev: push rbx mov rbx, rdi mov rdi, [rdi+50h]; void * lea rax, [rbx+60h] cmp rdi, rax jz short loc_AFCE4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AFCE4: mov rdi, [rbx+30h]; void * add rbx, 40h ; '@' cmp rdi, rbx jz short loc_AFCFD mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_AFCFD: pop rbx retn
void nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value( _QWORD *a1) { _QWORD *v2; // rdi _QWORD *v3; // rdi _QWORD *v4; // rbx v2 = (_QWORD *)a1[10]; if ( v2 != a1 + 12 ) operator delete(v2, a1[12] + 1LL); v3 = (_QWORD *)a1[6]; v4 = a1 + 8; if ( v3 != v4 ) operator delete(v3, *v4 + 1LL); }
~iteration_proxy_value: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x50] LEA RAX,[RBX + 0x60] CMP RDI,RAX JZ 0x001afce4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b910 LAB_001afce4: MOV RDI,qword ptr [RBX + 0x30] ADD RBX,0x40 CMP RDI,RBX JZ 0x001afcfd MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x0011b910 LAB_001afcfd: POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::~iteration_proxy_value() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::~iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this) { if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50) != this + 0x60) { operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50),*(long *)(this + 0x60) + 1); } if (*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x30) != this + 0x40) { operator_delete(*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x30),*(long *)(this + 0x40) + 1); return; } return; }
61,932
my_charpos_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_charpos_utf16(CHARSET_INFO *cs, const char *b, const char *e, size_t pos) { const char *b0= b; uint charlen; for ( ; pos; b+= charlen, pos--) { if (!(charlen= my_ismbchar(cs, b, e))) return (e + 2 - b0); /* Error, return pos outside the string */ } return (size_t) (pos ? (e + 2 - b0) : (b - b0)); }
O3
c
my_charpos_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rsi, %r12 testq %rcx, %rcx je 0x4f4c9 movq %rcx, %r15 movq %rdx, %r14 movq %rdi, %r13 movq %rbx, %r12 movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq *0xc0(%rax) cmpl $0x1, %eax jle 0x4f4c2 movl %eax, %eax addq %rax, %r12 decq %r15 jne 0x4f49b jmp 0x4f4c9 addq $0x2, %r14 movq %r14, %r12 subq %rbx, %r12 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r12, rsi test rcx, rcx jz short loc_4F4C9 mov r15, rcx mov r14, rdx mov r13, rdi mov r12, rbx loc_4F49B: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r14 call qword ptr [rax+0C0h] cmp eax, 1 jle short loc_4F4C2 mov eax, eax add r12, rax dec r15 jnz short loc_4F49B jmp short loc_4F4C9 loc_4F4C2: add r14, 2 mov r12, r14 loc_4F4C9: sub r12, rbx mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4) { long long v4; // r12 long long v5; // r15 int v7; // eax v4 = a2; if ( a4 ) { v5 = a4; v4 = a2; while ( 1 ) { v7 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v4, a3); if ( v7 <= 1 ) break; v4 += (unsigned int)v7; if ( !--v5 ) return v4 - a2; } v4 = a3 + 2; } return v4 - a2; }
my_charpos_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R12,RSI TEST RCX,RCX JZ 0x0014f4c9 MOV R15,RCX MOV R14,RDX MOV R13,RDI MOV R12,RBX LAB_0014f49b: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL qword ptr [RAX + 0xc0] CMP EAX,0x1 JLE 0x0014f4c2 MOV EAX,EAX ADD R12,RAX DEC R15 JNZ 0x0014f49b JMP 0x0014f4c9 LAB_0014f4c2: ADD R14,0x2 MOV R12,R14 LAB_0014f4c9: SUB R12,RBX MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_utf16(long param_1,long param_2,long param_3,long param_4) { uint uVar1; long lVar2; lVar2 = param_2; if (param_4 != 0) { do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,lVar2,param_3); if ((int)uVar1 < 2) { lVar2 = param_3 + 2; break; } lVar2 = lVar2 + (ulong)uVar1; param_4 = param_4 + -1; } while (param_4 != 0); } return lVar2 - param_2; }
61,933
Generator::gen_stmt(NodeStmt const*)
BhuvanGudi[P]LexiParse/src/generation.hpp
void gen_stmt(const NodeStmt* stmt) { struct StmtVisitor { Generator& gen; void operator()(const NodeStmtExit* stmt_exit) const { gen.m_output << " ;; exit\n"; gen.gen_expr(stmt_exit->expr); gen.m_output << " mov rax, 60\n"; gen.pop("rdi"); gen.m_output << " syscall\n"; gen.m_output << " ;; /exit\n"; } void operator()(const NodeStmtLet* stmt_let) const { gen.m_output << " ;; let\n"; if (std::ranges::find_if( std::as_const(gen.m_vars), [&](const Var& var) { return var.name == stmt_let->ident.value.value(); }) != gen.m_vars.cend()) { std::cerr << "Identifier already used: " << stmt_let->ident.value.value() << std::endl; exit(EXIT_FAILURE); } gen.m_vars.push_back({ .name = stmt_let->ident.value.value(), .stack_loc = gen.m_stack_size }); gen.gen_expr(stmt_let->expr); gen.m_output << " ;; /let\n"; } void operator()(const NodeStmtAssign* stmt_assign) const { const auto it = std::ranges::find_if(gen.m_vars, [&](const Var& var) { return var.name == stmt_assign->ident.value.value(); }); if (it == gen.m_vars.end()) { std::cerr << "Undeclared identifier: " << stmt_assign->ident.value.value() << std::endl; exit(EXIT_FAILURE); } gen.gen_expr(stmt_assign->expr); gen.pop("rax"); gen.m_output << " mov [rsp + " << (gen.m_stack_size - it->stack_loc - 1) * 8 << "], rax\n"; } void operator()(const NodeScope* scope) const { gen.m_output << " ;; scope\n"; gen.gen_scope(scope); gen.m_output << " ;; /scope\n"; } void operator()(const NodeStmtIf* stmt_if) const { gen.m_output << " ;; if\n"; gen.gen_expr(stmt_if->expr); gen.pop("rax"); const std::string label = gen.create_label(); gen.m_output << " test rax, rax\n"; gen.m_output << " jz " << label << "\n"; gen.gen_scope(stmt_if->scope); if (stmt_if->pred.has_value()) { const std::string end_label = gen.create_label(); gen.m_output << " jmp " << end_label << "\n"; gen.m_output << label << ":\n"; gen.gen_if_pred(stmt_if->pred.value(), end_label); gen.m_output << end_label << ":\n"; } else { gen.m_output << label << ":\n"; } gen.m_output << " ;; /if\n"; } }; StmtVisitor visitor { .gen = *this }; std::visit(visitor, stmt->var); }
O0
cpp
Generator::gen_stmt(NodeStmt const*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0x11100 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN9Generator8gen_stmtEPK8NodeStmt: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rsi, [rbp+var_10] lea rdi, [rbp+var_18] call _ZSt5visitIRZN9Generator8gen_stmtEPK8NodeStmtE11StmtVisitorJRKSt7variantIJP12NodeStmtExitP11NodeStmtLetP9NodeScopeP10NodeStmtIfP14NodeStmtAssignEEEENSt13invoke_resultIT_JDpNSt11conditionalIX21is_lvalue_reference_vIT0_EERNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISN_EEEEE4typeEE4typeEOSU_E4typeEEE4typeEOSL_DpOSN_ add rsp, 20h pop rbp retn
long long Generator::gen_stmt(long long a1, long long a2) { _QWORD v3[3]; // [rsp+8h] [rbp-18h] BYREF v3[2] = a1; v3[1] = a2; v3[0] = a1; return std::visit<Generator::gen_stmt(NodeStmt const*)::StmtVisitor &,std::variant<NodeStmtExit *,NodeStmtLet *,NodeScope *,NodeStmtIf *,NodeStmtAssign *> const&>( v3, a2); }
gen_stmt: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x18] CALL 0x00111100 ADD RSP,0x20 POP RBP RET
/* Generator::gen_stmt(NodeStmt const*) */ void __thiscall Generator::gen_stmt(Generator *this,NodeStmt *param_1) { Generator *local_20; NodeStmt *local_18; Generator *local_10; local_20 = this; local_18 = param_1; local_10 = this; std:: visit<Generator::gen_stmt(NodeStmt_const*)::StmtVisitor&,std::variant<NodeStmtExit*,NodeStmtLet*,NodeScope*,NodeStmtIf*,NodeStmtAssign*>const&> ((StmtVisitor *)&local_20,(variant *)param_1); return; }
61,934
get_bool_argument
eloqsql/mysys/my_getopt.c
static my_bool get_bool_argument(const struct my_option *opts, const char *argument) { DBUG_ENTER("get_bool_argument"); if (!my_strcasecmp(&my_charset_latin1, argument, "true") || !my_strcasecmp(&my_charset_latin1, argument, "on") || !my_strcasecmp(&my_charset_latin1, argument, "1")) DBUG_RETURN(1); else if (!my_strcasecmp(&my_charset_latin1, argument, "false") || !my_strcasecmp(&my_charset_latin1, argument, "off") || !my_strcasecmp(&my_charset_latin1, argument, "0")) DBUG_RETURN(0); my_getopt_error_reporter(WARNING_LEVEL, "option '%s': boolean value '%s' wasn't recognized. Set to OFF.", opts->name, argument); DBUG_RETURN(0); }
O0
c
get_bool_argument: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq 0x252319(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x252303(%rip), %rdi # 0x287ae0 leaq 0x53fe0(%rip), %rdx # 0x897c4 callq *%rax cmpl $0x0, %eax je 0x35841 leaq 0x2522ee(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x2522d8(%rip), %rdi # 0x287ae0 leaq 0x5707f(%rip), %rdx # 0x8c88e callq *%rax cmpl $0x0, %eax je 0x35841 leaq 0x2522c3(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x2522ad(%rip), %rdi # 0x287ae0 leaq 0x53cd9(%rip), %rdx # 0x89513 callq *%rax cmpl $0x0, %eax jne 0x3584c jmp 0x35843 movb $0x1, -0x1(%rbp) jmp 0x35901 leaq 0x25228d(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x252277(%rip), %rdi # 0x287ae0 leaq 0x53f59(%rip), %rdx # 0x897c9 callq *%rax cmpl $0x0, %eax je 0x358cd leaq 0x252262(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x25224c(%rip), %rdi # 0x287ae0 leaq 0x53f34(%rip), %rdx # 0x897cf callq *%rax cmpl $0x0, %eax je 0x358cd leaq 0x252237(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rsi leaq 0x252221(%rip), %rdi # 0x287ae0 leaq 0x53a07(%rip), %rdx # 0x892cd callq *%rax cmpl $0x0, %eax jne 0x358d5 jmp 0x358cf movb $0x0, -0x1(%rbp) jmp 0x35901 jmp 0x358d7 leaq 0x1aba12(%rip), %rax # 0x1e12f0 movq (%rax), %r8 movq -0x10(%rbp), %rax movq (%rax), %rdx movq -0x18(%rbp), %rcx movl $0x1, %edi leaq 0x542fa(%rip), %rsi # 0x89bf2 movb $0x0, %al callq *%r8 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
get_bool_argument: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aTrue; "true" call rax cmp eax, 0 jz short loc_35841 lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aExpansion+7; "on" call rax cmp eax, 0 jz short loc_35841 lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aIso88591_2+9; "1" call rax cmp eax, 0 jnz short loc_3584C loc_35841: jmp short $+2 loc_35843: mov [rbp+var_1], 1 jmp loc_35901 loc_3584C: lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aFalse; "false" call rax cmp eax, 0 jz short loc_358CD lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, aOff; "off" call rax cmp eax, 0 jz short loc_358CD lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_18] lea rdi, my_charset_latin1 lea rdx, a10+2; "0" call rax cmp eax, 0 jnz short loc_358D5 loc_358CD: jmp short $+2 loc_358CF: mov [rbp+var_1], 0 jmp short loc_35901 loc_358D5: jmp short $+2 loc_358D7: lea rax, my_getopt_error_reporter mov r8, [rax] mov rax, [rbp+var_10] mov rdx, [rax] mov rcx, [rbp+var_18] mov edi, 1 lea rsi, aOptionSBoolean; "option '%s': boolean value '%s' wasn't "... mov al, 0 call r8 mov [rbp+var_1], 0 loc_35901: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char get_bool_argument(const char **a1, const char *a2) { if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "true") || !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "on") || !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "1") ) { return 1; } if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "false") || !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "off") || !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a2, "0") ) { return 0; } my_getopt_error_reporter(1, (long long)"option '%s': boolean value '%s' wasn't recognized. Set to OFF.", *a1, a2); return 0; }
get_bool_argument: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x387ae0] LEA RDX,[0x1897c4] CALL RAX CMP EAX,0x0 JZ 0x00135841 LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x387ae0] LEA RDX,[0x18c88e] CALL RAX CMP EAX,0x0 JZ 0x00135841 LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x387ae0] LEA RDX,[0x189513] CALL RAX CMP EAX,0x0 JNZ 0x0013584c LAB_00135841: JMP 0x00135843 LAB_00135843: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00135901 LAB_0013584c: LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x387ae0] LEA RDX,[0x1897c9] CALL RAX CMP EAX,0x0 JZ 0x001358cd LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x387ae0] LEA RDX,[0x1897cf] CALL RAX CMP EAX,0x0 JZ 0x001358cd LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[0x387ae0] LEA RDX,[0x1892cd] CALL RAX CMP EAX,0x0 JNZ 0x001358d5 LAB_001358cd: JMP 0x001358cf LAB_001358cf: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00135901 LAB_001358d5: JMP 0x001358d7 LAB_001358d7: LEA RAX,[0x2e12f0] MOV R8,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV EDI,0x1 LEA RSI,[0x189bf2] MOV AL,0x0 CALL R8 MOV byte ptr [RBP + -0x1],0x0 LAB_00135901: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 get_bool_argument(int8 *param_1,int8 param_2) { int iVar1; iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,param_2,&DAT_001897c4); if (((iVar1 == 0) || (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,param_2,"on"), iVar1 == 0)) || (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,param_2,&DAT_00189513), iVar1 == 0)) { return 1; } iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,param_2,"false"); if (((iVar1 != 0) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,param_2,&DAT_001897cf), iVar1 != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,param_2,&DAT_001892cd), iVar1 != 0)) { (*(code *)my_getopt_error_reporter) (1,"option \'%s\': boolean value \'%s\' wasn\'t recognized. Set to OFF.",*param_1, param_2); return 0; } return 0; }
61,935
FTB_WORD_cmp_list
eloqsql/storage/myisam/ft_boolean_search.c
static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word, ndepth */ int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1, (uchar*) (*b)->word + 1, (*b)->len - 1, 0); if (!i) i= CMP_NUM((*a)->ndepth, (*b)->ndepth); return i; }
O3
c
FTB_WORD_cmp_list: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq (%rsi), %rsi movl 0x48(%rsi), %edx addq $0x4e, %rsi decl %edx movq (%rbx), %rcx movl 0x48(%rcx), %r8d addq $0x4e, %rcx decl %r8d xorl %r9d, %r9d callq 0xbdd70 testl %eax, %eax jne 0x8cb36 movq (%r14), %rax movl 0x44(%rax), %eax movq (%rbx), %rcx xorl %edx, %edx cmpl 0x44(%rcx), %eax setne %dl movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovael %edx, %eax popq %rbx popq %r14 popq %rbp retq
FTB_WORD_cmp_list: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdx mov r14, rsi mov rsi, [rsi] mov edx, [rsi+48h] add rsi, 4Eh ; 'N' dec edx mov rcx, [rbx] mov r8d, [rcx+48h] add rcx, 4Eh ; 'N' dec r8d xor r9d, r9d call ha_compare_text test eax, eax jnz short loc_8CB36 mov rax, [r14] mov eax, [rax+44h] mov rcx, [rbx] xor edx, edx cmp eax, [rcx+44h] setnz dl mov eax, 0FFFFFFFFh cmovnb eax, edx loc_8CB36: pop rbx pop r14 pop rbp retn
long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3) { long long result; // rax unsigned int v5; // eax bool v6; // cf BOOL v7; // edx result = ha_compare_text( a1, *(_QWORD *)a2 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1), *(_QWORD *)a3 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1), 0LL); if ( !(_DWORD)result ) { v5 = *(_DWORD *)(*(_QWORD *)a2 + 68LL); v6 = v5 < *(_DWORD *)(*(_QWORD *)a3 + 68LL); v7 = v5 != *(_DWORD *)(*(_QWORD *)a3 + 68LL); result = 0xFFFFFFFFLL; if ( !v6 ) return v7; } return result; }
FTB_WORD_cmp_list: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV RSI,qword ptr [RSI] MOV EDX,dword ptr [RSI + 0x48] ADD RSI,0x4e DEC EDX MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RCX + 0x48] ADD RCX,0x4e DEC R8D XOR R9D,R9D CALL 0x001bdd70 TEST EAX,EAX JNZ 0x0018cb36 MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0x44] MOV RCX,qword ptr [RBX] XOR EDX,EDX CMP EAX,dword ptr [RCX + 0x44] SETNZ DL MOV EAX,0xffffffff CMOVNC EAX,EDX LAB_0018cb36: POP RBX POP R14 POP RBP RET
ulong FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3) { ulong uVar1; uVar1 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e, *(int *)(*param_3 + 0x48) + -1,0); if ((int)uVar1 == 0) { uVar1 = 0xffffffff; if (*(uint *)(*param_3 + 0x44) <= *(uint *)(*param_2 + 0x44)) { uVar1 = (ulong)(*(uint *)(*param_2 + 0x44) != *(uint *)(*param_3 + 0x44)); } } return uVar1; }
61,936
trnman_recreate_trn_from_recovery
eloqsql/storage/maria/trnman.c
TRN *trnman_recreate_trn_from_recovery(uint16 shortid, TrID longid) { TrID old_trid_generator= global_trid_generator; TRN *trn; DBUG_ASSERT(maria_in_recovery && !maria_multi_threaded); global_trid_generator= longid-1; /* force a correct trid in the new trn */ if (unlikely((trn= trnman_new_trn(NULL)) == NULL)) return NULL; /* deallocate excessive allocations of trnman_new_trn() */ global_trid_generator= old_trid_generator; set_if_bigger(global_trid_generator, longid); short_trid_to_active_trn[trn->short_id]= 0; DBUG_ASSERT(short_trid_to_active_trn[shortid] == NULL); short_trid_to_active_trn[shortid]= trn; trn->short_id= shortid; return trn; }
O3
c
trnman_recreate_trn_from_recovery: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movl %edi, %ebx movq 0x3dbe56(%rip), %r15 # 0x407870 leaq -0x1(%rsi), %rax movq %rax, 0x3dbe4b(%rip) # 0x407870 xorl %edi, %edi callq 0x5f8f8 testq %rax, %rax je 0x2ba60 cmpq %r14, %r15 cmovaq %r15, %r14 movq %r14, 0x3dbe31(%rip) # 0x407870 movq 0x3dbb4a(%rip), %rcx # 0x407590 movzwl 0xac(%rax), %edx andq $0x0, (%rcx,%rdx,8) movzwl %bx, %edx movq %rax, (%rcx,%rdx,8) movw %dx, 0xac(%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
trnman_recreate_trn_from_recovery: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov ebx, edi mov r15, cs:global_trid_generator lea rax, [rsi-1] mov cs:global_trid_generator, rax xor edi, edi call trnman_new_trn test rax, rax jz short loc_2BA60 cmp r15, r14 cmova r14, r15 mov cs:global_trid_generator, r14 mov rcx, cs:short_trid_to_active_trn movzx edx, word ptr [rax+0ACh] and qword ptr [rcx+rdx*8], 0 movzx edx, bx mov [rcx+rdx*8], rax mov [rax+0ACh], dx loc_2BA60: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long trnman_recreate_trn_from_recovery(unsigned __int16 a1, unsigned long long a2) { long long v2; // r14 unsigned long long v3; // r15 long long result; // rax long long v5; // rcx v2 = a2; v3 = global_trid_generator; global_trid_generator = a2 - 1; result = trnman_new_trn(0LL); if ( result ) { if ( v3 > a2 ) v2 = v3; global_trid_generator = v2; v5 = short_trid_to_active_trn; *(_QWORD *)(short_trid_to_active_trn + 8LL * *(unsigned __int16 *)(result + 172)) = 0LL; *(_QWORD *)(v5 + 8LL * a1) = result; *(_WORD *)(result + 172) = a1; } return result; }
trnman_recreate_trn_from_recovery: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV EBX,EDI MOV R15,qword ptr [0x00507870] LEA RAX,[RSI + -0x1] MOV qword ptr [0x00507870],RAX XOR EDI,EDI CALL 0x0015f8f8 TEST RAX,RAX JZ 0x0012ba60 CMP R15,R14 CMOVA R14,R15 MOV qword ptr [0x00507870],R14 MOV RCX,qword ptr [0x00507590] MOVZX EDX,word ptr [RAX + 0xac] AND qword ptr [RCX + RDX*0x8],0x0 MOVZX EDX,BX MOV qword ptr [RCX + RDX*0x8],RAX MOV word ptr [RAX + 0xac],DX LAB_0012ba60: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void trnman_recreate_trn_from_recovery(ushort param_1,ulong param_2) { long lVar1; ulong uVar2; long lVar3; uVar2 = global_trid_generator; global_trid_generator = param_2 - 1; lVar3 = trnman_new_trn(0); lVar1 = short_trid_to_active_trn; if (lVar3 != 0) { global_trid_generator = param_2; if (param_2 < uVar2) { global_trid_generator = uVar2; } *(int8 *)(short_trid_to_active_trn + (ulong)*(ushort *)(lVar3 + 0xac) * 8) = 0; *(long *)(lVar1 + (ulong)param_1 * 8) = lVar3; *(ushort *)(lVar3 + 0xac) = param_1; } return; }
61,937
LefDefParser::lefwDensityCheckWindow(double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwDensityCheckWindow(double checkWindowLength, double checkWindowWidth) { lefw54Num = LEFW_DENSITYCHECKWINDOW; if (!lefwFile) return LEFW_UNINITIALIZED; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " DENSITYCHECKWINDOW %.11g %.11g ;\n", checkWindowLength, checkWindowWidth); else fprintf(lefwFile, " DENSITYCHECKWINDOW %.11g %.11g ;\n", checkWindowLength, checkWindowWidth); lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwDensityCheckWindow(double, double): subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) movsd %xmm1, (%rsp) movl $0x7c, 0x1c933(%rip) # 0x32d4c leaq 0x1c9e0(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x16433 movl $0x1, 0x14(%rsp) jmp 0x164bd movsd 0x12dc5(%rip), %xmm0 # 0x29200 ucomisd 0x1c8fd(%rip), %xmm0 # 0x32d40 jbe 0x1644f movl $0x5, 0x14(%rsp) jmp 0x164bd cmpl $0x0, 0x1cc96(%rip) # 0x330ec je 0x1647d leaq 0x1c9a1(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 movsd (%rsp), %xmm1 leaq 0x148bc(%rip), %rsi # 0x2ad30 movb $0x2, %al callq 0x289b0 jmp 0x164a0 leaq 0x1c97c(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 movsd (%rsp), %xmm1 leaq 0x14897(%rip), %rsi # 0x2ad30 movb $0x2, %al callq 0x1100 leaq 0x1cba5(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x1cb99(%rip), %rax # 0x3304c movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser22lefwDensityCheckWindowEdd: sub rsp, 18h movsd [rsp+18h+var_10], xmm0 movsd [rsp+18h+var_18], xmm1 mov cs:_ZN12LefDefParserL9lefw54NumE, 7Ch ; '|'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_16433 mov [rsp+18h+var_4], 1 jmp loc_164BD loc_16433: movsd xmm0, cs:dbl_29200 ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum jbe short loc_1644F mov [rsp+18h+var_4], 5 jmp short loc_164BD loc_1644F: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_1647D lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] movsd xmm1, [rsp+18h+var_18] lea rsi, aDensitycheckwi; " DENSITYCHECKWINDOW %.11g %.11g ;\n" mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_164A0 loc_1647D: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] movsd xmm1, [rsp+18h+var_18] lea rsi, aDensitycheckwi; " DENSITYCHECKWINDOW %.11g %.11g ;\n" mov al, 2 call _fprintf loc_164A0: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_164BD: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwDensityCheckWindow( LefDefParser *this, double a2, double a3, long long a4, int a5, int a6, int a7, int a8) { LefDefParser::lefw54Num = 124; if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" DENSITYCHECKWINDOW %.11g %.11g ;\n", a5, a6, a7, a8); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " DENSITYCHECKWINDOW %.11g %.11g ;\n", a2, a3); ++LefDefParser::lefwLines; return 0; } else { return 5; } } else { return 1; } }
lefwDensityCheckWindow: SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD qword ptr [RSP],XMM1 MOV dword ptr [0x00132d4c],0x7c LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x00116433 MOV dword ptr [RSP + 0x14],0x1 JMP 0x001164bd LAB_00116433: MOVSD XMM0,qword ptr [0x00129200] UCOMISD XMM0,qword ptr [0x00132d40] JBE 0x0011644f MOV dword ptr [RSP + 0x14],0x5 JMP 0x001164bd LAB_0011644f: CMP dword ptr [0x001330ec],0x0 JZ 0x0011647d LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [RSP] LEA RSI,[0x12ad30] MOV AL,0x2 CALL 0x001289b0 JMP 0x001164a0 LAB_0011647d: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [RSP] LEA RSI,[0x12ad30] MOV AL,0x2 CALL 0x00101100 LAB_001164a0: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_001164bd: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwDensityCheckWindow(double, double) */ int4 LefDefParser::lefwDensityCheckWindow(double param_1,double param_2) { int4 local_4; lefw54Num = 0x7c; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (DAT_00129200 <= versionNum) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," DENSITYCHECKWINDOW %.11g %.11g ;\n",param_1,param_2); } else { encPrint(lefwFile," DENSITYCHECKWINDOW %.11g %.11g ;\n",param_1,param_2); } lefwLines = lefwLines + 1; local_4 = 0; } else { local_4 = 5; } return local_4; }
61,938
LefDefParser::lefwDensityCheckWindow(double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwDensityCheckWindow(double checkWindowLength, double checkWindowWidth) { lefw54Num = LEFW_DENSITYCHECKWINDOW; if (!lefwFile) return LEFW_UNINITIALIZED; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " DENSITYCHECKWINDOW %.11g %.11g ;\n", checkWindowLength, checkWindowWidth); else fprintf(lefwFile, " DENSITYCHECKWINDOW %.11g %.11g ;\n", checkWindowLength, checkWindowWidth); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwDensityCheckWindow(double, double): movl $0x7c, 0x176d9(%rip) # 0x24d4c leaq 0x17786(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0xd6b3 movl $0x5, %eax movsd 0xba89(%rip), %xmm2 # 0x19118 ucomisd 0x176a9(%rip), %xmm2 # 0x24d40 ja 0xd6d6 pushq %rax cmpb $0x1, 0x17a4b(%rip) # 0x250ec jne 0xd6b9 leaq 0xd942(%rip), %rsi # 0x1afec movb $0x2, %al callq 0x18c35 jmp 0xd6c7 movl $0x1, %eax retq leaq 0xd92c(%rip), %rsi # 0x1afec movb $0x2, %al callq 0x10f0 leaq 0x1797e(%rip), %rax # 0x2504c incl (%rax) xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser22lefwDensityCheckWindowEdd: mov cs:_ZN12LefDefParserL9lefw54NumE, 7Ch ; '|'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_D6B3 mov eax, 5 movsd xmm2, cs:dbl_19118 ucomisd xmm2, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum ja short locret_D6D6 push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_D6B9 lea rsi, aDensitycheckwi; " DENSITYCHECKWINDOW %.11g %.11g ;\n" mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_D6C7 loc_D6B3: mov eax, 1 retn loc_D6B9: lea rsi, aDensitycheckwi; " DENSITYCHECKWINDOW %.11g %.11g ;\n" mov al, 2 call _fprintf loc_D6C7: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax add rsp, 8 locret_D6D6: retn
long long LefDefParser::lefwDensityCheckWindow( LefDefParser *this, double a2, double a3, long long a4, int a5, int a6, int a7, int a8) { long long result; // rax LefDefParser::lefw54Num = 124; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 5LL; if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" DENSITYCHECKWINDOW %.11g %.11g ;\n", a5, a6, a7, a8); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " DENSITYCHECKWINDOW %.11g %.11g ;\n", a2, a3); ++LefDefParser::lefwLines; return 0LL; } return result; }
lefwDensityCheckWindow: MOV dword ptr [0x00124d4c],0x7c LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x0010d6b3 MOV EAX,0x5 MOVSD XMM2,qword ptr [0x00119118] UCOMISD XMM2,qword ptr [0x00124d40] JA 0x0010d6d6 PUSH RAX CMP byte ptr [0x001250ec],0x1 JNZ 0x0010d6b9 LEA RSI,[0x11afec] MOV AL,0x2 CALL 0x00118c35 JMP 0x0010d6c7 LAB_0010d6b3: MOV EAX,0x1 RET LAB_0010d6b9: LEA RSI,[0x11afec] MOV AL,0x2 CALL 0x001010f0 LAB_0010d6c7: LEA RAX,[0x12504c] INC dword ptr [RAX] XOR EAX,EAX ADD RSP,0x8 LAB_0010d6d6: RET
/* LefDefParser::lefwDensityCheckWindow(double, double) */ int8 LefDefParser::lefwDensityCheckWindow(double param_1,double param_2) { int8 uVar1; lefw54Num = 0x7c; if (lefwFile != (_IO_FILE *)0x0) { uVar1 = 5; if (DAT_00119118 <= versionNum) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," DENSITYCHECKWINDOW %.11g %.11g ;\n"); } else { fprintf(lefwFile," DENSITYCHECKWINDOW %.11g %.11g ;\n"); } lefwLines = lefwLines + 1; uVar1 = 0; } return uVar1; } return 1; }
61,939
js_parse_init
bluesky950520[P]quickjs/quickjs.c
static void js_parse_init(JSContext *ctx, JSParseState *s, const char *input, size_t input_len, const char *filename) { memset(s, 0, sizeof(*s)); s->ctx = ctx; s->filename = filename; s->line_num = 1; s->col_num = 1; s->buf_start = s->buf_ptr = (const uint8_t *)input; s->buf_end = s->buf_ptr + input_len; s->mark = s->buf_ptr + min_int(1, input_len); s->eol = s->buf_ptr; s->token.val = ' '; s->token.line_num = 1; s->token.col_num = 1; }
O0
c
js_parse_init: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq %rcx, 0x18(%rsp) movq %r8, 0x10(%rsp) movq 0x28(%rsp), %rdi xorl %esi, %esi movl $0xa0, %edx callq 0xe340 movq 0x30(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, (%rax) movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x28(%rsp), %rax movl $0x1, 0x10(%rax) movq 0x28(%rsp), %rax movl $0x1, 0x14(%rax) movq 0x20(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x70(%rax) movq 0x28(%rsp), %rax movq %rcx, 0x68(%rax) movq 0x28(%rsp), %rax movq 0x70(%rax), %rcx addq 0x18(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x78(%rax) movq 0x28(%rsp), %rax movq 0x70(%rax), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rax movl %eax, %esi movl $0x1, %edi callq 0x4fa40 movq 0x8(%rsp), %rcx cltq addq %rax, %rcx movq 0x28(%rsp), %rax movq %rcx, 0x88(%rax) movq 0x28(%rsp), %rax movq 0x70(%rax), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x80(%rax) movq 0x28(%rsp), %rax movl $0x20, 0x20(%rax) movq 0x28(%rsp), %rax movl $0x1, 0x24(%rax) movq 0x28(%rsp), %rax movl $0x1, 0x28(%rax) addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
js_parse_init: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov [rsp+38h+var_20], rcx mov [rsp+38h+var_28], r8 mov rdi, [rsp+38h+var_10] xor esi, esi mov edx, 0A0h call _memset mov rcx, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov [rax], rcx mov rcx, [rsp+38h+var_28] mov rax, [rsp+38h+var_10] mov [rax+18h], rcx mov rax, [rsp+38h+var_10] mov dword ptr [rax+10h], 1 mov rax, [rsp+38h+var_10] mov dword ptr [rax+14h], 1 mov rcx, [rsp+38h+var_18] mov rax, [rsp+38h+var_10] mov [rax+70h], rcx mov rax, [rsp+38h+var_10] mov [rax+68h], rcx mov rax, [rsp+38h+var_10] mov rcx, [rax+70h] add rcx, [rsp+38h+var_20] mov rax, [rsp+38h+var_10] mov [rax+78h], rcx mov rax, [rsp+38h+var_10] mov rax, [rax+70h] mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_20] mov esi, eax mov edi, 1 call min_int_0 mov rcx, [rsp+38h+var_30] cdqe add rcx, rax mov rax, [rsp+38h+var_10] mov [rax+88h], rcx mov rax, [rsp+38h+var_10] mov rcx, [rax+70h] mov rax, [rsp+38h+var_10] mov [rax+80h], rcx mov rax, [rsp+38h+var_10] mov dword ptr [rax+20h], 20h ; ' ' mov rax, [rsp+38h+var_10] mov dword ptr [rax+24h], 1 mov rax, [rsp+38h+var_10] mov dword ptr [rax+28h], 1 add rsp, 38h retn
long long js_parse_init(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax long long v6; // [rsp+8h] [rbp-30h] memset(a2, 0LL, 160LL); *(_QWORD *)a2 = a1; *(_QWORD *)(a2 + 24) = a5; *(_DWORD *)(a2 + 16) = 1; *(_DWORD *)(a2 + 20) = 1; *(_QWORD *)(a2 + 112) = a3; *(_QWORD *)(a2 + 104) = a3; *(_QWORD *)(a2 + 120) = a4 + *(_QWORD *)(a2 + 112); v6 = *(_QWORD *)(a2 + 112); *(_QWORD *)(a2 + 136) = (int)min_int_0(1LL, (unsigned int)a4) + v6; *(_QWORD *)(a2 + 128) = *(_QWORD *)(a2 + 112); *(_DWORD *)(a2 + 32) = 32; *(_DWORD *)(a2 + 36) = 1; result = a2; *(_DWORD *)(a2 + 40) = 1; return result; }
js_parse_init: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x28] XOR ESI,ESI MOV EDX,0xa0 CALL 0x0010e340 MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x10],0x1 MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x14],0x1 MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x70],RCX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x68],RCX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RAX + 0x70] ADD RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x78],RCX MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x70] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x18] MOV ESI,EAX MOV EDI,0x1 CALL 0x0014fa40 MOV RCX,qword ptr [RSP + 0x8] CDQE ADD RCX,RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RAX + 0x70] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x80],RCX MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x20],0x20 MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x24],0x1 MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x28],0x1 ADD RSP,0x38 RET
void js_parse_init(int8 param_1,int8 *param_2,int8 param_3,ulong param_4, int8 param_5) { long lVar1; int iVar2; memset(param_2,0,0xa0); *param_2 = param_1; param_2[3] = param_5; *(int4 *)(param_2 + 2) = 1; *(int4 *)((long)param_2 + 0x14) = 1; param_2[0xe] = param_3; param_2[0xd] = param_3; param_2[0xf] = param_2[0xe] + param_4; lVar1 = param_2[0xe]; iVar2 = min_int(1,param_4 & 0xffffffff); param_2[0x11] = lVar1 + iVar2; param_2[0x10] = param_2[0xe]; *(int4 *)(param_2 + 4) = 0x20; *(int4 *)((long)param_2 + 0x24) = 1; *(int4 *)(param_2 + 5) = 1; return; }
61,940
service_thread_complete
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/svc/svc_services.c
static void _service_thread_complete(SVC_THREADS_T * service_thread, void* arg) { SVC_SERVICE_T* pservice = (SVC_SERVICE_T*) arg ; os_mutex_lock (&_svc_service_mutex) ; pservice->status = SVC_SERVICE_STATUS_STOPPED ; if (pservice->cb) pservice->cb (pservice->service, pservice->cb_parm) ; pservice->cb = 0 ; pservice->cb_parm = 0; os_mutex_unlock (&_svc_service_mutex) ; _service_changed (SVC_SERVICE_STATUS_STOPPED, (pservice)) ; }
O3
c
service_thread_complete: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx leaq 0x27416(%rip), %rdi # 0x3eb38 callq 0x14ff0 movl $0x0, 0x54(%rbx) leaq 0x28(%rbx), %r14 movq 0x28(%rbx), %rax testq %rax, %rax je 0x17744 movl 0x5c(%rbx), %edi movq 0x30(%rbx), %rsi callq *%rax xorps %xmm0, %xmm0 movups %xmm0, (%r14) leaq 0x273e6(%rip), %rdi # 0x3eb38 callq 0x15015 xorl %edi, %edi movq %rbx, %rsi popq %rbx popq %r14 popq %rbp jmp 0x17096
_service_thread_complete: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi lea rdi, _svc_service_mutex call os_mutex_lock mov dword ptr [rbx+54h], 0 lea r14, [rbx+28h] mov rax, [rbx+28h] test rax, rax jz short loc_17744 mov edi, [rbx+5Ch] mov rsi, [rbx+30h] call rax loc_17744: xorps xmm0, xmm0 movups xmmword ptr [r14], xmm0 lea rdi, _svc_service_mutex call os_mutex_unlock xor edi, edi mov rsi, rbx pop rbx pop r14 pop rbp jmp _service_changed
long long service_thread_complete(long long a1, long long a2) { void ( *v2)(_QWORD, _QWORD); // rax os_mutex_lock((long long *)&svc_service_mutex); *(_DWORD *)(a2 + 84) = 0; v2 = *(void ( **)(_QWORD, _QWORD))(a2 + 40); if ( v2 ) v2(*(unsigned int *)(a2 + 92), *(_QWORD *)(a2 + 48)); *(_OWORD *)(a2 + 40) = 0LL; os_mutex_unlock((long long *)&svc_service_mutex); return service_changed(0, a2); }
_service_thread_complete: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI LEA RDI,[0x13eb38] CALL 0x00114ff0 MOV dword ptr [RBX + 0x54],0x0 LEA R14,[RBX + 0x28] MOV RAX,qword ptr [RBX + 0x28] TEST RAX,RAX JZ 0x00117744 MOV EDI,dword ptr [RBX + 0x5c] MOV RSI,qword ptr [RBX + 0x30] CALL RAX LAB_00117744: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 LEA RDI,[0x13eb38] CALL 0x00115015 XOR EDI,EDI MOV RSI,RBX POP RBX POP R14 POP RBP JMP 0x00117096
void _service_thread_complete(int8 param_1,long param_2) { os_mutex_lock(&_svc_service_mutex); *(int4 *)(param_2 + 0x54) = 0; if (*(code **)(param_2 + 0x28) != (code *)0x0) { (**(code **)(param_2 + 0x28))(*(int4 *)(param_2 + 0x5c),*(int8 *)(param_2 + 0x30)); } *(int8 *)(param_2 + 0x28) = 0; *(int8 *)(param_2 + 0x30) = 0; os_mutex_unlock(&_svc_service_mutex); _service_changed(0,param_2); return; }
61,941
maria_ft_get_word
eloqsql/storage/maria/ma_ft_parser.c
uchar maria_ft_get_word(CHARSET_INFO *cs, const uchar **start, const uchar *end, FT_WORD *word, MYSQL_FTPARSER_BOOLEAN_INFO *param) { const uchar *doc= *start; int ctype; uint mwc, length; int mbl; param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0); param->weight_adjust= param->wasign= 0; param->type= FT_TOKEN_EOF; while (doc<end) { for (; doc < end; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { mbl= my_ci_ctype(cs, &ctype, doc, end); if (true_word_char(ctype, *doc)) break; if (*doc == FTB_RQUOT && param->quot) { param->quot= (char *) doc; *start=doc+1; param->type= FT_TOKEN_RIGHT_PAREN; goto ret; } if (!param->quot) { if (*doc == FTB_LBR || *doc == FTB_RBR || *doc == FTB_LQUOT) { /* param->prev=' '; */ *start=doc+1; if (*doc == FTB_LQUOT) param->quot= (char *) *start; param->type= (*doc == FTB_RBR ? FT_TOKEN_RIGHT_PAREN : FT_TOKEN_LEFT_PAREN); goto ret; } if (param->prev == ' ') { if (*doc == FTB_YES ) { param->yesno=+1; continue; } else if (*doc == FTB_EGAL) { param->yesno= 0; continue; } else if (*doc == FTB_NO ) { param->yesno=-1; continue; } else if (*doc == FTB_INC ) { param->weight_adjust++; continue; } else if (*doc == FTB_DEC ) { param->weight_adjust--; continue; } else if (*doc == FTB_NEG ) { param->wasign= !param->wasign; continue; } } } param->prev=*doc; param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0); param->weight_adjust= param->wasign= 0; } mwc=length=0; for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { mbl= my_ci_ctype(cs, &ctype, doc, end); if (true_word_char(ctype, *doc)) mwc=0; else if (!misc_word_char(*doc) || mwc) break; else mwc++; } param->prev='A'; /* be sure *prev is true_word_char */ word->len= (uint)(doc-word->pos) - mwc; if ((param->trunc=(doc<end && *doc == FTB_TRUNC))) doc++; if (((length >= ft_min_word_len && !is_stopword((char *) word->pos, word->len)) || param->trunc) && length < ft_max_word_len) { *start=doc; param->type= FT_TOKEN_WORD; goto ret; } else if (length) /* make sure length > 0 (if start contains spaces only) */ { *start= doc; param->type= FT_TOKEN_STOPWORD; goto ret; } } if (param->quot) { param->quot= (char *)(*start= doc); param->type= 3; /* FT_RBR */ goto ret; } ret: return param->type; }
O3
c
maria_ft_get_word: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %rbx movq %rcx, -0x40(%rbp) movq %rdx, %r13 movq %rdi, %r14 leaq 0x32b21e(%rip), %rax # 0x38d3c8 movq (%rax), %rax cmpb $0x20, (%rax) movl $0x1, %eax je 0x621c1 xorl %eax, %eax cmpq $0x0, 0x10(%rbx) setne %al movq %rsi, -0x38(%rbp) movq (%rsi), %r15 movl %eax, 0x4(%rbx) movb $0x0, 0xc(%rbx) xorl %eax, %eax movl %eax, 0x8(%rbx) movl %eax, (%rbx) cmpq %r13, %r15 jae 0x6243f leaq 0x32b1e2(%rip), %r12 # 0x38d3c8 movq 0xb8(%r14), %rax movq %r14, %rdi leaq -0x2c(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x622fe movzbl (%r15), %ecx cmpl $0x5f, %ecx je 0x622fe movq (%r12), %rdx movsbl 0xb(%rdx), %edi movq 0x10(%rbx), %rsi cmpl %edi, %ecx jne 0x6222e testq %rsi, %rsi je 0x62237 jmp 0x62417 testq %rsi, %rsi jne 0x622bf movsbl 0x5(%rdx), %edi cmpl %edi, %ecx je 0x623e2 movsbl 0x6(%rdx), %edi cmpl %edi, %ecx je 0x623e2 movsbl 0xa(%rdx), %edi cmpl %edi, %ecx je 0x623e2 cmpb $0x20, 0xe(%rbx) jne 0x622bf movsbl (%rdx), %edi cmpl %edi, %ecx jne 0x62271 movl $0x1, 0x4(%rbx) jmp 0x622e1 movsbl 0x1(%rdx), %edi cmpl %edi, %ecx jne 0x62282 movl $0x0, 0x4(%rbx) jmp 0x622e1 movsbl 0x2(%rdx), %edi cmpl %edi, %ecx jne 0x62293 movl $0xffffffff, 0x4(%rbx) # imm = 0xFFFFFFFF jmp 0x622e1 movsbl 0x3(%rdx), %edi cmpl %edi, %ecx jne 0x622a0 incl 0x8(%rbx) jmp 0x622e1 movsbl 0x4(%rdx), %edi cmpl %edi, %ecx jne 0x622ad decl 0x8(%rbx) jmp 0x622e1 movsbl 0x7(%rdx), %edi cmpl %edi, %ecx jne 0x622bf cmpb $0x0, 0xc(%rbx) sete 0xc(%rbx) jmp 0x622e1 movb %cl, 0xe(%rbx) cmpb $0x20, (%rdx) sete %cl testq %rsi, %rsi setne %dl orb %cl, %dl movzbl %dl, %ecx movl %ecx, 0x4(%rbx) movb $0x0, 0xc(%rbx) movl $0x0, 0x8(%rbx) movl %eax, %ecx negl %ecx testl %eax, %eax movl $0x1, %edx cmovel %edx, %ecx cmovgl %eax, %ecx addq %rcx, %r15 cmpq %r13, %r15 jb 0x621e6 movq -0x40(%rbp), %rax movq %r15, (%rax) xorl %r12d, %r12d cmpq %r13, %r15 jae 0x6234f xorl %r12d, %r12d movq 0xb8(%r14), %rax movq %r14, %rdi leaq -0x2c(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x62333 cmpb $0x5f, (%r15) jne 0x623ae incl %r12d movl %eax, %ecx negl %ecx testl %eax, %eax movl $0x1, %edx cmovel %edx, %ecx cmovgl %eax, %ecx addq %rcx, %r15 cmpq %r13, %r15 jb 0x62310 movb $0x41, 0xe(%rbx) movq -0x40(%rbp), %rdx movl (%rdx), %eax movl %r15d, %ecx subl %eax, %ecx movl %ecx, 0x8(%rdx) movb $0x0, 0xd(%rbx) xorl %eax, %eax movl %r12d, %r12d leaq 0x32b03f(%rip), %rcx # 0x38d3b0 cmpq %r12, (%rcx) ja 0x6238c movq -0x40(%rbp), %rax movq (%rax), %rdi movl 0x8(%rax), %esi callq 0x7459d testl %eax, %eax je 0x62390 movb 0xd(%rbx), %al testb %al, %al je 0x623a0 leaq 0x32b021(%rip), %rax # 0x38d3b8 cmpq %r12, (%rax) ja 0x62453 testq %r12, %r12 je 0x621d6 jmp 0x62467 movb $0x41, 0xe(%rbx) movq -0x40(%rbp), %rdx movl (%rdx), %eax movl %r15d, %ecx subl %eax, %ecx movl %ecx, 0x8(%rdx) movzbl (%r15), %ecx leaq 0x32affd(%rip), %rax # 0x38d3c8 movq (%rax), %rax movsbl 0x8(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx sete %al sete 0xd(%rbx) addq %rax, %r15 jmp 0x62367 leaq 0x1(%r15), %rdx movq -0x38(%rbp), %rax movq %rdx, (%rax) movzbl (%r15), %ecx movq (%r12), %rax movsbl 0xa(%rax), %esi cmpl %esi, %ecx jne 0x62405 movq %rdx, 0x10(%rbx) movzbl (%r15), %ecx movsbl 0x6(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx sete %al orl $0x2, %eax movl %eax, (%rbx) jmp 0x62430 movq %r15, 0x10(%rbx) incq %r15 movq -0x38(%rbp), %rax movq %r15, (%rax) movl $0x3, (%rbx) movl $0x3, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x0, 0x10(%rbx) je 0x6247b movq -0x38(%rbp), %rax movq %r15, (%rax) movq %r15, 0x10(%rbx) jmp 0x62425 movq -0x38(%rbp), %rax movq %r15, (%rax) movl $0x1, (%rbx) movl $0x1, %eax jmp 0x62430 movq -0x38(%rbp), %rax movq %r15, (%rax) movl $0x4, (%rbx) movl $0x4, %eax jmp 0x62430 movl (%rbx), %eax jmp 0x62430
maria_ft_get_word: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, r8 mov [rbp+var_40], rcx mov r13, rdx mov r14, rdi lea rax, ft_boolean_syntax mov rax, [rax] cmp byte ptr [rax], 20h ; ' ' mov eax, 1 jz short loc_621C1 xor eax, eax cmp qword ptr [rbx+10h], 0 setnz al loc_621C1: mov [rbp+var_38], rsi mov r15, [rsi] mov [rbx+4], eax mov byte ptr [rbx+0Ch], 0 xor eax, eax mov [rbx+8], eax mov [rbx], eax loc_621D6: cmp r15, r13 jnb loc_6243F lea r12, ft_boolean_syntax loc_621E6: mov rax, [r14+0B8h] mov rdi, r14 lea rsi, [rbp+var_2C] mov rdx, r15 mov rcx, r13 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz loc_622FE movzx ecx, byte ptr [r15] cmp ecx, 5Fh ; '_' jz loc_622FE mov rdx, [r12] movsx edi, byte ptr [rdx+0Bh] mov rsi, [rbx+10h] cmp ecx, edi jnz short loc_6222E test rsi, rsi jz short loc_62237 jmp loc_62417 loc_6222E: test rsi, rsi jnz loc_622BF loc_62237: movsx edi, byte ptr [rdx+5] cmp ecx, edi jz loc_623E2 movsx edi, byte ptr [rdx+6] cmp ecx, edi jz loc_623E2 movsx edi, byte ptr [rdx+0Ah] cmp ecx, edi jz loc_623E2 cmp byte ptr [rbx+0Eh], 20h ; ' ' jnz short loc_622BF movsx edi, byte ptr [rdx] cmp ecx, edi jnz short loc_62271 mov dword ptr [rbx+4], 1 jmp short loc_622E1 loc_62271: movsx edi, byte ptr [rdx+1] cmp ecx, edi jnz short loc_62282 mov dword ptr [rbx+4], 0 jmp short loc_622E1 loc_62282: movsx edi, byte ptr [rdx+2] cmp ecx, edi jnz short loc_62293 mov dword ptr [rbx+4], 0FFFFFFFFh jmp short loc_622E1 loc_62293: movsx edi, byte ptr [rdx+3] cmp ecx, edi jnz short loc_622A0 inc dword ptr [rbx+8] jmp short loc_622E1 loc_622A0: movsx edi, byte ptr [rdx+4] cmp ecx, edi jnz short loc_622AD dec dword ptr [rbx+8] jmp short loc_622E1 loc_622AD: movsx edi, byte ptr [rdx+7] cmp ecx, edi jnz short loc_622BF cmp byte ptr [rbx+0Ch], 0 setz byte ptr [rbx+0Ch] jmp short loc_622E1 loc_622BF: mov [rbx+0Eh], cl cmp byte ptr [rdx], 20h ; ' ' setz cl test rsi, rsi setnz dl or dl, cl movzx ecx, dl mov [rbx+4], ecx mov byte ptr [rbx+0Ch], 0 mov dword ptr [rbx+8], 0 loc_622E1: mov ecx, eax neg ecx test eax, eax mov edx, 1 cmovz ecx, edx cmovg ecx, eax add r15, rcx cmp r15, r13 jb loc_621E6 loc_622FE: mov rax, [rbp+var_40] mov [rax], r15 xor r12d, r12d cmp r15, r13 jnb short loc_6234F xor r12d, r12d loc_62310: mov rax, [r14+0B8h] mov rdi, r14 lea rsi, [rbp+var_2C] mov rdx, r15 mov rcx, r13 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz short loc_62333 cmp byte ptr [r15], 5Fh ; '_' jnz short loc_623AE loc_62333: inc r12d mov ecx, eax neg ecx test eax, eax mov edx, 1 cmovz ecx, edx cmovg ecx, eax add r15, rcx cmp r15, r13 jb short loc_62310 loc_6234F: mov byte ptr [rbx+0Eh], 41h ; 'A' mov rdx, [rbp+var_40] mov eax, [rdx] mov ecx, r15d sub ecx, eax mov [rdx+8], ecx mov byte ptr [rbx+0Dh], 0 xor eax, eax loc_62367: mov r12d, r12d lea rcx, ft_min_word_len cmp [rcx], r12 ja short loc_6238C mov rax, [rbp+var_40] mov rdi, [rax] mov esi, [rax+8] call is_stopword test eax, eax jz short loc_62390 mov al, [rbx+0Dh] loc_6238C: test al, al jz short loc_623A0 loc_62390: lea rax, ft_max_word_len cmp [rax], r12 ja loc_62453 loc_623A0: test r12, r12 jz loc_621D6 jmp loc_62467 loc_623AE: mov byte ptr [rbx+0Eh], 41h ; 'A' mov rdx, [rbp+var_40] mov eax, [rdx] mov ecx, r15d sub ecx, eax mov [rdx+8], ecx movzx ecx, byte ptr [r15] lea rax, ft_boolean_syntax mov rax, [rax] movsx edx, byte ptr [rax+8] xor eax, eax cmp ecx, edx setz al setz byte ptr [rbx+0Dh] add r15, rax jmp short loc_62367 loc_623E2: lea rdx, [r15+1] mov rax, [rbp+var_38] mov [rax], rdx movzx ecx, byte ptr [r15] mov rax, [r12] movsx esi, byte ptr [rax+0Ah] cmp ecx, esi jnz short loc_62405 mov [rbx+10h], rdx movzx ecx, byte ptr [r15] loc_62405: movsx edx, byte ptr [rax+6] xor eax, eax cmp ecx, edx setz al or eax, 2 mov [rbx], eax jmp short loc_62430 loc_62417: mov [rbx+10h], r15 inc r15 mov rax, [rbp+var_38] mov [rax], r15 loc_62425: mov dword ptr [rbx], 3 mov eax, 3 loc_62430: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6243F: cmp qword ptr [rbx+10h], 0 jz short loc_6247B mov rax, [rbp+var_38] mov [rax], r15 mov [rbx+10h], r15 jmp short loc_62425 loc_62453: mov rax, [rbp+var_38] mov [rax], r15 mov dword ptr [rbx], 1 mov eax, 1 jmp short loc_62430 loc_62467: mov rax, [rbp+var_38] mov [rax], r15 mov dword ptr [rbx], 4 mov eax, 4 jmp short loc_62430 loc_6247B: mov eax, [rbx] jmp short loc_62430
long long maria_ft_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long a4, unsigned int *a5) { BOOL v7; // eax _BYTE *v8; // r15 int v9; // eax int v10; // ecx char *v11; // rdx long long v12; // rsi long long v13; // rcx unsigned int v14; // r12d int v15; // eax long long v16; // rcx long long v17; // rax int v18; // ecx char *v19; // rax long long result; // rax _BYTE v23[44]; // [rsp+14h] [rbp-2Ch] BYREF v7 = 1; if ( *ft_boolean_syntax[0] != 32 ) v7 = *((_QWORD *)a5 + 2) != 0LL; v8 = *a2; a5[1] = v7; *((_BYTE *)a5 + 12) = 0; a5[2] = 0; *a5 = 0; while ( 2 ) { if ( (unsigned long long)v8 >= a3 ) { if ( !*((_QWORD *)a5 + 2) ) return *a5; *a2 = v8; *((_QWORD *)a5 + 2) = v8; LABEL_54: *a5 = 3; return 3LL; } do { v9 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v8, a3); if ( (v23[0] & 7) != 0 ) break; v10 = (unsigned __int8)*v8; if ( v10 == 95 ) break; v11 = ft_boolean_syntax[0]; v12 = *((_QWORD *)a5 + 2); if ( v10 == ft_boolean_syntax[0][11] ) { if ( v12 ) { *((_QWORD *)a5 + 2) = v8; *a2 = v8 + 1; goto LABEL_54; } } else if ( v12 ) { goto LABEL_27; } if ( v10 == ft_boolean_syntax[0][5] || v10 == ft_boolean_syntax[0][6] || v10 == ft_boolean_syntax[0][10] ) { *a2 = v8 + 1; v18 = (unsigned __int8)*v8; v19 = ft_boolean_syntax[0]; if ( v18 == ft_boolean_syntax[0][10] ) { *((_QWORD *)a5 + 2) = v8 + 1; v18 = (unsigned __int8)*v8; } result = (v18 == v19[6]) | 2u; *a5 = result; return result; } if ( *((_BYTE *)a5 + 14) != 32 ) { LABEL_27: *((_BYTE *)a5 + 14) = v10; a5[1] = *v11 == 32 || v12 != 0; *((_BYTE *)a5 + 12) = 0; a5[2] = 0; goto LABEL_28; } if ( v10 == *ft_boolean_syntax[0] ) { a5[1] = 1; } else if ( v10 == ft_boolean_syntax[0][1] ) { a5[1] = 0; } else if ( v10 == ft_boolean_syntax[0][2] ) { a5[1] = -1; } else if ( v10 == ft_boolean_syntax[0][3] ) { ++a5[2]; } else if ( v10 == ft_boolean_syntax[0][4] ) { --a5[2]; } else { if ( v10 != ft_boolean_syntax[0][7] ) goto LABEL_27; *((_BYTE *)a5 + 12) = *((_BYTE *)a5 + 12) == 0; } LABEL_28: v13 = (unsigned int)-v9; if ( !v9 ) v13 = 1LL; if ( v9 > 0 ) v13 = (unsigned int)v9; v8 += v13; } while ( (unsigned long long)v8 < a3 ); *(_QWORD *)a4 = v8; v14 = 0; if ( (unsigned long long)v8 >= a3 ) { LABEL_42: *((_BYTE *)a5 + 14) = 65; *(_DWORD *)(a4 + 8) = (_DWORD)v8 - *(_DWORD *)a4; *((_BYTE *)a5 + 13) = 0; LOBYTE(v17) = 0; } else { v14 = 0; while ( 1 ) { v15 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v8, a3); if ( (v23[0] & 7) == 0 && *v8 != 95 ) break; ++v14; v16 = (unsigned int)-v15; if ( !v15 ) v16 = 1LL; if ( v15 > 0 ) v16 = (unsigned int)v15; v8 += v16; if ( (unsigned long long)v8 >= a3 ) goto LABEL_42; } *((_BYTE *)a5 + 14) = 65; *(_DWORD *)(a4 + 8) = (_DWORD)v8 - *(_DWORD *)a4; v17 = (unsigned __int8)*v8 == ft_boolean_syntax[0][8]; *((_BYTE *)a5 + 13) = v17; v8 += v17; } if ( ft_min_word_len > (unsigned long long)v14 ) { LABEL_46: if ( (_BYTE)v17 ) goto LABEL_47; } else { if ( (unsigned int)is_stopword(*(_QWORD *)a4, *(unsigned int *)(a4 + 8)) ) { LOBYTE(v17) = *((_BYTE *)a5 + 13); goto LABEL_46; } LABEL_47: if ( ft_max_word_len > (unsigned long long)v14 ) { *a2 = v8; *a5 = 1; return 1LL; } } if ( !v14 ) continue; break; } *a2 = v8; *a5 = 4; return 4LL; }
maria_ft_get_word: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,R8 MOV qword ptr [RBP + -0x40],RCX MOV R13,RDX MOV R14,RDI LEA RAX,[0x48d3c8] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX],0x20 MOV EAX,0x1 JZ 0x001621c1 XOR EAX,EAX CMP qword ptr [RBX + 0x10],0x0 SETNZ AL LAB_001621c1: MOV qword ptr [RBP + -0x38],RSI MOV R15,qword ptr [RSI] MOV dword ptr [RBX + 0x4],EAX MOV byte ptr [RBX + 0xc],0x0 XOR EAX,EAX MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],EAX LAB_001621d6: CMP R15,R13 JNC 0x0016243f LEA R12,[0x48d3c8] LAB_001621e6: MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 LEA RSI,[RBP + -0x2c] MOV RDX,R15 MOV RCX,R13 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x001622fe MOVZX ECX,byte ptr [R15] CMP ECX,0x5f JZ 0x001622fe MOV RDX,qword ptr [R12] MOVSX EDI,byte ptr [RDX + 0xb] MOV RSI,qword ptr [RBX + 0x10] CMP ECX,EDI JNZ 0x0016222e TEST RSI,RSI JZ 0x00162237 JMP 0x00162417 LAB_0016222e: TEST RSI,RSI JNZ 0x001622bf LAB_00162237: MOVSX EDI,byte ptr [RDX + 0x5] CMP ECX,EDI JZ 0x001623e2 MOVSX EDI,byte ptr [RDX + 0x6] CMP ECX,EDI JZ 0x001623e2 MOVSX EDI,byte ptr [RDX + 0xa] CMP ECX,EDI JZ 0x001623e2 CMP byte ptr [RBX + 0xe],0x20 JNZ 0x001622bf MOVSX EDI,byte ptr [RDX] CMP ECX,EDI JNZ 0x00162271 MOV dword ptr [RBX + 0x4],0x1 JMP 0x001622e1 LAB_00162271: MOVSX EDI,byte ptr [RDX + 0x1] CMP ECX,EDI JNZ 0x00162282 MOV dword ptr [RBX + 0x4],0x0 JMP 0x001622e1 LAB_00162282: MOVSX EDI,byte ptr [RDX + 0x2] CMP ECX,EDI JNZ 0x00162293 MOV dword ptr [RBX + 0x4],0xffffffff JMP 0x001622e1 LAB_00162293: MOVSX EDI,byte ptr [RDX + 0x3] CMP ECX,EDI JNZ 0x001622a0 INC dword ptr [RBX + 0x8] JMP 0x001622e1 LAB_001622a0: MOVSX EDI,byte ptr [RDX + 0x4] CMP ECX,EDI JNZ 0x001622ad DEC dword ptr [RBX + 0x8] JMP 0x001622e1 LAB_001622ad: MOVSX EDI,byte ptr [RDX + 0x7] CMP ECX,EDI JNZ 0x001622bf CMP byte ptr [RBX + 0xc],0x0 SETZ byte ptr [RBX + 0xc] JMP 0x001622e1 LAB_001622bf: MOV byte ptr [RBX + 0xe],CL CMP byte ptr [RDX],0x20 SETZ CL TEST RSI,RSI SETNZ DL OR DL,CL MOVZX ECX,DL MOV dword ptr [RBX + 0x4],ECX MOV byte ptr [RBX + 0xc],0x0 MOV dword ptr [RBX + 0x8],0x0 LAB_001622e1: MOV ECX,EAX NEG ECX TEST EAX,EAX MOV EDX,0x1 CMOVZ ECX,EDX CMOVG ECX,EAX ADD R15,RCX CMP R15,R13 JC 0x001621e6 LAB_001622fe: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R15 XOR R12D,R12D CMP R15,R13 JNC 0x0016234f XOR R12D,R12D LAB_00162310: MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 LEA RSI,[RBP + -0x2c] MOV RDX,R15 MOV RCX,R13 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x00162333 CMP byte ptr [R15],0x5f JNZ 0x001623ae LAB_00162333: INC R12D MOV ECX,EAX NEG ECX TEST EAX,EAX MOV EDX,0x1 CMOVZ ECX,EDX CMOVG ECX,EAX ADD R15,RCX CMP R15,R13 JC 0x00162310 LAB_0016234f: MOV byte ptr [RBX + 0xe],0x41 MOV RDX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RDX] MOV ECX,R15D SUB ECX,EAX MOV dword ptr [RDX + 0x8],ECX MOV byte ptr [RBX + 0xd],0x0 XOR EAX,EAX LAB_00162367: MOV R12D,R12D LEA RCX,[0x48d3b0] CMP qword ptr [RCX],R12 JA 0x0016238c MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX] MOV ESI,dword ptr [RAX + 0x8] CALL 0x0017459d TEST EAX,EAX JZ 0x00162390 MOV AL,byte ptr [RBX + 0xd] LAB_0016238c: TEST AL,AL JZ 0x001623a0 LAB_00162390: LEA RAX,[0x48d3b8] CMP qword ptr [RAX],R12 JA 0x00162453 LAB_001623a0: TEST R12,R12 JZ 0x001621d6 JMP 0x00162467 LAB_001623ae: MOV byte ptr [RBX + 0xe],0x41 MOV RDX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RDX] MOV ECX,R15D SUB ECX,EAX MOV dword ptr [RDX + 0x8],ECX MOVZX ECX,byte ptr [R15] LEA RAX,[0x48d3c8] MOV RAX,qword ptr [RAX] MOVSX EDX,byte ptr [RAX + 0x8] XOR EAX,EAX CMP ECX,EDX SETZ AL SETZ byte ptr [RBX + 0xd] ADD R15,RAX JMP 0x00162367 LAB_001623e2: LEA RDX,[R15 + 0x1] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RDX MOVZX ECX,byte ptr [R15] MOV RAX,qword ptr [R12] MOVSX ESI,byte ptr [RAX + 0xa] CMP ECX,ESI JNZ 0x00162405 MOV qword ptr [RBX + 0x10],RDX MOVZX ECX,byte ptr [R15] LAB_00162405: MOVSX EDX,byte ptr [RAX + 0x6] XOR EAX,EAX CMP ECX,EDX SETZ AL OR EAX,0x2 MOV dword ptr [RBX],EAX JMP 0x00162430 LAB_00162417: MOV qword ptr [RBX + 0x10],R15 INC R15 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R15 LAB_00162425: MOV dword ptr [RBX],0x3 MOV EAX,0x3 LAB_00162430: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016243f: CMP qword ptr [RBX + 0x10],0x0 JZ 0x0016247b MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R15 MOV qword ptr [RBX + 0x10],R15 JMP 0x00162425 LAB_00162453: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R15 MOV dword ptr [RBX],0x1 MOV EAX,0x1 JMP 0x00162430 LAB_00162467: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R15 MOV dword ptr [RBX],0x4 MOV EAX,0x4 JMP 0x00162430 LAB_0016247b: MOV EAX,dword ptr [RBX] JMP 0x00162430
uint maria_ft_get_word(long param_1,long *param_2,byte *param_3,int *param_4,uint *param_5) { byte bVar1; long lVar2; int *puVar3; uint uVar4; uint uVar5; int iVar6; ulong uVar7; byte *pbVar8; char cVar9; byte local_34 [4]; uVar4 = 1; if (*ft_boolean_syntax != ' ') { uVar4 = (uint)(*(long *)(param_5 + 4) != 0); } pbVar8 = (byte *)*param_2; param_5[1] = uVar4; *(int1 *)(param_5 + 3) = 0; param_5[2] = 0; *param_5 = 0; do { if (param_3 <= pbVar8) { if (*(long *)(param_5 + 4) == 0) { return *param_5; } *param_2 = (long)pbVar8; *(byte **)(param_5 + 4) = pbVar8; LAB_00162425: *param_5 = 3; return 3; } do { uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pbVar8,param_3); puVar3 = ft_boolean_syntax; if ((local_34[0] & 7) != 0) break; bVar1 = *pbVar8; if (bVar1 == 0x5f) break; lVar2 = *(long *)(param_5 + 4); if ((uint)bVar1 == (int)(char)ft_boolean_syntax[0xb]) { if (lVar2 != 0) { *(byte **)(param_5 + 4) = pbVar8; *param_2 = (long)(pbVar8 + 1); goto LAB_00162425; } LAB_00162237: uVar5 = (uint)bVar1; if (((uVar5 == (int)(char)ft_boolean_syntax[5]) || (uVar5 == (int)(char)ft_boolean_syntax[6])) || (uVar5 == (int)(char)ft_boolean_syntax[10])) { *param_2 = (long)(pbVar8 + 1); puVar3 = ft_boolean_syntax; bVar1 = *pbVar8; if ((uint)bVar1 == (int)(char)ft_boolean_syntax[10]) { *(byte **)(param_5 + 4) = pbVar8 + 1; bVar1 = *pbVar8; } uVar4 = (uint)bVar1 == (int)(char)puVar3[6] | 2; *param_5 = uVar4; return uVar4; } if (*(char *)((long)param_5 + 0xe) != ' ') goto LAB_001622bf; if (uVar5 == (int)(char)*ft_boolean_syntax) { param_5[1] = 1; } else { uVar5 = (uint)bVar1; if (uVar5 == (int)(char)ft_boolean_syntax[1]) { param_5[1] = 0; } else if (uVar5 == (int)(char)ft_boolean_syntax[2]) { param_5[1] = 0xffffffff; } else if (uVar5 == (int)(char)ft_boolean_syntax[3]) { param_5[2] = param_5[2] + 1; } else if (uVar5 == (int)(char)ft_boolean_syntax[4]) { param_5[2] = param_5[2] - 1; } else { if (uVar5 != (int)(char)ft_boolean_syntax[7]) goto LAB_001622bf; *(bool *)(param_5 + 3) = (char)param_5[3] == '\0'; } } } else { if (lVar2 == 0) goto LAB_00162237; LAB_001622bf: *(byte *)((long)param_5 + 0xe) = bVar1; param_5[1] = (uint)(lVar2 != 0 || *puVar3 == ' '); *(int1 *)(param_5 + 3) = 0; param_5[2] = 0; } uVar7 = (ulong)-uVar4; if (uVar4 == 0) { uVar7 = 1; } if (0 < (int)uVar4) { uVar7 = (ulong)uVar4; } pbVar8 = pbVar8 + uVar7; } while (pbVar8 < param_3); *(byte **)param_4 = pbVar8; uVar4 = 0; if (pbVar8 < param_3) { uVar4 = 0; do { uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pbVar8,param_3); if (((local_34[0] & 7) == 0) && (*pbVar8 != 0x5f)) { *(int1 *)((long)param_5 + 0xe) = 0x41; param_4[2] = (int)pbVar8 - *param_4; cVar9 = (uint)*pbVar8 == (int)(char)ft_boolean_syntax[8]; *(char *)((long)param_5 + 0xd) = cVar9; pbVar8 = pbVar8 + (byte)cVar9; goto LAB_00162367; } uVar4 = uVar4 + 1; uVar7 = (ulong)-uVar5; if (uVar5 == 0) { uVar7 = 1; } if (0 < (int)uVar5) { uVar7 = (ulong)uVar5; } pbVar8 = pbVar8 + uVar7; } while (pbVar8 < param_3); } *(int1 *)((long)param_5 + 0xe) = 0x41; param_4[2] = (int)pbVar8 - *param_4; *(int1 *)((long)param_5 + 0xd) = 0; cVar9 = false; LAB_00162367: uVar7 = (ulong)uVar4; if (uVar7 < ft_min_word_len) { LAB_0016238c: if (cVar9 != '\0') goto LAB_00162390; } else { iVar6 = is_stopword(*(int8 *)param_4,param_4[2]); if (iVar6 != 0) { cVar9 = *(char *)((long)param_5 + 0xd); goto LAB_0016238c; } LAB_00162390: if (uVar7 < ft_max_word_len) { *param_2 = (long)pbVar8; *param_5 = 1; return 1; } } if (uVar7 != 0) { *param_2 = (long)pbVar8; *param_5 = 4; return 4; } } while( true ); }
61,942
MatrixSubtract
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixSubtract(Matrix left, Matrix right) { Matrix result = { 0 }; result.m0 = left.m0 - right.m0; result.m1 = left.m1 - right.m1; result.m2 = left.m2 - right.m2; result.m3 = left.m3 - right.m3; result.m4 = left.m4 - right.m4; result.m5 = left.m5 - right.m5; result.m6 = left.m6 - right.m6; result.m7 = left.m7 - right.m7; result.m8 = left.m8 - right.m8; result.m9 = left.m9 - right.m9; result.m10 = left.m10 - right.m10; result.m11 = left.m11 - right.m11; result.m12 = left.m12 - right.m12; result.m13 = left.m13 - right.m13; result.m14 = left.m14 - right.m14; result.m15 = left.m15 - right.m15; return result; }
O0
c
MatrixSubtract: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rdi, %rax movq %rax, -0x8(%rbp) leaq 0x50(%rbp), %rax movq %rax, -0x18(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x20(%rbp) xorl %esi, %esi movl $0x40, %edx callq 0xa2d0 movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movss (%rdx), %xmm0 subss (%rcx), %xmm0 movss %xmm0, (%rdi) movss 0x10(%rdx), %xmm0 subss 0x10(%rcx), %xmm0 movss %xmm0, 0x10(%rdi) movss 0x20(%rdx), %xmm0 subss 0x20(%rcx), %xmm0 movss %xmm0, 0x20(%rdi) movss 0x30(%rdx), %xmm0 subss 0x30(%rcx), %xmm0 movss %xmm0, 0x30(%rdi) movss 0x4(%rdx), %xmm0 subss 0x4(%rcx), %xmm0 movss %xmm0, 0x4(%rdi) movss 0x14(%rdx), %xmm0 subss 0x14(%rcx), %xmm0 movss %xmm0, 0x14(%rdi) movss 0x24(%rdx), %xmm0 subss 0x24(%rcx), %xmm0 movss %xmm0, 0x24(%rdi) movss 0x34(%rdx), %xmm0 subss 0x34(%rcx), %xmm0 movss %xmm0, 0x34(%rdi) movss 0x8(%rdx), %xmm0 subss 0x8(%rcx), %xmm0 movss %xmm0, 0x8(%rdi) movss 0x18(%rdx), %xmm0 subss 0x18(%rcx), %xmm0 movss %xmm0, 0x18(%rdi) movss 0x28(%rdx), %xmm0 subss 0x28(%rcx), %xmm0 movss %xmm0, 0x28(%rdi) movss 0x38(%rdx), %xmm0 subss 0x38(%rcx), %xmm0 movss %xmm0, 0x38(%rdi) movss 0xc(%rdx), %xmm0 subss 0xc(%rcx), %xmm0 movss %xmm0, 0xc(%rdi) movss 0x1c(%rdx), %xmm0 subss 0x1c(%rcx), %xmm0 movss %xmm0, 0x1c(%rdi) movss 0x2c(%rdx), %xmm0 subss 0x2c(%rcx), %xmm0 movss %xmm0, 0x2c(%rdi) movss 0x3c(%rdx), %xmm0 subss 0x3c(%rcx), %xmm0 movss %xmm0, 0x3c(%rdi) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
MatrixSubtract: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, rdi mov [rbp+var_8], rax lea rax, [rbp+arg_40] mov [rbp+var_18], rax lea rax, [rbp+arg_0] mov [rbp+var_20], rax xor esi, esi mov edx, 40h ; '@' call _memset mov rdx, [rbp+var_20] mov rcx, [rbp+var_18] mov rdi, [rbp+var_10] mov rax, [rbp+var_8] movss xmm0, dword ptr [rdx] subss xmm0, dword ptr [rcx] movss dword ptr [rdi], xmm0 movss xmm0, dword ptr [rdx+10h] subss xmm0, dword ptr [rcx+10h] movss dword ptr [rdi+10h], xmm0 movss xmm0, dword ptr [rdx+20h] subss xmm0, dword ptr [rcx+20h] movss dword ptr [rdi+20h], xmm0 movss xmm0, dword ptr [rdx+30h] subss xmm0, dword ptr [rcx+30h] movss dword ptr [rdi+30h], xmm0 movss xmm0, dword ptr [rdx+4] subss xmm0, dword ptr [rcx+4] movss dword ptr [rdi+4], xmm0 movss xmm0, dword ptr [rdx+14h] subss xmm0, dword ptr [rcx+14h] movss dword ptr [rdi+14h], xmm0 movss xmm0, dword ptr [rdx+24h] subss xmm0, dword ptr [rcx+24h] movss dword ptr [rdi+24h], xmm0 movss xmm0, dword ptr [rdx+34h] subss xmm0, dword ptr [rcx+34h] movss dword ptr [rdi+34h], xmm0 movss xmm0, dword ptr [rdx+8] subss xmm0, dword ptr [rcx+8] movss dword ptr [rdi+8], xmm0 movss xmm0, dword ptr [rdx+18h] subss xmm0, dword ptr [rcx+18h] movss dword ptr [rdi+18h], xmm0 movss xmm0, dword ptr [rdx+28h] subss xmm0, dword ptr [rcx+28h] movss dword ptr [rdi+28h], xmm0 movss xmm0, dword ptr [rdx+38h] subss xmm0, dword ptr [rcx+38h] movss dword ptr [rdi+38h], xmm0 movss xmm0, dword ptr [rdx+0Ch] subss xmm0, dword ptr [rcx+0Ch] movss dword ptr [rdi+0Ch], xmm0 movss xmm0, dword ptr [rdx+1Ch] subss xmm0, dword ptr [rcx+1Ch] movss dword ptr [rdi+1Ch], xmm0 movss xmm0, dword ptr [rdx+2Ch] subss xmm0, dword ptr [rcx+2Ch] movss dword ptr [rdi+2Ch], xmm0 movss xmm0, dword ptr [rdx+3Ch] subss xmm0, dword ptr [rcx+3Ch] movss dword ptr [rdi+3Ch], xmm0 add rsp, 20h pop rbp retn
float * MatrixSubtract( float *a1, long long a2, long long a3, long long a4, long long a5, long long a6, double a7, double a8, double a9, double a10, double a11, double a12, double a13, double a14, double a15, double a16, double a17, double a18, double a19, double a20, double a21, double a22, double a23, long long a24, long long a25, long long a26, long long a27, long long a28, long long a29, long long a30) { float *result; // rax memset(a1, 0LL, 64LL); result = a1; *a1 = *(float *)&a15 - *(float *)&a23; a1[4] = *(float *)&a17 - *(float *)&a25; a1[8] = *(float *)&a19 - *(float *)&a27; a1[12] = *(float *)&a21 - *(float *)&a29; a1[1] = *((float *)&a15 + 1) - *((float *)&a23 + 1); a1[5] = *((float *)&a17 + 1) - *((float *)&a25 + 1); a1[9] = *((float *)&a19 + 1) - *((float *)&a27 + 1); a1[13] = *((float *)&a21 + 1) - *((float *)&a29 + 1); a1[2] = *(float *)&a16 - *(float *)&a24; a1[6] = *(float *)&a18 - *(float *)&a26; a1[10] = *(float *)&a20 - *(float *)&a28; a1[14] = *(float *)&a22 - *(float *)&a30; a1[3] = *((float *)&a16 + 1) - *((float *)&a24 + 1); a1[7] = *((float *)&a18 + 1) - *((float *)&a26 + 1); a1[11] = *((float *)&a20 + 1) - *((float *)&a28 + 1); a1[15] = *((float *)&a22 + 1) - *((float *)&a30 + 1); return result; }
MatrixSubtract: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x8],RAX LEA RAX,[RBP + 0x50] MOV qword ptr [RBP + -0x18],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x20],RAX XOR ESI,ESI MOV EDX,0x40 CALL 0x0010a2d0 MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RDX] SUBSS XMM0,dword ptr [RCX] MOVSS dword ptr [RDI],XMM0 MOVSS XMM0,dword ptr [RDX + 0x10] SUBSS XMM0,dword ptr [RCX + 0x10] MOVSS dword ptr [RDI + 0x10],XMM0 MOVSS XMM0,dword ptr [RDX + 0x20] SUBSS XMM0,dword ptr [RCX + 0x20] MOVSS dword ptr [RDI + 0x20],XMM0 MOVSS XMM0,dword ptr [RDX + 0x30] SUBSS XMM0,dword ptr [RCX + 0x30] MOVSS dword ptr [RDI + 0x30],XMM0 MOVSS XMM0,dword ptr [RDX + 0x4] SUBSS XMM0,dword ptr [RCX + 0x4] MOVSS dword ptr [RDI + 0x4],XMM0 MOVSS XMM0,dword ptr [RDX + 0x14] SUBSS XMM0,dword ptr [RCX + 0x14] MOVSS dword ptr [RDI + 0x14],XMM0 MOVSS XMM0,dword ptr [RDX + 0x24] SUBSS XMM0,dword ptr [RCX + 0x24] MOVSS dword ptr [RDI + 0x24],XMM0 MOVSS XMM0,dword ptr [RDX + 0x34] SUBSS XMM0,dword ptr [RCX + 0x34] MOVSS dword ptr [RDI + 0x34],XMM0 MOVSS XMM0,dword ptr [RDX + 0x8] SUBSS XMM0,dword ptr [RCX + 0x8] MOVSS dword ptr [RDI + 0x8],XMM0 MOVSS XMM0,dword ptr [RDX + 0x18] SUBSS XMM0,dword ptr [RCX + 0x18] MOVSS dword ptr [RDI + 0x18],XMM0 MOVSS XMM0,dword ptr [RDX + 0x28] SUBSS XMM0,dword ptr [RCX + 0x28] MOVSS dword ptr [RDI + 0x28],XMM0 MOVSS XMM0,dword ptr [RDX + 0x38] SUBSS XMM0,dword ptr [RCX + 0x38] MOVSS dword ptr [RDI + 0x38],XMM0 MOVSS XMM0,dword ptr [RDX + 0xc] SUBSS XMM0,dword ptr [RCX + 0xc] MOVSS dword ptr [RDI + 0xc],XMM0 MOVSS XMM0,dword ptr [RDX + 0x1c] SUBSS XMM0,dword ptr [RCX + 0x1c] MOVSS dword ptr [RDI + 0x1c],XMM0 MOVSS XMM0,dword ptr [RDX + 0x2c] SUBSS XMM0,dword ptr [RCX + 0x2c] MOVSS dword ptr [RDI + 0x2c],XMM0 MOVSS XMM0,dword ptr [RDX + 0x3c] SUBSS XMM0,dword ptr [RCX + 0x3c] MOVSS dword ptr [RDI + 0x3c],XMM0 ADD RSP,0x20 POP RBP RET
float * MatrixSubtract(float *param_1) { float fStack0000000000000008; float fStack000000000000000c; float fStack0000000000000010; float fStack0000000000000014; float fStack0000000000000018; float fStack000000000000001c; float fStack0000000000000020; float fStack0000000000000024; float fStack0000000000000028; float fStack000000000000002c; float fStack0000000000000030; float fStack0000000000000034; float fStack0000000000000038; float fStack000000000000003c; float fStack0000000000000040; float fStack0000000000000044; float fStack0000000000000048; float fStack000000000000004c; float fStack0000000000000050; float fStack0000000000000054; float fStack0000000000000058; float fStack000000000000005c; float fStack0000000000000060; float fStack0000000000000064; float fStack0000000000000068; float fStack000000000000006c; float fStack0000000000000070; float fStack0000000000000074; float fStack0000000000000078; float fStack000000000000007c; float fStack0000000000000080; float fStack0000000000000084; memset(param_1,0,0x40); *param_1 = fStack0000000000000008 - fStack0000000000000048; param_1[4] = fStack0000000000000018 - fStack0000000000000058; param_1[8] = fStack0000000000000028 - fStack0000000000000068; param_1[0xc] = fStack0000000000000038 - fStack0000000000000078; param_1[1] = fStack000000000000000c - fStack000000000000004c; param_1[5] = fStack000000000000001c - fStack000000000000005c; param_1[9] = fStack000000000000002c - fStack000000000000006c; param_1[0xd] = fStack000000000000003c - fStack000000000000007c; param_1[2] = fStack0000000000000010 - fStack0000000000000050; param_1[6] = fStack0000000000000020 - fStack0000000000000060; param_1[10] = fStack0000000000000030 - fStack0000000000000070; param_1[0xe] = fStack0000000000000040 - fStack0000000000000080; param_1[3] = fStack0000000000000014 - fStack0000000000000054; param_1[7] = fStack0000000000000024 - fStack0000000000000064; param_1[0xb] = fStack0000000000000034 - fStack0000000000000074; param_1[0xf] = fStack0000000000000044 - fStack0000000000000084; return param_1; }
61,943
wild_compare
eloqsql/mysys/mf_wcomp.c
int wild_compare(register const char *str, register const char *wildstr, pbool str_is_pattern) { char cmp; DBUG_ENTER("wild_compare"); while (*wildstr) { while (*wildstr && *wildstr != wild_many && *wildstr != wild_one) { if (*wildstr == wild_prefix && wildstr[1]) { wildstr++; if (str_is_pattern && *str++ != wild_prefix) DBUG_RETURN(1); } if (*wildstr++ != *str++) DBUG_RETURN(1); } if (! *wildstr ) DBUG_RETURN(*str != 0); if (*wildstr++ == wild_one) { if (! *str || (str_is_pattern && *str == wild_many)) DBUG_RETURN(1); /* One char; skip */ if (*str++ == wild_prefix && str_is_pattern && *str) str++; } else { /* Found '*' */ while (str_is_pattern && *str == wild_many) str++; for (; *wildstr == wild_many || *wildstr == wild_one; wildstr++) if (*wildstr == wild_many) { while (str_is_pattern && *str == wild_many) str++; } else { if (str_is_pattern && *str == wild_prefix && str[1]) str+=2; else if (! *str++) DBUG_RETURN (1); } if (!*wildstr) DBUG_RETURN(0); /* '*' as last char: OK */ if ((cmp= *wildstr) == wild_prefix && wildstr[1] && !str_is_pattern) cmp=wildstr[1]; for (;;str++) { while (*str && *str != cmp) str++; if (!*str) DBUG_RETURN (1); if (wild_compare(str,wildstr,str_is_pattern) == 0) DBUG_RETURN (0); } /* We will never come here */ } } DBUG_RETURN (*str != 0); }
O3
c
wild_compare: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movb (%rsi), %dil testb %dil, %dil je 0x98227 movq %rsi, %r14 leaq 0x34d0d9(%rip), %rax # 0x3e5218 movb (%rax), %cl leaq 0x34d0d1(%rip), %rax # 0x3e5219 movb (%rax), %sil leaq 0x3d056f(%rip), %rax # 0x4686c1 movb (%rax), %al movl $0x1, %r15d cmpb %cl, %dil sete %r8b cmpb %sil, %dil sete %r9b orb %r8b, %r9b je 0x98172 incq %r14 jmp 0x981d6 cmpb %al, %dil jne 0x98194 testb %dl, %dl sete %dil leaq 0x1(%r14), %r8 cmpb $0x0, 0x1(%r14) sete %r9b je 0x9818f movq %r8, %r14 orb %dil, %r9b je 0x98199 movq %r14, %r8 jmp 0x981a4 cmpb %al, (%rbx) jne 0x9830e incq %rbx movb (%r8), %dil cmpb (%rbx), %dil jne 0x9830e incq %rbx movb 0x1(%r8), %dil testb %dil, %dil je 0x981ca cmpb %cl, %dil je 0x981ca leaq 0x1(%r8), %r14 cmpb %sil, %dil jne 0x98172 testb %dil, %dil je 0x98227 addq $0x2, %r8 movq %r8, %r14 cmpb %sil, %dil jne 0x9823a testb %dl, %dl setne %r8b movb (%rbx), %dil cmpb %cl, %dil sete %r9b testb %dil, %dil je 0x98314 andb %r9b, %r8b jne 0x98314 leaq 0x1(%rbx), %r8 testb %dl, %dl je 0x98216 cmpb %al, %dil jne 0x98216 leaq 0x2(%rbx), %rdi cmpb $0x0, 0x1(%rbx) cmovneq %rdi, %r8 movb (%r14), %dil movq %r8, %rbx testb %dil, %dil jne 0x9815a jmp 0x9822a movq %rbx, %r8 xorl %r15d, %r15d cmpb $0x0, (%r8) setne %r15b jmp 0x98314 testb %dl, %dl je 0x98250 decq %rbx movq %rbx, %rdi leaq 0x1(%rdi), %rbx cmpb %cl, 0x1(%rdi) movq %rbx, %rdi je 0x98244 movb (%r14), %r13b cmpb %cl, %r13b sete %dil cmpb %sil, %r13b sete %r8b orb %dil, %r8b cmpb $0x1, %r8b jne 0x982c2 testb $0x1, %dil je 0x98288 testb %dl, %dl je 0x982a8 decq %rbx movq %rbx, %rdi leaq 0x1(%rdi), %rbx cmpb %cl, 0x1(%rdi) movq %rbx, %rdi je 0x9827a jmp 0x982a8 movb (%rbx), %dil testb %dl, %dl je 0x982a0 cmpb %al, %dil jne 0x982a0 cmpb $0x0, 0x1(%rbx) je 0x982a0 addq $0x2, %rbx jmp 0x982a8 testb %dil, %dil je 0x9830e incq %rbx movb 0x1(%r14), %r13b incq %r14 cmpb %cl, %r13b sete %dil cmpb %sil, %r13b sete %r8b orb %dil, %r8b jne 0x9826a xorl %r15d, %r15d testb %r13b, %r13b je 0x98314 cmpb %al, %r13b jne 0x982e4 movzbl 0x1(%r14), %r13d testb %r13b, %r13b movzbl %al, %eax cmovel %eax, %r13d testb %dl, %dl cmovnel %eax, %r13d movsbl %dl, %r12d movq %rbx, %rdi movb (%rbx), %al incq %rbx testb %al, %al je 0x982f9 cmpb %r13b, %al jne 0x982e8 testb %al, %al je 0x9830e movq %r14, %rsi movl %r12d, %edx callq 0x98118 testl %eax, %eax jne 0x982e8 jmp 0x98314 movl $0x1, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
wild_compare: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov dil, [rsi] test dil, dil jz loc_98227 mov r14, rsi lea rax, wild_many mov cl, [rax] lea rax, wild_one mov sil, [rax] lea rax, wild_prefix mov al, [rax] mov r15d, 1 loc_9815A: cmp dil, cl setz r8b cmp dil, sil setz r9b or r9b, r8b jz short loc_98172 inc r14 jmp short loc_981D6 loc_98172: cmp dil, al jnz short loc_98194 test dl, dl setz dil lea r8, [r14+1] cmp byte ptr [r14+1], 0 setz r9b jz short loc_9818F mov r14, r8 loc_9818F: or r9b, dil jz short loc_98199 loc_98194: mov r8, r14 jmp short loc_981A4 loc_98199: cmp [rbx], al jnz loc_9830E inc rbx loc_981A4: mov dil, [r8] cmp dil, [rbx] jnz loc_9830E inc rbx mov dil, [r8+1] test dil, dil jz short loc_981CA cmp dil, cl jz short loc_981CA lea r14, [r8+1] cmp dil, sil jnz short loc_98172 loc_981CA: test dil, dil jz short loc_98227 add r8, 2 mov r14, r8 loc_981D6: cmp dil, sil jnz short loc_9823A test dl, dl setnz r8b mov dil, [rbx] cmp dil, cl setz r9b test dil, dil jz loc_98314 and r8b, r9b jnz loc_98314 lea r8, [rbx+1] test dl, dl jz short loc_98216 cmp dil, al jnz short loc_98216 lea rdi, [rbx+2] cmp byte ptr [rbx+1], 0 cmovnz r8, rdi loc_98216: mov dil, [r14] mov rbx, r8 test dil, dil jnz loc_9815A jmp short loc_9822A loc_98227: mov r8, rbx loc_9822A: xor r15d, r15d cmp byte ptr [r8], 0 setnz r15b jmp loc_98314 loc_9823A: test dl, dl jz short loc_98250 dec rbx mov rdi, rbx loc_98244: lea rbx, [rdi+1] cmp [rdi+1], cl mov rdi, rbx jz short loc_98244 loc_98250: mov r13b, [r14] cmp r13b, cl setz dil cmp r13b, sil setz r8b or r8b, dil cmp r8b, 1 jnz short loc_982C2 loc_9826A: test dil, 1 jz short loc_98288 test dl, dl jz short loc_982A8 dec rbx mov rdi, rbx loc_9827A: lea rbx, [rdi+1] cmp [rdi+1], cl mov rdi, rbx jz short loc_9827A jmp short loc_982A8 loc_98288: mov dil, [rbx] test dl, dl jz short loc_982A0 cmp dil, al jnz short loc_982A0 cmp byte ptr [rbx+1], 0 jz short loc_982A0 add rbx, 2 jmp short loc_982A8 loc_982A0: test dil, dil jz short loc_9830E inc rbx loc_982A8: mov r13b, [r14+1] inc r14 cmp r13b, cl setz dil cmp r13b, sil setz r8b or r8b, dil jnz short loc_9826A loc_982C2: xor r15d, r15d test r13b, r13b jz short loc_98314 cmp r13b, al jnz short loc_982E4 movzx r13d, byte ptr [r14+1] test r13b, r13b movzx eax, al cmovz r13d, eax test dl, dl cmovnz r13d, eax loc_982E4: movsx r12d, dl loc_982E8: mov rdi, rbx mov al, [rbx] inc rbx test al, al jz short loc_982F9 cmp al, r13b jnz short loc_982E8 loc_982F9: test al, al jz short loc_9830E mov rsi, r14 mov edx, r12d call wild_compare test eax, eax jnz short loc_982E8 jmp short loc_98314 loc_9830E: mov r15d, 1 loc_98314: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long wild_compare(char *a1, _BYTE *a2, char a3) { char v4; // di _BYTE *v5; // r14 unsigned int v6; // r15d _BYTE *v7; // r8 bool v8; // r9 char *v9; // r8 char *v10; // rdi bool v11; // zf char v12; // r13 bool v13; // di char *v14; // rdi char v15; // di unsigned int v16; // r12d char *v17; // rdi char v18; // al v4 = *a2; if ( *a2 ) { v5 = a2; v6 = 1; while ( 1 ) { if ( v4 != wild_many && v4 != wild_one ) { while ( 1 ) { if ( v4 != wild_prefix ) goto LABEL_9; v7 = v5 + 1; v8 = v5[1] == 0; if ( v5[1] ) ++v5; if ( a3 != 0 && !v8 ) { if ( *a1 != wild_prefix ) return 1; ++a1; } else { LABEL_9: v7 = v5; } if ( *v7 != *a1 ) return 1; ++a1; v4 = v7[1]; if ( v4 ) { if ( v4 != wild_many ) { v5 = v7 + 1; if ( v4 != wild_one ) continue; } } if ( !v4 ) goto LABEL_27; v5 = v7 + 2; goto LABEL_18; } } ++v5; LABEL_18: if ( v4 != wild_one ) break; if ( !*a1 || *a1 == wild_many && a3 != 0 ) return v6; v9 = a1 + 1; if ( a3 && *a1 == wild_prefix && a1[1] ) v9 = a1 + 2; v4 = *v5; a1 = v9; if ( !*v5 ) return *v9 != 0; } if ( a3 ) { v10 = a1 - 1; do { a1 = v10 + 1; v11 = *++v10 == wild_many; } while ( v11 ); } v12 = *v5; v13 = *v5 == wild_many; if ( v13 || *v5 == wild_one ) { do { if ( v13 ) { if ( a3 ) { v14 = a1 - 1; do { a1 = v14 + 1; v11 = *++v14 == wild_many; } while ( v11 ); } } else { v15 = *a1; if ( a3 && v15 == wild_prefix && a1[1] ) { a1 += 2; } else { if ( !v15 ) return 1; ++a1; } } v12 = *++v5; v13 = v12 == wild_many; } while ( v12 == wild_many || v12 == wild_one ); } v6 = 0; if ( v12 ) { if ( v12 == wild_prefix ) { v12 = v5[1]; if ( !v12 ) v12 = wild_prefix; if ( a3 ) v12 = wild_prefix; } v16 = a3; while ( 1 ) { do { v17 = a1; v18 = *a1++; } while ( v18 && v18 != v12 ); if ( !v18 ) break; if ( !(unsigned int)wild_compare(v17, v5, v16) ) return v6; } return 1; } } else { LABEL_27: v9 = a1; return *v9 != 0; } return v6; }
wild_compare: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV DIL,byte ptr [RSI] TEST DIL,DIL JZ 0x00198227 MOV R14,RSI LEA RAX,[0x4e5218] MOV CL,byte ptr [RAX] LEA RAX,[0x4e5219] MOV SIL,byte ptr [RAX] LEA RAX,[0x5686c1] MOV AL,byte ptr [RAX] MOV R15D,0x1 LAB_0019815a: CMP DIL,CL SETZ R8B CMP DIL,SIL SETZ R9B OR R9B,R8B JZ 0x00198172 INC R14 JMP 0x001981d6 LAB_00198172: CMP DIL,AL JNZ 0x00198194 TEST DL,DL SETZ DIL LEA R8,[R14 + 0x1] CMP byte ptr [R14 + 0x1],0x0 SETZ R9B JZ 0x0019818f MOV R14,R8 LAB_0019818f: OR R9B,DIL JZ 0x00198199 LAB_00198194: MOV R8,R14 JMP 0x001981a4 LAB_00198199: CMP byte ptr [RBX],AL JNZ 0x0019830e INC RBX LAB_001981a4: MOV DIL,byte ptr [R8] CMP DIL,byte ptr [RBX] JNZ 0x0019830e INC RBX MOV DIL,byte ptr [R8 + 0x1] TEST DIL,DIL JZ 0x001981ca CMP DIL,CL JZ 0x001981ca LEA R14,[R8 + 0x1] CMP DIL,SIL JNZ 0x00198172 LAB_001981ca: TEST DIL,DIL JZ 0x00198227 ADD R8,0x2 MOV R14,R8 LAB_001981d6: CMP DIL,SIL JNZ 0x0019823a TEST DL,DL SETNZ R8B MOV DIL,byte ptr [RBX] CMP DIL,CL SETZ R9B TEST DIL,DIL JZ 0x00198314 AND R8B,R9B JNZ 0x00198314 LEA R8,[RBX + 0x1] TEST DL,DL JZ 0x00198216 CMP DIL,AL JNZ 0x00198216 LEA RDI,[RBX + 0x2] CMP byte ptr [RBX + 0x1],0x0 CMOVNZ R8,RDI LAB_00198216: MOV DIL,byte ptr [R14] MOV RBX,R8 TEST DIL,DIL JNZ 0x0019815a JMP 0x0019822a LAB_00198227: MOV R8,RBX LAB_0019822a: XOR R15D,R15D CMP byte ptr [R8],0x0 SETNZ R15B JMP 0x00198314 LAB_0019823a: TEST DL,DL JZ 0x00198250 DEC RBX MOV RDI,RBX LAB_00198244: LEA RBX,[RDI + 0x1] CMP byte ptr [RDI + 0x1],CL MOV RDI,RBX JZ 0x00198244 LAB_00198250: MOV R13B,byte ptr [R14] CMP R13B,CL SETZ DIL CMP R13B,SIL SETZ R8B OR R8B,DIL CMP R8B,0x1 JNZ 0x001982c2 LAB_0019826a: TEST DIL,0x1 JZ 0x00198288 TEST DL,DL JZ 0x001982a8 DEC RBX MOV RDI,RBX LAB_0019827a: LEA RBX,[RDI + 0x1] CMP byte ptr [RDI + 0x1],CL MOV RDI,RBX JZ 0x0019827a JMP 0x001982a8 LAB_00198288: MOV DIL,byte ptr [RBX] TEST DL,DL JZ 0x001982a0 CMP DIL,AL JNZ 0x001982a0 CMP byte ptr [RBX + 0x1],0x0 JZ 0x001982a0 ADD RBX,0x2 JMP 0x001982a8 LAB_001982a0: TEST DIL,DIL JZ 0x0019830e INC RBX LAB_001982a8: MOV R13B,byte ptr [R14 + 0x1] INC R14 CMP R13B,CL SETZ DIL CMP R13B,SIL SETZ R8B OR R8B,DIL JNZ 0x0019826a LAB_001982c2: XOR R15D,R15D TEST R13B,R13B JZ 0x00198314 CMP R13B,AL JNZ 0x001982e4 MOVZX R13D,byte ptr [R14 + 0x1] TEST R13B,R13B MOVZX EAX,AL CMOVZ R13D,EAX TEST DL,DL CMOVNZ R13D,EAX LAB_001982e4: MOVSX R12D,DL LAB_001982e8: MOV RDI,RBX MOV AL,byte ptr [RBX] INC RBX TEST AL,AL JZ 0x001982f9 CMP AL,R13B JNZ 0x001982e8 LAB_001982f9: TEST AL,AL JZ 0x0019830e MOV RSI,R14 MOV EDX,R12D CALL 0x00198118 TEST EAX,EAX JNZ 0x001982e8 JMP 0x00198314 LAB_0019830e: MOV R15D,0x1 LAB_00198314: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Type propagation algorithm not settling */ bool wild_compare(char *param_1,char *param_2,char param_3) { char *pcVar1; char *pcVar2; char cVar3; int iVar4; char cVar5; char *pcVar6; bool bVar7; cVar5 = *param_2; joined_r0x0019812f: if (cVar5 == '\0') { LAB_0019822a: return *param_1 != '\0'; } if (cVar5 == wild_one || cVar5 == wild_many) { param_2 = param_2 + 1; } else { do { pcVar6 = param_2; if (cVar5 == wild_prefix) { pcVar2 = pcVar6 + 1; pcVar1 = pcVar6 + 1; if (*pcVar1 != '\0') { pcVar6 = pcVar2; } if (*pcVar1 != '\0' && param_3 != '\0') { if (*param_1 != wild_prefix) { return true; } param_1 = param_1 + 1; pcVar6 = pcVar2; } } if (*pcVar6 != *param_1) { return true; } param_1 = param_1 + 1; cVar5 = pcVar6[1]; } while (((cVar5 != '\0') && (cVar5 != wild_many)) && (param_2 = pcVar6 + 1, cVar5 != wild_one)) ; if (cVar5 == '\0') goto LAB_0019822a; param_2 = pcVar6 + 2; } if (cVar5 == wild_one) { cVar5 = *param_1; if (cVar5 == '\0') { return true; } if (param_3 != '\0' && cVar5 == wild_many) { return true; } pcVar6 = param_1 + 1; if (((param_3 != '\0') && (cVar5 == wild_prefix)) && (param_1[1] != '\0')) { pcVar6 = param_1 + 2; } cVar5 = *param_2; param_1 = pcVar6; goto joined_r0x0019812f; } if (param_3 != '\0') { pcVar6 = param_1 + -1; do { param_1 = pcVar6 + 1; pcVar2 = pcVar6 + 1; pcVar6 = param_1; } while (*pcVar2 == wild_many); } cVar5 = *param_2; bVar7 = cVar5 == wild_many; if (cVar5 == wild_one || bVar7) { do { if (bVar7) { if (param_3 != '\0') { pcVar6 = param_1 + -1; do { param_1 = pcVar6 + 1; pcVar2 = pcVar6 + 1; pcVar6 = param_1; } while (*pcVar2 == wild_many); } } else if (((param_3 == '\0') || (*param_1 != wild_prefix)) || (param_1[1] == '\0')) { if (*param_1 == '\0') { return true; } param_1 = param_1 + 1; } else { param_1 = param_1 + 2; } cVar5 = param_2[1]; param_2 = param_2 + 1; bVar7 = cVar5 == wild_many; } while (cVar5 == wild_one || bVar7); } if (cVar5 == '\0') { return false; } if (cVar5 == wild_prefix) { cVar5 = param_2[1]; if (param_2[1] == '\0') { cVar5 = wild_prefix; } if (param_3 != '\0') { cVar5 = wild_prefix; } } LAB_001982e8: do { pcVar6 = param_1; cVar3 = *pcVar6; param_1 = pcVar6 + 1; if (cVar3 != '\0') { if (cVar3 != cVar5) goto LAB_001982e8; } if (cVar3 == '\0') { return true; } iVar4 = wild_compare(pcVar6,param_2,(int)param_3); if (iVar4 == 0) { return false; } } while( true ); }
61,944
my_collation_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_collation_get_by_name(MY_CHARSET_LOADER *loader, const char *name, myf flags) { uint cs_number; CHARSET_INFO *cs; my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_collation_number(name,flags); my_charset_loader_init_mysys(loader); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file); } return cs; }
O3
c
my_collation_get_by_name: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0xb754bb(%rip), %rdi # 0xc09670 leaq -0x7e1(%rip), %rsi # 0x939db callq 0x29220 movq %rbx, %rdi movq %r14, %rsi callq 0x9392f movb $0x0, (%r15) leaq -0xfc9(%rip), %rcx # 0x9320e movq %rcx, 0x80(%r15) leaq -0xfc8(%rip), %rcx # 0x9321d movq %rcx, 0x88(%r15) leaq -0xfbb(%rip), %rcx # 0x93238 movq %rcx, 0x90(%r15) leaq 0xd211(%rip), %rcx # 0xa1412 movq %rcx, 0x98(%r15) leaq 0x2f34e1(%rip), %rcx # 0x3876f0 movq (%rcx), %rcx movq %rcx, 0xa0(%r15) leaq -0xfca(%rip), %rcx # 0x93256 movq %rcx, 0xa8(%r15) testl %eax, %eax je 0x9423d movq %r15, %rdi movl %eax, %esi movq %r14, %rdx callq 0x93e6a movq %rax, %r15 jmp 0x94240 xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x9428a leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x9379b movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movl $0x4, %esi movl $0x1c, %edi movq %rbx, %rdx movq %r14, %rcx xorl %eax, %eax callq 0x9f467 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x942aa movq %r15, %rax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29250
my_collation_get_by_name: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 218h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_20], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, rbx mov rsi, r14 call get_collation_number mov byte ptr [r15], 0 lea rcx, my_once_alloc_c mov [r15+80h], rcx lea rcx, my_malloc_c mov [r15+88h], rcx lea rcx, my_realloc_c mov [r15+90h], rcx lea rcx, my_free mov [r15+98h], rcx lea rcx, my_charset_error_reporter mov rcx, [rcx] mov [r15+0A0h], rcx lea rcx, add_collation mov [r15+0A8h], rcx test eax, eax jz short loc_9423D mov rdi, r15 mov esi, eax mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_94240 loc_9423D: xor r15d, r15d loc_94240: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_9428A lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov esi, 4 mov edi, 1Ch mov rdx, rbx mov rcx, r14 xor eax, eax call my_error loc_9428A: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_942AA mov rax, r15 add rsp, 218h pop rbx pop r14 pop r15 pop rbp retn loc_942AA: call ___stack_chk_fail
long long my_collation_get_by_name(long long a1, long long a2, long long a3) { unsigned int collation_number; // eax long long internal_charset; // r15 int v6; // r8d int v7; // r9d _BYTE v9[528]; // [rsp+0h] [rbp-230h] BYREF unsigned long long v10; // [rsp+210h] [rbp-20h] v10 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); collation_number = get_collation_number(a2, a3); *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 128) = my_once_alloc_c; *(_QWORD *)(a1 + 136) = my_malloc_c; *(_QWORD *)(a1 + 144) = my_realloc_c; *(_QWORD *)(a1 + 152) = my_free; *(_QWORD *)(a1 + 160) = my_charset_error_reporter; *(_QWORD *)(a1 + 168) = add_collation; if ( collation_number ) internal_charset = get_internal_charset(a1, collation_number, a3); else internal_charset = 0LL; if ( internal_charset == 0 && (a3 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v9), "Index.xml"); my_error(28, 4, a2, (unsigned int)v9, v6, v7); } return internal_charset; }
my_collation_get_by_name: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x218 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RDI,[0xd09670] LEA RSI,[0x1939db] CALL 0x00129220 MOV RDI,RBX MOV RSI,R14 CALL 0x0019392f MOV byte ptr [R15],0x0 LEA RCX,[0x19320e] MOV qword ptr [R15 + 0x80],RCX LEA RCX,[0x19321d] MOV qword ptr [R15 + 0x88],RCX LEA RCX,[0x193238] MOV qword ptr [R15 + 0x90],RCX LEA RCX,[0x1a1412] MOV qword ptr [R15 + 0x98],RCX LEA RCX,[0x4876f0] MOV RCX,qword ptr [RCX] MOV qword ptr [R15 + 0xa0],RCX LEA RCX,[0x193256] MOV qword ptr [R15 + 0xa8],RCX TEST EAX,EAX JZ 0x0019423d MOV RDI,R15 MOV ESI,EAX MOV RDX,R14 CALL 0x00193e6a MOV R15,RAX JMP 0x00194240 LAB_0019423d: XOR R15D,R15D LAB_00194240: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x0019428a LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0019379b MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV ESI,0x4 MOV EDI,0x1c MOV RDX,RBX MOV RCX,R14 XOR EAX,EAX CALL 0x0019f467 LAB_0019428a: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001942aa MOV RAX,R15 ADD RSP,0x218 POP RBX POP R14 POP R15 POP RBP RET LAB_001942aa: CALL 0x00129250
long my_collation_get_by_name(int1 *param_1,int8 param_2,ulong param_3) { int iVar1; long lVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_238 [528]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_collation_number(param_2,param_3); *param_1 = 0; *(code **)(param_1 + 0x80) = my_once_alloc_c; *(code **)(param_1 + 0x88) = my_malloc_c; *(code **)(param_1 + 0x90) = my_realloc_c; *(code **)(param_1 + 0x98) = my_free; *(int **)(param_1 + 0xa0) = my_charset_error_reporter; *(code **)(param_1 + 0xa8) = add_collation; if (iVar1 == 0) { lVar2 = 0; } else { lVar2 = get_internal_charset(param_1,iVar1,param_3); } if ((param_3 & 0x10) != 0 && lVar2 == 0) { puVar3 = (int8 *)get_charsets_dir(local_238); *puVar3 = 0x6d782e7865646e49; *(int2 *)(puVar3 + 1) = 0x6c; my_error(0x1c,4,param_2,local_238); } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,945
mysql_local_infile_read
eloqsql/libmariadb/libmariadb/ma_loaddata.c
static int mysql_local_infile_read(void *ptr, char * buf, unsigned int buf_len) { MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr; size_t count; count= ma_read((void *)buf, 1, (size_t)buf_len, info->fp); if (count == (size_t)-1) { info->error_no = errno; snprintf((char *)info->error_msg, sizeof(info->error_msg), CER(CR_FILE_READ), info->filename, info->error_no); } return((int)count); }
O3
c
mysql_local_infile_read: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rax movq %rdi, %rbx movl %edx, %edx movq (%rdi), %rcx movl $0x1, %esi movq %rax, %rdi callq 0x31a22 movq %rax, %r14 cmpq $-0x1, %rax jne 0x2b6cb callq 0x17050 movl (%rax), %eax movl %eax, 0x8(%rbx) leaq 0x208c0(%rip), %rcx # 0x4bf60 movq 0x28(%rcx), %r8 movq 0x210(%rbx), %r9 addq $0xc, %rbx movl %eax, (%rsp) movl $0x201, %esi # imm = 0x201 movl $0x201, %ecx # imm = 0x201 movq %rbx, %rdi movl $0x1, %edx xorl %eax, %eax callq 0x17380 movl %r14d, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
mysql_local_infile_read: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov rax, rsi mov rbx, rdi mov edx, edx mov rcx, [rdi] mov esi, 1 mov rdi, rax call ma_read mov r14, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_2B6CB call ___errno_location mov eax, [rax] mov [rbx+8], eax lea rcx, mariadb_client_errors mov r8, [rcx+28h] mov r9, [rbx+210h] add rbx, 0Ch mov [rsp+20h+var_20], eax mov esi, 201h mov ecx, 201h mov rdi, rbx mov edx, 1 xor eax, eax call ___snprintf_chk loc_2B6CB: mov eax, r14d add rsp, 10h pop rbx pop r14 pop rbp retn
long long mysql_local_infile_read(long long a1, long long a2, unsigned int a3) { long long v3; // r14 int v4; // eax v3 = ma_read(a2, 1LL, a3, *(_QWORD *)a1); if ( v3 == -1 ) { v4 = *(_DWORD *)__errno_location(a2); *(_DWORD *)(a1 + 8) = v4; __snprintf_chk(a1 + 12, 513LL, 1LL, 513LL, mariadb_client_errors[5], *(_QWORD *)(a1 + 528), v4); } return (unsigned int)v3; }
mysql_local_infile_read: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RAX,RSI MOV RBX,RDI MOV EDX,EDX MOV RCX,qword ptr [RDI] MOV ESI,0x1 MOV RDI,RAX CALL 0x00131a22 MOV R14,RAX CMP RAX,-0x1 JNZ 0x0012b6cb CALL 0x00117050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBX + 0x8],EAX LEA RCX,[0x14bf60] MOV R8,qword ptr [RCX + 0x28] MOV R9,qword ptr [RBX + 0x210] ADD RBX,0xc MOV dword ptr [RSP],EAX MOV ESI,0x201 MOV ECX,0x201 MOV RDI,RBX MOV EDX,0x1 XOR EAX,EAX CALL 0x00117380 LAB_0012b6cb: MOV EAX,R14D ADD RSP,0x10 POP RBX POP R14 POP RBP RET
ulong mysql_local_infile_read(int8 *param_1,int8 param_2,int4 param_3) { int iVar1; ulong uVar2; int *piVar3; uVar2 = ma_read(param_2,1,param_3,*param_1); if (uVar2 == 0xffffffffffffffff) { piVar3 = __errno_location(); iVar1 = *piVar3; *(int *)(param_1 + 1) = iVar1; __snprintf_chk((long)param_1 + 0xc,0x201,1,0x201,mariadb_client_errors._40_8_,param_1[0x42], iVar1); } return uVar2 & 0xffffffff; }
61,946
ma_tls_init
eloqsql/libmariadb/libmariadb/secure/openssl.c
void *ma_tls_init(MYSQL *mysql) { SSL *ssl= NULL; SSL_CTX *ctx= NULL; long default_options= SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; long options= 0; pthread_mutex_lock(&LOCK_openssl_config); #if OPENSSL_VERSION_NUMBER >= 0x10100000L if (!(ctx= SSL_CTX_new(TLS_client_method()))) #else if (!(ctx= SSL_CTX_new(SSLv23_client_method()))) #endif goto error; if (mysql->options.extension) options= ma_tls_version_options(mysql->options.extension->tls_version); SSL_CTX_set_options(ctx, options ? options : default_options); if (ma_tls_set_certs(mysql, ctx)) { goto error; } if (!(ssl= SSL_new(ctx))) goto error; if (!SSL_set_app_data(ssl, mysql)) goto error; pthread_mutex_unlock(&LOCK_openssl_config); return (void *)ssl; error: pthread_mutex_unlock(&LOCK_openssl_config); if (ctx) SSL_CTX_free(ctx); if (ssl) SSL_free(ssl); return NULL; }
O0
c
ma_tls_init: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq $0x0, -0x20(%rbp) movl $0x82000850, %eax # imm = 0x82000850 movq %rax, -0x28(%rbp) movq $0x0, -0x30(%rbp) leaq 0x2c57c(%rip), %rdi # 0x67070 callq 0x13670 callq 0x131f0 movq %rax, %rdi callq 0x13640 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x3ab15 jmp 0x3abc1 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x3ab3e movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0xc0(%rax), %rdi callq 0x3ac00 movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x30(%rbp) je 0x3ab57 movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x3ab5f movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x13800 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x3acf0 cmpl $0x0, %eax je 0x3ab80 jmp 0x3abc1 movq -0x20(%rbp), %rdi callq 0x13440 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x3ab95 jmp 0x3abc1 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x13140 cmpl $0x0, %eax jne 0x3abab jmp 0x3abc1 leaq 0x2c4be(%rip), %rdi # 0x67070 callq 0x13310 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3abf5 leaq 0x2c4a8(%rip), %rdi # 0x67070 callq 0x13310 cmpq $0x0, -0x20(%rbp) je 0x3abdd movq -0x20(%rbp), %rdi callq 0x13090 cmpq $0x0, -0x18(%rbp) je 0x3abed movq -0x18(%rbp), %rdi callq 0x13270 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
ma_tls_init: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], 0 mov [rbp+var_20], 0 mov eax, 82000850h mov [rbp+var_28], rax mov [rbp+var_30], 0 lea rdi, LOCK_openssl_config call _pthread_mutex_lock call _TLS_client_method mov rdi, rax call _SSL_CTX_new mov [rbp+var_20], rax cmp rax, 0 jnz short loc_3AB15 jmp loc_3ABC1 loc_3AB15: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_3AB3E mov rax, [rbp+var_10] mov rax, [rax+480h] mov rdi, [rax+0C0h] call ma_tls_version_options mov [rbp+var_30], rax loc_3AB3E: mov rax, [rbp+var_20] mov [rbp+var_38], rax cmp [rbp+var_30], 0 jz short loc_3AB57 mov rax, [rbp+var_30] mov [rbp+var_40], rax jmp short loc_3AB5F loc_3AB57: mov rax, [rbp+var_28] mov [rbp+var_40], rax loc_3AB5F: mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] call _SSL_CTX_set_options mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call ma_tls_set_certs cmp eax, 0 jz short loc_3AB80 jmp short loc_3ABC1 loc_3AB80: mov rdi, [rbp+var_20] call _SSL_new mov [rbp+var_18], rax cmp rax, 0 jnz short loc_3AB95 jmp short loc_3ABC1 loc_3AB95: mov rdi, [rbp+var_18] mov rdx, [rbp+var_10] xor esi, esi call _SSL_set_ex_data cmp eax, 0 jnz short loc_3ABAB jmp short loc_3ABC1 loc_3ABAB: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_3ABF5 loc_3ABC1: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock cmp [rbp+var_20], 0 jz short loc_3ABDD mov rdi, [rbp+var_20] call _SSL_CTX_free loc_3ABDD: cmp [rbp+var_18], 0 jz short loc_3ABED mov rdi, [rbp+var_18] call _SSL_free loc_3ABED: mov [rbp+var_8], 0 loc_3ABF5: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_tls_init(long long a1) { long long v1; // rax long long v3; // [rsp+10h] [rbp-30h] long long v4; // [rsp+20h] [rbp-20h] long long v5; // [rsp+28h] [rbp-18h] v5 = 0LL; v3 = 0LL; pthread_mutex_lock(&LOCK_openssl_config); v1 = TLS_client_method(); v4 = SSL_CTX_new(v1); if ( !v4 ) goto LABEL_11; if ( *(_QWORD *)(a1 + 1152) ) v3 = ma_tls_version_options(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 192LL)); if ( v3 ) SSL_CTX_set_options(v4, v3); else SSL_CTX_set_options(v4, 2181040208LL); if ( !(unsigned int)ma_tls_set_certs(a1, v4) && (v5 = SSL_new(v4)) != 0 && (unsigned int)SSL_set_ex_data(v5, 0LL, a1) ) { pthread_mutex_unlock(&LOCK_openssl_config); return v5; } else { LABEL_11: pthread_mutex_unlock(&LOCK_openssl_config); if ( v4 ) SSL_CTX_free(v4); if ( v5 ) SSL_free(v5); return 0LL; } }
ma_tls_init: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],0x0 MOV qword ptr [RBP + -0x20],0x0 MOV EAX,0x82000850 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x30],0x0 LEA RDI,[0x167070] CALL 0x00113670 CALL 0x001131f0 MOV RDI,RAX CALL 0x00113640 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0013ab15 JMP 0x0013abc1 LAB_0013ab15: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0013ab3e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RDI,qword ptr [RAX + 0xc0] CALL 0x0013ac00 MOV qword ptr [RBP + -0x30],RAX LAB_0013ab3e: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0013ab57 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX JMP 0x0013ab5f LAB_0013ab57: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_0013ab5f: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x40] CALL 0x00113800 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0013acf0 CMP EAX,0x0 JZ 0x0013ab80 JMP 0x0013abc1 LAB_0013ab80: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00113440 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0013ab95 JMP 0x0013abc1 LAB_0013ab95: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00113140 CMP EAX,0x0 JNZ 0x0013abab JMP 0x0013abc1 LAB_0013abab: LEA RDI,[0x167070] CALL 0x00113310 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013abf5 LAB_0013abc1: LEA RDI,[0x167070] CALL 0x00113310 CMP qword ptr [RBP + -0x20],0x0 JZ 0x0013abdd MOV RDI,qword ptr [RBP + -0x20] CALL 0x00113090 LAB_0013abdd: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013abed MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113270 LAB_0013abed: MOV qword ptr [RBP + -0x8],0x0 LAB_0013abf5: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
SSL * ma_tls_init(void *param_1) { int iVar1; SSL_METHOD *meth; SSL_CTX *ctx; long local_48; long local_38; SSL *local_20; local_20 = (SSL *)0x0; local_38 = 0; pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config); meth = (SSL_METHOD *)TLS_client_method(); ctx = SSL_CTX_new(meth); if (ctx != (SSL_CTX *)0x0) { if (*(long *)((long)param_1 + 0x480) != 0) { local_38 = ma_tls_version_options(*(int8 *)(*(long *)((long)param_1 + 0x480) + 0xc0)); } if (local_38 == 0) { local_48 = 0x82000850; } else { local_48 = local_38; } SSL_CTX_set_options(ctx,local_48); iVar1 = ma_tls_set_certs(param_1); if (((iVar1 == 0) && (local_20 = SSL_new(ctx), local_20 != (SSL *)0x0)) && (iVar1 = SSL_set_ex_data(local_20,0,param_1), iVar1 != 0)) { pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); return local_20; } } pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); if (ctx != (SSL_CTX *)0x0) { SSL_CTX_free(ctx); } if (local_20 != (SSL *)0x0) { SSL_free(local_20); } return (SSL *)0x0; }
61,947
ma_tls_init
eloqsql/libmariadb/libmariadb/secure/openssl.c
void *ma_tls_init(MYSQL *mysql) { SSL *ssl= NULL; SSL_CTX *ctx= NULL; long default_options= SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; long options= 0; pthread_mutex_lock(&LOCK_openssl_config); #if OPENSSL_VERSION_NUMBER >= 0x10100000L if (!(ctx= SSL_CTX_new(TLS_client_method()))) #else if (!(ctx= SSL_CTX_new(SSLv23_client_method()))) #endif goto error; if (mysql->options.extension) options= ma_tls_version_options(mysql->options.extension->tls_version); SSL_CTX_set_options(ctx, options ? options : default_options); if (ma_tls_set_certs(mysql, ctx)) { goto error; } if (!(ssl= SSL_new(ctx))) goto error; if (!SSL_set_app_data(ssl, mysql)) goto error; pthread_mutex_unlock(&LOCK_openssl_config); return (void *)ssl; error: pthread_mutex_unlock(&LOCK_openssl_config); if (ctx) SSL_CTX_free(ctx); if (ssl) SSL_free(ssl); return NULL; }
O3
c
ma_tls_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 leaq 0x24f9f(%rip), %rdi # 0x4fb80 callq 0x136b0 callq 0x13200 movq %rax, %rdi callq 0x13690 testq %rax, %rax je 0x2acd6 movq %rax, %rbx movq 0x480(%r14), %rax testq %rax, %rax je 0x2acb0 movq 0xc0(%rax), %r15 testq %r15, %r15 je 0x2acb0 leaq 0xe058(%rip), %rsi # 0x38c7e movq %r15, %rdi callq 0x13100 xorl %r12d, %r12d testq %rax, %rax sete %r12b shll $0x1a, %r12d orq $0x3a000000, %r12 # imm = 0x3A000000 leaq 0xe03c(%rip), %rsi # 0x38c86 movq %r15, %rdi callq 0x13100 movl %r12d, %r13d andl $0x2e000000, %r13d # imm = 0x2E000000 testq %rax, %rax cmoveq %r12, %r13 leaq 0xe024(%rip), %rsi # 0x38c8e movq %r15, %rdi callq 0x13100 movl %r13d, %r12d andl $0x36000000, %r12d # imm = 0x36000000 testq %rax, %rax cmoveq %r13, %r12 leaq 0xe00c(%rip), %rsi # 0x38c96 movq %r15, %rdi callq 0x13100 movl %r12d, %esi andl $0x1e000000, %esi # imm = 0x1E000000 testq %rax, %rax cmoveq %r12, %rsi cmpq $0x3e000000, %rsi # imm = 0x3E000000 je 0x2acb0 testq %rsi, %rsi jne 0x2acb5 movl $0x82000850, %esi # imm = 0x82000850 movq %rbx, %rdi callq 0x13820 movq 0x480(%r14), %rax testq %rax, %rax je 0x2ace7 movq 0xa0(%rax), %rax movq %rax, -0x30(%rbp) jmp 0x2acef leaq 0x24ea3(%rip), %rdi # 0x4fb80 callq 0x13330 jmp 0x2af90 movq $0x0, -0x30(%rbp) movq 0x400(%r14), %r15 movq 0x408(%r14), %r12 movq 0x420(%r14), %rsi testq %rsi, %rsi je 0x2ad31 cmpb $0x0, (%rsi) je 0x2ad31 movq %rbx, %rdi callq 0x13550 testl %eax, %eax jne 0x2ad31 movq 0x420(%r14), %rsi movq %rbx, %rdi callq 0x13430 testl %eax, %eax je 0x2af64 movq 0x410(%r14), %rsi movq 0x418(%r14), %rdx movq %rbx, %rdi callq 0x135b0 testl %eax, %eax je 0x2aec7 movq 0x480(%r14), %rax testq %rax, %rax je 0x2adad cmpq $0x0, 0x10(%rax) jne 0x2ad69 cmpq $0x0, 0x18(%rax) je 0x2adad movq %rbx, %rdi callq 0x13800 testq %rax, %rax je 0x2adad movq %rax, %r13 movq 0x480(%r14), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %r13, %rdi callq 0x13830 testl %eax, %eax je 0x2af64 movl $0xc, %esi movq %r13, %rdi callq 0x13310 testl %eax, %eax je 0x2af64 testq %r12, %r12 movq %r15, %r13 cmovneq %r12, %r13 testq %r15, %r15 cmoveq %r12, %r13 cmovneq %r15, %r12 testq %r13, %r13 cmoveq %r15, %r12 je 0x2ade6 cmpb $0x0, (%r13) je 0x2ade6 movq %rbx, %rdi movq %r13, %rsi callq 0x13370 cmpl $0x1, %eax jne 0x2af64 testq %r12, %r12 je 0x2ae51 cmpb $0x0, (%r12) je 0x2ae51 leaq 0xdf28(%rip), %rsi # 0x38d21 movq %r12, %rdi callq 0x13520 testq %rax, %rax je 0x2aef5 movq %rax, %r15 callq 0x137a0 leaq -0x38(%rbp), %r12 movq %rax, (%r12) movq %r15, %rdi movq %r12, %rsi xorl %edx, %edx movq -0x30(%rbp), %rcx callq 0x13300 movq %r15, %rdi callq 0x13460 movq (%r12), %rsi movq %rbx, %rdi callq 0x133b0 cmpl $0x1, %eax jne 0x2af26 movq -0x38(%rbp), %rdi callq 0x132d0 testq %r13, %r13 je 0x2ae67 movq %rbx, %rdi callq 0x13760 cmpl $0x1, %eax jne 0x2af64 movl $0x1, %esi cmpq $0x0, 0x410(%r14) jne 0x2ae84 xorl %esi, %esi cmpq $0x0, 0x418(%r14) setne %sil xorl %r15d, %r15d movq %rbx, %rdi xorl %edx, %edx callq 0x13120 movq %rbx, %rdi callq 0x13480 testq %rax, %rax je 0x2af6f movq %rax, %r12 movq %rax, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x13140 testl %eax, %eax je 0x2af21 leaq 0x24cc3(%rip), %rdi # 0x4fb80 callq 0x13330 jmp 0x2af93 cmpq $0x0, 0x410(%r14) jne 0x2af64 cmpq $0x0, 0x418(%r14) jne 0x2af64 movq %rbx, %rdi callq 0x134f0 testl %eax, %eax jne 0x2ad4f jmp 0x2af64 leaq 0x22e84(%rip), %rax # 0x4dd80 movq (%rax), %rdx leaq 0x2308a(%rip), %rax # 0x4df90 movq 0x20(%rax), %rcx xorl %r15d, %r15d movq %r14, %rdi movl $0x7ea, %esi # imm = 0x7EA movq %r12, %r8 xorl %eax, %eax callq 0x184d1 jmp 0x2af6f movq %r12, %r15 jmp 0x2af6f callq 0x130d0 movq %rax, %r15 movq -0x38(%rbp), %rdi callq 0x132d0 testl %r15d, %r15d setns %al movl %r15d, %ecx andl $0xff800000, %ecx # imm = 0xFF800000 cmpl $0x5800000, %ecx # imm = 0x5800000 sete %cl testb %cl, %al je 0x2af64 andl $0x7fffff, %r15d # imm = 0x7FFFFF cmpl $0x65, %r15d je 0x2ae48 movq %r14, %rdi callq 0x2b10c xorl %r15d, %r15d leaq 0x24c0a(%rip), %rdi # 0x4fb80 callq 0x13330 movq %rbx, %rdi callq 0x13090 testq %r15, %r15 je 0x2af90 movq %r15, %rdi callq 0x13280 xorl %r12d, %r12d movq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_init: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi lea rdi, LOCK_openssl_config call _pthread_mutex_lock call _TLS_client_method mov rdi, rax call _SSL_CTX_new test rax, rax jz loc_2ACD6 mov rbx, rax mov rax, [r14+480h] test rax, rax jz loc_2ACB0 mov r15, [rax+0C0h] test r15, r15 jz loc_2ACB0 lea rsi, aTlsv10; "TLSv1.0" mov rdi, r15 call _strstr xor r12d, r12d test rax, rax setz r12b shl r12d, 1Ah or r12, 3A000000h lea rsi, aTlsv11; "TLSv1.1" mov rdi, r15 call _strstr mov r13d, r12d and r13d, 2E000000h test rax, rax cmovz r13, r12 lea rsi, aTlsv12; "TLSv1.2" mov rdi, r15 call _strstr mov r12d, r13d and r12d, 36000000h test rax, rax cmovz r12, r13 lea rsi, aTlsv13; "TLSv1.3" mov rdi, r15 call _strstr mov esi, r12d and esi, 1E000000h test rax, rax cmovz rsi, r12 cmp rsi, 3E000000h jz short loc_2ACB0 test rsi, rsi jnz short loc_2ACB5 loc_2ACB0: mov esi, 82000850h loc_2ACB5: mov rdi, rbx call _SSL_CTX_set_options mov rax, [r14+480h] test rax, rax jz short loc_2ACE7 mov rax, [rax+0A0h] mov [rbp+var_30], rax jmp short loc_2ACEF loc_2ACD6: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock jmp loc_2AF90 loc_2ACE7: mov [rbp+var_30], 0 loc_2ACEF: mov r15, [r14+400h] mov r12, [r14+408h] mov rsi, [r14+420h] test rsi, rsi jz short loc_2AD31 cmp byte ptr [rsi], 0 jz short loc_2AD31 mov rdi, rbx call _SSL_CTX_set_ciphersuites test eax, eax jnz short loc_2AD31 mov rsi, [r14+420h] mov rdi, rbx call _SSL_CTX_set_cipher_list test eax, eax jz loc_2AF64 loc_2AD31: mov rsi, [r14+410h] mov rdx, [r14+418h] mov rdi, rbx call _SSL_CTX_load_verify_locations test eax, eax jz loc_2AEC7 loc_2AD4F: mov rax, [r14+480h] test rax, rax jz short loc_2ADAD cmp qword ptr [rax+10h], 0 jnz short loc_2AD69 cmp qword ptr [rax+18h], 0 jz short loc_2ADAD loc_2AD69: mov rdi, rbx call _SSL_CTX_get_cert_store test rax, rax jz short loc_2ADAD mov r13, rax mov rax, [r14+480h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, r13 call _X509_STORE_load_locations test eax, eax jz loc_2AF64 mov esi, 0Ch mov rdi, r13 call _X509_STORE_set_flags test eax, eax jz loc_2AF64 loc_2ADAD: test r12, r12 mov r13, r15 cmovnz r13, r12 test r15, r15 cmovz r13, r12 cmovnz r12, r15 test r13, r13 cmovz r12, r15 jz short loc_2ADE6 cmp byte ptr [r13+0], 0 jz short loc_2ADE6 mov rdi, rbx mov rsi, r13 call _SSL_CTX_use_certificate_chain_file cmp eax, 1 jnz loc_2AF64 loc_2ADE6: test r12, r12 jz short loc_2AE51 cmp byte ptr [r12], 0 jz short loc_2AE51 lea rsi, aRb; "rb" mov rdi, r12 call _fopen64 test rax, rax jz loc_2AEF5 mov r15, rax call _EVP_PKEY_new lea r12, [rbp+var_38] mov [r12], rax mov rdi, r15 mov rsi, r12 xor edx, edx mov rcx, [rbp+var_30] call _PEM_read_PrivateKey mov rdi, r15 call _fclose mov rsi, [r12] mov rdi, rbx call _SSL_CTX_use_PrivateKey cmp eax, 1 jnz loc_2AF26 loc_2AE48: mov rdi, [rbp+var_38] call _EVP_PKEY_free loc_2AE51: test r13, r13 jz short loc_2AE67 mov rdi, rbx call _SSL_CTX_check_private_key cmp eax, 1 jnz loc_2AF64 loc_2AE67: mov esi, 1 cmp qword ptr [r14+410h], 0 jnz short loc_2AE84 xor esi, esi cmp qword ptr [r14+418h], 0 setnz sil loc_2AE84: xor r15d, r15d mov rdi, rbx xor edx, edx call _SSL_CTX_set_verify mov rdi, rbx call _SSL_new test rax, rax jz loc_2AF6F mov r12, rax mov rdi, rax xor esi, esi mov rdx, r14 call _SSL_set_ex_data test eax, eax jz short loc_2AF21 lea rdi, LOCK_openssl_config call _pthread_mutex_unlock jmp loc_2AF93 loc_2AEC7: cmp qword ptr [r14+410h], 0 jnz loc_2AF64 cmp qword ptr [r14+418h], 0 jnz loc_2AF64 mov rdi, rbx call _SSL_CTX_set_default_verify_paths test eax, eax jnz loc_2AD4F jmp short loc_2AF64 loc_2AEF5: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, mariadb_client_errors mov rcx, [rax+20h] xor r15d, r15d mov rdi, r14 mov esi, 7EAh mov r8, r12 xor eax, eax call my_set_error jmp short loc_2AF6F loc_2AF21: mov r15, r12 jmp short loc_2AF6F loc_2AF26: call _ERR_peek_error mov r15, rax mov rdi, [rbp+var_38] call _EVP_PKEY_free test r15d, r15d setns al mov ecx, r15d and ecx, 0FF800000h cmp ecx, 5800000h setz cl test al, cl jz short loc_2AF64 and r15d, 7FFFFFh cmp r15d, 65h ; 'e' jz loc_2AE48 loc_2AF64: mov rdi, r14 call ma_tls_set_error xor r15d, r15d loc_2AF6F: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock mov rdi, rbx call _SSL_CTX_free test r15, r15 jz short loc_2AF90 mov rdi, r15 call _SSL_free loc_2AF90: xor r12d, r12d loc_2AF93: mov rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_init(_QWORD *a1) { long long v1; // rax long long v2; // rax long long v3; // rbx long long v4; // rax long long v5; // r15 long long v6; // r12 long long v7; // r13 long long v8; // r12 long long v9; // rsi long long v10; // rax _BYTE *v11; // r15 _BYTE *v12; // r12 _BYTE *v13; // rsi long long v14; // rax long long cert_store; // rax long long v16; // r13 _BYTE *v17; // r13 long long v18; // rax long long v19; // r15 _BOOL8 v20; // rsi long long v21; // r15 long long v22; // rax long long v23; // r12 int v24; // r15d long long v26; // [rsp+8h] [rbp-38h] BYREF long long v27; // [rsp+10h] [rbp-30h] pthread_mutex_lock(&LOCK_openssl_config); v1 = TLS_client_method(); v2 = SSL_CTX_new(v1); if ( !v2 ) { pthread_mutex_unlock(&LOCK_openssl_config); return 0LL; } v3 = v2; v4 = a1[144]; if ( !v4 ) goto LABEL_12; v5 = *(_QWORD *)(v4 + 192); if ( !v5 ) goto LABEL_12; v6 = ((unsigned __int8)(strstr(*(_QWORD *)(v4 + 192), "TLSv1.0") == 0) << 26) | 0x3A000000LL; v7 = v6 & 0x2E000000; if ( !strstr(v5, "TLSv1.1") ) v7 = v6; v8 = v7 & 0x36000000; if ( !strstr(v5, "TLSv1.2") ) v8 = v7; v9 = v8 & 0x1E000000; if ( !strstr(v5, "TLSv1.3") ) v9 = v8; if ( v9 == 1040187392 || !v9 ) LABEL_12: v9 = 2181040208LL; SSL_CTX_set_options(v3, v9); v10 = a1[144]; if ( v10 ) v27 = *(_QWORD *)(v10 + 160); else v27 = 0LL; v11 = (_BYTE *)a1[128]; v12 = (_BYTE *)a1[129]; v13 = (_BYTE *)a1[132]; if ( v13 && *v13 && !(unsigned int)SSL_CTX_set_ciphersuites(v3) && !(unsigned int)SSL_CTX_set_cipher_list(v3, a1[132]) ) goto LABEL_57; if ( !(unsigned int)SSL_CTX_load_verify_locations(v3, a1[130], a1[131]) && (a1[130] || a1[131] || !(unsigned int)SSL_CTX_set_default_verify_paths(v3)) ) { goto LABEL_57; } v14 = a1[144]; if ( v14 && (*(_QWORD *)(v14 + 16) || *(_QWORD *)(v14 + 24)) ) { cert_store = SSL_CTX_get_cert_store(v3); if ( cert_store ) { v16 = cert_store; if ( !(unsigned int)X509_STORE_load_locations( cert_store, *(_QWORD *)(a1[144] + 16LL), *(_QWORD *)(a1[144] + 24LL)) || !(unsigned int)X509_STORE_set_flags(v16, 12LL) ) { goto LABEL_57; } } } v17 = v11; if ( v12 ) v17 = v12; if ( v11 ) v12 = v11; else v17 = v12; if ( v17 ) { if ( *v17 && (unsigned int)SSL_CTX_use_certificate_chain_file(v3, v17) != 1 ) goto LABEL_57; } else { v12 = v11; } if ( v12 && *v12 ) { v18 = fopen64(v12, "rb"); if ( !v18 ) { v21 = 0LL; my_set_error((long long)a1, 2026, (long long)SQLSTATE_UNKNOWN, mariadb_client_errors[4], v12); goto LABEL_58; } v19 = v18; v26 = EVP_PKEY_new(); PEM_read_PrivateKey(v19, &v26, 0LL, v27); fclose(v19); if ( (unsigned int)SSL_CTX_use_PrivateKey(v3, v26) != 1 ) { v24 = ERR_peek_error(); EVP_PKEY_free(v26); if ( (v24 & 0xFF800000) != 92274688 || v24 < 0 || (v24 & 0x7FFFFF) != 0x65 ) goto LABEL_57; } EVP_PKEY_free(v26); } if ( v17 && (unsigned int)SSL_CTX_check_private_key(v3) != 1 ) { LABEL_57: ma_tls_set_error(a1); v21 = 0LL; LABEL_58: pthread_mutex_unlock(&LOCK_openssl_config); SSL_CTX_free(v3); if ( v21 ) SSL_free(v21); return 0LL; } v20 = 1LL; if ( !a1[130] ) v20 = a1[131] != 0LL; v21 = 0LL; SSL_CTX_set_verify(v3, v20, 0LL); v22 = SSL_new(v3); if ( !v22 ) goto LABEL_58; v23 = v22; if ( !(unsigned int)SSL_set_ex_data(v22, 0LL, a1) ) { v21 = v23; goto LABEL_58; } pthread_mutex_unlock(&LOCK_openssl_config); return v23; }
ma_tls_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDI LEA RDI,[0x14fb80] CALL 0x001136b0 CALL 0x00113200 MOV RDI,RAX CALL 0x00113690 TEST RAX,RAX JZ 0x0012acd6 MOV RBX,RAX MOV RAX,qword ptr [R14 + 0x480] TEST RAX,RAX JZ 0x0012acb0 MOV R15,qword ptr [RAX + 0xc0] TEST R15,R15 JZ 0x0012acb0 LEA RSI,[0x138c7e] MOV RDI,R15 CALL 0x00113100 XOR R12D,R12D TEST RAX,RAX SETZ R12B SHL R12D,0x1a OR R12,0x3a000000 LEA RSI,[0x138c86] MOV RDI,R15 CALL 0x00113100 MOV R13D,R12D AND R13D,0x2e000000 TEST RAX,RAX CMOVZ R13,R12 LEA RSI,[0x138c8e] MOV RDI,R15 CALL 0x00113100 MOV R12D,R13D AND R12D,0x36000000 TEST RAX,RAX CMOVZ R12,R13 LEA RSI,[0x138c96] MOV RDI,R15 CALL 0x00113100 MOV ESI,R12D AND ESI,0x1e000000 TEST RAX,RAX CMOVZ RSI,R12 CMP RSI,0x3e000000 JZ 0x0012acb0 TEST RSI,RSI JNZ 0x0012acb5 LAB_0012acb0: MOV ESI,0x82000850 LAB_0012acb5: MOV RDI,RBX CALL 0x00113820 MOV RAX,qword ptr [R14 + 0x480] TEST RAX,RAX JZ 0x0012ace7 MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x30],RAX JMP 0x0012acef LAB_0012acd6: LEA RDI,[0x14fb80] CALL 0x00113330 JMP 0x0012af90 LAB_0012ace7: MOV qword ptr [RBP + -0x30],0x0 LAB_0012acef: MOV R15,qword ptr [R14 + 0x400] MOV R12,qword ptr [R14 + 0x408] MOV RSI,qword ptr [R14 + 0x420] TEST RSI,RSI JZ 0x0012ad31 CMP byte ptr [RSI],0x0 JZ 0x0012ad31 MOV RDI,RBX CALL 0x00113550 TEST EAX,EAX JNZ 0x0012ad31 MOV RSI,qword ptr [R14 + 0x420] MOV RDI,RBX CALL 0x00113430 TEST EAX,EAX JZ 0x0012af64 LAB_0012ad31: MOV RSI,qword ptr [R14 + 0x410] MOV RDX,qword ptr [R14 + 0x418] MOV RDI,RBX CALL 0x001135b0 TEST EAX,EAX JZ 0x0012aec7 LAB_0012ad4f: MOV RAX,qword ptr [R14 + 0x480] TEST RAX,RAX JZ 0x0012adad CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0012ad69 CMP qword ptr [RAX + 0x18],0x0 JZ 0x0012adad LAB_0012ad69: MOV RDI,RBX CALL 0x00113800 TEST RAX,RAX JZ 0x0012adad MOV R13,RAX MOV RAX,qword ptr [R14 + 0x480] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,R13 CALL 0x00113830 TEST EAX,EAX JZ 0x0012af64 MOV ESI,0xc MOV RDI,R13 CALL 0x00113310 TEST EAX,EAX JZ 0x0012af64 LAB_0012adad: TEST R12,R12 MOV R13,R15 CMOVNZ R13,R12 TEST R15,R15 CMOVZ R13,R12 CMOVNZ R12,R15 TEST R13,R13 CMOVZ R12,R15 JZ 0x0012ade6 CMP byte ptr [R13],0x0 JZ 0x0012ade6 MOV RDI,RBX MOV RSI,R13 CALL 0x00113370 CMP EAX,0x1 JNZ 0x0012af64 LAB_0012ade6: TEST R12,R12 JZ 0x0012ae51 CMP byte ptr [R12],0x0 JZ 0x0012ae51 LEA RSI,[0x138d21] MOV RDI,R12 CALL 0x00113520 TEST RAX,RAX JZ 0x0012aef5 MOV R15,RAX CALL 0x001137a0 LEA R12,[RBP + -0x38] MOV qword ptr [R12],RAX MOV RDI,R15 MOV RSI,R12 XOR EDX,EDX MOV RCX,qword ptr [RBP + -0x30] CALL 0x00113300 MOV RDI,R15 CALL 0x00113460 MOV RSI,qword ptr [R12] MOV RDI,RBX CALL 0x001133b0 CMP EAX,0x1 JNZ 0x0012af26 LAB_0012ae48: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001132d0 LAB_0012ae51: TEST R13,R13 JZ 0x0012ae67 MOV RDI,RBX CALL 0x00113760 CMP EAX,0x1 JNZ 0x0012af64 LAB_0012ae67: MOV ESI,0x1 CMP qword ptr [R14 + 0x410],0x0 JNZ 0x0012ae84 XOR ESI,ESI CMP qword ptr [R14 + 0x418],0x0 SETNZ SIL LAB_0012ae84: XOR R15D,R15D MOV RDI,RBX XOR EDX,EDX CALL 0x00113120 MOV RDI,RBX CALL 0x00113480 TEST RAX,RAX JZ 0x0012af6f MOV R12,RAX MOV RDI,RAX XOR ESI,ESI MOV RDX,R14 CALL 0x00113140 TEST EAX,EAX JZ 0x0012af21 LEA RDI,[0x14fb80] CALL 0x00113330 JMP 0x0012af93 LAB_0012aec7: CMP qword ptr [R14 + 0x410],0x0 JNZ 0x0012af64 CMP qword ptr [R14 + 0x418],0x0 JNZ 0x0012af64 MOV RDI,RBX CALL 0x001134f0 TEST EAX,EAX JNZ 0x0012ad4f JMP 0x0012af64 LAB_0012aef5: LEA RAX,[0x14dd80] MOV RDX,qword ptr [RAX] LEA RAX,[0x14df90] MOV RCX,qword ptr [RAX + 0x20] XOR R15D,R15D MOV RDI,R14 MOV ESI,0x7ea MOV R8,R12 XOR EAX,EAX CALL 0x001184d1 JMP 0x0012af6f LAB_0012af21: MOV R15,R12 JMP 0x0012af6f LAB_0012af26: CALL 0x001130d0 MOV R15,RAX MOV RDI,qword ptr [RBP + -0x38] CALL 0x001132d0 TEST R15D,R15D SETNS AL MOV ECX,R15D AND ECX,0xff800000 CMP ECX,0x5800000 SETZ CL TEST AL,CL JZ 0x0012af64 AND R15D,0x7fffff CMP R15D,0x65 JZ 0x0012ae48 LAB_0012af64: MOV RDI,R14 CALL 0x0012b10c XOR R15D,R15D LAB_0012af6f: LEA RDI,[0x14fb80] CALL 0x00113330 MOV RDI,RBX CALL 0x00113090 TEST R15,R15 JZ 0x0012af90 MOV RDI,R15 CALL 0x00113280 LAB_0012af90: XOR R12D,R12D LAB_0012af93: MOV RAX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
SSL * ma_tls_init(void *param_1) { long lVar1; char *file; int iVar2; SSL_METHOD *meth; SSL_CTX *ctx; char *pcVar3; char *pcVar4; X509_STORE *ctx_00; FILE *fp; SSL *ssl; ulong uVar5; uint uVar6; char *pcVar7; uint uVar8; SSL *ssl_00; EVP_PKEY *local_40; void *local_38; pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config); meth = (SSL_METHOD *)TLS_client_method(); ctx = SSL_CTX_new(meth); if (ctx == (SSL_CTX *)0x0) { pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); return (SSL *)0x0; } if ((*(long *)((long)param_1 + 0x480) == 0) || (pcVar4 = *(char **)(*(long *)((long)param_1 + 0x480) + 0xc0), pcVar4 == (char *)0x0)) { LAB_0012acb0: uVar8 = 0x82000850; } else { pcVar3 = strstr(pcVar4,"TLSv1.0"); uVar6 = (uint)(pcVar3 == (char *)0x0) << 0x1a; pcVar3 = strstr(pcVar4,"TLSv1.1"); uVar8 = uVar6 | 0x2a000000; if (pcVar3 == (char *)0x0) { uVar8 = uVar6 | 0x3a000000; } pcVar3 = strstr(pcVar4,"TLSv1.2"); uVar6 = uVar8 & 0x36000000; if (pcVar3 == (char *)0x0) { uVar6 = uVar8; } pcVar4 = strstr(pcVar4,"TLSv1.3"); uVar8 = uVar6 & 0x1e000000; if (pcVar4 == (char *)0x0) { uVar8 = uVar6; } if ((uVar8 == 0x3e000000) || (uVar8 == 0)) goto LAB_0012acb0; } SSL_CTX_set_options(ctx,uVar8); if (*(long *)((long)param_1 + 0x480) == 0) { local_38 = (void *)0x0; } else { local_38 = *(void **)(*(long *)((long)param_1 + 0x480) + 0xa0); } pcVar4 = *(char **)((long)param_1 + 0x400); pcVar3 = *(char **)((long)param_1 + 0x408); if ((((((*(char **)((long)param_1 + 0x420) == (char *)0x0) || (**(char **)((long)param_1 + 0x420) == '\0')) || (iVar2 = SSL_CTX_set_ciphersuites(ctx), iVar2 != 0)) || (iVar2 = SSL_CTX_set_cipher_list(ctx,*(char **)((long)param_1 + 0x420)), iVar2 != 0)) && ((iVar2 = SSL_CTX_load_verify_locations (ctx,*(char **)((long)param_1 + 0x410),*(char **)((long)param_1 + 0x418)), iVar2 != 0 || (((*(long *)((long)param_1 + 0x410) == 0 && (*(long *)((long)param_1 + 0x418) == 0)) && (iVar2 = SSL_CTX_set_default_verify_paths(ctx), iVar2 != 0)))))) && ((((lVar1 = *(long *)((long)param_1 + 0x480), lVar1 == 0 || ((*(long *)(lVar1 + 0x10) == 0 && (*(long *)(lVar1 + 0x18) == 0)))) || (ctx_00 = SSL_CTX_get_cert_store(ctx), ctx_00 == (X509_STORE *)0x0)) || ((iVar2 = X509_STORE_load_locations (ctx_00,*(char **)(*(long *)((long)param_1 + 0x480) + 0x10), *(char **)(*(long *)((long)param_1 + 0x480) + 0x18)), iVar2 != 0 && (iVar2 = X509_STORE_set_flags(ctx_00,0xc), iVar2 != 0)))))) { pcVar7 = pcVar4; if (pcVar3 != (char *)0x0) { pcVar7 = pcVar3; } file = pcVar3; if (pcVar4 != (char *)0x0) { pcVar3 = pcVar4; file = pcVar7; } if (((file == (char *)0x0) || (pcVar4 = pcVar3, *file == '\0')) || (iVar2 = SSL_CTX_use_certificate_chain_file(ctx,file), iVar2 == 1)) { if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) { fp = fopen64(pcVar4,"rb"); if (fp == (FILE *)0x0) { my_set_error(param_1,0x7ea,SQLSTATE_UNKNOWN,mariadb_client_errors._32_8_,pcVar4); ssl_00 = (SSL *)0x0; goto LAB_0012af6f; } local_40 = EVP_PKEY_new(); PEM_read_PrivateKey(fp,&local_40,(int1 *)0x0,local_38); fclose(fp); iVar2 = SSL_CTX_use_PrivateKey(ctx,local_40); if (iVar2 != 1) { uVar5 = ERR_peek_error(); EVP_PKEY_free(local_40); uVar8 = (uint)uVar5; if (((int)uVar8 < 0 || (uVar8 & 0xff800000) != 0x5800000) || ((uVar8 & 0x7fffff) != 0x65)) goto LAB_0012af64; } EVP_PKEY_free(local_40); } if ((file == (char *)0x0) || (iVar2 = SSL_CTX_check_private_key(ctx), iVar2 == 1)) { uVar8 = 1; if (*(long *)((long)param_1 + 0x410) == 0) { uVar8 = (uint)(*(long *)((long)param_1 + 0x418) != 0); } SSL_CTX_set_verify(ctx,uVar8,(callback *)0x0); ssl = SSL_new(ctx); ssl_00 = (SSL *)0x0; if ((ssl != (SSL *)0x0) && (iVar2 = SSL_set_ex_data(ssl,0,param_1), ssl_00 = ssl, iVar2 != 0)) { pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); return ssl; } goto LAB_0012af6f; } } } LAB_0012af64: ma_tls_set_error(param_1); ssl_00 = (SSL *)0x0; LAB_0012af6f: pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); SSL_CTX_free(ctx); if (ssl_00 != (SSL *)0x0) { SSL_free(ssl_00); } return (SSL *)0x0; }
61,948
JS_MarkContext
bluesky950520[P]quickjs/quickjs.c
static void JS_MarkContext(JSRuntime *rt, JSContext *ctx, JS_MarkFunc *mark_func) { int i; struct list_head *el; /* modules are not seen by the GC, so we directly mark the objects referenced by each module */ list_for_each(el, &ctx->loaded_modules) { JSModuleDef *m = list_entry(el, JSModuleDef, link); js_mark_module_def(rt, m, mark_func); } JS_MarkValue(rt, ctx->global_obj, mark_func); JS_MarkValue(rt, ctx->global_var_obj, mark_func); JS_MarkValue(rt, ctx->throw_type_error, mark_func); JS_MarkValue(rt, ctx->eval_obj, mark_func); JS_MarkValue(rt, ctx->array_proto_values, mark_func); for(i = 0; i < JS_NATIVE_ERROR_COUNT; i++) { JS_MarkValue(rt, ctx->native_error_proto[i], mark_func); } JS_MarkValue(rt, ctx->error_ctor, mark_func); JS_MarkValue(rt, ctx->error_prepare_stack, mark_func); for(i = 0; i < rt->class_count; i++) { JS_MarkValue(rt, ctx->class_proto[i], mark_func); } JS_MarkValue(rt, ctx->iterator_ctor, mark_func); JS_MarkValue(rt, ctx->async_iterator_proto, mark_func); JS_MarkValue(rt, ctx->promise_ctor, mark_func); JS_MarkValue(rt, ctx->array_ctor, mark_func); JS_MarkValue(rt, ctx->regexp_ctor, mark_func); JS_MarkValue(rt, ctx->function_ctor, mark_func); JS_MarkValue(rt, ctx->function_proto, mark_func); if (ctx->array_shape) mark_func(rt, &ctx->array_shape->header); }
O0
c
JS_MarkContext: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x28(%rsp), %rax movq 0x1e8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x28(%rsp), %rcx addq $0x1e0, %rcx # imm = 0x1E0 cmpq %rcx, %rax je 0x65b2c movq 0x10(%rsp), %rax addq $-0x8, %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x65db0 movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x65ae4 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x1a0(%rax), %rsi movq 0x1a8(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x1b0(%rax), %rsi movq 0x1b8(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x180(%rax), %rsi movq 0x188(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x190(%rax), %rsi movq 0x198(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x170(%rax), %rsi movq 0x178(%rax), %rdx callq 0x30ed0 movl $0x0, 0x1c(%rsp) cmpl $0x8, 0x1c(%rsp) jge 0x65c1f movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax addq $0x98, %rax movslq 0x1c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0x20(%rsp), %rcx movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x30ed0 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x65bde movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x118(%rax), %rsi movq 0x120(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x128(%rax), %rsi movq 0x130(%rax), %rdx callq 0x30ed0 movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax movq 0x30(%rsp), %rcx cmpl 0x78(%rcx), %eax jge 0x65cb1 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x40(%rax), %rax movslq 0x1c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0x20(%rsp), %rcx movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x30ed0 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x65c6b movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x140(%rax), %rsi movq 0x148(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x160(%rax), %rsi movq 0x168(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x88(%rax), %rsi movq 0x90(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x68(%rax), %rsi movq 0x70(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x78(%rax), %rsi movq 0x80(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x58(%rax), %rsi movq 0x60(%rax), %rdx callq 0x30ed0 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x48(%rax), %rsi movq 0x50(%rax), %rdx callq 0x30ed0 movq 0x28(%rsp), %rax cmpq $0x0, 0x38(%rax) je 0x65dab movq 0x20(%rsp), %rax movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rcx movq 0x38(%rcx), %rsi callq *%rax addq $0x38, %rsp retq
JS_MarkContext: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rax, [rsp+38h+var_10] mov rax, [rax+1E8h] mov [rsp+38h+var_28], rax loc_65AE4: mov rax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_10] add rcx, 1E0h cmp rax, rcx jz short loc_65B2C mov rax, [rsp+38h+var_28] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_18] call js_mark_module_def mov rax, [rsp+38h+var_28] mov rax, [rax+8] mov [rsp+38h+var_28], rax jmp short loc_65AE4 loc_65B2C: mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+1A0h] mov rdx, [rax+1A8h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+1B0h] mov rdx, [rax+1B8h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+180h] mov rdx, [rax+188h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+190h] mov rdx, [rax+198h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+170h] mov rdx, [rax+178h] call JS_MarkValue mov [rsp+38h+var_1C], 0 loc_65BDE: cmp [rsp+38h+var_1C], 8 jge short loc_65C1F mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] add rax, 98h movsxd rcx, [rsp+38h+var_1C] shl rcx, 4 add rax, rcx mov rcx, [rsp+38h+var_18] mov rsi, [rax] mov rdx, [rax+8] call JS_MarkValue mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp short loc_65BDE loc_65C1F: mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+118h] mov rdx, [rax+120h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+128h] mov rdx, [rax+130h] call JS_MarkValue mov [rsp+38h+var_1C], 0 loc_65C6B: mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_8] cmp eax, [rcx+78h] jge short loc_65CB1 mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rax, [rax+40h] movsxd rcx, [rsp+38h+var_1C] shl rcx, 4 add rax, rcx mov rcx, [rsp+38h+var_18] mov rsi, [rax] mov rdx, [rax+8] call JS_MarkValue mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp short loc_65C6B loc_65CB1: mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+140h] mov rdx, [rax+148h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+160h] mov rdx, [rax+168h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+88h] mov rdx, [rax+90h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+68h] mov rdx, [rax+70h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+78h] mov rdx, [rax+80h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+58h] mov rdx, [rax+60h] call JS_MarkValue mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_18] mov rsi, [rax+48h] mov rdx, [rax+50h] call JS_MarkValue mov rax, [rsp+38h+var_10] cmp qword ptr [rax+38h], 0 jz short loc_65DAB mov rax, [rsp+38h+var_18] mov rdi, [rsp+38h+var_8] mov rcx, [rsp+38h+var_10] mov rsi, [rcx+38h] call rax loc_65DAB: add rsp, 38h retn
long long JS_MarkContext(long long a1, _QWORD *a2, long long ( *a3)(long long, long long)) { long long *v3; // rax long long result; // rax _QWORD *i; // [rsp+10h] [rbp-28h] int j; // [rsp+1Ch] [rbp-1Ch] int k; // [rsp+1Ch] [rbp-1Ch] for ( i = (_QWORD *)a2[61]; i != a2 + 60; i = (_QWORD *)i[1] ) js_mark_module_def(a1, i - 1, a3); JS_MarkValue(a1, a2[52], a2[53], a3); JS_MarkValue(a1, a2[54], a2[55], a3); JS_MarkValue(a1, a2[48], a2[49], a3); JS_MarkValue(a1, a2[50], a2[51], a3); JS_MarkValue(a1, a2[46], a2[47], a3); for ( j = 0; j < 8; ++j ) JS_MarkValue(a1, a2[2 * j + 19], a2[2 * j + 20], a3); JS_MarkValue(a1, a2[35], a2[36], a3); JS_MarkValue(a1, a2[37], a2[38], a3); for ( k = 0; k < *(_DWORD *)(a1 + 120); ++k ) { v3 = (long long *)(16LL * k + a2[8]); JS_MarkValue(a1, *v3, v3[1], a3); } JS_MarkValue(a1, a2[40], a2[41], a3); JS_MarkValue(a1, a2[44], a2[45], a3); JS_MarkValue(a1, a2[17], a2[18], a3); JS_MarkValue(a1, a2[13], a2[14], a3); JS_MarkValue(a1, a2[15], a2[16], a3); JS_MarkValue(a1, a2[11], a2[12], a3); JS_MarkValue(a1, a2[9], a2[10], a3); result = (long long)a2; if ( a2[7] ) return a3(a1, a2[7]); return result; }
JS_MarkContext: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x1e8] MOV qword ptr [RSP + 0x10],RAX LAB_00165ae4: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x28] ADD RCX,0x1e0 CMP RAX,RCX JZ 0x00165b2c MOV RAX,qword ptr [RSP + 0x10] ADD RAX,-0x8 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x20] CALL 0x00165db0 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x00165ae4 LAB_00165b2c: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x1a0] MOV RDX,qword ptr [RAX + 0x1a8] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x1b0] MOV RDX,qword ptr [RAX + 0x1b8] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x180] MOV RDX,qword ptr [RAX + 0x188] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x190] MOV RDX,qword ptr [RAX + 0x198] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x170] MOV RDX,qword ptr [RAX + 0x178] CALL 0x00130ed0 MOV dword ptr [RSP + 0x1c],0x0 LAB_00165bde: CMP dword ptr [RSP + 0x1c],0x8 JGE 0x00165c1f MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x98 MOVSXD RCX,dword ptr [RSP + 0x1c] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00130ed0 MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00165bde LAB_00165c1f: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x118] MOV RDX,qword ptr [RAX + 0x120] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x128] MOV RDX,qword ptr [RAX + 0x130] CALL 0x00130ed0 MOV dword ptr [RSP + 0x1c],0x0 LAB_00165c6b: MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0x78] JGE 0x00165cb1 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x40] MOVSXD RCX,dword ptr [RSP + 0x1c] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00130ed0 MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00165c6b LAB_00165cb1: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x140] MOV RDX,qword ptr [RAX + 0x148] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x160] MOV RDX,qword ptr [RAX + 0x168] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x88] MOV RDX,qword ptr [RAX + 0x90] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x68] MOV RDX,qword ptr [RAX + 0x70] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x78] MOV RDX,qword ptr [RAX + 0x80] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x58] MOV RDX,qword ptr [RAX + 0x60] CALL 0x00130ed0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x48] MOV RDX,qword ptr [RAX + 0x50] CALL 0x00130ed0 MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00165dab MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RCX + 0x38] CALL RAX LAB_00165dab: ADD RSP,0x38 RET
void JS_MarkContext(long param_1,long param_2,code *param_3) { int8 *puVar1; long local_28; int local_1c; for (local_28 = *(long *)(param_2 + 0x1e8); local_28 != param_2 + 0x1e0; local_28 = *(long *)(local_28 + 8)) { js_mark_module_def(param_1,local_28 + -8,param_3); } JS_MarkValue(param_1,*(int8 *)(param_2 + 0x1a0),*(int8 *)(param_2 + 0x1a8),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x1b0),*(int8 *)(param_2 + 0x1b8),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x180),*(int8 *)(param_2 + 0x188),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 400),*(int8 *)(param_2 + 0x198),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x170),*(int8 *)(param_2 + 0x178),param_3); for (local_1c = 0; local_1c < 8; local_1c = local_1c + 1) { puVar1 = (int8 *)(param_2 + 0x98 + (long)local_1c * 0x10); JS_MarkValue(param_1,*puVar1,puVar1[1],param_3); } JS_MarkValue(param_1,*(int8 *)(param_2 + 0x118),*(int8 *)(param_2 + 0x120),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x128),*(int8 *)(param_2 + 0x130),param_3); for (local_1c = 0; local_1c < *(int *)(param_1 + 0x78); local_1c = local_1c + 1) { puVar1 = (int8 *)(*(long *)(param_2 + 0x40) + (long)local_1c * 0x10); JS_MarkValue(param_1,*puVar1,puVar1[1],param_3); } JS_MarkValue(param_1,*(int8 *)(param_2 + 0x140),*(int8 *)(param_2 + 0x148),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x160),*(int8 *)(param_2 + 0x168),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x88),*(int8 *)(param_2 + 0x90),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x78),*(int8 *)(param_2 + 0x80),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60),param_3); JS_MarkValue(param_1,*(int8 *)(param_2 + 0x48),*(int8 *)(param_2 + 0x50),param_3); if (*(long *)(param_2 + 0x38) != 0) { (*param_3)(param_1,*(int8 *)(param_2 + 0x38)); } return; }
61,949
evmone::Result evmone::instr::core::create_eof_impl<(evmone::Opcode)236>(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*&)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/instructions_calls.cpp
Result create_eof_impl( StackTop stack, int64_t gas_left, ExecutionState& state, code_iterator& pos) noexcept { static_assert(Op == OP_EOFCREATE || Op == OP_TXCREATE); if (state.in_static_mode()) return {EVMC_STATIC_MODE_VIOLATION, gas_left}; const auto initcode_hash = (Op == OP_TXCREATE) ? intx::be::store<evmc::bytes32>(stack.pop()) : evmc::bytes32{}; const auto salt = stack.pop(); const auto input_offset_u256 = stack.pop(); const auto input_size_u256 = stack.pop(); const auto endowment = stack.pop(); stack.push(0); // Assume failure. state.return_data.clear(); if (!check_memory(gas_left, state.memory, input_offset_u256, input_size_u256)) return {EVMC_OUT_OF_GAS, gas_left}; constexpr auto pos_advance = (Op == OP_EOFCREATE ? 2 : 1); pos += pos_advance; if (state.msg->depth >= 1024) return {EVMC_SUCCESS, gas_left}; // "Light" failure. if (endowment != 0 && intx::be::load<uint256>(state.host.get_balance(state.msg->recipient)) < endowment) return {EVMC_SUCCESS, gas_left}; // "Light" failure. bytes_view initcontainer; if constexpr (Op == OP_EOFCREATE) { const auto initcontainer_index = pos[-1]; const auto& container = state.original_code; const auto& eof_header = state.analysis.baseline->eof_header(); initcontainer = eof_header.get_container(container, initcontainer_index); } else { auto* tx_initcode = state.get_tx_initcode_by_hash(initcode_hash); // In case initcode was not found, nullptr was returned. if (tx_initcode == nullptr) return {EVMC_SUCCESS, gas_left}; // "Light" failure initcontainer = tx_initcode->code; if (!tx_initcode->is_valid.has_value()) { const auto error_subcont = validate_eof(state.rev, ContainerKind::initcode, initcontainer); tx_initcode->is_valid = (error_subcont == EOFValidationError::success); } if (!*tx_initcode->is_valid) return {EVMC_SUCCESS, gas_left}; // "Light" failure. } const auto input_offset = static_cast<size_t>(input_offset_u256); const auto input_size = static_cast<size_t>(input_size_u256); evmc_message msg{.kind = to_call_kind(Op)}; msg.gas = gas_left - gas_left / 64; if (input_size > 0) { // input_data may be garbage if init_code_size == 0. msg.input_data = &state.memory[input_offset]; msg.input_size = input_size; } msg.sender = state.msg->recipient; msg.depth = state.msg->depth + 1; msg.create2_salt = intx::be::store<evmc::bytes32>(salt); msg.value = intx::be::store<evmc::uint256be>(endowment); // init_code is guaranteed to be non-empty by validation of container sections msg.code = initcontainer.data(); msg.code_size = initcontainer.size(); const auto result = state.host.call(msg); gas_left -= msg.gas - result.gas_left; state.gas_refund += result.gas_refund; state.return_data.assign(result.output_data, result.output_size); if (result.status_code == EVMC_SUCCESS) stack.top() = intx::be::load<uint256>(result.create_address); return {EVMC_SUCCESS, gas_left}; }
O3
cpp
evmone::Result evmone::instr::core::create_eof_impl<(evmone::Opcode)236>(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, %rbx movq 0x20(%rdx), %rax movl $0xb, %ebp testb $0x1, 0x4(%rax) jne 0x4a9e7 movq %rcx, %r13 movq %rdx, %r15 movq %rdi, %r14 movups (%rdi), %xmm2 movups 0x10(%rdi), %xmm4 movq -0x20(%rdi), %r12 movq -0x18(%rdi), %rcx movq -0x10(%rdi), %rax movq -0x8(%rdi), %r8 movdqu -0x60(%rdi), %xmm3 movdqu -0x50(%rdi), %xmm5 movdqu -0x40(%rdi), %xmm6 movdqu -0x30(%rdi), %xmm0 xorps %xmm1, %xmm1 movups %xmm1, -0x60(%rdi) movups %xmm1, -0x50(%rdi) movq $0x0, 0x50(%rdx) movq 0x48(%rdx), %rdx movb $0x0, (%rdx) movdqa %xmm0, %xmm1 por %xmm6, %xmm1 leaq 0x8(%r15), %rsi ptest %xmm1, %xmm1 je 0x4a752 pextrq $0x1, %xmm0, %rdx movq %xmm0, %rdi orq %rdx, %rdi pextrq $0x1, %xmm6, %rdx movl $0x3, %ebp orq %rdi, %rdx jne 0x4a9e7 movq %xmm6, %rdx movq %rdx, %rdi shrq $0x20, %rdi jne 0x4a9e7 orq %rcx, %rax orq %r8, %rax movq %r12, %rcx shrq $0x20, %rcx orq %rax, %rcx jne 0x4a9e7 addq %r12, %rdx cmpq 0x10(%r15), %rdx jbe 0x4a749 movq %rbx, %rdi movaps %xmm2, 0x40(%rsp) movdqa %xmm3, 0x10(%rsp) movaps %xmm4, 0x30(%rsp) movdqa %xmm5, (%rsp) movq %rsi, %rbx movdqa %xmm6, 0x20(%rsp) callq 0x41c31 movdqa 0x20(%rsp), %xmm6 movq %rbx, %rsi movdqa (%rsp), %xmm5 movaps 0x30(%rsp), %xmm4 movdqa 0x10(%rsp), %xmm3 movaps 0x40(%rsp), %xmm2 movq %rax, %rbx testq %rbx, %rbx js 0x4a9e7 movq (%r13), %rax addq $0x2, %rax movq %rax, (%r13) movq 0x20(%r15), %rcx xorl %ebp, %ebp cmpl $0x3ff, 0x8(%rcx) # imm = 0x3FF jg 0x4a9e7 movdqa %xmm6, 0x20(%rsp) movq %rsi, 0x68(%rsp) movaps %xmm4, 0x30(%rsp) movaps %xmm2, 0x40(%rsp) movdqa %xmm5, (%rsp) movdqa %xmm5, %xmm0 movdqa %xmm3, 0x10(%rsp) por %xmm3, %xmm0 ptest %xmm0, %xmm0 je 0x4a83e movl 0x28(%rcx), %eax leaq 0x170(%rsp), %rdx movl %eax, 0x10(%rdx) movdqu 0x18(%rcx), %xmm0 movdqa %xmm0, (%rdx) movq 0x30(%r15), %rax movq 0x38(%r15), %rsi leaq 0xb8(%rsp), %rdi callq *0x18(%rax) movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rcx bswapq %rcx bswapq %rax movdqa (%rsp), %xmm0 movq %xmm0, %rdx pextrq $0x1, %xmm0, %rsi movq %rcx, %rdi xorq %rdx, %rdi movq %rax, %r8 xorq %rsi, %r8 orq %rdi, %r8 movdqa 0x10(%rsp), %xmm0 jne 0x4a82e movq 0xc8(%rsp), %rax movq 0xd0(%rsp), %rcx bswapq %rax bswapq %rcx movq %xmm0, %rdx pextrq $0x1, %xmm0, %rsi cmpq %rdx, %rcx sbbq %rsi, %rax jb 0x4a9e7 movq (%r13), %rax movzbl -0x1(%rax), %ecx movq 0x1f8(%r15), %rdi addq $0x48, %rdi movq 0x68(%r15), %rsi movq 0x70(%r15), %rdx callq 0x42fc4 movq %rax, 0x60(%rsp) movq %rdx, 0x58(%rsp) movdqa 0x20(%rsp), %xmm0 movq %xmm0, %rbp leaq 0xb8(%rsp), %r13 movl $0xa8, %edx movq %r13, %rdi xorl %esi, %esi callq 0x22190 movl $0x5, (%r13) leaq 0x3f(%rbx), %rax testq %rbx, %rbx cmovnsq %rbx, %rax sarq $0x6, %rax movq %rbx, %rcx subq %rax, %rcx movq %rcx, 0x10(%r13) testq %rbp, %rbp je 0x4a8c4 movq 0x68(%rsp), %rax addq (%rax), %r12 movq %r12, 0xf8(%rsp) movq %rbp, 0x100(%rsp) movq 0x20(%r15), %rax movl 0x28(%rax), %ecx leaq 0xb8(%rsp), %rdx movl %ecx, 0x3c(%rdx) movups 0x18(%rax), %xmm0 movups %xmm0, 0x2c(%rdx) movl 0x8(%rax), %eax incl %eax movl %eax, 0x8(%rdx) movdqa 0x38ac2(%rip), %xmm0 # 0x833b0 movdqa 0x30(%rsp), %xmm1 pshufb %xmm0, %xmm1 movdqu %xmm1, 0x70(%rdx) movdqa 0x40(%rsp), %xmm1 pshufb %xmm0, %xmm1 movdqu %xmm1, 0x80(%rdx) movdqa (%rsp), %xmm1 pshufb %xmm0, %xmm1 movdqu %xmm1, 0x50(%rdx) movdqa 0x10(%rsp), %xmm1 pshufb %xmm0, %xmm1 movdqu %xmm1, 0x60(%rdx) movq 0x58(%rsp), %rax movq %rax, 0xa8(%rdx) movq 0x60(%rsp), %rax movq %rax, 0xb0(%rdx) movq 0x30(%r15), %rax movq 0x38(%r15), %rsi leaq 0x170(%rsp), %rdi callq *0x40(%rax) leaq 0x70(%rsp), %rax leaq 0x170(%rsp), %rsi movl $0x9, %ecx movq %rax, %rdi rep movsq (%rsi), %es:(%rdi) subq 0xc8(%rsp), %rbx addq 0x8(%rax), %rbx movq 0x10(%rax), %rcx addq %rcx, (%r15) leaq 0x48(%r15), %rdi movq 0x18(%rax), %rcx movq 0x20(%rax), %r8 movq 0x50(%r15), %rdx xorl %esi, %esi callq 0x4b39a cmpl $0x0, 0x70(%rsp) jne 0x4a9d1 movl 0xa0(%rsp), %eax movdqu 0xa4(%rsp), %xmm0 pshufb 0x389f3(%rip), %xmm0 # 0x833b0 bswapl %eax movdqu %xmm0, -0x60(%r14) movq %rax, -0x50(%r14) movq $0x0, -0x48(%r14) movq 0x98(%rsp), %rax testq %rax, %rax je 0x4a9e5 leaq 0x70(%rsp), %rdi callq *%rax xorl %ebp, %ebp movl %ebp, %eax movq %rbx, %rdx addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4aa04 jmp 0x4aa04 jmp 0x4aa04 movq %rax, %rdi callq 0x30061
_ZN6evmone5instr4core15create_eof_implILNS_6OpcodeE236EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateERPKh: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov rbx, rsi mov rax, [rdx+20h] mov ebp, 0Bh test byte ptr [rax+4], 1 jnz loc_4A9E7 mov r13, rcx mov r15, rdx mov r14, rdi movups xmm2, xmmword ptr [rdi] movups xmm4, xmmword ptr [rdi+10h] mov r12, [rdi-20h] mov rcx, [rdi-18h] mov rax, [rdi-10h] mov r8, [rdi-8] movdqu xmm3, xmmword ptr [rdi-60h] movdqu xmm5, xmmword ptr [rdi-50h] movdqu xmm6, xmmword ptr [rdi-40h] movdqu xmm0, xmmword ptr [rdi-30h] xorps xmm1, xmm1 movups xmmword ptr [rdi-60h], xmm1 movups xmmword ptr [rdi-50h], xmm1 mov qword ptr [rdx+50h], 0 mov rdx, [rdx+48h] mov byte ptr [rdx], 0 movdqa xmm1, xmm0 por xmm1, xmm6 lea rsi, [r15+8]; __int64 ptest xmm1, xmm1 jz loc_4A752 pextrq rdx, xmm0, 1 movq rdi, xmm0 or rdi, rdx pextrq rdx, xmm6, 1 mov ebp, 3 or rdx, rdi jnz loc_4A9E7 movq rdx, xmm6 mov rdi, rdx shr rdi, 20h jnz loc_4A9E7 or rax, rcx or rax, r8 mov rcx, r12 shr rcx, 20h or rcx, rax; unsigned __int64 jnz loc_4A9E7 add rdx, r12; evmone::Memory * cmp rdx, [r15+10h] jbe short loc_4A749 mov rdi, rbx; this movaps [rsp+1E8h+var_1A8], xmm2 movdqa [rsp+1E8h+var_1D8], xmm3 movaps [rsp+1E8h+var_1B8], xmm4 movdqa [rsp+1E8h+var_1E8], xmm5 mov rbx, rsi movdqa [rsp+1E8h+var_1C8], xmm6 call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong) movdqa xmm6, [rsp+1E8h+var_1C8] mov rsi, rbx movdqa xmm5, [rsp+1E8h+var_1E8] movaps xmm4, [rsp+1E8h+var_1B8] movdqa xmm3, [rsp+1E8h+var_1D8] movaps xmm2, [rsp+1E8h+var_1A8] mov rbx, rax loc_4A749: test rbx, rbx js loc_4A9E7 loc_4A752: mov rax, [r13+0] add rax, 2 mov [r13+0], rax mov rcx, [r15+20h] xor ebp, ebp cmp dword ptr [rcx+8], 3FFh jg loc_4A9E7 movdqa [rsp+1E8h+var_1C8], xmm6 mov [rsp+1E8h+var_180], rsi movaps [rsp+1E8h+var_1B8], xmm4 movaps [rsp+1E8h+var_1A8], xmm2 movdqa [rsp+1E8h+var_1E8], xmm5 movdqa xmm0, xmm5 movdqa [rsp+1E8h+var_1D8], xmm3 por xmm0, xmm3 ptest xmm0, xmm0 jz loc_4A83E mov eax, [rcx+28h] lea rdx, [rsp+1E8h+var_78] mov [rdx+10h], eax movdqu xmm0, xmmword ptr [rcx+18h] movdqa xmmword ptr [rdx], xmm0 mov rax, [r15+30h] mov rsi, [r15+38h] lea rdi, [rsp+1E8h+var_130] call qword ptr [rax+18h] mov rax, [rsp+1E8h+var_130] mov rcx, [rsp+1E8h+var_128] bswap rcx bswap rax movdqa xmm0, [rsp+1E8h+var_1E8] movq rdx, xmm0 pextrq rsi, xmm0, 1 mov rdi, rcx xor rdi, rdx mov r8, rax xor r8, rsi or r8, rdi movdqa xmm0, [rsp+1E8h+var_1D8] jnz short loc_4A82E mov rax, [rsp+1E8h+var_120] mov rcx, [rsp+1E8h+var_118] bswap rax bswap rcx movq rdx, xmm0 pextrq rsi, xmm0, 1 loc_4A82E: cmp rcx, rdx sbb rax, rsi jb loc_4A9E7 mov rax, [r13+0] loc_4A83E: movzx ecx, byte ptr [rax-1] mov rdi, [r15+1F8h] add rdi, 48h ; 'H' mov rsi, [r15+68h] mov rdx, [r15+70h] call _ZNK6evmone10EOF1Header13get_containerESt17basic_string_viewIhN4evmc11byte_traitsIhEEEm; evmone::EOF1Header::get_container(std::basic_string_view<uchar,evmc::byte_traits<uchar>>,ulong) mov [rsp+1E8h+var_188], rax mov [rsp+1E8h+var_190], rdx movdqa xmm0, [rsp+1E8h+var_1C8] movq rbp, xmm0 lea r13, [rsp+1E8h+var_130] mov edx, 0A8h mov rdi, r13 xor esi, esi call _memset mov dword ptr [r13+0], 5 lea rax, [rbx+3Fh] test rbx, rbx cmovns rax, rbx sar rax, 6 mov rcx, rbx sub rcx, rax mov [r13+10h], rcx test rbp, rbp jz short loc_4A8C4 mov rax, [rsp+1E8h+var_180] add r12, [rax] mov [rsp+1E8h+var_F0], r12 mov [rsp+1E8h+var_E8], rbp loc_4A8C4: mov rax, [r15+20h] mov ecx, [rax+28h] lea rdx, [rsp+1E8h+var_130] mov [rdx+3Ch], ecx movups xmm0, xmmword ptr [rax+18h] movups xmmword ptr [rdx+2Ch], xmm0 mov eax, [rax+8] inc eax mov [rdx+8], eax movdqa xmm0, cs:xmmword_833B0 movdqa xmm1, [rsp+1E8h+var_1B8] pshufb xmm1, xmm0 movdqu xmmword ptr [rdx+70h], xmm1 movdqa xmm1, [rsp+1E8h+var_1A8] pshufb xmm1, xmm0 movdqu xmmword ptr [rdx+80h], xmm1 movdqa xmm1, [rsp+1E8h+var_1E8] pshufb xmm1, xmm0 movdqu xmmword ptr [rdx+50h], xmm1 movdqa xmm1, [rsp+1E8h+var_1D8] pshufb xmm1, xmm0 movdqu xmmword ptr [rdx+60h], xmm1 mov rax, [rsp+1E8h+var_190] mov [rdx+0A8h], rax mov rax, [rsp+1E8h+var_188] mov [rdx+0B0h], rax mov rax, [r15+30h] mov rsi, [r15+38h] lea rdi, [rsp+1E8h+var_78] call qword ptr [rax+40h] lea rax, [rsp+1E8h+var_178] lea rsi, [rsp+1E8h+var_78] mov ecx, 9 mov rdi, rax rep movsq sub rbx, [rsp+1E8h+var_120] add rbx, [rax+8] mov rcx, [rax+10h] add [r15], rcx lea rdi, [r15+48h] mov rcx, [rax+18h] mov r8, [rax+20h] mov rdx, [r15+50h] xor esi, esi call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE10_M_replaceEmmPKhm; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::_M_replace(ulong,ulong,uchar const*,ulong) cmp [rsp+1E8h+var_178], 0 jnz short loc_4A9D1 mov eax, [rsp+1E8h+var_148] movdqu xmm0, [rsp+1E8h+var_144] pshufb xmm0, cs:xmmword_833B0 bswap eax movdqu xmmword ptr [r14-60h], xmm0 mov [r14-50h], rax mov qword ptr [r14-48h], 0 loc_4A9D1: mov rax, [rsp+1E8h+var_150] test rax, rax jz short loc_4A9E5 lea rdi, [rsp+1E8h+var_178] call rax loc_4A9E5: xor ebp, ebp loc_4A9E7: mov eax, ebp mov rdx, rbx add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4AA04 jmp short loc_4AA04 jmp short $+2 loc_4AA04: mov rdi, rax call __clang_call_terminate
long long evmone::instr::core::create_eof_impl<(evmone::Opcode)236>( const __m128i *a1, evmone *a2, long long a3, long long *a4, long long a5, long long a6) { unsigned int v7; // ebp __m128i v10; // xmm2 __m128i v11; // xmm4 unsigned long long v12; // r12 long long v13; // rcx long long v14; // rax long long v15; // r8 __m128i v16; // xmm3 __m128i v17; // xmm5 __m128i v18; // xmm6 __m128i v19; // xmm0 __m128i v20; // xmm1 evmone::Memory *v21; // rsi char *v22; // rax long long v23; // rax long long v24; // rcx __m128i v25; // xmm0 unsigned long long v26; // rcx unsigned long long v27; // rax __m128i v28; // xmm0 long long v29; // rdx signed long long epi64; // rsi bool v31; // zf __m128i v32; // xmm0 long long v33; // rdx unsigned long long v34; // rbp long long v35; // rax __m128i si128; // xmm0 long long v37; // rax __m128i v39; // [rsp+0h] [rbp-1E8h] BYREF __m128i v40; // [rsp+10h] [rbp-1D8h] BYREF __m128i v41; // [rsp+20h] [rbp-1C8h] BYREF __m128i v42; // [rsp+30h] [rbp-1B8h] BYREF __m128i v43; // [rsp+40h] [rbp-1A8h] BYREF long long v44; // [rsp+58h] [rbp-190h] unsigned long long container; // [rsp+60h] [rbp-188h] evmone::Memory *v46; // [rsp+68h] [rbp-180h] _QWORD v47[9]; // [rsp+70h] [rbp-178h] BYREF unsigned long long v48; // [rsp+B8h] [rbp-130h] BYREF unsigned long long v49; // [rsp+C0h] [rbp-128h] unsigned long long v50; // [rsp+C8h] [rbp-120h] unsigned long long v51; // [rsp+D0h] [rbp-118h] __int128 v52; // [rsp+E4h] [rbp-104h] int v53; // [rsp+F4h] [rbp-F4h] unsigned long long v54; // [rsp+F8h] [rbp-F0h] unsigned long long v55; // [rsp+100h] [rbp-E8h] __m128i v56; // [rsp+108h] [rbp-E0h] __m128i v57; // [rsp+118h] [rbp-D0h] __m128i v58; // [rsp+128h] [rbp-C0h] __m128i v59; // [rsp+138h] [rbp-B0h] long long v60; // [rsp+160h] [rbp-88h] unsigned long long v61; // [rsp+168h] [rbp-80h] _OWORD v62[7]; // [rsp+170h] [rbp-78h] BYREF v7 = 11; if ( (*(_BYTE *)(*(_QWORD *)(a3 + 32) + 4LL) & 1) == 0 ) { v10 = *a1; v11 = a1[1]; v12 = a1[-2].m128i_u64[0]; v13 = a1[-2].m128i_i64[1]; v14 = a1[-1].m128i_i64[0]; v15 = a1[-1].m128i_i64[1]; v16 = _mm_loadu_si128(a1 - 6); v17 = _mm_loadu_si128(a1 - 5); v18 = _mm_loadu_si128(a1 - 4); v19 = _mm_loadu_si128(a1 - 3); a1[-6] = 0LL; a1[-5] = 0LL; *(_QWORD *)(a3 + 80) = 0LL; **(_BYTE **)(a3 + 72) = 0; v20 = _mm_or_si128(v19, v18); v21 = (evmone::Memory *)(a3 + 8); if ( _mm_testz_si128(v20, v20) ) goto LABEL_9; v7 = 3; if ( !(_mm_extract_epi64(v19, 1) | v19.m128i_i64[0] | _mm_extract_epi64(v18, 1)) && !HIDWORD(v18.m128i_i64[0]) && !(v15 | v13 | v14 | HIDWORD(v12)) ) { if ( v12 + v18.m128i_i64[0] > *(_QWORD *)(a3 + 16) ) { v43 = v10; v40 = v16; v42 = v11; v39 = v17; v41 = v18; v22 = evmone::grow_memory(a2, v21, (evmone::Memory *)(v12 + v18.m128i_i64[0])); v18 = _mm_load_si128(&v41); v17 = _mm_load_si128(&v39); v11 = v42; v16 = _mm_load_si128(&v40); a2 = (evmone *)v22; } if ( (long long)a2 >= 0 ) { LABEL_9: v23 = *a4 + 2; *a4 = v23; v24 = *(_QWORD *)(a3 + 32); v7 = 0; if ( *(int *)(v24 + 8) <= 1023 ) { v41 = v18; v46 = v21; v42 = v11; v43 = v10; v39 = v17; v40 = v16; v25 = _mm_or_si128(v17, v16); if ( _mm_testz_si128(v25, v25) ) { LABEL_15: container = evmone::EOF1Header::get_container( (_QWORD *)(*(_QWORD *)(a3 + 504) + 72LL), *(_QWORD *)(a3 + 104), *(_QWORD *)(a3 + 112), *(unsigned __int8 *)(v23 - 1)); v44 = v33; v34 = _mm_load_si128(&v41).m128i_u64[0]; memset(&v48, 0LL, 168LL); LODWORD(v48) = 5; v50 = (unsigned long long)a2 - (long long)a2 / 64; if ( v34 ) { v54 = *(_QWORD *)v46 + v12; v55 = v34; } v35 = *(_QWORD *)(a3 + 32); v53 = *(_DWORD *)(v35 + 40); v52 = *(_OWORD *)(v35 + 24); LODWORD(v49) = *(_DWORD *)(v35 + 8) + 1; si128 = _mm_load_si128((const __m128i *)&xmmword_833B0); v58 = _mm_shuffle_epi8(_mm_load_si128(&v42), si128); v59 = _mm_shuffle_epi8(_mm_load_si128(&v43), si128); v56 = _mm_shuffle_epi8(_mm_load_si128(&v39), si128); v57 = _mm_shuffle_epi8(_mm_load_si128(&v40), si128); v60 = v44; v61 = container; (*(void ( **)(_OWORD *, _QWORD))(*(_QWORD *)(a3 + 48) + 64LL))(v62, *(_QWORD *)(a3 + 56)); qmemcpy(v47, v62, sizeof(v47)); *(_QWORD *)a3 += v47[2]; std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::_M_replace( a3 + 72, 0LL, *(_QWORD *)(a3 + 80), v47[3], v47[4]); if ( !LODWORD(v47[0]) ) { v37 = _byteswap_ulong(v47[6]); a1[-6] = _mm_shuffle_epi8(_mm_loadu_si128((const __m128i *)((char *)&v47[6] + 4)), (__m128i)xmmword_833B0); a1[-5].m128i_i64[0] = v37; a1[-5].m128i_i64[1] = 0LL; } if ( v47[5] ) ((void ( *)(_QWORD *))v47[5])(v47); return 0; } LODWORD(v62[1]) = *(_DWORD *)(v24 + 40); v62[0] = _mm_loadu_si128((const __m128i *)(v24 + 24)); (*(void ( **)(unsigned long long *, _QWORD, _OWORD *, long long, long long, long long, long long, long long, long long, long long, long long, long long, long long, long long, long long, long long))(*(_QWORD *)(a3 + 48) + 24LL))( &v48, *(_QWORD *)(a3 + 56), v62, v24, v15, a6, v39.m128i_i64[0], v39.m128i_i64[1], v40.m128i_i64[0], v40.m128i_i64[1], v41.m128i_i64[0], v41.m128i_i64[1], v42.m128i_i64[0], v42.m128i_i64[1], v43.m128i_i64[0], v43.m128i_i64[1]); v26 = _byteswap_uint64(v49); v27 = _byteswap_uint64(v48); v28 = _mm_load_si128(&v39); v29 = v28.m128i_i64[0]; epi64 = _mm_extract_epi64(v28, 1); v31 = (v28.m128i_i64[0] ^ v26 | epi64 ^ v27) == 0; v32 = _mm_load_si128(&v40); if ( v31 ) { v27 = _byteswap_uint64(v50); v26 = _byteswap_uint64(v51); v29 = v32.m128i_i64[0]; epi64 = _mm_extract_epi64(v32, 1); } if ( __PAIR128__(v27, v26) >= __PAIR128__(epi64, v29) ) { v23 = *a4; goto LABEL_15; } } } } } return v7; }
create_eof_impl<(evmone::Opcode)236>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RSI MOV RAX,qword ptr [RDX + 0x20] MOV EBP,0xb TEST byte ptr [RAX + 0x4],0x1 JNZ 0x0014a9e7 MOV R13,RCX MOV R15,RDX MOV R14,RDI MOVUPS XMM2,xmmword ptr [RDI] MOVUPS XMM4,xmmword ptr [RDI + 0x10] MOV R12,qword ptr [RDI + -0x20] MOV RCX,qword ptr [RDI + -0x18] MOV RAX,qword ptr [RDI + -0x10] MOV R8,qword ptr [RDI + -0x8] MOVDQU XMM3,xmmword ptr [RDI + -0x60] MOVDQU XMM5,xmmword ptr [RDI + -0x50] MOVDQU XMM6,xmmword ptr [RDI + -0x40] MOVDQU XMM0,xmmword ptr [RDI + -0x30] XORPS XMM1,XMM1 MOVUPS xmmword ptr [RDI + -0x60],XMM1 MOVUPS xmmword ptr [RDI + -0x50],XMM1 MOV qword ptr [RDX + 0x50],0x0 MOV RDX,qword ptr [RDX + 0x48] MOV byte ptr [RDX],0x0 MOVDQA XMM1,XMM0 POR XMM1,XMM6 LEA RSI,[R15 + 0x8] PTEST XMM1,XMM1 JZ 0x0014a752 PEXTRQ RDX,XMM0,0x1 MOVQ RDI,XMM0 OR RDI,RDX PEXTRQ RDX,XMM6,0x1 MOV EBP,0x3 OR RDX,RDI JNZ 0x0014a9e7 MOVQ RDX,XMM6 MOV RDI,RDX SHR RDI,0x20 JNZ 0x0014a9e7 OR RAX,RCX OR RAX,R8 MOV RCX,R12 SHR RCX,0x20 OR RCX,RAX JNZ 0x0014a9e7 ADD RDX,R12 CMP RDX,qword ptr [R15 + 0x10] JBE 0x0014a749 MOV RDI,RBX MOVAPS xmmword ptr [RSP + 0x40],XMM2 MOVDQA xmmword ptr [RSP + 0x10],XMM3 MOVAPS xmmword ptr [RSP + 0x30],XMM4 MOVDQA xmmword ptr [RSP],XMM5 MOV RBX,RSI MOVDQA xmmword ptr [RSP + 0x20],XMM6 CALL 0x00141c31 MOVDQA XMM6,xmmword ptr [RSP + 0x20] MOV RSI,RBX MOVDQA XMM5,xmmword ptr [RSP] MOVAPS XMM4,xmmword ptr [RSP + 0x30] MOVDQA XMM3,xmmword ptr [RSP + 0x10] MOVAPS XMM2,xmmword ptr [RSP + 0x40] MOV RBX,RAX LAB_0014a749: TEST RBX,RBX JS 0x0014a9e7 LAB_0014a752: MOV RAX,qword ptr [R13] ADD RAX,0x2 MOV qword ptr [R13],RAX MOV RCX,qword ptr [R15 + 0x20] XOR EBP,EBP CMP dword ptr [RCX + 0x8],0x3ff JG 0x0014a9e7 MOVDQA xmmword ptr [RSP + 0x20],XMM6 MOV qword ptr [RSP + 0x68],RSI MOVAPS xmmword ptr [RSP + 0x30],XMM4 MOVAPS xmmword ptr [RSP + 0x40],XMM2 MOVDQA xmmword ptr [RSP],XMM5 MOVDQA XMM0,XMM5 MOVDQA xmmword ptr [RSP + 0x10],XMM3 POR XMM0,XMM3 PTEST XMM0,XMM0 JZ 0x0014a83e MOV EAX,dword ptr [RCX + 0x28] LEA RDX,[RSP + 0x170] MOV dword ptr [RDX + 0x10],EAX MOVDQU XMM0,xmmword ptr [RCX + 0x18] MOVDQA xmmword ptr [RDX],XMM0 MOV RAX,qword ptr [R15 + 0x30] MOV RSI,qword ptr [R15 + 0x38] LAB_0014a7c3: LEA RDI,[RSP + 0xb8] CALL qword ptr [RAX + 0x18] LAB_0014a7ce: MOV RAX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0xc0] BSWAP RCX BSWAP RAX MOVDQA XMM0,xmmword ptr [RSP] MOVQ RDX,XMM0 PEXTRQ RSI,XMM0,0x1 MOV RDI,RCX XOR RDI,RDX MOV R8,RAX XOR R8,RSI OR R8,RDI MOVDQA XMM0,xmmword ptr [RSP + 0x10] JNZ 0x0014a82e MOV RAX,qword ptr [RSP + 0xc8] MOV RCX,qword ptr [RSP + 0xd0] BSWAP RAX BSWAP RCX MOVQ RDX,XMM0 PEXTRQ RSI,XMM0,0x1 LAB_0014a82e: CMP RCX,RDX SBB RAX,RSI JC 0x0014a9e7 MOV RAX,qword ptr [R13] LAB_0014a83e: MOVZX ECX,byte ptr [RAX + -0x1] MOV RDI,qword ptr [R15 + 0x1f8] ADD RDI,0x48 MOV RSI,qword ptr [R15 + 0x68] MOV RDX,qword ptr [R15 + 0x70] CALL 0x00142fc4 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x58],RDX MOVDQA XMM0,xmmword ptr [RSP + 0x20] MOVQ RBP,XMM0 LEA R13,[RSP + 0xb8] MOV EDX,0xa8 MOV RDI,R13 XOR ESI,ESI CALL 0x00122190 MOV dword ptr [R13],0x5 LEA RAX,[RBX + 0x3f] TEST RBX,RBX CMOVNS RAX,RBX SAR RAX,0x6 MOV RCX,RBX SUB RCX,RAX MOV qword ptr [R13 + 0x10],RCX TEST RBP,RBP JZ 0x0014a8c4 MOV RAX,qword ptr [RSP + 0x68] ADD R12,qword ptr [RAX] MOV qword ptr [RSP + 0xf8],R12 MOV qword ptr [RSP + 0x100],RBP LAB_0014a8c4: MOV RAX,qword ptr [R15 + 0x20] MOV ECX,dword ptr [RAX + 0x28] LEA RDX,[RSP + 0xb8] MOV dword ptr [RDX + 0x3c],ECX MOVUPS XMM0,xmmword ptr [RAX + 0x18] MOVUPS xmmword ptr [RDX + 0x2c],XMM0 MOV EAX,dword ptr [RAX + 0x8] INC EAX MOV dword ptr [RDX + 0x8],EAX MOVDQA XMM0,xmmword ptr [0x001833b0] MOVDQA XMM1,xmmword ptr [RSP + 0x30] PSHUFB XMM1,XMM0 MOVDQU xmmword ptr [RDX + 0x70],XMM1 MOVDQA XMM1,xmmword ptr [RSP + 0x40] PSHUFB XMM1,XMM0 MOVDQU xmmword ptr [RDX + 0x80],XMM1 MOVDQA XMM1,xmmword ptr [RSP] PSHUFB XMM1,XMM0 MOVDQU xmmword ptr [RDX + 0x50],XMM1 MOVDQA XMM1,xmmword ptr [RSP + 0x10] PSHUFB XMM1,XMM0 MOVDQU xmmword ptr [RDX + 0x60],XMM1 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RDX + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RDX + 0xb0],RAX MOV RAX,qword ptr [R15 + 0x30] MOV RSI,qword ptr [R15 + 0x38] LAB_0014a950: LEA RDI,[RSP + 0x170] CALL qword ptr [RAX + 0x40] LEA RAX,[RSP + 0x70] LEA RSI,[RSP + 0x170] MOV ECX,0x9 MOV RDI,RAX MOVSQ.REP RDI,RSI SUB RBX,qword ptr [RSP + 0xc8] ADD RBX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x10] ADD qword ptr [R15],RCX LEA RDI,[R15 + 0x48] MOV RCX,qword ptr [RAX + 0x18] MOV R8,qword ptr [RAX + 0x20] MOV RDX,qword ptr [R15 + 0x50] LAB_0014a996: XOR ESI,ESI CALL 0x0014b39a CMP dword ptr [RSP + 0x70],0x0 JNZ 0x0014a9d1 MOV EAX,dword ptr [RSP + 0xa0] MOVDQU XMM0,xmmword ptr [RSP + 0xa4] PSHUFB XMM0,xmmword ptr [0x001833b0] BSWAP EAX MOVDQU xmmword ptr [R14 + -0x60],XMM0 MOV qword ptr [R14 + -0x50],RAX MOV qword ptr [R14 + -0x48],0x0 LAB_0014a9d1: MOV RAX,qword ptr [RSP + 0x98] TEST RAX,RAX JZ 0x0014a9e5 LAB_0014a9de: LEA RDI,[RSP + 0x70] CALL RAX LAB_0014a9e5: XOR EBP,EBP LAB_0014a9e7: MOV EAX,EBP MOV RDX,RBX ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* evmone::Result evmone::instr::core::create_eof_impl<(evmone::Opcode)236>(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*&) */ int1 [16] evmone::instr::core::create_eof_impl<(evmone::Opcode)236> (int1 (*param_1) [16],long param_2,long *param_3,long *param_4) { int1 auVar1 [16]; int1 auVar2 [16]; ulong uVar3; long lVar4; int1 auVar5 [16]; int1 auVar6 [16]; long lVar7; ulong uVar8; ulong uVar9; long lVar10; int8 uVar11; int8 *puVar12; int *piVar13; byte bVar14; int1 auVar15 [16]; ulong uVar16; int1 auVar17 [16]; ulong local_1e8; ulong uStack_1e0; ulong local_1d8; ulong uStack_1d0; int local_178 [2]; long local_170; long local_168; uchar *local_160; ulong local_158; code *local_150; uint local_148; int1 local_144 [16]; uint local_130; uint uStack_12c; uint local_128; uint uStack_124; ulong local_120; ulong local_118; int8 local_104; int8 uStack_fc; int4 local_f4; long local_f0; ulong local_e8; int1 local_e0 [16]; int1 local_d0 [16]; int1 local_c0 [16]; int1 local_b0 [16]; int8 local_88; int8 local_80; int8 local_78; int8 uStack_70; int4 local_68; bVar14 = 0; uVar11 = 0xb; if ((*(byte *)(param_3[4] + 4) & 1) != 0) goto LAB_0014a9e7; auVar6 = *param_1; auVar5 = param_1[1]; uVar3 = *(ulong *)param_1[-2]; lVar10 = *(long *)(param_1[-2] + 8); lVar7 = *(long *)param_1[-1]; lVar4 = *(long *)(param_1[-1] + 8); auVar15 = param_1[-6]; auVar1 = param_1[-5]; auVar17 = param_1[-4]; auVar2 = param_1[-3]; *(int8 *)param_1[-6] = 0; *(int8 *)(param_1[-6] + 8) = 0; *(int8 *)param_1[-5] = 0; *(int8 *)(param_1[-5] + 8) = 0; param_3[10] = 0; *(int1 *)param_3[9] = 0; uVar16 = auVar17._0_8_; if (auVar2 != (int1 [16])0x0 || auVar17 != (int1 [16])0x0) { uVar11 = 3; if (((auVar17._8_8_ != 0 || (auVar2._0_8_ != 0 || auVar2._8_8_ != 0)) || (uVar16 >> 0x20 != 0)) || (uVar3 >> 0x20 != 0 || ((lVar7 != 0 || lVar10 != 0) || lVar4 != 0))) goto LAB_0014a9e7; if ((ulong)param_3[2] < uVar16 + uVar3) { param_2 = grow_memory(param_2,(Memory *)(param_3 + 1),uVar16 + uVar3); } if (param_2 < 0) goto LAB_0014a9e7; } lVar7 = *param_4 + 2; *param_4 = lVar7; lVar10 = param_3[4]; uVar11 = 0; if (*(int *)(lVar10 + 8) < 0x400) { if (auVar1 != (int1 [16])0x0 || auVar15 != (int1 [16])0x0) { local_68 = *(int4 *)(lVar10 + 0x28); local_78 = *(int8 *)(lVar10 + 0x18); uStack_70 = *(int8 *)(lVar10 + 0x20); /* try { // try from 0014a7c3 to 0014a7cd has its CatchHandler @ 0014aa00 */ (**(code **)(param_3[6] + 0x18))(&local_130,param_3[7]); uVar9 = (ulong)(uStack_124 >> 0x18) | (((ulong)uStack_124 & 0xff0000) << 0x20) >> 0x28 | (((ulong)uStack_124 & 0xff00) << 0x20) >> 0x18 | (((ulong)uStack_124 & 0xff) << 0x20) >> 8 | ((ulong)local_128 & 0xff000000) << 8 | ((ulong)local_128 & 0xff0000) << 0x18 | ((ulong)local_128 & 0xff00) << 0x28 | CONCAT44(uStack_124,local_128) << 0x38; uVar8 = (ulong)(uStack_12c >> 0x18) | (((ulong)uStack_12c & 0xff0000) << 0x20) >> 0x28 | (((ulong)uStack_12c & 0xff00) << 0x20) >> 0x18 | (((ulong)uStack_12c & 0xff) << 0x20) >> 8 | ((ulong)local_130 & 0xff000000) << 8 | ((ulong)local_130 & 0xff0000) << 0x18 | ((ulong)local_130 & 0xff00) << 0x28 | CONCAT44(uStack_12c,local_130) << 0x38; local_1e8 = auVar1._0_8_; uStack_1e0 = auVar1._8_8_; local_1d8 = auVar15._0_8_; uStack_1d0 = auVar15._8_8_; if (uVar8 == uStack_1e0 && uVar9 == local_1e8) { uVar8 = local_120 >> 0x38 | (local_120 & 0xff000000000000) >> 0x28 | (local_120 & 0xff0000000000) >> 0x18 | (local_120 & 0xff00000000) >> 8 | (local_120 & 0xff000000) << 8 | (local_120 & 0xff0000) << 0x18 | (local_120 & 0xff00) << 0x28 | local_120 << 0x38; uVar9 = local_118 >> 0x38 | (local_118 & 0xff000000000000) >> 0x28 | (local_118 & 0xff0000000000) >> 0x18 | (local_118 & 0xff00000000) >> 8 | (local_118 & 0xff000000) << 8 | (local_118 & 0xff0000) << 0x18 | (local_118 & 0xff00) << 0x28 | local_118 << 0x38; local_1e8 = local_1d8; uStack_1e0 = uStack_1d0; } if (uVar8 < uStack_1e0 || uVar8 - uStack_1e0 < (ulong)(uVar9 < local_1e8)) goto LAB_0014a9e7; lVar7 = *param_4; } auVar17 = EOF1Header::get_container (param_3[0x3f] + 0x48,param_3[0xd],param_3[0xe],*(int1 *)(lVar7 + -1)) ; memset(&local_130,0,0xa8); local_130 = 5; lVar10 = param_2 + 0x3f; if (-1 < param_2) { lVar10 = param_2; } local_120 = param_2 - (lVar10 >> 6); if (uVar16 != 0) { local_f0 = uVar3 + param_3[1]; local_e8 = uVar16; } lVar10 = param_3[4]; local_f4 = *(int4 *)(lVar10 + 0x28); local_104 = *(int8 *)(lVar10 + 0x18); uStack_fc = *(int8 *)(lVar10 + 0x20); local_128 = *(int *)(lVar10 + 8) + 1; local_c0 = pshufb(auVar5,_DAT_001833b0); local_b0 = pshufb(auVar6,_DAT_001833b0); local_e0 = pshufb(auVar1,_DAT_001833b0); local_d0 = pshufb(auVar15,_DAT_001833b0); /* try { // try from 0014a950 to 0014a95a has its CatchHandler @ 0014aa04 */ local_88 = auVar17._8_8_; local_80 = auVar17._0_8_; (**(code **)(param_3[6] + 0x40))(&local_78,param_3[7]); puVar12 = &local_78; piVar13 = local_178; for (lVar10 = 9; lVar10 != 0; lVar10 = lVar10 + -1) { *(int8 *)piVar13 = *puVar12; puVar12 = puVar12 + (ulong)bVar14 * -2 + 1; piVar13 = piVar13 + ((ulong)bVar14 * -2 + 1) * 2; } param_2 = (param_2 - local_120) + local_170; *param_3 = *param_3 + local_168; /* try { // try from 0014a996 to 0014a99c has its CatchHandler @ 0014aa02 */ std::__cxx11:: basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>:: _M_replace((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> *)(param_3 + 9),0,param_3[10],local_160,local_158); if (local_178[0] == 0) { auVar15 = pshufb(local_144,_DAT_001833b0); param_1[-6] = auVar15; *(ulong *)param_1[-5] = (ulong)(local_148 >> 0x18 | (local_148 & 0xff0000) >> 8 | (local_148 & 0xff00) << 8 | local_148 << 0x18); *(int8 *)(param_1[-5] + 8) = 0; } if (local_150 != (code *)0x0) { /* try { // try from 0014a9de to 0014a9e4 has its CatchHandler @ 0014a9fe */ (*local_150)(local_178); } uVar11 = 0; } LAB_0014a9e7: auVar15._8_8_ = param_2; auVar15._0_8_ = uVar11; return auVar15; }
61,950
dtoa_alloc
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static char *dtoa_alloc(int i, Stack_alloc *alloc) { char *rv; int aligned_size= MY_ALIGN(i, SIZEOF_CHARP); if (alloc->free + aligned_size <= alloc->end) { rv= alloc->free; alloc->free+= aligned_size; } else rv= malloc(i); return rv; }
O0
c
dtoa_alloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl -0x4(%rbp), %eax addl $0x8, %eax subl $0x1, %eax andl $-0x8, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x1c(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0x3584a movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x1c(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0x35857 movslq -0x4(%rbp), %rdi callq 0x135b0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
dtoa_alloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov eax, [rbp+var_4] add eax, 8 sub eax, 1 and eax, 0FFFFFFF8h mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_1C] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_3584A mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_1C] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_35857 loc_3584A: movsxd rdi, [rbp+var_4] call _malloc mov [rbp+var_18], rax loc_35857: mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long dtoa_alloc(int a1, long long a2) { signed int v3; // [rsp+4h] [rbp-1Ch] long long v4; // [rsp+8h] [rbp-18h] v3 = (a1 + 7) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) return malloc(a1); v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; return v4; }
dtoa_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x8 SUB EAX,0x1 AND EAX,0xfffffff8 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x1c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x0013584a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x00135857 LAB_0013584a: MOVSXD RDI,dword ptr [RBP + -0x4] CALL 0x001135b0 MOV qword ptr [RBP + -0x18],RAX LAB_00135857: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
void * dtoa_alloc(int param_1,long param_2) { uint uVar1; int8 local_20; uVar1 = param_1 + 7U & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar1)) { local_20 = malloc((long)param_1); } else { local_20 = *(void **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar1; } return local_20; }
61,951
google::protobuf::(anonymous namespace)::EnumValueToPascalCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
std::string EnumValueToPascalCase(const std::string& input) { bool next_upper = true; std::string result; result.reserve(input.size()); for (char character : input) { if (character == '_') { next_upper = true; } else { if (next_upper) { result.push_back(ToUpper(character)); } else { result.push_back(ToLower(character)); } next_upper = false; } } return result; }
O0
cpp
google::protobuf::(anonymous namespace)::EnumValueToPascalCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x68, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movb $0x1, 0x57(%rsp) movb $0x0, 0x56(%rsp) callq 0x21390 movq 0x58(%rsp), %rdi callq 0x21300 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0x21850 jmp 0x26c293 movq 0x58(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rdi callq 0x21240 movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rdi callq 0x21b40 movq %rax, 0x28(%rsp) leaq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x77d20 testb $0x1, %al jne 0x26c2d3 jmp 0x26c378 leaq 0x30(%rsp), %rdi callq 0x77d60 movb (%rax), %al movb %al, 0x27(%rsp) movsbl 0x27(%rsp), %eax cmpl $0x5f, %eax jne 0x26c311 movb $0x1, 0x57(%rsp) jmp 0x26c367 movq 0x18(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) callq 0x21cc8 jmp 0x26c398 testb $0x1, 0x57(%rsp) je 0x26c33d movsbl 0x27(%rsp), %edi callq 0x27e1d0 movb %al, 0xf(%rsp) jmp 0x26c328 movq 0x18(%rsp), %rdi movb 0xf(%rsp), %al movsbl %al, %esi callq 0x21c20 jmp 0x26c33b jmp 0x26c362 movsbl 0x27(%rsp), %edi callq 0x27e210 movb %al, 0xe(%rsp) jmp 0x26c34d movq 0x18(%rsp), %rdi movb 0xe(%rsp), %al movsbl %al, %esi callq 0x21c20 jmp 0x26c360 jmp 0x26c362 movb $0x0, 0x57(%rsp) jmp 0x26c369 leaq 0x30(%rsp), %rdi callq 0x77d70 jmp 0x26c2bb movb $0x1, 0x56(%rsp) testb $0x1, 0x56(%rsp) jne 0x26c38e movq 0x18(%rsp), %rdi callq 0x21cc8 movq 0x10(%rsp), %rax addq $0x68, %rsp retq movq 0x48(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZN6google8protobuf12_GLOBAL__N_121EnumValueToPascalCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 68h mov [rsp+68h+var_50], rdi mov rax, rdi mov [rsp+68h+var_58], rax mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_11], 1 mov [rsp+68h+var_12], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rsp+68h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+68h+var_50] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) jmp short $+2 loc_26C293: mov rax, [rsp+68h+var_10] mov [rsp+68h+var_30], rax mov rdi, [rsp+68h+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+68h+var_38], rax mov rdi, [rsp+68h+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov qword ptr [rsp+68h+var_40], rax loc_26C2BB: lea rdi, [rsp+68h+var_38] lea rsi, [rsp+68h+var_40]; char call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_26C2D3 jmp loc_26C378 loc_26C2D3: lea rdi, [rsp+68h+var_38] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) mov al, [rax] mov [rsp+68h+var_41], al movsx eax, [rsp+68h+var_41] cmp eax, 5Fh ; '_' jnz short loc_26C311 mov [rsp+68h+var_11], 1 jmp short loc_26C367 mov rdi, [rsp+arg_10]; void * mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_26C398 loc_26C311: test [rsp+68h+var_11], 1 jz short loc_26C33D movsx edi, [rsp+68h+var_41]; this call _ZN6google8protobuf12_GLOBAL__N_17ToUpperEc; google::protobuf::`anonymous namespace'::ToUpper(char) mov [rsp+68h+var_59], al jmp short $+2 loc_26C328: mov rdi, [rsp+68h+var_50] mov al, [rsp+68h+var_59] movsx esi, al call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short $+2 loc_26C33B: jmp short loc_26C362 loc_26C33D: movsx edi, [rsp+68h+var_41]; this call _ZN6google8protobuf12_GLOBAL__N_17ToLowerEc; google::protobuf::`anonymous namespace'::ToLower(char) mov [rsp+68h+var_5A], al jmp short $+2 loc_26C34D: mov rdi, [rsp+68h+var_50] mov al, [rsp+68h+var_5A] movsx esi, al call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short $+2 loc_26C360: jmp short $+2 loc_26C362: mov [rsp+68h+var_11], 0 loc_26C367: jmp short $+2 loc_26C369: lea rdi, [rsp+68h+var_38] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp loc_26C2BB loc_26C378: mov [rsp+68h+var_12], 1 test [rsp+68h+var_12], 1 jnz short loc_26C38E mov rdi, [rsp+68h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_26C38E: mov rax, [rsp+68h+var_58] add rsp, 68h retn loc_26C398: mov rdi, [rsp+arg_40] call __Unwind_Resume
long long google::protobuf::`anonymous namespace'::EnumValueToPascalCase(long long a1, long long a2) { long long v2; // rax char v4; // [rsp+Eh] [rbp-5Ah] char v5; // [rsp+Fh] [rbp-59h] char v6; // [rsp+27h] [rbp-41h] char v7[8]; // [rsp+28h] [rbp-40h] BYREF _QWORD v8[4]; // [rsp+30h] [rbp-38h] BYREF char v9; // [rsp+56h] [rbp-12h] char v10; // [rsp+57h] [rbp-11h] long long v11; // [rsp+58h] [rbp-10h] long long v12; // [rsp+60h] [rbp-8h] v12 = a1; v11 = a2; v10 = 1; v9 = 0; std::string::basic_string(a1); v2 = std::string::size(a2); std::string::reserve(a1, v2); v8[1] = a2; v8[0] = std::string::begin(a2); *(_QWORD *)v7 = std::string::end(a2); while ( __gnu_cxx::operator!=<char const*,std::string>((long long)v8, (long long)v7) ) { v6 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)v8); if ( v6 == 95 ) { v10 = 1; } else { if ( (v10 & 1) != 0 ) { v5 = google::protobuf::`anonymous namespace'::ToUpper( (google::protobuf::_anonymous_namespace_ *)(unsigned int)v6, (char)v7); std::string::push_back(a1, (unsigned int)v5); } else { v4 = google::protobuf::`anonymous namespace'::ToLower( (google::protobuf::_anonymous_namespace_ *)(unsigned int)v6, (char)v7); std::string::push_back(a1, (unsigned int)v4); } v10 = 0; } __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v8); } return a1; }
empty: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RDI CALL 0x002704b0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX CALL 0x002704e0 MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x18] LEA RSI,[RSP + 0x10] CALL 0x00270470 AND AL,0x1 ADD RSP,0x28 RET
/* std::vector<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator, std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator> >, std::allocator<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator, std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator> > > >::empty() const */ bool __thiscall std:: vector<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator,std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator,std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator>>>> ::empty(vector<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator,std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator,std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator>>>> *this) { bool bVar1; int8 local_18; int8 local_10; vector<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator,std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::objectivec::ExtensionGenerator,std::default_delete<google::protobuf::compiler::objectivec::ExtensionGenerator>>>> *local_8; local_8 = this; local_10 = begin(this); local_18 = end(this); bVar1 = __gnu_cxx::operator==((__normal_iterator *)&local_10,(__normal_iterator *)&local_18); return bVar1; }
61,952
stbi_is_16_bit_from_memory
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__is_16_main(&s); }
O3
c
stbi_is_16_bit_from_memory: subq $0xe8, %rsp leaq 0x8(%rsp), %rax movq $0x0, 0x10(%rax) xorl %ecx, %ecx movl %ecx, 0x30(%rax) movl %ecx, 0xb8(%rax) movq %rdi, 0xd0(%rax) movq %rdi, 0xc0(%rax) movslq %esi, %rcx addq %rdi, %rcx movq %rcx, 0xd8(%rax) movq %rcx, 0xc8(%rax) movq %rax, %rdi callq 0x2acb4 addq $0xe8, %rsp retq
stbi_is_16_bit_from_memory: sub rsp, 0E8h lea rax, [rsp+0E8h+var_E0] mov qword ptr [rax+10h], 0 xor ecx, ecx mov [rax+30h], ecx mov [rax+0B8h], ecx mov [rax+0D0h], rdi mov [rax+0C0h], rdi movsxd rcx, esi add rcx, rdi mov [rax+0D8h], rcx mov [rax+0C8h], rcx mov rdi, rax call _ZL16stbi__is_16_mainP13stbi__context; stbi__is_16_main(stbi__context *) add rsp, 0E8h retn
_BOOL8 stbi_is_16_bit_from_memory(long long a1, int a2) { _BYTE v3[16]; // [rsp+8h] [rbp-E0h] BYREF long long v4; // [rsp+18h] [rbp-D0h] int v5; // [rsp+38h] [rbp-B0h] int v6; // [rsp+C0h] [rbp-28h] long long v7; // [rsp+C8h] [rbp-20h] long long v8; // [rsp+D0h] [rbp-18h] long long v9; // [rsp+D8h] [rbp-10h] long long v10; // [rsp+E0h] [rbp-8h] v4 = 0LL; v5 = 0; v6 = 0; v9 = a1; v7 = a1; v10 = a1 + a2; v8 = v10; return stbi__is_16_main((long long)v3); }
stbi_is_16_bit_from_memory: SUB RSP,0xe8 LEA RAX,[RSP + 0x8] MOV qword ptr [RAX + 0x10],0x0 XOR ECX,ECX MOV dword ptr [RAX + 0x30],ECX MOV dword ptr [RAX + 0xb8],ECX MOV qword ptr [RAX + 0xd0],RDI MOV qword ptr [RAX + 0xc0],RDI MOVSXD RCX,ESI ADD RCX,RDI MOV qword ptr [RAX + 0xd8],RCX MOV qword ptr [RAX + 0xc8],RCX MOV RDI,RAX CALL 0x0012acb4 ADD RSP,0xe8 RET
void stbi_is_16_bit_from_memory(long param_1,int param_2) { stbi__context local_e0 [16]; int8 local_d0; int4 local_b0; int4 local_28; long local_20; long local_18; long local_10; long local_8; local_d0 = 0; local_b0 = 0; local_28 = 0; local_18 = param_2 + param_1; local_20 = param_1; local_10 = param_1; local_8 = local_18; stbi__is_16_main(local_e0); return; }
61,953
ankerl::nanobench::Bench& ankerl::nanobench::Bench::run<int BenchVector<main::Payload16B>(ankerl::nanobench::Bench&, bool)::'lambda0'()>(int BenchVector<main::Payload16B>(ankerl::nanobench::Bench&, bool)::'lambda0'()&&)
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
Bench& Bench::run(Op&& op) { // It is important that this method is kept short so the compiler can do better optimizations/ inlining of op() detail::IterationLogic iterationLogic(*this); auto& pc = detail::performanceCounters(); while (auto n = iterationLogic.numIters()) { pc.beginMeasure(); Clock::time_point const before = Clock::now(); while (n-- > 0) { op(); } Clock::time_point const after = Clock::now(); pc.endMeasure(); pc.updateResults(iterationLogic.numIters()); iterationLogic.add(after - before, pc); } iterationLogic.moveResultTo(mResults); return *this; }
O0
c
ankerl::nanobench::Bench& ankerl::nanobench::Bench::run<int BenchVector<main::Payload16B>(ankerl::nanobench::Bench&, bool)::'lambda0'()>(int BenchVector<main::Payload16B>(ankerl::nanobench::Bench&, bool)::'lambda0'()&&): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rsi movq %rsi, -0x60(%rbp) leaq -0x18(%rbp), %rdi callq 0x14c50 callq 0x13ec0 movq %rax, -0x58(%rbp) jmp 0x11a7c movq -0x58(%rbp), %rax movq %rax, -0x20(%rbp) leaq -0x18(%rbp), %rdi callq 0x14d00 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0x11b50 movq -0x20(%rbp), %rdi callq 0x15de0 jmp 0x11aa7 callq 0x45f0 movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x38(%rbp) cmpq $0x0, %rax jbe 0x11aec movq -0x10(%rbp), %rdi callq 0x11b80 jmp 0x11ad0 jmp 0x11ab0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) leaq -0x18(%rbp), %rdi callq 0x14cc0 jmp 0x11b77 callq 0x45f0 movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rdi callq 0x15e00 jmp 0x11b00 movq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) leaq -0x18(%rbp), %rdi callq 0x14d00 movq -0x68(%rbp), %rdi movq %rax, %rsi callq 0x15e20 jmp 0x11b1f leaq -0x48(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0xfc80 movq %rax, -0x70(%rbp) jmp 0x11b32 movq -0x70(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rdx movq -0x50(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0x14d20 jmp 0x11a84 movq -0x60(%rbp), %rsi addq $0x118, %rsi # imm = 0x118 leaq -0x18(%rbp), %rdi callq 0x14d60 leaq -0x18(%rbp), %rdi callq 0x14cc0 movq -0x60(%rbp), %rax addq $0x70, %rsp popq %rbp retq movq -0x28(%rbp), %rdi callq 0x47a0
_ZN6ankerl9nanobench5Bench3runIZ11BenchVectorImEiRS1_bEUlvE4_EES4_OT_: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_8]; ankerl::nanobench::Bench * mov [rbp+var_60], rsi lea rdi, [rbp+var_18]; this call _ZN6ankerl9nanobench6detail14IterationLogicC2ERKNS0_5BenchE; ankerl::nanobench::detail::IterationLogic::IterationLogic(ankerl::nanobench::Bench const&) call _ZN6ankerl9nanobench6detail19performanceCountersEv; ankerl::nanobench::detail::performanceCounters(void) mov [rbp+var_58], rax jmp short $+2 loc_11A7C: mov rax, [rbp+var_58] mov [rbp+var_20], rax loc_11A84: lea rdi, [rbp+var_18]; this call _ZNK6ankerl9nanobench6detail14IterationLogic8numItersEv; ankerl::nanobench::detail::IterationLogic::numIters(void) mov [rbp+var_38], rax cmp [rbp+var_38], 0 jz loc_11B50 mov rdi, [rbp+var_20]; this call _ZN6ankerl9nanobench6detail19PerformanceCounters12beginMeasureEv; ankerl::nanobench::detail::PerformanceCounters::beginMeasure(void) jmp short $+2 loc_11AA7: call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void) mov [rbp+var_40], rax loc_11AB0: mov rax, [rbp+var_38] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rcx cmp rax, 0 jbe short loc_11AEC mov rdi, [rbp+var_10] call _ZZ11BenchVectorImEiRN6ankerl9nanobench5BenchEbENKUlvE4_clEv; BenchVector<ulong>(ankerl::nanobench::Bench &,bool)::{lambda(void)#6}::operator()(void) jmp short $+2 loc_11AD0: jmp short loc_11AB0 mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax lea rdi, [rbp+var_18]; this call _ZN6ankerl9nanobench6detail14IterationLogicD2Ev; ankerl::nanobench::detail::IterationLogic::~IterationLogic() jmp loc_11B77 loc_11AEC: call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void) mov [rbp+var_48], rax mov rdi, [rbp+var_20]; this call _ZN6ankerl9nanobench6detail19PerformanceCounters10endMeasureEv; ankerl::nanobench::detail::PerformanceCounters::endMeasure(void) jmp short $+2 loc_11B00: mov rax, [rbp+var_20] mov [rbp+var_68], rax lea rdi, [rbp+var_18]; this call _ZNK6ankerl9nanobench6detail14IterationLogic8numItersEv; ankerl::nanobench::detail::IterationLogic::numIters(void) mov rdi, [rbp+var_68]; this mov rsi, rax; unsigned __int64 call _ZN6ankerl9nanobench6detail19PerformanceCounters13updateResultsEm; ankerl::nanobench::detail::PerformanceCounters::updateResults(ulong) jmp short $+2 loc_11B1F: lea rdi, [rbp+var_48] lea rsi, [rbp+var_40] call _ZNSt6chronomiINS_3_V212steady_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE; std::chrono::operator-<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&) mov [rbp+var_70], rax jmp short $+2 loc_11B32: mov rax, [rbp+var_70] mov [rbp+var_50], rax mov rdx, [rbp+var_20] mov rsi, [rbp+var_50] lea rdi, [rbp+var_18] call _ZN6ankerl9nanobench6detail14IterationLogic3addENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEERKNS1_19PerformanceCountersE; ankerl::nanobench::detail::IterationLogic::add(std::chrono::duration<long,std::ratio<1l,1000000000l>>,ankerl::nanobench::detail::PerformanceCounters const&) jmp loc_11A84 loc_11B50: mov rsi, [rbp+var_60] add rsi, 118h lea rdi, [rbp+var_18] call _ZN6ankerl9nanobench6detail14IterationLogic12moveResultToERSt6vectorINS0_6ResultESaIS4_EE; ankerl::nanobench::detail::IterationLogic::moveResultTo(std::vector<ankerl::nanobench::Result> &) lea rdi, [rbp+var_18]; this call _ZN6ankerl9nanobench6detail14IterationLogicD2Ev; ankerl::nanobench::detail::IterationLogic::~IterationLogic() mov rax, [rbp+var_60] add rsp, 70h pop rbp retn loc_11B77: mov rdi, [rbp+var_28] call __Unwind_Resume
ankerl::nanobench::Bench * ankerl::nanobench::Bench::run<int BenchVector<unsigned long>(ankerl::nanobench::Bench&,bool)::{lambda(void)#6}>( ankerl::nanobench::Bench *a1, std::chrono::_V2::steady_clock *a2) { std::chrono::_V2::steady_clock *v2; // rdi unsigned long long v4; // rax long long v5; // rsi std::chrono::_V2::steady_clock *v7; // [rsp+8h] [rbp-68h] long long v9; // [rsp+28h] [rbp-48h] BYREF long long v10; // [rsp+30h] [rbp-40h] BYREF long long v11; // [rsp+38h] [rbp-38h] std::chrono::_V2::steady_clock *i; // [rsp+50h] [rbp-20h] char v13[8]; // [rsp+58h] [rbp-18h] BYREF std::chrono::_V2::steady_clock *v14; // [rsp+60h] [rbp-10h] ankerl::nanobench::Bench *v15; // [rsp+68h] [rbp-8h] v15 = a1; v14 = a2; ankerl::nanobench::detail::IterationLogic::IterationLogic((ankerl::nanobench::detail::IterationLogic *)v13, a1); for ( i = (std::chrono::_V2::steady_clock *)ankerl::nanobench::detail::performanceCounters((ankerl::nanobench::detail *)v13); ; ankerl::nanobench::detail::IterationLogic::add(v13, v5, i) ) { v11 = ankerl::nanobench::detail::IterationLogic::numIters((ankerl::nanobench::detail::IterationLogic *)v13); if ( !v11 ) break; v2 = i; ankerl::nanobench::detail::PerformanceCounters::beginMeasure(i); v10 = std::chrono::_V2::steady_clock::now(v2); while ( v11-- ) { v2 = v14; BenchVector<unsigned long>(ankerl::nanobench::Bench &,bool)::{lambda(void)#6}::operator()(v14); } v9 = std::chrono::_V2::steady_clock::now(v2); ankerl::nanobench::detail::PerformanceCounters::endMeasure(i); v7 = i; v4 = ankerl::nanobench::detail::IterationLogic::numIters((ankerl::nanobench::detail::IterationLogic *)v13); ankerl::nanobench::detail::PerformanceCounters::updateResults(v7, v4); v5 = std::chrono::operator-<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>( (long long)&v9, (long long)&v10); } ankerl::nanobench::detail::IterationLogic::moveResultTo(v13, (char *)a1 + 280); ankerl::nanobench::detail::IterationLogic::~IterationLogic((ankerl::nanobench::detail::IterationLogic *)v13); return a1; }
run<BenchVector<unsigned_long>(ankerl::nanobench::Bench&,bool)::{lambda()#6}>: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x60],RSI LEA RDI,[RBP + -0x18] CALL 0x00114c50 LAB_00111a71: CALL 0x00113ec0 MOV qword ptr [RBP + -0x58],RAX JMP 0x00111a7c LAB_00111a7c: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x20],RAX LAB_00111a84: LEA RDI,[RBP + -0x18] CALL 0x00114d00 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x00111b50 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00115de0 JMP 0x00111aa7 LAB_00111aa7: CALL 0x001045f0 MOV qword ptr [RBP + -0x40],RAX LAB_00111ab0: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x38],RCX CMP RAX,0x0 JBE 0x00111aec MOV RDI,qword ptr [RBP + -0x10] CALL 0x00111b80 JMP 0x00111ad0 LAB_00111ad0: JMP 0x00111ab0 LAB_00111aec: CALL 0x001045f0 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00115e00 JMP 0x00111b00 LAB_00111b00: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX LEA RDI,[RBP + -0x18] CALL 0x00114d00 MOV RDI,qword ptr [RBP + -0x68] MOV RSI,RAX CALL 0x00115e20 JMP 0x00111b1f LAB_00111b1f: LEA RDI,[RBP + -0x48] LEA RSI,[RBP + -0x40] CALL 0x0010fc80 LAB_00111b2c: MOV qword ptr [RBP + -0x70],RAX JMP 0x00111b32 LAB_00111b32: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x50],RAX MOV RDX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x50] LEA RDI,[RBP + -0x18] CALL 0x00114d20 JMP 0x00111a84 LAB_00111b50: MOV RSI,qword ptr [RBP + -0x60] ADD RSI,0x118 LEA RDI,[RBP + -0x18] CALL 0x00114d60 LEA RDI,[RBP + -0x18] CALL 0x00114cc0 MOV RAX,qword ptr [RBP + -0x60] ADD RSP,0x70 POP RBP RET
/* ankerl::nanobench::Bench& ankerl::nanobench::Bench::run<BenchVector<unsigned long>(ankerl::nanobench::Bench&, bool)::{lambda()#6}>(BenchVector<unsigned long>(ankerl::nanobench::Bench&, bool)::{lambda()#6}&&) */ Bench * __thiscall ankerl::nanobench::Bench:: run<BenchVector<unsigned_long>(ankerl::nanobench::Bench&,bool)::_lambda()_6_> (Bench *this,_lambda___6_ *param_1) { PerformanceCounters *this_00; ulong uVar1; int8 uVar2; int8 local_50; int8 local_48; long local_40; PerformanceCounters *local_28; IterationLogic local_20 [8]; _lambda___6_ *local_18; Bench *local_10; local_18 = param_1; local_10 = this; detail::IterationLogic::IterationLogic(local_20,this); /* try { // try from 00111a71 to 00111b2b has its CatchHandler @ 00111ad2 */ local_28 = (PerformanceCounters *)detail::performanceCounters(); while( true ) { local_40 = detail::IterationLogic::numIters(local_20); if (local_40 == 0) break; detail::PerformanceCounters::beginMeasure(local_28); local_48 = std::chrono::_V2::steady_clock::now(); while (local_40 != 0) { local_40 = local_40 + -1; BenchVector<unsigned_long>(ankerl::nanobench::Bench&,bool)::{lambda()#6}::operator()(local_18) ; } local_40 = local_40 + -1; local_50 = std::chrono::_V2::steady_clock::now(); detail::PerformanceCounters::endMeasure(local_28); this_00 = local_28; uVar1 = detail::IterationLogic::numIters(local_20); detail::PerformanceCounters::updateResults(this_00,uVar1); uVar2 = std::chrono::operator-((time_point *)&local_50,(time_point *)&local_48); detail::IterationLogic::add(local_20,uVar2,local_28); } detail::IterationLogic::moveResultTo(local_20,(vector *)(this + 0x118)); detail::IterationLogic::~IterationLogic(local_20); return this; }
61,954
Catch::Generators::GeneratorTracker::acquire(Catch::TestCaseTracking::TrackerContext&, Catch::TestCaseTracking::NameAndLocationRef const&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
static GeneratorTracker* acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocationRef const& nameAndLocation ) { GeneratorTracker* tracker; ITracker& currentTracker = ctx.currentTracker(); // Under specific circumstances, the generator we want // to acquire is also the current tracker. If this is // the case, we have to avoid looking through current // tracker's children, and instead return the current // tracker. // A case where this check is important is e.g. // for (int i = 0; i < 5; ++i) { // int n = GENERATE(1, 2); // } // // without it, the code above creates 5 nested generators. if ( currentTracker.nameAndLocation() == nameAndLocation ) { auto thisTracker = currentTracker.parent()->findChild( nameAndLocation ); assert( thisTracker ); assert( thisTracker->isGeneratorTracker() ); tracker = static_cast<GeneratorTracker*>( thisTracker ); } else if ( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isGeneratorTracker() ); tracker = static_cast<GeneratorTracker*>( childTracker ); } else { return nullptr; } if( !tracker->isComplete() ) { tracker->open(); } return tracker; }
O3
cpp
Catch::Generators::GeneratorTracker::acquire(Catch::TestCaseTracking::TrackerContext&, Catch::TestCaseTracking::NameAndLocationRef const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq 0x8(%rdi), %r14 leaq 0x8(%r14), %rdi callq 0x7f937 testb %al, %al je 0x78839 movq 0x38(%r14), %rdi movq %rbx, %rsi callq 0x62454 movq %rax, %rbx jmp 0x7884c movq %r14, %rdi movq %rbx, %rsi callq 0x62454 movq %rax, %rbx testq %rax, %rax je 0x78884 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) testb %al, %al jne 0x78886 movl $0x1, 0x58(%rbx) movq 0x60(%rbx), %rax movq %rbx, 0x8(%rax) movq 0x38(%rbx), %rax testq %rax, %rax je 0x78886 cmpl $0x2, 0x58(%rax) je 0x78886 movl $0x2, 0x58(%rax) movq 0x38(%rax), %rax jmp 0x7886c xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5Catch10Generators16GeneratorTracker7acquireERNS_16TestCaseTracking14TrackerContextERKNS2_18NameAndLocationRefE: push r14 push rbx push rax mov rbx, rsi mov r14, [rdi+8] lea rdi, [r14+8] call _ZN5Catch16TestCaseTrackingeqERKNS0_15NameAndLocationERKNS0_18NameAndLocationRefE; Catch::TestCaseTracking::operator==(Catch::TestCaseTracking::NameAndLocation const&,Catch::TestCaseTracking::NameAndLocationRef const&) test al, al jz short loc_78839 mov rdi, [r14+38h] mov rsi, rbx call _ZN5Catch16TestCaseTracking8ITracker9findChildERKNS0_18NameAndLocationRefE; Catch::TestCaseTracking::ITracker::findChild(Catch::TestCaseTracking::NameAndLocationRef const&) mov rbx, rax jmp short loc_7884C loc_78839: mov rdi, r14 mov rsi, rbx call _ZN5Catch16TestCaseTracking8ITracker9findChildERKNS0_18NameAndLocationRefE; Catch::TestCaseTracking::ITracker::findChild(Catch::TestCaseTracking::NameAndLocationRef const&) mov rbx, rax test rax, rax jz short loc_78884 loc_7884C: mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] test al, al jnz short loc_78886 mov dword ptr [rbx+58h], 1 mov rax, [rbx+60h] mov [rax+8], rbx mov rax, [rbx+38h] loc_7886C: test rax, rax jz short loc_78886 cmp dword ptr [rax+58h], 2 jz short loc_78886 mov dword ptr [rax+58h], 2 mov rax, [rax+38h] jmp short loc_7886C loc_78884: xor ebx, ebx loc_78886: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long Catch::Generators::GeneratorTracker::acquire(long long a1, long long a2) { long long v2; // r14 long long Child; // rbx long long i; // rax v2 = *(_QWORD *)(a1 + 8); if ( (unsigned __int8)Catch::TestCaseTracking::operator==(v2 + 8, a2) ) { Child = Catch::TestCaseTracking::ITracker::findChild(*(_QWORD *)(v2 + 56), a2); } else { Child = Catch::TestCaseTracking::ITracker::findChild(v2, a2); if ( !Child ) return 0LL; } if ( !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)Child + 16LL))(Child) ) { *(_DWORD *)(Child + 88) = 1; *(_QWORD *)(*(_QWORD *)(Child + 96) + 8LL) = Child; for ( i = *(_QWORD *)(Child + 56); i && *(_DWORD *)(i + 88) != 2; i = *(_QWORD *)(i + 56) ) *(_DWORD *)(i + 88) = 2; } return Child; }
acquire: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,qword ptr [RDI + 0x8] LEA RDI,[R14 + 0x8] CALL 0x0017f937 TEST AL,AL JZ 0x00178839 MOV RDI,qword ptr [R14 + 0x38] MOV RSI,RBX CALL 0x00162454 MOV RBX,RAX JMP 0x0017884c LAB_00178839: MOV RDI,R14 MOV RSI,RBX CALL 0x00162454 MOV RBX,RAX TEST RAX,RAX JZ 0x00178884 LAB_0017884c: MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x10] TEST AL,AL JNZ 0x00178886 MOV dword ptr [RBX + 0x58],0x1 MOV RAX,qword ptr [RBX + 0x60] MOV qword ptr [RAX + 0x8],RBX MOV RAX,qword ptr [RBX + 0x38] LAB_0017886c: TEST RAX,RAX JZ 0x00178886 CMP dword ptr [RAX + 0x58],0x2 JZ 0x00178886 MOV dword ptr [RAX + 0x58],0x2 MOV RAX,qword ptr [RAX + 0x38] JMP 0x0017886c LAB_00178884: XOR EBX,EBX LAB_00178886: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* Catch::Generators::GeneratorTracker::acquire(Catch::TestCaseTracking::TrackerContext&, Catch::TestCaseTracking::NameAndLocationRef const&) */ long * Catch::Generators::GeneratorTracker::acquire (TrackerContext *param_1,NameAndLocationRef *param_2) { ITracker *this; char cVar1; long *plVar2; long lVar3; this = *(ITracker **)(param_1 + 8); cVar1 = TestCaseTracking::operator==((NameAndLocation *)(this + 8),param_2); if (cVar1 == '\0') { plVar2 = (long *)TestCaseTracking::ITracker::findChild(this,param_2); if (plVar2 == (long *)0x0) { return (long *)0x0; } } else { plVar2 = (long *)TestCaseTracking::ITracker::findChild(*(ITracker **)(this + 0x38),param_2); } cVar1 = (**(code **)(*plVar2 + 0x10))(plVar2); if (cVar1 == '\0') { *(int4 *)(plVar2 + 0xb) = 1; *(long **)(plVar2[0xc] + 8) = plVar2; for (lVar3 = plVar2[7]; (lVar3 != 0 && (*(int *)(lVar3 + 0x58) != 2)); lVar3 = *(long *)(lVar3 + 0x38)) { *(int4 *)(lVar3 + 0x58) = 2; } } return plVar2; }
61,955
mysql_stmt_send_long_data_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_send_long_data_start(my_bool *ret, MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length) { MK_ASYNC_START_BODY( mysql_stmt_send_long_data, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; parms.param_number= param_number; parms.data= data; parms.length= length; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_send_long_data(stmt, param_number, data, length); return 0; }) }
O0
c
mysql_stmt_send_long_data_start: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x6339e movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x51770 movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) jmp 0x634c2 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x58(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x40(%rbp), %rdi addq $0x38, %rdi leaq 0xe6(%rip), %rsi # 0x634d0 leaq -0x60(%rbp), %rdx callq 0x64630 movl %eax, -0x34(%rbp) movq -0x40(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x40(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x34(%rbp) jle 0x63422 movq -0x40(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x40(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x634c2 cmpl $0x0, -0x34(%rbp) jge 0x634ae jmp 0x6342e movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1d1c2a(%rip), %rax # 0x235080 movq (%rax), %rsi movl $0x5, %edx callq 0x36140 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x1d1c08(%rip), %rax # 0x235090 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x36140 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movb $0x1, (%rax) jmp 0x634bb movq -0x40(%rbp), %rax movb 0x8(%rax), %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_stmt_send_long_data_start: 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_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_6339E mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call mysql_stmt_send_long_data mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov [rbp+var_4], 0 jmp loc_634C2 loc_6339E: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov [rbp+var_60], rax mov eax, [rbp+var_1C] mov [rbp+var_58], eax mov rax, [rbp+var_28] mov [rbp+var_50], rax mov rax, [rbp+var_30] mov [rbp+var_48], rax mov rax, [rbp+var_40] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_40] add rdi, 38h ; '8' lea rsi, mysql_stmt_send_long_data_start_internal lea rdx, [rbp+var_60] call my_context_spawn mov [rbp+var_34], eax mov rax, [rbp+var_40] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_40] mov byte ptr [rax+14h], 0 cmp [rbp+var_34], 0 jle short loc_63422 mov rax, [rbp+var_40] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_40] mov eax, [rax] mov [rbp+var_4], eax jmp loc_634C2 loc_63422: cmp [rbp+var_34], 0 jge loc_634AE jmp short $+2 loc_6342E: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 1 jmp short loc_634BB loc_634AE: mov rax, [rbp+var_40] mov cl, [rax+8] mov rax, [rbp+var_10] mov [rax], cl loc_634BB: mov [rbp+var_4], 0 loc_634C2: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mysql_stmt_send_long_data_start(char *a1, long long a2, unsigned int a3, long long a4, long long a5) { long long v6; // [rsp+0h] [rbp-60h] BYREF unsigned int v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+10h] [rbp-50h] long long v9; // [rsp+18h] [rbp-48h] _BYTE *v10; // [rsp+20h] [rbp-40h] int v11; // [rsp+2Ch] [rbp-34h] long long v12; // [rsp+30h] [rbp-30h] long long v13; // [rsp+38h] [rbp-28h] unsigned int v14; // [rsp+44h] [rbp-1Ch] long long v15; // [rsp+48h] [rbp-18h] char *v16; // [rsp+50h] [rbp-10h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; if ( *(_QWORD *)(a2 + 56) ) { v10 = *(_BYTE **)(*(_QWORD *)(*(_QWORD *)(v15 + 56) + 1152LL) + 40LL); v6 = v15; v7 = v14; v8 = v13; v9 = v12; v10[20] = 1; v11 = my_context_spawn(v10 + 56, mysql_stmt_send_long_data_start_internal, &v6); v10[21] = 0; v10[20] = 0; if ( v11 <= 0 ) { if ( v11 >= 0 ) { *v16 = v10[8]; } else { *(_DWORD *)(*(_QWORD *)(v15 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v15 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v15 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v15 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v15 + 56) + 662LL) = 0; *v16 = 1; } return 0; } else { v10[21] = 1; return *(unsigned int *)v10; } } else { *v16 = mysql_stmt_send_long_data(v15, v14, v13, v12); return 0; } }
mysql_stmt_send_long_data_start: 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 qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0016339e MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x00151770 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x0 JMP 0x001634c2 LAB_0016339e: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x58],EAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0x38 LEA RSI,[0x1634d0] LEA RDX,[RBP + -0x60] CALL 0x00164630 MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x34],0x0 JLE 0x00163422 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x001634c2 LAB_00163422: CMP dword ptr [RBP + -0x34],0x0 JGE 0x001634ae JMP 0x0016342e LAB_0016342e: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x335080] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x335090] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x1 JMP 0x001634bb LAB_001634ae: MOV RAX,qword ptr [RBP + -0x40] MOV CL,byte ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL LAB_001634bb: MOV dword ptr [RBP + -0x4],0x0 LAB_001634c2: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 mysql_stmt_send_long_data_start (int1 *param_1,long param_2,int4 param_3,int8 param_4,int8 param_5 ) { int1 uVar1; long local_68; int4 local_60; int8 local_58; int8 local_50; int4 *local_48; int local_3c; int8 local_38; int8 local_30; int4 local_24; long local_20; int1 *local_18; int4 local_c; local_38 = param_5; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_send_long_data(param_2,param_3,param_4,param_5); *local_18 = uVar1; local_c = 0; } else { local_48 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_48 + 5) = 1; local_68 = param_2; local_60 = param_3; local_58 = param_4; local_50 = param_5; local_3c = my_context_spawn(local_48 + 0xe,mysql_stmt_send_long_data_start_internal,&local_68); *(int1 *)((long)local_48 + 0x15) = 0; *(int1 *)(local_48 + 5) = 0; if (local_3c < 1) { if (local_3c < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_003350d0, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = *(int1 *)(local_48 + 2); } local_c = 0; } else { *(int1 *)((long)local_48 + 0x15) = 1; local_c = *local_48; } } return local_c; }
61,956
testing::Matcher<std::basic_string_view<char, std::char_traits<char>> const&>::~Matcher()
AlayaLite/build_O3/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h
class GTEST_API_ Matcher<const internal::StringView&> : public internal::MatcherBase<const internal::StringView&> { public: Matcher() = default; explicit Matcher(const MatcherInterface<const internal::StringView&>* impl) : internal::MatcherBase<const internal::StringView&>(impl) {} template <typename M, typename = typename std::remove_reference< M>::type::is_gtest_matcher> Matcher(M&& m) // NOLINT : internal::MatcherBase<const internal::StringView&>(std::forward<M>(m)) { } // Allows the user to write str instead of Eq(str) sometimes, where // str is a std::string object. Matcher(const std::string& s); // NOLINT // Allows the user to write "foo" instead of Eq("foo") sometimes. Matcher(const char* s); // NOLINT // Allows the user to pass absl::string_views or std::string_views directly. Matcher(internal::StringView s); // NOLINT }
O3
c
testing::Matcher<std::basic_string_view<char, std::char_traits<char>> const&>::~Matcher(): pushq %rbx movq %rdi, %rbx callq 0x7b3ee movl $0x18, %esi movq %rbx, %rdi popq %rbx jmp 0x11120 nop
_ZN7testing7MatcherIRKSt17basic_string_viewIcSt11char_traitsIcEEED0Ev: push rbx mov rbx, rdi call _ZN7testing8internal11MatcherBaseIRKSt17basic_string_viewIcSt11char_traitsIcEEED2Ev; testing::internal::MatcherBase<std::string_view const&>::~MatcherBase() mov esi, 18h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void testing::Matcher<std::string_view const&>::~Matcher(void *a1) { testing::internal::MatcherBase<std::string_view const&>::~MatcherBase(a1); operator delete(a1, 0x18uLL); }
~Matcher: PUSH RBX MOV RBX,RDI CALL 0x0017b3ee MOV ESI,0x18 MOV RDI,RBX POP RBX JMP 0x00111120
/* testing::Matcher<std::basic_string_view<char, std::char_traits<char> > const&>::~Matcher() */ void __thiscall testing::Matcher<std::basic_string_view<char,std::char_traits<char>>const&>::~Matcher (Matcher<std::basic_string_view<char,std::char_traits<char>>const&> *this) { internal::MatcherBase<std::basic_string_view<char,std::char_traits<char>>const&>::~MatcherBase ((MatcherBase<std::basic_string_view<char,std::char_traits<char>>const&> *)this); operator_delete(this,0x18); return; }
61,957
MyCTX::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
eloqsql/mysys_ssl/my_crypt.cc
virtual int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, const uchar *iv, uint ivlen) { compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX)); if (unlikely(!cipher)) return MY_AES_BAD_KEYSIZE; if (EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, encrypt) != 1) return MY_AES_OPENSSL_ERROR; DBUG_ASSERT(EVP_CIPHER_CTX_key_length(ctx) == (int)klen); DBUG_ASSERT(EVP_CIPHER_CTX_iv_length(ctx) <= (int)ivlen); return MY_AES_OK; }
O3
cpp
MyCTX::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int): testq %rsi, %rsi je 0x2fb8f pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edx, %eax movq 0xc8(%rdi), %rdi xorl %ebx, %ebx xorl %edx, %edx movq %r9, %r8 movl %eax, %r9d callq 0x2a770 cmpl $0x1, %eax pushq $-0x65 popq %rax cmovel %ebx, %eax addq $0x8, %rsp popq %rbx popq %rbp retq pushq $-0x66 popq %rax retq nop
_ZN5MyCTX4initEPK13evp_cipher_stiPKhjS4_j: test rsi, rsi jz short loc_2FB8F push rbp mov rbp, rsp push rbx push rax mov eax, edx mov rdi, [rdi+0C8h] xor ebx, ebx xor edx, edx mov r8, r9 mov r9d, eax call _EVP_CipherInit_ex cmp eax, 1 push 0FFFFFFFFFFFFFF9Bh pop rax cmovz eax, ebx add rsp, 8 pop rbx pop rbp retn loc_2FB8F: push 0FFFFFFFFFFFFFF9Ah pop rax retn
long long MyCTX::init(long long a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v6; // rax bool v7; // zf long long result; // rax if ( !a2 ) return -102LL; v7 = (unsigned int)EVP_CipherInit_ex(*(_QWORD *)(a1 + 200), a2, 0LL, a4, a6, a3, v6) == 1; result = -101LL; if ( v7 ) return 0LL; return result; }
init: TEST RSI,RSI JZ 0x0012fb8f PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EAX,EDX MOV RDI,qword ptr [RDI + 0xc8] XOR EBX,EBX XOR EDX,EDX MOV R8,R9 MOV R9D,EAX CALL 0x0012a770 CMP EAX,0x1 PUSH -0x65 POP RAX CMOVZ EAX,EBX ADD RSP,0x8 POP RBX POP RBP RET LAB_0012fb8f: PUSH -0x66 POP RAX RET
/* MyCTX::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int) */ int8 MyCTX::init(evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4,uchar *param_5, uint param_6) { int iVar1; int8 uVar2; int4 in_register_0000000c; int4 in_register_00000034; int4 in_register_0000008c; if (CONCAT44(in_register_00000034,param_2) != 0) { iVar1 = EVP_CipherInit_ex((EVP_CIPHER_CTX *)param_1[2].init, (EVP_CIPHER *)CONCAT44(in_register_00000034,param_2),(ENGINE *)0x0, (uchar *)CONCAT44(in_register_0000000c,param_4), (uchar *)CONCAT44(in_register_0000008c,param_6),(int)param_3); uVar2 = 0xffffff9b; if (iVar1 == 1) { uVar2 = 0; } return uVar2; } return 0xffffffffffffff9a; }
61,958
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const
llama.cpp/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0x72af6 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0x72ae4 cmpl $0x2, %eax jne 0x72aed movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0x72ade leaq 0x30(%rbx), %rdi callq 0x7a0ed movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0x72af1 movq %rbx, %rdi popq %rbx jmp 0x7436e addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x5913e(%rip), %rdi # 0xcbc3b leaq 0x5558c(%rip), %rdx # 0xc8090 leaq 0x5991b(%rip), %rcx # 0xcc426 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1ca40 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_72AF6 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_72AE4 cmp eax, 2 jnz short loc_72AED mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_72ADE lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_72ADE: add rbx, 30h ; '0' jmp short loc_72AF1 loc_72AE4: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void) loc_72AED: add rbx, 50h ; 'P' loc_72AF1: mov rax, rbx pop rbx retn loc_72AF6: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00172af6 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x00172ae4 CMP EAX,0x2 JNZ 0x00172aed MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x00172ade LEA RDI,[RBX + 0x30] CALL 0x0017a0ed MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_00172ade: ADD RBX,0x30 JMP 0x00172af1 LAB_00172ae4: MOV RDI,RBX POP RBX JMP 0x0017436e LAB_00172aed: ADD RBX,0x50 LAB_00172af1: MOV RAX,RBX POP RBX RET LAB_00172af6: LEA RDI,[0x1cbc3b] LEA RDX,[0x1c8090] LEA RCX,[0x1cc426] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011ca40
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)this); return piVar2; }
61,959
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
llama.cpp/common/minja/minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O3
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0x8149d cmpq $0x0, 0x10(%rsi) je 0x814f8 movq %rdi, %rbx callq *0x18(%rsi) movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1c460 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6cb9a leaq 0x4b1ae(%rip), %rsi # 0xcc671 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x66b64 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x1c2c0 xorl %ebp, %ebp movq 0x7eacf(%rip), %rsi # 0xfffb8 movq 0x7ea88(%rip), %rdx # 0xfff78 movq %rbx, %rdi callq 0x1c7b0 callq 0x1ccf0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8151b movq 0x30(%rsp), %rsi incq %rsi callq 0x1c110 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x81536 movq 0x10(%rsp), %rsi incq %rsi callq 0x1c110 testb %bpl, %bpl jne 0x81560 jmp 0x81568 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x81560 movq 0x10(%rsp), %rsi incq %rsi callq 0x1c110 jmp 0x81560 movq %rax, %r14 movq %rbx, %rdi callq 0x1caa0 movq %r14, %rdi callq 0x1c7d0
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_8149D cmp qword ptr [rsi+10h], 0 jz short loc_814F8 mov rbx, rdi call qword ptr [rsi+18h] mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_8149D: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_814F8: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8151B mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8151B: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_81536 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_81536: test bpl, bpl jnz short loc_81560 jmp short loc_81568 mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_81560 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_81560 mov r14, rax loc_81560: mov rdi, rbx; void * call ___cxa_free_exception loc_81568: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { long long v3; // rsi void *exception; // rbx _BYTE v6[16]; // [rsp+0h] [rbp-58h] BYREF _QWORD v7[2]; // [rsp+20h] [rbp-38h] BYREF v3 = *(_QWORD *)(a2 + 48); if ( !v3 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, a2, 0xFFFFFFFF, 0); std::operator+<char>(v7, (long long)"Value is not callable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !*(_QWORD *)(v3 + 16) ) std::__throw_bad_function_call(); (*(void (**)(void))(v3 + 24))(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x0018149d CMP qword ptr [RSI + 0x10],0x0 JZ 0x001814f8 MOV RBX,RDI CALL qword ptr [RSI + 0x18] MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_0018149d: MOV EDI,0x10 CALL 0x0011c460 MOV RBX,RAX LAB_001814aa: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016cb9a LAB_001814bc: LEA RSI,[0x1cc671] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00166b64 MOV BPL,0x1 LAB_001814d3: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0011c2c0 XOR EBP,EBP MOV RSI,qword ptr [0x001fffb8] MOV RDX,qword ptr [0x001fff78] MOV RDI,RBX CALL 0x0011c7b0 LAB_001814f8: CALL 0x0011ccf0
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { long lVar1; runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001814aa to 001814bb has its CatchHandler @ 0018155d */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 001814bc to 001814cf has its CatchHandler @ 0018153d */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 001814d3 to 001814f7 has its CatchHandler @ 001814fd */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78); } if (*(long *)(lVar1 + 0x10) != 0) { (**(code **)(lVar1 + 0x18))(); return param_1; } /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); }
61,960
ma_pack_rec_unpack
eloqsql/storage/maria/ma_packrec.c
int _ma_pack_rec_unpack(register MARIA_HA *info, MARIA_BIT_BUFF *bit_buff, register uchar *to, uchar *from, ulong reclength) { uchar *end_field; reg3 MARIA_COLUMNDEF *end; MARIA_COLUMNDEF *current_field; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_pack_rec_unpack"); if (info->s->base.null_bytes) { memcpy(to, from, info->s->base.null_bytes); to+= info->s->base.null_bytes; from+= info->s->base.null_bytes; reclength-= info->s->base.null_bytes; } init_bit_buffer(bit_buff, from, reclength); for (current_field=share->columndef, end=current_field+share->base.fields ; current_field < end ; current_field++,to=end_field) { end_field=to+current_field->length; (*current_field->unpack)(current_field, bit_buff, to, end_field); } if (!bit_buff->error && bit_buff->pos - bit_buff->bits / 8 == bit_buff->end) DBUG_RETURN(0); info->update&= ~HA_STATE_AKTIV; _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(HA_ERR_WRONG_IN_RECORD); }
O0
c
ma_pack_rec_unpack: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x3fc(%rax) je 0x47771 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x3fc(%rax), %eax movl %eax, %edx callq 0x29090 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x3fc(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x3fc(%rax), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x3fc(%rax), %eax movl %eax, %ecx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rax movl %eax, %edx callq 0x47870 movq -0x50(%rbp), %rax movq 0x588(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x50(%rbp), %rcx movl 0x3c8(%rcx), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x48(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x477fc movq -0x20(%rbp), %rax movq -0x48(%rbp), %rcx movzwl 0x8(%rcx), %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x48(%rbp), %rax movq 0x18(%rax), %rax movq -0x48(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x38(%rbp), %rcx callq *%rax movq -0x48(%rbp), %rax addq $0x38, %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x477ac movq -0x18(%rbp), %rax cmpl $0x0, 0x28(%rax) jne 0x47839 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx movl 0x4(%rcx), %ecx shrl $0x3, %ecx movl %ecx, %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq -0x18(%rbp), %rcx cmpq 0x10(%rcx), %rax jne 0x47839 jmp 0x47830 movl $0x0, -0x4(%rbp) jmp 0x47861 movq -0x10(%rbp), %rax movl 0x624(%rax), %ecx andl $-0x3, %ecx movl %ecx, 0x624(%rax) movq -0x10(%rbp), %rdi movl $0x7f, %esi callq 0x371c0 movl $0x7f, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_pack_rec_unpack: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+3FCh], 0 jz short loc_47771 mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+3FCh] mov edx, eax call _memcpy mov rax, [rbp+var_10] mov rax, [rax] mov ecx, [rax+3FCh] mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax] mov ecx, [rax+3FCh] mov rax, [rbp+var_28] mov ecx, ecx add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+3FCh] mov ecx, eax mov rax, [rbp+var_30] sub rax, rcx mov [rbp+var_30], rax loc_47771: mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] mov rax, [rbp+var_30] mov edx, eax call init_bit_buffer mov rax, [rbp+var_50] mov rax, [rax+588h] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rcx, [rbp+var_50] mov ecx, [rcx+3C8h] imul rcx, 38h ; '8' add rax, rcx mov [rbp+var_40], rax loc_477AC: mov rax, [rbp+var_48] cmp rax, [rbp+var_40] jnb short loc_477FC mov rax, [rbp+var_20] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx+8] movsxd rcx, ecx add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_48] mov rax, [rax+18h] mov rdi, [rbp+var_48] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_38] call rax mov rax, [rbp+var_48] add rax, 38h ; '8' mov [rbp+var_48], rax mov rax, [rbp+var_38] mov [rbp+var_20], rax jmp short loc_477AC loc_477FC: mov rax, [rbp+var_18] cmp dword ptr [rax+28h], 0 jnz short loc_47839 mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_18] mov ecx, [rcx+4] shr ecx, 3 mov ecx, ecx mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov rcx, [rbp+var_18] cmp rax, [rcx+10h] jnz short loc_47839 jmp short $+2 loc_47830: mov [rbp+var_4], 0 jmp short loc_47861 loc_47839: mov rax, [rbp+var_10] mov ecx, [rax+624h] and ecx, 0FFFFFFFDh mov [rax+624h], ecx mov rdi, [rbp+var_10] mov esi, 7Fh call _ma_set_fatal_error mov [rbp+var_4], 7Fh loc_47861: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ma_pack_rec_unpack(_DWORD *a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v5; // rdx long long v6; // r8 int v7; // r9d long long v8; // rcx long long v10; // [rsp+0h] [rbp-50h] unsigned long long v11; // [rsp+8h] [rbp-48h] unsigned long long v12; // [rsp+10h] [rbp-40h] long long v13; // [rsp+18h] [rbp-38h] long long v15; // [rsp+28h] [rbp-28h] long long v16; // [rsp+30h] [rbp-20h] v16 = a3; v15 = a4; v10 = *(_QWORD *)a1; if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) ) { memcpy(a3, a4, *(unsigned int *)(*(_QWORD *)a1 + 1020LL)); v16 += *(unsigned int *)(*(_QWORD *)a1 + 1020LL); v15 += *(unsigned int *)(*(_QWORD *)a1 + 1020LL); a5 -= *(_DWORD *)(*(_QWORD *)a1 + 1020LL); } init_bit_buffer(a2, v15, a5); v11 = *(_QWORD *)(v10 + 1416); v12 = 56LL * *(unsigned int *)(v10 + 968) + v11; while ( v11 < v12 ) { v13 = *(unsigned __int16 *)(v11 + 8) + v16; (*(void ( **)(unsigned long long, long long, long long, long long))(v11 + 24))(v11, a2, v16, v13); v11 += 56LL; v16 = v13; } if ( *(_DWORD *)(a2 + 40) || (v5 = *(_DWORD *)(a2 + 4) >> 3, *(_QWORD *)(a2 + 8) - v5 != *(_QWORD *)(a2 + 16)) ) { v8 = a1[393] & 0xFFFFFFFD; a1[393] = v8; ma_set_fatal_error(a1, 0x7Fu, v5, v8, v6, v7); return 127; } else { return 0; } }
_ma_pack_rec_unpack: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x3fc],0x0 JZ 0x00147771 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x3fc] MOV EDX,EAX CALL 0x00129090 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x3fc] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x3fc] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x3fc] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_00147771: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV EDX,EAX CALL 0x00147870 MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x588] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RCX + 0x3c8] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_001477ac: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001477fc MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX + 0x8] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x18] MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x38] CALL RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x38 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX JMP 0x001477ac LAB_001477fc: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x28],0x0 JNZ 0x00147839 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x4] SHR ECX,0x3 MOV ECX,ECX MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x10] JNZ 0x00147839 JMP 0x00147830 LAB_00147830: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00147861 LAB_00147839: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x624] AND ECX,0xfffffffd MOV dword ptr [RAX + 0x624],ECX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7f CALL 0x001371c0 MOV dword ptr [RBP + -0x4],0x7f LAB_00147861: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _ma_pack_rec_unpack(long *param_1,long param_2,void *param_3,void *param_4,int param_5) { long lVar1; ulong uVar2; void *pvVar3; int8 local_50; int8 local_30; int8 local_28; int4 local_c; lVar1 = *param_1; local_30 = param_4; local_28 = param_3; if (*(int *)(*param_1 + 0x3fc) != 0) { memcpy(param_3,param_4,(ulong)*(uint *)(*param_1 + 0x3fc)); local_28 = (void *)((long)param_3 + (ulong)*(uint *)(*param_1 + 0x3fc)); local_30 = (void *)((long)param_4 + (ulong)*(uint *)(*param_1 + 0x3fc)); param_5 = param_5 - *(int *)(*param_1 + 0x3fc); } init_bit_buffer(param_2,local_30,param_5); local_50 = *(ulong *)(lVar1 + 0x588); uVar2 = local_50 + (ulong)*(uint *)(lVar1 + 0x3c8) * 0x38; for (; local_50 < uVar2; local_50 = local_50 + 0x38) { pvVar3 = (void *)((long)local_28 + (long)(int)(uint)*(ushort *)(local_50 + 8)); (**(code **)(local_50 + 0x18))(local_50,param_2,local_28,pvVar3); local_28 = pvVar3; } if ((*(int *)(param_2 + 0x28) == 0) && (*(long *)(param_2 + 8) - (ulong)(*(uint *)(param_2 + 4) >> 3) == *(long *)(param_2 + 0x10))) { local_c = 0; } else { *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 0xfffffffd; _ma_set_fatal_error(param_1,0x7f); local_c = 0x7f; } return local_c; }
61,961
Catch::Config::~Config()
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
Config::~Config() = default;
O3
cpp
Catch::Config::~Config(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xe1208(%rip), %rax # 0x12d310 addq $0x10, %rax movq %rax, (%rdi) leaq 0x130(%rdi), %r14 addq $0x148, %rdi # imm = 0x148 callq 0x783e8 movq %r14, %rdi callq 0x7b962 leaq 0x118(%rbx), %rdi callq 0x76ef0 leaq 0x100(%rbx), %rdi callq 0x783e8 leaq 0xe8(%rbx), %rdi callq 0x783e8 leaq 0xd0(%rbx), %rdi callq 0x7b5f4 movq 0xb0(%rbx), %rdi leaq 0xc0(%rbx), %rax cmpq %rax, %rdi je 0x4c178 movq (%rax), %rsi incq %rsi callq 0x17150 movq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax cmpq %rax, %rdi je 0x4c196 movq (%rax), %rsi incq %rsi callq 0x17150 movq 0x70(%rbx), %rdi subq $-0x80, %rbx cmpq %rbx, %rdi je 0x4c1b5 movq (%rbx), %rsi incq %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x17150 addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN5Catch6ConfigD2Ev: push r14 push rbx push rax mov rbx, rdi lea rax, _ZTVN5Catch6ConfigE; `vtable for'Catch::Config add rax, 10h mov [rdi], rax lea r14, [rdi+130h] add rdi, 148h call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call _ZNSt6vectorIN5Catch8TestSpec6FilterESaIS2_EED2Ev; std::vector<Catch::TestSpec::Filter>::~vector() lea rdi, [rbx+118h] call _ZNSt6vectorIN5Catch21ProcessedReporterSpecESaIS1_EED2Ev; std::vector<Catch::ProcessedReporterSpec>::~vector() lea rdi, [rbx+100h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rbx+0E8h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rbx+0D0h] call _ZNSt6vectorIN5Catch12ReporterSpecESaIS1_EED2Ev; std::vector<Catch::ReporterSpec>::~vector() mov rdi, [rbx+0B0h]; void * lea rax, [rbx+0C0h] cmp rdi, rax jz short loc_4C178 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4C178: mov rdi, [rbx+90h]; void * lea rax, [rbx+0A0h] cmp rdi, rax jz short loc_4C196 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4C196: mov rdi, [rbx+70h]; void * sub rbx, 0FFFFFFFFFFFFFF80h cmp rdi, rbx jz short loc_4C1B5 mov rsi, [rbx] inc rsi; unsigned __int64 add rsp, 8 pop rbx pop r14 jmp __ZdlPvm; operator delete(void *,ulong) loc_4C1B5: add rsp, 8 pop rbx pop r14 retn
void Catch::Config::~Config(Catch::Config *this) { char *v2; // rdi char *v3; // rdi _QWORD *v4; // rdi _QWORD *v5; // rbx *(_QWORD *)this = &`vtable for'Catch::Config + 2; std::vector<std::string>::~vector((char *)this + 328); std::vector<Catch::TestSpec::Filter>::~vector((char *)this + 304); std::vector<Catch::ProcessedReporterSpec>::~vector((char *)this + 280); std::vector<std::string>::~vector((char *)this + 256); std::vector<std::string>::~vector((char *)this + 232); std::vector<Catch::ReporterSpec>::~vector((char *)this + 208); v2 = (char *)*((_QWORD *)this + 22); if ( v2 != (char *)this + 192 ) operator delete(v2, *((_QWORD *)this + 24) + 1LL); v3 = (char *)*((_QWORD *)this + 18); if ( v3 != (char *)this + 160 ) operator delete(v3, *((_QWORD *)this + 20) + 1LL); v4 = (_QWORD *)*((_QWORD *)this + 14); v5 = (_QWORD *)((char *)this + 128); if ( v4 != v5 ) operator delete(v4, *v5 + 1LL); }
~Config: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x22d310] ADD RAX,0x10 MOV qword ptr [RDI],RAX LEA R14,[RDI + 0x130] ADD RDI,0x148 CALL 0x001783e8 MOV RDI,R14 CALL 0x0017b962 LEA RDI,[RBX + 0x118] CALL 0x00176ef0 LEA RDI,[RBX + 0x100] CALL 0x001783e8 LEA RDI,[RBX + 0xe8] CALL 0x001783e8 LEA RDI,[RBX + 0xd0] CALL 0x0017b5f4 MOV RDI,qword ptr [RBX + 0xb0] LEA RAX,[RBX + 0xc0] CMP RDI,RAX JZ 0x0014c178 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00117150 LAB_0014c178: MOV RDI,qword ptr [RBX + 0x90] LEA RAX,[RBX + 0xa0] CMP RDI,RAX JZ 0x0014c196 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00117150 LAB_0014c196: MOV RDI,qword ptr [RBX + 0x70] SUB RBX,-0x80 CMP RDI,RBX JZ 0x0014c1b5 MOV RSI,qword ptr [RBX] INC RSI ADD RSP,0x8 POP RBX POP R14 JMP 0x00117150 LAB_0014c1b5: ADD RSP,0x8 POP RBX POP R14 RET
/* Catch::Config::~Config() */ void __thiscall Catch::Config::~Config(Config *this) { *(int ***)this = &PTR__Config_0022d320; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x148)); std::vector<Catch::TestSpec::Filter,std::allocator<Catch::TestSpec::Filter>>::~vector ((vector<Catch::TestSpec::Filter,std::allocator<Catch::TestSpec::Filter>> *) (this + 0x130)); std::vector<Catch::ProcessedReporterSpec,std::allocator<Catch::ProcessedReporterSpec>>::~vector ((vector<Catch::ProcessedReporterSpec,std::allocator<Catch::ProcessedReporterSpec>> *) (this + 0x118)); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x100)); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0xe8)); std::vector<Catch::ReporterSpec,std::allocator<Catch::ReporterSpec>>::~vector ((vector<Catch::ReporterSpec,std::allocator<Catch::ReporterSpec>> *)(this + 0xd0)); if (*(Config **)(this + 0xb0) != this + 0xc0) { operator_delete(*(Config **)(this + 0xb0),*(long *)(this + 0xc0) + 1); } if (*(Config **)(this + 0x90) != this + 0xa0) { operator_delete(*(Config **)(this + 0x90),*(long *)(this + 0xa0) + 1); } if (*(Config **)(this + 0x70) != this + 0x80) { operator_delete(*(Config **)(this + 0x70),*(long *)(this + 0x80) + 1); return; } return; }
61,962
my_hash_next
eloqsql/mysys/hash.c
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; uint idx; if (*current_record != NO_RECORD) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { *current_record= idx; return pos->data; } } *current_record= NO_RECORD; } return 0; }
O3
c
my_hash_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, -0x38(%rbp) movl (%rcx), %ebx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %rbx je 0x24f37 movq %rsi, %r15 movq %rdi, %r12 movq %rcx, -0x30(%rbp) movq 0x28(%rdi), %r13 shlq $0x4, %rbx addq %r13, %rbx movl (%rbx), %r14d movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x24f2d movq %r14, %rax shlq $0x4, %rax leaq (%rax,%r13), %rbx movq 0x8(%r13,%rax), %rsi movq %r12, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq 0x24e2f testl %eax, %eax jne 0x24ef0 movq -0x30(%rbp), %rax movl %r14d, (%rax) movq 0x8(%rbx), %rax jmp 0x24f39 movq -0x30(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_next: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdx mov ebx, [rcx] mov eax, 0FFFFFFFFh cmp rbx, rax jz short loc_24F37 mov r15, rsi mov r12, rdi mov [rbp+var_30], rcx mov r13, [rdi+28h] shl rbx, 4 add rbx, r13 loc_24EF0: mov r14d, [rbx] mov eax, 0FFFFFFFFh cmp r14, rax jz short loc_24F2D mov rax, r14 shl rax, 4 lea rbx, [rax+r13] mov rsi, [r13+rax+8] mov rdi, r12 mov rdx, r15 mov rcx, [rbp+var_38] call hashcmp test eax, eax jnz short loc_24EF0 mov rax, [rbp+var_30] mov [rax], r14d mov rax, [rbx+8] jmp short loc_24F39 loc_24F2D: mov rax, [rbp+var_30] mov dword ptr [rax], 0FFFFFFFFh loc_24F37: xor eax, eax loc_24F39: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_hash_next(_QWORD *a1, long long a2, long long a3, _DWORD *a4) { long long v4; // rbx long long v5; // r13 unsigned int *v6; // rbx long long v7; // r14 v4 = (unsigned int)*a4; if ( v4 != 0xFFFFFFFFLL ) { v5 = a1[5]; v6 = (unsigned int *)(v5 + 16 * v4); while ( 1 ) { v7 = *v6; if ( v7 == 0xFFFFFFFFLL ) break; v6 = (unsigned int *)(16 * v7 + v5); if ( !hashcmp(a1, *((_QWORD *)v6 + 1), a2, a3) ) { *a4 = v7; return *((_QWORD *)v6 + 1); } } *a4 = -1; } return 0LL; }
my_hash_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDX MOV EBX,dword ptr [RCX] MOV EAX,0xffffffff CMP RBX,RAX JZ 0x00124f37 MOV R15,RSI MOV R12,RDI MOV qword ptr [RBP + -0x30],RCX MOV R13,qword ptr [RDI + 0x28] SHL RBX,0x4 ADD RBX,R13 LAB_00124ef0: MOV R14D,dword ptr [RBX] MOV EAX,0xffffffff CMP R14,RAX JZ 0x00124f2d MOV RAX,R14 SHL RAX,0x4 LEA RBX,[RAX + R13*0x1] MOV RSI,qword ptr [R13 + RAX*0x1 + 0x8] MOV RDI,R12 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL 0x00124e2f TEST EAX,EAX JNZ 0x00124ef0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],R14D MOV RAX,qword ptr [RBX + 0x8] JMP 0x00124f39 LAB_00124f2d: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0xffffffff LAB_00124f37: XOR EAX,EAX LAB_00124f39: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4) { uint uVar1; long lVar2; int iVar3; long lVar4; int8 uVar5; uint *puVar6; if ((ulong)*param_4 == 0xffffffff) { LAB_00124f37: uVar5 = 0; } else { lVar2 = *(long *)(param_1 + 0x28); puVar6 = (uint *)((ulong)*param_4 * 0x10 + lVar2); do { uVar1 = *puVar6; if ((ulong)uVar1 == 0xffffffff) { *param_4 = 0xffffffff; goto LAB_00124f37; } lVar4 = (ulong)uVar1 * 0x10; puVar6 = (uint *)(lVar4 + lVar2); iVar3 = hashcmp(param_1,*(int8 *)(lVar2 + 8 + lVar4),param_2,param_3); } while (iVar3 != 0); *param_4 = uVar1; uVar5 = *(int8 *)(puVar6 + 2); } return uVar5; }
61,963
put_lvalue
bluesky950520[P]quickjs/quickjs.c
static void put_lvalue(JSParseState *s, int opcode, int scope, JSAtom name, int label, PutLValueEnum special, BOOL is_let) { switch(opcode) { case OP_get_field: case OP_scope_get_private_field: /* depth = 1 */ switch(special) { case PUT_LVALUE_NOKEEP: case PUT_LVALUE_NOKEEP_DEPTH: break; case PUT_LVALUE_KEEP_TOP: emit_op(s, OP_insert2); /* obj v -> v obj v */ break; case PUT_LVALUE_KEEP_SECOND: emit_op(s, OP_perm3); /* obj v0 v -> v0 obj v */ break; case PUT_LVALUE_NOKEEP_BOTTOM: emit_op(s, OP_swap); break; default: abort(); } break; case OP_get_array_el: case OP_get_ref_value: /* depth = 2 */ if (opcode == OP_get_ref_value) { JS_FreeAtom(s->ctx, name); emit_label(s, label); } switch(special) { case PUT_LVALUE_NOKEEP: emit_op(s, OP_nop); /* will trigger optimization */ break; case PUT_LVALUE_NOKEEP_DEPTH: break; case PUT_LVALUE_KEEP_TOP: emit_op(s, OP_insert3); /* obj prop v -> v obj prop v */ break; case PUT_LVALUE_KEEP_SECOND: emit_op(s, OP_perm4); /* obj prop v0 v -> v0 obj prop v */ break; case PUT_LVALUE_NOKEEP_BOTTOM: emit_op(s, OP_rot3l); break; default: abort(); } break; case OP_get_super_value: /* depth = 3 */ switch(special) { case PUT_LVALUE_NOKEEP: case PUT_LVALUE_NOKEEP_DEPTH: break; case PUT_LVALUE_KEEP_TOP: emit_op(s, OP_insert4); /* this obj prop v -> v this obj prop v */ break; case PUT_LVALUE_KEEP_SECOND: emit_op(s, OP_perm5); /* this obj prop v0 v -> v0 this obj prop v */ break; case PUT_LVALUE_NOKEEP_BOTTOM: emit_op(s, OP_rot4l); break; default: abort(); } break; default: break; } switch(opcode) { case OP_scope_get_var: /* val -- */ assert(special == PUT_LVALUE_NOKEEP || special == PUT_LVALUE_NOKEEP_DEPTH); emit_op(s, is_let ? OP_scope_put_var_init : OP_scope_put_var); emit_u32(s, name); /* has refcount */ emit_u16(s, scope); break; case OP_get_field: emit_op(s, OP_put_field); emit_u32(s, name); /* name has refcount */ emit_ic(s, name); break; case OP_scope_get_private_field: emit_op(s, OP_scope_put_private_field); emit_u32(s, name); /* name has refcount */ emit_u16(s, scope); break; case OP_get_array_el: emit_op(s, OP_put_array_el); break; case OP_get_ref_value: emit_op(s, OP_put_ref_value); break; case OP_get_super_value: emit_op(s, OP_put_super_value); break; default: abort(); } }
O2
c
put_lvalue: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r12d movl %ecx, %ebp movl %edx, 0x4(%rsp) movl %esi, %r15d movq %rdi, %rbx movl 0x40(%rsp), %r14d cmpl $0x3c, %esi je 0x5ace3 cmpl $0xbd, %r15d je 0x5acb2 cmpl $0x47, %r15d je 0x5acfb cmpl $0x4a, %r15d je 0x5acc9 cmpl $0xb7, %r15d je 0x5ad69 cmpl $0x41, %r15d jne 0x5ae0e movl %r12d, %eax leaq 0x2c9c0(%rip), %rcx # 0x8767c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x15, %al jmp 0x5ad24 movl %r12d, %eax leaq 0x2c995(%rip), %rcx # 0x87668 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x17, %al jmp 0x5adea movl %r8d, %r13d movq (%rbx), %rdi movl %ebp, %esi callq 0x1e545 movq %rbx, %rdi movl %r13d, %esi callq 0x59d2c movl %r12d, %eax leaq 0x2c94f(%rip), %rcx # 0x87654 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $-0x4e, %al jmp 0x5ad24 movb $0x1b, %al jmp 0x5ad24 movb $0x1d, %al jmp 0x5ad24 movb $0x18, %al jmp 0x5ad24 movb $0x16, %al jmp 0x5ad24 movb $0x19, %al movzbl %al, %esi movq %rbx, %rdi callq 0x535cb cmpl $0x3c, %r15d je 0x5ade0 cmpl $0x41, %r15d je 0x5adaf cmpl $0x47, %r15d je 0x5addc cmpl $0x4a, %r15d je 0x5adf5 cmpl $0xbd, %r15d je 0x5ad7d cmpl $0xb7, %r15d jne 0x5ae0e xorl %eax, %eax testl %r14d, %r14d setne %al leal 0xb8(,%rax,4), %esi movq %rbx, %rdi jmp 0x5ad85 movq %rbx, %rdi movl $0xbf, %esi callq 0x535cb movq %rbx, %rdi movl %ebp, %esi callq 0x59f8e movzwl 0x4(%rsp), %esi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x535ea pushq $0x43 popq %rsi movq %rbx, %rdi callq 0x535cb movq %rbx, %rdi movl %ebp, %esi callq 0x59f8e movq %rbx, %rdi movl %ebp, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x5aa76 pushq $0x49 jmp 0x5adf7 pushq $0x3d jmp 0x5adf7 movb $0x1f, %al jmp 0x5adea movb $0x1a, %al movzbl %al, %esi movq %rbx, %rdi callq 0x535cb pushq $0x4b popq %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x535cb callq 0xe090
put_lvalue: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, r9d mov ebp, ecx mov [rsp+38h+var_34], edx mov r15d, esi mov rbx, rdi mov r14d, [rsp+38h+arg_0] cmp esi, 3Ch ; '<' jz short loc_5ACE3 cmp r15d, 0BDh jz short loc_5ACB2 cmp r15d, 47h ; 'G' jz short loc_5ACFB cmp r15d, 4Ah ; 'J' jz short loc_5ACC9 cmp r15d, 0B7h jz loc_5AD69 cmp r15d, 41h ; 'A' jnz loc_5AE0E loc_5ACB2: mov eax, r12d lea rcx, jpt_5ACC3 movsxd rax, ds:(jpt_5ACC3 - 8767Ch)[rcx+rax*4]; switch 5 cases add rax, rcx jmp rax; switch jump loc_5ACC5: mov al, 15h; jumptable 000000000005ACC3 case 2 jmp short loc_5AD24 loc_5ACC9: mov eax, r12d lea rcx, jpt_5ACDA movsxd rax, ds:(jpt_5ACDA - 87668h)[rcx+rax*4]; switch 5 cases add rax, rcx jmp rax; switch jump loc_5ACDC: mov al, 17h; jumptable 000000000005ACDA case 2 jmp loc_5ADEA loc_5ACE3: mov r13d, r8d mov rdi, [rbx] mov esi, ebp call JS_FreeAtom mov rdi, rbx mov esi, r13d call emit_label loc_5ACFB: mov eax, r12d lea rcx, jpt_5AD0C movsxd rax, ds:(jpt_5AD0C - 87654h)[rcx+rax*4]; switch 5 cases add rax, rcx jmp rax; switch jump loc_5AD0E: mov al, 0B2h; jumptable 000000000005AD0C case 0 jmp short loc_5AD24 loc_5AD12: mov al, 1Bh; jumptable 000000000005ACC3 case 4 jmp short loc_5AD24 loc_5AD16: mov al, 1Dh; jumptable 000000000005AD0C case 4 jmp short loc_5AD24 loc_5AD1A: mov al, 18h; jumptable 000000000005ACC3 case 3 jmp short loc_5AD24 loc_5AD1E: mov al, 16h; jumptable 000000000005AD0C case 2 jmp short loc_5AD24 loc_5AD22: mov al, 19h; jumptable 000000000005AD0C case 3 loc_5AD24: movzx esi, al mov rdi, rbx call emit_op loc_5AD2F: cmp r15d, 3Ch ; '<'; jumptable 000000000005ACC3 cases 0,1 jz loc_5ADE0 cmp r15d, 41h ; 'A' jz short loc_5ADAF cmp r15d, 47h ; 'G' jz loc_5ADDC cmp r15d, 4Ah ; 'J' jz loc_5ADF5; jumptable 000000000005ACDA cases 0,1 cmp r15d, 0BDh jz short loc_5AD7D cmp r15d, 0B7h jnz loc_5AE0E loc_5AD69: xor eax, eax test r14d, r14d setnz al lea esi, ds:0B8h[rax*4] mov rdi, rbx jmp short loc_5AD85 loc_5AD7D: mov rdi, rbx mov esi, 0BFh loc_5AD85: call emit_op mov rdi, rbx mov esi, ebp call emit_u32 movzx esi, word ptr [rsp+38h+var_34] mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp emit_u16 loc_5ADAF: push 43h ; 'C' pop rsi mov rdi, rbx call emit_op mov rdi, rbx mov esi, ebp call emit_u32 mov rdi, rbx mov esi, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp emit_ic loc_5ADDC: push 49h ; 'I' jmp short loc_5ADF7 loc_5ADE0: push 3Dh ; '=' jmp short loc_5ADF7 loc_5ADE4: mov al, 1Fh; jumptable 000000000005ACDA case 4 jmp short loc_5ADEA loc_5ADE8: mov al, 1Ah; jumptable 000000000005ACDA case 3 loc_5ADEA: movzx esi, al mov rdi, rbx call emit_op loc_5ADF5: push 4Bh ; 'K'; jumptable 000000000005ACDA cases 0,1 loc_5ADF7: pop rsi mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp emit_op loc_5AE0E: call _abort
long long put_lvalue(long long *a1, int a2, __int16 a3, unsigned int a4, int a5, int a6, int a7) { char v9; // al char v10; // al char v12; // si long long result; // rax switch ( a2 ) { case 60: JS_FreeAtom(*a1, a4); emit_label((long long)a1, a5); break; case 189: LABEL_7: switch ( a6 ) { case 0: case 1: goto LABEL_20; case 2: v9 = 21; goto LABEL_19; case 3: v9 = 24; goto LABEL_19; case 4: v9 = 27; goto LABEL_19; } goto LABEL_20; case 71: break; case 74: switch ( a6 ) { case 0: case 1: goto LABEL_32; case 2: v10 = 23; goto LABEL_31; case 3: v10 = 26; goto LABEL_31; case 4: v10 = 31; LABEL_31: emit_op((long long)a1, v10); LABEL_32: result = emit_op((long long)a1, 75); break; } return result; case 183: v12 = 4 * (a7 != 0) - 72; goto LABEL_25; case 65: goto LABEL_7; default: abort((const char *)a1); } switch ( a6 ) { case 0: v9 = -78; goto LABEL_19; case 1: break; case 2: v9 = 22; goto LABEL_19; case 3: v9 = 25; goto LABEL_19; case 4: v9 = 29; LABEL_19: emit_op((long long)a1, v9); break; } LABEL_20: switch ( a2 ) { case '<': return emit_op((long long)a1, 61); case 'A': emit_op((long long)a1, 67); emit_u32((long long)a1, a4); return emit_ic(a1, a4); case 'G': return emit_op((long long)a1, 73); default: v12 = -65; LABEL_25: emit_op((long long)a1, v12); emit_u32((long long)a1, a4); return emit_u16((long long)a1, a3); } }
put_lvalue: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,R9D MOV EBP,ECX MOV dword ptr [RSP + 0x4],EDX MOV R15D,ESI MOV RBX,RDI MOV R14D,dword ptr [RSP + 0x40] CMP ESI,0x3c JZ 0x0015ace3 CMP R15D,0xbd JZ 0x0015acb2 CMP R15D,0x47 JZ 0x0015acfb CMP R15D,0x4a JZ 0x0015acc9 CMP R15D,0xb7 JZ 0x0015ad69 CMP R15D,0x41 JNZ 0x0015ae0e LAB_0015acb2: MOV EAX,R12D LEA RCX,[0x18767c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_0015acc9: MOV EAX,R12D LEA RCX,[0x187668] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_0015ace3: MOV R13D,R8D MOV RDI,qword ptr [RBX] MOV ESI,EBP CALL 0x0011e545 MOV RDI,RBX MOV ESI,R13D CALL 0x00159d2c LAB_0015acfb: MOV EAX,R12D LEA RCX,[0x187654] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_0015ad69: XOR EAX,EAX TEST R14D,R14D SETNZ AL LEA ESI,[0xb8 + RAX*0x4] MOV RDI,RBX JMP 0x0015ad85 LAB_0015ad85: CALL 0x001535cb MOV RDI,RBX MOV ESI,EBP CALL 0x00159f8e MOVZX ESI,word ptr [RSP + 0x4] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001535ea LAB_0015ae0e: CALL 0x0010e090
void put_lvalue(int8 *param_1,int param_2,int2 param_3,int4 param_4, int4 param_5,uint param_6,int param_7) { if (param_2 != 0x3c) { if (param_2 != 0xbd) { if (param_2 == 0x47) goto LAB_0015acfb; if (param_2 == 0x4a) { /* WARNING: Could not recover jumptable at 0x0015acda. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)(&DAT_00187668 + *(int *)(&DAT_00187668 + (ulong)param_6 * 4)))(); return; } if (param_2 == 0xb7) { emit_op(param_1,(uint)(param_7 != 0) * 4 + 0xb8); emit_u32(param_1,param_4); emit_u16(param_1,param_3); return; } if (param_2 != 0x41) { /* WARNING: Subroutine does not return */ abort(); } } /* WARNING: Could not recover jumptable at 0x0015acc3. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)(&DAT_0018767c + *(int *)(&DAT_0018767c + (ulong)param_6 * 4)))(); return; } JS_FreeAtom(*param_1,param_4); emit_label(param_1,param_5); LAB_0015acfb: /* WARNING: Could not recover jumptable at 0x0015ad0c. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)(&DAT_00187654 + *(int *)(&DAT_00187654 + (ulong)param_6 * 4)))(); return; }
61,964
ma_ck_write_btree_with_log
eloqsql/storage/maria/ma_write.c
static my_bool _ma_ck_write_btree_with_log(MARIA_HA *info, MARIA_KEY *key, my_off_t *root, uint32 comp_flag) { MARIA_SHARE *share= info->s; LSN lsn= LSN_IMPOSSIBLE; int error; my_off_t new_root= *root; uchar key_buff[MARIA_MAX_KEY_BUFF]; MARIA_KEY org_key; /* Set/used when now_transactional=TRUE */ my_bool transactional= share->now_transactional; DBUG_ENTER("_ma_ck_write_btree_with_log"); LINT_INIT_STRUCT(org_key); if (transactional) { /* Save original value as the key may change */ org_key= *key; memcpy(key_buff, key->data, key->data_length + key->ref_length); } error= _ma_ck_real_write_btree(info, key, &new_root, comp_flag); if (!error && transactional) { /* Log the original value */ *key= org_key; key->data= key_buff; error= _ma_write_undo_key_insert(info, key, root, new_root, &lsn); } else { *root= new_root; _ma_fast_unlock_key_del(info); } _ma_unpin_all_pages_and_finalize_row(info, lsn); DBUG_RETURN(error != 0); }
O0
c
ma_ck_write_btree_with_log: pushq %rbp movq %rsp, %rbp subq $0xa50, %rsp # imm = 0xA50 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x9e8(%rbp) movq %rsi, -0x9f0(%rbp) movq %rdx, -0x9f8(%rbp) movl %ecx, -0x9fc(%rbp) movq -0x9e8(%rbp), %rax movq (%rax), %rax movq %rax, -0xa08(%rbp) movq $0x0, -0xa10(%rbp) movq -0x9f8(%rbp), %rax movq (%rax), %rax movq %rax, -0xa20(%rbp) movq -0xa08(%rbp), %rax movb 0x7e7(%rax), %al movb %al, -0xa41(%rbp) cmpb $0x0, -0xa41(%rbp) je 0x6686c movq -0x9f0(%rbp), %rax movq (%rax), %rcx movq %rcx, -0xa40(%rbp) movq 0x8(%rax), %rcx movq %rcx, -0xa38(%rbp) movq 0x10(%rax), %rcx movq %rcx, -0xa30(%rbp) movq 0x18(%rax), %rax movq %rax, -0xa28(%rbp) leaq -0x9e0(%rbp), %rdi movq -0x9f0(%rbp), %rax movq (%rax), %rsi movq -0x9f0(%rbp), %rax movl 0x10(%rax), %eax movq -0x9f0(%rbp), %rcx addl 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x29090 movq -0x9e8(%rbp), %rdi movq -0x9f0(%rbp), %rsi movl -0x9fc(%rbp), %ecx leaq -0xa20(%rbp), %rdx callq 0x62660 movsbl %al, %eax movl %eax, -0xa14(%rbp) cmpl $0x0, -0xa14(%rbp) jne 0x6691d movsbl -0xa41(%rbp), %eax cmpl $0x0, %eax je 0x6691d movq -0x9f0(%rbp), %rax movq -0xa40(%rbp), %rcx movq %rcx, (%rax) movq -0xa38(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0xa30(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0xa28(%rbp), %rcx movq %rcx, 0x18(%rax) leaq -0x9e0(%rbp), %rcx movq -0x9f0(%rbp), %rax movq %rcx, (%rax) movq -0x9e8(%rbp), %rdi movq -0x9f0(%rbp), %rsi movq -0x9f8(%rbp), %rdx movq -0xa20(%rbp), %rcx leaq -0xa10(%rbp), %r8 callq 0x66250 movl %eax, -0xa14(%rbp) jmp 0x6693a movq -0xa20(%rbp), %rcx movq -0x9f8(%rbp), %rax movq %rcx, (%rax) movq -0x9e8(%rbp), %rdi callq 0x66990 movq -0x9e8(%rbp), %rdi movq -0xa10(%rbp), %rsi callq 0x669c0 cmpl $0x0, -0xa14(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0xa42(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x66983 movb -0xa42(%rbp), %al addq $0xa50, %rsp # imm = 0xA50 popq %rbp retq callq 0x29230 nopl (%rax,%rax)
_ma_ck_write_btree_with_log: push rbp mov rbp, rsp sub rsp, 0A50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_9E8], rdi mov [rbp+var_9F0], rsi mov [rbp+var_9F8], rdx mov [rbp+var_9FC], ecx mov rax, [rbp+var_9E8] mov rax, [rax] mov [rbp+var_A08], rax mov [rbp+var_A10], 0 mov rax, [rbp+var_9F8] mov rax, [rax] mov [rbp+var_A20], rax mov rax, [rbp+var_A08] mov al, [rax+7E7h] mov [rbp+var_A41], al cmp [rbp+var_A41], 0 jz short loc_6686C mov rax, [rbp+var_9F0] mov rcx, [rax] mov [rbp+var_A40], rcx mov rcx, [rax+8] mov [rbp+var_A38], rcx mov rcx, [rax+10h] mov [rbp+var_A30], rcx mov rax, [rax+18h] mov [rbp+var_A28], rax lea rdi, [rbp+var_9E0] mov rax, [rbp+var_9F0] mov rsi, [rax] mov rax, [rbp+var_9F0] mov eax, [rax+10h] mov rcx, [rbp+var_9F0] add eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy loc_6686C: mov rdi, [rbp+var_9E8] mov rsi, [rbp+var_9F0] mov ecx, [rbp+var_9FC] lea rdx, [rbp+var_A20] call _ma_ck_real_write_btree movsx eax, al mov [rbp+var_A14], eax cmp [rbp+var_A14], 0 jnz short loc_6691D movsx eax, [rbp+var_A41] cmp eax, 0 jz short loc_6691D mov rax, [rbp+var_9F0] mov rcx, [rbp+var_A40] mov [rax], rcx mov rcx, [rbp+var_A38] mov [rax+8], rcx mov rcx, [rbp+var_A30] mov [rax+10h], rcx mov rcx, [rbp+var_A28] mov [rax+18h], rcx lea rcx, [rbp+var_9E0] mov rax, [rbp+var_9F0] mov [rax], rcx mov rdi, [rbp+var_9E8] mov rsi, [rbp+var_9F0] mov rdx, [rbp+var_9F8] mov rcx, [rbp+var_A20] lea r8, [rbp+var_A10] call _ma_write_undo_key_insert mov [rbp+var_A14], eax jmp short loc_6693A loc_6691D: mov rcx, [rbp+var_A20] mov rax, [rbp+var_9F8] mov [rax], rcx mov rdi, [rbp+var_9E8] call _ma_fast_unlock_key_del_0 loc_6693A: mov rdi, [rbp+var_9E8] mov rsi, [rbp+var_A10] call _ma_unpin_all_pages_and_finalize_row_1 cmp [rbp+var_A14], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_A42], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_66983 mov al, [rbp+var_A42] add rsp, 0A50h pop rbp retn loc_66983: call ___stack_chk_fail
bool ma_ck_write_btree_with_log(_QWORD *a1, float **a2, long long *a3, int a4) { bool v4; // al float **v5; // rax char v7; // [rsp+Fh] [rbp-A41h] float *v8; // [rsp+10h] [rbp-A40h] float *v9; // [rsp+18h] [rbp-A38h] float *v10; // [rsp+20h] [rbp-A30h] float *v11; // [rsp+28h] [rbp-A28h] long long v12; // [rsp+30h] [rbp-A20h] BYREF int v13; // [rsp+3Ch] [rbp-A14h] long long v14; // [rsp+40h] [rbp-A10h] BYREF long long v15; // [rsp+48h] [rbp-A08h] int v16; // [rsp+54h] [rbp-9FCh] long long *v17; // [rsp+58h] [rbp-9F8h] float **v18; // [rsp+60h] [rbp-9F0h] _QWORD *v19; // [rsp+68h] [rbp-9E8h] _BYTE v20[2520]; // [rsp+70h] [rbp-9E0h] BYREF unsigned long long v21; // [rsp+A48h] [rbp-8h] v21 = __readfsqword(0x28u); v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = *a1; v14 = 0LL; v12 = *a3; v7 = *(_BYTE *)(v15 + 2023); if ( v7 ) { v8 = *v18; v9 = v18[1]; v10 = v18[2]; v11 = v18[3]; memcpy(v20, *v18, (unsigned int)(*((_DWORD *)v18 + 5) + *((_DWORD *)v18 + 4))); } v4 = ma_ck_real_write_btree((long long)v19, (long long)v18, &v12, v16); v13 = v4; if ( v4 || !v7 ) { *v17 = v12; ma_fast_unlock_key_del_0(v19); } else { v5 = v18; *v18 = v8; v5[1] = v9; v5[2] = v10; v5[3] = v11; *v18 = (float *)v20; v13 = ma_write_undo_key_insert(v19, v18, (long long)v17, v12, (long long)&v14); } ma_unpin_all_pages_and_finalize_row_1(v19, v14); return v13 != 0; }
_ma_ck_write_btree_with_log: PUSH RBP MOV RBP,RSP SUB RSP,0xa50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x9e8],RDI MOV qword ptr [RBP + -0x9f0],RSI MOV qword ptr [RBP + -0x9f8],RDX MOV dword ptr [RBP + -0x9fc],ECX MOV RAX,qword ptr [RBP + -0x9e8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa08],RAX MOV qword ptr [RBP + -0xa10],0x0 MOV RAX,qword ptr [RBP + -0x9f8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa20],RAX MOV RAX,qword ptr [RBP + -0xa08] MOV AL,byte ptr [RAX + 0x7e7] MOV byte ptr [RBP + -0xa41],AL CMP byte ptr [RBP + -0xa41],0x0 JZ 0x0016686c MOV RAX,qword ptr [RBP + -0x9f0] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0xa40],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0xa38],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0xa30],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0xa28],RAX LEA RDI,[RBP + -0x9e0] MOV RAX,qword ptr [RBP + -0x9f0] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x9f0] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x9f0] ADD EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x00129090 LAB_0016686c: MOV RDI,qword ptr [RBP + -0x9e8] MOV RSI,qword ptr [RBP + -0x9f0] MOV ECX,dword ptr [RBP + -0x9fc] LEA RDX,[RBP + -0xa20] CALL 0x00162660 MOVSX EAX,AL MOV dword ptr [RBP + -0xa14],EAX CMP dword ptr [RBP + -0xa14],0x0 JNZ 0x0016691d MOVSX EAX,byte ptr [RBP + -0xa41] CMP EAX,0x0 JZ 0x0016691d MOV RAX,qword ptr [RBP + -0x9f0] MOV RCX,qword ptr [RBP + -0xa40] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0xa38] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0xa30] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0xa28] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[RBP + -0x9e0] MOV RAX,qword ptr [RBP + -0x9f0] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x9e8] MOV RSI,qword ptr [RBP + -0x9f0] MOV RDX,qword ptr [RBP + -0x9f8] MOV RCX,qword ptr [RBP + -0xa20] LEA R8,[RBP + -0xa10] CALL 0x00166250 MOV dword ptr [RBP + -0xa14],EAX JMP 0x0016693a LAB_0016691d: MOV RCX,qword ptr [RBP + -0xa20] MOV RAX,qword ptr [RBP + -0x9f8] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x9e8] CALL 0x00166990 LAB_0016693a: MOV RDI,qword ptr [RBP + -0x9e8] MOV RSI,qword ptr [RBP + -0xa10] CALL 0x001669c0 CMP dword ptr [RBP + -0xa14],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0xa42],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00166983 MOV AL,byte ptr [RBP + -0xa42] ADD RSP,0xa50 POP RBP RET LAB_00166983: CALL 0x00129230
int8 _ma_ck_write_btree_with_log(long *param_1,long *param_2,int8 *param_3,int4 param_4) { char cVar1; char cVar2; long in_FS_OFFSET; long local_a48; long local_a40; long local_a38; long local_a30; int8 local_a28; int local_a1c; int8 local_a18; long local_a10; int4 local_a04; int8 *local_a00; long *local_9f8; long *local_9f0; int1 local_9e8 [2520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_a10 = *param_1; local_a18 = 0; local_a28 = *param_3; cVar1 = *(char *)(local_a10 + 0x7e7); local_a04 = param_4; local_a00 = param_3; local_9f8 = param_2; local_9f0 = param_1; if (cVar1 != '\0') { local_a48 = *param_2; local_a40 = param_2[1]; local_a38 = param_2[2]; local_a30 = param_2[3]; memcpy(local_9e8,(void *)*param_2, (ulong)(uint)((int)param_2[2] + *(int *)((long)param_2 + 0x14))); } cVar2 = _ma_ck_real_write_btree(local_9f0,local_9f8,&local_a28,local_a04); local_a1c = (int)cVar2; if ((local_a1c == 0) && (cVar1 != '\0')) { *local_9f8 = local_a48; local_9f8[1] = local_a40; local_9f8[2] = local_a38; local_9f8[3] = local_a30; *local_9f8 = (long)local_9e8; local_a1c = _ma_write_undo_key_insert(local_9f0,local_9f8,local_a00,local_a28,&local_a18); } else { *local_a00 = local_a28; _ma_fast_unlock_key_del(local_9f0); } _ma_unpin_all_pages_and_finalize_row(local_9f0,local_a18); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_a1c != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,965
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue(unsigned long)
angrymouse[P]emittra/include/concurrentqueue.h
explicit ConcurrentQueue(size_t capacity = 32 * BLOCK_SIZE) : producerListTail(nullptr), producerCount(0), initialBlockPoolIndex(0), nextExplicitConsumerId(0), globalExplicitConsumerOffset(0) { implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); populate_initial_implicit_producer_hash(); populate_initial_block_list(capacity / BLOCK_SIZE + ((capacity & (BLOCK_SIZE - 1)) == 0 ? 0 : 1)); #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG // Track all the producers using a fully-resolved typed list for // each kind; this makes it possible to debug them starting from // the root queue object (otherwise wacky casts are needed that // don't compile in the debugger's expression evaluator). explicitProducers.store(nullptr, std::memory_order_relaxed); implicitProducers.store(nullptr, std::memory_order_relaxed); #endif }
O2
c
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue(unsigned long): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx andq $0x0, (%rdi) andl $0x0, 0x8(%rdi) movq %rsi, %r14 andq $0x0, 0x10(%rdi) andq $0x0, 0x28(%rdi) addq $0x58, %rdi callq 0x6860 andq $0x0, 0x25c(%rbx) movb $0x0, 0x258(%rbx) movq %rbx, %rdi callq 0x6876 movq %r14, %rsi shrq $0x5, %rsi andl $0x1f, %r14d cmpq $0x1, %r14 sbbq $-0x1, %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x68b6
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEEC2Em: push r14 push rbx push rax mov rbx, rdi and qword ptr [rdi], 0 and dword ptr [rdi+8], 0 mov r14, rsi and qword ptr [rdi+10h], 0 and qword ptr [rdi+28h], 0 add rdi, 58h ; 'X' call _ZNSt5arrayIN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS0_28ConcurrentQueueDefaultTraitsEE19ImplicitProducerKVPELm32EEC2Ev; std::array<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul>::array(void) and qword ptr [rbx+25Ch], 0 mov byte ptr [rbx+258h], 0 mov rdi, rbx call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE39populate_initial_implicit_producer_hashEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_implicit_producer_hash(void) mov rsi, r14 shr rsi, 5 and r14d, 1Fh cmp r14, 1 sbb rsi, 0FFFFFFFFFFFFFFFFh mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE27populate_initial_block_listEm; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_block_list(ulong)
long long moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue( long long a1, unsigned long long a2) { *(_QWORD *)a1 = 0LL; *(_DWORD *)(a1 + 8) = 0; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; std::array<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul>::array(a1 + 88); *(_QWORD *)(a1 + 604) = 0LL; *(_BYTE *)(a1 + 600) = 0; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_implicit_producer_hash(a1); return moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_block_list( a1, (a2 >> 5) - (((a2 & 0x1F) == 0) - 1LL)); }
ConcurrentQueue: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI AND qword ptr [RDI],0x0 AND dword ptr [RDI + 0x8],0x0 MOV R14,RSI AND qword ptr [RDI + 0x10],0x0 AND qword ptr [RDI + 0x28],0x0 ADD RDI,0x58 CALL 0x00106860 AND qword ptr [RBX + 0x25c],0x0 MOV byte ptr [RBX + 0x258],0x0 MOV RDI,RBX CALL 0x00106876 MOV RSI,R14 SHR RSI,0x5 AND R14D,0x1f CMP R14,0x1 SBB RSI,-0x1 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001068b6
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue(unsigned long) */ void __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::ConcurrentQueue(ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *this,ulong param_1) { *(int8 *)this = 0; *(int4 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x28) = 0; std:: array<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul> ::array((array<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul> *)(this + 0x58)); *(int8 *)(this + 0x25c) = 0; this[600] = (ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> )0x0; populate_initial_implicit_producer_hash(this); populate_initial_block_list(this,((param_1 >> 5) + 1) - (ulong)((param_1 & 0x1f) == 0)); return; }
61,966
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
llama.cpp/common/json.hpp
basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x80f58 movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x73862 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x73862 movq %r14, %rdi xorl %esi, %esi callq 0x73862 movq %r14, %rdi callq 0x793b0 addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: push r14 push rbx sub rsp, 18h mov rbx, rdi lea r14, [rsp+28h+var_20] mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) movups xmm0, xmmword ptr [r14] movups xmmword ptr [rbx], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rsp, 18h pop rbx pop r14 retn
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_( char *a1, long long a2) { _OWORD v3[2]; // [rsp+8h] [rbp-20h] BYREF nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::moved_or_copied( (unsigned __int8 *)v3, a2); *(_OWORD *)a1 = v3[0]; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3); LOBYTE(v3[0]) = 0; *((_QWORD *)&v3[0] + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3); return nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v3); }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00180f58 MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00173862 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x00173862 MOV RDI,R14 XOR ESI,ESI CALL 0x00173862 MOV RDI,R14 CALL 0x001793b0 ADD RSP,0x18 POP RBX POP R14 RET
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_ (int8 *param_1) { bool bVar1; data local_20; int7 uStack_1f; int8 uStack_18; nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); *param_1 = CONCAT71(uStack_1f,local_20); param_1[1] = uStack_18; bVar1 = SUB81(&local_20,0); nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar1); local_20 = (data)0x0; uStack_18 = 0; nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar1); nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(&local_20); return; }
61,967
test_log::build_graph(ggml_context*)
llama.cpp/tests/test-backend-ops.cpp
ggml_tensor * build_graph(ggml_context * ctx) override { ggml_tensor * a = ggml_new_tensor(ctx, type, 4, ne.data()); ggml_set_param(ctx, a); ggml_set_name(a, "a"); ggml_tensor * out = ggml_log(ctx, a); ggml_set_name(out, "out"); return out; }
O3
cpp
test_log::build_graph(ggml_context*): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x38(%rdi), %esi leaq 0x40(%rdi), %rcx movq %rbx, %rdi movl $0x4, %edx callq 0x1cbe0 movq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi callq 0x2cc20 movq %rbx, %rdi movq %r15, %rsi callq 0x1ccb0 leaq 0x20ffb(%rip), %rsi # 0x690c4 movq %r15, %rdi callq 0x1c690 movq %rbx, %rdi movq %r15, %rsi callq 0x1ccd0 movq %rax, %rbx leaq 0x21b05(%rip), %rsi # 0x69beb movq %rax, %rdi callq 0x1c690 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8test_log11build_graphEP12ggml_context: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi mov esi, [rdi+38h] lea rcx, [rdi+40h] mov rdi, rbx mov edx, 4 call _ggml_new_tensor mov r15, rax mov rdi, r14 mov rsi, rbx call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *) mov rdi, rbx mov rsi, r15 call _ggml_set_param lea rsi, aViewOfA_0+8; "a" mov rdi, r15 call _ggml_set_name mov rdi, rbx mov rsi, r15 call _ggml_log mov rbx, rax lea rsi, aSumOfOut+7; "out" mov rdi, rax call _ggml_set_name mov rax, rbx pop rbx pop r14 pop r15 retn
long long test_log::build_graph(long long a1, long long a2) { long long v2; // r15 long long v3; // rbx v2 = ggml_new_tensor(a2, *(unsigned int *)(a1 + 56), 4LL); test_case::add_sentinel(a1, a2); ggml_set_param(a2, v2); ggml_set_name(v2, "a"); v3 = ggml_log(a2, v2); ggml_set_name(v3, "out"); return v3; }
build_graph: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV ESI,dword ptr [RDI + 0x38] LEA RCX,[RDI + 0x40] MOV RDI,RBX MOV EDX,0x4 CALL 0x0011cbe0 MOV R15,RAX MOV RDI,R14 MOV RSI,RBX CALL 0x0012cc20 MOV RDI,RBX MOV RSI,R15 CALL 0x0011ccb0 LEA RSI,[0x1690c4] MOV RDI,R15 CALL 0x0011c690 MOV RDI,RBX MOV RSI,R15 CALL 0x0011ccd0 MOV RBX,RAX LEA RSI,[0x169beb] MOV RDI,RAX CALL 0x0011c690 MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* test_log::build_graph(ggml_context*) */ int8 __thiscall test_log::build_graph(test_log *this,ggml_context *param_1) { int8 uVar1; uVar1 = ggml_new_tensor(param_1,*(int4 *)(this + 0x38),4,this + 0x40); test_case::add_sentinel((test_case *)this,param_1); ggml_set_param(param_1,uVar1); ggml_set_name(uVar1,"a"); uVar1 = ggml_log(param_1,uVar1); ggml_set_name(uVar1,"out"); return uVar1; }
61,968
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op)
monkey531[P]llama/common/minja.hpp
UnaryOpExpr(const Location & location, std::shared_ptr<Expression> && e, Op o) : Expression(location), expr(std::move(e)), op(o) {}
O2
cpp
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op): pushq %r15 pushq %r14 pushq %rbx movl %ecx, %ebx movq %rdx, %r14 movq %rdi, %r15 callq 0x633da leaq 0x98fb7(%rip), %rax # 0xfc368 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x28(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x20(%r15) andq $0x0, (%r14) movl %ebx, 0x30(%r15) popq %rbx popq %r14 popq %r15 retq nop
_ZN5minja11UnaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEENS0_2OpE: push r15 push r14 push rbx mov ebx, ecx mov r14, rdx mov r15, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja11UnaryOpExprE; `vtable for'minja::UnaryOpExpr add rax, 10h mov [r15], rax and qword ptr [r15+28h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+20h], xmm0 and qword ptr [r14], 0 mov [r15+30h], ebx pop rbx pop r14 pop r15 retn
long long * minja::UnaryOpExpr::UnaryOpExpr(long long a1, long long a2, __int128 *a3, int a4) { long long *result; // rax __int128 v7; // xmm0 minja::Expression::Expression(); result = &`vtable for'minja::UnaryOpExpr + 2; *(_QWORD *)a1 = &`vtable for'minja::UnaryOpExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_DWORD *)(a1 + 48) = a4; return result; }
UnaryOpExpr: PUSH R15 PUSH R14 PUSH RBX MOV EBX,ECX MOV R14,RDX MOV R15,RDI CALL 0x001633da LEA RAX,[0x1fc368] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 AND qword ptr [R14],0x0 MOV dword ptr [R15 + 0x30],EBX POP RBX POP R14 POP R15 RET
/* minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op) */ void __thiscall minja::UnaryOpExpr::UnaryOpExpr (UnaryOpExpr *this,Location *param_1,int8 *param_2,int4 param_4) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_001fc378; *(int8 *)(this + 0x28) = 0; uVar1 = param_2[1]; param_2[1] = 0; *(int8 *)(this + 0x20) = *param_2; *(int8 *)(this + 0x28) = uVar1; *param_2 = 0; *(int4 *)(this + 0x30) = param_4; return; }
61,969
testing::internal::PrintTo(char const*, std::ostream*)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-printers.cc
void PrintTo(const char* s, ostream* os) { PrintCStringTo(s, os); }
O3
cpp
testing::internal::PrintTo(char const*, std::ostream*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx testq %rdi, %rdi je 0x179c5 movq %rdi, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x83b0 leaq 0x2cdc9(%rip), %rsi # 0x44764 movl $0xd, %edx movq %rax, %rdi callq 0x85b0 movq %r14, %rdi callq 0x8200 movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x17d45 leaq 0x2cca2(%rip), %rsi # 0x4466e movl $0x4, %edx movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x85b0
_ZN7testing8internal7PrintToEPKcPSo: push r14 push rbx push rax mov rbx, rsi test rdi, rdi jz short loc_179C5 mov r14, rdi mov rdi, rbx mov rsi, r14 call __ZNSo9_M_insertIPKvEERSoT_; std::ostream::_M_insert<void const*>(void const*) lea rsi, aPointingTo; " pointing to " mov edx, 0Dh mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r14 call _strlen mov rdi, r14 mov rsi, rax mov rdx, rbx add rsp, 8 pop rbx pop r14 jmp _ZN7testing8internalL20PrintCharsAsStringToIcEENS0_10CharFormatEPKT_mPSo; testing::internal::PrintCharsAsStringTo<char>(char const*,ulong,std::ostream *) loc_179C5: lea rsi, aNull_0; "NULL" mov edx, 4 mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
long long testing::internal::PrintTo(testing::internal *this, const char *a2, std::ostream *a3) { long long v3; // rax long long v4; // rax long long v5; // rcx if ( !this ) return std::__ostream_insert<char,std::char_traits<char>>(a2, "NULL", 4LL); v3 = std::ostream::_M_insert<void const*>(a2, this, a3); std::__ostream_insert<char,std::char_traits<char>>(v3, " pointing to ", 13LL); v4 = strlen(this); return testing::internal::PrintCharsAsStringTo<char>(this, v4, a2, v5); }
PrintTo: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI TEST RDI,RDI JZ 0x001179c5 MOV R14,RDI MOV RDI,RBX MOV RSI,R14 CALL 0x001083b0 LEA RSI,[0x144764] MOV EDX,0xd MOV RDI,RAX CALL 0x001085b0 MOV RDI,R14 CALL 0x00108200 MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00117d45 LAB_001179c5: LEA RSI,[0x14466e] MOV EDX,0x4 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001085b0
/* testing::internal::PrintTo(char const*, std::ostream*) */ void testing::internal::PrintTo(char *param_1,ostream *param_2) { ostream *poVar1; size_t sVar2; if (param_1 != (char *)0x0) { poVar1 = std::ostream::_M_insert<void_const*>(param_2); std::__ostream_insert<char,std::char_traits<char>>(poVar1," pointing to ",0xd); sVar2 = strlen(param_1); PrintCharsAsStringTo<char>(param_1,sVar2,param_2); return; } std::__ostream_insert<char,std::char_traits<char>>(param_2,"NULL",4); return; }
61,970
ma_check_bitmap_data
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_check_bitmap_data(MARIA_HA *info, enum en_page_type page_type, uint empty_space, uint bitmap_pattern) { uint bits; switch (page_type) { case UNALLOCATED_PAGE: case MAX_PAGE_TYPE: bits= 0; break; case HEAD_PAGE: bits= _ma_free_size_to_head_pattern(&info->s->bitmap, empty_space); break; case TAIL_PAGE: bits= free_size_to_tail_pattern(&info->s->bitmap, empty_space); break; case BLOB_PAGE: bits= FULL_TAIL_PAGE; break; default: bits= 0; /* to satisfy compiler */ DBUG_ASSERT(0); } return (bitmap_pattern != bits); }
O3
c
ma_check_bitmap_data: pushq %rbp movq %rsp, %rbp cmpl $0x3, %esi je 0x56bca xorl %eax, %eax cmpl $0x2, %esi je 0x56ba5 cmpl $0x1, %esi jne 0x56bcf movq (%rdi), %rsi movl $0x4, %eax cmpl %edx, 0xb24(%rsi) ja 0x56bcf movl $0x3, %eax cmpl %edx, 0xb20(%rsi) ja 0x56bcf movl $0x2, %eax cmpl %edx, 0xb1c(%rsi) ja 0x56bcf xorl %eax, %eax cmpl %edx, 0xb18(%rsi) seta %al jmp 0x56bcf movq (%rdi), %rsi cmpl %edx, 0xb18(%rsi) jbe 0x56bcf movl $0x7, %eax cmpl %edx, 0xb30(%rsi) ja 0x56bcf xorl %eax, %eax cmpl 0xb2c(%rsi), %edx adcl $0x5, %eax jmp 0x56bcf movl $0x7, %eax cmpl %ecx, %eax setne %al popq %rbp retq
_ma_check_bitmap_data: push rbp mov rbp, rsp cmp esi, 3 jz short loc_56BCA xor eax, eax cmp esi, 2 jz short loc_56BA5 cmp esi, 1 jnz short loc_56BCF mov rsi, [rdi] mov eax, 4 cmp [rsi+0B24h], edx ja short loc_56BCF mov eax, 3 cmp [rsi+0B20h], edx ja short loc_56BCF mov eax, 2 cmp [rsi+0B1Ch], edx ja short loc_56BCF xor eax, eax cmp [rsi+0B18h], edx setnbe al jmp short loc_56BCF loc_56BA5: mov rsi, [rdi] cmp [rsi+0B18h], edx jbe short loc_56BCF mov eax, 7 cmp [rsi+0B30h], edx ja short loc_56BCF xor eax, eax cmp edx, [rsi+0B2Ch] adc eax, 5 jmp short loc_56BCF loc_56BCA: mov eax, 7 loc_56BCF: cmp eax, ecx setnz al pop rbp retn
bool ma_check_bitmap_data(long long *a1, int a2, unsigned int a3, int a4) { int v4; // eax _DWORD *v5; // rsi long long v6; // rsi if ( a2 == 3 ) { v4 = 7; } else { v4 = 0; if ( a2 == 2 ) { v6 = *a1; if ( *(_DWORD *)(*a1 + 2840) > a3 ) { v4 = 7; if ( *(_DWORD *)(v6 + 2864) <= a3 ) v4 = (a3 < *(_DWORD *)(v6 + 2860)) + 5; } } else if ( a2 == 1 ) { v5 = (_DWORD *)*a1; v4 = 4; if ( *(_DWORD *)(*a1 + 2852) <= a3 ) { v4 = 3; if ( v5[712] <= a3 ) { v4 = 2; if ( v5[711] <= a3 ) v4 = v5[710] > a3; } } } } return v4 != a4; }
_ma_check_bitmap_data: PUSH RBP MOV RBP,RSP CMP ESI,0x3 JZ 0x00156bca XOR EAX,EAX CMP ESI,0x2 JZ 0x00156ba5 CMP ESI,0x1 JNZ 0x00156bcf MOV RSI,qword ptr [RDI] MOV EAX,0x4 CMP dword ptr [RSI + 0xb24],EDX JA 0x00156bcf MOV EAX,0x3 CMP dword ptr [RSI + 0xb20],EDX JA 0x00156bcf MOV EAX,0x2 CMP dword ptr [RSI + 0xb1c],EDX JA 0x00156bcf XOR EAX,EAX CMP dword ptr [RSI + 0xb18],EDX SETA AL JMP 0x00156bcf LAB_00156ba5: MOV RSI,qword ptr [RDI] CMP dword ptr [RSI + 0xb18],EDX JBE 0x00156bcf MOV EAX,0x7 CMP dword ptr [RSI + 0xb30],EDX JA 0x00156bcf XOR EAX,EAX CMP EDX,dword ptr [RSI + 0xb2c] ADC EAX,0x5 JMP 0x00156bcf LAB_00156bca: MOV EAX,0x7 LAB_00156bcf: CMP EAX,ECX SETNZ AL POP RBP RET
bool _ma_check_bitmap_data(long *param_1,int param_2,uint param_3,uint param_4) { long lVar1; uint uVar2; if (param_2 == 3) { uVar2 = 7; } else { uVar2 = 0; if (param_2 == 2) { lVar1 = *param_1; if ((param_3 < *(uint *)(lVar1 + 0xb18)) && (uVar2 = 7, *(uint *)(lVar1 + 0xb30) <= param_3)) { uVar2 = (param_3 < *(uint *)(lVar1 + 0xb2c)) + 5; } } else if (param_2 == 1) { lVar1 = *param_1; uVar2 = 4; if (((*(uint *)(lVar1 + 0xb24) <= param_3) && (uVar2 = 3, *(uint *)(lVar1 + 0xb20) <= param_3) ) && (uVar2 = 2, *(uint *)(lVar1 + 0xb1c) <= param_3)) { uVar2 = (uint)(param_3 < *(uint *)(lVar1 + 0xb18)); } } } return uVar2 != param_4; }
61,971
pfs_new_thread_v1
eloqsql/storage/perfschema/pfs.cc
PSI_thread* pfs_new_thread_v1(PSI_thread_key key, const void *identity, ulonglong processlist_id) { PFS_thread *pfs; PFS_thread_class *klass= find_thread_class(key); if (likely(klass != NULL)) { pfs= create_thread(klass, identity, processlist_id); if (pfs != NULL) { PFS_thread *parent= my_thread_get_THR_PFS(); if (parent != NULL) pfs->m_parent_thread_internal_id= parent->m_parent_thread_internal_id; } } else pfs= NULL; return reinterpret_cast<PSI_thread*> (pfs); }
O0
cpp
pfs_new_thread_v1: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl -0x4(%rbp), %edi callq 0x4e590 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x2de87 movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x436e0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x2de85 callq 0x2d4b0 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x2de83 movq -0x30(%rbp), %rax movq 0x858(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x858(%rax) jmp 0x2de85 jmp 0x2de8f movq $0x0, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
pfs_new_thread_v1: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov edi, [rbp+var_4]; unsigned int call _Z17find_thread_classj; find_thread_class(uint) mov [rbp+var_28], rax cmp [rbp+var_28], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_2DE87 mov rdi, [rbp+var_28] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _Z13create_threadP16PFS_thread_classPKvy; create_thread(PFS_thread_class *,void const*,ulong long) mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz short loc_2DE85 call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void) mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_2DE83 mov rax, [rbp+var_30] mov rcx, [rax+858h] mov rax, [rbp+var_20] mov [rax+858h], rcx loc_2DE83: jmp short $+2 loc_2DE85: jmp short loc_2DE8F loc_2DE87: mov [rbp+var_20], 0 loc_2DE8F: mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
long long pfs_new_thread_v1(unsigned int a1, long long a2) { long long THR_PFS; // [rsp+0h] [rbp-30h] long long thread_class; // [rsp+8h] [rbp-28h] long long thread; // [rsp+10h] [rbp-20h] thread_class = find_thread_class(a1); if ( !thread_class ) return 0LL; thread = create_thread(thread_class, a2); if ( thread ) { THR_PFS = my_thread_get_THR_PFS(); if ( THR_PFS ) *(_QWORD *)(thread + 2136) = *(_QWORD *)(THR_PFS + 2136); } return thread; }
pfs_new_thread_v1: 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 EDI,dword ptr [RBP + -0x4] CALL 0x0014e590 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0012de87 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001436e0 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0012de85 CALL 0x0012d4b0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0012de83 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x858] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x858],RCX LAB_0012de83: JMP 0x0012de85 LAB_0012de85: JMP 0x0012de8f LAB_0012de87: MOV qword ptr [RBP + -0x20],0x0 LAB_0012de8f: MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
long pfs_new_thread_v1(uint param_1,void *param_2,ulonglong param_3) { PFS_thread_class *pPVar1; long lVar2; long local_28; pPVar1 = (PFS_thread_class *)find_thread_class(param_1); if (pPVar1 == (PFS_thread_class *)0x0) { local_28 = 0; } else { local_28 = create_thread(pPVar1,param_2,param_3); if ((local_28 != 0) && (lVar2 = my_thread_get_THR_PFS(), lVar2 != 0)) { *(int8 *)(local_28 + 0x858) = *(int8 *)(lVar2 + 0x858); } } return local_28; }
61,972
process_str_arg
eloqsql/strings/my_vsnprintf.c
static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end, longlong length_arg, size_t width, char *par, uint print_type, my_bool nice_cut) { int well_formed_error; uint dots= 0; size_t plen, left_len= (size_t) (end - to) + 1, slen=0; my_bool left_fill= 1; size_t length; /* The sign of the length argument specific the string should be right or left adjusted */ if (length_arg < 0) { length= (size_t) -length_arg; left_fill= 0; } else length= (size_t) length_arg; if (!par) par = (char*) "(null)"; if (nice_cut) { plen= slen= strnlen(par, width + 1); if (plen > width) plen= width; if (left_len <= plen) { plen = left_len - 1; length= plen; } if ((slen > plen)) { if (plen < 3) { dots= (uint) plen; plen= 0; } else { dots= 3; plen-= 3; } } } else { plen= slen= strnlen(par, width); dots= 0; if (left_len <= plen) { plen = left_len - 1; length= plen; } } plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error); if (print_type & ESCAPED_ARG) { const char *org_to= to; to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots)); plen= (size_t) (to - org_to); dots= 0; } else { if (left_fill) { if (plen + dots < length) to= strfill(to, length - plen - dots, ' '); } to= strnmov(to,par,plen); if (dots) to= strfill(to, dots, '.'); } if (!left_fill && plen + dots < length) to= strfill(to, length - plen - dots, ' '); return to; }
O3
c
process_str_arg: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r15 movq %rdi, -0x58(%rbp) movq %rdx, -0x50(%rbp) movq %rdx, %r14 movq %rsi, -0x38(%rbp) subq %rsi, %r14 leaq 0x1(%r14), %rbx movq %rcx, %r13 negq %r13 movq %rcx, -0x40(%rbp) cmovsq %rcx, %r13 testq %r9, %r9 leaq 0x6ffb(%rip), %r12 # 0x993a1 cmovneq %r9, %r12 cmpb $0x0, 0x18(%rbp) je 0x923ee leaq 0x1(%r15), %rsi movq %r12, %rdi callq 0x28680 cmpq %r15, %rax movq %r15, %rdx cmovbq %rax, %rdx cmpq %rdx, %rbx cmovbeq %r14, %rdx cmovbeq %r14, %r13 movl $0x0, -0x2c(%rbp) cmpq %rdx, %rax movq %r13, -0x48(%rbp) jbe 0x9241f cmpq $0x2, %rdx ja 0x92414 movl %edx, -0x2c(%rbp) xorl %edx, %edx jmp 0x9241f movq %r12, %rdi movq %r15, %rsi callq 0x28680 movq %rax, %rdx cmpq %rax, %rbx cmovbeq %r14, %rdx cmovbeq %r14, %r13 movq %r13, -0x48(%rbp) movl $0x0, -0x2c(%rbp) jmp 0x9241f addq $-0x3, %rdx movl $0x3, -0x2c(%rbp) addq %r12, %rdx movq -0x58(%rbp), %rdi movq 0xb8(%rdi), %rax leaq -0x70(%rbp), %rbx movq %r12, %rsi movq %r15, %rcx movq %rbx, %r8 callq *0xc8(%rax) movq (%rbx), %r13 subq %r12, %r13 movl 0x10(%rbp), %eax testb $0x8, %al jne 0x92487 movq -0x40(%rbp), %rbx testq %rbx, %rbx js 0x9255a movl -0x2c(%rbp), %r14d movl %r14d, %eax addq %r13, %rax movq -0x48(%rbp), %rsi subq %rax, %rsi jbe 0x92564 movq -0x38(%rbp), %rdi movl $0x20, %edx callq 0x92ca8 movq %rax, %rdi jmp 0x92568 movl -0x2c(%rbp), %eax addq %rax, %r13 xorps %xmm0, %xmm0 movaps %xmm0, -0x70(%rbp) movq $0x0, -0x60(%rbp) cmpq %r13, %r14 jbe 0x925e4 movq -0x38(%rbp), %rax leaq 0x1(%rax), %r15 movb $0x60, (%rax) testq %r13, %r13 jle 0x92593 addq %r12, %r13 xorl %r14d, %r14d cmpl $0x0, -0x2c(%rbp) je 0x924ea movl %r14d, %eax movq %r15, -0x70(%rbp,%rax,8) movl %r14d, %eax incl %eax movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB imulq %rcx, %rax shrq $0x21, %rax leal (%rax,%rax,2), %eax negl %eax addl %eax, %r14d incl %r14d movb (%r12), %bl movq -0x58(%rbp), %rdi movq 0xb8(%rdi), %rax movq %r12, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x2, %eax movl $0x1, %ecx cmovll %ecx, %eax jge 0x9252b cmpb $0x60, %bl jne 0x9252b leaq 0x1(%r15), %rdi cmpq -0x50(%rbp), %rdi jae 0x925e4 movb $0x60, (%r15) jmp 0x9252e movq %r15, %rdi movl %eax, %ebx leaq (%rdi,%rbx), %rax cmpq -0x50(%rbp), %rax jae 0x925e4 movq %r12, %rsi movq %rbx, %rdx callq 0x92d08 movq %rax, %r15 addq %rbx, %r12 cmpq %r13, %r12 jb 0x924bf jmp 0x92596 movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %r14d jmp 0x92568 movq -0x38(%rbp), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x92d08 movq %rax, %r15 testl %r14d, %r14d je 0x925f8 movl %r14d, %r14d movq %r15, %rdi movq %r14, %rsi movl $0x2e, %edx callq 0x92ca8 movq %rax, %r15 jmp 0x925fb xorl %r14d, %r14d leaq 0x1(%r15), %rax cmpq -0x50(%rbp), %rax jae 0x925e4 cmpl $0x0, -0x2c(%rbp) je 0x92646 subl $0x1, %r14d movl $0x2, %eax cmovbl %eax, %r14d movq -0x70(%rbp,%r14,8), %rdx testq %rdx, %rdx je 0x925e4 movl $0x1, %ecx subl $0x1, %r14d cmovbl %eax, %r14d movq -0x70(%rbp,%r14,8), %r15 testq %r15, %r15 je 0x9262e incl %ecx movq %r15, %rdx cmpl $0x3, %ecx jne 0x925c6 jmp 0x92631 movq -0x38(%rbp), %rax movb $0x0, (%rax) movq %rax, %r15 movq -0x40(%rbp), %rbx movq %r15, %r13 subq %rax, %r13 xorl %r14d, %r14d testq %rbx, %rbx jns 0x9261c addq %r14, %r13 movq -0x48(%rbp), %rsi subq %r13, %rsi jbe 0x9261c movq %r15, %rdi movl $0x20, %edx callq 0x92ca8 movq %rax, %r15 movq %r15, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdx, %r15 movl %ecx, %ebx movq %r15, %rdi movl $0x2e, %esi movq %rbx, %rdx callq 0x281d0 addq %rbx, %r15 movb $0x60, (%r15) incq %r15 movq -0x40(%rbp), %rbx movq -0x38(%rbp), %rax jmp 0x925f2
process_str_arg: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, r8 mov [rbp+var_58], rdi mov [rbp+var_50], rdx mov r14, rdx mov [rbp+var_38], rsi sub r14, rsi lea rbx, [r14+1] mov r13, rcx neg r13 mov [rbp+var_40], rcx cmovs r13, rcx test r9, r9 lea r12, aNull; "(null)" cmovnz r12, r9 cmp [rbp+arg_8], 0 jz short loc_923EE lea rsi, [r15+1] mov rdi, r12 call _strnlen cmp rax, r15 mov rdx, r15 cmovb rdx, rax cmp rbx, rdx cmovbe rdx, r14 cmovbe r13, r14 mov [rbp+var_2C], 0 cmp rax, rdx mov [rbp+var_48], r13 jbe short loc_9241F cmp rdx, 2 ja short loc_92414 mov [rbp+var_2C], edx xor edx, edx jmp short loc_9241F loc_923EE: mov rdi, r12 mov rsi, r15 call _strnlen mov rdx, rax cmp rbx, rax cmovbe rdx, r14 cmovbe r13, r14 mov [rbp+var_48], r13 mov [rbp+var_2C], 0 jmp short loc_9241F loc_92414: add rdx, 0FFFFFFFFFFFFFFFDh mov [rbp+var_2C], 3 loc_9241F: add rdx, r12 mov rdi, [rbp+var_58] mov rax, [rdi+0B8h] lea rbx, [rbp+var_70] mov rsi, r12 mov rcx, r15 mov r8, rbx call qword ptr [rax+0C8h] mov r13, [rbx] sub r13, r12 mov eax, [rbp+arg_0] test al, 8 jnz short loc_92487 mov rbx, [rbp+var_40] test rbx, rbx js loc_9255A mov r14d, [rbp+var_2C] mov eax, r14d add rax, r13 mov rsi, [rbp+var_48] sub rsi, rax jbe loc_92564 mov rdi, [rbp+var_38] mov edx, 20h ; ' ' call strfill mov rdi, rax jmp loc_92568 loc_92487: mov eax, [rbp+var_2C] add r13, rax xorps xmm0, xmm0 movaps [rbp+var_70], xmm0 mov [rbp+var_60], 0 cmp r14, r13 jbe loc_925E4 mov rax, [rbp+var_38] lea r15, [rax+1] mov byte ptr [rax], 60h ; '`' test r13, r13 jle loc_92593 add r13, r12 xor r14d, r14d loc_924BF: cmp [rbp+var_2C], 0 jz short loc_924EA mov eax, r14d mov qword ptr [rbp+rax*8+var_70], r15 mov eax, r14d inc eax mov ecx, 0AAAAAAABh imul rax, rcx shr rax, 21h lea eax, [rax+rax*2] neg eax add r14d, eax inc r14d loc_924EA: mov bl, [r12] mov rdi, [rbp+var_58] mov rax, [rdi+0B8h] mov rsi, r12 mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 2 mov ecx, 1 cmovl eax, ecx jge short loc_9252B cmp bl, 60h ; '`' jnz short loc_9252B lea rdi, [r15+1] cmp rdi, [rbp+var_50] jnb loc_925E4 mov byte ptr [r15], 60h ; '`' jmp short loc_9252E loc_9252B: mov rdi, r15 loc_9252E: mov ebx, eax lea rax, [rdi+rbx] cmp rax, [rbp+var_50] jnb loc_925E4 mov rsi, r12 mov rdx, rbx call strnmov mov r15, rax add r12, rbx cmp r12, r13 jb loc_924BF jmp short loc_92596 loc_9255A: mov rdi, [rbp+var_38] mov r14d, [rbp+var_2C] jmp short loc_92568 loc_92564: mov rdi, [rbp+var_38] loc_92568: mov rsi, r12 mov rdx, r13 call strnmov mov r15, rax test r14d, r14d jz short loc_925F8 mov r14d, r14d mov rdi, r15 mov rsi, r14 mov edx, 2Eh ; '.' call strfill mov r15, rax jmp short loc_925FB loc_92593: xor r14d, r14d loc_92596: lea rax, [r15+1] cmp rax, [rbp+var_50] jnb short loc_925E4 cmp [rbp+var_2C], 0 jz loc_92646 sub r14d, 1 mov eax, 2 cmovb r14d, eax mov rdx, qword ptr [rbp+r14*8+var_70] test rdx, rdx jz short loc_925E4 mov ecx, 1 loc_925C6: sub r14d, 1 cmovb r14d, eax mov r15, qword ptr [rbp+r14*8+var_70] test r15, r15 jz short loc_9262E inc ecx mov rdx, r15 cmp ecx, 3 jnz short loc_925C6 jmp short loc_92631 loc_925E4: mov rax, [rbp+var_38] mov byte ptr [rax], 0 mov r15, rax mov rbx, [rbp+var_40] loc_925F2: mov r13, r15 sub r13, rax loc_925F8: xor r14d, r14d loc_925FB: test rbx, rbx jns short loc_9261C add r13, r14 mov rsi, [rbp+var_48] sub rsi, r13 jbe short loc_9261C mov rdi, r15 mov edx, 20h ; ' ' call strfill mov r15, rax loc_9261C: mov rax, r15 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9262E: mov r15, rdx loc_92631: mov ebx, ecx mov rdi, r15 mov esi, 2Eh ; '.' mov rdx, rbx call _memset add r15, rbx loc_92646: mov byte ptr [r15], 60h ; '`' inc r15 mov rbx, [rbp+var_40] mov rax, [rbp+var_38] jmp short loc_925F2
long long process_str_arg( long long a1, _BYTE *a2, unsigned long long a3, long long a4, unsigned long long a5, const char *a6, char a7, char a8) { unsigned long long v9; // r14 unsigned long long v10; // rbx long long v11; // r13 const char *v12; // r12 unsigned long long v13; // rax unsigned long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 long long v18; // r13 long long v19; // rbx long long v20; // r14 unsigned long long v21; // rax long long v22; // rdi long long v23; // r13 _BYTE *v24; // r15 const char *v25; // r13 unsigned int v26; // r14d char v27; // bl unsigned int v28; // eax _BYTE *v29; // rdi long long v30; // rbx long long v31; // rax long long v32; // r15 bool v33; // cf long long v34; // r14 long long v35; // rdx unsigned int v36; // ecx long long v37; // r15 _BYTE *v38; // rax unsigned long long v39; // r13 long long v41; // rbx __int128 v42; // [rsp+0h] [rbp-70h] BYREF long long v43; // [rsp+10h] [rbp-60h] long long v44; // [rsp+18h] [rbp-58h] unsigned long long v45; // [rsp+20h] [rbp-50h] unsigned long long v46; // [rsp+28h] [rbp-48h] long long v47; // [rsp+30h] [rbp-40h] _BYTE *v48; // [rsp+38h] [rbp-38h] unsigned int v49; // [rsp+44h] [rbp-2Ch] v44 = a1; v45 = a3; v48 = a2; v9 = a3 - (_QWORD)a2; v10 = a3 - (_QWORD)a2 + 1; v11 = -a4; v47 = a4; if ( a4 > 0 ) v11 = a4; v12 = "(null)"; if ( a6 ) v12 = a6; if ( a8 ) { v13 = strnlen(v12, a5 + 1); v14 = a5; if ( v13 < a5 ) v14 = v13; if ( v10 <= v14 ) { v14 = v9; v11 = v9; } v49 = 0; v46 = v11; if ( v13 > v14 ) { if ( v14 > 2 ) { v14 -= 3LL; v49 = 3; } else { v49 = v14; v14 = 0LL; } } } else { v14 = strnlen(v12, a5); if ( v10 <= v14 ) { v14 = v9; v11 = v9; } v46 = v11; v49 = 0; } (*(void ( **)(long long, const char *, const char *, unsigned long long, __int128 *))(*(_QWORD *)(v44 + 184) + 200LL))( v44, v12, &v12[v14], a5, &v42); v18 = v42 - (_QWORD)v12; if ( (a7 & 8) != 0 ) { v23 = v49 + v18; v42 = 0LL; v43 = 0LL; if ( v9 > v23 ) { v24 = v48 + 1; *v48 = 96; if ( v23 > 0 ) { v25 = &v12[v23]; v26 = 0; while ( 1 ) { if ( v49 ) { *((_QWORD *)&v42 + v26) = v24; v15 = 2863311531LL; v26 += -3 * ((v26 + 1) / 3) + 1; } v27 = *v12; v28 = (*(long long ( **)(long long, const char *, const char *, long long, long long, long long, _QWORD, _QWORD, long long))(*(_QWORD *)(v44 + 184) + 192LL))( v44, v12, v25, v15, v16, v17, v42, *((_QWORD *)&v42 + 1), v43); if ( (int)v28 < 2 && (v28 = 1, v27 == 96) ) { v29 = v24 + 1; if ( (unsigned long long)(v24 + 1) >= v45 ) goto LABEL_50; *v24 = 96; } else { v29 = v24; } v30 = v28; if ( (unsigned long long)&v29[v28] >= v45 ) goto LABEL_50; v24 = (_BYTE *)strnmov(v29, v12, v28); v12 += v30; if ( v12 >= v25 ) goto LABEL_39; } } v26 = 0; LABEL_39: if ( (unsigned long long)(v24 + 1) >= v45 ) goto LABEL_50; if ( !v49 ) { LABEL_59: *v24 = 96; v32 = (long long)(v24 + 1); v19 = v47; v38 = v48; goto LABEL_51; } v33 = v26 == 0; v34 = v26 - 1; if ( v33 ) v34 = 2LL; v35 = *((_QWORD *)&v42 + v34); if ( v35 ) { v36 = 1; while ( 1 ) { v33 = (_DWORD)v34 == 0; v34 = (unsigned int)(v34 - 1); if ( v33 ) v34 = 2LL; v37 = *((_QWORD *)&v42 + v34); if ( !v37 ) break; ++v36; v35 = *((_QWORD *)&v42 + v34); if ( v36 == 3 ) goto LABEL_58; } v37 = v35; LABEL_58: v41 = v36; memset(v37, 46LL, v36); v24 = (_BYTE *)(v41 + v37); goto LABEL_59; } } LABEL_50: v38 = v48; *v48 = 0; v32 = (long long)v38; v19 = v47; LABEL_51: v18 = v32 - (_QWORD)v38; LABEL_52: v20 = 0LL; goto LABEL_53; } v19 = v47; if ( v47 < 0 ) { v22 = (long long)v48; LODWORD(v20) = v49; } else { LODWORD(v20) = v49; v21 = v18 + v49; if ( v46 <= v21 ) v22 = (long long)v48; else v22 = strfill(v48, v46 - v21, 32LL); } v31 = strnmov(v22, v12, v18); v32 = v31; if ( !(_DWORD)v20 ) goto LABEL_52; v20 = (unsigned int)v20; v32 = strfill(v31, (unsigned int)v20, 46LL); LABEL_53: if ( v19 < 0 ) { v39 = v20 + v18; if ( v46 > v39 ) return strfill(v32, v46 - v39, 32LL); } return v32; }
process_str_arg: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,R8 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x50],RDX MOV R14,RDX MOV qword ptr [RBP + -0x38],RSI SUB R14,RSI LEA RBX,[R14 + 0x1] MOV R13,RCX NEG R13 MOV qword ptr [RBP + -0x40],RCX CMOVS R13,RCX TEST R9,R9 LEA R12,[0x1993a1] CMOVNZ R12,R9 CMP byte ptr [RBP + 0x18],0x0 JZ 0x001923ee LEA RSI,[R15 + 0x1] MOV RDI,R12 CALL 0x00128680 CMP RAX,R15 MOV RDX,R15 CMOVC RDX,RAX CMP RBX,RDX CMOVBE RDX,R14 CMOVBE R13,R14 MOV dword ptr [RBP + -0x2c],0x0 CMP RAX,RDX MOV qword ptr [RBP + -0x48],R13 JBE 0x0019241f CMP RDX,0x2 JA 0x00192414 MOV dword ptr [RBP + -0x2c],EDX XOR EDX,EDX JMP 0x0019241f LAB_001923ee: MOV RDI,R12 MOV RSI,R15 CALL 0x00128680 MOV RDX,RAX CMP RBX,RAX CMOVBE RDX,R14 CMOVBE R13,R14 MOV qword ptr [RBP + -0x48],R13 MOV dword ptr [RBP + -0x2c],0x0 JMP 0x0019241f LAB_00192414: ADD RDX,-0x3 MOV dword ptr [RBP + -0x2c],0x3 LAB_0019241f: ADD RDX,R12 MOV RDI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RDI + 0xb8] LEA RBX,[RBP + -0x70] MOV RSI,R12 MOV RCX,R15 MOV R8,RBX CALL qword ptr [RAX + 0xc8] MOV R13,qword ptr [RBX] SUB R13,R12 MOV EAX,dword ptr [RBP + 0x10] TEST AL,0x8 JNZ 0x00192487 MOV RBX,qword ptr [RBP + -0x40] TEST RBX,RBX JS 0x0019255a MOV R14D,dword ptr [RBP + -0x2c] MOV EAX,R14D ADD RAX,R13 MOV RSI,qword ptr [RBP + -0x48] SUB RSI,RAX JBE 0x00192564 MOV RDI,qword ptr [RBP + -0x38] MOV EDX,0x20 CALL 0x00192ca8 MOV RDI,RAX JMP 0x00192568 LAB_00192487: MOV EAX,dword ptr [RBP + -0x2c] ADD R13,RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x70],XMM0 MOV qword ptr [RBP + -0x60],0x0 CMP R14,R13 JBE 0x001925e4 MOV RAX,qword ptr [RBP + -0x38] LEA R15,[RAX + 0x1] MOV byte ptr [RAX],0x60 TEST R13,R13 JLE 0x00192593 ADD R13,R12 XOR R14D,R14D LAB_001924bf: CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001924ea MOV EAX,R14D MOV qword ptr [RBP + RAX*0x8 + -0x70],R15 MOV EAX,R14D INC EAX MOV ECX,0xaaaaaaab IMUL RAX,RCX SHR RAX,0x21 LEA EAX,[RAX + RAX*0x2] NEG EAX ADD R14D,EAX INC R14D LAB_001924ea: MOV BL,byte ptr [R12] MOV RDI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R12 MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 MOV ECX,0x1 CMOVL EAX,ECX JGE 0x0019252b CMP BL,0x60 JNZ 0x0019252b LEA RDI,[R15 + 0x1] CMP RDI,qword ptr [RBP + -0x50] JNC 0x001925e4 MOV byte ptr [R15],0x60 JMP 0x0019252e LAB_0019252b: MOV RDI,R15 LAB_0019252e: MOV EBX,EAX LEA RAX,[RDI + RBX*0x1] CMP RAX,qword ptr [RBP + -0x50] JNC 0x001925e4 MOV RSI,R12 MOV RDX,RBX CALL 0x00192d08 MOV R15,RAX ADD R12,RBX CMP R12,R13 JC 0x001924bf JMP 0x00192596 LAB_0019255a: MOV RDI,qword ptr [RBP + -0x38] MOV R14D,dword ptr [RBP + -0x2c] JMP 0x00192568 LAB_00192564: MOV RDI,qword ptr [RBP + -0x38] LAB_00192568: MOV RSI,R12 MOV RDX,R13 CALL 0x00192d08 MOV R15,RAX TEST R14D,R14D JZ 0x001925f8 MOV R14D,R14D MOV RDI,R15 MOV RSI,R14 MOV EDX,0x2e CALL 0x00192ca8 MOV R15,RAX JMP 0x001925fb LAB_00192593: XOR R14D,R14D LAB_00192596: LEA RAX,[R15 + 0x1] CMP RAX,qword ptr [RBP + -0x50] JNC 0x001925e4 CMP dword ptr [RBP + -0x2c],0x0 JZ 0x00192646 SUB R14D,0x1 MOV EAX,0x2 CMOVC R14D,EAX MOV RDX,qword ptr [RBP + R14*0x8 + -0x70] TEST RDX,RDX JZ 0x001925e4 MOV ECX,0x1 LAB_001925c6: SUB R14D,0x1 CMOVC R14D,EAX MOV R15,qword ptr [RBP + R14*0x8 + -0x70] TEST R15,R15 JZ 0x0019262e INC ECX MOV RDX,R15 CMP ECX,0x3 JNZ 0x001925c6 JMP 0x00192631 LAB_001925e4: MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],0x0 MOV R15,RAX MOV RBX,qword ptr [RBP + -0x40] LAB_001925f2: MOV R13,R15 SUB R13,RAX LAB_001925f8: XOR R14D,R14D LAB_001925fb: TEST RBX,RBX JNS 0x0019261c ADD R13,R14 MOV RSI,qword ptr [RBP + -0x48] SUB RSI,R13 JBE 0x0019261c MOV RDI,R15 MOV EDX,0x20 CALL 0x00192ca8 MOV R15,RAX LAB_0019261c: MOV RAX,R15 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019262e: MOV R15,RDX LAB_00192631: MOV EBX,ECX MOV RDI,R15 MOV ESI,0x2e MOV RDX,RBX CALL 0x001281d0 ADD R15,RBX LAB_00192646: MOV byte ptr [R15],0x60 INC R15 MOV RBX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] JMP 0x001925f2
int1 * process_str_arg(long param_1,int1 *param_2,int1 *param_3,ulong param_4,ulong param_5, char *param_6,uint param_7,char param_8) { char cVar1; void *pvVar2; uint uVar3; uint uVar4; size_t sVar5; int1 *puVar6; void *__s; long lVar7; char *__string; long lVar8; ulong uVar9; char *pcVar10; int iVar11; ulong uVar12; long local_78 [4]; int1 *local_58; ulong local_50; ulong local_48; int1 *local_40; uint local_34; uVar12 = (long)param_3 - (long)param_2; local_50 = -param_4; if (0 < (long)param_4) { local_50 = param_4; } __string = "(null)"; if (param_6 != (char *)0x0) { __string = param_6; } local_78[3] = param_1; local_58 = param_3; local_48 = param_4; local_40 = param_2; if (param_8 == '\0') { uVar9 = strnlen(__string,param_5); if (uVar12 + 1 <= uVar9) { local_50 = uVar12; uVar9 = uVar12; } local_34 = 0; } else { sVar5 = strnlen(__string,param_5 + 1); uVar9 = param_5; if (sVar5 < param_5) { uVar9 = sVar5; } if (uVar12 + 1 <= uVar9) { local_50 = uVar12; uVar9 = uVar12; } local_34 = 0; if (uVar9 < sVar5) { if (uVar9 < 3) { local_34 = (uint)uVar9; uVar9 = 0; } else { uVar9 = uVar9 - 3; local_34 = 3; } } } (**(code **)(*(long *)(local_78[3] + 0xb8) + 200)) (local_78[3],__string,__string + uVar9,param_5,local_78); uVar4 = local_34; uVar9 = local_48; lVar8 = local_78[0] - (long)__string; if ((param_7 & 8) == 0) { puVar6 = local_40; if ((-1 < (long)local_48) && (lVar7 = local_50 - ((ulong)local_34 + lVar8), (ulong)local_34 + lVar8 <= local_50 && lVar7 != 0)) { puVar6 = (int1 *)strfill(local_40,lVar7,0x20); } uVar12 = (ulong)uVar4; puVar6 = (int1 *)strnmov(puVar6,__string,lVar8); if (uVar4 != 0) { puVar6 = (int1 *)strfill(puVar6,uVar12,0x2e); goto LAB_001925fb; } } else { uVar9 = lVar8 + (ulong)local_34; local_78[0] = 0; local_78[1] = 0; local_78[2] = 0; if (uVar9 < uVar12) { puVar6 = local_40 + 1; *local_40 = 0x60; if ((long)uVar9 < 1) { iVar11 = 0; } else { pcVar10 = __string + uVar9; uVar12 = 0; do { if (local_34 != 0) { local_78[uVar12] = (long)puVar6; uVar12 = (ulong)((int)uVar12 + (((int)uVar12 + 1U) / 3) * -3 + 1); } iVar11 = (int)uVar12; cVar1 = *__string; uVar4 = (**(code **)(*(long *)(local_78[3] + 0xb8) + 0xc0))(local_78[3],__string,pcVar10); if (((int)uVar4 < 2) && (uVar4 = 1, cVar1 == '`')) { if (local_58 <= puVar6 + 1) goto LAB_001925e4; *puVar6 = 0x60; puVar6 = puVar6 + 1; } uVar9 = (ulong)uVar4; if (local_58 <= puVar6 + uVar9) goto LAB_001925e4; puVar6 = (int1 *)strnmov(puVar6,__string,uVar9); __string = __string + uVar9; } while (__string < pcVar10); } if (local_58 <= puVar6 + 1) goto LAB_001925e4; if (local_34 != 0) { uVar4 = iVar11 - 1; if (iVar11 == 0) { uVar4 = 2; } uVar12 = (ulong)uVar4; if ((void *)local_78[uVar12] == (void *)0x0) goto LAB_001925e4; uVar4 = 1; __s = (void *)local_78[uVar12]; do { uVar3 = (int)uVar12 - 1; if ((int)uVar12 == 0) { uVar3 = 2; } uVar12 = (ulong)uVar3; pvVar2 = (void *)local_78[uVar12]; } while ((pvVar2 != (void *)0x0) && (uVar4 = uVar4 + 1, __s = pvVar2, uVar4 != 3)); memset(__s,0x2e,(ulong)uVar4); puVar6 = (int1 *)((long)__s + (ulong)uVar4); } *puVar6 = 0x60; puVar6 = puVar6 + 1; } else { LAB_001925e4: *local_40 = 0; puVar6 = local_40; } lVar8 = (long)puVar6 - (long)local_40; uVar9 = local_48; } uVar12 = 0; LAB_001925fb: if (((long)uVar9 < 0) && (lVar7 = local_50 - (lVar8 + uVar12), lVar8 + uVar12 <= local_50 && lVar7 != 0)) { puVar6 = (int1 *)strfill(puVar6,lVar7,0x20); } return puVar6; }
61,973
common_context_params_to_llama(common_params const&)
monkey531[P]llama/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O1
cpp
common_context_params_to_llama(common_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x1a0b0 movl 0x18(%r14), %eax movl %eax, 0xc(%rbx) movq 0x4(%r14), %rax movq %rax, (%rbx) movl 0xc(%r14), %eax movl %eax, 0x8(%rbx) movl 0x274(%r14), %eax movl %eax, 0x10(%rbx) movl 0x488(%r14), %ecx cmpl $-0x1, %ecx cmovel %eax, %ecx movl %ecx, 0x14(%rbx) movb 0xfe8(%r14), %al movb %al, 0x60(%rbx) movb 0x1038(%r14), %al movb %al, 0x61(%rbx) movups 0x2c(%r14), %xmm0 movups %xmm0, 0x24(%rbx) movsd 0x3c(%r14), %xmm0 movsd %xmm0, 0x34(%rbx) movl 0x44(%r14), %eax movl %eax, 0x3c(%rbx) movq 0x6b4(%r14), %rax movq %rax, 0x18(%rbx) movl 0x6bc(%r14), %eax movl %eax, 0x20(%rbx) movss 0x48(%r14), %xmm0 movss %xmm0, 0x40(%rbx) movups 0x6a0(%r14), %xmm0 movups %xmm0, 0x48(%rbx) movb 0xfee(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0xfe4(%r14), %al movb %al, 0x63(%rbx) movb 0xfe5(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1080(%r14) jne 0x737d3 movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0xff4(%r14), %rax movq %rax, 0x58(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z30common_context_params_to_llamaRK13common_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _llama_context_default_params mov eax, [r14+18h] mov [rbx+0Ch], eax mov rax, [r14+4] mov [rbx], rax mov eax, [r14+0Ch] mov [rbx+8], eax mov eax, [r14+274h] mov [rbx+10h], eax mov ecx, [r14+488h] cmp ecx, 0FFFFFFFFh cmovz ecx, eax mov [rbx+14h], ecx mov al, [r14+0FE8h] mov [rbx+60h], al mov al, [r14+1038h] mov [rbx+61h], al movups xmm0, xmmword ptr [r14+2Ch] movups xmmword ptr [rbx+24h], xmm0 movsd xmm0, qword ptr [r14+3Ch] movsd qword ptr [rbx+34h], xmm0 mov eax, [r14+44h] mov [rbx+3Ch], eax mov rax, [r14+6B4h] mov [rbx+18h], rax mov eax, [r14+6BCh] mov [rbx+20h], eax movss xmm0, dword ptr [r14+48h] movss dword ptr [rbx+40h], xmm0 movups xmm0, xmmword ptr [r14+6A0h] movups xmmword ptr [rbx+48h], xmm0 mov al, [r14+0FEEh] xor al, 1 mov [rbx+62h], al mov al, [r14+0FE4h] mov [rbx+63h], al mov al, [r14+0FE5h] mov [rbx+64h], al cmp byte ptr [r14+1080h], 1 jnz short loc_737D3 mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_737D3: mov rax, [r14+0FF4h] mov [rbx+58h], rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { int v2; // eax int v3; // ecx llama_context_default_params(a1); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *(_QWORD *)a1 = *(_QWORD *)(a2 + 4); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); v2 = *(_DWORD *)(a2 + 628); *((_DWORD *)a1 + 4) = v2; v3 = *(_DWORD *)(a2 + 1160); if ( v3 == -1 ) v3 = v2; *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072); *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152); *(_OWORD *)((char *)a1 + 36) = *(_OWORD *)(a2 + 44); *(_QWORD *)((char *)a1 + 52) = *(_QWORD *)(a2 + 60); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_QWORD *)a1 + 3) = *(_QWORD *)(a2 + 1716); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *(_OWORD *)((char *)a1 + 72) = *(_OWORD *)(a2 + 1696); *((_BYTE *)a1 + 98) = *(_BYTE *)(a2 + 4078) ^ 1; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068); *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069); if ( *(_BYTE *)(a2 + 4224) == 1 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } *((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4084); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x0011a0b0 MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [R14 + 0x4] MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R14 + 0xc] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [R14 + 0x274] MOV dword ptr [RBX + 0x10],EAX MOV ECX,dword ptr [R14 + 0x488] CMP ECX,-0x1 CMOVZ ECX,EAX MOV dword ptr [RBX + 0x14],ECX MOV AL,byte ptr [R14 + 0xfe8] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x1038] MOV byte ptr [RBX + 0x61],AL MOVUPS XMM0,xmmword ptr [R14 + 0x2c] MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVSD XMM0,qword ptr [R14 + 0x3c] MOVSD qword ptr [RBX + 0x34],XMM0 MOV EAX,dword ptr [R14 + 0x44] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [R14 + 0x6b4] MOV qword ptr [RBX + 0x18],RAX MOV EAX,dword ptr [R14 + 0x6bc] MOV dword ptr [RBX + 0x20],EAX MOVSS XMM0,dword ptr [R14 + 0x48] MOVSS dword ptr [RBX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x6a0] MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV AL,byte ptr [R14 + 0xfee] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0xfe4] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0xfe5] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1080],0x1 JNZ 0x001737d3 MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_001737d3: MOV RAX,qword ptr [R14 + 0xff4] MOV qword ptr [RBX + 0x58],RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; llama_context_default_params(); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int8 *)param_1 = *(int8 *)(in_RSI + 4); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); iVar1 = *(int *)(in_RSI + 0x274); *(int *)(param_1 + 0x10) = iVar1; iVar3 = *(int *)(in_RSI + 0x488); if (*(int *)(in_RSI + 0x488) == -1) { iVar3 = iVar1; } *(int *)(param_1 + 0x14) = iVar3; param_1[0x60] = *(common_params *)(in_RSI + 0xfe8); param_1[0x61] = *(common_params *)(in_RSI + 0x1038); uVar2 = *(int8 *)(in_RSI + 0x34); *(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c); *(int8 *)(param_1 + 0x2c) = uVar2; *(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); uVar2 = *(int8 *)(in_RSI + 0x6a8); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = uVar2; param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0xfee) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0xfe4); param_1[100] = *(common_params *)(in_RSI + 0xfe5); if (*(char *)(in_RSI + 0x1080) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0xff4); return param_1; }
61,974
common_context_params_to_llama(common_params const&)
monkey531[P]llama/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O2
cpp
common_context_params_to_llama(common_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x230a0 movl 0x18(%r14), %eax movl %eax, 0xc(%rbx) movq 0x4(%r14), %rax movq %rax, (%rbx) movl 0xc(%r14), %eax movl %eax, 0x8(%rbx) movl 0x274(%r14), %eax movl %eax, 0x10(%rbx) movl 0x488(%r14), %ecx cmpl $-0x1, %ecx cmovel %eax, %ecx movl %ecx, 0x14(%rbx) movb 0xfe8(%r14), %al movb %al, 0x60(%rbx) movb 0x1038(%r14), %al movb %al, 0x61(%rbx) movups 0x2c(%r14), %xmm0 movups %xmm0, 0x24(%rbx) movsd 0x3c(%r14), %xmm0 movsd %xmm0, 0x34(%rbx) movl 0x44(%r14), %eax movl %eax, 0x3c(%rbx) movq 0x6b4(%r14), %rax movq %rax, 0x18(%rbx) movl 0x6bc(%r14), %eax movl %eax, 0x20(%rbx) movss 0x48(%r14), %xmm0 movss %xmm0, 0x40(%rbx) movups 0x6a0(%r14), %xmm0 movups %xmm0, 0x48(%rbx) movb 0xfee(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0xfe4(%r14), %al movb %al, 0x63(%rbx) movb 0xfe5(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1080(%r14) jne 0x54f46 movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0xff4(%r14), %rax movq %rax, 0x58(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z30common_context_params_to_llamaRK13common_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _llama_context_default_params mov eax, [r14+18h] mov [rbx+0Ch], eax mov rax, [r14+4] mov [rbx], rax mov eax, [r14+0Ch] mov [rbx+8], eax mov eax, [r14+274h] mov [rbx+10h], eax mov ecx, [r14+488h] cmp ecx, 0FFFFFFFFh cmovz ecx, eax mov [rbx+14h], ecx mov al, [r14+0FE8h] mov [rbx+60h], al mov al, [r14+1038h] mov [rbx+61h], al movups xmm0, xmmword ptr [r14+2Ch] movups xmmword ptr [rbx+24h], xmm0 movsd xmm0, qword ptr [r14+3Ch] movsd qword ptr [rbx+34h], xmm0 mov eax, [r14+44h] mov [rbx+3Ch], eax mov rax, [r14+6B4h] mov [rbx+18h], rax mov eax, [r14+6BCh] mov [rbx+20h], eax movss xmm0, dword ptr [r14+48h] movss dword ptr [rbx+40h], xmm0 movups xmm0, xmmword ptr [r14+6A0h] movups xmmword ptr [rbx+48h], xmm0 mov al, [r14+0FEEh] xor al, 1 mov [rbx+62h], al mov al, [r14+0FE4h] mov [rbx+63h], al mov al, [r14+0FE5h] mov [rbx+64h], al cmp byte ptr [r14+1080h], 1 jnz short loc_54F46 mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_54F46: mov rax, [r14+0FF4h] mov [rbx+58h], rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { int v2; // eax int v3; // ecx llama_context_default_params(a1); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *(_QWORD *)a1 = *(_QWORD *)(a2 + 4); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); v2 = *(_DWORD *)(a2 + 628); *((_DWORD *)a1 + 4) = v2; v3 = *(_DWORD *)(a2 + 1160); if ( v3 == -1 ) v3 = v2; *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072); *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152); *(_OWORD *)((char *)a1 + 36) = *(_OWORD *)(a2 + 44); *(_QWORD *)((char *)a1 + 52) = *(_QWORD *)(a2 + 60); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_QWORD *)a1 + 3) = *(_QWORD *)(a2 + 1716); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *(_OWORD *)((char *)a1 + 72) = *(_OWORD *)(a2 + 1696); *((_BYTE *)a1 + 98) = *(_BYTE *)(a2 + 4078) ^ 1; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068); *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069); if ( *(_BYTE *)(a2 + 4224) == 1 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } *((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4084); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x001230a0 MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [R14 + 0x4] MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R14 + 0xc] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [R14 + 0x274] MOV dword ptr [RBX + 0x10],EAX MOV ECX,dword ptr [R14 + 0x488] CMP ECX,-0x1 CMOVZ ECX,EAX MOV dword ptr [RBX + 0x14],ECX MOV AL,byte ptr [R14 + 0xfe8] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x1038] MOV byte ptr [RBX + 0x61],AL MOVUPS XMM0,xmmword ptr [R14 + 0x2c] MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVSD XMM0,qword ptr [R14 + 0x3c] MOVSD qword ptr [RBX + 0x34],XMM0 MOV EAX,dword ptr [R14 + 0x44] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [R14 + 0x6b4] MOV qword ptr [RBX + 0x18],RAX MOV EAX,dword ptr [R14 + 0x6bc] MOV dword ptr [RBX + 0x20],EAX MOVSS XMM0,dword ptr [R14 + 0x48] MOVSS dword ptr [RBX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x6a0] MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV AL,byte ptr [R14 + 0xfee] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0xfe4] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0xfe5] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1080],0x1 JNZ 0x00154f46 MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_00154f46: MOV RAX,qword ptr [R14 + 0xff4] MOV qword ptr [RBX + 0x58],RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; llama_context_default_params(); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int8 *)param_1 = *(int8 *)(in_RSI + 4); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); iVar1 = *(int *)(in_RSI + 0x274); *(int *)(param_1 + 0x10) = iVar1; iVar3 = *(int *)(in_RSI + 0x488); if (*(int *)(in_RSI + 0x488) == -1) { iVar3 = iVar1; } *(int *)(param_1 + 0x14) = iVar3; param_1[0x60] = *(common_params *)(in_RSI + 0xfe8); param_1[0x61] = *(common_params *)(in_RSI + 0x1038); uVar2 = *(int8 *)(in_RSI + 0x34); *(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c); *(int8 *)(param_1 + 0x2c) = uVar2; *(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); uVar2 = *(int8 *)(in_RSI + 0x6a8); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = uVar2; param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0xfee) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0xfe4); param_1[100] = *(common_params *)(in_RSI + 0xfe5); if (*(char *)(in_RSI + 0x1080) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0xff4); return param_1; }
61,975
multadd
eloqsql/strings/dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O3
c
multadd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdi, %rbx movslq 0x14(%rdi), %r12 movq (%rdi), %rax movslq %edx, %r13 movslq %esi, %rcx cmpl $0x2, %r12d movl $0x1, %edx cmovgel %r12d, %edx xorl %esi, %esi movl (%rax,%rsi,4), %edi imulq %rcx, %rdi addq %r13, %rdi movq %rdi, %r13 shrq $0x20, %r13 movl %edi, (%rax,%rsi,4) incq %rsi cmpl %esi, %edx jne 0x607fa shrq $0x20, %rdi je 0x60867 cmpl 0xc(%rbx), %r12d jl 0x60858 movl 0x8(%rbx), %edi incl %edi movq %r14, %rsi callq 0x601a0 movq %rax, %r15 leaq 0x10(%rax), %rdi leaq 0x10(%rbx), %rsi movslq 0x14(%rbx), %rax leaq 0x8(,%rax,4), %rdx callq 0x24210 movq %rbx, %rdi movq %r14, %rsi callq 0x60599 movq %r15, %rbx movq (%rbx), %rax leal 0x1(%r12), %ecx movl %r13d, (%rax,%r12,4) movl %ecx, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
multadd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdi movsxd r12, dword ptr [rdi+14h] mov rax, [rdi] movsxd r13, edx movsxd rcx, esi cmp r12d, 2 mov edx, 1 cmovge edx, r12d xor esi, esi loc_607FA: mov edi, [rax+rsi*4] imul rdi, rcx add rdi, r13 mov r13, rdi shr r13, 20h mov [rax+rsi*4], edi inc rsi cmp edx, esi jnz short loc_607FA shr rdi, 20h jz short loc_60867 cmp r12d, [rbx+0Ch] jl short loc_60858 mov edi, [rbx+8] inc edi mov rsi, r14 call Balloc mov r15, rax lea rdi, [rax+10h] lea rsi, [rbx+10h] movsxd rax, dword ptr [rbx+14h] lea rdx, ds:8[rax*4] call _memcpy mov rdi, rbx mov rsi, r14 call Bfree mov rbx, r15 loc_60858: mov rax, [rbx] lea ecx, [r12+1] mov [rax+r12*4], r13d mov [rbx+14h], ecx loc_60867: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned long long v5; // rbx long long v6; // r12 long long v7; // rax unsigned long long v8; // r13 long long v9; // rcx int v10; // edx long long v11; // rsi unsigned long long v12; // rdi long long v13; // r15 v5 = a1; v6 = *(int *)(a1 + 20); v7 = *(_QWORD *)a1; v8 = a3; v9 = a2; v10 = 1; if ( (int)v6 >= 2 ) v10 = *(_DWORD *)(a1 + 20); v11 = 0LL; do { v12 = v8 + v9 * *(unsigned int *)(v7 + 4 * v11); v8 = HIDWORD(v12); *(_DWORD *)(v7 + 4 * v11++) = v12; } while ( v10 != (_DWORD)v11 ); if ( HIDWORD(v12) ) { if ( (int)v6 >= *(_DWORD *)(v5 + 12) ) { v13 = Balloc(*(_DWORD *)(v5 + 8) + 1, (long long)a4); memcpy(v13 + 16, v5 + 16, 4LL * *(int *)(v5 + 20) + 8); Bfree(v5, a4); v5 = v13; } *(_DWORD *)(*(_QWORD *)v5 + 4 * v6) = HIDWORD(v12); *(_DWORD *)(v5 + 20) = v6 + 1; } return v5; }
multadd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDI MOVSXD R12,dword ptr [RDI + 0x14] MOV RAX,qword ptr [RDI] MOVSXD R13,EDX MOVSXD RCX,ESI CMP R12D,0x2 MOV EDX,0x1 CMOVGE EDX,R12D XOR ESI,ESI LAB_001607fa: MOV EDI,dword ptr [RAX + RSI*0x4] IMUL RDI,RCX ADD RDI,R13 MOV R13,RDI SHR R13,0x20 MOV dword ptr [RAX + RSI*0x4],EDI INC RSI CMP EDX,ESI JNZ 0x001607fa SHR RDI,0x20 JZ 0x00160867 CMP R12D,dword ptr [RBX + 0xc] JL 0x00160858 MOV EDI,dword ptr [RBX + 0x8] INC EDI MOV RSI,R14 CALL 0x001601a0 MOV R15,RAX LEA RDI,[RAX + 0x10] LEA RSI,[RBX + 0x10] MOVSXD RAX,dword ptr [RBX + 0x14] LEA RDX,[0x8 + RAX*0x4] CALL 0x00124210 MOV RDI,RBX MOV RSI,R14 CALL 0x00160599 MOV RBX,R15 LAB_00160858: MOV RAX,qword ptr [RBX] LEA ECX,[R12 + 0x1] MOV dword ptr [RAX + R12*0x4],R13D MOV dword ptr [RBX + 0x14],ECX LAB_00160867: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; long lVar2; long *plVar3; int iVar4; long lVar5; ulong uVar6; ulong uVar7; iVar1 = *(int *)((long)param_1 + 0x14); lVar2 = *param_1; uVar7 = (ulong)param_3; iVar4 = 1; if (1 < iVar1) { iVar4 = iVar1; } lVar5 = 0; do { uVar6 = (ulong)*(uint *)(lVar2 + lVar5 * 4) * (long)param_2 + uVar7; uVar7 = uVar6 >> 0x20; *(int *)(lVar2 + lVar5 * 4) = (int)uVar6; lVar5 = lVar5 + 1; } while (iVar4 != (int)lVar5); plVar3 = param_1; if (uVar6 >> 0x20 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { plVar3 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(plVar3 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*plVar3 + (long)iVar1 * 4) = (int)(uVar6 >> 0x20); *(int *)((long)plVar3 + 0x14) = iVar1 + 1; } return plVar3; }
61,976
my_strtoull
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err) { unsigned long long val = 0; const char *p = str; const char *end_str = p + len; for (; p < end_str; p++) { if (*p < '0' || *p > '9') break; if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0')) { *err = ERANGE; break; } val = val * 10 + *p -'0'; } if (p == str) /* Did not parse anything.*/ *err = ERANGE; *end = p; return val; }
O0
c
my_strtoull: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x9425e movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x941f6 movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x941f8 jmp 0x9425e movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999 cmpq %rax, -0x28(%rbp) ja 0x94229 imulq $0xa, -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movsbl (%rcx), %ecx subl $0x30, %ecx movslq %ecx, %rdx movq $-0x1, %rcx subq %rdx, %rcx cmpq %rcx, %rax jbe 0x94235 movq -0x20(%rbp), %rax movl $0x22, (%rax) jmp 0x9425e imulq $0xa, -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movsbq (%rcx), %rcx addq %rcx, %rax subq $0x30, %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x941d0 movq -0x30(%rbp), %rax cmpq -0x8(%rbp), %rax jne 0x94272 movq -0x20(%rbp), %rax movl $0x22, (%rax) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_strtoull: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], 0 mov rax, [rbp+var_8] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rax, [rbp+var_10] mov [rbp+var_38], rax loc_941D0: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb loc_9425E mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_941F6 mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_941F8 loc_941F6: jmp short loc_9425E loc_941F8: mov rax, 1999999999999999h cmp [rbp+var_28], rax ja short loc_94229 imul rax, [rbp+var_28], 0Ah mov rcx, [rbp+var_30] movsx ecx, byte ptr [rcx] sub ecx, 30h ; '0' movsxd rdx, ecx mov rcx, 0FFFFFFFFFFFFFFFFh sub rcx, rdx cmp rax, rcx jbe short loc_94235 loc_94229: mov rax, [rbp+var_20] mov dword ptr [rax], 22h ; '"' jmp short loc_9425E loc_94235: imul rax, [rbp+var_28], 0Ah mov rcx, [rbp+var_30] movsx rcx, byte ptr [rcx] add rax, rcx sub rax, 30h ; '0' mov [rbp+var_28], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp loc_941D0 loc_9425E: mov rax, [rbp+var_30] cmp rax, [rbp+var_8] jnz short loc_94272 mov rax, [rbp+var_20] mov dword ptr [rax], 22h ; '"' loc_94272: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_28] pop rbp retn
unsigned long long my_strtoull(char *a1, long long a2, char **a3, _DWORD *a4) { char *i; // [rsp+8h] [rbp-30h] unsigned long long v6; // [rsp+10h] [rbp-28h] v6 = 0LL; for ( i = a1; i < &a1[a2] && *i >= 48 && *i <= 57; ++i ) { if ( v6 > 0x1999999999999999LL || 10 * v6 > -1LL - (*i - 48) ) { *a4 = 34; break; } v6 = *i + 10 * v6 - 48; } if ( i == a1 ) *a4 = 34; *a3 = i; return v6; }
my_strtoull: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LAB_001941d0: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0019425e MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x001941f6 MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x001941f8 LAB_001941f6: JMP 0x0019425e LAB_001941f8: MOV RAX,0x1999999999999999 CMP qword ptr [RBP + -0x28],RAX JA 0x00194229 IMUL RAX,qword ptr [RBP + -0x28],0xa MOV RCX,qword ptr [RBP + -0x30] MOVSX ECX,byte ptr [RCX] SUB ECX,0x30 MOVSXD RDX,ECX MOV RCX,-0x1 SUB RCX,RDX CMP RAX,RCX JBE 0x00194235 LAB_00194229: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x22 JMP 0x0019425e LAB_00194235: IMUL RAX,qword ptr [RBP + -0x28],0xa MOV RCX,qword ptr [RBP + -0x30] MOVSX RCX,byte ptr [RCX] ADD RAX,RCX SUB RAX,0x30 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x001941d0 LAB_0019425e: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x8] JNZ 0x00194272 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x22 LAB_00194272: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] POP RBP RET
ulong my_strtoull(char *param_1,long param_2,int8 *param_3,int4 *param_4) { ulong uVar1; char *local_38; ulong local_30; local_30 = 0; local_38 = param_1; while( true ) { if (((param_1 + param_2 <= local_38) || (*local_38 < '0')) || ('9' < *local_38)) goto LAB_0019425e; if ((0x1999999999999999 < local_30) || (uVar1 = -(long)(*local_38 + -0x30) - 1, uVar1 <= local_30 * 10 && local_30 * 10 - uVar1 != 0 )) break; local_30 = (local_30 * 10 + (long)*local_38) - 0x30; local_38 = local_38 + 1; } *param_4 = 0x22; LAB_0019425e: if (local_38 == param_1) { *param_4 = 0x22; } *param_3 = local_38; return local_30; }
61,977
my_strtoull
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err) { unsigned long long val = 0; const char *p = str; const char *end_str = p + len; for (; p < end_str; p++) { if (*p < '0' || *p > '9') break; if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0')) { *err = ERANGE; break; } val = val * 10 + *p -'0'; } if (p == str) /* Did not parse anything.*/ *err = ERANGE; *end = p; return val; }
O3
c
my_strtoull: pushq %rbp movq %rsp, %rbp pushq %rbx testq %rsi, %rsi jle 0x81a95 addq %rdi, %rsi xorl %r8d, %r8d movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999 xorl %eax, %eax movsbq (%rdi,%r8), %r10 leal -0x3a(%r10), %r11d cmpb $-0xa, %r11b jb 0x81a9f cmpq %r9, %rax ja 0x81a99 leaq (%rax,%rax), %r11 leaq (%r11,%r11,4), %r11 movl $0x2f, %ebx subq %r10, %rbx cmpq %rbx, %r11 ja 0x81a99 leaq (%r11,%r10), %rax addq $-0x30, %rax leaq (%rdi,%r8), %r10 incq %r10 incq %r8 cmpq %rsi, %r10 jb 0x81a50 addq %r8, %rdi jmp 0x81aad xorl %eax, %eax jmp 0x81aa7 movl $0x22, (%rcx) addq %r8, %rdi testq %r8, %r8 jne 0x81aad movl $0x22, (%rcx) movq %rdi, (%rdx) popq %rbx popq %rbp retq
my_strtoull: push rbp mov rbp, rsp push rbx test rsi, rsi jle short loc_81A95 add rsi, rdi xor r8d, r8d mov r9, 1999999999999999h xor eax, eax loc_81A50: movsx r10, byte ptr [rdi+r8] lea r11d, [r10-3Ah] cmp r11b, 0F6h jb short loc_81A9F cmp rax, r9 ja short loc_81A99 lea r11, [rax+rax] lea r11, [r11+r11*4] mov ebx, 2Fh ; '/' sub rbx, r10 cmp r11, rbx ja short loc_81A99 lea rax, [r11+r10] add rax, 0FFFFFFFFFFFFFFD0h lea r10, [rdi+r8] inc r10 inc r8 cmp r10, rsi jb short loc_81A50 add rdi, r8 jmp short loc_81AAD loc_81A95: xor eax, eax jmp short loc_81AA7 loc_81A99: mov dword ptr [rcx], 22h ; '"' loc_81A9F: add rdi, r8 test r8, r8 jnz short loc_81AAD loc_81AA7: mov dword ptr [rcx], 22h ; '"' loc_81AAD: mov [rdx], rdi pop rbx pop rbp retn
unsigned long long my_strtoull(long long a1, long long a2, _QWORD *a3, _DWORD *a4) { unsigned long long v4; // rsi long long v5; // r8 unsigned long long result; // rax long long v7; // r10 unsigned long long v8; // r10 if ( a2 <= 0 ) { result = 0LL; LABEL_11: *a4 = 34; goto LABEL_12; } v4 = a1 + a2; v5 = 0LL; result = 0LL; while ( 1 ) { v7 = *(char *)(a1 + v5); if ( (unsigned __int8)(v7 - 58) < 0xF6u ) break; if ( result > 0x1999999999999999LL || 10 * result > 47 - v7 ) { *a4 = 34; break; } result = 10 * result + v7 - 48; v8 = a1 + v5++ + 1; if ( v8 >= v4 ) { a1 += v5; goto LABEL_12; } } a1 += v5; if ( !v5 ) goto LABEL_11; LABEL_12: *a3 = a1; return result; }
my_strtoull: PUSH RBP MOV RBP,RSP PUSH RBX TEST RSI,RSI JLE 0x00181a95 ADD RSI,RDI XOR R8D,R8D MOV R9,0x1999999999999999 XOR EAX,EAX LAB_00181a50: MOVSX R10,byte ptr [RDI + R8*0x1] LEA R11D,[R10 + -0x3a] CMP R11B,0xf6 JC 0x00181a9f CMP RAX,R9 JA 0x00181a99 LEA R11,[RAX + RAX*0x1] LEA R11,[R11 + R11*0x4] MOV EBX,0x2f SUB RBX,R10 CMP R11,RBX JA 0x00181a99 LEA RAX,[R11 + R10*0x1] ADD RAX,-0x30 LEA R10,[RDI + R8*0x1] INC R10 INC R8 CMP R10,RSI JC 0x00181a50 ADD RDI,R8 JMP 0x00181aad LAB_00181a95: XOR EAX,EAX JMP 0x00181aa7 LAB_00181a99: MOV dword ptr [RCX],0x22 LAB_00181a9f: ADD RDI,R8 TEST R8,R8 JNZ 0x00181aad LAB_00181aa7: MOV dword ptr [RCX],0x22 LAB_00181aad: MOV qword ptr [RDX],RDI POP RBX POP RBP RET
ulong my_strtoull(long param_1,long param_2,long *param_3,int4 *param_4) { long lVar1; char cVar2; ulong uVar3; long lVar4; if (param_2 < 1) { uVar3 = 0; LAB_00181aa7: *param_4 = 0x22; } else { lVar4 = 0; uVar3 = 0; do { cVar2 = *(char *)(param_1 + lVar4); if ((byte)(cVar2 - 0x3aU) < 0xf6) { LAB_00181a9f: param_1 = param_1 + lVar4; if (lVar4 == 0) goto LAB_00181aa7; goto LAB_00181aad; } if ((0x1999999999999999 < uVar3) || (0x2fU - (long)cVar2 < uVar3 * 10)) { *param_4 = 0x22; goto LAB_00181a9f; } uVar3 = (uVar3 * 10 + (long)cVar2) - 0x30; lVar1 = param_1 + lVar4; lVar4 = lVar4 + 1; } while (lVar1 + 1U < (ulong)(param_2 + param_1)); param_1 = param_1 + lVar4; } LAB_00181aad: *param_3 = param_1; return uVar3; }
61,978
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_sjis: cmpq %rdx, %rsi jae 0xb6247 pushq %rbp movq %rsp, %rbp xorl %eax, %eax movl $0x1, %ecx movb (%rsi), %dil leal 0x5f(%rdi), %r8d shrb $0x7, %dil movzbl %dil, %edi incq %rdi cmpb $0x3f, %r8b cmovbq %rcx, %rdi addq %rdi, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0xb6220 popq %rbp retq xorl %eax, %eax retq
my_numcells_sjis: cmp rsi, rdx jnb short loc_B6247 push rbp mov rbp, rsp xor eax, eax mov ecx, 1 loc_B6220: mov dil, [rsi] lea r8d, [rdi+5Fh] shr dil, 7 movzx edi, dil inc rdi cmp r8b, 3Fh ; '?' cmovb rdi, rcx add rax, rdi add rsi, rdi cmp rsi, rdx jb short loc_B6220 pop rbp retn loc_B6247: xor eax, eax retn
long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3) { long long result; // rax long long v4; // rdi if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = (*a2 >> 7) + 1LL; if ( (unsigned __int8)(*a2 + 95) < 0x3Fu ) v4 = 1LL; result += v4; a2 += v4; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_sjis: CMP RSI,RDX JNC 0x001b6247 PUSH RBP MOV RBP,RSP XOR EAX,EAX MOV ECX,0x1 LAB_001b6220: MOV DIL,byte ptr [RSI] LEA R8D,[RDI + 0x5f] SHR DIL,0x7 MOVZX EDI,DIL INC RDI CMP R8B,0x3f CMOVC RDI,RCX ADD RAX,RDI ADD RSI,RDI CMP RSI,RDX JC 0x001b6220 POP RBP RET LAB_001b6247: XOR EAX,EAX RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { long lVar1; long lVar2; if (param_2 < param_3) { lVar1 = 0; do { lVar2 = (ulong)(*param_2 >> 7) + 1; if ((byte)(*param_2 + 0x5f) < 0x3f) { lVar2 = 1; } lVar1 = lVar1 + lVar2; param_2 = param_2 + lVar2; } while (param_2 < param_3); return lVar1; } return 0; }
61,979
aria_read_index
eloqsql/storage/maria/ma_backup.c
int aria_read_index(File kfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block, uchar *buffer) { MARIA_SHARE share; int retry= 0; DBUG_ENTER("aria_read_index"); share.keypage_header= cap->keypage_header; share.block_size= cap->block_size; do { int error; size_t length; if ((length= my_pread(kfile, buffer, cap->block_size, block * cap->block_size, MYF(0))) != cap->block_size) { if (length == 0) DBUG_RETURN(HA_ERR_END_OF_FILE); if (length == (size_t) -1) DBUG_RETURN(my_errno ? my_errno : -1); /* Assume we got a half read; Do a re-read */ } /* If not transactional or key file header, there are no checksums */ if (!cap->online_backup_safe || block < cap->header_size/ cap->block_size) DBUG_RETURN(length == cap->block_size ? 0 : HA_ERR_CRASHED); if (length == cap->block_size) { length= _ma_get_page_used(&share, buffer); if (length > cap->block_size - CRC_SIZE) DBUG_RETURN(HA_ERR_CRASHED); error= maria_page_crc_check(buffer, block, &share, MARIA_NO_CRC_NORMAL_PAGE, (int) length); if (error != HA_ERR_WRONG_CRC) DBUG_RETURN(error); } my_sleep(100000); /* Sleep 0.1 seconds */ } while (retry < MAX_RETRY); DBUG_RETURN(HA_ERR_WRONG_CRC); }
O3
c
aria_read_index: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc48, %rsp # imm = 0xC48 movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %r15 movl %edi, %r12d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x14(%rsi), %r13d movl %r13d, -0x524(%rbp) movl 0x10(%rsi), %eax movl %eax, -0x4ac(%rbp) movl %eax, %edx movq %rdx, %rcx imulq %rbx, %rcx movl %r12d, %edi movq %r14, %rsi xorl %r8d, %r8d callq 0xa32d8 movq %rax, %rcx movl 0x10(%r15), %esi cmpq %rsi, %rax je 0x74115 testq %rcx, %rcx je 0x74197 cmpq $-0x1, %rcx je 0x74184 cmpb $0x0, 0x1f(%r15) je 0x7413e movq (%r15), %rax xorl %edx, %edx divq %rsi cmpq %rbx, %rax ja 0x7413e cmpq %rsi, %rcx je 0x7414d movl $0x186a0, %edi # imm = 0x186A0 callq 0xa3a28 movl 0x10(%r15), %eax jmp 0x740e3 xorl %edx, %edx cmpq %rsi, %rcx movl $0x7e, %eax cmovel %edx, %eax jmp 0x741a3 movzwl -0x2(%r14,%r13), %eax rolw $0x8, %ax movzwl %ax, %r8d addl $-0x4, %esi movl $0x7e, %eax cmpl %esi, %r8d ja 0x741a3 leaq -0xc68(%rbp), %rdx movq %r14, %rdi movq %rbx, %rsi movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x72978 movsbl %al, %eax jmp 0x741a3 callq 0xa48d6 cmpl $0x0, (%rax) je 0x7419e callq 0xa48d6 movl (%rax), %eax jmp 0x741a3 movl $0x89, %eax jmp 0x741a3 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x741c4 addq $0xc48, %rsp # imm = 0xC48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29240
aria_read_index: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C48h mov r14, rcx mov rbx, rdx mov r15, rsi mov r12d, edi mov rax, fs:28h mov [rbp+var_30], rax mov r13d, [rsi+14h] mov [rbp+var_524], r13d mov eax, [rsi+10h] mov [rbp+var_4AC], eax loc_740E3: mov edx, eax mov rcx, rdx imul rcx, rbx mov edi, r12d mov rsi, r14 xor r8d, r8d call my_pread mov rcx, rax mov esi, [r15+10h] cmp rax, rsi jz short loc_74115 test rcx, rcx jz loc_74197 cmp rcx, 0FFFFFFFFFFFFFFFFh jz short loc_74184 loc_74115: cmp byte ptr [r15+1Fh], 0 jz short loc_7413E mov rax, [r15] xor edx, edx div rsi cmp rax, rbx ja short loc_7413E cmp rcx, rsi jz short loc_7414D mov edi, offset stru_186A0 call my_sleep mov eax, [r15+10h] jmp short loc_740E3 loc_7413E: xor edx, edx cmp rcx, rsi mov eax, 7Eh ; '~' cmovz eax, edx jmp short loc_741A3 loc_7414D: movzx eax, word ptr [r14+r13-2] rol ax, 8 movzx r8d, ax add esi, 0FFFFFFFCh mov eax, 7Eh ; '~' cmp r8d, esi ja short loc_741A3 lea rdx, [rbp+var_C68] mov rdi, r14 mov rsi, rbx mov ecx, 0FFFFFFFFh call maria_page_crc_check movsx eax, al jmp short loc_741A3 loc_74184: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_7419E call _my_thread_var mov eax, [rax] jmp short loc_741A3 loc_74197: mov eax, 89h jmp short loc_741A3 loc_7419E: mov eax, 0FFFFFFFFh loc_741A3: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_741C4 add rsp, 0C48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_741C4: call ___stack_chk_fail
long long aria_read_index(unsigned int a1, long long a2, unsigned long long a3, long long a4) { long long v7; // r13 unsigned int v8; // eax long long v9; // rax long long v10; // rcx unsigned long long v11; // rsi long long result; // rax unsigned int v13; // r8d _BYTE v14[1860]; // [rsp+8h] [rbp-C68h] BYREF int v15; // [rsp+74Ch] [rbp-524h] unsigned int v16; // [rsp+7C4h] [rbp-4ACh] unsigned long long v17; // [rsp+C40h] [rbp-30h] v17 = __readfsqword(0x28u); v7 = *(unsigned int *)(a2 + 20); v15 = *(_DWORD *)(a2 + 20); v8 = *(_DWORD *)(a2 + 16); v16 = v8; while ( 1 ) { v9 = my_pread(a1, a4, v8, a3 * v8, 0LL); v10 = v9; v11 = *(unsigned int *)(a2 + 16); if ( v9 != v11 ) { if ( !v9 ) return 137LL; if ( v9 == -1 ) { if ( *(_DWORD *)my_thread_var(a1) ) return *(unsigned int *)my_thread_var(a1); else return 0xFFFFFFFFLL; } } if ( !*(_BYTE *)(a2 + 31) || *(_QWORD *)a2 / v11 > a3 ) break; if ( v9 == v11 ) { v13 = (unsigned __int16)__ROL2__(*(_WORD *)(a4 + v7 - 2), 8); result = 126LL; if ( v13 <= (int)v11 - 4 ) return (unsigned int)maria_page_crc_check(a4, a3, (long long)v14, -1, v13); return result; } my_sleep(&stru_186A0, v11, *(_QWORD *)a2 % v11); v8 = *(_DWORD *)(a2 + 16); } result = 126LL; if ( v10 == v11 ) return 0LL; return result; }
aria_read_index: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc48 MOV R14,RCX MOV RBX,RDX MOV R15,RSI MOV R12D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13D,dword ptr [RSI + 0x14] MOV dword ptr [RBP + -0x524],R13D MOV EAX,dword ptr [RSI + 0x10] MOV dword ptr [RBP + -0x4ac],EAX LAB_001740e3: MOV EDX,EAX MOV RCX,RDX IMUL RCX,RBX MOV EDI,R12D MOV RSI,R14 XOR R8D,R8D CALL 0x001a32d8 MOV RCX,RAX MOV ESI,dword ptr [R15 + 0x10] CMP RAX,RSI JZ 0x00174115 TEST RCX,RCX JZ 0x00174197 CMP RCX,-0x1 JZ 0x00174184 LAB_00174115: CMP byte ptr [R15 + 0x1f],0x0 JZ 0x0017413e MOV RAX,qword ptr [R15] XOR EDX,EDX DIV RSI CMP RAX,RBX JA 0x0017413e CMP RCX,RSI JZ 0x0017414d MOV EDI,0x186a0 CALL 0x001a3a28 MOV EAX,dword ptr [R15 + 0x10] JMP 0x001740e3 LAB_0017413e: XOR EDX,EDX CMP RCX,RSI MOV EAX,0x7e CMOVZ EAX,EDX JMP 0x001741a3 LAB_0017414d: MOVZX EAX,word ptr [R14 + R13*0x1 + -0x2] ROL AX,0x8 MOVZX R8D,AX ADD ESI,-0x4 MOV EAX,0x7e CMP R8D,ESI JA 0x001741a3 LEA RDX,[RBP + -0xc68] MOV RDI,R14 MOV RSI,RBX MOV ECX,0xffffffff CALL 0x00172978 MOVSX EAX,AL JMP 0x001741a3 LAB_00174184: CALL 0x001a48d6 CMP dword ptr [RAX],0x0 JZ 0x0017419e CALL 0x001a48d6 MOV EAX,dword ptr [RAX] JMP 0x001741a3 LAB_00174197: MOV EAX,0x89 JMP 0x001741a3 LAB_0017419e: MOV EAX,0xffffffff LAB_001741a3: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001741c4 ADD RSP,0xc48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001741c4: CALL 0x00129240
int aria_read_index(int4 param_1,ulong *param_2,ulong param_3,long param_4) { ushort uVar1; char cVar2; uint uVar3; int iVar4; ulong uVar5; int *piVar6; ulong uVar7; ulong uVar8; long in_FS_OFFSET; int1 local_c70 [1860]; uint local_52c; uint local_4b4; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_52c = *(uint *)((long)param_2 + 0x14); uVar8 = (ulong)local_52c; uVar3 = (uint)param_2[2]; local_4b4 = uVar3; do { uVar5 = my_pread(param_1,param_4,(ulong)uVar3,uVar3 * param_3,0); uVar7 = (ulong)(uint)param_2[2]; if (uVar5 != uVar7) { if (uVar5 == 0) { iVar4 = 0x89; goto LAB_001741a3; } if (uVar5 == 0xffffffffffffffff) { piVar6 = (int *)_my_thread_var(); if (*piVar6 == 0) { iVar4 = -1; } else { piVar6 = (int *)_my_thread_var(); iVar4 = *piVar6; } goto LAB_001741a3; } } if ((*(char *)((long)param_2 + 0x1f) == '\0') || (param_3 < *param_2 / uVar7)) { iVar4 = 0x7e; if (uVar5 == uVar7) { iVar4 = 0; } goto LAB_001741a3; } if (uVar5 == uVar7) { uVar1 = *(ushort *)(param_4 + -2 + uVar8); iVar4 = 0x7e; if ((uint)(ushort)(uVar1 << 8 | uVar1 >> 8) <= (uint)param_2[2] - 4) { cVar2 = maria_page_crc_check(param_4,param_3,local_c70,0xffffffff); iVar4 = (int)cVar2; } LAB_001741a3: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return iVar4; } my_sleep(100000); uVar3 = (uint)param_2[2]; } while( true ); }
61,980
js_std_file_eof
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_eof(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f = js_std_file_get(ctx, this_val); if (!f) return JS_EXCEPTION; return JS_NewBool(ctx, feof(f)); }
O0
c
js_std_file_eof: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x127c0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x11d30 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x11d7d movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi callq 0xe560 movq (%rsp), %rcx movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax testl %eax, %eax setne %al movzbl %al, %eax movl %eax, 0x58(%rsp) movq $0x1, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopl (%rax)
js_std_file_eof: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] mov rdx, [rsp+68h+var_38] call js_std_file_get mov [rsp+68h+var_60], rax cmp [rsp+68h+var_60], 0 jnz short loc_11D30 mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 jmp short loc_11D7D loc_11D30: mov rax, [rsp+68h+var_48] mov [rsp+68h+var_68], rax mov rdi, [rsp+68h+var_60] call _feof mov rcx, [rsp+68h+var_68] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] test eax, eax setnz al movzx eax, al mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 1 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_11D7D: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_std_file_eof(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-60h] long long v5; // [rsp+38h] [rbp-30h] long long v6; // [rsp+58h] [rbp-10h] v4 = js_std_file_get(a1, a2, a3); if ( v4 ) { LODWORD(v6) = feof(v4) != 0; return v6; } else { LODWORD(v5) = 0; } return v5; }
js_std_file_eof: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x001127c0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00111d30 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x00111d7d LAB_00111d30: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010e560 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] TEST EAX,EAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x1 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_00111d7d: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_std_file_eof(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; int iVar2; FILE *__stream; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; __stream = (FILE *)js_std_file_get(param_1,param_2,param_3); if (__stream == (FILE *)0x0) { local_30 = 0; local_28 = 6; } else { iVar2 = feof(__stream); local_30 = (uint)(iVar2 != 0); uStack_2c = uStack_c; local_28 = 1; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
61,981
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++()
monkey531[P]llama/common/json.hpp
iter_impl& operator++() { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { std::advance(m_it.object_iterator, 1); break; } case value_t::array: { std::advance(m_it.array_iterator, 1); break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { ++m_it.primitive_iterator; break; } } return *this; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator++(): movq (%rdi), %rax testq %rax, %rax je 0x8c88d movzbl (%rax), %eax cmpl $0x2, %eax je 0x8c87e cmpl $0x1, %eax jne 0x8c885 addq $0x30, 0x8(%rdi) jmp 0x8c889 addq $0x10, 0x10(%rdi) jmp 0x8c889 incq 0x18(%rdi) movq %rdi, %rax retq pushq %rax leaq 0x5f538(%rip), %rdi # 0xebdcd leaq 0x5f57b(%rip), %rdx # 0xebe17 leaq 0x6480a(%rip), %rcx # 0xf10ad movl $0x33c0, %esi # imm = 0x33C0 xorl %eax, %eax callq 0x1aed0 nop
_ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv: mov rax, [rdi] test rax, rax jz short loc_8C88D movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_8C87E cmp eax, 1 jnz short loc_8C885 add qword ptr [rdi+8], 30h ; '0' jmp short loc_8C889 loc_8C87E: add qword ptr [rdi+10h], 10h jmp short loc_8C889 loc_8C885: inc qword ptr [rdi+18h] loc_8C889: mov rax, rdi retn loc_8C88D: push rax lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 33C0h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 2 ) { a1[2] += 16; } else if ( v1 == 1 ) { a1[1] += 48; } else { ++a1[3]; } return (long long)a1; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13248LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
operator++: MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0018c88d MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0018c87e CMP EAX,0x1 JNZ 0x0018c885 ADD qword ptr [RDI + 0x8],0x30 JMP 0x0018c889 LAB_0018c87e: ADD qword ptr [RDI + 0x10],0x10 JMP 0x0018c889 LAB_0018c885: INC qword ptr [RDI + 0x18] LAB_0018c889: MOV RAX,RDI RET LAB_0018c88d: PUSH RAX LEA RDI,[0x1ebdcd] LEA RDX,[0x1ebe17] LEA RCX,[0x1f10ad] MOV ESI,0x33c0 XOR EAX,EAX CALL 0x0011aed0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>::TEMPNAMEPLACEHOLDERVALUE() */ iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *this) { char cVar1; int8 in_R8; int8 in_R9; if (*(char **)this != (char *)0x0) { cVar1 = **(char **)this; if (cVar1 == '\x02') { *(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10; } else if (cVar1 == '\x01') { *(long *)(this + 8) = *(long *)(this + 8) + 0x30; } else { *(long *)(this + 0x18) = *(long *)(this + 0x18) + 1; } return this; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x33c0, "GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0); }
61,982
minja::Value::at(unsigned long)
monkey531[P]llama/common/minja.hpp
Value& at(size_t index) { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_array()) return array_->at(index); if (is_object()) return object_->at(index); throw std::runtime_error("Value is not an array or object: " + dump()); }
O2
cpp
minja::Value::at(unsigned long): pushq %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsi, 0x8(%rsp) callq 0x634ea testb %al, %al jne 0x6adf7 movq 0x10(%r14), %rdi testq %rdi, %rdi je 0x6addb movq %rbx, %rsi addq $0x50, %rsp popq %rbx popq %r14 popq %rbp jmp 0x6affc movq 0x20(%r14), %rdi testq %rdi, %rdi je 0x6ae27 leaq 0x8(%rsp), %rsi callq 0x6b01a addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x48ed1(%rip), %rsi # 0xb3cda movq %rax, %rdi callq 0x23340 movq 0x931d8(%rip), %rsi # 0xfdff0 movq 0x93139(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x10(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62f00 leaq 0x495df(%rip), %rsi # 0xb442a leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x58626 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %rbx, %rdi callq 0x23e60 xorl %ebp, %ebp movq 0x9317d(%rip), %rsi # 0xfdff0 movq 0x930de(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x24208 jmp 0x6ae97 movq %rax, %r14 movb $0x1, %bpl leaq 0x10(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x6aead jmp 0x6aeb5 jmp 0x6aeaa movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 movq %r14, %rdi callq 0x23fd0 nop
_ZN5minja5Value2atEm: push rbp push r14 push rbx sub rsp, 50h mov rbx, rsi mov r14, rdi mov [rsp+68h+var_60], rsi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz short loc_6ADF7 mov rdi, [r14+10h] test rdi, rdi jz short loc_6ADDB mov rsi, rbx add rsp, 50h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong) loc_6ADDB: mov rdi, [r14+20h] test rdi, rdi jz short loc_6AE27 lea rsi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_ add rsp, 50h pop rbx pop r14 pop rbp retn loc_6ADF7: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6AE27: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_58] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " lea rdi, [rsp+68h+var_38] lea rdx, [rsp+68h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6AE97 mov r14, rax mov bpl, 1 loc_6AE97: lea rdi, [rsp+68h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6AEAD jmp short loc_6AEB5 jmp short $+2 loc_6AEAA: mov r14, rax loc_6AEAD: mov rdi, rbx; void * call ___cxa_free_exception loc_6AEB5: mov rdi, r14 call __Unwind_Resume
long long minja::Value::at(minja::Value *this, long long a2) { long long v3; // rdi long long v5; // rdi std::runtime_error *exception; // rbx void *v7; // rbx long long v8; // [rsp+8h] [rbp-60h] BYREF _BYTE v9[32]; // [rsp+10h] [rbp-58h] BYREF _BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF v8 = a2; if ( minja::Value::is_null(this) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = *((_QWORD *)this + 2); if ( v3 ) return std::vector<minja::Value>::at(v3, a2); v5 = *((_QWORD *)this + 4); if ( !v5 ) { v7 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9); std::runtime_error::runtime_error(v7, v10); __cxa_throw( v7, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_( v5, &v8); }
at: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R14,RDI MOV qword ptr [RSP + 0x8],RSI CALL 0x001634ea TEST AL,AL JNZ 0x0016adf7 MOV RDI,qword ptr [R14 + 0x10] TEST RDI,RDI JZ 0x0016addb MOV RSI,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP JMP 0x0016affc LAB_0016addb: MOV RDI,qword ptr [R14 + 0x20] TEST RDI,RDI JZ 0x0016ae27 LEA RSI,[RSP + 0x8] CALL 0x0016b01a ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0016adf7: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0016ae02: LEA RSI,[0x1b3cda] MOV RDI,RAX CALL 0x00123340 LAB_0016ae11: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30 LAB_0016ae27: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0016ae32: LEA RDI,[RSP + 0x10] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162f00 LAB_0016ae44: LEA RSI,[0x1b442a] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x10] CALL 0x00158626 MOV BPL,0x1 LAB_0016ae5d: LEA RSI,[RSP + 0x30] MOV RDI,RBX CALL 0x00123e60 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30
/* minja::Value::at(unsigned long) */ void __thiscall minja::Value::at(Value *this,ulong param_1) { char cVar1; runtime_error *prVar2; ulong local_60; int1 local_58 [32]; string local_38 [32]; local_60 = param_1; cVar1 = is_null(this); if (cVar1 != '\0') { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016ae02 to 0016ae10 has its CatchHandler @ 0016aeaa */ std::runtime_error::runtime_error(prVar2,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } if (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) { std::vector<minja::Value,std::allocator<minja::Value>>::at (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10),param_1); return; } if (*(long *)(this + 0x20) != 0) { _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_ (*(long *)(this + 0x20),&local_60); return; } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016ae32 to 0016ae43 has its CatchHandler @ 0016aea8 */ dump_abi_cxx11_((int)local_58,SUB81(this,0)); /* try { // try from 0016ae44 to 0016ae59 has its CatchHandler @ 0016ae91 */ std::operator+((char *)local_38,(string *)"Value is not an array or object: "); /* try { // try from 0016ae5d to 0016ae81 has its CatchHandler @ 0016ae82 */ std::runtime_error::runtime_error(prVar2,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
61,983
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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 ReferenceType get_ref_impl(ThisType& obj) { // delegate the call to get_ptr<>() auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x88c6e movq 0x8(%r14), %rax testq %rax, %rax je 0x88c6e addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x23480 movq %rax, %rbx movq %r14, %rdi callq 0x4320e leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2c4e4(%rip), %rsi # 0xb5174 leaq 0x10(%rsp), %rdi callq 0x82e93 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12f, %esi # imm = 0x12F movq %r14, %rcx callq 0x430c2 xorl %ebp, %ebp leaq 0x7328d(%rip), %rsi # 0xfbf48 leaq -0x48f24(%rip), %rdx # 0x3fd9e movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x88ce1 jmp 0x88ce9 movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 movq %r14, %rdi callq 0x23fd0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_88C6E mov rax, [r14+8] test rax, rax jz short loc_88C6E add rsp, 30h pop rbx pop r14 pop rbp retn loc_88C6E: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Fh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_88CE1 jmp short loc_88CE9 mov r14, rax loc_88CE1: mov rdi, rbx; void * call ___cxa_free_exception loc_88CE9: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1) { long long result; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v3; // [rsp+8h] [rbp-40h] BYREF _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>( (long long)v4, (long long)"incompatible ReferenceType for get_ref, actual type is ", &v3); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 303, (long long)v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return result; }
get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x00188c6e MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x00188c6e ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00188c6e: PUSH 0x20 POP RDI CALL 0x00123480 MOV RBX,RAX MOV RDI,R14 CALL 0x0014320e LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00188c89: LEA RSI,[0x1b5174] LEA RDI,[RSP + 0x10] CALL 0x00182e93 MOV BPL,0x1 LAB_00188c9d: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12f MOV RCX,R14 CALL 0x001430c2 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x13fd9e] MOV RDI,RBX CALL 0x00123f30
/* std::__cxx11::string& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::get_ref_impl<std::__cxx11::string&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(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>&) */ string * nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if ((*param_1 == '\x03') && (*(string **)(param_1 + 8) != (string *)0x0)) { return *(string **)(param_1 + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 00188c89 to 00188c99 has its CatchHandler @ 00188cde */ detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40); /* try { // try from 00188c9d to 00188cc9 has its CatchHandler @ 00188cca */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x12f,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
61,984
remove_io_thread
eloqsql/mysys/mf_iocache.c
void remove_io_thread(IO_CACHE *cache) { IO_CACHE_SHARE *cshare= cache->share; uint total; DBUG_ENTER("remove_io_thread"); /* If the writer goes, it needs to flush the write cache. */ if (cache == cshare->source_cache) flush_io_cache(cache); mysql_mutex_lock(&cshare->mutex); DBUG_PRINT("io_cache_share", ("%s: %p", (cache == cshare->source_cache) ? "writer" : "reader", cache)); /* Remove from share. */ total= --cshare->total_threads; DBUG_PRINT("io_cache_share", ("remaining threads: %u", total)); /* Detach from share. */ cache->share= NULL; /* If the writer goes, let the readers know. */ if (cache == cshare->source_cache) { DBUG_PRINT("io_cache_share", ("writer leaves")); cshare->source_cache= NULL; } /* If all threads are waiting for me to join the lock, wake them. */ if (!--cshare->running_threads) { DBUG_PRINT("io_cache_share", ("the last running thread leaves, wake all")); mysql_cond_signal(&cshare->cond_writer); mysql_cond_broadcast(&cshare->cond); } mysql_mutex_unlock(&cshare->mutex); if (!total) { DBUG_PRINT("io_cache_share", ("last thread removed, destroy share")); mysql_cond_destroy (&cshare->cond_writer); mysql_cond_destroy (&cshare->cond); mysql_mutex_destroy(&cshare->mutex); } DBUG_VOID_RETURN; }
O3
c
remove_io_thread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x98(%rdi), %rbx cmpq %rdi, 0xc0(%rbx) jne 0x9ac53 movq %r14, %rdi movl $0x1, %esi callq 0x9a355 cmpq $0x0, 0x40(%rbx) jne 0x9ad63 movq %rbx, %rdi callq 0x2a1f0 movl 0xdc(%rbx), %r15d decl %r15d movl %r15d, 0xdc(%rbx) movq $0x0, 0x98(%r14) cmpq %r14, 0xc0(%rbx) jne 0x9ac96 movq $0x0, 0xc0(%rbx) decl 0xd8(%rbx) jne 0x9acd6 leaq 0x80(%rbx), %r14 movq 0xb0(%rbx), %rdi testq %rdi, %rdi jne 0x9ad91 movq %r14, %rdi callq 0x2a5b0 leaq 0x48(%rbx), %r14 movq 0x78(%rbx), %rdi testq %rdi, %rdi jne 0x9ada6 movq %r14, %rdi callq 0x2a6e0 movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x9ad7c movq %rbx, %rdi callq 0x2a1c0 testl %r15d, %r15d je 0x9acfb addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x80(%rbx), %r14 movq 0xb0(%rbx), %rdi testq %rdi, %rdi jne 0x9adbb movq %r14, %rdi callq 0x2a250 leaq 0x48(%rbx), %r14 movq 0x78(%rbx), %rdi testq %rdi, %rdi jne 0x9add8 movq %r14, %rdi callq 0x2a250 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x9ad51 leaq 0x2f6195(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x2a0e0 leaq 0x49be1(%rip), %rsi # 0xe494b movq %rbx, %rdi movl $0x392, %edx # imm = 0x392 callq 0x2ff2f jmp 0x9ac66 leaq 0x2f6155(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x160(%rax) jmp 0x9ace3 leaq 0x2f6140(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x170(%rax) jmp 0x9acb5 leaq 0x2f612b(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x178(%rax) jmp 0x9acce leaq 0x2f6116(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0xb0(%rbx) jmp 0x9ad12 leaq 0x2f60f9(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0x78(%rbx) jmp 0x9ad2b
remove_io_thread: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdi mov rbx, [rdi+98h] cmp [rbx+0C0h], rdi jnz short loc_9AC53 mov rdi, r14 mov esi, 1 call my_b_flush_io_cache loc_9AC53: cmp qword ptr [rbx+40h], 0 jnz loc_9AD63 mov rdi, rbx call _pthread_mutex_lock loc_9AC66: mov r15d, [rbx+0DCh] dec r15d mov [rbx+0DCh], r15d mov qword ptr [r14+98h], 0 cmp [rbx+0C0h], r14 jnz short loc_9AC96 mov qword ptr [rbx+0C0h], 0 loc_9AC96: dec dword ptr [rbx+0D8h] jnz short loc_9ACD6 lea r14, [rbx+80h] mov rdi, [rbx+0B0h] test rdi, rdi jnz loc_9AD91 loc_9ACB5: mov rdi, r14 call _pthread_cond_signal lea r14, [rbx+48h] mov rdi, [rbx+78h] test rdi, rdi jnz loc_9ADA6 loc_9ACCE: mov rdi, r14 call _pthread_cond_broadcast loc_9ACD6: mov rdi, [rbx+40h] test rdi, rdi jnz loc_9AD7C loc_9ACE3: mov rdi, rbx call _pthread_mutex_unlock test r15d, r15d jz short loc_9ACFB add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_9ACFB: lea r14, [rbx+80h] mov rdi, [rbx+0B0h] test rdi, rdi jnz loc_9ADBB loc_9AD12: mov rdi, r14 call _pthread_cond_destroy lea r14, [rbx+48h] mov rdi, [rbx+78h] test rdi, rdi jnz loc_9ADD8 loc_9AD2B: mov rdi, r14 call _pthread_cond_destroy mov rdi, [rbx+40h] test rdi, rdi jz short loc_9AD51 lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_9AD51: mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_mutex_destroy loc_9AD63: lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 392h call psi_mutex_lock jmp loc_9AC66 loc_9AD7C: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_9ACE3 loc_9AD91: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp loc_9ACB5 loc_9ADA6: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+178h] jmp loc_9ACCE loc_9ADBB: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+0B0h], 0 jmp loc_9AD12 loc_9ADD8: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+78h], 0 jmp loc_9AD2B
long long remove_io_thread(long long *a1) { long long v1; // rbx int v2; // r15d long long v4; // rdi long long v5; // rdi long long v6; // rdi long long result; // rax long long v8; // rdi long long v9; // rdi long long v10; // rdi v1 = a1[19]; if ( *(long long **)(v1 + 192) == a1 ) my_b_flush_io_cache(a1, 1); if ( *(_QWORD *)(v1 + 64) ) psi_mutex_lock(v1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x392u); else pthread_mutex_lock(v1); v2 = *(_DWORD *)(v1 + 220) - 1; *(_DWORD *)(v1 + 220) = v2; a1[19] = 0LL; if ( *(long long **)(v1 + 192) == a1 ) *(_QWORD *)(v1 + 192) = 0LL; if ( (*(_DWORD *)(v1 + 216))-- == 1 ) { v4 = *(_QWORD *)(v1 + 176); if ( v4 ) ((void ( *)(long long))PSI_server[46])(v4); pthread_cond_signal(v1 + 128); v5 = *(_QWORD *)(v1 + 120); if ( v5 ) ((void ( *)(long long))PSI_server[47])(v5); pthread_cond_broadcast(v1 + 72); } v6 = *(_QWORD *)(v1 + 64); if ( v6 ) ((void ( *)(long long))PSI_server[44])(v6); result = pthread_mutex_unlock(v1); if ( !v2 ) { v8 = *(_QWORD *)(v1 + 176); if ( v8 ) { ((void ( *)(long long))PSI_server[13])(v8); *(_QWORD *)(v1 + 176) = 0LL; } pthread_cond_destroy(v1 + 128); v9 = *(_QWORD *)(v1 + 120); if ( v9 ) { ((void ( *)(long long))PSI_server[13])(v9); *(_QWORD *)(v1 + 120) = 0LL; } pthread_cond_destroy(v1 + 72); v10 = *(_QWORD *)(v1 + 64); if ( v10 ) { ((void ( *)(long long))PSI_server[9])(v10); *(_QWORD *)(v1 + 64) = 0LL; } return pthread_mutex_destroy(v1); } return result; }
remove_io_thread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV RBX,qword ptr [RDI + 0x98] CMP qword ptr [RBX + 0xc0],RDI JNZ 0x0019ac53 MOV RDI,R14 MOV ESI,0x1 CALL 0x0019a355 LAB_0019ac53: CMP qword ptr [RBX + 0x40],0x0 JNZ 0x0019ad63 MOV RDI,RBX CALL 0x0012a1f0 LAB_0019ac66: MOV R15D,dword ptr [RBX + 0xdc] DEC R15D MOV dword ptr [RBX + 0xdc],R15D MOV qword ptr [R14 + 0x98],0x0 CMP qword ptr [RBX + 0xc0],R14 JNZ 0x0019ac96 MOV qword ptr [RBX + 0xc0],0x0 LAB_0019ac96: DEC dword ptr [RBX + 0xd8] JNZ 0x0019acd6 LEA R14,[RBX + 0x80] MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JNZ 0x0019ad91 LAB_0019acb5: MOV RDI,R14 CALL 0x0012a5b0 LEA R14,[RBX + 0x48] MOV RDI,qword ptr [RBX + 0x78] TEST RDI,RDI JNZ 0x0019ada6 LAB_0019acce: MOV RDI,R14 CALL 0x0012a6e0 LAB_0019acd6: MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x0019ad7c LAB_0019ace3: MOV RDI,RBX CALL 0x0012a1c0 TEST R15D,R15D JZ 0x0019acfb ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0019acfb: LEA R14,[RBX + 0x80] MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JNZ 0x0019adbb LAB_0019ad12: MOV RDI,R14 CALL 0x0012a250 LEA R14,[RBX + 0x48] MOV RDI,qword ptr [RBX + 0x78] TEST RDI,RDI JNZ 0x0019add8 LAB_0019ad2b: MOV RDI,R14 CALL 0x0012a250 MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x0019ad51 LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_0019ad51: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x0012a0e0 LAB_0019ad63: LEA RSI,[0x1e494b] MOV RDI,RBX MOV EDX,0x392 CALL 0x0012ff2f JMP 0x0019ac66 LAB_0019ad7c: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0019ace3 LAB_0019ad91: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x0019acb5 LAB_0019ada6: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x178] JMP 0x0019acce LAB_0019adbb: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0xb0],0x0 JMP 0x0019ad12 LAB_0019add8: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0x78],0x0 JMP 0x0019ad2b
void remove_io_thread(long param_1) { int *piVar1; pthread_mutex_t *__mutex; int iVar2; __mutex = *(pthread_mutex_t **)(param_1 + 0x98); if (*(long *)((long)__mutex + 0xc0) == param_1) { my_b_flush_io_cache(param_1,1); } if (*(long *)((long)__mutex + 0x40) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x392); } iVar2 = *(int *)((long)__mutex + 0xdc) + -1; *(int *)((long)__mutex + 0xdc) = iVar2; *(int8 *)(param_1 + 0x98) = 0; if (*(long *)((long)__mutex + 0xc0) == param_1) { *(int8 *)((long)__mutex + 0xc0) = 0; } piVar1 = (int *)((long)__mutex + 0xd8); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { if (*(long *)((long)__mutex + 0xb0) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80)); if (__mutex[3].__align != 0) { (**(code **)(PSI_server + 0x178))(); } pthread_cond_broadcast((pthread_cond_t *)((long)__mutex + 0x48)); } if (*(long *)((long)__mutex + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); if (iVar2 != 0) { return; } if (*(long *)((long)__mutex + 0xb0) != 0) { (**(code **)(PSI_server + 0x68))(); *(int8 *)((long)__mutex + 0xb0) = 0; } pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x80)); if (__mutex[3].__align != 0) { (**(code **)(PSI_server + 0x68))(); __mutex[3].__align = 0; } pthread_cond_destroy((pthread_cond_t *)((long)__mutex + 0x48)); if (*(long *)((long)__mutex + 0x40) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)((long)__mutex + 0x40) = 0; } pthread_mutex_destroy(__mutex); return; }
61,985
dtoa_alloc
eloqsql/strings/dtoa.c
static char *dtoa_alloc(int i, Stack_alloc *alloc) { char *rv; int aligned_size= MY_ALIGN(i, SIZEOF_CHARP); if (alloc->free + aligned_size <= alloc->end) { rv= alloc->free; alloc->free+= aligned_size; } else rv= malloc(i); return rv; }
O0
c
dtoa_alloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl -0x4(%rbp), %eax addl $0x8, %eax subl $0x1, %eax andl $-0x8, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x1c(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0xd234a movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x1c(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0xd2357 movslq -0x4(%rbp), %rdi callq 0x28480 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
dtoa_alloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov eax, [rbp+var_4] add eax, 8 sub eax, 1 and eax, 0FFFFFFF8h mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_1C] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_D234A mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_1C] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_D2357 loc_D234A: movsxd rdi, [rbp+var_4] call _malloc mov [rbp+var_18], rax loc_D2357: mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long dtoa_alloc(int a1, long long a2) { signed int v3; // [rsp+4h] [rbp-1Ch] long long v4; // [rsp+8h] [rbp-18h] v3 = (a1 + 7) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) return malloc(a1); v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; return v4; }
dtoa_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x8 SUB EAX,0x1 AND EAX,0xfffffff8 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x1c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x001d234a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x001d2357 LAB_001d234a: MOVSXD RDI,dword ptr [RBP + -0x4] CALL 0x00128480 MOV qword ptr [RBP + -0x18],RAX LAB_001d2357: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
void * dtoa_alloc(int param_1,long param_2) { uint uVar1; int8 local_20; uVar1 = param_1 + 7U & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar1)) { local_20 = malloc((long)param_1); } else { local_20 = *(void **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar1; } return local_20; }
61,986
pvio_socket_set_timeout
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_set_timeout(MARIADB_PVIO *pvio, enum enum_pvio_timeout type, int timeout) { struct st_pvio_socket *csock= NULL; if (!pvio) return 1; csock= (struct st_pvio_socket *)pvio->data; pvio->timeout[type]= (timeout > 0) ? timeout * 1000 : -1; if (csock) return pvio_socket_change_timeout(pvio, type, timeout * 1000); return 0; }
O3
c
pvio_socket_set_timeout: pushq %rbp movq %rsp, %rbp testq %rdi, %rdi je 0x2e701 movl %edx, %eax imull $0x3e8, %edx, %edx # imm = 0x3E8 testl %eax, %eax movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovgl %edx, %eax movl %esi, %ecx cmpq $0x0, (%rdi) movl %eax, 0x24(%rdi,%rcx,4) je 0x2e705 popq %rbp jmp 0x2f358 movb $0x1, %al jmp 0x2e707 xorl %eax, %eax popq %rbp retq
pvio_socket_set_timeout: push rbp mov rbp, rsp test rdi, rdi jz short loc_2E701 mov eax, edx imul edx, 3E8h test eax, eax mov eax, 0FFFFFFFFh cmovg eax, edx mov ecx, esi cmp qword ptr [rdi], 0 mov [rdi+rcx*4+24h], eax jz short loc_2E705 pop rbp jmp pvio_socket_change_timeout loc_2E701: mov al, 1 jmp short loc_2E707 loc_2E705: xor eax, eax loc_2E707: pop rbp retn
char pvio_socket_set_timeout(_QWORD *a1, unsigned int a2, int a3) { int v4; // edx bool v5; // cc int v6; // eax bool v7; // zf if ( !a1 ) return 1; v4 = 1000 * a3; v5 = a3 <= 0; v6 = -1; if ( !v5 ) v6 = v4; v7 = *a1 == 0LL; *((_DWORD *)a1 + a2 + 9) = v6; if ( v7 ) return 0; else return pvio_socket_change_timeout(); }
pvio_socket_set_timeout: PUSH RBP MOV RBP,RSP TEST RDI,RDI JZ 0x0012e701 MOV EAX,EDX IMUL EDX,EDX,0x3e8 TEST EAX,EAX MOV EAX,0xffffffff CMOVG EAX,EDX MOV ECX,ESI CMP qword ptr [RDI],0x0 MOV dword ptr [RDI + RCX*0x4 + 0x24],EAX JZ 0x0012e705 POP RBP JMP 0x0012f358 LAB_0012e701: MOV AL,0x1 JMP 0x0012e707 LAB_0012e705: XOR EAX,EAX LAB_0012e707: POP RBP RET
int8 pvio_socket_set_timeout(long *param_1,uint param_2,int param_3) { long lVar1; int iVar2; int8 uVar3; if (param_1 == (long *)0x0) { uVar3 = 1; } else { iVar2 = -1; if (0 < param_3) { iVar2 = param_3 * 1000; } lVar1 = *param_1; *(int *)((long)param_1 + (ulong)param_2 * 4 + 0x24) = iVar2; if (lVar1 != 0) { uVar3 = pvio_socket_change_timeout(); return uVar3; } uVar3 = 0; } return uVar3; }
61,987
ssz_fixed_length
corpus-core[P]colibri-stateless/src/util/ssz.c
size_t ssz_fixed_length(const ssz_def_t* def) { if (ssz_is_dynamic(def)) return 4; switch (def->type) { case SSZ_TYPE_UINT: return def->def.uint.len; case SSZ_TYPE_BOOLEAN: return 1; case SSZ_TYPE_CONTAINER: { size_t len = 0; for (int i = 0; i < def->def.container.len; i++) len += ssz_fixed_length(def->def.container.elements + i); return len; } case SSZ_TYPE_VECTOR: return def->def.vector.len * ssz_fixed_length(def->def.vector.type); case SSZ_TYPE_BIT_VECTOR: return (def->def.vector.len + 7) >> 3; default: return 0; } }
O2
c
ssz_fixed_length: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %r14 pushq $0x1 popq %r15 pushq $0x4 popq %r12 xorl %ebx, %ebx leaq 0x33520(%rip), %r13 # 0x7f188 movq %r14, %rdi callq 0x4bbf0 testb %al, %al jne 0x4bc96 movl 0x8(%r14), %eax cmpq $0x5, %rax ja 0x4bcd7 movslq (%r13,%rax,4), %rax addq %r13, %rax jmpq *%rax movl 0x18(%r14), %eax movq 0x10(%r14), %r14 imulq %rax, %r15 jmp 0x4bc68 movq %r12, %rbx jmp 0x4bcd7 movl 0x10(%r14), %ebx jmp 0x4bcd7 movl 0x18(%r14), %r12d shlq $0x5, %r12 xorl %r13d, %r13d xorl %ebx, %ebx cmpq %r13, %r12 je 0x4bcd7 movq 0x10(%r14), %rdi addq %r13, %rdi callq 0x4bc4b addq %rax, %rbx addq $0x20, %r13 jmp 0x4bcae pushq $0x1 popq %rbx jmp 0x4bcd7 movl 0x18(%r14), %ebx addl $0x7, %ebx shrl $0x3, %ebx imulq %r15, %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
ssz_fixed_length: push r15 push r14 push r13 push r12 push rbx mov r14, rdi push 1 pop r15 push 4 pop r12 xor ebx, ebx lea r13, jpt_4BC86 loc_4BC68: mov rdi, r14 call ssz_is_dynamic test al, al jnz short loc_4BC96 mov eax, [r14+8] cmp rax, 5; switch 6 cases ja short def_4BC86; jumptable 000000000004BC86 default case, case 4 movsxd rax, ds:(jpt_4BC86 - 7F188h)[r13+rax*4] add rax, r13 jmp rax; switch jump loc_4BC88: mov eax, [r14+18h]; jumptable 000000000004BC86 case 3 mov r14, [r14+10h] imul r15, rax jmp short loc_4BC68 loc_4BC96: mov rbx, r12 jmp short def_4BC86; jumptable 000000000004BC86 default case, case 4 loc_4BC9B: mov ebx, [r14+10h]; jumptable 000000000004BC86 case 0 jmp short def_4BC86; jumptable 000000000004BC86 default case, case 4 loc_4BCA1: mov r12d, [r14+18h]; jumptable 000000000004BC86 case 2 shl r12, 5 xor r13d, r13d xor ebx, ebx loc_4BCAE: cmp r12, r13 jz short def_4BC86; jumptable 000000000004BC86 default case, case 4 mov rdi, [r14+10h] add rdi, r13 call ssz_fixed_length add rbx, rax add r13, 20h ; ' ' jmp short loc_4BCAE loc_4BCC8: push 1; jumptable 000000000004BC86 case 1 pop rbx jmp short def_4BC86; jumptable 000000000004BC86 default case, case 4 loc_4BCCD: mov ebx, [r14+18h]; jumptable 000000000004BC86 case 5 add ebx, 7 shr ebx, 3 def_4BC86: imul rbx, r15; jumptable 000000000004BC86 default case, case 4 mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ssz_fixed_length(_DWORD *a1) { long long v2; // r15 long long v3; // rbx long long v4; // rax long long v5; // r12 long long v6; // r13 v2 = 1LL; v3 = 0LL; while ( 2 ) { if ( (unsigned __int8)ssz_is_dynamic((long long)a1) ) { v3 = 4LL; } else { switch ( a1[2] ) { case 0: v3 = (unsigned int)a1[4]; break; case 1: v3 = 1LL; break; case 2: v5 = 32LL * (unsigned int)a1[6]; v6 = 0LL; v3 = 0LL; while ( v5 != v6 ) { v3 += ssz_fixed_length(v6 + *((_QWORD *)a1 + 2)); v6 += 32LL; } break; case 3: v4 = (unsigned int)a1[6]; a1 = (_DWORD *)*((_QWORD *)a1 + 2); v2 *= v4; continue; case 5: v3 = (unsigned int)(a1[6] + 7) >> 3; break; default: return v2 * v3; } } break; } return v2 * v3; }
ssz_fixed_length: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDI PUSH 0x1 POP R15 PUSH 0x4 POP R12 XOR EBX,EBX LEA R13,[0x17f188] LAB_0014bc68: MOV RDI,R14 CALL 0x0014bbf0 TEST AL,AL JNZ 0x0014bc96 MOV EAX,dword ptr [R14 + 0x8] CMP RAX,0x5 JA 0x0014bcd7 MOVSXD RAX,dword ptr [R13 + RAX*0x4] ADD RAX,R13 switchD: JMP RAX caseD_3: MOV EAX,dword ptr [R14 + 0x18] MOV R14,qword ptr [R14 + 0x10] IMUL R15,RAX JMP 0x0014bc68 LAB_0014bc96: MOV RBX,R12 JMP 0x0014bcd7 caseD_0: MOV EBX,dword ptr [R14 + 0x10] JMP 0x0014bcd7 caseD_2: MOV R12D,dword ptr [R14 + 0x18] SHL R12,0x5 XOR R13D,R13D XOR EBX,EBX LAB_0014bcae: CMP R12,R13 JZ 0x0014bcd7 MOV RDI,qword ptr [R14 + 0x10] ADD RDI,R13 CALL 0x0014bc4b ADD RBX,RAX ADD R13,0x20 JMP 0x0014bcae caseD_1: PUSH 0x1 POP RBX JMP 0x0014bcd7 caseD_5: MOV EBX,dword ptr [R14 + 0x18] ADD EBX,0x7 SHR EBX,0x3 caseD_4: IMUL RBX,R15 MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
long ssz_fixed_length(long param_1) { uint *puVar1; uint uVar2; char cVar3; long lVar4; ulong uVar5; long lVar6; long lVar7; lVar7 = 1; do { cVar3 = ssz_is_dynamic(param_1); uVar5 = 4; if (cVar3 != '\0') goto switchD_0014bc86_caseD_4; uVar5 = 0; switch(*(int4 *)(param_1 + 8)) { case 0: uVar5 = (ulong)*(uint *)(param_1 + 0x10); goto switchD_0014bc86_caseD_4; case 1: uVar5 = 1; goto switchD_0014bc86_caseD_4; case 2: uVar2 = *(uint *)(param_1 + 0x18); uVar5 = 0; for (lVar6 = 0; (ulong)uVar2 << 5 != lVar6; lVar6 = lVar6 + 0x20) { lVar4 = ssz_fixed_length(*(long *)(param_1 + 0x10) + lVar6); uVar5 = uVar5 + lVar4; } switchD_0014bc86_caseD_4: return uVar5 * lVar7; case 3: puVar1 = (uint *)(param_1 + 0x18); param_1 = *(long *)(param_1 + 0x10); lVar7 = lVar7 * (ulong)*puVar1; break; default: goto switchD_0014bc86_caseD_4; case 5: uVar5 = (ulong)(*(int *)(param_1 + 0x18) + 7U >> 3); goto switchD_0014bc86_caseD_4; } } while( true ); }
61,988
LefDefParser::lefiLayer::parseLEF58Layer()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
void lefiLayer::parseLEF58Layer() { int i; if (lefData->versionNum < 5.7) return; for (i = 0; i < numProps_; i++) { if (strlen(names_[i]) == 10) { if (strcmp(names_[i], "LEF58_TYPE") == 0) parseLayerType(i); } } }
O0
cpp
LefDefParser::lefiLayer::parseLEF58Layer(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) leaq 0x80827(%rip), %rax # 0xc5750 movq (%rax), %rax movsd 0x5dd1c(%rip), %xmm0 # 0xa2c50 ucomisd 0xb8(%rax), %xmm0 jbe 0x44f40 jmp 0x44fba movl $0x0, 0xc(%rsp) movq (%rsp), %rcx movl 0xc(%rsp), %eax cmpl 0x350(%rcx), %eax jge 0x44fba movq (%rsp), %rax movq 0x358(%rax), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x20e0 cmpq $0xa, %rax jne 0x44fab movq (%rsp), %rax movq 0x358(%rax), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rdi leaq 0x516dd(%rip), %rsi # 0x9666f callq 0x2360 cmpl $0x0, %eax jne 0x44fa9 movq (%rsp), %rdi movl 0xc(%rsp), %esi callq 0x44b80 jmp 0x44fab jmp 0x44fad movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x44f48 addq $0x18, %rsp retq nop
_ZN12LefDefParser9lefiLayer15parseLEF58LayerEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] movsd xmm0, cs:qword_A2C50 ucomisd xmm0, qword ptr [rax+0B8h] jbe short loc_44F40 jmp short loc_44FBA loc_44F40: mov [rsp+18h+var_C], 0 loc_44F48: mov rcx, [rsp+18h+var_18] mov eax, [rsp+18h+var_C] cmp eax, [rcx+350h] jge short loc_44FBA mov rax, [rsp+18h+var_18] mov rax, [rax+358h] movsxd rcx, [rsp+18h+var_C] mov rdi, [rax+rcx*8] call _strlen cmp rax, 0Ah jnz short loc_44FAB mov rax, [rsp+18h+var_18] mov rax, [rax+358h] movsxd rcx, [rsp+18h+var_C] mov rdi, [rax+rcx*8] lea rsi, aLef58Type; "LEF58_TYPE" call _strcmp cmp eax, 0 jnz short loc_44FA9 mov rdi, [rsp+18h+var_18]; this mov esi, [rsp+18h+var_C]; int call _ZN12LefDefParser9lefiLayer14parseLayerTypeEi; LefDefParser::lefiLayer::parseLayerType(int) loc_44FA9: jmp short $+2 loc_44FAB: jmp short $+2 loc_44FAD: mov eax, [rsp+18h+var_C] add eax, 1 mov [rsp+18h+var_C], eax jmp short loc_44F48 loc_44FBA: add rsp, 18h retn
long long LefDefParser::lefiLayer::parseLEF58Layer(LefDefParser::lefiLayer *this) { long long result; // rax long long v2; // rdx int i; // [rsp+Ch] [rbp-Ch] result = LefDefParser::lefData; if ( *(double *)(LefDefParser::lefData + 184LL) >= 5.7 ) { for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= *((_DWORD *)this + 212) ) break; if ( strlen(*(_QWORD *)(*((_QWORD *)this + 107) + 8LL * i)) == 10 && !(unsigned int)strcmp(*(_QWORD *)(*((_QWORD *)this + 107) + 8LL * i), "LEF58_TYPE") ) { LefDefParser::lefiLayer::parseLayerType(this, (unsigned int)i, v2); } } } return result; }
parseLEF58Layer: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX LEA RAX,[0x1c5750] MOV RAX,qword ptr [RAX] MOVSD XMM0,qword ptr [0x001a2c50] UCOMISD XMM0,qword ptr [RAX + 0xb8] JBE 0x00144f40 JMP 0x00144fba LAB_00144f40: MOV dword ptr [RSP + 0xc],0x0 LAB_00144f48: MOV RCX,qword ptr [RSP] MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RCX + 0x350] JGE 0x00144fba MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x358] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001020e0 CMP RAX,0xa JNZ 0x00144fab MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x358] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RDI,qword ptr [RAX + RCX*0x8] LEA RSI,[0x19666f] CALL 0x00102360 CMP EAX,0x0 JNZ 0x00144fa9 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0xc] CALL 0x00144b80 LAB_00144fa9: JMP 0x00144fab LAB_00144fab: JMP 0x00144fad LAB_00144fad: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x00144f48 LAB_00144fba: ADD RSP,0x18 RET
/* LefDefParser::lefiLayer::parseLEF58Layer() */ void __thiscall LefDefParser::lefiLayer::parseLEF58Layer(lefiLayer *this) { int iVar1; size_t sVar2; int local_c; if (DAT_001a2c50 < *(double *)(lefData + 0xb8) || DAT_001a2c50 == *(double *)(lefData + 0xb8)) { for (local_c = 0; local_c < *(int *)(this + 0x350); local_c = local_c + 1) { sVar2 = strlen(*(char **)(*(long *)(this + 0x358) + (long)local_c * 8)); if ((sVar2 == 10) && (iVar1 = strcmp(*(char **)(*(long *)(this + 0x358) + (long)local_c * 8),"LEF58_TYPE"), iVar1 == 0)) { parseLayerType(this,local_c); } } } return; }
61,989
update_stats_free
seiftnesse[P]memoryallocator/src/custom_alloc_stats.c
void update_stats_free(size_t size) { // Prevent underflow - don't subtract more than what we have if (size > allocation_stats.total_allocated) { HEAP_LOG("Warning: Freeing more memory than allocated: %zu > %zu\n", size, allocation_stats.total_allocated); allocation_stats.total_freed += allocation_stats.total_allocated; allocation_stats.total_allocated = 0; } else { allocation_stats.total_allocated -= size; allocation_stats.total_freed += size; } // Don't let allocation count go negative if (allocation_stats.allocation_count > 0) { allocation_stats.allocation_count--; } HEAP_LOG("Stats updated: freed %zu bytes, remaining=%zu, count=%zu\n", size, allocation_stats.total_allocated, allocation_stats.allocation_count); }
O1
c
update_stats_free: movq 0x4104fb6(%rip), %rax # 0x4109140 movq %rax, %rcx subq %rdi, %rcx jae 0x41a6 addq %rax, 0x4104faf(%rip) # 0x4109148 movq $0x0, 0x4104f9c(%rip) # 0x4109140 jmp 0x41b4 movq %rcx, 0x4104f93(%rip) # 0x4109140 addq %rdi, 0x4104f94(%rip) # 0x4109148 movq 0x4104f95(%rip), %rax # 0x4109150 testq %rax, %rax je 0x41ca decq %rax movq %rax, 0x4104f86(%rip) # 0x4109150 retq
update_stats_free: mov rax, cs:allocation_stats mov rcx, rax sub rcx, rdi jnb short loc_41A6 add cs:qword_4109148, rax mov cs:allocation_stats, 0 jmp short loc_41B4 loc_41A6: mov cs:allocation_stats, rcx add cs:qword_4109148, rdi loc_41B4: mov rax, cs:qword_4109150 test rax, rax jz short locret_41CA dec rax mov cs:qword_4109150, rax locret_41CA: retn
long long update_stats_free(unsigned long long a1) { long long result; // rax if ( allocation_stats >= a1 ) { allocation_stats -= a1; qword_4109148 += a1; } else { qword_4109148 += allocation_stats; allocation_stats = 0LL; } result = qword_4109150; if ( qword_4109150 ) return --qword_4109150; return result; }
update_stats_free: MOV RAX,qword ptr [0x04209140] MOV RCX,RAX SUB RCX,RDI JNC 0x001041a6 ADD qword ptr [0x04209148],RAX MOV qword ptr [0x04209140],0x0 JMP 0x001041b4 LAB_001041a6: MOV qword ptr [0x04209140],RCX ADD qword ptr [0x04209148],RDI LAB_001041b4: MOV RAX,qword ptr [0x04209150] TEST RAX,RAX JZ 0x001041ca DEC RAX MOV qword ptr [0x04209150],RAX LAB_001041ca: RET
void update_stats_free(ulong param_1) { if (allocation_stats < param_1) { DAT_04209148 = DAT_04209148 + allocation_stats; allocation_stats = 0; } else { DAT_04209148 = DAT_04209148 + param_1; allocation_stats = allocation_stats - param_1; } if (DAT_04209150 != 0) { DAT_04209150 = DAT_04209150 + -1; } return; }
61,990
js_typed_array_join
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_join(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int toLocaleString) { JSValue sep = JS_UNDEFINED, el; StringBuffer b_s, *b = &b_s; JSString *s = NULL; JSObject *p; int i, len, oldlen, newlen; int c; p = get_typed_array(ctx, this_val); if (!p) return JS_EXCEPTION; if (typed_array_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); len = oldlen = newlen = p->u.array.count; c = ','; /* default separator */ if (!toLocaleString && argc > 0 && !JS_IsUndefined(argv[0])) { sep = JS_ToString(ctx, argv[0]); if (JS_IsException(sep)) goto exception; s = JS_VALUE_GET_STRING(sep); if (s->len == 1 && !s->is_wide_char) c = s->u.str8[0]; else c = -1; // ToString(sep) can detach or resize the arraybuffer as a side effect newlen = p->u.array.count; len = min_int(len, newlen); } string_buffer_init(ctx, b, 0); /* XXX: optimize with direct access */ for(i = 0; i < len; i++) { if (i > 0) { if (c >= 0) { if (string_buffer_putc8(b, c)) goto fail; } else { if (string_buffer_concat(b, s, 0, s->len)) goto fail; } } el = JS_GetPropertyUint32(ctx, this_val, i); /* Can return undefined for example if the typed array is detached */ if (!JS_IsNull(el) && !JS_IsUndefined(el)) { if (JS_IsException(el)) goto fail; if (toLocaleString) { el = JS_ToLocaleStringFree(ctx, el); } if (string_buffer_concat_value_free(b, el)) goto fail; } } // add extra separators in case RAB was resized by evil .valueOf method i = max_int(1, newlen); for(/*empty*/; i < oldlen; i++) { if (c >= 0) { if (string_buffer_putc8(b, c)) goto fail; } else { if (string_buffer_concat(b, s, 0, s->len)) goto fail; } } JS_FreeValue(ctx, sep); return string_buffer_end(b); fail: string_buffer_free(b); JS_FreeValue(ctx, sep); exception: return JS_EXCEPTION; }
O1
c
js_typed_array_join: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, 0x1c(%rsp) movq %r8, %rbx movl %ecx, %r15d movq %rsi, %r13 movq %rdi, %r14 movq $0x0, 0x28(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x50(%rsp) cmpl $-0x1, %edx jne 0x815e6 movq 0x30(%rsp), %rbp movzwl 0x6(%rbp), %eax addl $-0x15, %eax cmpw $0xc, %ax jb 0x815f9 leaq 0x1f71c(%rip), %rsi # 0xa0d09 xorl %ebp, %ebp movq %r14, %rdi xorl %eax, %eax callq 0x21953 movl $0x6, %r12d testq %rbp, %rbp je 0x81625 movq %rbp, %rdi callq 0x38ab0 testl %eax, %eax je 0x81641 leaq 0x1f703(%rip), %rsi # 0xa0d1a xorl %ebx, %ebx movq %r14, %rdi xorl %eax, %eax callq 0x21953 jmp 0x81627 xorl %ebx, %ebx xorl %ecx, %ecx orq %rcx, %rbx movq %rbx, %rax movq %r12, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x40(%rbp), %r12d cmpl $0x0, 0x1c(%rsp) setne %al testl %r15d, %r15d setle %cl movl $0x2c, %r15d orb %al, %cl jne 0x8166a movq 0x8(%rbx), %rdx cmpl $0x3, %edx jne 0x817fb movl $0x3, %eax movq %rax, 0x20(%rsp) movq $0x0, 0x10(%rsp) movl %r12d, %ebx movl %r12d, 0xc(%rsp) movq %r14, 0x30(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rsp) movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1ff5f movq %rax, 0x38(%rsp) testq %rax, %rax je 0x81859 testl %ebx, %ebx jle 0x8174b movl %ebx, %ebx xorl %ebp, %ebp testq %rbp, %rbp je 0x816f4 testl %r15d, %r15d js 0x816d1 leaq 0x30(%rsp), %rdi movl %r15d, %esi callq 0x4ac4d jmp 0x816ec movq 0x10(%rsp), %rsi movl 0x4(%rsi), %ecx movl $0x7fffffff, %eax # imm = 0x7FFFFFFF andl %eax, %ecx leaq 0x30(%rsp), %rdi xorl %edx, %edx callq 0x414a5 testl %eax, %eax jne 0x817cc movq %r14, %rdi movq %r13, %rsi movq 0x50(%rsp), %rdx movq %rbp, %rcx callq 0x235a0 leal -0x2(%rdx), %ecx cmpl $0x2, %ecx jb 0x8173f cmpl $0x6, %edx je 0x817cc cmpl $0x0, 0x1c(%rsp) je 0x8172a movq %r14, %rdi movq %rax, %rsi callq 0x775be leaq 0x30(%rsp), %rdi movq %rax, %rsi callq 0x4aca2 testl %eax, %eax jne 0x817cc incq %rbp cmpq %rbp, %rbx jne 0x816b8 movl 0xc(%rsp), %ecx cmpl $0x2, %ecx movl $0x1, %eax cmovgel %ecx, %eax subl %eax, %r12d jle 0x81798 leaq 0x30(%rsp), %r13 movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF testl %r15d, %r15d js 0x8177b movq %r13, %rdi movl %r15d, %esi callq 0x4ac4d jmp 0x8178f movq 0x10(%rsp), %rsi movl 0x4(%rsi), %ecx andl %ebx, %ecx movq %r13, %rdi xorl %edx, %edx callq 0x414a5 testl %eax, %eax jne 0x817cc decl %r12d jne 0x81769 movq 0x28(%rsp), %rsi movq 0x18(%r14), %rdi movq 0x20(%rsp), %rdx callq 0x1ccb2 leaq 0x30(%rsp), %rdi callq 0x32830 movq %rdx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %ebx jmp 0x81629 movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x1bf85 movq $0x0, 0x38(%rsp) movq 0x28(%rsp), %rsi movq 0x18(%r14), %rdi movq 0x20(%rsp), %rdx callq 0x1ccb2 xorl %ebx, %ebx jmp 0x81814 movq (%rbx), %rsi xorl %ebx, %ebx movq %r14, %rdi xorl %ecx, %ecx callq 0x26ec9 movq %rax, 0x28(%rsp) cmpl $0x6, %edx jne 0x81821 xorl %ecx, %ecx movl $0x6, %r12d jmp 0x81629 movq 0x28(%rsp), %rcx movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movq %rcx, 0x10(%rsp) cmpl $0x1, 0x4(%rcx) jne 0x81841 movq 0x10(%rsp), %rax movzbl 0x18(%rax), %r15d movq %rdx, 0x20(%rsp) movl 0x40(%rbp), %ebx cmpl %ebx, %r12d movl %ebx, 0xc(%rsp) cmovll %r12d, %ebx jmp 0x81685 movl $0x0, 0x44(%rsp) movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF jmp 0x816ac
js_typed_array_join: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_6C], r9d mov rbx, r8 mov r15d, ecx mov r13, rsi mov r14, rdi mov [rsp+88h+var_60], 0 mov [rsp+88h+var_58], rsi mov [rsp+88h+var_38], rdx cmp edx, 0FFFFFFFFh jnz short loc_815E6 mov rbp, [rsp+88h+var_58] movzx eax, word ptr [rbp+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jb short loc_815F9 loc_815E6: lea rsi, aNotATypedarray; "not a TypedArray" xor ebp, ebp mov rdi, r14 xor eax, eax call JS_ThrowTypeError loc_815F9: mov r12d, 6 test rbp, rbp jz short loc_81625 mov rdi, rbp call typed_array_is_oob test eax, eax jz short loc_81641 lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" xor ebx, ebx mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp short loc_81627 loc_81625: xor ebx, ebx loc_81627: xor ecx, ecx loc_81629: or rbx, rcx mov rax, rbx mov rdx, r12 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_81641: mov r12d, [rbp+40h] cmp [rsp+88h+var_6C], 0 setnz al test r15d, r15d setle cl mov r15d, 2Ch ; ',' or cl, al jnz short loc_8166A mov rdx, [rbx+8] cmp edx, 3 jnz loc_817FB loc_8166A: mov eax, 3 mov [rsp+88h+var_68], rax mov [rsp+88h+var_78], 0 mov ebx, r12d mov [rsp+88h+var_7C], r12d loc_81685: mov [rsp+88h+var_58], r14 xorps xmm0, xmm0 movups [rsp+88h+var_48], xmm0 mov rdi, r14 xor esi, esi xor edx, edx call js_alloc_string mov [rsp+88h+var_50], rax test rax, rax jz loc_81859 loc_816AC: test ebx, ebx jle loc_8174B mov ebx, ebx xor ebp, ebp loc_816B8: test rbp, rbp jz short loc_816F4 test r15d, r15d js short loc_816D1 lea rdi, [rsp+88h+var_58] mov esi, r15d call string_buffer_putc8 jmp short loc_816EC loc_816D1: mov rsi, [rsp+88h+var_78] mov ecx, [rsi+4] mov eax, 7FFFFFFFh and ecx, eax lea rdi, [rsp+88h+var_58] xor edx, edx call string_buffer_concat loc_816EC: test eax, eax jnz loc_817CC loc_816F4: mov rdi, r14 mov rsi, r13 mov rdx, [rsp+88h+var_38] mov rcx, rbp call JS_GetPropertyInt64 lea ecx, [rdx-2] cmp ecx, 2 jb short loc_8173F cmp edx, 6 jz loc_817CC cmp [rsp+88h+var_6C], 0 jz short loc_8172A mov rdi, r14 mov rsi, rax call JS_ToLocaleStringFree loc_8172A: lea rdi, [rsp+88h+var_58] mov rsi, rax call string_buffer_concat_value_free test eax, eax jnz loc_817CC loc_8173F: inc rbp cmp rbx, rbp jnz loc_816B8 loc_8174B: mov ecx, [rsp+88h+var_7C] cmp ecx, 2 mov eax, 1 cmovge eax, ecx sub r12d, eax jle short loc_81798 lea r13, [rsp+88h+var_58] mov ebx, 7FFFFFFFh loc_81769: test r15d, r15d js short loc_8177B mov rdi, r13 mov esi, r15d call string_buffer_putc8 jmp short loc_8178F loc_8177B: mov rsi, [rsp+88h+var_78] mov ecx, [rsi+4] and ecx, ebx mov rdi, r13 xor edx, edx call string_buffer_concat loc_8178F: test eax, eax jnz short loc_817CC dec r12d jnz short loc_81769 loc_81798: mov rsi, [rsp+88h+var_60] mov rdi, [r14+18h] mov rdx, [rsp+88h+var_68] call JS_FreeValueRT lea rdi, [rsp+88h+var_58] call string_buffer_end mov r12, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov ebx, eax jmp loc_81629 loc_817CC: mov rdi, [rsp+88h+var_58] mov rsi, [rsp+88h+var_50] call js_free mov [rsp+88h+var_50], 0 mov rsi, [rsp+88h+var_60] mov rdi, [r14+18h] mov rdx, [rsp+88h+var_68] call JS_FreeValueRT xor ebx, ebx jmp short loc_81814 loc_817FB: mov rsi, [rbx] xor ebx, ebx mov rdi, r14 xor ecx, ecx call JS_ToStringInternal mov [rsp+88h+var_60], rax cmp edx, 6 jnz short loc_81821 loc_81814: xor ecx, ecx mov r12d, 6 jmp loc_81629 loc_81821: mov rcx, [rsp+88h+var_60] mov r15d, 0FFFFFFFFh mov [rsp+88h+var_78], rcx cmp dword ptr [rcx+4], 1 jnz short loc_81841 mov rax, [rsp+88h+var_78] movzx r15d, byte ptr [rax+18h] loc_81841: mov [rsp+88h+var_68], rdx mov ebx, [rbp+40h] cmp r12d, ebx mov [rsp+88h+var_7C], ebx cmovl ebx, r12d jmp loc_81685 loc_81859: mov dword ptr [rsp+88h+var_48+4], 0 mov dword ptr [rsp+88h+var_48+0Ch], 0FFFFFFFFh jmp loc_816AC
unsigned long long js_typed_array_join( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v15; // r15d long long v17; // rbp long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // rbx unsigned long long v25; // rcx int v27; // r12d bool v28; // cl signed int v29; // r15d long long v30; // rdx int v31; // ebx long long v32; // rdx long long v33; // rcx long long v34; // r8 long long v35; // r9 __m128 v36; // xmm4 __m128 v37; // xmm5 unsigned long long v38; // rbp _DWORD *PropertyInt64; // rax long long v41; // rcx int v42; // eax bool v43; // cc int v44; // r12d unsigned long long v46; // rax long long v47; // rsi long long v48; // rdx char v49; // [rsp+0h] [rbp-88h] _BYTE v50[12]; // [rsp+Ch] [rbp-7Ch] int v51; // [rsp+1Ch] [rbp-6Ch] long long v52; // [rsp+20h] [rbp-68h] unsigned long long v53; // [rsp+28h] [rbp-60h] long long v54; // [rsp+30h] [rbp-58h] BYREF long long v55; // [rsp+38h] [rbp-50h] __int128 v56; // [rsp+40h] [rbp-48h] long long v57; // [rsp+50h] [rbp-38h] v51 = a6; v15 = a4; v53 = 0LL; v54 = a2; v57 = a3; if ( (_DWORD)a3 != -1 || (v17 = v54, (unsigned __int16)(*(_WORD *)(v54 + 6) - 21) >= 0xCu) ) { v17 = 0LL; JS_ThrowTypeError( a1, (long long)"not a TypedArray", a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v49); } if ( !v17 ) { v24 = 0LL; goto LABEL_8; } if ( !typed_array_is_oob(v17) ) { v27 = *(_DWORD *)(v17 + 64); v28 = v15 <= 0; v29 = 44; if ( v51 != 0 || v28 || (v30 = a5[1], (_DWORD)v30 == 3) ) { v52 = 3LL; *(_DWORD *)&v50[8] = 0; v31 = *(_DWORD *)(v17 + 64); *(_QWORD *)v50 = (unsigned int)v31; } else { v47 = *a5; v24 = 0LL; v53 = JS_ToStringInternal(a1, v47, v30, 0, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14); if ( (_DWORD)v48 == 6 ) goto LABEL_39; v29 = -1; *(_QWORD *)&v50[4] = v53; if ( *(_DWORD *)(v53 + 4) == 1 ) v29 = *(unsigned __int8 *)(v53 + 24); v52 = v48; v31 = *(_DWORD *)(v17 + 64); *(_DWORD *)v50 = v31; if ( v27 < v31 ) v31 = v27; } v54 = a1; v56 = 0LL; v55 = js_alloc_string(a1, 0LL, 0); if ( !v55 ) { DWORD1(v56) = 0; HIDWORD(v56) = -1; } if ( v31 <= 0 ) { LABEL_28: v41 = *(unsigned int *)v50; v42 = 1; if ( *(int *)v50 >= 2 ) v42 = *(_DWORD *)v50; v43 = v27 <= v42; v44 = v27 - v42; if ( v43 ) { LABEL_36: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v53, v52); v46 = (unsigned long long)string_buffer_end((long long)&v54); v25 = v46 & 0xFFFFFFFF00000000LL; v24 = (unsigned int)v46; return v25 | v24; } while ( !(v29 < 0 ? string_buffer_concat( (long long)&v54, *(long long *)&v50[4], 0, *(_DWORD *)(*(_QWORD *)&v50[4] + 4LL) & 0x7FFFFFFF) : (unsigned int)string_buffer_putc8( (long long)&v54, v29, (__m128)0LL, a8, a9, a10, v36, v37, a13, a14, v32, v41, v34, v35)) ) { if ( !--v44 ) goto LABEL_36; } } else { v38 = 0LL; while ( 1 ) { if ( v38 ) { if ( v29 < 0 ? string_buffer_concat( (long long)&v54, *(long long *)&v50[4], 0, *(_DWORD *)(*(_QWORD *)&v50[4] + 4LL) & 0x7FFFFFFF) : (unsigned int)string_buffer_putc8( (long long)&v54, v29, (__m128)0LL, a8, a9, a10, v36, v37, a13, a14, v32, v33, v34, v35) ) { break; } } PropertyInt64 = (_DWORD *)JS_GetPropertyInt64(a1, a2, v57, v38); v33 = (unsigned int)(v32 - 2); if ( (unsigned int)v33 >= 2 ) { if ( (_DWORD)v32 == 6 ) break; if ( v51 ) PropertyInt64 = (_DWORD *)JS_ToLocaleStringFree( a1, PropertyInt64, v32, (__m128)0LL, a8, a9, a10, v36, v37, a13, a14, v33, v34, v35); if ( (unsigned int)string_buffer_concat_value_free( &v54, PropertyInt64, v32, v33, v34, v35, (__m128)0LL, a8, a9, a10, v36, v37, a13, a14) ) break; } if ( v31 == ++v38 ) goto LABEL_28; } } js_free(v54, v55); v55 = 0LL; JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v53, v52); v24 = 0LL; LABEL_39: v25 = 0LL; return v25 | v24; } v24 = 0LL; JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v18, v19, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14, v49); LABEL_8: v25 = 0LL; return v25 | v24; }
js_typed_array_join: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RSP + 0x1c],R9D MOV RBX,R8 MOV R15D,ECX MOV R13,RSI MOV R14,RDI MOV qword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x50],RDX CMP EDX,-0x1 JNZ 0x001815e6 MOV RBP,qword ptr [RSP + 0x30] MOVZX EAX,word ptr [RBP + 0x6] ADD EAX,-0x15 CMP AX,0xc JC 0x001815f9 LAB_001815e6: LEA RSI,[0x1a0d09] XOR EBP,EBP MOV RDI,R14 XOR EAX,EAX CALL 0x00121953 LAB_001815f9: MOV R12D,0x6 TEST RBP,RBP JZ 0x00181625 MOV RDI,RBP CALL 0x00138ab0 TEST EAX,EAX JZ 0x00181641 LEA RSI,[0x1a0d1a] XOR EBX,EBX MOV RDI,R14 XOR EAX,EAX CALL 0x00121953 JMP 0x00181627 LAB_00181625: XOR EBX,EBX LAB_00181627: XOR ECX,ECX LAB_00181629: OR RBX,RCX MOV RAX,RBX MOV RDX,R12 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00181641: MOV R12D,dword ptr [RBP + 0x40] CMP dword ptr [RSP + 0x1c],0x0 SETNZ AL TEST R15D,R15D SETLE CL MOV R15D,0x2c OR CL,AL JNZ 0x0018166a MOV RDX,qword ptr [RBX + 0x8] CMP EDX,0x3 JNZ 0x001817fb LAB_0018166a: MOV EAX,0x3 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x10],0x0 MOV EBX,R12D MOV dword ptr [RSP + 0xc],R12D LAB_00181685: MOV qword ptr [RSP + 0x30],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x40],XMM0 MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x0011ff5f MOV qword ptr [RSP + 0x38],RAX TEST RAX,RAX JZ 0x00181859 LAB_001816ac: TEST EBX,EBX JLE 0x0018174b MOV EBX,EBX XOR EBP,EBP LAB_001816b8: TEST RBP,RBP JZ 0x001816f4 TEST R15D,R15D JS 0x001816d1 LEA RDI,[RSP + 0x30] MOV ESI,R15D CALL 0x0014ac4d JMP 0x001816ec LAB_001816d1: MOV RSI,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSI + 0x4] MOV EAX,0x7fffffff AND ECX,EAX LEA RDI,[RSP + 0x30] XOR EDX,EDX CALL 0x001414a5 LAB_001816ec: TEST EAX,EAX JNZ 0x001817cc LAB_001816f4: MOV RDI,R14 MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x50] MOV RCX,RBP CALL 0x001235a0 LEA ECX,[RDX + -0x2] CMP ECX,0x2 JC 0x0018173f CMP EDX,0x6 JZ 0x001817cc CMP dword ptr [RSP + 0x1c],0x0 JZ 0x0018172a MOV RDI,R14 MOV RSI,RAX CALL 0x001775be LAB_0018172a: LEA RDI,[RSP + 0x30] MOV RSI,RAX CALL 0x0014aca2 TEST EAX,EAX JNZ 0x001817cc LAB_0018173f: INC RBP CMP RBX,RBP JNZ 0x001816b8 LAB_0018174b: MOV ECX,dword ptr [RSP + 0xc] CMP ECX,0x2 MOV EAX,0x1 CMOVGE EAX,ECX SUB R12D,EAX JLE 0x00181798 LEA R13,[RSP + 0x30] MOV EBX,0x7fffffff LAB_00181769: TEST R15D,R15D JS 0x0018177b MOV RDI,R13 MOV ESI,R15D CALL 0x0014ac4d JMP 0x0018178f LAB_0018177b: MOV RSI,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSI + 0x4] AND ECX,EBX MOV RDI,R13 XOR EDX,EDX CALL 0x001414a5 LAB_0018178f: TEST EAX,EAX JNZ 0x001817cc DEC R12D JNZ 0x00181769 LAB_00181798: MOV RSI,qword ptr [RSP + 0x28] MOV RDI,qword ptr [R14 + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011ccb2 LEA RDI,[RSP + 0x30] CALL 0x00132830 MOV R12,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV EBX,EAX JMP 0x00181629 LAB_001817cc: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] CALL 0x0011bf85 MOV qword ptr [RSP + 0x38],0x0 MOV RSI,qword ptr [RSP + 0x28] MOV RDI,qword ptr [R14 + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011ccb2 XOR EBX,EBX JMP 0x00181814 LAB_001817fb: MOV RSI,qword ptr [RBX] XOR EBX,EBX MOV RDI,R14 XOR ECX,ECX CALL 0x00126ec9 MOV qword ptr [RSP + 0x28],RAX CMP EDX,0x6 JNZ 0x00181821 LAB_00181814: XOR ECX,ECX MOV R12D,0x6 JMP 0x00181629 LAB_00181821: MOV RCX,qword ptr [RSP + 0x28] MOV R15D,0xffffffff MOV qword ptr [RSP + 0x10],RCX CMP dword ptr [RCX + 0x4],0x1 JNZ 0x00181841 MOV RAX,qword ptr [RSP + 0x10] MOVZX R15D,byte ptr [RAX + 0x18] LAB_00181841: MOV qword ptr [RSP + 0x20],RDX MOV EBX,dword ptr [RBP + 0x40] CMP R12D,EBX MOV dword ptr [RSP + 0xc],EBX CMOVL EBX,R12D JMP 0x00181685 LAB_00181859: MOV dword ptr [RSP + 0x44],0x0 MOV dword ptr [RSP + 0x4c],0xffffffff JMP 0x001816ac
int1 [16] js_typed_array_join(long param_1,long param_2,int8 param_3,int param_4,int8 *param_5, int param_6) { uint uVar1; int iVar2; int iVar3; uint uVar4; ulong uVar5; long lVar6; ulong uVar7; int8 uVar8; uint uVar9; int1 auVar10 [12]; int1 auVar11 [16]; uint local_7c; int8 local_68; long local_60; long local_58; long local_50; ulong local_48; int8 uStack_40; int8 local_38; local_58 = param_2; local_38 = param_3; if (((int)param_3 != -1) || (lVar6 = param_2, 0xb < (ushort)(*(short *)(param_2 + 6) - 0x15U))) { lVar6 = 0; JS_ThrowTypeError(param_1,"not a TypedArray"); } uVar8 = 6; if (lVar6 != 0) { iVar2 = typed_array_is_oob(lVar6); if (iVar2 == 0) { uVar1 = *(uint *)(lVar6 + 0x40); uVar9 = 0x2c; if ((param_4 < 1 || param_6 != 0) || ((int)param_5[1] == 3)) { auVar11 = ZEXT816(3) << 0x40; uVar4 = uVar1; local_7c = uVar1; } else { auVar11 = JS_ToStringInternal(param_1,*param_5,param_5[1],0); if (auVar11._8_4_ == 6) goto LAB_00181814; uVar9 = 0xffffffff; if (*(int *)(auVar11._0_8_ + 4) == 1) { uVar9 = (uint)*(byte *)(auVar11._0_8_ + 0x18); } local_7c = *(uint *)(lVar6 + 0x40); uVar4 = local_7c; if ((int)uVar1 < (int)local_7c) { uVar4 = uVar1; } } local_68 = auVar11._8_8_; local_60 = auVar11._0_8_; local_48 = 0; uStack_40 = 0; local_58 = param_1; local_50 = js_alloc_string(param_1,0,0); if (local_50 == 0) { local_48 = local_48 & 0xffffffff; uStack_40 = CONCAT44(0xffffffff,(int4)uStack_40); } if (0 < (int)uVar4) { uVar7 = 0; do { if (uVar7 != 0) { if ((int)uVar9 < 0) { iVar2 = string_buffer_concat (&local_58,local_60,0,*(uint *)(local_60 + 4) & 0x7fffffff); } else { iVar2 = string_buffer_putc8(&local_58,uVar9); } if (iVar2 != 0) goto LAB_001817cc; } auVar10 = JS_GetPropertyInt64(param_1,param_2,local_38,uVar7); uVar8 = auVar10._0_8_; if (1 < auVar10._8_4_ - 2U) { if (auVar10._8_4_ == 6) goto LAB_001817cc; if (param_6 != 0) { uVar8 = JS_ToLocaleStringFree(param_1,uVar8); } iVar2 = string_buffer_concat_value_free(&local_58,uVar8); if (iVar2 != 0) goto LAB_001817cc; } uVar7 = uVar7 + 1; } while (uVar4 != uVar7); } uVar4 = 1; if (1 < (int)local_7c) { uVar4 = local_7c; } iVar2 = uVar1 - uVar4; if (iVar2 != 0 && (int)uVar4 <= (int)uVar1) { do { if ((int)uVar9 < 0) { iVar3 = string_buffer_concat(&local_58,local_60,0,*(uint *)(local_60 + 4) & 0x7fffffff); } else { iVar3 = string_buffer_putc8(&local_58,uVar9); } if (iVar3 != 0) goto LAB_001817cc; iVar2 = iVar2 + -1; } while (iVar2 != 0); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_60,local_68); auVar11 = string_buffer_end(&local_58); uVar8 = auVar11._8_8_; uVar7 = auVar11._0_8_ & 0xffffffff00000000; uVar5 = auVar11._0_8_ & 0xffffffff; goto LAB_00181629; } JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized"); } uVar5 = 0; uVar7 = 0; LAB_00181629: auVar11._8_8_ = uVar8; auVar11._0_8_ = uVar5 | uVar7; return auVar11; LAB_001817cc: js_free(local_58,local_50); local_50 = 0; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_60,local_68); LAB_00181814: uVar5 = 0; uVar7 = 0; uVar8 = 6; goto LAB_00181629; }
61,991
js_typed_array_join
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_join(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int toLocaleString) { JSValue sep = JS_UNDEFINED, el; StringBuffer b_s, *b = &b_s; JSString *s = NULL; JSObject *p; int i, len, oldlen, newlen; int c; p = get_typed_array(ctx, this_val); if (!p) return JS_EXCEPTION; if (typed_array_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); len = oldlen = newlen = p->u.array.count; c = ','; /* default separator */ if (!toLocaleString && argc > 0 && !JS_IsUndefined(argv[0])) { sep = JS_ToString(ctx, argv[0]); if (JS_IsException(sep)) goto exception; s = JS_VALUE_GET_STRING(sep); if (s->len == 1 && !s->is_wide_char) c = s->u.str8[0]; else c = -1; // ToString(sep) can detach or resize the arraybuffer as a side effect newlen = p->u.array.count; len = min_int(len, newlen); } string_buffer_init(ctx, b, 0); /* XXX: optimize with direct access */ for(i = 0; i < len; i++) { if (i > 0) { if (c >= 0) { if (string_buffer_putc8(b, c)) goto fail; } else { if (string_buffer_concat(b, s, 0, s->len)) goto fail; } } el = JS_GetPropertyUint32(ctx, this_val, i); /* Can return undefined for example if the typed array is detached */ if (!JS_IsNull(el) && !JS_IsUndefined(el)) { if (JS_IsException(el)) goto fail; if (toLocaleString) { el = JS_ToLocaleStringFree(ctx, el); } if (string_buffer_concat_value_free(b, el)) goto fail; } } // add extra separators in case RAB was resized by evil .valueOf method i = max_int(1, newlen); for(/*empty*/; i < oldlen; i++) { if (c >= 0) { if (string_buffer_putc8(b, c)) goto fail; } else { if (string_buffer_concat(b, s, 0, s->len)) goto fail; } } JS_FreeValue(ctx, sep); return string_buffer_end(b); fail: string_buffer_free(b); JS_FreeValue(ctx, sep); exception: return JS_EXCEPTION; }
O3
c
js_typed_array_join: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r13 movq %rdi, %rbx cmpl $-0x1, %r13d jne 0x84085 movq %rsi, %r14 movzwl 0x6(%rsi), %eax addl $-0x15, %eax cmpw $0xc, %ax jae 0x84085 movl %r9d, %ebp movq %r8, %r15 movl %ecx, %r12d movq %r14, %rdi callq 0x39ddd testl %eax, %eax je 0x840b9 leaq 0x1fc51(%rip), %rsi # 0xa3cd4 jmp 0x8408c leaq 0x1fc37(%rip), %rsi # 0xa3cc3 xorl %r15d, %r15d movq %rbx, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %r14d xorl %ecx, %ecx orq %rcx, %r15 movq %r15, %rax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %ebp, %eax movl 0x40(%r14), %ebp movl %eax, 0x14(%rsp) testl %eax, %eax setne %dl testl %r12d, %r12d setle %cl movl $0x3, %esi movl $0x2c, %r12d xorl %eax, %eax orb %dl, %cl jne 0x84124 movq 0x8(%r15), %rdx xorl %eax, %eax movl %ebp, %edi movl %ebp, %ecx cmpl $0x3, %edx je 0x84128 movq (%r15), %rsi xorl %r15d, %r15d movq %rbx, %rdi xorl %ecx, %ecx callq 0x27518 movq %rdx, %rsi cmpl $0x6, %esi je 0x84099 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpl $0x1, 0x4(%rax) jne 0x84117 movzbl 0x18(%rax), %r12d movl 0x40(%r14), %ecx cmpl %ecx, %ebp movl %ecx, %edi cmovll %ebp, %edi jmp 0x84128 movl %ebp, %edi movl %ebp, %ecx movl %edi, %r15d movl %ecx, 0x10(%rsp) movq %rax, 0x8(%rsp) movq %rsi, 0x18(%rsp) movq %rbx, 0x20(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rsp) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x20686 movq %rax, 0x28(%rsp) testq %rax, %rax je 0x842db testl %r15d, %r15d jle 0x84207 movl %r15d, %eax movq %rax, 0x40(%rsp) xorl %r15d, %r15d testq %r15, %r15 je 0x841b0 testl %r12d, %r12d js 0x8418d leaq 0x20(%rsp), %rdi movl %r12d, %esi callq 0x4cb90 jmp 0x841a8 movq 0x8(%rsp), %rsi movl 0x4(%rsi), %ecx movl $0x7fffffff, %eax # imm = 0x7FFFFFFF andl %eax, %ecx leaq 0x20(%rsp), %rdi xorl %edx, %edx callq 0x42f71 testl %eax, %eax jne 0x8429a movq %rbx, %rdi movq %r14, %rsi movq %r13, %rdx movq %r15, %rcx callq 0x23bcc leal -0x2(%rdx), %ecx cmpl $0x2, %ecx jb 0x841f9 cmpl $0x6, %edx je 0x8429a cmpl $0x0, 0x14(%rsp) je 0x841e4 movq %rbx, %rdi movq %rax, %rsi callq 0x79fab leaq 0x20(%rsp), %rdi movq %rax, %rsi callq 0x4cbe5 testl %eax, %eax jne 0x8429a incq %r15 cmpq %r15, 0x40(%rsp) jne 0x84174 movl 0x10(%rsp), %ecx cmpl $0x2, %ecx movl $0x1, %eax cmovgel %ecx, %eax subl %eax, %ebp jle 0x84254 leaq 0x20(%rsp), %r14 movl $0x7fffffff, %r15d # imm = 0x7FFFFFFF testl %r12d, %r12d js 0x84237 movq %r14, %rdi movl %r12d, %esi callq 0x4cb90 jmp 0x8424c movq 0x8(%rsp), %rsi movl 0x4(%rsi), %ecx andl %r15d, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x42f71 testl %eax, %eax jne 0x8429a decl %ebp jne 0x84225 movq 0x18(%rsp), %rdx cmpl $-0x9, %edx movq 0x8(%rsp), %rsi jb 0x84278 movq 0x18(%rbx), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x84278 callq 0x20d90 leaq 0x20(%rsp), %rdi callq 0x33675 movq %rdx, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r15d jmp 0x840a1 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x1c845 movl $0x6, %r14d movq 0x18(%rsp), %rdx cmpl $-0x9, %edx jb 0x842d3 movq 0x18(%rbx), %rdi movq 0x8(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x842d3 callq 0x20d90 xorl %r15d, %r15d jmp 0x8409f movl $0x0, 0x34(%rsp) movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF jmp 0x84160
js_typed_array_join: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rdx mov rbx, rdi cmp r13d, 0FFFFFFFFh jnz short loc_84085 mov r14, rsi movzx eax, word ptr [rsi+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jnb short loc_84085 mov ebp, r9d mov r15, r8 mov r12d, ecx mov rdi, r14 call typed_array_is_oob test eax, eax jz short loc_840B9 lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" jmp short loc_8408C loc_84085: lea rsi, aNotATypedarray; "not a TypedArray" loc_8408C: xor r15d, r15d mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_84099: mov r14d, 6 loc_8409F: xor ecx, ecx loc_840A1: or r15, rcx mov rax, r15 mov rdx, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_840B9: mov eax, ebp mov ebp, [r14+40h] mov [rsp+78h+var_64], eax test eax, eax setnz dl test r12d, r12d setle cl mov esi, 3 mov r12d, 2Ch ; ',' xor eax, eax or cl, dl jnz short loc_84124 mov rdx, [r15+8] xor eax, eax mov edi, ebp mov ecx, ebp cmp edx, 3 jz short loc_84128 mov rsi, [r15] xor r15d, r15d mov rdi, rbx xor ecx, ecx call JS_ToStringInternal mov rsi, rdx cmp esi, 6 jz short loc_84099 mov r12d, 0FFFFFFFFh cmp dword ptr [rax+4], 1 jnz short loc_84117 movzx r12d, byte ptr [rax+18h] loc_84117: mov ecx, [r14+40h] cmp ebp, ecx mov edi, ecx cmovl edi, ebp jmp short loc_84128 loc_84124: mov edi, ebp mov ecx, ebp loc_84128: mov r15d, edi mov [rsp+78h+var_68], ecx mov [rsp+78h+var_70], rax mov [rsp+78h+var_60], rsi mov [rsp+78h+var_58], rbx xorps xmm0, xmm0 movups [rsp+78h+var_48], xmm0 mov rdi, rbx xor esi, esi xor edx, edx call js_alloc_string mov [rsp+78h+var_50], rax test rax, rax jz loc_842DB loc_84160: test r15d, r15d jle loc_84207 mov eax, r15d mov [rsp+78h+var_38], rax xor r15d, r15d loc_84174: test r15, r15 jz short loc_841B0 test r12d, r12d js short loc_8418D lea rdi, [rsp+78h+var_58] mov esi, r12d call string_buffer_putc8 jmp short loc_841A8 loc_8418D: mov rsi, [rsp+78h+var_70] mov ecx, [rsi+4] mov eax, 7FFFFFFFh and ecx, eax lea rdi, [rsp+78h+var_58] xor edx, edx call string_buffer_concat loc_841A8: test eax, eax jnz loc_8429A loc_841B0: mov rdi, rbx mov rsi, r14 mov rdx, r13 mov rcx, r15 call JS_GetPropertyInt64 lea ecx, [rdx-2] cmp ecx, 2 jb short loc_841F9 cmp edx, 6 jz loc_8429A cmp [rsp+78h+var_64], 0 jz short loc_841E4 mov rdi, rbx mov rsi, rax call JS_ToLocaleStringFree loc_841E4: lea rdi, [rsp+78h+var_58] mov rsi, rax call string_buffer_concat_value_free test eax, eax jnz loc_8429A loc_841F9: inc r15 cmp [rsp+78h+var_38], r15 jnz loc_84174 loc_84207: mov ecx, [rsp+78h+var_68] cmp ecx, 2 mov eax, 1 cmovge eax, ecx sub ebp, eax jle short loc_84254 lea r14, [rsp+78h+var_58] mov r15d, 7FFFFFFFh loc_84225: test r12d, r12d js short loc_84237 mov rdi, r14 mov esi, r12d call string_buffer_putc8 jmp short loc_8424C loc_84237: mov rsi, [rsp+78h+var_70] mov ecx, [rsi+4] and ecx, r15d mov rdi, r14 xor edx, edx call string_buffer_concat loc_8424C: test eax, eax jnz short loc_8429A dec ebp jnz short loc_84225 loc_84254: mov rdx, [rsp+78h+var_60] cmp edx, 0FFFFFFF7h mov rsi, [rsp+78h+var_70] jb short loc_84278 mov rdi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_84278 call js_free_value_rt loc_84278: lea rdi, [rsp+78h+var_58] call string_buffer_end mov r14, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r15d, eax jmp loc_840A1 loc_8429A: mov rdi, [rsp+78h+var_58] mov rsi, [rsp+78h+var_50] call js_free mov r14d, 6 mov rdx, [rsp+78h+var_60] cmp edx, 0FFFFFFF7h jb short loc_842D3 mov rdi, [rbx+18h] mov rsi, [rsp+78h+var_70] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_842D3 call js_free_value_rt loc_842D3: xor r15d, r15d jmp loc_8409F loc_842DB: mov dword ptr [rsp+78h+var_48+4], 0 mov dword ptr [rsp+78h+var_48+0Ch], 0FFFFFFFFh jmp loc_84160
unsigned long long js_typed_array_join( long long a1, long long a2, long long a3, long long a4, _QWORD *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v17; // ebp int v19; // r12d const char *v20; // rsi long long v21; // r15 unsigned long long v22; // rcx int v24; // eax int v25; // ebp bool v26; // dl bool v27; // cl long long v28; // rsi signed int v29; // r12d unsigned long long v30; // rax long long v31; // rdx int v32; // edi int v33; // ecx _DWORD *v34; // rsi long long v35; // rdx long long v36; // rdx long long v37; // rcx long long v38; // r8 long long v39; // r9 __m128 v40; // xmm4 __m128 v41; // xmm5 unsigned long long v42; // r15 int *PropertyInt64; // rax long long v45; // rcx int v46; // eax bool v47; // cc int v48; // ebp long long v50; // rdi int v51; // eax long long v52; // rcx long long v53; // rax long long v54; // r8 long long v55; // r9 long long v56; // rdi int v57; // eax long long v58; // rcx char v59; // [rsp+0h] [rbp-78h] long long v60; // [rsp+8h] [rbp-70h] int v61; // [rsp+10h] [rbp-68h] int v62; // [rsp+14h] [rbp-64h] long long v63; // [rsp+20h] [rbp-58h] BYREF long long v64; // [rsp+28h] [rbp-50h] __int128 v65; // [rsp+30h] [rbp-48h] long long v66; // [rsp+40h] [rbp-38h] if ( (_DWORD)a3 != -1 || (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu ) { v20 = "not a TypedArray"; goto LABEL_6; } v17 = a6; v19 = a4; if ( typed_array_is_oob(a2) ) { v20 = "ArrayBuffer is detached or resized"; LABEL_6: v21 = 0LL; JS_ThrowTypeError(a1, (long long)v20, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v59); LABEL_7: v22 = 0LL; return v22 | v21; } v24 = v17; v25 = *(_DWORD *)(a2 + 64); v62 = v24; v26 = v24 != 0; v27 = v19 <= 0; v28 = 3LL; v29 = 44; v30 = 0LL; if ( v26 || v27 ) { v32 = v25; v33 = v25; } else { v31 = a5[1]; v30 = 0LL; v32 = v25; v33 = v25; if ( (_DWORD)v31 != 3 ) { v34 = (_DWORD *)*a5; v21 = 0LL; v30 = JS_ToStringInternal(a1, v34, v31, 0LL, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v28 = v35; if ( (_DWORD)v35 == 6 ) goto LABEL_7; v29 = -1; if ( *(_DWORD *)(v30 + 4) == 1 ) v29 = *(unsigned __int8 *)(v30 + 24); v33 = *(_DWORD *)(a2 + 64); v32 = v33; if ( v25 < v33 ) v32 = v25; } } v61 = v33; v60 = v30; v63 = a1; v65 = 0LL; v64 = js_alloc_string(a1, 0LL, 0); if ( !v64 ) { DWORD1(v65) = 0; HIDWORD(v65) = -1; } if ( v32 > 0 ) { v66 = (unsigned int)v32; v42 = 0LL; do { if ( v42 ) { if ( v29 < 0 ? string_buffer_concat((long long)&v63, v60, 0, *(_DWORD *)(v60 + 4) & 0x7FFFFFFF) : (unsigned int)string_buffer_putc8( (long long)&v63, v29, (__m128)0LL, a8, a9, a10, v40, v41, a13, a14, v36, v37, v38, v39) ) { goto LABEL_45; } } PropertyInt64 = (int *)JS_GetPropertyInt64(a1, a2, a3, v42); v37 = (unsigned int)(v36 - 2); if ( (unsigned int)v37 >= 2 ) { if ( (_DWORD)v36 == 6 ) goto LABEL_45; if ( v62 ) PropertyInt64 = (int *)JS_ToLocaleStringFree( a1, PropertyInt64, v36, v37, v38, v39, (__m128)0LL, a8, a9, a10, v40, v41, a13, a14); if ( (unsigned int)string_buffer_concat_value_free( (long long)&v63, PropertyInt64, v36, v37, v38, v39, (__m128)0LL, a8, a9, a10, v40, v41, a13, a14) ) goto LABEL_45; } } while ( v66 != ++v42 ); } v45 = (unsigned int)v61; v46 = 1; if ( v61 >= 2 ) v46 = v61; v47 = v25 <= v46; v48 = v25 - v46; if ( !v47 ) { while ( !(v29 < 0 ? string_buffer_concat((long long)&v63, v60, 0, *(_DWORD *)(v60 + 4) & 0x7FFFFFFF) : (unsigned int)string_buffer_putc8( (long long)&v63, v29, (__m128)0LL, a8, a9, a10, v40, v41, a13, a14, v36, v45, v38, v39)) ) { if ( !--v48 ) goto LABEL_41; } LABEL_45: js_free(v63, v64); if ( (unsigned int)v28 >= 0xFFFFFFF7 ) { v56 = *(_QWORD *)(a1 + 24); v57 = *(_DWORD *)v60; v58 = (unsigned int)(*(_DWORD *)v60 - 1); *(_DWORD *)v60 = v58; if ( v57 <= 1 ) js_free_value_rt(v56, (_QWORD *)v60, v28, v58, v54, v55); } v21 = 0LL; goto LABEL_7; } LABEL_41: if ( (unsigned int)v28 >= 0xFFFFFFF7 ) { v50 = *(_QWORD *)(a1 + 24); v51 = *(_DWORD *)v60; v52 = (unsigned int)(*(_DWORD *)v60 - 1); *(_DWORD *)v60 = v52; if ( v51 <= 1 ) js_free_value_rt(v50, (_QWORD *)v60, v28, v52, v38, v39); } v53 = string_buffer_end(&v63); v22 = v53 & 0xFFFFFFFF00000000LL; v21 = (unsigned int)v53; return v22 | v21; }
js_typed_array_join: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RDX MOV RBX,RDI CMP R13D,-0x1 JNZ 0x00184085 MOV R14,RSI MOVZX EAX,word ptr [RSI + 0x6] ADD EAX,-0x15 CMP AX,0xc JNC 0x00184085 MOV EBP,R9D MOV R15,R8 MOV R12D,ECX MOV RDI,R14 CALL 0x00139ddd TEST EAX,EAX JZ 0x001840b9 LEA RSI,[0x1a3cd4] JMP 0x0018408c LAB_00184085: LEA RSI,[0x1a3cc3] LAB_0018408c: XOR R15D,R15D MOV RDI,RBX XOR EAX,EAX CALL 0x0012214f LAB_00184099: MOV R14D,0x6 LAB_0018409f: XOR ECX,ECX LAB_001840a1: OR R15,RCX MOV RAX,R15 MOV RDX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001840b9: MOV EAX,EBP MOV EBP,dword ptr [R14 + 0x40] MOV dword ptr [RSP + 0x14],EAX TEST EAX,EAX SETNZ DL TEST R12D,R12D SETLE CL MOV ESI,0x3 MOV R12D,0x2c XOR EAX,EAX OR CL,DL JNZ 0x00184124 MOV RDX,qword ptr [R15 + 0x8] XOR EAX,EAX MOV EDI,EBP MOV ECX,EBP CMP EDX,0x3 JZ 0x00184128 MOV RSI,qword ptr [R15] XOR R15D,R15D MOV RDI,RBX XOR ECX,ECX CALL 0x00127518 MOV RSI,RDX CMP ESI,0x6 JZ 0x00184099 MOV R12D,0xffffffff CMP dword ptr [RAX + 0x4],0x1 JNZ 0x00184117 MOVZX R12D,byte ptr [RAX + 0x18] LAB_00184117: MOV ECX,dword ptr [R14 + 0x40] CMP EBP,ECX MOV EDI,ECX CMOVL EDI,EBP JMP 0x00184128 LAB_00184124: MOV EDI,EBP MOV ECX,EBP LAB_00184128: MOV R15D,EDI MOV dword ptr [RSP + 0x10],ECX MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x30],XMM0 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x00120686 MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x001842db LAB_00184160: TEST R15D,R15D JLE 0x00184207 MOV EAX,R15D MOV qword ptr [RSP + 0x40],RAX XOR R15D,R15D LAB_00184174: TEST R15,R15 JZ 0x001841b0 TEST R12D,R12D JS 0x0018418d LEA RDI,[RSP + 0x20] MOV ESI,R12D CALL 0x0014cb90 JMP 0x001841a8 LAB_0018418d: MOV RSI,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSI + 0x4] MOV EAX,0x7fffffff AND ECX,EAX LEA RDI,[RSP + 0x20] XOR EDX,EDX CALL 0x00142f71 LAB_001841a8: TEST EAX,EAX JNZ 0x0018429a LAB_001841b0: MOV RDI,RBX MOV RSI,R14 MOV RDX,R13 MOV RCX,R15 CALL 0x00123bcc LEA ECX,[RDX + -0x2] CMP ECX,0x2 JC 0x001841f9 CMP EDX,0x6 JZ 0x0018429a CMP dword ptr [RSP + 0x14],0x0 JZ 0x001841e4 MOV RDI,RBX MOV RSI,RAX CALL 0x00179fab LAB_001841e4: LEA RDI,[RSP + 0x20] MOV RSI,RAX CALL 0x0014cbe5 TEST EAX,EAX JNZ 0x0018429a LAB_001841f9: INC R15 CMP qword ptr [RSP + 0x40],R15 JNZ 0x00184174 LAB_00184207: MOV ECX,dword ptr [RSP + 0x10] CMP ECX,0x2 MOV EAX,0x1 CMOVGE EAX,ECX SUB EBP,EAX JLE 0x00184254 LEA R14,[RSP + 0x20] MOV R15D,0x7fffffff LAB_00184225: TEST R12D,R12D JS 0x00184237 MOV RDI,R14 MOV ESI,R12D CALL 0x0014cb90 JMP 0x0018424c LAB_00184237: MOV RSI,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSI + 0x4] AND ECX,R15D MOV RDI,R14 XOR EDX,EDX CALL 0x00142f71 LAB_0018424c: TEST EAX,EAX JNZ 0x0018429a DEC EBP JNZ 0x00184225 LAB_00184254: MOV RDX,qword ptr [RSP + 0x18] CMP EDX,-0x9 MOV RSI,qword ptr [RSP + 0x8] JC 0x00184278 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00184278 CALL 0x00120d90 LAB_00184278: LEA RDI,[RSP + 0x20] CALL 0x00133675 MOV R14,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R15D,EAX JMP 0x001840a1 LAB_0018429a: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0011c845 MOV R14D,0x6 MOV RDX,qword ptr [RSP + 0x18] CMP EDX,-0x9 JC 0x001842d3 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x001842d3 CALL 0x00120d90 LAB_001842d3: XOR R15D,R15D JMP 0x0018409f LAB_001842db: MOV dword ptr [RSP + 0x34],0x0 MOV dword ptr [RSP + 0x3c],0xffffffff JMP 0x00184160
int1 [16] js_typed_array_join(long param_1,long param_2,int8 param_3,int param_4,int8 *param_5, int param_6) { uint uVar1; int iVar2; int iVar3; int *piVar4; int8 uVar5; uint uVar6; char *pcVar7; uint uVar8; uint uVar9; ulong uVar10; ulong uVar11; int1 auVar12 [12]; int1 auVar13 [12]; int1 auVar14 [16]; long local_58; long local_50; ulong local_48; int8 uStack_40; ulong local_38; if (((int)param_3 == -1) && ((ushort)(*(short *)(param_2 + 6) - 0x15U) < 0xc)) { iVar2 = typed_array_is_oob(param_2); if (iVar2 == 0) { uVar1 = *(uint *)(param_2 + 0x40); uVar9 = 0x2c; auVar12 = ZEXT412(3) << 0x40; uVar8 = uVar1; uVar6 = uVar1; if (0 < param_4 && param_6 == 0) { auVar12 = ZEXT412(3) << 0x40; if ((int)param_5[1] != 3) { auVar12 = JS_ToStringInternal(param_1,*param_5,param_5[1],0); if (auVar12._8_4_ == 6) goto LAB_0018409f; uVar9 = 0xffffffff; if (*(int *)(auVar12._0_8_ + 4) == 1) { uVar9 = (uint)*(byte *)(auVar12._0_8_ + 0x18); } uVar6 = *(uint *)(param_2 + 0x40); uVar8 = uVar6; if ((int)uVar1 < (int)uVar6) { uVar8 = uVar1; } } } piVar4 = auVar12._0_8_; local_48 = 0; uStack_40 = 0; local_58 = param_1; local_50 = js_alloc_string(param_1,0,0); if (local_50 == 0) { local_48 = local_48 & 0xffffffff; uStack_40 = CONCAT44(0xffffffff,(int4)uStack_40); } if (0 < (int)uVar8) { uVar10 = 0; local_38 = (ulong)uVar8; do { if (uVar10 != 0) { if ((int)uVar9 < 0) { iVar2 = string_buffer_concat(&local_58,piVar4,0,piVar4[1] & 0x7fffffff); } else { iVar2 = string_buffer_putc8(&local_58,uVar9); } if (iVar2 != 0) goto LAB_0018429a; } auVar13 = JS_GetPropertyInt64(param_1,param_2,param_3,uVar10); uVar5 = auVar13._0_8_; if (1 < auVar13._8_4_ - 2U) { if (auVar13._8_4_ == 6) goto LAB_0018429a; if (param_6 != 0) { uVar5 = JS_ToLocaleStringFree(param_1,uVar5); } iVar2 = string_buffer_concat_value_free(&local_58,uVar5); if (iVar2 != 0) goto LAB_0018429a; } uVar10 = uVar10 + 1; } while (local_38 != uVar10); } uVar8 = 1; if (1 < (int)uVar6) { uVar8 = uVar6; } iVar2 = uVar1 - uVar8; if (iVar2 != 0 && (int)uVar8 <= (int)uVar1) { do { if ((int)uVar9 < 0) { iVar3 = string_buffer_concat(&local_58,piVar4,0,piVar4[1] & 0x7fffffff); } else { iVar3 = string_buffer_putc8(&local_58,uVar9); } if (iVar3 != 0) goto LAB_0018429a; iVar2 = iVar2 + -1; } while (iVar2 != 0); } if (0xfffffff6 < auVar12._8_4_) { uVar5 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar4; *piVar4 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar5); } } auVar14 = string_buffer_end(&local_58); uVar5 = auVar14._8_8_; uVar10 = auVar14._0_8_ & 0xffffffff00000000; uVar11 = auVar14._0_8_ & 0xffffffff; goto LAB_001840a1; } pcVar7 = "ArrayBuffer is detached or resized"; } else { pcVar7 = "not a TypedArray"; } JS_ThrowTypeError(param_1,pcVar7); goto LAB_0018409f; LAB_0018429a: js_free(local_58,local_50); if (0xfffffff6 < auVar12._8_4_) { uVar5 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar4; *piVar4 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar5); } } LAB_0018409f: uVar11 = 0; uVar5 = 6; uVar10 = 0; LAB_001840a1: auVar14._8_8_ = uVar5; auVar14._0_8_ = uVar11 | uVar10; return auVar14; }
61,992
google::protobuf::compiler::java::ImmutableEnumOneofFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/enum_field.cc
void ImmutableEnumOneofFieldGenerator::GenerateSerializedSizeCode( io::Printer* printer) const { printer->Print( variables_, "if ($has_oneof_case_message$) {\n" " size += com.google.protobuf.CodedOutputStream\n" " .computeEnumSize($number$, ((java.lang.Integer) $oneof_name$_));\n" "}\n"); }
O3
cpp
google::protobuf::compiler::java::ImmutableEnumOneofFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const: movq %rsi, %rax leaq 0x18(%rdi), %rsi leaq 0xf3e70(%rip), %rdx # 0x1e8d80 movq %rax, %rdi jmp 0x16cd32
_ZNK6google8protobuf8compiler4java32ImmutableEnumOneofFieldGenerator26GenerateSerializedSizeCodeEPNS0_2io7PrinterE: mov rax, rsi lea rsi, [rdi+18h] lea rdx, aIfHasOneofCase_14; "if ($has_oneof_case_message$) {\n size"... mov rdi, rax; this jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
long long google::protobuf::compiler::java::ImmutableEnumOneofFieldGenerator::GenerateSerializedSizeCode( google::protobuf::compiler::java::ImmutableEnumOneofFieldGenerator *this, google::protobuf::io::Printer *a2, long long a3, long long a4, long long a5, long long a6, void *a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15, void *a16, int a17, char a18) { return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
GenerateSerializedSizeCode: MOV RAX,RSI LEA RSI,[RDI + 0x18] LEA RDX,[0x2e8d80] MOV RDI,RAX JMP 0x0026cd32
/* google::protobuf::compiler::java::ImmutableEnumOneofFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::ImmutableEnumOneofFieldGenerator::GenerateSerializedSizeCode (ImmutableEnumOneofFieldGenerator *this,Printer *param_1) { io::Printer::Print(param_1,(map *)(this + 0x18), "if ($has_oneof_case_message$) {\n size += com.google.protobuf.CodedOutputStream\n .computeEnumSize($number$, ((java.lang.Integer) $oneof_name$_));\n}\n" ); return; }
61,993
MainWindow::update_endstair(Elevetor&)
LeafBlue[P]myElevetor/mainwindow.cpp
void MainWindow::update_endstair(Elevetor& thisele) { if(thisele.status != 3){ return; } QPoint newstart = thisele.ele->pos(); int end_y = (12 - thisele.endstair) * 60; int move_y = abs(newstart.y() - end_y); if(thisele.anime&&thisele.anime!=nullptr){ //先断开连接,再执行stop,防止先执行stop触发原connect disconnect(thisele.anime,&QPropertyAnimation::finished,nullptr,nullptr); thisele.anime->stop(); thisele.anime->deleteLater(); thisele.anime = nullptr; } thisele.anime = new QPropertyAnimation(thisele.ele,"pos"); //move_v 每像素移动所需时间 thisele.anime->setDuration(move_v * move_y); thisele.anime->setStartValue(newstart); QPoint endpoint(newstart.x(),end_y); thisele.anime->setEndValue(endpoint); connect(thisele.anime,&QPropertyAnimation::finished,[this,&thisele](){ arrive_stair(thisele); }); thisele.anime->start(); }
O0
cpp
MainWindow::update_endstair(Elevetor&): pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xd0(%rbp) movq -0x10(%rbp), %rax cmpl $0x3, 0x4c(%rax) je 0x631d jmp 0x657e movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x55c0 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rcx movl $0xc, %eax subl 0x44(%rcx), %eax imull $0x3c, %eax, %eax movl %eax, -0x1c(%rbp) leaq -0x18(%rbp), %rdi callq 0xd390 subl -0x1c(%rbp), %eax movl %eax, %ecx negl %ecx cmovnsl %ecx, %eax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x63c2 movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x63c2 movq -0x10(%rbp), %rax movq 0x50(%rax), %rdi movq 0x19c6d(%rip), %rax # 0x1ffe8 movq %rax, -0x30(%rbp) movq $0x0, -0x28(%rbp) movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx xorl %eax, %eax movl %eax, %r8d movq %r8, %rcx callq 0xd3d0 movq -0x10(%rbp), %rax movq 0x50(%rax), %rdi callq 0x5540 movq -0x10(%rbp), %rax movq 0x50(%rax), %rdi callq 0x5120 movq -0x10(%rbp), %rax movq $0x0, 0x50(%rax) movl $0x10, %edi callq 0x53a0 movq %rax, -0xe0(%rbp) movb $0x1, -0x55(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0xd8(%rbp) leaq 0x1129f(%rip), %rsi # 0x1768c leaq -0x48(%rbp), %rdi movq $-0x1, %rdx callq 0x5520 jmp 0x63ff movq -0xd8(%rbp), %rsi movq -0xe0(%rbp), %rdi xorl %eax, %eax movl %eax, %ecx leaq -0x48(%rbp), %rdx callq 0x5270 jmp 0x641c movq -0xe0(%rbp), %rcx movb $0x0, -0x55(%rbp) movq -0x10(%rbp), %rax movq %rcx, 0x50(%rax) leaq -0x48(%rbp), %rdi callq 0xd2a0 movq -0xd0(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x50(%rcx), %rdi movl 0x198(%rax), %esi movl -0x20(%rbp), %eax imull %eax, %esi callq 0x5380 movq -0x10(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0xf0(%rbp) leaq -0x78(%rbp), %rdi movq %rdi, -0xe8(%rbp) leaq -0x18(%rbp), %rsi callq 0x5100 movq -0xf0(%rbp), %rdi movq -0xe8(%rbp), %rsi callq 0x5230 jmp 0x6490 leaq -0x78(%rbp), %rdi callq 0x5180 leaq -0x18(%rbp), %rdi callq 0xd380 movl %eax, %esi movl -0x1c(%rbp), %edx leaq -0x80(%rbp), %rdi movq %rdi, -0x108(%rbp) callq 0xd3b0 movq -0x108(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x100(%rbp) leaq -0xa0(%rbp), %rdi movq %rdi, -0xf8(%rbp) callq 0x5100 movq -0x100(%rbp), %rdi movq -0xf8(%rbp), %rsi callq 0x54d0 jmp 0x64f5 leaq -0xa0(%rbp), %rdi callq 0x5180 movq -0xd0(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x50(%rcx), %rsi movq %rax, -0xb8(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xb0(%rbp) movq 0x19abf(%rip), %rax # 0x1ffe8 movq %rax, -0xc8(%rbp) movq $0x0, -0xc0(%rbp) movq -0xc8(%rbp), %rdx movq -0xc0(%rbp), %rcx movq -0xb8(%rbp), %r8 movq -0xb0(%rbp), %r9 leaq -0xa8(%rbp), %rdi callq 0xa640 leaq -0xa8(%rbp), %rdi callq 0x51d0 movq -0x10(%rbp), %rax movq 0x50(%rax), %rdi xorl %esi, %esi callq 0x5300 addq $0x110, %rsp # imm = 0x110 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x65aa movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x48(%rbp), %rdi callq 0xd2a0 testb $0x1, -0x55(%rbp) jne 0x65b2 jmp 0x65c3 movq -0xe0(%rbp), %rdi movl $0x10, %esi callq 0x5070 jmp 0x65f4 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x78(%rbp), %rdi callq 0x5180 jmp 0x65f4 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0xa0(%rbp), %rdi callq 0x5180 movq -0x50(%rbp), %rdi callq 0x51e0 nopl (%rax)
_ZN10MainWindow15update_endstairER8Elevetor: push rbp mov rbp, rsp sub rsp, 110h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_D0], rax mov rax, [rbp+var_10] cmp dword ptr [rax+4Ch], 3 jz short loc_631D jmp loc_657E loc_631D: mov rax, [rbp+var_10] mov rdi, [rax+38h]; this call __ZNK7QWidget3posEv; QWidget::pos(void) mov [rbp+var_18], rax mov rcx, [rbp+var_10] mov eax, 0Ch sub eax, [rcx+44h] imul eax, 3Ch ; '<' mov [rbp+var_1C], eax lea rdi, [rbp+var_18]; this call _ZNK6QPoint1yEv; QPoint::y(void) sub eax, [rbp+var_1C] mov ecx, eax neg ecx cmovns eax, ecx mov [rbp+var_20], eax mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_63C2 mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_63C2 mov rax, [rbp+var_10] mov rdi, [rax+50h] mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr mov [rbp+var_30], rax mov [rbp+var_28], 0 mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] xor eax, eax mov r8d, eax mov rcx, r8 call _ZN7QObject10disconnectIM18QAbstractAnimationFvvEEEbPKN9QtPrivate15FunctionPointerIT_E6ObjectES6_PKS_PPv; QObject::disconnect<void (QAbstractAnimation::*)(void)>(QtPrivate::FunctionPointer<void (QAbstractAnimation::*)(void)>::Object const*,void (QAbstractAnimation::*)(void),QObject const*,void **) mov rax, [rbp+var_10] mov rdi, [rax+50h]; this call __ZN18QAbstractAnimation4stopEv; QAbstractAnimation::stop(void) mov rax, [rbp+var_10] mov rdi, [rax+50h]; this call __ZN7QObject11deleteLaterEv; QObject::deleteLater(void) mov rax, [rbp+var_10] mov qword ptr [rax+50h], 0 loc_63C2: mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_E0], rax mov [rbp+var_55], 1 mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_D8], rax lea rsi, aPos; "pos" lea rdi, [rbp+var_48]; this mov rdx, 0FFFFFFFFFFFFFFFFh; __int64 call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long) jmp short $+2 loc_63FF: mov rsi, [rbp+var_D8]; QObject * mov rdi, [rbp+var_E0]; this xor eax, eax mov ecx, eax; QObject * lea rdx, [rbp+var_48]; QByteArray * call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *) jmp short $+2 loc_641C: mov rcx, [rbp+var_E0] mov [rbp+var_55], 0 mov rax, [rbp+var_10] mov [rax+50h], rcx lea rdi, [rbp+var_48]; this call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray() mov rax, [rbp+var_D0] mov rcx, [rbp+var_10] mov rdi, [rcx+50h]; this mov esi, [rax+198h] mov eax, [rbp+var_20] imul esi, eax; int call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int) mov rax, [rbp+var_10] mov rax, [rax+50h] mov [rbp+var_F0], rax lea rdi, [rbp+var_78]; this mov [rbp+var_E8], rdi lea rsi, [rbp+var_18]; QPoint * call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&) mov rdi, [rbp+var_F0]; this mov rsi, [rbp+var_E8]; QVariant * call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&) jmp short $+2 loc_6490: lea rdi, [rbp+var_78]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() lea rdi, [rbp+var_18]; this call _ZNK6QPoint1xEv; QPoint::x(void) mov esi, eax; int mov edx, [rbp+var_1C]; int lea rdi, [rbp+var_80]; this mov [rbp+var_108], rdi call _ZN6QPointC2Eii; QPoint::QPoint(int,int) mov rsi, [rbp+var_108]; QPoint * mov rax, [rbp+var_10] mov rax, [rax+50h] mov [rbp+var_100], rax lea rdi, [rbp+var_A0]; this mov [rbp+var_F8], rdi call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&) mov rdi, [rbp+var_100]; this mov rsi, [rbp+var_F8]; QVariant * call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&) jmp short $+2 loc_64F5: lea rdi, [rbp+var_A0]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov rax, [rbp+var_D0] mov rcx, [rbp+var_10] mov rsi, [rcx+50h] mov [rbp+var_B8], rax mov rax, [rbp+var_10] mov [rbp+var_B0], rax mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr mov [rbp+var_C8], rax mov [rbp+var_C0], 0 mov rdx, [rbp+var_C8] mov rcx, [rbp+var_C0] mov r8, [rbp+var_B8] mov r9, [rbp+var_B0] lea rdi, [rbp+var_A8] call _ZN7QObject7connectIM18QAbstractAnimationFvvEZN10MainWindow15update_endstairER8ElevetorE3$_0EENSt9enable_ifIXeqsr9QtPrivate15FunctionPointerIT0_EE13ArgumentCountngLi1EEN11QMetaObject10ConnectionEE4typeEPKN9QtPrivate15FunctionPointerIT_E6ObjectESG_S9_ lea rdi, [rbp+var_A8]; this call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection() mov rax, [rbp+var_10] mov rdi, [rax+50h] xor esi, esi call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy) loc_657E: add rsp, 110h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp short loc_65AA mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_48]; this call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray() loc_65AA: test [rbp+var_55], 1 jnz short loc_65B2 jmp short loc_65C3 loc_65B2: mov rdi, [rbp+var_E0]; void * mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_65C3: jmp short loc_65F4 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_78]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() jmp short loc_65F4 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_A0]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() loc_65F4: mov rdi, [rbp+var_50] call __Unwind_Resume
Elevetor * MainWindow::update_endstair(MainWindow *this, Elevetor *a2) { Elevetor *result; // rax int v3; // eax long long v4; // rdi int v5; // eax QVariantAnimation *v6; // [rsp+10h] [rbp-100h] QVariantAnimation *v7; // [rsp+20h] [rbp-F0h] QPropertyAnimation *v8; // [rsp+30h] [rbp-E0h] QObject *v9; // [rsp+38h] [rbp-D8h] _BYTE v11[8]; // [rsp+68h] [rbp-A8h] BYREF _BYTE v12[32]; // [rsp+70h] [rbp-A0h] BYREF _BYTE v13[8]; // [rsp+90h] [rbp-80h] BYREF _BYTE v14[35]; // [rsp+98h] [rbp-78h] BYREF char v15; // [rsp+BBh] [rbp-55h] _BYTE v16[24]; // [rsp+C8h] [rbp-48h] BYREF _QWORD (**v17)(QAbstractAnimation *__hidden); // [rsp+E0h] [rbp-30h] long long v18; // [rsp+E8h] [rbp-28h] int v19; // [rsp+F0h] [rbp-20h] int v20; // [rsp+F4h] [rbp-1Ch] long long v21; // [rsp+F8h] [rbp-18h] BYREF Elevetor *v22; // [rsp+100h] [rbp-10h] MainWindow *v23; // [rsp+108h] [rbp-8h] v23 = this; v22 = a2; result = a2; if ( *((_DWORD *)a2 + 19) == 3 ) { v21 = QWidget::pos(*((QWidget **)v22 + 7)); v20 = 60 * (12 - *((_DWORD *)v22 + 17)); v3 = QPoint::y((QPoint *)&v21) - v20; if ( v3 <= 0 ) v3 = -v3; v19 = v3; if ( *((_QWORD *)v22 + 10) ) { v4 = *((_QWORD *)v22 + 10); v17 = &QAbstractAnimation::finished; v18 = 0LL; QObject::disconnect<void (QAbstractAnimation::*)(void)>(v4, &QAbstractAnimation::finished, 0LL, 0LL); QAbstractAnimation::stop(*((QAbstractAnimation **)v22 + 10)); QObject::deleteLater(*((QObject **)v22 + 10)); *((_QWORD *)v22 + 10) = 0LL; } v8 = (QPropertyAnimation *)operator new(0x10uLL); v15 = 1; v9 = (QObject *)*((_QWORD *)v22 + 7); QByteArray::QByteArray((QByteArray *)v16, "pos", -1LL); QPropertyAnimation::QPropertyAnimation(v8, v9, (const QByteArray *)v16, 0LL); v15 = 0; *((_QWORD *)v22 + 10) = v8; QByteArray::~QByteArray((QByteArray *)v16); QVariantAnimation::setDuration(*((QVariantAnimation **)v22 + 10), v19 * *((_DWORD *)this + 102)); v7 = (QVariantAnimation *)*((_QWORD *)v22 + 10); QVariant::QVariant((QVariant *)v14, (const QPoint *)&v21); QVariantAnimation::setStartValue(v7, (const QVariant *)v14); QVariant::~QVariant((QVariant *)v14); v5 = QPoint::x((QPoint *)&v21); QPoint::QPoint((QPoint *)v13, v5, v20); v6 = (QVariantAnimation *)*((_QWORD *)v22 + 10); QVariant::QVariant((QVariant *)v12, (const QPoint *)v13); QVariantAnimation::setEndValue(v6, (const QVariant *)v12); QVariant::~QVariant((QVariant *)v12); QObject::connect<void (QAbstractAnimation::*)(void),MainWindow::update_endstair(Elevetor &)::$_0>( v11, *((_QWORD *)v22 + 10), &QAbstractAnimation::finished, 0LL, this, v22); QMetaObject::Connection::~Connection((QMetaObject::Connection *)v11); return (Elevetor *)QAbstractAnimation::start(*((_QWORD *)v22 + 10), 0LL); } return result; }
update_endstair: PUSH RBP MOV RBP,RSP SUB RSP,0x110 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4c],0x3 JZ 0x0010631d JMP 0x0010657e LAB_0010631d: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x001055c0 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x10] MOV EAX,0xc SUB EAX,dword ptr [RCX + 0x44] IMUL EAX,EAX,0x3c MOV dword ptr [RBP + -0x1c],EAX LEA RDI,[RBP + -0x18] CALL 0x0010d390 SUB EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX NEG ECX CMOVNS EAX,ECX MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x50],0x0 JZ 0x001063c2 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x50],0x0 JZ 0x001063c2 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x50] MOV RAX,qword ptr [0x0011ffe8] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x28],0x0 MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] XOR EAX,EAX MOV R8D,EAX MOV RCX,R8 CALL 0x0010d3d0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x50] CALL 0x00105540 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x50] CALL 0x00105120 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x50],0x0 LAB_001063c2: MOV EDI,0x10 CALL 0x001053a0 MOV qword ptr [RBP + -0xe0],RAX MOV byte ptr [RBP + -0x55],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0xd8],RAX LAB_001063e6: LEA RSI,[0x11768c] LEA RDI,[RBP + -0x48] MOV RDX,-0x1 CALL 0x00105520 JMP 0x001063ff LAB_001063ff: MOV RSI,qword ptr [RBP + -0xd8] MOV RDI,qword ptr [RBP + -0xe0] XOR EAX,EAX MOV ECX,EAX LEA RDX,[RBP + -0x48] CALL 0x00105270 LAB_0010641a: JMP 0x0010641c LAB_0010641c: MOV RCX,qword ptr [RBP + -0xe0] MOV byte ptr [RBP + -0x55],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x50],RCX LEA RDI,[RBP + -0x48] CALL 0x0010d2a0 MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x50] MOV ESI,dword ptr [RAX + 0x198] MOV EAX,dword ptr [RBP + -0x20] IMUL ESI,EAX CALL 0x00105380 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0xf0],RAX LEA RDI,[RBP + -0x78] MOV qword ptr [RBP + -0xe8],RDI LEA RSI,[RBP + -0x18] CALL 0x00105100 MOV RDI,qword ptr [RBP + -0xf0] MOV RSI,qword ptr [RBP + -0xe8] LAB_00106489: CALL 0x00105230 LAB_0010648e: JMP 0x00106490 LAB_00106490: LEA RDI,[RBP + -0x78] CALL 0x00105180 LEA RDI,[RBP + -0x18] CALL 0x0010d380 MOV ESI,EAX MOV EDX,dword ptr [RBP + -0x1c] LEA RDI,[RBP + -0x80] MOV qword ptr [RBP + -0x108],RDI CALL 0x0010d3b0 MOV RSI,qword ptr [RBP + -0x108] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x100],RAX LEA RDI,[RBP + -0xa0] MOV qword ptr [RBP + -0xf8],RDI CALL 0x00105100 MOV RDI,qword ptr [RBP + -0x100] MOV RSI,qword ptr [RBP + -0xf8] LAB_001064ee: CALL 0x001054d0 LAB_001064f3: JMP 0x001064f5 LAB_001064f5: LEA RDI,[RBP + -0xa0] CALL 0x00105180 MOV RAX,qword ptr [RBP + -0xd0] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x50] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [0x0011ffe8] MOV qword ptr [RBP + -0xc8],RAX MOV qword ptr [RBP + -0xc0],0x0 MOV RDX,qword ptr [RBP + -0xc8] MOV RCX,qword ptr [RBP + -0xc0] MOV R8,qword ptr [RBP + -0xb8] MOV R9,qword ptr [RBP + -0xb0] LEA RDI,[RBP + -0xa8] CALL 0x0010a640 LEA RDI,[RBP + -0xa8] CALL 0x001051d0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x50] XOR ESI,ESI CALL 0x00105300 LAB_0010657e: ADD RSP,0x110 POP RBP RET
/* MainWindow::update_endstair(Elevetor&) */ void __thiscall MainWindow::update_endstair(MainWindow *this,Elevetor *param_1) { QObject *pQVar1; QVariant *pQVar2; int iVar3; QPropertyAnimation *this_00; Connection local_b0 [8]; QVariant local_a8 [32]; QPoint local_88 [8]; QVariant local_80 [35]; int1 local_5d; QByteArray local_50 [24]; int *local_38; int8 local_30; int local_28; int local_24; int8 local_20; Elevetor *local_18; MainWindow *local_10; if (*(int *)(param_1 + 0x4c) == 3) { local_18 = param_1; local_10 = this; local_20 = QWidget::pos(); local_24 = (0xc - *(int *)(local_18 + 0x44)) * 0x3c; local_28 = QPoint::y((QPoint *)&local_20); local_28 = local_28 - local_24; if (local_28 < 1) { local_28 = -local_28; } if ((*(long *)(local_18 + 0x50) != 0) && (*(long *)(local_18 + 0x50) != 0)) { local_38 = PTR_finished_0011ffe8; local_30 = 0; QObject::disconnect<void(QAbstractAnimation::*)()> (*(QObject **)(local_18 + 0x50),(Object *)PTR_finished_0011ffe8,(_func_void *)0x0, (QObject *)0x0,(void **)0x0); QAbstractAnimation::stop(); QObject::deleteLater(); *(int8 *)(local_18 + 0x50) = 0; } this_00 = (QPropertyAnimation *)operator_new(0x10); local_5d = 1; pQVar1 = *(QObject **)(local_18 + 0x38); /* try { // try from 001063e6 to 001063fc has its CatchHandler @ 00106587 */ QByteArray::QByteArray(local_50,"pos",-1); /* try { // try from 001063ff to 00106419 has its CatchHandler @ 00106595 */ QPropertyAnimation::QPropertyAnimation(this_00,pQVar1,local_50,(QObject *)0x0); local_5d = 0; *(QPropertyAnimation **)(local_18 + 0x50) = this_00; QByteArray::~QByteArray(local_50); QVariantAnimation::setDuration((int)*(int8 *)(local_18 + 0x50)); pQVar2 = *(QVariant **)(local_18 + 0x50); QVariant::QVariant(local_80,(QPoint *)&local_20); /* try { // try from 00106489 to 0010648d has its CatchHandler @ 001065c5 */ QVariantAnimation::setStartValue(pQVar2); QVariant::~QVariant(local_80); iVar3 = QPoint::x((QPoint *)&local_20); QPoint::QPoint(local_88,iVar3,local_24); pQVar2 = *(QVariant **)(local_18 + 0x50); QVariant::QVariant(local_a8,local_88); /* try { // try from 001064ee to 001064f2 has its CatchHandler @ 001065dc */ QVariantAnimation::setEndValue(pQVar2); QVariant::~QVariant(local_a8); QObject::connect<void(QAbstractAnimation::*)(),MainWindow::update_endstair(Elevetor&)::__0> (local_b0,*(int8 *)(local_18 + 0x50),PTR_finished_0011ffe8,0,this,local_18); QMetaObject::Connection::~Connection(local_b0); QAbstractAnimation::start(*(int8 *)(local_18 + 0x50),0); } return; }
61,994
MainWindow::update_endstair(Elevetor&)
LeafBlue[P]myElevetor/mainwindow.cpp
void MainWindow::update_endstair(Elevetor& thisele) { if(thisele.status != 3){ return; } QPoint newstart = thisele.ele->pos(); int end_y = (12 - thisele.endstair) * 60; int move_y = abs(newstart.y() - end_y); if(thisele.anime&&thisele.anime!=nullptr){ //先断开连接,再执行stop,防止先执行stop触发原connect disconnect(thisele.anime,&QPropertyAnimation::finished,nullptr,nullptr); thisele.anime->stop(); thisele.anime->deleteLater(); thisele.anime = nullptr; } thisele.anime = new QPropertyAnimation(thisele.ele,"pos"); //move_v 每像素移动所需时间 thisele.anime->setDuration(move_v * move_y); thisele.anime->setStartValue(newstart); QPoint endpoint(newstart.x(),end_y); thisele.anime->setEndValue(endpoint); connect(thisele.anime,&QPropertyAnimation::finished,[this,&thisele](){ arrive_stair(thisele); }); thisele.anime->start(); }
O2
cpp
MainWindow::update_endstair(Elevetor&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp cmpl $0x3, 0x4c(%rsi) jne 0x4da1 movq %rsi, %rbx movq %rdi, %r14 movq 0x38(%rsi), %rdi callq 0x45b0 movq %rax, 0x20(%rsp) pushq $0xc popq %rcx subl 0x44(%rbx), %ecx imull $0x3c, %ecx, %r13d shrq $0x20, %rax subl %r13d, %eax movl %eax, %ebp negl %ebp cmovsl %eax, %ebp movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x4c6f movq 0xa3a4(%rip), %rsi # 0xeff0 xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x71fa movq 0x50(%rbx), %rdi callq 0x4530 movq 0x50(%rbx), %rdi callq 0x4110 andq $0x0, 0x50(%rbx) pushq $0x10 popq %rdi callq 0x4390 movq %rax, %r15 movq 0x38(%rbx), %r12 leaq 0x5a1f(%rip), %rsi # 0xa6a4 leaq 0x28(%rsp), %rdi pushq $-0x1 popq %rdx callq 0x4510 leaq 0x28(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi xorl %ecx, %ecx callq 0x4260 movq %r15, 0x50(%rbx) leaq 0x28(%rsp), %rdi callq 0x7382 movq 0x50(%rbx), %rdi imull 0x198(%r14), %ebp movl %ebp, %esi callq 0x4370 movq 0x50(%rbx), %r15 leaq 0x28(%rsp), %r12 leaq 0x20(%rsp), %rsi movq %r12, %rdi callq 0x4100 movq %r15, %rdi movq %r12, %rsi callq 0x4220 leaq 0x28(%rsp), %rdi callq 0x4170 movl 0x20(%rsp), %eax leaq 0x50(%rsp), %rsi movl %eax, (%rsi) movl %r13d, 0x4(%rsi) movq 0x50(%rbx), %r15 leaq 0x28(%rsp), %r12 movq %r12, %rdi callq 0x4100 movq %r15, %rdi movq %r12, %rsi callq 0x44c0 leaq 0x28(%rsp), %r15 movq %r15, %rdi callq 0x4170 movq 0x50(%rbx), %r12 movq 0xa2bd(%rip), %rax # 0xeff0 movq %rax, (%r15) andq $0x0, 0x8(%r15) pushq $0x20 popq %rdi callq 0x4390 pushq $0x1 popq %rcx movl %ecx, (%rax) leaq 0x2185(%rip), %rdx # 0x6ed4 movq %rdx, 0x8(%rax) movq %r14, 0x10(%rax) movq %rbx, 0x18(%rax) movq 0xa226(%rip), %rdx # 0xef88 movq %rdx, 0x10(%rsp) movl %ecx, (%rsp) andq $0x0, 0x8(%rsp) leaq 0x48(%rsp), %r14 leaq 0x28(%rsp), %rdx movq %r14, %rdi movq %r12, %rsi movq %r12, %rcx xorl %r8d, %r8d movq %rax, %r9 callq 0x42a0 movq %r14, %rdi callq 0x41c0 movq 0x50(%rbx), %rdi xorl %esi, %esi callq 0x42f0 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4db2 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x4170 jmp 0x4dde movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x7382 jmp 0x4dd3 movq %rax, %rbx pushq $0x10 popq %rsi movq %r15, %rdi callq 0x4070 movq %rbx, %rdi callq 0x41d0
_ZN10MainWindow15update_endstairER8Elevetor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h cmp dword ptr [rsi+4Ch], 3 jnz loc_4DA1 mov rbx, rsi mov r14, rdi mov rdi, [rsi+38h]; this call __ZNK7QWidget3posEv; QWidget::pos(void) mov [rsp+88h+var_68], rax push 0Ch pop rcx sub ecx, [rbx+44h] imul r13d, ecx, 3Ch ; '<' shr rax, 20h sub eax, r13d mov ebp, eax neg ebp cmovs ebp, eax mov rdi, [rbx+50h] test rdi, rdi jz short loc_4C6F mov rsi, cs:_ZN18QAbstractAnimation8finishedEv_ptr xor edx, edx xor ecx, ecx xor r8d, r8d call _ZN7QObject10disconnectIM18QAbstractAnimationFvvEEEbPKN9QtPrivate15FunctionPointerIT_E6ObjectES6_PKS_PPv; QObject::disconnect<void (QAbstractAnimation::*)(void)>(QtPrivate::FunctionPointer<void (QAbstractAnimation::*)(void)>::Object const*,void (QAbstractAnimation::*)(void),QObject const*,void **) mov rdi, [rbx+50h]; this call __ZN18QAbstractAnimation4stopEv; QAbstractAnimation::stop(void) mov rdi, [rbx+50h]; this call __ZN7QObject11deleteLaterEv; QObject::deleteLater(void) and qword ptr [rbx+50h], 0 loc_4C6F: push 10h pop rdi; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov r12, [rbx+38h] lea rsi, aPos; "pos" lea rdi, [rsp+88h+var_60]; this push 0FFFFFFFFFFFFFFFFh pop rdx; __int64 call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long) lea rdx, [rsp+88h+var_60]; QByteArray * mov rdi, r15; this mov rsi, r12; QObject * xor ecx, ecx; QObject * call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *) mov [rbx+50h], r15 lea rdi, [rsp+88h+var_60] call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer() mov rdi, [rbx+50h]; this imul ebp, [r14+198h] mov esi, ebp; int call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int) mov r15, [rbx+50h] lea r12, [rsp+88h+var_60] lea rsi, [rsp+88h+var_68] mov rdi, r12 call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&) mov rdi, r15; this mov rsi, r12; QVariant * call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&) lea rdi, [rsp+88h+var_60]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov eax, dword ptr [rsp+88h+var_68] lea rsi, [rsp+88h+var_38] mov [rsi], eax mov [rsi+4], r13d mov r15, [rbx+50h] lea r12, [rsp+88h+var_60] mov rdi, r12 call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&) mov rdi, r15; this mov rsi, r12; QVariant * call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&) lea r15, [rsp+88h+var_60] mov rdi, r15; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov r12, [rbx+50h] mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr mov [r15], rax and qword ptr [r15+8], 0 push 20h ; ' ' pop rdi; unsigned __int64 call __Znwm; operator new(ulong) push 1 pop rcx mov [rax], ecx lea rdx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow15update_endstairER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::update_endstair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *) mov [rax+8], rdx mov [rax+10h], r14 mov [rax+18h], rbx mov rdx, cs:_ZN18QAbstractAnimation16staticMetaObjectE_ptr mov [rsp+88h+var_78], rdx mov [rsp+88h+var_88], ecx and [rsp+88h+var_80], 0 lea r14, [rsp+88h+var_40] lea rdx, [rsp+88h+var_60] mov rdi, r14 mov rsi, r12 mov rcx, r12 xor r8d, r8d mov r9, rax call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*) mov rdi, r14; this call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection() mov rdi, [rbx+50h] xor esi, esi call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy) loc_4DA1: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_4DB2: mov rbx, rax lea rdi, [rsp+arg_20]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() jmp short loc_4DDE mov rbx, rax lea rdi, [rsp+arg_20] call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer() jmp short loc_4DD3 mov rbx, rax loc_4DD3: push 10h pop rsi; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) loc_4DDE: mov rdi, rbx call __Unwind_Resume
void MainWindow::update_endstair(MainWindow *this, QWidget **a2) { int v3; // r13d int v4; // ebp QWidget *v5; // rdi QPropertyAnimation *v6; // r15 QObject *v7; // r12 QVariantAnimation *v8; // r15 QVariantAnimation *v9; // r15 QWidget *v10; // r12 long long v11; // rax long long v12; // [rsp+20h] [rbp-68h] BYREF _QWORD v13[4]; // [rsp+28h] [rbp-60h] BYREF _BYTE v14[8]; // [rsp+48h] [rbp-40h] BYREF _DWORD v15[14]; // [rsp+50h] [rbp-38h] BYREF if ( *((_DWORD *)a2 + 19) == 3 ) { v12 = QWidget::pos(a2[7]); v3 = 60 * (12 - *((_DWORD *)a2 + 17)); v4 = v3 - HIDWORD(v12); if ( HIDWORD(v12) - v3 > 0 ) v4 = HIDWORD(v12) - v3; v5 = a2[10]; if ( v5 ) { QObject::disconnect<void (QAbstractAnimation::*)(void)>(v5, &QAbstractAnimation::finished, 0LL, 0LL, 0LL); QAbstractAnimation::stop(a2[10]); QObject::deleteLater(a2[10]); a2[10] = 0LL; } v6 = (QPropertyAnimation *)operator new(0x10uLL); v7 = a2[7]; QByteArray::QByteArray((QByteArray *)v13, "pos", -1LL); QPropertyAnimation::QPropertyAnimation(v6, v7, (const QByteArray *)v13, 0LL); a2[10] = v6; QArrayDataPointer<char>::~QArrayDataPointer(v13); QVariantAnimation::setDuration(a2[10], *((_DWORD *)this + 102) * v4); v8 = a2[10]; QVariant::QVariant(v13, &v12); QVariantAnimation::setStartValue(v8, (const QVariant *)v13); QVariant::~QVariant((QVariant *)v13); v15[0] = v12; v15[1] = v3; v9 = a2[10]; QVariant::QVariant(v13, v15); QVariantAnimation::setEndValue(v9, (const QVariant *)v13); QVariant::~QVariant((QVariant *)v13); v10 = a2[10]; v13[0] = &QAbstractAnimation::finished; v13[1] = 0LL; v11 = operator new(0x20uLL); *(_DWORD *)v11 = 1; *(_QWORD *)(v11 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::update_endstair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl; *(_QWORD *)(v11 + 16) = this; *(_QWORD *)(v11 + 24) = a2; QObject::connectImpl(v14, v10, v13, v10, 0LL, v11, 1, 0LL, &QAbstractAnimation::staticMetaObject); QMetaObject::Connection::~Connection((QMetaObject::Connection *)v14); QAbstractAnimation::start(a2[10], 0LL); } }
update_endstair: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 CMP dword ptr [RSI + 0x4c],0x3 JNZ 0x00104da1 MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RSI + 0x38] CALL 0x001045b0 MOV qword ptr [RSP + 0x20],RAX PUSH 0xc POP RCX SUB ECX,dword ptr [RBX + 0x44] IMUL R13D,ECX,0x3c SHR RAX,0x20 SUB EAX,R13D MOV EBP,EAX NEG EBP CMOVS EBP,EAX MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x00104c6f MOV RSI,qword ptr [0x0010eff0] XOR EDX,EDX XOR ECX,ECX XOR R8D,R8D CALL 0x001071fa MOV RDI,qword ptr [RBX + 0x50] CALL 0x00104530 MOV RDI,qword ptr [RBX + 0x50] CALL 0x00104110 AND qword ptr [RBX + 0x50],0x0 LAB_00104c6f: PUSH 0x10 POP RDI CALL 0x00104390 MOV R15,RAX MOV R12,qword ptr [RBX + 0x38] LAB_00104c7e: LEA RSI,[0x10a6a4] LEA RDI,[RSP + 0x28] PUSH -0x1 POP RDX CALL 0x00104510 LAB_00104c92: LEA RDX,[RSP + 0x28] MOV RDI,R15 MOV RSI,R12 XOR ECX,ECX CALL 0x00104260 LAB_00104ca4: MOV qword ptr [RBX + 0x50],R15 LEA RDI,[RSP + 0x28] CALL 0x00107382 MOV RDI,qword ptr [RBX + 0x50] IMUL EBP,dword ptr [R14 + 0x198] MOV ESI,EBP CALL 0x00104370 MOV R15,qword ptr [RBX + 0x50] LEA R12,[RSP + 0x28] LEA RSI,[RSP + 0x20] MOV RDI,R12 CALL 0x00104100 LAB_00104cdb: MOV RDI,R15 MOV RSI,R12 CALL 0x00104220 LAB_00104ce6: LEA RDI,[RSP + 0x28] CALL 0x00104170 MOV EAX,dword ptr [RSP + 0x20] LEA RSI,[RSP + 0x50] MOV dword ptr [RSI],EAX MOV dword ptr [RSI + 0x4],R13D MOV R15,qword ptr [RBX + 0x50] LEA R12,[RSP + 0x28] MOV RDI,R12 CALL 0x00104100 LAB_00104d10: MOV RDI,R15 MOV RSI,R12 CALL 0x001044c0 LAB_00104d1b: LEA R15,[RSP + 0x28] MOV RDI,R15 CALL 0x00104170 MOV R12,qword ptr [RBX + 0x50] MOV RAX,qword ptr [0x0010eff0] MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x8],0x0 PUSH 0x20 POP RDI CALL 0x00104390 PUSH 0x1 POP RCX MOV dword ptr [RAX],ECX LEA RDX,[0x106ed4] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x10],R14 MOV qword ptr [RAX + 0x18],RBX MOV RDX,qword ptr [0x0010ef88] MOV qword ptr [RSP + 0x10],RDX MOV dword ptr [RSP],ECX AND qword ptr [RSP + 0x8],0x0 LEA R14,[RSP + 0x48] LEA RDX,[RSP + 0x28] MOV RDI,R14 MOV RSI,R12 MOV RCX,R12 XOR R8D,R8D MOV R9,RAX CALL 0x001042a0 MOV RDI,R14 CALL 0x001041c0 MOV RDI,qword ptr [RBX + 0x50] XOR ESI,ESI CALL 0x001042f0 LAB_00104da1: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* MainWindow::update_endstair(Elevetor&) */ void __thiscall MainWindow::update_endstair(MainWindow *this,Elevetor *param_1) { int iVar1; QObject *pQVar2; QVariant *pQVar3; int8 uVar4; QPropertyAnimation *this_00; int4 *puVar5; int8 local_68; int *local_60; int8 local_58; Connection local_40 [8]; int4 local_38; int local_34; if (*(int *)(param_1 + 0x4c) == 3) { local_68 = QWidget::pos(); iVar1 = *(int *)(param_1 + 0x44); if (*(QObject **)(param_1 + 0x50) != (QObject *)0x0) { QObject::disconnect<void(QAbstractAnimation::*)()> (*(QObject **)(param_1 + 0x50),(Object *)PTR_finished_0010eff0,(_func_void *)0x0, (QObject *)0x0,(void **)0x0); QAbstractAnimation::stop(); QObject::deleteLater(); *(int8 *)(param_1 + 0x50) = 0; } this_00 = (QPropertyAnimation *)operator_new(0x10); pQVar2 = *(QObject **)(param_1 + 0x38); /* try { // try from 00104c7e to 00104c91 has its CatchHandler @ 00104dd0 */ QByteArray::QByteArray((QByteArray *)&local_60,"pos",-1); /* try { // try from 00104c92 to 00104ca3 has its CatchHandler @ 00104dc1 */ QPropertyAnimation::QPropertyAnimation(this_00,pQVar2,(QByteArray *)&local_60,(QObject *)0x0); *(QPropertyAnimation **)(param_1 + 0x50) = this_00; QArrayDataPointer<char>::~QArrayDataPointer((QArrayDataPointer<char> *)&local_60); QVariantAnimation::setDuration((int)*(int8 *)(param_1 + 0x50)); pQVar3 = *(QVariant **)(param_1 + 0x50); QVariant::QVariant((QVariant *)&local_60,(QPoint *)&local_68); /* try { // try from 00104cdb to 00104ce5 has its CatchHandler @ 00104db2 */ QVariantAnimation::setStartValue(pQVar3); QVariant::~QVariant((QVariant *)&local_60); local_38 = (int4)local_68; pQVar3 = *(QVariant **)(param_1 + 0x50); local_34 = (0xc - iVar1) * 0x3c; QVariant::QVariant((QVariant *)&local_60,(QPoint *)&local_38); /* try { // try from 00104d10 to 00104d1a has its CatchHandler @ 00104db0 */ QVariantAnimation::setEndValue(pQVar3); QVariant::~QVariant((QVariant *)&local_60); uVar4 = *(int8 *)(param_1 + 0x50); local_60 = PTR_finished_0010eff0; local_58 = 0; puVar5 = (int4 *)operator_new(0x20); *puVar5 = 1; *(code **)(puVar5 + 2) = QtPrivate:: QFunctorSlotObject<MainWindow::update_endstair(Elevetor&)::$_0,0,QtPrivate::List<>,void>:: impl; *(MainWindow **)(puVar5 + 4) = this; *(Elevetor **)(puVar5 + 6) = param_1; QObject::connectImpl(local_40,uVar4,&local_60,uVar4,0,puVar5,1,0,PTR_staticMetaObject_0010ef88); QMetaObject::Connection::~Connection(local_40); QAbstractAnimation::start(*(int8 *)(param_1 + 0x50),0); } return; }
61,995
MainWindow::update_endstair(Elevetor&)
LeafBlue[P]myElevetor/mainwindow.cpp
void MainWindow::update_endstair(Elevetor& thisele) { if(thisele.status != 3){ return; } QPoint newstart = thisele.ele->pos(); int end_y = (12 - thisele.endstair) * 60; int move_y = abs(newstart.y() - end_y); if(thisele.anime&&thisele.anime!=nullptr){ //先断开连接,再执行stop,防止先执行stop触发原connect disconnect(thisele.anime,&QPropertyAnimation::finished,nullptr,nullptr); thisele.anime->stop(); thisele.anime->deleteLater(); thisele.anime = nullptr; } thisele.anime = new QPropertyAnimation(thisele.ele,"pos"); //move_v 每像素移动所需时间 thisele.anime->setDuration(move_v * move_y); thisele.anime->setStartValue(newstart); QPoint endpoint(newstart.x(),end_y); thisele.anime->setEndValue(endpoint); connect(thisele.anime,&QPropertyAnimation::finished,[this,&thisele](){ arrive_stair(thisele); }); thisele.anime->start(); }
O3
cpp
MainWindow::update_endstair(Elevetor&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp cmpl $0x3, 0x4c(%rsi) jne 0x5140 movq %rsi, %rbx movq %rdi, %r14 movq 0x38(%rsi), %rdi callq 0x4590 movq %rax, 0x20(%rsp) movl $0xc, %ecx subl 0x44(%rbx), %ecx imull $0x3c, %ecx, %r13d shrq $0x20, %rax subl %r13d, %eax movl %eax, %ebp negl %ebp cmovsl %eax, %ebp movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x4ff5 movq 0xa02e(%rip), %rax # 0xeff0 movq %rsp, %rsi movq %rax, (%rsi) xorl %r15d, %r15d movq %r15, 0x8(%rsi) movq 0x9fb2(%rip), %r8 # 0xef88 xorl %edx, %edx xorl %ecx, %ecx callq 0x40e0 movq 0x50(%rbx), %rdi callq 0x4510 movq 0x50(%rbx), %rdi callq 0x4110 movq %r15, 0x50(%rbx) movl $0x10, %edi callq 0x4380 movq %rax, %r15 movq 0x38(%rbx), %r12 leaq 0x5697(%rip), %rsi # 0xa6a4 movq %rsp, %rdi movq $-0x1, %rdx callq 0x44f0 movq %rsp, %rdx movq %r15, %rdi movq %r12, %rsi xorl %ecx, %ecx callq 0x4260 movq %r15, 0x50(%rbx) movq (%rsp), %rax testq %rax, %rax je 0x5051 lock decl (%rax) jne 0x5051 movq (%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x4250 movq 0x50(%rbx), %rdi imull 0x198(%r14), %ebp movl %ebp, %esi callq 0x4370 movq 0x50(%rbx), %r15 movq %rsp, %r12 leaq 0x20(%rsp), %rsi movq %r12, %rdi callq 0x4100 movq %r15, %rdi movq %r12, %rsi callq 0x4220 movq %rsp, %rdi callq 0x4170 movl 0x20(%rsp), %eax leaq 0x30(%rsp), %rsi movl %eax, (%rsi) movl %r13d, 0x4(%rsi) movq 0x50(%rbx), %r15 movq %rsp, %r12 movq %r12, %rdi callq 0x4100 movq %r15, %rdi movq %r12, %rsi callq 0x44a0 movq %rsp, %r15 movq %r15, %rdi callq 0x4170 movq 0x50(%rbx), %r12 movq 0x9f26(%rip), %rax # 0xeff0 movq %rax, (%r15) xorl %r13d, %r13d movq %r13, 0x8(%r15) movl $0x20, %edi callq 0x4380 movl $0x1, %r10d movl %r10d, (%rax) leaq 0x2bf2(%rip), %rcx # 0x7ce0 movq %rcx, 0x8(%rax) movq %r14, 0x10(%rax) movq %rbx, 0x18(%rax) subq $0x8, %rsp movq 0x9e83(%rip), %r11 # 0xef88 leaq 0x30(%rsp), %r14 leaq 0x8(%rsp), %rdx movq %r14, %rdi movq %r12, %rsi movq %r12, %rcx xorl %r8d, %r8d movq %rax, %r9 pushq %r11 pushq %r13 pushq %r10 callq 0x42a0 addq $0x20, %rsp movq %r14, %rdi callq 0x41c0 movq 0x50(%rbx), %rdi xorl %esi, %esi callq 0x42f0 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5151 movq %rax, %rbx movq %rsp, %rdi callq 0x4170 jmp 0x5194 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x5187 lock decl (%rax) jne 0x5187 movq (%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x4250 jmp 0x5187 movq %rax, %rbx movl $0x10, %esi movq %r15, %rdi callq 0x4070 movq %rbx, %rdi callq 0x41d0
_ZN10MainWindow15update_endstairER8Elevetor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h cmp dword ptr [rsi+4Ch], 3 jnz loc_5140 mov rbx, rsi mov r14, rdi mov rdi, [rsi+38h]; this call __ZNK7QWidget3posEv; QWidget::pos(void) mov [rsp+68h+var_48], rax mov ecx, 0Ch sub ecx, [rbx+44h] imul r13d, ecx, 3Ch ; '<' shr rax, 20h sub eax, r13d mov ebp, eax neg ebp cmovs ebp, eax mov rdi, [rbx+50h]; this test rdi, rdi jz short loc_4FF5 mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr mov rsi, rsp; QObject * mov [rsi], rax xor r15d, r15d mov [rsi+8], r15 mov r8, cs:_ZN18QAbstractAnimation16staticMetaObjectE_ptr; void ** xor edx, edx; void ** xor ecx, ecx; QObject * call __ZN7QObject14disconnectImplEPKS_PPvS1_S3_PK11QMetaObject; QObject::disconnectImpl(QObject const*,void **,QObject const*,void **,QMetaObject const*) mov rdi, [rbx+50h]; this call __ZN18QAbstractAnimation4stopEv; QAbstractAnimation::stop(void) mov rdi, [rbx+50h]; this call __ZN7QObject11deleteLaterEv; QObject::deleteLater(void) mov [rbx+50h], r15 loc_4FF5: mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov r12, [rbx+38h] lea rsi, aPos; "pos" mov rdi, rsp; this mov rdx, 0FFFFFFFFFFFFFFFFh; __int64 call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long) mov rdx, rsp; QByteArray * mov rdi, r15; this mov rsi, r12; QObject * xor ecx, ecx; QObject * call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *) mov [rbx+50h], r15 mov rax, [rsp+68h+var_68] test rax, rax jz short loc_5051 lock dec dword ptr [rax] jnz short loc_5051 mov rdi, [rsp+68h+var_68] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_5051: mov rdi, [rbx+50h]; this imul ebp, [r14+198h] mov esi, ebp; int call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int) mov r15, [rbx+50h] mov r12, rsp lea rsi, [rsp+68h+var_48] mov rdi, r12 call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&) mov rdi, r15; this mov rsi, r12; QVariant * call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&) mov rdi, rsp; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov eax, dword ptr [rsp+68h+var_48] lea rsi, [rsp+68h+var_38] mov [rsi], eax mov [rsi+4], r13d mov r15, [rbx+50h] mov r12, rsp mov rdi, r12 call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&) mov rdi, r15; this mov rsi, r12; QVariant * call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&) mov r15, rsp mov rdi, r15; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov r12, [rbx+50h] mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr mov [r15], rax xor r13d, r13d mov [r15+8], r13 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov r10d, 1 mov [rax], r10d lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow15update_endstairER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::update_endstair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *) mov [rax+8], rcx mov [rax+10h], r14 mov [rax+18h], rbx sub rsp, 8 mov r11, cs:_ZN18QAbstractAnimation16staticMetaObjectE_ptr lea r14, [rsp+70h+var_40] lea rdx, [rsp+70h+var_68] mov rdi, r14 mov rsi, r12 mov rcx, r12 xor r8d, r8d mov r9, rax push r11 push r13 push r10 call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*) add rsp, 20h mov rdi, r14; this call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection() mov rdi, [rbx+50h] xor esi, esi call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy) loc_5140: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_5151: mov rbx, rax mov rdi, rsp; this call __ZN8QVariantD1Ev; QVariant::~QVariant() jmp short loc_5194 mov rbx, rax mov rax, [rsp+0] test rax, rax jz short loc_5187 lock dec dword ptr [rax] jnz short loc_5187 mov rdi, [rsp+0] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_5187 mov rbx, rax loc_5187: mov esi, 10h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) loc_5194: mov rdi, rbx call __Unwind_Resume
void MainWindow::update_endstair(MainWindow *this, QWidget **a2) { long long v3; // rax const QMetaObject *v4; // r9 int v5; // r13d int v6; // ebp QObject *v7; // rdi QPropertyAnimation *v8; // r15 QObject *v9; // r12 QVariantAnimation *v10; // r15 QVariantAnimation *v11; // r15 QWidget *v12; // r12 long long v13; // rax volatile signed __int32 *v14; // [rsp+0h] [rbp-68h] BYREF long long v15; // [rsp+8h] [rbp-60h] long long v16; // [rsp+20h] [rbp-48h] BYREF _BYTE v17[8]; // [rsp+28h] [rbp-40h] BYREF _DWORD v18[14]; // [rsp+30h] [rbp-38h] BYREF if ( *((_DWORD *)a2 + 19) == 3 ) { v3 = QWidget::pos(a2[7]); v16 = v3; v5 = 60 * (12 - *((_DWORD *)a2 + 17)); v6 = v5 - HIDWORD(v3); if ( HIDWORD(v3) - v5 > 0 ) v6 = HIDWORD(v3) - v5; v7 = a2[10]; if ( v7 ) { v14 = (volatile signed __int32 *)&QAbstractAnimation::finished; v15 = 0LL; QObject::disconnectImpl(v7, (const QObject *)&v14, 0LL, 0LL, &QAbstractAnimation::staticMetaObject, v4); QAbstractAnimation::stop(a2[10]); QObject::deleteLater(a2[10]); a2[10] = 0LL; } v8 = (QPropertyAnimation *)operator new(0x10uLL); v9 = a2[7]; QByteArray::QByteArray((QByteArray *)&v14, "pos", -1LL); QPropertyAnimation::QPropertyAnimation(v8, v9, (const QByteArray *)&v14, 0LL); a2[10] = v8; if ( v14 ) { if ( !_InterlockedDecrement(v14) ) QArrayData::deallocate(v14, 1LL, 8LL); } QVariantAnimation::setDuration(a2[10], *((_DWORD *)this + 102) * v6); v10 = a2[10]; QVariant::QVariant(&v14, &v16); QVariantAnimation::setStartValue(v10, (const QVariant *)&v14); QVariant::~QVariant((QVariant *)&v14); v18[0] = v16; v18[1] = v5; v11 = a2[10]; QVariant::QVariant(&v14, v18); QVariantAnimation::setEndValue(v11, (const QVariant *)&v14); QVariant::~QVariant((QVariant *)&v14); v12 = a2[10]; v14 = (volatile signed __int32 *)&QAbstractAnimation::finished; v15 = 0LL; v13 = operator new(0x20uLL); *(_DWORD *)v13 = 1; *(_QWORD *)(v13 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::update_endstair(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl; *(_QWORD *)(v13 + 16) = this; *(_QWORD *)(v13 + 24) = a2; QObject::connectImpl(v17, v12, &v14, v12, 0LL, v13, 1LL, 0LL, &QAbstractAnimation::staticMetaObject); QMetaObject::Connection::~Connection((QMetaObject::Connection *)v17); QAbstractAnimation::start(a2[10], 0LL); } }
update_endstair: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 CMP dword ptr [RSI + 0x4c],0x3 JNZ 0x00105140 MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RSI + 0x38] CALL 0x00104590 MOV qword ptr [RSP + 0x20],RAX MOV ECX,0xc SUB ECX,dword ptr [RBX + 0x44] IMUL R13D,ECX,0x3c SHR RAX,0x20 SUB EAX,R13D MOV EBP,EAX NEG EBP CMOVS EBP,EAX MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x00104ff5 MOV RAX,qword ptr [0x0010eff0] MOV RSI,RSP MOV qword ptr [RSI],RAX XOR R15D,R15D MOV qword ptr [RSI + 0x8],R15 MOV R8,qword ptr [0x0010ef88] XOR EDX,EDX XOR ECX,ECX CALL 0x001040e0 MOV RDI,qword ptr [RBX + 0x50] CALL 0x00104510 MOV RDI,qword ptr [RBX + 0x50] CALL 0x00104110 MOV qword ptr [RBX + 0x50],R15 LAB_00104ff5: MOV EDI,0x10 CALL 0x00104380 MOV R15,RAX MOV R12,qword ptr [RBX + 0x38] LAB_00105006: LEA RSI,[0x10a6a4] MOV RDI,RSP MOV RDX,-0x1 CALL 0x001044f0 LAB_0010501c: MOV RDX,RSP MOV RDI,R15 MOV RSI,R12 XOR ECX,ECX CALL 0x00104260 LAB_0010502c: MOV qword ptr [RBX + 0x50],R15 MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x00105051 DEC.LOCK dword ptr [RAX] JNZ 0x00105051 MOV RDI,qword ptr [RSP] MOV ESI,0x1 MOV EDX,0x8 CALL 0x00104250 LAB_00105051: MOV RDI,qword ptr [RBX + 0x50] IMUL EBP,dword ptr [R14 + 0x198] MOV ESI,EBP CALL 0x00104370 MOV R15,qword ptr [RBX + 0x50] MOV R12,RSP LEA RSI,[RSP + 0x20] MOV RDI,R12 CALL 0x00104100 LAB_00105078: MOV RDI,R15 MOV RSI,R12 CALL 0x00104220 LAB_00105083: MOV RDI,RSP CALL 0x00104170 MOV EAX,dword ptr [RSP + 0x20] LEA RSI,[RSP + 0x30] MOV dword ptr [RSI],EAX MOV dword ptr [RSI + 0x4],R13D MOV R15,qword ptr [RBX + 0x50] MOV R12,RSP MOV RDI,R12 CALL 0x00104100 LAB_001050a9: MOV RDI,R15 MOV RSI,R12 CALL 0x001044a0 LAB_001050b4: MOV R15,RSP MOV RDI,R15 CALL 0x00104170 MOV R12,qword ptr [RBX + 0x50] MOV RAX,qword ptr [0x0010eff0] MOV qword ptr [R15],RAX XOR R13D,R13D MOV qword ptr [R15 + 0x8],R13 MOV EDI,0x20 CALL 0x00104380 MOV R10D,0x1 MOV dword ptr [RAX],R10D LEA RCX,[0x107ce0] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0x10],R14 MOV qword ptr [RAX + 0x18],RBX SUB RSP,0x8 MOV R11,qword ptr [0x0010ef88] LEA R14,[RSP + 0x30] LEA RDX,[RSP + 0x8] MOV RDI,R14 MOV RSI,R12 MOV RCX,R12 XOR R8D,R8D MOV R9,RAX PUSH R11 PUSH R13 PUSH R10 CALL 0x001042a0 ADD RSP,0x20 MOV RDI,R14 CALL 0x001041c0 MOV RDI,qword ptr [RBX + 0x50] XOR ESI,ESI CALL 0x001042f0 LAB_00105140: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* MainWindow::update_endstair(Elevetor&) */ void __thiscall MainWindow::update_endstair(MainWindow *this,Elevetor *param_1) { int iVar1; QObject *pQVar2; QVariant *pQVar3; int8 uVar4; QPropertyAnimation *this_00; int4 *puVar5; QArrayData *local_68; int8 local_60; int8 local_48; Connection local_40 [8]; int4 local_38; int local_34; if (*(int *)(param_1 + 0x4c) == 3) { local_48 = QWidget::pos(); iVar1 = *(int *)(param_1 + 0x44); if (*(QObject **)(param_1 + 0x50) != (QObject *)0x0) { local_68 = (QArrayData *)PTR_finished_0010eff0; local_60 = 0; QObject::disconnectImpl (*(QObject **)(param_1 + 0x50),&local_68,(QObject *)0x0,(void **)0x0, (QMetaObject *)PTR_staticMetaObject_0010ef88); QAbstractAnimation::stop(); QObject::deleteLater(); *(int8 *)(param_1 + 0x50) = 0; } this_00 = (QPropertyAnimation *)operator_new(0x10); pQVar2 = *(QObject **)(param_1 + 0x38); /* try { // try from 00105006 to 0010501b has its CatchHandler @ 00105184 */ QByteArray::QByteArray((QByteArray *)&local_68,"pos",-1); /* try { // try from 0010501c to 0010502b has its CatchHandler @ 0010515e */ QPropertyAnimation::QPropertyAnimation(this_00,pQVar2,(QByteArray *)&local_68,(QObject *)0x0); *(QPropertyAnimation **)(param_1 + 0x50) = this_00; if (local_68 != (QArrayData *)0x0) { LOCK(); *(int *)local_68 = *(int *)local_68 + -1; UNLOCK(); if (*(int *)local_68 == 0) { QArrayData::deallocate(local_68,1,8); } } QVariantAnimation::setDuration((int)*(int8 *)(param_1 + 0x50)); pQVar3 = *(QVariant **)(param_1 + 0x50); QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_48); /* try { // try from 00105078 to 00105082 has its CatchHandler @ 00105151 */ QVariantAnimation::setStartValue(pQVar3); QVariant::~QVariant((QVariant *)&local_68); local_38 = (int4)local_48; pQVar3 = *(QVariant **)(param_1 + 0x50); local_34 = (0xc - iVar1) * 0x3c; QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_38); /* try { // try from 001050a9 to 001050b3 has its CatchHandler @ 0010514f */ QVariantAnimation::setEndValue(pQVar3); QVariant::~QVariant((QVariant *)&local_68); uVar4 = *(int8 *)(param_1 + 0x50); local_68 = (QArrayData *)PTR_finished_0010eff0; local_60 = 0; puVar5 = (int4 *)operator_new(0x20); *puVar5 = 1; *(code **)(puVar5 + 2) = QtPrivate:: QFunctorSlotObject<MainWindow::update_endstair(Elevetor&)::$_0,0,QtPrivate::List<>,void>:: impl; *(MainWindow **)(puVar5 + 4) = this; *(Elevetor **)(puVar5 + 6) = param_1; QObject::connectImpl(local_40,uVar4,&local_68,uVar4,0,puVar5,1,0,PTR_staticMetaObject_0010ef88); QMetaObject::Connection::~Connection(local_40); QAbstractAnimation::start(*(int8 *)(param_1 + 0x50),0); } return; }
61,996
atoi_octal
eloqsql/mysys/my_init.c
static ulong atoi_octal(const char *str) { long int tmp; while (*str && my_isspace(&my_charset_latin1, *str)) str++; str2int(str, (*str == '0' ? 8 : 10), /* Octalt or decimalt */ 0, INT_MAX, &tmp); return (ulong) tmp; }
O0
c
atoi_octal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x11(%rbp) je 0x27130 leaq 0x24f73c(%rip), %rax # 0x276850 movq 0x40(%rax), %rax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al testb $0x1, %al jne 0x27139 jmp 0x27147 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x270fc movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rax movsbl (%rax), %ecx movl $0xa, %esi movl $0x8, %eax cmpl $0x30, %ecx cmovel %eax, %esi xorl %eax, %eax movl %eax, %edx movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq -0x10(%rbp), %r8 callq 0x78e40 movq -0x10(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
atoi_octal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi loc_270FC: mov rax, [rbp+var_8] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_11], al jz short loc_27130 lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_11], al loc_27130: mov al, [rbp+var_11] test al, 1 jnz short loc_27139 jmp short loc_27147 loc_27139: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_270FC loc_27147: mov rdi, [rbp+var_8] mov rax, [rbp+var_8] movsx ecx, byte ptr [rax] mov esi, 0Ah mov eax, 8 cmp ecx, 30h ; '0' cmovz esi, eax xor eax, eax mov edx, eax mov ecx, 7FFFFFFFh lea r8, [rbp+var_10] call str2int mov rax, [rbp+var_10] add rsp, 20h pop rbp retn
long long atoi_octal(_BYTE *a1) { long long v1; // rsi bool v3; // [rsp+Fh] [rbp-11h] long long v4; // [rsp+10h] [rbp-10h] BYREF _BYTE *i; // [rsp+18h] [rbp-8h] for ( i = a1; ; ++i ) { v3 = 0; if ( *i ) v3 = (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + (unsigned __int8)*i + 1LL) & 8) != 0; if ( !v3 ) break; } v1 = 10LL; if ( *i == 48 ) v1 = 8LL; str2int(i, v1, 0LL, 0x7FFFFFFFLL, &v4); return v4; }
atoi_octal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI LAB_001270fc: MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x00127130 LEA RAX,[0x376850] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_00127130: MOV AL,byte ptr [RBP + -0x11] TEST AL,0x1 JNZ 0x00127139 JMP 0x00127147 LAB_00127139: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x001270fc LAB_00127147: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX] MOV ESI,0xa MOV EAX,0x8 CMP ECX,0x30 CMOVZ ESI,EAX XOR EAX,EAX MOV EDX,EAX MOV ECX,0x7fffffff LEA R8,[RBP + -0x10] CALL 0x00178e40 MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x20 POP RBP RET
int8 atoi_octal(byte *param_1) { int8 uVar1; bool bVar2; int8 local_18; byte *local_10; local_10 = param_1; while( true ) { bVar2 = false; if (*local_10 != 0) { bVar2 = (PTR_ctype_latin1_00376890[(ulong)*local_10 + 1] & 8) != 0; } if (!bVar2) break; local_10 = local_10 + 1; } uVar1 = 10; if (*local_10 == 0x30) { uVar1 = 8; } str2int(local_10,uVar1,0,0x7fffffff,&local_18); return local_18; }
61,997
write_hook_for_undo_bulk_insert
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_undo_bulk_insert(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { /* We are going to call maria_delete_all_rows(), but without logging and syncing, as an optimization (if we crash before commit, the UNDO will empty; if we crash after commit, we have flushed and forced the files). Status still needs to be reset under log mutex, in case of a concurrent checkpoint. */ _ma_reset_status(tbl_info); return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg); }
O0
c
write_hook_for_undo_bulk_insert: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x774c0 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x5abc0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
write_hook_for_undo_bulk_insert: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rdi, [rbp+var_18] call _ma_reset_status mov edi, [rbp+var_4] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call write_hook_for_undo add rsp, 30h pop rbp retn
long long write_hook_for_undo_bulk_insert(unsigned int a1, long long a2, long long a3, _QWORD *a4) { ma_reset_status(a3); return write_hook_for_undo(a1, a2, a3, a4); }
write_hook_for_undo_bulk_insert: 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 qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001774c0 MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x0015abc0 ADD RSP,0x30 POP RBP RET
void write_hook_for_undo_bulk_insert (int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { _ma_reset_status(param_3); write_hook_for_undo(param_1,param_2,param_3,param_4,param_5); return; }
61,998
llava_image_embed_make_with_filename
monkey531[P]llama/examples/llava/llava.cpp
struct llava_image_embed * llava_image_embed_make_with_filename(struct clip_ctx * ctx_clip, int n_threads, const char * image_path) { unsigned char* image_bytes; long image_bytes_length; auto loaded = load_file_to_bytes(image_path, &image_bytes, &image_bytes_length); if (!loaded) { LOG_ERR("%s: failed to load %s\n", __func__, image_path); return NULL; } llava_image_embed *embed = llava_image_embed_make_with_bytes(ctx_clip, n_threads, image_bytes, image_bytes_length); free(image_bytes); return embed; }
O1
cpp
llava_image_embed_make_with_filename: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movl %esi, %r14d movq %rdi, 0x10(%rsp) leaq 0xe84c6(%rip), %rsi # 0x1104f5 movq %rdx, %rdi callq 0x1de50 testq %rax, %rax movq %rbx, 0x8(%rsp) je 0x28105 movq %rax, %r15 movq %rax, %rdi xorl %esi, %esi movl $0x2, %edx callq 0x1dda0 movq %r15, %rdi callq 0x1d030 movq %rax, %r12 movq %r15, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1dda0 movq %r12, %rdi callq 0x1e000 testq %rax, %rax je 0x28153 movq %rax, %r13 movl %r14d, %ebx callq 0x1d070 movq %rax, %rbp movl $0x0, (%rax) movl $0x1, %esi movq %r13, %rdi movq %r12, %rdx movq %r15, %rcx callq 0x1e260 movq %rax, %r14 movq %r15, %rdi callq 0x1e7e0 testl %eax, %eax jne 0x28195 cmpq %r12, %r14 jne 0x281a5 movq %r15, %rdi callq 0x1dc00 movb $0x1, %bpl movl %ebx, %r14d testb %bpl, %bpl je 0x2812b movq 0x10(%rsp), %rdi movl %r14d, %esi movq %r13, %rdx movl %r12d, %ecx callq 0x27f71 movq %rax, %rbx movq %r13, %rdi callq 0x1de70 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x130e7c(%rip), %rax # 0x158f88 movq (%rax), %rdi leaq 0xe49d2(%rip), %rsi # 0x10cae8 leaq 0xe49e3(%rip), %rdx # 0x10cb00 xorl %ebp, %ebp movq %rbx, %rcx xorl %eax, %eax callq 0x1e1d0 jmp 0x28190 movq 0x130e56(%rip), %rax # 0x158f88 movq (%rax), %rdi leaq 0xe47c3(%rip), %rsi # 0x10c8ff leaq 0xe47d3(%rip), %rdx # 0x10c916 movq 0x8(%rsp), %rcx xorl %eax, %eax callq 0x1e1d0 xorl %eax, %eax jmp 0x280f6 movq 0x130e2e(%rip), %rax # 0x158f88 movq (%rax), %rdi leaq 0xe49af(%rip), %rsi # 0x10cb13 leaq 0xe4995(%rip), %rdx # 0x10cb00 xorl %ebp, %ebp movq %r12, %rcx movq 0x8(%rsp), %r8 xorl %eax, %eax callq 0x1e1d0 leaq 0xe49bb(%rip), %rdi # 0x10cb3e callq 0x1d9e0 movq %r15, %rdi callq 0x1dc00 jmp 0x280d0 movq %rbp, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x1ec94 jmp 0x281b0 movq %r13, %rdi movq %r15, %rsi callq 0x1ecd9 xorl %ebp, %ebp jmp 0x280cd
llava_image_embed_make_with_filename: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14d, esi mov qword ptr [rsp+48h+var_38], rdi lea rsi, aCrb+2; "rb" mov rdi, rdx call _fopen test rax, rax mov [rsp+48h+var_40], rbx jz loc_28105 mov r15, rax mov rdi, rax xor esi, esi mov edx, 2 call _fseek mov rdi, r15 call _ftell mov r12, rax mov rdi, r15 xor esi, esi xor edx, edx call _fseek mov rdi, r12 call _malloc test rax, rax jz loc_28153 mov r13, rax mov ebx, r14d call ___errno_location mov rbp, rax mov dword ptr [rax], 0 mov esi, 1 mov rdi, r13 mov rdx, r12 mov rcx, r15 call _fread mov r14, rax mov rdi, r15 call _ferror test eax, eax jnz loc_28195 cmp r14, r12 jnz loc_281A5 mov rdi, r15 call _fclose mov bpl, 1 loc_280CD: mov r14d, ebx loc_280D0: test bpl, bpl jz short loc_2812B mov rdi, qword ptr [rsp+48h+var_38]; int mov esi, r14d mov rdx, r13 mov ecx, r12d call llava_image_embed_make_with_bytes mov rbx, rax mov rdi, r13 call _free mov rax, rbx loc_280F6: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_28105: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSCanTReadFileS; "%s: can't read file %s\n" lea rdx, aLoadFileToByte; "load_file_to_bytes" xor ebp, ebp mov rcx, rbx xor eax, eax call _fprintf jmp short loc_28190 loc_2812B: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToLoadS; "%s: failed to load %s\n" lea rdx, aLlavaImageEmbe_2; "llava_image_embed_make_with_filename" mov rcx, [rsp+48h+var_40] xor eax, eax call _fprintf xor eax, eax jmp short loc_280F6 loc_28153: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToAlloc; "%s: failed to alloc %ld bytes for file "... lea rdx, aLoadFileToByte; "load_file_to_bytes" xor ebp, ebp mov rcx, r12 mov r8, [rsp+48h+var_40] xor eax, eax call _fprintf lea rdi, aMemoryAllocati; "Memory allocation error" call _perror mov rdi, r15 call _fclose loc_28190: jmp loc_280D0 loc_28195: mov rdi, rbp mov rsi, r13 mov rdx, r15 call llava_image_embed_make_with_filename_cold_1 jmp short loc_281B0 loc_281A5: mov rdi, r13 mov rsi, r15 call llava_image_embed_make_with_filename_cold_2 loc_281B0: xor ebp, ebp jmp loc_280CD
long long llava_image_embed_make_with_filename(long long a1, int a2, const char *a3) { long long v3; // r12 long long v4; // r13 int v6; // r14d long long v7; // rax long long v8; // r15 long long v9; // rax unsigned int *v10; // rbp long long v11; // r14 char v12; // bp long long v13; // rbx v6 = a2; v7 = fopen(a3, "rb"); if ( v7 ) { v8 = v7; fseek(v7, 0LL, 2LL); v3 = ftell(v8); fseek(v8, 0LL, 0LL); v9 = malloc(v3); if ( v9 ) { v4 = v9; v10 = (unsigned int *)__errno_location(); *v10 = 0; v11 = fread(v4, 1LL, v3, v8); if ( (unsigned int)ferror(v8) ) { llava_image_embed_make_with_filename_cold_1(v10, v4, v8); } else { if ( v11 == v3 ) { fclose(v8); v12 = 1; LABEL_6: v6 = a2; goto LABEL_7; } llava_image_embed_make_with_filename_cold_2(v4, v8); } v12 = 0; goto LABEL_6; } v12 = 0; fprintf(stderr, "%s: failed to alloc %ld bytes for file %s\n", "load_file_to_bytes", v3, a3); perror("Memory allocation error"); fclose(v8); } else { v12 = 0; fprintf(stderr, "%s: can't read file %s\n", "load_file_to_bytes", a3); } LABEL_7: if ( v12 ) { v13 = llava_image_embed_make_with_bytes(a1, v6, v4, v3); free(v4); return v13; } else { fprintf(stderr, "%s: failed to load %s\n", "llava_image_embed_make_with_filename", a3); return 0LL; } }
llava_image_embed_make_with_filename: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14D,ESI MOV qword ptr [RSP + 0x10],RDI LEA RSI,[0x2104f5] MOV RDI,RDX CALL 0x0011de50 TEST RAX,RAX MOV qword ptr [RSP + 0x8],RBX JZ 0x00128105 MOV R15,RAX MOV RDI,RAX XOR ESI,ESI MOV EDX,0x2 CALL 0x0011dda0 MOV RDI,R15 CALL 0x0011d030 MOV R12,RAX MOV RDI,R15 XOR ESI,ESI XOR EDX,EDX CALL 0x0011dda0 MOV RDI,R12 CALL 0x0011e000 TEST RAX,RAX JZ 0x00128153 MOV R13,RAX MOV EBX,R14D CALL 0x0011d070 MOV RBP,RAX MOV dword ptr [RAX],0x0 MOV ESI,0x1 MOV RDI,R13 MOV RDX,R12 MOV RCX,R15 CALL 0x0011e260 MOV R14,RAX MOV RDI,R15 CALL 0x0011e7e0 TEST EAX,EAX JNZ 0x00128195 CMP R14,R12 JNZ 0x001281a5 MOV RDI,R15 CALL 0x0011dc00 MOV BPL,0x1 LAB_001280cd: MOV R14D,EBX LAB_001280d0: TEST BPL,BPL JZ 0x0012812b MOV RDI,qword ptr [RSP + 0x10] MOV ESI,R14D MOV RDX,R13 MOV ECX,R12D CALL 0x00127f71 MOV RBX,RAX MOV RDI,R13 CALL 0x0011de70 MOV RAX,RBX LAB_001280f6: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00128105: MOV RAX,qword ptr [0x00258f88] MOV RDI,qword ptr [RAX] LEA RSI,[0x20cae8] LEA RDX,[0x20cb00] XOR EBP,EBP MOV RCX,RBX XOR EAX,EAX CALL 0x0011e1d0 JMP 0x00128190 LAB_0012812b: MOV RAX,qword ptr [0x00258f88] MOV RDI,qword ptr [RAX] LEA RSI,[0x20c8ff] LEA RDX,[0x20c916] MOV RCX,qword ptr [RSP + 0x8] XOR EAX,EAX CALL 0x0011e1d0 XOR EAX,EAX JMP 0x001280f6 LAB_00128153: MOV RAX,qword ptr [0x00258f88] MOV RDI,qword ptr [RAX] LEA RSI,[0x20cb13] LEA RDX,[0x20cb00] XOR EBP,EBP MOV RCX,R12 MOV R8,qword ptr [RSP + 0x8] XOR EAX,EAX CALL 0x0011e1d0 LEA RDI,[0x20cb3e] CALL 0x0011d9e0 MOV RDI,R15 CALL 0x0011dc00 LAB_00128190: JMP 0x001280d0 LAB_00128195: MOV RDI,RBP MOV RSI,R13 MOV RDX,R15 CALL 0x0011ec94 JMP 0x001281b0 LAB_001281a5: MOV RDI,R13 MOV RSI,R15 CALL 0x0011ecd9 LAB_001281b0: XOR EBP,EBP JMP 0x001280cd
int8 llava_image_embed_make_with_filename(int8 param_1,int4 param_2,char *param_3) { bool bVar1; int iVar2; FILE *__stream; void *__ptr; int *piVar3; size_t sVar4; int8 uVar5; size_t unaff_R12; void *unaff_R13; __stream = fopen(param_3,"rb"); if (__stream == (FILE *)0x0) { fprintf(*(FILE **)PTR_stderr_00258f88,"%s: can\'t read file %s\n","load_file_to_bytes",param_3); } else { fseek(__stream,0,2); unaff_R12 = ftell(__stream); fseek(__stream,0,0); __ptr = malloc(unaff_R12); if (__ptr != (void *)0x0) { piVar3 = __errno_location(); *piVar3 = 0; sVar4 = fread(__ptr,1,unaff_R12,__stream); iVar2 = ferror(__stream); if (iVar2 == 0) { if (sVar4 == unaff_R12) { fclose(__stream); bVar1 = true; goto LAB_001280d0; } llava_image_embed_make_with_filename_cold_2(__ptr,__stream); } else { llava_image_embed_make_with_filename_cold_1(piVar3,__ptr,__stream); } bVar1 = false; goto LAB_001280d0; } fprintf(*(FILE **)PTR_stderr_00258f88,"%s: failed to alloc %ld bytes for file %s\n", "load_file_to_bytes",unaff_R12,param_3); perror("Memory allocation error"); fclose(__stream); } bVar1 = false; __ptr = unaff_R13; LAB_001280d0: if (bVar1) { uVar5 = llava_image_embed_make_with_bytes(param_1,param_2,__ptr,unaff_R12 & 0xffffffff); free(__ptr); } else { fprintf(*(FILE **)PTR_stderr_00258f88,"%s: failed to load %s\n", "llava_image_embed_make_with_filename",param_3); uVar5 = 0; } return uVar5; }
61,999
CheckCollisionLines
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint) { bool collision = false; float div = (endPos2.y - startPos2.y)*(endPos1.x - startPos1.x) - (endPos2.x - startPos2.x)*(endPos1.y - startPos1.y); if (fabsf(div) >= FLT_EPSILON) { collision = true; float xi = ((startPos2.x - endPos2.x)*(startPos1.x*endPos1.y - startPos1.y*endPos1.x) - (startPos1.x - endPos1.x)*(startPos2.x*endPos2.y - startPos2.y*endPos2.x))/div; float yi = ((startPos2.y - endPos2.y)*(startPos1.x*endPos1.y - startPos1.y*endPos1.x) - (startPos1.y - endPos1.y)*(startPos2.x*endPos2.y - startPos2.y*endPos2.x))/div; if (((fabsf(startPos1.x - endPos1.x) > FLT_EPSILON) && (xi < fminf(startPos1.x, endPos1.x) || (xi > fmaxf(startPos1.x, endPos1.x)))) || ((fabsf(startPos2.x - endPos2.x) > FLT_EPSILON) && (xi < fminf(startPos2.x, endPos2.x) || (xi > fmaxf(startPos2.x, endPos2.x)))) || ((fabsf(startPos1.y - endPos1.y) > FLT_EPSILON) && (yi < fminf(startPos1.y, endPos1.y) || (yi > fmaxf(startPos1.y, endPos1.y)))) || ((fabsf(startPos2.y - endPos2.y) > FLT_EPSILON) && (yi < fminf(startPos2.y, endPos2.y) || (yi > fmaxf(startPos2.y, endPos2.y))))) collision = false; if (collision && (collisionPoint != 0)) { collisionPoint->x = xi; collisionPoint->y = yi; } } return collision; }
O0
c
CheckCollisionLines: pushq %rbp movq %rsp, %rbp movlpd %xmm0, -0x8(%rbp) movlpd %xmm1, -0x10(%rbp) movlpd %xmm2, -0x18(%rbp) movlpd %xmm3, -0x20(%rbp) movq %rdi, -0x28(%rbp) movb $0x0, -0x29(%rbp) movss -0x1c(%rbp), %xmm0 subss -0x14(%rbp), %xmm0 movss -0x10(%rbp), %xmm2 subss -0x8(%rbp), %xmm2 movss -0x20(%rbp), %xmm1 subss -0x18(%rbp), %xmm1 movss -0xc(%rbp), %xmm3 subss -0x4(%rbp), %xmm3 mulss %xmm3, %xmm1 movd %xmm1, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x30(%rbp) movss -0x30(%rbp), %xmm0 movaps 0xd436e(%rip), %xmm1 # 0x1b42d0 pand %xmm1, %xmm0 movss 0xc7fc6(%rip), %xmm1 # 0x1a7f34 ucomiss %xmm1, %xmm0 jb 0xe02eb movb $0x1, -0x29(%rbp) movss -0x18(%rbp), %xmm0 subss -0x20(%rbp), %xmm0 movss -0x8(%rbp), %xmm2 movss -0xc(%rbp), %xmm3 movss -0x4(%rbp), %xmm1 mulss -0x10(%rbp), %xmm1 movd %xmm1, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm1 mulss %xmm3, %xmm2 addss %xmm1, %xmm2 movss -0x8(%rbp), %xmm1 subss -0x10(%rbp), %xmm1 movss -0x18(%rbp), %xmm3 movss -0x1c(%rbp), %xmm5 movss -0x14(%rbp), %xmm4 mulss -0x20(%rbp), %xmm4 movd %xmm4, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm4 mulss %xmm5, %xmm3 addss %xmm4, %xmm3 mulss %xmm3, %xmm1 movd %xmm1, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 divss -0x30(%rbp), %xmm0 movss %xmm0, -0x34(%rbp) movss -0x14(%rbp), %xmm0 subss -0x1c(%rbp), %xmm0 movss -0x8(%rbp), %xmm2 movss -0xc(%rbp), %xmm3 movss -0x4(%rbp), %xmm1 mulss -0x10(%rbp), %xmm1 movd %xmm1, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm1 mulss %xmm3, %xmm2 addss %xmm1, %xmm2 movss -0x4(%rbp), %xmm1 subss -0xc(%rbp), %xmm1 movss -0x18(%rbp), %xmm3 movss -0x1c(%rbp), %xmm5 movss -0x14(%rbp), %xmm4 mulss -0x20(%rbp), %xmm4 movd %xmm4, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm4 mulss %xmm5, %xmm3 addss %xmm4, %xmm3 mulss %xmm3, %xmm1 movd %xmm1, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 divss -0x30(%rbp), %xmm0 movss %xmm0, -0x38(%rbp) movss -0x8(%rbp), %xmm0 subss -0x10(%rbp), %xmm0 movaps 0xd4232(%rip), %xmm1 # 0x1b42d0 pand %xmm1, %xmm0 movss 0xc7e8a(%rip), %xmm1 # 0x1a7f34 ucomiss %xmm1, %xmm0 jbe 0xe011b movss -0x34(%rbp), %xmm1 movss -0x8(%rbp), %xmm4 movss -0x10(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm0 cmpunordss %xmm0, %xmm0 movaps %xmm0, %xmm2 pand %xmm5, %xmm2 minss %xmm4, %xmm3 pandn %xmm3, %xmm0 por %xmm2, %xmm0 ucomiss %xmm1, %xmm0 ja 0xe02bd movss -0x34(%rbp), %xmm0 movss -0x8(%rbp), %xmm4 movss -0x10(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm1 cmpunordss %xmm1, %xmm1 movaps %xmm1, %xmm2 pand %xmm5, %xmm2 maxss %xmm4, %xmm3 pandn %xmm3, %xmm1 por %xmm2, %xmm1 ucomiss %xmm1, %xmm0 ja 0xe02bd movss -0x18(%rbp), %xmm0 subss -0x20(%rbp), %xmm0 movaps 0xd41a4(%rip), %xmm1 # 0x1b42d0 pand %xmm1, %xmm0 movss 0xc7dfc(%rip), %xmm1 # 0x1a7f34 ucomiss %xmm1, %xmm0 jbe 0xe01a9 movss -0x34(%rbp), %xmm1 movss -0x18(%rbp), %xmm4 movss -0x20(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm0 cmpunordss %xmm0, %xmm0 movaps %xmm0, %xmm2 pand %xmm5, %xmm2 minss %xmm4, %xmm3 pandn %xmm3, %xmm0 por %xmm2, %xmm0 ucomiss %xmm1, %xmm0 ja 0xe02bd movss -0x34(%rbp), %xmm0 movss -0x18(%rbp), %xmm4 movss -0x20(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm1 cmpunordss %xmm1, %xmm1 movaps %xmm1, %xmm2 pand %xmm5, %xmm2 maxss %xmm4, %xmm3 pandn %xmm3, %xmm1 por %xmm2, %xmm1 ucomiss %xmm1, %xmm0 ja 0xe02bd movss -0x4(%rbp), %xmm0 subss -0xc(%rbp), %xmm0 movaps 0xd4116(%rip), %xmm1 # 0x1b42d0 pand %xmm1, %xmm0 movss 0xc7d6e(%rip), %xmm1 # 0x1a7f34 ucomiss %xmm1, %xmm0 jbe 0xe0237 movss -0x38(%rbp), %xmm1 movss -0x4(%rbp), %xmm4 movss -0xc(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm0 cmpunordss %xmm0, %xmm0 movaps %xmm0, %xmm2 pand %xmm5, %xmm2 minss %xmm4, %xmm3 pandn %xmm3, %xmm0 por %xmm2, %xmm0 ucomiss %xmm1, %xmm0 ja 0xe02bd movss -0x38(%rbp), %xmm0 movss -0x4(%rbp), %xmm4 movss -0xc(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm1 cmpunordss %xmm1, %xmm1 movaps %xmm1, %xmm2 pand %xmm5, %xmm2 maxss %xmm4, %xmm3 pandn %xmm3, %xmm1 por %xmm2, %xmm1 ucomiss %xmm1, %xmm0 ja 0xe02bd movss -0x14(%rbp), %xmm0 subss -0x1c(%rbp), %xmm0 movaps 0xd4088(%rip), %xmm1 # 0x1b42d0 pand %xmm1, %xmm0 movss 0xc7ce0(%rip), %xmm1 # 0x1a7f34 ucomiss %xmm1, %xmm0 jbe 0xe02c1 movss -0x38(%rbp), %xmm1 movss -0x14(%rbp), %xmm4 movss -0x1c(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm0 cmpunordss %xmm0, %xmm0 movaps %xmm0, %xmm2 pand %xmm5, %xmm2 minss %xmm4, %xmm3 pandn %xmm3, %xmm0 por %xmm2, %xmm0 ucomiss %xmm1, %xmm0 ja 0xe02bd movss -0x38(%rbp), %xmm0 movss -0x14(%rbp), %xmm4 movss -0x1c(%rbp), %xmm3 movaps %xmm3, %xmm5 movaps %xmm4, %xmm1 cmpunordss %xmm1, %xmm1 movaps %xmm1, %xmm2 pand %xmm5, %xmm2 maxss %xmm4, %xmm3 pandn %xmm3, %xmm1 por %xmm2, %xmm1 ucomiss %xmm1, %xmm0 jbe 0xe02c1 movb $0x0, -0x29(%rbp) testb $0x1, -0x29(%rbp) je 0xe02e9 cmpq $0x0, -0x28(%rbp) je 0xe02e9 movss -0x34(%rbp), %xmm0 movq -0x28(%rbp), %rax movss %xmm0, (%rax) movss -0x38(%rbp), %xmm0 movq -0x28(%rbp), %rax movss %xmm0, 0x4(%rax) jmp 0xe02eb movb -0x29(%rbp), %al andb $0x1, %al popq %rbp retq nopw %cs:(%rax,%rax)
CheckCollisionLines: push rbp mov rbp, rsp movlpd [rbp+var_8], xmm0 movlpd [rbp+var_10], xmm1 movlpd [rbp+var_18], xmm2 movlpd [rbp+var_20], xmm3 mov [rbp+var_28], rdi mov [rbp+var_29], 0 movss xmm0, dword ptr [rbp+var_20+4] subss xmm0, dword ptr [rbp+var_18+4] movss xmm2, dword ptr [rbp+var_10] subss xmm2, dword ptr [rbp+var_8] movss xmm1, dword ptr [rbp+var_20] subss xmm1, dword ptr [rbp+var_18] movss xmm3, dword ptr [rbp+var_10+4] subss xmm3, dword ptr [rbp+var_8+4] mulss xmm1, xmm3 movd eax, xmm1 xor eax, 80000000h movd xmm1, eax mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_30], xmm0 movss xmm0, [rbp+var_30] movaps xmm1, cs:xmmword_1B42D0 pand xmm0, xmm1 movss xmm1, cs:dword_1A7F34 ucomiss xmm0, xmm1 jb loc_E02EB mov [rbp+var_29], 1 movss xmm0, dword ptr [rbp+var_18] subss xmm0, dword ptr [rbp+var_20] movss xmm2, dword ptr [rbp+var_8] movss xmm3, dword ptr [rbp+var_10+4] movss xmm1, dword ptr [rbp+var_8+4] mulss xmm1, dword ptr [rbp+var_10] movd eax, xmm1 xor eax, 80000000h movd xmm1, eax mulss xmm2, xmm3 addss xmm2, xmm1 movss xmm1, dword ptr [rbp+var_8] subss xmm1, dword ptr [rbp+var_10] movss xmm3, dword ptr [rbp+var_18] movss xmm5, dword ptr [rbp+var_20+4] movss xmm4, dword ptr [rbp+var_18+4] mulss xmm4, dword ptr [rbp+var_20] movd eax, xmm4 xor eax, 80000000h movd xmm4, eax mulss xmm3, xmm5 addss xmm3, xmm4 mulss xmm1, xmm3 movd eax, xmm1 xor eax, 80000000h movd xmm1, eax mulss xmm0, xmm2 addss xmm0, xmm1 divss xmm0, [rbp+var_30] movss [rbp+var_34], xmm0 movss xmm0, dword ptr [rbp+var_18+4] subss xmm0, dword ptr [rbp+var_20+4] movss xmm2, dword ptr [rbp+var_8] movss xmm3, dword ptr [rbp+var_10+4] movss xmm1, dword ptr [rbp+var_8+4] mulss xmm1, dword ptr [rbp+var_10] movd eax, xmm1 xor eax, 80000000h movd xmm1, eax mulss xmm2, xmm3 addss xmm2, xmm1 movss xmm1, dword ptr [rbp+var_8+4] subss xmm1, dword ptr [rbp+var_10+4] movss xmm3, dword ptr [rbp+var_18] movss xmm5, dword ptr [rbp+var_20+4] movss xmm4, dword ptr [rbp+var_18+4] mulss xmm4, dword ptr [rbp+var_20] movd eax, xmm4 xor eax, 80000000h movd xmm4, eax mulss xmm3, xmm5 addss xmm3, xmm4 mulss xmm1, xmm3 movd eax, xmm1 xor eax, 80000000h movd xmm1, eax mulss xmm0, xmm2 addss xmm0, xmm1 divss xmm0, [rbp+var_30] movss [rbp+var_38], xmm0 movss xmm0, dword ptr [rbp+var_8] subss xmm0, dword ptr [rbp+var_10] movaps xmm1, cs:xmmword_1B42D0 pand xmm0, xmm1 movss xmm1, cs:dword_1A7F34 ucomiss xmm0, xmm1 jbe short loc_E011B movss xmm1, [rbp+var_34] movss xmm4, dword ptr [rbp+var_8] movss xmm3, dword ptr [rbp+var_10] movaps xmm5, xmm3 movaps xmm0, xmm4 cmpunordss xmm0, xmm0 movaps xmm2, xmm0 pand xmm2, xmm5 minss xmm3, xmm4 pandn xmm0, xmm3 por xmm0, xmm2 ucomiss xmm0, xmm1 ja loc_E02BD movss xmm0, [rbp+var_34] movss xmm4, dword ptr [rbp+var_8] movss xmm3, dword ptr [rbp+var_10] movaps xmm5, xmm3 movaps xmm1, xmm4 cmpunordss xmm1, xmm1 movaps xmm2, xmm1 pand xmm2, xmm5 maxss xmm3, xmm4 pandn xmm1, xmm3 por xmm1, xmm2 ucomiss xmm0, xmm1 ja loc_E02BD loc_E011B: movss xmm0, dword ptr [rbp+var_18] subss xmm0, dword ptr [rbp+var_20] movaps xmm1, cs:xmmword_1B42D0 pand xmm0, xmm1 movss xmm1, cs:dword_1A7F34 ucomiss xmm0, xmm1 jbe short loc_E01A9 movss xmm1, [rbp+var_34] movss xmm4, dword ptr [rbp+var_18] movss xmm3, dword ptr [rbp+var_20] movaps xmm5, xmm3 movaps xmm0, xmm4 cmpunordss xmm0, xmm0 movaps xmm2, xmm0 pand xmm2, xmm5 minss xmm3, xmm4 pandn xmm0, xmm3 por xmm0, xmm2 ucomiss xmm0, xmm1 ja loc_E02BD movss xmm0, [rbp+var_34] movss xmm4, dword ptr [rbp+var_18] movss xmm3, dword ptr [rbp+var_20] movaps xmm5, xmm3 movaps xmm1, xmm4 cmpunordss xmm1, xmm1 movaps xmm2, xmm1 pand xmm2, xmm5 maxss xmm3, xmm4 pandn xmm1, xmm3 por xmm1, xmm2 ucomiss xmm0, xmm1 ja loc_E02BD loc_E01A9: movss xmm0, dword ptr [rbp+var_8+4] subss xmm0, dword ptr [rbp+var_10+4] movaps xmm1, cs:xmmword_1B42D0 pand xmm0, xmm1 movss xmm1, cs:dword_1A7F34 ucomiss xmm0, xmm1 jbe short loc_E0237 movss xmm1, [rbp+var_38] movss xmm4, dword ptr [rbp+var_8+4] movss xmm3, dword ptr [rbp+var_10+4] movaps xmm5, xmm3 movaps xmm0, xmm4 cmpunordss xmm0, xmm0 movaps xmm2, xmm0 pand xmm2, xmm5 minss xmm3, xmm4 pandn xmm0, xmm3 por xmm0, xmm2 ucomiss xmm0, xmm1 ja loc_E02BD movss xmm0, [rbp+var_38] movss xmm4, dword ptr [rbp+var_8+4] movss xmm3, dword ptr [rbp+var_10+4] movaps xmm5, xmm3 movaps xmm1, xmm4 cmpunordss xmm1, xmm1 movaps xmm2, xmm1 pand xmm2, xmm5 maxss xmm3, xmm4 pandn xmm1, xmm3 por xmm1, xmm2 ucomiss xmm0, xmm1 ja loc_E02BD loc_E0237: movss xmm0, dword ptr [rbp+var_18+4] subss xmm0, dword ptr [rbp+var_20+4] movaps xmm1, cs:xmmword_1B42D0 pand xmm0, xmm1 movss xmm1, cs:dword_1A7F34 ucomiss xmm0, xmm1 jbe short loc_E02C1 movss xmm1, [rbp+var_38] movss xmm4, dword ptr [rbp+var_18+4] movss xmm3, dword ptr [rbp+var_20+4] movaps xmm5, xmm3 movaps xmm0, xmm4 cmpunordss xmm0, xmm0 movaps xmm2, xmm0 pand xmm2, xmm5 minss xmm3, xmm4 pandn xmm0, xmm3 por xmm0, xmm2 ucomiss xmm0, xmm1 ja short loc_E02BD movss xmm0, [rbp+var_38] movss xmm4, dword ptr [rbp+var_18+4] movss xmm3, dword ptr [rbp+var_20+4] movaps xmm5, xmm3 movaps xmm1, xmm4 cmpunordss xmm1, xmm1 movaps xmm2, xmm1 pand xmm2, xmm5 maxss xmm3, xmm4 pandn xmm1, xmm3 por xmm1, xmm2 ucomiss xmm0, xmm1 jbe short loc_E02C1 loc_E02BD: mov [rbp+var_29], 0 loc_E02C1: test [rbp+var_29], 1 jz short loc_E02E9 cmp [rbp+var_28], 0 jz short loc_E02E9 movss xmm0, [rbp+var_34] mov rax, [rbp+var_28] movss dword ptr [rax], xmm0 movss xmm0, [rbp+var_38] mov rax, [rbp+var_28] movss dword ptr [rax+4], xmm0 loc_E02E9: jmp short $+2 loc_E02EB: mov al, [rbp+var_29] and al, 1 pop rbp retn
char CheckCollisionLines(float *a1, double a2, double a3, double a4, double a5) { __m128i v5; // xmm1 __m128i v6; // xmm1 float v7; // xmm2_4 __m128i v8; // xmm1 __m128i v9; // xmm4 __m128i v10; // xmm1 float v11; // xmm2_4 __m128i v12; // xmm1 __m128i v13; // xmm4 __m128i v14; // xmm0 __m128i v15; // xmm3 __m128i v16; // xmm0 __m128i v17; // xmm3 __m128i v18; // xmm1 __m128i v19; // xmm0 __m128i v20; // xmm3 __m128i v21; // xmm0 __m128i v22; // xmm3 __m128i v23; // xmm1 __m128i v24; // xmm0 __m128i v25; // xmm3 __m128i v26; // xmm0 __m128i v27; // xmm3 __m128i v28; // xmm1 __m128i v29; // xmm0 __m128i v30; // xmm3 __m128i v31; // xmm0 __m128i v32; // xmm3 __m128i v33; // xmm1 float v35; // [rsp+0h] [rbp-38h] float v36; // [rsp+4h] [rbp-34h] float v37; // [rsp+8h] [rbp-30h] char v38; // [rsp+Fh] [rbp-29h] double v40; // [rsp+20h] [rbp-18h] v40 = a4; v38 = 0; *(float *)&a4 = *(float *)&a3 - *(float *)&a2; v5 = (__m128i)LODWORD(a5); *(float *)v5.m128i_i32 = (float)(*(float *)&a5 - *(float *)&v40) * (float)(*((float *)&a3 + 1) - *((float *)&a2 + 1)); v37 = (float)((float)(*((float *)&a5 + 1) - *((float *)&a4 + 1)) * *(float *)&a4) + COERCE_FLOAT(_mm_cvtsi128_si32(v5) ^ 0x80000000); if ( *(float *)_mm_and_si128((__m128i)LODWORD(v37), (__m128i)xmmword_1B42D0).m128i_i32 >= 0.00000011920929 ) { v38 = 1; v6 = (__m128i)HIDWORD(a2); *(float *)v6.m128i_i32 = *((float *)&a2 + 1) * *(float *)&a3; v7 = (float)(*(float *)&a2 * *((float *)&a3 + 1)) + COERCE_FLOAT(_mm_cvtsi128_si32(v6) ^ 0x80000000); v8 = (__m128i)LODWORD(a2); v9 = (__m128i)HIDWORD(v40); *(float *)v9.m128i_i32 = *((float *)&v40 + 1) * *(float *)&a5; *(float *)v8.m128i_i32 = (float)(*(float *)&a2 - *(float *)&a3) * (float)((float)(*(float *)&v40 * *((float *)&a5 + 1)) + COERCE_FLOAT(_mm_cvtsi128_si32(v9) ^ 0x80000000)); v36 = (float)((float)((float)(*(float *)&v40 - *(float *)&a5) * v7) + COERCE_FLOAT(_mm_cvtsi128_si32(v8) ^ 0x80000000)) / v37; v10 = (__m128i)HIDWORD(a2); *(float *)v10.m128i_i32 = *((float *)&a2 + 1) * *(float *)&a3; v11 = (float)(*(float *)&a2 * *((float *)&a3 + 1)) + COERCE_FLOAT(_mm_cvtsi128_si32(v10) ^ 0x80000000); v12 = (__m128i)HIDWORD(a2); v13 = (__m128i)HIDWORD(v40); *(float *)v13.m128i_i32 = *((float *)&v40 + 1) * *(float *)&a5; *(float *)v12.m128i_i32 = (float)(*((float *)&a2 + 1) - *((float *)&a3 + 1)) * (float)((float)(*(float *)&v40 * *((float *)&a5 + 1)) + COERCE_FLOAT(_mm_cvtsi128_si32(v13) ^ 0x80000000)); v35 = (float)((float)((float)(*((float *)&v40 + 1) - *((float *)&a5 + 1)) * v11) + COERCE_FLOAT(_mm_cvtsi128_si32(v12) ^ 0x80000000)) / v37; v14 = (__m128i)LODWORD(a2); *(float *)v14.m128i_i32 = *(float *)&a2 - *(float *)&a3; if ( *(float *)_mm_and_si128(v14, (__m128i)xmmword_1B42D0).m128i_i32 > 0.00000011920929 ) { v15 = (__m128i)LODWORD(a3); v16 = (__m128i)_mm_cmpunord_ss((__m128)LODWORD(a2), (__m128)LODWORD(a2)); *(float *)v15.m128i_i32 = fminf(*(float *)&a3, *(float *)&a2); if ( *(float *)_mm_or_si128(_mm_andnot_si128(v16, v15), _mm_and_si128(v16, (__m128i)LODWORD(a3))).m128i_i32 > v36 ) goto LABEL_14; v17 = (__m128i)LODWORD(a3); v18 = (__m128i)_mm_cmpunord_ss((__m128)LODWORD(a2), (__m128)LODWORD(a2)); *(float *)v17.m128i_i32 = fmaxf(*(float *)&a3, *(float *)&a2); if ( v36 > *(float *)_mm_or_si128(_mm_andnot_si128(v18, v17), _mm_and_si128(v18, (__m128i)LODWORD(a3))).m128i_i32 ) goto LABEL_14; } v19 = (__m128i)LODWORD(v40); *(float *)v19.m128i_i32 = *(float *)&v40 - *(float *)&a5; if ( *(float *)_mm_and_si128(v19, (__m128i)xmmword_1B42D0).m128i_i32 > 0.00000011920929 ) { v20 = (__m128i)LODWORD(a5); v21 = (__m128i)_mm_cmpunord_ss((__m128)LODWORD(v40), (__m128)LODWORD(v40)); *(float *)v20.m128i_i32 = fminf(*(float *)&a5, *(float *)&v40); if ( *(float *)_mm_or_si128(_mm_andnot_si128(v21, v20), _mm_and_si128(v21, (__m128i)LODWORD(a5))).m128i_i32 > v36 ) goto LABEL_14; v22 = (__m128i)LODWORD(a5); v23 = (__m128i)_mm_cmpunord_ss((__m128)LODWORD(v40), (__m128)LODWORD(v40)); *(float *)v22.m128i_i32 = fmaxf(*(float *)&a5, *(float *)&v40); if ( v36 > *(float *)_mm_or_si128(_mm_andnot_si128(v23, v22), _mm_and_si128(v23, (__m128i)LODWORD(a5))).m128i_i32 ) goto LABEL_14; } v24 = (__m128i)HIDWORD(a2); *(float *)v24.m128i_i32 = *((float *)&a2 + 1) - *((float *)&a3 + 1); if ( *(float *)_mm_and_si128(v24, (__m128i)xmmword_1B42D0).m128i_i32 > 0.00000011920929 ) { v25 = (__m128i)HIDWORD(a3); v26 = (__m128i)_mm_cmpunord_ss((__m128)HIDWORD(a2), (__m128)HIDWORD(a2)); *(float *)v25.m128i_i32 = fminf(*((float *)&a3 + 1), *((float *)&a2 + 1)); if ( *(float *)_mm_or_si128(_mm_andnot_si128(v26, v25), _mm_and_si128(v26, (__m128i)HIDWORD(a3))).m128i_i32 > v35 ) goto LABEL_14; v27 = (__m128i)HIDWORD(a3); v28 = (__m128i)_mm_cmpunord_ss((__m128)HIDWORD(a2), (__m128)HIDWORD(a2)); *(float *)v27.m128i_i32 = fmaxf(*((float *)&a3 + 1), *((float *)&a2 + 1)); if ( v35 > *(float *)_mm_or_si128(_mm_andnot_si128(v28, v27), _mm_and_si128(v28, (__m128i)HIDWORD(a3))).m128i_i32 ) goto LABEL_14; } v29 = (__m128i)HIDWORD(v40); *(float *)v29.m128i_i32 = *((float *)&v40 + 1) - *((float *)&a5 + 1); if ( *(float *)_mm_and_si128(v29, (__m128i)xmmword_1B42D0).m128i_i32 > 0.00000011920929 ) { v30 = (__m128i)HIDWORD(a5); v31 = (__m128i)_mm_cmpunord_ss((__m128)HIDWORD(v40), (__m128)HIDWORD(v40)); *(float *)v30.m128i_i32 = fminf(*((float *)&a5 + 1), *((float *)&v40 + 1)); if ( *(float *)_mm_or_si128(_mm_andnot_si128(v31, v30), _mm_and_si128(v31, (__m128i)HIDWORD(a5))).m128i_i32 > v35 || (v32 = (__m128i)HIDWORD(a5), v33 = (__m128i)_mm_cmpunord_ss((__m128)HIDWORD(v40), (__m128)HIDWORD(v40)), *(float *)v32.m128i_i32 = fmaxf(*((float *)&a5 + 1), *((float *)&v40 + 1)), v35 > *(float *)_mm_or_si128(_mm_andnot_si128(v33, v32), _mm_and_si128(v33, (__m128i)HIDWORD(a5))).m128i_i32) ) { LABEL_14: v38 = 0; } } if ( (v38 & 1) != 0 && a1 ) { *a1 = v36; a1[1] = v35; } } return v38; }
CheckCollisionLines: PUSH RBP MOV RBP,RSP MOVLPD qword ptr [RBP + -0x8],XMM0 MOVLPD qword ptr [RBP + -0x10],XMM1 MOVLPD qword ptr [RBP + -0x18],XMM2 MOVLPD qword ptr [RBP + -0x20],XMM3 MOV qword ptr [RBP + -0x28],RDI MOV byte ptr [RBP + -0x29],0x0 MOVSS XMM0,dword ptr [RBP + -0x1c] SUBSS XMM0,dword ptr [RBP + -0x14] MOVSS XMM2,dword ptr [RBP + -0x10] SUBSS XMM2,dword ptr [RBP + -0x8] MOVSS XMM1,dword ptr [RBP + -0x20] SUBSS XMM1,dword ptr [RBP + -0x18] MOVSS XMM3,dword ptr [RBP + -0xc] SUBSS XMM3,dword ptr [RBP + -0x4] MULSS XMM1,XMM3 MOVD EAX,XMM1 XOR EAX,0x80000000 MOVD XMM1,EAX MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x30],XMM0 MOVSS XMM0,dword ptr [RBP + -0x30] MOVAPS XMM1,xmmword ptr [0x002b42d0] PAND XMM0,XMM1 MOVSS XMM1,dword ptr [0x002a7f34] UCOMISS XMM0,XMM1 JC 0x001e02eb MOV byte ptr [RBP + -0x29],0x1 MOVSS XMM0,dword ptr [RBP + -0x18] SUBSS XMM0,dword ptr [RBP + -0x20] MOVSS XMM2,dword ptr [RBP + -0x8] MOVSS XMM3,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [RBP + -0x4] MULSS XMM1,dword ptr [RBP + -0x10] MOVD EAX,XMM1 XOR EAX,0x80000000 MOVD XMM1,EAX MULSS XMM2,XMM3 ADDSS XMM2,XMM1 MOVSS XMM1,dword ptr [RBP + -0x8] SUBSS XMM1,dword ptr [RBP + -0x10] MOVSS XMM3,dword ptr [RBP + -0x18] MOVSS XMM5,dword ptr [RBP + -0x1c] MOVSS XMM4,dword ptr [RBP + -0x14] MULSS XMM4,dword ptr [RBP + -0x20] MOVD EAX,XMM4 XOR EAX,0x80000000 MOVD XMM4,EAX MULSS XMM3,XMM5 ADDSS XMM3,XMM4 MULSS XMM1,XMM3 MOVD EAX,XMM1 XOR EAX,0x80000000 MOVD XMM1,EAX MULSS XMM0,XMM2 ADDSS XMM0,XMM1 DIVSS XMM0,dword ptr [RBP + -0x30] MOVSS dword ptr [RBP + -0x34],XMM0 MOVSS XMM0,dword ptr [RBP + -0x14] SUBSS XMM0,dword ptr [RBP + -0x1c] MOVSS XMM2,dword ptr [RBP + -0x8] MOVSS XMM3,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [RBP + -0x4] MULSS XMM1,dword ptr [RBP + -0x10] MOVD EAX,XMM1 XOR EAX,0x80000000 MOVD XMM1,EAX MULSS XMM2,XMM3 ADDSS XMM2,XMM1 MOVSS XMM1,dword ptr [RBP + -0x4] SUBSS XMM1,dword ptr [RBP + -0xc] MOVSS XMM3,dword ptr [RBP + -0x18] MOVSS XMM5,dword ptr [RBP + -0x1c] MOVSS XMM4,dword ptr [RBP + -0x14] MULSS XMM4,dword ptr [RBP + -0x20] MOVD EAX,XMM4 XOR EAX,0x80000000 MOVD XMM4,EAX MULSS XMM3,XMM5 ADDSS XMM3,XMM4 MULSS XMM1,XMM3 MOVD EAX,XMM1 XOR EAX,0x80000000 MOVD XMM1,EAX MULSS XMM0,XMM2 ADDSS XMM0,XMM1 DIVSS XMM0,dword ptr [RBP + -0x30] MOVSS dword ptr [RBP + -0x38],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8] SUBSS XMM0,dword ptr [RBP + -0x10] MOVAPS XMM1,xmmword ptr [0x002b42d0] PAND XMM0,XMM1 MOVSS XMM1,dword ptr [0x002a7f34] UCOMISS XMM0,XMM1 JBE 0x001e011b MOVSS XMM1,dword ptr [RBP + -0x34] MOVSS XMM4,dword ptr [RBP + -0x8] MOVSS XMM3,dword ptr [RBP + -0x10] MOVAPS XMM5,XMM3 MOVAPS XMM0,XMM4 CMPUNORDSS XMM0,XMM0 MOVAPS XMM2,XMM0 PAND XMM2,XMM5 MINSS XMM3,XMM4 PANDN XMM0,XMM3 POR XMM0,XMM2 UCOMISS XMM0,XMM1 JA 0x001e02bd MOVSS XMM0,dword ptr [RBP + -0x34] MOVSS XMM4,dword ptr [RBP + -0x8] MOVSS XMM3,dword ptr [RBP + -0x10] MOVAPS XMM5,XMM3 MOVAPS XMM1,XMM4 CMPUNORDSS XMM1,XMM1 MOVAPS XMM2,XMM1 PAND XMM2,XMM5 MAXSS XMM3,XMM4 PANDN XMM1,XMM3 POR XMM1,XMM2 UCOMISS XMM0,XMM1 JA 0x001e02bd LAB_001e011b: MOVSS XMM0,dword ptr [RBP + -0x18] SUBSS XMM0,dword ptr [RBP + -0x20] MOVAPS XMM1,xmmword ptr [0x002b42d0] PAND XMM0,XMM1 MOVSS XMM1,dword ptr [0x002a7f34] UCOMISS XMM0,XMM1 JBE 0x001e01a9 MOVSS XMM1,dword ptr [RBP + -0x34] MOVSS XMM4,dword ptr [RBP + -0x18] MOVSS XMM3,dword ptr [RBP + -0x20] MOVAPS XMM5,XMM3 MOVAPS XMM0,XMM4 CMPUNORDSS XMM0,XMM0 MOVAPS XMM2,XMM0 PAND XMM2,XMM5 MINSS XMM3,XMM4 PANDN XMM0,XMM3 POR XMM0,XMM2 UCOMISS XMM0,XMM1 JA 0x001e02bd MOVSS XMM0,dword ptr [RBP + -0x34] MOVSS XMM4,dword ptr [RBP + -0x18] MOVSS XMM3,dword ptr [RBP + -0x20] MOVAPS XMM5,XMM3 MOVAPS XMM1,XMM4 CMPUNORDSS XMM1,XMM1 MOVAPS XMM2,XMM1 PAND XMM2,XMM5 MAXSS XMM3,XMM4 PANDN XMM1,XMM3 POR XMM1,XMM2 UCOMISS XMM0,XMM1 JA 0x001e02bd LAB_001e01a9: MOVSS XMM0,dword ptr [RBP + -0x4] SUBSS XMM0,dword ptr [RBP + -0xc] MOVAPS XMM1,xmmword ptr [0x002b42d0] PAND XMM0,XMM1 MOVSS XMM1,dword ptr [0x002a7f34] UCOMISS XMM0,XMM1 JBE 0x001e0237 MOVSS XMM1,dword ptr [RBP + -0x38] MOVSS XMM4,dword ptr [RBP + -0x4] MOVSS XMM3,dword ptr [RBP + -0xc] MOVAPS XMM5,XMM3 MOVAPS XMM0,XMM4 CMPUNORDSS XMM0,XMM0 MOVAPS XMM2,XMM0 PAND XMM2,XMM5 MINSS XMM3,XMM4 PANDN XMM0,XMM3 POR XMM0,XMM2 UCOMISS XMM0,XMM1 JA 0x001e02bd MOVSS XMM0,dword ptr [RBP + -0x38] MOVSS XMM4,dword ptr [RBP + -0x4] MOVSS XMM3,dword ptr [RBP + -0xc] MOVAPS XMM5,XMM3 MOVAPS XMM1,XMM4 CMPUNORDSS XMM1,XMM1 MOVAPS XMM2,XMM1 PAND XMM2,XMM5 MAXSS XMM3,XMM4 PANDN XMM1,XMM3 POR XMM1,XMM2 UCOMISS XMM0,XMM1 JA 0x001e02bd LAB_001e0237: MOVSS XMM0,dword ptr [RBP + -0x14] SUBSS XMM0,dword ptr [RBP + -0x1c] MOVAPS XMM1,xmmword ptr [0x002b42d0] PAND XMM0,XMM1 MOVSS XMM1,dword ptr [0x002a7f34] UCOMISS XMM0,XMM1 JBE 0x001e02c1 MOVSS XMM1,dword ptr [RBP + -0x38] MOVSS XMM4,dword ptr [RBP + -0x14] MOVSS XMM3,dword ptr [RBP + -0x1c] MOVAPS XMM5,XMM3 MOVAPS XMM0,XMM4 CMPUNORDSS XMM0,XMM0 MOVAPS XMM2,XMM0 PAND XMM2,XMM5 MINSS XMM3,XMM4 PANDN XMM0,XMM3 POR XMM0,XMM2 UCOMISS XMM0,XMM1 JA 0x001e02bd MOVSS XMM0,dword ptr [RBP + -0x38] MOVSS XMM4,dword ptr [RBP + -0x14] MOVSS XMM3,dword ptr [RBP + -0x1c] MOVAPS XMM5,XMM3 MOVAPS XMM1,XMM4 CMPUNORDSS XMM1,XMM1 MOVAPS XMM2,XMM1 PAND XMM2,XMM5 MAXSS XMM3,XMM4 PANDN XMM1,XMM3 POR XMM1,XMM2 UCOMISS XMM0,XMM1 JBE 0x001e02c1 LAB_001e02bd: MOV byte ptr [RBP + -0x29],0x0 LAB_001e02c1: TEST byte ptr [RBP + -0x29],0x1 JZ 0x001e02e9 CMP qword ptr [RBP + -0x28],0x0 JZ 0x001e02e9 MOVSS XMM0,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOVSS dword ptr [RAX],XMM0 MOVSS XMM0,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOVSS dword ptr [RAX + 0x4],XMM0 LAB_001e02e9: JMP 0x001e02eb LAB_001e02eb: MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ char CheckCollisionLines(int8 param_1,int8 param_2,int8 param_3,int8 param_4 ,float *param_5) { uint uVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; char local_31; float local_20; float fStack_1c; float local_18; float fStack_14; float local_10; float fStack_c; fVar6 = (float)((ulong)param_4 >> 0x20); fVar5 = (float)param_4; fStack_1c = (float)((ulong)param_3 >> 0x20); local_18 = (float)param_2; local_10 = (float)param_1; local_20 = (float)param_3; fStack_14 = (float)((ulong)param_2 >> 0x20); fStack_c = (float)((ulong)param_1 >> 0x20); fVar2 = (fVar6 - fStack_1c) * (local_18 - local_10) + -((fVar5 - local_20) * (fStack_14 - fStack_c)); if ((float)((uint)fVar2 & _DAT_002b42d0) < DAT_002a7f34) { return '\0'; } local_31 = '\x01'; fVar3 = ((local_20 - fVar5) * (local_10 * fStack_14 + -(fStack_c * local_18)) + -((local_10 - local_18) * (local_20 * fVar6 + -(fStack_1c * fVar5)))) / fVar2; fVar2 = ((fStack_1c - fVar6) * (local_10 * fStack_14 + -(fStack_c * local_18)) + -((fStack_c - fStack_14) * (local_20 * fVar6 + -(fStack_1c * fVar5)))) / fVar2; if ((float)((uint)(local_10 - local_18) & _DAT_002b42d0) <= DAT_002a7f34) { LAB_001e011b: if (DAT_002a7f34 < (float)((uint)(local_20 - fVar5) & _DAT_002b42d0)) { fVar4 = fVar5; if (local_20 <= fVar5) { fVar4 = local_20; } if ((float)(~-(uint)NAN(local_20) & (uint)fVar4 | -(uint)NAN(local_20) & (uint)fVar5) <= fVar3 ) { fVar4 = fVar5; if (fVar5 <= local_20) { fVar4 = local_20; } if (fVar3 <= (float)(~-(uint)NAN(local_20) & (uint)fVar4 | -(uint)NAN(local_20) & (uint)fVar5)) goto LAB_001e01a9; } } else { LAB_001e01a9: if (DAT_002a7f34 < (float)((uint)(fStack_c - fStack_14) & _DAT_002b42d0)) { fVar5 = fStack_14; if (fStack_c <= fStack_14) { fVar5 = fStack_c; } if ((float)(~-(uint)NAN(fStack_c) & (uint)fVar5 | -(uint)NAN(fStack_c) & (uint)fStack_14) <= fVar2) { uVar1 = -(uint)NAN(fStack_c) & (uint)fStack_14; if (fStack_14 <= fStack_c) { fStack_14 = fStack_c; } if (fVar2 <= (float)(~-(uint)NAN(fStack_c) & (uint)fStack_14 | uVar1)) goto LAB_001e0237; } } else { LAB_001e0237: if ((float)((uint)(fStack_1c - fVar6) & _DAT_002b42d0) <= DAT_002a7f34) goto LAB_001e02c1; fVar5 = fVar6; if (fStack_1c <= fVar6) { fVar5 = fStack_1c; } if ((float)(~-(uint)NAN(fStack_1c) & (uint)fVar5 | -(uint)NAN(fStack_1c) & (uint)fVar6) <= fVar2) { fVar5 = fVar6; if (fVar6 <= fStack_1c) { fVar5 = fStack_1c; } if (fVar2 <= (float)(~-(uint)NAN(fStack_1c) & (uint)fVar5 | -(uint)NAN(fStack_1c) & (uint)fVar6)) goto LAB_001e02c1; } } } } else { fVar4 = local_18; if (local_10 <= local_18) { fVar4 = local_10; } if ((float)(~-(uint)NAN(local_10) & (uint)fVar4 | -(uint)NAN(local_10) & (uint)local_18) <= fVar3) { uVar1 = -(uint)NAN(local_10) & (uint)local_18; if (local_18 <= local_10) { local_18 = local_10; } if (fVar3 <= (float)(~-(uint)NAN(local_10) & (uint)local_18 | uVar1)) goto LAB_001e011b; } } local_31 = '\0'; LAB_001e02c1: if ((local_31 != '\0') && (param_5 != (float *)0x0)) { *param_5 = fVar3; param_5[1] = fVar2; } return local_31; }