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
34,800
ftxui::operator|(std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/util.cpp
Decorator operator|(Decorator a, Decorator b) { return compose(std::move(a), // std::move(b)); }
O2
cpp
ftxui::operator|(std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) andq $0x0, 0x30(%rsp) movq 0x18(%rsi), %r12 movq %r12, 0x38(%rsp) movq 0x10(%rsi), %r15 testq %r15, %r15 je 0x2063f movups (%rsi), %xmm1 addq $0x10, %rsi movaps %xmm1, 0x20(%rsp) movq %r15, 0x30(%rsp) movups %xmm0, (%rsi) movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) movq 0x18(%rdx), %r13 movq %r13, 0x18(%rsp) movq 0x10(%rdx), %r14 testq %r14, %r14 je 0x20671 movups (%rdx), %xmm0 addq $0x10, %rdx movaps %xmm0, (%rsp) movq %r14, 0x10(%rsp) xorps %xmm0, %xmm0 movups %xmm0, (%rdx) andq $0x0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movq %r12, 0x58(%rsp) testq %r15, %r15 je 0x2069a movaps 0x20(%rsp), %xmm1 movaps %xmm1, 0x40(%rsp) movq %r15, 0x50(%rsp) movaps %xmm0, 0x30(%rsp) leaq 0x60(%rsp), %rbp andq $0x0, 0x10(%rbp) movaps %xmm0, (%rbp) movq %r13, 0x18(%rbp) testq %r14, %r14 je 0x206c6 movaps (%rsp), %xmm0 movups %xmm0, (%rbp) movq %r14, 0x70(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) pushq $0x40 popq %rdi callq 0xc450 andq $0x0, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq %r12, 0x18(%rax) testq %r15, %r15 je 0x206fd movaps 0x40(%rsp), %xmm0 movups %xmm0, (%rax) movq %r15, 0x10(%rax) xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) andq $0x0, 0x30(%rax) movups %xmm0, 0x20(%rax) movq %r13, 0x38(%rax) testq %r14, %r14 je 0x20726 movq %rax, %rcx addq $0x20, %rcx movups (%rbp), %xmm1 movups %xmm1, (%rcx) movq %r14, 0x30(%rax) movaps %xmm0, 0x70(%rsp) movq %rax, (%rbx) leaq 0x458(%rip), %rax # 0x20b88 movq %rax, 0x18(%rbx) leaq 0x4ef(%rip), %rax # 0x20c2a movq %rax, 0x10(%rbx) leaq 0x40(%rsp), %rdi callq 0x20b72 movq %rsp, %rdi callq 0x13b10 leaq 0x20(%rsp), %rdi callq 0x13b10 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq %rbx, %rdi callq 0x13b10 leaq 0x40(%rsp), %rdi callq 0x20b72 movq %rsp, %rdi callq 0x13b10 leaq 0x20(%rsp), %rdi callq 0x13b10 movq %r14, %rdi callq 0xc7f0
_ZN5ftxuiorESt8functionIFSt10shared_ptrINS_4NodeEES3_EES5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+0B8h+var_98], xmm0 and qword ptr [rsp+0B8h+var_88], 0 mov r12, [rsi+18h] mov qword ptr [rsp+0B8h+var_88+8], r12 mov r15, [rsi+10h] test r15, r15 jz short loc_2063F movups xmm1, xmmword ptr [rsi] add rsi, 10h movaps [rsp+0B8h+var_98], xmm1 mov qword ptr [rsp+0B8h+var_88], r15 movups xmmword ptr [rsi], xmm0 loc_2063F: movaps [rsp+0B8h+var_B8], xmm0 and qword ptr [rsp+0B8h+var_A8], 0 mov r13, [rdx+18h] mov qword ptr [rsp+0B8h+var_A8+8], r13 mov r14, [rdx+10h] test r14, r14 jz short loc_20671 movups xmm0, xmmword ptr [rdx] add rdx, 10h movaps [rsp+0B8h+var_B8], xmm0 mov qword ptr [rsp+0B8h+var_A8], r14 xorps xmm0, xmm0 movups xmmword ptr [rdx], xmm0 loc_20671: and qword ptr [rsp+0B8h+var_68], 0 movaps [rsp+0B8h+var_78], xmm0 mov qword ptr [rsp+0B8h+var_68+8], r12 test r15, r15 jz short loc_2069A movaps xmm1, [rsp+0B8h+var_98] movaps [rsp+0B8h+var_78], xmm1 mov qword ptr [rsp+0B8h+var_68], r15 movaps [rsp+0B8h+var_88], xmm0 loc_2069A: lea rbp, [rsp+0B8h+var_58] and qword ptr [rbp+10h], 0 movaps xmmword ptr [rbp+0], xmm0 mov [rbp+18h], r13 test r14, r14 jz short loc_206C6 movaps xmm0, [rsp+0B8h+var_B8] movups xmmword ptr [rbp+0], xmm0 mov qword ptr [rsp+0B8h+var_48], r14 xorps xmm0, xmm0 movaps [rsp+0B8h+var_A8], xmm0 loc_206C6: movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 push 40h ; '@' pop rdi; unsigned __int64 call __Znwm; operator new(ulong) and qword ptr [rax+10h], 0 xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov [rax+18h], r12 test r15, r15 jz short loc_206FD movaps xmm0, [rsp+0B8h+var_78] movups xmmword ptr [rax], xmm0 mov [rax+10h], r15 xorps xmm0, xmm0 movaps [rsp+0B8h+var_68], xmm0 loc_206FD: and qword ptr [rax+30h], 0 movups xmmword ptr [rax+20h], xmm0 mov [rax+38h], r13 test r14, r14 jz short loc_20726 mov rcx, rax add rcx, 20h ; ' ' movups xmm1, xmmword ptr [rbp+0] movups xmmword ptr [rcx], xmm1 mov [rax+30h], r14 movaps [rsp+0B8h+var_48], xmm0 loc_20726: mov [rbx], rax lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEES3_EZNS1_12_GLOBAL__N_17composeESt8functionIS4_ES7_E3$_0E9_M_invokeERKSt9_Any_dataOS3_; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::`anonymous namespace'::compose(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<ftxui::Node>&&) mov [rbx+18h], rax lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEES3_EZNS1_12_GLOBAL__N_17composeESt8functionIS4_ES7_E3$_0E10_M_managerERSt9_Any_dataRKSA_St18_Manager_operation; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::`anonymous namespace'::compose(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rbx+10h], rax lea rdi, [rsp+0B8h+var_78]; this call _ZZN5ftxui12_GLOBAL__N_17composeESt8functionIFSt10shared_ptrINS_4NodeEES4_EES6_EN3$_0D2Ev; ftxui::`anonymous namespace'::compose(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)::$_0::~$_0() mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+0B8h+var_98]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, rbx; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+arg_38]; this call _ZZN5ftxui12_GLOBAL__N_17composeESt8functionIFSt10shared_ptrINS_4NodeEES4_EES6_EN3$_0D2Ev; ftxui::`anonymous namespace'::compose(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)::$_0::~$_0() mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+arg_18]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, r14 call __Unwind_Resume
long long ftxui::operator|(long long a1, __int128 *a2, __int128 *a3) { __int128 v3; // xmm0 long long v4; // r12 long long v5; // r15 long long v6; // r13 long long v7; // r14 long long v8; // rax __int128 v9; // xmm0 __int128 v11; // [rsp+0h] [rbp-B8h] BYREF __int128 v12; // [rsp+10h] [rbp-A8h] __int128 v13; // [rsp+20h] [rbp-98h] BYREF __int128 v14; // [rsp+30h] [rbp-88h] __int128 v15; // [rsp+40h] [rbp-78h] BYREF __int128 v16; // [rsp+50h] [rbp-68h] __int128 v17; // [rsp+60h] [rbp-58h] __int128 v18; // [rsp+70h] [rbp-48h] v3 = 0LL; v13 = 0LL; *(_QWORD *)&v14 = 0LL; v4 = *((_QWORD *)a2 + 3); *((_QWORD *)&v14 + 1) = v4; v5 = *((_QWORD *)a2 + 2); if ( v5 ) { v13 = *a2; *(_QWORD *)&v14 = v5; a2[1] = 0LL; } v11 = 0LL; *(_QWORD *)&v12 = 0LL; v6 = *((_QWORD *)a3 + 3); *((_QWORD *)&v12 + 1) = v6; v7 = *((_QWORD *)a3 + 2); if ( v7 ) { v11 = *a3; *(_QWORD *)&v12 = v7; v3 = 0LL; a3[1] = 0LL; } *(_QWORD *)&v16 = 0LL; v15 = v3; *((_QWORD *)&v16 + 1) = v4; if ( v5 ) { v15 = v13; *(_QWORD *)&v16 = v5; v14 = v3; } *(_QWORD *)&v18 = 0LL; v17 = v3; *((_QWORD *)&v18 + 1) = v6; if ( v7 ) { v17 = v11; *(_QWORD *)&v18 = v7; v3 = 0LL; v12 = 0LL; } *(_OWORD *)(a1 + 16) = v3; *(_OWORD *)a1 = v3; v8 = operator new(0x40uLL); *(_QWORD *)(v8 + 16) = 0LL; v9 = 0LL; *(_OWORD *)v8 = 0LL; *(_QWORD *)(v8 + 24) = v4; if ( v5 ) { *(_OWORD *)v8 = v15; *(_QWORD *)(v8 + 16) = v5; v9 = 0LL; v16 = 0LL; } *(_QWORD *)(v8 + 48) = 0LL; *(_OWORD *)(v8 + 32) = v9; *(_QWORD *)(v8 + 56) = v6; if ( v7 ) { *(_OWORD *)(v8 + 32) = v17; *(_QWORD *)(v8 + 48) = v7; v18 = v9; } *(_QWORD *)a1 = v8; *(_QWORD *)(a1 + 24) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::`anonymous namespace'::compose(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)::$_0>::_M_invoke; *(_QWORD *)(a1 + 16) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::`anonymous namespace'::compose(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)::$_0>::_M_manager; ftxui::`anonymous namespace'::compose(std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)::$_0::~$_0((std::_Function_base *)&v15); std::_Function_base::~_Function_base((std::_Function_base *)&v11); std::_Function_base::~_Function_base((std::_Function_base *)&v13); return a1; }
operator|: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 AND qword ptr [RSP + 0x30],0x0 MOV R12,qword ptr [RSI + 0x18] MOV qword ptr [RSP + 0x38],R12 MOV R15,qword ptr [RSI + 0x10] TEST R15,R15 JZ 0x0012063f MOVUPS XMM1,xmmword ptr [RSI] ADD RSI,0x10 MOVAPS xmmword ptr [RSP + 0x20],XMM1 MOV qword ptr [RSP + 0x30],R15 MOVUPS xmmword ptr [RSI],XMM0 LAB_0012063f: MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 MOV R13,qword ptr [RDX + 0x18] MOV qword ptr [RSP + 0x18],R13 MOV R14,qword ptr [RDX + 0x10] TEST R14,R14 JZ 0x00120671 MOVUPS XMM0,xmmword ptr [RDX] ADD RDX,0x10 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDX],XMM0 LAB_00120671: AND qword ptr [RSP + 0x50],0x0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x58],R12 TEST R15,R15 JZ 0x0012069a MOVAPS XMM1,xmmword ptr [RSP + 0x20] MOVAPS xmmword ptr [RSP + 0x40],XMM1 MOV qword ptr [RSP + 0x50],R15 MOVAPS xmmword ptr [RSP + 0x30],XMM0 LAB_0012069a: LEA RBP,[RSP + 0x60] AND qword ptr [RBP + 0x10],0x0 MOVAPS xmmword ptr [RBP],XMM0 MOV qword ptr [RBP + 0x18],R13 TEST R14,R14 JZ 0x001206c6 MOVAPS XMM0,xmmword ptr [RSP] MOVUPS xmmword ptr [RBP],XMM0 MOV qword ptr [RSP + 0x70],R14 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_001206c6: MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_001206cd: PUSH 0x40 POP RDI CALL 0x0010c450 LAB_001206d5: AND qword ptr [RAX + 0x10],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x18],R12 TEST R15,R15 JZ 0x001206fd MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],R15 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 LAB_001206fd: AND qword ptr [RAX + 0x30],0x0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOV qword ptr [RAX + 0x38],R13 TEST R14,R14 JZ 0x00120726 MOV RCX,RAX ADD RCX,0x20 MOVUPS XMM1,xmmword ptr [RBP] MOVUPS xmmword ptr [RCX],XMM1 MOV qword ptr [RAX + 0x30],R14 MOVAPS xmmword ptr [RSP + 0x70],XMM0 LAB_00120726: MOV qword ptr [RBX],RAX LEA RAX,[0x120b88] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x120c2a] MOV qword ptr [RBX + 0x10],RAX LEA RDI,[RSP + 0x40] CALL 0x00120b72 MOV RDI,RSP CALL 0x00113b10 LEA RDI,[RSP + 0x20] CALL 0x00113b10 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::TEMPNAMEPLACEHOLDERVALUE(std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>) */ ftxui * __thiscall ftxui::operator|(ftxui *this,int8 *param_2,int8 *param_3) { int8 uVar1; long lVar2; int8 uVar3; long lVar4; int8 *puVar5; int8 local_b8; int8 uStack_b0; long local_a8; int8 uStack_a0; int8 local_98; int8 uStack_90; long local_88; int8 uStack_80; int8 local_78; int8 uStack_70; long local_68; int8 uStack_60; int8 local_58; int8 uStack_50; long local_48; int8 uStack_40; local_98 = 0; uStack_90 = 0; local_88 = 0; uVar1 = param_2[3]; lVar2 = param_2[2]; if (lVar2 != 0) { local_98 = *param_2; uStack_90 = param_2[1]; param_2[2] = 0; param_2[3] = 0; local_88 = lVar2; } local_b8 = 0; uStack_b0 = 0; local_a8 = 0; uVar3 = param_3[3]; lVar4 = param_3[2]; if (lVar4 != 0) { local_b8 = *param_3; uStack_b0 = param_3[1]; param_3[2] = 0; param_3[3] = 0; local_a8 = lVar4; } local_68 = 0; local_78 = 0; uStack_70 = 0; uStack_80 = uVar1; if (lVar2 != 0) { local_78 = local_98; uStack_70 = uStack_90; local_88 = 0; uStack_80 = 0; local_68 = lVar2; } local_48 = 0; local_58 = 0; uStack_50 = 0; uStack_a0 = uVar3; if (lVar4 != 0) { local_58 = local_b8; uStack_50 = uStack_b0; local_a8 = 0; uStack_a0 = 0; local_48 = lVar4; } *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; uStack_60 = uVar1; uStack_40 = uVar3; /* try { // try from 001206cd to 001206d4 has its CatchHandler @ 00120770 */ puVar5 = (int8 *)operator_new(0x40); puVar5[2] = 0; *puVar5 = 0; puVar5[1] = 0; puVar5[3] = uVar1; if (lVar2 != 0) { *puVar5 = local_78; puVar5[1] = uStack_70; puVar5[2] = lVar2; local_68 = 0; uStack_60 = 0; } puVar5[6] = 0; puVar5[4] = 0; puVar5[5] = 0; puVar5[7] = uVar3; if (lVar4 != 0) { puVar5[4] = local_58; puVar5[5] = uStack_50; puVar5[6] = lVar4; local_48 = 0; uStack_40 = 0; } *(int8 **)this = puVar5; *(code **)(this + 0x18) = std:: _Function_handler<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>),ftxui::(anonymous_namespace)::compose(std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>)::$_0> ::_M_invoke; *(code **)(this + 0x10) = std:: _Function_handler<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>),ftxui::(anonymous_namespace)::compose(std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>)::$_0> ::_M_manager; (anonymous_namespace):: compose(std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>,std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>) ::$_0::~__0((__0 *)&local_78); std::_Function_base::~_Function_base((_Function_base *)&local_b8); std::_Function_base::~_Function_base((_Function_base *)&local_98); return this; }
34,801
ma_report_error
eloqsql/storage/maria/ma_info.c
void _ma_report_error(int errcode, const LEX_STRING *name, myf flags) { size_t length; const char *file_name= name->str; DBUG_ENTER("_ma_report_error"); DBUG_PRINT("enter",("error: %d table: '%s'", errcode, file_name)); if ((length= name->length) > 64) { /* we first remove the directory */ size_t dir_length= dirname_length(file_name); file_name+= dir_length; if ((length-= dir_length) > 64) { /* still too long, chop start of table name */ file_name+= length - 64; } } my_printf_error(errcode, "Got error '%M' for '%s'", flags, (int) errcode, file_name); DBUG_VOID_RETURN; }
O3
c
ma_report_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movl %edi, %r14d movq (%rsi), %r15 movq 0x8(%rsi), %r12 cmpq $0x41, %r12 jb 0x3fbd4 movq %r15, %rdi callq 0x946fc leaq (%r15,%rax), %rcx addq %r12, %r15 addq $-0x40, %r15 subq %rax, %r12 cmpq $0x41, %r12 cmovbq %rcx, %r15 leaq 0x9a872(%rip), %rsi # 0xda44d movl %r14d, %edi movq %rbx, %rdx movl %r14d, %ecx movq %r15, %r8 xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x9e0ed
_ma_report_error: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14d, edi mov r15, [rsi] mov r12, [rsi+8] cmp r12, 41h ; 'A' jb short loc_3FBD4 mov rdi, r15 call dirname_length lea rcx, [r15+rax] add r15, r12 add r15, 0FFFFFFFFFFFFFFC0h sub r12, rax cmp r12, 41h ; 'A' cmovb r15, rcx loc_3FBD4: lea rsi, aGotErrorMForS; "Got error '%M' for '%s'" mov edi, r14d mov rdx, rbx mov ecx, r14d mov r8, r15 xor eax, eax pop rbx pop r12 pop r14 pop r15 pop rbp jmp my_printf_error
long long ma_report_error(int a1, _QWORD *a2, int a3, long long a4, long long a5, int a6) { long long v7; // r15 unsigned long long v8; // r12 long long v9; // rax int v10; // ecx v7 = *a2; v8 = a2[1]; if ( v8 >= 0x41 ) { v9 = dirname_length(*a2); v10 = v7 + v9; LODWORD(v7) = v8 + v7 - 64; if ( v8 - v9 < 0x41 ) LODWORD(v7) = v10; } return my_printf_error(a1, (unsigned int)"Got error '%M' for '%s'", a3, a1, v7, a6); }
_ma_report_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14D,EDI MOV R15,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] CMP R12,0x41 JC 0x0013fbd4 MOV RDI,R15 CALL 0x001946fc LEA RCX,[R15 + RAX*0x1] ADD R15,R12 ADD R15,-0x40 SUB R12,RAX CMP R12,0x41 CMOVC R15,RCX LAB_0013fbd4: LEA RSI,[0x1da44d] MOV EDI,R14D MOV RDX,RBX MOV ECX,R14D MOV R8,R15 XOR EAX,EAX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0019e0ed
void _ma_report_error(int4 param_1,long *param_2,int8 param_3) { long lVar1; ulong uVar2; long lVar3; long lVar4; lVar1 = *param_2; uVar2 = param_2[1]; lVar4 = lVar1; if (0x40 < uVar2) { lVar3 = dirname_length(lVar1); lVar4 = lVar1 + uVar2 + -0x40; if (uVar2 - lVar3 < 0x41) { lVar4 = lVar1 + lVar3; } } my_printf_error(param_1,"Got error \'%M\' for \'%s\'",param_3,param_1,lVar4); return; }
34,802
js_os_clearTimeout
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_clearTimeout(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSOSTimer *th; int64_t timer_id; if (JS_ToInt64(ctx, &timer_id, argv[0])) return JS_EXCEPTION; th = find_timer_by_id(ts, timer_id); if (!th) return JS_UNDEFINED; free_timer(rt, th); return JS_UNDEFINED; }
O1
c
js_os_clearTimeout: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %r15 movq %rdi, %r12 callq 0x23dda movq %rax, %rbx xorl %edi, %edi movq %rax, %rsi xorl %eax, %eax callq 0x3e64f movq %rax, %r14 movq (%r15), %rdx movq 0x8(%r15), %rcx movq %rsp, %rsi movq %r12, %rdi callq 0x2b910 movl $0x6, %r15d testl %eax, %eax jne 0x1d48a movq (%rsp), %rax testl %eax, %eax jle 0x1d475 movq %r14, %rcx addq $0x20, %r14 movq 0x28(%rcx), %rcx cmpq %r14, %rcx je 0x1d475 andl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpq %rax, 0x10(%rcx) cmoveq %rcx, %rsi je 0x1d477 movq 0x8(%rcx), %rcx cmpq %r14, %rcx jne 0x1d462 xorl %esi, %esi movl $0x3, %r15d testq %rsi, %rsi je 0x1d48a movq %rbx, %rdi callq 0x193f6 xorl %eax, %eax movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_os_clearTimeout: push r15 push r14 push r12 push rbx push rax mov r15, r8 mov r12, rdi call JS_GetRuntime mov rbx, rax xor edi, edi mov rsi, rax xor eax, eax call js_std_cmd mov r14, rax mov rdx, [r15] mov rcx, [r15+8] mov rsi, rsp mov rdi, r12 call JS_ToInt64 mov r15d, 6 test eax, eax jnz short loc_1D48A mov rax, [rsp+28h+var_28] test eax, eax jle short loc_1D475 mov rcx, r14 add r14, 20h ; ' ' mov rcx, [rcx+28h] cmp rcx, r14 jz short loc_1D475 and eax, 7FFFFFFFh loc_1D462: cmp [rcx+10h], rax cmovz rsi, rcx jz short loc_1D477 mov rcx, [rcx+8] cmp rcx, r14 jnz short loc_1D462 loc_1D475: xor esi, esi loc_1D477: mov r15d, 3 test rsi, rsi jz short loc_1D48A mov rdi, rbx call free_timer loc_1D48A: xor eax, eax mov rdx, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_os_clearTimeout(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v5; // rax long long Runtime; // rbx int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // r14 long long v13; // rcx long long v14; // r14 long long *v15; // rcx long long *v16; // rsi _QWORD v18[5]; // [rsp+0h] [rbp-28h] BYREF v18[0] = v5; Runtime = JS_GetRuntime(a1, a2, a3, a4); v12 = js_std_cmd(0, Runtime, v8, v9, v10, v11); if ( !(unsigned int)JS_ToInt64(a1, v18, *a5, a5[1]) ) { if ( SLODWORD(v18[0]) <= 0 || (v13 = v12, v14 = v12 + 32, v15 = *(long long **)(v13 + 40), v15 == (long long *)v14) ) { LABEL_7: v16 = 0LL; } else { while ( v15[2] != (v18[0] & 0x7FFFFFFF) ) { v15 = (long long *)v15[1]; if ( v15 == (long long *)v14 ) goto LABEL_7; } v16 = v15; } if ( v16 ) free_timer(Runtime, v16); } return 0LL; }
js_os_clearTimeout: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,R8 MOV R12,RDI CALL 0x00123dda MOV RBX,RAX XOR EDI,EDI MOV RSI,RAX XOR EAX,EAX CALL 0x0013e64f MOV R14,RAX MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RSI,RSP MOV RDI,R12 CALL 0x0012b910 MOV R15D,0x6 TEST EAX,EAX JNZ 0x0011d48a MOV RAX,qword ptr [RSP] TEST EAX,EAX JLE 0x0011d475 MOV RCX,R14 ADD R14,0x20 MOV RCX,qword ptr [RCX + 0x28] CMP RCX,R14 JZ 0x0011d475 AND EAX,0x7fffffff LAB_0011d462: CMP qword ptr [RCX + 0x10],RAX CMOVZ RSI,RCX JZ 0x0011d477 MOV RCX,qword ptr [RCX + 0x8] CMP RCX,R14 JNZ 0x0011d462 LAB_0011d475: XOR ESI,ESI LAB_0011d477: MOV R15D,0x3 TEST RSI,RSI JZ 0x0011d48a MOV RDI,RBX CALL 0x001193f6 LAB_0011d48a: XOR EAX,EAX MOV RDX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] js_os_clearTimeout(int8 param_1) { int1 auVar1 [16]; uint in_EAX; int iVar2; int8 uVar3; long lVar4; long lVar5; int8 *in_R8; ulong uVar6; uint local_28 [2]; local_28[0] = in_EAX; uVar3 = JS_GetRuntime(); lVar4 = js_std_cmd(0,uVar3); iVar2 = JS_ToInt64(param_1,local_28,*in_R8,in_R8[1]); uVar6 = 6; if (iVar2 == 0) { if (0 < (int)local_28[0]) { lVar5 = *(long *)(lVar4 + 0x28); if (lVar5 != lVar4 + 0x20) { do { if (*(ulong *)(lVar5 + 0x10) == (ulong)(local_28[0] & 0x7fffffff)) goto LAB_0011d477; lVar5 = *(long *)(lVar5 + 8); } while (lVar5 != lVar4 + 0x20); } } lVar5 = 0; LAB_0011d477: uVar6 = 3; if (lVar5 != 0) { free_timer(uVar3); } } auVar1._8_8_ = 0; auVar1._0_8_ = uVar6; return auVar1 << 0x40; }
34,803
js_os_clearTimeout
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_clearTimeout(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSOSTimer *th; int64_t timer_id; if (JS_ToInt64(ctx, &timer_id, argv[0])) return JS_EXCEPTION; th = find_timer_by_id(ts, timer_id); if (!th) return JS_UNDEFINED; free_timer(rt, th); return JS_UNDEFINED; }
O2
c
js_os_clearTimeout: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rdi, %r12 callq 0x1dd35 movq %rax, %rbx movq %rax, %rdi callq 0x13e3a movq %rax, %r15 movq (%r14), %rdx movq 0x8(%r14), %rcx movq %rsp, %rsi movq %r12, %rdi callq 0x250ae testl %eax, %eax je 0x17b56 pushq $0x6 popq %r14 xorl %eax, %eax movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq (%rsp), %rax pushq $0x3 popq %r14 testl %eax, %eax jle 0x17b45 leaq 0x20(%r15), %rcx addq $0x28, %r15 andl $0x7fffffff, %eax # imm = 0x7FFFFFFF movq (%r15), %r15 cmpq %rcx, %r15 je 0x17b45 cmpq %rax, 0x10(%r15) je 0x17b83 addq $0x8, %r15 jmp 0x17b6f movq %rbx, %rdi movq %r15, %rsi callq 0x13ed3 jmp 0x17b45
js_os_clearTimeout: push r15 push r14 push r12 push rbx push rax mov r14, r8 mov r12, rdi call JS_GetRuntime mov rbx, rax mov rdi, rax call js_get_thread_state mov r15, rax mov rdx, [r14] mov rcx, [r14+8] mov rsi, rsp mov rdi, r12 call JS_ToInt64 test eax, eax jz short loc_17B56 push 6 pop r14 loc_17B45: xor eax, eax mov rdx, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_17B56: mov rax, [rsp+28h+var_28] push 3 pop r14 test eax, eax jle short loc_17B45 lea rcx, [r15+20h] add r15, 28h ; '(' and eax, 7FFFFFFFh loc_17B6F: mov r15, [r15] cmp r15, rcx jz short loc_17B45 cmp [r15+10h], rax jz short loc_17B83 add r15, 8 jmp short loc_17B6F loc_17B83: mov rdi, rbx mov rsi, r15 call free_timer jmp short loc_17B45
long long js_os_clearTimeout(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { char v5; // al long long Runtime; // rbx int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long thread_state; // r15 long long *v14; // rcx long long **i; // r15 long long *v16; // r15 _QWORD v17[5]; // [rsp+0h] [rbp-28h] BYREF LOBYTE(v17[0]) = v5; Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v8, v9, v10, v11, v17[0]); if ( !(unsigned int)JS_ToInt64(a1, v17, *a5, a5[1]) && SLODWORD(v17[0]) > 0 ) { v14 = (long long *)(thread_state + 32); for ( i = (long long **)(thread_state + 40); ; i = (long long **)(v16 + 1) ) { v16 = *i; if ( v16 == v14 ) break; if ( v16[2] == (v17[0] & 0x7FFFFFFF) ) { free_timer(Runtime, v16); return 0LL; } } } return 0LL; }
js_os_clearTimeout: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R12,RDI CALL 0x0011dd35 MOV RBX,RAX MOV RDI,RAX CALL 0x00113e3a MOV R15,RAX MOV RDX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] MOV RSI,RSP MOV RDI,R12 CALL 0x001250ae TEST EAX,EAX JZ 0x00117b56 PUSH 0x6 POP R14 LAB_00117b45: XOR EAX,EAX MOV RDX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00117b56: MOV RAX,qword ptr [RSP] PUSH 0x3 POP R14 TEST EAX,EAX JLE 0x00117b45 LEA RCX,[R15 + 0x20] ADD R15,0x28 AND EAX,0x7fffffff LAB_00117b6f: MOV R15,qword ptr [R15] CMP R15,RCX JZ 0x00117b45 CMP qword ptr [R15 + 0x10],RAX JZ 0x00117b83 ADD R15,0x8 JMP 0x00117b6f LAB_00117b83: MOV RDI,RBX MOV RSI,R15 CALL 0x00113ed3 JMP 0x00117b45
int1 [16] js_os_clearTimeout(int8 param_1) { long lVar1; int1 auVar2 [16]; uint in_EAX; int iVar3; int8 uVar4; long lVar5; int8 *in_R8; long *plVar6; ulong uStack_30; uint local_28 [2]; local_28[0] = in_EAX; uVar4 = JS_GetRuntime(); lVar5 = js_get_thread_state(uVar4); iVar3 = JS_ToInt64(param_1,local_28,*in_R8,in_R8[1]); if (iVar3 == 0) { uStack_30 = 3; if (0 < (int)local_28[0]) { plVar6 = (long *)(lVar5 + 0x28); while (lVar1 = *plVar6, uStack_30 = 3, lVar1 != lVar5 + 0x20) { if (*(ulong *)(lVar1 + 0x10) == (ulong)(local_28[0] & 0x7fffffff)) { free_timer(uVar4,lVar1); break; } plVar6 = (long *)(lVar1 + 8); } } } else { uStack_30 = 6; } auVar2._8_8_ = 0; auVar2._0_8_ = uStack_30; return auVar2 << 0x40; }
34,804
ggml_graph_compute_thread
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static thread_ret_t ggml_graph_compute_thread(void * data) { struct ggml_compute_state * state = (struct ggml_compute_state *) data; const struct ggml_cgraph * cgraph = state->shared->cgraph; const struct ggml_cplan * cplan = state->shared->cplan; const int n_threads = state->shared->n_threads; set_numa_thread_affinity(state->ith, n_threads); int node_n = -1; while (true) { if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { state->shared->node_n += 1; return (thread_ret_t) GGML_EXIT_ABORTED; } if (atomic_fetch_sub(&state->shared->n_active, 1) == 1) { // all other threads are finished and spinning // do finalize and init here so we don't have synchronize again struct ggml_compute_params params = { /*.type =*/ GGML_TASK_FINALIZE, /*.ith =*/ 0, /*.nth =*/ 0, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (node_n != -1) { /* FINALIZE */ struct ggml_tensor * node = cgraph->nodes[node_n]; if (GGML_OP_HAS_FINALIZE[node->op]) { params.nth = ggml_get_n_tasks(node, n_threads); ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } // distribute new work or execute it direct if 1T while (++node_n < cgraph->n_nodes) { GGML_PRINT_DEBUG_5("%s: %d/%d\n", __func__, node_n, cgraph->n_nodes); struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); state->shared->perf_node_start_cycles = ggml_perf_cycles(); state->shared->perf_node_start_time_us = ggml_perf_time_us(); params.nth = n_tasks; /* INIT */ if (GGML_OP_HAS_INIT[node->op]) { params.type = GGML_TASK_INIT; ggml_compute_forward(&params, node); } if (n_tasks == 1) { // TODO: maybe push node_n to the atomic but if other threads see n_tasks is 1, // they do something more efficient than spinning (?) params.type = GGML_TASK_COMPUTE; ggml_compute_forward(&params, node); if (GGML_OP_HAS_FINALIZE[node->op]) { params.type = GGML_TASK_FINALIZE; ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } else { break; } if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { break; } } atomic_store(&state->shared->n_active, n_threads); atomic_store(&state->shared->node_n, node_n); } else { // wait for other threads to finish const int last = node_n; while (true) { // TODO: this sched_yield can have significant impact on the performance - either positive or negative // depending on the workload and the operating system. // since it is not clear what is the best approach, it should potentially become user-configurable // ref: https://github.com/ggerganov/ggml/issues/291 #if defined(GGML_USE_ACCELERATE) || defined(GGML_USE_OPENBLAS) sched_yield(); #endif node_n = atomic_load(&state->shared->node_n); if (node_n != last) break; }; } // check if we should stop if (node_n >= cgraph->n_nodes) break; /* COMPUTE */ struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); struct ggml_compute_params params = { /*.type =*/ GGML_TASK_COMPUTE, /*.ith =*/ state->ith, /*.nth =*/ n_tasks, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (state->ith < n_tasks) { ggml_compute_forward(&params, node); } } return GGML_EXIT_SUCCESS; }
O0
c
ggml_graph_compute_thread: subq $0xb8, %rsp movq %rdi, 0xa8(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0xa0(%rsp), %rax movq 0x10(%rax), %rax movq (%rax), %rax movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rax movq 0x10(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x90(%rsp) movq 0xa0(%rsp), %rax movq 0x10(%rax), %rax movl 0x20(%rax), %eax movl %eax, 0x8c(%rsp) movq 0xa0(%rsp), %rax movl 0x8(%rax), %edi movl 0x8c(%rsp), %esi callq 0x13c560 movl $0xffffffff, 0x88(%rsp) # imm = 0xFFFFFFFF movq 0x90(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0x12f4c7 movq 0x90(%rsp), %rax movq 0x18(%rax), %rax movq 0x90(%rsp), %rcx movq 0x20(%rcx), %rdi callq *%rax testb $0x1, %al jne 0x12f4a5 jmp 0x12f4c7 movq 0xa0(%rsp), %rax movq 0x10(%rax), %rax lock incl 0x28(%rax) movl $0x1, %eax movq %rax, 0xb0(%rsp) jmp 0x12f838 movq 0xa0(%rsp), %rax movq 0x10(%rax), %rcx movl $0x1, 0x84(%rsp) movl 0x84(%rsp), %eax negl %eax lock xaddl %eax, 0x24(%rcx) movl %eax, 0x80(%rsp) cmpl $0x1, 0x80(%rsp) jne 0x12f740 movl $0x2, 0x60(%rsp) movl $0x0, 0x64(%rsp) movl $0x0, 0x68(%rsp) movq 0x90(%rsp), %rax movq (%rax), %rax movq %rax, 0x70(%rsp) movq 0x90(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x78(%rsp) cmpl $-0x1, 0x88(%rsp) je 0x12f5b2 movq 0x98(%rsp), %rax movq 0x10(%rax), %rax movslq 0x88(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movl 0x50(%rax), %eax movl %eax, %ecx leaq 0x1f0a9e(%rip), %rax # 0x320010 testb $0x1, (%rax,%rcx) je 0x12f59c movq 0x58(%rsp), %rdi movl 0x8c(%rsp), %esi callq 0x12eb20 movl %eax, 0x68(%rsp) movq 0x58(%rsp), %rsi leaq 0x60(%rsp), %rdi callq 0x13c700 movq 0x58(%rsp), %rdi movq 0xa0(%rsp), %rax movq 0x10(%rax), %rsi callq 0x13d420 jmp 0x12f5b4 movl 0x88(%rsp), %eax addl $0x1, %eax movl %eax, 0x88(%rsp) movq 0x98(%rsp), %rcx cmpl 0x4(%rcx), %eax jge 0x12f702 movq 0x98(%rsp), %rax movq 0x10(%rax), %rax movslq 0x88(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi movl 0x8c(%rsp), %esi callq 0x12eb20 movl %eax, 0x4c(%rsp) movq 0xa0(%rsp), %rax movq 0x10(%rax), %rax movq $0x0, 0x10(%rax) movq 0xa0(%rsp), %rax movq 0x10(%rax), %rax movq $0x0, 0x18(%rax) movl 0x4c(%rsp), %eax movl %eax, 0x68(%rsp) movq 0x50(%rsp), %rax movl 0x50(%rax), %eax movl %eax, %ecx leaq 0x1f0977(%rip), %rax # 0x31ffc0 testb $0x1, (%rax,%rcx) je 0x12f666 movl $0x0, 0x60(%rsp) movq 0x50(%rsp), %rsi leaq 0x60(%rsp), %rdi callq 0x13c700 cmpl $0x1, 0x4c(%rsp) jne 0x12f6ca movl $0x1, 0x60(%rsp) movq 0x50(%rsp), %rsi leaq 0x60(%rsp), %rdi callq 0x13c700 movq 0x50(%rsp), %rax movl 0x50(%rax), %eax movl %eax, %ecx leaq 0x1f097b(%rip), %rax # 0x320010 testb $0x1, (%rax,%rcx) je 0x12f6b2 movl $0x2, 0x60(%rsp) movq 0x50(%rsp), %rsi leaq 0x60(%rsp), %rdi callq 0x13c700 movq 0x50(%rsp), %rdi movq 0xa0(%rsp), %rax movq 0x10(%rax), %rsi callq 0x13d420 jmp 0x12f6cc jmp 0x12f702 movq 0x90(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0x12f6fd movq 0x90(%rsp), %rax movq 0x18(%rax), %rax movq 0x90(%rsp), %rcx movq 0x20(%rcx), %rdi callq *%rax testb $0x1, %al jne 0x12f6fb jmp 0x12f6fd jmp 0x12f702 jmp 0x12f5b4 movq 0xa0(%rsp), %rax movq 0x10(%rax), %rcx movl 0x8c(%rsp), %eax movl %eax, 0x48(%rsp) movl 0x48(%rsp), %eax xchgl %eax, 0x24(%rcx) movq 0xa0(%rsp), %rax movq 0x10(%rax), %rcx movl 0x88(%rsp), %eax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax xchgl %eax, 0x28(%rcx) jmp 0x12f77c movl 0x88(%rsp), %eax movl %eax, 0x40(%rsp) movq 0xa0(%rsp), %rax movq 0x10(%rax), %rax movl 0x28(%rax), %eax movl %eax, 0x3c(%rsp) movl 0x3c(%rsp), %eax movl %eax, 0x88(%rsp) movl 0x88(%rsp), %eax cmpl 0x40(%rsp), %eax je 0x12f778 jmp 0x12f77a jmp 0x12f74b jmp 0x12f77c movl 0x88(%rsp), %eax movq 0x98(%rsp), %rcx cmpl 0x4(%rcx), %eax jl 0x12f795 jmp 0x12f82c movq 0x98(%rsp), %rax movq 0x10(%rax), %rax movslq 0x88(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rdi movl 0x8c(%rsp), %esi callq 0x12eb20 movl %eax, 0x2c(%rsp) movl $0x1, 0x8(%rsp) movq 0xa0(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0xc(%rsp) movl 0x2c(%rsp), %eax movl %eax, 0x10(%rsp) movq 0x90(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) movq 0x90(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x20(%rsp) movq 0xa0(%rsp), %rax movl 0x8(%rax), %eax cmpl 0x2c(%rsp), %eax jge 0x12f827 movq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x13c700 jmp 0x12f476 movq $0x0, 0xb0(%rsp) movq 0xb0(%rsp), %rax addq $0xb8, %rsp retq nopl (%rax,%rax)
ggml_graph_compute_thread: sub rsp, 0B8h mov [rsp+0B8h+var_10], rdi mov rax, [rsp+0B8h+var_10] mov [rsp+0B8h+var_18], rax mov rax, [rsp+0B8h+var_18] mov rax, [rax+10h] mov rax, [rax] mov [rsp+0B8h+var_20], rax mov rax, [rsp+0B8h+var_18] mov rax, [rax+10h] mov rax, [rax+8] mov [rsp+0B8h+var_28], rax mov rax, [rsp+0B8h+var_18] mov rax, [rax+10h] mov eax, [rax+20h] mov [rsp+0B8h+var_2C], eax mov rax, [rsp+0B8h+var_18] mov edi, [rax+8] mov esi, [rsp+0B8h+var_2C] call set_numa_thread_affinity mov [rsp+0B8h+var_30], 0FFFFFFFFh loc_12F476: mov rax, [rsp+0B8h+var_28] cmp qword ptr [rax+18h], 0 jz short loc_12F4C7 mov rax, [rsp+0B8h+var_28] mov rax, [rax+18h] mov rcx, [rsp+0B8h+var_28] mov rdi, [rcx+20h] call rax test al, 1 jnz short loc_12F4A5 jmp short loc_12F4C7 loc_12F4A5: mov rax, [rsp+0B8h+var_18] mov rax, [rax+10h] lock inc dword ptr [rax+28h] mov eax, 1 mov [rsp+0B8h+var_8], rax jmp loc_12F838 loc_12F4C7: mov rax, [rsp+0B8h+var_18] mov rcx, [rax+10h] mov [rsp+0B8h+var_34], 1 mov eax, [rsp+0B8h+var_34] neg eax lock xadd [rcx+24h], eax mov [rsp+0B8h+var_38], eax cmp [rsp+0B8h+var_38], 1 jnz loc_12F740 mov [rsp+0B8h+var_58], 2 mov [rsp+0B8h+var_54], 0 mov [rsp+0B8h+var_50], 0 mov rax, [rsp+0B8h+var_28] mov rax, [rax] mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_28] mov rax, [rax+8] mov [rsp+0B8h+var_40], rax cmp [rsp+0B8h+var_30], 0FFFFFFFFh jz short loc_12F5B2 mov rax, [rsp+0B8h+var_20] mov rax, [rax+10h] movsxd rcx, [rsp+0B8h+var_30] mov rax, [rax+rcx*8] mov [rsp+0B8h+var_60], rax mov rax, [rsp+0B8h+var_60] mov eax, [rax+50h] mov ecx, eax lea rax, GGML_OP_HAS_FINALIZE test byte ptr [rax+rcx], 1 jz short loc_12F59C mov rdi, [rsp+0B8h+var_60] mov esi, [rsp+0B8h+var_2C] call ggml_get_n_tasks mov [rsp+0B8h+var_50], eax mov rsi, [rsp+0B8h+var_60] lea rdi, [rsp+0B8h+var_58] call ggml_compute_forward loc_12F59C: mov rdi, [rsp+0B8h+var_60] mov rax, [rsp+0B8h+var_18] mov rsi, [rax+10h] call ggml_graph_compute_perf_stats_node loc_12F5B2: jmp short $+2 loc_12F5B4: mov eax, [rsp+0B8h+var_30] add eax, 1 mov [rsp+0B8h+var_30], eax mov rcx, [rsp+0B8h+var_20] cmp eax, [rcx+4] jge loc_12F702 mov rax, [rsp+0B8h+var_20] mov rax, [rax+10h] movsxd rcx, [rsp+0B8h+var_30] mov rax, [rax+rcx*8] mov [rsp+0B8h+var_68], rax mov rdi, [rsp+0B8h+var_68] mov esi, [rsp+0B8h+var_2C] call ggml_get_n_tasks mov [rsp+0B8h+var_6C], eax mov rax, [rsp+0B8h+var_18] mov rax, [rax+10h] mov qword ptr [rax+10h], 0 mov rax, [rsp+0B8h+var_18] mov rax, [rax+10h] mov qword ptr [rax+18h], 0 mov eax, [rsp+0B8h+var_6C] mov [rsp+0B8h+var_50], eax mov rax, [rsp+0B8h+var_68] mov eax, [rax+50h] mov ecx, eax lea rax, GGML_OP_HAS_INIT test byte ptr [rax+rcx], 1 jz short loc_12F666 mov [rsp+0B8h+var_58], 0 mov rsi, [rsp+0B8h+var_68] lea rdi, [rsp+0B8h+var_58] call ggml_compute_forward loc_12F666: cmp [rsp+0B8h+var_6C], 1 jnz short loc_12F6CA mov [rsp+0B8h+var_58], 1 mov rsi, [rsp+0B8h+var_68] lea rdi, [rsp+0B8h+var_58] call ggml_compute_forward mov rax, [rsp+0B8h+var_68] mov eax, [rax+50h] mov ecx, eax lea rax, GGML_OP_HAS_FINALIZE test byte ptr [rax+rcx], 1 jz short loc_12F6B2 mov [rsp+0B8h+var_58], 2 mov rsi, [rsp+0B8h+var_68] lea rdi, [rsp+0B8h+var_58] call ggml_compute_forward loc_12F6B2: mov rdi, [rsp+0B8h+var_68] mov rax, [rsp+0B8h+var_18] mov rsi, [rax+10h] call ggml_graph_compute_perf_stats_node jmp short loc_12F6CC loc_12F6CA: jmp short loc_12F702 loc_12F6CC: mov rax, [rsp+0B8h+var_28] cmp qword ptr [rax+18h], 0 jz short loc_12F6FD mov rax, [rsp+0B8h+var_28] mov rax, [rax+18h] mov rcx, [rsp+0B8h+var_28] mov rdi, [rcx+20h] call rax test al, 1 jnz short loc_12F6FB jmp short loc_12F6FD loc_12F6FB: jmp short loc_12F702 loc_12F6FD: jmp loc_12F5B4 loc_12F702: mov rax, [rsp+0B8h+var_18] mov rcx, [rax+10h] mov eax, [rsp+0B8h+var_2C] mov [rsp+0B8h+var_70], eax mov eax, [rsp+0B8h+var_70] xchg eax, [rcx+24h] mov rax, [rsp+0B8h+var_18] mov rcx, [rax+10h] mov eax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_74], eax mov eax, [rsp+0B8h+var_74] xchg eax, [rcx+28h] jmp short loc_12F77C loc_12F740: mov eax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_78], eax loc_12F74B: mov rax, [rsp+0B8h+var_18] mov rax, [rax+10h] mov eax, [rax+28h] mov [rsp+0B8h+var_7C], eax mov eax, [rsp+0B8h+var_7C] mov [rsp+0B8h+var_30], eax mov eax, [rsp+0B8h+var_30] cmp eax, [rsp+0B8h+var_78] jz short loc_12F778 jmp short loc_12F77A loc_12F778: jmp short loc_12F74B loc_12F77A: jmp short $+2 loc_12F77C: mov eax, [rsp+0B8h+var_30] mov rcx, [rsp+0B8h+var_20] cmp eax, [rcx+4] jl short loc_12F795 jmp loc_12F82C loc_12F795: mov rax, [rsp+0B8h+var_20] mov rax, [rax+10h] movsxd rcx, [rsp+0B8h+var_30] mov rax, [rax+rcx*8] mov [rsp+0B8h+var_88], rax mov rdi, [rsp+0B8h+var_88] mov esi, [rsp+0B8h+var_2C] call ggml_get_n_tasks mov [rsp+0B8h+var_8C], eax mov [rsp+0B8h+var_B0], 1 mov rax, [rsp+0B8h+var_18] mov eax, [rax+8] mov [rsp+0B8h+var_AC], eax mov eax, [rsp+0B8h+var_8C] mov [rsp+0B8h+var_A8], eax mov rax, [rsp+0B8h+var_28] mov rax, [rax] mov [rsp+0B8h+var_A0], rax mov rax, [rsp+0B8h+var_28] mov rax, [rax+8] mov [rsp+0B8h+var_98], rax mov rax, [rsp+0B8h+var_18] mov eax, [rax+8] cmp eax, [rsp+0B8h+var_8C] jge short loc_12F827 mov rsi, [rsp+0B8h+var_88] lea rdi, [rsp+0B8h+var_B0] call ggml_compute_forward loc_12F827: jmp loc_12F476 loc_12F82C: mov [rsp+0B8h+var_8], 0 loc_12F838: mov rax, [rsp+0B8h+var_8] add rsp, 0B8h retn
long long ggml_graph_compute_thread(long long a1) { long long v1; // rcx long long v2; // rcx long long v3; // rcx _DWORD v5[4]; // [rsp+8h] [rbp-B0h] BYREF long long v6; // [rsp+18h] [rbp-A0h] long long v7; // [rsp+20h] [rbp-98h] int v8; // [rsp+2Ch] [rbp-8Ch] long long v9; // [rsp+30h] [rbp-88h] __int32 v10; // [rsp+3Ch] [rbp-7Ch] __int32 v11; // [rsp+40h] [rbp-78h] __int32 v12; // [rsp+44h] [rbp-74h] unsigned int v13; // [rsp+48h] [rbp-70h] int v14; // [rsp+4Ch] [rbp-6Ch] long long v15; // [rsp+50h] [rbp-68h] long long v16; // [rsp+58h] [rbp-60h] _DWORD v17[2]; // [rsp+60h] [rbp-58h] BYREF int n_tasks; // [rsp+68h] [rbp-50h] long long v19; // [rsp+70h] [rbp-48h] long long v20; // [rsp+78h] [rbp-40h] signed __int32 v21; // [rsp+80h] [rbp-38h] int v22; // [rsp+84h] [rbp-34h] __int32 v23; // [rsp+88h] [rbp-30h] unsigned int v24; // [rsp+8Ch] [rbp-2Ch] long long *v25; // [rsp+90h] [rbp-28h] long long v26; // [rsp+98h] [rbp-20h] long long v27; // [rsp+A0h] [rbp-18h] long long v28; // [rsp+A8h] [rbp-10h] v28 = a1; v27 = a1; v26 = **(_QWORD **)(a1 + 16); v25 = *(long long **)(*(_QWORD *)(a1 + 16) + 8LL); v24 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 32LL); set_numa_thread_affinity(*(unsigned int *)(a1 + 8), v24); v23 = -1; while ( 1 ) { if ( v25[3] && (((long long ( *)(long long))v25[3])(v25[4]) & 1) != 0 ) { _InterlockedIncrement((volatile signed __int32 *)(*(_QWORD *)(v27 + 16) + 40LL)); return 1LL; } v1 = *(_QWORD *)(v27 + 16); v22 = 1; v21 = _InterlockedExchangeAdd((volatile signed __int32 *)(v1 + 36), 0xFFFFFFFF); if ( v21 == 1 ) { v17[0] = 2; v17[1] = 0; n_tasks = 0; v19 = *v25; v20 = v25[1]; if ( v23 != -1 ) { v16 = *(_QWORD *)(*(_QWORD *)(v26 + 16) + 8LL * v23); if ( (GGML_OP_HAS_FINALIZE[*(unsigned int *)(v16 + 80)] & 1) != 0 ) { n_tasks = ggml_get_n_tasks(v16, v24); ggml_compute_forward(v17, v16); } ggml_graph_compute_perf_stats_node(v16, *(_QWORD *)(v27 + 16)); } do { if ( ++v23 >= *(_DWORD *)(v26 + 4) ) break; v15 = *(_QWORD *)(*(_QWORD *)(v26 + 16) + 8LL * v23); v14 = ggml_get_n_tasks(v15, v24); *(_QWORD *)(*(_QWORD *)(v27 + 16) + 16LL) = 0LL; *(_QWORD *)(*(_QWORD *)(v27 + 16) + 24LL) = 0LL; n_tasks = v14; if ( (GGML_OP_HAS_INIT[*(unsigned int *)(v15 + 80)] & 1) != 0 ) { v17[0] = 0; ggml_compute_forward(v17, v15); } if ( v14 != 1 ) break; v17[0] = 1; ggml_compute_forward(v17, v15); if ( (GGML_OP_HAS_FINALIZE[*(unsigned int *)(v15 + 80)] & 1) != 0 ) { v17[0] = 2; ggml_compute_forward(v17, v15); } ggml_graph_compute_perf_stats_node(v15, *(_QWORD *)(v27 + 16)); } while ( !v25[3] || (((long long ( *)(long long))v25[3])(v25[4]) & 1) == 0 ); v2 = *(_QWORD *)(v27 + 16); v13 = v24; _InterlockedExchange((volatile __int32 *)(v2 + 36), v24); v3 = *(_QWORD *)(v27 + 16); v12 = v23; _InterlockedExchange((volatile __int32 *)(v3 + 40), v23); } else { v11 = v23; do { v10 = *(_DWORD *)(*(_QWORD *)(v27 + 16) + 40LL); v23 = v10; } while ( v10 == v11 ); } if ( v23 >= *(_DWORD *)(v26 + 4) ) break; v9 = *(_QWORD *)(*(_QWORD *)(v26 + 16) + 8LL * v23); v8 = ggml_get_n_tasks(v9, v24); v5[0] = 1; v5[1] = *(_DWORD *)(v27 + 8); v5[2] = v8; v6 = *v25; v7 = v25[1]; if ( *(_DWORD *)(v27 + 8) < v8 ) ggml_compute_forward(v5, v9); } return 0LL; }
34,805
ggml_graph_compute_thread
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static thread_ret_t ggml_graph_compute_thread(void * data) { struct ggml_compute_state * state = (struct ggml_compute_state *) data; const struct ggml_cgraph * cgraph = state->shared->cgraph; const struct ggml_cplan * cplan = state->shared->cplan; const int n_threads = state->shared->n_threads; set_numa_thread_affinity(state->ith, n_threads); int node_n = -1; while (true) { if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { state->shared->node_n += 1; return (thread_ret_t) GGML_EXIT_ABORTED; } if (atomic_fetch_sub(&state->shared->n_active, 1) == 1) { // all other threads are finished and spinning // do finalize and init here so we don't have synchronize again struct ggml_compute_params params = { /*.type =*/ GGML_TASK_FINALIZE, /*.ith =*/ 0, /*.nth =*/ 0, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (node_n != -1) { /* FINALIZE */ struct ggml_tensor * node = cgraph->nodes[node_n]; if (GGML_OP_HAS_FINALIZE[node->op]) { params.nth = ggml_get_n_tasks(node, n_threads); ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } // distribute new work or execute it direct if 1T while (++node_n < cgraph->n_nodes) { GGML_PRINT_DEBUG_5("%s: %d/%d\n", __func__, node_n, cgraph->n_nodes); struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); state->shared->perf_node_start_cycles = ggml_perf_cycles(); state->shared->perf_node_start_time_us = ggml_perf_time_us(); params.nth = n_tasks; /* INIT */ if (GGML_OP_HAS_INIT[node->op]) { params.type = GGML_TASK_INIT; ggml_compute_forward(&params, node); } if (n_tasks == 1) { // TODO: maybe push node_n to the atomic but if other threads see n_tasks is 1, // they do something more efficient than spinning (?) params.type = GGML_TASK_COMPUTE; ggml_compute_forward(&params, node); if (GGML_OP_HAS_FINALIZE[node->op]) { params.type = GGML_TASK_FINALIZE; ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } else { break; } if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { break; } } atomic_store(&state->shared->n_active, n_threads); atomic_store(&state->shared->node_n, node_n); } else { // wait for other threads to finish const int last = node_n; while (true) { // TODO: this sched_yield can have significant impact on the performance - either positive or negative // depending on the workload and the operating system. // since it is not clear what is the best approach, it should potentially become user-configurable // ref: https://github.com/ggerganov/ggml/issues/291 #if defined(GGML_USE_ACCELERATE) || defined(GGML_USE_OPENBLAS) sched_yield(); #endif node_n = atomic_load(&state->shared->node_n); if (node_n != last) break; }; } // check if we should stop if (node_n >= cgraph->n_nodes) break; /* COMPUTE */ struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); struct ggml_compute_params params = { /*.type =*/ GGML_TASK_COMPUTE, /*.ith =*/ state->ith, /*.nth =*/ n_tasks, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (state->ith < n_tasks) { ggml_compute_forward(&params, node); } } return GGML_EXIT_SUCCESS; }
O1
c
ggml_graph_compute_thread: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rax movq (%rax), %r15 movq 0x8(%rax), %r14 movl 0x20(%rax), %eax movq %rax, (%rsp) movl 0xe61c2(%rip), %esi # 0x17e270 cmpl $0x2, %esi jb 0x9816a movl 0x8(%rbx), %ecx movq (%rsp), %rax addl %esi, %eax decl %eax xorl %edx, %edx divl %esi movl %eax, %esi movl %ecx, %eax xorl %edx, %edx divl %esi cltq movq %rax, %rcx shlq $0xb, %rcx leaq (%rcx,%rax,4), %rbp movl 0xe6193(%rip), %edi # 0x17e274 leaq 0x3f(%rdi), %r12 shrq $0x3, %r12 andl $-0x8, %r12d callq 0xa500 movq %rax, %r13 movq %rax, %rdi xorl %esi, %esi movq %r12, %rdx callq 0xa300 leaq 0xe0947(%rip), %rcx # 0x178a50 movl 0x2000(%rcx,%rbp), %eax testq %rax, %rax je 0x98147 leaq (%rcx,%rbp), %rdx addq $0x1800, %rdx # imm = 0x1800 xorl %esi, %esi movl (%rdx,%rsi,4), %ecx movl %ecx, %edi shrl $0x3, %edi cmpl %r12d, %edi jae 0x9813f movl $0x1, %edi shlq %cl, %rdi shrl $0x6, %ecx orq %rdi, (%r13,%rcx,8) incq %rsi decq %rax jne 0x98122 callq 0xa520 movq %rax, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xaad0 testl %eax, %eax jne 0x9839e movq %r13, %rdi callq 0xa890 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movq 0x18(%r14), %rax testq %rax, %rax je 0x98187 movq 0x20(%r14), %rdi callq *%rax testb %al, %al jne 0x98382 movq 0x10(%rbx), %rax lock decl 0x24(%rax) jne 0x98318 movq $0x2, 0x8(%rsp) movl $0x0, 0x10(%rsp) movq (%r14), %rax movq %rax, 0x18(%rsp) movq 0x8(%r14), %rax movq %rax, 0x20(%rsp) cmpl $-0x1, %r12d je 0x98218 movq 0x10(%r15), %rax movslq %r12d, %rcx movq (%rax,%rcx,8), %r13 movl 0x50(%r13), %eax leaq 0x1a610d(%rip), %rcx # 0x23e2e0 cmpb $0x1, (%rax,%rcx) jne 0x981f6 movq %r13, %rdi movq (%rsp), %rsi callq 0x97df6 movl %eax, 0x10(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9f2d9 movq 0x10(%rbx), %rax incl 0xf0(%r13) vmovdqu 0xf8(%r13), %xmm0 vpsubq 0x10(%rax), %xmm0, %xmm0 vmovdqu %xmm0, 0xf8(%r13) incl %r12d cmpl 0x4(%r15), %r12d jge 0x982fe movslq %r12d, %r12 movq 0x10(%r15), %rax movq (%rax,%r12,8), %r13 movq %r13, %rdi movq (%rsp), %rsi callq 0x97df6 movl %eax, %ebp movq 0x10(%rbx), %rax vpxor %xmm0, %xmm0, %xmm0 vmovdqu %xmm0, 0x10(%rax) movl %ebp, 0x10(%rsp) movl 0x50(%r13), %eax leaq 0x1a6036(%rip), %rcx # 0x23e290 cmpb $0x1, (%rax,%rcx) jne 0x98275 movl $0x0, 0x8(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9f2d9 cmpl $0x1, %ebp jne 0x982fe movl $0x1, 0x8(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9f2d9 movl 0x50(%r13), %eax leaq 0x1a6042(%rip), %rcx # 0x23e2e0 cmpb $0x1, (%rax,%rcx) jne 0x982b9 movl $0x2, 0x8(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9f2d9 movq 0x10(%rbx), %rax incl 0xf0(%r13) vmovdqu 0xf8(%r13), %xmm0 vpsubq 0x10(%rax), %xmm0, %xmm0 vmovdqu %xmm0, 0xf8(%r13) movq 0x18(%r14), %rax testq %rax, %rax je 0x982ee movq 0x20(%r14), %rdi callq *%rax testb %al, %al jne 0x982fe incq %r12 movslq 0x4(%r15), %rax cmpq %rax, %r12 jl 0x98228 movq 0x10(%rbx), %rax movq (%rsp), %rcx xchgl %ecx, 0x24(%rax) movq 0x10(%rbx), %rax movl %r12d, %ecx xchgl %ecx, 0x28(%rax) movl %r12d, %ebp jmp 0x98324 movq 0x10(%rbx), %rax movl 0x28(%rax), %ebp cmpl %r12d, %ebp je 0x98318 cmpl 0x4(%r15), %ebp jge 0x9837e movq 0x10(%r15), %rax movslq %ebp, %rcx movq (%rax,%rcx,8), %r13 movq %r13, %rdi movq (%rsp), %rsi callq 0x97df6 movl $0x1, 0x8(%rsp) movl 0x8(%rbx), %ecx movl %ecx, 0xc(%rsp) movl %eax, 0x10(%rsp) movq (%r14), %rdx movq %rdx, 0x18(%rsp) movq 0x8(%r14), %rdx movq %rdx, 0x20(%rsp) cmpl %eax, %ecx jge 0x98376 leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9f2d9 movl %ebp, %r12d jmp 0x98170 xorl %eax, %eax jmp 0x9838f movq 0x10(%rbx), %rax lock incl 0x28(%rax) movl $0x1, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x10460 jmp 0x98162
ggml_graph_compute_thread: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov rax, [rdi+10h] mov r15, [rax] mov r14, [rax+8] mov eax, [rax+20h] mov [rsp+58h+var_58], rax mov esi, cs:dword_17E270 cmp esi, 2 jb loc_9816A mov ecx, [rbx+8] mov rax, [rsp+58h+var_58] add eax, esi dec eax xor edx, edx div esi mov esi, eax mov eax, ecx xor edx, edx div esi cdqe mov rcx, rax shl rcx, 0Bh lea rbp, [rcx+rax*4] mov edi, cs:dword_17E274 lea r12, [rdi+3Fh] shr r12, 3 and r12d, 0FFFFFFF8h call ___sched_cpualloc mov r13, rax mov rdi, rax xor esi, esi mov rdx, r12 call _memset lea rcx, g_state mov eax, [rcx+rbp+2000h] test rax, rax jz short loc_98147 lea rdx, [rcx+rbp] add rdx, 1800h xor esi, esi loc_98122: mov ecx, [rdx+rsi*4] mov edi, ecx shr edi, 3 cmp edi, r12d jnb short loc_9813F mov edi, 1 shl rdi, cl shr ecx, 6 or [r13+rcx*8+0], rdi loc_9813F: inc rsi dec rax jnz short loc_98122 loc_98147: call _pthread_self mov rdi, rax mov rsi, r12 mov rdx, r13 call _pthread_setaffinity_np test eax, eax jnz loc_9839E loc_98162: mov rdi, r13 call ___sched_cpufree loc_9816A: mov r12d, 0FFFFFFFFh loc_98170: mov rax, [r14+18h] test rax, rax jz short loc_98187 mov rdi, [r14+20h] call rax test al, al jnz loc_98382 loc_98187: mov rax, [rbx+10h] lock dec dword ptr [rax+24h] jnz loc_98318 mov [rsp+58h+var_50], 2 mov [rsp+58h+var_48], 0 mov rax, [r14] mov [rsp+58h+var_40], rax mov rax, [r14+8] mov [rsp+58h+var_38], rax cmp r12d, 0FFFFFFFFh jz short loc_98218 mov rax, [r15+10h] movsxd rcx, r12d mov r13, [rax+rcx*8] mov eax, [r13+50h] lea rcx, GGML_OP_HAS_FINALIZE cmp byte ptr [rax+rcx], 1 jnz short loc_981F6 mov rdi, r13 mov rsi, [rsp+58h+var_58] call ggml_get_n_tasks mov [rsp+58h+var_48], eax lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_981F6: mov rax, [rbx+10h] inc dword ptr [r13+0F0h] vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 loc_98218: inc r12d cmp r12d, [r15+4] jge loc_982FE movsxd r12, r12d loc_98228: mov rax, [r15+10h] mov r13, [rax+r12*8] mov rdi, r13 mov rsi, [rsp+58h+var_58] call ggml_get_n_tasks mov ebp, eax mov rax, [rbx+10h] vpxor xmm0, xmm0, xmm0 vmovdqu xmmword ptr [rax+10h], xmm0 mov [rsp+58h+var_48], ebp mov eax, [r13+50h] lea rcx, GGML_OP_HAS_INIT cmp byte ptr [rax+rcx], 1 jnz short loc_98275 mov dword ptr [rsp+58h+var_50], 0 lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_98275: cmp ebp, 1 jnz loc_982FE mov dword ptr [rsp+58h+var_50], 1 lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward mov eax, [r13+50h] lea rcx, GGML_OP_HAS_FINALIZE cmp byte ptr [rax+rcx], 1 jnz short loc_982B9 mov dword ptr [rsp+58h+var_50], 2 lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_982B9: mov rax, [rbx+10h] inc dword ptr [r13+0F0h] vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 mov rax, [r14+18h] test rax, rax jz short loc_982EE mov rdi, [r14+20h] call rax test al, al jnz short loc_982FE loc_982EE: inc r12 movsxd rax, dword ptr [r15+4] cmp r12, rax jl loc_98228 loc_982FE: mov rax, [rbx+10h] mov rcx, [rsp+58h+var_58] xchg ecx, [rax+24h] mov rax, [rbx+10h] mov ecx, r12d xchg ecx, [rax+28h] mov ebp, r12d jmp short loc_98324 loc_98318: mov rax, [rbx+10h] mov ebp, [rax+28h] cmp ebp, r12d jz short loc_98318 loc_98324: cmp ebp, [r15+4] jge short loc_9837E mov rax, [r15+10h] movsxd rcx, ebp mov r13, [rax+rcx*8] mov rdi, r13 mov rsi, [rsp+58h+var_58] call ggml_get_n_tasks mov dword ptr [rsp+58h+var_50], 1 mov ecx, [rbx+8] mov dword ptr [rsp+58h+var_50+4], ecx mov [rsp+58h+var_48], eax mov rdx, [r14] mov [rsp+58h+var_40], rdx mov rdx, [r14+8] mov [rsp+58h+var_38], rdx cmp ecx, eax jge short loc_98376 lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_98376: mov r12d, ebp jmp loc_98170 loc_9837E: xor eax, eax jmp short loc_9838F loc_98382: mov rax, [rbx+10h] lock inc dword ptr [rax+28h] mov eax, 1 loc_9838F: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9839E: mov edi, eax call ggml_graph_compute_thread_cold_1 jmp loc_98162
long long ggml_graph_compute_thread(long long a1, __m128 _XMM0) { long long *v2; // rax long long v3; // r15 long long *v4; // r14 long long v5; // rsi long long v6; // rbp unsigned long long v7; // r12 long long v8; // r13 long long v9; // rax unsigned int *v10; // rdx long long v11; // rsi long long v12; // rax unsigned int v13; // eax int i; // r12d unsigned __int8 ( *v15)(long long); // rax long long v18; // r12 int v20; // ebp unsigned __int8 ( *v23)(long long); // rax int v24; // ebp long long v25; // r13 int v26; // eax unsigned __int32 v28; // [rsp+0h] [rbp-58h] long long v29; // [rsp+8h] [rbp-50h] BYREF int n_tasks; // [rsp+10h] [rbp-48h] long long v31; // [rsp+18h] [rbp-40h] long long v32; // [rsp+20h] [rbp-38h] v2 = *(long long **)(a1 + 16); v3 = *v2; v4 = (long long *)v2[1]; v28 = *((_DWORD *)v2 + 8); if ( (unsigned int)dword_17E270 >= 2 ) { v5 = (dword_17E270 + v28 - 1) / dword_17E270; v6 = 513LL * (int)(*(_DWORD *)(a1 + 8) / (unsigned int)v5); v7 = (((unsigned long long)(unsigned int)dword_17E274 + 63) >> 3) & 0xFFFFFFF8; v8 = __sched_cpualloc((unsigned int)dword_17E274, v5, *(_DWORD *)(a1 + 8) % (unsigned int)v5); *(double *)_XMM0.m128_u64 = memset(v8, 0LL, v7); v9 = g_state[v6 + 2048]; if ( g_state[v6 + 2048] ) { v10 = &g_state[v6 + 1536]; v11 = 0LL; do { if ( v10[v11] >> 3 < (unsigned int)v7 ) *(_QWORD *)(v8 + 8LL * (v10[v11] >> 6)) |= 1LL << v10[v11]; ++v11; --v9; } while ( v9 ); } v12 = pthread_self(*(double *)_XMM0.m128_u64); v13 = pthread_setaffinity_np(v12, v7, v8); if ( v13 ) ggml_graph_compute_thread_cold_1(v13); __sched_cpufree(v8); } for ( i = -1; ; i = v24 ) { v15 = (unsigned __int8 ( *)(long long))v4[3]; if ( v15 ) { if ( v15(v4[4]) ) break; } if ( _InterlockedDecrement((volatile signed __int32 *)(*(_QWORD *)(a1 + 16) + 36LL)) ) { do v24 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 40LL); while ( v24 == i ); } else { v29 = 2LL; n_tasks = 0; v31 = *v4; v32 = v4[1]; if ( i != -1 ) { _R13 = *(_QWORD *)(*(_QWORD *)(v3 + 16) + 8LL * i); if ( GGML_OP_HAS_FINALIZE[*(unsigned int *)(_R13 + 80)] == 1 ) { n_tasks = ggml_get_n_tasks(*(_QWORD *)(*(_QWORD *)(v3 + 16) + 8LL * i), v28); ggml_compute_forward(&v29, _R13); } ++*(_DWORD *)(_R13 + 240); __asm { vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 } } LODWORD(v18) = i + 1; if ( (int)v18 < *(_DWORD *)(v3 + 4) ) { v18 = (int)v18; do { _R13 = *(_QWORD *)(*(_QWORD *)(v3 + 16) + 8 * v18); v20 = ggml_get_n_tasks(_R13, v28); _RAX = *(_QWORD *)(a1 + 16); __asm { vpxor xmm0, xmm0, xmm0 vmovdqu xmmword ptr [rax+10h], xmm0 } n_tasks = v20; if ( GGML_OP_HAS_INIT[*(unsigned int *)(_R13 + 80)] == 1 ) { LODWORD(v29) = 0; ggml_compute_forward(&v29, _R13); } if ( v20 != 1 ) break; LODWORD(v29) = 1; ggml_compute_forward(&v29, _R13); if ( GGML_OP_HAS_FINALIZE[*(unsigned int *)(_R13 + 80)] == 1 ) { LODWORD(v29) = 2; ggml_compute_forward(&v29, _R13); } ++*(_DWORD *)(_R13 + 240); __asm { vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 } v23 = (unsigned __int8 ( *)(long long))v4[3]; if ( v23 ) { if ( v23(v4[4]) ) break; } ++v18; } while ( v18 < *(int *)(v3 + 4) ); } _InterlockedExchange((volatile __int32 *)(*(_QWORD *)(a1 + 16) + 36LL), v28); _InterlockedExchange((volatile __int32 *)(*(_QWORD *)(a1 + 16) + 40LL), v18); v24 = v18; } if ( v24 >= *(_DWORD *)(v3 + 4) ) return 0LL; v25 = *(_QWORD *)(*(_QWORD *)(v3 + 16) + 8LL * v24); v26 = ggml_get_n_tasks(v25, v28); LODWORD(v29) = 1; HIDWORD(v29) = *(_DWORD *)(a1 + 8); n_tasks = v26; v31 = *v4; v32 = v4[1]; if ( SHIDWORD(v29) < v26 ) ggml_compute_forward(&v29, v25); } _InterlockedIncrement((volatile signed __int32 *)(*(_QWORD *)(a1 + 16) + 40LL)); return 1LL; }
34,806
ggml_graph_compute_thread
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static thread_ret_t ggml_graph_compute_thread(void * data) { struct ggml_compute_state * state = (struct ggml_compute_state *) data; const struct ggml_cgraph * cgraph = state->shared->cgraph; const struct ggml_cplan * cplan = state->shared->cplan; const int n_threads = state->shared->n_threads; set_numa_thread_affinity(state->ith, n_threads); int node_n = -1; while (true) { if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { state->shared->node_n += 1; return (thread_ret_t) GGML_EXIT_ABORTED; } if (atomic_fetch_sub(&state->shared->n_active, 1) == 1) { // all other threads are finished and spinning // do finalize and init here so we don't have synchronize again struct ggml_compute_params params = { /*.type =*/ GGML_TASK_FINALIZE, /*.ith =*/ 0, /*.nth =*/ 0, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (node_n != -1) { /* FINALIZE */ struct ggml_tensor * node = cgraph->nodes[node_n]; if (GGML_OP_HAS_FINALIZE[node->op]) { params.nth = ggml_get_n_tasks(node, n_threads); ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } // distribute new work or execute it direct if 1T while (++node_n < cgraph->n_nodes) { GGML_PRINT_DEBUG_5("%s: %d/%d\n", __func__, node_n, cgraph->n_nodes); struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); state->shared->perf_node_start_cycles = ggml_perf_cycles(); state->shared->perf_node_start_time_us = ggml_perf_time_us(); params.nth = n_tasks; /* INIT */ if (GGML_OP_HAS_INIT[node->op]) { params.type = GGML_TASK_INIT; ggml_compute_forward(&params, node); } if (n_tasks == 1) { // TODO: maybe push node_n to the atomic but if other threads see n_tasks is 1, // they do something more efficient than spinning (?) params.type = GGML_TASK_COMPUTE; ggml_compute_forward(&params, node); if (GGML_OP_HAS_FINALIZE[node->op]) { params.type = GGML_TASK_FINALIZE; ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } else { break; } if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { break; } } atomic_store(&state->shared->n_active, n_threads); atomic_store(&state->shared->node_n, node_n); } else { // wait for other threads to finish const int last = node_n; while (true) { // TODO: this sched_yield can have significant impact on the performance - either positive or negative // depending on the workload and the operating system. // since it is not clear what is the best approach, it should potentially become user-configurable // ref: https://github.com/ggerganov/ggml/issues/291 #if defined(GGML_USE_ACCELERATE) || defined(GGML_USE_OPENBLAS) sched_yield(); #endif node_n = atomic_load(&state->shared->node_n); if (node_n != last) break; }; } // check if we should stop if (node_n >= cgraph->n_nodes) break; /* COMPUTE */ struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); struct ggml_compute_params params = { /*.type =*/ GGML_TASK_COMPUTE, /*.ith =*/ state->ith, /*.nth =*/ n_tasks, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (state->ith < n_tasks) { ggml_compute_forward(&params, node); } } return GGML_EXIT_SUCCESS; }
O2
c
ggml_graph_compute_thread: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rax movq (%rax), %r15 movq 0x8(%rax), %r14 movl 0x20(%rax), %eax movq %rax, 0x8(%rsp) movl 0xeaac1(%rip), %esi # 0x15d280 cmpl $0x2, %esi jb 0x72884 movl 0x8(%rbx), %ecx movq 0x8(%rsp), %rax addl %esi, %eax decl %eax xorl %ebp, %ebp xorl %edx, %edx divl %esi movl %eax, %esi movl %ecx, %eax xorl %edx, %edx divl %esi cltq imulq $0x804, %rax, %rax # imm = 0x804 leaq 0xe526e(%rip), %rcx # 0x157a60 leaq (%rax,%rcx), %r13 addq $0x1800, %r13 # imm = 0x1800 movl 0xeaa81(%rip), %edi # 0x15d284 leaq 0x3f(%rdi), %r12 shrq $0x3, %r12 andl $-0x8, %r12d callq 0xa500 movq %rax, 0x30(%rsp) movq %rax, %rdi xorl %esi, %esi movq %r12, %rdx callq 0xa2f0 movl 0x800(%r13), %eax pushq $0x1 popq %rdx movq 0x30(%rsp), %rdi subq $0x1, %rax jb 0x7285c movl (%r13,%rbp,4), %ecx movl %ecx, %esi shrl $0x3, %esi cmpl %r12d, %esi jae 0x72857 movq %rdx, %rsi shlq %cl, %rsi shrl $0x6, %ecx orq %rsi, (%rdi,%rcx,8) incq %rbp jmp 0x72835 callq 0xa530 movq %rax, %rdi movq %r12, %rsi movq 0x30(%rsp), %r13 movq %r13, %rdx callq 0xaa90 testl %eax, %eax jne 0x72a7b movq %r13, %rdi callq 0xa8a0 pushq $-0x1 popq %rbp movq 0x18(%r14), %rax testq %rax, %rax je 0x728a3 movq 0x20(%r14), %rdi callq *%rax movq 0x10(%rbx), %rcx testb %al, %al je 0x728a7 jmp 0x72a65 movq 0x10(%rbx), %rcx lock decl 0x24(%rcx) jne 0x729f9 movq $0x2, 0x10(%rsp) andl $0x0, 0x18(%rsp) movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) pushq $-0x1 popq %r12 cmpl $-0x1, %ebp je 0x7291f movq 0x10(%r15), %rax movslq %ebp, %r12 movq (%rax,%r12,8), %r13 movl 0x50(%r13), %eax leaq 0x1aaa01(%rip), %rcx # 0x21d2f0 cmpb $0x1, (%rax,%rcx) jne 0x72913 movq %r13, %rdi movq 0x8(%rsp), %rsi callq 0x72314 movl %eax, 0x18(%rsp) leaq 0x10(%rsp), %rdi movq %r13, %rsi callq 0x79449 movq 0x10(%rbx), %rsi movq %r13, %rdi callq 0x8a857 incq %r12 movslq 0x4(%r15), %rax cmpq %rax, %r12 jge 0x729e1 movq 0x10(%r15), %rax movq (%rax,%r12,8), %r13 movq %r13, %rdi movq 0x8(%rsp), %rsi callq 0x72314 movl %eax, %ebp movq 0x10(%rbx), %rax vxorps %xmm0, %xmm0, %xmm0 vmovups %xmm0, 0x10(%rax) movl %ebp, 0x18(%rsp) movl 0x50(%r13), %eax leaq 0x1aa93e(%rip), %rcx # 0x21d2a0 cmpb $0x1, (%rax,%rcx) jne 0x7297a andl $0x0, 0x10(%rsp) leaq 0x10(%rsp), %rdi movq %r13, %rsi callq 0x79449 cmpl $0x1, %ebp jne 0x729e1 movl $0x1, 0x10(%rsp) leaq 0x10(%rsp), %rdi movq %r13, %rsi callq 0x79449 movl 0x50(%r13), %eax leaq 0x1aa951(%rip), %rcx # 0x21d2f0 cmpb $0x1, (%rax,%rcx) jne 0x729ba movl $0x2, 0x10(%rsp) leaq 0x10(%rsp), %rdi movq %r13, %rsi callq 0x79449 movq 0x10(%rbx), %rsi movq %r13, %rdi callq 0x8a857 movq 0x18(%r14), %rax testq %rax, %rax je 0x7291f movq 0x20(%r14), %rdi callq *%rax testb %al, %al je 0x7291f movq 0x10(%rbx), %rax movq 0x8(%rsp), %rcx xchgl %ecx, 0x24(%rax) movq 0x10(%rbx), %rax movl %r12d, %ecx xchgl %ecx, 0x28(%rax) jmp 0x72a06 movq 0x10(%rbx), %rax movl 0x28(%rax), %r12d cmpl %ebp, %r12d je 0x729f9 cmpl 0x4(%r15), %r12d jge 0x72a61 movq 0x10(%r15), %rax movslq %r12d, %rcx movq (%rax,%rcx,8), %r13 movq %r13, %rdi movq 0x8(%rsp), %rsi callq 0x72314 movl $0x1, 0x10(%rsp) movl 0x8(%rbx), %ecx movl %ecx, 0x14(%rsp) movl %eax, 0x18(%rsp) movq (%r14), %rdx movq %rdx, 0x20(%rsp) movq 0x8(%r14), %rdx movq %rdx, 0x28(%rsp) cmpl %eax, %ecx jge 0x72a59 leaq 0x10(%rsp), %rdi movq %r13, %rsi callq 0x79449 movl %r12d, %ebp jmp 0x72887 xorl %eax, %eax jmp 0x72a6c lock incl 0x28(%rcx) pushq $0x1 popq %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x63526(%rip), %rcx # 0xd5fa8 movq (%rcx), %r12 movl %eax, %edi callq 0xa190 leaq 0x30efd(%rip), %rsi # 0xa3990 movq %r12, %rdi movq %rax, %rdx xorl %eax, %eax callq 0xa8b0 jmp 0x7287c
ggml_graph_compute_thread: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi mov rax, [rdi+10h] mov r15, [rax] mov r14, [rax+8] mov eax, [rax+20h] mov [rsp+68h+var_60], rax mov esi, cs:dword_15D280 cmp esi, 2 jb loc_72884 mov ecx, [rbx+8] mov rax, [rsp+68h+var_60] add eax, esi dec eax xor ebp, ebp xor edx, edx div esi mov esi, eax mov eax, ecx xor edx, edx div esi cdqe imul rax, 804h lea rcx, g_state lea r13, [rax+rcx] add r13, 1800h mov edi, cs:dword_15D284 lea r12, [rdi+3Fh] shr r12, 3 and r12d, 0FFFFFFF8h call ___sched_cpualloc mov [rsp+68h+var_38], rax mov rdi, rax xor esi, esi mov rdx, r12 call _memset mov eax, [r13+800h] push 1 pop rdx mov rdi, [rsp+68h+var_38] loc_72835: sub rax, 1 jb short loc_7285C mov ecx, [r13+rbp*4+0] mov esi, ecx shr esi, 3 cmp esi, r12d jnb short loc_72857 mov rsi, rdx shl rsi, cl shr ecx, 6 or [rdi+rcx*8], rsi loc_72857: inc rbp jmp short loc_72835 loc_7285C: call _pthread_self mov rdi, rax mov rsi, r12 mov r13, [rsp+68h+var_38] mov rdx, r13 call _pthread_setaffinity_np test eax, eax jnz loc_72A7B loc_7287C: mov rdi, r13 call ___sched_cpufree loc_72884: push 0FFFFFFFFFFFFFFFFh pop rbp loc_72887: mov rax, [r14+18h] test rax, rax jz short loc_728A3 mov rdi, [r14+20h] call rax mov rcx, [rbx+10h] test al, al jz short loc_728A7 jmp loc_72A65 loc_728A3: mov rcx, [rbx+10h] loc_728A7: lock dec dword ptr [rcx+24h] jnz loc_729F9 mov [rsp+68h+var_58], 2 and [rsp+68h+var_50], 0 mov rax, [r14] mov [rsp+68h+var_48], rax mov rax, [r14+8] mov [rsp+68h+var_40], rax push 0FFFFFFFFFFFFFFFFh pop r12 cmp ebp, 0FFFFFFFFh jz short loc_7291F mov rax, [r15+10h] movsxd r12, ebp mov r13, [rax+r12*8] mov eax, [r13+50h] lea rcx, GGML_OP_HAS_FINALIZE cmp byte ptr [rax+rcx], 1 jnz short loc_72913 mov rdi, r13 mov rsi, [rsp+68h+var_60] call ggml_get_n_tasks mov [rsp+68h+var_50], eax lea rdi, [rsp+68h+var_58] mov rsi, r13 call ggml_compute_forward loc_72913: mov rsi, [rbx+10h] mov rdi, r13 call ggml_graph_compute_perf_stats_node loc_7291F: inc r12 movsxd rax, dword ptr [r15+4] cmp r12, rax jge loc_729E1 mov rax, [r15+10h] mov r13, [rax+r12*8] mov rdi, r13 mov rsi, [rsp+68h+var_60] call ggml_get_n_tasks mov ebp, eax mov rax, [rbx+10h] vxorps xmm0, xmm0, xmm0 vmovups xmmword ptr [rax+10h], xmm0 mov [rsp+68h+var_50], ebp mov eax, [r13+50h] lea rcx, GGML_OP_HAS_INIT cmp byte ptr [rax+rcx], 1 jnz short loc_7297A and dword ptr [rsp+68h+var_58], 0 lea rdi, [rsp+68h+var_58] mov rsi, r13 call ggml_compute_forward loc_7297A: cmp ebp, 1 jnz short loc_729E1 mov dword ptr [rsp+68h+var_58], 1 lea rdi, [rsp+68h+var_58] mov rsi, r13 call ggml_compute_forward mov eax, [r13+50h] lea rcx, GGML_OP_HAS_FINALIZE cmp byte ptr [rax+rcx], 1 jnz short loc_729BA mov dword ptr [rsp+68h+var_58], 2 lea rdi, [rsp+68h+var_58] mov rsi, r13 call ggml_compute_forward loc_729BA: mov rsi, [rbx+10h] mov rdi, r13 call ggml_graph_compute_perf_stats_node mov rax, [r14+18h] test rax, rax jz loc_7291F mov rdi, [r14+20h] call rax test al, al jz loc_7291F loc_729E1: mov rax, [rbx+10h] mov rcx, [rsp+68h+var_60] xchg ecx, [rax+24h] mov rax, [rbx+10h] mov ecx, r12d xchg ecx, [rax+28h] jmp short loc_72A06 loc_729F9: mov rax, [rbx+10h] mov r12d, [rax+28h] cmp r12d, ebp jz short loc_729F9 loc_72A06: cmp r12d, [r15+4] jge short loc_72A61 mov rax, [r15+10h] movsxd rcx, r12d mov r13, [rax+rcx*8] mov rdi, r13 mov rsi, [rsp+68h+var_60] call ggml_get_n_tasks mov dword ptr [rsp+68h+var_58], 1 mov ecx, [rbx+8] mov dword ptr [rsp+68h+var_58+4], ecx mov [rsp+68h+var_50], eax mov rdx, [r14] mov [rsp+68h+var_48], rdx mov rdx, [r14+8] mov [rsp+68h+var_40], rdx cmp ecx, eax jge short loc_72A59 lea rdi, [rsp+68h+var_58] mov rsi, r13 call ggml_compute_forward loc_72A59: mov ebp, r12d jmp loc_72887 loc_72A61: xor eax, eax jmp short loc_72A6C loc_72A65: lock inc dword ptr [rcx+28h] push 1 pop rax loc_72A6C: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72A7B: mov rcx, cs:stderr_ptr mov r12, [rcx] mov edi, eax call _strerror lea rsi, aWarningPthread; "warning: pthread_setaffinity_np() faile"... mov rdi, r12 mov rdx, rax xor eax, eax call _fprintf jmp loc_7287C
long long ggml_graph_compute_thread(long long a1, __m128 _XMM0) { long long *v3; // rax long long v4; // r15 long long *v5; // r14 long long v6; // rbp long long v7; // rsi unsigned int *v8; // r13 unsigned long long v9; // r12 long long v10; // rsi long long v11; // rax long long v12; // rdi unsigned int v14; // ecx long long v15; // rax unsigned int v16; // eax int i; // ebp long long ( *v18)(long long); // rax char v19; // al long long v20; // rcx long long v21; // r12 long long v22; // r13 long long v23; // r13 int v24; // ebp unsigned __int8 ( *v26)(long long); // rax long long v27; // r13 int v28; // eax long long v30; // r12 const char *v31; // rax int v32; // [rsp+8h] [rbp-60h] long long v33; // [rsp+10h] [rbp-58h] BYREF int n_tasks; // [rsp+18h] [rbp-50h] long long v35; // [rsp+20h] [rbp-48h] long long v36; // [rsp+28h] [rbp-40h] long long v37; // [rsp+30h] [rbp-38h] v3 = *(long long **)(a1 + 16); v4 = *v3; v5 = (long long *)v3[1]; v32 = *((_DWORD *)v3 + 8); if ( (unsigned int)dword_15D280 >= 2 ) { v6 = 0LL; v7 = (dword_15D280 + v32 - 1) / (unsigned int)dword_15D280; v8 = &g_state[513 * (int)(*(_DWORD *)(a1 + 8) / (unsigned int)v7) + 1536]; v9 = (((unsigned long long)(unsigned int)dword_15D284 + 63) >> 3) & 0xFFFFFFF8; v37 = __sched_cpualloc((unsigned int)dword_15D284, v7, *(_DWORD *)(a1 + 8) % (unsigned int)v7); v10 = 0LL; *(double *)_XMM0.m128_u64 = memset(v37, 0LL, v9); v11 = v8[512]; v12 = v37; while ( v11-- != 0 ) { v14 = v8[v6]; v10 = v14 >> 3; if ( (unsigned int)v10 < (unsigned int)v9 ) { v10 = 1LL << v14; *(_QWORD *)(v12 + 8LL * (v14 >> 6)) |= 1LL << v14; } ++v6; } v15 = pthread_self(v12, v10, 1LL, *(double *)_XMM0.m128_u64); v16 = pthread_setaffinity_np(v15, v9, v37); if ( v16 ) { v30 = stderr; v31 = (const char *)strerror(v16); *(double *)_XMM0.m128_u64 = fprintf(v30, "warning: pthread_setaffinity_np() failed: %s\n", v31); } __sched_cpufree(v37); } for ( i = -1; ; i = v21 ) { v18 = (long long ( *)(long long))v5[3]; if ( v18 ) { v19 = v18(v5[4]); v20 = *(_QWORD *)(a1 + 16); if ( v19 ) { _InterlockedIncrement((volatile signed __int32 *)(v20 + 40)); return 1LL; } } else { v20 = *(_QWORD *)(a1 + 16); } if ( _InterlockedDecrement((volatile signed __int32 *)(v20 + 36)) ) { do LODWORD(v21) = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 40LL); while ( (_DWORD)v21 == i ); } else { v33 = 2LL; n_tasks = 0; v35 = *v5; v36 = v5[1]; v21 = -1LL; if ( i != -1 ) { v21 = i; v22 = *(_QWORD *)(*(_QWORD *)(v4 + 16) + 8LL * i); if ( GGML_OP_HAS_FINALIZE[*(unsigned int *)(v22 + 80)] == 1 ) { n_tasks = ggml_get_n_tasks(*(_QWORD *)(*(_QWORD *)(v4 + 16) + 8LL * i), v32); ggml_compute_forward(&v33, v22); } ggml_graph_compute_perf_stats_node(v22, *(_QWORD *)(a1 + 16)); } while ( ++v21 < *(int *)(v4 + 4) ) { v23 = *(_QWORD *)(*(_QWORD *)(v4 + 16) + 8 * v21); v24 = ggml_get_n_tasks(v23, v32); _RAX = *(_QWORD *)(a1 + 16); __asm { vxorps xmm0, xmm0, xmm0 vmovups xmmword ptr [rax+10h], xmm0 } n_tasks = v24; if ( GGML_OP_HAS_INIT[*(unsigned int *)(v23 + 80)] == 1 ) { LODWORD(v33) = 0; ggml_compute_forward(&v33, v23); } if ( v24 != 1 ) break; LODWORD(v33) = 1; ggml_compute_forward(&v33, v23); if ( GGML_OP_HAS_FINALIZE[*(unsigned int *)(v23 + 80)] == 1 ) { LODWORD(v33) = 2; ggml_compute_forward(&v33, v23); } ggml_graph_compute_perf_stats_node(v23, *(_QWORD *)(a1 + 16)); v26 = (unsigned __int8 ( *)(long long))v5[3]; if ( v26 ) { if ( v26(v5[4]) ) break; } } _InterlockedExchange((volatile __int32 *)(*(_QWORD *)(a1 + 16) + 36LL), v32); _InterlockedExchange((volatile __int32 *)(*(_QWORD *)(a1 + 16) + 40LL), v21); } if ( (int)v21 >= *(_DWORD *)(v4 + 4) ) break; v27 = *(_QWORD *)(*(_QWORD *)(v4 + 16) + 8LL * (int)v21); v28 = ggml_get_n_tasks(v27, v32); LODWORD(v33) = 1; HIDWORD(v33) = *(_DWORD *)(a1 + 8); n_tasks = v28; v35 = *v5; v36 = v5[1]; if ( SHIDWORD(v33) < v28 ) ggml_compute_forward(&v33, v27); } return 0LL; }
ggml_graph_compute_thread: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] MOV R15,qword ptr [RAX] MOV R14,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV ESI,dword ptr [0x0025d280] CMP ESI,0x2 JC 0x00172884 MOV ECX,dword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] ADD EAX,ESI DEC EAX XOR EBP,EBP XOR EDX,EDX DIV ESI MOV ESI,EAX MOV EAX,ECX XOR EDX,EDX DIV ESI CDQE IMUL RAX,RAX,0x804 LEA RCX,[0x257a60] LEA R13,[RAX + RCX*0x1] ADD R13,0x1800 MOV EDI,dword ptr [0x0025d284] LEA R12,[RDI + 0x3f] SHR R12,0x3 AND R12D,0xfffffff8 CALL 0x0010a500 MOV qword ptr [RSP + 0x30],RAX MOV RDI,RAX XOR ESI,ESI MOV RDX,R12 CALL 0x0010a2f0 MOV EAX,dword ptr [R13 + 0x800] PUSH 0x1 POP RDX MOV RDI,qword ptr [RSP + 0x30] LAB_00172835: SUB RAX,0x1 JC 0x0017285c MOV ECX,dword ptr [R13 + RBP*0x4] MOV ESI,ECX SHR ESI,0x3 CMP ESI,R12D JNC 0x00172857 MOV RSI,RDX SHL RSI,CL SHR ECX,0x6 OR qword ptr [RDI + RCX*0x8],RSI LAB_00172857: INC RBP JMP 0x00172835 LAB_0017285c: CALL 0x0010a530 MOV RDI,RAX MOV RSI,R12 MOV R13,qword ptr [RSP + 0x30] MOV RDX,R13 CALL 0x0010aa90 TEST EAX,EAX JNZ 0x00172a7b LAB_0017287c: MOV RDI,R13 CALL 0x0010a8a0 LAB_00172884: PUSH -0x1 POP RBP LAB_00172887: MOV RAX,qword ptr [R14 + 0x18] TEST RAX,RAX JZ 0x001728a3 MOV RDI,qword ptr [R14 + 0x20] CALL RAX MOV RCX,qword ptr [RBX + 0x10] TEST AL,AL JZ 0x001728a7 JMP 0x00172a65 LAB_001728a3: MOV RCX,qword ptr [RBX + 0x10] LAB_001728a7: DEC.LOCK dword ptr [RCX + 0x24] JNZ 0x001729f9 MOV qword ptr [RSP + 0x10],0x2 AND dword ptr [RSP + 0x18],0x0 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX PUSH -0x1 POP R12 CMP EBP,-0x1 JZ 0x0017291f MOV RAX,qword ptr [R15 + 0x10] MOVSXD R12,EBP MOV R13,qword ptr [RAX + R12*0x8] MOV EAX,dword ptr [R13 + 0x50] LEA RCX,[0x31d2f0] CMP byte ptr [RAX + RCX*0x1],0x1 JNZ 0x00172913 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x8] CALL 0x00172314 MOV dword ptr [RSP + 0x18],EAX LEA RDI,[RSP + 0x10] MOV RSI,R13 CALL 0x00179449 LAB_00172913: MOV RSI,qword ptr [RBX + 0x10] MOV RDI,R13 CALL 0x0018a857 LAB_0017291f: INC R12 MOVSXD RAX,dword ptr [R15 + 0x4] CMP R12,RAX JGE 0x001729e1 MOV RAX,qword ptr [R15 + 0x10] MOV R13,qword ptr [RAX + R12*0x8] MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x8] CALL 0x00172314 MOV EBP,EAX MOV RAX,qword ptr [RBX + 0x10] VXORPS XMM0,XMM0,XMM0 VMOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV dword ptr [RSP + 0x18],EBP MOV EAX,dword ptr [R13 + 0x50] LEA RCX,[0x31d2a0] CMP byte ptr [RAX + RCX*0x1],0x1 JNZ 0x0017297a AND dword ptr [RSP + 0x10],0x0 LEA RDI,[RSP + 0x10] MOV RSI,R13 CALL 0x00179449 LAB_0017297a: CMP EBP,0x1 JNZ 0x001729e1 MOV dword ptr [RSP + 0x10],0x1 LEA RDI,[RSP + 0x10] MOV RSI,R13 CALL 0x00179449 MOV EAX,dword ptr [R13 + 0x50] LEA RCX,[0x31d2f0] CMP byte ptr [RAX + RCX*0x1],0x1 JNZ 0x001729ba MOV dword ptr [RSP + 0x10],0x2 LEA RDI,[RSP + 0x10] MOV RSI,R13 CALL 0x00179449 LAB_001729ba: MOV RSI,qword ptr [RBX + 0x10] MOV RDI,R13 CALL 0x0018a857 MOV RAX,qword ptr [R14 + 0x18] TEST RAX,RAX JZ 0x0017291f MOV RDI,qword ptr [R14 + 0x20] CALL RAX TEST AL,AL JZ 0x0017291f LAB_001729e1: MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RSP + 0x8] XCHG dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBX + 0x10] MOV ECX,R12D XCHG dword ptr [RAX + 0x28],ECX JMP 0x00172a06 LAB_001729f9: MOV RAX,qword ptr [RBX + 0x10] MOV R12D,dword ptr [RAX + 0x28] CMP R12D,EBP JZ 0x001729f9 LAB_00172a06: CMP R12D,dword ptr [R15 + 0x4] JGE 0x00172a61 MOV RAX,qword ptr [R15 + 0x10] MOVSXD RCX,R12D MOV R13,qword ptr [RAX + RCX*0x8] MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x8] CALL 0x00172314 MOV dword ptr [RSP + 0x10],0x1 MOV ECX,dword ptr [RBX + 0x8] MOV dword ptr [RSP + 0x14],ECX MOV dword ptr [RSP + 0x18],EAX MOV RDX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RDX MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RDX CMP ECX,EAX JGE 0x00172a59 LEA RDI,[RSP + 0x10] MOV RSI,R13 CALL 0x00179449 LAB_00172a59: MOV EBP,R12D JMP 0x00172887 LAB_00172a61: XOR EAX,EAX JMP 0x00172a6c LAB_00172a65: INC.LOCK dword ptr [RCX + 0x28] PUSH 0x1 POP RAX LAB_00172a6c: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00172a7b: MOV RCX,qword ptr [0x001d5fa8] MOV R12,qword ptr [RCX] MOV EDI,EAX CALL 0x0010a190 LEA RSI,[0x1a3990] MOV RDI,R12 MOV RDX,RAX XOR EAX,EAX CALL 0x0010a8b0 JMP 0x0017287c
int8 ggml_graph_compute_thread(long param_1) { int *piVar1; int iVar2; uint uVar3; long *plVar4; long lVar5; int8 *puVar6; int8 uVar7; FILE *__stream; cpu_set_t *__set; char cVar8; int iVar9; long lVar10; ulong uVar11; pthread_t __th; char *pcVar12; long lVar13; uint uVar14; bool bVar15; int8 local_58; int local_50; int8 local_48; int8 local_40; cpu_set_t *local_38; plVar4 = *(long **)(param_1 + 0x10); lVar5 = *plVar4; puVar6 = (int8 *)plVar4[1]; iVar2 = (int)plVar4[4]; if (1 < DAT_0025d280) { lVar13 = 0; lVar10 = (long)(int)((ulong)*(uint *)(param_1 + 8) / ((ulong)((iVar2 + DAT_0025d280) - 1) / (ulong)DAT_0025d280)); uVar14 = (uint)((ulong)DAT_0025d284 + 0x3f >> 3) & 0xfffffff8; local_38 = __sched_cpualloc((ulong)DAT_0025d284); memset(local_38,0,(ulong)uVar14); uVar11 = (ulong)(uint)(&DAT_00259a60)[lVar10 * 0x201]; while (bVar15 = uVar11 != 0, uVar11 = uVar11 - 1, bVar15) { uVar3 = *(uint *)(&DAT_00259260 + lVar13 * 4 + lVar10 * 0x804); if (uVar3 >> 3 < uVar14) { local_38->__bits[uVar3 >> 6] = local_38->__bits[uVar3 >> 6] | 1L << ((byte)uVar3 & 0x3f); } lVar13 = lVar13 + 1; } __th = pthread_self(); __set = local_38; iVar9 = pthread_setaffinity_np(__th,(ulong)uVar14,local_38); if (iVar9 != 0) { __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar12 = strerror(iVar9); fprintf(__stream,"warning: pthread_setaffinity_np() failed: %s\n",pcVar12); } __sched_cpufree(__set); } uVar11 = 0xffffffffffffffff; do { if ((code *)puVar6[3] == (code *)0x0) { lVar10 = *(long *)(param_1 + 0x10); } else { cVar8 = (*(code *)puVar6[3])(puVar6[4]); lVar10 = *(long *)(param_1 + 0x10); if (cVar8 != '\0') { LOCK(); *(int *)(lVar10 + 0x28) = *(int *)(lVar10 + 0x28) + 1; UNLOCK(); return 1; } } LOCK(); piVar1 = (int *)(lVar10 + 0x24); *piVar1 = *piVar1 + -1; UNLOCK(); uVar14 = (uint)uVar11; if (*piVar1 == 0) { local_58 = 2; local_50 = 0; local_48 = *puVar6; local_40 = puVar6[1]; uVar11 = 0xffffffffffffffff; if (uVar14 != 0xffffffff) { uVar11 = (ulong)(int)uVar14; lVar10 = *(long *)(*(long *)(lVar5 + 0x10) + uVar11 * 8); if (GGML_OP_HAS_FINALIZE[*(uint *)(lVar10 + 0x50)] == '\x01') { local_50 = ggml_get_n_tasks(lVar10,iVar2); ggml_compute_forward(&local_58,lVar10); } ggml_graph_compute_perf_stats_node(lVar10,*(int8 *)(param_1 + 0x10)); } do { uVar11 = uVar11 + 1; if ((long)*(int *)(lVar5 + 4) <= (long)uVar11) break; lVar10 = *(long *)(*(long *)(lVar5 + 0x10) + uVar11 * 8); iVar9 = ggml_get_n_tasks(lVar10,iVar2); lVar13 = *(long *)(param_1 + 0x10); *(int8 *)(lVar13 + 0x10) = 0; *(int8 *)(lVar13 + 0x18) = 0; local_50 = iVar9; if (GGML_OP_HAS_INIT[*(uint *)(lVar10 + 0x50)] == '\x01') { local_58 = local_58 & 0xffffffff00000000; ggml_compute_forward(&local_58,lVar10); } if (iVar9 != 1) break; local_58 = CONCAT44(local_58._4_4_,1); ggml_compute_forward(&local_58,lVar10); if (GGML_OP_HAS_FINALIZE[*(uint *)(lVar10 + 0x50)] == '\x01') { local_58 = CONCAT44(local_58._4_4_,2); ggml_compute_forward(&local_58,lVar10); } ggml_graph_compute_perf_stats_node(lVar10,*(int8 *)(param_1 + 0x10)); } while (((code *)puVar6[3] == (code *)0x0) || (cVar8 = (*(code *)puVar6[3])(puVar6[4]), cVar8 == '\0')); LOCK(); *(int *)(*(long *)(param_1 + 0x10) + 0x24) = iVar2; UNLOCK(); LOCK(); *(int *)(*(long *)(param_1 + 0x10) + 0x28) = (int)uVar11; UNLOCK(); } else { do { uVar3 = *(uint *)(*(long *)(param_1 + 0x10) + 0x28); uVar11 = (ulong)uVar3; } while (uVar3 == uVar14); } if (*(int *)(lVar5 + 4) <= (int)uVar11) { return 0; } uVar7 = *(int8 *)(*(long *)(lVar5 + 0x10) + (long)(int)uVar11 * 8); local_50 = ggml_get_n_tasks(uVar7,iVar2); local_58 = CONCAT44(*(int *)(param_1 + 8),1); local_48 = *puVar6; local_40 = puVar6[1]; if (*(int *)(param_1 + 8) < local_50) { ggml_compute_forward(&local_58,uVar7); } uVar11 = uVar11 & 0xffffffff; } while( true ); }
34,807
ggml_graph_compute_thread
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static thread_ret_t ggml_graph_compute_thread(void * data) { struct ggml_compute_state * state = (struct ggml_compute_state *) data; const struct ggml_cgraph * cgraph = state->shared->cgraph; const struct ggml_cplan * cplan = state->shared->cplan; const int n_threads = state->shared->n_threads; set_numa_thread_affinity(state->ith, n_threads); int node_n = -1; while (true) { if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { state->shared->node_n += 1; return (thread_ret_t) GGML_EXIT_ABORTED; } if (atomic_fetch_sub(&state->shared->n_active, 1) == 1) { // all other threads are finished and spinning // do finalize and init here so we don't have synchronize again struct ggml_compute_params params = { /*.type =*/ GGML_TASK_FINALIZE, /*.ith =*/ 0, /*.nth =*/ 0, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (node_n != -1) { /* FINALIZE */ struct ggml_tensor * node = cgraph->nodes[node_n]; if (GGML_OP_HAS_FINALIZE[node->op]) { params.nth = ggml_get_n_tasks(node, n_threads); ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } // distribute new work or execute it direct if 1T while (++node_n < cgraph->n_nodes) { GGML_PRINT_DEBUG_5("%s: %d/%d\n", __func__, node_n, cgraph->n_nodes); struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); state->shared->perf_node_start_cycles = ggml_perf_cycles(); state->shared->perf_node_start_time_us = ggml_perf_time_us(); params.nth = n_tasks; /* INIT */ if (GGML_OP_HAS_INIT[node->op]) { params.type = GGML_TASK_INIT; ggml_compute_forward(&params, node); } if (n_tasks == 1) { // TODO: maybe push node_n to the atomic but if other threads see n_tasks is 1, // they do something more efficient than spinning (?) params.type = GGML_TASK_COMPUTE; ggml_compute_forward(&params, node); if (GGML_OP_HAS_FINALIZE[node->op]) { params.type = GGML_TASK_FINALIZE; ggml_compute_forward(&params, node); } ggml_graph_compute_perf_stats_node(node, state->shared); } else { break; } if (cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { break; } } atomic_store(&state->shared->n_active, n_threads); atomic_store(&state->shared->node_n, node_n); } else { // wait for other threads to finish const int last = node_n; while (true) { // TODO: this sched_yield can have significant impact on the performance - either positive or negative // depending on the workload and the operating system. // since it is not clear what is the best approach, it should potentially become user-configurable // ref: https://github.com/ggerganov/ggml/issues/291 #if defined(GGML_USE_ACCELERATE) || defined(GGML_USE_OPENBLAS) sched_yield(); #endif node_n = atomic_load(&state->shared->node_n); if (node_n != last) break; }; } // check if we should stop if (node_n >= cgraph->n_nodes) break; /* COMPUTE */ struct ggml_tensor * node = cgraph->nodes[node_n]; const int n_tasks = ggml_get_n_tasks(node, n_threads); struct ggml_compute_params params = { /*.type =*/ GGML_TASK_COMPUTE, /*.ith =*/ state->ith, /*.nth =*/ n_tasks, /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, }; if (state->ith < n_tasks) { ggml_compute_forward(&params, node); } } return GGML_EXIT_SUCCESS; }
O3
c
ggml_graph_compute_thread: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rax movq (%rax), %r15 movq 0x8(%rax), %r14 movl 0x20(%rax), %eax movq %rax, (%rsp) movl 0xe5213(%rip), %esi # 0x17c270 cmpl $0x2, %esi jb 0x97119 movl 0x8(%rbx), %ecx movq (%rsp), %rax addl %esi, %eax decl %eax xorl %edx, %edx divl %esi movl %eax, %esi movl %ecx, %eax xorl %edx, %edx divl %esi cltq movq %rax, %rcx shlq $0xb, %rcx leaq (%rcx,%rax,4), %rbp movl 0xe51e4(%rip), %edi # 0x17c274 leaq 0x3f(%rdi), %r12 shrq $0x3, %r12 andl $-0x8, %r12d callq 0xa4f0 movq %rax, %r13 movq %rax, %rdi xorl %esi, %esi movq %r12, %rdx callq 0xa2f0 leaq 0xdf998(%rip), %rcx # 0x176a50 movl 0x2000(%rcx,%rbp), %eax testq %rax, %rax je 0x970f6 leaq (%rcx,%rbp), %rdx addq $0x1800, %rdx # imm = 0x1800 xorl %esi, %esi movl (%rdx,%rsi,4), %ecx movl %ecx, %edi shrl $0x3, %edi cmpl %r12d, %edi jae 0x970ee movl $0x1, %edi shlq %cl, %rdi shrl $0x6, %ecx orq %rdi, (%r13,%rcx,8) incq %rsi decq %rax jne 0x970d1 callq 0xa510 movq %rax, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xaac0 testl %eax, %eax jne 0x9734e movq %r13, %rdi callq 0xa880 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movq 0x18(%r14), %rax testq %rax, %rax je 0x9713b movq 0x20(%r14), %rdi callq *%rax movq 0x10(%rbx), %rcx testb %al, %al je 0x9713f jmp 0x97336 movq 0x10(%rbx), %rcx lock decl 0x24(%rcx) jne 0x972cc movq $0x2, 0x8(%rsp) movl $0x0, 0x10(%rsp) movq (%r14), %rax movq %rax, 0x18(%rsp) movq 0x8(%r14), %rax movq %rax, 0x20(%rsp) cmpl $-0x1, %r12d je 0x971cc movq 0x10(%r15), %rax movslq %r12d, %rcx movq (%rax,%rcx,8), %r13 movl 0x50(%r13), %eax leaq 0x1a5159(%rip), %rcx # 0x23c2e0 cmpb $0x1, (%rax,%rcx) jne 0x971aa movq %r13, %rdi movq (%rsp), %rsi callq 0x96dbf movl %eax, 0x10(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9df7a movq 0x10(%rbx), %rax incl 0xf0(%r13) vmovdqu 0xf8(%r13), %xmm0 vpsubq 0x10(%rax), %xmm0, %xmm0 vmovdqu %xmm0, 0xf8(%r13) incl %r12d cmpl 0x4(%r15), %r12d jge 0x972b2 movslq %r12d, %r12 movq 0x10(%r15), %rax movq (%rax,%r12,8), %r13 movq %r13, %rdi movq (%rsp), %rsi callq 0x96dbf movl %eax, %ebp movq 0x10(%rbx), %rax vpxor %xmm0, %xmm0, %xmm0 vmovdqu %xmm0, 0x10(%rax) movl %ebp, 0x10(%rsp) movl 0x50(%r13), %eax leaq 0x1a5082(%rip), %rcx # 0x23c290 cmpb $0x1, (%rax,%rcx) jne 0x97229 movl $0x0, 0x8(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9df7a cmpl $0x1, %ebp jne 0x972b2 movl $0x1, 0x8(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9df7a movl 0x50(%r13), %eax leaq 0x1a508e(%rip), %rcx # 0x23c2e0 cmpb $0x1, (%rax,%rcx) jne 0x9726d movl $0x2, 0x8(%rsp) leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9df7a movq 0x10(%rbx), %rax incl 0xf0(%r13) vmovdqu 0xf8(%r13), %xmm0 vpsubq 0x10(%rax), %xmm0, %xmm0 vmovdqu %xmm0, 0xf8(%r13) movq 0x18(%r14), %rax testq %rax, %rax je 0x972a2 movq 0x20(%r14), %rdi callq *%rax testb %al, %al jne 0x972b2 incq %r12 movslq 0x4(%r15), %rax cmpq %rax, %r12 jl 0x971dc movq 0x10(%rbx), %rax movq (%rsp), %rcx xchgl %ecx, 0x24(%rax) movq 0x10(%rbx), %rax movl %r12d, %ecx xchgl %ecx, 0x28(%rax) movl %r12d, %ebp jmp 0x972d8 movq 0x10(%rbx), %rax movl 0x28(%rax), %ebp cmpl %r12d, %ebp je 0x972cc cmpl 0x4(%r15), %ebp jge 0x97332 movq 0x10(%r15), %rax movslq %ebp, %rcx movq (%rax,%rcx,8), %r13 movq %r13, %rdi movq (%rsp), %rsi callq 0x96dbf movl $0x1, 0x8(%rsp) movl 0x8(%rbx), %ecx movl %ecx, 0xc(%rsp) movl %eax, 0x10(%rsp) movq (%r14), %rdx movq %rdx, 0x18(%rsp) movq 0x8(%r14), %rdx movq %rdx, 0x20(%rsp) cmpl %eax, %ecx jge 0x9732a leaq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x9df7a movl %ebp, %r12d jmp 0x9711f xorl %eax, %eax jmp 0x9733f lock incl 0x28(%rcx) movl $0x1, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x102f7 jmp 0x97111
ggml_graph_compute_thread: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov rax, [rdi+10h] mov r15, [rax] mov r14, [rax+8] mov eax, [rax+20h] mov [rsp+58h+var_58], rax mov esi, cs:dword_17C270 cmp esi, 2 jb loc_97119 mov ecx, [rbx+8] mov rax, [rsp+58h+var_58] add eax, esi dec eax xor edx, edx div esi mov esi, eax mov eax, ecx xor edx, edx div esi cdqe mov rcx, rax shl rcx, 0Bh lea rbp, [rcx+rax*4] mov edi, cs:dword_17C274 lea r12, [rdi+3Fh] shr r12, 3 and r12d, 0FFFFFFF8h call ___sched_cpualloc mov r13, rax mov rdi, rax xor esi, esi mov rdx, r12 call _memset lea rcx, g_state mov eax, [rcx+rbp+2000h] test rax, rax jz short loc_970F6 lea rdx, [rcx+rbp] add rdx, 1800h xor esi, esi loc_970D1: mov ecx, [rdx+rsi*4] mov edi, ecx shr edi, 3 cmp edi, r12d jnb short loc_970EE mov edi, 1 shl rdi, cl shr ecx, 6 or [r13+rcx*8+0], rdi loc_970EE: inc rsi dec rax jnz short loc_970D1 loc_970F6: call _pthread_self mov rdi, rax mov rsi, r12 mov rdx, r13 call _pthread_setaffinity_np test eax, eax jnz loc_9734E loc_97111: mov rdi, r13 call ___sched_cpufree loc_97119: mov r12d, 0FFFFFFFFh loc_9711F: mov rax, [r14+18h] test rax, rax jz short loc_9713B mov rdi, [r14+20h] call rax mov rcx, [rbx+10h] test al, al jz short loc_9713F jmp loc_97336 loc_9713B: mov rcx, [rbx+10h] loc_9713F: lock dec dword ptr [rcx+24h] jnz loc_972CC mov [rsp+58h+var_50], 2 mov [rsp+58h+var_48], 0 mov rax, [r14] mov [rsp+58h+var_40], rax mov rax, [r14+8] mov [rsp+58h+var_38], rax cmp r12d, 0FFFFFFFFh jz short loc_971CC mov rax, [r15+10h] movsxd rcx, r12d mov r13, [rax+rcx*8] mov eax, [r13+50h] lea rcx, GGML_OP_HAS_FINALIZE cmp byte ptr [rax+rcx], 1 jnz short loc_971AA mov rdi, r13 mov rsi, [rsp+58h+var_58] call ggml_get_n_tasks mov [rsp+58h+var_48], eax lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_971AA: mov rax, [rbx+10h] inc dword ptr [r13+0F0h] vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 loc_971CC: inc r12d cmp r12d, [r15+4] jge loc_972B2 movsxd r12, r12d loc_971DC: mov rax, [r15+10h] mov r13, [rax+r12*8] mov rdi, r13 mov rsi, [rsp+58h+var_58] call ggml_get_n_tasks mov ebp, eax mov rax, [rbx+10h] vpxor xmm0, xmm0, xmm0 vmovdqu xmmword ptr [rax+10h], xmm0 mov [rsp+58h+var_48], ebp mov eax, [r13+50h] lea rcx, GGML_OP_HAS_INIT cmp byte ptr [rax+rcx], 1 jnz short loc_97229 mov dword ptr [rsp+58h+var_50], 0 lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_97229: cmp ebp, 1 jnz loc_972B2 mov dword ptr [rsp+58h+var_50], 1 lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward mov eax, [r13+50h] lea rcx, GGML_OP_HAS_FINALIZE cmp byte ptr [rax+rcx], 1 jnz short loc_9726D mov dword ptr [rsp+58h+var_50], 2 lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_9726D: mov rax, [rbx+10h] inc dword ptr [r13+0F0h] vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 mov rax, [r14+18h] test rax, rax jz short loc_972A2 mov rdi, [r14+20h] call rax test al, al jnz short loc_972B2 loc_972A2: inc r12 movsxd rax, dword ptr [r15+4] cmp r12, rax jl loc_971DC loc_972B2: mov rax, [rbx+10h] mov rcx, [rsp+58h+var_58] xchg ecx, [rax+24h] mov rax, [rbx+10h] mov ecx, r12d xchg ecx, [rax+28h] mov ebp, r12d jmp short loc_972D8 loc_972CC: mov rax, [rbx+10h] mov ebp, [rax+28h] cmp ebp, r12d jz short loc_972CC loc_972D8: cmp ebp, [r15+4] jge short loc_97332 mov rax, [r15+10h] movsxd rcx, ebp mov r13, [rax+rcx*8] mov rdi, r13 mov rsi, [rsp+58h+var_58] call ggml_get_n_tasks mov dword ptr [rsp+58h+var_50], 1 mov ecx, [rbx+8] mov dword ptr [rsp+58h+var_50+4], ecx mov [rsp+58h+var_48], eax mov rdx, [r14] mov [rsp+58h+var_40], rdx mov rdx, [r14+8] mov [rsp+58h+var_38], rdx cmp ecx, eax jge short loc_9732A lea rdi, [rsp+58h+var_50] mov rsi, r13 call ggml_compute_forward loc_9732A: mov r12d, ebp jmp loc_9711F loc_97332: xor eax, eax jmp short loc_9733F loc_97336: lock inc dword ptr [rcx+28h] mov eax, 1 loc_9733F: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9734E: mov edi, eax call ggml_graph_compute_thread_cold_1 jmp loc_97111
long long ggml_graph_compute_thread(long long a1, __m128 _XMM0) { long long *v2; // rax long long v3; // r15 long long *v4; // r14 long long v5; // rsi long long v6; // rbp unsigned long long v7; // r12 long long v8; // r13 long long v9; // rax unsigned int *v10; // rdx long long v11; // rsi long long v12; // rax unsigned int v13; // eax int i; // r12d long long ( *v15)(long long); // rax char v16; // al long long v17; // rcx long long v20; // r12 int v22; // ebp unsigned __int8 ( *v25)(long long); // rax int v26; // ebp long long v27; // r13 int v28; // eax unsigned __int32 v30; // [rsp+0h] [rbp-58h] long long v31; // [rsp+8h] [rbp-50h] BYREF int n_tasks; // [rsp+10h] [rbp-48h] long long v33; // [rsp+18h] [rbp-40h] long long v34; // [rsp+20h] [rbp-38h] v2 = *(long long **)(a1 + 16); v3 = *v2; v4 = (long long *)v2[1]; v30 = *((_DWORD *)v2 + 8); if ( (unsigned int)dword_17C270 >= 2 ) { v5 = (dword_17C270 + v30 - 1) / dword_17C270; v6 = 513LL * (int)(*(_DWORD *)(a1 + 8) / (unsigned int)v5); v7 = (((unsigned long long)(unsigned int)dword_17C274 + 63) >> 3) & 0xFFFFFFF8; v8 = __sched_cpualloc((unsigned int)dword_17C274, v5, *(_DWORD *)(a1 + 8) % (unsigned int)v5); *(double *)_XMM0.m128_u64 = memset(v8, 0LL, v7); v9 = g_state[v6 + 2048]; if ( g_state[v6 + 2048] ) { v10 = &g_state[v6 + 1536]; v11 = 0LL; do { if ( v10[v11] >> 3 < (unsigned int)v7 ) *(_QWORD *)(v8 + 8LL * (v10[v11] >> 6)) |= 1LL << v10[v11]; ++v11; --v9; } while ( v9 ); } v12 = pthread_self(*(double *)_XMM0.m128_u64); v13 = pthread_setaffinity_np(v12, v7, v8); if ( v13 ) ggml_graph_compute_thread_cold_1(v13); __sched_cpufree(v8); } for ( i = -1; ; i = v26 ) { v15 = (long long ( *)(long long))v4[3]; if ( v15 ) { v16 = v15(v4[4]); v17 = *(_QWORD *)(a1 + 16); if ( v16 ) { _InterlockedIncrement((volatile signed __int32 *)(v17 + 40)); return 1LL; } } else { v17 = *(_QWORD *)(a1 + 16); } if ( _InterlockedDecrement((volatile signed __int32 *)(v17 + 36)) ) { do v26 = *(_DWORD *)(*(_QWORD *)(a1 + 16) + 40LL); while ( v26 == i ); } else { v31 = 2LL; n_tasks = 0; v33 = *v4; v34 = v4[1]; if ( i != -1 ) { _R13 = *(_QWORD *)(*(_QWORD *)(v3 + 16) + 8LL * i); if ( GGML_OP_HAS_FINALIZE[*(unsigned int *)(_R13 + 80)] == 1 ) { n_tasks = ggml_get_n_tasks(*(_QWORD *)(*(_QWORD *)(v3 + 16) + 8LL * i), v30); ggml_compute_forward(&v31, _R13); } ++*(_DWORD *)(_R13 + 240); __asm { vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 } } LODWORD(v20) = i + 1; if ( (int)v20 < *(_DWORD *)(v3 + 4) ) { v20 = (int)v20; do { _R13 = *(_QWORD *)(*(_QWORD *)(v3 + 16) + 8 * v20); v22 = ggml_get_n_tasks(_R13, v30); _RAX = *(_QWORD *)(a1 + 16); __asm { vpxor xmm0, xmm0, xmm0 vmovdqu xmmword ptr [rax+10h], xmm0 } n_tasks = v22; if ( GGML_OP_HAS_INIT[*(unsigned int *)(_R13 + 80)] == 1 ) { LODWORD(v31) = 0; ggml_compute_forward(&v31, _R13); } if ( v22 != 1 ) break; LODWORD(v31) = 1; ggml_compute_forward(&v31, _R13); if ( GGML_OP_HAS_FINALIZE[*(unsigned int *)(_R13 + 80)] == 1 ) { LODWORD(v31) = 2; ggml_compute_forward(&v31, _R13); } ++*(_DWORD *)(_R13 + 240); __asm { vmovdqu xmm0, xmmword ptr [r13+0F8h] vpsubq xmm0, xmm0, xmmword ptr [rax+10h] vmovdqu xmmword ptr [r13+0F8h], xmm0 } v25 = (unsigned __int8 ( *)(long long))v4[3]; if ( v25 ) { if ( v25(v4[4]) ) break; } ++v20; } while ( v20 < *(int *)(v3 + 4) ); } _InterlockedExchange((volatile __int32 *)(*(_QWORD *)(a1 + 16) + 36LL), v30); _InterlockedExchange((volatile __int32 *)(*(_QWORD *)(a1 + 16) + 40LL), v20); v26 = v20; } if ( v26 >= *(_DWORD *)(v3 + 4) ) break; v27 = *(_QWORD *)(*(_QWORD *)(v3 + 16) + 8LL * v26); v28 = ggml_get_n_tasks(v27, v30); LODWORD(v31) = 1; HIDWORD(v31) = *(_DWORD *)(a1 + 8); n_tasks = v28; v33 = *v4; v34 = v4[1]; if ( SHIDWORD(v31) < v28 ) ggml_compute_forward(&v31, v27); } return 0LL; }
34,808
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const std::vector<int> & values) { std::stringstream buf; buf << "[ "; bool first = true; for (auto e : values) { if (first) { first = false; } else { buf << ", "; } buf << std::to_string(e); } buf << " ]"; return buf.str(); }
O3
cpp
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, %rbx movq %rdi, 0x28(%rsp) leaq 0x30(%rsp), %rdi callq 0x1a660 leaq 0x40(%rsp), %rdi leaq 0x7cae7(%rip), %rsi # 0xeec9f movl $0x2, %edx callq 0x1aa10 movq (%rbx), %r12 movq 0x8(%rbx), %r15 cmpq %r15, %r12 je 0x722b8 movb $0x1, %al movl $0xd1b71759, %r14d # imm = 0xD1B71759 movl (%r12), %r13d testb $0x1, %al jne 0x721f8 movl $0x2, %edx leaq 0x40(%rsp), %rdi leaq 0x7d450(%rip), %rsi # 0xef643 callq 0x1aa10 movl %r13d, %ebp negl %ebp cmovsl %r13d, %ebp movl $0x1, %ebx cmpl $0xa, %ebp jb 0x72247 movl $0x4, %ebx movl %ebp, %eax cmpl $0x63, %eax jbe 0x72240 cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0x72245 cmpl $0x2710, %eax # imm = 0x2710 jb 0x72247 movl %eax, %ecx imulq %r14, %rcx shrq $0x2d, %rcx addl $0x4, %ebx cmpl $0x1869f, %eax # imm = 0x1869F movl %ecx, %eax ja 0x72212 addl $-0x3, %ebx jmp 0x72247 addl $-0x2, %ebx jmp 0x72247 decl %ebx shrl $0x1f, %r13d leal (%rbx,%r13), %esi leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x8(%rsp), %rdi movl $0x2d, %edx callq 0x1aa40 addq 0x8(%rsp), %r13 movq %r13, %rdi movl %ebx, %esi movl %ebp, %edx callq 0x587eb movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1aa10 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x722a9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 addq $0x4, %r12 xorl %eax, %eax cmpq %r15, %r12 jne 0x721da leaq 0x7c9e3(%rip), %rsi # 0xeeca2 movl $0x2, %edx leaq 0x40(%rsp), %rdi callq 0x1aa10 movq 0x28(%rsp), %rbx leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x1add0 movq 0xb9c41(%rip), %rsi # 0x12bf28 leaq 0x30(%rsp), %rdi callq 0x1a6a0 leaq 0xb0(%rsp), %rdi callq 0x1a2d0 movq %rbx, %rax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x72319 jmp 0x72319 jmp 0x72319 movq %rax, %rbx jmp 0x7233d movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x7233d movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq 0xb9be4(%rip), %rsi # 0x12bf28 leaq 0x30(%rsp), %rdi callq 0x1a6a0 leaq 0xb0(%rsp), %rdi callq 0x1a2d0 movq %rbx, %rdi callq 0x1afd0
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov rbx, rsi mov [rsp+1E8h+var_1C0], rdi lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1E8h+var_1A8] lea rsi, asc_EEC9F; "[ " mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r12, [rbx] mov r15, [rbx+8] cmp r12, r15 jz loc_722B8 mov al, 1 mov r14d, 0D1B71759h loc_721DA: mov r13d, [r12] test al, 1 jnz short loc_721F8 mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] lea rsi, aZuD+6; ", " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_721F8: mov ebp, r13d neg ebp cmovs ebp, r13d mov ebx, 1 cmp ebp, 0Ah jb short loc_72247 mov ebx, 4 mov eax, ebp loc_72212: cmp eax, 63h ; 'c' jbe short loc_72240 cmp eax, 3E7h jbe short loc_72245 cmp eax, 2710h jb short loc_72247 mov ecx, eax imul rcx, r14 shr rcx, 2Dh add ebx, 4 cmp eax, 1869Fh mov eax, ecx ja short loc_72212 add ebx, 0FFFFFFFDh jmp short loc_72247 loc_72240: add ebx, 0FFFFFFFEh jmp short loc_72247 loc_72245: dec ebx loc_72247: shr r13d, 1Fh lea esi, [rbx+r13] lea rax, [rsp+1E8h+var_1D0] mov [rsp+1E8h+var_1E0], rax lea rdi, [rsp+1E8h+var_1E0] mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r13, [rsp+1E8h+var_1E0] mov rdi, r13 mov esi, ebx mov edx, ebp call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * lea rax, [rsp+1E8h+var_1D0] cmp rdi, rax jz short loc_722A9 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_722A9: add r12, 4 xor eax, eax cmp r12, r15 jnz loc_721DA loc_722B8: lea rsi, asc_EECA2; " ]" mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rsp+1E8h+var_1C0] lea rsi, [rsp+1E8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_72319 jmp short loc_72319 jmp short $+2 loc_72319: mov rbx, rax jmp short loc_7233D mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_7233D mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7233D: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_28] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_A8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, int **a2) { int *v2; // r12 int *v3; // r15 char v4; // al int v5; // r13d unsigned int v6; // ebp int v7; // ebx unsigned int v8; // eax bool v9; // cc unsigned int v10; // r13d long long v11; // rbx void *v13[2]; // [rsp+8h] [rbp-1E0h] BYREF _QWORD v14[2]; // [rsp+18h] [rbp-1D0h] BYREF long long v15; // [rsp+28h] [rbp-1C0h] _BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF char v19[312]; // [rsp+B0h] [rbp-138h] BYREF v15 = a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16); std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL); v2 = *a2; v3 = a2[1]; if ( *a2 != v3 ) { v4 = 1; do { v5 = *v2; if ( (v4 & 1) == 0 ) std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL); v6 = -v5; if ( v5 > 0 ) v6 = v5; v7 = 1; if ( v6 >= 0xA ) { v7 = 4; v8 = v6; while ( 1 ) { if ( v8 <= 0x63 ) { v7 -= 2; goto LABEL_16; } if ( v8 <= 0x3E7 ) break; if ( v8 < 0x2710 ) goto LABEL_16; v7 += 4; v9 = v8 <= 0x1869F; v8 /= 0x2710u; if ( v9 ) { v7 -= 3; goto LABEL_16; } } --v7; } LABEL_16: v10 = (unsigned int)v5 >> 31; v13[0] = v14; std::string::_M_construct(v13, v7 + v10, 45LL); std::__detail::__to_chars_10_impl<unsigned int>((char *)v13[0] + v10, v7, v6); std::__ostream_insert<char,std::char_traits<char>>(v17, v13[0], v13[1]); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); ++v2; v4 = 0; } while ( v2 != v3 ); } std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL); v11 = v15; std::stringbuf::str(v15, v18); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v16, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v19); return v11; }
string_from[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RSI MOV qword ptr [RSP + 0x28],RDI LEA RDI,[RSP + 0x30] CALL 0x0011a660 LEA RDI,[RSP + 0x40] LAB_001721b1: LEA RSI,[0x1eec9f] MOV EDX,0x2 CALL 0x0011aa10 MOV R12,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x8] CMP R12,R15 JZ 0x001722b8 MOV AL,0x1 MOV R14D,0xd1b71759 LAB_001721da: MOV R13D,dword ptr [R12] TEST AL,0x1 JNZ 0x001721f8 LAB_001721e2: MOV EDX,0x2 LEA RDI,[RSP + 0x40] LEA RSI,[0x1ef643] CALL 0x0011aa10 LAB_001721f8: MOV EBP,R13D NEG EBP CMOVS EBP,R13D MOV EBX,0x1 CMP EBP,0xa JC 0x00172247 MOV EBX,0x4 MOV EAX,EBP LAB_00172212: CMP EAX,0x63 JBE 0x00172240 CMP EAX,0x3e7 JBE 0x00172245 CMP EAX,0x2710 JC 0x00172247 MOV ECX,EAX IMUL RCX,R14 SHR RCX,0x2d ADD EBX,0x4 CMP EAX,0x1869f MOV EAX,ECX JA 0x00172212 ADD EBX,-0x3 JMP 0x00172247 LAB_00172240: ADD EBX,-0x2 JMP 0x00172247 LAB_00172245: DEC EBX LAB_00172247: SHR R13D,0x1f LEA ESI,[RBX + R13*0x1] LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_00172259: LEA RDI,[RSP + 0x8] MOV EDX,0x2d CALL 0x0011aa40 ADD R13,qword ptr [RSP + 0x8] MOV RDI,R13 MOV ESI,EBX MOV EDX,EBP CALL 0x001587eb MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00172283: LEA RDI,[RSP + 0x40] CALL 0x0011aa10 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001722a9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_001722a9: ADD R12,0x4 XOR EAX,EAX CMP R12,R15 JNZ 0x001721da LAB_001722b8: LEA RSI,[0x1eeca2] MOV EDX,0x2 LEA RDI,[RSP + 0x40] CALL 0x0011aa10 MOV RBX,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x0011add0 LAB_001722e0: MOV RSI,qword ptr [0x0022bf28] LEA RDI,[RSP + 0x30] CALL 0x0011a6a0 LEA RDI,[RSP + 0xb0] CALL 0x0011a2d0 MOV RAX,RBX ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */ vector * string_from_abi_cxx11_(vector *param_1) { uint uVar1; uint *puVar2; uint uVar3; vector *pvVar4; uint uVar5; bool bVar6; uint uVar7; ulong uVar8; uint uVar9; int8 *in_RSI; uint *puVar10; long *local_1e0; long local_1d8; long local_1d0 [2]; vector *local_1c0; stringstream local_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; local_1c0 = param_1; std::__cxx11::stringstream::stringstream(local_1b8); /* try { // try from 001721b1 to 001721c1 has its CatchHandler @ 00172313 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2); puVar10 = (uint *)*in_RSI; puVar2 = (uint *)in_RSI[1]; if (puVar10 != puVar2) { bVar6 = true; do { uVar1 = *puVar10; if (!bVar6) { /* try { // try from 001721e2 to 001721f7 has its CatchHandler @ 00172317 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2); } uVar3 = -uVar1; if (0 < (int)uVar1) { uVar3 = uVar1; } uVar9 = 1; if (9 < uVar3) { uVar8 = (ulong)uVar3; uVar5 = 4; do { uVar9 = uVar5; uVar7 = (uint)uVar8; if (uVar7 < 100) { uVar9 = uVar9 - 2; goto LAB_00172247; } if (uVar7 < 1000) { uVar9 = uVar9 - 1; goto LAB_00172247; } if (uVar7 < 10000) goto LAB_00172247; uVar8 = uVar8 / 10000; uVar5 = uVar9 + 4; } while (99999 < uVar7); uVar9 = uVar9 + 1; } LAB_00172247: local_1e0 = local_1d0; /* try { // try from 00172259 to 00172267 has its CatchHandler @ 00172319 */ std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar9 - (char)((int)uVar1 >> 0x1f)) ; std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((long)local_1e0 + (ulong)(uVar1 >> 0x1f)),uVar9,uVar3); /* try { // try from 00172283 to 0017228c has its CatchHandler @ 0017231e */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e0,local_1d8); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } puVar10 = puVar10 + 1; bVar6 = false; } while (puVar10 != puVar2); } /* try { // try from 001722b8 to 001722df has its CatchHandler @ 00172315 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2); pvVar4 = local_1c0; std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b8); std::ios_base::~ios_base(local_138); return pvVar4; }
34,809
mi_recinfo_write
eloqsql/storage/myisam/mi_open.c
uint mi_recinfo_write(File file, MI_COLUMNDEF *recinfo) { uchar buff[MI_COLUMNDEF_SIZE]; uchar *ptr=buff; mi_int2store(ptr,recinfo->type); ptr +=2; mi_int2store(ptr,recinfo->length); ptr +=2; *ptr++ = recinfo->null_bit; mi_int2store(ptr,recinfo->null_pos); ptr+= 2; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O3
c
mi_recinfo_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movzwl (%rsi), %eax rolw $0x8, %ax movw %ax, -0x1f(%rbp) movzwl 0x4(%rsi), %eax rolw $0x8, %ax movw %ax, -0x1d(%rbp) movb 0xc(%rsi), %al movb %al, -0x1b(%rbp) movzwl 0xe(%rsi), %eax rolw $0x8, %ax movl %edi, %ebx movw %ax, -0x1a(%rbp) leaq 0x305139(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x70(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x80f2a leaq -0x1f(%rbp), %rsi movl $0x7, %edx movl $0x4, %ecx movl %ebx, %edi callq 0x2f024 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x18(%rbp), %rdx jne 0x80f44 movb %cl, %al addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x1f(%rbp), %rdx leaq -0x28(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x2e39e movq (%r14), %rcx jmp 0x80f08 callq 0x29260
mi_recinfo_write: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov rax, fs:28h mov [rbp+var_18], rax movzx eax, word ptr [rsi] rol ax, 8 mov [rbp+var_1F], ax movzx eax, word ptr [rsi+4] rol ax, 8 mov [rbp+var_1D], ax mov al, [rsi+0Ch] mov [rbp+var_1B], al movzx eax, word ptr [rsi+0Eh] rol ax, 8 mov ebx, edi mov [rbp+var_1A], ax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_70] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_80F2A lea rsi, [rbp+var_1F] mov edx, 7 mov ecx, 4 mov edi, ebx call my_write mov rcx, rax loc_80F08: xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_18] jnz short loc_80F44 mov al, cl add rsp, 60h pop rbx pop r14 pop rbp retn loc_80F2A: lea rdx, [rbp+var_1F] lea r14, [rbp+var_28] mov rdi, rax mov esi, ebx mov rcx, r14 call mi_recinfo_write_cold_1 mov rcx, [r14] jmp short loc_80F08 loc_80F44: call ___stack_chk_fail
bool mi_recinfo_write(unsigned int a1, long long a2) { long long v2; // rax long long v3; // rcx _BYTE v6[72]; // [rsp+0h] [rbp-70h] BYREF long long v7; // [rsp+48h] [rbp-28h] BYREF _WORD v8[2]; // [rsp+51h] [rbp-1Fh] BYREF char v9; // [rsp+55h] [rbp-1Bh] __int16 v10; // [rsp+56h] [rbp-1Ah] unsigned long long v11; // [rsp+58h] [rbp-18h] v11 = __readfsqword(0x28u); v8[0] = __ROL2__(*(_WORD *)a2, 8); v8[1] = __ROL2__(*(_WORD *)(a2 + 4), 8); v9 = *(_BYTE *)(a2 + 12); v10 = __ROL2__(*(_WORD *)(a2 + 14), 8); v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL); if ( v2 ) { mi_recinfo_write_cold_1(v2, a1, (long long)v8, &v7); v3 = v7; } else { v3 = my_write(a1, (long long)v8, 7LL, 4LL); } return v3 != 0; }
mi_recinfo_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOVZX EAX,word ptr [RSI] ROL AX,0x8 MOV word ptr [RBP + -0x1f],AX MOVZX EAX,word ptr [RSI + 0x4] ROL AX,0x8 MOV word ptr [RBP + -0x1d],AX MOV AL,byte ptr [RSI + 0xc] MOV byte ptr [RBP + -0x1b],AL MOVZX EAX,word ptr [RSI + 0xe] ROL AX,0x8 MOV EBX,EDI MOV word ptr [RBP + -0x1a],AX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00180f2a LEA RSI,[RBP + -0x1f] MOV EDX,0x7 MOV ECX,0x4 MOV EDI,EBX CALL 0x0012f024 MOV RCX,RAX LAB_00180f08: XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x18] JNZ 0x00180f44 MOV AL,CL ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_00180f2a: LEA RDX,[RBP + -0x1f] LEA R14,[RBP + -0x28] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x0012e39e MOV RCX,qword ptr [R14] JMP 0x00180f08 LAB_00180f44: CALL 0x00129260
bool mi_recinfo_write(int4 param_1,ushort *param_2) { long lVar1; long in_FS_OFFSET; int1 local_78 [72]; long local_30; ushort local_27; ushort local_25; int1 local_23; ushort local_22; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_27 = *param_2 << 8 | *param_2 >> 8; local_25 = param_2[2] << 8 | param_2[2] >> 8; local_23 = (int1)param_2[6]; local_22 = param_2[7] << 8 | param_2[7] >> 8; lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,7); if (lVar1 == 0) { local_30 = my_write(param_1,&local_27,7,4); } else { mi_recinfo_write_cold_1(lVar1,param_1,&local_27,&local_30); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return local_30 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
34,810
uf_zerofill_skip_zero
eloqsql/storage/myisam/mi_packrec.c
static void uf_zerofill_skip_zero(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O0
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbc817 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbc83b jmp 0xbc857 movq -0x10(%rbp), %rdi callq 0xbc370 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbc857 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 jmp 0xbc89b movq -0x8(%rbp), %rax movl 0x1c(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbca80 movq -0x20(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
uf_zerofill_skip_zero_0: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BC817 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BC83B jmp short loc_BC857 loc_BC817: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BC857 loc_BC83B: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov eax, eax mov edx, eax xor esi, esi call _memset jmp short loc_BC89B loc_BC857: mov rax, [rbp+var_8] mov ecx, [rax+1Ch] mov rax, [rbp+var_20] mov ecx, ecx mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 mov rdi, [rbp+var_20] mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov edx, eax xor esi, esi call _memset loc_BC89B: add rsp, 20h pop rbp retn
long long uf_zerofill_skip_zero_0(long long a1, int *a2, long long a3, long long a4) { int v4; // eax int v5; // ecx long long v8; // [rsp+0h] [rbp-20h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 0LL, (unsigned int)(a4 - a3)); } fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); LABEL_6: v8 = a4 - *(unsigned int *)(a1 + 28); decode_bytes_0(a1, a2, a3, v8); return memset(v8, 0LL, *(unsigned int *)(a1 + 28)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bc817 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bc83b JMP 0x001bc857 LAB_001bc817: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bc370 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bc857 LAB_001bc83b: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 JMP 0x001bc89b LAB_001bc857: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x1c] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bca80 MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 LAB_001bc89b: ADD RSP,0x20 POP RBP RET
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x1c)); decode_bytes(param_1,param_2,param_3,__s); memset(__s,0,(ulong)*(uint *)(param_1 + 0x1c)); } else { memset(param_3,0,(ulong)(uint)((int)param_4 - (int)param_3)); } return; }
34,811
uf_zerofill_skip_zero
eloqsql/storage/myisam/mi_packrec.c
static void uf_zerofill_skip_zero(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O3
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x82a49 movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x82a61 subl %r14d, %ebx movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx jmp 0x82a82 movq %r12, %rdi callq 0x822b1 movl $0x1f, 0x4(%r12) cmpl $0x0, (%r12) js 0x82a3c movl 0x1c(%r15), %eax subq %rax, %rbx movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x82ba2 movl 0x1c(%r15), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x292c0
uf_zerofill_skip_zero_0: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rdx mov r12, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_82A49 mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_82A61 loc_82A3C: sub ebx, r14d mov rdi, r14 xor esi, esi mov rdx, rbx jmp short loc_82A82 loc_82A49: mov rdi, r12 call fill_buffer_0 mov dword ptr [r12+4], 1Fh cmp dword ptr [r12], 0 js short loc_82A3C loc_82A61: mov eax, [r15+1Ch] sub rbx, rax mov rdi, r15 mov rsi, r12 mov rdx, r14 mov rcx, rbx call decode_bytes_0 mov edx, [r15+1Ch] mov rdi, rbx xor esi, esi loc_82A82: pop rbx pop r12 pop r14 pop r15 pop rbp jmp _memset
long long uf_zerofill_skip_zero_0(long long a1, int *a2, long long a3, long long a4) { int v6; // eax int v7; // ecx unsigned int v8; // eax long long v10; // rbx v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest(&v7, v8) ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } else { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } v10 = a4 - *(unsigned int *)(a1 + 28); decode_bytes_0(a1, a2, a3, v10); return memset(v10, 0LL, *(unsigned int *)(a1 + 28)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x00182a49 MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x00182a61 LAB_00182a3c: SUB EBX,R14D MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX JMP 0x00182a82 LAB_00182a49: MOV RDI,R12 CALL 0x001822b1 MOV dword ptr [R12 + 0x4],0x1f CMP dword ptr [R12],0x0 JS 0x00182a3c LAB_00182a61: MOV EAX,dword ptr [R15 + 0x1c] SUB RBX,RAX MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,RBX CALL 0x00182ba2 MOV EDX,dword ptr [R15 + 0x1c] MOV RDI,RBX XOR ESI,ESI LAB_00182a82: POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001292c0
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; if (-1 < (int)*param_2) goto LAB_00182a61; } else { uVar1 = param_2[1] - 1; param_2[1] = uVar1; if ((*param_2 >> (uVar1 & 0x1f) & 1) == 0) { LAB_00182a61: __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x1c)); decode_bytes(param_1,param_2,param_3,__s); uVar1 = *(uint *)(param_1 + 0x1c); goto LAB_00182a82; } } uVar1 = (int)param_4 - (int)param_3; __s = param_3; LAB_00182a82: memset(__s,0,(ulong)uVar1); return; }
34,812
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::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> const*, 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> const*)
monkey531[P]llama/common/json.hpp
static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::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> const*, 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> const*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x88, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x31ccf(%rip), %rsi # 0xb0c50 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x27c44 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x3e6f2 leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x42a6c leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %r14, %rcx callq 0x3e689 leaq 0x8(%rsp), %rdi callq 0x241f8 leaq 0x48(%rsp), %rdi callq 0x241f8 leaq 0x28(%rsp), %rdi callq 0x241f8 movq 0x68(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x42a8e leaq 0x68(%rsp), %rdi callq 0x241f8 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x68(%rsp), %rdi jmp 0x7f03d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x241f8 jmp 0x7f029 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x241f8 jmp 0x7f038 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x241f8 jmp 0x7f047 movq %rax, %rbx movq %rbx, %rdi callq 0x23fb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: push rbp push r15 push r14 push rbx sub rsp, 88h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi lea rsi, aOutOfRange; "out_of_range" lea rdi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] mov edx, ebp call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea rdi, [rsp+0A8h+var_A0] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*) lea rdi, [rsp+0A8h+var_40] lea rsi, [rsp+0A8h+var_60] lea rdx, [rsp+0A8h+var_A0] mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdx, [rsp+0A8h+var_40]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeC2EiPKc; nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(int,char const*) lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_60] jmp short loc_7F03D mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7F029 mov rbx, rax loc_7F029: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7F038 mov rbx, rax loc_7F038: lea rdi, [rsp+arg_20]; void * loc_7F03D: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7F047 mov rbx, rax loc_7F047: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::out_of_range * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( nlohmann::json_abi_v3_11_3::detail::out_of_range *this, int a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF char *v8[8]; // [rsp+68h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(v6, (long long)"out_of_range"); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>( (long long)v8, (long long)v7, (long long)v5, a3); std::string::~string(v5); std::string::~string(v7); std::string::~string(v6); nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(this, a2, v8[0]); std::string::~string(v8); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x88 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LAB_0017ef7a: LEA RSI,[0x1b0c50] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x00127c44 LAB_0017ef90: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0013e6f2 LAB_0017efa1: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x00142a6c LAB_0017efae: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x48] LEA RDX,[RSP + 0x8] MOV RCX,R14 CALL 0x0013e689 LEA RDI,[RSP + 0x8] CALL 0x001241f8 LEA RDI,[RSP + 0x48] CALL 0x001241f8 LEA RDI,[RSP + 0x28] CALL 0x001241f8 MOV RDX,qword ptr [RSP + 0x68] LAB_0017efe8: MOV RDI,RBX MOV ESI,EBP CALL 0x00142a8e LAB_0017eff2: LEA RDI,[RSP + 0x68] CALL 0x001241f8 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R14 POP R15 POP RBP RET
out_of_range * _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (out_of_range *param_1,int param_2,string *param_3) { allocator local_a1; string local_a0 [32]; string local_80 [32]; exception local_60 [32]; char *local_40 [4]; /* try { // try from 0017ef7a to 0017ef8f has its CatchHandler @ 0017f044 */ std::__cxx11::string::string<std::allocator<char>>(local_80,"out_of_range",&local_a1); /* try { // try from 0017ef90 to 0017efa0 has its CatchHandler @ 0017f035 */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2); /* try { // try from 0017efa1 to 0017efad has its CatchHandler @ 0017f026 */ nlohmann::json_abi_v3_11_3::detail::exception:: diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (local_a0); /* try { // try from 0017efae to 0017efc4 has its CatchHandler @ 0017f017 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&> ((detail *)local_40,(string *)local_60,local_a0,param_3); std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string(local_80); /* try { // try from 0017efe8 to 0017eff1 has its CatchHandler @ 0017f00d */ nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(param_1,param_2,local_40[0]); std::__cxx11::string::~string((string *)local_40); return param_1; }
34,813
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::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> const*, 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> const*)
monkey531[P]llama/common/json.hpp
static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::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> const*, 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> const*): 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 0x40dfd(%rip), %rsi # 0xecc9e leaq 0x40e02(%rip), %rdx # 0xeccaa leaq 0x28(%rsp), %rdi callq 0x224a4 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x592f0 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 0x1ad80 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1a250 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1a250 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x1a250 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0xabf4b movq 0x78(%rsp), %rsi incq %rsi callq 0x1a8e0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xabf66 movq 0x58(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xabf7d movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x5955e leaq 0x7df5d(%rip), %rax # 0x129ef0 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xabfb1 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 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 0xac03f movq 0x18(%rsp), %rsi jmp 0xac037 movq %rax, %rbx jmp 0xac028 movq %rax, %rbx jmp 0xac03f movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xac001 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 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 0x1c040 movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xac03f movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8e0 movq %rbx, %rdi callq 0x1afb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: 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, aOutOfRange; "out_of_range" lea rdx, aOutOfRange+0Ch; "" 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_ABF4B mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABF4B: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ABF66 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABF66: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_ABF7D mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABF7D: 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_36detail12out_of_rangeE; `vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_ABFB1 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ABFB1: 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_AC03F mov rsi, [rsp+arg_10] jmp short loc_AC037 mov rbx, rax jmp short loc_AC028 mov rbx, rax jmp short loc_AC03F mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_AC001 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC001: 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_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1 mov rbx, [r12] loc_AC028: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_AC03F mov rsi, [rsp+arg_30] loc_AC037: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC03F: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( 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, "out_of_range", (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, v10); std::string::_M_append(v5, v12, v13); std::string::_M_append(v5, *a3, a3[1]); 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::out_of_range + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: 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_001abe9a: LEA RSI,[0x1ecc9e] LEA RDX,[0x1eccaa] LEA RDI,[RSP + 0x28] CALL 0x001224a4 LAB_001abeb2: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x001592f0 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_001abef1: LEA RDI,[RSP + 0x8] CALL 0x0011ad80 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x0011a250 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x0011a250 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0011a250 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x001abf4b MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011a8e0 LAB_001abf4b: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001abf66 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011a8e0 LAB_001abf66: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x001abf7d MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a8e0 LAB_001abf7d: MOV RDX,qword ptr [RSP + 0x8] LAB_001abf82: MOV RDI,RBX MOV ESI,EBP CALL 0x0015955e LAB_001abf8c: LEA RAX,[0x229ef0] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x001abfb1 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8e0 LAB_001abfb1: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (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 001abe9a to 001abeb1 has its CatchHandler @ 001abfdf */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"out_of_range",""); /* try { // try from 001abeb2 to 001abec2 has its CatchHandler @ 001abfda */ 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 001abef1 to 001abf33 has its CatchHandler @ 001abfe4 */ 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 001abf82 to 001abf8b has its CatchHandler @ 001abfc6 */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_00229f00; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
34,814
js_object_isPrototypeOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_isPrototypeOf(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, v1; JSValue v; int res; v = argv[0]; if (!JS_IsObject(v)) return JS_FALSE; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) return JS_EXCEPTION; v1 = js_dup(v); for(;;) { v1 = JS_GetPrototypeFree(ctx, v1); if (JS_IsException(v1)) goto exception; if (JS_IsNull(v1)) { res = FALSE; break; } if (JS_VALUE_GET_OBJ(obj) == JS_VALUE_GET_OBJ(v1)) { res = TRUE; break; } /* avoid infinite loop (possible with proxies) */ if (js_poll_interrupts(ctx)) goto exception; } JS_FreeValue(ctx, v1); JS_FreeValue(ctx, obj); return js_bool(res); exception: JS_FreeValue(ctx, v1); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
js_object_isPrototypeOf: subq $0xa8, %rsp movq %rsi, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq %rdi, 0x80(%rsp) movl %ecx, 0x7c(%rsp) movq %r8, 0x70(%rsp) movq 0x70(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x40(%rsp) movq 0x8(%rax), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x29cb0 cmpl $0x0, %eax jne 0xbff3e movl $0x0, 0x98(%rsp) movq $0x1, 0xa0(%rsp) jmp 0xc00ff movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x364b0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0xbffa9 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) jmp 0xc00ff movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x20410 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x80(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x5efa0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0xc0024 jmp 0xc00ba movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x2cf80 cmpl $0x0, %eax je 0xc0042 movl $0x0, 0x3c(%rsp) jmp 0xc0071 movq 0x60(%rsp), %rax cmpq 0x50(%rsp), %rax jne 0xc0058 movl $0x1, 0x3c(%rsp) jmp 0xc0071 movq 0x80(%rsp), %rdi callq 0x5f000 cmpl $0x0, %eax je 0xc006c jmp 0xc00ba jmp 0xbffd6 movq 0x80(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x229d0 movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x229d0 movl 0x3c(%rsp), %edi callq 0x55f90 movq %rax, 0x98(%rsp) movq %rdx, 0xa0(%rsp) jmp 0xc00ff movq 0x80(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x229d0 movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x229d0 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) movq 0x98(%rsp), %rax movq 0xa0(%rsp), %rdx addq $0xa8, %rsp retq nopw (%rax,%rax)
js_object_isPrototypeOf: sub rsp, 0A8h mov [rsp+0A8h+var_20], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_28], rdi mov [rsp+0A8h+var_2C], ecx mov [rsp+0A8h+var_38], r8 mov rax, [rsp+0A8h+var_38] mov rcx, [rax] mov [rsp+0A8h+var_68], rcx mov rax, [rax+8] mov [rsp+0A8h+var_60], rax mov rdi, [rsp+0A8h+var_68] mov rsi, [rsp+0A8h+var_60] call JS_IsObject cmp eax, 0 jnz short loc_BFF3E mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 1 jmp loc_C00FF loc_BFF3E: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] call JS_ToObject mov [rsp+0A8h+var_80], rax mov [rsp+0A8h+var_78], rdx mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_48], rax mov rax, [rsp+0A8h+var_78] mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_48] mov rsi, [rsp+0A8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_BFFA9 mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 jmp loc_C00FF loc_BFFA9: mov rdi, [rsp+0A8h+var_68] mov rsi, [rsp+0A8h+var_60] call js_dup mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_88], rdx mov rax, [rsp+0A8h+var_90] mov [rsp+0A8h+var_58], rax mov rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_50], rax loc_BFFD6: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call JS_GetPrototypeFree mov [rsp+0A8h+var_A0], rax mov [rsp+0A8h+var_98], rdx mov rax, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_58], rax mov rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_50], rax mov rdi, [rsp+0A8h+var_58] mov rsi, [rsp+0A8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_C0024 jmp loc_C00BA loc_C0024: mov rdi, [rsp+0A8h+var_58] mov rsi, [rsp+0A8h+var_50] call JS_IsNull_0 cmp eax, 0 jz short loc_C0042 mov [rsp+0A8h+var_6C], 0 jmp short loc_C0071 loc_C0042: mov rax, [rsp+0A8h+var_48] cmp rax, [rsp+0A8h+var_58] jnz short loc_C0058 mov [rsp+0A8h+var_6C], 1 jmp short loc_C0071 loc_C0058: mov rdi, [rsp+0A8h+var_28] call js_poll_interrupts cmp eax, 0 jz short loc_C006C jmp short loc_C00BA loc_C006C: jmp loc_BFFD6 loc_C0071: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call JS_FreeValue mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_48] mov rdx, [rsp+0A8h+var_40] call JS_FreeValue mov edi, [rsp+0A8h+var_6C] call js_bool mov [rsp+0A8h+var_10], rax mov [rsp+0A8h+var_8], rdx jmp short loc_C00FF loc_C00BA: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call JS_FreeValue mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_48] mov rdx, [rsp+0A8h+var_40] call JS_FreeValue mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 loc_C00FF: mov rax, [rsp+0A8h+var_10] mov rdx, [rsp+0A8h+var_8] add rsp, 0A8h retn
long long js_object_isPrototypeOf( long long a1, _DWORD *a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long *a13) { long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // rdx long long v19; // rdx long long v20; // rdx _DWORD *PrototypeFree; // [rsp+8h] [rbp-A0h] _DWORD *v23; // [rsp+28h] [rbp-80h] int v24; // [rsp+3Ch] [rbp-6Ch] _DWORD *v25; // [rsp+40h] [rbp-68h] long long v26; // [rsp+48h] [rbp-60h] _DWORD *v27; // [rsp+50h] [rbp-58h] long long v28; // [rsp+58h] [rbp-50h] long long v29; // [rsp+68h] [rbp-40h] long long v31; // [rsp+98h] [rbp-10h] v25 = (_DWORD *)*a13; v26 = a13[1]; if ( JS_IsObject(*a13, v26) ) { v23 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, v16, v17, a10, a11, v13, v14, v15); v29 = v18; if ( JS_IsException_1((long long)v23, v18) ) { LODWORD(v31) = 0; } else { v27 = js_dup(v25, v26); v28 = v19; do { PrototypeFree = JS_GetPrototypeFree(a1, (long long)v27, v28); v27 = PrototypeFree; v28 = v20; if ( JS_IsException_1((long long)PrototypeFree, v20) ) break; if ( JS_IsNull_0((long long)PrototypeFree, v28) ) { v24 = 0; LABEL_13: JS_FreeValue(a1, (long long)PrototypeFree, v28); JS_FreeValue(a1, (long long)v23, v29); return js_bool(v24); } if ( v23 == PrototypeFree ) { v24 = 1; goto LABEL_13; } } while ( !(unsigned int)js_poll_interrupts(a1) ); JS_FreeValue(a1, (long long)PrototypeFree, v28); JS_FreeValue(a1, (long long)v23, v29); LODWORD(v31) = 0; } } else { LODWORD(v31) = 0; } return v31; }
js_object_isPrototypeOf: SUB RSP,0xa8 MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x80],RDI MOV dword ptr [RSP + 0x7c],ECX MOV qword ptr [RSP + 0x70],R8 MOV RAX,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x40],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00129cb0 CMP EAX,0x0 JNZ 0x001bff3e MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x1 JMP 0x001c00ff LAB_001bff3e: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x001364b0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001bffa9 MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 JMP 0x001c00ff LAB_001bffa9: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00120410 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x58],RAX LAB_001bffd6: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x0015efa0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001c0024 JMP 0x001c00ba LAB_001c0024: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x0012cf80 CMP EAX,0x0 JZ 0x001c0042 MOV dword ptr [RSP + 0x3c],0x0 JMP 0x001c0071 LAB_001c0042: MOV RAX,qword ptr [RSP + 0x60] CMP RAX,qword ptr [RSP + 0x50] JNZ 0x001c0058 MOV dword ptr [RSP + 0x3c],0x1 JMP 0x001c0071 LAB_001c0058: MOV RDI,qword ptr [RSP + 0x80] CALL 0x0015f000 CMP EAX,0x0 JZ 0x001c006c JMP 0x001c00ba LAB_001c006c: JMP 0x001bffd6 LAB_001c0071: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x001229d0 MOV EDI,dword ptr [RSP + 0x3c] CALL 0x00155f90 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX JMP 0x001c00ff LAB_001c00ba: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x001229d0 MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 LAB_001c00ff: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
int1 [16] js_object_isPrototypeOf (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int8 uVar1; int iVar2; long lVar4; int8 uVar6; int1 auVar7 [16]; int4 local_6c; int8 local_58; int8 local_50; int4 local_10; int4 uStack_c; int8 local_8; long lVar3; int8 uVar5; uVar6 = *param_5; uVar1 = param_5[1]; iVar2 = JS_IsObject(uVar6,uVar1); if (iVar2 == 0) { local_10 = 0; local_8 = 1; } else { auVar7 = JS_ToObject(param_1,param_2,param_3); uVar5 = auVar7._8_8_; lVar3 = auVar7._0_8_; iVar2 = JS_IsException(lVar3,uVar5); if (iVar2 == 0) { auVar7 = js_dup(uVar6,uVar1); do { local_50 = auVar7._8_8_; local_58 = auVar7._0_8_; auVar7 = JS_GetPrototypeFree(param_1,local_58,local_50); uVar6 = auVar7._8_8_; lVar4 = auVar7._0_8_; iVar2 = JS_IsException(lVar4,uVar6); if (iVar2 != 0) break; iVar2 = JS_IsNull(lVar4,uVar6); if (iVar2 != 0) { local_6c = 0; LAB_001c0071: JS_FreeValue(param_1,lVar4,uVar6); JS_FreeValue(param_1,lVar3,uVar5); auVar7 = js_bool(local_6c); local_8 = auVar7._8_8_; local_10 = auVar7._0_4_; uStack_c = auVar7._4_4_; goto LAB_001c00ff; } if (lVar3 == lVar4) { local_6c = 1; goto LAB_001c0071; } iVar2 = js_poll_interrupts(param_1); } while (iVar2 == 0); JS_FreeValue(param_1,lVar4,uVar6); JS_FreeValue(param_1,lVar3,uVar5); local_10 = 0; local_8 = 6; } else { local_10 = 0; local_8 = 6; } } LAB_001c00ff: auVar7._4_4_ = uStack_c; auVar7._0_4_ = local_10; auVar7._8_8_ = local_8; return auVar7; }
34,815
js_object_isPrototypeOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_isPrototypeOf(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, v1; JSValue v; int res; v = argv[0]; if (!JS_IsObject(v)) return JS_FALSE; obj = JS_ToObject(ctx, this_val); if (JS_IsException(obj)) return JS_EXCEPTION; v1 = js_dup(v); for(;;) { v1 = JS_GetPrototypeFree(ctx, v1); if (JS_IsException(v1)) goto exception; if (JS_IsNull(v1)) { res = FALSE; break; } if (JS_VALUE_GET_OBJ(obj) == JS_VALUE_GET_OBJ(v1)) { res = TRUE; break; } /* avoid infinite loop (possible with proxies) */ if (js_poll_interrupts(ctx)) goto exception; } JS_FreeValue(ctx, v1); JS_FreeValue(ctx, obj); return js_bool(res); exception: JS_FreeValue(ctx, v1); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
js_object_isPrototypeOf: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x8(%r8), %r13 movl $0x1, %r15d cmpl $-0x1, %r13d jne 0x72f99 movq %rdi, %r12 movq (%r8), %rbp callq 0x268d8 cmpl $0x6, %edx je 0x72fbf movq %rax, %r14 movq %rdx, (%rsp) incl (%rbp) movq %r12, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x3de50 movq %rax, %rbp movq %rdx, %r13 movl %r13d, %ebx cmpq $0x6, %rbx je 0x72f6a cmpq $0x2, %rbx je 0x72fd9 cmpq %rbp, %r14 je 0x72fd9 movl 0x1d8(%r12), %eax leal -0x1(%rax), %ecx movl %ecx, 0x1d8(%r12) cmpl $0x1, %eax jg 0x72f16 movq %r12, %rdi callq 0x3de9f testl %eax, %eax je 0x72f16 movq 0x18(%r12), %rdi cmpl $-0x9, %r13d jb 0x72f9d movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax movq (%rsp), %rbx jg 0x72fa1 movq %rbp, %rsi movq %r13, %rdx callq 0x20d90 movq 0x18(%r12), %rdi jmp 0x72fa1 xorl %eax, %eax jmp 0x72fc7 movq (%rsp), %rbx cmpl $-0x9, %ebx jb 0x72fbf movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x72fbf movq %r14, %rsi movq %rbx, %rdx callq 0x20d90 xorl %eax, %eax movl $0x6, %r15d movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x18(%r12), %rdi cmpl $-0x9, %r13d jb 0x73002 movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x73002 movq %rbp, %rsi movq %r13, %rdx callq 0x20d90 movq 0x18(%r12), %rdi cmpl $-0x9, (%rsp) jb 0x73022 movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x73022 movq %r14, %rsi movq (%rsp), %rdx callq 0x20d90 xorl %eax, %eax cmpq $0x2, %rbx setne %al jmp 0x72fc7
js_object_isPrototypeOf: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r13, [r8+8] mov r15d, 1 cmp r13d, 0FFFFFFFFh jnz loc_72F99 mov r12, rdi mov rbp, [r8] call JS_ToObject cmp edx, 6 jz loc_72FBF mov r14, rax mov [rsp+38h+var_38], rdx inc dword ptr [rbp+0] loc_72F16: mov rdi, r12 mov rsi, rbp mov rdx, r13 call JS_GetPrototypeFree mov rbp, rax mov r13, rdx mov ebx, r13d cmp rbx, 6 jz short loc_72F6A cmp rbx, 2 jz loc_72FD9 cmp r14, rbp jz loc_72FD9 mov eax, [r12+1D8h] lea ecx, [rax-1] mov [r12+1D8h], ecx cmp eax, 1 jg short loc_72F16 mov rdi, r12 call __js_poll_interrupts test eax, eax jz short loc_72F16 loc_72F6A: mov rdi, [r12+18h] cmp r13d, 0FFFFFFF7h jb short loc_72F9D mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 mov rbx, [rsp+38h+var_38] jg short loc_72FA1 mov rsi, rbp mov rdx, r13 call js_free_value_rt mov rdi, [r12+18h] jmp short loc_72FA1 loc_72F99: xor eax, eax jmp short loc_72FC7 loc_72F9D: mov rbx, [rsp+38h+var_38] loc_72FA1: cmp ebx, 0FFFFFFF7h jb short loc_72FBF mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_72FBF mov rsi, r14 mov rdx, rbx call js_free_value_rt loc_72FBF: xor eax, eax mov r15d, 6 loc_72FC7: mov rdx, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72FD9: mov rdi, [r12+18h] cmp r13d, 0FFFFFFF7h jb short loc_73002 mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg short loc_73002 mov rsi, rbp mov rdx, r13 call js_free_value_rt mov rdi, [r12+18h] loc_73002: cmp dword ptr [rsp+38h+var_38], 0FFFFFFF7h jb short loc_73022 mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_73022 mov rsi, r14 mov rdx, [rsp+38h+var_38] call js_free_value_rt loc_73022: xor eax, eax cmp rbx, 2 setnz al jmp short loc_72FC7
_BOOL8 js_object_isPrototypeOf( 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) { long long v14; // r13 _QWORD *v16; // rbp long long v17; // rax long long v18; // rdx _QWORD *v19; // r14 _DWORD *PrototypeFree; // rax long long v21; // rdx long long v22; // r8 long long v23; // r9 double v24; // xmm4_8 double v25; // xmm5_8 long long v26; // rbx int v27; // eax long long v28; // rdi int v29; // eax long long v30; // rcx long long v31; // rbx int v33; // eax long long v34; // rcx long long v35; // rdi int v36; // eax long long v37; // rcx int v38; // eax long long v39; // rcx long long v40; // [rsp+0h] [rbp-38h] v14 = a5[1]; if ( (_DWORD)v14 != -1 ) return 0LL; v16 = (_QWORD *)*a5; v17 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( (_DWORD)v18 == 6 ) return 0LL; v19 = (_QWORD *)v17; v40 = v18; ++*(_DWORD *)v16; while ( 1 ) { PrototypeFree = (_DWORD *)JS_GetPrototypeFree(a1, v16, v14); v16 = PrototypeFree; v14 = v21; v26 = (unsigned int)v21; if ( (unsigned int)v21 == 6LL ) { LABEL_9: v28 = *(_QWORD *)(a1 + 24); if ( (unsigned int)v14 < 0xFFFFFFF7 ) { v31 = v40; } else { v29 = *(_DWORD *)v16; v30 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v30; v31 = v40; if ( v29 <= 1 ) { js_free_value_rt(v28, v16, v14, v30, v22, v23); v28 = *(_QWORD *)(a1 + 24); } } if ( (unsigned int)v31 >= 0xFFFFFFF7 ) { v33 = *(_DWORD *)v19; v34 = (unsigned int)(*(_DWORD *)v19 - 1); *(_DWORD *)v19 = v34; if ( v33 <= 1 ) js_free_value_rt(v28, v19, v31, v34, v22, v23); } return 0LL; } if ( (unsigned int)v21 == 2LL || v19 == (_QWORD *)PrototypeFree ) break; v27 = *(_DWORD *)(a1 + 472); *(_DWORD *)(a1 + 472) = v27 - 1; if ( v27 <= 1 && (unsigned int)_js_poll_interrupts(a1, a7, a8, a9, a10, v24, v25, a13, a14) ) goto LABEL_9; } v35 = *(_QWORD *)(a1 + 24); if ( (unsigned int)v21 >= 0xFFFFFFF7 ) { v36 = *PrototypeFree; v37 = (unsigned int)(v36 - 1); *(_DWORD *)v16 = v37; if ( v36 <= 1 ) { js_free_value_rt(v35, v16, v21, v37, v22, v23); v35 = *(_QWORD *)(a1 + 24); } } if ( (unsigned int)v40 >= 0xFFFFFFF7 ) { v38 = *(_DWORD *)v19; v39 = (unsigned int)(*(_DWORD *)v19 - 1); *(_DWORD *)v19 = v39; if ( v38 <= 1 ) js_free_value_rt(v35, v19, v40, v39, v22, v23); } return v26 != 2; }
js_object_isPrototypeOf: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,qword ptr [R8 + 0x8] MOV R15D,0x1 CMP R13D,-0x1 JNZ 0x00172f99 MOV R12,RDI MOV RBP,qword ptr [R8] CALL 0x001268d8 CMP EDX,0x6 JZ 0x00172fbf MOV R14,RAX MOV qword ptr [RSP],RDX INC dword ptr [RBP] LAB_00172f16: MOV RDI,R12 MOV RSI,RBP MOV RDX,R13 CALL 0x0013de50 MOV RBP,RAX MOV R13,RDX MOV EBX,R13D CMP RBX,0x6 JZ 0x00172f6a CMP RBX,0x2 JZ 0x00172fd9 CMP R14,RBP JZ 0x00172fd9 MOV EAX,dword ptr [R12 + 0x1d8] LEA ECX,[RAX + -0x1] MOV dword ptr [R12 + 0x1d8],ECX CMP EAX,0x1 JG 0x00172f16 MOV RDI,R12 CALL 0x0013de9f TEST EAX,EAX JZ 0x00172f16 LAB_00172f6a: MOV RDI,qword ptr [R12 + 0x18] CMP R13D,-0x9 JC 0x00172f9d MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 MOV RBX,qword ptr [RSP] JG 0x00172fa1 MOV RSI,RBP MOV RDX,R13 CALL 0x00120d90 MOV RDI,qword ptr [R12 + 0x18] JMP 0x00172fa1 LAB_00172f99: XOR EAX,EAX JMP 0x00172fc7 LAB_00172f9d: MOV RBX,qword ptr [RSP] LAB_00172fa1: CMP EBX,-0x9 JC 0x00172fbf MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00172fbf MOV RSI,R14 MOV RDX,RBX CALL 0x00120d90 LAB_00172fbf: XOR EAX,EAX MOV R15D,0x6 LAB_00172fc7: MOV RDX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00172fd9: MOV RDI,qword ptr [R12 + 0x18] CMP R13D,-0x9 JC 0x00173002 MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00173002 MOV RSI,RBP MOV RDX,R13 CALL 0x00120d90 MOV RDI,qword ptr [R12 + 0x18] LAB_00173002: CMP dword ptr [RSP],-0x9 JC 0x00173022 MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00173022 MOV RSI,R14 MOV RDX,qword ptr [RSP] CALL 0x00120d90 LAB_00173022: XOR EAX,EAX CMP RBX,0x2 SETNZ AL JMP 0x00172fc7
bool js_object_isPrototypeOf(long param_1) { int iVar1; int *piVar2; uint uVar4; ulong uVar6; int8 uVar7; int8 *in_R8; int1 auVar8 [16]; int1 auVar9 [16]; int *piVar3; ulong uVar5; if ((int)in_R8[1] == -1) { piVar3 = (int *)*in_R8; auVar9._8_8_ = in_R8[1]; auVar9._0_8_ = piVar3; auVar8 = JS_ToObject(); piVar2 = auVar8._0_8_; uVar4 = auVar8._8_4_; if (uVar4 != 6) { *piVar3 = *piVar3 + 1; do { auVar9 = JS_GetPrototypeFree(param_1,auVar9._0_8_,auVar9._8_8_); uVar5 = auVar9._8_8_; piVar3 = auVar9._0_8_; uVar6 = uVar5 & 0xffffffff; if (uVar6 == 6) break; if ((uVar6 == 2) || (piVar2 == piVar3)) { uVar7 = *(int8 *)(param_1 + 0x18); if ((0xfffffff6 < auVar9._8_4_) && (iVar1 = *piVar3, *piVar3 = iVar1 + -1, iVar1 < 2)) { js_free_value_rt(uVar7,piVar3,uVar5); uVar7 = *(int8 *)(param_1 + 0x18); } if ((0xfffffff6 < uVar4) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 < 2)) { js_free_value_rt(uVar7,piVar2,auVar8._8_8_); } return uVar6 != 2; } iVar1 = *(int *)(param_1 + 0x1d8); *(int *)(param_1 + 0x1d8) = iVar1 + -1; } while ((1 < iVar1) || (iVar1 = __js_poll_interrupts(param_1), iVar1 == 0)); uVar7 = *(int8 *)(param_1 + 0x18); if ((0xfffffff6 < auVar9._8_4_) && (iVar1 = *piVar3, *piVar3 = iVar1 + -1, iVar1 < 2)) { js_free_value_rt(uVar7,piVar3,uVar5); uVar7 = *(int8 *)(param_1 + 0x18); } if ((0xfffffff6 < uVar4) && (iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 < 2)) { js_free_value_rt(uVar7,piVar2,auVar8._8_8_); } } } return false; }
34,816
ma_scan_init_block_record
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_scan_init_block_record(MARIA_HA *info) { MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("_ma_scan_init_block_record"); DBUG_ASSERT(info->dfile.file == share->bitmap.file.file); /* bitmap_buff may already be allocated if this is the second call to rnd_init() without a rnd_end() in between, see sql/handler.h */ if (!(info->scan.bitmap_buff || ((info->scan.bitmap_buff= (uchar *) my_malloc(PSI_INSTRUMENT_ME, share->block_size * 2, flag))))) DBUG_RETURN(1); info->scan.page_buff= info->scan.bitmap_buff + share->block_size; info->scan.bitmap_end= info->scan.bitmap_buff + share->bitmap.max_total_size; /* Set scan variables to get _ma_scan_block() to start with reading bitmap */ info->scan.number_of_rows= 0; info->scan.bitmap_pos= info->scan.bitmap_end; info->scan.bitmap_page= (pgcache_page_no_t) 0 - share->bitmap.pages_covered; info->scan.max_page= share->state.state.data_file_length / share->block_size; /* We need to flush what's in memory (bitmap.map) to page cache otherwise, as we are going to read bitmaps from page cache in table scan (see _ma_scan_block_record()), we may miss recently inserted rows (bitmap page in page cache would be too old). */ DBUG_RETURN(_ma_bitmap_flush(info->s)); }
O3
c
ma_scan_init_block_record: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq (%rdi), %r14 movq 0x220(%rdi), %rax movq %r14, %rdi testq %rax, %rax jne 0x5e78d xorl %edx, %edx cmpb $0x0, 0x7d9(%r14) setne %dl shll $0x10, %edx orq $0x10, %rdx movl 0x7bc(%r14), %esi addl %esi, %esi xorl %edi, %edi callq 0x9fdb1 movq %rax, 0x220(%rbx) testq %rax, %rax je 0x5e7f0 movq (%rbx), %rdi movl 0x7bc(%r14), %ecx addq %rax, %rcx movq %rcx, 0x238(%rbx) movl 0xb3c(%r14), %ecx addq %rax, %rcx movq %rcx, 0x230(%rbx) movl $0x0, 0x268(%rbx) movq %rcx, 0x228(%rbx) xorl %eax, %eax subq 0xb48(%r14), %rax movq %rax, 0x250(%rbx) movq 0x40(%r14), %rax movl 0x7bc(%r14), %ecx xorl %edx, %edx divq %rcx movq %rax, 0x258(%rbx) popq %rbx popq %r14 popq %rbp jmp 0x3fb35 movb $0x1, %al popq %rbx popq %r14 popq %rbp retq
_ma_scan_init_block_record: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov r14, [rdi] mov rax, [rdi+220h] mov rdi, r14 test rax, rax jnz short loc_5E78D xor edx, edx cmp byte ptr [r14+7D9h], 0 setnz dl shl edx, 10h or rdx, 10h mov esi, [r14+7BCh] add esi, esi xor edi, edi call my_malloc mov [rbx+220h], rax test rax, rax jz short loc_5E7F0 mov rdi, [rbx] loc_5E78D: mov ecx, [r14+7BCh] add rcx, rax mov [rbx+238h], rcx mov ecx, [r14+0B3Ch] add rcx, rax mov [rbx+230h], rcx mov dword ptr [rbx+268h], 0 mov [rbx+228h], rcx xor eax, eax sub rax, [r14+0B48h] mov [rbx+250h], rax mov rax, [r14+40h] mov ecx, [r14+7BCh] xor edx, edx div rcx mov [rbx+258h], rax pop rbx pop r14 pop rbp jmp _ma_bitmap_flush loc_5E7F0: mov al, 1 pop rbx pop r14 pop rbp retn
long long ma_scan_init_block_record(long long a1) { long long v2; // r14 long long v3; // rax long long v4; // rdi long long v5; // rcx v2 = *(_QWORD *)a1; v3 = *(_QWORD *)(a1 + 544); v4 = *(_QWORD *)a1; if ( v3 ) goto LABEL_4; v3 = my_malloc( 0LL, (unsigned int)(2 * *(_DWORD *)(v2 + 1980)), ((unsigned __int8)(*(_BYTE *)(v2 + 2009) != 0) << 16) | 0x10LL); *(_QWORD *)(a1 + 544) = v3; if ( v3 ) { v4 = *(_QWORD *)a1; LABEL_4: *(_QWORD *)(a1 + 568) = v3 + *(unsigned int *)(v2 + 1980); v5 = v3 + *(unsigned int *)(v2 + 2876); *(_QWORD *)(a1 + 560) = v5; *(_DWORD *)(a1 + 616) = 0; *(_QWORD *)(a1 + 552) = v5; *(_QWORD *)(a1 + 592) = -*(_QWORD *)(v2 + 2888); *(_QWORD *)(a1 + 600) = *(_QWORD *)(v2 + 64) / (unsigned long long)*(unsigned int *)(v2 + 1980); return ma_bitmap_flush(v4); } return 1LL; }
_ma_scan_init_block_record: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x220] MOV RDI,R14 TEST RAX,RAX JNZ 0x0015e78d XOR EDX,EDX CMP byte ptr [R14 + 0x7d9],0x0 SETNZ DL SHL EDX,0x10 OR RDX,0x10 MOV ESI,dword ptr [R14 + 0x7bc] ADD ESI,ESI XOR EDI,EDI CALL 0x0019fdb1 MOV qword ptr [RBX + 0x220],RAX TEST RAX,RAX JZ 0x0015e7f0 MOV RDI,qword ptr [RBX] LAB_0015e78d: MOV ECX,dword ptr [R14 + 0x7bc] ADD RCX,RAX MOV qword ptr [RBX + 0x238],RCX MOV ECX,dword ptr [R14 + 0xb3c] ADD RCX,RAX MOV qword ptr [RBX + 0x230],RCX MOV dword ptr [RBX + 0x268],0x0 MOV qword ptr [RBX + 0x228],RCX XOR EAX,EAX SUB RAX,qword ptr [R14 + 0xb48] MOV qword ptr [RBX + 0x250],RAX MOV RAX,qword ptr [R14 + 0x40] MOV ECX,dword ptr [R14 + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBX + 0x258],RAX POP RBX POP R14 POP RBP JMP 0x0013fb35 LAB_0015e7f0: MOV AL,0x1 POP RBX POP R14 POP RBP RET
int8 _ma_scan_init_block_record(long *param_1) { long lVar1; long lVar2; int8 uVar3; long lVar4; lVar1 = *param_1; lVar2 = param_1[0x44]; lVar4 = lVar1; if (lVar2 == 0) { lVar2 = my_malloc(0,*(int *)(lVar1 + 0x7bc) * 2, (ulong)(*(char *)(lVar1 + 0x7d9) != '\0') << 0x10 | 0x10); param_1[0x44] = lVar2; if (lVar2 == 0) { return 1; } lVar4 = *param_1; } param_1[0x47] = (ulong)*(uint *)(lVar1 + 0x7bc) + lVar2; lVar2 = (ulong)*(uint *)(lVar1 + 0xb3c) + lVar2; param_1[0x46] = lVar2; *(int4 *)(param_1 + 0x4d) = 0; param_1[0x45] = lVar2; param_1[0x4a] = -*(long *)(lVar1 + 0xb48); param_1[0x4b] = *(ulong *)(lVar1 + 0x40) / (ulong)*(uint *)(lVar1 + 0x7bc); uVar3 = _ma_bitmap_flush(lVar4); return uVar3; }
34,817
mi_check_status
eloqsql/storage/myisam/mi_locking.c
my_bool mi_check_status(void *param) { MI_INFO *info=(MI_INFO*) param; DBUG_ENTER("mi_check_status"); DBUG_PRINT("info",("dellink: %ld r_locks: %u w_locks: %u", (long) info->s->state.dellink, (uint) info->s->r_locks, (uint) info->s->w_locks)); /* The test for w_locks == 1 is here because this thread has already done an external lock (in other words: w_locks == 1 means no other threads has a write lock) */ DBUG_RETURN((my_bool) !(info->s->state.dellink == HA_OFFSET_ERROR || (myisam_concurrent_insert == 2 && info->s->r_locks && info->s->w_locks == 1))); }
O0
c
mi_check_status: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0xb2db2 jmp 0xb2db4 movq -0x10(%rbp), %rax movq (%rax), %rcx movb $0x1, %al cmpq $-0x1, 0x58(%rcx) movb %al, -0x11(%rbp) je 0xb2e08 xorl %eax, %eax leaq 0x217740(%rip), %rcx # 0x2ca510 cmpq $0x2, (%rcx) movb %al, -0x12(%rbp) jne 0xb2e02 movq -0x10(%rbp), %rax movq (%rax), %rcx xorl %eax, %eax cmpl $0x0, 0x364(%rcx) movb %al, -0x12(%rbp) je 0xb2e02 movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x1, 0x360(%rax) sete %al movb %al, -0x12(%rbp) movb -0x12(%rbp), %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movb %al, -0x13(%rbp) movb -0x13(%rbp), %al popq %rbp retq nopw (%rax,%rax)
mi_check_status: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short $+2 loc_B2DB2: jmp short $+2 loc_B2DB4: mov rax, [rbp+var_10] mov rcx, [rax] mov al, 1 cmp qword ptr [rcx+58h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_11], al jz short loc_B2E08 xor eax, eax lea rcx, myisam_concurrent_insert cmp qword ptr [rcx], 2 mov [rbp+var_12], al jnz short loc_B2E02 mov rax, [rbp+var_10] mov rcx, [rax] xor eax, eax cmp dword ptr [rcx+364h], 0 mov [rbp+var_12], al jz short loc_B2E02 mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+360h], 1 setz al mov [rbp+var_12], al loc_B2E02: mov al, [rbp+var_12] mov [rbp+var_11], al loc_B2E08: mov al, [rbp+var_11] xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_13], al mov al, [rbp+var_13] pop rbp retn
_BOOL8 mi_check_status(long long a1) { bool v2; // [rsp+2h] [rbp-12h] char v3; // [rsp+3h] [rbp-11h] v3 = 1; if ( *(_QWORD *)(*(_QWORD *)a1 + 88LL) != -1LL ) { v2 = 0; if ( myisam_concurrent_insert == 2LL ) { v2 = 0; if ( *(_DWORD *)(*(_QWORD *)a1 + 868LL) ) v2 = *(_DWORD *)(*(_QWORD *)a1 + 864LL) == 1; } v3 = v2; } return (v3 & 1) == 0; }
mi_check_status: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001b2db2 LAB_001b2db2: JMP 0x001b2db4 LAB_001b2db4: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV AL,0x1 CMP qword ptr [RCX + 0x58],-0x1 MOV byte ptr [RBP + -0x11],AL JZ 0x001b2e08 XOR EAX,EAX LEA RCX,[0x3ca510] CMP qword ptr [RCX],0x2 MOV byte ptr [RBP + -0x12],AL JNZ 0x001b2e02 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] XOR EAX,EAX CMP dword ptr [RCX + 0x364],0x0 MOV byte ptr [RBP + -0x12],AL JZ 0x001b2e02 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x360],0x1 SETZ AL MOV byte ptr [RBP + -0x12],AL LAB_001b2e02: MOV AL,byte ptr [RBP + -0x12] MOV byte ptr [RBP + -0x11],AL LAB_001b2e08: MOV AL,byte ptr [RBP + -0x11] XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x13],AL MOV AL,byte ptr [RBP + -0x13] POP RBP RET
byte mi_check_status(long *param_1) { int1 local_1a; int1 local_19; local_19 = true; if (*(long *)(*param_1 + 0x58) != -1) { local_1a = false; if ((myisam_concurrent_insert == 2) && (local_1a = false, *(int *)(*param_1 + 0x364) != 0)) { local_1a = *(int *)(*param_1 + 0x360) == 1; } local_19 = local_1a; } return (local_19 ^ 0xffU) & 1; }
34,818
find_tail
eloqsql/storage/maria/ma_bitmap.c
static my_bool find_tail(MARIA_HA *info, uint length, uint position) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; MARIA_BITMAP_BLOCK *block; DBUG_ENTER("find_tail"); DBUG_ASSERT(length <= info->s->block_size - PAGE_OVERHEAD_SIZE(info->s)); /* Needed, as there is no error checking in dynamic_element */ if (allocate_dynamic(&info->bitmap_blocks, position)) DBUG_RETURN(1); block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *); /* We have to add DIR_ENTRY_SIZE to ensure we have space for the tail and it's directroy entry on the page */ while (allocate_tail(bitmap, length + DIR_ENTRY_SIZE, block)) if (move_to_next_bitmap(info, bitmap)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
find_tail: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) jmp 0x467a5 movq -0x10(%rbp), %rdi addq $0x2c0, %rdi # imm = 0x2C0 movl -0x18(%rbp), %esi callq 0xdbfd0 cmpb $0x0, %al je 0x467c4 jmp 0x467be movb $0x1, -0x1(%rbp) jmp 0x46815 movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax movl -0x18(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi movl -0x14(%rbp), %esi addl $0x4, %esi movq -0x28(%rbp), %rdx callq 0x46820 cmpb $0x0, %al je 0x4680f movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x45db0 cmpb $0x0, %al je 0x4680d jmp 0x46807 movb $0x1, -0x1(%rbp) jmp 0x46815 jmp 0x467dd jmp 0x46811 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
find_tail: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_20], rax jmp short $+2 loc_467A5: mov rdi, [rbp+var_10] add rdi, 2C0h mov esi, [rbp+var_18] call allocate_dynamic cmp al, 0 jz short loc_467C4 jmp short $+2 loc_467BE: mov [rbp+var_1], 1 jmp short loc_46815 loc_467C4: mov rax, [rbp+var_10] mov rax, [rax+2C0h] mov ecx, [rbp+var_18] imul rcx, 18h add rax, rcx mov [rbp+var_28], rax loc_467DD: mov rdi, [rbp+var_20] mov esi, [rbp+var_14] add esi, 4 mov rdx, [rbp+var_28] call allocate_tail cmp al, 0 jz short loc_4680F mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call move_to_next_bitmap cmp al, 0 jz short loc_4680D jmp short $+2 loc_46807: mov [rbp+var_1], 1 jmp short loc_46815 loc_4680D: jmp short loc_467DD loc_4680F: jmp short $+2 loc_46811: mov [rbp+var_1], 0 loc_46815: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char find_tail(long long *a1, int a2, unsigned int a3) { long long v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v5 = *a1 + 2576; if ( (unsigned __int8)allocate_dynamic(a1 + 88, a3) ) return 1; v4 = 24LL * a3 + a1[88]; while ( (unsigned __int8)allocate_tail(v5, (unsigned int)(a2 + 4), v4) ) { if ( move_to_next_bitmap(a1, v5) ) return 1; } return 0; }
find_tail: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX JMP 0x001467a5 LAB_001467a5: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2c0 MOV ESI,dword ptr [RBP + -0x18] CALL 0x001dbfd0 CMP AL,0x0 JZ 0x001467c4 JMP 0x001467be LAB_001467be: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146815 LAB_001467c4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] MOV ECX,dword ptr [RBP + -0x18] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_001467dd: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x14] ADD ESI,0x4 MOV RDX,qword ptr [RBP + -0x28] CALL 0x00146820 CMP AL,0x0 JZ 0x0014680f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00145db0 CMP AL,0x0 JZ 0x0014680d JMP 0x00146807 LAB_00146807: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146815 LAB_0014680d: JMP 0x001467dd LAB_0014680f: JMP 0x00146811 LAB_00146811: MOV byte ptr [RBP + -0x1],0x0 LAB_00146815: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 find_tail(long *param_1,int param_2,uint param_3) { long lVar1; long lVar2; char cVar3; lVar1 = *param_1; cVar3 = allocate_dynamic(param_1 + 0x58,param_3); if (cVar3 == '\0') { lVar2 = param_1[0x58]; do { cVar3 = allocate_tail(lVar1 + 0xa10,param_2 + 4,lVar2 + (ulong)param_3 * 0x18); if (cVar3 == '\0') { return 0; } cVar3 = move_to_next_bitmap(param_1,lVar1 + 0xa10); } while (cVar3 == '\0'); } return 1; }
34,819
JS_AddIntrinsicCallSite
bluesky950520[P]quickjs/quickjs.c
static void _JS_AddIntrinsicCallSite(JSContext *ctx) { JSRuntime *rt = ctx->rt; if (!JS_IsRegisteredClass(rt, JS_CLASS_CALL_SITE)) { init_class_range(rt, js_callsite_class_def, JS_CLASS_CALL_SITE, countof(js_callsite_class_def)); } ctx->class_proto[JS_CLASS_CALL_SITE] = JS_NewObject(ctx); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_CALL_SITE], js_callsite_proto_funcs, countof(js_callsite_proto_funcs)); }
O0
c
JS_AddIntrinsicCallSite: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rdi movl $0x3c, %esi callq 0x27f70 cmpl $0x0, %eax jne 0x559b6 movq 0x18(%rsp), %rdi leaq 0xde179(%rip), %rsi # 0x133b20 movl $0x3c, %edx movl $0x1, %ecx callq 0x21230 movq 0x20(%rsp), %rax movq 0x40(%rax), %rax movq %rax, (%rsp) movq 0x20(%rsp), %rdi callq 0x292b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rcx movq %rcx, 0x3c0(%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x3c8(%rax) movq 0x20(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x40(%rax), %rax movq 0x3c0(%rax), %rsi movq 0x3c8(%rax), %rdx leaq 0xde127(%rip), %rcx # 0x133b40 movl $0x7, %r8d callq 0x4b840 addq $0x28, %rsp retq nopl (%rax)
_JS_AddIntrinsicCallSite: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rax, [rsp+28h+var_8] mov rax, [rax+18h] mov [rsp+28h+var_10], rax mov rdi, [rsp+28h+var_10] mov esi, 3Ch ; '<' call JS_IsRegisteredClass cmp eax, 0 jnz short loc_559B6 mov rdi, [rsp+28h+var_10] lea rsi, js_callsite_class_def mov edx, 3Ch ; '<' mov ecx, 1 call init_class_range loc_559B6: mov rax, [rsp+28h+var_8] mov rax, [rax+40h] mov [rsp+28h+var_28], rax mov rdi, [rsp+28h+var_8] call JS_NewObject mov rcx, rax mov rax, [rsp+28h+var_28] mov [rsp+28h+var_20], rcx mov [rsp+28h+var_18], rdx mov rcx, [rsp+28h+var_20] mov [rax+3C0h], rcx mov rcx, [rsp+28h+var_18] mov [rax+3C8h], rcx mov rdi, [rsp+28h+var_8] mov rax, [rsp+28h+var_8] mov rax, [rax+40h] mov rsi, [rax+3C0h] mov rdx, [rax+3C8h] lea rcx, js_callsite_proto_funcs mov r8d, 7 call JS_SetPropertyFunctionList add rsp, 28h retn
long long JS_AddIntrinsicCallSite(long long a1) { long long v1; // rdx long long v3; // [rsp+0h] [rbp-28h] long long v4; // [rsp+18h] [rbp-10h] v4 = *(_QWORD *)(a1 + 24); if ( !JS_IsRegisteredClass(v4, 0x3Cu) ) init_class_range(v4, (long long)&js_callsite_class_def, 60, 1); v3 = *(_QWORD *)(a1 + 64); *(_QWORD *)(v3 + 960) = JS_NewObject(a1); *(_QWORD *)(v3 + 968) = v1; return JS_SetPropertyFunctionList( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 960LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 968LL), (long long)&js_callsite_proto_funcs, 7); }
_JS_AddIntrinsicCallSite: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x3c CALL 0x00127f70 CMP EAX,0x0 JNZ 0x001559b6 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x233b20] MOV EDX,0x3c MOV ECX,0x1 CALL 0x00121230 LAB_001559b6: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x001292b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],RDX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x3c0],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x3c8],RCX MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x3c0] MOV RDX,qword ptr [RAX + 0x3c8] LEA RCX,[0x233b40] MOV R8D,0x7 CALL 0x0014b840 ADD RSP,0x28 RET
void _JS_AddIntrinsicCallSite(long param_1) { int8 uVar1; long lVar2; int iVar3; int1 auVar4 [16]; uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = JS_IsRegisteredClass(uVar1,0x3c); if (iVar3 == 0) { init_class_range(uVar1,js_callsite_class_def,0x3c,1); } lVar2 = *(long *)(param_1 + 0x40); auVar4 = JS_NewObject(param_1); *(int1 (*) [16])(lVar2 + 0x3c0) = auVar4; JS_SetPropertyFunctionList (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x3c0), *(int8 *)(*(long *)(param_1 + 0x40) + 0x3c8),js_callsite_proto_funcs,7); return; }
34,820
ftxui::borderWith(ftxui::Pixel const&)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/border.cpp
Decorator borderWith(const Pixel& pixel) { return [pixel](Element child) { return std::make_shared<BorderPixel>(unpack(std::move(child)), pixel); }; }
O3
cpp
ftxui::borderWith(ftxui::Pixel const&): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx movzwl (%rsi), %eax leaq 0x8(%rsp), %rdi movw %ax, -0x8(%rdi) leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq 0x8(%rsi), %rsi movq 0x10(%r14), %rdx addq %rsi, %rdx callq 0x11be0 movq 0x28(%r14), %rax movq %rax, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) movl $0x30, %edi callq 0xb3e0 movq %rax, %r14 movzwl (%rsp), %eax movw %ax, (%r14) leaq 0x8(%r14), %rdi movq %r14, %rax addq $0x18, %rax movq %rax, 0x8(%r14) movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx addq %rsi, %rdx callq 0x11be0 movq 0x28(%rsp), %rax movq %rax, 0x28(%r14) movq %r14, (%rbx) leaq 0xc70(%rip), %rax # 0x2203e movq %rax, 0x18(%rbx) leaq 0xe7d(%rip), %rax # 0x22256 movq %rax, 0x10(%rbx) movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x213f4 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movl $0x30, %esi movq %r14, %rdi callq 0xb400 jmp 0x21416 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x2142d movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rdi callq 0xb780
_ZN5ftxui10borderWithERKNS_5PixelE: push r15 push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi movzx eax, word ptr [rsi] lea rdi, [rsp+48h+var_40] mov [rdi-8], ax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 mov rsi, [rsi+8] mov rdx, [r14+10h] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, [r14+28h] mov [r15+10h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax movzx eax, [rsp+48h+var_48] mov [r14], ax lea rdi, [r14+8] mov rax, r14 add rax, 18h mov [r14+8], rax mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_38] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, [rsp+48h+var_20] mov [r14+28h], rax mov [rbx], r14 lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEES3_EZNS1_10borderWithERKNS1_5PixelEE3$_0E9_M_invokeERKSt9_Any_dataOS3_; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::borderWith(ftxui::Pixel const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<ftxui::Node>&&) mov [rbx+18h], rax lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEES3_EZNS1_10borderWithERKNS1_5PixelEE3$_0E10_M_managerERSt9_Any_dataRKSA_St18_Manager_operation; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::borderWith(ftxui::Pixel const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rbx+10h], rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_213F4 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_213F4: mov rax, rbx add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax mov esi, 30h ; '0'; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_21416 mov rbx, rax loc_21416: mov rdi, [rsp+arg_0]; void * cmp rdi, r15 jz short loc_2142D mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2142D: mov rdi, rbx call __Unwind_Resume
long long ftxui::borderWith(long long a1, __int16 *a2) { long long v2; // r14 __int16 v4; // [rsp+0h] [rbp-48h] void *v5[2]; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-30h] BYREF long long v7; // [rsp+28h] [rbp-20h] v4 = *a2; v5[0] = v6; std::string::_M_construct<char *>((long long)v5, *((_BYTE **)a2 + 1), *((_QWORD *)a2 + 1) + *((_QWORD *)a2 + 2)); v7 = *((_QWORD *)a2 + 5); *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v2 = operator new(0x30uLL); *(_WORD *)v2 = v4; *(_QWORD *)(v2 + 8) = v2 + 24; std::string::_M_construct<char *>(v2 + 8, (_BYTE *)v5[0], (long long)v5[0] + (unsigned long long)v5[1]); *(_QWORD *)(v2 + 40) = v7; *(_QWORD *)a1 = v2; *(_QWORD *)(a1 + 24) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::borderWith(ftxui::Pixel const&)::$_0>::_M_invoke; *(_QWORD *)(a1 + 16) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>),ftxui::borderWith(ftxui::Pixel const&)::$_0>::_M_manager; if ( v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return a1; }
borderWith: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI MOVZX EAX,word ptr [RSI] LEA RDI,[RSP + 0x8] MOV word ptr [RDI + -0x8],AX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [RSI + 0x8] MOV RDX,qword ptr [R14 + 0x10] ADD RDX,RSI CALL 0x00111be0 MOV RAX,qword ptr [R14 + 0x28] MOV qword ptr [R15 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_00121385: MOV EDI,0x30 CALL 0x0010b3e0 MOV R14,RAX MOVZX EAX,word ptr [RSP] MOV word ptr [R14],AX LEA RDI,[R14 + 0x8] MOV RAX,R14 ADD RAX,0x18 MOV qword ptr [R14 + 0x8],RAX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] ADD RDX,RSI LAB_001213b6: CALL 0x00111be0 LAB_001213bb: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [R14 + 0x28],RAX MOV qword ptr [RBX],R14 LEA RAX,[0x12203e] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x122256] MOV qword ptr [RBX + 0x10],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x001213f4 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010b400 LAB_001213f4: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ftxui::borderWith(ftxui::Pixel const&) */ ftxui * __thiscall ftxui::borderWith(ftxui *this,Pixel *param_1) { int2 uVar1; int2 *puVar2; long *local_40; long local_38; long local_30 [2]; int8 local_20; uVar1 = *(int2 *)param_1; local_40 = local_30; std::__cxx11::string::_M_construct<char*> (&local_40,*(long *)(param_1 + 8),*(long *)(param_1 + 0x10) + *(long *)(param_1 + 8)); local_20 = *(int8 *)(param_1 + 0x28); *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 00121385 to 0012138e has its CatchHandler @ 00121413 */ puVar2 = (int2 *)operator_new(0x30); *puVar2 = uVar1; *(int2 **)(puVar2 + 4) = puVar2 + 0xc; /* try { // try from 001213b6 to 001213ba has its CatchHandler @ 00121401 */ std::__cxx11::string::_M_construct<char*>(puVar2 + 4,local_40,local_38 + (long)local_40); *(int8 *)(puVar2 + 0x14) = local_20; *(int2 **)this = puVar2; *(code **)(this + 0x18) = std:: _Function_handler<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>),ftxui::borderWith(ftxui::Pixel_const&)::$_0> ::_M_invoke; *(code **)(this + 0x10) = std:: _Function_handler<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>),ftxui::borderWith(ftxui::Pixel_const&)::$_0> ::_M_manager; if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } return this; }
34,821
ma_tls_connect
eloqsql/libmariadb/libmariadb/secure/openssl.c
my_bool ma_tls_connect(MARIADB_TLS *ctls) { SSL *ssl = (SSL *)ctls->ssl; my_bool blocking, try_connect= 1; MYSQL *mysql; MARIADB_PVIO *pvio; int rc; #ifdef OPENSSL_USE_BIOMETHOD BIO_METHOD *bio_method= NULL; BIO *bio; #endif mysql= (MYSQL *)SSL_get_app_data(ssl); pvio= mysql->net.pvio; /* Set socket to non blocking if not already set */ if (!(blocking= pvio->methods->is_blocking(pvio))) pvio->methods->blocking(pvio, FALSE, 0); SSL_clear(ssl); #ifdef OPENSSL_USE_BIOMETHOD bio= BIO_new(&ma_BIO_method); bio->ptr= pvio; SSL_set_bio(ssl, bio, bio); BIO_set_fd(bio, mysql_get_socket(mysql), BIO_NOCLOSE); #else SSL_set_fd(ssl, (int)mysql_get_socket(mysql)); #endif while (try_connect && (rc= SSL_connect(ssl)) == -1) { switch((SSL_get_error(ssl, rc))) { case SSL_ERROR_WANT_READ: if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1) try_connect= 0; break; case SSL_ERROR_WANT_WRITE: if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1) try_connect= 0; break; default: try_connect= 0; } } /* In case handshake failed or if a root certificate (ca) was specified, we need to check the result code of X509 verification. A detailed check of the peer certificate (hostname checking will follow later) */ if (rc != 1 || (mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) || (mysql->options.ssl_ca || mysql->options.ssl_capath)) { long x509_err= SSL_get_verify_result(ssl); if (x509_err != X509_V_OK) { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), X509_verify_cert_error_string(x509_err)); /* restore blocking mode */ if (!blocking) pvio->methods->blocking(pvio, FALSE, 0); return 1; } else if (rc != 1) { ma_tls_set_error(mysql); return 1; } } pvio->ctls->ssl= ctls->ssl= (void *)ssl; return 0; }
O3
c
ma_tls_connect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, -0x30(%rbp) movq 0x10(%rdi), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x13160 movq %rax, %r14 movq (%rax), %rbx movq 0x48(%rbx), %rax movq %rbx, %rdi callq *0x68(%rax) movl %eax, %r15d testb %al, %al jne 0x2b2e6 movq 0x48(%rbx), %rax movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq *0x38(%rax) movq %r12, %rdi callq 0x130b0 movq %r14, %rdi callq 0x1f80b movq %r12, %rdi movl %eax, %esi callq 0x132b0 movq %r12, %rdi callq 0x13660 cmpl $-0x1, %eax jne 0x2b340 movq %r12, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x13050 cmpl $0x3, %eax je 0x2b324 cmpl $0x2, %eax jne 0x2b38e movq 0x48(%rbx), %rax movl 0x390(%r14), %edx movq %rbx, %rdi movl $0x1, %esi callq *0x30(%rax) testl %eax, %eax jg 0x2b300 jmp 0x2b38e movl %eax, %r13d cmpl $0x1, %eax jne 0x2b38e testb $0x40, 0x36b(%r14) jne 0x2b366 cmpq $0x0, 0x410(%r14) jne 0x2b366 cmpq $0x0, 0x418(%r14) je 0x2b379 movq %r12, %rdi callq 0x13190 testq %rax, %rax jne 0x2b39b cmpl $0x1, %r13d jne 0x2b3eb movq -0x30(%rbp), %rax movq %r12, 0x10(%rax) movq 0x38(%rbx), %rax movq %r12, 0x10(%rax) xorl %r14d, %r14d jmp 0x2b3f6 movq %r12, %rdi callq 0x13190 testq %rax, %rax je 0x2b3eb leaq 0x228fe(%rip), %rcx # 0x4dca0 movq (%rcx), %r12 leaq 0x22904(%rip), %rcx # 0x4dcb0 movq 0xd0(%rcx), %r13 movq %rax, %rdi callq 0x132f0 movq %r14, %rdi movl $0x7ea, %esi # imm = 0x7EA movq %r12, %rdx movq %r13, %rcx movq %rax, %r8 xorl %eax, %eax callq 0x187cd movb $0x1, %r14b testb %r15b, %r15b jne 0x2b3f6 movq 0x48(%rbx), %rax movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq *0x38(%rax) jmp 0x2b3f6 movq %r14, %rdi callq 0x2b408 movb $0x1, %r14b movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_connect: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rdi mov r12, [rdi+10h] mov rdi, r12 xor esi, esi call _SSL_get_ex_data mov r14, rax mov rbx, [rax] mov rax, [rbx+48h] mov rdi, rbx call qword ptr [rax+68h] mov r15d, eax test al, al jnz short loc_2B2E6 mov rax, [rbx+48h] mov rdi, rbx xor esi, esi xor edx, edx call qword ptr [rax+38h] loc_2B2E6: mov rdi, r12 call _SSL_clear mov rdi, r14 call mysql_get_socket mov rdi, r12 mov esi, eax call _SSL_set_fd loc_2B300: mov rdi, r12 call _SSL_connect cmp eax, 0FFFFFFFFh jnz short loc_2B340 mov rdi, r12 mov esi, 0FFFFFFFFh call _SSL_get_error cmp eax, 3 jz short loc_2B324 cmp eax, 2 jnz short loc_2B38E loc_2B324: mov rax, [rbx+48h] mov edx, [r14+390h] mov rdi, rbx mov esi, 1 call qword ptr [rax+30h] test eax, eax jg short loc_2B300 jmp short loc_2B38E loc_2B340: mov r13d, eax cmp eax, 1 jnz short loc_2B38E test byte ptr [r14+36Bh], 40h jnz short loc_2B366 cmp qword ptr [r14+410h], 0 jnz short loc_2B366 cmp qword ptr [r14+418h], 0 jz short loc_2B379 loc_2B366: mov rdi, r12 call _SSL_get_verify_result test rax, rax jnz short loc_2B39B cmp r13d, 1 jnz short loc_2B3EB loc_2B379: mov rax, [rbp+var_30] mov [rax+10h], r12 mov rax, [rbx+38h] mov [rax+10h], r12 xor r14d, r14d jmp short loc_2B3F6 loc_2B38E: mov rdi, r12 call _SSL_get_verify_result test rax, rax jz short loc_2B3EB loc_2B39B: lea rcx, SQLSTATE_UNKNOWN mov r12, [rcx] lea rcx, client_errors mov r13, [rcx+0D0h] mov rdi, rax call _X509_verify_cert_error_string mov rdi, r14 mov esi, 7EAh mov rdx, r12 mov rcx, r13 mov r8, rax xor eax, eax call my_set_error mov r14b, 1 test r15b, r15b jnz short loc_2B3F6 mov rax, [rbx+48h] mov rdi, rbx xor esi, esi xor edx, edx call qword ptr [rax+38h] jmp short loc_2B3F6 loc_2B3EB: mov rdi, r14 call ma_tls_set_error mov r14b, 1 loc_2B3F6: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_connect(long long a1) { long long v1; // r12 _QWORD *v2; // r14 long long v3; // rbx char v4; // r15 unsigned int socket; // eax int v6; // eax int error; // eax long long verify_result; // rax char *v9; // r12 char *v10; // r13 long long v11; // rax v1 = *(_QWORD *)(a1 + 16); v2 = (_QWORD *)SSL_get_ex_data(v1, 0LL); v3 = *v2; v4 = (*(long long ( **)(_QWORD))(*(_QWORD *)(*v2 + 72LL) + 104LL))(*v2); if ( !v4 ) (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v3 + 72) + 56LL))(v3, 0LL, 0LL); SSL_clear(v1); socket = mysql_get_socket(v2); SSL_set_fd(v1, socket); while ( 1 ) { v6 = SSL_connect(v1); if ( v6 != -1 ) break; error = SSL_get_error(v1, 0xFFFFFFFFLL); if ( error != 3 && error != 2 || (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v3 + 72) + 48LL))( v3, 1LL, *((unsigned int *)v2 + 228)) <= 0 ) { goto LABEL_15; } } if ( v6 == 1 ) { if ( (*((_BYTE *)v2 + 875) & 0x40) == 0 && !v2[130] && !v2[131] || (verify_result = SSL_get_verify_result(v1)) == 0 ) { *(_QWORD *)(a1 + 16) = v1; *(_QWORD *)(*(_QWORD *)(v3 + 56) + 16LL) = v1; LODWORD(v2) = 0; return (unsigned int)v2; } goto LABEL_16; } LABEL_15: verify_result = SSL_get_verify_result(v1); if ( !verify_result ) { ma_tls_set_error(v2); LOBYTE(v2) = 1; return (unsigned int)v2; } LABEL_16: v9 = SQLSTATE_UNKNOWN; v10 = client_errors[26]; v11 = X509_verify_cert_error_string(verify_result); my_set_error((long long)v2, 2026, (long long)v9, v10, v11); LOBYTE(v2) = 1; if ( !v4 ) (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v3 + 72) + 56LL))(v3, 0LL, 0LL); return (unsigned int)v2; }
ma_tls_connect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RDI MOV R12,qword ptr [RDI + 0x10] MOV RDI,R12 XOR ESI,ESI CALL 0x00113160 MOV R14,RAX MOV RBX,qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x48] MOV RDI,RBX CALL qword ptr [RAX + 0x68] MOV R15D,EAX TEST AL,AL JNZ 0x0012b2e6 MOV RAX,qword ptr [RBX + 0x48] MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL qword ptr [RAX + 0x38] LAB_0012b2e6: MOV RDI,R12 CALL 0x001130b0 MOV RDI,R14 CALL 0x0011f80b MOV RDI,R12 MOV ESI,EAX CALL 0x001132b0 LAB_0012b300: MOV RDI,R12 CALL 0x00113660 CMP EAX,-0x1 JNZ 0x0012b340 MOV RDI,R12 MOV ESI,0xffffffff CALL 0x00113050 CMP EAX,0x3 JZ 0x0012b324 CMP EAX,0x2 JNZ 0x0012b38e LAB_0012b324: MOV RAX,qword ptr [RBX + 0x48] MOV EDX,dword ptr [R14 + 0x390] MOV RDI,RBX MOV ESI,0x1 CALL qword ptr [RAX + 0x30] TEST EAX,EAX JG 0x0012b300 JMP 0x0012b38e LAB_0012b340: MOV R13D,EAX CMP EAX,0x1 JNZ 0x0012b38e TEST byte ptr [R14 + 0x36b],0x40 JNZ 0x0012b366 CMP qword ptr [R14 + 0x410],0x0 JNZ 0x0012b366 CMP qword ptr [R14 + 0x418],0x0 JZ 0x0012b379 LAB_0012b366: MOV RDI,R12 CALL 0x00113190 TEST RAX,RAX JNZ 0x0012b39b CMP R13D,0x1 JNZ 0x0012b3eb LAB_0012b379: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x10],R12 MOV RAX,qword ptr [RBX + 0x38] MOV qword ptr [RAX + 0x10],R12 XOR R14D,R14D JMP 0x0012b3f6 LAB_0012b38e: MOV RDI,R12 CALL 0x00113190 TEST RAX,RAX JZ 0x0012b3eb LAB_0012b39b: LEA RCX,[0x14dca0] MOV R12,qword ptr [RCX] LEA RCX,[0x14dcb0] MOV R13,qword ptr [RCX + 0xd0] MOV RDI,RAX CALL 0x001132f0 MOV RDI,R14 MOV ESI,0x7ea MOV RDX,R12 MOV RCX,R13 MOV R8,RAX XOR EAX,EAX CALL 0x001187cd MOV R14B,0x1 TEST R15B,R15B JNZ 0x0012b3f6 MOV RAX,qword ptr [RBX + 0x48] MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL qword ptr [RAX + 0x38] JMP 0x0012b3f6 LAB_0012b3eb: MOV RDI,R14 CALL 0x0012b408 MOV R14B,0x1 LAB_0012b3f6: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong ma_tls_connect(long param_1) { SSL *ssl; long lVar1; int *puVar2; int *puVar3; char cVar4; int iVar5; long *plVar6; long n; char *pcVar7; int7 uVar9; ulong uVar8; ssl = *(SSL **)(param_1 + 0x10); plVar6 = (long *)SSL_get_ex_data(ssl,0); lVar1 = *plVar6; cVar4 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x68))(lVar1); if (cVar4 == '\0') { (**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0); } SSL_clear(ssl); iVar5 = mysql_get_socket(plVar6); SSL_set_fd(ssl,iVar5); while( true ) { iVar5 = SSL_connect(ssl); uVar9 = (int7)((ulong)plVar6 >> 8); if (iVar5 != -1) break; iVar5 = SSL_get_error(ssl,-1); if (((iVar5 != 3) && (iVar5 != 2)) || (iVar5 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))(lVar1,1,(int)plVar6[0x72]), iVar5 < 1) ) goto LAB_0012b38e; } if (iVar5 == 1) { if (((((*(byte *)((long)plVar6 + 0x36b) & 0x40) != 0) || (plVar6[0x82] != 0)) || (plVar6[0x83] != 0)) && (n = SSL_get_verify_result(ssl), n != 0)) goto LAB_0012b39b; *(SSL **)(param_1 + 0x10) = ssl; *(SSL **)(*(long *)(lVar1 + 0x38) + 0x10) = ssl; uVar8 = 0; goto LAB_0012b3f6; } LAB_0012b38e: n = SSL_get_verify_result(ssl); if (n == 0) { ma_tls_set_error(plVar6); uVar8 = CONCAT71(uVar9,1); } else { LAB_0012b39b: puVar3 = PTR_s_TLS_SSL_error_____100s_0014dd80; puVar2 = SQLSTATE_UNKNOWN; pcVar7 = X509_verify_cert_error_string(n); my_set_error(plVar6,0x7ea,puVar2,puVar3,pcVar7); uVar8 = CONCAT71(uVar9,1); if (cVar4 == '\0') { (**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0); } } LAB_0012b3f6: return uVar8 & 0xffffffff; }
34,822
minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
TemplateToken(Type type, const Location & location, SpaceHandling pre, SpaceHandling post) : type(type), location(location), pre_space(pre), post_space(post) {}
O1
cpp
minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&): leaq 0x927eb(%rip), %rax # 0x12d2f8 addq $0x10, %rax movq %rax, (%rdi) movl $0xf, 0x8(%rdi) movq (%rsi), %rax movq %rax, 0x10(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x18(%rdi) testq %rax, %rax je 0x9ab45 movq 0x94452(%rip), %r9 # 0x12ef88 cmpb $0x0, (%r9) je 0x9ab41 incl 0x8(%rax) jmp 0x9ab45 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x20(%rdi) movl %edx, 0x28(%rdi) movl %ecx, 0x2c(%rdi) leaq 0x932fe(%rip), %rax # 0x12de58 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x38(%rdi) movups (%r8), %xmm0 movq %rax, 0x8(%r8) movups %xmm0, 0x30(%rdi) movq %rax, (%r8) retq nop
_ZN5minja19FilterTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rdi], rax mov dword ptr [rdi+8], 0Fh mov rax, [rsi] mov [rdi+10h], rax mov rax, [rsi+8] mov [rdi+18h], rax test rax, rax jz short loc_9AB45 mov r9, cs:__libc_single_threaded_ptr cmp byte ptr [r9], 0 jz short loc_9AB41 inc dword ptr [rax+8] jmp short loc_9AB45 loc_9AB41: lock inc dword ptr [rax+8] loc_9AB45: mov rax, [rsi+10h] mov [rdi+20h], rax mov [rdi+28h], edx mov [rdi+2Ch], ecx lea rax, _ZTVN5minja19FilterTemplateTokenE; `vtable for'minja::FilterTemplateToken add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+38h], rax movups xmm0, xmmword ptr [r8] mov [r8+8], rax movups xmmword ptr [rdi+30h], xmm0 mov [r8], rax retn
long long minja::FilterTemplateToken::FilterTemplateToken( long long a1, _QWORD *a2, int a3, int a4, __int128 *a5) { long long v5; // rax long long result; // rax __int128 v7; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2; *(_DWORD *)(a1 + 8) = 15; *(_QWORD *)(a1 + 16) = *a2; v5 = a2[1]; *(_QWORD *)(a1 + 24) = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v5 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v5 + 8)); } *(_QWORD *)(a1 + 32) = a2[2]; *(_DWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 44) = a4; *(_QWORD *)a1 = &`vtable for'minja::FilterTemplateToken + 2; result = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v7 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)a5 = 0LL; return result; }
FilterTemplateToken: LEA RAX,[0x22d2f8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV dword ptr [RDI + 0x8],0xf MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],RAX TEST RAX,RAX JZ 0x0019ab45 MOV R9,qword ptr [0x0022ef88] CMP byte ptr [R9],0x0 JZ 0x0019ab41 INC dword ptr [RAX + 0x8] JMP 0x0019ab45 LAB_0019ab41: INC.LOCK dword ptr [RAX + 0x8] LAB_0019ab45: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x20],RAX MOV dword ptr [RDI + 0x28],EDX MOV dword ptr [RDI + 0x2c],ECX LEA RAX,[0x22de58] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x38],RAX MOVUPS XMM0,xmmword ptr [R8] MOV qword ptr [R8 + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [R8],RAX RET
/* minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::FilterTemplateToken::FilterTemplateToken (FilterTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4, int8 *param_5) { long lVar1; int8 uVar2; *(int ***)this = &PTR__TemplateToken_0022d308; *(int4 *)(this + 8) = 0xf; *(int8 *)(this + 0x10) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x18) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0022ef88 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x20) = param_1[2]; *(int4 *)(this + 0x28) = param_3; *(int4 *)(this + 0x2c) = param_4; *(int ***)this = &PTR__FilterTemplateToken_0022de68; *(int8 *)(this + 0x38) = 0; uVar2 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar2; *param_5 = 0; return; }
34,823
ggml_graph_compute_thread
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static thread_ret_t ggml_graph_compute_thread(void * data) { struct ggml_compute_state * state = (struct ggml_compute_state *) data; struct ggml_threadpool * tp = state->threadpool; const struct ggml_cgraph * cgraph = tp->cgraph; const struct ggml_cplan * cplan = tp->cplan; set_numa_thread_affinity(state->ith); struct ggml_compute_params params = { /*.ith =*/ state->ith, /*.nth =*/ atomic_load_explicit(&tp->n_threads_cur, memory_order_relaxed), /*.wsize =*/ cplan->work_size, /*.wdata =*/ cplan->work_data, /*.threadpool=*/ tp, }; for (int node_n = 0; node_n < cgraph->n_nodes && atomic_load_explicit(&tp->abort, memory_order_relaxed) != node_n; node_n++) { struct ggml_tensor * node = cgraph->nodes[node_n]; ggml_compute_forward(&params, node); if (state->ith == 0 && cplan->abort_callback && cplan->abort_callback(cplan->abort_callback_data)) { atomic_store_explicit(&tp->abort, node_n + 1, memory_order_relaxed); tp->ec = GGML_STATUS_ABORTED; } ggml_barrier(state->threadpool); } return 0; }
O0
c
ggml_graph_compute_thread: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x210(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movl 0x218(%rax), %edi callq 0x136c0 movq -0x10(%rbp), %rax movl 0x218(%rax), %eax movl %eax, -0x48(%rbp) movq -0x18(%rbp), %rax movl 0xdc(%rax), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movl $0x0, -0x50(%rbp) movl -0x50(%rbp), %ecx movq -0x20(%rbp), %rdx xorl %eax, %eax cmpl 0x4(%rdx), %ecx movb %al, -0x65(%rbp) jge 0x11bba movq -0x18(%rbp), %rax movl 0xcc(%rax), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax cmpl -0x50(%rbp), %eax setne %al movb %al, -0x65(%rbp) movb -0x65(%rbp), %al testb $0x1, %al jne 0x11bc6 jmp 0x11c58 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movslq -0x50(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rsi leaq -0x48(%rbp), %rdi callq 0x138a0 movq -0x10(%rbp), %rax cmpl $0x0, 0x218(%rax) jne 0x11c3a movq -0x28(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x11c3a movq -0x28(%rbp), %rax movq 0x20(%rax), %rax movq -0x28(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax testb $0x1, %al jne 0x11c17 jmp 0x11c3a movq -0x18(%rbp), %rax movl -0x50(%rbp), %ecx incl %ecx movl %ecx, -0x64(%rbp) movl -0x64(%rbp), %ecx movl %ecx, 0xcc(%rax) movq -0x18(%rbp), %rax movl $0x1, 0xe8(%rax) movq -0x10(%rbp), %rax movq 0x210(%rax), %rdi callq 0xd060 movl -0x50(%rbp), %eax addl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0x11b90 xorl %eax, %eax addq $0x70, %rsp popq %rbp retq
ggml_graph_compute_thread: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+210h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rax, [rax+58h] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax+60h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov edi, [rax+218h] call set_numa_thread_affinity mov rax, [rbp+var_10] mov eax, [rax+218h] mov [rbp+var_48], eax mov rax, [rbp+var_18] mov eax, [rax+0DCh] mov [rbp+var_4C], eax mov eax, [rbp+var_4C] mov [rbp+var_44], eax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_50], 0 loc_11B90: mov ecx, [rbp+var_50] mov rdx, [rbp+var_20] xor eax, eax cmp ecx, [rdx+4] mov [rbp+var_65], al jge short loc_11BBA mov rax, [rbp+var_18] mov eax, [rax+0CCh] mov [rbp+var_54], eax mov eax, [rbp+var_54] cmp eax, [rbp+var_50] setnz al mov [rbp+var_65], al loc_11BBA: mov al, [rbp+var_65] test al, 1 jnz short loc_11BC6 jmp loc_11C58 loc_11BC6: mov rax, [rbp+var_20] mov rax, [rax+10h] movsxd rcx, [rbp+var_50] mov rax, [rax+rcx*8] mov [rbp+var_60], rax mov rsi, [rbp+var_60] lea rdi, [rbp+var_48] call ggml_compute_forward mov rax, [rbp+var_10] cmp dword ptr [rax+218h], 0 jnz short loc_11C3A mov rax, [rbp+var_28] cmp qword ptr [rax+20h], 0 jz short loc_11C3A mov rax, [rbp+var_28] mov rax, [rax+20h] mov rcx, [rbp+var_28] mov rdi, [rcx+28h] call rax test al, 1 jnz short loc_11C17 jmp short loc_11C3A loc_11C17: mov rax, [rbp+var_18] mov ecx, [rbp+var_50] inc ecx mov [rbp+var_64], ecx mov ecx, [rbp+var_64] mov [rax+0CCh], ecx mov rax, [rbp+var_18] mov dword ptr [rax+0E8h], 1 loc_11C3A: mov rax, [rbp+var_10] mov rdi, [rax+210h] call _ggml_barrier mov eax, [rbp+var_50] add eax, 1 mov [rbp+var_50], eax jmp loc_11B90 loc_11C58: xor eax, eax add rsp, 70h pop rbp retn
long long ggml_graph_compute_thread(long long a1) { bool v2; // [rsp+Bh] [rbp-65h] int i; // [rsp+20h] [rbp-50h] _DWORD v4[2]; // [rsp+28h] [rbp-48h] BYREF long long v5; // [rsp+30h] [rbp-40h] long long v6; // [rsp+38h] [rbp-38h] long long v7; // [rsp+40h] [rbp-30h] long long *v8; // [rsp+48h] [rbp-28h] long long v9; // [rsp+50h] [rbp-20h] long long v10; // [rsp+58h] [rbp-18h] long long v11; // [rsp+60h] [rbp-10h] long long v12; // [rsp+68h] [rbp-8h] v12 = a1; v11 = a1; v10 = *(_QWORD *)(a1 + 528); v9 = *(_QWORD *)(v10 + 88); v8 = *(long long **)(v10 + 96); set_numa_thread_affinity(*(unsigned int *)(a1 + 536)); v4[0] = *(_DWORD *)(a1 + 536); v4[1] = *(_DWORD *)(v10 + 220); v5 = *v8; v6 = v8[1]; v7 = v10; for ( i = 0; ; ++i ) { v2 = 0; if ( i < *(_DWORD *)(v9 + 4) ) v2 = *(_DWORD *)(v10 + 204) != i; if ( !v2 ) break; ggml_compute_forward(v4, *(_QWORD *)(*(_QWORD *)(v9 + 16) + 8LL * i)); if ( !*(_DWORD *)(v11 + 536) && v8[4] && (((long long ( *)(long long))v8[4])(v8[5]) & 1) != 0 ) { *(_DWORD *)(v10 + 204) = i + 1; *(_DWORD *)(v10 + 232) = 1; } ggml_barrier(*(_QWORD *)(v11 + 528)); } return 0LL; }
ggml_graph_compute_thread: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x210] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x218] CALL 0x001136c0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x218] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xdc] MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x50],0x0 LAB_00111b90: MOV ECX,dword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP ECX,dword ptr [RDX + 0x4] MOV byte ptr [RBP + -0x65],AL JGE 0x00111bba MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xcc] MOV dword ptr [RBP + -0x54],EAX MOV EAX,dword ptr [RBP + -0x54] CMP EAX,dword ptr [RBP + -0x50] SETNZ AL MOV byte ptr [RBP + -0x65],AL LAB_00111bba: MOV AL,byte ptr [RBP + -0x65] TEST AL,0x1 JNZ 0x00111bc6 JMP 0x00111c58 LAB_00111bc6: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x60],RAX MOV RSI,qword ptr [RBP + -0x60] LEA RDI,[RBP + -0x48] CALL 0x001138a0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x218],0x0 JNZ 0x00111c3a MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00111c3a MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RCX + 0x28] CALL RAX TEST AL,0x1 JNZ 0x00111c17 JMP 0x00111c3a LAB_00111c17: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x50] INC ECX MOV dword ptr [RBP + -0x64],ECX MOV ECX,dword ptr [RBP + -0x64] MOV dword ptr [RAX + 0xcc],ECX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xe8],0x1 LAB_00111c3a: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x210] CALL 0x0010d060 MOV EAX,dword ptr [RBP + -0x50] ADD EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x00111b90 LAB_00111c58: XOR EAX,EAX ADD RSP,0x70 POP RBP RET
int8 ggml_graph_compute_thread(long param_1) { ulong uVar1; bool bVar2; int local_58; int4 local_50; int4 local_4c; int8 local_48; int8 local_40; long local_38; int8 *local_30; long local_28; long local_20; long local_18; long local_10; local_20 = *(long *)(param_1 + 0x210); local_28 = *(long *)(local_20 + 0x58); local_30 = *(int8 **)(local_20 + 0x60); local_18 = param_1; local_10 = param_1; set_numa_thread_affinity(*(int4 *)(param_1 + 0x218)); local_50 = *(int4 *)(local_18 + 0x218); local_4c = *(int4 *)(local_20 + 0xdc); local_48 = *local_30; local_40 = local_30[1]; local_38 = local_20; local_58 = 0; while( true ) { bVar2 = false; if (local_58 < *(int *)(local_28 + 4)) { bVar2 = *(int *)(local_20 + 0xcc) != local_58; } if (!bVar2) break; ggml_compute_forward(&local_50,*(int8 *)(*(long *)(local_28 + 0x10) + (long)local_58 * 8)) ; if (((*(int *)(local_18 + 0x218) == 0) && (local_30[4] != 0)) && (uVar1 = (*(code *)local_30[4])(local_30[5]), (uVar1 & 1) != 0)) { *(int *)(local_20 + 0xcc) = local_58 + 1; *(int4 *)(local_20 + 0xe8) = 1; } ggml_barrier(*(int8 *)(local_18 + 0x210)); local_58 = local_58 + 1; } return 0; }
34,824
mi_keyseg_write
eloqsql/storage/myisam/mi_open.c
int mi_keyseg_write(File file, const HA_KEYSEG *keyseg) { uchar buff[HA_KEYSEG_SIZE]; uchar *ptr=buff; ulong pos; *ptr++= keyseg->type; *ptr++= keyseg->language & 0xFF; /* Collation ID, low byte */ *ptr++= keyseg->null_bit; *ptr++= keyseg->bit_start; *ptr++= keyseg->language >> 8; /* Collation ID, high byte */ *ptr++= keyseg->bit_length; mi_int2store(ptr,keyseg->flag); ptr+=2; mi_int2store(ptr,keyseg->length); ptr+=2; mi_int4store(ptr,keyseg->start); ptr+=4; pos= keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos; mi_int4store(ptr, pos); ptr+=4; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O0
c
mi_keyseg_write: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x24(%rbp) movq %rsi, -0x30(%rbp) leaq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movb 0x18(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movzwl 0x16(%rax), %eax andl $0xff, %eax movb %al, %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movb 0x19(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movb 0x1a(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movzwl 0x16(%rax), %eax sarl $0x8, %eax movb %al, %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movb 0x1b(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movzwl 0x12(%rax), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movl -0x44(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movl -0x48(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movl 0x8(%rax), %eax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x2(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x4, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl 0x19(%rax), %eax cmpl $0x0, %eax je 0xbca53 movq -0x30(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x5c(%rbp) jmp 0xbca5e movq -0x30(%rbp), %rax movzwl 0x10(%rax), %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movl %eax, %eax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x58(%rbp) movb -0x58(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, 0x3(%rax) movb -0x57(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, 0x2(%rax) movb -0x56(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movb -0x55(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x4, %rax movq %rax, -0x38(%rbp) movl -0x24(%rbp), %edx movq -0x38(%rbp), %r8 leaq -0x20(%rbp), %rcx subq %rcx, %r8 leaq 0xa0409(%rip), %rdi # 0x15cec0 movl $0x4a2, %esi # imm = 0x4A2 movl $0x4, %r9d callq 0xbb9b0 testq %rax, %rax setne %al movzbl %al, %eax movl %eax, -0x60(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbcaee movl -0x60(%rbp), %eax addq $0x60, %rsp popq %rbp retq callq 0x2a260 nopw %cs:(%rax,%rax)
mi_keyseg_write: push rbp mov rbp, rsp sub rsp, 60h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_24], edi mov [rbp+var_30], rsi lea rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_30] mov cl, [rax+18h] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] movzx eax, word ptr [rax+16h] and eax, 0FFh mov cl, al mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] mov cl, [rax+19h] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] mov cl, [rax+1Ah] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] movzx eax, word ptr [rax+16h] sar eax, 8 mov cl, al mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] mov cl, [rax+1Bh] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] movzx eax, word ptr [rax+12h] mov [rbp+var_44], eax mov eax, [rbp+var_44] mov cl, al mov rax, [rbp+var_38] mov [rax+1], cl mov eax, [rbp+var_44] shr eax, 8 mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_30] movzx eax, word ptr [rax+14h] mov [rbp+var_48], eax mov eax, [rbp+var_48] mov cl, al mov rax, [rbp+var_38] mov [rax+1], cl mov eax, [rbp+var_48] shr eax, 8 mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_30] mov eax, [rax+8] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_38] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_38] mov [rax+2], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_38] mov [rax+1], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 4 mov [rbp+var_38], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+19h] cmp eax, 0 jz short loc_BCA53 mov rax, [rbp+var_30] mov eax, [rax+0Ch] mov [rbp+var_5C], eax jmp short loc_BCA5E loc_BCA53: mov rax, [rbp+var_30] movzx eax, word ptr [rax+10h] mov [rbp+var_5C], eax loc_BCA5E: mov eax, [rbp+var_5C] mov eax, eax mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_58], rax mov cl, byte ptr [rbp+var_58] mov rax, [rbp+var_38] mov [rax+3], cl mov cl, byte ptr [rbp+var_58+1] mov rax, [rbp+var_38] mov [rax+2], cl mov cl, byte ptr [rbp+var_58+2] mov rax, [rbp+var_38] mov [rax+1], cl mov cl, byte ptr [rbp+var_58+3] mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 4 mov [rbp+var_38], rax mov edx, [rbp+var_24] mov r8, [rbp+var_38] lea rcx, [rbp+var_20] sub r8, rcx lea rdi, aWorkspaceLlm4b_33; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4A2h mov r9d, 4 call inline_mysql_file_write_2 test rax, rax setnz al movzx eax, al mov [rbp+var_60], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BCAEE mov eax, [rbp+var_60] add rsp, 60h pop rbp retn loc_BCAEE: call ___stack_chk_fail
_BOOL8 mi_keyseg_write(unsigned int a1, long long a2) { __int16 v2; // kr00_2 __int16 v3; // kr02_2 int v5; // [rsp+4h] [rbp-5Ch] int v6; // [rsp+10h] [rbp-50h] _BYTE v7[18]; // [rsp+40h] [rbp-20h] BYREF _BYTE v8[14]; // [rsp+52h] [rbp-Eh] BYREF *(_QWORD *)&v8[6] = __readfsqword(0x28u); v7[0] = *(_BYTE *)(a2 + 24); v7[1] = *(_WORD *)(a2 + 22); v7[2] = *(_BYTE *)(a2 + 25); v7[3] = *(_BYTE *)(a2 + 26); v7[4] = HIBYTE(*(_WORD *)(a2 + 22)); v7[5] = *(_BYTE *)(a2 + 27); v2 = *(_WORD *)(a2 + 18); v7[6] = HIBYTE(v2); v7[7] = v2; v3 = *(_WORD *)(a2 + 20); v7[8] = HIBYTE(v3); v7[9] = v3; v6 = *(_DWORD *)(a2 + 8); v7[12] = BYTE1(v6); v7[13] = v6; v7[10] = HIBYTE(v6); v7[11] = BYTE2(v6); if ( *(_BYTE *)(a2 + 25) ) v5 = *(_DWORD *)(a2 + 12); else v5 = *(unsigned __int16 *)(a2 + 16); v7[16] = BYTE1(v5); v7[17] = v5; v7[14] = HIBYTE(v5); v7[15] = BYTE2(v5); return inline_mysql_file_write_2( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x4A2u, a1, (long long)v7, v8 - v7, 4LL) != 0; }
mi_keyseg_write: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x24],EDI MOV qword ptr [RBP + -0x30],RSI LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x16] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x19] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x1a] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x16] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x1b] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x12] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x44] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x48] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x4 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x19] CMP EAX,0x0 JZ 0x001bca53 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x5c],EAX JMP 0x001bca5e LAB_001bca53: MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x10] MOV dword ptr [RBP + -0x5c],EAX LAB_001bca5e: MOV EAX,dword ptr [RBP + -0x5c] MOV EAX,EAX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x58],RAX MOV CL,byte ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x3],CL MOV CL,byte ptr [RBP + -0x57] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x2],CL MOV CL,byte ptr [RBP + -0x56] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV CL,byte ptr [RBP + -0x55] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x4 MOV qword ptr [RBP + -0x38],RAX MOV EDX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x20] SUB R8,RCX LEA RDI,[0x25cec0] MOV ESI,0x4a2 MOV R9D,0x4 CALL 0x001bb9b0 TEST RAX,RAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RBP + -0x60],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001bcaee MOV EAX,dword ptr [RBP + -0x60] ADD RSP,0x60 POP RBP RET LAB_001bcaee: CALL 0x0012a260
bool mi_keyseg_write(int4 param_1,long param_2) { int4 uVar1; long lVar2; long in_FS_OFFSET; uint local_64; int1 local_60; int1 uStack_5f; int1 uStack_5e; int1 uStack_5d; int1 local_28; int1 local_27; int1 local_26; int1 local_25; int1 local_24; int1 local_23; int1 local_22; int1 local_21; int1 local_20; int1 local_1f; int1 local_1e; int1 local_1d; int1 local_1c; int1 local_1b; int1 local_1a; int1 local_19; int1 local_18; int1 local_17; int1 auStack_16 [6]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_28 = *(int1 *)(param_2 + 0x18); local_27 = (int1)*(int2 *)(param_2 + 0x16); local_26 = *(int1 *)(param_2 + 0x19); local_25 = *(int1 *)(param_2 + 0x1a); local_24 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8); local_23 = *(int1 *)(param_2 + 0x1b); local_21 = (int1)*(int2 *)(param_2 + 0x12); local_22 = (int1)((ushort)*(int2 *)(param_2 + 0x12) >> 8); local_1f = (int1)*(int2 *)(param_2 + 0x14); local_20 = (int1)((ushort)*(int2 *)(param_2 + 0x14) >> 8); uVar1 = *(int4 *)(param_2 + 8); local_1b = (int1)uVar1; local_1c = (int1)((uint)uVar1 >> 8); local_1d = (int1)((uint)uVar1 >> 0x10); local_1e = (int1)((uint)uVar1 >> 0x18); if (*(char *)(param_2 + 0x19) == '\0') { local_64 = (uint)*(ushort *)(param_2 + 0x10); } else { local_64 = *(uint *)(param_2 + 0xc); } local_60 = (int1)local_64; local_17 = local_60; uStack_5f = (int1)(local_64 >> 8); local_18 = uStack_5f; uStack_5e = (int1)(local_64 >> 0x10); local_19 = uStack_5e; uStack_5d = (int1)(local_64 >> 0x18); local_1a = uStack_5d; lVar2 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x4a2, param_1,&local_28,auStack_16 + -(long)&local_28,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return lVar2 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
34,825
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhoodBuilder.cpp
size_t NeighborhoodBuilder::computeByteSize(bool remapVerts) const { return Neighborhood::byteSize( (int)_faceVertCounts.size(), (int)_faceVerts.size(), (int)_cornerSharpness.size(), (int)_creaseSharpness.size(), remapVerts ? (int)_vertRemaps.size() : 0); }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool) const: pushq %rax movl %esi, %eax movq %rdi, %r9 movq 0x8(%rdi), %rdi subq (%r9), %rdi movq 0x38(%r9), %rsi shrq $0x2, %rdi subq 0x30(%r9), %rsi shrq $0x2, %rsi movq 0x98(%r9), %rdx subq 0x90(%r9), %rdx shrq $0x2, %rdx movq 0xc8(%r9), %rcx subq 0xc0(%r9), %rcx shrq $0x2, %rcx movq 0x50(%r9), %r8 subq 0x48(%r9), %r8 shrq $0x2, %r8 testl %eax, %eax cmovel %eax, %r8d callq 0x383b0 movl %eax, %eax popq %rcx retq
_ZNK10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder15computeByteSizeEb: push rax mov eax, esi mov r9, rdi; int mov rdi, [rdi+8] sub rdi, [r9] mov rsi, [r9+38h] shr rdi, 2; this sub rsi, [r9+30h] shr rsi, 2; int mov rdx, [r9+98h] sub rdx, [r9+90h] shr rdx, 2; int mov rcx, [r9+0C8h] sub rcx, [r9+0C0h] shr rcx, 2; int mov r8, [r9+50h] sub r8, [r9+48h] shr r8, 2 test eax, eax cmovz r8d, eax; int call __ZN10OpenSubdiv6v3_6_03Tmr12Neighborhood8byteSizeEiiiii; OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize(int,int,int,int,int) mov eax, eax pop rcx retn
long long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize( OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder *this, int a2) { OpenSubdiv::v3_6_0::Tmr::Neighborhood *v3; // rdi long long v4; // r8 v3 = (OpenSubdiv::v3_6_0::Tmr::Neighborhood *)((*((_QWORD *)this + 1) - *(_QWORD *)this) >> 2); v4 = (*((_QWORD *)this + 10) - *((_QWORD *)this + 9)) >> 2; if ( !a2 ) LODWORD(v4) = 0; return (unsigned int)OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize( v3, (*((_QWORD *)this + 7) - *((_QWORD *)this + 6)) >> 2, (*((_QWORD *)this + 19) - *((_QWORD *)this + 18)) >> 2, (*((_QWORD *)this + 25) - *((_QWORD *)this + 24)) >> 2, v4, (int)this); }
computeByteSize: PUSH RAX MOV EAX,ESI MOV R9,RDI MOV RDI,qword ptr [RDI + 0x8] SUB RDI,qword ptr [R9] MOV RSI,qword ptr [R9 + 0x38] SHR RDI,0x2 SUB RSI,qword ptr [R9 + 0x30] SHR RSI,0x2 MOV RDX,qword ptr [R9 + 0x98] SUB RDX,qword ptr [R9 + 0x90] SHR RDX,0x2 MOV RCX,qword ptr [R9 + 0xc8] SUB RCX,qword ptr [R9 + 0xc0] SHR RCX,0x2 MOV R8,qword ptr [R9 + 0x50] SUB R8,qword ptr [R9 + 0x48] SHR R8,0x2 TEST EAX,EAX CMOVZ R8D,EAX CALL 0x001383b0 MOV EAX,EAX POP RCX RET
/* OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool) const */ int4 __thiscall OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize (NeighborhoodBuilder *this,bool param_1) { int iVar1; int4 uVar2; int7 in_register_00000031; iVar1 = (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2); if ((int)CONCAT71(in_register_00000031,param_1) == 0) { iVar1 = 0; } uVar2 = Neighborhood::byteSize ((int)((ulong)(*(long *)(this + 8) - *(long *)this) >> 2), (int)((ulong)(*(long *)(this + 0x38) - *(long *)(this + 0x30)) >> 2), (int)((ulong)(*(long *)(this + 0x98) - *(long *)(this + 0x90)) >> 2), (int)((ulong)(*(long *)(this + 200) - *(long *)(this + 0xc0)) >> 2),iVar1); return uVar2; }
34,826
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhoodBuilder.cpp
size_t NeighborhoodBuilder::computeByteSize(bool remapVerts) const { return Neighborhood::byteSize( (int)_faceVertCounts.size(), (int)_faceVerts.size(), (int)_cornerSharpness.size(), (int)_creaseSharpness.size(), remapVerts ? (int)_vertRemaps.size() : 0); }
O2
cpp
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool) const: pushq %rax movl %esi, %eax movq %rdi, %r9 movq 0x8(%rdi), %rdi subq (%r9), %rdi movq 0x38(%r9), %rsi shrq $0x2, %rdi subq 0x30(%r9), %rsi shrq $0x2, %rsi movq 0x98(%r9), %rdx subq 0x90(%r9), %rdx shrq $0x2, %rdx movq 0xc8(%r9), %rcx subq 0xc0(%r9), %rcx shrq $0x2, %rcx movq 0x50(%r9), %r8 subq 0x48(%r9), %r8 shrq $0x2, %r8 testl %eax, %eax cmovel %eax, %r8d callq 0x4f750 movl %eax, %eax popq %rcx retq
_ZNK10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder15computeByteSizeEb: push rax mov eax, esi mov r9, rdi; int mov rdi, [rdi+8] sub rdi, [r9] mov rsi, [r9+38h] shr rdi, 2; this sub rsi, [r9+30h] shr rsi, 2; int mov rdx, [r9+98h] sub rdx, [r9+90h] shr rdx, 2; int mov rcx, [r9+0C8h] sub rcx, [r9+0C0h] shr rcx, 2; int mov r8, [r9+50h] sub r8, [r9+48h] shr r8, 2 test eax, eax cmovz r8d, eax; int call __ZN10OpenSubdiv6v3_6_03Tmr12Neighborhood8byteSizeEiiiii; OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize(int,int,int,int,int) mov eax, eax pop rcx retn
long long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize( OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder *this, int a2) { OpenSubdiv::v3_6_0::Tmr::Neighborhood *v3; // rdi long long v4; // r8 v3 = (OpenSubdiv::v3_6_0::Tmr::Neighborhood *)((*((_QWORD *)this + 1) - *(_QWORD *)this) >> 2); v4 = (*((_QWORD *)this + 10) - *((_QWORD *)this + 9)) >> 2; if ( !a2 ) LODWORD(v4) = 0; return (unsigned int)OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize( v3, (*((_QWORD *)this + 7) - *((_QWORD *)this + 6)) >> 2, (*((_QWORD *)this + 19) - *((_QWORD *)this + 18)) >> 2, (*((_QWORD *)this + 25) - *((_QWORD *)this + 24)) >> 2, v4, (int)this); }
computeByteSize: PUSH RAX MOV EAX,ESI MOV R9,RDI MOV RDI,qword ptr [RDI + 0x8] SUB RDI,qword ptr [R9] MOV RSI,qword ptr [R9 + 0x38] SHR RDI,0x2 SUB RSI,qword ptr [R9 + 0x30] SHR RSI,0x2 MOV RDX,qword ptr [R9 + 0x98] SUB RDX,qword ptr [R9 + 0x90] SHR RDX,0x2 MOV RCX,qword ptr [R9 + 0xc8] SUB RCX,qword ptr [R9 + 0xc0] SHR RCX,0x2 MOV R8,qword ptr [R9 + 0x50] SUB R8,qword ptr [R9 + 0x48] SHR R8,0x2 TEST EAX,EAX CMOVZ R8D,EAX CALL 0x0014f750 MOV EAX,EAX POP RCX RET
/* OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool) const */ int4 __thiscall OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize (NeighborhoodBuilder *this,bool param_1) { int iVar1; int4 uVar2; int7 in_register_00000031; iVar1 = (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2); if ((int)CONCAT71(in_register_00000031,param_1) == 0) { iVar1 = 0; } uVar2 = Neighborhood::byteSize ((int)((ulong)(*(long *)(this + 8) - *(long *)this) >> 2), (int)((ulong)(*(long *)(this + 0x38) - *(long *)(this + 0x30)) >> 2), (int)((ulong)(*(long *)(this + 0x98) - *(long *)(this + 0x90)) >> 2), (int)((ulong)(*(long *)(this + 200) - *(long *)(this + 0xc0)) >> 2),iVar1); return uVar2; }
34,827
testing::internal::UnitTestImpl::ListTestsMatchingFilter()
seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/src/gtest.cc
void UnitTestImpl::ListTestsMatchingFilter() { // Print at most this many characters for each type/value parameter. const int kMaxParamLength = 250; for (auto* test_suite : test_suites_) { bool printed_test_suite_name = false; for (size_t j = 0; j < test_suite->test_info_list().size(); j++) { const TestInfo* const test_info = test_suite->test_info_list()[j]; if (test_info->matches_filter_) { if (!printed_test_suite_name) { printed_test_suite_name = true; printf("%s.", test_suite->name()); if (test_suite->type_param() != nullptr) { printf(" # %s = ", kTypeParamLabel); // We print the type parameter on a single line to make // the output easy to parse by a program. PrintOnOneLine(test_suite->type_param(), kMaxParamLength); } printf("\n"); } printf(" %s", test_info->name()); if (test_info->value_param() != nullptr) { printf(" # %s = ", kValueParamLabel); // We print the value parameter on a single line to make the // output easy to parse by a program. PrintOnOneLine(test_info->value_param(), kMaxParamLength); } printf("\n"); } } } fflush(stdout); const std::string& output_format = UnitTestOptions::GetOutputFormat(); if (output_format == "xml" || output_format == "json") { FILE* fileout = OpenFileForWriting( UnitTestOptions::GetAbsolutePathToOutputFile().c_str()); std::stringstream stream; if (output_format == "xml") { XmlUnitTestResultPrinter( UnitTestOptions::GetAbsolutePathToOutputFile().c_str()) .PrintXmlTestsList(&stream, test_suites_); } else if (output_format == "json") { JsonUnitTestResultPrinter( UnitTestOptions::GetAbsolutePathToOutputFile().c_str()) .PrintJsonTestList(&stream, test_suites_); } fprintf(fileout, "%s", StringStreamToString(&stream).c_str()); fclose(fileout); } }
O2
cpp
testing::internal::UnitTestImpl::ListTestsMatchingFilter(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 leaq 0xb8(%rdi), %rax movq %rax, (%rsp) movq 0xb8(%rdi), %rax movq 0xc0(%rdi), %rcx movq %rcx, 0x50(%rsp) leaq 0xf593(%rip), %r14 # 0x33d8f pushq $0xa popq %rbp leaq 0xf57f(%rip), %r15 # 0x33d85 cmpq 0x50(%rsp), %rax je 0x24900 movq %rax, 0x58(%rsp) movq (%rax), %r12 xorl %ebx, %ebx xorl %eax, %eax movq 0x30(%r12), %rcx movq 0x38(%r12), %rdx subq %rcx, %rdx sarq $0x3, %rdx cmpq %rdx, %rbx jae 0x248f2 movq (%rcx,%rbx,8), %r13 cmpb $0x1, 0x82(%r13) jne 0x248ea testb $0x1, %al jne 0x2489e movq 0x8(%r12), %rsi leaq 0xf528(%rip), %rdi # 0x33d81 xorl %eax, %eax callq 0x9070 movq 0x28(%r12), %rax testq %rax, %rax je 0x24897 cmpq $0x0, (%rax) je 0x24897 movq %r15, %rdi leaq 0xc888(%rip), %rsi # 0x31102 xorl %eax, %eax callq 0x9070 movq 0x28(%r12), %rax testq %rax, %rax je 0x24890 movq (%rax), %rdi jmp 0x24892 xorl %edi, %edi callq 0x24bea movl %ebp, %edi callq 0x97f0 movq 0x20(%r13), %rsi movq %r14, %rdi xorl %eax, %eax callq 0x9070 movq 0x48(%r13), %rax testq %rax, %rax je 0x248e1 cmpq $0x0, (%rax) je 0x248e1 movq %r15, %rdi leaq 0xc8a3(%rip), %rsi # 0x31168 xorl %eax, %eax callq 0x9070 movq 0x48(%r13), %rax testq %rax, %rax je 0x248da movq (%rax), %rdi jmp 0x248dc xorl %edi, %edi callq 0x24bea movl %ebp, %edi callq 0x97f0 movb $0x1, %al incq %rbx jmp 0x2481d movq 0x58(%rsp), %rax addq $0x8, %rax jmp 0x24806 movq 0x28689(%rip), %rax # 0x4cf90 movq (%rax), %rdi callq 0x9620 leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0x17136 leaq 0xc7e9(%rip), %rsi # 0x3110c movq %rbx, %rdi callq 0x26300 testb %al, %al jne 0x24948 leaq 0xf1f7(%rip), %rsi # 0x33b2d leaq 0x60(%rsp), %rdi callq 0x26300 testb %al, %al je 0x24a7a leaq 0x8(%rsp), %rdi callq 0x171ba movq 0x8(%rsp), %rsi leaq 0x80(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0xd602 leaq 0x80(%rsp), %rdi callq 0x1dcad movq %rax, %r14 leaq 0x80(%rsp), %rdi callq 0x9af8 leaq 0x8(%rsp), %rdi callq 0x9af8 leaq 0x80(%rsp), %rdi callq 0x9340 leaq 0xc768(%rip), %rsi # 0x3110c leaq 0x60(%rsp), %rdi callq 0x26300 testb %al, %al je 0x249e8 leaq 0x30(%rsp), %rdi callq 0x171ba movq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1db9c leaq 0x90(%rsp), %rdi movq (%rsp), %rsi callq 0x1e28c leaq 0x8(%rsp), %rdi callq 0x293a4 jmp 0x24a31 leaq 0xf13e(%rip), %rsi # 0x33b2d leaq 0x60(%rsp), %rdi callq 0x26300 testb %al, %al je 0x24a3b leaq 0x30(%rsp), %rdi callq 0x171ba movq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x2063e leaq 0x90(%rsp), %rdi movq (%rsp), %rsi callq 0x22d54 leaq 0x8(%rsp), %rdi callq 0x293b8 leaq 0x30(%rsp), %rdi callq 0x9af8 leaq 0x8(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x18580 leaq 0x8(%rsp), %rbx movq (%rbx), %rdi movq %r14, %rsi callq 0x95b0 movq %rbx, %rdi callq 0x9af8 movq %r14, %rdi callq 0x94c0 leaq 0x80(%rsp), %rdi callq 0x93a0 leaq 0x60(%rsp), %rdi callq 0x9af8 addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x293b8 jmp 0x24abb jmp 0x24ab8 jmp 0x24ac9 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x293a4 jmp 0x24abb movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x9af8 jmp 0x24acc jmp 0x24ac9 movq %rax, %rbx leaq 0x80(%rsp), %rdi callq 0x93a0 jmp 0x24b01 jmp 0x24afe movq %rax, %rbx leaq 0x80(%rsp), %rdi callq 0x9af8 jmp 0x24af2 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x9af8 jmp 0x24b01 movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x9af8 movq %rbx, %rdi callq 0x99d0 nop
_ZN7testing8internal12UnitTestImpl23ListTestsMatchingFilterEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h lea rax, [rdi+0B8h] mov qword ptr [rsp+238h+var_238], rax; int mov rax, [rdi+0B8h] mov rcx, [rdi+0C0h] mov qword ptr [rsp+238h+var_1E8], rcx; int lea r14, aS_0; " %s" push 0Ah pop rbp lea r15, aS_1; " # %s = " loc_24806: cmp rax, qword ptr [rsp+238h+var_1E8] jz loc_24900 mov [rsp+238h+var_1E0], rax mov r12, [rax] xor ebx, ebx xor eax, eax loc_2481D: mov rcx, [r12+30h] mov rdx, [r12+38h] sub rdx, rcx sar rdx, 3 cmp rbx, rdx jnb loc_248F2 mov r13, [rcx+rbx*8] cmp byte ptr [r13+82h], 1 jnz loc_248EA test al, 1 jnz short loc_2489E mov rsi, [r12+8] lea rdi, aS_2; "%s." xor eax, eax call _printf mov rax, [r12+28h] test rax, rax jz short loc_24897 cmp qword ptr [rax], 0 jz short loc_24897 mov rdi, r15 lea rsi, _ZN7testing8internalL15kTypeParamLabelE; "TypeParam" xor eax, eax call _printf mov rax, [r12+28h] test rax, rax jz short loc_24890 mov rdi, [rax] jmp short loc_24892 loc_24890: xor edi, edi; this loc_24892: call _ZN7testing8internalL14PrintOnOneLineEPKci; testing::internal::PrintOnOneLine(char const*,int) loc_24897: mov edi, ebp call _putchar loc_2489E: mov rsi, [r13+20h] mov rdi, r14 xor eax, eax call _printf mov rax, [r13+48h] test rax, rax jz short loc_248E1 cmp qword ptr [rax], 0 jz short loc_248E1 mov rdi, r15 lea rsi, _ZN7testing8internalL16kValueParamLabelE; "GetParam()" xor eax, eax call _printf mov rax, [r13+48h] test rax, rax jz short loc_248DA mov rdi, [rax] jmp short loc_248DC loc_248DA: xor edi, edi; this loc_248DC: call _ZN7testing8internalL14PrintOnOneLineEPKci; testing::internal::PrintOnOneLine(char const*,int) loc_248E1: mov edi, ebp call _putchar mov al, 1 loc_248EA: inc rbx jmp loc_2481D loc_248F2: mov rax, [rsp+238h+var_1E0] add rax, 8 jmp loc_24806 loc_24900: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush lea rbx, [rsp+238h+var_1D8] mov rdi, rbx call _ZN7testing8internal15UnitTestOptions15GetOutputFormatB5cxx11Ev; testing::internal::UnitTestOptions::GetOutputFormat(void) lea rsi, aXml_0; "xml" mov rdi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_24948 lea rsi, aJson; "json" lea rdi, [rsp+238h+var_1D8] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz loc_24A7A loc_24948: lea rdi, [rsp+238h+var_230] call _ZN7testing8internal15UnitTestOptions27GetAbsolutePathToOutputFileB5cxx11Ev; testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(void) mov rsi, [rsp+238h+var_230] lea rdi, [rsp+238h+var_1B8] lea rdx, [rsp+238h+var_208] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+238h+var_1B8] call _ZN7testing8internalL18OpenFileForWritingERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::OpenFileForWriting(std::string const&) mov r14, rax lea rdi, [rsp+238h+var_1B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_230]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rsi, aXml_0; "xml" lea rdi, [rsp+238h+var_1D8] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_249E8 lea rdi, [rsp+238h+var_208] call _ZN7testing8internal15UnitTestOptions27GetAbsolutePathToOutputFileB5cxx11Ev; testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(void) mov rsi, [rsp+238h+var_208]; char * lea rdi, [rsp+238h+var_230]; this call _ZN7testing8internal24XmlUnitTestResultPrinterC2EPKc; testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter(char const*) lea rdi, [rsp+238h+var_1A8]; this mov rsi, qword ptr [rsp+238h+var_238] call _ZN7testing8internal24XmlUnitTestResultPrinter17PrintXmlTestsListEPSoRKSt6vectorIPNS_9TestSuiteESaIS5_EE; testing::internal::XmlUnitTestResultPrinter::PrintXmlTestsList(std::ostream *,std::vector<testing::TestSuite *> const&) lea rdi, [rsp+238h+var_230]; this call _ZN7testing8internal24XmlUnitTestResultPrinterD2Ev; testing::internal::XmlUnitTestResultPrinter::~XmlUnitTestResultPrinter() jmp short loc_24A31 loc_249E8: lea rsi, aJson; "json" lea rdi, [rsp+238h+var_1D8] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_24A3B lea rdi, [rsp+238h+var_208] call _ZN7testing8internal15UnitTestOptions27GetAbsolutePathToOutputFileB5cxx11Ev; testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile(void) mov rsi, [rsp+238h+var_208]; char * lea rdi, [rsp+238h+var_230]; this call _ZN7testing8internal25JsonUnitTestResultPrinterC2EPKc; testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(char const*) lea rdi, [rsp+238h+var_1A8]; this mov rsi, qword ptr [rsp+238h+var_238] call _ZN7testing8internal25JsonUnitTestResultPrinter17PrintJsonTestListEPSoRKSt6vectorIPNS_9TestSuiteESaIS5_EE; testing::internal::JsonUnitTestResultPrinter::PrintJsonTestList(std::ostream *,std::vector<testing::TestSuite *> const&) lea rdi, [rsp+238h+var_230]; this call _ZN7testing8internal25JsonUnitTestResultPrinterD2Ev; testing::internal::JsonUnitTestResultPrinter::~JsonUnitTestResultPrinter() loc_24A31: lea rdi, [rsp+238h+var_208]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_24A3B: lea rdi, [rsp+238h+var_230] lea rsi, [rsp+238h+var_1B8] call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) lea rbx, [rsp+238h+var_230] mov rdi, [rbx] mov rsi, r14 call _fputs mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call _fclose lea rdi, [rsp+238h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() loc_24A7A: lea rdi, [rsp+238h+var_1D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN7testing8internal25JsonUnitTestResultPrinterD2Ev; testing::internal::JsonUnitTestResultPrinter::~JsonUnitTestResultPrinter() jmp short loc_24ABB jmp short loc_24AB8 jmp short loc_24AC9 mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN7testing8internal24XmlUnitTestResultPrinterD2Ev; testing::internal::XmlUnitTestResultPrinter::~XmlUnitTestResultPrinter() jmp short loc_24ABB loc_24AB8: mov rbx, rax loc_24ABB: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_24ACC jmp short $+2 loc_24AC9: mov rbx, rax loc_24ACC: lea rdi, [rsp+arg_78] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp short loc_24B01 jmp short loc_24AFE mov rbx, rax lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_24AF2 mov rbx, rax loc_24AF2: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_24B01 loc_24AFE: mov rbx, rax loc_24B01: lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
void testing::internal::UnitTestImpl::ListTestsMatchingFilter(testing::internal::UnitTestImpl *this) { _QWORD *v1; // rax long long v2; // r12 unsigned long long v3; // rbx char v4; // al long long v5; // rcx long long v6; // r13 _QWORD *v7; // rax int v8; // edx testing::internal **v9; // rax testing::internal *v10; // rdi _QWORD *v11; // rax int v12; // edx testing::internal **v13; // rax testing::internal *v14; // rdi long long v15; // r14 std::ostream ***v16; // [rsp+0h] [rbp-238h] long long v17[5]; // [rsp+8h] [rbp-230h] BYREF char *v18[4]; // [rsp+30h] [rbp-208h] BYREF int v19[2]; // [rsp+50h] [rbp-1E8h] _QWORD *v20; // [rsp+58h] [rbp-1E0h] _QWORD v21[4]; // [rsp+60h] [rbp-1D8h] BYREF _QWORD v22[2]; // [rsp+80h] [rbp-1B8h] BYREF _BYTE v23[424]; // [rsp+90h] [rbp-1A8h] BYREF v16 = (std::ostream ***)((char *)this + 184); v1 = (_QWORD *)*((_QWORD *)this + 23); *(_QWORD *)v19 = *((_QWORD *)this + 24); while ( v1 != *(_QWORD **)v19 ) { v20 = v1; v2 = *v1; v3 = 0LL; v4 = 0; while ( 1 ) { v5 = *(_QWORD *)(v2 + 48); if ( v3 >= (*(_QWORD *)(v2 + 56) - v5) >> 3 ) break; v6 = *(_QWORD *)(v5 + 8 * v3); if ( *(_BYTE *)(v6 + 130) == 1 ) { if ( (v4 & 1) == 0 ) { printf("%s.", *(const char **)(v2 + 8)); v7 = *(_QWORD **)(v2 + 40); if ( v7 && *v7 ) { printf(" # %s = ", "TypeParam"); v9 = *(testing::internal ***)(v2 + 40); if ( v9 ) v10 = *v9; else v10 = 0LL; testing::internal::PrintOnOneLine(v10, "TypeParam", v8); } putchar(10LL); } printf(" %s", *(const char **)(v6 + 32)); v11 = *(_QWORD **)(v6 + 72); if ( v11 && *v11 ) { printf(" # %s = ", "GetParam()"); v13 = *(testing::internal ***)(v6 + 72); if ( v13 ) v14 = *v13; else v14 = 0LL; testing::internal::PrintOnOneLine(v14, "GetParam()", v12); } putchar(10LL); v4 = 1; } ++v3; } v1 = v20 + 1; } fflush(stdout); testing::internal::UnitTestOptions::GetOutputFormat[abi:cxx11](v21); if ( (unsigned __int8)std::operator==<char>(v21, "xml") || (unsigned __int8)std::operator==<char>(v21, "json") ) { testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile[abi:cxx11]((long long)v17); std::string::basic_string<std::allocator<char>>(v22, v17[0]); v15 = testing::internal::OpenFileForWriting(v22); std::string::~string(v22); std::string::~string(v17); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v22); if ( (unsigned __int8)std::operator==<char>(v21, "xml") ) { testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile[abi:cxx11]((long long)v18); testing::internal::XmlUnitTestResultPrinter::XmlUnitTestResultPrinter( (testing::internal::XmlUnitTestResultPrinter *)v17, v18[0]); testing::internal::XmlUnitTestResultPrinter::PrintXmlTestsList( (testing::internal::XmlUnitTestResultPrinter *)v23, v16); testing::internal::XmlUnitTestResultPrinter::~XmlUnitTestResultPrinter((testing::internal::XmlUnitTestResultPrinter *)v17); } else { if ( !(unsigned __int8)std::operator==<char>(v21, "json") ) { LABEL_30: testing::internal::StringStreamToString((long long)v17, (long long)v22); fputs(v17[0], v15); std::string::~string(v17); fclose(v15); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v22); goto LABEL_31; } testing::internal::UnitTestOptions::GetAbsolutePathToOutputFile[abi:cxx11]((long long)v18); testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter( (testing::internal::JsonUnitTestResultPrinter *)v17, v18[0]); testing::internal::JsonUnitTestResultPrinter::PrintJsonTestList( (testing::internal::JsonUnitTestResultPrinter *)v23, (long long *)v16); testing::internal::JsonUnitTestResultPrinter::~JsonUnitTestResultPrinter((testing::internal::JsonUnitTestResultPrinter *)v17); } std::string::~string(v18); goto LABEL_30; } LABEL_31: std::string::~string(v21); }
ListTestsMatchingFilter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 LEA RAX,[RDI + 0xb8] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RCX,qword ptr [RDI + 0xc0] MOV qword ptr [RSP + 0x50],RCX LEA R14,[0x133d8f] PUSH 0xa POP RBP LEA R15,[0x133d85] LAB_00124806: CMP RAX,qword ptr [RSP + 0x50] JZ 0x00124900 MOV qword ptr [RSP + 0x58],RAX MOV R12,qword ptr [RAX] XOR EBX,EBX XOR EAX,EAX LAB_0012481d: MOV RCX,qword ptr [R12 + 0x30] MOV RDX,qword ptr [R12 + 0x38] SUB RDX,RCX SAR RDX,0x3 CMP RBX,RDX JNC 0x001248f2 MOV R13,qword ptr [RCX + RBX*0x8] CMP byte ptr [R13 + 0x82],0x1 JNZ 0x001248ea TEST AL,0x1 JNZ 0x0012489e MOV RSI,qword ptr [R12 + 0x8] LEA RDI,[0x133d81] XOR EAX,EAX CALL 0x00109070 MOV RAX,qword ptr [R12 + 0x28] TEST RAX,RAX JZ 0x00124897 CMP qword ptr [RAX],0x0 JZ 0x00124897 MOV RDI,R15 LEA RSI,[0x131102] XOR EAX,EAX CALL 0x00109070 MOV RAX,qword ptr [R12 + 0x28] TEST RAX,RAX JZ 0x00124890 MOV RDI,qword ptr [RAX] JMP 0x00124892 LAB_00124890: XOR EDI,EDI LAB_00124892: CALL 0x00124bea LAB_00124897: MOV EDI,EBP CALL 0x001097f0 LAB_0012489e: MOV RSI,qword ptr [R13 + 0x20] MOV RDI,R14 XOR EAX,EAX CALL 0x00109070 MOV RAX,qword ptr [R13 + 0x48] TEST RAX,RAX JZ 0x001248e1 CMP qword ptr [RAX],0x0 JZ 0x001248e1 MOV RDI,R15 LEA RSI,[0x131168] XOR EAX,EAX CALL 0x00109070 MOV RAX,qword ptr [R13 + 0x48] TEST RAX,RAX JZ 0x001248da MOV RDI,qword ptr [RAX] JMP 0x001248dc LAB_001248da: XOR EDI,EDI LAB_001248dc: CALL 0x00124bea LAB_001248e1: MOV EDI,EBP CALL 0x001097f0 MOV AL,0x1 LAB_001248ea: INC RBX JMP 0x0012481d LAB_001248f2: MOV RAX,qword ptr [RSP + 0x58] ADD RAX,0x8 JMP 0x00124806 LAB_00124900: MOV RAX,qword ptr [0x0014cf90] MOV RDI,qword ptr [RAX] CALL 0x00109620 LEA RBX,[RSP + 0x60] MOV RDI,RBX CALL 0x00117136 LEA RSI,[0x13110c] MOV RDI,RBX CALL 0x00126300 TEST AL,AL JNZ 0x00124948 LEA RSI,[0x133b2d] LEA RDI,[RSP + 0x60] CALL 0x00126300 TEST AL,AL JZ 0x00124a7a LAB_00124948: LEA RDI,[RSP + 0x8] CALL 0x001171ba MOV RSI,qword ptr [RSP + 0x8] LAB_00124957: LEA RDI,[RSP + 0x80] LEA RDX,[RSP + 0x30] CALL 0x0010d602 LAB_00124969: LEA RDI,[RSP + 0x80] CALL 0x0011dcad MOV R14,RAX LEA RDI,[RSP + 0x80] CALL 0x00109af8 LEA RDI,[RSP + 0x8] CALL 0x00109af8 LAB_00124990: LEA RDI,[RSP + 0x80] CALL 0x00109340 LEA RSI,[0x13110c] LEA RDI,[RSP + 0x60] CALL 0x00126300 TEST AL,AL JZ 0x001249e8 LAB_001249b2: LEA RDI,[RSP + 0x30] CALL 0x001171ba MOV RSI,qword ptr [RSP + 0x30] LAB_001249c1: LEA RDI,[RSP + 0x8] CALL 0x0011db9c LEA RDI,[RSP + 0x90] LAB_001249d3: MOV RSI,qword ptr [RSP] CALL 0x0011e28c LEA RDI,[RSP + 0x8] CALL 0x001293a4 JMP 0x00124a31 LAB_001249e8: LEA RSI,[0x133b2d] LEA RDI,[RSP + 0x60] CALL 0x00126300 TEST AL,AL JZ 0x00124a3b LAB_001249fd: LEA RDI,[RSP + 0x30] CALL 0x001171ba MOV RSI,qword ptr [RSP + 0x30] LAB_00124a0c: LEA RDI,[RSP + 0x8] CALL 0x0012063e LEA RDI,[RSP + 0x90] LAB_00124a1e: MOV RSI,qword ptr [RSP] CALL 0x00122d54 LEA RDI,[RSP + 0x8] CALL 0x001293b8 LAB_00124a31: LEA RDI,[RSP + 0x30] CALL 0x00109af8 LAB_00124a3b: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x80] CALL 0x00118580 LAB_00124a4d: LEA RBX,[RSP + 0x8] MOV RDI,qword ptr [RBX] MOV RSI,R14 CALL 0x001095b0 MOV RDI,RBX CALL 0x00109af8 MOV RDI,R14 CALL 0x001094c0 LEA RDI,[RSP + 0x80] CALL 0x001093a0 LAB_00124a7a: LEA RDI,[RSP + 0x60] CALL 0x00109af8 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::UnitTestImpl::ListTestsMatchingFilter() */ void __thiscall testing::internal::UnitTestImpl::ListTestsMatchingFilter(UnitTestImpl *this) { long lVar1; long lVar2; bool bVar3; long *plVar4; FILE *__stream; ulong uVar5; int iVar6; char *pcVar7; char *local_230 [5]; char *local_208 [4]; long *local_1e8; long *local_1e0; UnitTestOptions local_1d8 [32]; string local_1b8 [16]; ostream local_1a8 [376]; local_1e8 = *(long **)(this + 0xc0); plVar4 = *(long **)(this + 0xb8); while (plVar4 != local_1e8) { lVar1 = *plVar4; uVar5 = 0; bVar3 = false; local_1e0 = plVar4; while( true ) { if ((ulong)(*(long *)(lVar1 + 0x38) - *(long *)(lVar1 + 0x30) >> 3) <= uVar5) break; lVar2 = *(long *)(*(long *)(lVar1 + 0x30) + uVar5 * 8); if (*(char *)(lVar2 + 0x82) == '\x01') { if (!bVar3) { printf("%s.",*(int8 *)(lVar1 + 8)); if ((*(long **)(lVar1 + 0x28) != (long *)0x0) && (**(long **)(lVar1 + 0x28) != 0)) { iVar6 = 0x131102; printf(" # %s = "); if (*(int8 **)(lVar1 + 0x28) == (int8 *)0x0) { pcVar7 = (char *)0x0; } else { pcVar7 = (char *)**(int8 **)(lVar1 + 0x28); } PrintOnOneLine(pcVar7,iVar6); } putchar(10); } printf(" %s",*(int8 *)(lVar2 + 0x20)); if ((*(long **)(lVar2 + 0x48) != (long *)0x0) && (**(long **)(lVar2 + 0x48) != 0)) { iVar6 = 0x131168; printf(" # %s = "); if (*(int8 **)(lVar2 + 0x48) == (int8 *)0x0) { pcVar7 = (char *)0x0; } else { pcVar7 = (char *)**(int8 **)(lVar2 + 0x48); } PrintOnOneLine(pcVar7,iVar6); } putchar(10); bVar3 = true; } uVar5 = uVar5 + 1; } plVar4 = local_1e0 + 1; } fflush(*(FILE **)PTR_stdout_0014cf90); UnitTestOptions::GetOutputFormat_abi_cxx11_(local_1d8); bVar3 = std::operator==((string *)local_1d8,"xml"); if (!bVar3) { bVar3 = std::operator==((string *)local_1d8,"json"); if (!bVar3) goto LAB_00124a7a; } /* try { // try from 00124948 to 00124951 has its CatchHandler @ 00124afe */ UnitTestOptions::GetAbsolutePathToOutputFile_abi_cxx11_((UnitTestOptions *)local_230); /* try { // try from 00124957 to 00124968 has its CatchHandler @ 00124aef */ std::__cxx11::string::string<std::allocator<char>>(local_1b8,local_230[0],(allocator *)local_208); /* try { // try from 00124969 to 00124975 has its CatchHandler @ 00124add */ __stream = (FILE *)OpenFileForWriting(local_1b8); std::__cxx11::string::~string(local_1b8); std::__cxx11::string::~string((string *)local_230); /* try { // try from 00124990 to 0012499c has its CatchHandler @ 00124adb */ std::__cxx11::stringstream::stringstream((stringstream *)local_1b8); bVar3 = std::operator==((string *)local_1d8,"xml"); if (bVar3) { /* try { // try from 001249b2 to 001249bb has its CatchHandler @ 00124ac7 */ UnitTestOptions::GetAbsolutePathToOutputFile_abi_cxx11_((UnitTestOptions *)local_208); /* try { // try from 001249c1 to 001249ca has its CatchHandler @ 00124ab8 */ XmlUnitTestResultPrinter::XmlUnitTestResultPrinter ((XmlUnitTestResultPrinter *)local_230,local_208[0]); /* try { // try from 001249d3 to 001249db has its CatchHandler @ 00124aa9 */ XmlUnitTestResultPrinter::PrintXmlTestsList(local_1a8,(vector *)(this + 0xb8)); XmlUnitTestResultPrinter::~XmlUnitTestResultPrinter((XmlUnitTestResultPrinter *)local_230); LAB_00124a31: std::__cxx11::string::~string((string *)local_208); } else { bVar3 = std::operator==((string *)local_1d8,"json"); if (bVar3) { /* try { // try from 001249fd to 00124a06 has its CatchHandler @ 00124aa7 */ UnitTestOptions::GetAbsolutePathToOutputFile_abi_cxx11_((UnitTestOptions *)local_208); /* try { // try from 00124a0c to 00124a15 has its CatchHandler @ 00124aa5 */ JsonUnitTestResultPrinter::JsonUnitTestResultPrinter ((JsonUnitTestResultPrinter *)local_230,local_208[0]); /* try { // try from 00124a1e to 00124a26 has its CatchHandler @ 00124a96 */ JsonUnitTestResultPrinter::PrintJsonTestList(local_1a8,(vector *)(this + 0xb8)); JsonUnitTestResultPrinter::~JsonUnitTestResultPrinter((JsonUnitTestResultPrinter *)local_230); goto LAB_00124a31; } } /* try { // try from 00124a3b to 00124a4c has its CatchHandler @ 00124ac9 */ StringStreamToString((stringstream *)local_230); fputs(local_230[0],__stream); std::__cxx11::string::~string((string *)local_230); fclose(__stream); std::__cxx11::stringstream::~stringstream((stringstream *)local_1b8); LAB_00124a7a: std::__cxx11::string::~string((string *)local_1d8); return; }
34,828
ggml_set_f32_1d
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_f32_1d(const struct ggml_tensor * tensor, int i, float value) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); ggml_set_f32_nd(tensor, id[0], id[1], id[2], id[3], value); return; } switch (tensor->type) { case GGML_TYPE_I8: { ((int8_t *)(tensor->data))[i] = value; } break; case GGML_TYPE_I16: { ((int16_t *)(tensor->data))[i] = value; } break; case GGML_TYPE_I32: { ((int32_t *)(tensor->data))[i] = value; } break; case GGML_TYPE_F16: { ((ggml_fp16_t *)(tensor->data))[i] = GGML_FP32_TO_FP16(value); } break; case GGML_TYPE_BF16: { ((ggml_bf16_t *)(tensor->data))[i] = GGML_FP32_TO_BF16(value); } break; case GGML_TYPE_F32: { ((float *)(tensor->data))[i] = value; } break; default: { GGML_ABORT("fatal error"); } } }
O2
c
ggml_set_f32_1d: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp vmovaps %xmm0, (%rsp) movl %esi, %ebp movq %rdi, %rbx callq 0x8190 testb %al, %al je 0x9e06 vmovaps (%rsp), %xmm0 movl (%rbx), %eax leal -0x18(%rax), %ecx cmpl $0x6, %ecx ja 0x9e59 leaq 0x3c2f6(%rip), %rax # 0x460e0 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx vcvttss2si %xmm0, %eax movq 0xf8(%rbx), %rcx movslq %ebp, %rdx movb %al, (%rcx,%rdx) jmp 0x9e50 vxorps %xmm0, %xmm0, %xmm0 leaq 0x18(%rsp), %rcx vmovups %ymm0, -0x8(%rcx) movslq %ebp, %rsi leaq 0x20(%rsp), %r8 leaq 0x28(%rsp), %r9 leaq 0x10(%rsp), %r14 movq %rbx, %rdi movq %r14, %rdx vzeroupper callq 0x84d0 movl (%r14), %esi movl 0x8(%r14), %edx movl 0x10(%r14), %ecx movl 0x18(%r14), %r8d movq %rbx, %rdi vmovaps (%rsp), %xmm0 callq 0x82d0 addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq testl %eax, %eax je 0x9eb8 cmpl $0x1, %eax jne 0x9ec9 vcvtps2ph $0x0, %xmm0, %xmm0 movq 0xf8(%rbx), %rax movslq %ebp, %rcx vpextrw $0x0, %xmm0, (%rax,%rcx,2) jmp 0x9e50 vcvttss2si %xmm0, %eax movq 0xf8(%rbx), %rcx movslq %ebp, %rdx movw %ax, (%rcx,%rdx,2) jmp 0x9e50 vcvttss2si %xmm0, %eax movq 0xf8(%rbx), %rcx movslq %ebp, %rdx movl %eax, (%rcx,%rdx,4) jmp 0x9e50 movq 0xf8(%rbx), %rbx movslq %ebp, %r14 callq 0x9625 movw %ax, (%rbx,%r14,2) jmp 0x9e50 movq 0xf8(%rbx), %rax movslq %ebp, %rcx vmovss %xmm0, (%rax,%rcx,4) jmp 0x9e50 leaq 0x3c88a(%rip), %rdi # 0x4675a leaq 0x3c9f0(%rip), %rdx # 0x468c7 movl $0xaf3, %esi # imm = 0xAF3 xorl %eax, %eax callq 0x8a30
ggml_set_f32_1d: push rbp push r14 push rbx sub rsp, 30h vmovaps [rsp+48h+var_48], xmm0 mov ebp, esi mov rbx, rdi call _ggml_is_contiguous test al, al jz short loc_9E06 vmovaps xmm0, [rsp+48h+var_48] mov eax, [rbx] lea ecx, [rax-18h]; switch 7 cases cmp ecx, 6 ja short def_9DF1; jumptable 0000000000009DF1 default case lea rax, jpt_9DF1 movsxd rcx, ds:(jpt_9DF1 - 460E0h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_9DF3: vcvttss2si eax, xmm0; jumptable 0000000000009DF1 case 24 mov rcx, [rbx+0F8h] movsxd rdx, ebp mov [rcx+rdx], al jmp short loc_9E50 loc_9E06: vxorps xmm0, xmm0, xmm0 lea rcx, [rsp+48h+var_30] vmovups ymmword ptr [rcx-8], ymm0 movsxd rsi, ebp lea r8, [rsp+48h+var_28] lea r9, [rsp+48h+var_20] lea r14, [rsp+48h+var_38] mov rdi, rbx mov rdx, r14 vzeroupper call _ggml_unravel_index mov esi, [r14] mov edx, [r14+8] mov ecx, [r14+10h] mov r8d, [r14+18h] mov rdi, rbx vmovaps xmm0, [rsp+48h+var_48] call _ggml_set_f32_nd loc_9E50: add rsp, 30h pop rbx pop r14 pop rbp retn def_9DF1: test eax, eax; jumptable 0000000000009DF1 default case jz short loc_9EB8 cmp eax, 1 jnz short loc_9EC9; jumptable 0000000000009DF1 cases 27-29 vcvtps2ph xmm0, xmm0, 0 mov rax, [rbx+0F8h] movsxd rcx, ebp vpextrw word ptr [rax+rcx*2], xmm0, 0 jmp short loc_9E50 loc_9E7B: vcvttss2si eax, xmm0; jumptable 0000000000009DF1 case 25 mov rcx, [rbx+0F8h] movsxd rdx, ebp mov [rcx+rdx*2], ax jmp short loc_9E50 loc_9E8F: vcvttss2si eax, xmm0; jumptable 0000000000009DF1 case 26 mov rcx, [rbx+0F8h] movsxd rdx, ebp mov [rcx+rdx*4], eax jmp short loc_9E50 loc_9EA2: mov rbx, [rbx+0F8h]; jumptable 0000000000009DF1 case 30 movsxd r14, ebp call ggml_compute_fp32_to_bf16 mov [rbx+r14*2], ax jmp short loc_9E50 loc_9EB8: mov rax, [rbx+0F8h] movsxd rcx, ebp vmovss dword ptr [rax+rcx*4], xmm0 jmp short loc_9E50 loc_9EC9: lea rdi, aWorkspaceLlm4b_0; jumptable 0000000000009DF1 cases 27-29 lea rdx, aFatalError; "fatal error" mov esi, 0AF3h xor eax, eax call _ggml_abort
int ggml_set_f32_1d(int *a1, int a2, __m128 _XMM0) { int v5; // eax long long v12; // rbx unsigned int v16; // [rsp+10h] [rbp-38h] BYREF unsigned int v17; // [rsp+18h] [rbp-30h] BYREF unsigned int v18; // [rsp+20h] [rbp-28h] BYREF _DWORD v19[8]; // [rsp+28h] [rbp-20h] BYREF __asm { vmovaps [rsp+48h+var_48], xmm0 } if ( (unsigned __int8)ggml_is_contiguous() ) { __asm { vmovaps xmm0, [rsp+48h+var_48] } v5 = *a1; switch ( *a1 ) { case 24: __asm { vcvttss2si eax, xmm0; jumptable 0000000000009DF1 case 24 } *(_BYTE *)(*((_QWORD *)a1 + 31) + a2) = _RAX; break; case 25: __asm { vcvttss2si eax, xmm0; jumptable 0000000000009DF1 case 25 } *(_WORD *)(*((_QWORD *)a1 + 31) + 2LL * a2) = _RAX; break; case 26: __asm { vcvttss2si eax, xmm0; jumptable 0000000000009DF1 case 26 } *(_DWORD *)(*((_QWORD *)a1 + 31) + 4LL * a2) = _RAX; break; case 27: case 28: case 29: goto LABEL_13; case 30: v12 = *((_QWORD *)a1 + 31); LODWORD(_RAX) = ggml_compute_fp32_to_bf16(_XMM0); *(_WORD *)(v12 + 2LL * a2) = _RAX; break; default: if ( v5 ) { if ( v5 == 1 ) { __asm { vcvtps2ph xmm0, xmm0, 0 } _RAX = *((_QWORD *)a1 + 31); _RCX = a2; __asm { vpextrw word ptr [rax+rcx*2], xmm0, 0 } } else { LABEL_13: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 2803LL, "fatal error", *(double *)_XMM0.m128_u64); LODWORD(_RAX) = ggml_set_f32_nd(); } } else { _RAX = *((_QWORD *)a1 + 31); _RCX = a2; __asm { vmovss dword ptr [rax+rcx*4], xmm0 } } break; } } else { __asm { vxorps xmm0, xmm0, xmm0 } _RCX = &v17; __asm { vmovups ymmword ptr [rcx-8], ymm0 vzeroupper } ggml_unravel_index(a1, a2, &v16, &v17, &v18, v19, *(double *)&_XMM0); __asm { vmovaps xmm0, [rsp+48h+var_48] } LODWORD(_RAX) = ggml_set_f32_nd(a1, v16, v17, v18, v19[0], *(double *)&_XMM0); } return _RAX; }
ggml_set_f32_1d: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 VMOVAPS xmmword ptr [RSP],XMM0 MOV EBP,ESI MOV RBX,RDI CALL 0x00108190 TEST AL,AL JZ 0x00109e06 VMOVAPS XMM0,xmmword ptr [RSP] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x18] CMP ECX,0x6 JA 0x00109e59 LEA RAX,[0x1460e0] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_18: VCVTTSS2SI EAX,XMM0 MOV RCX,qword ptr [RBX + 0xf8] MOVSXD RDX,EBP MOV byte ptr [RCX + RDX*0x1],AL JMP 0x00109e50 LAB_00109e06: VXORPS XMM0,XMM0,XMM0 LEA RCX,[RSP + 0x18] VMOVUPS ymmword ptr [RCX + -0x8],YMM0 MOVSXD RSI,EBP LEA R8,[RSP + 0x20] LEA R9,[RSP + 0x28] LEA R14,[RSP + 0x10] MOV RDI,RBX MOV RDX,R14 VZEROUPPER CALL 0x001084d0 MOV ESI,dword ptr [R14] MOV EDX,dword ptr [R14 + 0x8] MOV ECX,dword ptr [R14 + 0x10] MOV R8D,dword ptr [R14 + 0x18] MOV RDI,RBX VMOVAPS XMM0,xmmword ptr [RSP] CALL 0x001082d0 LAB_00109e50: ADD RSP,0x30 POP RBX POP R14 POP RBP RET default: TEST EAX,EAX JZ 0x00109eb8 CMP EAX,0x1 JNZ 0x00109ec9 VCVTPS2PH XMM0,XMM0,0x0 MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP VPEXTRW word ptr [RAX + RCX*0x2],XMM0,0x0 JMP 0x00109e50 caseD_19: VCVTTSS2SI EAX,XMM0 MOV RCX,qword ptr [RBX + 0xf8] MOVSXD RDX,EBP MOV word ptr [RCX + RDX*0x2],AX JMP 0x00109e50 caseD_1a: VCVTTSS2SI EAX,XMM0 MOV RCX,qword ptr [RBX + 0xf8] MOVSXD RDX,EBP MOV dword ptr [RCX + RDX*0x4],EAX JMP 0x00109e50 caseD_1e: MOV RBX,qword ptr [RBX + 0xf8] MOVSXD R14,EBP CALL 0x00109625 MOV word ptr [RBX + R14*0x2],AX JMP 0x00109e50 LAB_00109eb8: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP VMOVSS dword ptr [RAX + RCX*0x4],XMM0 JMP 0x00109e50 caseD_1b: LEA RDI,[0x14675a] LEA RDX,[0x1468c7] MOV ESI,0xaf3 XOR EAX,EAX CALL 0x00108a30
void ggml_set_f32_1d(int8 param_1,int *param_2,int param_3) { int iVar1; long lVar2; char cVar3; int2 uVar4; float fVar5; int8 in_XMM0_Qb; int1 auVar6 [16]; ulong local_38; ulong uStack_30; ulong uStack_28; ulong uStack_20; cVar3 = ggml_is_contiguous(); if (cVar3 == '\0') { local_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; ggml_unravel_index(param_2,(long)param_3,&local_38,&uStack_30,&uStack_28,&uStack_20); ggml_set_f32_nd(param_1,param_2,local_38 & 0xffffffff,uStack_30 & 0xffffffff, uStack_28 & 0xffffffff,uStack_20 & 0xffffffff); } else { auVar6._8_8_ = in_XMM0_Qb; auVar6._0_8_ = param_1; iVar1 = *param_2; fVar5 = (float)param_1; switch(iVar1) { case 0x18: *(char *)(*(long *)(param_2 + 0x3e) + (long)param_3) = (char)(int)fVar5; break; case 0x19: *(short *)(*(long *)(param_2 + 0x3e) + (long)param_3 * 2) = (short)(int)fVar5; break; case 0x1a: *(int *)(*(long *)(param_2 + 0x3e) + (long)param_3 * 4) = (int)fVar5; break; case 0x1b: case 0x1c: case 0x1d: switchD_00109df1_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0xaf3,"fatal error"); case 0x1e: lVar2 = *(long *)(param_2 + 0x3e); uVar4 = ggml_compute_fp32_to_bf16(); *(int2 *)(lVar2 + (long)param_3 * 2) = uVar4; break; default: if (iVar1 == 0) { *(float *)(*(long *)(param_2 + 0x3e) + (long)param_3 * 4) = fVar5; } else { if (iVar1 != 1) goto switchD_00109df1_caseD_1b; auVar6 = vcvtps2ph_f16c(auVar6,0); vpextrw_avx(auVar6,0); } } } return; }
34,829
mysql_stmt_fetch_column
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset) { if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count || stmt->state == MYSQL_STMT_FETCH_DONE) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->bind[column].u.row_ptr) { /* we set row_ptr only for columns which contain data, so this must be a NULL column */ if (bind[0].is_null) *bind[0].is_null= 1; } else { unsigned char *save_ptr; if (bind[0].length) *bind[0].length= *stmt->bind[column].length; else bind[0].length= &stmt->bind[column].length_value; if (bind[0].is_null) *bind[0].is_null= 0; else bind[0].is_null= &bind[0].is_null_value; if (!bind[0].error) bind[0].error= &bind[0].error_value; *bind[0].error= 0; bind[0].offset= offset; save_ptr= stmt->bind[column].u.row_ptr; mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr); stmt->bind[column].u.row_ptr= save_ptr; } return(0); }
O0
c
mysql_stmt_fetch_column: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax cmpl $0x5, 0x50(%rax) jb 0x319a7 movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x60(%rcx), %eax jae 0x319a7 movq -0x10(%rbp), %rax cmpl $0x6, 0x50(%rax) jne 0x31a1b jmp 0x319a9 movq -0x10(%rbp), %rax movl $0x803, 0x108(%rax) # imm = 0x803 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x389c7(%rip), %rax # 0x6a390 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x389ad(%rip), %rax # 0x6a3a0 movq 0x198(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x31b85 movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x20(%rax) jne 0x31a4f movq -0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x31a4a movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movb $0x1, (%rax) jmp 0x31b7e movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x31a7d movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq (%rax), %rcx movq -0x18(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) jmp 0x31a9a movq -0x10(%rbp), %rax movq 0x78(%rax), %rcx movl -0x1c(%rbp), %eax imulq $0x70, %rax, %rax addq %rax, %rcx addq $0x50, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x31ab2 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movb $0x0, (%rax) jmp 0x31ac2 movq -0x18(%rbp), %rcx addq $0x67, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x31add movq -0x18(%rbp), %rcx addq $0x64, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x20(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x7, %rcx addq %rcx, %rax movl 0x70(%rax), %eax movl %eax, %ecx leaq 0x38de4(%rip), %rax # 0x6a910 imulq $0x18, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x58(%rcx), %rsi movl -0x1c(%rbp), %ecx shlq $0x7, %rcx addq %rcx, %rsi movq -0x10(%rbp), %rcx movq 0x78(%rcx), %rdx movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rdx addq $0x20, %rdx callq *%rax movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %edx imulq $0x70, %rdx, %rdx addq %rdx, %rax movq %rcx, 0x20(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
mysql_stmt_fetch_column: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 5 jb short loc_319A7 mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+60h] jnb short loc_319A7 mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 6 jnz short loc_31A1B loc_319A7: jmp short $+2 loc_319A9: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 803h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+198h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_31B85 loc_31A1B: mov rax, [rbp+var_10] mov rax, [rax+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx cmp qword ptr [rax+20h], 0 jnz short loc_31A4F mov rax, [rbp+var_18] cmp qword ptr [rax+8], 0 jz short loc_31A4A mov rax, [rbp+var_18] mov rax, [rax+8] mov byte ptr [rax], 1 loc_31A4A: jmp loc_31B7E loc_31A4F: mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_31A7D mov rax, [rbp+var_10] mov rax, [rax+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax] mov rcx, [rax] mov rax, [rbp+var_18] mov rax, [rax] mov [rax], rcx jmp short loc_31A9A loc_31A7D: mov rax, [rbp+var_10] mov rcx, [rax+78h] mov eax, [rbp+var_1C] imul rax, 70h ; 'p' add rcx, rax add rcx, 50h ; 'P' mov rax, [rbp+var_18] mov [rax], rcx loc_31A9A: mov rax, [rbp+var_18] cmp qword ptr [rax+8], 0 jz short loc_31AB2 mov rax, [rbp+var_18] mov rax, [rax+8] mov byte ptr [rax], 0 jmp short loc_31AC2 loc_31AB2: mov rcx, [rbp+var_18] add rcx, 67h ; 'g' mov rax, [rbp+var_18] mov [rax+8], rcx loc_31AC2: mov rax, [rbp+var_18] cmp qword ptr [rax+18h], 0 jnz short loc_31ADD mov rcx, [rbp+var_18] add rcx, 64h ; 'd' mov rax, [rbp+var_18] mov [rax+18h], rcx loc_31ADD: mov rax, [rbp+var_18] mov rax, [rax+18h] mov byte ptr [rax], 0 mov rcx, [rbp+var_28] mov rax, [rbp+var_18] mov [rax+48h], rcx mov rax, [rbp+var_10] mov rax, [rax+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+20h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov ecx, [rbp+var_1C] shl rcx, 7 add rax, rcx mov eax, [rax+70h] mov ecx, eax lea rax, mysql_ps_fetch_functions imul rcx, 18h add rax, rcx mov rax, [rax] mov rdi, [rbp+var_18] mov rcx, [rbp+var_10] mov rsi, [rcx+58h] mov ecx, [rbp+var_1C] shl rcx, 7 add rsi, rcx mov rcx, [rbp+var_10] mov rdx, [rcx+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rdx, rcx add rdx, 20h ; ' ' call rax mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov rax, [rax+78h] mov edx, [rbp+var_1C] imul rdx, 70h ; 'p' add rax, rdx mov [rax+20h], rcx loc_31B7E: mov [rbp+var_4], 0 loc_31B85: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_fetch_column(long long a1, long long a2, unsigned int a3, long long a4) { long long v5; // [rsp+0h] [rbp-30h] if ( *(_DWORD *)(a1 + 80) < 5u || a3 >= *(_DWORD *)(a1 + 96) || *(_DWORD *)(a1 + 80) == 6 ) { *(_DWORD *)(a1 + 264) = 2051; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[51], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } else { if ( *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) ) { if ( *(_QWORD *)a2 ) **(_QWORD **)a2 = **(_QWORD **)(112LL * a3 + *(_QWORD *)(a1 + 120)); else *(_QWORD *)a2 = 112LL * a3 + *(_QWORD *)(a1 + 120) + 80; if ( *(_QWORD *)(a2 + 8) ) **(_BYTE **)(a2 + 8) = 0; else *(_QWORD *)(a2 + 8) = a2 + 103; if ( !*(_QWORD *)(a2 + 24) ) *(_QWORD *)(a2 + 24) = a2 + 100; **(_BYTE **)(a2 + 24) = 0; *(_QWORD *)(a2 + 72) = a4; v5 = *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32); (*(void ( **)(long long, unsigned long long, long long))&mysql_ps_fetch_functions[6 * *(unsigned int *)(((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88) + 112)])( a2, ((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88), 112LL * a3 + *(_QWORD *)(a1 + 120) + 32); *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) = v5; } else if ( *(_QWORD *)(a2 + 8) ) { **(_BYTE **)(a2 + 8) = 1; } return 0; } }
mysql_stmt_fetch_column: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x5 JC 0x001319a7 MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x60] JNC 0x001319a7 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x6 JNZ 0x00131a1b LAB_001319a7: JMP 0x001319a9 LAB_001319a9: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x803 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x16a390] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x16a3a0] MOV RSI,qword ptr [RAX + 0x198] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00131b85 LAB_00131a1b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00131a4f MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00131a4a MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV byte ptr [RAX],0x1 LAB_00131a4a: JMP 0x00131b7e LAB_00131a4f: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x00131a7d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX JMP 0x00131a9a LAB_00131a7d: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x78] MOV EAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0x70 ADD RCX,RAX ADD RCX,0x50 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX LAB_00131a9a: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00131ab2 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV byte ptr [RAX],0x0 JMP 0x00131ac2 LAB_00131ab2: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x67 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX LAB_00131ac2: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x00131add MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x64 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX LAB_00131add: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x7 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x70] MOV ECX,EAX LEA RAX,[0x16a910] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x58] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x7 ADD RSI,RCX MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RDX,RCX ADD RDX,0x20 CALL RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV EDX,dword ptr [RBP + -0x1c] IMUL RDX,RDX,0x70 ADD RAX,RDX MOV qword ptr [RAX + 0x20],RCX LAB_00131b7e: MOV dword ptr [RBP + -0x4],0x0 LAB_00131b85: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4) { int8 uVar1; int4 local_c; if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x60) <= param_3)) || (*(int *)(param_1 + 0x50) == 6)) { *(int4 *)(param_1 + 0x108) = 0x803; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s__0016a538,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else { if (*(long *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) == 0) { if (param_2[1] != 0) { *(int1 *)param_2[1] = 1; } } else { if (*param_2 == 0) { *param_2 = *(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x50; } else { *(int8 *)*param_2 = **(int8 **)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70); } if (param_2[1] == 0) { param_2[1] = (long)param_2 + 0x67; } else { *(int1 *)param_2[1] = 0; } if (param_2[3] == 0) { param_2[3] = (long)param_2 + 100; } *(int1 *)param_2[3] = 0; param_2[9] = param_4; uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20); (*(code *)(&mysql_ps_fetch_functions) [(ulong)*(uint *)(*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80 + 0x70) * 3]) (param_2,*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80, *(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20); *(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) = uVar1; } local_c = 0; } return local_c; }
34,830
my_hash_sort_utf16_nopad_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { const uchar *end= pos + len; register ulong m1= *nr1, m2= *nr2; for ( ; pos < end ; pos++) { MY_HASH_ADD(m1, m2, (uint)*pos); } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf16_nopad_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x5dbae jmp 0x5db66 movq -0x38(%rbp), %rax andq $0x3f, %rax addq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x38(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x40(%rbp), %rax addq $0x3, %rax movq %rax, -0x40(%rbp) jmp 0x5dba0 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x5db5a movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf16_nopad_bin: 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], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_40], rax loc_5DB5A: mov rax, [rbp+var_10] cmp rax, [rbp+var_30] jnb short loc_5DBAE jmp short $+2 loc_5DB66: mov rax, [rbp+var_38] and rax, 3Fh add rax, [rbp+var_40] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_38] shl rcx, 8 add rax, rcx xor rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_40] add rax, 3 mov [rbp+var_40], rax jmp short $+2 loc_5DBA0: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_5DB5A loc_5DBAE: mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov [rax], rcx pop rbp retn
_QWORD * my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5) { _QWORD *result; // rax long long v6; // [rsp+0h] [rbp-40h] long long v7; // [rsp+8h] [rbp-38h] unsigned __int8 *v8; // [rsp+30h] [rbp-10h] v8 = a2; v7 = *a4; v6 = *a5; while ( v8 < &a2[a3] ) { v7 ^= (v7 << 8) + *v8 * (v6 + (v7 & 0x3F)); v6 += 3LL; ++v8; } *a4 = v7; result = a5; *a5 = v6; return result; }
my_hash_sort_utf16_nopad_bin: 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],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX LAB_0015db5a: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0015dbae JMP 0x0015db66 LAB_0015db66: MOV RAX,qword ptr [RBP + -0x38] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x38] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x3 MOV qword ptr [RBP + -0x40],RAX JMP 0x0015dba0 LAB_0015dba0: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0015db5a LAB_0015dbae: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX POP RBP RET
void my_hash_sort_utf16_nopad_bin (int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long local_48; ulong local_40; byte *local_18; local_40 = *param_4; local_48 = *param_5; for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) { local_40 = ((local_40 & 0x3f) + local_48) * (ulong)*local_18 + local_40 * 0x100 ^ local_40; local_48 = local_48 + 3; } *param_4 = local_40; *param_5 = local_48; return; }
34,831
my_freopen
eloqsql/mysys/my_fopen.c
FILE *my_freopen(const char *path, const char *mode, FILE *stream) { FILE *result; #if defined(_WIN32) result= my_win_freopen(path, mode, stream); #else result= freopen(path, mode, stream); #endif return result; }
O3
c
my_freopen: pushq %rbp movq %rsp, %rbp popq %rbp jmp 0x366d0
my_freopen: push rbp mov rbp, rsp pop rbp jmp _freopen64
long long my_freopen() { return freopen64(); }
my_freopen: PUSH RBP MOV RBP,RSP POP RBP JMP 0x001366d0
void my_freopen(char *param_1,char *param_2,FILE *param_3) { freopen64(param_1,param_2,param_3); return; }
34,832
Catch::RedirectedStreams::~RedirectedStreams()
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
RedirectedStreams::~RedirectedStreams() { m_redirectedCout += m_redirectedStdOut.str(); m_redirectedCerr += m_redirectedStdErr.str(); }
O3
cpp
Catch::RedirectedStreams::~RedirectedStreams(): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x18(%rdi), %rsi addq $0x8, %rsi movq %rsp, %rdi callq 0x17c70 movq (%rbx), %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x82008 leaq 0x10(%rsp), %r14 movq -0x10(%r14), %rdi cmpq %r14, %rdi je 0x5ce44 movq 0x10(%rsp), %rsi incq %rsi callq 0x17150 movq 0x40(%rbx), %rsi addq $0x8, %rsi movq %rsp, %rdi callq 0x17c70 movq 0x8(%rbx), %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x82008 movq (%rsp), %rdi cmpq %r14, %rdi je 0x5ce7c movq 0x10(%rsp), %rsi incq %rsi callq 0x17150 leaq 0x38(%rbx), %r14 leaq 0x10(%rbx), %r15 leaq 0x60(%rbx), %rdi callq 0x5ccc2 leaq 0x48(%rbx), %rdi callq 0x5ccc2 movq %r14, %rdi callq 0x5e2f4 addq $0x20, %rbx movq %rbx, %rdi callq 0x5ccc2 movq %r15, %rdi callq 0x5e2f4 addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rdi callq 0x1f2c3
_ZN5Catch17RedirectedStreamsD2Ev: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi mov rsi, [rdi+18h] add rsi, 8 mov rdi, rsp call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rdi, [rbx] mov rsi, [rsp+38h+var_38] mov rdx, [rsp+38h+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea r14, [rsp+38h+var_28] mov rdi, [r14-10h]; void * cmp rdi, r14 jz short loc_5CE44 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5CE44: mov rsi, [rbx+40h] add rsi, 8 mov rdi, rsp call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rdi, [rbx+8] mov rsi, [rsp+38h+var_38] mov rdx, [rsp+38h+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+38h+var_38]; void * cmp rdi, r14 jz short loc_5CE7C mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5CE7C: lea r14, [rbx+38h] lea r15, [rbx+10h] lea rdi, [rbx+60h]; this call _ZN5Catch16RedirectedStreamD2Ev; Catch::RedirectedStream::~RedirectedStream() lea rdi, [rbx+48h]; this call _ZN5Catch16RedirectedStreamD2Ev; Catch::RedirectedStream::~RedirectedStream() mov rdi, r14; this call _ZN5Catch20ReusableStringStreamD2Ev; Catch::ReusableStringStream::~ReusableStringStream() add rbx, 20h ; ' ' mov rdi, rbx; this call _ZN5Catch16RedirectedStreamD2Ev; Catch::RedirectedStream::~RedirectedStream() mov rdi, r15; this call _ZN5Catch20ReusableStringStreamD2Ev; Catch::ReusableStringStream::~ReusableStringStream() add rsp, 20h pop rbx pop r14 pop r15 retn mov rdi, rax call __clang_call_terminate
void Catch::RedirectedStreams::~RedirectedStreams(Catch::RedirectedStreams *this, double a2) { void *v2; // [rsp+0h] [rbp-38h] BYREF long long v3; // [rsp+8h] [rbp-30h] _QWORD v4[5]; // [rsp+10h] [rbp-28h] BYREF std::stringbuf::str(&v2, *((_QWORD *)this + 3) + 8LL, a2); std::string::_M_append(*(_QWORD *)this, v2, v3); if ( v2 != v4 ) operator delete(v2, v4[0] + 1LL); std::stringbuf::str(&v2, *((_QWORD *)this + 8) + 8LL, a2); std::string::_M_append(*((_QWORD *)this + 1), v2, v3); if ( v2 != v4 ) operator delete(v2, v4[0] + 1LL); Catch::RedirectedStream::~RedirectedStream((Catch::RedirectedStreams *)((char *)this + 96)); Catch::RedirectedStream::~RedirectedStream((Catch::RedirectedStreams *)((char *)this + 72)); Catch::ReusableStringStream::~ReusableStringStream((Catch::RedirectedStreams *)((char *)this + 56)); Catch::RedirectedStream::~RedirectedStream((Catch::RedirectedStreams *)((char *)this + 32)); Catch::ReusableStringStream::~ReusableStringStream((Catch::RedirectedStreams *)((char *)this + 16)); }
~RedirectedStreams: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x18] ADD RSI,0x8 LAB_0015ce10: MOV RDI,RSP CALL 0x00117c70 MOV RDI,qword ptr [RBX] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00182008 LEA R14,[RSP + 0x10] MOV RDI,qword ptr [R14 + -0x10] CMP RDI,R14 JZ 0x0015ce44 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00117150 LAB_0015ce44: MOV RSI,qword ptr [RBX + 0x40] ADD RSI,0x8 MOV RDI,RSP CALL 0x00117c70 MOV RDI,qword ptr [RBX + 0x8] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00182008 LAB_0015ce66: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x0015ce7c MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00117150 LAB_0015ce7c: LEA R14,[RBX + 0x38] LEA R15,[RBX + 0x10] LEA RDI,[RBX + 0x60] CALL 0x0015ccc2 LEA RDI,[RBX + 0x48] CALL 0x0015ccc2 MOV RDI,R14 CALL 0x0015e2f4 ADD RBX,0x20 MOV RDI,RBX CALL 0x0015ccc2 MOV RDI,R15 CALL 0x0015e2f4 ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* Catch::RedirectedStreams::~RedirectedStreams() */ void __thiscall Catch::RedirectedStreams::~RedirectedStreams(RedirectedStreams *this) { long *local_38; ulong local_30; long local_28 [2]; /* try { // try from 0015ce10 to 0015ce65 has its CatchHandler @ 0015cebc */ std::__cxx11::stringbuf::str(); std::__cxx11::string::_M_append(*(string **)this,(char *)local_38,local_30); if (local_38 != local_28) { operator_delete(local_38,local_28[0] + 1); } std::__cxx11::stringbuf::str(); std::__cxx11::string::_M_append(*(string **)(this + 8),(char *)local_38,local_30); if (local_38 != local_28) { operator_delete(local_38,local_28[0] + 1); } RedirectedStream::~RedirectedStream((RedirectedStream *)(this + 0x60)); RedirectedStream::~RedirectedStream((RedirectedStream *)(this + 0x48)); ReusableStringStream::~ReusableStringStream((ReusableStringStream *)(this + 0x38)); RedirectedStream::~RedirectedStream((RedirectedStream *)(this + 0x20)); ReusableStringStream::~ReusableStringStream((ReusableStringStream *)(this + 0x10)); return; }
34,833
mysql_real_query_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_real_query_start(int *ret, MYSQL *mysql, const char *stmt_str, unsigned long length) { int res; struct mysql_async_context *b; struct mysql_real_query_params parms; b= mysql->options.extension->async_context; { WIN_SET_NONBLOCKING(mysql) parms.mysql= mysql; parms.stmt_str= stmt_str; parms.length= length; } b->active= 1; res= my_context_spawn(&b->async_context, mysql_real_query_start_internal, &parms); b->active= b->suspended= 0; if (res > 0) { /* Suspended. */ b->suspended= 1; return b->events_to_wait_for; } if (res < 0) { set_mariadb_error((mysql), CR_OUT_OF_MEMORY, unknown_sqlstate); *ret= 1; } else *ret= b->ret_result.r_int; return 0; }
O3
c
mysql_real_query_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x480(%rsi), %rax movq 0x28(%rax), %r15 leaq -0x30(%rbp), %rax movq %rsi, (%rax) movq %rdx, 0x8(%rax) movq %rcx, 0x10(%rax) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0x8c(%rip), %rsi # 0x2900d movq %rax, %rdx callq 0x2da54 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x28f9e movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x29002 js 0x28fa6 movl 0x8(%r15), %eax jmp 0x28ffe movl $0x7d8, 0x90(%r14) # imm = 0x7D8 leaq 0x297(%r14), %rdi leaq 0x1fb01(%rip), %rax # 0x48ac0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r15d, %r15d movb %r15b, 0x29c(%r14) leaq 0x97(%r14), %rdi leaq 0x1faec(%rip), %rax # 0x48ad0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movb %r15b, 0x296(%r14) movl $0x1, %eax movl %eax, (%rbx) xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_real_query_start: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rax, [rsi+480h] mov r15, [rax+28h] lea rax, [rbp+var_30] mov [rax], rsi mov [rax+8], rdx mov [rax+10h], rcx mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_real_query_start_internal mov rdx, rax call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_28F9E mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_29002 loc_28F9E: js short loc_28FA6 mov eax, [r15+8] jmp short loc_28FFE loc_28FA6: mov dword ptr [r14+90h], 7D8h lea rdi, [r14+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r15d, r15d mov [r14+29Ch], r15b lea rdi, [r14+97h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov [r14+296h], r15b mov eax, 1 loc_28FFE: mov [rbx], eax xor eax, eax loc_29002: add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
long long mysql_real_query_start(int *a1, long long a2, long long a3, long long a4) { unsigned int *v4; // r15 int v5; // eax int v7; // eax _QWORD v8[6]; // [rsp+0h] [rbp-30h] BYREF v4 = *(unsigned int **)(*(_QWORD *)(a2 + 1152) + 40LL); v8[0] = a2; v8[1] = a3; v8[2] = a4; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_real_query_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 <= 0 ) { if ( v5 < 0 ) { *(_DWORD *)(a2 + 144) = 2008; strncpy(a2 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a2 + 668) = 0; strncpy(a2 + 151, client_errors[8], 511LL); *(_BYTE *)(a2 + 662) = 0; v7 = 1; } else { v7 = v4[2]; } *a1 = v7; return 0LL; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } }
mysql_real_query_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RAX,[RBP + -0x30] MOV qword ptr [RAX],RSI MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x12900d] MOV RDX,RAX CALL 0x0012da54 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x00128f9e MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x00129002 LAB_00128f9e: JS 0x00128fa6 MOV EAX,dword ptr [R15 + 0x8] JMP 0x00128ffe LAB_00128fa6: MOV dword ptr [R14 + 0x90],0x7d8 LEA RDI,[R14 + 0x297] LEA RAX,[0x148ac0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R15D,R15D MOV byte ptr [R14 + 0x29c],R15B LEA RDI,[R14 + 0x97] LEA RAX,[0x148ad0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV byte ptr [R14 + 0x296],R15B MOV EAX,0x1 LAB_00128ffe: MOV dword ptr [RBX],EAX XOR EAX,EAX LAB_00129002: ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_real_query_start(int4 *param_1,long param_2,int8 param_3,int8 param_4) { int4 *puVar1; int iVar2; int4 uVar3; long local_38; int8 local_30; int8 local_28; puVar1 = *(int4 **)(*(long *)(param_2 + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; local_38 = param_2; local_30 = param_3; local_28 = param_4; iVar2 = my_context_spawn(puVar1 + 0xe,mysql_real_query_start_internal,&local_38); *(int2 *)(puVar1 + 5) = 0; if (iVar2 < 1) { if (iVar2 < 0) { *(int4 *)(param_2 + 0x90) = 0x7d8; strncpy((char *)(param_2 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_2 + 0x29c) = 0; strncpy((char *)(param_2 + 0x97),PTR_s_Client_run_out_of_memory_00148b10,0x1ff); *(int1 *)(param_2 + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } *param_1 = uVar3; uVar3 = 0; } else { *(int1 *)((long)puVar1 + 0x15) = 1; uVar3 = *puVar1; } return uVar3; }
34,834
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
monkey531[P]llama/common/json.hpp
boundaries compute_boundaries(FloatType value) { JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // Convert the IEEE representation into a diyfp. // // If v is denormal: // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) // If v is normalized: // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) static_assert(std::numeric_limits<FloatType>::is_iec559, "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit) constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1); constexpr int kMinExp = 1 - kBias; constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type; const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value)); const std::uint64_t E = bits >> (kPrecision - 1); const std::uint64_t F = bits & (kHiddenBit - 1); const bool is_denormal = E == 0; const diyfp v = is_denormal ? diyfp(F, kMinExp) : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias); // Compute the boundaries m- and m+ of the floating-point value // v = f * 2^e. // // Determine v- and v+, the floating-point predecessor and successor if v, // respectively. // // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) // // v+ = v + 2^e // // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ // between m- and m+ round to v, regardless of how the input rounding // algorithm breaks ties. // // ---+-------------+-------------+-------------+-------------+--- (A) // v- m- v m+ v+ // // -----------------+------+------+-------------+-------------+--- (B) // v- m- v m+ v+ const bool lower_boundary_is_closer = F == 0 && E > 1; const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); const diyfp m_minus = lower_boundary_is_closer ? diyfp(4 * v.f - 1, v.e - 2) // (B) : diyfp(2 * v.f - 1, v.e - 1); // (A) // Determine the normalized w+ = m+. const diyfp w_plus = diyfp::normalize(m_plus); // Determine w- = m- such that e_(w-) = e_(w+). const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); return {diyfp::normalize(v), w_minus, w_plus}; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %xmm0, %rax movq %rax, %rcx btrq $0x3f, %rcx movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000 cmpq %rdx, %rcx jge 0x89400 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0x8941c movq %rdi, %rbx movabsq $0x10000000000000, %rcx # imm = 0x10000000000000 decq %rcx andq %rax, %rcx movq %rax, %rdx shrq $0x34, %rdx movq %rcx, %r14 btsq $0x34, %r14 leal -0x433(%rdx), %esi testq %rdx, %rdx cmoveq %rcx, %r14 movl $0xfffffbce, %r15d # imm = 0xFFFFFBCE cmovnel %esi, %r15d testq %rcx, %rcx sete %cl shrq $0x35, %rax setne %al leal -0x1(%r15), %esi addl $0xfffffbcb, %edx # imm = 0xFFFFFBCB testb %cl, %al cmovel %esi, %edx leaq -0x1(%r14,%r14), %rax movabsq $0x3fffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFF cmoveq %rax, %rcx leaq 0x8(%rsp), %r12 movq %rcx, (%r12) movl %edx, 0x8(%r12) leaq 0x1(,%r14,2), %rdi callq 0x8956c movq %rax, (%rsp) movl %edx, %ebp movq %r12, %rdi movl %edx, %esi callq 0x895ac movq %rax, %r12 movl %edx, %r13d movq %r14, %rdi movl %r15d, %esi callq 0x8956c movq %rax, (%rbx) movl %edx, 0x8(%rbx) movq %r12, 0x10(%rbx) movl %r13d, 0x18(%rbx) movq (%rsp), %rax movq %rax, 0x20(%rbx) movl %ebp, 0x28(%rbx) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x27fd5(%rip), %rdi # 0xb13dc leaq 0x21f50(%rip), %rdx # 0xab35e leaq 0x2d654(%rip), %rcx # 0xb6a69 movl $0x42cb, %esi # imm = 0x42CB jmp 0x89436 leaq 0x27fb9(%rip), %rdi # 0xb13dc leaq 0x21f34(%rip), %rdx # 0xab35e leaq 0x2d751(%rip), %rcx # 0xb6b82 movl $0x42cc, %esi # imm = 0x42CC xorl %eax, %eax callq 0x23f60
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h movq rax, xmm0 mov rcx, rax btr rcx, 3Fh ; '?' mov rdx, 7FF0000000000000h cmp rcx, rdx jge loc_89400 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe loc_8941C mov rbx, rdi mov rcx, 10000000000000h dec rcx and rcx, rax mov rdx, rax shr rdx, 34h mov r14, rcx bts r14, 34h ; '4' lea esi, [rdx-433h] test rdx, rdx cmovz r14, rcx mov r15d, 0FFFFFBCEh cmovnz r15d, esi test rcx, rcx setz cl shr rax, 35h setnz al lea esi, [r15-1] add edx, 0FFFFFBCBh test al, cl cmovz edx, esi lea rax, [r14+r14-1] mov rcx, 3FFFFFFFFFFFFFh cmovz rcx, rax lea r12, [rsp+48h+var_40] mov [r12], rcx mov [r12+8], edx lea rdi, ds:1[r14*2] call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov [rsp+48h+var_48], rax mov ebp, edx mov rdi, r12 mov esi, edx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp12normalize_toERKS3_i; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,int) mov r12, rax mov r13d, edx mov rdi, r14 mov esi, r15d call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov [rbx], rax mov [rbx+8], edx mov [rbx+10h], r12 mov [rbx+18h], r13d mov rax, [rsp+48h+var_48] mov [rbx+20h], rax mov [rbx+28h], ebp mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_89400: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 42CBh jmp short loc_89436 loc_8941C: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 42CCh loc_89436: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>( long long a1, double a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9, long long a10, long long a11) { long long v11; // r14 int v12; // r15d bool v13; // cl bool v14; // al int v15; // edx bool v16; // zf long long v17; // rcx unsigned int v18; // edx unsigned int v19; // ebp long long v20; // r12 int v21; // edx int v22; // r13d int v23; // edx long long v25; // rsi long long v26; // rdx long long v27; // rcx long long v28; // r8 long long v29; // r9 long long v30; // [rsp+0h] [rbp-48h] long long v31; // [rsp+8h] [rbp-40h] BYREF int v32; // [rsp+10h] [rbp-38h] if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v25 = 17099LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17099LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v25, v26, v27, v28, v29, a8, a9, a10, a11); } if ( a2 <= 0.0 ) { v25 = 17100LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17100LL, "GGML_ASSERT(%s) failed", "value > 0"); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v25, v26, v27, v28, v29, a8, a9, a10, a11); } v11 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL | 0x10000000000000LL; if ( !(*(_QWORD *)&a2 >> 52) ) v11 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL; v12 = -1074; if ( *(_QWORD *)&a2 >> 52 ) v12 = (*(_QWORD *)&a2 >> 52) - 1075; v13 = (*(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL) == 0; v14 = *(_QWORD *)&a2 >> 53 != 0LL; v15 = (*(_QWORD *)&a2 >> 52) - 1077; v16 = !v13 || !v14; if ( !v13 || !v14 ) v15 = v12 - 1; v17 = 0x3FFFFFFFFFFFFFLL; if ( v16 ) v17 = 2 * v11 - 1; v31 = v17; v32 = v15; v30 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(2 * v11 + 1); v19 = v18; v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(&v31, v18); v22 = v21; *(_QWORD *)a1 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(v11); *(_DWORD *)(a1 + 8) = v23; *(_QWORD *)(a1 + 16) = v20; *(_DWORD *)(a1 + 24) = v22; *(_QWORD *)(a1 + 32) = v30; *(_DWORD *)(a1 + 40) = v19; return a1; }
compute_boundaries<double>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOVQ RAX,XMM0 MOV RCX,RAX BTR RCX,0x3f MOV RDX,0x7ff0000000000000 CMP RCX,RDX JGE 0x00189400 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x0018941c MOV RBX,RDI MOV RCX,0x10000000000000 DEC RCX AND RCX,RAX MOV RDX,RAX SHR RDX,0x34 MOV R14,RCX BTS R14,0x34 LEA ESI,[RDX + -0x433] TEST RDX,RDX CMOVZ R14,RCX MOV R15D,0xfffffbce CMOVNZ R15D,ESI TEST RCX,RCX SETZ CL SHR RAX,0x35 SETNZ AL LEA ESI,[R15 + -0x1] ADD EDX,0xfffffbcb TEST AL,CL CMOVZ EDX,ESI LEA RAX,[R14 + R14*0x1 + -0x1] MOV RCX,0x3fffffffffffff CMOVZ RCX,RAX LEA R12,[RSP + 0x8] MOV qword ptr [R12],RCX MOV dword ptr [R12 + 0x8],EDX LEA RDI,[0x1 + R14*0x2] CALL 0x0018956c MOV qword ptr [RSP],RAX MOV EBP,EDX MOV RDI,R12 MOV ESI,EDX CALL 0x001895ac MOV R12,RAX MOV R13D,EDX MOV RDI,R14 MOV ESI,R15D CALL 0x0018956c MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x8],EDX MOV qword ptr [RBX + 0x10],R12 MOV dword ptr [RBX + 0x18],R13D MOV RAX,qword ptr [RSP] MOV qword ptr [RBX + 0x20],RAX MOV dword ptr [RBX + 0x28],EBP MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00189400: LEA RDI,[0x1b13dc] LEA RDX,[0x1ab35e] LEA RCX,[0x1b6a69] MOV ESI,0x42cb JMP 0x00189436 LAB_0018941c: LEA RDI,[0x1b13dc] LEA RDX,[0x1ab35e] LEA RCX,[0x1b6b82] MOV ESI,0x42cc LAB_00189436: XOR EAX,EAX CALL 0x00123f60
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) */ dtoa_impl * __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double> (dtoa_impl *this,double param_1) { uint uVar1; diyfp *pdVar2; char *pcVar3; int8 uVar4; diyfp *pdVar5; int iVar6; bool bVar7; int1 auVar8 [12]; int1 auVar9 [12]; int1 auVar10 [12]; long local_40; int local_38; if ((ulong)ABS(param_1) < 0x7ff0000000000000) { if (0.0 < param_1) { pdVar2 = (diyfp *)((ulong)param_1 & 0xfffffffffffff); uVar1 = (uint)((ulong)param_1 >> 0x20); bVar7 = (ulong)param_1 >> 0x34 == 0; pdVar5 = (diyfp *)((ulong)pdVar2 | 0x10000000000000); if (bVar7) { pdVar5 = pdVar2; } iVar6 = -0x432; if (!bVar7) { iVar6 = (uVar1 >> 0x14) - 0x433; } bVar7 = (ulong)param_1 >> 0x35 == 0; local_38 = (uVar1 >> 0x14) - 0x435; if (bVar7 || pdVar2 != (diyfp *)0x0) { local_38 = iVar6 + -1; } local_40 = 0x3fffffffffffff; if (bVar7 || pdVar2 != (diyfp *)0x0) { local_40 = (long)pdVar5 * 2 + -1; } auVar8 = diyfp::normalize((diyfp *)((long)pdVar5 * 2 + 1)); auVar9 = diyfp::normalize_to((diyfp *)&local_40,auVar8._8_4_); auVar10 = diyfp::normalize(pdVar5,iVar6); *(int1 (*) [12])this = auVar10; *(int1 (*) [12])(this + 0x10) = auVar9; *(int1 (*) [12])(this + 0x20) = auVar8; return this; } pcVar3 = "value > 0"; uVar4 = 0x42cc; } else { pcVar3 = "std::isfinite(value)"; uVar4 = 0x42cb; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar4, "GGML_ASSERT(%s) failed",pcVar3); }
34,835
LefDefParser::defiGroup::propType(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiGroup.cpp
const char defiGroup::propType(int index) const { char msg[160]; if (index < 0 || index >= numProps_) { sprintf (msg, "ERROR (LEFPARS-6050): The index number %d given for the GROUP PROPERTY is invalid.\nValid index is from 0 to %d", index, numProps_); defiError(0, 6050, msg, defData); return 0; } return propTypes_[index]; }
O0
cpp
LefDefParser::defiGroup::propType(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x4d63e movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x5c(%rcx), %eax jl 0x4d687 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x5c(%rax), %ecx leaq 0x28889(%rip), %rsi # 0x75ee2 movb $0x0, %al callq 0x7060 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdx movq 0x88(%rax), %rcx xorl %edi, %edi movl $0x17a2, %esi # imm = 0x17A2 callq 0x2a600 movb $0x0, 0xc7(%rsp) jmp 0x4d6a5 movq 0x8(%rsp), %rax movq 0x80(%rax), %rax movslq 0xb4(%rsp), %rcx movb (%rax,%rcx), %al movb %al, 0xc7(%rsp) movb 0xc7(%rsp), %al addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
_ZNK12LefDefParser9defiGroup8propTypeEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_4D63E mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+5Ch] jl short loc_4D687 loc_4D63E: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+5Ch] lea rsi, aErrorLefpars60_0; "ERROR (LEFPARS-6050): The index number "... mov al, 0 call _sprintf mov rax, [rsp+0C8h+var_C0] lea rdx, [rsp+0C8h+var_B8]; int mov rcx, [rax+88h]; char * xor edi, edi; this mov esi, 17A2h; int call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) mov [rsp+0C8h+var_1], 0 jmp short loc_4D6A5 loc_4D687: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+80h] movsxd rcx, [rsp+0C8h+var_14] mov al, [rax+rcx] mov [rsp+0C8h+var_1], al loc_4D6A5: mov al, [rsp+0C8h+var_1] add rsp, 0C8h retn
char LefDefParser::defiGroup::propType(LefDefParser::defrData **this, int a2) { LefDefParser::defrData *v2; // r8 char v4[164]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::defiGroup *v6; // [rsp+B8h] [rbp-10h] v6 = (LefDefParser::defiGroup *)this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 23) ) return *((_BYTE *)this[16] + v5); sprintf( v4, "ERROR (LEFPARS-6050): The index number %d given for the GROUP PROPERTY is invalid.\nValid index is from 0 to %d", v5, *((_DWORD *)this + 23)); LefDefParser::defiError(0LL, 6050, v4, this[17], v2); return 0; }
propType: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x0014d63e MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x5c] JL 0x0014d687 LAB_0014d63e: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x5c] LEA RSI,[0x175ee2] MOV AL,0x0 CALL 0x00107060 MOV RAX,qword ptr [RSP + 0x8] LEA RDX,[RSP + 0x10] MOV RCX,qword ptr [RAX + 0x88] XOR EDI,EDI MOV ESI,0x17a2 CALL 0x0012a600 MOV byte ptr [RSP + 0xc7],0x0 JMP 0x0014d6a5 LAB_0014d687: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x80] MOVSXD RCX,dword ptr [RSP + 0xb4] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RSP + 0xc7],AL LAB_0014d6a5: MOV AL,byte ptr [RSP + 0xc7] ADD RSP,0xc8 RET
/* LefDefParser::defiGroup::propType(int) const */ int8 __thiscall LefDefParser::defiGroup::propType(defiGroup *this,int param_1) { int7 extraout_var; int7 uVar1; char local_b8 [164]; int local_14; defiGroup *local_10; int1 local_1; if ((param_1 < 0) || (*(int *)(this + 0x5c) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (LEFPARS-6050): The index number %d given for the GROUP PROPERTY is invalid.\nValid index is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x5c)); defiError(0,0x17a2,local_b8,*(defrData **)(this + 0x88)); local_1 = 0; uVar1 = extraout_var; } else { local_1 = *(int1 *)(*(long *)(this + 0x80) + (long)param_1); uVar1 = (int7)((ulong)*(long *)(this + 0x80) >> 8); } return CONCAT71(uVar1,local_1); }
34,836
mariadb_read_options
eloqsql/libmariadb/libmariadb/ma_default.c
my_bool _mariadb_read_options(MYSQL *mysql, const char *config_dir, const char *config_file, const char *group, unsigned int recursion) { int i= 0, exts, errors= 0; char filename[FN_REFLEN + 1]; unsigned int recursion_stop= 64; #ifndef _WIN32 char *env; #endif if (recursion >= recursion_stop) return 1; if (config_file && config_file[0]) return _mariadb_read_options_from_file(mysql, config_file, group, recursion); if (config_dir && config_dir[0]) { for (exts= 0; ini_exts[exts]; exts++) { snprintf(filename, FN_REFLEN, "%s%cmy.%s", config_dir, FN_LIBCHAR, ini_exts[exts]); if (!access(filename, R_OK)) errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion); } return errors; } for (i=0; i < MAX_CONFIG_DIRS && configuration_dirs[i]; i++) { for (exts= 0; ini_exts[exts]; exts++) { snprintf(filename, FN_REFLEN, "%s%cmy.%s", configuration_dirs[i], FN_LIBCHAR, ini_exts[exts]); if (!access(filename, R_OK)) errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion); } } #ifndef _WIN32 /* special case: .my.cnf in Home directory */ if ((env= getenv("HOME"))) { for (exts= 0; ini_exts[exts]; exts++) { snprintf(filename, FN_REFLEN, "%s%c.my.%s", env, FN_LIBCHAR, ini_exts[exts]); if (!access(filename, R_OK)) errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion); } } #endif return errors; }
O3
c
mariadb_read_options: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %rcx, -0x258(%rbp) movq %rdi, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movb $0x1, %r12b movl %r8d, -0x244(%rbp) cmpl $0x3f, %r8d jbe 0x434a0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x43683 movl %r12d, %eax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r9 testq %rdx, %rdx je 0x434ed cmpb $0x0, (%rdx) je 0x434ed movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x43683 movq -0x250(%rbp), %rdi movq %rdx, %rsi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x43688 testq %r9, %r9 je 0x4356b cmpb $0x0, (%r9) je 0x4356b leaq 0xad21(%rip), %r10 # 0x4e220 leaq 0xacd5(%rip), %r8 # 0x4e1db xorl %r12d, %r12d leaq -0x240(%rbp), %r14 movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movq %r14, %rdi movl $0x1, %edx xorl %eax, %eax pushq %r10 pushq $0x2f callq 0x142d0 addq $0x10, %rsp movq %r14, %rdi movl $0x4, %esi callq 0x14780 testl %eax, %eax jne 0x43478 leaq -0x240(%rbp), %rsi movq -0x250(%rbp), %rdi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx callq 0x43688 jmp 0x4367b xorl %r12d, %r12d leaq 0x212fb(%rip), %r15 # 0x64870 leaq 0xac5f(%rip), %r13 # 0x4e1db leaq -0x240(%rbp), %r14 xorl %ebx, %ebx movq (%r15), %rax movq (%rax,%rbx,8), %r9 testq %r9, %r9 je 0x435f5 movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movq %r14, %rdi movl $0x1, %edx movq %r13, %r8 xorl %eax, %eax leaq 0xac71(%rip), %r10 # 0x4e220 pushq %r10 pushq $0x2f callq 0x142d0 addq $0x10, %rsp movq %r14, %rdi movl $0x4, %esi callq 0x14780 testl %eax, %eax jne 0x435ec movq -0x250(%rbp), %rdi movq %r14, %rsi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx callq 0x43688 addb %al, %r12b incq %rbx cmpq $0x6, %rbx jne 0x43585 leaq 0xabcf(%rip), %rdi # 0x4e1cb callq 0x145b0 testq %rax, %rax je 0x43478 leaq 0xabd4(%rip), %r8 # 0x4e1e5 leaq -0x240(%rbp), %r14 movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movq %r14, %rdi movl $0x1, %edx movq %rax, %r9 xorl %eax, %eax leaq 0xabea(%rip), %r10 # 0x4e220 pushq %r10 pushq $0x2f callq 0x142d0 addq $0x10, %rsp movq %r14, %rdi movl $0x4, %esi callq 0x14780 testl %eax, %eax jne 0x43478 leaq -0x240(%rbp), %rsi movq -0x250(%rbp), %rdi movq -0x258(%rbp), %rdx movl -0x244(%rbp), %ecx callq 0x43688 addb %r12b, %al movl %eax, %r12d jmp 0x43478 callq 0x14520
_mariadb_read_options: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 238h mov [rbp+var_258], rcx mov [rbp+var_250], rdi mov rax, fs:28h mov [rbp+var_30], rax mov r12b, 1 mov [rbp+var_244], r8d cmp r8d, 3Fh ; '?' jbe short loc_434A0 loc_43478: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_43683 mov eax, r12d add rsp, 238h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_434A0: mov r9, rsi test rdx, rdx jz short loc_434ED cmp byte ptr [rdx], 0 jz short loc_434ED mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_43683 mov rdi, [rbp+var_250] mov rsi, rdx mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] add rsp, 238h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _mariadb_read_options_from_file loc_434ED: test r9, r9 jz short loc_4356B cmp byte ptr [r9], 0 jz short loc_4356B lea r10, aCnf; "cnf" lea r8, aSCmyS; "%s%cmy.%s" xor r12d, r12d lea r14, [rbp+var_240] mov esi, 200h mov ecx, 201h mov rdi, r14 mov edx, 1 xor eax, eax push r10 push 2Fh ; '/' call ___snprintf_chk add rsp, 10h mov rdi, r14 mov esi, 4 call _access test eax, eax jnz loc_43478 lea rsi, [rbp+var_240] mov rdi, [rbp+var_250] mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] call _mariadb_read_options_from_file jmp loc_4367B loc_4356B: xor r12d, r12d lea r15, configuration_dirs lea r13, aSCmyS; "%s%cmy.%s" lea r14, [rbp+var_240] xor ebx, ebx loc_43585: mov rax, [r15] mov r9, [rax+rbx*8] test r9, r9 jz short loc_435F5 mov esi, 200h mov ecx, 201h mov rdi, r14 mov edx, 1 mov r8, r13 xor eax, eax lea r10, aCnf; "cnf" push r10 push 2Fh ; '/' call ___snprintf_chk add rsp, 10h mov rdi, r14 mov esi, 4 call _access test eax, eax jnz short loc_435EC mov rdi, [rbp+var_250] mov rsi, r14 mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] call _mariadb_read_options_from_file add r12b, al loc_435EC: inc rbx cmp rbx, 6 jnz short loc_43585 loc_435F5: lea rdi, aMariadbHome+8; "HOME" call _getenv test rax, rax jz loc_43478 lea r8, aSCMyS; "%s%c.my.%s" lea r14, [rbp+var_240] mov esi, 200h mov ecx, 201h mov rdi, r14 mov edx, 1 mov r9, rax xor eax, eax lea r10, aCnf; "cnf" push r10 push 2Fh ; '/' call ___snprintf_chk add rsp, 10h mov rdi, r14 mov esi, 4 call _access test eax, eax jnz loc_43478 lea rsi, [rbp+var_240] mov rdi, [rbp+var_250] mov rdx, [rbp+var_258] mov ecx, [rbp+var_244] call _mariadb_read_options_from_file add al, r12b loc_4367B: mov r12d, eax jmp loc_43478 loc_43683: call ___stack_chk_fail
long long mariadb_read_options(long long a1, const char *a2, _BYTE *a3, long long a4, unsigned int a5) { unsigned int v5; // r12d double v7; // xmm0_8 unsigned int options_from_file; // eax long long i; // rbx const char *v10; // r9 double v11; // xmm0_8 const char *v12; // rax double v13; // xmm0_8 _BYTE v16[528]; // [rsp+20h] [rbp-240h] BYREF unsigned long long v17; // [rsp+230h] [rbp-30h] v17 = __readfsqword(0x28u); LOBYTE(v5) = 1; if ( a5 > 0x3F ) return v5; if ( !a3 || !*a3 ) { if ( a2 && *a2 ) { v5 = 0; v7 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%cmy.%s", a2, 47LL, "cnf"); if ( (unsigned int)access(v16, 4LL, v7) ) return v5; return (unsigned int)mariadb_read_options_from_file(a1, v16, a4, a5); } else { v5 = 0; for ( i = 0LL; i != 6; ++i ) { v10 = *(const char **)(configuration_dirs + 8 * i); if ( !v10 ) break; v11 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%cmy.%s", v10, 47LL, "cnf"); if ( !(unsigned int)access(v16, 4LL, v11) ) LOBYTE(v5) = mariadb_read_options_from_file(a1, v16, a4, a5) + v5; } v12 = (const char *)getenv("HOME"); if ( !v12 ) return v5; v13 = __snprintf_chk(v16, 512LL, 1LL, 513LL, "%s%c.my.%s", v12, 47LL, "cnf"); if ( (unsigned int)access(v16, 4LL, v13) ) return v5; options_from_file = mariadb_read_options_from_file(a1, v16, a4, a5); LOBYTE(options_from_file) = v5 + options_from_file; } return options_from_file; } return mariadb_read_options_from_file(a1, a3, a4, a5); }
_mariadb_read_options: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x238 MOV qword ptr [RBP + -0x258],RCX MOV qword ptr [RBP + -0x250],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R12B,0x1 MOV dword ptr [RBP + -0x244],R8D CMP R8D,0x3f JBE 0x001434a0 LAB_00143478: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00143683 MOV EAX,R12D ADD RSP,0x238 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001434a0: MOV R9,RSI TEST RDX,RDX JZ 0x001434ed CMP byte ptr [RDX],0x0 JZ 0x001434ed MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00143683 MOV RDI,qword ptr [RBP + -0x250] MOV RSI,RDX MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] ADD RSP,0x238 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00143688 LAB_001434ed: TEST R9,R9 JZ 0x0014356b CMP byte ptr [R9],0x0 JZ 0x0014356b LEA R10,[0x14e220] LEA R8,[0x14e1db] XOR R12D,R12D LEA R14,[RBP + -0x240] MOV ESI,0x200 MOV ECX,0x201 MOV RDI,R14 MOV EDX,0x1 XOR EAX,EAX PUSH R10 PUSH 0x2f CALL 0x001142d0 ADD RSP,0x10 MOV RDI,R14 MOV ESI,0x4 CALL 0x00114780 TEST EAX,EAX JNZ 0x00143478 LEA RSI,[RBP + -0x240] MOV RDI,qword ptr [RBP + -0x250] MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] CALL 0x00143688 JMP 0x0014367b LAB_0014356b: XOR R12D,R12D LEA R15,[0x164870] LEA R13,[0x14e1db] LEA R14,[RBP + -0x240] XOR EBX,EBX LAB_00143585: MOV RAX,qword ptr [R15] MOV R9,qword ptr [RAX + RBX*0x8] TEST R9,R9 JZ 0x001435f5 MOV ESI,0x200 MOV ECX,0x201 MOV RDI,R14 MOV EDX,0x1 MOV R8,R13 XOR EAX,EAX LEA R10,[0x14e220] PUSH R10 PUSH 0x2f CALL 0x001142d0 ADD RSP,0x10 MOV RDI,R14 MOV ESI,0x4 CALL 0x00114780 TEST EAX,EAX JNZ 0x001435ec MOV RDI,qword ptr [RBP + -0x250] MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] CALL 0x00143688 ADD R12B,AL LAB_001435ec: INC RBX CMP RBX,0x6 JNZ 0x00143585 LAB_001435f5: LEA RDI,[0x14e1cb] CALL 0x001145b0 TEST RAX,RAX JZ 0x00143478 LEA R8,[0x14e1e5] LEA R14,[RBP + -0x240] MOV ESI,0x200 MOV ECX,0x201 MOV RDI,R14 MOV EDX,0x1 MOV R9,RAX XOR EAX,EAX LEA R10,[0x14e220] PUSH R10 PUSH 0x2f CALL 0x001142d0 ADD RSP,0x10 MOV RDI,R14 MOV ESI,0x4 CALL 0x00114780 TEST EAX,EAX JNZ 0x00143478 LEA RSI,[RBP + -0x240] MOV RDI,qword ptr [RBP + -0x250] MOV RDX,qword ptr [RBP + -0x258] MOV ECX,dword ptr [RBP + -0x244] CALL 0x00143688 ADD AL,R12B LAB_0014367b: MOV R12D,EAX JMP 0x00143478 LAB_00143683: CALL 0x00114520
ulong _mariadb_read_options (int8 param_1,char *param_2,char *param_3,int8 param_4,uint param_5) { long lVar1; char cVar2; int iVar3; uint uVar4; ulong uVar5; char *pcVar6; int8 uVar7; long lVar8; int8 unaff_R12; long in_FS_OFFSET; char local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar5 = CONCAT71((int7)((ulong)unaff_R12 >> 8),1); if (param_5 < 0x40) { if ((param_3 != (char *)0x0) && (*param_3 != '\0')) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { uVar5 = _mariadb_read_options_from_file(param_1,param_3,param_4,param_5); return uVar5; } goto LAB_00143683; } if ((param_2 == (char *)0x0) || (*param_2 == '\0')) { uVar5 = 0; lVar8 = 0; do { lVar1 = *(long *)(configuration_dirs + lVar8 * 8); if (lVar1 == 0) break; __snprintf_chk(local_248,0x200,1,0x201,"%s%cmy.%s",lVar1,0x2f,&DAT_0014e220); iVar3 = access(local_248,4); if (iVar3 == 0) { cVar2 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5); uVar5 = (ulong)(byte)((char)uVar5 + cVar2); } lVar8 = lVar8 + 1; } while (lVar8 != 6); pcVar6 = getenv("HOME"); if (pcVar6 != (char *)0x0) { __snprintf_chk(local_248,0x200,1,0x201,"%s%c.my.%s",pcVar6,0x2f,&DAT_0014e220); iVar3 = access(local_248,4); if (iVar3 == 0) { uVar7 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5); uVar4 = (uint)CONCAT71((int7)((ulong)uVar7 >> 8),(char)uVar7 + (char)uVar5); goto LAB_0014367b; } } } else { uVar5 = 0; __snprintf_chk(local_248,0x200,1,0x201,"%s%cmy.%s",param_2,0x2f,&DAT_0014e220); iVar3 = access(local_248,4); if (iVar3 == 0) { uVar4 = _mariadb_read_options_from_file(param_1,local_248,param_4,param_5); LAB_0014367b: uVar5 = (ulong)uVar4; } } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar5 & 0xffffffff; } LAB_00143683: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
34,837
list_add
eloqsql/mysys/list.c
LIST *list_add(LIST *root, LIST *element) { DBUG_ENTER("list_add"); DBUG_PRINT("enter",("root: %p element: %p", root, element)); if (root) { if (root->prev) /* If add in mid of list */ root->prev->next= element; element->prev=root->prev; root->prev=element; } else element->prev=0; element->next=root; DBUG_RETURN(element); /* New root */ }
O0
c
list_add: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe071e cmpq $0x0, -0x8(%rbp) je 0xe0759 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0xe073e movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) jmp 0xe0764 movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax popq %rbp retq nop
list_add: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E071E: cmp [rbp+var_8], 0 jz short loc_E0759 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_E073E mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx loc_E073E: mov rax, [rbp+var_8] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx jmp short loc_E0764 loc_E0759: mov rax, [rbp+var_10] mov qword ptr [rax], 0 loc_E0764: mov rcx, [rbp+var_8] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rax, [rbp+var_18] pop rbp retn
_QWORD * list_add(long long a1, _QWORD *a2) { if ( a1 ) { if ( *(_QWORD *)a1 ) *(_QWORD *)(*(_QWORD *)a1 + 8LL) = a2; *a2 = *(_QWORD *)a1; *(_QWORD *)a1 = a2; } else { *a2 = 0LL; } a2[1] = a1; return a2; }
list_add: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e071e LAB_001e071e: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001e0759 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x001e073e MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX LAB_001e073e: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX JMP 0x001e0764 LAB_001e0759: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 LAB_001e0764: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
long * list_add(long *param_1,long *param_2) { if (param_1 == (long *)0x0) { *param_2 = 0; } else { if (*param_1 != 0) { *(long **)(*param_1 + 8) = param_2; } *param_2 = *param_1; *param_1 = (long)param_2; } param_2[1] = (long)param_1; return param_2; }
34,838
ps_fetch_from_1_to_8_bytes
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
void ps_fetch_from_1_to_8_bytes(MYSQL_BIND *r_param, const MYSQL_FIELD * const field, unsigned char **row, unsigned int byte_count) { my_bool is_unsigned= test(field->flags & UNSIGNED_FLAG); r_param->buffer_length= byte_count; switch (byte_count) { case 1: *(uchar *)r_param->buffer= **row; *r_param->error= is_unsigned != r_param->is_unsigned && *(uchar *)r_param->buffer > INT_MAX8; break; case 2: shortstore(r_param->buffer, ((ushort) sint2korr(*row))); *r_param->error= is_unsigned != r_param->is_unsigned && *(ushort *)r_param->buffer > INT_MAX16; break; case 4: { longstore(r_param->buffer, ((uint32)sint4korr(*row))); *r_param->error= is_unsigned != r_param->is_unsigned && *(uint32 *)r_param->buffer > INT_MAX32; } break; case 8: { ulonglong val= (ulonglong)sint8korr(*row); longlongstore(r_param->buffer, val); *r_param->error= is_unsigned != r_param->is_unsigned && val > LONGLONG_MAX ; } break; default: r_param->buffer_length= 0; break; } (*row)+= byte_count; }
O3
c
ps_fetch_from_1_to_8_bytes: pushq %rbp movq %rsp, %rbp movb 0x64(%rsi), %sil movl %ecx, %eax movq %rax, 0x40(%rdi) decl %ecx cmpl $0x7, %ecx ja 0x2386f shrb $0x5, %sil andb $0x1, %sil leaq 0x15a9c(%rip), %r8 # 0x39230 movslq (%r8,%rcx,4), %rcx addq %r8, %rcx jmpq *%rcx movq (%rdx), %rcx movb (%rcx), %cl movq 0x10(%rdi), %r8 movb %cl, (%r8) cmpb 0x65(%rdi), %sil je 0x23822 movq 0x10(%rdi), %rcx movb (%rcx), %cl shrb $0x7, %cl jmp 0x23883 movq (%rdx), %rcx movb (%rcx), %cl movq 0x10(%rdi), %r8 movb %cl, (%r8) movq (%rdx), %rcx movb 0x1(%rcx), %cl movq 0x10(%rdi), %r8 movb %cl, 0x1(%r8) movq (%rdx), %rcx movb 0x2(%rcx), %cl movq 0x10(%rdi), %r8 movb %cl, 0x2(%r8) movq (%rdx), %rcx movb 0x3(%rcx), %cl movq 0x10(%rdi), %r8 movb %cl, 0x3(%r8) cmpb 0x65(%rdi), %sil je 0x23822 movq 0x10(%rdi), %rcx movl (%rcx), %ecx shrl $0x1f, %ecx jmp 0x23883 movq (%rdx), %rcx movb (%rcx), %r8b movb 0x1(%rcx), %cl movq 0x10(%rdi), %r9 movb %r8b, (%r9) movq 0x10(%rdi), %r8 movb %cl, 0x1(%r8) cmpb 0x65(%rdi), %sil jne 0x23879 xorl %ecx, %ecx jmp 0x23883 movq (%rdx), %rcx movl (%rcx), %r8d movzwl 0x4(%rcx), %r9d shlq $0x20, %r9 orq %r8, %r9 movzbl 0x6(%rcx), %r8d movzbl 0x7(%rcx), %ecx shlq $0x38, %rcx shlq $0x30, %r8 orq %r9, %r8 orq %rcx, %r8 movq 0x10(%rdi), %r9 movq %r8, (%r9) cmpb 0x65(%rdi), %sil setne %sil testq %rcx, %rcx sets %cl andb %sil, %cl movq 0x18(%rdi), %rsi movb %cl, (%rsi) jmp 0x23889 movq $0x0, 0x40(%rdi) jmp 0x23889 movq 0x10(%rdi), %rcx movzwl (%rcx), %ecx shrl $0xf, %ecx movq 0x18(%rdi), %rsi movb %cl, (%rsi) addq %rax, (%rdx) popq %rbp retq
ps_fetch_from_1_to_8_bytes: push rbp mov rbp, rsp mov sil, [rsi+64h] mov eax, ecx mov [rdi+40h], rax dec ecx; switch 8 cases cmp ecx, 7 ja def_2379B; jumptable 000000000002379B default case, cases 3,5-7 shr sil, 5 and sil, 1 lea r8, jpt_2379B movsxd rcx, ds:(jpt_2379B - 39230h)[r8+rcx*4] add rcx, r8 jmp rcx; switch jump loc_2379D: mov rcx, [rdx]; jumptable 000000000002379B case 1 mov cl, [rcx] mov r8, [rdi+10h] mov [r8], cl cmp sil, [rdi+65h] jz short loc_23822 mov rcx, [rdi+10h] mov cl, [rcx] shr cl, 7 jmp loc_23883 loc_237BD: mov rcx, [rdx]; jumptable 000000000002379B case 4 mov cl, [rcx] mov r8, [rdi+10h] mov [r8], cl mov rcx, [rdx] mov cl, [rcx+1] mov r8, [rdi+10h] mov [r8+1], cl mov rcx, [rdx] mov cl, [rcx+2] mov r8, [rdi+10h] mov [r8+2], cl mov rcx, [rdx] mov cl, [rcx+3] mov r8, [rdi+10h] mov [r8+3], cl cmp sil, [rdi+65h] jz short loc_23822 mov rcx, [rdi+10h] mov ecx, [rcx] shr ecx, 1Fh jmp short loc_23883 loc_23804: mov rcx, [rdx]; jumptable 000000000002379B case 2 mov r8b, [rcx] mov cl, [rcx+1] mov r9, [rdi+10h] mov [r9], r8b mov r8, [rdi+10h] mov [r8+1], cl cmp sil, [rdi+65h] jnz short loc_23879 loc_23822: xor ecx, ecx jmp short loc_23883 loc_23826: mov rcx, [rdx]; jumptable 000000000002379B case 8 mov r8d, [rcx] movzx r9d, word ptr [rcx+4] shl r9, 20h or r9, r8 movzx r8d, byte ptr [rcx+6] movzx ecx, byte ptr [rcx+7] shl rcx, 38h shl r8, 30h or r8, r9 or r8, rcx mov r9, [rdi+10h] mov [r9], r8 cmp sil, [rdi+65h] setnz sil test rcx, rcx sets cl and cl, sil mov rsi, [rdi+18h] mov [rsi], cl jmp short loc_23889 def_2379B: mov qword ptr [rdi+40h], 0; jumptable 000000000002379B default case, cases 3,5-7 jmp short loc_23889 loc_23879: mov rcx, [rdi+10h] movzx ecx, word ptr [rcx] shr ecx, 0Fh loc_23883: mov rsi, [rdi+18h] mov [rsi], cl loc_23889: add [rdx], rax pop rbp retn
long long ps_fetch_from_1_to_8_bytes(long long a1, long long a2, _BYTE **a3, unsigned int a4) { char v4; // si long long result; // rax char v6; // si int v7; // ecx char v8; // cl signed long long v9; // rcx v4 = *(_BYTE *)(a2 + 100); result = a4; *(_QWORD *)(a1 + 64) = a4; v6 = (v4 & 0x20) != 0; switch ( a4 ) { case 1u: **(_BYTE **)(a1 + 16) = **a3; if ( v6 == *(_BYTE *)(a1 + 101) ) goto LABEL_7; LOBYTE(v7) = **(_BYTE **)(a1 + 16) >> 7; goto LABEL_11; case 2u: v8 = (*a3)[1]; **(_BYTE **)(a1 + 16) = **a3; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = v8; if ( v6 == *(_BYTE *)(a1 + 101) ) goto LABEL_7; v7 = **(unsigned __int16 **)(a1 + 16) >> 15; goto LABEL_11; case 4u: **(_BYTE **)(a1 + 16) = **a3; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = (*a3)[1]; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 2LL) = (*a3)[2]; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 3LL) = (*a3)[3]; if ( v6 == *(_BYTE *)(a1 + 101) ) LABEL_7: LOBYTE(v7) = 0; else v7 = **(_DWORD **)(a1 + 16) >> 31; LABEL_11: **(_BYTE **)(a1 + 24) = v7; break; case 8u: v9 = (unsigned long long)(unsigned __int8)(*a3)[7] << 56; **(_QWORD **)(a1 + 16) = v9 | *(unsigned int *)*a3 | ((unsigned long long)*((unsigned __int16 *)*a3 + 2) << 32) | ((unsigned long long)(unsigned __int8)(*a3)[6] << 48); **(_BYTE **)(a1 + 24) = v6 != *(_BYTE *)(a1 + 101) && v9 < 0; break; default: *(_QWORD *)(a1 + 64) = 0LL; break; } *a3 += result; return result; }
ps_fetch_from_1_to_8_bytes: PUSH RBP MOV RBP,RSP MOV SIL,byte ptr [RSI + 0x64] MOV EAX,ECX MOV qword ptr [RDI + 0x40],RAX DEC ECX CMP ECX,0x7 JA 0x0012386f SHR SIL,0x5 AND SIL,0x1 LEA R8,[0x139230] MOVSXD RCX,dword ptr [R8 + RCX*0x4] ADD RCX,R8 switchD: JMP RCX caseD_1: MOV RCX,qword ptr [RDX] MOV CL,byte ptr [RCX] MOV R8,qword ptr [RDI + 0x10] MOV byte ptr [R8],CL CMP SIL,byte ptr [RDI + 0x65] JZ 0x00123822 MOV RCX,qword ptr [RDI + 0x10] MOV CL,byte ptr [RCX] SHR CL,0x7 JMP 0x00123883 caseD_4: MOV RCX,qword ptr [RDX] MOV CL,byte ptr [RCX] MOV R8,qword ptr [RDI + 0x10] MOV byte ptr [R8],CL MOV RCX,qword ptr [RDX] MOV CL,byte ptr [RCX + 0x1] MOV R8,qword ptr [RDI + 0x10] MOV byte ptr [R8 + 0x1],CL MOV RCX,qword ptr [RDX] MOV CL,byte ptr [RCX + 0x2] MOV R8,qword ptr [RDI + 0x10] MOV byte ptr [R8 + 0x2],CL MOV RCX,qword ptr [RDX] MOV CL,byte ptr [RCX + 0x3] MOV R8,qword ptr [RDI + 0x10] MOV byte ptr [R8 + 0x3],CL CMP SIL,byte ptr [RDI + 0x65] JZ 0x00123822 MOV RCX,qword ptr [RDI + 0x10] MOV ECX,dword ptr [RCX] SHR ECX,0x1f JMP 0x00123883 caseD_2: MOV RCX,qword ptr [RDX] MOV R8B,byte ptr [RCX] MOV CL,byte ptr [RCX + 0x1] MOV R9,qword ptr [RDI + 0x10] MOV byte ptr [R9],R8B MOV R8,qword ptr [RDI + 0x10] MOV byte ptr [R8 + 0x1],CL CMP SIL,byte ptr [RDI + 0x65] JNZ 0x00123879 LAB_00123822: XOR ECX,ECX JMP 0x00123883 caseD_8: MOV RCX,qword ptr [RDX] MOV R8D,dword ptr [RCX] MOVZX R9D,word ptr [RCX + 0x4] SHL R9,0x20 OR R9,R8 MOVZX R8D,byte ptr [RCX + 0x6] MOVZX ECX,byte ptr [RCX + 0x7] SHL RCX,0x38 SHL R8,0x30 OR R8,R9 OR R8,RCX MOV R9,qword ptr [RDI + 0x10] MOV qword ptr [R9],R8 CMP SIL,byte ptr [RDI + 0x65] SETNZ SIL TEST RCX,RCX SETS CL AND CL,SIL MOV RSI,qword ptr [RDI + 0x18] MOV byte ptr [RSI],CL JMP 0x00123889 caseD_3: MOV qword ptr [RDI + 0x40],0x0 JMP 0x00123889 LAB_00123879: MOV RCX,qword ptr [RDI + 0x10] MOVZX ECX,word ptr [RCX] SHR ECX,0xf LAB_00123883: MOV RSI,qword ptr [RDI + 0x18] MOV byte ptr [RSI],CL LAB_00123889: ADD qword ptr [RDX],RAX POP RBP RET
void ps_fetch_from_1_to_8_bytes(long param_1,long param_2,long *param_3,uint param_4) { int1 uVar1; byte bVar2; byte bVar3; bVar3 = *(byte *)(param_2 + 100); *(ulong *)(param_1 + 0x40) = (ulong)param_4; if (param_4 - 1 < 8) { bVar3 = bVar3 >> 5 & 1; switch(param_4) { case 1: **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; if (bVar3 == *(byte *)(param_1 + 0x65)) { LAB_00123822: bVar3 = 0; } else { bVar3 = **(byte **)(param_1 + 0x10) >> 7; } break; case 2: uVar1 = ((int1 *)*param_3)[1]; **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; *(int1 *)(*(long *)(param_1 + 0x10) + 1) = uVar1; if (bVar3 == *(byte *)(param_1 + 0x65)) goto LAB_00123822; bVar3 = (byte)((ushort)**(int2 **)(param_1 + 0x10) >> 0xf); break; default: goto switchD_0012379b_caseD_3; case 4: **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; *(int1 *)(*(long *)(param_1 + 0x10) + 1) = *(int1 *)(*param_3 + 1); *(int1 *)(*(long *)(param_1 + 0x10) + 2) = *(int1 *)(*param_3 + 2); *(int1 *)(*(long *)(param_1 + 0x10) + 3) = *(int1 *)(*param_3 + 3); if (bVar3 == *(byte *)(param_1 + 0x65)) goto LAB_00123822; bVar3 = (byte)((uint)**(int4 **)(param_1 + 0x10) >> 0x1f); break; case 8: bVar2 = *(byte *)(*param_3 + 7); **(int8 **)(param_1 + 0x10) = *(int8 *)*param_3; *(bool *)*(int8 *)(param_1 + 0x18) = (long)((ulong)bVar2 << 0x38) < 0 && bVar3 != *(byte *)(param_1 + 0x65); goto LAB_00123889; } **(byte **)(param_1 + 0x18) = bVar3; } else { switchD_0012379b_caseD_3: *(int8 *)(param_1 + 0x40) = 0; } LAB_00123889: *param_3 = *param_3 + (ulong)param_4; return; }
34,839
mbr_join
eloqsql/storage/maria/ma_rt_split.c
static void mbr_join(double *a, const double *b, int n_dim) { double *end= a + n_dim * 2; do { if (a[0] > b[0]) a[0]= b[0]; if (a[1] < b[1]) a[1]= b[1]; a+= 2; b+= 2; } while (a != end); }
O0
c
mbr_join: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movl -0x14(%rbp), %ecx shll %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movsd (%rax), %xmm0 movq -0x10(%rbp), %rax ucomisd (%rax), %xmm0 jbe 0x86ed8 movq -0x10(%rbp), %rax movsd (%rax), %xmm0 movq -0x8(%rbp), %rax movsd %xmm0, (%rax) movq -0x8(%rbp), %rax movsd 0x8(%rax), %xmm1 movq -0x10(%rbp), %rax movsd 0x8(%rax), %xmm0 ucomisd %xmm1, %xmm0 jbe 0x86f02 movq -0x10(%rbp), %rax movsd 0x8(%rax), %xmm0 movq -0x8(%rbp), %rax movsd %xmm0, 0x8(%rax) movq -0x8(%rbp), %rax addq $0x10, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax addq $0x10, %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x86eb6 popq %rbp retq nopw %cs:(%rax,%rax)
mbr_join: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov ecx, [rbp+var_14] shl ecx, 1 movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rbp+var_20], rax loc_86EB6: mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax] mov rax, [rbp+var_10] ucomisd xmm0, qword ptr [rax] jbe short loc_86ED8 mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax] mov rax, [rbp+var_8] movsd qword ptr [rax], xmm0 loc_86ED8: mov rax, [rbp+var_8] movsd xmm1, qword ptr [rax+8] mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax+8] ucomisd xmm0, xmm1 jbe short loc_86F02 mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax+8] mov rax, [rbp+var_8] movsd qword ptr [rax+8], xmm0 loc_86F02: mov rax, [rbp+var_8] add rax, 10h mov [rbp+var_8], rax mov rax, [rbp+var_10] add rax, 10h mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp rax, [rbp+var_20] jnz short loc_86EB6 pop rbp retn
double * mbr_join(double *a1, double *a2, int a3) { double *result; // rax double *v5; // [rsp+18h] [rbp-8h] v5 = a1; do { if ( *v5 > *a2 ) *v5 = *a2; if ( a2[1] > v5[1] ) v5[1] = a2[1]; v5 += 2; a2 += 2; result = v5; } while ( v5 != &a1[2 * a3] ); return result; }
mbr_join: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x14] SHL ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_00186eb6: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] UCOMISD XMM0,qword ptr [RAX] JBE 0x00186ed8 MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOVSD qword ptr [RAX],XMM0 LAB_00186ed8: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM1,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX + 0x8] UCOMISD XMM0,XMM1 JBE 0x00186f02 MOV RAX,qword ptr [RBP + -0x10] MOVSD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOVSD qword ptr [RAX + 0x8],XMM0 LAB_00186f02: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x10 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00186eb6 POP RBP RET
void mbr_join(double *param_1,double *param_2,int param_3) { double *local_18; double *local_10; local_18 = param_2; local_10 = param_1; do { if (*local_18 <= *local_10 && *local_10 != *local_18) { *local_10 = *local_18; } if (local_10[1] < local_18[1]) { local_10[1] = local_18[1]; } local_10 = local_10 + 2; local_18 = local_18 + 2; } while (local_10 != param_1 + (param_3 << 1)); return; }
34,840
pvio_socket_write
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
ssize_t pvio_socket_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length) { ssize_t r; struct st_pvio_socket *csock; int timeout; int send_flags= MSG_DONTWAIT; #ifdef MSG_NOSIGNAL send_flags|= MSG_NOSIGNAL; #endif if (!pvio || !pvio->data) return -1; csock= (struct st_pvio_socket *)pvio->data; timeout = pvio->timeout[PVIO_WRITE_TIMEOUT]; while ((r = ma_send(csock->socket, (void *)buffer, length,send_flags)) == -1) { int err = socket_errno; if ((err != SOCKET_EAGAIN #ifdef HAVE_SOCKET_EWOULDBLOCK && err != SOCKET_EWOULDBLOCK #endif )|| timeout == 0) return r; if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 1) return -1; } return r; }
O0
c
pvio_socket_write: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl $0x40, -0x38(%rbp) movl -0x38(%rbp), %eax orl $0x4000, %eax # imm = 0x4000 movl %eax, -0x38(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3e3c7 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x3e3d1 movq $-0x1, -0x8(%rbp) jmp 0x3e44d movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x34(%rbp) movq -0x30(%rbp), %rax movl (%rax), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movl -0x38(%rbp), %ecx callq 0x3f920 movq %rax, -0x28(%rbp) cmpq $-0x1, %rax jne 0x3e445 callq 0x12040 movl (%rax), %eax movl %eax, -0x3c(%rbp) cmpl $0xb, -0x3c(%rbp) jne 0x3e41c cmpl $0x0, -0x34(%rbp) jne 0x3e426 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3e44d movq -0x10(%rbp), %rdi movl -0x34(%rbp), %edx xorl %esi, %esi callq 0x3e4f0 cmpl $0x1, %eax jge 0x3e443 movq $-0x1, -0x8(%rbp) jmp 0x3e44d jmp 0x3e3e6 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
pvio_socket_write: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_38], 40h ; '@' mov eax, [rbp+var_38] or eax, 4000h mov [rbp+var_38], eax cmp [rbp+var_10], 0 jz short loc_3E3C7 mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_3E3D1 loc_3E3C7: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_3E44D loc_3E3D1: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov [rbp+var_34], eax loc_3E3E6: mov rax, [rbp+var_30] mov edi, [rax] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov ecx, [rbp+var_38] call ma_send mov [rbp+var_28], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_3E445 call ___errno_location mov eax, [rax] mov [rbp+var_3C], eax cmp [rbp+var_3C], 0Bh jnz short loc_3E41C cmp [rbp+var_34], 0 jnz short loc_3E426 loc_3E41C: mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_3E44D loc_3E426: mov rdi, [rbp+var_10] mov edx, [rbp+var_34] xor esi, esi call pvio_socket_wait_io_or_timeout cmp eax, 1 jge short loc_3E443 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_3E44D loc_3E443: jmp short loc_3E3E6 loc_3E445: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_3E44D: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long pvio_socket_write(unsigned int **a1, long long a2, long long a3) { long long v3; // rdi unsigned int v5; // [rsp+Ch] [rbp-34h] unsigned int *v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+18h] [rbp-28h] if ( !a1 || !*a1 ) return -1LL; v6 = *a1; v5 = *((_DWORD *)a1 + 11); while ( 1 ) { v3 = *v6; v7 = ma_send(v3, a2, a3, 16448LL); if ( v7 != -1 ) break; if ( *(_DWORD *)__errno_location(v3) != 11 || !v5 ) return -1LL; if ( (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v5) < 1 ) return -1LL; } return v7; }
pvio_socket_write: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x38],0x40 MOV EAX,dword ptr [RBP + -0x38] OR EAX,0x4000 MOV dword ptr [RBP + -0x38],EAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013e3c7 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0013e3d1 LAB_0013e3c7: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0013e44d LAB_0013e3d1: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x34],EAX LAB_0013e3e6: MOV RAX,qword ptr [RBP + -0x30] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x38] CALL 0x0013f920 MOV qword ptr [RBP + -0x28],RAX CMP RAX,-0x1 JNZ 0x0013e445 CALL 0x00112040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0xb JNZ 0x0013e41c CMP dword ptr [RBP + -0x34],0x0 JNZ 0x0013e426 LAB_0013e41c: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013e44d LAB_0013e426: MOV RDI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x34] XOR ESI,ESI CALL 0x0013e4f0 CMP EAX,0x1 JGE 0x0013e443 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0013e44d LAB_0013e443: JMP 0x0013e3e6 LAB_0013e445: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0013e44d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long pvio_socket_write(long *param_1,int8 param_2,int8 param_3) { int iVar1; int4 *puVar2; int iVar3; long lVar4; int *piVar5; if ((param_1 != (long *)0x0) && (*param_1 != 0)) { puVar2 = (int4 *)*param_1; iVar1 = *(int *)((long)param_1 + 0x2c); do { lVar4 = ma_send(*puVar2,param_2,param_3,0x4040); if (lVar4 != -1) { return lVar4; } piVar5 = __errno_location(); if (*piVar5 != 0xb) { return -1; } if (iVar1 == 0) { return -1; } iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1); } while (0 < iVar3); } return -1; }
34,841
mysql_select_db_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_select_db_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_select_db, (parms->mysql, parms->db), parms->mysql, int, r_int) }
O0
c
mysql_select_db_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi callq 0x43e10 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_select_db_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] call mysql_select_db mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_select_db_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_select_db(*a1, a1[1]); result = v2; *v2 = 0; return result; }
mysql_select_db_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00143e10 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_select_db_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_select_db(*param_1,param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
34,842
testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
static void CaptureStream(int fd, const char* stream_name, CapturedStream** stream) { if (*stream != nullptr) { GTEST_LOG_(FATAL) << "Only one " << stream_name << " capturer can exist at a time."; } *stream = new CapturedStream(fd); }
O0
cpp
testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**): subq $0x58, %rsp movl %edi, 0x54(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq 0x40(%rsp), %rax cmpq $0x0, (%rax) je 0xb9310 leaq 0x598dd(%rip), %rdx # 0x112b65 leaq 0x3c(%rsp), %rdi movq %rdi, 0x18(%rsp) movl $0x3, %esi movl $0x4ab, %ecx # imm = 0x4AB callq 0xb9070 movq 0x18(%rsp), %rdi callq 0x1ea10 movq %rax, %rdi leaq 0x5b312(%rip), %rsi # 0x1145c7 callq 0x146a0 movq %rax, 0x20(%rsp) jmp 0xb92c1 movq 0x20(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x146a0 movq %rax, 0x10(%rsp) jmp 0xb92d7 movq 0x10(%rsp), %rdi leaq 0x5b2ee(%rip), %rsi # 0x1145d1 callq 0x146a0 jmp 0xb92ea leaq 0x3c(%rsp), %rdi callq 0xb91e0 jmp 0xb9310 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x3c(%rsp), %rdi callq 0xb91e0 jmp 0xb935f movl $0x28, %edi callq 0x146c0 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x8(%rsp) movl 0x54(%rsp), %esi callq 0xee510 jmp 0xb9330 movq 0x8(%rsp), %rcx movq 0x40(%rsp), %rax movq %rcx, (%rax) addq $0x58, %rsp retq movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) movl $0x28, %esi callq 0x146e0 movq 0x30(%rsp), %rdi callq 0x14c80 nopl (%rax)
_ZN7testing8internalL13CaptureStreamEiPKcPPNS0_14CapturedStreamE: sub rsp, 58h mov [rsp+58h+var_4], edi mov qword ptr [rsp+58h+var_10], rsi; char mov [rsp+58h+var_18], rdx; __int64 mov rax, [rsp+58h+var_18] cmp qword ptr [rax], 0 jz loc_B9310 lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+58h+var_1C]; int mov [rsp+58h+var_40], rdi; int mov esi, 3 mov ecx, 4ABh call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, [rsp+58h+var_40]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov rdi, rax lea rsi, aOnlyOne; "Only one " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+58h+var_38], rax jmp short $+2 loc_B92C1: mov rdi, [rsp+58h+var_38] mov rsi, qword ptr [rsp+58h+var_10] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+58h+var_48], rax jmp short $+2 loc_B92D7: mov rdi, [rsp+58h+var_48] lea rsi, aCapturerCanExi; " capturer can exist at a time." call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_B92EA: lea rdi, [rsp+58h+var_1C]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_B9310 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_34]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_B935F loc_B9310: mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, rdi mov [rsp+58h+var_50], rax mov esi, [rsp+58h+var_4]; int call _ZN7testing8internal14CapturedStreamC2Ei; testing::internal::CapturedStream::CapturedStream(int) jmp short $+2 loc_B9330: mov rcx, [rsp+58h+var_50] mov rax, [rsp+58h+var_18] mov [rax], rcx add rsp, 58h retn mov rdi, [rsp+arg_0]; void * mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax mov esi, 28h ; '('; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B935F: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long testing::internal::CaptureStream( testing::internal *this, long long a2, const char *a3, testing::internal::CapturedStream **a4) { void *Stream; // rax long long result; // rax testing::internal::CapturedStream *v6; // [rsp+8h] [rbp-50h] long long v7; // [rsp+10h] [rbp-48h] long long v8; // [rsp+20h] [rbp-38h] int v9; // [rsp+3Ch] [rbp-1Ch] BYREF long long v10; // [rsp+40h] [rbp-18h] char v11[8]; // [rsp+48h] [rbp-10h] int v12; // [rsp+54h] [rbp-4h] v12 = (int)this; *(_QWORD *)v11 = a2; v10 = (long long)a3; if ( *(_QWORD *)a3 ) { testing::internal::GTestLog::GTestLog( (testing::internal::GTestLog *)&v9, 3, (long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc", 1195); Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v9); v8 = std::operator<<<std::char_traits<char>>(Stream, "Only one "); v7 = std::operator<<<std::char_traits<char>>(v8, *(_QWORD *)v11); std::operator<<<std::char_traits<char>>(v7, " capturer can exist at a time."); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v9); } v6 = (testing::internal::CapturedStream *)operator new(0x28uLL); testing::internal::CapturedStream::CapturedStream(v6, v12); result = v10; *(_QWORD *)v10 = v6; return result; }
CaptureStream: SUB RSP,0x58 MOV dword ptr [RSP + 0x54],EDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x40] CMP qword ptr [RAX],0x0 JZ 0x001b9310 LEA RDX,[0x212b65] LEA RDI,[RSP + 0x3c] MOV qword ptr [RSP + 0x18],RDI MOV ESI,0x3 MOV ECX,0x4ab CALL 0x001b9070 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0011ea10 MOV RDI,RAX LAB_001b92ae: LEA RSI,[0x2145c7] CALL 0x001146a0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001b92c1 LAB_001b92c1: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x48] CALL 0x001146a0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001b92d7 LAB_001b92d7: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[0x2145d1] CALL 0x001146a0 LAB_001b92e8: JMP 0x001b92ea LAB_001b92ea: LEA RDI,[RSP + 0x3c] CALL 0x001b91e0 JMP 0x001b9310 LAB_001b9310: MOV EDI,0x28 CALL 0x001146c0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV ESI,dword ptr [RSP + 0x54] LAB_001b9329: CALL 0x001ee510 LAB_001b932e: JMP 0x001b9330 LAB_001b9330: MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RAX],RCX ADD RSP,0x58 RET
/* testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**) */ void testing::internal::CaptureStream(int param_1,char *param_2,CapturedStream **param_3) { ostream *poVar1; CapturedStream *this; GTestLog local_1c [4]; CapturedStream **local_18; char *local_10; int local_4; local_18 = param_3; local_10 = param_2; local_4 = param_1; if (*param_3 != (CapturedStream *)0x0) { GTestLog::GTestLog(local_1c,3, "/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc" ,0x4ab); poVar1 = (ostream *)GTestLog::GetStream(); /* try { // try from 001b92ae to 001b92e7 has its CatchHandler @ 001b92f6 */ poVar1 = std::operator<<(poVar1,"Only one "); poVar1 = std::operator<<(poVar1,local_10); std::operator<<(poVar1," capturer can exist at a time."); GTestLog::~GTestLog(local_1c); } this = (CapturedStream *)operator_new(0x28); /* try { // try from 001b9329 to 001b932d has its CatchHandler @ 001b9342 */ CapturedStream::CapturedStream(this,local_4); *local_18 = this; return; }
34,843
trnman_exists_active_transactions
eloqsql/storage/maria/trnman.c
my_bool trnman_exists_active_transactions(TrID min_id, TrID max_id, my_bool trnman_is_locked) { TRN *trn; my_bool ret= 0; if (!trnman_is_locked) mysql_mutex_lock(&LOCK_trn_list); mysql_mutex_assert_owner(&LOCK_trn_list); for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next) { /* We use <= for max_id as max_id is a commit_trid and trn->trid is transaction id. When calculating commit_trid we use the current value of global_trid_generator. global_trid_generator is incremented for each new transaction. For example, assuming we have min_id = 5 max_id = 10 A trid of value 5 can't see the history event between 5 & 10 at it vas started before min_id 5 was committed. A trid of value 10 can't see the next history event (max_id = 10) as it started before this was committed. In this case it must use the this event. */ if (trn->trid > min_id && trn->trid <= max_id) { ret= 1; break; } } if (!trnman_is_locked) mysql_mutex_unlock(&LOCK_trn_list); return ret; }
O0
c
trnman_exists_active_transactions: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movb $0x0, -0x21(%rbp) cmpb $0x0, -0x11(%rbp) jne 0x4d3d7 leaq 0x429d5a(%rip), %rdi # 0x477120 leaq 0x1032d9(%rip), %rsi # 0x1506a6 movl $0x3a8, %edx # imm = 0x3A8 callq 0x4c390 jmp 0x4d3d9 jmp 0x4d3db movq 0x4299fe(%rip), %rax # 0x476de0 movq %rax, -0x20(%rbp) leaq 0x429a3b(%rip), %rax # 0x476e28 cmpq %rax, -0x20(%rbp) je 0x4d425 movq -0x20(%rbp), %rax movq 0x78(%rax), %rax cmpq -0x8(%rbp), %rax jbe 0x4d415 movq -0x20(%rbp), %rax movq 0x78(%rax), %rax cmpq -0x10(%rbp), %rax ja 0x4d415 movb $0x1, -0x21(%rbp) jmp 0x4d425 jmp 0x4d417 movq -0x20(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x20(%rbp) jmp 0x4d3e6 cmpb $0x0, -0x11(%rbp) jne 0x4d437 leaq 0x429cee(%rip), %rdi # 0x477120 callq 0x4c400 movb -0x21(%rbp), %al addq $0x30, %rsp popq %rbp retq
trnman_exists_active_transactions: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov [rbp+var_21], 0 cmp [rbp+var_11], 0 jnz short loc_4D3D7 lea rdi, LOCK_trn_list lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 3A8h call inline_mysql_mutex_lock_7 loc_4D3D7: jmp short $+2 loc_4D3D9: jmp short $+2 loc_4D3DB: mov rax, cs:qword_476DE0 mov [rbp+var_20], rax loc_4D3E6: lea rax, active_list_max cmp [rbp+var_20], rax jz short loc_4D425 mov rax, [rbp+var_20] mov rax, [rax+78h] cmp rax, [rbp+var_8] jbe short loc_4D415 mov rax, [rbp+var_20] mov rax, [rax+78h] cmp rax, [rbp+var_10] ja short loc_4D415 mov [rbp+var_21], 1 jmp short loc_4D425 loc_4D415: jmp short $+2 loc_4D417: mov rax, [rbp+var_20] mov rax, [rax+68h] mov [rbp+var_20], rax jmp short loc_4D3E6 loc_4D425: cmp [rbp+var_11], 0 jnz short loc_4D437 lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock_7 loc_4D437: mov al, [rbp+var_21] add rsp, 30h pop rbp retn
char trnman_exists_active_transactions(unsigned long long a1, unsigned long long a2, char a3) { char v4; // [rsp+Fh] [rbp-21h] long long i; // [rsp+10h] [rbp-20h] v4 = 0; if ( !a3 ) inline_mysql_mutex_lock_7( (long long)&LOCK_trn_list, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x3A8u); for ( i = qword_476DE0; (_UNKNOWN *)i != &active_list_max; i = *(_QWORD *)(i + 104) ) { if ( *(_QWORD *)(i + 120) > a1 && *(_QWORD *)(i + 120) <= a2 ) { v4 = 1; break; } } if ( !a3 ) inline_mysql_mutex_unlock_7((long long)&LOCK_trn_list); return v4; }
trnman_exists_active_transactions: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV byte ptr [RBP + -0x21],0x0 CMP byte ptr [RBP + -0x11],0x0 JNZ 0x0014d3d7 LEA RDI,[0x577120] LEA RSI,[0x2506a6] MOV EDX,0x3a8 CALL 0x0014c390 LAB_0014d3d7: JMP 0x0014d3d9 LAB_0014d3d9: JMP 0x0014d3db LAB_0014d3db: MOV RAX,qword ptr [0x00576de0] MOV qword ptr [RBP + -0x20],RAX LAB_0014d3e6: LEA RAX,[0x576e28] CMP qword ptr [RBP + -0x20],RAX JZ 0x0014d425 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x78] CMP RAX,qword ptr [RBP + -0x8] JBE 0x0014d415 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x78] CMP RAX,qword ptr [RBP + -0x10] JA 0x0014d415 MOV byte ptr [RBP + -0x21],0x1 JMP 0x0014d425 LAB_0014d415: JMP 0x0014d417 LAB_0014d417: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0x20],RAX JMP 0x0014d3e6 LAB_0014d425: CMP byte ptr [RBP + -0x11],0x0 JNZ 0x0014d437 LEA RDI,[0x577120] CALL 0x0014c400 LAB_0014d437: MOV AL,byte ptr [RBP + -0x21] ADD RSP,0x30 POP RBP RET
int1 trnman_exists_active_transactions(ulong param_1,ulong param_2,char param_3) { int1 local_29; int1 *local_28; local_29 = 0; if (param_3 == '\0') { inline_mysql_mutex_lock (LOCK_trn_list,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x3a8 ); } local_28 = (int1 *)active_list_min._104_8_; do { if (local_28 == active_list_max) { LAB_0014d425: if (param_3 == '\0') { inline_mysql_mutex_unlock(LOCK_trn_list); } return local_29; } if ((param_1 < *(ulong *)(local_28 + 0x78)) && (*(ulong *)(local_28 + 0x78) <= param_2)) { local_29 = 1; goto LAB_0014d425; } local_28 = *(int1 **)(local_28 + 0x68); } while( true ); }
34,844
trnman_exists_active_transactions
eloqsql/storage/maria/trnman.c
my_bool trnman_exists_active_transactions(TrID min_id, TrID max_id, my_bool trnman_is_locked) { TRN *trn; my_bool ret= 0; if (!trnman_is_locked) mysql_mutex_lock(&LOCK_trn_list); mysql_mutex_assert_owner(&LOCK_trn_list); for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next) { /* We use <= for max_id as max_id is a commit_trid and trn->trid is transaction id. When calculating commit_trid we use the current value of global_trid_generator. global_trid_generator is incremented for each new transaction. For example, assuming we have min_id = 5 max_id = 10 A trid of value 5 can't see the history event between 5 & 10 at it vas started before min_id 5 was committed. A trid of value 10 can't see the next history event (max_id = 10) as it started before this was committed. In this case it must use the this event. */ if (trn->trid > min_id && trn->trid <= max_id) { ret= 1; break; } } if (!trnman_is_locked) mysql_mutex_unlock(&LOCK_trn_list); return ret; }
O3
c
trnman_exists_active_transactions: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 testb %bl, %bl jne 0x471bd cmpq $0x0, 0x3b63b1(%rip) # 0x3fd560 jne 0x4721e leaq 0x3b6368(%rip), %rdi # 0x3fd520 callq 0x29220 movq 0x3b601c(%rip), %rax # 0x3fd1e0 leaq 0x3b605d(%rip), %rcx # 0x3fd228 cmpq %rcx, %rax je 0x471ec movq 0x78(%rax), %rdx cmpq %r15, %rdx setbe %sil cmpq %r14, %rdx seta %dl orb %sil, %dl je 0x471f1 movq 0x68(%rax), %rax jmp 0x471cb xorl %r14d, %r14d jmp 0x471f4 movb $0x1, %r14b testb %bl, %bl jne 0x47210 movq 0x3b6361(%rip), %rdi # 0x3fd560 testq %rdi, %rdi jne 0x47225 leaq 0x3b6315(%rip), %rdi # 0x3fd520 callq 0x291e0 movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a5ee jmp 0x471bd leaq 0x33ede4(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x47204
trnman_exists_active_transactions: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, edx mov r14, rsi mov r15, rdi test bl, bl jnz short loc_471BD cmp cs:qword_3FD560, 0 jnz short loc_4721E lea rdi, LOCK_trn_list call _pthread_mutex_lock loc_471BD: mov rax, cs:qword_3FD1E0 lea rcx, active_list_max loc_471CB: cmp rax, rcx jz short loc_471EC mov rdx, [rax+78h] cmp rdx, r15 setbe sil cmp rdx, r14 setnbe dl or dl, sil jz short loc_471F1 mov rax, [rax+68h] jmp short loc_471CB loc_471EC: xor r14d, r14d jmp short loc_471F4 loc_471F1: mov r14b, 1 loc_471F4: test bl, bl jnz short loc_47210 mov rdi, cs:qword_3FD560 test rdi, rdi jnz short loc_47225 loc_47204: lea rdi, LOCK_trn_list call _pthread_mutex_unlock loc_47210: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_4721E: call trnman_exists_active_transactions_cold_1 jmp short loc_471BD loc_47225: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_47204
long long trnman_exists_active_transactions(unsigned long long a1, unsigned long long a2, unsigned long long a3) { char v3; // bl unsigned long long v4; // r14 long long i; // rax v3 = a3; v4 = a2; if ( !(_BYTE)a3 ) { if ( qword_3FD560 ) trnman_exists_active_transactions_cold_1(a1); else pthread_mutex_lock(&LOCK_trn_list); } for ( i = qword_3FD1E0; ; i = *(_QWORD *)(i + 104) ) { if ( (_UNKNOWN *)i == &active_list_max ) { LODWORD(v4) = 0; goto LABEL_10; } a3 = *(_QWORD *)(i + 120); LOBYTE(a2) = a3 <= a1; LOBYTE(a3) = a3 <= a1 || a3 > v4; if ( !(_BYTE)a3 ) break; } LOBYTE(v4) = 1; LABEL_10: if ( !v3 ) { if ( qword_3FD560 ) ((void ( *)(long long, unsigned long long, unsigned long long, void *))PSI_server[44])( qword_3FD560, a2, a3, &active_list_max); pthread_mutex_unlock(&LOCK_trn_list); } return (unsigned int)v4; }
trnman_exists_active_transactions: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV R14,RSI MOV R15,RDI TEST BL,BL JNZ 0x001471bd CMP qword ptr [0x004fd560],0x0 JNZ 0x0014721e LEA RDI,[0x4fd520] CALL 0x00129220 LAB_001471bd: MOV RAX,qword ptr [0x004fd1e0] LEA RCX,[0x4fd228] LAB_001471cb: CMP RAX,RCX JZ 0x001471ec MOV RDX,qword ptr [RAX + 0x78] CMP RDX,R15 SETBE SIL CMP RDX,R14 SETA DL OR DL,SIL JZ 0x001471f1 MOV RAX,qword ptr [RAX + 0x68] JMP 0x001471cb LAB_001471ec: XOR R14D,R14D JMP 0x001471f4 LAB_001471f1: MOV R14B,0x1 LAB_001471f4: TEST BL,BL JNZ 0x00147210 MOV RDI,qword ptr [0x004fd560] TEST RDI,RDI JNZ 0x00147225 LAB_00147204: LEA RDI,[0x4fd520] CALL 0x001291e0 LAB_00147210: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0014721e: CALL 0x0012a5ee JMP 0x001471bd LAB_00147225: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00147204
ulong trnman_exists_active_transactions(ulong param_1,ulong param_2,char param_3) { int1 *puVar1; ulong uVar2; puVar1 = (int1 *)active_list_min._104_8_; if (param_3 == '\0') { if (LOCK_trn_list._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)LOCK_trn_list); puVar1 = (int1 *)active_list_min._104_8_; } else { trnman_exists_active_transactions_cold_1(); puVar1 = (int1 *)active_list_min._104_8_; } } do { if (puVar1 == active_list_max) { uVar2 = 0; LAB_001471f4: if (param_3 == '\0') { if (LOCK_trn_list._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list); } return uVar2 & 0xffffffff; } if (*(ulong *)(puVar1 + 0x78) <= param_2 && param_1 < *(ulong *)(puVar1 + 0x78)) { uVar2 = CONCAT71((int7)(param_2 >> 8),1); goto LAB_001471f4; } puVar1 = *(int1 **)(puVar1 + 0x68); } while( true ); }
34,845
chess::uci::handleCastling(chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] constexpr std::uint16_t typeOf() const noexcept { return static_cast<std::uint16_t>(move_ & (3 << 14)); }
O2
cpp
chess::uci::handleCastling(chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movzwl (%rdi), %r15d cmpw $0xc000, %r15w # imm = 0xC000 jb 0x9da3 movq %rsi, %rbx movq %rdi, %r14 callq 0x9ddc movl %eax, %ebp andb $0x7, %bpl movq %r14, %rdi callq 0x9db8 andb $0x7, %al cmpb %al, %bpl leaq 0x64bf(%rip), %rax # 0x1024f leaq 0x64b6(%rip), %rsi # 0x1024d cmovaq %rax, %rsi movq %rbx, %rdi callq 0x23b0 cmpw $0xc000, %r15w # imm = 0xC000 setae %al addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN5chess3uci14handleCastlingERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx push rax movzx r15d, word ptr [rdi] cmp r15w, 0C000h jb short loc_9DA3 mov rbx, rsi mov r14, rdi call _ZNK5chess4Move2toEv; chess::Move::to(void) mov ebp, eax and bpl, 7 mov rdi, r14; this call _ZNK5chess4Move4fromEv; chess::Move::from(void) and al, 7 cmp bpl, al lea rax, aOOO+2; "O-O" lea rsi, aOOO; "O-O-O" cmova rsi, rax mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) loc_9DA3: cmp r15w, 0C000h setnb al add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
bool chess::uci::handleCastling(chess::Move *this, long long a2) { unsigned __int16 v2; // r15 unsigned __int8 v4; // bp char *v5; // rsi v2 = *(_WORD *)this; if ( *(_WORD *)this >= 0xC000u ) { v4 = chess::Move::to(this) & 7; v5 = "O-O-O"; if ( v4 > (unsigned __int8)(chess::Move::from(this) & 7) ) v5 = "O-O"; std::string::assign(a2, v5); } return v2 >= 0xC000u; }
handleCastling: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOVZX R15D,word ptr [RDI] CMP R15W,0xc000 JC 0x00109da3 MOV RBX,RSI MOV R14,RDI CALL 0x00109ddc MOV EBP,EAX AND BPL,0x7 MOV RDI,R14 CALL 0x00109db8 AND AL,0x7 CMP BPL,AL LEA RAX,[0x11024f] LEA RSI,[0x11024d] CMOVA RSI,RAX MOV RDI,RBX CALL 0x001023b0 LAB_00109da3: CMP R15W,0xc000 SETNC AL ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* chess::uci::handleCastling(chess::Move const&, std::__cxx11::string&) */ bool chess::uci::handleCastling(Move *param_1,string *param_2) { ushort uVar1; uVar1 = *(ushort *)param_1; if (0xbfff < uVar1) { Move::to((Move *)param_1); Move::from((Move *)param_1); std::__cxx11::string::assign((char *)param_2); } return 0xbfff < uVar1; }
34,846
chess::uci::handleCastling(chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] constexpr std::uint16_t typeOf() const noexcept { return static_cast<std::uint16_t>(move_ & (3 << 14)); }
O3
cpp
chess::uci::handleCastling(chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbx movzwl (%rdi), %ebx cmpl $0xc000, %ebx # imm = 0xC000 jb 0x94f0 movl %ebx, %eax andb $0x7, %al movl %ebx, %ecx shrl $0x6, %ecx andb $0x7, %cl xorl %edi, %edi cmpb %cl, %al leaq 0x5bdc(%rip), %rax # 0xf0a7 leaq 0x5bd3(%rip), %rcx # 0xf0a5 cmovaq %rax, %rcx setbe %dil movq 0x8(%rsi), %rdx leaq 0x3(,%rdi,2), %r8 movq %rsi, %rdi xorl %esi, %esi callq 0x22f0 movzwl %bx, %eax cmpl $0xc000, %eax # imm = 0xC000 setae %al popq %rbx retq nop
_ZN5chess3uci14handleCastlingERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbx movzx ebx, word ptr [rdi] cmp ebx, 0C000h jb short loc_94F0 mov eax, ebx and al, 7 mov ecx, ebx shr ecx, 6 and cl, 7 xor edi, edi cmp al, cl lea rax, aOOO+2; "O-O" lea rcx, aOOO; "O-O-O" cmova rcx, rax setbe dil mov rdx, [rsi+8] lea r8, ds:3[rdi*2] mov rdi, rsi xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_94F0: movzx eax, bx cmp eax, 0C000h setnb al pop rbx retn
bool chess::uci::handleCastling(unsigned __int16 *a1, long long a2) { unsigned int v2; // ebx unsigned __int8 v3; // cl long long v4; // rdi bool v5; // cf bool v6; // zf bool v7; // cc char *v8; // rcx v2 = *a1; if ( v2 >= 0xC000 ) { v3 = (v2 >> 6) & 7; v4 = 0LL; v5 = (unsigned __int8)(v2 & 7) < v3; v6 = (v2 & 7) == v3; v7 = (unsigned __int8)(v2 & 7) <= v3; v8 = "O-O-O"; if ( !v7 ) v8 = "O-O"; LOBYTE(v4) = v5 || v6; std::string::_M_replace(a2, 0LL, *(_QWORD *)(a2 + 8), v8, 2 * v4 + 3); } return (unsigned __int16)v2 >= 0xC000u; }
handleCastling: PUSH RBX MOVZX EBX,word ptr [RDI] CMP EBX,0xc000 JC 0x001094f0 MOV EAX,EBX AND AL,0x7 MOV ECX,EBX SHR ECX,0x6 AND CL,0x7 XOR EDI,EDI CMP AL,CL LEA RAX,[0x10f0a7] LEA RCX,[0x10f0a5] CMOVA RCX,RAX SETBE DIL MOV RDX,qword ptr [RSI + 0x8] LEA R8,[0x3 + RDI*0x2] MOV RDI,RSI XOR ESI,ESI CALL 0x001022f0 LAB_001094f0: MOVZX EAX,BX CMP EAX,0xc000 SETNC AL POP RBX RET
/* chess::uci::handleCastling(chess::Move const&, std::__cxx11::string&) */ int2 chess::uci::handleCastling(Move *param_1,string *param_2) { ushort uVar1; int *puVar2; uVar1 = *(ushort *)param_1; if (0xbfff < uVar1) { puVar2 = &DAT_0010f0a5; if (((byte)(uVar1 >> 6) & 7) < ((byte)uVar1 & 7)) { puVar2 = &DAT_0010f0a7; } std::__cxx11::string::_M_replace((ulong)param_2,0,*(char **)(param_2 + 8),(ulong)puVar2); } return CONCAT11((char)(uVar1 >> 8),0xbfff < uVar1); }
34,847
my_uni_ucs2
eloqsql/strings/ctype-ucs2.c
static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) , my_wc_t wc, uchar *r, uchar *e) { if ( r+2 > e ) return MY_CS_TOOSMALL2; if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */ return MY_CS_ILUNI; r[0]= (uchar) (wc >> 8); r[1]= (uchar) (wc & 0xFF); return 2; }
O0
c
my_uni_ucs2: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xab04b movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xab088 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jbe 0xab05e movl $0x0, -0x4(%rbp) jmp 0xab088 movq -0x18(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_uni_ucs2: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_AB04B mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_AB088 loc_AB04B: cmp [rbp+var_18], 0FFFFh jbe short loc_AB05E mov [rbp+var_4], 0 jmp short loc_AB088 loc_AB05E: mov rax, [rbp+var_18] shr rax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov rax, [rbp+var_18] and rax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_AB088: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_ucs2(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( a2 <= 0xFFFF ) { *a3 = BYTE1(a2); a3[1] = a2; return 2; } else { return 0; } } else { return (unsigned int)-102; } }
my_uni_ucs2: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001ab04b MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001ab088 LAB_001ab04b: CMP qword ptr [RBP + -0x18],0xffff JBE 0x001ab05e MOV dword ptr [RBP + -0x4],0x0 JMP 0x001ab088 LAB_001ab05e: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_001ab088: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_ucs2(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { int4 local_c; if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if (param_2 < 0x10000) { *param_3 = (char)(param_2 >> 8); param_3[1] = (char)param_2; local_c = 2; } else { local_c = 0; } return local_c; }
34,848
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O0
c
my_strerror: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movb $0x0, (%rax) cmpl $0x0, -0x1c(%rbp) jg 0x75a5e movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %ecx leaq 0x614c(%rip), %rsi # 0x7bb82 leaq 0x611d(%rip), %rax # 0x7bb5a cmpl $0x0, %ecx cmoveq %rax, %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x76680 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x75afa cmpl $0x78, -0x1c(%rbp) jl 0x75a9c cmpl $0xc6, -0x1c(%rbp) jg 0x75a9c movl -0x1c(%rbp), %eax subl $0x78, %eax movslq %eax, %rcx leaq 0x30d903(%rip), %rax # 0x383380 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x76680 jmp 0x75ad1 movl -0x1c(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x240c0 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x10(%rbp), %rax je 0x75acf movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x76680 jmp 0x75ad1 movq -0x10(%rbp), %rax cmpb $0x0, (%rax) jne 0x75af2 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x60bb(%rip), %rsi # 0x7bba8 callq 0x76680 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strerror: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 0 cmp [rbp+var_1C], 0 jg short loc_75A5E mov rdi, [rbp+var_10] mov ecx, [rbp+var_1C] lea rsi, aInternalError0; "Internal error < 0 (Not system error)" lea rax, aInternalErrorC; "Internal error/check (Not system error)" cmp ecx, 0 cmovz rsi, rax mov rdx, [rbp+var_18] sub rdx, 1 call strmake mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_75AFA loc_75A5E: cmp [rbp+var_1C], 78h ; 'x' jl short loc_75A9C cmp [rbp+var_1C], 0C6h jg short loc_75A9C mov eax, [rbp+var_1C] sub eax, 78h ; 'x' movsxd rcx, eax lea rax, handler_error_messages mov rax, [rax+rcx*8] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] sub rdx, 1 call strmake jmp short loc_75AD1 loc_75A9C: mov edi, [rbp+var_1C] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _strerror_r mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_10] jz short loc_75ACF mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] sub rdx, 1 call strmake loc_75ACF: jmp short $+2 loc_75AD1: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jnz short loc_75AF2 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, aUnknownError; "unknown error" call strmake loc_75AF2: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_75AFA: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_strerror(_BYTE *a1, long long a2, int a3) { const char *v3; // rsi long long v5; // [rsp+0h] [rbp-30h] *a1 = 0; if ( a3 > 0 ) { if ( a3 < 120 || a3 > 198 ) { v5 = strerror_r((unsigned int)a3, a1, a2); if ( (_BYTE *)v5 != a1 ) strmake(a1, v5, a2 - 1); } else { strmake(a1, handler_error_messages[a3 - 120], a2 - 1); } if ( !*a1 ) strmake(a1, "unknown error", a2 - 1); return a1; } else { v3 = "Internal error < 0 (Not system error)"; if ( !a3 ) v3 = "Internal error/check (Not system error)"; strmake(a1, v3, a2 - 1); return a1; } }
my_strerror: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 CMP dword ptr [RBP + -0x1c],0x0 JG 0x00175a5e MOV RDI,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] LEA RSI,[0x17bb82] LEA RAX,[0x17bb5a] CMP ECX,0x0 CMOVZ RSI,RAX MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x00176680 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175afa LAB_00175a5e: CMP dword ptr [RBP + -0x1c],0x78 JL 0x00175a9c CMP dword ptr [RBP + -0x1c],0xc6 JG 0x00175a9c MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x78 MOVSXD RCX,EAX LEA RAX,[0x483380] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x00176680 JMP 0x00175ad1 LAB_00175a9c: MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001240c0 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x10] JZ 0x00175acf MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x00176680 LAB_00175acf: JMP 0x00175ad1 LAB_00175ad1: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JNZ 0x00175af2 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 LEA RSI,[0x17bba8] CALL 0x00176680 LAB_00175af2: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00175afa: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } strmake(param_1,pcVar1,param_2 - 1); } else { if ((param_3 < 0x78) || (0xc6 < param_3)) { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) { strmake(param_1,pcVar1,param_2 - 1); } } else { strmake(param_1,*(int8 *)(handler_error_messages + (long)(param_3 + -0x78) * 8), param_2 - 1); } if (*param_1 == '\0') { strmake(param_1,"unknown error",param_2 - 1); } } return param_1; }
34,849
google::protobuf::internal::PrintUTF8ErrorLog(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, char const*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format_lite.cc
void PrintUTF8ErrorLog(StringPiece message_name, StringPiece field_name, const char* operation_str, bool emit_stacktrace) { std::string stacktrace; (void)emit_stacktrace; // Parameter is used by Google-internal code. std::string quoted_field_name = ""; if (!field_name.empty()) { if (!message_name.empty()) { quoted_field_name = StrCat(" '", message_name, ".", field_name, "'"); } else { quoted_field_name = StrCat(" '", field_name, "'"); } } std::string error_message = StrCat("String field", quoted_field_name, " contains invalid UTF-8 data " "when ", operation_str, " a protocol buffer. Use the 'bytes' type if you intend to " "send raw bytes. ", stacktrace); GOOGLE_LOG(ERROR) << error_message; }
O0
cpp
google::protobuf::internal::PrintUTF8ErrorLog(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece, char const*, bool): subq $0x418, %rsp # imm = 0x418 movb %r9b, %al movq %rdi, 0x408(%rsp) movq %rsi, 0x410(%rsp) movq %rdx, 0x3f8(%rsp) movq %rcx, 0x400(%rsp) movq %r8, 0x3f0(%rsp) andb $0x1, %al movb %al, 0x3ef(%rsp) leaq 0x3c8(%rsp), %rdi callq 0x8e0b0 leaq 0x3a7(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x94520 movq 0x18(%rsp), %rdx leaq 0x2370d3(%rip), %rsi # 0x3e1fa9 leaq 0x3a8(%rsp), %rdi callq 0x92ea0 jmp 0x1aaee5 leaq 0x3a7(%rsp), %rdi callq 0x96fa0 leaq 0x3f8(%rsp), %rdi callq 0x1abb50 movb %al, 0x17(%rsp) jmp 0x1aaf05 movb 0x17(%rsp), %al testb $0x1, %al jne 0x1ab117 jmp 0x1aaf13 leaq 0x408(%rsp), %rdi callq 0x1abb50 movb %al, 0x16(%rsp) jmp 0x1aaf26 movb 0x16(%rsp), %al testb $0x1, %al jne 0x1ab071 jmp 0x1aaf34 leaq 0x24826a(%rip), %rsi # 0x3f31a5 leaq 0x340(%rsp), %rdi callq 0x176530 jmp 0x1aaf4a movups 0x408(%rsp), %xmm0 movaps %xmm0, 0x300(%rsp) movq 0x300(%rsp), %rsi movq 0x308(%rsp), %rdx leaq 0x310(%rsp), %rdi callq 0x1abb70 jmp 0x1aaf79 leaq 0x2418ed(%rip), %rsi # 0x3ec86d leaq 0x2d0(%rsp), %rdi callq 0x176530 jmp 0x1aaf8f movups 0x3f8(%rsp), %xmm0 movaps %xmm0, 0x290(%rsp) movq 0x290(%rsp), %rsi movq 0x298(%rsp), %rdx leaq 0x2a0(%rsp), %rdi callq 0x1abb70 jmp 0x1aafbe leaq 0x2481e1(%rip), %rsi # 0x3f31a6 leaq 0x260(%rsp), %rdi callq 0x176530 jmp 0x1aafd4 leaq 0x370(%rsp), %rdi leaq 0x340(%rsp), %rsi leaq 0x310(%rsp), %rdx leaq 0x2d0(%rsp), %rcx leaq 0x2a0(%rsp), %r8 leaq 0x260(%rsp), %r9 callq 0x1a2f10 jmp 0x1ab00b leaq 0x3a8(%rsp), %rdi leaq 0x370(%rsp), %rsi callq 0x901e0 leaq 0x370(%rsp), %rdi callq 0x921e0 jmp 0x1ab115 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x398(%rsp) movl %eax, 0x394(%rsp) leaq 0x3a7(%rsp), %rdi callq 0x96fa0 jmp 0x1ab2ab movq %rax, %rcx movl %edx, %eax movq %rcx, 0x398(%rsp) movl %eax, 0x394(%rsp) jmp 0x1ab29e leaq 0x24812d(%rip), %rsi # 0x3f31a5 leaq 0x210(%rsp), %rdi callq 0x176530 jmp 0x1ab087 movups 0x3f8(%rsp), %xmm0 movaps %xmm0, 0x1d0(%rsp) movq 0x1d0(%rsp), %rsi movq 0x1d8(%rsp), %rdx leaq 0x1e0(%rsp), %rdi callq 0x1abb70 jmp 0x1ab0b6 leaq 0x2480e9(%rip), %rsi # 0x3f31a6 leaq 0x1a0(%rsp), %rdi callq 0x176530 jmp 0x1ab0cc leaq 0x240(%rsp), %rdi leaq 0x210(%rsp), %rsi leaq 0x1e0(%rsp), %rdx leaq 0x1a0(%rsp), %rcx callq 0x1a2830 jmp 0x1ab0f3 leaq 0x3a8(%rsp), %rdi leaq 0x240(%rsp), %rsi callq 0x901e0 leaq 0x240(%rsp), %rdi callq 0x921e0 jmp 0x1ab117 leaq 0x23b5d2(%rip), %rsi # 0x3e66f0 leaq 0x150(%rsp), %rdi callq 0x176530 jmp 0x1ab12d leaq 0x120(%rsp), %rdi leaq 0x3a8(%rsp), %rsi callq 0x1abbc0 jmp 0x1ab144 leaq 0x23b5b2(%rip), %rsi # 0x3e66fd leaq 0xf0(%rsp), %rdi callq 0x176530 jmp 0x1ab15a movq 0x3f0(%rsp), %rsi leaq 0xc0(%rsp), %rdi callq 0x176530 jmp 0x1ab171 leaq 0x23b5a8(%rip), %rsi # 0x3e6720 leaq 0x90(%rsp), %rdi callq 0x176530 jmp 0x1ab187 leaq 0x60(%rsp), %rdi leaq 0x3c8(%rsp), %rsi callq 0x1abbc0 jmp 0x1ab19b movq %rsp, %rax leaq 0x60(%rsp), %rcx movq %rcx, (%rax) leaq 0x180(%rsp), %rdi leaq 0x150(%rsp), %rsi leaq 0x120(%rsp), %rdx leaq 0xf0(%rsp), %rcx leaq 0xc0(%rsp), %r8 leaq 0x90(%rsp), %r9 callq 0x1a31e0 jmp 0x1ab1dd leaq 0x23b46d(%rip), %rdx # 0x3e6651 leaq 0x28(%rsp), %rdi movl $0x2, %esi movl $0x26a, %ecx # imm = 0x26A callq 0x19a670 jmp 0x1ab1fa leaq 0x28(%rsp), %rdi leaq 0x180(%rsp), %rsi callq 0x199f60 movq %rax, 0x8(%rsp) jmp 0x1ab213 movq 0x8(%rsp), %rsi leaq 0x27(%rsp), %rdi callq 0x19a0e0 jmp 0x1ab224 leaq 0x28(%rsp), %rdi callq 0x19a6b0 leaq 0x180(%rsp), %rdi callq 0x921e0 leaq 0x3a8(%rsp), %rdi callq 0x921e0 leaq 0x3c8(%rsp), %rdi callq 0x921e0 addq $0x418, %rsp # imm = 0x418 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x398(%rsp) movl %eax, 0x394(%rsp) jmp 0x1ab291 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x398(%rsp) movl %eax, 0x394(%rsp) leaq 0x28(%rsp), %rdi callq 0x19a6b0 leaq 0x180(%rsp), %rdi callq 0x921e0 leaq 0x3a8(%rsp), %rdi callq 0x921e0 leaq 0x3c8(%rsp), %rdi callq 0x921e0 movq 0x398(%rsp), %rdi callq 0x90db0 nopw %cs:(%rax,%rax)
_ZN6google8protobuf8internal17PrintUTF8ErrorLogENS0_20stringpiece_internal11StringPieceES3_PKcb: sub rsp, 418h mov al, r9b mov qword ptr [rsp+418h+var_10], rdi mov qword ptr [rsp+418h+var_10+8], rsi mov qword ptr [rsp+418h+var_20], rdx mov qword ptr [rsp+418h+var_20+8], rcx mov [rsp+418h+var_28], r8 and al, 1 mov [rsp+418h+var_29], al lea rdi, [rsp+418h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) lea rdi, [rsp+418h+var_71] mov qword ptr [rsp+418h+var_400], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+418h+var_400] lea rsi, asc_3E1FA8+1; "ࠀ\u0B00" lea rdi, [rsp+418h+var_71+1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_1AAEE5: lea rdi, [rsp+418h+var_71] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+418h+var_20]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece5emptyEv; google::protobuf::stringpiece_internal::StringPiece::empty(void) mov [rsp+418h+var_401], al jmp short $+2 loc_1AAF05: mov al, [rsp+418h+var_401] test al, 1 jnz loc_1AB117 jmp short $+2 loc_1AAF13: lea rdi, [rsp+418h+var_10]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece5emptyEv; google::protobuf::stringpiece_internal::StringPiece::empty(void) mov [rsp+418h+var_402], al jmp short $+2 loc_1AAF26: mov al, [rsp+418h+var_402] test al, 1 jnz loc_1AB071 jmp short $+2 loc_1AAF34: lea rsi, aRepeatedMapKey+11h; char * lea rdi, [rsp+418h+var_D8]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AAF4A: movups xmm0, [rsp+418h+var_10] movaps [rsp+418h+var_118], xmm0 mov rsi, qword ptr [rsp+418h+var_118] mov rdx, qword ptr [rsp+418h+var_118+8] lea rdi, [rsp+418h+var_108] call _ZN6google8protobuf7strings8AlphaNumC2ENS0_20stringpiece_internal11StringPieceE; google::protobuf::strings::AlphaNum::AlphaNum(google::protobuf::stringpiece_internal::StringPiece) jmp short $+2 loc_1AAF79: lea rsi, aWhichIsNotDefi+77h; char * lea rdi, [rsp+418h+var_148]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AAF8F: movups xmm0, [rsp+418h+var_20] movaps [rsp+418h+var_188], xmm0 mov rsi, qword ptr [rsp+418h+var_188] mov rdx, qword ptr [rsp+418h+var_188+8] lea rdi, [rsp+418h+var_178] call _ZN6google8protobuf7strings8AlphaNumC2ENS0_20stringpiece_internal11StringPieceE; google::protobuf::strings::AlphaNum::AlphaNum(google::protobuf::stringpiece_internal::StringPiece) jmp short $+2 loc_1AAFBE: lea rsi, aRepeatedMapKey+12h; char * lea rdi, [rsp+418h+var_1B8]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AAFD4: lea rdi, [rsp+418h+var_A8] lea rsi, [rsp+418h+var_D8] lea rdx, [rsp+418h+var_108] lea rcx, [rsp+418h+var_148] lea r8, [rsp+418h+var_178] lea r9, [rsp+418h+var_1B8] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_S4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) jmp short $+2 loc_1AB00B: lea rdi, [rsp+418h+var_71+1] lea rsi, [rsp+418h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+418h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_1AB115 mov rcx, rax mov eax, edx mov [rsp+arg_390], rcx mov [rsp+arg_38C], eax lea rdi, [rsp+arg_39F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_1AB2AB mov rcx, rax mov eax, edx mov [rsp+arg_390], rcx mov [rsp+arg_38C], eax jmp loc_1AB29E loc_1AB071: lea rsi, aRepeatedMapKey+11h; char * lea rdi, [rsp+418h+var_208]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AB087: movups xmm0, [rsp+418h+var_20] movaps [rsp+418h+var_248], xmm0 mov rsi, qword ptr [rsp+418h+var_248] mov rdx, qword ptr [rsp+418h+var_248+8] lea rdi, [rsp+418h+var_238] call _ZN6google8protobuf7strings8AlphaNumC2ENS0_20stringpiece_internal11StringPieceE; google::protobuf::strings::AlphaNum::AlphaNum(google::protobuf::stringpiece_internal::StringPiece) jmp short $+2 loc_1AB0B6: lea rsi, aRepeatedMapKey+12h; char * lea rdi, [rsp+418h+var_278]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AB0CC: lea rdi, [rsp+418h+var_1D8] lea rsi, [rsp+418h+var_208] lea rdx, [rsp+418h+var_238] lea rcx, [rsp+418h+var_278] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) jmp short $+2 loc_1AB0F3: lea rdi, [rsp+418h+var_71+1] lea rsi, [rsp+418h+var_1D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+418h+var_1D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AB115: jmp short $+2 loc_1AB117: lea rsi, aStringField; "String field" lea rdi, [rsp+418h+var_2C8]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AB12D: lea rdi, [rsp+418h+var_2F8] lea rsi, [rsp+418h+var_71+1] call _ZN6google8protobuf7strings8AlphaNumC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::AlphaNum::AlphaNum(std::string const&) jmp short $+2 loc_1AB144: lea rsi, aContainsInvali; " contains invalid UTF-8 data when " lea rdi, [rsp+418h+var_328]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AB15A: mov rsi, [rsp+418h+var_28]; char * lea rdi, [rsp+418h+var_358]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AB171: lea rsi, aAProtocolBuffe; " a protocol buffer. Use the 'bytes' typ"... lea rdi, [rsp+418h+var_388]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1AB187: lea rdi, [rsp+418h+var_3B8] lea rsi, [rsp+418h+var_50] call _ZN6google8protobuf7strings8AlphaNumC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::AlphaNum::AlphaNum(std::string const&) jmp short $+2 loc_1AB19B: mov rax, rsp lea rcx, [rsp+418h+var_3B8] mov [rax], rcx lea rdi, [rsp+418h+var_298]; int lea rsi, [rsp+418h+var_2C8]; int lea rdx, [rsp+418h+var_2F8]; int lea rcx, [rsp+418h+var_328]; int lea r8, [rsp+418h+var_358]; int lea r9, [rsp+418h+var_388]; int call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_S4_S4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) jmp short $+2 loc_1AB1DD: lea rdx, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+418h+var_3F0] mov esi, 2 mov ecx, 26Ah call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) jmp short $+2 loc_1AB1FA: lea rdi, [rsp+418h+var_3F0] lea rsi, [rsp+418h+var_298] call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&) mov [rsp+418h+var_410], rax jmp short $+2 loc_1AB213: mov rsi, [rsp+418h+var_410] lea rdi, [rsp+418h+var_3F1] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1AB224: lea rdi, [rsp+418h+var_3F0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() lea rdi, [rsp+418h+var_298] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+418h+var_71+1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+418h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 418h retn mov rcx, rax mov eax, edx mov [rsp+arg_390], rcx mov [rsp+arg_38C], eax jmp short loc_1AB291 mov rcx, rax mov eax, edx mov [rsp+arg_390], rcx mov [rsp+arg_38C], eax lea rdi, [rsp+arg_20]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1AB291: lea rdi, [rsp+arg_178] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AB29E: lea rdi, [rsp+arg_3A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AB2AB: lea rdi, [rsp+arg_3C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_390] call __Unwind_Resume
long long google::protobuf::internal::PrintUTF8ErrorLog( __int128 a1, unsigned long long a2, unsigned long long a3, char *a4, char a5) { google::protobuf::internal::LogMessage *v6; // [rsp+8h] [rbp-410h] char v7; // [rsp+27h] [rbp-3F1h] BYREF _BYTE v8[56]; // [rsp+28h] [rbp-3F0h] BYREF _BYTE v9[48]; // [rsp+60h] [rbp-3B8h] BYREF int v10[12]; // [rsp+90h] [rbp-388h] BYREF int v11[12]; // [rsp+C0h] [rbp-358h] BYREF int v12[12]; // [rsp+F0h] [rbp-328h] BYREF int v13[12]; // [rsp+120h] [rbp-2F8h] BYREF int v14[12]; // [rsp+150h] [rbp-2C8h] BYREF int v15[8]; // [rsp+180h] [rbp-298h] BYREF _BYTE v16[48]; // [rsp+1A0h] [rbp-278h] BYREF unsigned __int128 v17; // [rsp+1D0h] [rbp-248h] _BYTE v18[48]; // [rsp+1E0h] [rbp-238h] BYREF _BYTE v19[48]; // [rsp+210h] [rbp-208h] BYREF _BYTE v20[32]; // [rsp+240h] [rbp-1D8h] BYREF _BYTE v21[48]; // [rsp+260h] [rbp-1B8h] BYREF unsigned __int128 v22; // [rsp+290h] [rbp-188h] _BYTE v23[48]; // [rsp+2A0h] [rbp-178h] BYREF _BYTE v24[48]; // [rsp+2D0h] [rbp-148h] BYREF __int128 v25; // [rsp+300h] [rbp-118h] _BYTE v26[48]; // [rsp+310h] [rbp-108h] BYREF _BYTE v27[48]; // [rsp+340h] [rbp-D8h] BYREF _BYTE v28[55]; // [rsp+370h] [rbp-A8h] BYREF int v29[8]; // [rsp+3A7h] [rbp-71h] BYREF _BYTE v30[40]; // [rsp+3C8h] [rbp-50h] BYREF char *v31; // [rsp+3F0h] [rbp-28h] unsigned __int128 v32; // [rsp+3F8h] [rbp-20h] BYREF __int128 v33; // [rsp+408h] [rbp-10h] BYREF v33 = a1; v32 = __PAIR128__(a3, a2); v31 = a4; v30[39] = a5 & 1; std::string::basic_string(v30); std::allocator<char>::allocator(); std::string::basic_string((char *)v29 + 1, (char *)asc_3E1FA8 + 1, v29); std::allocator<char>::~allocator(v29); if ( (google::protobuf::stringpiece_internal::StringPiece::empty((google::protobuf::stringpiece_internal::StringPiece *)&v32) & 1) == 0 ) { if ( (google::protobuf::stringpiece_internal::StringPiece::empty((google::protobuf::stringpiece_internal::StringPiece *)&v33) & 1) != 0 ) { google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v19, " '"); v17 = v32; google::protobuf::strings::AlphaNum::AlphaNum(v18, v32, *((_QWORD *)&v32 + 1)); google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v16, "'"); google::protobuf::StrCat[abi:cxx11]( (long long)v20, (google::protobuf::strings::AlphaNum *)v19, (google::protobuf::strings::AlphaNum *)v18, (google::protobuf::strings::AlphaNum *)v16); std::string::operator=((char *)v29 + 1, v20); std::string::~string(v20); } else { google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v27, " '"); v25 = v33; google::protobuf::strings::AlphaNum::AlphaNum(v26, v33, *((_QWORD *)&v33 + 1)); google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v24, "."); v22 = v32; google::protobuf::strings::AlphaNum::AlphaNum(v23, v32, *((_QWORD *)&v32 + 1)); google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v21, "'"); google::protobuf::StrCat[abi:cxx11]( (long long)v28, (google::protobuf::strings::AlphaNum *)v27, (google::protobuf::strings::AlphaNum *)v26, (google::protobuf::strings::AlphaNum *)v24, (google::protobuf::strings::AlphaNum *)v23, (google::protobuf::strings::AlphaNum *)v21); std::string::operator=((char *)v29 + 1, v28); std::string::~string(v28); } } google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v14, "String field"); google::protobuf::strings::AlphaNum::AlphaNum(v13, (char *)v29 + 1); google::protobuf::strings::AlphaNum::AlphaNum( (google::protobuf::strings::AlphaNum *)v12, " contains invalid UTF-8 data when "); google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v11, v31); google::protobuf::strings::AlphaNum::AlphaNum( (google::protobuf::strings::AlphaNum *)v10, " a protocol buffer. Use the 'bytes' type if you intend to send raw bytes. "); google::protobuf::strings::AlphaNum::AlphaNum(v9, v30); google::protobuf::StrCat[abi:cxx11]( (long long)v15, (google::protobuf::strings::AlphaNum *)v14, (google::protobuf::strings::AlphaNum *)v13, (google::protobuf::strings::AlphaNum *)v12, (google::protobuf::strings::AlphaNum *)v11, (google::protobuf::strings::AlphaNum *)v10, (google::protobuf::strings::AlphaNum *)v9); google::protobuf::internal::LogMessage::LogMessage( (long long)v8, 2, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format_lite.cc", 618); v6 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v8, (long long)v15); google::protobuf::internal::LogFinisher::operator=((long long)&v7, v6); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v8); std::string::~string(v15); std::string::~string((char *)v29 + 1); return std::string::~string(v30); }
is_supported_floating_point<float>: MOVSS dword ptr [RSP + -0x4],XMM0 MOV AL,0x1 AND AL,0x1 RET
/* bool fmt::v10::detail::is_supported_floating_point<float>(float) */ bool fmt::v10::detail::is_supported_floating_point<float>(float param_1) { return true; }
34,850
mi_get_key
eloqsql/storage/myisam/mi_search.c
uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length) { uint nod_flag; DBUG_ENTER("_mi_get_key"); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { bmove((uchar*) key,(uchar*) keypos,keyinfo->keylength+nod_flag); DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+=2+nod_flag; key[0]=0; /* safety */ while (page <= keypos) { *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key); if (*return_key_length == 0) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, *return_key_length)); DBUG_RETURN(page); }
O3
c
mi_get_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %r13 movq %r8, %rbx movq %rcx, %r12 movq %rsi, %r14 movq %rdi, -0x30(%rbp) xorl %r15d, %r15d cmpb $0x0, (%rdx) jns 0x8567b movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %r15d testb $0x28, 0xa(%r14) je 0x856de leal 0x2(%r15), %eax addq %rax, %rdx leaq -0x38(%rbp), %rax movq %rdx, (%rax) movb $0x0, (%r12) movq -0x38(%rbp), %rax cmpq %rbx, %rax ja 0x856ff movq %r14, %rdi movl %r15d, %esi leaq -0x38(%rbp), %rdx movq %r12, %rcx callq *0x48(%r14) movl %eax, (%r13) testl %eax, %eax jne 0x85695 movq -0x30(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x7ab1a callq 0xa16ee movl $0x7e, (%rax) xorl %eax, %eax jmp 0x856ff movzwl 0x12(%r14), %edx addl %r15d, %edx movq %r12, %rdi movq %rbx, %rsi callq 0x29120 movzwl 0x12(%r14), %ecx movl %r15d, %eax addq %rbx, %rax addq %rcx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_get_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, r9 mov rbx, r8 mov r12, rcx mov r14, rsi mov [rbp+var_30], rdi xor r15d, r15d cmp byte ptr [rdx], 0 jns short loc_8567B mov rax, [rbp+var_30] mov rax, [rax] mov r15d, [rax+17Ch] loc_8567B: test byte ptr [r14+0Ah], 28h jz short loc_856DE lea eax, [r15+2] add rdx, rax lea rax, [rbp+var_38] mov [rax], rdx mov byte ptr [r12], 0 loc_85695: mov rax, [rbp+var_38] cmp rax, rbx ja short loc_856FF mov rdi, r14 mov esi, r15d lea rdx, [rbp+var_38] mov rcx, r12 call qword ptr [r14+48h] mov [r13+0], eax test eax, eax jnz short loc_85695 mov rax, [rbp+var_30] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' xor eax, eax jmp short loc_856FF loc_856DE: movzx edx, word ptr [r14+12h] add edx, r15d mov rdi, r12 mov rsi, rbx call _memmove movzx ecx, word ptr [r14+12h] mov eax, r15d add rax, rbx add rax, rcx loc_856FF: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char * mi_get_key(long long a1, long long a2, char *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { unsigned int v9; // r15d char *result; // rax int v11; // eax const char *v12; // rsi char *v13; // [rsp+8h] [rbp-38h] BYREF long long v14; // [rsp+10h] [rbp-30h] v14 = a1; v9 = 0; if ( *a3 < 0 ) v9 = *(_DWORD *)(*(_QWORD *)v14 + 380LL); if ( (*(_BYTE *)(a2 + 10) & 0x28) != 0 ) { v13 = &a3[v9 + 2]; *a4 = 0; while ( 1 ) { result = v13; if ( (unsigned long long)v13 > a5 ) break; v11 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *))(a2 + 72))(a2, v9, &v13, a4); *a6 = v11; if ( !v11 ) { v12 = *(const char **)(*(_QWORD *)v14 + 616LL); mi_report_error(126, (long long)v12); *(_DWORD *)my_thread_var(126LL, v12) = 126; return 0LL; } } } else { memmove(a4, a5, v9 + *(unsigned __int16 *)(a2 + 18)); return (char *)(*(unsigned __int16 *)(a2 + 18) + a5 + v9); } return result; }
_mi_get_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,R9 MOV RBX,R8 MOV R12,RCX MOV R14,RSI MOV qword ptr [RBP + -0x30],RDI XOR R15D,R15D CMP byte ptr [RDX],0x0 JNS 0x0018567b MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV R15D,dword ptr [RAX + 0x17c] LAB_0018567b: TEST byte ptr [R14 + 0xa],0x28 JZ 0x001856de LEA EAX,[R15 + 0x2] ADD RDX,RAX LEA RAX,[RBP + -0x38] MOV qword ptr [RAX],RDX MOV byte ptr [R12],0x0 LAB_00185695: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,RBX JA 0x001856ff MOV RDI,R14 MOV ESI,R15D LEA RDX,[RBP + -0x38] MOV RCX,R12 CALL qword ptr [R14 + 0x48] MOV dword ptr [R13],EAX TEST EAX,EAX JNZ 0x00185695 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x0017ab1a CALL 0x001a16ee MOV dword ptr [RAX],0x7e XOR EAX,EAX JMP 0x001856ff LAB_001856de: MOVZX EDX,word ptr [R14 + 0x12] ADD EDX,R15D MOV RDI,R12 MOV RSI,RBX CALL 0x00129120 MOVZX ECX,word ptr [R14 + 0x12] MOV EAX,R15D ADD RAX,RBX ADD RAX,RCX LAB_001856ff: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
char * _mi_get_key(long *param_1,long param_2,char *param_3,int1 *param_4,char *param_5, int *param_6) { int iVar1; int4 *puVar2; uint uVar3; char *local_40; long *local_38; uVar3 = 0; if (*param_3 < '\0') { uVar3 = *(uint *)(*param_1 + 0x17c); } local_38 = param_1; if ((*(byte *)(param_2 + 10) & 0x28) == 0) { memmove(param_4,param_5,(ulong)(*(ushort *)(param_2 + 0x12) + uVar3)); param_5 = param_5 + (ulong)*(ushort *)(param_2 + 0x12) + (ulong)uVar3; } else { local_40 = param_3 + (uVar3 + 2); *param_4 = 0; do { if (param_5 < local_40) { return local_40; } iVar1 = (**(code **)(param_2 + 0x48))(param_2,uVar3,&local_40,param_4); *param_6 = iVar1; } while (iVar1 != 0); mi_report_error(0x7e,*(int8 *)(*local_38 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; param_5 = (char *)0x0; } return param_5; }
34,851
init_alloc_root
eloqsql/mysys/my_alloc.c
void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused)), myf my_flags) { DBUG_ENTER("init_alloc_root"); DBUG_PRINT("enter",("root: %p prealloc: %zu", mem_root, pre_alloc_size)); mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc= 32; mem_root->block_size= (block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1; if (my_flags & MY_THREAD_SPECIFIC) mem_root->block_size|= 1; mem_root->error_handler= 0; mem_root->block_num= 4; /* We shift this with >>2 */ mem_root->first_block_usage= 0; mem_root->m_psi_key= key; #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if ((mem_root->free= mem_root->pre_alloc= (USED_MEM*) my_malloc(key, size, MYF(my_flags)))) { mem_root->free->size= size; mem_root->free->left= pre_alloc_size; mem_root->free->next= 0; TRASH_MEM(mem_root->free); } } #endif DBUG_VOID_RETURN; }
O3
c
init_alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rsi) xorl %eax, %eax movq %rax, 0x10(%rsi) movq $0x20, 0x18(%rsi) andq $-0x2, %rdx movl %r8d, %ecx shrl $0x10, %ecx andl $0x1, %ecx addq %rdx, %rcx addq $-0x28, %rcx movq %rcx, 0x20(%rsi) movq %rax, 0x30(%rsi) movq $0x4, 0x28(%rsi) movl %edi, 0x38(%rsi) testq %rbx, %rbx je 0x3102c movq %rsi, %r14 leaq 0x18(%rbx), %r15 movq %r15, %rsi movq %r8, %rdx callq 0x29b7d movq %rax, 0x10(%r14) movq %rax, (%r14) testq %rax, %rax je 0x3102c movq %r15, 0x10(%rax) movq (%r14), %rax movq %rbx, 0x8(%rax) movq (%r14), %rax movq $0x0, (%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
init_alloc_root: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 xor eax, eax mov [rsi+10h], rax mov qword ptr [rsi+18h], 20h ; ' ' and rdx, 0FFFFFFFFFFFFFFFEh mov ecx, r8d shr ecx, 10h and ecx, 1 add rcx, rdx add rcx, 0FFFFFFFFFFFFFFD8h mov [rsi+20h], rcx mov [rsi+30h], rax mov qword ptr [rsi+28h], 4 mov [rsi+38h], edi test rbx, rbx jz short loc_3102C mov r14, rsi lea r15, [rbx+18h] mov rsi, r15 mov rdx, r8 call my_malloc mov [r14+10h], rax mov [r14], rax test rax, rax jz short loc_3102C mov [rax+10h], r15 mov rax, [r14] mov [rax+8], rbx mov rax, [r14] mov qword ptr [rax], 0 loc_3102C: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long init_alloc_root(unsigned int a1, long long *a2, long long a3, long long a4, unsigned int a5) { long long result; // rax *(_OWORD *)a2 = 0LL; result = 0LL; a2[2] = 0LL; a2[3] = 32LL; a2[4] = (a3 & 0xFFFFFFFFFFFFFFFELL) + (HIWORD(a5) & 1) - 40; a2[6] = 0LL; a2[5] = 4LL; *((_DWORD *)a2 + 14) = a1; if ( a4 ) { result = my_malloc(a1, a4 + 24, a5); a2[2] = result; *a2 = result; if ( result ) { *(_QWORD *)(result + 16) = a4 + 24; *(_QWORD *)(*a2 + 8) = a4; result = *a2; *(_QWORD *)*a2 = 0LL; } } return result; }
init_alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 XOR EAX,EAX MOV qword ptr [RSI + 0x10],RAX MOV qword ptr [RSI + 0x18],0x20 AND RDX,-0x2 MOV ECX,R8D SHR ECX,0x10 AND ECX,0x1 ADD RCX,RDX ADD RCX,-0x28 MOV qword ptr [RSI + 0x20],RCX MOV qword ptr [RSI + 0x30],RAX MOV qword ptr [RSI + 0x28],0x4 MOV dword ptr [RSI + 0x38],EDI TEST RBX,RBX JZ 0x0013102c MOV R14,RSI LEA R15,[RBX + 0x18] MOV RSI,R15 MOV RDX,R8 CALL 0x00129b7d MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14],RAX TEST RAX,RAX JZ 0x0013102c MOV qword ptr [RAX + 0x10],R15 MOV RAX,qword ptr [R14] MOV qword ptr [RAX + 0x8],RBX MOV RAX,qword ptr [R14] MOV qword ptr [RAX],0x0 LAB_0013102c: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void init_alloc_root(int4 param_1,long *param_2,ulong param_3,long param_4,int8 param_5) { long lVar1; *param_2 = 0; param_2[1] = 0; param_2[2] = 0; param_2[3] = 0x20; param_2[4] = (ulong)((uint)param_5 >> 0x10 & 1) + (param_3 & 0xfffffffffffffffe) + -0x28; param_2[6] = 0; param_2[5] = 4; *(int4 *)(param_2 + 7) = param_1; if (param_4 != 0) { lVar1 = my_malloc(param_1,param_4 + 0x18,param_5); param_2[2] = lVar1; *param_2 = lVar1; if (lVar1 != 0) { *(long *)(lVar1 + 0x10) = param_4 + 0x18; *(long *)(*param_2 + 8) = param_4; *(int8 *)*param_2 = 0; } } return; }
34,852
js_set_isSubsetOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_set_isSubsetOf(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue item, iter, keys, has, next, rv, rval; BOOL done, found; JSMapState *s; int64_t size; int ok; has = JS_UNDEFINED; iter = JS_UNDEFINED; keys = JS_UNDEFINED; next = JS_UNDEFINED; rval = JS_EXCEPTION; s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET); if (!s) goto exception; // order matters! if (js_setlike_get_size(ctx, argv[0], &size) < 0) goto exception; if (js_setlike_get_has(ctx, argv[0], &has) < 0) goto exception; if (js_setlike_get_keys(ctx, argv[0], &keys) < 0) goto exception; found = FALSE; if (s->record_count > size) goto fini; iter = js_create_map_iterator(ctx, this_val, 0, NULL, MAGIC_SET); if (JS_IsException(iter)) goto exception; found = TRUE; do { item = js_map_iterator_next(ctx, iter, 0, NULL, &done, MAGIC_SET); if (JS_IsException(item)) goto exception; if (done) // item is JS_UNDEFINED break; rv = JS_Call(ctx, has, argv[0], 1, &item); JS_FreeValue(ctx, item); ok = JS_ToBoolFree(ctx, rv); // returns -1 if rv is JS_EXCEPTION if (ok < 0) goto exception; found = (ok > 0); } while (found); fini: rval = found ? JS_TRUE : JS_FALSE; exception: JS_FreeValue(ctx, has); JS_FreeValue(ctx, keys); JS_FreeValue(ctx, iter); JS_FreeValue(ctx, next); return rval; }
O2
c
js_set_isSubsetOf: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %r13 movq %rdx, %r12 andl $0x0, 0x10(%rsp) movq %rsi, %rbp movq %rdi, %rbx pushq $0x3 popq %r15 movq %r15, 0x18(%rsp) andl $0x0, 0x20(%rsp) movq %r15, 0x28(%rsp) pushq $0x24 popq %rcx callq 0x21207 testq %rax, %rax je 0x44ffe movq %rax, %r14 movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x50(%rsp), %rcx movq %rbx, %rdi callq 0x4643b testl %eax, %eax js 0x44ffe movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x10(%rsp), %rcx movq %rbx, %rdi callq 0x464cf testl %eax, %eax js 0x44ffe movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x20(%rsp), %rcx movq %rbx, %rdi callq 0x46558 testl %eax, %eax js 0x44ffe movl 0x18(%r14), %eax cmpq %rax, 0x50(%rsp) jge 0x4505c pushq $0x1 popq %r14 xorl %r12d, %r12d jmp 0x4511d xorl %r12d, %r12d xorl %r13d, %r13d pushq $0x6 popq %r14 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %rbx, %rdi callq 0x1801e movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0x1801e movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1801e pushq $0x3 popq %rdx movq %rbx, %rdi xorl %esi, %esi callq 0x1801e movq %r13, %rax movq %r14, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x1 popq %r9 movq %rbx, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x44ab2 movq %rax, %r12 movq %rdx, %r15 cmpl $0x6, %r15d je 0x45001 movq 0x10(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x40(%rsp) movl $0x1, (%rsp) movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx leaq 0xc(%rsp), %r9 callq 0x465e1 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) cmpl $0x6, %edx je 0x45119 cmpl $0x0, 0xc(%rsp) jne 0x45125 movq (%r13), %rcx movq 0x8(%r13), %r8 leaq 0x30(%rsp), %rax movq %rax, (%rsp) movq %rbx, %rdi movq 0x48(%rsp), %rsi movq 0x40(%rsp), %rdx pushq $0x1 popq %r9 callq 0x21eb6 movq %rax, %r14 movq %rdx, %rbp movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x1801e movq %rbx, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1cdfa testl %eax, %eax js 0x45119 jne 0x4508e pushq $0x1 jmp 0x4511b pushq $0x6 popq %r14 xorl %r13d, %r13d jmp 0x45008 pushq $0x1 popq %r14 movq %r14, %r13 jmp 0x45008
js_set_isSubsetOf: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r13, r8 mov r12, rdx and dword ptr [rsp+88h+var_78], 0 mov rbp, rsi mov rbx, rdi push 3 pop r15 mov [rsp+88h+var_70], r15 and dword ptr [rsp+88h+var_68], 0 mov [rsp+88h+var_60], r15 push 24h ; '$' pop rcx call JS_GetOpaque2 test rax, rax jz short loc_44FFE mov r14, rax mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+88h+var_38] mov rdi, rbx call js_setlike_get_size test eax, eax js short loc_44FFE mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+88h+var_78] mov rdi, rbx call js_setlike_get_has test eax, eax js short loc_44FFE mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+88h+var_68] mov rdi, rbx call js_setlike_get_keys test eax, eax js short loc_44FFE mov eax, [r14+18h] cmp [rsp+88h+var_38], rax jge short loc_4505C push 1 pop r14 xor r12d, r12d jmp loc_4511D loc_44FFE: xor r12d, r12d loc_45001: xor r13d, r13d push 6 pop r14 loc_45008: mov rsi, [rsp+88h+var_78] mov rdx, [rsp+88h+var_70] mov rdi, rbx call JS_FreeValue mov rsi, [rsp+88h+var_68] mov rdx, [rsp+88h+var_60] mov rdi, rbx call JS_FreeValue mov rdi, rbx mov rsi, r12 mov rdx, r15 call JS_FreeValue push 3 pop rdx mov rdi, rbx xor esi, esi call JS_FreeValue mov rax, r13 mov rdx, r14 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4505C: push 1 pop r9 mov rdi, rbx mov rsi, rbp mov rdx, r12 call js_create_map_iterator mov r12, rax mov r15, rdx cmp r15d, 6 jz short loc_45001 mov rax, [rsp+88h+var_78] mov [rsp+88h+var_40], rax mov rax, [rsp+88h+var_70] mov [rsp+88h+var_48], rax loc_4508E: mov dword ptr [rsp+88h+var_88], 1 mov rdi, rbx mov rsi, r12 mov rdx, r15 lea r9, [rsp+88h+var_7C] call js_map_iterator_next mov [rsp+88h+var_58], rax mov [rsp+88h+var_50], rdx cmp edx, 6 jz short loc_45119 cmp [rsp+88h+var_7C], 0 jnz short loc_45125 mov rcx, [r13+0] mov r8, [r13+8] lea rax, [rsp+88h+var_58] mov [rsp+88h+var_88], rax mov rdi, rbx mov rsi, [rsp+88h+var_40] mov rdx, [rsp+88h+var_48] push 1 pop r9 call JS_Call mov r14, rax mov rbp, rdx mov rsi, [rsp+88h+var_58] mov rdx, [rsp+88h+var_50] mov rdi, rbx call JS_FreeValue mov rdi, rbx mov rsi, r14 mov rdx, rbp call JS_ToBoolFree test eax, eax js short loc_45119 jnz loc_4508E push 1 jmp short loc_4511B loc_45119: push 6 loc_4511B: pop r14 loc_4511D: xor r13d, r13d jmp loc_45008 loc_45125: push 1 pop r14 mov r13, r14 jmp loc_45008
long long js_set_isSubsetOf(long long a1, _DWORD *a2, long long a3, long long a4, _QWORD *a5) { long long v7; // r15 long long Opaque2; // rax long long v9; // r14 long long v10; // rcx long long v11; // r8 unsigned long long map_iterator; // r12 long long v13; // r13 int v15; // ecx int v16; // r8d long long v17; // rdx long long v18; // rdx long long v19; // r14 long long v20; // rdx long long v21; // rbp int v22; // [rsp+Ch] [rbp-7Ch] BYREF long long v23; // [rsp+10h] [rbp-78h] BYREF long long v24; // [rsp+18h] [rbp-70h] long long v25; // [rsp+20h] [rbp-68h] BYREF long long v26; // [rsp+28h] [rbp-60h] long long v27; // [rsp+30h] [rbp-58h] BYREF long long v28; // [rsp+38h] [rbp-50h] long long v29; // [rsp+40h] [rbp-48h] long long v30; // [rsp+48h] [rbp-40h] long long v31[7]; // [rsp+50h] [rbp-38h] BYREF LODWORD(v23) = 0; v7 = 3LL; v24 = 3LL; LODWORD(v25) = 0; v26 = 3LL; Opaque2 = JS_GetOpaque2(a1, (long long)a2, a3, 0x24u); if ( Opaque2 && (v9 = Opaque2, (int)js_setlike_get_size(a1, *a5, a5[1], v31) >= 0) && (int)js_setlike_get_has(a1, *a5, a5[1], &v23) >= 0 && (int)js_setlike_get_keys(a1, *a5, a5[1], &v25) >= 0 ) { if ( v31[0] < *(unsigned int *)(v9 + 24) ) { map_iterator = 0LL; LABEL_15: v13 = 0LL; goto LABEL_9; } map_iterator = js_create_map_iterator(a1, a2, a3, v10, v11, 1); v7 = v17; if ( (_DWORD)v17 != 6 ) { v30 = v23; v29 = v24; while ( 1 ) { v27 = js_map_iterator_next(a1, map_iterator, v7, v15, v16, (unsigned int)&v22, 1); v28 = v18; if ( (_DWORD)v18 == 6 ) goto LABEL_15; if ( v22 ) { v13 = 1LL; goto LABEL_9; } v19 = JS_Call(a1, v30, v29, *a5, a5[1], 1, (long long)&v27); v21 = v20; JS_FreeValue(a1, v27, v28); if ( (int)JS_ToBoolFree(a1, v19, v21) <= 0 ) goto LABEL_15; } } } else { map_iterator = 0LL; } v13 = 0LL; LABEL_9: JS_FreeValue(a1, v23, v24); JS_FreeValue(a1, v25, v26); JS_FreeValue(a1, map_iterator, v7); JS_FreeValue(a1, 0LL, 3LL); return v13; }
js_set_isSubsetOf: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R13,R8 MOV R12,RDX AND dword ptr [RSP + 0x10],0x0 MOV RBP,RSI MOV RBX,RDI PUSH 0x3 POP R15 MOV qword ptr [RSP + 0x18],R15 AND dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],R15 PUSH 0x24 POP RCX CALL 0x00121207 TEST RAX,RAX JZ 0x00144ffe MOV R14,RAX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LEA RCX,[RSP + 0x50] MOV RDI,RBX CALL 0x0014643b TEST EAX,EAX JS 0x00144ffe MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LEA RCX,[RSP + 0x10] MOV RDI,RBX CALL 0x001464cf TEST EAX,EAX JS 0x00144ffe MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LEA RCX,[RSP + 0x20] MOV RDI,RBX CALL 0x00146558 TEST EAX,EAX JS 0x00144ffe MOV EAX,dword ptr [R14 + 0x18] CMP qword ptr [RSP + 0x50],RAX JGE 0x0014505c PUSH 0x1 POP R14 XOR R12D,R12D JMP 0x0014511d LAB_00144ffe: XOR R12D,R12D LAB_00145001: XOR R13D,R13D PUSH 0x6 POP R14 LAB_00145008: MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,RBX CALL 0x0011801e MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV RDI,RBX CALL 0x0011801e MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 CALL 0x0011801e PUSH 0x3 POP RDX MOV RDI,RBX XOR ESI,ESI CALL 0x0011801e MOV RAX,R13 MOV RDX,R14 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014505c: PUSH 0x1 POP R9 MOV RDI,RBX MOV RSI,RBP MOV RDX,R12 CALL 0x00144ab2 MOV R12,RAX MOV R15,RDX CMP R15D,0x6 JZ 0x00145001 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x40],RAX LAB_0014508e: MOV dword ptr [RSP],0x1 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 LEA R9,[RSP + 0xc] CALL 0x001465e1 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX CMP EDX,0x6 JZ 0x00145119 CMP dword ptr [RSP + 0xc],0x0 JNZ 0x00145125 MOV RCX,qword ptr [R13] MOV R8,qword ptr [R13 + 0x8] LEA RAX,[RSP + 0x30] MOV qword ptr [RSP],RAX MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x40] PUSH 0x1 POP R9 CALL 0x00121eb6 MOV R14,RAX MOV RBP,RDX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOV RDI,RBX CALL 0x0011801e MOV RDI,RBX MOV RSI,R14 MOV RDX,RBP CALL 0x0011cdfa TEST EAX,EAX JS 0x00145119 JNZ 0x0014508e PUSH 0x1 JMP 0x0014511b LAB_00145119: PUSH 0x6 LAB_0014511b: POP R14 LAB_0014511d: XOR R13D,R13D JMP 0x00145008 LAB_00145125: PUSH 0x1 POP R14 MOV R13,R14 JMP 0x00145008
int1 [16] js_set_isSubsetOf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; long lVar2; int8 uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int8 uStackY_90; int local_7c; int4 local_78; int4 uStack_74; int8 local_70; int4 local_68; int4 uStack_64; int8 local_60; int1 local_58 [16]; int8 local_48; int8 local_40; long local_38; local_78 = 0; local_70 = 3; local_68 = 0; local_60 = 3; lVar2 = JS_GetOpaque2(); if (((lVar2 == 0) || (iVar1 = js_setlike_get_size(param_1,*param_5,param_5[1],&local_38), iVar1 < 0)) || (iVar1 = js_setlike_get_has(param_1,*param_5,param_5[1],&local_78), iVar1 < 0)) { LAB_00144ffe: auVar4 = ZEXT816(3) << 0x40; } else { iVar1 = js_setlike_get_keys(param_1,*param_5,param_5[1],&local_68); auVar5._8_8_ = local_58._8_8_; auVar5._0_8_ = local_58._0_8_; if (iVar1 < 0) goto LAB_00144ffe; if (local_38 < (long)(ulong)*(uint *)(lVar2 + 0x18)) { auVar4 = ZEXT816(3) << 0x40; uVar3 = 1; LAB_0014511d: uStackY_90 = 0; goto LAB_00145008; } auVar4 = js_create_map_iterator(param_1,param_2,param_3); if (auVar4._8_4_ != 6) { local_40 = CONCAT44(uStack_74,local_78); local_48 = local_70; do { auVar5 = js_map_iterator_next(param_1,auVar4._0_8_,auVar4._8_8_); local_58 = auVar5; if (auVar5._8_4_ == 6) { LAB_00145119: uStackY_90 = 6; uVar3 = uStackY_90; auVar5 = local_58; goto LAB_0014511d; } if (local_7c != 0) { uStackY_90 = 1; uVar3 = uStackY_90; goto LAB_00145008; } auVar5 = JS_Call(param_1,local_40,local_48,*param_5,param_5[1],1,local_58); JS_FreeValue(param_1,local_58._0_8_,local_58._8_8_); iVar1 = JS_ToBoolFree(param_1,auVar5._0_8_,auVar5._8_8_); if (iVar1 < 0) goto LAB_00145119; } while (iVar1 != 0); uStackY_90 = 1; uVar3 = uStackY_90; auVar5 = local_58; goto LAB_0014511d; } } auVar5._8_8_ = local_58._8_8_; auVar5._0_8_ = local_58._0_8_; uStackY_90 = 0; uVar3 = 6; LAB_00145008: local_58 = auVar5; JS_FreeValue(param_1,CONCAT44(uStack_74,local_78),local_70); JS_FreeValue(param_1,CONCAT44(uStack_64,local_68),local_60); JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_); JS_FreeValue(param_1,0,3); auVar4._8_8_ = uVar3; auVar4._0_8_ = uStackY_90; return auVar4; }
34,853
my_strxfrm_pad_desc_and_reverse
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend= strend; } return frmend - str; }
O0
c
my_strxfrm_pad_desc_and_reverse: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl %r9d, -0x28(%rbp) cmpl $0x0, -0x24(%rbp) je 0x926b3 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x926b3 movl -0x28(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x926b3 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl -0x24(%rbp), %ecx movq -0x8(%rbp), %rdx imull 0x98(%rdx), %ecx cmpl %ecx, %eax jae 0x9266f movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl %eax, -0x3c(%rbp) jmp 0x92680 movl -0x24(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x98(%rcx), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x2c(%rbp), %eax movl %eax, %edx movq -0x8(%rbp), %rax movzbl 0xb0(%rax), %ecx callq 0x95ba0 movl -0x2c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x28(%rbp), %edx movl 0x10(%rbp), %ecx callq 0x95a60 movl -0x28(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x92710 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x92710 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x8(%rbp), %rax movzbl 0xb0(%rax), %ecx callq 0x95ba0 movq -0x20(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strxfrm_pad_desc_and_reverse: push rbp mov rbp, rsp sub rsp, 40h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_28], r9d cmp [rbp+var_24], 0 jz loc_926B3 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_926B3 mov eax, [rbp+var_28] and eax, 40h cmp eax, 0 jz short loc_926B3 mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov ecx, [rbp+var_24] mov rdx, [rbp+var_8] imul ecx, [rdx+98h] cmp eax, ecx jnb short loc_9266F mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov [rbp+var_3C], eax jmp short loc_92680 loc_9266F: mov eax, [rbp+var_24] mov rcx, [rbp+var_8] imul eax, [rcx+98h] mov [rbp+var_3C], eax loc_92680: mov eax, [rbp+var_3C] mov [rbp+var_2C], eax mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov eax, [rbp+var_2C] mov edx, eax mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+0B0h] call my_ci_fill_0 mov ecx, [rbp+var_2C] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax loc_926B3: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_28] mov ecx, [rbp+arg_0] call my_strxfrm_desc_and_reverse mov eax, [rbp+var_28] and eax, 80h cmp eax, 0 jz short loc_92710 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_92710 mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov [rbp+var_38], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_38] mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+0B0h] call my_ci_fill_0 mov rax, [rbp+var_20] mov [rbp+var_18], rax loc_92710: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx add rsp, 40h pop rbp retn
long long my_strxfrm_pad_desc_and_reverse( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned int v8; // [rsp+4h] [rbp-3Ch] unsigned long long v11; // [rsp+28h] [rbp-18h] v11 = a3; if ( a5 && a3 < a4 && (a6 & 0x40) != 0 ) { if ( (int)a4 - (int)a3 >= (unsigned int)(*(_DWORD *)(a1 + 152) * a5) ) v8 = *(_DWORD *)(a1 + 152) * a5; else v8 = a4 - a3; my_ci_fill_0(a1, a3, v8, *(unsigned __int8 *)(a1 + 176)); v11 += v8; } my_strxfrm_desc_and_reverse(a2, v11, a6, a7); if ( (a6 & 0x80) != 0 && v11 < a4 ) { my_ci_fill_0(a1, v11, a4 - v11, *(unsigned __int8 *)(a1 + 176)); v11 = a4; } return v11 - a2; }
my_strxfrm_pad_desc_and_reverse: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV EAX,dword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],R9D CMP dword ptr [RBP + -0x24],0x0 JZ 0x001926b3 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001926b3 MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x40 CMP EAX,0x0 JZ 0x001926b3 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV ECX,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x8] IMUL ECX,dword ptr [RDX + 0x98] CMP EAX,ECX JNC 0x0019266f MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV dword ptr [RBP + -0x3c],EAX JMP 0x00192680 LAB_0019266f: MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x98] MOV dword ptr [RBP + -0x3c],EAX LAB_00192680: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0xb0] CALL 0x00195ba0 MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX LAB_001926b3: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + 0x10] CALL 0x00195a60 MOV EAX,dword ptr [RBP + -0x28] AND EAX,0x80 CMP EAX,0x0 JZ 0x00192710 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00192710 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0xb0] CALL 0x00195ba0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x18],RAX LAB_00192710: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_strxfrm_pad_desc_and_reverse (long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6, int4 param_7) { int4 local_44; int8 local_20; local_20 = param_3; if (((param_5 != 0) && (param_3 < param_4)) && ((param_6 & 0x40) != 0)) { if ((uint)((int)param_4 - (int)param_3) < (uint)(param_5 * *(int *)(param_1 + 0x98))) { local_44 = (int)param_4 - (int)param_3; } else { local_44 = param_5 * *(int *)(param_1 + 0x98); } my_ci_fill(param_1,param_3,local_44,*(int1 *)(param_1 + 0xb0)); local_20 = param_3 + local_44; } my_strxfrm_desc_and_reverse(param_2,local_20,param_6,param_7); if (((param_6 & 0x80) != 0) && (local_20 < param_4)) { my_ci_fill(param_1,local_20,param_4 - local_20,*(int1 *)(param_1 + 0xb0)); local_20 = param_4; } return local_20 - param_2; }
34,854
secp256k1_recover
corpus-core[P]colibri-stateless/src/util/crypto.c
bool secp256k1_recover(const bytes32_t digest, bytes_t signature, uint8_t* pubkey) { uint8_t pub[65] = {0}; if (ecdsa_recover_pub_from_sig(&secp256k1, pub, signature.data, digest, signature.data[64] % 27)) return false; else memcpy(pubkey, pub + 1, 64); return true; }
O0
c
secp256k1_recover: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movl %esi, -0x18(%rbp) movq %rdx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq %rcx, -0x28(%rbp) leaq -0x70(%rbp), %rdi xorl %esi, %esi movl $0x41, %edx callq 0x231c0 leaq -0x70(%rbp), %rsi movq -0x10(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movzbl 0x40(%rax), %eax movl $0x1b, %edi cltd idivl %edi movl %edx, %r8d movq -0x78(%rbp), %rdx leaq 0x45aec(%rip), %rdi # 0xea8d4 callq 0xd0340 cmpl $0x0, %eax je 0xa4df8 movb $0x0, -0x1(%rbp) jmp 0xa4e12 movq -0x28(%rbp), %rdi leaq -0x70(%rbp), %rsi addq $0x1, %rsi movl $0x40, %edx callq 0x230a0 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x80, %rsp popq %rbp retq
secp256k1_recover: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_18], esi mov [rbp+var_10], rdx mov [rbp+var_20], rdi mov [rbp+var_28], rcx lea rdi, [rbp+var_70] xor esi, esi mov edx, 41h ; 'A' call _memset lea rsi, [rbp+var_70] mov rax, [rbp+var_10] mov [rbp+var_78], rax mov rcx, [rbp+var_20] mov rax, [rbp+var_10] movzx eax, byte ptr [rax+40h] mov edi, 1Bh cdq idiv edi mov r8d, edx mov rdx, [rbp+var_78] lea rdi, secp256k1 call ecdsa_recover_pub_from_sig cmp eax, 0 jz short loc_A4DF8 mov [rbp+var_1], 0 jmp short loc_A4E12 loc_A4DF8: mov rdi, [rbp+var_28] lea rsi, [rbp+var_70] add rsi, 1 mov edx, 40h ; '@' call _memcpy mov [rbp+var_1], 1 loc_A4E12: mov al, [rbp+var_1] and al, 1 add rsp, 80h pop rbp retn
char secp256k1_recover(long long a1, int a2, long long a3, long long a4) { char v5; // [rsp+10h] [rbp-70h] BYREF _BYTE v6[7]; // [rsp+11h] [rbp-6Fh] BYREF long long v7; // [rsp+58h] [rbp-28h] long long v8; // [rsp+60h] [rbp-20h] int v9; // [rsp+68h] [rbp-18h] long long v10; // [rsp+70h] [rbp-10h] v9 = a2; v10 = a3; v8 = a1; v7 = a4; memset(&v5, 0LL, 65LL); if ( (unsigned int)ecdsa_recover_pub_from_sig(&secp256k1, &v5, v10, v8, *(unsigned __int8 *)(v10 + 64) % 27) ) return 0; memcpy(v7, v6, 64LL); return 1; }
secp256k1_recover: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV dword ptr [RBP + -0x18],ESI MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RCX LEA RDI,[RBP + -0x70] XOR ESI,ESI MOV EDX,0x41 CALL 0x001231c0 LEA RSI,[RBP + -0x70] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x78],RAX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x40] MOV EDI,0x1b CDQ IDIV EDI MOV R8D,EDX MOV RDX,qword ptr [RBP + -0x78] LEA RDI,[0x1ea8d4] CALL 0x001d0340 CMP EAX,0x0 JZ 0x001a4df8 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001a4e12 LAB_001a4df8: MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x70] ADD RSI,0x1 MOV EDX,0x40 CALL 0x001230a0 MOV byte ptr [RBP + -0x1],0x1 LAB_001a4e12: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x80 POP RBP RET
bool secp256k1_recover(int8 param_1,int4 param_2,long param_3,void *param_4) { int iVar1; int1 local_78; int1 auStack_77 [71]; void *local_30; int8 local_28; int4 local_20; long local_18; local_30 = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; memset(&local_78,0,0x41); iVar1 = ecdsa_recover_pub_from_sig (secp256k1,&local_78,local_18,local_28,(ulong)*(byte *)(local_18 + 0x40) % 0x1b) ; if (iVar1 == 0) { memcpy(local_30,auStack_77,0x40); } return iVar1 == 0; }
34,855
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool FindSymbol(uint64_t pc, const int fd, char* out, size_t out_size, uint64_t symbol_offset, const ElfW(Shdr) * strtab, const ElfW(Shdr) * symtab) { if (symtab == nullptr) { return false; } const size_t num_symbols = symtab->sh_size / symtab->sh_entsize; for (unsigned i = 0; i < num_symbols;) { size_t offset = symtab->sh_offset + i * symtab->sh_entsize; // If we are reading Elf64_Sym's, we want to limit this array to // 32 elements (to keep stack consumption low), otherwise we can // have a 64 element Elf32_Sym array. # if defined(__WORDSIZE) && __WORDSIZE == 64 const size_t NUM_SYMBOLS = 32U; # else const size_t NUM_SYMBOLS = 64U; # endif // Read at most NUM_SYMBOLS symbols at once to save read() calls. ElfW(Sym) buf[NUM_SYMBOLS]; size_t num_symbols_to_read = std::min(NUM_SYMBOLS, num_symbols - i); const ssize_t len = ReadFromOffset(fd, &buf, sizeof(buf[0]) * num_symbols_to_read, offset); NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0); const size_t num_symbols_in_buf = static_cast<size_t>(len) / sizeof(buf[0]); NGLOG_SAFE_ASSERT(num_symbols_in_buf <= num_symbols_to_read); for (unsigned j = 0; j < num_symbols_in_buf; ++j) { const ElfW(Sym)& symbol = buf[j]; uint64_t start_address = symbol.st_value; start_address += symbol_offset; uint64_t end_address = start_address + symbol.st_size; if (symbol.st_value != 0 && // Skip null value symbols. symbol.st_shndx != 0 && // Skip undefined symbols. start_address <= pc && pc < end_address) { ssize_t len1 = ReadFromOffset(fd, out, out_size, strtab->sh_offset + symbol.st_name); if (len1 <= 0 || memchr(out, '\0', out_size) == nullptr) { memset(out, 0, out_size); return false; } return true; // Obtained the symbol name. } } i += num_symbols_in_buf; } return false; }
O0
cpp
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*): pushq %rbp movq %rsp, %rbp subq $0x3b0, %rsp # imm = 0x3B0 movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) cmpq $0x0, 0x10(%rbp) jne 0x4a756 movb $0x0, -0x1(%rbp) jmp 0x4a984 movq 0x10(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rbp), %rcx xorl %edx, %edx divq 0x38(%rcx) movq %rax, -0x40(%rbp) movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax cmpq -0x40(%rbp), %rax jae 0x4a980 movq 0x10(%rbp), %rax movq 0x18(%rax), %rax movl -0x44(%rbp), %ecx movq 0x10(%rbp), %rdx imulq 0x38(%rdx), %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq $0x20, -0x58(%rbp) movq -0x40(%rbp), %rax movl -0x44(%rbp), %ecx subq %rcx, %rax movq %rax, -0x370(%rbp) leaq -0x58(%rbp), %rdi leaq -0x370(%rbp), %rsi callq 0xc2a0 movq (%rax), %rax movq %rax, -0x368(%rbp) movl -0x14(%rbp), %edi imulq $0x18, -0x368(%rbp), %rdx movq -0x50(%rbp), %rcx leaq -0x360(%rbp), %rsi callq 0x49070 movq %rax, -0x378(%rbp) movq -0x378(%rbp), %rax movl $0x18, %ecx xorl %edx, %edx divq %rcx cmpq $0x0, %rdx jne 0x4a809 jmp 0x4a80e callq 0x93b0 movq -0x378(%rbp), %rax movl $0x18, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x380(%rbp) movq -0x380(%rbp), %rax cmpq -0x368(%rbp), %rax ja 0x4a838 jmp 0x4a83d callq 0x93b0 movl $0x0, -0x384(%rbp) movl -0x384(%rbp), %eax cmpq -0x380(%rbp), %rax jae 0x4a96b movl -0x384(%rbp), %eax movl %eax, %ecx leaq -0x360(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x390(%rbp) movq -0x390(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x398(%rbp) movq -0x30(%rbp), %rax addq -0x398(%rbp), %rax movq %rax, -0x398(%rbp) movq -0x398(%rbp), %rax movq -0x390(%rbp), %rcx addq 0x10(%rcx), %rax movq %rax, -0x3a0(%rbp) movq -0x390(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x4a955 movq -0x390(%rbp), %rax movzwl 0x6(%rax), %eax cmpl $0x0, %eax je 0x4a955 movq -0x398(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0x4a955 movq -0x10(%rbp), %rax cmpq -0x3a0(%rbp), %rax jae 0x4a955 movl -0x14(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x38(%rbp), %rax movq 0x18(%rax), %rcx movq -0x390(%rbp), %rax movl (%rax), %eax addq %rax, %rcx callq 0x49070 movq %rax, -0x3a8(%rbp) cmpq $0x0, -0x3a8(%rbp) jle 0x4a93a movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x9840 cmpq $0x0, %rax jne 0x4a94f movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x93a0 movb $0x0, -0x1(%rbp) jmp 0x4a984 movb $0x1, -0x1(%rbp) jmp 0x4a984 jmp 0x4a957 movl -0x384(%rbp), %eax addl $0x1, %eax movl %eax, -0x384(%rbp) jmp 0x4a847 movq -0x380(%rbp), %rcx movl -0x44(%rbp), %eax addq %rcx, %rax movl %eax, -0x44(%rbp) jmp 0x4a773 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x3b0, %rsp # imm = 0x3B0 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_: push rbp mov rbp, rsp sub rsp, 3B0h mov rax, [rbp+arg_0] mov [rbp+var_14+4], rdi mov dword ptr [rbp+var_14], esi mov qword ptr [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 cmp [rbp+arg_0], 0 jnz short loc_4A756 mov [rbp+var_1], 0 jmp loc_4A984 loc_4A756: mov rax, [rbp+arg_0] mov rax, [rax+20h] mov rcx, [rbp+arg_0] xor edx, edx div qword ptr [rcx+38h] mov [rbp+var_40], rax mov [rbp+var_44], 0 loc_4A773: mov eax, [rbp+var_44] cmp rax, [rbp+var_40] jnb loc_4A980 mov rax, [rbp+arg_0] mov rax, [rax+18h] mov ecx, [rbp+var_44] mov rdx, [rbp+arg_0] imul rcx, [rdx+38h] add rax, rcx mov [rbp+var_50], rax mov [rbp+var_58], 20h ; ' ' mov rax, [rbp+var_40] mov ecx, [rbp+var_44] sub rax, rcx mov [rbp+var_370], rax lea rdi, [rbp+var_58] lea rsi, [rbp+var_370] call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rax, [rax] mov [rbp+var_368], rax mov edi, dword ptr [rbp+var_14]; this imul rdx, [rbp+var_368], 18h; void * mov rcx, [rbp+var_50]; unsigned __int64 lea rsi, [rbp+var_360]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov [rbp+var_378], rax mov rax, [rbp+var_378] mov ecx, 18h xor edx, edx div rcx cmp rdx, 0 jnz short loc_4A809 jmp short loc_4A80E loc_4A809: call _abort loc_4A80E: mov rax, [rbp+var_378] mov ecx, 18h xor edx, edx div rcx mov [rbp+var_380], rax mov rax, [rbp+var_380] cmp rax, [rbp+var_368] ja short loc_4A838 jmp short loc_4A83D loc_4A838: call _abort loc_4A83D: mov [rbp+var_384], 0 loc_4A847: mov eax, [rbp+var_384] cmp rax, [rbp+var_380] jnb loc_4A96B mov eax, [rbp+var_384] mov ecx, eax lea rax, [rbp+var_360] imul rcx, 18h add rax, rcx mov [rbp+var_390], rax mov rax, [rbp+var_390] mov rax, [rax+8] mov [rbp+var_398], rax mov rax, [rbp+var_30] add rax, [rbp+var_398] mov [rbp+var_398], rax mov rax, [rbp+var_398] mov rcx, [rbp+var_390] add rax, [rcx+10h] mov [rbp+var_3A0], rax mov rax, [rbp+var_390] cmp qword ptr [rax+8], 0 jz loc_4A955 mov rax, [rbp+var_390] movzx eax, word ptr [rax+6] cmp eax, 0 jz short loc_4A955 mov rax, [rbp+var_398] cmp rax, [rbp+var_14+4] ja short loc_4A955 mov rax, [rbp+var_14+4] cmp rax, [rbp+var_3A0] jnb short loc_4A955 mov edi, dword ptr [rbp+var_14]; this mov rsi, qword ptr [rbp+var_20]; int mov rdx, [rbp+var_28]; void * mov rax, [rbp+var_38] mov rcx, [rax+18h] mov rax, [rbp+var_390] mov eax, [rax] add rcx, rax; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov [rbp+var_3A8], rax cmp [rbp+var_3A8], 0 jle short loc_4A93A mov rdi, qword ptr [rbp+var_20] mov rdx, [rbp+var_28] xor esi, esi call _memchr cmp rax, 0 jnz short loc_4A94F loc_4A93A: mov rdi, qword ptr [rbp+var_20] mov rdx, [rbp+var_28] xor esi, esi call _memset mov [rbp+var_1], 0 jmp short loc_4A984 loc_4A94F: mov [rbp+var_1], 1 jmp short loc_4A984 loc_4A955: jmp short $+2 loc_4A957: mov eax, [rbp+var_384] add eax, 1 mov [rbp+var_384], eax jmp loc_4A847 loc_4A96B: mov rcx, [rbp+var_380] mov eax, [rbp+var_44] add rax, rcx mov [rbp+var_44], eax jmp loc_4A773 loc_4A980: mov [rbp+var_1], 0 loc_4A984: mov al, [rbp+var_1] and al, 1 add rsp, 3B0h pop rbp retn
char nglog::tools::FindSymbol(long long a1, int a2, long long a3, void *a4, long long a5, long long a6, _QWORD *a7) { long long v7; // rdi unsigned long long v9; // [rsp+18h] [rbp-398h] unsigned int *v10; // [rsp+20h] [rbp-390h] unsigned int i; // [rsp+2Ch] [rbp-384h] unsigned long long v12; // [rsp+30h] [rbp-380h] unsigned long long v13; // [rsp+38h] [rbp-378h] unsigned long long v14; // [rsp+40h] [rbp-370h] BYREF unsigned long long v15; // [rsp+48h] [rbp-368h] _QWORD v16[97]; // [rsp+50h] [rbp-360h] BYREF long long v17; // [rsp+358h] [rbp-58h] BYREF unsigned long long v18; // [rsp+360h] [rbp-50h] unsigned int v19; // [rsp+36Ch] [rbp-44h] unsigned long long v20; // [rsp+370h] [rbp-40h] long long v21; // [rsp+378h] [rbp-38h] long long v22; // [rsp+380h] [rbp-30h] void *v23; // [rsp+388h] [rbp-28h] int v24[2]; // [rsp+390h] [rbp-20h] _DWORD v25[4]; // [rsp+39Ch] [rbp-14h] *(_QWORD *)&v25[1] = a1; v25[0] = a2; *(_QWORD *)v24 = a3; v23 = a4; v22 = a5; v21 = a6; if ( !a7 ) return 0; v20 = a7[4] / a7[7]; v19 = 0; LABEL_4: if ( v19 >= v20 ) return 0; v18 = a7[7] * v19 + a7[3]; v17 = 32LL; v14 = v20 - v19; v15 = *std::min<unsigned long>(&v17, &v14); v7 = v25[0]; v13 = nglog::tools::ReadFromOffset((nglog::tools *)v25[0], (long long)v16, (char *)(24 * v15), v18); if ( v13 % 0x18 ) abort(v7, v16); v12 = v13 / 0x18; if ( v13 / 0x18 > v15 ) abort(v7, v16); for ( i = 0; ; ++i ) { if ( i >= v12 ) { v19 += v12; goto LABEL_4; } v10 = (unsigned int *)&v16[3 * i]; v9 = *((_QWORD *)v10 + 1) + v22; if ( *((_QWORD *)v10 + 1) ) { if ( *((_WORD *)v10 + 3) && v9 <= *(_QWORD *)&v25[1] && *(_QWORD *)&v25[1] < v16[3 * i + 2] + v9 ) break; } } if ( (long long)nglog::tools::ReadFromOffset( (nglog::tools *)v25[0], *(long long *)v24, (char *)v23, *v10 + *(_QWORD *)(v21 + 24)) > 0 && memchr(*(_QWORD *)v24, 0LL, v23) ) { return 1; } memset(*(_QWORD *)v24, 0LL, v23); return 0; }
FindSymbol: PUSH RBP MOV RBP,RSP SUB RSP,0x3b0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 CMP qword ptr [RBP + 0x10],0x0 JNZ 0x0014a756 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014a984 LAB_0014a756: MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + 0x10] XOR EDX,EDX DIV qword ptr [RCX + 0x38] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x44],0x0 LAB_0014a773: MOV EAX,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0014a980 MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + 0x10] IMUL RCX,qword ptr [RDX + 0x38] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x58],0x20 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x44] SUB RAX,RCX MOV qword ptr [RBP + -0x370],RAX LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0x370] CALL 0x0010c2a0 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x368],RAX MOV EDI,dword ptr [RBP + -0x14] IMUL RDX,qword ptr [RBP + -0x368],0x18 MOV RCX,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x360] CALL 0x00149070 MOV qword ptr [RBP + -0x378],RAX MOV RAX,qword ptr [RBP + -0x378] MOV ECX,0x18 XOR EDX,EDX DIV RCX CMP RDX,0x0 JNZ 0x0014a809 JMP 0x0014a80e LAB_0014a809: CALL 0x001093b0 LAB_0014a80e: MOV RAX,qword ptr [RBP + -0x378] MOV ECX,0x18 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x380],RAX MOV RAX,qword ptr [RBP + -0x380] CMP RAX,qword ptr [RBP + -0x368] JA 0x0014a838 JMP 0x0014a83d LAB_0014a838: CALL 0x001093b0 LAB_0014a83d: MOV dword ptr [RBP + -0x384],0x0 LAB_0014a847: MOV EAX,dword ptr [RBP + -0x384] CMP RAX,qword ptr [RBP + -0x380] JNC 0x0014a96b MOV EAX,dword ptr [RBP + -0x384] MOV ECX,EAX LEA RAX,[RBP + -0x360] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x390],RAX MOV RAX,qword ptr [RBP + -0x390] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x398],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x398] MOV qword ptr [RBP + -0x398],RAX MOV RAX,qword ptr [RBP + -0x398] MOV RCX,qword ptr [RBP + -0x390] ADD RAX,qword ptr [RCX + 0x10] MOV qword ptr [RBP + -0x3a0],RAX MOV RAX,qword ptr [RBP + -0x390] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0014a955 MOV RAX,qword ptr [RBP + -0x390] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0x0 JZ 0x0014a955 MOV RAX,qword ptr [RBP + -0x398] CMP RAX,qword ptr [RBP + -0x10] JA 0x0014a955 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x3a0] JNC 0x0014a955 MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x390] MOV EAX,dword ptr [RAX] ADD RCX,RAX CALL 0x00149070 MOV qword ptr [RBP + -0x3a8],RAX CMP qword ptr [RBP + -0x3a8],0x0 JLE 0x0014a93a MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00109840 CMP RAX,0x0 JNZ 0x0014a94f LAB_0014a93a: MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x001093a0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014a984 LAB_0014a94f: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014a984 LAB_0014a955: JMP 0x0014a957 LAB_0014a957: MOV EAX,dword ptr [RBP + -0x384] ADD EAX,0x1 MOV dword ptr [RBP + -0x384],EAX JMP 0x0014a847 LAB_0014a96b: MOV RCX,qword ptr [RBP + -0x380] MOV EAX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV dword ptr [RBP + -0x44],EAX JMP 0x0014a773 LAB_0014a980: MOV byte ptr [RBP + -0x1],0x0 LAB_0014a984: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x3b0 POP RBP RET
/* nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*) */ int1 nglog::tools::FindSymbol (ulong param_1,int param_2,char *param_3,ulong param_4,ulong param_5,Elf64_Shdr *param_6, Elf64_Shdr *param_7) { ulong *puVar1; ulong uVar2; long lVar3; void *pvVar4; ulong uVar5; uint local_38c; ulong local_378; ulong local_370; uint local_368; short sStack_362; long alStack_360 [96]; ulong local_60; ulong local_58; uint local_4c; ulong local_48; Elf64_Shdr *local_40; ulong local_38; ulong local_30; char *local_28; int local_1c; ulong local_18; if (param_7 != (Elf64_Shdr *)0x0) { local_48 = param_7->sh_size / param_7->sh_entsize; local_40 = param_6; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; for (local_4c = 0; local_4c < local_48; local_4c = local_4c + (int)uVar2) { local_58 = param_7->sh_offset + (ulong)local_4c * param_7->sh_entsize; local_60 = 0x20; local_378 = local_48 - local_4c; puVar1 = std::min<unsigned_long>(&local_60,&local_378); local_370 = *puVar1; uVar2 = ReadFromOffset(local_1c,&local_368,local_370 * 0x18,local_58); if (uVar2 % 0x18 != 0) { /* WARNING: Subroutine does not return */ abort(); } uVar2 = uVar2 / 0x18; if (local_370 < uVar2) { /* WARNING: Subroutine does not return */ abort(); } for (local_38c = 0; local_38c < uVar2; local_38c = local_38c + 1) { uVar5 = (ulong)local_38c; if ((((alStack_360[uVar5 * 3] != 0) && ((&sStack_362)[uVar5 * 0xc] != 0)) && (local_38 + alStack_360[uVar5 * 3] <= local_18)) && (local_18 < local_38 + alStack_360[uVar5 * 3] + alStack_360[uVar5 * 3 + 1])) { lVar3 = ReadFromOffset(local_1c,local_28,local_30, local_40->sh_offset + (ulong)(&local_368)[uVar5 * 6]); if ((0 < lVar3) && (pvVar4 = memchr(local_28,0,local_30), pvVar4 != (void *)0x0)) { return 1; } memset(local_28,0,local_30); return 0; } } } } return 0; }
34,856
maria_rtree_pick_key
eloqsql/storage/maria/ma_rt_index.c
static const uchar *maria_rtree_pick_key(const MARIA_KEY *key, const MARIA_PAGE *page) { const MARIA_HA *info= page->info; MARIA_SHARE *share= info->s; double increase; double best_incr= DBL_MAX; double area; double UNINIT_VAR(best_area); const uchar *best_key= NULL; const uchar *k= rt_PAGE_FIRST_KEY(share, page->buff, page->node); const uchar *last= rt_PAGE_END(page); for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key->data_length, page->node)) { /* The following is safe as -1.0 is an exact number */ if ((increase= maria_rtree_area_increase(key->keyinfo->seg, k, key->data, key->data_length + key->ref_length, &area)) == -1.0) return NULL; /* The following should be safe, even if we compare doubles */ if (!best_key || increase < best_incr || ((increase == best_incr) && (area < best_area))) { best_key= k; best_area= area; best_incr= increase; } } return best_key; }
O0
c
maria_rtree_pick_key: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movsd 0xe1732(%rip), %xmm0 # 0x160040 movsd %xmm0, -0x38(%rbp) movsd -0x48(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movq $0x0, -0x50(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax movq -0x18(%rbp), %rcx movl 0x28(%rcx), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx movl 0x20(%rcx), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax cmpq -0x60(%rbp), %rax jae 0x7ea5c movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0xc0(%rax), %rdi movq -0x58(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movl 0x10(%rax), %ecx movq -0x10(%rbp), %rax addl 0x14(%rax), %ecx leaq -0x40(%rbp), %r8 callq 0x844d0 movsd %xmm0, -0x30(%rbp) movsd 0xe169e(%rip), %xmm1 # 0x160048 ucomisd %xmm1, %xmm0 jne 0x7e9bf jp 0x7e9bf movq $0x0, -0x8(%rbp) jmp 0x7ea64 cmpq $0x0, -0x50(%rbp) je 0x7e9f4 movsd -0x30(%rbp), %xmm1 movsd -0x38(%rbp), %xmm0 ucomisd %xmm1, %xmm0 ja 0x7e9f4 movsd -0x30(%rbp), %xmm0 ucomisd -0x38(%rbp), %xmm0 jne 0x7ea10 jp 0x7ea10 movsd -0x40(%rbp), %xmm1 movsd -0x48(%rbp), %xmm0 ucomisd %xmm1, %xmm0 jbe 0x7ea10 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movsd -0x40(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) jmp 0x7ea12 movq -0x58(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x10(%rcx), %ecx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x28(%rax) je 0x7ea3a movq -0x18(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x6c(%rbp) jmp 0x7ea47 movq -0x28(%rbp), %rax movl 0x3e0(%rax), %eax movl %eax, -0x6c(%rbp) movq -0x68(%rbp), %rax movl -0x6c(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) jmp 0x7e95e movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nop
maria_rtree_pick_key: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax movsd xmm0, cs:qword_160040 movsd [rbp+var_38], xmm0 movsd xmm0, [rbp+var_48] movsd [rbp+var_48], xmm0 mov [rbp+var_50], 0 mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] add rax, rcx mov rcx, [rbp+var_18] mov ecx, [rcx+28h] add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_18] mov ecx, [rcx+20h] add rax, rcx mov [rbp+var_60], rax loc_7E95E: mov rax, [rbp+var_58] cmp rax, [rbp+var_60] jnb loc_7EA5C mov rax, [rbp+var_10] mov rax, [rax+8] mov rdi, [rax+0C0h] mov rsi, [rbp+var_58] mov rax, [rbp+var_10] mov rdx, [rax] mov rax, [rbp+var_10] mov ecx, [rax+10h] mov rax, [rbp+var_10] add ecx, [rax+14h] lea r8, [rbp+var_40] call maria_rtree_area_increase movsd [rbp+var_30], xmm0 movsd xmm1, cs:qword_160048 ucomisd xmm0, xmm1 jnz short loc_7E9BF jp short loc_7E9BF mov [rbp+var_8], 0 jmp loc_7EA64 loc_7E9BF: cmp [rbp+var_50], 0 jz short loc_7E9F4 movsd xmm1, [rbp+var_30] movsd xmm0, [rbp+var_38] ucomisd xmm0, xmm1 ja short loc_7E9F4 movsd xmm0, [rbp+var_30] ucomisd xmm0, [rbp+var_38] jnz short loc_7EA10 jp short loc_7EA10 movsd xmm1, [rbp+var_40] movsd xmm0, [rbp+var_48] ucomisd xmm0, xmm1 jbe short loc_7EA10 loc_7E9F4: mov rax, [rbp+var_58] mov [rbp+var_50], rax movsd xmm0, [rbp+var_40] movsd [rbp+var_48], xmm0 movsd xmm0, [rbp+var_30] movsd [rbp+var_38], xmm0 loc_7EA10: jmp short $+2 loc_7EA12: mov rax, [rbp+var_58] mov rcx, [rbp+var_10] mov ecx, [rcx+10h] add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_18] cmp dword ptr [rax+28h], 0 jz short loc_7EA3A mov rax, [rbp+var_18] mov eax, [rax+28h] mov [rbp+var_6C], eax jmp short loc_7EA47 loc_7EA3A: mov rax, [rbp+var_28] mov eax, [rax+3E0h] mov [rbp+var_6C], eax loc_7EA47: mov rax, [rbp+var_68] mov ecx, [rbp+var_6C] mov ecx, ecx add rax, rcx mov [rbp+var_58], rax jmp loc_7E95E loc_7EA5C: mov rax, [rbp+var_50] mov [rbp+var_8], rax loc_7EA64: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
unsigned long long maria_rtree_pick_key(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-6Ch] unsigned long long v4; // [rsp+10h] [rbp-60h] unsigned long long v5; // [rsp+18h] [rbp-58h] unsigned long long v6; // [rsp+20h] [rbp-50h] double v7; // [rsp+28h] [rbp-48h] double v8; // [rsp+30h] [rbp-40h] BYREF double v9; // [rsp+38h] [rbp-38h] double v10; // [rsp+40h] [rbp-30h] long long v11; // [rsp+48h] [rbp-28h] long long *v12; // [rsp+50h] [rbp-20h] long long v13; // [rsp+58h] [rbp-18h] long long v14; // [rsp+60h] [rbp-10h] v14 = a1; v13 = a2; v12 = *(long long **)a2; v11 = *v12; v9 = 1.797693134862316e308; v6 = 0LL; v5 = *(unsigned int *)(a2 + 40) + *(unsigned int *)(v11 + 1860) + *(_QWORD *)(a2 + 16); v4 = *(unsigned int *)(a2 + 32) + *(_QWORD *)(a2 + 16); while ( v5 < v4 ) { v10 = maria_rtree_area_increase( *(_QWORD *)(*(_QWORD *)(v14 + 8) + 192LL), v5, *(_QWORD *)v14, (unsigned int)(*(_DWORD *)(v14 + 20) + *(_DWORD *)(v14 + 16)), &v8); if ( v10 == -1.0 ) return 0LL; if ( !v6 || v9 > v10 || v10 == v9 && v7 > v8 ) { v6 = v5; v7 = v8; v9 = v10; } if ( *(_DWORD *)(v13 + 40) ) v3 = *(_DWORD *)(v13 + 40); else v3 = *(_DWORD *)(v11 + 992); v5 += v3 + (unsigned long long)*(unsigned int *)(v14 + 16); } return v6; }
maria_rtree_pick_key: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOVSD XMM0,qword ptr [0x00260040] MOVSD qword ptr [RBP + -0x38],XMM0 MOVSD XMM0,qword ptr [RBP + -0x48] MOVSD qword ptr [RBP + -0x48],XMM0 MOV qword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_0017e95e: MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x60] JNC 0x0017ea5c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RAX + 0xc0] MOV RSI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] ADD ECX,dword ptr [RAX + 0x14] LEA R8,[RBP + -0x40] CALL 0x001844d0 MOVSD qword ptr [RBP + -0x30],XMM0 MOVSD XMM1,qword ptr [0x00260048] UCOMISD XMM0,XMM1 JNZ 0x0017e9bf JP 0x0017e9bf MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017ea64 LAB_0017e9bf: CMP qword ptr [RBP + -0x50],0x0 JZ 0x0017e9f4 MOVSD XMM1,qword ptr [RBP + -0x30] MOVSD XMM0,qword ptr [RBP + -0x38] UCOMISD XMM0,XMM1 JA 0x0017e9f4 MOVSD XMM0,qword ptr [RBP + -0x30] UCOMISD XMM0,qword ptr [RBP + -0x38] JNZ 0x0017ea10 JP 0x0017ea10 MOVSD XMM1,qword ptr [RBP + -0x40] MOVSD XMM0,qword ptr [RBP + -0x48] UCOMISD XMM0,XMM1 JBE 0x0017ea10 LAB_0017e9f4: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOVSD XMM0,qword ptr [RBP + -0x40] MOVSD qword ptr [RBP + -0x48],XMM0 MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD qword ptr [RBP + -0x38],XMM0 LAB_0017ea10: JMP 0x0017ea12 LAB_0017ea12: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x10] ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x28],0x0 JZ 0x0017ea3a MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x6c],EAX JMP 0x0017ea47 LAB_0017ea3a: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x3e0] MOV dword ptr [RBP + -0x6c],EAX LAB_0017ea47: MOV RAX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RBP + -0x6c] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX JMP 0x0017e95e LAB_0017ea5c: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX LAB_0017ea64: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
ulong maria_rtree_pick_key(int8 *param_1,int8 *param_2) { uint uVar1; long lVar2; uint local_74; ulong local_60; ulong local_58; double local_50; double local_48; double local_40; double local_38; long local_30; long *local_28; int8 *local_20; int8 *local_18; local_28 = (long *)*param_2; local_30 = *local_28; local_40 = DAT_00260040; local_58 = 0; local_60 = param_2[2] + (ulong)*(uint *)(local_30 + 0x744) + (ulong)*(uint *)(param_2 + 5); lVar2 = param_2[2]; uVar1 = *(uint *)(param_2 + 4); local_20 = param_2; local_18 = param_1; do { if (lVar2 + (ulong)uVar1 <= local_60) { return local_58; } local_38 = (double)maria_rtree_area_increase (*(int8 *)(local_18[1] + 0xc0),local_60,*local_18, *(int *)(local_18 + 2) + *(int *)((long)local_18 + 0x14),&local_48 ); if ((local_38 == DAT_00260048) && (!NAN(local_38) && !NAN(DAT_00260048))) { return 0; } if ((local_58 == 0) || (local_38 < local_40)) { LAB_0017e9f4: local_58 = local_60; local_50 = local_48; local_40 = local_38; } else if ((local_38 == local_40) && ((!NAN(local_38) && !NAN(local_40) && (local_48 < local_50))) ) goto LAB_0017e9f4; if (*(int *)(local_20 + 5) == 0) { local_74 = *(uint *)(local_30 + 0x3e0); } else { local_74 = *(uint *)(local_20 + 5); } local_60 = local_60 + *(uint *)(local_18 + 2) + (ulong)local_74; } while( true ); }
34,857
create_control_file
eloqsql/storage/maria/ma_control_file.c
static CONTROL_FILE_ERROR create_control_file(const char *name, int open_flags) { uint32 sum; uchar buffer[CF_CREATE_TIME_TOTAL_SIZE]; ulong rnd1,rnd2; DBUG_ENTER("maria_create_control_file"); if ((control_file_fd= mysql_file_create(key_file_control, name, 0, open_flags, MYF(MY_SYNC_DIR | MY_WME))) < 0) DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR); /* Reset variables, as we are creating the file */ cf_create_time_size= CF_CREATE_TIME_TOTAL_SIZE; cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE; /* Create unique uuid for the control file */ my_random_bytes((uchar *)&rnd1, sizeof (rnd1)); my_random_bytes((uchar *)&rnd2, sizeof (rnd2)); my_uuid_init(rnd1, rnd2); my_uuid(maria_uuid); /* Prepare and write the file header */ memcpy(buffer, CF_MAGIC_STRING, CF_MAGIC_STRING_SIZE); buffer[CF_VERSION_OFFSET]= CONTROL_FILE_VERSION; memcpy(buffer + CF_UUID_OFFSET, maria_uuid, CF_UUID_SIZE); int2store(buffer + CF_CREATE_TIME_SIZE_OFFSET, cf_create_time_size); int2store(buffer + CF_CHANGEABLE_SIZE_OFFSET, cf_changeable_size); /* Write create time variables */ int2store(buffer + CF_BLOCKSIZE_OFFSET, maria_block_size); /* Store checksum for create time parts */ sum= (uint32) my_checksum(0, buffer, cf_create_time_size - CF_CHECKSUM_SIZE); int4store(buffer + cf_create_time_size - CF_CHECKSUM_SIZE, sum); if (my_pwrite(control_file_fd, buffer, cf_create_time_size, 0, MYF(MY_FNABP | MY_WME))) DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR); /* To be safer we should make sure that there are no logs or data/index files around (indeed it could be that the control file alone was deleted or not restored, and we should not go on with life at this point). Things should still be relatively safe as if someone tries to use an old table with a new control file the different uuid:s between the files will cause ma_open() to generate an HA_ERR_OLD_FILE error. When used from mysqld this will cause the table to be open in repair mode which will remove all dependencies between the table and the old control file. We could have a tool which can rebuild the control file, by reading the directory of logs, finding the newest log, reading it to find last checkpoint... Slow but can save your db. For this to be possible, we must always write to the control file right after writing the checkpoint log record, and do nothing in between (i.e. the checkpoint must be usable as soon as it has been written to the log). */ /* init the file with these "undefined" values */ DBUG_RETURN(ma_control_file_write_and_force(LSN_IMPOSSIBLE, FILENO_IMPOSSIBLE, 0, 0)); }
O0
c
create_control_file: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) movl %esi, -0x44(%rbp) leaq 0x3fd00a(%rip), %rax # 0x482df0 movl (%rax), %edi movq -0x40(%rbp), %rcx movl -0x44(%rbp), %r9d leaq 0xd4dcb(%rip), %rsi # 0x15abc2 movl $0x9a, %edx xorl %r8d, %r8d movq $0x8010, (%rsp) # imm = 0x8010 callq 0x86dd0 movl %eax, 0x24278e(%rip) # 0x2c85a0 cmpl $0x0, %eax jge 0x85e25 jmp 0x85e19 movl $0xb, -0x34(%rbp) jmp 0x85f78 movl $0x1e, 0x3fd425(%rip) # 0x483254 movl $0x16, 0x3fd41f(%rip) # 0x483258 leaq -0x50(%rbp), %rdi movl $0x8, %esi callq 0xdce80 leaq -0x58(%rbp), %rdi movl $0x8, %esi callq 0xdce80 movq -0x50(%rbp), %rdi movq -0x58(%rbp), %rsi callq 0x105fe0 leaq 0x3fcd67(%rip), %rdi # 0x482bd0 callq 0x106190 movw 0xd4e13(%rip), %ax # 0x15ac88 movw %ax, -0x30(%rbp) movb 0xd4e0b(%rip), %al # 0x15ac8a movb %al, -0x2e(%rbp) movb $0x1, -0x2d(%rbp) leaq 0x3fcd43(%rip), %rax # 0x482bd0 movq (%rax), %rcx movq %rcx, -0x2c(%rbp) movq 0x8(%rax), %rax movq %rax, -0x24(%rbp) leaq -0x30(%rbp), %rax addq $0x14, %rax movq %rax, -0x60(%rbp) movl 0x3fd3a6(%rip), %eax # 0x483254 movw %ax, %cx movq -0x60(%rbp), %rax movw %cx, (%rax) jmp 0x85eba leaq -0x30(%rbp), %rax addq $0x16, %rax movq %rax, -0x68(%rbp) movl 0x3fd38c(%rip), %eax # 0x483258 movw %ax, %cx movq -0x68(%rbp), %rax movw %cx, (%rax) jmp 0x85ed8 leaq -0x30(%rbp), %rax addq $0x18, %rax movq %rax, -0x70(%rbp) leaq 0x2425c5(%rip), %rax # 0x2c84b0 movq (%rax), %rax movw %ax, %cx movq -0x70(%rbp), %rax movw %cx, (%rax) leaq -0x30(%rbp), %rsi movl 0x3fd352(%rip), %eax # 0x483254 subl $0x4, %eax movl %eax, %eax movl %eax, %edx xorl %edi, %edi callq 0x1093b0 movl %eax, -0x48(%rbp) leaq -0x30(%rbp), %rax movl 0x3fd337(%rip), %ecx # 0x483254 addq %rcx, %rax addq $-0x4, %rax movq %rax, -0x78(%rbp) movl -0x48(%rbp), %ecx movq -0x78(%rbp), %rax movl %ecx, (%rax) movl 0x242669(%rip), %edi # 0x2c85a0 leaq -0x30(%rbp), %rsi movl 0x3fd313(%rip), %eax # 0x483254 movl %eax, %edx xorl %eax, %eax movl %eax, %ecx movl $0x12, %r8d callq 0xfaf80 cmpq $0x0, %rax je 0x85f63 jmp 0x85f5a movl $0xb, -0x34(%rbp) jmp 0x85f78 jmp 0x85f65 xorl %eax, %eax movl %eax, %edx xorl %ecx, %ecx movq %rdx, %rdi movl %ecx, %esi callq 0x86490 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x7c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x85f9c movl -0x7c(%rbp), %eax addq $0x90, %rsp popq %rbp retq callq 0x2a260 nopw %cs:(%rax,%rax)
create_control_file: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi mov [rbp+var_44], esi lea rax, key_file_control mov edi, [rax] mov rcx, [rbp+var_40] mov r9d, [rbp+var_44] lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 9Ah xor r8d, r8d mov [rsp+90h+var_90], 8010h call inline_mysql_file_create mov cs:control_file_fd, eax cmp eax, 0 jge short loc_85E25 jmp short $+2 loc_85E19: mov [rbp+var_34], 0Bh jmp loc_85F78 loc_85E25: mov cs:cf_create_time_size, 1Eh mov cs:cf_changeable_size, 16h lea rdi, [rbp+var_50] mov esi, 8 call my_random_bytes lea rdi, [rbp+var_58] mov esi, 8 call my_random_bytes mov rdi, [rbp+var_50] mov rsi, [rbp+var_58] call my_uuid_init lea rdi, maria_uuid call my_uuid mov ax, cs:word_15AC88 mov [rbp+var_30], ax mov al, cs:byte_15AC8A mov [rbp+var_2E], al mov [rbp+var_2D], 1 lea rax, maria_uuid mov rcx, [rax] mov [rbp+var_2C], rcx mov rax, [rax+8] mov [rbp+var_24], rax lea rax, [rbp+var_30] add rax, 14h mov [rbp+var_60], rax mov eax, cs:cf_create_time_size mov cx, ax mov rax, [rbp+var_60] mov [rax], cx jmp short $+2 loc_85EBA: lea rax, [rbp+var_30] add rax, 16h mov [rbp+var_68], rax mov eax, cs:cf_changeable_size mov cx, ax mov rax, [rbp+var_68] mov [rax], cx jmp short $+2 loc_85ED8: lea rax, [rbp+var_30] add rax, 18h mov [rbp+var_70], rax lea rax, maria_block_size mov rax, [rax] mov cx, ax mov rax, [rbp+var_70] mov [rax], cx lea rsi, [rbp+var_30] mov eax, cs:cf_create_time_size sub eax, 4 mov eax, eax mov edx, eax xor edi, edi call my_checksum mov [rbp+var_48], eax lea rax, [rbp+var_30] mov ecx, cs:cf_create_time_size add rax, rcx add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_78], rax mov ecx, [rbp+var_48] mov rax, [rbp+var_78] mov [rax], ecx mov edi, cs:control_file_fd lea rsi, [rbp+var_30] mov eax, cs:cf_create_time_size mov edx, eax xor eax, eax mov ecx, eax mov r8d, 12h call my_pwrite cmp rax, 0 jz short loc_85F63 jmp short $+2 loc_85F5A: mov [rbp+var_34], 0Bh jmp short loc_85F78 loc_85F63: jmp short $+2 loc_85F65: xor eax, eax mov edx, eax xor ecx, ecx mov rdi, rdx mov esi, ecx call ma_control_file_write_and_force mov [rbp+var_34], eax loc_85F78: mov eax, [rbp+var_34] mov [rbp+var_7C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_85F9C mov eax, [rbp+var_7C] add rsp, 90h pop rbp retn loc_85F9C: call ___stack_chk_fail
long long create_control_file(long long a1, int a2) { long long v3; // [rsp+38h] [rbp-58h] BYREF long long v4; // [rsp+40h] [rbp-50h] BYREF int v5; // [rsp+48h] [rbp-48h] int v6; // [rsp+4Ch] [rbp-44h] long long v7; // [rsp+50h] [rbp-40h] __int16 v9; // [rsp+60h] [rbp-30h] BYREF char v10; // [rsp+62h] [rbp-2Eh] char v11; // [rsp+63h] [rbp-2Dh] long long v12; // [rsp+64h] [rbp-2Ch] long long v13; // [rsp+6Ch] [rbp-24h] __int16 v14; // [rsp+74h] [rbp-1Ch] __int16 v15; // [rsp+76h] [rbp-1Ah] __int16 v16; // [rsp+78h] [rbp-18h] unsigned long long v17; // [rsp+88h] [rbp-8h] v17 = __readfsqword(0x28u); v7 = a1; v6 = a2; control_file_fd = inline_mysql_file_create( key_file_control, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 154, a1, 0, a2, 32784LL); if ( control_file_fd >= 0 ) { cf_create_time_size = 30; cf_changeable_size = 22; my_random_bytes(&v4, 8LL); my_random_bytes(&v3, 8LL); my_uuid_init(v4, v3); my_uuid(maria_uuid); v9 = -258; v10 = 12; v11 = 1; v12 = maria_uuid[0]; v13 = maria_uuid[1]; v14 = cf_create_time_size; v15 = cf_changeable_size; v16 = maria_block_size; v5 = my_checksum(0LL, &v9, (unsigned int)(cf_create_time_size - 4)); *(_DWORD *)((char *)&v9 + (unsigned int)cf_create_time_size - 4) = v5; if ( my_pwrite((unsigned int)control_file_fd, &v9, (unsigned int)cf_create_time_size, 0LL, 18LL) ) return 11; else return (unsigned int)ma_control_file_write_and_force(0LL, 0LL, 0LL, 0LL); } else { return 11; } }
create_control_file: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI MOV dword ptr [RBP + -0x44],ESI LEA RAX,[0x582df0] MOV EDI,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x40] MOV R9D,dword ptr [RBP + -0x44] LEA RSI,[0x25abc2] MOV EDX,0x9a XOR R8D,R8D MOV qword ptr [RSP],0x8010 CALL 0x00186dd0 MOV dword ptr [0x003c85a0],EAX CMP EAX,0x0 JGE 0x00185e25 JMP 0x00185e19 LAB_00185e19: MOV dword ptr [RBP + -0x34],0xb JMP 0x00185f78 LAB_00185e25: MOV dword ptr [0x00583254],0x1e MOV dword ptr [0x00583258],0x16 LEA RDI,[RBP + -0x50] MOV ESI,0x8 CALL 0x001dce80 LEA RDI,[RBP + -0x58] MOV ESI,0x8 CALL 0x001dce80 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x58] CALL 0x00205fe0 LEA RDI,[0x582bd0] CALL 0x00206190 MOV AX,word ptr [0x0025ac88] MOV word ptr [RBP + -0x30],AX MOV AL,byte ptr [0x0025ac8a] MOV byte ptr [RBP + -0x2e],AL MOV byte ptr [RBP + -0x2d],0x1 LEA RAX,[0x582bd0] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x2c],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x24],RAX LEA RAX,[RBP + -0x30] ADD RAX,0x14 MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [0x00583254] MOV CX,AX MOV RAX,qword ptr [RBP + -0x60] MOV word ptr [RAX],CX JMP 0x00185eba LAB_00185eba: LEA RAX,[RBP + -0x30] ADD RAX,0x16 MOV qword ptr [RBP + -0x68],RAX MOV EAX,dword ptr [0x00583258] MOV CX,AX MOV RAX,qword ptr [RBP + -0x68] MOV word ptr [RAX],CX JMP 0x00185ed8 LAB_00185ed8: LEA RAX,[RBP + -0x30] ADD RAX,0x18 MOV qword ptr [RBP + -0x70],RAX LEA RAX,[0x3c84b0] MOV RAX,qword ptr [RAX] MOV CX,AX MOV RAX,qword ptr [RBP + -0x70] MOV word ptr [RAX],CX LEA RSI,[RBP + -0x30] MOV EAX,dword ptr [0x00583254] SUB EAX,0x4 MOV EAX,EAX MOV EDX,EAX XOR EDI,EDI CALL 0x002093b0 MOV dword ptr [RBP + -0x48],EAX LEA RAX,[RBP + -0x30] MOV ECX,dword ptr [0x00583254] ADD RAX,RCX ADD RAX,-0x4 MOV qword ptr [RBP + -0x78],RAX MOV ECX,dword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x78] MOV dword ptr [RAX],ECX MOV EDI,dword ptr [0x003c85a0] LEA RSI,[RBP + -0x30] MOV EAX,dword ptr [0x00583254] MOV EDX,EAX XOR EAX,EAX MOV ECX,EAX MOV R8D,0x12 CALL 0x001faf80 CMP RAX,0x0 JZ 0x00185f63 JMP 0x00185f5a LAB_00185f5a: MOV dword ptr [RBP + -0x34],0xb JMP 0x00185f78 LAB_00185f63: JMP 0x00185f65 LAB_00185f65: XOR EAX,EAX MOV EDX,EAX XOR ECX,ECX MOV RDI,RDX MOV ESI,ECX CALL 0x00186490 MOV dword ptr [RBP + -0x34],EAX LAB_00185f78: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x7c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00185f9c MOV EAX,dword ptr [RBP + -0x7c] ADD RSP,0x90 POP RBP RET LAB_00185f9c: CALL 0x0012a260
int4 create_control_file(int8 param_1,int4 param_2) { long lVar1; long in_FS_OFFSET; int8 local_60; int8 local_58; int4 local_50; int4 local_4c; int8 local_48; int4 local_3c; int2 local_38; int1 local_36; int1 local_35; int8 local_34; int8 local_2c; int2 local_24; int2 local_22; int2 local_20; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_4c = param_2; local_48 = param_1; control_file_fd = inline_mysql_file_create (key_file_control, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",0x9a, param_1,0,param_2,0x8010); if (control_file_fd < 0) { local_3c = 0xb; } else { cf_create_time_size = 0x1e; cf_changeable_size = 0x16; my_random_bytes(&local_58,8); my_random_bytes(&local_60,8); my_uuid_init(local_58,local_60); my_uuid(&maria_uuid); local_38 = DAT_0025ac88; local_36 = DAT_0025ac8a; local_35 = 1; local_34 = maria_uuid; local_2c = DAT_00582bd8; local_24 = (int2)cf_create_time_size; local_22 = (int2)cf_changeable_size; local_20 = (int2)maria_block_size; local_50 = my_checksum(0,&local_38,cf_create_time_size - 4); *(int4 *)((long)&local_3c + (ulong)cf_create_time_size) = local_50; lVar1 = my_pwrite(control_file_fd,&local_38,cf_create_time_size,0,0x12); if (lVar1 == 0) { local_3c = ma_control_file_write_and_force(0,0); } else { local_3c = 0xb; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_3c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
34,858
evmone::instr::core::extcodecopy(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result extcodecopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { const auto addr = intx::be::trunc<evmc::address>(stack.pop()); const auto& mem_index = stack.pop(); const auto& input_index = stack.pop(); const auto& size = stack.pop(); if (!check_memory(gas_left, state.memory, mem_index, size)) return {EVMC_OUT_OF_GAS, gas_left}; const auto s = static_cast<size_t>(size); if (const auto cost = copy_cost(s); (gas_left -= cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; if (state.rev >= EVMC_BERLIN && state.host.access_account(addr) == EVMC_ACCESS_COLD) { if ((gas_left -= instr::additional_cold_account_access_cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; } if (s > 0) { const auto src = (max_buffer_size < input_index) ? max_buffer_size : static_cast<size_t>(input_index); const auto dst = static_cast<size_t>(mem_index); const auto num_bytes_copied = state.host.copy_code(addr, src, &state.memory[dst], s); if (const auto num_bytes_to_clear = s - num_bytes_copied; num_bytes_to_clear > 0) std::memset(&state.memory[dst + num_bytes_copied], 0, num_bytes_to_clear); } return {EVMC_SUCCESS, gas_left}; }
O0
cpp
evmone::instr::core::extcodecopy(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) leaq -0x18(%rbp), %rdi callq 0x5fb60 movq %rax, %rsi leaq -0x3c(%rbp), %rdi callq 0x676a0 leaq -0x18(%rbp), %rdi callq 0x5fb60 movq %rax, -0x48(%rbp) leaq -0x18(%rbp), %rdi callq 0x5fb60 movq %rax, -0x50(%rbp) leaq -0x18(%rbp), %rdi callq 0x5fb60 movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rsi addq $0x8, %rsi movq -0x48(%rbp), %rdx movq -0x58(%rbp), %rcx leaq -0x20(%rbp), %rdi callq 0x66e10 testb $0x1, %al jne 0x68064 movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x681e5 movq -0x58(%rbp), %rdi callq 0x66f00 movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rdi callq 0x67c60 movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jge 0x680a7 movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x681e5 movq -0x28(%rbp), %rax cmpl $0x8, 0x40(%rax) jl 0x680f1 movq -0x28(%rbp), %rdi addq $0x28, %rdi leaq -0x3c(%rbp), %rsi callq 0x3a290 cmpl $0x0, %eax jne 0x680f1 movq -0x20(%rbp), %rax subq $0x9c4, %rax # imm = 0x9C4 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jge 0x680ef movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x681e5 jmp 0x680f1 cmpq $0x0, -0x60(%rbp) jbe 0x681d6 movq -0x50(%rbp), %rsi leaq 0x74ab9(%rip), %rdi # 0xdcbc0 callq 0x68200 testb $0x1, %al jne 0x68112 jmp 0x68120 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x90(%rbp) jmp 0x68130 movq -0x50(%rbp), %rdi callq 0x66f00 movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x48(%rbp), %rdi callq 0x66f00 movq %rax, -0x78(%rbp) movq -0x28(%rbp), %rax addq $0x28, %rax movq %rax, -0xa0(%rbp) movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x28(%rbp), %rdi addq $0x8, %rdi movq -0x78(%rbp), %rsi callq 0x5ead0 movq -0xa0(%rbp), %rdi movq -0x98(%rbp), %rdx movq %rax, %rcx movq -0x60(%rbp), %r8 leaq -0x3c(%rbp), %rsi callq 0x3a060 movq %rax, -0x80(%rbp) movq -0x60(%rbp), %rax subq -0x80(%rbp), %rax movq %rax, -0x88(%rbp) cmpq $0x0, -0x88(%rbp) jbe 0x681d4 movq -0x28(%rbp), %rdi addq $0x8, %rdi movq -0x78(%rbp), %rsi addq -0x80(%rbp), %rsi callq 0x5ead0 movq %rax, %rdi movq -0x88(%rbp), %rdx xorl %esi, %esi callq 0x23140 jmp 0x681d6 movl $0x0, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN6evmone5instr4core11extcodecopyENS_8StackTopElRNS_14ExecutionStateE: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void) mov rsi, rax lea rdi, [rbp+var_3C] call _ZN4intx2be5truncIN4evmc7addressELj256EEET_RKNS_4uintIXT0_EEE; intx::be::trunc<evmc::address,256u>(intx::uint<256u> const&) lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void) mov [rbp+var_48], rax lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void) mov [rbp+var_50], rax lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3popEv; evmone::StackTop::pop(void) mov [rbp+var_58], rax mov rsi, [rbp+var_28] add rsi, 8; unsigned __int64 mov rdx, [rbp+var_48] mov rcx, [rbp+var_58] lea rdi, [rbp+var_20] call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, 1 jnz short loc_68064 mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp loc_681E5 loc_68064: mov rdi, [rbp+var_58] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov [rbp+var_60], rax mov rdi, [rbp+var_60]; this call _ZN6evmone9copy_costEm; evmone::copy_cost(ulong) mov [rbp+var_68], rax mov rcx, [rbp+var_68] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax cmp rax, 0 jge short loc_680A7 mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp loc_681E5 loc_680A7: mov rax, [rbp+var_28] cmp dword ptr [rax+40h], 8 jl short loc_680F1 mov rdi, [rbp+var_28] add rdi, 28h ; '(' lea rsi, [rbp+var_3C] call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&) cmp eax, 0 jnz short loc_680F1 mov rax, [rbp+var_20] sub rax, 9C4h mov [rbp+var_20], rax cmp rax, 0 jge short loc_680EF mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp loc_681E5 loc_680EF: jmp short $+2 loc_680F1: cmp [rbp+var_60], 0 jbe loc_681D6 mov rsi, [rbp+var_50] lea rdi, _ZN6evmoneL15max_buffer_sizeE; evmone::max_buffer_size call _ZN4intxltILj256EjvEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,uint,void>(uint const&,intx::uint<256u> const&) test al, 1 jnz short loc_68112 jmp short loc_68120 loc_68112: mov eax, 0FFFFFFFFh mov [rbp+var_90], rax jmp short loc_68130 loc_68120: mov rdi, [rbp+var_50] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov [rbp+var_90], rax loc_68130: mov rax, [rbp+var_90] mov [rbp+var_70], rax mov rdi, [rbp+var_48] call _ZNK4intx4uintILj256EEcvT_ImvEEv; intx::uint<256u>::operator ulong<ulong,void>(void) mov [rbp+var_78], rax mov rax, [rbp+var_28] add rax, 28h ; '(' mov [rbp+var_A0], rax mov rax, [rbp+var_70] mov [rbp+var_98], rax mov rdi, [rbp+var_28] add rdi, 8 mov rsi, [rbp+var_78] call _ZN6evmone6MemoryixEm; evmone::Memory::operator[](ulong) mov rdi, [rbp+var_A0] mov rdx, [rbp+var_98] mov rcx, rax mov r8, [rbp+var_60] lea rsi, [rbp+var_3C] call _ZNK4evmc11HostContext9copy_codeERKNS_7addressEmPhm; evmc::HostContext::copy_code(evmc::address const&,ulong,uchar *,ulong) mov [rbp+var_80], rax mov rax, [rbp+var_60] sub rax, [rbp+var_80] mov [rbp+var_88], rax cmp [rbp+var_88], 0 jbe short loc_681D4 mov rdi, [rbp+var_28] add rdi, 8 mov rsi, [rbp+var_78] add rsi, [rbp+var_80] call _ZN6evmone6MemoryixEm; evmone::Memory::operator[](ulong) mov rdi, rax mov rdx, [rbp+var_88] xor esi, esi call _memset loc_681D4: jmp short $+2 loc_681D6: mov [rbp+var_10], 0 mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_681E5: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long evmone::instr::core::extcodecopy(long long a1, long long a2, long long a3) { long long v3; // rax unsigned long long v4; // rcx long long v5; // rax long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+20h] [rbp-80h] long long v9; // [rsp+28h] [rbp-78h] evmone *v10; // [rsp+40h] [rbp-60h] long long v11; // [rsp+48h] [rbp-58h] long long v12; // [rsp+50h] [rbp-50h] long long v13; // [rsp+58h] [rbp-48h] _BYTE v14[20]; // [rsp+64h] [rbp-3Ch] BYREF long long v15; // [rsp+78h] [rbp-28h] long long v16; // [rsp+80h] [rbp-20h] BYREF long long v17; // [rsp+88h] [rbp-18h] BYREF unsigned int v18; // [rsp+90h] [rbp-10h] long long v19; // [rsp+98h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v3 = evmone::StackTop::pop((evmone::StackTop *)&v17); intx::be::trunc<evmc::address,256u>((long long)v14, v3); v13 = evmone::StackTop::pop((evmone::StackTop *)&v17); v12 = evmone::StackTop::pop((evmone::StackTop *)&v17); v11 = evmone::StackTop::pop((evmone::StackTop *)&v17); if ( (evmone::check_memory((long long)&v16, v15 + 8, v13, v11) & 1) != 0 ) { v10 = (evmone *)intx::uint<256u>::operator unsigned long<unsigned long,void>(v11); v4 = evmone::copy_cost(v10); v16 -= v4; if ( v16 >= 0 ) { if ( *(int *)(v15 + 64) < 8 || (unsigned int)evmc::HostContext::access_account(v15 + 40) || (v16 -= 2500LL, v16 >= 0) ) { if ( v10 ) { if ( (intx::operator<<256u,unsigned int,void>(&evmone::max_buffer_size, v12) & 1) == 0 ) intx::uint<256u>::operator unsigned long<unsigned long,void>(v12); v9 = intx::uint<256u>::operator unsigned long<unsigned long,void>(v13); v7 = v15 + 40; evmone::Memory::operator[](v15 + 8, v9); v8 = evmc::HostContext::copy_code(v7); if ( v10 != (evmone *)v8 ) { v5 = evmone::Memory::operator[](v15 + 8, v8 + v9); memset(v5, 0LL, (char *)v10 - v8); } } v18 = 0; v19 = v16; } else { v18 = 3; v19 = v16; } } else { v18 = 3; v19 = v16; } } else { v18 = 3; v19 = v16; } return v18; }
extcodecopy: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX LEA RDI,[RBP + -0x18] CALL 0x0015fb60 MOV RSI,RAX LEA RDI,[RBP + -0x3c] CALL 0x001676a0 LEA RDI,[RBP + -0x18] CALL 0x0015fb60 MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x18] CALL 0x0015fb60 MOV qword ptr [RBP + -0x50],RAX LEA RDI,[RBP + -0x18] CALL 0x0015fb60 MOV qword ptr [RBP + -0x58],RAX MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x8 MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x58] LEA RDI,[RBP + -0x20] CALL 0x00166e10 TEST AL,0x1 JNZ 0x00168064 MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x001681e5 LAB_00168064: MOV RDI,qword ptr [RBP + -0x58] CALL 0x00166f00 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x60] CALL 0x00167c60 MOV qword ptr [RBP + -0x68],RAX MOV RCX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JGE 0x001680a7 MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x001681e5 LAB_001680a7: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x40],0x8 JL 0x001680f1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x28 LEA RSI,[RBP + -0x3c] CALL 0x0013a290 CMP EAX,0x0 JNZ 0x001680f1 MOV RAX,qword ptr [RBP + -0x20] SUB RAX,0x9c4 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JGE 0x001680ef MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x001681e5 LAB_001680ef: JMP 0x001680f1 LAB_001680f1: CMP qword ptr [RBP + -0x60],0x0 JBE 0x001681d6 MOV RSI,qword ptr [RBP + -0x50] LEA RDI,[0x1dcbc0] CALL 0x00168200 TEST AL,0x1 JNZ 0x00168112 JMP 0x00168120 LAB_00168112: MOV EAX,0xffffffff MOV qword ptr [RBP + -0x90],RAX JMP 0x00168130 LAB_00168120: MOV RDI,qword ptr [RBP + -0x50] CALL 0x00166f00 MOV qword ptr [RBP + -0x90],RAX LAB_00168130: MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x48] CALL 0x00166f00 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x28 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x78] CALL 0x0015ead0 MOV RDI,qword ptr [RBP + -0xa0] MOV RDX,qword ptr [RBP + -0x98] MOV RCX,RAX MOV R8,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x3c] CALL 0x0013a060 MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x60] SUB RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x88],RAX CMP qword ptr [RBP + -0x88],0x0 JBE 0x001681d4 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x78] ADD RSI,qword ptr [RBP + -0x80] CALL 0x0015ead0 MOV RDI,RAX MOV RDX,qword ptr [RBP + -0x88] XOR ESI,ESI CALL 0x00123140 LAB_001681d4: JMP 0x001681d6 LAB_001681d6: MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_001681e5: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* evmone::instr::core::extcodecopy(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::extcodecopy(int8 param_1,long param_2,long param_3) { bool bVar1; int iVar2; uint *puVar3; uint *this; uint *this_00; ulong uVar4; long lVar5; ulong uVar6; HostContext *this_01; uchar *puVar7; void *__s; int1 auVar8 [16]; ulong local_98; be local_44 [20]; long local_30; long local_28; int8 local_20; uint local_18; long local_10; local_30 = param_3; local_28 = param_2; local_20 = param_1; puVar3 = (uint *)StackTop::pop((StackTop *)&local_20); intx::be::trunc<evmc::address,256u>(local_44,puVar3); puVar3 = (uint *)StackTop::pop((StackTop *)&local_20); this = (uint *)StackTop::pop((StackTop *)&local_20); this_00 = (uint *)StackTop::pop((StackTop *)&local_20); uVar4 = check_memory(&local_28,(Memory *)(local_30 + 8),puVar3,this_00); if ((uVar4 & 1) == 0) { local_18 = 3; local_10 = local_28; } else { uVar4 = intx::uint::operator_cast_to_unsigned_long(this_00); lVar5 = copy_cost(uVar4); local_28 = local_28 - lVar5; if (local_28 < 0) { local_18 = 3; local_10 = local_28; } else if (((*(int *)(local_30 + 0x40) < 8) || (iVar2 = evmc::HostContext::access_account ((HostContext *)(local_30 + 0x28),(address *)local_44), iVar2 != 0)) || (local_28 = local_28 + -0x9c4, -1 < local_28)) { if (uVar4 != 0) { bVar1 = intx::operator<(&max_buffer_size,this); if (bVar1) { local_98 = 0xffffffff; } else { local_98 = intx::uint::operator_cast_to_unsigned_long(this); } uVar6 = intx::uint::operator_cast_to_unsigned_long(puVar3); this_01 = (HostContext *)(local_30 + 0x28); puVar7 = (uchar *)Memory::operator[]((Memory *)(local_30 + 8),uVar6); lVar5 = evmc::HostContext::copy_code(this_01,(address *)local_44,local_98,puVar7,uVar4); if (uVar4 - lVar5 != 0) { __s = (void *)Memory::operator[]((Memory *)(local_30 + 8),uVar6 + lVar5); memset(__s,0,uVar4 - lVar5); } } local_18 = 0; local_10 = local_28; } else { local_18 = 3; local_10 = local_28; } } auVar8._4_4_ = 0; auVar8._0_4_ = local_18; auVar8._8_8_ = local_10; return auVar8; }
34,859
ma_compact_block_page
eloqsql/storage/maria/ma_blockrec.c
void _ma_compact_block_page(MARIA_SHARE *share, uchar *buff, uint rownr, my_bool extend_block, TrID min_read_from, uint min_row_length) { uint max_entry= (uint) buff[DIR_COUNT_OFFSET]; uint page_pos, next_free_pos, start_of_found_block, diff, end_of_found_block; uint freed_size= 0; uint block_size= share->block_size; uchar *dir, *end; DBUG_ENTER("_ma_compact_block_page"); DBUG_PRINT("enter", ("rownr: %u min_read_from: %lu", rownr, (ulong) min_read_from)); DBUG_ASSERT(max_entry > 0 && max_entry < (block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE); /* Move all entries before and including rownr up to start of page */ dir= dir_entry_pos(buff, block_size, rownr); end= dir_entry_pos(buff, block_size, 0); page_pos= next_free_pos= start_of_found_block= PAGE_HEADER_SIZE(share); diff= 0; for (; dir <= end ; end-= DIR_ENTRY_SIZE) { uint offset= uint2korr(end); if (offset) { uint row_length= uint2korr(end + 2); DBUG_ASSERT(offset >= page_pos); DBUG_ASSERT(buff + offset + row_length <= dir); DBUG_ASSERT(row_length >= min_row_length || row_length == 0); /* Row length can be zero if row is to be deleted */ if (min_read_from && row_length && (buff[offset] & ROW_FLAG_TRANSID)) { TrID transid= transid_korr(buff+offset+1); if (transid < min_read_from) { /* Remove transid from row by moving the start point of the row up */ buff[offset + TRANSID_SIZE]= buff[offset] & ~ROW_FLAG_TRANSID; offset+= TRANSID_SIZE; freed_size+= TRANSID_SIZE; row_length-= TRANSID_SIZE; int2store(end+2, row_length); } } if (offset != next_free_pos) { uint length= (next_free_pos - start_of_found_block); /* There was empty space before this and prev block Check if we have to move previous block up to page start */ if (page_pos != start_of_found_block) { /* move up previous block */ memmove(buff + page_pos, buff + start_of_found_block, length); } page_pos+= length; /* next continuous block starts here */ start_of_found_block= offset; diff= offset - page_pos; } int2store(end, offset - diff); /* correct current pos */ next_free_pos= offset + row_length; if (unlikely(row_length < min_row_length) && row_length) { /* This can only happen in the case we compacted transid and the row become 'too short' Move the current row down to it's right place and extend it with 0. */ uint row_diff= min_row_length - row_length; uint length= (next_free_pos - start_of_found_block); DBUG_ASSERT(page_pos != start_of_found_block); bmove(buff + page_pos, buff + start_of_found_block, length); bzero(buff+ page_pos + length, row_diff); page_pos+= min_row_length; int2store(end+2, min_row_length); freed_size-= row_diff; next_free_pos= start_of_found_block= page_pos; diff= 0; } } } if (page_pos != start_of_found_block) { uint length= (next_free_pos - start_of_found_block); memmove(buff + page_pos, buff + start_of_found_block, length); } start_of_found_block= uint2korr(dir); if (rownr != max_entry - 1) { /* Move all entries after rownr to end of page */ uint rownr_length; DBUG_ASSERT(extend_block); /* Should always be true */ next_free_pos= end_of_found_block= page_pos= block_size - DIR_ENTRY_SIZE * max_entry - PAGE_SUFFIX_SIZE; diff= 0; /* End points to entry before 'rownr' */ for (dir= buff + end_of_found_block ; dir <= end ; dir+= DIR_ENTRY_SIZE) { uint offset= uint2korr(dir); uint row_length; uint row_end; if (!offset) continue; row_length= uint2korr(dir + 2); row_end= offset + row_length; DBUG_ASSERT(offset >= start_of_found_block && row_end <= next_free_pos && row_length >= min_row_length); if (min_read_from && (buff[offset] & ROW_FLAG_TRANSID)) { TrID transid= transid_korr(buff + offset+1); if (transid < min_read_from) { /* Remove transid from row */ buff[offset + TRANSID_SIZE]= buff[offset] & ~ROW_FLAG_TRANSID; offset+= TRANSID_SIZE; row_length-= TRANSID_SIZE; int2store(dir+2, row_length); } if (unlikely(row_length < min_row_length)) { /* This can only happen in the case we compacted transid and the row become 'too short' */ uint row_diff= min_row_length - row_length; if (next_free_pos < row_end + row_diff) { /* Not enough space for extending next block with enough end 0's. Move current data down to get place for them */ uint move_down= row_diff - (next_free_pos - row_end); bmove(buff + offset - move_down, buff + offset, row_length); offset-= move_down; } /* Extend the next block with 0, which will be part of current row when the blocks are joined together later */ bzero(buff + next_free_pos - row_diff, row_diff); next_free_pos-= row_diff; int2store(dir+2, min_row_length); } row_end= offset + row_length; } if (row_end != next_free_pos) { uint length= (end_of_found_block - next_free_pos); if (page_pos != end_of_found_block) { /* move next block down */ memmove(buff + page_pos - length, buff + next_free_pos, length); } page_pos-= length; /* next continuous block starts here */ end_of_found_block= row_end; diff= page_pos - row_end; } int2store(dir, offset + diff); /* correct current pos */ next_free_pos= offset; } if (page_pos != end_of_found_block) { uint length= (end_of_found_block - next_free_pos); memmove(buff + page_pos - length, buff + next_free_pos, length); next_free_pos= page_pos- length; } /* Extend rownr block to cover hole */ rownr_length= next_free_pos - start_of_found_block; int2store(dir+2, rownr_length); DBUG_ASSERT(rownr_length >= min_row_length); } else { if (extend_block) { /* Extend last block to cover whole page */ uint length= ((uint) (dir - buff) - start_of_found_block); int2store(dir+2, length); DBUG_ASSERT(length >= min_row_length); } else { /* Add length gained from freed transaction id's to this page */ uint length= uint2korr(buff+ EMPTY_SPACE_OFFSET) + freed_size; int2store(buff + EMPTY_SPACE_OFFSET, length); } buff[PAGE_TYPE_OFFSET]&= ~(uchar) PAGE_CAN_BE_COMPACTED; } check_directory(share, buff, block_size, min_row_length, extend_block ? 0 : (uint) -1); DBUG_EXECUTE("directory", _ma_print_directory(share, DBUG_FILE, buff, block_size);); DBUG_VOID_RETURN; }
O3
c
ma_compact_block_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, -0x60(%rbp) movq %rsi, %r10 movzbl 0x8(%rsi), %eax movq %rax, -0x58(%rbp) movl 0x7bc(%rdi), %r11d leaq (%rsi,%r11), %rcx movq %rdx, -0x68(%rbp) leal (,%rdx,4), %eax subq %rax, %rcx movq %rcx, -0x70(%rbp) leaq -0x8(%rcx), %rax movl 0xc18(%rdi), %esi movq %rax, %rdi addl $0xc, %esi leaq (%r10,%r11), %r14 addq $-0x8, %r14 xorl %r15d, %r15d movl %esi, %r13d movl %esi, %eax movl $0x0, -0x2c(%rbp) movq %r11, -0x48(%rbp) movq %r10, -0x40(%rbp) movl %r9d, -0x30(%rbp) movq %r8, -0x50(%rbp) movq %rdi, -0x38(%rbp) movzwl (%r14), %r12d testl %r12d, %r12d je 0x4a91b movzwl 0x2(%r14), %ecx movzwl %cx, %ebx testq %r8, %r8 je 0x4a8c3 testw %cx, %cx je 0x4a8c3 movl %r12d, %edx movb (%r10,%rdx), %cl testb $0x1, %cl je 0x4a8c3 movl %esi, %r11d movl 0x1(%r10,%rdx), %esi movzwl 0x5(%r10,%rdx), %edx shlq $0x20, %rdx orq %rsi, %rdx cmpq %r8, %rdx jae 0x4a8c0 andb $-0x2, %cl movb %cl, 0x6(%r10,%r12) addq $0x6, %r12 addl $0x6, -0x2c(%rbp) addl $-0x6, %ebx movw %bx, 0x2(%r14) movl %r11d, %esi cmpl %r13d, %r12d je 0x4a903 subl %eax, %r13d cmpl %eax, %esi je 0x4a8f7 movl %esi, %edi addq %r10, %rdi movl %esi, %r15d movl %eax, %esi addq %r10, %rsi movl %r13d, %edx callq 0x29120 movl %r15d, %esi movq -0x38(%rbp), %rdi movq -0x50(%rbp), %r8 movl -0x30(%rbp), %r9d movq -0x40(%rbp), %r10 addl %r13d, %esi movl %r12d, %r15d subl %esi, %r15d movl %r12d, %eax movl %r12d, %ecx subl %r15d, %ecx movw %cx, (%r14) addl %ebx, %r12d movl %r9d, %r13d subl %ebx, %r13d ja 0x4a92a movl %r12d, %r13d addq $-0x4, %r14 cmpq %r14, %rdi jbe 0x4a863 jmp 0x4a981 testl %ebx, %ebx je 0x4a918 subl %eax, %r12d movl %esi, %r15d addq %r10, %r15 movl %esi, %ebx movl %eax, %esi addq %r10, %rsi movq %r15, %rdi movq %r12, %rdx callq 0x29120 addq %r12, %r15 movq %r15, %rdi xorl %r15d, %r15d xorl %esi, %esi movq %r13, %rdx callq 0x292b0 movl %ebx, %esi movq -0x38(%rbp), %rdi movq -0x50(%rbp), %r8 movl -0x30(%rbp), %r9d movq -0x40(%rbp), %r10 addl %r9d, %esi movw %r9w, 0x2(%r14) subl %r13d, -0x2c(%rbp) movl %esi, %eax movl %esi, %r13d jmp 0x4a91b cmpl %eax, %esi je 0x4a9aa subl %eax, %r13d movl %esi, %edi addq %r10, %rdi movl %eax, %esi addq %r10, %rsi movq %r13, %rdx callq 0x29120 movq -0x38(%rbp), %rdi movq -0x50(%rbp), %r8 movl -0x30(%rbp), %r9d movq -0x40(%rbp), %r10 movzwl (%rdi), %ecx movq -0x58(%rbp), %rdx leal -0x1(%rdx), %eax cmpl -0x68(%rbp), %eax jne 0x4a9d5 cmpb $0x0, -0x60(%rbp) je 0x4ab4b subl %r10d, %edi subl %ecx, %edi movq -0x70(%rbp), %rax movw %di, -0x6(%rax) jmp 0x4ab53 shll $0x2, %edx movq -0x48(%rbp), %rsi subl %edx, %esi addl $-0x4, %esi leaq (%r10,%rsi), %r13 cmpq %r14, %r13 ja 0x4ab82 movl %ecx, -0x2c(%rbp) xorl %edx, %edx movl %esi, %r11d movl %esi, %edi movzwl (%r13), %r15d testl %r15d, %r15d je 0x4aab5 movzwl 0x2(%r13), %r12d leal (%r12,%r15), %ebx testq %r8, %r8 je 0x4aa60 movl %r15d, %ecx movb (%r10,%rcx), %al testb $0x1, %al je 0x4aa60 movq %rdx, -0x38(%rbp) movl 0x1(%r10,%rcx), %edx movzwl 0x5(%r10,%rcx), %ecx shlq $0x20, %rcx orq %rdx, %rcx cmpq %r8, %rcx jae 0x4aa4e andb $-0x2, %al movb %al, 0x6(%r10,%r15) addq $0x6, %r15 addl $-0x6, %r12d movw %r12w, 0x2(%r13) movl %r9d, %ecx subl %r12d, %ecx movq -0x38(%rbp), %rdx ja 0x4aac4 addl %r15d, %r12d movl %r12d, %ebx cmpl %r11d, %ebx jne 0x4aa69 movl %edi, %ebx jmp 0x4aaa7 movl %edi, %r12d subl %r11d, %r12d cmpl %edi, %esi je 0x4aaa0 movl %esi, %edi addq %r10, %rdi movl %r12d, %edx subq %rdx, %rdi movq %rsi, %rax movl %r11d, %esi addq %r10, %rsi movq %rax, -0x48(%rbp) callq 0x29120 movq -0x50(%rbp), %r8 movl -0x30(%rbp), %r9d movq -0x40(%rbp), %r10 movq -0x48(%rbp), %rsi subl %r12d, %esi movl %esi, %edx subl %ebx, %edx leal (%rdx,%r15), %eax movw %ax, (%r13) movl %ebx, %edi movl %r15d, %r11d addq $0x4, %r13 cmpq %r14, %r13 jbe 0x4a9f8 jmp 0x4ab42 movq %rdi, -0x68(%rbp) movq %rsi, -0x48(%rbp) leal (%rcx,%rbx), %eax cmpl %eax, %r11d movl %r11d, -0x58(%rbp) jae 0x4ab04 subl %r11d, %ebx addl %ecx, %ebx movl %r15d, %esi addq %r10, %rsi movq %rsi, %rdi subq %rbx, %rdi movl %r12d, %edx movq %rcx, -0x60(%rbp) callq 0x29120 movq -0x60(%rbp), %rcx movl -0x58(%rbp), %r11d movq -0x40(%rbp), %r10 subl %ebx, %r15d movl %r11d, %edi addq %r10, %rdi movl %ecx, %edx subq %rdx, %rdi xorl %esi, %esi movq %rcx, %rbx callq 0x292b0 movl -0x58(%rbp), %r11d movq -0x40(%rbp), %r10 subl %ebx, %r11d movl -0x30(%rbp), %r9d movw %r9w, 0x2(%r13) movq -0x48(%rbp), %rsi movq -0x50(%rbp), %r8 movq -0x68(%rbp), %rdi movq -0x38(%rbp), %rdx jmp 0x4aa5a cmpl %edi, %esi jne 0x4ab5a movl %r11d, %esi jmp 0x4ab7f movl -0x2c(%rbp), %eax addw %ax, 0xa(%r10) andb $0x7f, 0x7(%r10) jmp 0x4ab89 subl %r11d, %edi movq %rdi, %r14 movl %esi, %edi addq %r10, %rdi subq %r14, %rdi movq %rsi, %rbx movl %r11d, %esi addq %r10, %rsi movq %r14, %rdx callq 0x29120 movq %rbx, %rsi subl %r14d, %esi movl -0x2c(%rbp), %ecx subl %ecx, %esi movw %si, 0x2(%r13) addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_compact_block_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov dword ptr [rbp+var_60], ecx mov r10, rsi movzx eax, byte ptr [rsi+8] mov [rbp+var_58], rax mov r11d, [rdi+7BCh] lea rcx, [rsi+r11] mov [rbp+var_68], rdx lea eax, ds:0[rdx*4] sub rcx, rax mov [rbp+var_70], rcx lea rax, [rcx-8] mov esi, [rdi+0C18h] mov rdi, rax add esi, 0Ch lea r14, [r10+r11] add r14, 0FFFFFFFFFFFFFFF8h xor r15d, r15d mov r13d, esi mov eax, esi mov [rbp+var_2C], 0 mov [rbp+var_48], r11 mov [rbp+var_40], r10 mov [rbp+var_30], r9d mov [rbp+var_50], r8 mov [rbp+var_38], rdi loc_4A863: movzx r12d, word ptr [r14] test r12d, r12d jz loc_4A91B movzx ecx, word ptr [r14+2] movzx ebx, cx test r8, r8 jz short loc_4A8C3 test cx, cx jz short loc_4A8C3 mov edx, r12d mov cl, [r10+rdx] test cl, 1 jz short loc_4A8C3 mov r11d, esi mov esi, [r10+rdx+1] movzx edx, word ptr [r10+rdx+5] shl rdx, 20h or rdx, rsi cmp rdx, r8 jnb short loc_4A8C0 and cl, 0FEh mov [r10+r12+6], cl add r12, 6 add [rbp+var_2C], 6 add ebx, 0FFFFFFFAh mov [r14+2], bx loc_4A8C0: mov esi, r11d loc_4A8C3: cmp r12d, r13d jz short loc_4A903 sub r13d, eax cmp esi, eax jz short loc_4A8F7 mov edi, esi add rdi, r10 mov r15d, esi mov esi, eax add rsi, r10 mov edx, r13d call _memmove mov esi, r15d mov rdi, [rbp+var_38] mov r8, [rbp+var_50] mov r9d, [rbp+var_30] mov r10, [rbp+var_40] loc_4A8F7: add esi, r13d mov r15d, r12d sub r15d, esi mov eax, r12d loc_4A903: mov ecx, r12d sub ecx, r15d mov [r14], cx add r12d, ebx mov r13d, r9d sub r13d, ebx ja short loc_4A92A loc_4A918: mov r13d, r12d loc_4A91B: add r14, 0FFFFFFFFFFFFFFFCh cmp rdi, r14 jbe loc_4A863 jmp short loc_4A981 loc_4A92A: test ebx, ebx jz short loc_4A918 sub r12d, eax mov r15d, esi add r15, r10 mov ebx, esi mov esi, eax add rsi, r10 mov rdi, r15 mov rdx, r12 call _memmove add r15, r12 mov rdi, r15 xor r15d, r15d xor esi, esi mov rdx, r13 call _memset mov esi, ebx mov rdi, [rbp+var_38] mov r8, [rbp+var_50] mov r9d, [rbp+var_30] mov r10, [rbp+var_40] add esi, r9d mov [r14+2], r9w sub [rbp+var_2C], r13d mov eax, esi mov r13d, esi jmp short loc_4A91B loc_4A981: cmp esi, eax jz short loc_4A9AA sub r13d, eax mov edi, esi add rdi, r10 mov esi, eax add rsi, r10 mov rdx, r13 call _memmove mov rdi, [rbp+var_38] mov r8, [rbp+var_50] mov r9d, [rbp+var_30] mov r10, [rbp+var_40] loc_4A9AA: movzx ecx, word ptr [rdi] mov rdx, [rbp+var_58] lea eax, [rdx-1] cmp eax, dword ptr [rbp+var_68] jnz short loc_4A9D5 cmp byte ptr [rbp+var_60], 0 jz loc_4AB4B sub edi, r10d sub edi, ecx mov rax, [rbp+var_70] mov [rax-6], di jmp loc_4AB53 loc_4A9D5: shl edx, 2 mov rsi, [rbp+var_48] sub esi, edx add esi, 0FFFFFFFCh lea r13, [r10+rsi] cmp r13, r14 ja loc_4AB82 mov [rbp+var_2C], ecx xor edx, edx mov r11d, esi mov edi, esi loc_4A9F8: movzx r15d, word ptr [r13+0] test r15d, r15d jz loc_4AAB5 movzx r12d, word ptr [r13+2] lea ebx, [r12+r15] test r8, r8 jz short loc_4AA60 mov ecx, r15d mov al, [r10+rcx] test al, 1 jz short loc_4AA60 mov [rbp+var_38], rdx mov edx, [r10+rcx+1] movzx ecx, word ptr [r10+rcx+5] shl rcx, 20h or rcx, rdx cmp rcx, r8 jnb short loc_4AA4E and al, 0FEh mov [r10+r15+6], al add r15, 6 add r12d, 0FFFFFFFAh mov [r13+2], r12w loc_4AA4E: mov ecx, r9d sub ecx, r12d mov rdx, [rbp+var_38] ja short loc_4AAC4 loc_4AA5A: add r12d, r15d mov ebx, r12d loc_4AA60: cmp ebx, r11d jnz short loc_4AA69 mov ebx, edi jmp short loc_4AAA7 loc_4AA69: mov r12d, edi sub r12d, r11d cmp esi, edi jz short loc_4AAA0 mov edi, esi add rdi, r10 mov edx, r12d sub rdi, rdx mov rax, rsi mov esi, r11d add rsi, r10 mov [rbp+var_48], rax call _memmove mov r8, [rbp+var_50] mov r9d, [rbp+var_30] mov r10, [rbp+var_40] mov rsi, [rbp+var_48] loc_4AAA0: sub esi, r12d mov edx, esi sub edx, ebx loc_4AAA7: lea eax, [rdx+r15] mov [r13+0], ax mov edi, ebx mov r11d, r15d loc_4AAB5: add r13, 4 cmp r13, r14 jbe loc_4A9F8 jmp short loc_4AB42 loc_4AAC4: mov [rbp+var_68], rdi mov [rbp+var_48], rsi lea eax, [rcx+rbx] cmp r11d, eax mov dword ptr [rbp+var_58], r11d jnb short loc_4AB04 sub ebx, r11d add ebx, ecx mov esi, r15d add rsi, r10 mov rdi, rsi sub rdi, rbx mov edx, r12d mov [rbp+var_60], rcx call _memmove mov rcx, [rbp+var_60] mov r11d, dword ptr [rbp+var_58] mov r10, [rbp+var_40] sub r15d, ebx loc_4AB04: mov edi, r11d add rdi, r10 mov edx, ecx sub rdi, rdx xor esi, esi mov rbx, rcx call _memset mov r11d, dword ptr [rbp+var_58] mov r10, [rbp+var_40] sub r11d, ebx mov r9d, [rbp+var_30] mov [r13+2], r9w mov rsi, [rbp+var_48] mov r8, [rbp+var_50] mov rdi, [rbp+var_68] mov rdx, [rbp+var_38] jmp loc_4AA5A loc_4AB42: cmp esi, edi jnz short loc_4AB5A mov esi, r11d jmp short loc_4AB7F loc_4AB4B: mov eax, [rbp+var_2C] add [r10+0Ah], ax loc_4AB53: and byte ptr [r10+7], 7Fh jmp short loc_4AB89 loc_4AB5A: sub edi, r11d mov r14, rdi mov edi, esi add rdi, r10 sub rdi, r14 mov rbx, rsi mov esi, r11d add rsi, r10 mov rdx, r14 call _memmove mov rsi, rbx sub esi, r14d loc_4AB7F: mov ecx, [rbp+var_2C] loc_4AB82: sub esi, ecx mov [r13+2], si loc_4AB89: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_compact_block_page(long long a1, long long a2, int a3, char a4, unsigned long long a5, unsigned int a6) { long long v6; // r10 long long v7; // r11 int v8; // esi unsigned __int16 *v9; // rdi unsigned int v10; // esi unsigned __int16 *v11; // r14 __int16 v12; // r15 unsigned int v13; // r13d unsigned int v14; // eax long long v15; // r12 unsigned __int16 v16; // cx unsigned int v17; // ebx char v18; // cl unsigned int v19; // r13d unsigned int v20; // r12d long long v21; // r13 long long v22; // r12 long long v23; // r15 long long v24; // rdi unsigned __int16 v25; // cx long long result; // rax long long v27; // rsi unsigned __int16 *v28; // r13 long long v29; // rdx unsigned int v30; // r11d unsigned int v31; // edi long long v32; // r15 unsigned int v33; // r12d unsigned int v34; // ebx char v35; // al unsigned int v36; // ecx unsigned int v37; // r12d long long v38; // rbx unsigned int v39; // ebx long long v40; // r14 long long v41; // [rsp+0h] [rbp-70h] unsigned int v44; // [rsp+10h] [rbp-60h] int v45; // [rsp+18h] [rbp-58h] unsigned int v46; // [rsp+18h] [rbp-58h] unsigned long long v47; // [rsp+20h] [rbp-50h] int v48; // [rsp+28h] [rbp-48h] long long v49; // [rsp+30h] [rbp-40h] long long v50; // [rsp+38h] [rbp-38h] unsigned int v51; // [rsp+40h] [rbp-30h] unsigned int v52; // [rsp+44h] [rbp-2Ch] unsigned __int16 v53; // [rsp+44h] [rbp-2Ch] v6 = a2; v45 = *(unsigned __int8 *)(a2 + 8); v7 = *(unsigned int *)(a1 + 1980); v41 = a2 + v7 - (unsigned int)(4 * a3); v8 = *(_DWORD *)(a1 + 3096); v9 = (unsigned __int16 *)(v41 - 8); v10 = v8 + 12; v11 = (unsigned __int16 *)(v6 + v7 - 8); v12 = 0; v13 = v10; v14 = v10; v52 = 0; v48 = v7; v49 = v6; v51 = a6; v47 = a5; do { v15 = *v11; if ( *v11 ) { v16 = v11[1]; v17 = v16; if ( a5 ) { if ( v16 ) { v18 = *(_BYTE *)(v6 + *v11); if ( (v18 & 1) != 0 && (*(unsigned int *)(v6 + *v11 + 1) | ((unsigned long long)*(unsigned __int16 *)(v6 + *v11 + 5) << 32)) < a5 ) { *(_BYTE *)(v6 + v15 + 6) = v18 & 0xFE; LODWORD(v15) = v15 + 6; v52 += 6; v17 -= 6; v11[1] = v17; } } } if ( (_DWORD)v15 != v13 ) { v19 = v13 - v14; if ( v10 != v14 ) { memmove(v6 + v10, v6 + v14, v19); v9 = (unsigned __int16 *)(v41 - 8); a5 = v47; a6 = v51; v6 = v49; } v10 += v19; v12 = v15 - v10; v14 = v15; } *v11 = v15 - v12; v20 = v17 + v15; v21 = a6 - v17; if ( a6 > v17 && v17 ) { v22 = v20 - v14; v23 = v6 + v10; memmove(v23, v6 + v14, v22); v24 = v22 + v23; v12 = 0; memset(v24, 0LL, v21); v9 = (unsigned __int16 *)(v41 - 8); a5 = v47; a6 = v51; v6 = v49; v10 += v51; v11[1] = v51; v52 -= v21; v14 = v10; v13 = v10; } else { v13 = v20; } } v11 -= 2; } while ( v9 <= v11 ); if ( v10 != v14 ) { memmove(v6 + v10, v6 + v14, v13 - v14); v9 = (unsigned __int16 *)(v41 - 8); a5 = v47; a6 = v51; v6 = v49; } v25 = *v9; result = (unsigned int)(v45 - 1); if ( (_DWORD)result == a3 ) { if ( a4 ) { result = v41; *(_WORD *)(v41 - 6) = (_WORD)v9 - v6 - v25; } else { result = v52; *(_WORD *)(v6 + 10) += v52; } *(_BYTE *)(v6 + 7) &= ~0x80u; } else { v27 = (unsigned int)(v48 - 4 * v45 - 4); v28 = (unsigned __int16 *)(v6 + v27); if ( v6 + v27 <= (unsigned long long)v11 ) { v53 = *v9; v29 = 0LL; v30 = v48 - 4 * v45 - 4; v31 = v30; do { v32 = *v28; if ( *v28 ) { v33 = v28[1]; v34 = v33 + v32; if ( a5 ) { v35 = *(_BYTE *)(v6 + *v28); if ( (v35 & 1) != 0 ) { v50 = v29; if ( (*(unsigned int *)(v6 + *v28 + 1) | ((unsigned long long)*(unsigned __int16 *)(v6 + *v28 + 5) << 32)) < a5 ) { *(_BYTE *)(v6 + v32 + 6) = v35 & 0xFE; LODWORD(v32) = v32 + 6; v33 -= 6; v28[1] = v33; } v36 = a6 - v33; if ( a6 > v33 ) { v46 = v30; if ( v30 < v36 + v34 ) { v38 = v36 + v34 - v30; v44 = a6 - v33; memmove(v6 + (unsigned int)v32 - v38, v6 + (unsigned int)v32, v33); v36 = v44; v30 = v46; v6 = v49; LODWORD(v32) = v32 - v38; } v39 = v36; memset(v6 + v30 - v36, 0LL, v36); v6 = v49; v30 = v46 - v39; a6 = v51; v28[1] = v51; a5 = v47; v29 = v50; } v34 = v32 + v33; } } if ( v34 == v30 ) { v34 = v31; } else { v37 = v31 - v30; if ( (_DWORD)v27 != v31 ) { memmove(v6 + (unsigned int)v27 - v37, v6 + v30, v37); a5 = v47; a6 = v51; v6 = v49; } LODWORD(v27) = v27 - v37; v29 = (unsigned int)v27 - v34; } result = (unsigned int)(v29 + v32); *v28 = v29 + v32; v31 = v34; v30 = v32; } v28 += 2; } while ( v28 <= v11 ); if ( (_DWORD)v27 == v31 ) { LOWORD(v27) = v30; } else { v40 = v31 - v30; result = memmove(v6 + (unsigned int)v27 - v40, v6 + v30, v40); LOWORD(v27) = v27 - v40; } v25 = v53; } v28[1] = v27 - v25; } return result; }
_ma_compact_block_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV dword ptr [RBP + -0x60],ECX MOV R10,RSI MOVZX EAX,byte ptr [RSI + 0x8] MOV qword ptr [RBP + -0x58],RAX MOV R11D,dword ptr [RDI + 0x7bc] LEA RCX,[RSI + R11*0x1] MOV qword ptr [RBP + -0x68],RDX LEA EAX,[RDX*0x4] SUB RCX,RAX MOV qword ptr [RBP + -0x70],RCX LEA RAX,[RCX + -0x8] MOV ESI,dword ptr [RDI + 0xc18] MOV RDI,RAX ADD ESI,0xc LEA R14,[R10 + R11*0x1] ADD R14,-0x8 XOR R15D,R15D MOV R13D,ESI MOV EAX,ESI MOV dword ptr [RBP + -0x2c],0x0 MOV qword ptr [RBP + -0x48],R11 MOV qword ptr [RBP + -0x40],R10 MOV dword ptr [RBP + -0x30],R9D MOV qword ptr [RBP + -0x50],R8 MOV qword ptr [RBP + -0x38],RDI LAB_0014a863: MOVZX R12D,word ptr [R14] TEST R12D,R12D JZ 0x0014a91b MOVZX ECX,word ptr [R14 + 0x2] MOVZX EBX,CX TEST R8,R8 JZ 0x0014a8c3 TEST CX,CX JZ 0x0014a8c3 MOV EDX,R12D MOV CL,byte ptr [R10 + RDX*0x1] TEST CL,0x1 JZ 0x0014a8c3 MOV R11D,ESI MOV ESI,dword ptr [R10 + RDX*0x1 + 0x1] MOVZX EDX,word ptr [R10 + RDX*0x1 + 0x5] SHL RDX,0x20 OR RDX,RSI CMP RDX,R8 JNC 0x0014a8c0 AND CL,0xfe MOV byte ptr [R10 + R12*0x1 + 0x6],CL ADD R12,0x6 ADD dword ptr [RBP + -0x2c],0x6 ADD EBX,-0x6 MOV word ptr [R14 + 0x2],BX LAB_0014a8c0: MOV ESI,R11D LAB_0014a8c3: CMP R12D,R13D JZ 0x0014a903 SUB R13D,EAX CMP ESI,EAX JZ 0x0014a8f7 MOV EDI,ESI ADD RDI,R10 MOV R15D,ESI MOV ESI,EAX ADD RSI,R10 MOV EDX,R13D CALL 0x00129120 MOV ESI,R15D MOV RDI,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x50] MOV R9D,dword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + -0x40] LAB_0014a8f7: ADD ESI,R13D MOV R15D,R12D SUB R15D,ESI MOV EAX,R12D LAB_0014a903: MOV ECX,R12D SUB ECX,R15D MOV word ptr [R14],CX ADD R12D,EBX MOV R13D,R9D SUB R13D,EBX JA 0x0014a92a LAB_0014a918: MOV R13D,R12D LAB_0014a91b: ADD R14,-0x4 CMP RDI,R14 JBE 0x0014a863 JMP 0x0014a981 LAB_0014a92a: TEST EBX,EBX JZ 0x0014a918 SUB R12D,EAX MOV R15D,ESI ADD R15,R10 MOV EBX,ESI MOV ESI,EAX ADD RSI,R10 MOV RDI,R15 MOV RDX,R12 CALL 0x00129120 ADD R15,R12 MOV RDI,R15 XOR R15D,R15D XOR ESI,ESI MOV RDX,R13 CALL 0x001292b0 MOV ESI,EBX MOV RDI,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x50] MOV R9D,dword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + -0x40] ADD ESI,R9D MOV word ptr [R14 + 0x2],R9W SUB dword ptr [RBP + -0x2c],R13D MOV EAX,ESI MOV R13D,ESI JMP 0x0014a91b LAB_0014a981: CMP ESI,EAX JZ 0x0014a9aa SUB R13D,EAX MOV EDI,ESI ADD RDI,R10 MOV ESI,EAX ADD RSI,R10 MOV RDX,R13 CALL 0x00129120 MOV RDI,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x50] MOV R9D,dword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + -0x40] LAB_0014a9aa: MOVZX ECX,word ptr [RDI] MOV RDX,qword ptr [RBP + -0x58] LEA EAX,[RDX + -0x1] CMP EAX,dword ptr [RBP + -0x68] JNZ 0x0014a9d5 CMP byte ptr [RBP + -0x60],0x0 JZ 0x0014ab4b SUB EDI,R10D SUB EDI,ECX MOV RAX,qword ptr [RBP + -0x70] MOV word ptr [RAX + -0x6],DI JMP 0x0014ab53 LAB_0014a9d5: SHL EDX,0x2 MOV RSI,qword ptr [RBP + -0x48] SUB ESI,EDX ADD ESI,-0x4 LEA R13,[R10 + RSI*0x1] CMP R13,R14 JA 0x0014ab82 MOV dword ptr [RBP + -0x2c],ECX XOR EDX,EDX MOV R11D,ESI MOV EDI,ESI LAB_0014a9f8: MOVZX R15D,word ptr [R13] TEST R15D,R15D JZ 0x0014aab5 MOVZX R12D,word ptr [R13 + 0x2] LEA EBX,[R12 + R15*0x1] TEST R8,R8 JZ 0x0014aa60 MOV ECX,R15D MOV AL,byte ptr [R10 + RCX*0x1] TEST AL,0x1 JZ 0x0014aa60 MOV qword ptr [RBP + -0x38],RDX MOV EDX,dword ptr [R10 + RCX*0x1 + 0x1] MOVZX ECX,word ptr [R10 + RCX*0x1 + 0x5] SHL RCX,0x20 OR RCX,RDX CMP RCX,R8 JNC 0x0014aa4e AND AL,0xfe MOV byte ptr [R10 + R15*0x1 + 0x6],AL ADD R15,0x6 ADD R12D,-0x6 MOV word ptr [R13 + 0x2],R12W LAB_0014aa4e: MOV ECX,R9D SUB ECX,R12D MOV RDX,qword ptr [RBP + -0x38] JA 0x0014aac4 LAB_0014aa5a: ADD R12D,R15D MOV EBX,R12D LAB_0014aa60: CMP EBX,R11D JNZ 0x0014aa69 MOV EBX,EDI JMP 0x0014aaa7 LAB_0014aa69: MOV R12D,EDI SUB R12D,R11D CMP ESI,EDI JZ 0x0014aaa0 MOV EDI,ESI ADD RDI,R10 MOV EDX,R12D SUB RDI,RDX MOV RAX,RSI MOV ESI,R11D ADD RSI,R10 MOV qword ptr [RBP + -0x48],RAX CALL 0x00129120 MOV R8,qword ptr [RBP + -0x50] MOV R9D,dword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] LAB_0014aaa0: SUB ESI,R12D MOV EDX,ESI SUB EDX,EBX LAB_0014aaa7: LEA EAX,[RDX + R15*0x1] MOV word ptr [R13],AX MOV EDI,EBX MOV R11D,R15D LAB_0014aab5: ADD R13,0x4 CMP R13,R14 JBE 0x0014a9f8 JMP 0x0014ab42 LAB_0014aac4: MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x48],RSI LEA EAX,[RCX + RBX*0x1] CMP R11D,EAX MOV dword ptr [RBP + -0x58],R11D JNC 0x0014ab04 SUB EBX,R11D ADD EBX,ECX MOV ESI,R15D ADD RSI,R10 MOV RDI,RSI SUB RDI,RBX MOV EDX,R12D MOV qword ptr [RBP + -0x60],RCX CALL 0x00129120 MOV RCX,qword ptr [RBP + -0x60] MOV R11D,dword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x40] SUB R15D,EBX LAB_0014ab04: MOV EDI,R11D ADD RDI,R10 MOV EDX,ECX SUB RDI,RDX XOR ESI,ESI MOV RBX,RCX CALL 0x001292b0 MOV R11D,dword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x40] SUB R11D,EBX MOV R9D,dword ptr [RBP + -0x30] MOV word ptr [R13 + 0x2],R9W MOV RSI,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x38] JMP 0x0014aa5a LAB_0014ab42: CMP ESI,EDI JNZ 0x0014ab5a MOV ESI,R11D JMP 0x0014ab7f LAB_0014ab4b: MOV EAX,dword ptr [RBP + -0x2c] ADD word ptr [R10 + 0xa],AX LAB_0014ab53: AND byte ptr [R10 + 0x7],0x7f JMP 0x0014ab89 LAB_0014ab5a: SUB EDI,R11D MOV R14,RDI MOV EDI,ESI ADD RDI,R10 SUB RDI,R14 MOV RBX,RSI MOV ESI,R11D ADD RSI,R10 MOV RDX,R14 CALL 0x00129120 MOV RSI,RBX SUB ESI,R14D LAB_0014ab7f: MOV ECX,dword ptr [RBP + -0x2c] LAB_0014ab82: SUB ESI,ECX MOV word ptr [R13 + 0x2],SI LAB_0014ab89: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void _ma_compact_block_page (long param_1,long param_2,int param_3,char param_4,ulong param_5,uint param_6) { byte bVar1; ushort uVar2; ushort uVar3; ushort uVar4; long lVar5; uint uVar6; uint uVar7; uint uVar8; uint uVar9; uint uVar10; ulong uVar11; uint uVar12; ushort *puVar13; ushort *puVar14; int iVar15; ulong uVar16; int local_34; bVar1 = *(byte *)(param_2 + 8); uVar9 = *(uint *)(param_1 + 0x7bc); lVar5 = (param_2 + (ulong)uVar9) - (ulong)(uint)(param_3 * 4); puVar13 = (ushort *)(lVar5 - 8); uVar8 = *(int *)(param_1 + 0xc18) + 0xc; puVar14 = (ushort *)(param_2 + (ulong)uVar9 + -8); iVar15 = 0; local_34 = 0; uVar10 = uVar8; uVar7 = uVar8; do { uVar11 = (ulong)*puVar14; if (*puVar14 != 0) { uVar2 = puVar14[1]; uVar6 = (uint)uVar2; if ((((param_5 != 0) && (uVar2 != 0)) && ((*(byte *)(param_2 + uVar11) & 1) != 0)) && (CONCAT24(*(int2 *)(param_2 + 5 + uVar11),*(int4 *)(param_2 + 1 + uVar11)) < param_5)) { *(byte *)(param_2 + 6 + uVar11) = *(byte *)(param_2 + uVar11) & 0xfe; uVar11 = uVar11 + 6; local_34 = local_34 + 6; uVar6 = uVar2 - 6; puVar14[1] = (ushort)uVar6; } uVar12 = (uint)uVar11; if (uVar12 != uVar10) { if (uVar8 != uVar7) { memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2), (ulong)(uVar10 - uVar7)); } uVar8 = uVar8 + (uVar10 - uVar7); iVar15 = uVar12 - uVar8; uVar7 = uVar12; } *puVar14 = (short)uVar11 - (short)iVar15; uVar10 = uVar12 + uVar6; uVar12 = param_6 - uVar6; if ((uVar6 <= param_6 && uVar12 != 0) && (uVar6 != 0)) { memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2), (ulong)(uVar10 - uVar7)); iVar15 = 0; memset((void *)((long)((ulong)uVar8 + param_2) + (ulong)(uVar10 - uVar7)),0,(ulong)uVar12); uVar8 = uVar8 + param_6; puVar14[1] = (ushort)param_6; local_34 = local_34 - uVar12; uVar10 = uVar8; uVar7 = uVar8; } } puVar14 = puVar14 + -2; } while (puVar13 <= puVar14); if (uVar8 != uVar7) { memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2), (ulong)(uVar10 - uVar7)); } uVar2 = *puVar13; if (bVar1 - 1 == param_3) { if (param_4 == '\0') { *(short *)(param_2 + 10) = *(short *)(param_2 + 10) + (short)local_34; } else { *(ushort *)(lVar5 + -6) = ((short)puVar13 - (short)param_2) - uVar2; } *(byte *)(param_2 + 7) = *(byte *)(param_2 + 7) & 0x7f; } else { uVar9 = (uVar9 + (uint)bVar1 * -4) - 4; uVar11 = (ulong)uVar9; puVar13 = (ushort *)(param_2 + uVar11); if (puVar13 <= puVar14) { iVar15 = 0; uVar10 = uVar9; do { uVar3 = *puVar13; uVar16 = (ulong)uVar3; if (uVar3 != 0) { uVar4 = puVar13[1]; uVar8 = (uint)uVar4; uVar7 = (uint)uVar4 + (uint)uVar3; if ((param_5 != 0) && ((*(byte *)(param_2 + uVar16) & 1) != 0)) { if (CONCAT24(*(int2 *)(param_2 + 5 + uVar16),*(int4 *)(param_2 + 1 + uVar16) ) < param_5) { *(byte *)(param_2 + 6 + uVar16) = *(byte *)(param_2 + uVar16) & 0xfe; uVar16 = uVar16 + 6; uVar8 = uVar4 - 6; puVar13[1] = (ushort)uVar8; } uVar6 = param_6 - uVar8; if (uVar8 <= param_6 && uVar6 != 0) { if (uVar9 < uVar6 + uVar7) { uVar7 = (uVar7 - uVar9) + uVar6; memmove((void *)((long)(uVar16 + param_2) - (ulong)uVar7),(void *)(uVar16 + param_2) ,(ulong)uVar8); uVar16 = (ulong)((int)uVar16 - uVar7); } memset((void *)(((ulong)uVar9 + param_2) - (ulong)uVar6),0,(ulong)uVar6); uVar9 = uVar9 - uVar6; puVar13[1] = (ushort)param_6; } uVar7 = uVar8 + (int)uVar16; } if (uVar7 != uVar9) { uVar8 = uVar10 - uVar9; if ((uint)uVar11 != uVar10) { memmove((void *)((uVar11 + param_2) - (ulong)uVar8),(void *)((ulong)uVar9 + param_2), (ulong)uVar8); } uVar8 = (uint)uVar11 - uVar8; uVar11 = (ulong)uVar8; iVar15 = uVar8 - uVar7; uVar10 = uVar7; } *puVar13 = (short)iVar15 + (short)uVar16; uVar9 = (uint)uVar16; } puVar13 = puVar13 + 2; } while (puVar13 <= puVar14); if ((uint)uVar11 != uVar10) { uVar10 = uVar10 - uVar9; memmove((void *)((uVar11 + param_2) - (ulong)uVar10),(void *)((ulong)uVar9 + param_2), (ulong)uVar10); uVar9 = (uint)uVar11 - uVar10; } } puVar13[1] = (short)uVar9 - uVar2; } return; }
34,860
ps_fetch_bin
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_bin(MYSQL_BIND *r_param, const MYSQL_FIELD *field, unsigned char **row) { if (field->charsetnr == 63) { ulong field_length= *r_param->length= net_field_length(row); uchar *current_pos= (*row) + r_param->offset, *end= (*row) + field_length; size_t copylen= 0; if (current_pos < end) { copylen= end - current_pos; if (r_param->buffer_length) memcpy(r_param->buffer, current_pos, MIN(copylen, r_param->buffer_length)); } if (copylen < r_param->buffer_length && (r_param->buffer_type == MYSQL_TYPE_STRING || r_param->buffer_type == MYSQL_TYPE_JSON)) ((char *)r_param->buffer)[copylen]= 0; *r_param->error= copylen > r_param->buffer_length; (*row)+= field_length; } else ps_fetch_string(r_param, field, row); }
O0
c
ps_fetch_bin: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0x3f, 0x6c(%rax) jne 0x3031a movq -0x18(%rbp), %rdi callq 0x16f40 movq -0x8(%rbp), %rcx movq (%rcx), %rcx movq %rax, (%rcx) movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax addq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x302b2 movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x302b0 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x40(%rcx), %rax jae 0x30293 movq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x3029f movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x50(%rbp) movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rdx callq 0x13360 jmp 0x302b2 movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x40(%rcx), %rax jae 0x302ea movq -0x8(%rbp), %rax cmpl $0xfe, 0x60(%rax) je 0x302da movq -0x8(%rbp), %rax cmpl $0xf5, 0x60(%rax) jne 0x302ea movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x38(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x40(%rcx), %rax seta %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) jmp 0x3032b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x30190 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ps_fetch_bin: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] cmp dword ptr [rax+6Ch], 3Fh ; '?' jnz loc_3031A mov rdi, [rbp+var_18] call net_field_length mov rcx, [rbp+var_8] mov rcx, [rcx] mov [rcx], rax mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax] add rax, [rbp+var_20] mov [rbp+var_30], rax mov [rbp+var_38], 0 mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_302B2 mov rax, [rbp+var_30] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jz short loc_302B0 mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rbp+var_48], rax mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_8] cmp rax, [rcx+40h] jnb short loc_30293 mov rax, [rbp+var_38] mov [rbp+var_50], rax jmp short loc_3029F loc_30293: mov rax, [rbp+var_8] mov rax, [rax+40h] mov [rbp+var_50], rax loc_3029F: mov rsi, [rbp+var_40] mov rdi, [rbp+var_48] mov rdx, [rbp+var_50] call _memcpy loc_302B0: jmp short $+2 loc_302B2: mov rax, [rbp+var_38] mov rcx, [rbp+var_8] cmp rax, [rcx+40h] jnb short loc_302EA mov rax, [rbp+var_8] cmp dword ptr [rax+60h], 0FEh jz short loc_302DA mov rax, [rbp+var_8] cmp dword ptr [rax+60h], 0F5h jnz short loc_302EA loc_302DA: mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rbp+var_38] mov byte ptr [rax+rcx], 0 loc_302EA: mov rax, [rbp+var_38] mov rcx, [rbp+var_8] cmp rax, [rcx+40h] setnbe al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl mov rcx, [rbp+var_20] mov rax, [rbp+var_18] add rcx, [rax] mov [rax], rcx jmp short loc_3032B loc_3031A: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call ps_fetch_string loc_3032B: add rsp, 50h pop rbp retn
unsigned __int8 ** ps_fetch_bin(long long a1, long long a2, unsigned __int8 **a3) { long long v3; // rax unsigned __int8 **result; // rax long long v5; // [rsp+8h] [rbp-48h] unsigned long long v6; // [rsp+18h] [rbp-38h] unsigned __int8 *v7; // [rsp+20h] [rbp-30h] unsigned __int8 *v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] if ( *(_DWORD *)(a2 + 108) != 63 ) return ps_fetch_string(a1, a2, a3); v3 = net_field_length(a3); **(_QWORD **)a1 = v3; v9 = v3; v8 = &(*a3)[*(_QWORD *)(a1 + 72)]; v7 = &(*a3)[v3]; v6 = 0LL; if ( v8 < v7 ) { v6 = v7 - v8; if ( *(_QWORD *)(a1 + 64) ) { v5 = *(_QWORD *)(a1 + 16); if ( v6 >= *(_QWORD *)(a1 + 64) ) memcpy(v5, v8, *(_QWORD *)(a1 + 64)); else memcpy(v5, v8, v6); } } if ( v6 < *(_QWORD *)(a1 + 64) && (*(_DWORD *)(a1 + 96) == 254 || *(_DWORD *)(a1 + 96) == 245) ) *(_BYTE *)(*(_QWORD *)(a1 + 16) + v6) = 0; **(_BYTE **)(a1 + 24) = v6 > *(_QWORD *)(a1 + 64); result = a3; *a3 += v9; return result; }
ps_fetch_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x6c],0x3f JNZ 0x0013031a MOV RDI,qword ptr [RBP + -0x18] CALL 0x00116f40 MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV qword ptr [RCX],RAX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001302b2 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001302b0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x40] JNC 0x00130293 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX JMP 0x0013029f LAB_00130293: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x50],RAX LAB_0013029f: MOV RSI,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] CALL 0x00113360 LAB_001302b0: JMP 0x001302b2 LAB_001302b2: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x40] JNC 0x001302ea MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x60],0xfe JZ 0x001302da MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x60],0xf5 JNZ 0x001302ea LAB_001302da: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + RCX*0x1],0x0 LAB_001302ea: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x40] SETA AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX JMP 0x0013032b LAB_0013031a: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00130190 LAB_0013032b: ADD RSP,0x50 POP RBP RET
void ps_fetch_bin(int8 *param_1,long param_2,long *param_3) { long lVar1; void *__src; size_t local_58; ulong local_40; if (*(int *)(param_2 + 0x6c) == 0x3f) { lVar1 = net_field_length(param_3); *(long *)*param_1 = lVar1; __src = (void *)(*param_3 + param_1[9]); local_40 = 0; if ((__src < (void *)(*param_3 + lVar1)) && (local_40 = (*param_3 + lVar1) - (long)__src, param_1[8] != 0)) { local_58 = local_40; if ((ulong)param_1[8] <= local_40) { local_58 = param_1[8]; } memcpy((void *)param_1[2],__src,local_58); } if ((local_40 < (ulong)param_1[8]) && ((*(int *)(param_1 + 0xc) == 0xfe || (*(int *)(param_1 + 0xc) == 0xf5)))) { *(int1 *)(param_1[2] + local_40) = 0; } *(bool *)param_1[3] = (ulong)param_1[8] < local_40; *param_3 = lVar1 + *param_3; } else { ps_fetch_string(param_1,param_2,param_3); } return; }
34,861
mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long)
eloqsql/mysys/crc32/crc32c.cc
USE_SSE42 static uint32_t crc32c_sse42(uint32_t crc, const char* buf, size_t size) { const uint8_t *p = reinterpret_cast<const uint8_t *>(buf); const uint8_t *e = p + size; uint64_t l = crc ^ 0xffffffffu; // Point x at first 16-byte aligned byte in string. This might be // just past the end of the string. const uintptr_t pval = reinterpret_cast<uintptr_t>(p); const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4)); if (x <= e) // Process bytes until finished or p is 16-byte aligned while (p != x) STEP1; // Process bytes 16 at a time while ((e-p) >= 16) { Fast_CRC32(&l, &p); Fast_CRC32(&l, &p); } // Process bytes 8 at a time while ((e-p) >= 8) Fast_CRC32(&l, &p); // Process the last few bytes while (p != e) STEP1; return static_cast<uint32_t>(l ^ 0xffffffffu); }
O3
cpp
mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long): pushq %rbp movq %rsp, %rbp movl %edi, %eax addq %rsi, %rdx notl %eax leaq 0xf(%rsi), %rcx andq $-0x10, %rcx cmpq %rcx, %rdx setb %r8b movq %rcx, %rdi subq %rsi, %rdi sete %r9b orb %r8b, %r9b je 0x66175 movq %rsi, %rcx jmp 0x661a0 leaq 0x36a54(%rip), %r8 # 0x9cbd0 movq %rsi, %r9 movzbl %al, %r10d movzbl (%r9), %r11d incq %r9 xorl %r10d, %r11d movl (%r8,%r11,4), %r10d shrq $0x8, %rax xorq %r10, %rax cmpq %rcx, %r9 jne 0x6617f addq %rdi, %rsi movq %rdx, %rdi subq %rcx, %rdi cmpq $0x10, %rdi jl 0x661cd movq %rdx, %rdi subq %rsi, %rdi crc32q (%rsi), %rax crc32q 0x8(%rsi), %rax addq $0x10, %rsi addq $-0x10, %rdi cmpq $0xf, %rdi jg 0x661b2 cmpq $0x8, %rdi jl 0x661ed movq %rdx, %rcx subq %rsi, %rcx crc32q (%rsi), %rax addq $0x8, %rsi addq $-0x8, %rcx cmpq $0x7, %rcx jg 0x661d9 cmpq %rdx, %rsi je 0x66216 leaq 0x369d7(%rip), %rcx # 0x9cbd0 movzbl %al, %edi movzbl (%rsi), %r8d incq %rsi xorl %edi, %r8d movl (%rcx,%r8,4), %edi shrq $0x8, %rax xorq %rdi, %rax cmpq %rdx, %rsi jne 0x661f9 notl %eax popq %rbp retq
_ZN15mysys_namespace6crc32cL12crc32c_sse42EjPKcm: push rbp mov rbp, rsp mov eax, edi add rdx, rsi not eax lea rcx, [rsi+0Fh] and rcx, 0FFFFFFFFFFFFFFF0h cmp rdx, rcx setb r8b mov rdi, rcx sub rdi, rsi setz r9b or r9b, r8b jz short loc_66175 mov rcx, rsi jmp short loc_661A0 loc_66175: lea r8, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ mov r9, rsi loc_6617F: movzx r10d, al movzx r11d, byte ptr [r9] inc r9 xor r11d, r10d mov r10d, [r8+r11*4] shr rax, 8 xor rax, r10 cmp r9, rcx jnz short loc_6617F add rsi, rdi loc_661A0: mov rdi, rdx sub rdi, rcx cmp rdi, 10h jl short loc_661CD mov rdi, rdx sub rdi, rsi loc_661B2: crc32 rax, qword ptr [rsi] crc32 rax, qword ptr [rsi+8] add rsi, 10h add rdi, 0FFFFFFFFFFFFFFF0h cmp rdi, 0Fh jg short loc_661B2 loc_661CD: cmp rdi, 8 jl short loc_661ED mov rcx, rdx sub rcx, rsi loc_661D9: crc32 rax, qword ptr [rsi] add rsi, 8 add rcx, 0FFFFFFFFFFFFFFF8h cmp rcx, 7 jg short loc_661D9 loc_661ED: cmp rsi, rdx jz short loc_66216 lea rcx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ loc_661F9: movzx edi, al movzx r8d, byte ptr [rsi] inc rsi xor r8d, edi mov edi, [rcx+r8*4] shr rax, 8 xor rax, rdi cmp rsi, rdx jnz short loc_661F9 loc_66216: not eax pop rbp retn
long long mysys_namespace::crc32c::crc32c_sse42( mysys_namespace::crc32c *this, unsigned long long a2, const char *a3) { const char *v3; // rdx unsigned long long v4; // rax unsigned long long v5; // rcx unsigned __int8 *v6; // r9 int v7; // r11d long long v8; // rdi long long v9; // rcx int v10; // r8d v3 = &a3[a2]; v4 = (unsigned int)~(_DWORD)this; v5 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL; if ( (unsigned long long)v3 < v5 || v5 == a2 ) { v5 = a2; } else { v6 = (unsigned __int8 *)a2; do { v7 = *v6++; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v7] ^ (v4 >> 8); } while ( v6 != (unsigned __int8 *)v5 ); a2 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL; } v8 = (long long)&v3[-v5]; if ( (long long)&v3[-v5] >= 16 ) { v8 = (long long)&v3[-a2]; do { v4 = _mm_crc32_u64(_mm_crc32_u64(v4, *(_QWORD *)a2), *(_QWORD *)(a2 + 8)); a2 += 16LL; v8 -= 16LL; } while ( v8 > 15 ); } if ( v8 >= 8 ) { v9 = (long long)&v3[-a2]; do { v4 = _mm_crc32_u64(v4, *(_QWORD *)a2); a2 += 8LL; v9 -= 8LL; } while ( v9 > 7 ); } for ( ; (const char *)a2 != v3; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v10] ^ (v4 >> 8) ) v10 = *(unsigned __int8 *)a2++; return (unsigned int)~(_DWORD)v4; }
crc32c_sse42: PUSH RBP MOV RBP,RSP MOV EAX,EDI ADD RDX,RSI NOT EAX LEA RCX,[RSI + 0xf] AND RCX,-0x10 CMP RDX,RCX SETC R8B MOV RDI,RCX SUB RDI,RSI SETZ R9B OR R9B,R8B JZ 0x00166175 MOV RCX,RSI JMP 0x001661a0 LAB_00166175: LEA R8,[0x19cbd0] MOV R9,RSI LAB_0016617f: MOVZX R10D,AL MOVZX R11D,byte ptr [R9] INC R9 XOR R11D,R10D MOV R10D,dword ptr [R8 + R11*0x4] SHR RAX,0x8 XOR RAX,R10 CMP R9,RCX JNZ 0x0016617f ADD RSI,RDI LAB_001661a0: MOV RDI,RDX SUB RDI,RCX CMP RDI,0x10 JL 0x001661cd MOV RDI,RDX SUB RDI,RSI LAB_001661b2: CRC32 RAX,qword ptr [RSI] CRC32 RAX,qword ptr [RSI + 0x8] ADD RSI,0x10 ADD RDI,-0x10 CMP RDI,0xf JG 0x001661b2 LAB_001661cd: CMP RDI,0x8 JL 0x001661ed MOV RCX,RDX SUB RCX,RSI LAB_001661d9: CRC32 RAX,qword ptr [RSI] ADD RSI,0x8 ADD RCX,-0x8 CMP RCX,0x7 JG 0x001661d9 LAB_001661ed: CMP RSI,RDX JZ 0x00166216 LEA RCX,[0x19cbd0] LAB_001661f9: MOVZX EDI,AL MOVZX R8D,byte ptr [RSI] INC RSI XOR R8D,EDI MOV EDI,dword ptr [RCX + R8*0x4] SHR RAX,0x8 XOR RAX,RDI CMP RSI,RDX JNZ 0x001661f9 LAB_00166216: NOT EAX POP RBP RET
/* mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long) */ uint __thiscall mysys_namespace::crc32c::crc32c_sse42(crc32c *this,uint param_1,char *param_2,ulong param_3) { int8 uVar1; ulong uVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; int4 in_register_00000034; byte *pbVar6; long lVar7; byte *pbVar8; pbVar4 = (byte *)CONCAT44(in_register_00000034,param_1); pbVar5 = (byte *)(param_2 + (long)pbVar4); uVar2 = (ulong)~(uint)this; pbVar3 = (byte *)((ulong)(pbVar4 + 0xf) & 0xfffffffffffffff0); pbVar6 = pbVar4; if ((long)pbVar3 - (long)pbVar4 != 0 && pbVar3 <= pbVar5) { do { pbVar8 = pbVar6 + 1; uVar2 = uVar2 >> 8 ^ (ulong)*(uint *)(table0_ + (ulong)((uint)*pbVar6 ^ (uint)uVar2 & 0xff) * 4); pbVar6 = pbVar8; } while (pbVar8 != pbVar3); pbVar6 = pbVar4 + ((long)pbVar3 - (long)pbVar4); pbVar4 = pbVar3; } lVar7 = (long)pbVar5 - (long)pbVar4; if (0xf < lVar7) { lVar7 = (long)pbVar5 - (long)pbVar6; do { uVar1 = crc32(uVar2,*(int8 *)pbVar6); uVar2 = crc32(uVar1,*(int8 *)(pbVar6 + 8)); pbVar6 = pbVar6 + 0x10; lVar7 = lVar7 + -0x10; } while (0xf < lVar7); } if (7 < lVar7) { lVar7 = (long)pbVar5 - (long)pbVar6; do { uVar2 = crc32(uVar2,*(int8 *)pbVar6); pbVar6 = pbVar6 + 8; lVar7 = lVar7 + -8; } while (7 < lVar7); } for (; pbVar6 != pbVar5; pbVar6 = pbVar6 + 1) { uVar2 = uVar2 >> 8 ^ (ulong)*(uint *)(table0_ + (ulong)((uint)*pbVar6 ^ (uint)uVar2 & 0xff) * 4) ; } return ~(uint)uVar2; }
34,862
testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::Matcher(char const*)
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-matchers.cc
Matcher<const std::string&>::Matcher(const char* s) { *this = Eq(std::string(s)); }
O3
cpp
testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::Matcher(char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x60, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) leaq 0x5cb86(%rip), %r14 # 0xb3658 addq $0x10, %r14 movq %r14, (%rdi) leaq 0x40(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x16c9c leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x18f38 leaq 0x5cdc1(%rip), %rax # 0xb38d0 addq $0x10, %rax movq %rax, 0x28(%rsp) movq $0x0, 0x38(%rsp) leaq 0x5cfe8(%rip), %rax # 0xb3b10 movq %rax, 0x30(%rsp) movl $0x28, %edi callq 0x11190 movl $0x1, (%rax) movq %rax, %rcx addq $0x18, %rcx movq %rcx, 0x8(%rax) movq 0x8(%rsp), %rdx cmpq %r15, %rdx je 0x56b61 movq %rdx, 0x8(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x18(%rax) jmp 0x56b68 movups (%r15), %xmm0 movups %xmm0, (%rcx) movq 0x10(%rsp), %rcx movq %rcx, 0x10(%rax) movq %r15, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) leaq 0x28(%rsp), %rsi movq %rax, 0x10(%rsi) movq %r14, (%rsi) movq %rbx, %rdi callq 0x77b80 leaq 0x28(%rsp), %rdi callq 0x739d2 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x56bb9 movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x56bd4 movq 0x50(%rsp), %rsi incq %rsi callq 0x11120 addq $0x60, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x739d2 jmp 0x56bf0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x56c0c movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 jmp 0x56c0c movq %rax, %r14 leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x56c2c movq 0x50(%rsp), %rsi incq %rsi callq 0x11120 jmp 0x56c2c movq %rax, %r14 movq %rbx, %rdi callq 0x739d2 movq %r14, %rdi callq 0x11760
_ZN7testing7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPKc: push r15; Alternative name is 'testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::Matcher(char const*)' push r14 push rbx sub rsp, 60h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 lea r14, _ZTVN7testing7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE; `vtable for'testing::Matcher<std::string const&> add r14, 10h mov [rdi], r14 lea rdi, [rsp+78h+var_38] lea rdx, [rsp+78h+var_71] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea r15, [rsp+78h+var_60] mov [r15-10h], r15 mov rsi, [rsp+78h+var_38] mov rdx, [rsp+78h+var_30] add rdx, rsi lea rdi, [rsp+78h+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, _ZTVN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE; `vtable for'testing::internal::MatcherBase<std::string const&> add rax, 10h mov [rsp+78h+var_50], rax mov [rsp+78h+var_40], 0 lea rax, _ZZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE9GetVTableINSA_11ValuePolicyINS0_9EqMatcherIS7_EELb0EEEEEPKNSA_6VTableEvE7kVTableB5cxx11; testing::internal::MatcherBase<std::string const&>::GetVTable<testing::internal::MatcherBase<std::string const&>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>(void)::kVTable mov [rsp+78h+var_48], rax mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov dword ptr [rax], 1 mov rcx, rax add rcx, 18h mov [rax+8], rcx mov rdx, [rsp+78h+var_70] cmp rdx, r15 jz short loc_56B61 mov [rax+8], rdx mov rcx, [rsp+78h+var_60] mov [rax+18h], rcx jmp short loc_56B68 loc_56B61: movups xmm0, xmmword ptr [r15] movups xmmword ptr [rcx], xmm0 loc_56B68: mov rcx, [rsp+78h+var_68] mov [rax+10h], rcx mov [rsp+78h+var_70], r15 mov [rsp+78h+var_68], 0 mov byte ptr [rsp+78h+var_60], 0 lea rsi, [rsp+78h+var_50] mov [rsi+10h], rax mov [rsi], r14 mov rdi, rbx call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSEOSA_; testing::internal::MatcherBase<std::string const&>::operator=(testing::internal::MatcherBase<std::string const&>&&) lea rdi, [rsp+78h+var_50] call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase() mov rdi, [rsp+78h+var_70]; void * cmp rdi, r15 jz short loc_56BB9 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_56BB9: lea rax, [rsp+78h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_56BD4 mov rsi, [rsp+78h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_56BD4: add rsp, 60h pop rbx pop r14 pop r15 retn mov r14, rax lea rdi, [rsp+arg_20] call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase() jmp short loc_56BF0 mov r14, rax loc_56BF0: mov rdi, [rsp+arg_0]; void * cmp rdi, r15 jz short loc_56C0C mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_56C0C mov r14, rax loc_56C0C: lea rax, [rsp+arg_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_56C2C mov rsi, [rsp+arg_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_56C2C mov r14, rax loc_56C2C: mov rdi, rbx call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase() mov rdi, r14 call __Unwind_Resume
void testing::Matcher<std::string const&>::Matcher(long long a1, long long a2) { long long v2; // rax void *v3; // [rsp+8h] [rbp-70h] BYREF long long v4; // [rsp+10h] [rbp-68h] __int128 v5; // [rsp+18h] [rbp-60h] BYREF _QWORD v6[2]; // [rsp+28h] [rbp-50h] BYREF long long v7; // [rsp+38h] [rbp-40h] void *v8[2]; // [rsp+40h] [rbp-38h] BYREF long long v9; // [rsp+50h] [rbp-28h] BYREF *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)a1 = &`vtable for'testing::Matcher<std::string const&> + 2; std::string::basic_string<std::allocator<char>>(v8, a2); v3 = &v5; std::string::_M_construct<char *>((long long)&v3, (_BYTE *)v8[0], (long long)v8[0] + (unsigned long long)v8[1]); v6[0] = &`vtable for'testing::internal::MatcherBase<std::string const&> + 2; v7 = 0LL; v6[1] = testing::internal::MatcherBase<std::string const&>::GetVTable<testing::internal::MatcherBase<std::string const&>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>(void)::kVTable[abi:cxx11]; v2 = operator new(0x28uLL); *(_DWORD *)v2 = 1; *(_QWORD *)(v2 + 8) = v2 + 24; if ( v3 == &v5 ) { *(_OWORD *)(v2 + 24) = v5; } else { *(_QWORD *)(v2 + 8) = v3; *(_QWORD *)(v2 + 24) = v5; } *(_QWORD *)(v2 + 16) = v4; v3 = &v5; v4 = 0LL; LOBYTE(v5) = 0; v7 = v2; v6[0] = &`vtable for'testing::Matcher<std::string const&> + 2; testing::internal::MatcherBase<std::string const&>::operator=(a1); testing::internal::MatcherBase<std::string const&>::~MatcherBase(v6); if ( v3 != &v5 ) operator delete(v3, v5 + 1); if ( v8[0] != &v9 ) operator delete(v8[0], v9 + 1); }
Matcher: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x60 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 LEA R14,[0x1b3658] ADD R14,0x10 MOV qword ptr [RDI],R14 LAB_00156ad9: LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x7] CALL 0x00116c9c LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] ADD RDX,RSI LAB_00156afe: LEA RDI,[RSP + 0x8] CALL 0x00118f38 LEA RAX,[0x1b38d0] ADD RAX,0x10 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x38],0x0 LEA RAX,[0x1b3b10] MOV qword ptr [RSP + 0x30],RAX LAB_00156b2d: MOV EDI,0x28 CALL 0x00111190 MOV dword ptr [RAX],0x1 MOV RCX,RAX ADD RCX,0x18 MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x8] CMP RDX,R15 JZ 0x00156b61 MOV qword ptr [RAX + 0x8],RDX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x18],RCX JMP 0x00156b68 LAB_00156b61: MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RCX],XMM0 LAB_00156b68: MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 LEA RSI,[RSP + 0x28] MOV qword ptr [RSI + 0x10],RAX MOV qword ptr [RSI],R14 LAB_00156b90: MOV RDI,RBX CALL 0x00177b80 LAB_00156b98: LEA RDI,[RSP + 0x28] CALL 0x001739d2 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00156bb9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00111120 LAB_00156bb9: LEA RAX,[RSP + 0x50] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00156bd4 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x00111120 LAB_00156bd4: ADD RSP,0x60 POP RBX POP R14 POP R15 RET
/* testing::Matcher<std::__cxx11::string const&>::Matcher(char const*) */ void __thiscall testing::Matcher<std::__cxx11::string_const&>::Matcher (Matcher<std::__cxx11::string_const&> *this,char *param_1) { allocator local_71; int1 *local_70; int8 local_68; int1 local_60; int7 uStack_5f; int8 uStack_58; int **local_50; int1 *local_48; int4 *local_40; long *local_38; long local_30; long local_28 [2]; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int ***)this = &PTR__MatcherBase_001b3668; /* try { // try from 00156ad9 to 00156ae7 has its CatchHandler @ 00156c29 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_38,param_1,&local_71); /* try { // try from 00156afe to 00156b07 has its CatchHandler @ 00156c09 */ local_70 = &local_60; std::__cxx11::string::_M_construct<char*>(&local_70,local_38,local_30 + (long)local_38); local_50 = &PTR__MatcherBase_001b38e0; local_40 = (int4 *)0x0; local_48 = internal::MatcherBase<std::__cxx11::string_const&>:: GetVTable<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>() ::kVTable_abi_cxx11_; /* try { // try from 00156b2d to 00156b36 has its CatchHandler @ 00156bed */ local_40 = (int4 *)operator_new(0x28); *local_40 = 1; *(int4 **)(local_40 + 2) = local_40 + 6; if (local_70 == &local_60) { *(ulong *)(local_40 + 6) = CONCAT71(uStack_5f,local_60); *(int8 *)(local_40 + 8) = uStack_58; } else { *(int1 **)(local_40 + 2) = local_70; *(ulong *)(local_40 + 6) = CONCAT71(uStack_5f,local_60); } *(int8 *)(local_40 + 4) = local_68; local_68 = 0; local_60 = 0; local_50 = &PTR__MatcherBase_001b3668; local_70 = &local_60; /* try { // try from 00156b90 to 00156b97 has its CatchHandler @ 00156bde */ internal::MatcherBase<std::__cxx11::string_const&>::operator= ((MatcherBase<std::__cxx11::string_const&> *)this,(MatcherBase *)&local_50); internal::MatcherBase<std::__cxx11::string_const&>::~MatcherBase ((MatcherBase<std::__cxx11::string_const&> *)&local_50); if (local_70 != &local_60) { operator_delete(local_70,CONCAT71(uStack_5f,local_60) + 1); } if (local_38 != local_28) { operator_delete(local_38,local_28[0] + 1); } return; }
34,863
tree_walk_right_root_left
eloqsql/mysys/tree.c
static int tree_walk_right_root_left(TREE *tree, TREE_ELEMENT *element, tree_walk_action action, void *argument) { int error; if (element->right) /* Not null_element */ { if ((error=tree_walk_right_root_left(tree,element->right,action, argument)) == 0 && (error=(*action)(ELEMENT_KEY(tree,element), (element_count) element->count, argument)) == 0) error=tree_walk_right_root_left(tree,element->left,action,argument); return error; } return 0; }
O3
c
tree_walk_right_root_left: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r12 movq 0x8(%rsi), %rsi xorl %eax, %eax testq %rsi, %rsi je 0xa53ef movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %r13 movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movq %r13, %rdi movq %r15, %rdx movq %r14, %rcx callq 0xa537c testl %eax, %eax jne 0xa53ef movl 0x208(%r13), %edi testq %rdi, %rdi je 0xa53c9 addq %r12, %rdi jmp 0xa53ce movq 0x18(%r12), %rdi movl 0x10(%r12), %esi andl %ebx, %esi movq %r14, %rdx callq *%r15 testl %eax, %eax jne 0xa53ef movq (%r12), %r12 movq 0x8(%r12), %rsi testq %rsi, %rsi jne 0xa53a6 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tree_walk_right_root_left: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rsi mov rsi, [rsi+8] xor eax, eax test rsi, rsi jz short loc_A53EF mov r14, rcx mov r15, rdx mov r13, rdi mov ebx, 7FFFFFFFh loc_A53A6: mov rdi, r13 mov rdx, r15 mov rcx, r14 call tree_walk_right_root_left test eax, eax jnz short loc_A53EF mov edi, [r13+208h] test rdi, rdi jz short loc_A53C9 add rdi, r12 jmp short loc_A53CE loc_A53C9: mov rdi, [r12+18h] loc_A53CE: mov esi, [r12+10h] and esi, ebx mov rdx, r14 call r15 test eax, eax jnz short loc_A53EF mov r12, [r12] mov rsi, [r12+8] test rsi, rsi jnz short loc_A53A6 xor eax, eax loc_A53EF: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long tree_walk_right_root_left( long long a1, long long **a2, long long ( *a3)(long long, long long, long long), long long a4) { long long **v4; // r12 long long *v5; // rsi long long result; // rax long long v10; // rdi v4 = a2; v5 = a2[1]; result = 0LL; if ( v5 ) { while ( 1 ) { result = tree_walk_right_root_left(a1, v5, a3, a4); if ( (_DWORD)result ) break; v10 = *(_DWORD *)(a1 + 520) ? (long long)v4 + *(unsigned int *)(a1 + 520) : (long long)v4[3]; result = a3(v10, (_DWORD)v4[2] & 0x7FFFFFFF, a4); if ( (_DWORD)result ) break; v4 = (long long **)*v4; v5 = v4[1]; if ( !v5 ) return 0LL; } } return result; }
tree_walk_right_root_left: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RSI MOV RSI,qword ptr [RSI + 0x8] XOR EAX,EAX TEST RSI,RSI JZ 0x001a53ef MOV R14,RCX MOV R15,RDX MOV R13,RDI MOV EBX,0x7fffffff LAB_001a53a6: MOV RDI,R13 MOV RDX,R15 MOV RCX,R14 CALL 0x001a537c TEST EAX,EAX JNZ 0x001a53ef MOV EDI,dword ptr [R13 + 0x208] TEST RDI,RDI JZ 0x001a53c9 ADD RDI,R12 JMP 0x001a53ce LAB_001a53c9: MOV RDI,qword ptr [R12 + 0x18] LAB_001a53ce: MOV ESI,dword ptr [R12 + 0x10] AND ESI,EBX MOV RDX,R14 CALL R15 TEST EAX,EAX JNZ 0x001a53ef MOV R12,qword ptr [R12] MOV RSI,qword ptr [R12 + 0x8] TEST RSI,RSI JNZ 0x001a53a6 XOR EAX,EAX LAB_001a53ef: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 tree_walk_right_root_left(long param_1,long *param_2,code *param_3,int8 param_4) { int8 uVar1; long lVar2; lVar2 = param_2[1]; while( true ) { if (lVar2 == 0) { return 0; } uVar1 = tree_walk_right_root_left(param_1,lVar2,param_3,param_4); if ((int)uVar1 != 0) break; if ((ulong)*(uint *)(param_1 + 0x208) == 0) { lVar2 = param_2[3]; } else { lVar2 = (ulong)*(uint *)(param_1 + 0x208) + (long)param_2; } uVar1 = (*param_3)(lVar2,*(uint *)(param_2 + 2) & 0x7fffffff,param_4); if ((int)uVar1 != 0) { return uVar1; } param_2 = (long *)*param_2; lVar2 = param_2[1]; } return uVar1; }
34,864
SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type)
7CodeWizard[P]stablediffusion/unet.hpp
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) { norm_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); norm_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); proj_in_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels); proj_in_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); proj_out_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels); proj_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); // transformer for (auto& transformer : transformers) { transformer.norm1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.attn1_q_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_k_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_v_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_out_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.attn2_q_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn2_k_w = ggml_new_tensor_2d(ctx, wtype, context_dim, in_channels); transformer.attn2_v_w = ggml_new_tensor_2d(ctx, wtype, context_dim, in_channels); transformer.attn2_out_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn2_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm3_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm3_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.ff_0_proj_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels * 4 * 2); transformer.ff_0_proj_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels * 4 * 2); transformer.ff_2_w = ggml_new_tensor_2d(ctx, wtype, in_channels * 4, in_channels); transformer.ff_2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); } }
O0
cpp
SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movl %ecx, 0x2c(%rsp) movq 0x40(%rsp), %rax movq %rax, (%rsp) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x18(%rax) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x20(%rax) movq 0x38(%rsp), %rdi movslq (%rax), %r8 movslq (%rax), %r9 movl $0x1, %esi movl $0x1, %ecx movq %rcx, %rdx callq 0x11c960 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x28(%rax) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x30(%rax) movq 0x38(%rsp), %rdi movslq (%rax), %r8 movslq (%rax), %r9 movl $0x1, %esi movl $0x1, %ecx movq %rcx, %rdx callq 0x11c960 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x50(%rax) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x58(%rax) addq $0x38, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi callq 0x49000 movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi callq 0x49030 movq %rax, 0x10(%rsp) leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x49060 testb $0x1, %al jne 0x5ee07 jmp 0x5f0e6 leaq 0x18(%rsp), %rdi callq 0x490a0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x8(%rsp) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, (%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x8(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq (%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x10(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq (%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x18(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq (%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x20(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq (%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x28(%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x30(%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x38(%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x40(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq (%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x48(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq 0x10(%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x50(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq 0x10(%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x58(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq (%rax), %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x60(%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x68(%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x70(%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x78(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movslq (%rax), %rdx movl (%rax), %eax shll $0x2, %eax shll %eax movslq %eax, %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x80(%rcx) movq 0x38(%rsp), %rdi movl (%rax), %eax shll $0x2, %eax shll %eax movslq %eax, %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x88(%rcx) movq 0x38(%rsp), %rdi movl 0x2c(%rsp), %esi movl (%rax), %ecx shll $0x2, %ecx movslq %ecx, %rdx movslq (%rax), %rcx callq 0x11c8b0 movq %rax, %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rdx, 0x90(%rcx) movq 0x38(%rsp), %rdi movslq (%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x98(%rax) leaq 0x18(%rsp), %rdi callq 0x490b0 jmp 0x5edef addq $0x48, %rsp retq nopl (%rax,%rax)
_ZN18SpatialTransformer11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_1C], ecx mov rax, [rsp+48h+var_8] mov [rsp+48h+var_48], rax mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+48h+var_48] mov [rax+18h], rcx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+48h+var_48] mov [rax+20h], rcx mov rdi, [rsp+48h+var_10] movsxd r8, dword ptr [rax] movsxd r9, dword ptr [rax] mov esi, 1 mov ecx, 1 mov rdx, rcx call ggml_new_tensor_4d mov rcx, rax mov rax, [rsp+48h+var_48] mov [rax+28h], rcx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+48h+var_48] mov [rax+30h], rcx mov rdi, [rsp+48h+var_10] movsxd r8, dword ptr [rax] movsxd r9, dword ptr [rax] mov esi, 1 mov ecx, 1 mov rdx, rcx call ggml_new_tensor_4d mov rcx, rax mov rax, [rsp+48h+var_48] mov [rax+50h], rcx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+48h+var_48] mov [rax+58h], rcx add rax, 38h ; '8' mov [rsp+48h+var_28], rax mov rdi, [rsp+48h+var_28] call _ZNSt6vectorIN18SpatialTransformer11TransformerESaIS1_EE5beginEv; std::vector<SpatialTransformer::Transformer>::begin(void) mov [rsp+48h+var_30], rax mov rdi, [rsp+48h+var_28] call _ZNSt6vectorIN18SpatialTransformer11TransformerESaIS1_EE3endEv; std::vector<SpatialTransformer::Transformer>::end(void) mov [rsp+48h+var_38], rax loc_5EDEF: lea rdi, [rsp+48h+var_30] lea rsi, [rsp+48h+var_38] call _ZN9__gnu_cxxneIPN18SpatialTransformer11TransformerESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>>(__gnu_cxx::__normal_iterator<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>> const&,__gnu_cxx::__normal_iterator<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>> const&) test al, 1 jnz short loc_5EE07 jmp loc_5F0E6 loc_5EE07: lea rdi, [rsp+48h+var_30] call _ZNK9__gnu_cxx17__normal_iteratorIPN18SpatialTransformer11TransformerESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>>::operator*(void) mov rcx, rax mov rax, [rsp+48h+var_48] mov [rsp+48h+var_40], rcx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+8], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+10h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+18h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+20h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+28h], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+30h], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+38h], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+40h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+48h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax+10h] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+50h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax+10h] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+58h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax] movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+60h], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+68h], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+70h], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+78h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] movsxd rdx, dword ptr [rax] mov eax, [rax] shl eax, 2 shl eax, 1 movsxd rcx, eax call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+80h], rdx mov rdi, [rsp+48h+var_10] mov eax, [rax] shl eax, 2 shl eax, 1 movsxd rdx, eax xor esi, esi call ggml_new_tensor_1d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+88h], rdx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_1C] mov ecx, [rax] shl ecx, 2 movsxd rdx, ecx movsxd rcx, dword ptr [rax] call ggml_new_tensor_2d mov rdx, rax mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rcx+90h], rdx mov rdi, [rsp+48h+var_10] movsxd rdx, dword ptr [rax] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+48h+var_40] mov [rax+98h], rcx lea rdi, [rsp+48h+var_30] call _ZN9__gnu_cxx17__normal_iteratorIPN18SpatialTransformer11TransformerESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>>::operator++(void) jmp loc_5EDEF loc_5F0E6: add rsp, 48h retn
bool SpatialTransformer::init_params(int *a1, long long a2, long long a3, unsigned int a4) { bool result; // al _QWORD *v5; // [rsp+8h] [rbp-40h] long long v6; // [rsp+10h] [rbp-38h] BYREF _QWORD v7[2]; // [rsp+18h] [rbp-30h] BYREF unsigned int v8; // [rsp+2Ch] [rbp-1Ch] long long v9; // [rsp+30h] [rbp-18h] long long v10; // [rsp+38h] [rbp-10h] int *v11; // [rsp+40h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; *((_QWORD *)a1 + 3) = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 4) = ggml_new_tensor_1d(v10, 0LL, *a1); *((_QWORD *)a1 + 5) = ggml_new_tensor_4d(v10, 1LL, 1LL, 1LL, *a1, *a1); *((_QWORD *)a1 + 6) = ggml_new_tensor_1d(v10, 0LL, *a1); *((_QWORD *)a1 + 10) = ggml_new_tensor_4d(v10, 1LL, 1LL, 1LL, *a1, *a1); *((_QWORD *)a1 + 11) = ggml_new_tensor_1d(v10, 0LL, *a1); v7[1] = a1 + 14; v7[0] = std::vector<SpatialTransformer::Transformer>::begin((long long)(a1 + 14)); v6 = std::vector<SpatialTransformer::Transformer>::end((long long)(a1 + 14)); while ( 1 ) { result = __gnu_cxx::operator!=<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>>( (long long)v7, (long long)&v6); if ( !result ) break; v5 = (_QWORD *)__gnu_cxx::__normal_iterator<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>>::operator*((long long)v7); *v5 = ggml_new_tensor_1d(v10, 0LL, *a1); v5[1] = ggml_new_tensor_1d(v10, 0LL, *a1); v5[2] = ggml_new_tensor_2d(v10, v8, *a1, *a1); v5[3] = ggml_new_tensor_2d(v10, v8, *a1, *a1); v5[4] = ggml_new_tensor_2d(v10, v8, *a1, *a1); v5[5] = ggml_new_tensor_2d(v10, v8, *a1, *a1); v5[6] = ggml_new_tensor_1d(v10, 0LL, *a1); v5[7] = ggml_new_tensor_1d(v10, 0LL, *a1); v5[8] = ggml_new_tensor_1d(v10, 0LL, *a1); v5[9] = ggml_new_tensor_2d(v10, v8, *a1, *a1); v5[10] = ggml_new_tensor_2d(v10, v8, a1[4], *a1); v5[11] = ggml_new_tensor_2d(v10, v8, a1[4], *a1); v5[12] = ggml_new_tensor_2d(v10, v8, *a1, *a1); v5[13] = ggml_new_tensor_1d(v10, 0LL, *a1); v5[14] = ggml_new_tensor_1d(v10, 0LL, *a1); v5[15] = ggml_new_tensor_1d(v10, 0LL, *a1); v5[16] = ggml_new_tensor_2d(v10, v8, *a1, 8 * *a1); v5[17] = ggml_new_tensor_1d(v10, 0LL, 8 * *a1); v5[18] = ggml_new_tensor_2d(v10, v8, 4 * *a1, *a1); v5[19] = ggml_new_tensor_1d(v10, 0LL, *a1); __gnu_cxx::__normal_iterator<SpatialTransformer::Transformer *,std::vector<SpatialTransformer::Transformer>>::operator++(v7); } return result; }
init_params: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV dword ptr [RSP + 0x2c],ECX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x20],RCX MOV RDI,qword ptr [RSP + 0x38] MOVSXD R8,dword ptr [RAX] MOVSXD R9,dword ptr [RAX] MOV ESI,0x1 MOV ECX,0x1 MOV RDX,RCX CALL 0x0021c960 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x28],RCX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RSP + 0x38] MOVSXD R8,dword ptr [RAX] MOVSXD R9,dword ptr [RAX] MOV ESI,0x1 MOV ECX,0x1 MOV RDX,RCX CALL 0x0021c960 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x50],RCX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x58],RCX ADD RAX,0x38 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x00149000 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x00149030 MOV qword ptr [RSP + 0x10],RAX LAB_0015edef: LEA RDI,[RSP + 0x18] LEA RSI,[RSP + 0x10] CALL 0x00149060 TEST AL,0x1 JNZ 0x0015ee07 JMP 0x0015f0e6 LAB_0015ee07: LEA RDI,[RSP + 0x18] CALL 0x001490a0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RCX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x8],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x10],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x18],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x20],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x28],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x30],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x38],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x40],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x48],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x50],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x58],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX] MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x60],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x68],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x70],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x78],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOVSXD RDX,dword ptr [RAX] MOV EAX,dword ptr [RAX] SHL EAX,0x2 SHL EAX,0x1 MOVSXD RCX,EAX CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x80],RDX MOV RDI,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RAX] SHL EAX,0x2 SHL EAX,0x1 MOVSXD RDX,EAX XOR ESI,ESI CALL 0x0021c880 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x88],RDX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x2c] MOV ECX,dword ptr [RAX] SHL ECX,0x2 MOVSXD RDX,ECX MOVSXD RCX,dword ptr [RAX] CALL 0x0021c8b0 MOV RDX,RAX MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + 0x90],RDX MOV RDI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x98],RCX LEA RDI,[RSP + 0x18] CALL 0x001490b0 JMP 0x0015edef LAB_0015f0e6: ADD RSP,0x48 RET
/* SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type) */ void __thiscall SpatialTransformer::init_params (SpatialTransformer *this,int8 param_1,int8 param_2,int4 param_4) { bool bVar1; int8 uVar2; int8 *puVar3; int8 local_38; int8 local_30; vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>> *local_28; int4 local_1c; int8 local_18; int8 local_10; SpatialTransformer *local_8; local_1c = param_4; local_18 = param_2; local_10 = param_1; local_8 = this; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); *(int8 *)(this + 0x18) = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); *(int8 *)(this + 0x20) = uVar2; uVar2 = ggml_new_tensor_4d(local_10,1,1,1,(long)*(int *)this,(long)*(int *)this); *(int8 *)(this + 0x28) = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); *(int8 *)(this + 0x30) = uVar2; uVar2 = ggml_new_tensor_4d(local_10,1,1,1,(long)*(int *)this,(long)*(int *)this); *(int8 *)(this + 0x50) = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); *(int8 *)(this + 0x58) = uVar2; local_28 = (vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>> *)(this + 0x38); local_30 = std:: vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>> ::begin(local_28); local_38 = std:: vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>> ::end(local_28); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_38); if (!bVar1) break; puVar3 = (int8 *) __gnu_cxx:: __normal_iterator<SpatialTransformer::Transformer*,std::vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>>> ::operator*((__normal_iterator<SpatialTransformer::Transformer*,std::vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>>> *)&local_30); uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); *puVar3 = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[1] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)this,(long)*(int *)this); puVar3[2] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)this,(long)*(int *)this); puVar3[3] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)this,(long)*(int *)this); puVar3[4] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)this,(long)*(int *)this); puVar3[5] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[6] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[7] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[8] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)this,(long)*(int *)this); puVar3[9] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)(this + 0x10),(long)*(int *)this); puVar3[10] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)(this + 0x10),(long)*(int *)this); puVar3[0xb] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)this,(long)*(int *)this); puVar3[0xc] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[0xd] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[0xe] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[0xf] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)*(int *)this,(long)(*(int *)this << 3)); puVar3[0x10] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)(*(int *)this << 3)); puVar3[0x11] = uVar2; uVar2 = ggml_new_tensor_2d(local_10,local_1c,(long)(*(int *)this << 2),(long)*(int *)this); puVar3[0x12] = uVar2; uVar2 = ggml_new_tensor_1d(local_10,0,(long)*(int *)this); puVar3[0x13] = uVar2; __gnu_cxx:: __normal_iterator<SpatialTransformer::Transformer*,std::vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>>> ::operator++((__normal_iterator<SpatialTransformer::Transformer*,std::vector<SpatialTransformer::Transformer,std::allocator<SpatialTransformer::Transformer>>> *)&local_30); } return; }
34,865
SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type)
7CodeWizard[P]stablediffusion/unet.hpp
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) { norm_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); norm_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); proj_in_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels); proj_in_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); proj_out_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels); proj_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); // transformer for (auto& transformer : transformers) { transformer.norm1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.attn1_q_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_k_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_v_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_out_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.attn2_q_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn2_k_w = ggml_new_tensor_2d(ctx, wtype, context_dim, in_channels); transformer.attn2_v_w = ggml_new_tensor_2d(ctx, wtype, context_dim, in_channels); transformer.attn2_out_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn2_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm3_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm3_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.ff_0_proj_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels * 4 * 2); transformer.ff_0_proj_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels * 4 * 2); transformer.ff_2_w = ggml_new_tensor_2d(ctx, wtype, in_channels * 4, in_channels); transformer.ff_2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); } }
O1
cpp
SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %ecx, %ebx movq %rsi, %r14 movq %rdi, %r15 movslq (%rdi), %rdx movq %rsi, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x18(%r15) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x20(%r15) movslq (%r15), %r8 movl $0x1, %edx movl $0x1, %ecx movq %r14, %rdi movl $0x1, %esi movq %r8, %r9 callq 0x8eca5 movq %rax, 0x28(%r15) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x30(%r15) movslq (%r15), %r8 movl $0x1, %edx movl $0x1, %ecx movq %r14, %rdi movl $0x1, %esi movq %r8, %r9 callq 0x8eca5 movq %rax, 0x50(%r15) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x58(%r15) movq 0x38(%r15), %r12 movq 0x40(%r15), %r13 cmpq %r13, %r12 je 0x43533 movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, (%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x8(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x10(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x18(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x20(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x28(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x30(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x38(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x40(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x48(%r12) movslq 0x10(%r15), %rdx movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi callq 0x8ec55 movq %rax, 0x50(%r12) movslq 0x10(%r15), %rdx movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi callq 0x8ec55 movq %rax, 0x58(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x60(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x68(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x70(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x78(%r12) movslq (%r15), %rdx leaq (,%rdx,8), %rcx movq %r14, %rdi movl %ebx, %esi callq 0x8ec55 movq %rax, 0x80(%r12) movslq (%r15), %rdx shlq $0x3, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x88(%r12) movslq (%r15), %rcx leaq (,%rcx,4), %rdx movq %r14, %rdi movl %ebx, %esi callq 0x8ec55 movq %rax, 0x90(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x98(%r12) addq $0xa0, %r12 jmp 0x4337d popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN18SpatialTransformer11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type: push r15 push r14 push r13 push r12 push rbx mov ebx, ecx mov r14, rsi mov r15, rdi movsxd rdx, dword ptr [rdi] mov rdi, rsi xor esi, esi call ggml_new_tensor_1d mov [r15+18h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r15+20h], rax movsxd r8, dword ptr [r15] mov edx, 1 mov ecx, 1 mov rdi, r14 mov esi, 1 mov r9, r8 call ggml_new_tensor_4d mov [r15+28h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r15+30h], rax movsxd r8, dword ptr [r15] mov edx, 1 mov ecx, 1 mov rdi, r14 mov esi, 1 mov r9, r8 call ggml_new_tensor_4d mov [r15+50h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r15+58h], rax mov r12, [r15+38h] mov r13, [r15+40h] loc_4337D: cmp r12, r13 jz loc_43533 movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+8], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+10h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+18h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+20h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+28h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+30h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+38h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+40h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+48h], rax movsxd rdx, dword ptr [r15+10h] movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+50h], rax movsxd rdx, dword ptr [r15+10h] movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+58h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+60h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+68h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+70h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+78h], rax movsxd rdx, dword ptr [r15] lea rcx, ds:0[rdx*8] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+80h], rax movsxd rdx, dword ptr [r15] shl rdx, 3 mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+88h], rax movsxd rcx, dword ptr [r15] lea rdx, ds:0[rcx*4] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+90h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+98h], rax add r12, 0A0h jmp loc_4337D loc_43533: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long SpatialTransformer::init_params(int *a1, long long a2, long long a3, unsigned int a4) { long long result; // rax _QWORD *v6; // r12 _QWORD *v7; // r13 *((_QWORD *)a1 + 3) = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 4) = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 5) = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *a1, *a1); *((_QWORD *)a1 + 6) = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 10) = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *a1, *a1); result = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 11) = result; v6 = (_QWORD *)*((_QWORD *)a1 + 7); v7 = (_QWORD *)*((_QWORD *)a1 + 8); while ( v6 != v7 ) { *v6 = ggml_new_tensor_1d(a2, 0LL, *a1); v6[1] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[2] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[3] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[4] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[5] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[6] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[7] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[8] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[9] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[10] = ggml_new_tensor_2d(a2, a4, a1[4], *a1); v6[11] = ggml_new_tensor_2d(a2, a4, a1[4], *a1); v6[12] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[13] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[14] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[15] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[16] = ggml_new_tensor_2d(a2, a4, *a1, 8LL * *a1); v6[17] = ggml_new_tensor_1d(a2, 0LL, 8LL * *a1); v6[18] = ggml_new_tensor_2d(a2, a4, 4LL * *a1, *a1); result = ggml_new_tensor_1d(a2, 0LL, *a1); v6[19] = result; v6 += 20; } return result; }
34,866
SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type)
7CodeWizard[P]stablediffusion/unet.hpp
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) { norm_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); norm_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); proj_in_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels); proj_in_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); proj_out_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels); proj_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); // transformer for (auto& transformer : transformers) { transformer.norm1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.attn1_q_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_k_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_v_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_out_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn1_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.attn2_q_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn2_k_w = ggml_new_tensor_2d(ctx, wtype, context_dim, in_channels); transformer.attn2_v_w = ggml_new_tensor_2d(ctx, wtype, context_dim, in_channels); transformer.attn2_out_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels); transformer.attn2_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm3_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.norm3_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); transformer.ff_0_proj_w = ggml_new_tensor_2d(ctx, wtype, in_channels, in_channels * 4 * 2); transformer.ff_0_proj_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels * 4 * 2); transformer.ff_2_w = ggml_new_tensor_2d(ctx, wtype, in_channels * 4, in_channels); transformer.ff_2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels); } }
O2
cpp
SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebx movq %rsi, %r14 movq %rdi, %r15 movslq (%rdi), %rdx movq %rsi, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x18(%r15) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x20(%r15) movslq (%r15), %r8 pushq $0x1 popq %rbp pushq $0x1 popq %r12 movq %r14, %rdi movl %ebp, %esi movq %r12, %rdx movq %r12, %rcx movq %r8, %r9 callq 0x68667 movq %rax, 0x28(%r15) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x30(%r15) movslq (%r15), %r8 movq %r14, %rdi movl %ebp, %esi movq %r12, %rdx movq %r12, %rcx movq %r8, %r9 callq 0x68667 movq %rax, 0x50(%r15) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x58(%r15) movq 0x38(%r15), %r12 movq 0x40(%r15), %r13 cmpq %r13, %r12 je 0x2aa0e movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, (%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x8(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x10(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x18(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x20(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x28(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x30(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x38(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x40(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x48(%r12) movslq 0x10(%r15), %rdx movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi callq 0x68627 movq %rax, 0x50(%r12) movslq 0x10(%r15), %rdx movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi callq 0x68627 movq %rax, 0x58(%r12) movslq (%r15), %rcx movq %r14, %rdi movl %ebx, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x60(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x68(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x70(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x78(%r12) movslq (%r15), %rdx leaq (,%rdx,8), %rcx movq %r14, %rdi movl %ebx, %esi callq 0x68627 movq %rax, 0x80(%r12) movslq (%r15), %rdx shlq $0x3, %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x88(%r12) movslq (%r15), %rcx leaq (,%rcx,4), %rdx movq %r14, %rdi movl %ebx, %esi callq 0x68627 movq %rax, 0x90(%r12) movslq (%r15), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x98(%r12) addq $0xa0, %r12 jmp 0x2a858 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN18SpatialTransformer11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, ecx mov r14, rsi mov r15, rdi movsxd rdx, dword ptr [rdi] mov rdi, rsi xor esi, esi call ggml_new_tensor_1d mov [r15+18h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r15+20h], rax movsxd r8, dword ptr [r15] push 1 pop rbp push 1 pop r12 mov rdi, r14 mov esi, ebp mov rdx, r12 mov rcx, r12 mov r9, r8 call ggml_new_tensor_4d mov [r15+28h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r15+30h], rax movsxd r8, dword ptr [r15] mov rdi, r14 mov esi, ebp mov rdx, r12 mov rcx, r12 mov r9, r8 call ggml_new_tensor_4d mov [r15+50h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r15+58h], rax mov r12, [r15+38h] mov r13, [r15+40h] loc_2A858: cmp r12, r13 jz loc_2AA0E movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+8], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+10h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+18h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+20h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+28h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+30h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+38h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+40h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+48h], rax movsxd rdx, dword ptr [r15+10h] movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+50h], rax movsxd rdx, dword ptr [r15+10h] movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+58h], rax movsxd rcx, dword ptr [r15] mov rdi, r14 mov esi, ebx mov rdx, rcx call ggml_new_tensor_2d mov [r12+60h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+68h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+70h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+78h], rax movsxd rdx, dword ptr [r15] lea rcx, ds:0[rdx*8] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+80h], rax movsxd rdx, dword ptr [r15] shl rdx, 3 mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+88h], rax movsxd rcx, dword ptr [r15] lea rdx, ds:0[rcx*4] mov rdi, r14 mov esi, ebx call ggml_new_tensor_2d mov [r12+90h], rax movsxd rdx, dword ptr [r15] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [r12+98h], rax add r12, 0A0h jmp loc_2A858 loc_2AA0E: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long SpatialTransformer::init_params(int *a1, long long a2, long long a3, unsigned int a4) { long long result; // rax _QWORD *v6; // r12 _QWORD *v7; // r13 *((_QWORD *)a1 + 3) = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 4) = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 5) = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *a1, *a1); *((_QWORD *)a1 + 6) = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 10) = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *a1, *a1); result = ggml_new_tensor_1d(a2, 0LL, *a1); *((_QWORD *)a1 + 11) = result; v6 = (_QWORD *)*((_QWORD *)a1 + 7); v7 = (_QWORD *)*((_QWORD *)a1 + 8); while ( v6 != v7 ) { *v6 = ggml_new_tensor_1d(a2, 0LL, *a1); v6[1] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[2] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[3] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[4] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[5] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[6] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[7] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[8] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[9] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[10] = ggml_new_tensor_2d(a2, a4, a1[4], *a1); v6[11] = ggml_new_tensor_2d(a2, a4, a1[4], *a1); v6[12] = ggml_new_tensor_2d(a2, a4, *a1, *a1); v6[13] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[14] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[15] = ggml_new_tensor_1d(a2, 0LL, *a1); v6[16] = ggml_new_tensor_2d(a2, a4, *a1, 8LL * *a1); v6[17] = ggml_new_tensor_1d(a2, 0LL, 8LL * *a1); v6[18] = ggml_new_tensor_2d(a2, a4, 4LL * *a1, *a1); result = ggml_new_tensor_1d(a2, 0LL, *a1); v6[19] = result; v6 += 20; } return result; }
init_params: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ECX MOV R14,RSI MOV R15,RDI MOVSXD RDX,dword ptr [RDI] MOV RDI,RSI XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R15 + 0x18],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R15 + 0x20],RAX MOVSXD R8,dword ptr [R15] PUSH 0x1 POP RBP PUSH 0x1 POP R12 MOV RDI,R14 MOV ESI,EBP MOV RDX,R12 MOV RCX,R12 MOV R9,R8 CALL 0x00168667 MOV qword ptr [R15 + 0x28],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R15 + 0x30],RAX MOVSXD R8,dword ptr [R15] MOV RDI,R14 MOV ESI,EBP MOV RDX,R12 MOV RCX,R12 MOV R9,R8 CALL 0x00168667 MOV qword ptr [R15 + 0x50],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R15 + 0x58],RAX MOV R12,qword ptr [R15 + 0x38] MOV R13,qword ptr [R15 + 0x40] LAB_0012a858: CMP R12,R13 JZ 0x0012aa0e MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x8],RAX MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX MOV RDX,RCX CALL 0x00168627 MOV qword ptr [R12 + 0x10],RAX MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX MOV RDX,RCX CALL 0x00168627 MOV qword ptr [R12 + 0x18],RAX MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX MOV RDX,RCX CALL 0x00168627 MOV qword ptr [R12 + 0x20],RAX MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX MOV RDX,RCX CALL 0x00168627 MOV qword ptr [R12 + 0x28],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x30],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x38],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x40],RAX MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX MOV RDX,RCX CALL 0x00168627 MOV qword ptr [R12 + 0x48],RAX MOVSXD RDX,dword ptr [R15 + 0x10] MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX CALL 0x00168627 MOV qword ptr [R12 + 0x50],RAX MOVSXD RDX,dword ptr [R15 + 0x10] MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX CALL 0x00168627 MOV qword ptr [R12 + 0x58],RAX MOVSXD RCX,dword ptr [R15] MOV RDI,R14 MOV ESI,EBX MOV RDX,RCX CALL 0x00168627 MOV qword ptr [R12 + 0x60],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x68],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x70],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x78],RAX MOVSXD RDX,dword ptr [R15] LEA RCX,[RDX*0x8] MOV RDI,R14 MOV ESI,EBX CALL 0x00168627 MOV qword ptr [R12 + 0x80],RAX MOVSXD RDX,dword ptr [R15] SHL RDX,0x3 MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x88],RAX MOVSXD RCX,dword ptr [R15] LEA RDX,[RCX*0x4] MOV RDI,R14 MOV ESI,EBX CALL 0x00168627 MOV qword ptr [R12 + 0x90],RAX MOVSXD RDX,dword ptr [R15] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [R12 + 0x98],RAX ADD R12,0xa0 JMP 0x0012a858 LAB_0012aa0e: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SpatialTransformer::init_params(ggml_context*, ggml_allocr*, ggml_type) */ void __thiscall SpatialTransformer::init_params (SpatialTransformer *this,int8 param_1,int8 param_3,int4 param_4) { int8 *puVar1; int8 uVar2; int8 *puVar3; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); *(int8 *)(this + 0x18) = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); *(int8 *)(this + 0x20) = uVar2; uVar2 = ggml_new_tensor_4d(param_1,1,1,1,(long)*(int *)this,(long)*(int *)this); *(int8 *)(this + 0x28) = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); *(int8 *)(this + 0x30) = uVar2; uVar2 = ggml_new_tensor_4d(param_1,1,1,1,(long)*(int *)this,(long)*(int *)this); *(int8 *)(this + 0x50) = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); *(int8 *)(this + 0x58) = uVar2; puVar1 = *(int8 **)(this + 0x40); for (puVar3 = *(int8 **)(this + 0x38); puVar3 != puVar1; puVar3 = puVar3 + 0x14) { uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); *puVar3 = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[1] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this); puVar3[2] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this); puVar3[3] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this); puVar3[4] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this); puVar3[5] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[6] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[7] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[8] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this); puVar3[9] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 0x10),(long)*(int *)this); puVar3[10] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 0x10),(long)*(int *)this); puVar3[0xb] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this); puVar3[0xc] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[0xd] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[0xe] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[0xf] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this,(long)*(int *)this * 8); puVar3[0x10] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this << 3); puVar3[0x11] = uVar2; uVar2 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)this * 4); puVar3[0x12] = uVar2; uVar2 = ggml_new_tensor_1d(param_1,0,(long)*(int *)this); puVar3[0x13] = uVar2; } return; }
34,867
mysql_mbcharlen_utf8mb3
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int mysql_mbcharlen_utf8mb3(unsigned int utf8) { if (utf8 < 0x80) { return 1; /* single byte character */ } if (utf8 < 0xC2) { return 0; /* invalid multibyte header */ } if (utf8 < 0xE0) { return 2; /* double byte character */ } if (utf8 < 0xF0) { return 3; /* triple byte character */ } return 0; }
O3
c
mysql_mbcharlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl $0x1, %eax cmpl $0x80, %edi jb 0x2fb50 xorl %eax, %eax cmpl $0xc2, %edi jb 0x2fb50 movl $0x2, %eax cmpl $0xe0, %edi jb 0x2fb50 xorl %eax, %eax cmpl $0xf0, %edi setb %al leal (%rax,%rax,2), %eax popq %rbp retq
mysql_mbcharlen_utf8mb3: push rbp mov rbp, rsp mov eax, 1 cmp edi, 80h jb short loc_2FB50 xor eax, eax cmp edi, 0C2h jb short loc_2FB50 mov eax, 2 cmp edi, 0E0h jb short loc_2FB50 xor eax, eax cmp edi, 0F0h setb al lea eax, [rax+rax*2] loc_2FB50: pop rbp retn
long long mysql_mbcharlen_utf8mb3(unsigned int a1) { long long result; // rax result = 1LL; if ( a1 >= 0x80 ) { result = 0LL; if ( a1 >= 0xC2 ) { result = 2LL; if ( a1 >= 0xE0 ) return 3 * (unsigned int)(a1 < 0xF0); } } return result; }
mysql_mbcharlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV EAX,0x1 CMP EDI,0x80 JC 0x0012fb50 XOR EAX,EAX CMP EDI,0xc2 JC 0x0012fb50 MOV EAX,0x2 CMP EDI,0xe0 JC 0x0012fb50 XOR EAX,EAX CMP EDI,0xf0 SETC AL LEA EAX,[RAX + RAX*0x2] LAB_0012fb50: POP RBP RET
char mysql_mbcharlen_utf8mb3(uint param_1) { char cVar1; cVar1 = '\x01'; if (((0x7f < param_1) && (cVar1 = '\0', 0xc1 < param_1)) && (cVar1 = '\x02', 0xdf < param_1)) { cVar1 = (param_1 < 0xf0) * '\x03'; } return cVar1; }
34,868
Delete_rows_log_event_old::do_after_row_operations(TABLE*, int)
eloqsql/sql/log_event_old.cc
int Delete_rows_log_event_old::do_after_row_operations(TABLE *table, int error) { /*error= ToDo:find out what this should really be, this triggers close_scan in nbd, returning error?*/ table->file->ha_index_or_rnd_end(); my_free(m_memory); // Free for multi_malloc m_memory= NULL; m_after_image= NULL; m_key= NULL; return error; }
O0
cpp
Delete_rows_log_event_old::do_after_row_operations(TABLE*, int): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x56fe60 movq -0x20(%rbp), %rax movq 0x110(%rax), %rdi callq 0xc1ae80 movq -0x20(%rbp), %rax movq $0x0, 0x110(%rax) movq $0x0, 0x108(%rax) movq $0x0, 0x100(%rax) movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN25Delete_rows_log_event_old23do_after_row_operationsEP5TABLEi: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax+8]; this call _ZN7handler19ha_index_or_rnd_endEv; handler::ha_index_or_rnd_end(void) mov rax, [rbp+var_20] mov rdi, [rax+110h] call my_free mov rax, [rbp+var_20] mov qword ptr [rax+110h], 0 mov qword ptr [rax+108h], 0 mov qword ptr [rax+100h], 0 mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long Delete_rows_log_event_old::do_after_row_operations( Delete_rows_log_event_old *this, handler **a2, unsigned int a3) { handler::ha_index_or_rnd_end(a2[1]); my_free(*((_QWORD *)this + 34)); *((_QWORD *)this + 34) = 0LL; *((_QWORD *)this + 33) = 0LL; *((_QWORD *)this + 32) = 0LL; return a3; }
value_to_item: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX POP RBP RET
/* in_vector::value_to_item(unsigned int, Item*) */ void in_vector::value_to_item(uint param_1,Item *param_2) { return; }
34,869
fill_buffer
eloqsql/storage/myisam/mi_packrec.c
static void fill_buffer(MI_BIT_BUFF *bit_buff) { if (bit_buff->pos >= bit_buff->end) { bit_buff->error= 1; bit_buff->current_byte=0; return; } #if BITS_SAVED == 64 bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) | (((uint) ((uchar) bit_buff->pos[6])) << 8) | (((uint) ((uchar) bit_buff->pos[5])) << 16) | (((uint) ((uchar) bit_buff->pos[4])) << 24) | ((ulonglong) ((((uint) ((uchar) bit_buff->pos[3]))) | (((uint) ((uchar) bit_buff->pos[2])) << 8) | (((uint) ((uchar) bit_buff->pos[1])) << 16) | (((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32)); bit_buff->pos+=8; #else #if BITS_SAVED == 32 bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) | (((uint) ((uchar) bit_buff->pos[2])) << 8) | (((uint) ((uchar) bit_buff->pos[1])) << 16) | (((uint) ((uchar) bit_buff->pos[0])) << 24)); bit_buff->pos+=4; #else bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) | (((uint) ((uchar) bit_buff->pos[0])) << 8)); bit_buff->pos+=2; #endif #endif }
O3
c
fill_buffer: movq 0x8(%rdi), %rcx cmpq 0x10(%rdi), %rcx jae 0x9d296 pushq %rbp movq %rsp, %rbp movl (%rcx), %eax bswapl %eax addq $0x4, %rcx movq %rcx, 0x8(%rdi) popq %rbp jmp 0x9d29f movl $0x1, 0x28(%rdi) xorl %eax, %eax movl %eax, (%rdi) retq
fill_buffer_0: mov rcx, [rdi+8] cmp rcx, [rdi+10h] jnb short loc_9D296 push rbp mov rbp, rsp mov eax, [rcx] bswap eax add rcx, 4 mov [rdi+8], rcx pop rbp jmp short loc_9D29F loc_9D296: mov dword ptr [rdi+28h], 1 xor eax, eax loc_9D29F: mov [rdi], eax retn
long long fill_buffer_0(long long a1) { unsigned int *v1; // rcx long long result; // rax v1 = *(unsigned int **)(a1 + 8); if ( (unsigned long long)v1 >= *(_QWORD *)(a1 + 16) ) { *(_DWORD *)(a1 + 40) = 1; result = 0LL; } else { result = _byteswap_ulong(*v1); *(_QWORD *)(a1 + 8) = v1 + 1; } *(_DWORD *)a1 = result; return result; }
fill_buffer: MOV RCX,qword ptr [RDI + 0x8] CMP RCX,qword ptr [RDI + 0x10] JNC 0x0019d296 PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RCX] BSWAP EAX ADD RCX,0x4 MOV qword ptr [RDI + 0x8],RCX POP RBP JMP 0x0019d29f LAB_0019d296: MOV dword ptr [RDI + 0x28],0x1 XOR EAX,EAX LAB_0019d29f: MOV dword ptr [RDI],EAX RET
void fill_buffer(uint *param_1) { uint *puVar1; uint uVar2; puVar1 = *(uint **)(param_1 + 2); if (puVar1 < *(uint **)(param_1 + 4)) { uVar2 = *puVar1; uVar2 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18; *(uint **)(param_1 + 2) = puVar1 + 1; } else { param_1[10] = 1; uVar2 = 0; } *param_1 = uVar2; return; }
34,870
my_coll_parser_scan_reset_sequence
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_reset_sequence(MY_COLL_RULE_PARSER *p) { my_coll_rule_reset(&p->rule); /* Scan "[before x]" option, if exists */ if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION) my_coll_parser_scan_reset_before(p); /* Try logical reset position */ if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_OPTION) { if (!my_coll_parser_scan_logical_position(p, p->rule.base, 1)) return 0; } else { /* Scan single reset character or expansion */ if (!my_coll_parser_scan_character_list(p, p->rule.base, MY_UCA_MAX_EXPANSION, "Expansion")) return 0; } return 1; }
O0
c
my_coll_parser_scan_reset_sequence: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi addq $0x50, %rdi callq 0x58000 movq -0x10(%rbp), %rdi callq 0x57500 cmpl $0x7, (%rax) jne 0x57d60 movq -0x10(%rbp), %rdi callq 0x58030 movq -0x10(%rbp), %rdi callq 0x57500 cmpl $0x7, (%rax) jne 0x57d94 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x50, %rsi movl $0x1, %edx callq 0x581a0 cmpl $0x0, %eax jne 0x57d92 movl $0x0, -0x4(%rbp) jmp 0x57dc8 jmp 0x57dc1 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x50, %rsi movl $0xa, %edx leaq 0x2ddbe(%rip), %rcx # 0x85b6a callq 0x584c0 cmpl $0x0, %eax jne 0x57dbf movl $0x0, -0x4(%rbp) jmp 0x57dc8 jmp 0x57dc1 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_scan_reset_sequence: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] add rdi, 50h ; 'P' call my_coll_rule_reset mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 7 jnz short loc_57D60 mov rdi, [rbp+var_10] call my_coll_parser_scan_reset_before loc_57D60: mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 7 jnz short loc_57D94 mov rdi, [rbp+var_10] mov rsi, [rbp+var_10] add rsi, 50h ; 'P' mov edx, 1 call my_coll_parser_scan_logical_position cmp eax, 0 jnz short loc_57D92 mov [rbp+var_4], 0 jmp short loc_57DC8 loc_57D92: jmp short loc_57DC1 loc_57D94: mov rdi, [rbp+var_10] mov rsi, [rbp+var_10] add rsi, 50h ; 'P' mov edx, 0Ah lea rcx, aExpansion; "Expansion" call my_coll_parser_scan_character_list cmp eax, 0 jnz short loc_57DBF mov [rbp+var_4], 0 jmp short loc_57DC8 loc_57DBF: jmp short $+2 loc_57DC1: mov [rbp+var_4], 1 loc_57DC8: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
_BOOL8 my_coll_parser_scan_reset_sequence(long long a1) { my_coll_rule_reset(a1 + 80); if ( *(_DWORD *)my_coll_parser_curr(a1) == 7 ) my_coll_parser_scan_reset_before(a1); if ( *(_DWORD *)my_coll_parser_curr(a1) != 7 ) return (unsigned int)my_coll_parser_scan_character_list(a1, a1 + 80, 10LL, "Expansion") != 0; return (unsigned int)my_coll_parser_scan_logical_position(a1, a1 + 80, 1LL) != 0; }
my_coll_parser_scan_reset_sequence: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x50 CALL 0x00158000 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00157500 CMP dword ptr [RAX],0x7 JNZ 0x00157d60 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00158030 LAB_00157d60: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00157500 CMP dword ptr [RAX],0x7 JNZ 0x00157d94 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x50 MOV EDX,0x1 CALL 0x001581a0 CMP EAX,0x0 JNZ 0x00157d92 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00157dc8 LAB_00157d92: JMP 0x00157dc1 LAB_00157d94: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x50 MOV EDX,0xa LEA RCX,[0x185b6a] CALL 0x001584c0 CMP EAX,0x0 JNZ 0x00157dbf MOV dword ptr [RBP + -0x4],0x0 JMP 0x00157dc8 LAB_00157dbf: JMP 0x00157dc1 LAB_00157dc1: MOV dword ptr [RBP + -0x4],0x1 LAB_00157dc8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 my_coll_parser_scan_reset_sequence(long param_1) { int iVar1; int *piVar2; my_coll_rule_reset(param_1 + 0x50); piVar2 = (int *)my_coll_parser_curr(param_1); if (*piVar2 == 7) { my_coll_parser_scan_reset_before(param_1); } piVar2 = (int *)my_coll_parser_curr(param_1); if (*piVar2 == 7) { iVar1 = my_coll_parser_scan_logical_position(param_1,param_1 + 0x50,1); if (iVar1 == 0) { return 0; } } else { iVar1 = my_coll_parser_scan_character_list(param_1,param_1 + 0x50,10,"Expansion"); if (iVar1 == 0) { return 0; } } return 1; }
34,871
js_typed_array_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_typed_array_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSTypedArray *ta = p->u.typed_array; if (ta) { /* during the GC the finalizers are called in an arbitrary order so the ArrayBuffer finalizer may have been called */ if (ta->link.next) { list_del(&ta->link); } JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_OBJECT, ta->buffer)); js_free_rt(rt, ta); } }
O2
c
js_typed_array_finalizer: pushq %r14 pushq %rbx pushq %rax movq 0x30(%rsi), %rbx testq %rbx, %rbx je 0x378e2 movq %rdi, %r14 movq 0x8(%rbx), %rax testq %rax, %rax je 0x378c1 movq (%rbx), %rcx movq %rax, 0x8(%rcx) movq %rcx, (%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq 0x18(%rbx), %rsi pushq $-0x1 popq %rdx movq %r14, %rdi callq 0x1bbe1 movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1ac7b addq $0x8, %rsp popq %rbx popq %r14 retq
js_typed_array_finalizer: push r14 push rbx push rax mov rbx, [rsi+30h] test rbx, rbx jz short loc_378E2 mov r14, rdi mov rax, [rbx+8] test rax, rax jz short loc_378C1 mov rcx, [rbx] mov [rcx+8], rax mov [rax], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 loc_378C1: mov rsi, [rbx+18h] push 0FFFFFFFFFFFFFFFFh pop rdx mov rdi, r14 call JS_FreeValueRT mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt loc_378E2: add rsp, 8 pop rbx pop r14 retn
long long js_typed_array_finalizer(long long a1, long long a2) { long long result; // rax long long v3; // rbx _QWORD *v4; // rax long long v5; // rcx v3 = *(_QWORD *)(a2 + 48); if ( v3 ) { v4 = *(_QWORD **)(v3 + 8); if ( v4 ) { v5 = *(_QWORD *)v3; *(_QWORD *)(v5 + 8) = v4; *v4 = v5; *(_OWORD *)v3 = 0LL; } JS_FreeValueRT(a1, *(unsigned int **)(v3 + 24), -1LL); return js_free_rt(a1, v3); } return result; }
js_typed_array_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV RBX,qword ptr [RSI + 0x30] TEST RBX,RBX JZ 0x001378e2 MOV R14,RDI MOV RAX,qword ptr [RBX + 0x8] TEST RAX,RAX JZ 0x001378c1 MOV RCX,qword ptr [RBX] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RAX],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_001378c1: MOV RSI,qword ptr [RBX + 0x18] PUSH -0x1 POP RDX MOV RDI,R14 CALL 0x0011bbe1 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0011ac7b LAB_001378e2: ADD RSP,0x8 POP RBX POP R14 RET
void js_typed_array_finalizer(int8 param_1,long param_2) { long *plVar1; long *plVar2; long lVar3; plVar1 = *(long **)(param_2 + 0x30); if (plVar1 != (long *)0x0) { plVar2 = (long *)plVar1[1]; if (plVar2 != (long *)0x0) { lVar3 = *plVar1; *(long **)(lVar3 + 8) = plVar2; *plVar2 = lVar3; *plVar1 = 0; plVar1[1] = 0; } JS_FreeValueRT(param_1,plVar1[3],0xffffffffffffffff); js_free_rt(param_1,plVar1); return; } return; }
34,872
ggml_compute_forward_rope
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_rope( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F16: { ggml_compute_forward_rope_f16(params, dst, true); } break; case GGML_TYPE_F32: { ggml_compute_forward_rope_f32(params, dst, true); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_rope: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x1c(%rbp) testl %eax, %eax je 0x169fc jmp 0x169de movl -0x1c(%rbp), %eax subl $0x1, %eax jne 0x16a10 jmp 0x169e8 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x1, %edx callq 0x2f8a0 jmp 0x16a2a movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x1, %edx callq 0x30aa0 jmp 0x16a2a leaq 0x5d14b(%rip), %rdi # 0x73b62 movl $0x256d, %esi # imm = 0x256D leaq 0x5d39a(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq
ggml_compute_forward_rope: push rbp mov rbp, rsp sub rsp, 20h 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_18] mov eax, [rax] mov [rbp+var_1C], eax test eax, eax jz short loc_169FC jmp short $+2 loc_169DE: mov eax, [rbp+var_1C] sub eax, 1 jnz short loc_16A10 jmp short $+2 loc_169E8: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 1 call ggml_compute_forward_rope_f16 jmp short loc_16A2A loc_169FC: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 1 call ggml_compute_forward_rope_f32 jmp short loc_16A2A loc_16A10: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 256Dh lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_16A2A: add rsp, 20h pop rbp retn
double ggml_compute_forward_rope(long long a1, long long a2) { double result; // xmm0_8 int v3; // [rsp+4h] [rbp-1Ch] v3 = **(_DWORD **)(a2 + 152); if ( v3 ) { if ( v3 == 1 ) ggml_compute_forward_rope_f16(a1, a2, 1LL); else return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 9581LL, "fatal error"); } else { ggml_compute_forward_rope_f32(a1, a2, 1LL); } return result; }
ggml_compute_forward_rope: 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 + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX TEST EAX,EAX JZ 0x001169fc JMP 0x001169de LAB_001169de: MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x1 JNZ 0x00116a10 JMP 0x001169e8 LAB_001169e8: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x1 CALL 0x0012f8a0 JMP 0x00116a2a LAB_001169fc: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x1 CALL 0x00130aa0 JMP 0x00116a2a LAB_00116a10: LEA RDI,[0x173b62] MOV ESI,0x256d LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00116a2a: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_rope(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_rope_f32(param_1,param_2,1); } else if (**(int **)(param_2 + 0x98) == 1) { ggml_compute_forward_rope_f16(param_1,param_2,1); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x256d,"fatal error"); } return; }
34,873
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x78d49 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x43bae leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3c405(%rip), %rsi # 0xb5170 leaq 0x10(%rsp), %rdi callq 0x78dcc movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x63b70 xorl %ebp, %ebp leaq 0x831b2(%rip), %rsi # 0xfbf48 leaq -0x3865f(%rip), %rdx # 0x4073e movq %rbx, %rdi callq 0x23ea0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0x78dbc jmp 0x78dc4 movq %rax, %r14 movq %rbx, %rdi callq 0x23670 movq %r14, %rdi callq 0x23f20
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_78D49 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_78D49: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_78DBC jmp short loc_78DC4 mov r14, rax loc_78DBC: mov rdi, rbx; void * call ___cxa_free_exception loc_78DC4: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, (long long)v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x00178d49 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00178d49: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x00143bae LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00178d64: LEA RSI,[0x1b5170] LEA RDI,[RSP + 0x10] CALL 0x00178dcc MOV BPL,0x1 LAB_00178d78: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x00163b70 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x14073e] MOV RDI,RBX CALL 0x00123ea0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; 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> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00178d64 to 00178d74 has its CatchHandler @ 00178db9 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 00178d78 to 00178da4 has its CatchHandler @ 00178da5 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
34,874
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0xa22c1 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1a430 movq %rax, %rbx movq %r14, %rdi callq 0x5faf2 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4ee9b(%rip), %rsi # 0xf1180 leaq 0x10(%rsp), %rdi callq 0xa2357 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x8742e xorl %ebp, %ebp leaq 0x87c48(%rip), %rsi # 0x129f58 leaq -0x465ef(%rip), %rdx # 0x5bd28 movq %rbx, %rdi callq 0x1aea0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa233d movq 0x20(%rsp), %rsi incq %rsi callq 0x1a890 testb %bpl, %bpl jne 0xa2347 jmp 0xa234f movq %rax, %r14 movq %rbx, %rdi callq 0x1a650 movq %r14, %rdi callq 0x1af20
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_A22C1 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_A22C1: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A233D mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A233D: test bpl, bpl jnz short loc_A2347 jmp short loc_A234F mov r14, rax loc_A2347: mov rdi, rbx; void * call ___cxa_free_exception loc_A234F: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x001a22c1 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001a22c1: MOV EDI,0x20 CALL 0x0011a430 MOV RBX,RAX MOV RDI,R14 CALL 0x0015faf2 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001a22de: LEA RSI,[0x1f1180] LEA RDI,[RSP + 0x10] CALL 0x001a2357 MOV BPL,0x1 LAB_001a22f2: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x0018742e XOR EBP,EBP LEA RSI,[0x229f58] LEA RDX,[0x15bd28] MOV RDI,RBX CALL 0x0011aea0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; 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> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001a22de to 001a22ee has its CatchHandler @ 001a2344 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 001a22f2 to 001a231e has its CatchHandler @ 001a231f */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
34,875
family_name[abi:cxx11](unsigned int)
msxemulator/build_O3/_deps/picotool-src/main.cpp
string family_name(unsigned int family_id) { if (family_id == DATA_FAMILY_ID) return "'" + data_family_name + "'"; if (family_id == ABSOLUTE_FAMILY_ID) return "'" + absolute_family_name + "'"; if (family_id == RP2040_FAMILY_ID) return "'" + rp2040_family_name + "'"; if (family_id == RP2350_ARM_S_FAMILY_ID) return "'" + rp2350_arm_s_family_name + "'"; if (family_id == RP2350_ARM_NS_FAMILY_ID) return "'" + rp2350_arm_ns_family_name + "'"; if (family_id == RP2350_RISCV_FAMILY_ID) return "'" + rp2350_riscv_family_name + "'"; if (!family_id) return "none"; return hex_string(family_id); }
O3
cpp
family_name[abi:cxx11](unsigned int): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx leal 0x1b7400aa(%rsi), %eax cmpl $0x5, %eax ja 0x1dc56 leaq 0x8549b(%rip), %rcx # 0xa30bc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x8a38b(%rip), %r14 # 0xa7fbc leaq 0xc7d80(%rip), %rdx # 0xe59b8 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x36e6b movq %r15, %rdi movq %r14, %rsi callq 0xf830 jmp 0x1dd69 testl %esi, %esi jne 0x1dcd4 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x86682(%rip), %rsi # 0xa42ea leaq 0x8667f(%rip), %rdx # 0xa42ee movq %rbx, %rdi callq 0x5c00c jmp 0x1ddc3 leaq 0x8a339(%rip), %r14 # 0xa7fbc leaq 0xc7d8e(%rip), %rdx # 0xe5a18 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x36e6b movq %r15, %rdi movq %r14, %rsi callq 0xf830 jmp 0x1dd69 leaq 0x8a30d(%rip), %r14 # 0xa7fbc leaq 0xc7cc2(%rip), %rdx # 0xe5978 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x36e6b movq %r15, %rdi movq %r14, %rsi callq 0xf830 jmp 0x1dd69 movl %esi, %esi movq %rbx, %rdi movl $0x8, %edx movl $0x1, %ecx xorl %r8d, %r8d callq 0x1de00 jmp 0x1ddc3 leaq 0x8a2c5(%rip), %r14 # 0xa7fbc leaq 0xc7cda(%rip), %rdx # 0xe59d8 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x36e6b movq %r15, %rdi movq %r14, %rsi callq 0xf830 jmp 0x1dd69 leaq 0x8a29c(%rip), %r14 # 0xa7fbc leaq 0xc7c71(%rip), %rdx # 0xe5998 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x36e6b movq %r15, %rdi movq %r14, %rsi callq 0xf830 jmp 0x1dd69 leaq 0x8a273(%rip), %r14 # 0xa7fbc leaq 0xc7ca8(%rip), %rdx # 0xe59f8 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x36e6b movq %r15, %rdi movq %r14, %rsi callq 0xf830 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0x1dd8b movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0x1dd91 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq 0x8(%rax), %rdx movq %rdx, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1ddc3 movq 0x10(%rsp), %rsi incq %rsi callq 0xf470 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x1ddda jmp 0x1ddda jmp 0x1ddda jmp 0x1ddda jmp 0x1ddda movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1ddf8 movq 0x10(%rsp), %rsi incq %rsi callq 0xf470 movq %rbx, %rdi callq 0xf7d0
_Z11family_nameB5cxx11j: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi lea eax, [rsi+1B7400AAh]; switch 6 cases cmp eax, 5 ja short def_1DC28; jumptable 000000000001DC28 default case lea rcx, jpt_1DC28 movsxd rax, ds:(jpt_1DC28 - 0A30BCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1DC2A: lea r14, aLastRead+0Dh; jumptable 000000000001DC28 case -460587178 lea rdx, _ZL18rp2040_family_nameB5cxx11; rp2040_family_name mov r15, rsp mov rdi, r15 mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp loc_1DD69 def_1DC28: test esi, esi; jumptable 000000000001DC28 default case jnz short loc_1DCD4 lea rax, [rbx+10h] mov [rbx], rax lea rsi, aNone; "none" lea rdx, aNone+4; "" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) jmp loc_1DDC3 loc_1DC7C: lea r14, aLastRead+0Dh; jumptable 000000000001DC28 case -460587174 lea rdx, _ZL24rp2350_riscv_family_nameB5cxx11; rp2350_riscv_family_name mov r15, rsp mov rdi, r15 mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp loc_1DD69 loc_1DCA8: lea r14, aLastRead+0Dh; jumptable 000000000001DC28 case -460587176 lea rdx, _ZL16data_family_nameB5cxx11; data_family_name mov r15, rsp mov rdi, r15 mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp loc_1DD69 loc_1DCD4: mov esi, esi mov rdi, rbx mov edx, 8 mov ecx, 1 xor r8d, r8d call _ZL10hex_stringB5cxx11libb; hex_string(long,int,bool,bool) jmp loc_1DDC3 loc_1DCF0: lea r14, aLastRead+0Dh; jumptable 000000000001DC28 case -460587175 lea rdx, _ZL24rp2350_arm_s_family_nameB5cxx11; rp2350_arm_s_family_name mov r15, rsp mov rdi, r15 mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_1DD69 loc_1DD19: lea r14, aLastRead+0Dh; jumptable 000000000001DC28 case -460587177 lea rdx, _ZL20absolute_family_nameB5cxx11; absolute_family_name mov r15, rsp mov rdi, r15 mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_1DD69 loc_1DD42: lea r14, aLastRead+0Dh; jumptable 000000000001DC28 case -460587173 lea rdx, _ZL25rp2350_arm_ns_family_nameB5cxx11; rp2350_arm_ns_family_name mov r15, rsp mov rdi, r15 mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_1DD69: lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_1DD8B mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_1DD91 loc_1DD8B: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_1DD91: mov rdx, [rax+8] mov [rbx+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rax, [rsp+38h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1DDC3 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DDC3: mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn jmp short loc_1DDDA jmp short loc_1DDDA jmp short loc_1DDDA jmp short loc_1DDDA jmp short $+2 loc_1DDDA: mov rbx, rax lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1DDF8 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DDF8: mov rdi, rbx call __Unwind_Resume
family_name[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI LEA EAX,[RSI + 0x1b7400aa] CMP EAX,0x5 JA 0x0011dc56 LEA RCX,[0x1a30bc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_e48bff56: LEA R14,[0x1a7fbc] LEA RDX,[0x1e59b8] MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL 0x00136e6b LAB_0011dc46: MOV RDI,R15 MOV RSI,R14 CALL 0x0010f830 LAB_0011dc51: JMP 0x0011dd69 default: TEST ESI,ESI JNZ 0x0011dcd4 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1a42ea] LEA RDX,[0x1a42ee] MOV RDI,RBX CALL 0x0015c00c JMP 0x0011ddc3 caseD_e48bff5a: LEA R14,[0x1a7fbc] LEA RDX,[0x1e5a18] MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL 0x00136e6b LAB_0011dc98: MOV RDI,R15 MOV RSI,R14 CALL 0x0010f830 LAB_0011dca3: JMP 0x0011dd69 caseD_e48bff58: LEA R14,[0x1a7fbc] LEA RDX,[0x1e5978] MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL 0x00136e6b LAB_0011dcc4: MOV RDI,R15 MOV RSI,R14 CALL 0x0010f830 LAB_0011dccf: JMP 0x0011dd69 LAB_0011dcd4: MOV ESI,ESI MOV RDI,RBX MOV EDX,0x8 MOV ECX,0x1 XOR R8D,R8D CALL 0x0011de00 JMP 0x0011ddc3 caseD_e48bff59: LEA R14,[0x1a7fbc] LEA RDX,[0x1e59d8] MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL 0x00136e6b LAB_0011dd0c: MOV RDI,R15 MOV RSI,R14 CALL 0x0010f830 LAB_0011dd17: JMP 0x0011dd69 caseD_e48bff57: LEA R14,[0x1a7fbc] LEA RDX,[0x1e5998] MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL 0x00136e6b LAB_0011dd35: MOV RDI,R15 MOV RSI,R14 CALL 0x0010f830 LAB_0011dd40: JMP 0x0011dd69 caseD_e48bff5b: LEA R14,[0x1a7fbc] LEA RDX,[0x1e59f8] MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL 0x00136e6b LAB_0011dd5e: MOV RDI,R15 MOV RSI,R14 CALL 0x0010f830 LAB_0011dd69: LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x0011dd8b MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x0011dd91 LAB_0011dd8b: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_0011dd91: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011ddc3 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010f470 LAB_0011ddc3: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* family_name[abi:cxx11](unsigned int) */ string * family_name_abi_cxx11_(uint param_1) { long lVar1; long *plVar2; long *plVar3; int in_ESI; int4 in_register_0000003c; string *psVar4; long *local_38 [2]; long local_28 [2]; psVar4 = (string *)CONCAT44(in_register_0000003c,param_1); switch(in_ESI) { case -0x1b7400aa: std::operator+((char *)local_38,(string *)0x1a7fbc); /* try { // try from 0011dc46 to 0011dc50 has its CatchHandler @ 0011ddd6 */ plVar2 = (long *)std::__cxx11::string::append((char *)local_38); break; case -0x1b7400a9: std::operator+((char *)local_38,(string *)0x1a7fbc); /* try { // try from 0011dd35 to 0011dd3f has its CatchHandler @ 0011ddd2 */ plVar2 = (long *)std::__cxx11::string::append((char *)local_38); break; case -0x1b7400a8: std::operator+((char *)local_38,(string *)0x1a7fbc); /* try { // try from 0011dcc4 to 0011dcce has its CatchHandler @ 0011ddd8 */ plVar2 = (long *)std::__cxx11::string::append((char *)local_38); break; case -0x1b7400a7: std::operator+((char *)local_38,(string *)0x1a7fbc); /* try { // try from 0011dd0c to 0011dd16 has its CatchHandler @ 0011ddd4 */ plVar2 = (long *)std::__cxx11::string::append((char *)local_38); break; case -0x1b7400a6: std::operator+((char *)local_38,(string *)0x1a7fbc); /* try { // try from 0011dc98 to 0011dca2 has its CatchHandler @ 0011ddda */ plVar2 = (long *)std::__cxx11::string::append((char *)local_38); break; case -0x1b7400a5: std::operator+((char *)local_38,(string *)0x1a7fbc); /* try { // try from 0011dd5e to 0011dd68 has its CatchHandler @ 0011ddd0 */ plVar2 = (long *)std::__cxx11::string::append((char *)local_38); break; default: if (in_ESI == 0) { *(string **)psVar4 = psVar4 + 0x10; std::__cxx11::string::_M_construct<char_const*>(psVar4,&DAT_001a42ea,&DAT_001a42ee); return psVar4; } hex_string_abi_cxx11_((long)psVar4,in_ESI,true,true); return psVar4; } *(string **)psVar4 = psVar4 + 0x10; plVar3 = plVar2 + 2; if ((long *)*plVar2 == plVar3) { lVar1 = plVar2[3]; *(long *)(psVar4 + 0x10) = *plVar3; *(long *)(psVar4 + 0x18) = lVar1; } else { *(long **)psVar4 = (long *)*plVar2; *(long *)(psVar4 + 0x10) = *plVar3; } *(long *)(psVar4 + 8) = plVar2[1]; *plVar2 = (long)plVar3; plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return psVar4; }
34,876
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x2c766a(%rip), %rax # 0x2ef848 movq (%rax), %r15 cmpl %edi, (%r15) je 0x282e5 movq %rsi, %r14 movl %edi, %ebx leaq 0x3467aa(%rip), %rdi # 0x36e9a0 leaq -0x382(%rip), %rsi # 0x27e7b callq 0x242e0 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x2827a leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x276ae movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x276bd movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x276d8 movq %rax, 0x90(%rdi) leaq 0x3231(%rip), %rax # 0x2b476 movq %rax, 0x98(%rdi) leaq 0x2c75ed(%rip), %rax # 0x2ef840 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x276f6 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x2830a movq %rax, %r15 jmp 0x2827d xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x282e5 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x27c3b movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0x5941e xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x2a83f movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x28305 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24380
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_282E5 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_2827A lea rdi, [rbp+var_230] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_2827D loc_2827A: xor r15d, r15d loc_2827D: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_282E5 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' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_282E5: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_28305 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_28305: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4, 35); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x3ef848] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x001282e5 MOV R14,RSI MOV EBX,EDI LEA RDI,[0x46e9a0] LEA RSI,[0x127e7b] CALL 0x001242e0 CMP EBX,0x7ff JA 0x0012827a LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x1276ae] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x1276bd] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x1276d8] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x12b476] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3ef840] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x1276f6] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012830a MOV R15,RAX JMP 0x0012827d LAB_0012827a: XOR R15D,R15D LAB_0012827d: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x001282e5 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x00127c3b MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x0015941e XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0012a83f LAB_001282e5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00128305 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_00128305: CALL 0x00124380
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
34,877
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*)
eloqsql/mysys/lf_hash.cc
static int initialize_bucket(LF_HASH *hash, LF_SLIST **node, uint bucket, LF_PINS *pins) { uint parent= my_clear_highest_bit(bucket); LF_SLIST *dummy= (LF_SLIST *)my_malloc(key_memory_lf_slist, sizeof(LF_SLIST), MYF(MY_WME)); LF_SLIST **tmp= 0, *cur; LF_SLIST **el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, parent); if (unlikely(!el || !dummy)) return -1; if (*el == NULL && bucket && unlikely(initialize_bucket(hash, el, parent, pins))) { my_free(dummy); return -1; } dummy->hashnr= my_reverse_bits(bucket) | 0; /* dummy node */ dummy->key= dummy_key; dummy->keylen= 0; if ((cur= l_insert(el, hash->charset, dummy, pins, LF_HASH_UNIQUE))) { my_free(dummy); dummy= cur; } my_atomic_casptr((void **)node, (void **)(char*) &tmp, dummy); /* note that if the CAS above failed (after l_insert() succeeded), it would mean that some other thread has executed l_insert() for the same dummy node, its l_insert() failed, it picked up our dummy node (in "dummy= cur") and executed the same CAS as above. Which means that even if CAS above failed we don't need to retry, and we should not free(dummy) - there's no memory leak here */ return 0; }
O3
cpp
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, -0x40(%rbp) movl %edx, %r12d movq %rsi, -0x30(%rbp) movq %rdi, %rbx movl %edx, %eax shrl %eax movl %edx, %ecx shrl $0x2, %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x2, %eax orl %ecx, %eax movl %eax, %ecx shrl $0x4, %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x8, %eax orl %ecx, %eax movl %eax, %r15d shrl $0x10, %r15d orl %eax, %r15d andl %edx, %r15d leaq 0xbdb78d(%rip), %rax # 0xc0b074 movl (%rax), %edi pushq $0x20 popq %rsi pushq $0x10 popq %rdx callq 0xa2a95 movq %rax, %r13 movq %rbx, -0x38(%rbp) movq %rbx, %rdi movl %r15d, %esi callq 0x2f586 pushq $-0x1 popq %r14 testq %rax, %rax je 0x2f9c6 testq %r13, %r13 je 0x2f9c6 movq %rax, %rbx testl %r12d, %r12d je 0x2f92e cmpq $0x0, (%rbx) je 0x2f9d8 movl $0xff, %eax movl %r12d, %ecx andl %eax, %ecx leaq 0xb47a1(%rip), %rdx # 0xe40e0 movzbl (%rdx,%rcx), %ecx shll $0x18, %ecx movl %r12d, %esi shrl $0x8, %esi andl %eax, %esi movzbl (%rdx,%rsi), %esi shll $0x10, %esi orl %ecx, %esi movl %r12d, %ecx shrl $0x10, %ecx andl %eax, %ecx movzbl (%rdx,%rcx), %eax shll $0x8, %eax orl %esi, %eax shrl $0x18, %r12d movzbl (%rdx,%r12), %ecx orl %eax, %ecx movl %ecx, 0x18(%r13) leaq 0xb2591(%rip), %rax # 0xe1f0f movq %rax, 0x8(%r13) andq $0x0, 0x10(%r13) movq -0x38(%rbp), %rax movq 0xa8(%rax), %rsi pushq $0x1 popq %r8 movq %rbx, %rdi movq %r13, %rdx movq -0x40(%rbp), %rcx callq 0xa8b41 testq %rax, %rax je 0x2f9b8 movq %rax, %rbx movq %r13, %rdi callq 0xa2cc2 movq %rbx, %r13 movq -0x30(%rbp), %rcx xorl %r14d, %r14d xorl %eax, %eax lock cmpxchgq %r13, (%rcx) movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x38(%rbp), %rdi movq %rbx, %rsi movl %r15d, %edx movq -0x40(%rbp), %rcx callq 0x2f894 testl %eax, %eax je 0x2f92e movq %r13, %rdi callq 0xa2cc2 jmp 0x2f9c6
_ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rcx mov r12d, edx mov [rbp+var_30], rsi mov rbx, rdi mov eax, edx shr eax, 1 mov ecx, edx shr ecx, 2 or ecx, eax mov eax, ecx shr eax, 2 or eax, ecx mov ecx, eax shr ecx, 4 or ecx, eax mov eax, ecx shr eax, 8 or eax, ecx mov r15d, eax shr r15d, 10h or r15d, eax and r15d, edx lea rax, key_memory_lf_slist mov edi, [rax] push 20h ; ' ' pop rsi push 10h pop rdx call my_malloc mov r13, rax mov [rbp+var_38], rbx mov rdi, rbx mov esi, r15d call lf_dynarray_lvalue push 0FFFFFFFFFFFFFFFFh pop r14 test rax, rax jz loc_2F9C6 test r13, r13 jz loc_2F9C6 mov rbx, rax test r12d, r12d jz short loc_2F92E cmp qword ptr [rbx], 0 jz loc_2F9D8 loc_2F92E: mov eax, 0FFh mov ecx, r12d and ecx, eax lea rdx, _my_bits_reverse_table movzx ecx, byte ptr [rdx+rcx] shl ecx, 18h mov esi, r12d shr esi, 8 and esi, eax movzx esi, byte ptr [rdx+rsi] shl esi, 10h or esi, ecx mov ecx, r12d shr ecx, 10h and ecx, eax movzx eax, byte ptr [rdx+rcx] shl eax, 8 or eax, esi shr r12d, 18h movzx ecx, byte ptr [rdx+r12] or ecx, eax mov [r13+18h], ecx lea rax, asc_E1F0B+4; "" mov [r13+8], rax and qword ptr [r13+10h], 0 mov rax, [rbp+var_38] mov rsi, [rax+0A8h] push 1 pop r8 mov rdi, rbx mov rdx, r13 mov rcx, [rbp+var_40] call _ZL8l_insertPP8LF_SLISTPK15charset_info_stS0_P7LF_PINSj; l_insert(LF_SLIST **,charset_info_st const*,LF_SLIST *,LF_PINS *,uint) test rax, rax jz short loc_2F9B8 mov rbx, rax mov rdi, r13 call my_free mov r13, rbx loc_2F9B8: mov rcx, [rbp+var_30] xor r14d, r14d xor eax, eax lock cmpxchg [rcx], r13 loc_2F9C6: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2F9D8: mov rdi, [rbp+var_38] mov rsi, rbx mov edx, r15d mov rcx, [rbp+var_40] call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *) test eax, eax jz loc_2F92E mov rdi, r13 call my_free jmp short loc_2F9C6
long long initialize_bucket(long long a1, volatile signed long long *a2, unsigned int a3, long long a4) { unsigned int v5; // ecx unsigned int v6; // r15d signed long long v7; // r13 _QWORD *v8; // rax unsigned int v9; // r14d _QWORD *v10; // rbx long long v11; // rax signed long long v12; // rbx v5 = (a3 >> 1) | (a3 >> 2) | (((a3 >> 1) | (a3 >> 2)) >> 2) | (((a3 >> 1) | (a3 >> 2) | (((a3 >> 1) | (a3 >> 2)) >> 2)) >> 4); v6 = a3 & (v5 | (v5 >> 8) | ((v5 | (v5 >> 8)) >> 16)); v7 = my_malloc(key_memory_lf_slist, 32LL, 16LL); v8 = (_QWORD *)lf_dynarray_lvalue(a1, v6); v9 = -1; if ( v8 && v7 ) { v10 = v8; if ( a3 && !*v8 && (unsigned int)initialize_bucket(a1, v8, v6, a4) ) { my_free(v7); } else { *(_DWORD *)(v7 + 24) = (my_bits_reverse_table[(unsigned __int8)a3] << 24) | (my_bits_reverse_table[BYTE1(a3)] << 16) | (my_bits_reverse_table[BYTE2(a3)] << 8) | my_bits_reverse_table[HIBYTE(a3)]; *(_QWORD *)(v7 + 8) = ""; *(_QWORD *)(v7 + 16) = 0LL; v11 = l_insert(v10, *(_QWORD *)(a1 + 168), v7, a4, 1LL); if ( v11 ) { v12 = v11; my_free(v7); v7 = v12; } v9 = 0; _InterlockedCompareExchange64(a2, v7, 0LL); } } return v9; }
initialize_bucket: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RCX MOV R12D,EDX MOV qword ptr [RBP + -0x30],RSI MOV RBX,RDI MOV EAX,EDX SHR EAX,0x1 MOV ECX,EDX SHR ECX,0x2 OR ECX,EAX MOV EAX,ECX SHR EAX,0x2 OR EAX,ECX MOV ECX,EAX SHR ECX,0x4 OR ECX,EAX MOV EAX,ECX SHR EAX,0x8 OR EAX,ECX MOV R15D,EAX SHR R15D,0x10 OR R15D,EAX AND R15D,EDX LEA RAX,[0xd0b074] MOV EDI,dword ptr [RAX] PUSH 0x20 POP RSI PUSH 0x10 POP RDX CALL 0x001a2a95 MOV R13,RAX MOV qword ptr [RBP + -0x38],RBX MOV RDI,RBX MOV ESI,R15D CALL 0x0012f586 PUSH -0x1 POP R14 TEST RAX,RAX JZ 0x0012f9c6 TEST R13,R13 JZ 0x0012f9c6 MOV RBX,RAX TEST R12D,R12D JZ 0x0012f92e CMP qword ptr [RBX],0x0 JZ 0x0012f9d8 LAB_0012f92e: MOV EAX,0xff MOV ECX,R12D AND ECX,EAX LEA RDX,[0x1e40e0] MOVZX ECX,byte ptr [RDX + RCX*0x1] SHL ECX,0x18 MOV ESI,R12D SHR ESI,0x8 AND ESI,EAX MOVZX ESI,byte ptr [RDX + RSI*0x1] SHL ESI,0x10 OR ESI,ECX MOV ECX,R12D SHR ECX,0x10 AND ECX,EAX MOVZX EAX,byte ptr [RDX + RCX*0x1] SHL EAX,0x8 OR EAX,ESI SHR R12D,0x18 MOVZX ECX,byte ptr [RDX + R12*0x1] OR ECX,EAX MOV dword ptr [R13 + 0x18],ECX LEA RAX,[0x1e1f0f] MOV qword ptr [R13 + 0x8],RAX AND qword ptr [R13 + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0xa8] PUSH 0x1 POP R8 MOV RDI,RBX MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x40] CALL 0x001a8b41 TEST RAX,RAX JZ 0x0012f9b8 MOV RBX,RAX MOV RDI,R13 CALL 0x001a2cc2 MOV R13,RBX LAB_0012f9b8: MOV RCX,qword ptr [RBP + -0x30] XOR R14D,R14D XOR EAX,EAX CMPXCHG.LOCK qword ptr [RCX],R13 LAB_0012f9c6: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012f9d8: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,RBX MOV EDX,R15D MOV RCX,qword ptr [RBP + -0x40] CALL 0x0012f894 TEST EAX,EAX JZ 0x0012f92e MOV RDI,R13 CALL 0x001a2cc2 JMP 0x0012f9c6
/* initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*) */ int4 initialize_bucket(st_lf_hash *param_1,LF_SLIST **param_2,uint param_3,LF_PINS *param_4) { int iVar1; LF_SLIST *pLVar2; LF_SLIST **ppLVar3; LF_SLIST *pLVar4; uint uVar5; int4 uVar6; uVar5 = param_3 >> 2 | param_3 >> 1; uVar5 = uVar5 >> 2 | uVar5; uVar5 = uVar5 >> 4 | uVar5; uVar5 = uVar5 >> 8 | uVar5; uVar5 = (uVar5 >> 0x10 | uVar5) & param_3; pLVar2 = (LF_SLIST *)my_malloc(key_memory_lf_slist,0x20,0x10); ppLVar3 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar5); uVar6 = 0xffffffff; if ((ppLVar3 != (LF_SLIST **)0x0) && (pLVar2 != (LF_SLIST *)0x0)) { if ((param_3 == 0) || ((*ppLVar3 != (LF_SLIST *)0x0 || (iVar1 = initialize_bucket(param_1,ppLVar3,uVar5,param_4), iVar1 == 0)))) { *(uint *)(pLVar2 + 0x18) = (uint)(byte)_my_bits_reverse_table[param_3 >> 0x18] | (uint)(byte)_my_bits_reverse_table[param_3 >> 0x10 & 0xff] << 8 | (uint)(byte)_my_bits_reverse_table[param_3 >> 8 & 0xff] << 0x10 | (uint)(byte)_my_bits_reverse_table[param_3 & 0xff] << 0x18; *(int **)(pLVar2 + 8) = &DAT_001e1f0f; *(int8 *)(pLVar2 + 0x10) = 0; pLVar4 = (LF_SLIST *)l_insert(ppLVar3,*(charset_info_st **)(param_1 + 0xa8),pLVar2,param_4,1); if (pLVar4 != (LF_SLIST *)0x0) { my_free(pLVar2); pLVar2 = pLVar4; } uVar6 = 0; LOCK(); if (*param_2 == (LF_SLIST *)0x0) { *param_2 = pLVar2; } UNLOCK(); } else { my_free(pLVar2); } } return uVar6; }
34,878
tdefl_output_buffer_putter
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser) { tdefl_output_buffer *p = (tdefl_output_buffer *)pUser; size_t new_size = p->m_size + len; if (new_size > p->m_capacity) { size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE; do { new_capacity = MZ_MAX(128U, new_capacity << 1U); } while (new_size > new_capacity); pNew_buf = (mz_uint8 *)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE; p->m_pBuf = pNew_buf; p->m_capacity = new_capacity; } memcpy((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size; return MZ_TRUE; }
O1
c
tdefl_output_buffer_putter: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r15 movslq %esi, %r14 movq (%rdx), %r13 addq %r14, %r13 movq 0x8(%rdx), %r12 cmpq %r12, %r13 jbe 0x82dfd xorl %ebp, %ebp cmpl $0x0, 0x18(%rbx) je 0x82e17 movl $0x80, %eax addq %r12, %r12 cmpq $0x81, %r12 cmovbq %rax, %r12 cmpq %r12, %r13 ja 0x82dd1 movq 0x10(%rbx), %rdi movq %r12, %rsi callq 0xaa40 testq %rax, %rax je 0x82e17 movq %rax, 0x10(%rbx) movq %r12, 0x8(%rbx) movq 0x10(%rbx), %rdi addq (%rbx), %rdi movq %r15, %rsi movq %r14, %rdx callq 0xa4c0 movq %r13, (%rbx) movl $0x1, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tdefl_output_buffer_putter: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r15, rdi movsxd r14, esi mov r13, [rdx] add r13, r14 mov r12, [rdx+8] cmp r13, r12 jbe short loc_82DFD xor ebp, ebp cmp dword ptr [rbx+18h], 0 jz short loc_82E17 mov eax, 80h loc_82DD1: add r12, r12 cmp r12, 81h cmovb r12, rax cmp r13, r12 ja short loc_82DD1 mov rdi, [rbx+10h] mov rsi, r12 call _realloc test rax, rax jz short loc_82E17 mov [rbx+10h], rax mov [rbx+8], r12 loc_82DFD: mov rdi, [rbx+10h] add rdi, [rbx] mov rsi, r15 mov rdx, r14 call _memcpy mov [rbx], r13 mov ebp, 1 loc_82E17: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long tdefl_output_buffer_putter(long long a1, int a2, long long a3) { unsigned long long v4; // r13 unsigned long long v5; // r12 unsigned int v6; // ebp long long v7; // rax v4 = a2 + *(_QWORD *)a3; v5 = *(_QWORD *)(a3 + 8); if ( v4 <= v5 ) goto LABEL_8; v6 = 0; if ( *(_DWORD *)(a3 + 24) ) { do { v5 *= 2LL; if ( v5 < 0x81 ) v5 = 128LL; } while ( v4 > v5 ); v7 = realloc(*(_QWORD *)(a3 + 16), v5); if ( v7 ) { *(_QWORD *)(a3 + 16) = v7; *(_QWORD *)(a3 + 8) = v5; LABEL_8: memcpy(*(_QWORD *)a3 + *(_QWORD *)(a3 + 16), a1, a2); *(_QWORD *)a3 = v4; return 1; } } return v6; }
34,879
tdefl_output_buffer_putter
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser) { tdefl_output_buffer *p = (tdefl_output_buffer *)pUser; size_t new_size = p->m_size + len; if (new_size > p->m_capacity) { size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE; do { new_capacity = MZ_MAX(128U, new_capacity << 1U); } while (new_size > new_capacity); pNew_buf = (mz_uint8 *)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE; p->m_pBuf = pNew_buf; p->m_capacity = new_capacity; } memcpy((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size; return MZ_TRUE; }
O2
c
tdefl_output_buffer_putter: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movq (%rdx), %rdi movq 0x8(%rdx), %r12 movslq %esi, %r15 leaq (%rdi,%r15), %r13 cmpq %r12, %r13 jbe 0x5d321 xorl %ebp, %ebp cmpl $0x0, 0x18(%rbx) je 0x5d339 movl $0x80, %eax addq %r12, %r12 cmpq $0x81, %r12 cmovbq %rax, %r12 cmpq %r12, %r13 ja 0x5d2f0 movq 0x10(%rbx), %rdi movq %r12, %rsi callq 0xaa20 testq %rax, %rax je 0x5d339 movq %rax, 0x10(%rbx) movq %r12, 0x8(%rbx) movq (%rbx), %rdi jmp 0x5d325 movq 0x10(%rbx), %rax addq %rax, %rdi movq %r14, %rsi movq %r15, %rdx callq 0xa4c0 movq %r13, (%rbx) pushq $0x1 popq %rbp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tdefl_output_buffer_putter: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rdi mov rdi, [rdx] mov r12, [rdx+8] movsxd r15, esi lea r13, [rdi+r15] cmp r13, r12 jbe short loc_5D321 xor ebp, ebp cmp dword ptr [rbx+18h], 0 jz short loc_5D339 mov eax, 80h loc_5D2F0: add r12, r12 cmp r12, 81h cmovb r12, rax cmp r13, r12 ja short loc_5D2F0 mov rdi, [rbx+10h] mov rsi, r12 call _realloc test rax, rax jz short loc_5D339 mov [rbx+10h], rax mov [rbx+8], r12 mov rdi, [rbx] jmp short loc_5D325 loc_5D321: mov rax, [rbx+10h] loc_5D325: add rdi, rax mov rsi, r14 mov rdx, r15 call _memcpy mov [rbx], r13 push 1 pop rbp loc_5D339: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long tdefl_output_buffer_putter(long long a1, int a2, unsigned long long *a3) { unsigned long long v5; // rdi unsigned long long v6; // r12 unsigned long long v7; // r13 unsigned int v8; // ebp long long v9; // rax v5 = *a3; v6 = a3[1]; v7 = *a3 + a2; if ( v7 <= v6 ) { v9 = a3[2]; goto LABEL_9; } v8 = 0; if ( *((_DWORD *)a3 + 6) ) { do { v6 *= 2LL; if ( v6 < 0x81 ) v6 = 128LL; } while ( v7 > v6 ); v9 = realloc(a3[2], v6); if ( v9 ) { a3[2] = v9; a3[1] = v6; v5 = *a3; LABEL_9: memcpy(v9 + v5, a1, a2); *a3 = v7; return 1; } } return v8; }
tdefl_output_buffer_putter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RDI MOV RDI,qword ptr [RDX] MOV R12,qword ptr [RDX + 0x8] MOVSXD R15,ESI LEA R13,[RDI + R15*0x1] CMP R13,R12 JBE 0x0015d321 XOR EBP,EBP CMP dword ptr [RBX + 0x18],0x0 JZ 0x0015d339 MOV EAX,0x80 LAB_0015d2f0: ADD R12,R12 CMP R12,0x81 CMOVC R12,RAX CMP R13,R12 JA 0x0015d2f0 MOV RDI,qword ptr [RBX + 0x10] MOV RSI,R12 CALL 0x0010aa20 TEST RAX,RAX JZ 0x0015d339 MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RBX + 0x8],R12 MOV RDI,qword ptr [RBX] JMP 0x0015d325 LAB_0015d321: MOV RAX,qword ptr [RBX + 0x10] LAB_0015d325: ADD RDI,RAX MOV RSI,R14 MOV RDX,R15 CALL 0x0010a4c0 MOV qword ptr [RBX],R13 PUSH 0x1 POP RBP LAB_0015d339: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 tdefl_output_buffer_putter(void *param_1,int param_2,ulong *param_3) { ulong uVar1; void *pvVar2; ulong uVar3; ulong __size; uVar3 = *param_3; __size = param_3[1]; uVar1 = uVar3 + (long)param_2; if (__size < uVar1) { if ((int)param_3[3] == 0) { return 0; } do { __size = __size * 2; if (__size < 0x81) { __size = 0x80; } } while (__size < uVar1); pvVar2 = realloc((void *)param_3[2],__size); if (pvVar2 == (void *)0x0) { return 0; } param_3[2] = (ulong)pvVar2; param_3[1] = __size; uVar3 = *param_3; } else { pvVar2 = (void *)param_3[2]; } memcpy((void *)(uVar3 + (long)pvVar2),param_1,(long)param_2); *param_3 = uVar1; return 1; }
34,880
ma_hashtbl_init
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool _ma_hashtbl_init(MA_HASHTBL *hash,uint size,uint key_offset,uint key_length, hash_get_key get_key, void (*free_element)(void*),uint flags CALLER_INFO_PROTO) { hash->records=0; if (ma_init_dynamic_array_ci(&hash->array,sizeof(MA_HASHTBL_LINK),size,0)) { hash->free=0; /* Allow call to hash_free */ return(TRUE); } hash->key_offset=key_offset; hash->key_length=key_length; hash->blength=1; hash->current_record= NO_RECORD; /* For the future */ hash->get_key=get_key; hash->free=free_element; hash->flags=flags; if (flags & MA_HASHTBL_CASE_INSENSITIVE) hash->calc_hashnr=calc_hashnr_caseup; else hash->calc_hashnr=calc_hashnr; return(0); }
O0
c
ma_hashtbl_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movl $0x0, 0x8(%rax) movq -0x10(%rbp), %rdi addq $0x18, %rdi movl -0x14(%rbp), %edx movl $0x10, %esi xorl %ecx, %ecx callq 0x66880 cmpb $0x0, %al je 0x68768 movq -0x10(%rbp), %rax movq $0x0, 0x38(%rax) movb $0x1, -0x1(%rbp) jmp 0x687e2 movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x10(%rbp), %rax movl $0x1, 0xc(%rax) movq -0x10(%rbp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movl 0x10(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) movl 0x10(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x687cf movq -0x10(%rbp), %rax leaq 0x27(%rip), %rcx # 0x687f0 movq %rcx, 0x40(%rax) jmp 0x687de movq -0x10(%rbp), %rax leaq 0x96(%rip), %rcx # 0x68870 movq %rcx, 0x40(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_hashtbl_init: push rbp mov rbp, rsp sub rsp, 30h mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov dword ptr [rax+8], 0 mov rdi, [rbp+var_10] add rdi, 18h mov edx, [rbp+var_14] mov esi, 10h xor ecx, ecx call ma_init_dynamic_array cmp al, 0 jz short loc_68768 mov rax, [rbp+var_10] mov qword ptr [rax+38h], 0 mov [rbp+var_1], 1 jmp short loc_687E2 loc_68768: mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], ecx mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax+4], ecx mov rax, [rbp+var_10] mov dword ptr [rax+0Ch], 1 mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0FFFFFFFFh mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+30h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+38h], rcx mov ecx, [rbp+arg_0] mov rax, [rbp+var_10] mov [rax+14h], ecx mov eax, [rbp+arg_0] and eax, 1 cmp eax, 0 jz short loc_687CF mov rax, [rbp+var_10] lea rcx, calc_hashnr_caseup mov [rax+40h], rcx jmp short loc_687DE loc_687CF: mov rax, [rbp+var_10] lea rcx, calc_hashnr mov [rax+40h], rcx loc_687DE: mov [rbp+var_1], 0 loc_687E2: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char ma_hashtbl_init(long long a1, unsigned int a2, int a3, int a4, long long a5, long long a6, int a7) { *(_DWORD *)(a1 + 8) = 0; if ( ma_init_dynamic_array(a1 + 24, 0x10u, a2, 0) ) { *(_QWORD *)(a1 + 56) = 0LL; return 1; } else { *(_DWORD *)a1 = a3; *(_DWORD *)(a1 + 4) = a4; *(_DWORD *)(a1 + 12) = 1; *(_DWORD *)(a1 + 16) = -1; *(_QWORD *)(a1 + 48) = a5; *(_QWORD *)(a1 + 56) = a6; *(_DWORD *)(a1 + 20) = a7; if ( (a7 & 1) != 0 ) *(_QWORD *)(a1 + 64) = calc_hashnr_caseup; else *(_QWORD *)(a1 + 64) = calc_hashnr; return 0; } }
_ma_hashtbl_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x8],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x18 MOV EDX,dword ptr [RBP + -0x14] MOV ESI,0x10 XOR ECX,ECX CALL 0x00166880 CMP AL,0x0 JZ 0x00168768 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001687e2 LAB_00168768: MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0xffffffff MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV ECX,dword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x1 CMP EAX,0x0 JZ 0x001687cf MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x1687f0] MOV qword ptr [RAX + 0x40],RCX JMP 0x001687de LAB_001687cf: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x168870] MOV qword ptr [RAX + 0x40],RCX LAB_001687de: MOV byte ptr [RBP + -0x1],0x0 LAB_001687e2: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 _ma_hashtbl_init(int4 *param_1,int4 param_2,int4 param_3,int4 param_4, int8 param_5,int8 param_6,uint param_7) { char cVar1; int1 local_9; param_1[2] = 0; cVar1 = ma_init_dynamic_array(param_1 + 6,0x10,param_2,0); if (cVar1 == '\0') { *param_1 = param_3; param_1[1] = param_4; param_1[3] = 1; param_1[4] = 0xffffffff; *(int8 *)(param_1 + 0xc) = param_5; *(int8 *)(param_1 + 0xe) = param_6; param_1[5] = param_7; if ((param_7 & 1) == 0) { *(code **)(param_1 + 0x10) = calc_hashnr; } else { *(code **)(param_1 + 0x10) = calc_hashnr_caseup; } local_9 = 0; } else { *(int8 *)(param_1 + 0xe) = 0; local_9 = 1; } return local_9; }
34,881
OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp
Parameterization::Parameterization(Sdc::SchemeType scheme, int faceSize) { int regFaceSize = Sdc::SchemeTypeTraits::GetRegularFaceSize(scheme); _type = (unsigned char) ((regFaceSize == 4) ? QUAD : TRI); _faceSize = (unsigned short) faceSize; _uDim = 0; if (faceSize != regFaceSize) { if ((faceSize < 3) || (faceSize > Limits::MaxFaceSize())) { // Reset size to 0 (invalid) for degenerate or excessive size _faceSize = 0; } else if (regFaceSize == 3) { // Reset size to 0 (invalid) for non-triangles of tri schemes: _faceSize = 0; } else { // Quad sub-faces -- use int sqrt for udim to preserve accuracy: _type = QUAD_SUBFACES; _uDim = (faceSize < 10) ? (unsigned char)(2 + (faceSize > 4)) : (unsigned char)(1 + (int) std::sqrt((float)(faceSize - 1))); } } }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType, int): pushq %r14 pushq %rbx pushq %rax movl %edx, %r14d movq %rdi, %rbx movl %esi, %edi callq 0x39350 cmpl $0x4, %eax setne (%rbx) movw %r14w, 0x2(%rbx) movb $0x0, 0x1(%rbx) cmpl %r14d, %eax je 0x8df4a leal -0x10000(%r14), %ecx cmpl $0xffff0002, %ecx # imm = 0xFFFF0002 jbe 0x8df19 cmpl $0x3, %eax jne 0x8df21 movw $0x0, 0x2(%rbx) jmp 0x8df4a movb $0x2, (%rbx) cmpl $0x9, %r14d ja 0x8df35 cmpl $0x5, %r14d setae %al orb $0x2, %al jmp 0x8df47 decl %r14d cvtsi2ss %r14d, %xmm0 sqrtss %xmm0, %xmm0 cvttss2si %xmm0, %eax incb %al movb %al, 0x1(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN10OpenSubdiv6v3_6_03Bfr16ParameterizationC2ENS0_3Sdc10SchemeTypeEi: push r14; Alternative name is 'OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType, int)' push rbx push rax mov r14d, edx mov rbx, rdi mov edi, esi call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType) cmp eax, 4 setnz byte ptr [rbx] mov [rbx+2], r14w mov byte ptr [rbx+1], 0 cmp eax, r14d jz short loc_8DF4A lea ecx, [r14-10000h] cmp ecx, 0FFFF0002h jbe short loc_8DF19 cmp eax, 3 jnz short loc_8DF21 loc_8DF19: mov word ptr [rbx+2], 0 jmp short loc_8DF4A loc_8DF21: mov byte ptr [rbx], 2 cmp r14d, 9 ja short loc_8DF35 cmp r14d, 5 setnb al or al, 2 jmp short loc_8DF47 loc_8DF35: dec r14d cvtsi2ss xmm0, r14d sqrtss xmm0, xmm0 cvttss2si eax, xmm0 inc al loc_8DF47: mov [rbx+1], al loc_8DF4A: add rsp, 8 pop rbx pop r14 retn
char OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization( long long a1, unsigned int a2, unsigned int a3) { int RegularFaceSize; // eax RegularFaceSize = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(a2); *(_BYTE *)a1 = RegularFaceSize != 4; *(_WORD *)(a1 + 2) = a3; *(_BYTE *)(a1 + 1) = 0; if ( RegularFaceSize != a3 ) { if ( a3 - 0x10000 <= 0xFFFF0002 || RegularFaceSize == 3 ) { *(_WORD *)(a1 + 2) = 0; } else { *(_BYTE *)a1 = 2; if ( a3 > 9 ) LOBYTE(RegularFaceSize) = (int)fsqrt((float)(int)(a3 - 1)) + 1; else LOBYTE(RegularFaceSize) = (a3 >= 5) | 2; *(_BYTE *)(a1 + 1) = RegularFaceSize; } } return RegularFaceSize; }
Parameterization: PUSH R14 PUSH RBX PUSH RAX MOV R14D,EDX MOV RBX,RDI MOV EDI,ESI CALL 0x00139350 CMP EAX,0x4 SETNZ byte ptr [RBX] MOV word ptr [RBX + 0x2],R14W MOV byte ptr [RBX + 0x1],0x0 CMP EAX,R14D JZ 0x0018df4a LEA ECX,[R14 + -0x10000] CMP ECX,0xffff0002 JBE 0x0018df19 CMP EAX,0x3 JNZ 0x0018df21 LAB_0018df19: MOV word ptr [RBX + 0x2],0x0 JMP 0x0018df4a LAB_0018df21: MOV byte ptr [RBX],0x2 CMP R14D,0x9 JA 0x0018df35 CMP R14D,0x5 SETNC AL OR AL,0x2 JMP 0x0018df47 LAB_0018df35: DEC R14D CVTSI2SS XMM0,R14D SQRTSS XMM0,XMM0 CVTTSS2SI EAX,XMM0 INC AL LAB_0018df47: MOV byte ptr [RBX + 0x1],AL LAB_0018df4a: ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization(OpenSubdiv::v3_6_0::Sdc::SchemeType, int) */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Parameterization::Parameterization (Parameterization *this,int4 param_2,uint param_3) { Parameterization PVar1; uint uVar2; uVar2 = Sdc::SchemeTypeTraits::GetRegularFaceSize(param_2); *this = (Parameterization)(uVar2 != 4); *(short *)(this + 2) = (short)param_3; this[1] = (Parameterization)0x0; if (uVar2 != param_3) { if ((param_3 - 0x10000 < 0xffff0003) || (uVar2 == 3)) { *(int2 *)(this + 2) = 0; } else { *this = (Parameterization)0x2; if (param_3 < 10) { PVar1 = (Parameterization)(4 < param_3 | 2); } else { PVar1 = (Parameterization)((char)(int)SQRT((float)(int)(param_3 - 1)) + 1); } this[1] = PVar1; } } return; }
34,882
my_thread_init_internal_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_init_internal_mutex(void) { mysql_mutex_init(key_THR_LOCK_threads, &THR_LOCK_threads, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_malloc, &THR_LOCK_malloc, MY_MUTEX_INIT_FAST); mysql_cond_init(key_THR_COND_threads, &THR_COND_threads, NULL); }
O3
c
my_thread_init_internal_mutex: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq 0x3571ec(%rip), %rax # 0x3b5e4c movl (%rax), %edi leaq 0x2d51f7(%rip), %r15 # 0x333e60 movq (%r15), %rax leaq 0x357db5(%rip), %rbx # 0x3b6a28 movq %rbx, %rsi callq *0x40(%rax) movq %rax, 0x40(%rbx) movq %rbx, 0x38(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) leaq 0x357ea1(%rip), %r14 # 0x3b6b30 movq %rbx, %rdi movq %r14, %rsi callq 0x285b0 leaq 0x357197(%rip), %rax # 0x3b5e38 movl (%rax), %edi movq (%r15), %rax leaq 0x357dc3(%rip), %rbx # 0x3b6a70 movq %rbx, %rsi callq *0x40(%rax) movq %rax, 0x40(%rbx) movq %rbx, 0x38(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x285b0 leaq 0x35719c(%rip), %rax # 0x3b5e70 movl (%rax), %edi movq (%r15), %rax leaq 0x357dd8(%rip), %rbx # 0x3b6ab8 movq %rbx, %rsi callq *0x60(%rax) movq %rax, 0x30(%rbx) movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x284a0
my_thread_init_internal_mutex: push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea rax, key_THR_LOCK_threads mov edi, [rax] lea r15, PSI_server mov rax, [r15] lea rbx, THR_LOCK_threads mov rsi, rbx call qword ptr [rax+40h] mov [rbx+40h], rax mov [rbx+38h], rbx xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 lea r14, my_fast_mutexattr mov rdi, rbx mov rsi, r14 call _pthread_mutex_init lea rax, key_THR_LOCK_malloc mov edi, [rax] mov rax, [r15] lea rbx, THR_LOCK_malloc mov rsi, rbx call qword ptr [rax+40h] mov [rbx+40h], rax mov [rbx+38h], rbx xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 mov rdi, rbx mov rsi, r14 call _pthread_mutex_init lea rax, key_THR_COND_threads mov edi, [rax] mov rax, [r15] lea rbx, THR_COND_threads mov rsi, rbx call qword ptr [rax+60h] mov [rbx+30h], rax mov rdi, rbx xor esi, esi add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_cond_init
long long my_thread_init_internal_mutex() { THR_LOCK_threads[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])( key_THR_LOCK_threads, THR_LOCK_threads); THR_LOCK_threads[7] = THR_LOCK_threads; *(_OWORD *)&THR_LOCK_threads[5] = 0LL; pthread_mutex_init(THR_LOCK_threads, &my_fast_mutexattr); THR_LOCK_malloc[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(key_THR_LOCK_malloc, THR_LOCK_malloc); THR_LOCK_malloc[7] = THR_LOCK_malloc; *(_OWORD *)&THR_LOCK_malloc[5] = 0LL; pthread_mutex_init(THR_LOCK_malloc, &my_fast_mutexattr); THR_COND_threads[6] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[12])( key_THR_COND_threads, THR_COND_threads); return pthread_cond_init(THR_COND_threads, 0LL); }
my_thread_init_internal_mutex: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA RAX,[0x4b5e4c] MOV EDI,dword ptr [RAX] LEA R15,[0x433e60] MOV RAX,qword ptr [R15] LEA RBX,[0x4b6a28] MOV RSI,RBX CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x38],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 LEA R14,[0x4b6b30] MOV RDI,RBX MOV RSI,R14 CALL 0x001285b0 LEA RAX,[0x4b5e38] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA RBX,[0x4b6a70] MOV RSI,RBX CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x38],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV RDI,RBX MOV RSI,R14 CALL 0x001285b0 LEA RAX,[0x4b5e70] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA RBX,[0x4b6ab8] MOV RSI,RBX CALL qword ptr [RAX + 0x60] MOV qword ptr [RBX + 0x30],RAX MOV RDI,RBX XOR ESI,ESI ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001284a0
void my_thread_init_internal_mutex(void) { THR_LOCK_threads._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_threads,THR_LOCK_threads); THR_LOCK_threads._56_8_ = THR_LOCK_threads; THR_LOCK_threads._40_8_ = 0; THR_LOCK_threads._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_threads,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_LOCK_malloc._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_malloc,THR_LOCK_malloc); THR_LOCK_malloc._56_8_ = THR_LOCK_malloc; THR_LOCK_malloc._40_8_ = 0; THR_LOCK_malloc._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_malloc,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_COND_threads._48_8_ = (**(code **)(PSI_server + 0x60))(key_THR_COND_threads); pthread_cond_init((pthread_cond_t *)THR_COND_threads,(pthread_condattr_t *)0x0); return; }
34,883
iq1_find_best_neighbour2
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
static int iq1_find_best_neighbour2(const uint16_t * GGML_RESTRICT neighbours, const uint64_t * GGML_RESTRICT grid, const float * GGML_RESTRICT xval, const float * GGML_RESTRICT weight, float scale, const float * GGML_RESTRICT xg, int8_t * GGML_RESTRICT L, int ngrid) { int num_neighbors = neighbours[0]; GGML_ASSERT(num_neighbors > 0); float best_score = FLT_MAX; int grid_index = -1; for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float d2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = neighbours[j]; } } if (grid_index < 0) { for (int i = 0; i < ngrid; ++i) { const int8_t * grid_i = (const int8_t *)(grid + i); float d2 = 0; for (int j = 0; j < 8; ++j) { float w = weight[j]; float q = xg[(grid_i[j] - 1)/2]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = i; } } } if (grid_index < 0) { printf("Oops, did not find grid point\n"); printf("Have %d neighbours\n", num_neighbors); for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float sumqx = 0, sumq2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; sumqx += w*q*xval[i]; sumq2 += w*q*q; } printf(" neighbour %d: sumqx = %g sumq2 = %g\n", j, (double)sumqx, (double)sumq2); } } GGML_ASSERT(grid_index >= 0); const int8_t * pg = (const int8_t *)(grid + grid_index); for (int i = 0; i < 8; ++i) L[i] = (pg[i] - 1)/2; return grid_index; }
O2
c
iq1_find_best_neighbour2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movzwl (%rdi), %eax testl %eax, %eax je 0x3df7b movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r13 movq %rax, (%rsp) leaq 0x1(%rax), %rbp movss 0x117e1(%rip), %xmm1 # 0x4f62c pushq $-0x1 popq %rcx pushq $0x1 popq %rsi movw $0x2, %di cmpq %rbp, %rsi je 0x3deba movzwl (%r13,%rsi,2), %r8d leaq (%rbx,%r8,8), %r10 xorps %xmm2, %xmm2 xorl %r11d, %r11d cmpq $0x8, %r11 je 0x3dea7 movsbl (%r10,%r11), %eax decl %eax cwtd idivw %di movswq %ax, %rax movss (%r14,%rax,4), %xmm3 mulss %xmm0, %xmm3 subss (%r12,%r11,4), %xmm3 movss (%r15,%r11,4), %xmm4 mulss %xmm3, %xmm4 mulss %xmm3, %xmm4 addss %xmm4, %xmm2 incq %r11 jmp 0x3de6a ucomiss %xmm2, %xmm1 cmoval %r8d, %ecx minss %xmm1, %xmm2 incq %rsi movaps %xmm2, %xmm1 jmp 0x3de55 testl %ecx, %ecx jns 0x3df42 pushq $-0x1 popq %rcx xorl %esi, %esi movaps 0x115d2(%rip), %xmm2 # 0x4f4a0 movw $0x2, %di movq %rbx, %r8 cmpq $0x800, %rsi # imm = 0x800 je 0x3df3e movss (%r12,%rsi,4), %xmm4 xorps %xmm2, %xmm4 xorps %xmm3, %xmm3 xorl %r10d, %r10d cmpq $0x8, %r10 je 0x3df28 movsbl (%r8,%r10), %eax decl %eax cwtd idivw %di movswq %ax, %rax movss (%r14,%rax,4), %xmm5 mulss %xmm0, %xmm5 addss %xmm4, %xmm5 movss (%r15,%r10,4), %xmm6 mulss %xmm5, %xmm6 mulss %xmm5, %xmm6 addss %xmm6, %xmm3 incq %r10 jmp 0x3deed ucomiss %xmm3, %xmm1 cmoval %esi, %ecx minss %xmm1, %xmm3 incq %rsi addq $0x8, %r8 movaps %xmm3, %xmm1 jmp 0x3ded5 testl %ecx, %ecx js 0x3df9a movl %ecx, %eax leaq (%rbx,%rax,8), %rsi xorl %edi, %edi movw $0x2, %r8w cmpq $0x8, %rdi je 0x3df6a movsbl (%rsi,%rdi), %eax decl %eax cwtd idivw %r8w movb %al, (%r9,%rdi) incq %rdi jmp 0x3df4f movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1c0d6(%rip), %rdi # 0x5a058 leaq 0xd645(%rip), %rdx # 0x4b5ce leaq 0x1c3ca(%rip), %rcx # 0x5a35a movl $0xfd6, %esi # imm = 0xFD6 jmp 0x3e053 leaq 0x1c57f(%rip), %rdi # 0x5a520 callq 0x1e3f0 leaq 0x1c4a0(%rip), %rdi # 0x5a44d movq (%rsp), %rsi xorl %eax, %eax callq 0x1c0e0 pushq $0x1 popq %rsi cmpq %rbp, %rsi je 0x3e039 movzwl (%r13,%rsi,2), %eax leaq (%rbx,%rax,8), %rcx xorps %xmm1, %xmm1 xorl %edi, %edi movw $0x2, %r8w cmpq $0x8, %rdi je 0x3e012 movsbl (%rcx,%rdi), %eax decl %eax cwtd idivw %r8w movswq %ax, %rax movss (%r14,%rax,4), %xmm0 movss (%r15,%rdi,4), %xmm2 mulss %xmm0, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss (%r12,%rdi,4), %xmm3 unpcklps %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1] mulps %xmm2, %xmm3 addps %xmm3, %xmm1 incq %rdi jmp 0x3dfd4 cvtss2sd %xmm1, %xmm0 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvtss2sd %xmm1, %xmm1 leaq 0x1c43c(%rip), %rdi # 0x5a461 movb $0x2, %al movq %rsi, (%rsp) callq 0x1c0e0 movq (%rsp), %rsi incq %rsi jmp 0x3dfbb leaq 0x1c018(%rip), %rdi # 0x5a058 leaq 0xd587(%rip), %rdx # 0x4b5ce leaq 0x1c31e(%rip), %rcx # 0x5a36c movl $0x1006, %esi # imm = 0x1006 xorl %eax, %eax callq 0x1e770
iq1_find_best_neighbour2: push rbp push r15 push r14 push r13 push r12 push rbx push rax movzx eax, word ptr [rdi] test eax, eax jz loc_3DF7B mov r14, r8 mov r15, rcx mov r12, rdx mov rbx, rsi mov r13, rdi mov [rsp+38h+var_38], rax lea rbp, [rax+1] movss xmm1, cs:dword_4F62C push 0FFFFFFFFFFFFFFFFh pop rcx push 1 pop rsi mov di, 2 loc_3DE55: cmp rsi, rbp jz short loc_3DEBA movzx r8d, word ptr [r13+rsi*2+0] lea r10, [rbx+r8*8] xorps xmm2, xmm2 xor r11d, r11d loc_3DE6A: cmp r11, 8 jz short loc_3DEA7 movsx eax, byte ptr [r10+r11] dec eax cwd idiv di movsx rax, ax movss xmm3, dword ptr [r14+rax*4] mulss xmm3, xmm0 subss xmm3, dword ptr [r12+r11*4] movss xmm4, dword ptr [r15+r11*4] mulss xmm4, xmm3 mulss xmm4, xmm3 addss xmm2, xmm4 inc r11 jmp short loc_3DE6A loc_3DEA7: ucomiss xmm1, xmm2 cmova ecx, r8d minss xmm2, xmm1 inc rsi movaps xmm1, xmm2 jmp short loc_3DE55 loc_3DEBA: test ecx, ecx jns loc_3DF42 push 0FFFFFFFFFFFFFFFFh pop rcx xor esi, esi movaps xmm2, cs:xmmword_4F4A0 mov di, 2 mov r8, rbx loc_3DED5: cmp rsi, 800h jz short loc_3DF3E movss xmm4, dword ptr [r12+rsi*4] xorps xmm4, xmm2 xorps xmm3, xmm3 xor r10d, r10d loc_3DEED: cmp r10, 8 jz short loc_3DF28 movsx eax, byte ptr [r8+r10] dec eax cwd idiv di movsx rax, ax movss xmm5, dword ptr [r14+rax*4] mulss xmm5, xmm0 addss xmm5, xmm4 movss xmm6, dword ptr [r15+r10*4] mulss xmm6, xmm5 mulss xmm6, xmm5 addss xmm3, xmm6 inc r10 jmp short loc_3DEED loc_3DF28: ucomiss xmm1, xmm3 cmova ecx, esi minss xmm3, xmm1 inc rsi add r8, 8 movaps xmm1, xmm3 jmp short loc_3DED5 loc_3DF3E: test ecx, ecx js short loc_3DF9A loc_3DF42: mov eax, ecx lea rsi, [rbx+rax*8] xor edi, edi mov r8w, 2 loc_3DF4F: cmp rdi, 8 jz short loc_3DF6A movsx eax, byte ptr [rsi+rdi] dec eax cwd idiv r8w mov [r9+rdi], al inc rdi jmp short loc_3DF4F loc_3DF6A: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3DF7B: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNumNeighbors0; "num_neighbors > 0" mov esi, 0FD6h jmp loc_3E053 loc_3DF9A: lea rdi, aOopsDidNotFind; "Oops, did not find grid point" call _puts lea rdi, aHaveDNeighbour; "Have %d neighbours\n" mov rsi, [rsp+38h+var_38] xor eax, eax call _printf push 1 pop rsi loc_3DFBB: cmp rsi, rbp jz short loc_3E039 movzx eax, word ptr [r13+rsi*2+0] lea rcx, [rbx+rax*8] xorps xmm1, xmm1 xor edi, edi mov r8w, 2 loc_3DFD4: cmp rdi, 8 jz short loc_3E012 movsx eax, byte ptr [rcx+rdi] dec eax cwd idiv r8w movsx rax, ax movss xmm0, dword ptr [r14+rax*4] movss xmm2, dword ptr [r15+rdi*4] mulss xmm2, xmm0 shufps xmm2, xmm2, 0 movss xmm3, dword ptr [r12+rdi*4] unpcklps xmm3, xmm0 mulps xmm3, xmm2 addps xmm1, xmm3 inc rdi jmp short loc_3DFD4 loc_3E012: cvtss2sd xmm0, xmm1 shufps xmm1, xmm1, 55h ; 'U' cvtss2sd xmm1, xmm1 lea rdi, aNeighbourDSumq; " neighbour %d: sumqx = %g sumq2 = %g"... mov al, 2 mov [rsp+38h+var_38], rsi call _printf mov rsi, [rsp+38h+var_38] inc rsi jmp short loc_3DFBB loc_3E039: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGridIndex0; "grid_index >= 0" mov esi, 1006h loc_3E053: xor eax, eax call _ggml_abort
long long iq1_find_best_neighbour2( _WORD *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) { char v14; // al long long v16; // r15 long long v17; // r12 long long v20; // rbp long long i; // rsi long long v22; // r10 __m128 v23; // xmm2 long long j; // r11 long long v25; // rsi long long v26; // r8 long long k; // r10 float v28; // xmm5_4 long long ii; // rdi const char *v31; // rcx int v32; // esi long long m; // rsi __m128 v34; // xmm1 long long n; // rdi __m128 v36; // xmm2 int v37; // [rsp+0h] [rbp-38h] LOBYTE(v37) = v14; if ( !*a1 ) { v31 = "num_neighbors > 0"; v32 = 4054; goto LABEL_32; } v16 = a4; v17 = a3; v37 = (unsigned __int16)*a1; v20 = (unsigned __int16)*a1 + 1LL; a8 = (__m128)0x7F7FFFFFu; LODWORD(a4) = -1; for ( i = 1LL; i != v20; ++i ) { v22 = a2 + 8LL * (unsigned __int16)a1[i]; v23 = 0LL; for ( j = 0LL; j != 8; ++j ) { LOWORD(a3) = (__int16)(*(char *)(v22 + j) - 1) % 2; a10 = (__m128)*(unsigned int *)(a5 + 4LL * ((__int16)(*(char *)(v22 + j) - 1) / 2)); a10.m128_f32[0] = (float)(a10.m128_f32[0] * a7.m128_f32[0]) - *(float *)(v17 + 4 * j); v23.m128_f32[0] = v23.m128_f32[0] + (float)((float)(*(float *)(v16 + 4 * j) * a10.m128_f32[0]) * a10.m128_f32[0]); } if ( a8.m128_f32[0] > v23.m128_f32[0] ) LODWORD(a4) = (unsigned __int16)a1[i]; v23.m128_f32[0] = fminf(v23.m128_f32[0], a8.m128_f32[0]); a8 = v23; } if ( (int)a4 < 0 ) { a4 = -1LL; v25 = 0LL; a9 = (__m128)xmmword_4F4A0; v26 = a2; while ( v25 != 2048 ) { a10 = 0LL; for ( k = 0LL; k != 8; ++k ) { LOWORD(a3) = (__int16)(*(char *)(v26 + k) - 1) % 2; v28 = (float)(*(float *)(a5 + 4LL * ((__int16)(*(char *)(v26 + k) - 1) / 2)) * a7.m128_f32[0]) - *(float *)(v17 + 4 * v25); a13 = (__m128)*(unsigned int *)(v16 + 4 * k); a13.m128_f32[0] = (float)(a13.m128_f32[0] * v28) * v28; a10.m128_f32[0] = a10.m128_f32[0] + a13.m128_f32[0]; } if ( a8.m128_f32[0] > a10.m128_f32[0] ) a4 = (unsigned int)v25; a10.m128_f32[0] = fminf(a10.m128_f32[0], a8.m128_f32[0]); ++v25; v26 += 8LL; a8 = a10; } if ( (int)a4 < 0 ) { puts( "Oops, did not find grid point", 2048LL, a3, a4, v26, *(double *)a7.m128_u64, *(double *)a8.m128_u64, COERCE_DOUBLE(0x8000000080000000LL)); printf("Have %d neighbours\n", v37); for ( m = 1LL; m != v20; ++m ) { v34 = 0LL; for ( n = 0LL; n != 8; ++n ) { a7 = (__m128)*(unsigned int *)(a5 + 4LL * ((__int16)(*(char *)(a2 + 8LL * (unsigned __int16)a1[m] + n) - 1) / 2)); v36 = (__m128)*(unsigned int *)(v16 + 4 * n); v36.m128_f32[0] = v36.m128_f32[0] * a7.m128_f32[0]; a9 = _mm_shuffle_ps(v36, v36, 0); a10 = _mm_mul_ps(_mm_unpacklo_ps((__m128)*(unsigned int *)(v17 + 4 * n), a7), a9); v34 = _mm_add_ps(v34, a10); } *(double *)a7.m128_u64 = v34.m128_f32[0]; a8 = _mm_shuffle_ps(v34, v34, 85); *(double *)a8.m128_u64 = a8.m128_f32[0]; LOBYTE(v37) = m; printf(" neighbour %d: sumqx = %g sumq2 = %g\n", m, *(double *)a7.m128_u64, *(double *)a8.m128_u64); } v31 = "grid_index >= 0"; v32 = 4102; LABEL_32: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-quants.c", v32, (long long)"GGML_ASSERT(%s) failed", (long long)v31, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v37); } } for ( ii = 0LL; ii != 8; ++ii ) *(_BYTE *)(a6 + ii) = (__int16)(*(char *)(a2 + 8LL * (unsigned int)a4 + ii) - 1) / 2; return (unsigned int)a4; }
iq1_find_best_neighbour2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOVZX EAX,word ptr [RDI] TEST EAX,EAX JZ 0x0013df7b MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBX,RSI MOV R13,RDI MOV qword ptr [RSP],RAX LEA RBP,[RAX + 0x1] MOVSS XMM1,dword ptr [0x0014f62c] PUSH -0x1 POP RCX PUSH 0x1 POP RSI MOV DI,0x2 LAB_0013de55: CMP RSI,RBP JZ 0x0013deba MOVZX R8D,word ptr [R13 + RSI*0x2] LEA R10,[RBX + R8*0x8] XORPS XMM2,XMM2 XOR R11D,R11D LAB_0013de6a: CMP R11,0x8 JZ 0x0013dea7 MOVSX EAX,byte ptr [R10 + R11*0x1] DEC EAX CWD IDIV DI MOVSX RAX,AX MOVSS XMM3,dword ptr [R14 + RAX*0x4] MULSS XMM3,XMM0 SUBSS XMM3,dword ptr [R12 + R11*0x4] MOVSS XMM4,dword ptr [R15 + R11*0x4] MULSS XMM4,XMM3 MULSS XMM4,XMM3 ADDSS XMM2,XMM4 INC R11 JMP 0x0013de6a LAB_0013dea7: UCOMISS XMM1,XMM2 CMOVA ECX,R8D MINSS XMM2,XMM1 INC RSI MOVAPS XMM1,XMM2 JMP 0x0013de55 LAB_0013deba: TEST ECX,ECX JNS 0x0013df42 PUSH -0x1 POP RCX XOR ESI,ESI MOVAPS XMM2,xmmword ptr [0x0014f4a0] MOV DI,0x2 MOV R8,RBX LAB_0013ded5: CMP RSI,0x800 JZ 0x0013df3e MOVSS XMM4,dword ptr [R12 + RSI*0x4] XORPS XMM4,XMM2 XORPS XMM3,XMM3 XOR R10D,R10D LAB_0013deed: CMP R10,0x8 JZ 0x0013df28 MOVSX EAX,byte ptr [R8 + R10*0x1] DEC EAX CWD IDIV DI MOVSX RAX,AX MOVSS XMM5,dword ptr [R14 + RAX*0x4] MULSS XMM5,XMM0 ADDSS XMM5,XMM4 MOVSS XMM6,dword ptr [R15 + R10*0x4] MULSS XMM6,XMM5 MULSS XMM6,XMM5 ADDSS XMM3,XMM6 INC R10 JMP 0x0013deed LAB_0013df28: UCOMISS XMM1,XMM3 CMOVA ECX,ESI MINSS XMM3,XMM1 INC RSI ADD R8,0x8 MOVAPS XMM1,XMM3 JMP 0x0013ded5 LAB_0013df3e: TEST ECX,ECX JS 0x0013df9a LAB_0013df42: MOV EAX,ECX LEA RSI,[RBX + RAX*0x8] XOR EDI,EDI MOV R8W,0x2 LAB_0013df4f: CMP RDI,0x8 JZ 0x0013df6a MOVSX EAX,byte ptr [RSI + RDI*0x1] DEC EAX CWD IDIV R8W MOV byte ptr [R9 + RDI*0x1],AL INC RDI JMP 0x0013df4f LAB_0013df6a: MOV EAX,ECX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013df7b: LEA RDI,[0x15a058] LEA RDX,[0x14b5ce] LEA RCX,[0x15a35a] MOV ESI,0xfd6 JMP 0x0013e053 LAB_0013df9a: LEA RDI,[0x15a520] CALL 0x0011e3f0 LEA RDI,[0x15a44d] MOV RSI,qword ptr [RSP] XOR EAX,EAX CALL 0x0011c0e0 PUSH 0x1 POP RSI LAB_0013dfbb: CMP RSI,RBP JZ 0x0013e039 MOVZX EAX,word ptr [R13 + RSI*0x2] LEA RCX,[RBX + RAX*0x8] XORPS XMM1,XMM1 XOR EDI,EDI MOV R8W,0x2 LAB_0013dfd4: CMP RDI,0x8 JZ 0x0013e012 MOVSX EAX,byte ptr [RCX + RDI*0x1] DEC EAX CWD IDIV R8W MOVSX RAX,AX MOVSS XMM0,dword ptr [R14 + RAX*0x4] MOVSS XMM2,dword ptr [R15 + RDI*0x4] MULSS XMM2,XMM0 SHUFPS XMM2,XMM2,0x0 MOVSS XMM3,dword ptr [R12 + RDI*0x4] UNPCKLPS XMM3,XMM0 MULPS XMM3,XMM2 ADDPS XMM1,XMM3 INC RDI JMP 0x0013dfd4 LAB_0013e012: CVTSS2SD XMM0,XMM1 SHUFPS XMM1,XMM1,0x55 CVTSS2SD XMM1,XMM1 LEA RDI,[0x15a461] MOV AL,0x2 MOV qword ptr [RSP],RSI CALL 0x0011c0e0 MOV RSI,qword ptr [RSP] INC RSI JMP 0x0013dfbb LAB_0013e039: LEA RDI,[0x15a058] LEA RDX,[0x14b5ce] LEA RCX,[0x15a36c] MOV ESI,0x1006 LAB_0013e053: XOR EAX,EAX CALL 0x0011e770
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong iq1_find_best_neighbour2 (float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6, long param_7) { ushort uVar1; ulong uVar2; ulong uVar3; char *pcVar4; long lVar5; int8 uVar6; long lVar7; long lVar8; float fVar9; float fVar10; float fVar11; uVar1 = *param_2; if (uVar1 == 0) { pcVar4 = "num_neighbors > 0"; uVar6 = 0xfd6; LAB_0013e053: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-quants.c", uVar6,"GGML_ASSERT(%s) failed",pcVar4); } lVar7 = (ulong)uVar1 + 1; uVar3 = 0xffffffffffffffff; fVar9 = DAT_0014f62c; for (lVar5 = 1; lVar5 != lVar7; lVar5 = lVar5 + 1) { fVar10 = 0.0; for (lVar8 = 0; lVar8 != 8; lVar8 = lVar8 + 1) { fVar11 = *(float *)(param_6 + (long)((short)(*(char *)(param_3 + (ulong)param_2[lVar5] * 8 + lVar8) + -1) / 2) * 4) * param_1 - *(float *)(param_4 + lVar8 * 4); fVar10 = fVar10 + *(float *)(param_5 + lVar8 * 4) * fVar11 * fVar11; } uVar2 = uVar3 & 0xffffffff; uVar3 = (ulong)param_2[lVar5]; if (fVar9 <= fVar10) { fVar10 = fVar9; uVar3 = uVar2; } fVar9 = fVar10; } if ((int)uVar3 < 0) { uVar3 = 0xffffffffffffffff; lVar5 = param_3; for (uVar2 = 0; uVar2 != 0x800; uVar2 = uVar2 + 1) { fVar10 = 0.0; for (lVar8 = 0; lVar8 != 8; lVar8 = lVar8 + 1) { fVar11 = *(float *)(param_6 + (long)((short)(*(char *)(lVar5 + lVar8) + -1) / 2) * 4) * param_1 + (float)(*(uint *)(param_4 + uVar2 * 4) ^ _DAT_0014f4a0); fVar10 = fVar10 + *(float *)(param_5 + lVar8 * 4) * fVar11 * fVar11; } if (fVar10 < fVar9) { uVar3 = uVar2; } uVar3 = uVar3 & 0xffffffff; if (fVar9 <= fVar10) { fVar10 = fVar9; } lVar5 = lVar5 + 8; fVar9 = fVar10; } if ((int)uVar3 < 0) { puts("Oops, did not find grid point"); printf("Have %d neighbours\n",(ulong)uVar1); for (lVar5 = 1; lVar5 != lVar7; lVar5 = lVar5 + 1) { fVar9 = 0.0; for (lVar8 = 0; lVar8 != 8; lVar8 = lVar8 + 1) { fVar9 = fVar9 + *(float *)(param_4 + lVar8 * 4) * *(float *)(param_5 + lVar8 * 4) * *(float *)(param_6 + (long)((short)(*(char *)(param_3 + (ulong)param_2[lVar5] * 8 + lVar8) + -1) / 2) * 4); } printf(" neighbour %d: sumqx = %g sumq2 = %g\n",(double)fVar9); } pcVar4 = "grid_index >= 0"; uVar6 = 0x1006; goto LAB_0013e053; } } for (lVar7 = 0; lVar7 != 8; lVar7 = lVar7 + 1) { *(char *)(param_7 + lVar7) = (char)((int)(short)(*(char *)(param_3 + (uVar3 & 0xffffffff) * 8 + lVar7) + -1) / 2); } return uVar3 & 0xffffffff; }
34,884
flux::parser::Parser::breakStatement()
kvthweatt[P]FluxLang/src/parser/parser.cpp
std::unique_ptr<Stmt> Parser::breakStatement() { auto keyword = previous_; // 'break' keyword consume(lexer::TokenType::SEMICOLON, "Expected ';' after break statement"); return std::make_unique<BreakStmt>( keyword, makeRange(keyword, previous_) ); }
O0
cpp
flux::parser::Parser::breakStatement(): pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movq %rdi, -0x130(%rbp) movq %rdi, %rax movq %rax, -0x128(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x120(%rbp) addq $0x68, %rsi leaq -0x70(%rbp), %rdi callq 0x15420 leaq 0x15447(%rip), %rsi # 0x64aca leaq -0xe0(%rbp), %rdi callq 0xd130 movq -0x120(%rbp), %rsi movq -0xe0(%rbp), %rcx movq -0xd8(%rbp), %r8 leaq -0xd0(%rbp), %rdi movl $0x58, %edx callq 0x43180 jmp 0x4f6b7 leaq -0xd0(%rbp), %rdi callq 0xa300 movq -0x120(%rbp), %rsi movq %rsi, %rcx addq $0x68, %rcx leaq -0x118(%rbp), %rdi leaq -0x70(%rbp), %rdx callq 0x43570 jmp 0x4f6e3 leaq -0xf8(%rbp), %rdi leaq -0x70(%rbp), %rsi leaq -0x118(%rbp), %rdx callq 0x5c1b0 jmp 0x4f6fc movq -0x130(%rbp), %rdi leaq -0xf8(%rbp), %rsi callq 0x1fbc0 leaq -0xf8(%rbp), %rdi callq 0x1fc10 leaq -0x70(%rbp), %rdi callq 0xa300 movq -0x128(%rbp), %rax addq $0x130, %rsp # imm = 0x130 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe8(%rbp) movl %eax, -0xec(%rbp) leaq -0x70(%rbp), %rdi callq 0xa300 movq -0xe8(%rbp), %rdi callq 0x75a0 nopl (%rax,%rax)
_ZN4flux6parser6Parser14breakStatementEv: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_130], rdi mov rax, rdi mov [rbp+var_128], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_10] mov [rbp+var_120], rsi add rsi, 68h ; 'h'; flux::lexer::Token * lea rdi, [rbp+var_70]; this call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&) lea rsi, aExpectedAfterB_1; "Expected ';' after break statement" lea rdi, [rbp+var_E0] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rsi, [rbp+var_120] mov rcx, [rbp+var_E0] mov r8, [rbp+var_D8] lea rdi, [rbp+var_D0] mov edx, 58h ; 'X' call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) jmp short $+2 loc_4F6B7: lea rdi, [rbp+var_D0]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() mov rsi, [rbp+var_120]; flux::lexer::Token * mov rcx, rsi add rcx, 68h ; 'h' lea rdi, [rbp+var_118]; this lea rdx, [rbp+var_70]; flux::lexer::Token * call _ZNK4flux6parser6Parser9makeRangeERKNS_5lexer5TokenES5_; flux::parser::Parser::makeRange(flux::lexer::Token const&,flux::lexer::Token const&) jmp short $+2 loc_4F6E3: lea rdi, [rbp+var_F8] lea rsi, [rbp+var_70] lea rdx, [rbp+var_118] call _ZSt11make_uniqueIN4flux6parser9BreakStmtEJRNS0_5lexer5TokenENS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::BreakStmt,flux::lexer::Token &,flux::common::SourceRange>(flux::lexer::Token &,flux::common::SourceRange &&) jmp short $+2 loc_4F6FC: mov rdi, [rbp+var_130] lea rsi, [rbp+var_F8] call _ZNSt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS2_EEC2INS1_9BreakStmtES3_IS7_EvEEOS_IT_T0_E; std::unique_ptr<flux::parser::Stmt>::unique_ptr<flux::parser::BreakStmt,std::default_delete<flux::parser::BreakStmt>,void>(std::unique_ptr&&<flux::parser::BreakStmt,std::default_delete<flux::parser::BreakStmt>>) lea rdi, [rbp+var_F8] call _ZNSt10unique_ptrIN4flux6parser9BreakStmtESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::BreakStmt>::~unique_ptr() lea rdi, [rbp+var_70]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() mov rax, [rbp+var_128] add rsp, 130h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_E8], rcx mov [rbp+var_EC], eax lea rdi, [rbp+var_70]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() mov rdi, [rbp+var_E8] call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::breakStatement(flux::parser::Parser *this, _BYTE *a2) { _BYTE v3[32]; // [rsp+18h] [rbp-118h] BYREF _BYTE v4[12]; // [rsp+38h] [rbp-F8h] BYREF long long v5[2]; // [rsp+50h] [rbp-E0h] BYREF _BYTE v6[96]; // [rsp+60h] [rbp-D0h] BYREF _BYTE v7[96]; // [rsp+C0h] [rbp-70h] BYREF _BYTE *v8; // [rsp+120h] [rbp-10h] flux::parser::Parser *v9; // [rsp+128h] [rbp-8h] v9 = this; v8 = a2; flux::lexer::Token::Token((flux::lexer::Token *)v7, (const flux::lexer::Token *)(a2 + 104)); std::string_view::basic_string_view(v5, (long long)"Expected ';' after break statement"); flux::parser::Parser::consume((flux::parser::Parser *)v6, a2, 88, v5[0], v5[1]); flux::lexer::Token::~Token((flux::lexer::Token *)v6); flux::parser::Parser::makeRange( (flux::parser::Parser *)v3, (const flux::lexer::Token *)a2, (const flux::lexer::Token *)v7, (flux::lexer::Token *)(a2 + 104)); std::make_unique<flux::parser::BreakStmt,flux::lexer::Token &,flux::common::SourceRange>(v4, v7, v3); std::unique_ptr<flux::parser::Stmt>::unique_ptr<flux::parser::BreakStmt,std::default_delete<flux::parser::BreakStmt>,void>( (long long)this, (long long)v4); std::unique_ptr<flux::parser::BreakStmt>::~unique_ptr((long long)v4); flux::lexer::Token::~Token((flux::lexer::Token *)v7); return this; }
breakStatement: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV qword ptr [RBP + -0x130],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x128],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x120],RSI ADD RSI,0x68 LEA RDI,[RBP + -0x70] CALL 0x00115420 LEA RSI,[0x164aca] LEA RDI,[RBP + -0xe0] CALL 0x0010d130 MOV RSI,qword ptr [RBP + -0x120] MOV RCX,qword ptr [RBP + -0xe0] MOV R8,qword ptr [RBP + -0xd8] LAB_0014f6a4: LEA RDI,[RBP + -0xd0] MOV EDX,0x58 CALL 0x00143180 JMP 0x0014f6b7 LAB_0014f6b7: LEA RDI,[RBP + -0xd0] CALL 0x0010a300 MOV RSI,qword ptr [RBP + -0x120] MOV RCX,RSI ADD RCX,0x68 LEA RDI,[RBP + -0x118] LEA RDX,[RBP + -0x70] CALL 0x00143570 JMP 0x0014f6e3 LAB_0014f6e3: LEA RDI,[RBP + -0xf8] LEA RSI,[RBP + -0x70] LEA RDX,[RBP + -0x118] CALL 0x0015c1b0 LAB_0014f6fa: JMP 0x0014f6fc LAB_0014f6fc: MOV RDI,qword ptr [RBP + -0x130] LEA RSI,[RBP + -0xf8] CALL 0x0011fbc0 LEA RDI,[RBP + -0xf8] CALL 0x0011fc10 LEA RDI,[RBP + -0x70] CALL 0x0010a300 MOV RAX,qword ptr [RBP + -0x128] ADD RSP,0x130 POP RBP RET
/* flux::parser::Parser::breakStatement() */ unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>> * flux::parser::Parser::breakStatement(void) { Token *in_RSI; unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>> *in_RDI; Token local_120 [32]; Token local_100 [24]; int8 local_e8; int8 local_e0; Token local_d8 [96]; Token local_78 [112]; lexer::Token::Token(local_78,in_RSI + 0x68); std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_e8, "Expected \';\' after break statement"); /* try { // try from 0014f6a4 to 0014f6f9 has its CatchHandler @ 0014f734 */ consume(local_d8,in_RSI,0x58,local_e8,local_e0); lexer::Token::~Token(local_d8); makeRange(local_120,in_RSI); std::make_unique<flux::parser::BreakStmt,flux::lexer::Token&,flux::common::SourceRange> (local_100,(SourceRange *)local_78); std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>:: unique_ptr<flux::parser::BreakStmt,std::default_delete<flux::parser::BreakStmt>,void> (in_RDI,(unique_ptr *)local_100); std::unique_ptr<flux::parser::BreakStmt,std::default_delete<flux::parser::BreakStmt>>::~unique_ptr ((unique_ptr<flux::parser::BreakStmt,std::default_delete<flux::parser::BreakStmt>> *) local_100); lexer::Token::~Token(local_78); return in_RDI; }
34,885
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
SetNode(const Location & location, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v) : TemplateNode(location), ns(ns), var_names(vns), value(std::move(v)) {}
O3
cpp
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdi, %rbx leaq 0x8c267(%rip), %r13 # 0x129fd8 addq $0x10, %r13 movq %r13, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x9dda1 movq 0x8d1f5(%rip), %rcx # 0x12af88 cmpb $0x0, (%rcx) je 0x9dd9d incl 0x8(%rax) jmp 0x9dda1 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x8c598(%rip), %rax # 0x12a348 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %r12 leaq 0x30(%rbx), %rbp movq %rbp, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x219f6 leaq 0x40(%rbx), %rdi movq %r15, %rsi callq 0x544dc xorl %eax, %eax movq %rax, 0x60(%rbx) movups (%r14), %xmm0 movq %rax, 0x8(%r14) movups %xmm0, 0x58(%rbx) movq %rax, (%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r12), %rdi cmpq %rbp, %rdi je 0x9de22 movq (%rbp), %rsi incq %rsi callq 0x1a8c0 jmp 0x9de22 movq %rax, %r14 movq %r13, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x9de33 callq 0x6d25e movq %r14, %rdi callq 0x1af80 nop
_ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov rbx, rdi lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add r13, 10h mov [rdi], r13 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_9DDA1 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_9DD9D inc dword ptr [rax+8] jmp short loc_9DDA1 loc_9DD9D: lock inc dword ptr [rax+8] loc_9DDA1: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode add rax, 10h mov [rbx], rax lea r12, [rbx+20h] lea rbp, [rbx+30h] mov [rbx+20h], rbp mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rbx+40h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) xor eax, eax mov [rbx+60h], rax movups xmm0, xmmword ptr [r14] mov [r14+8], rax movups xmmword ptr [rbx+58h], xmm0 mov [r14], rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r12]; void * cmp rdi, rbp jz short loc_9DE22 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9DE22 mov r14, rax loc_9DE22: mov [rbx], r13 mov rdi, [rbx+10h] test rdi, rdi jz short loc_9DE33 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9DE33: mov rdi, r14 call __Unwind_Resume
long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5) { long long v7; // rax long long result; // rax __int128 v9; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v7 = a2[1]; *(_QWORD *)(a1 + 16) = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v7 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v7 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::SetNode + 2; *(_QWORD *)(a1 + 32) = a1 + 48; std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); std::vector<std::string>::vector(a1 + 64, a4); result = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v9 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v9; *(_QWORD *)a5 = 0LL; return result; }
SetNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV RBX,RDI LEA R13,[0x229fd8] ADD R13,0x10 MOV qword ptr [RDI],R13 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x0019dda1 MOV RCX,qword ptr [0x0022af88] CMP byte ptr [RCX],0x0 JZ 0x0019dd9d INC dword ptr [RAX + 0x8] JMP 0x0019dda1 LAB_0019dd9d: INC.LOCK dword ptr [RAX + 0x8] LAB_0019dda1: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x22a348] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA R12,[RBX + 0x20] LEA RBP,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RBP MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_0019ddcd: MOV RDI,R12 CALL 0x001219f6 LEA RDI,[RBX + 0x40] LAB_0019ddd9: MOV RSI,R15 CALL 0x001544dc LAB_0019dde1: XOR EAX,EAX MOV qword ptr [RBX + 0x60],RAX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV qword ptr [R14],RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SetNode::SetNode (SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_00229fe8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0022af88 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_0022a358; *(SetNode **)(this + 0x20) = this + 0x30; /* try { // try from 0019ddcd to 0019ddd4 has its CatchHandler @ 0019de1f */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); /* try { // try from 0019ddd9 to 0019dde0 has its CatchHandler @ 0019de05 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), param_3); *(int8 *)(this + 0x60) = 0; uVar2 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x58) = *(int8 *)param_4; *(int8 *)(this + 0x60) = uVar2; *(int8 *)param_4 = 0; return; }
34,886
mysql_stmt_send_long_data
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, unsigned long length) { CLEAR_CLIENT_ERROR(stmt->mysql); CLEAR_CLIENT_STMT_ERROR(stmt); if (stmt->state < MYSQL_STMT_PREPARED || !stmt->params) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); return(1); } if (param_number >= stmt->param_count) { SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); return(1); } if (length || !stmt->params[param_number].long_data_used) { int ret; size_t packet_len= STMT_ID_LENGTH + 2 + length; uchar *cmd_buff= (uchar *)calloc(1, packet_len); int4store(cmd_buff, stmt->stmt_id); int2store(cmd_buff + STMT_ID_LENGTH, param_number); memcpy(cmd_buff + STMT_ID_LENGTH + 2, data, length); stmt->params[param_number].long_data_used= 1; ret= stmt->mysql->methods->db_command(stmt->mysql, COM_STMT_SEND_LONG_DATA, (char *)cmd_buff, packet_len, 1, stmt); if (ret) UPDATE_STMT_ERROR(stmt); free(cmd_buff); return(ret); } return(0); }
O0
c
mysql_stmt_send_long_data: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x90(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x23f20(%rip), %rsi # 0x6abaf callq 0x143d0 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x97(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, 0x2a0(%rax) je 0x46ccb movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0x46ccd jmp 0x46ccf movq -0x10(%rbp), %rax movl $0x0, 0x108(%rax) movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x23ec0(%rip), %rsi # 0x6abaf callq 0x143d0 movq -0x10(%rbp), %rax movb $0x0, 0x10c(%rax) movq -0x10(%rbp), %rax cmpl $0x1, 0x50(%rax) jb 0x46d14 movq -0x10(%rbp), %rax cmpq $0x0, 0x70(%rax) jne 0x46d85 jmp 0x46d16 movq -0x10(%rbp), %rax movl $0x7ee, 0x108(%rax) # imm = 0x7EE movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x3a16a(%rip), %rax # 0x80ea0 movq (%rax), %rsi movl $0x5, %edx callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x3a150(%rip), %rax # 0x80eb0 movq 0xf0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x46ffe movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x64(%rcx), %eax jb 0x46e02 jmp 0x46d93 movq -0x10(%rbp), %rax movl $0x7f2, 0x108(%rax) # imm = 0x7F2 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x3a0ed(%rip), %rax # 0x80ea0 movq (%rax), %rsi movl $0x5, %edx callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x3a0d3(%rip), %rax # 0x80eb0 movq 0x110(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x46ffe cmpq $0x0, -0x28(%rbp) jne 0x46e25 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax cmpb $0x0, 0x66(%rax) jne 0x46ffa movq -0x28(%rbp), %rax addq $0x6, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rsi movl $0x1, %edi callq 0x142d0 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movb %al, %cl movq -0x40(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, %cl movq -0x40(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, %cl movq -0x40(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, %cl movq -0x40(%rbp), %rax movb %cl, 0x3(%rax) jmp 0x46e94 movl -0x14(%rbp), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax movb %al, %cl movq -0x40(%rbp), %rax movb %cl, 0x4(%rax) movl -0x44(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x40(%rbp), %rax movb %cl, 0x5(%rax) movq -0x40(%rbp), %rdi addq $0x4, %rdi addq $0x2, %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x14370 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movb $0x1, 0x66(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq 0x38(%rcx), %rdi movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rcx movq -0x10(%rbp), %r9 movl $0x18, %esi movl $0x1, %r8d callq *%rax movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x46fe9 jmp 0x46f27 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x10(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x46fa4 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x58(%rbp) jmp 0x46fca movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x39eee(%rip), %rax # 0x80eb0 movq (%rax,%rcx,8), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rdi movq -0x58(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) jmp 0x46fe9 movq -0x40(%rbp), %rdi callq 0x14530 movl -0x2c(%rbp), %eax movb %al, -0x1(%rbp) jmp 0x46ffe movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_send_long_data: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+90h], 0 mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 297h lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_10] mov rax, [rax+38h] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_10] mov rax, [rax+38h] cmp qword ptr [rax+2A0h], 0 jz short loc_46CCB mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_46CCB: jmp short $+2 loc_46CCD: jmp short $+2 loc_46CCF: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 0 mov rdi, [rbp+var_10] add rdi, 30Dh lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_10] mov byte ptr [rax+10Ch], 0 mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 1 jb short loc_46D14 mov rax, [rbp+var_10] cmp qword ptr [rax+70h], 0 jnz short loc_46D85 loc_46D14: jmp short $+2 loc_46D16: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7EEh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+0F0h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp loc_46FFE loc_46D85: mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+64h] jb short loc_46E02 jmp short $+2 loc_46D93: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7F2h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+110h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp loc_46FFE loc_46E02: cmp [rbp+var_28], 0 jnz short loc_46E25 mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx cmp byte ptr [rax+66h], 0 jnz loc_46FFA loc_46E25: mov rax, [rbp+var_28] add rax, 6 mov [rbp+var_38], rax mov rsi, [rbp+var_38] mov edi, 1 call _calloc mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov cl, al mov rax, [rbp+var_40] mov [rax], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 8 mov cl, al mov rax, [rbp+var_40] mov [rax+1], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 10h mov cl, al mov rax, [rbp+var_40] mov [rax+2], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 18h mov cl, al mov rax, [rbp+var_40] mov [rax+3], cl jmp short $+2 loc_46E94: mov eax, [rbp+var_14] mov [rbp+var_44], eax mov eax, [rbp+var_44] mov cl, al mov rax, [rbp+var_40] mov [rax+4], cl mov eax, [rbp+var_44] shr eax, 8 mov cl, al mov rax, [rbp+var_40] mov [rax+5], cl mov rdi, [rbp+var_40] add rdi, 4 add rdi, 2 mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call _memcpy mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov byte ptr [rax+66h], 1 mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rdi, [rcx+38h] mov rdx, [rbp+var_40] mov rcx, [rbp+var_38] mov r9, [rbp+var_10] mov esi, 18h mov r8d, 1 call rax mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz loc_46FE9 jmp short $+2 loc_46F27: mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_10] mov [rax+108h], ecx mov rdi, [rbp+var_10] add rdi, 30Dh mov rax, [rbp+var_10] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_10] add rax, 10Ch mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_46FA4 mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h mov [rbp+var_58], rax jmp short loc_46FCA loc_46FA4: mov rax, [rbp+var_10] mov rax, [rax+38h] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_58], rax loc_46FCA: mov rdi, [rbp+var_50] mov rsi, [rbp+var_58] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 jmp short $+2 loc_46FE9: mov rdi, [rbp+var_40] call _free mov eax, [rbp+var_2C] mov [rbp+var_1], al jmp short loc_46FFE loc_46FFA: mov [rbp+var_1], 0 loc_46FFE: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char mysql_stmt_send_long_data(long long a1, unsigned int a2, long long a3, long long a4) { char *v4; // rax long long v6; // [rsp+20h] [rbp-40h] int v7; // [rsp+34h] [rbp-2Ch] *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0; strcpy(*(_QWORD *)(a1 + 56) + 663LL, "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) ) *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) + 4LL) = 0; *(_DWORD *)(a1 + 264) = 0; strcpy(a1 + 781, "00000"); *(_BYTE *)(a1 + 268) = 0; if ( *(_DWORD *)(a1 + 80) && *(_QWORD *)(a1 + 112) ) { if ( a2 < *(_DWORD *)(a1 + 100) ) { if ( !a4 && *(_BYTE *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 102) ) { return 0; } else { v6 = calloc(1LL, a4 + 6); *(_WORD *)v6 = *(_QWORD *)(a1 + 64); *(_BYTE *)(v6 + 2) = BYTE2(*(_QWORD *)(a1 + 64)); *(_BYTE *)(v6 + 3) = BYTE3(*(_QWORD *)(a1 + 64)); *(_WORD *)(v6 + 4) = a2; memcpy(v6 + 6, a3, a4); *(_BYTE *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 102) = 1; v7 = (*(long long ( **)(_QWORD, long long, long long, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 16LL))( *(_QWORD *)(a1 + 56), 24LL, v6, a4 + 6, 1LL, a1); if ( v7 ) { *(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL); strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL); *(_BYTE *)(a1 + 786) = 0; if ( *(_QWORD *)(a1 + 56) == -151LL ) v4 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v4 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v4, 512LL); *(_BYTE *)(a1 + 779) = 0; } free(v6); return v7; } } else { *(_DWORD *)(a1 + 264) = 2034; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[34], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } } else { *(_DWORD *)(a1 + 264) = 2030; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[30], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } }
mysql_stmt_send_long_data: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RSI,[0x16abaf] CALL 0x001143d0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x00146ccb MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_00146ccb: JMP 0x00146ccd LAB_00146ccd: JMP 0x00146ccf LAB_00146ccf: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RSI,[0x16abaf] CALL 0x001143d0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x10c],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x1 JC 0x00146d14 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x70],0x0 JNZ 0x00146d85 LAB_00146d14: JMP 0x00146d16 LAB_00146d16: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7ee MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x180ea0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x180eb0] MOV RSI,qword ptr [RAX + 0xf0] MOV EDX,0x200 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146ffe LAB_00146d85: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x64] JC 0x00146e02 JMP 0x00146d93 LAB_00146d93: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7f2 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x180ea0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x180eb0] MOV RSI,qword ptr [RAX + 0x110] MOV EDX,0x200 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146ffe LAB_00146e02: CMP qword ptr [RBP + -0x28],0x0 JNZ 0x00146e25 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX CMP byte ptr [RAX + 0x66],0x0 JNZ 0x00146ffa LAB_00146e25: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x6 MOV qword ptr [RBP + -0x38],RAX MOV RSI,qword ptr [RBP + -0x38] MOV EDI,0x1 CALL 0x001142d0 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x3],CL JMP 0x00146e94 LAB_00146e94: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] MOV CL,AL MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x4],CL MOV EAX,dword ptr [RBP + -0x44] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x5],CL MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0x4 ADD RDI,0x2 MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00114370 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV byte ptr [RAX + 0x66],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x38] MOV RDX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x10] MOV ESI,0x18 MOV R8D,0x1 CALL RAX MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x00146fe9 JMP 0x00146f27 LAB_00146f27: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10c MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x00146fa4 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x58],RAX JMP 0x00146fca LAB_00146fa4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x180eb0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x58],RAX LAB_00146fca: MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x58] MOV EDX,0x200 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 JMP 0x00146fe9 LAB_00146fe9: MOV RDI,qword ptr [RBP + -0x40] CALL 0x00114530 MOV EAX,dword ptr [RBP + -0x2c] MOV byte ptr [RBP + -0x1],AL JMP 0x00146ffe LAB_00146ffa: MOV byte ptr [RBP + -0x1],0x0 LAB_00146ffe: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 mysql_stmt_send_long_data(long param_1,uint param_2,void *param_3,size_t param_4) { int iVar1; int1 *__ptr; char *local_60; int1 local_9; *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0; strcpy((char *)(*(long *)(param_1 + 0x38) + 0x297),"00000"); *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; if (*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) != 0) { *(int4 *)(*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) + 4) = 0; } *(int4 *)(param_1 + 0x108) = 0; strcpy((char *)(param_1 + 0x30d),"00000"); *(int1 *)(param_1 + 0x10c) = 0; if ((*(int *)(param_1 + 0x50) == 0) || (*(long *)(param_1 + 0x70) == 0)) { *(int4 *)(param_1 + 0x108) = 0x7ee; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Statement_is_not_prepared_00180fa0,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_9 = 1; } else if (param_2 < *(uint *)(param_1 + 100)) { if ((param_4 == 0) && (*(char *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x66) != '\0')) { local_9 = 0; } else { __ptr = (int1 *)calloc(1,param_4 + 6); *__ptr = (char)*(int8 *)(param_1 + 0x40); __ptr[1] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 8); __ptr[2] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); __ptr[3] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); __ptr[4] = (char)param_2; __ptr[5] = (char)(param_2 >> 8); memcpy(__ptr + 6,param_3,param_4); *(int1 *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x66) = 1; iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10)) (*(int8 *)(param_1 + 0x38),0x18,__ptr,param_4 + 6,1,param_1); if (iVar1 != 0) { *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; if (*(long *)(param_1 + 0x38) == -0x97) { local_60 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_60 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_60,0x200); *(int1 *)(param_1 + 0x30b) = 0; } free(__ptr); local_9 = (int1)iVar1; } } else { *(int4 *)(param_1 + 0x108) = 0x7f2; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Invalid_parameter_number_00180fc0,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_9 = 1; } return local_9; }
34,887
serial_cpp::Serial::SerialImpl::setRTS(bool)
ami-iit[P]serial_cpp/src/impl/unix.cc
void Serial::SerialImpl::setRTS (bool level) { if (is_open_ == false) { throw PortNotOpenedException ("Serial::setRTS"); } int command = TIOCM_RTS; if (level) { if (-1 == ioctl (fd_, TIOCMBIS, &command)) { stringstream ss; ss << "setRTS failed on a call to ioctl(TIOCMBIS): " << errno << " " << strerror(errno); throw(SerialException(ss.str().c_str())); } } else { if (-1 == ioctl (fd_, TIOCMBIC, &command)) { stringstream ss; ss << "setRTS failed on a call to ioctl(TIOCMBIC): " << errno << " " << strerror(errno); throw(SerialException(ss.str().c_str())); } } }
O0
cpp
serial_cpp::Serial::SerialImpl::setRTS(bool): pushq %rbp movq %rsp, %rbp subq $0x3d0, %rsp # imm = 0x3D0 movb %sil, %al movq %rdi, -0x8(%rbp) andb $0x1, %al movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x388(%rbp) movb 0x2c(%rax), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax jne 0xb21b movl $0x28, %edi callq 0x31a0 movq %rax, %rdi movq %rdi, %rax movq %rax, -0x390(%rbp) leaq 0x54a3(%rip), %rsi # 0x10680 callq 0xcca0 jmp 0xb1e4 movq -0x390(%rbp), %rdi leaq 0xbb0e(%rip), %rsi # 0x16d00 leaq 0x1be7(%rip), %rdx # 0xcde0 callq 0x35b0 movq -0x390(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) callq 0x3240 jmp 0xb51e movl $0x4, -0x20(%rbp) testb $0x1, -0x9(%rbp) je 0xb3a5 movq -0x388(%rbp), %rax movl 0x28(%rax), %edi movl $0x5416, %esi # imm = 0x5416 leaq -0x20(%rbp), %rdx movb $0x0, %al callq 0x34c0 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %ecx, %eax jne 0xb3a0 leaq -0x1a8(%rbp), %rdi callq 0x3220 leaq -0x198(%rbp), %rdi leaq 0x5420(%rip), %rsi # 0x1068f callq 0x3310 movq %rax, -0x398(%rbp) jmp 0xb27d callq 0x3050 movq -0x398(%rbp), %rdi movl (%rax), %esi callq 0x35c0 movq %rax, -0x3a0(%rbp) jmp 0xb299 movq -0x3a0(%rbp), %rdi leaq 0x54a9(%rip), %rsi # 0x10750 callq 0x3310 movq %rax, -0x3a8(%rbp) jmp 0xb2b5 callq 0x3050 movl (%rax), %edi callq 0x3100 movq -0x3a8(%rbp), %rdi movq %rax, %rsi callq 0x3310 jmp 0xb2d2 movb $0x1, -0x1c9(%rbp) movl $0x28, %edi callq 0x31a0 movq %rax, -0x3b0(%rbp) leaq -0x1c8(%rbp), %rdi leaq -0x1a8(%rbp), %rsi callq 0x3300 jmp 0xb2ff leaq -0x1c8(%rbp), %rdi callq 0x3150 movq -0x3b0(%rbp), %rdi movq %rax, %rsi callq 0xc680 jmp 0xb31c movq -0x3b0(%rbp), %rdi movb $0x0, -0x1c9(%rbp) leaq 0xb99f(%rip), %rsi # 0x16cd0 leaq 0x1488(%rip), %rdx # 0xc7c0 callq 0x35b0 jmp 0xb527 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0xb38f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0xb376 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) leaq -0x1c8(%rbp), %rdi callq 0x31e0 testb $0x1, -0x1c9(%rbp) jne 0xb381 jmp 0xb38d movq -0x3b0(%rbp), %rdi callq 0x3240 jmp 0xb38f leaq -0x1a8(%rbp), %rdi callq 0x3260 jmp 0xb51e jmp 0xb515 movq -0x388(%rbp), %rax movl 0x28(%rax), %edi movl $0x5417, %esi # imm = 0x5417 leaq -0x20(%rbp), %rdx movb $0x0, %al callq 0x34c0 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %ecx, %eax jne 0xb513 leaq -0x358(%rbp), %rdi callq 0x3220 leaq -0x348(%rbp), %rdi leaq 0x52d4(%rip), %rsi # 0x106bc callq 0x3310 movq %rax, -0x3b8(%rbp) jmp 0xb3f6 callq 0x3050 movq -0x3b8(%rbp), %rdi movl (%rax), %esi callq 0x35c0 movq %rax, -0x3c0(%rbp) jmp 0xb412 movq -0x3c0(%rbp), %rdi leaq 0x5330(%rip), %rsi # 0x10750 callq 0x3310 movq %rax, -0x3c8(%rbp) jmp 0xb42e callq 0x3050 movl (%rax), %edi callq 0x3100 movq -0x3c8(%rbp), %rdi movq %rax, %rsi callq 0x3310 jmp 0xb44b movb $0x1, -0x379(%rbp) movl $0x28, %edi callq 0x31a0 movq %rax, -0x3d0(%rbp) leaq -0x378(%rbp), %rdi leaq -0x358(%rbp), %rsi callq 0x3300 jmp 0xb478 leaq -0x378(%rbp), %rdi callq 0x3150 movq -0x3d0(%rbp), %rdi movq %rax, %rsi callq 0xc680 jmp 0xb495 movq -0x3d0(%rbp), %rdi movb $0x0, -0x379(%rbp) leaq 0xb826(%rip), %rsi # 0x16cd0 leaq 0x130f(%rip), %rdx # 0xc7c0 callq 0x35b0 jmp 0xb527 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0xb505 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) jmp 0xb4ec movq %rax, %rcx movl %edx, %eax movq %rcx, -0x18(%rbp) movl %eax, -0x1c(%rbp) leaq -0x378(%rbp), %rdi callq 0x31e0 testb $0x1, -0x379(%rbp) jne 0xb4f7 jmp 0xb503 movq -0x3d0(%rbp), %rdi callq 0x3240 jmp 0xb505 leaq -0x358(%rbp), %rdi callq 0x3260 jmp 0xb51e jmp 0xb515 addq $0x3d0, %rsp # imm = 0x3D0 popq %rbp retq movq -0x18(%rbp), %rdi callq 0x35d0 nopw (%rax,%rax)
_ZN10serial_cpp6Serial10SerialImpl6setRTSEb: push rbp mov rbp, rsp sub rsp, 3D0h mov al, sil mov [rbp+var_8], rdi and al, 1 mov [rbp+var_9], al mov rax, [rbp+var_8] mov [rbp+var_388], rax mov al, [rax+2Ch] and al, 1 movzx eax, al cmp eax, 0 jnz short loc_B21B mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rbp+var_390], rax lea rsi, aSerialSetrts; "Serial::setRTS" call _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc; serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) jmp short $+2 loc_B1E4: mov rdi, [rbp+var_390]; void * lea rsi, _ZTIN10serial_cpp22PortNotOpenedExceptionE; lptinfo lea rdx, _ZN10serial_cpp22PortNotOpenedExceptionD2Ev; void (*)(void *) call ___cxa_throw mov rdi, [rbp+var_390]; void * mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax call ___cxa_free_exception jmp loc_B51E loc_B21B: mov [rbp+var_20], 4 test [rbp+var_9], 1 jz loc_B3A5 mov rax, [rbp+var_388] mov edi, [rax+28h] mov esi, 5416h lea rdx, [rbp+var_20] mov al, 0 call _ioctl mov ecx, eax mov eax, 0FFFFFFFFh cmp eax, ecx jnz loc_B3A0 lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rbp+var_198] lea rsi, aSetrtsFailedOn; "setRTS failed on a call to ioctl(TIOCMB"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_398], rax jmp short $+2 loc_B27D: call ___errno_location mov rdi, [rbp+var_398] mov esi, [rax] call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_3A0], rax jmp short $+2 loc_B299: mov rdi, [rbp+var_3A0] lea rsi, aSetdtrFailedOn_0+2Bh; " " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_3A8], rax jmp short $+2 loc_B2B5: call ___errno_location mov edi, [rax] call _strerror mov rdi, [rbp+var_3A8] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_B2D2: mov [rbp+var_1C9], 1 mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov [rbp+var_3B0], rax lea rdi, [rbp+var_1C8] lea rsi, [rbp+var_1A8] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_B2FF: lea rdi, [rbp+var_1C8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rbp+var_3B0]; this mov rsi, rax; char * call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*) jmp short $+2 loc_B31C: mov rdi, [rbp+var_3B0]; void * mov [rbp+var_1C9], 0 lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *) call ___cxa_throw jmp loc_B527 mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_B38F mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_B376 mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax lea rdi, [rbp+var_1C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_B376: test [rbp+var_1C9], 1 jnz short loc_B381 jmp short loc_B38D loc_B381: mov rdi, [rbp+var_3B0]; void * call ___cxa_free_exception loc_B38D: jmp short $+2 loc_B38F: lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp loc_B51E loc_B3A0: jmp loc_B515 loc_B3A5: mov rax, [rbp+var_388] mov edi, [rax+28h] mov esi, 5417h lea rdx, [rbp+var_20] mov al, 0 call _ioctl mov ecx, eax mov eax, 0FFFFFFFFh cmp eax, ecx jnz loc_B513 lea rdi, [rbp+var_358] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rbp+var_348] lea rsi, aSetrtsFailedOn_0; "setRTS failed on a call to ioctl(TIOCMB"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_3B8], rax jmp short $+2 loc_B3F6: call ___errno_location mov rdi, [rbp+var_3B8] mov esi, [rax] call __ZNSolsEi; std::ostream::operator<<(int) mov [rbp+var_3C0], rax jmp short $+2 loc_B412: mov rdi, [rbp+var_3C0] lea rsi, aSetdtrFailedOn_0+2Bh; " " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_3C8], rax jmp short $+2 loc_B42E: call ___errno_location mov edi, [rax] call _strerror mov rdi, [rbp+var_3C8] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_B44B: mov [rbp+var_379], 1 mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov [rbp+var_3D0], rax lea rdi, [rbp+var_378] lea rsi, [rbp+var_358] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_B478: lea rdi, [rbp+var_378] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rbp+var_3D0]; this mov rsi, rax; char * call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*) jmp short $+2 loc_B495: mov rdi, [rbp+var_3D0]; void * mov [rbp+var_379], 0 lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_B527 mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_B505 mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax jmp short loc_B4EC mov rcx, rax mov eax, edx mov [rbp+var_18], rcx mov [rbp+var_1C], eax lea rdi, [rbp+var_378] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_B4EC: test [rbp+var_379], 1 jnz short loc_B4F7 jmp short loc_B503 loc_B4F7: mov rdi, [rbp+var_3D0]; void * call ___cxa_free_exception loc_B503: jmp short $+2 loc_B505: lea rdi, [rbp+var_358] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp short loc_B51E loc_B513: jmp short $+2 loc_B515: add rsp, 3D0h pop rbp retn loc_B51E: mov rdi, [rbp+var_18] call __Unwind_Resume loc_B527: nop word ptr [rax+rax+00000000h]
long long serial_cpp::Serial::SerialImpl::setRTS(serial_cpp::Serial::SerialImpl *this, char a2) { int v2; // ecx long long result; // rax unsigned int *v4; // rax long long v5; // rdi unsigned int *v6; // rax long long v7; // rax const char *v8; // rax int v9; // ecx unsigned int *v10; // rax long long v11; // rdi unsigned int *v12; // rax long long v13; // rax const char *v14; // rax serial_cpp::SerialException *v15; // [rsp+0h] [rbp-3D0h] long long v16; // [rsp+8h] [rbp-3C8h] long long v17; // [rsp+18h] [rbp-3B8h] serial_cpp::SerialException *v18; // [rsp+20h] [rbp-3B0h] long long v19; // [rsp+28h] [rbp-3A8h] long long v20; // [rsp+38h] [rbp-398h] serial_cpp::PortNotOpenedException *exception; // [rsp+40h] [rbp-390h] _BYTE v22[32]; // [rsp+58h] [rbp-378h] BYREF _BYTE v23[16]; // [rsp+78h] [rbp-358h] BYREF _BYTE v24[384]; // [rsp+88h] [rbp-348h] BYREF _BYTE v25[32]; // [rsp+208h] [rbp-1C8h] BYREF _BYTE v26[16]; // [rsp+228h] [rbp-1A8h] BYREF _BYTE v27[376]; // [rsp+238h] [rbp-198h] BYREF int v28; // [rsp+3B0h] [rbp-20h] BYREF char v29; // [rsp+3C7h] [rbp-9h] serial_cpp::Serial::SerialImpl *v30; // [rsp+3C8h] [rbp-8h] v30 = this; v29 = a2 & 1; if ( (*((_BYTE *)this + 44) & 1) == 0 ) { exception = (serial_cpp::PortNotOpenedException *)__cxa_allocate_exception(0x28uLL); serial_cpp::PortNotOpenedException::PortNotOpenedException(exception, "Serial::setRTS"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'serial_cpp::PortNotOpenedException, serial_cpp::PortNotOpenedException::~PortNotOpenedException); } v28 = 4; if ( (v29 & 1) != 0 ) { v2 = ioctl(*((unsigned int *)this + 10), 21526LL, &v28); result = 0xFFFFFFFFLL; if ( v2 == -1 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v26); v20 = std::operator<<<std::char_traits<char>>(v27, "setRTS failed on a call to ioctl(TIOCMBIS): "); v4 = (unsigned int *)__errno_location(); v5 = std::ostream::operator<<(v20, *v4); v19 = std::operator<<<std::char_traits<char>>(v5, " "); v6 = (unsigned int *)__errno_location(); v7 = strerror(*v6); std::operator<<<std::char_traits<char>>(v19, v7); v18 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v25, v26); v8 = (const char *)std::string::c_str(v25); serial_cpp::SerialException::SerialException(v18, v8); v24[383] = 0; __cxa_throw( v18, (struct type_info *)&`typeinfo for'serial_cpp::SerialException, serial_cpp::SerialException::~SerialException); } } else { v9 = ioctl(*((unsigned int *)this + 10), 21527LL, &v28); result = 0xFFFFFFFFLL; if ( v9 == -1 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v23); v17 = std::operator<<<std::char_traits<char>>(v24, "setRTS failed on a call to ioctl(TIOCMBIC): "); v10 = (unsigned int *)__errno_location(); v11 = std::ostream::operator<<(v17, *v10); v16 = std::operator<<<std::char_traits<char>>(v11, " "); v12 = (unsigned int *)__errno_location(); v13 = strerror(*v12); std::operator<<<std::char_traits<char>>(v16, v13); v15 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v22, v23); v14 = (const char *)std::string::c_str(v22); serial_cpp::SerialException::SerialException(v15, v14); __cxa_throw( v15, (struct type_info *)&`typeinfo for'serial_cpp::SerialException, serial_cpp::SerialException::~SerialException); } } return result; }
setRTS: PUSH RBP MOV RBP,RSP SUB RSP,0x3d0 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI AND AL,0x1 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x388],RAX MOV AL,byte ptr [RAX + 0x2c] AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JNZ 0x0010b21b MOV EDI,0x28 CALL 0x001031a0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0x390],RAX LAB_0010b1d6: LEA RSI,[0x110680] CALL 0x0010cca0 LAB_0010b1e2: JMP 0x0010b1e4 LAB_0010b1e4: MOV RDI,qword ptr [RBP + -0x390] LEA RSI,[0x116d00] LEA RDX,[0x10cde0] CALL 0x001035b0 LAB_0010b21b: MOV dword ptr [RBP + -0x20],0x4 TEST byte ptr [RBP + -0x9],0x1 JZ 0x0010b3a5 MOV RAX,qword ptr [RBP + -0x388] MOV EDI,dword ptr [RAX + 0x28] MOV ESI,0x5416 LEA RDX,[RBP + -0x20] MOV AL,0x0 CALL 0x001034c0 MOV ECX,EAX MOV EAX,0xffffffff CMP EAX,ECX JNZ 0x0010b3a0 LEA RDI,[RBP + -0x1a8] CALL 0x00103220 LEA RDI,[RBP + -0x198] LAB_0010b268: LEA RSI,[0x11068f] CALL 0x00103310 MOV qword ptr [RBP + -0x398],RAX JMP 0x0010b27d LAB_0010b27d: CALL 0x00103050 MOV RDI,qword ptr [RBP + -0x398] MOV ESI,dword ptr [RAX] CALL 0x001035c0 MOV qword ptr [RBP + -0x3a0],RAX JMP 0x0010b299 LAB_0010b299: MOV RDI,qword ptr [RBP + -0x3a0] LEA RSI,[0x110750] CALL 0x00103310 MOV qword ptr [RBP + -0x3a8],RAX JMP 0x0010b2b5 LAB_0010b2b5: CALL 0x00103050 MOV EDI,dword ptr [RAX] CALL 0x00103100 MOV RDI,qword ptr [RBP + -0x3a8] MOV RSI,RAX CALL 0x00103310 LAB_0010b2d0: JMP 0x0010b2d2 LAB_0010b2d2: MOV byte ptr [RBP + -0x1c9],0x1 MOV EDI,0x28 CALL 0x001031a0 MOV qword ptr [RBP + -0x3b0],RAX LAB_0010b2ea: LEA RDI,[RBP + -0x1c8] LEA RSI,[RBP + -0x1a8] CALL 0x00103300 JMP 0x0010b2ff LAB_0010b2ff: LEA RDI,[RBP + -0x1c8] CALL 0x00103150 MOV RDI,qword ptr [RBP + -0x3b0] MOV RSI,RAX LAB_0010b315: CALL 0x0010c680 JMP 0x0010b31c LAB_0010b31c: MOV RDI,qword ptr [RBP + -0x3b0] MOV byte ptr [RBP + -0x1c9],0x0 LEA RSI,[0x116cd0] LEA RDX,[0x10c7c0] CALL 0x001035b0 LAB_0010b3a0: JMP 0x0010b515 LAB_0010b3a5: MOV RAX,qword ptr [RBP + -0x388] MOV EDI,dword ptr [RAX + 0x28] MOV ESI,0x5417 LEA RDX,[RBP + -0x20] MOV AL,0x0 CALL 0x001034c0 MOV ECX,EAX MOV EAX,0xffffffff CMP EAX,ECX JNZ 0x0010b513 LEA RDI,[RBP + -0x358] CALL 0x00103220 LEA RDI,[RBP + -0x348] LAB_0010b3e1: LEA RSI,[0x1106bc] CALL 0x00103310 MOV qword ptr [RBP + -0x3b8],RAX JMP 0x0010b3f6 LAB_0010b3f6: CALL 0x00103050 MOV RDI,qword ptr [RBP + -0x3b8] MOV ESI,dword ptr [RAX] CALL 0x001035c0 MOV qword ptr [RBP + -0x3c0],RAX JMP 0x0010b412 LAB_0010b412: MOV RDI,qword ptr [RBP + -0x3c0] LEA RSI,[0x110750] CALL 0x00103310 MOV qword ptr [RBP + -0x3c8],RAX JMP 0x0010b42e LAB_0010b42e: CALL 0x00103050 MOV EDI,dword ptr [RAX] CALL 0x00103100 MOV RDI,qword ptr [RBP + -0x3c8] MOV RSI,RAX CALL 0x00103310 LAB_0010b449: JMP 0x0010b44b LAB_0010b44b: MOV byte ptr [RBP + -0x379],0x1 MOV EDI,0x28 CALL 0x001031a0 MOV qword ptr [RBP + -0x3d0],RAX LAB_0010b463: LEA RDI,[RBP + -0x378] LEA RSI,[RBP + -0x358] CALL 0x00103300 JMP 0x0010b478 LAB_0010b478: LEA RDI,[RBP + -0x378] CALL 0x00103150 MOV RDI,qword ptr [RBP + -0x3d0] MOV RSI,RAX LAB_0010b48e: CALL 0x0010c680 JMP 0x0010b495 LAB_0010b495: MOV RDI,qword ptr [RBP + -0x3d0] MOV byte ptr [RBP + -0x379],0x0 LEA RSI,[0x116cd0] LEA RDX,[0x10c7c0] CALL 0x001035b0 LAB_0010b513: JMP 0x0010b515 LAB_0010b515: ADD RSP,0x3d0 POP RBP RET
/* serial_cpp::Serial::SerialImpl::setRTS(bool) */ void __thiscall serial_cpp::Serial::SerialImpl::setRTS(SerialImpl *this,bool param_1) { int iVar1; PortNotOpenedException *this_00; ostream *poVar2; int *piVar3; char *pcVar4; SerialException *pSVar5; stringstream local_360 [16]; ostream local_350 [383]; int1 local_1d1; stringstream local_1b0 [16]; ostream local_1a0 [376]; int4 local_28 [5]; int1 local_11; SerialImpl *local_10; local_11 = param_1; local_10 = this; if (((byte)this[0x2c] & 1) == 0) { this_00 = (PortNotOpenedException *)__cxa_allocate_exception(0x28); /* try { // try from 0010b1d6 to 0010b1e1 has its CatchHandler @ 0010b1fe */ PortNotOpenedException::PortNotOpenedException(this_00,"Serial::setRTS"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&PortNotOpenedException::typeinfo, PortNotOpenedException::~PortNotOpenedException); } local_28[0] = 4; if (param_1) { iVar1 = ioctl(*(int *)(this + 0x28),0x5416,local_28); if (iVar1 == -1) { std::__cxx11::stringstream::stringstream(local_1b0); /* try { // try from 0010b268 to 0010b2cf has its CatchHandler @ 0010b342 */ poVar2 = std::operator<<(local_1a0,"setRTS failed on a call to ioctl(TIOCMBIS): "); piVar3 = __errno_location(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,*piVar3); poVar2 = std::operator<<(poVar2," "); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); std::operator<<(poVar2,pcVar4); local_1d1 = 1; pSVar5 = (SerialException *)__cxa_allocate_exception(0x28); /* try { // try from 0010b2ea to 0010b2fc has its CatchHandler @ 0010b350 */ std::__cxx11::stringstream::str(); pcVar4 = (char *)std::__cxx11::string::c_str(); /* try { // try from 0010b315 to 0010b33c has its CatchHandler @ 0010b35e */ SerialException::SerialException(pSVar5,pcVar4); local_1d1 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException); } } else { iVar1 = ioctl(*(int *)(this + 0x28),0x5417,local_28); if (iVar1 == -1) { std::__cxx11::stringstream::stringstream(local_360); /* try { // try from 0010b3e1 to 0010b448 has its CatchHandler @ 0010b4b8 */ poVar2 = std::operator<<(local_350,"setRTS failed on a call to ioctl(TIOCMBIC): "); piVar3 = __errno_location(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,*piVar3); poVar2 = std::operator<<(poVar2," "); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); std::operator<<(poVar2,pcVar4); pSVar5 = (SerialException *)__cxa_allocate_exception(0x28); /* try { // try from 0010b463 to 0010b475 has its CatchHandler @ 0010b4c6 */ std::__cxx11::stringstream::str(); pcVar4 = (char *)std::__cxx11::string::c_str(); /* try { // try from 0010b48e to 0010b4b5 has its CatchHandler @ 0010b4d4 */ SerialException::SerialException(pSVar5,pcVar4); /* WARNING: Subroutine does not return */ __cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException); } } return; }
34,888
serial_cpp::Serial::SerialImpl::setRTS(bool)
ami-iit[P]serial_cpp/src/impl/unix.cc
void Serial::SerialImpl::setRTS (bool level) { if (is_open_ == false) { throw PortNotOpenedException ("Serial::setRTS"); } int command = TIOCM_RTS; if (level) { if (-1 == ioctl (fd_, TIOCMBIS, &command)) { stringstream ss; ss << "setRTS failed on a call to ioctl(TIOCMBIS): " << errno << " " << strerror(errno); throw(SerialException(ss.str().c_str())); } } else { if (-1 == ioctl (fd_, TIOCMBIC, &command)) { stringstream ss; ss << "setRTS failed on a call to ioctl(TIOCMBIC): " << errno << " " << strerror(errno); throw(SerialException(ss.str().c_str())); } } }
O2
cpp
serial_cpp::Serial::SerialImpl::setRTS(bool): pushq %rbp pushq %r14 pushq %rbx subq $0x1b0, %rsp # imm = 0x1B0 cmpb $0x0, 0x2c(%rdi) je 0x65e7 movl $0x4, 0x4(%rsp) movl 0x28(%rdi), %edi leaq 0x4(%rsp), %rdx testb %sil, %sil je 0x65ca movl $0x5416, %esi # imm = 0x5416 xorl %eax, %eax callq 0x33c0 cmpl $-0x1, %eax jne 0x65db leaq 0x28(%rsp), %rdi callq 0x31d0 leaq 0x38(%rsp), %rdi leaq 0x31d0(%rip), %rsi # 0x9715 callq 0x32b0 movq %rax, %r14 callq 0x3040 movq %rax, %rbx movl (%rax), %esi movq %r14, %rdi callq 0x34b0 leaq 0x3270(%rip), %rsi # 0x97d6 movq %rax, %rdi callq 0x32b0 movq %rax, %r14 movl (%rbx), %edi callq 0x30d0 movq %r14, %rdi movq %rax, %rsi callq 0x32b0 pushq $0x28 popq %rdi callq 0x3170 movq %rax, %r14 leaq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x3440 movb $0x1, %bpl movq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x71a0 xorl %ebp, %ebp leaq 0x772a(%rip), %rsi # 0xdce0 leaq 0xcb3(%rip), %rdx # 0x7270 movq %r14, %rdi callq 0x34a0 jmp 0x66ad movl $0x5417, %esi # imm = 0x5417 xorl %eax, %eax callq 0x33c0 cmpl $-0x1, %eax je 0x6617 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbx popq %r14 popq %rbp retq pushq $0x28 popq %rdi callq 0x3170 movq %rax, %r14 leaq 0x310d(%rip), %rsi # 0x9706 movq %rax, %rdi callq 0x753e leaq 0x7708(%rip), %rsi # 0xdd10 leaq 0xfff(%rip), %rdx # 0x760e movq %r14, %rdi callq 0x34a0 leaq 0x28(%rsp), %rdi callq 0x31d0 leaq 0x38(%rsp), %rdi leaq 0x3115(%rip), %rsi # 0x9742 callq 0x32b0 movq %rax, %r14 callq 0x3040 movq %rax, %rbx movl (%rax), %esi movq %r14, %rdi callq 0x34b0 leaq 0x3188(%rip), %rsi # 0x97d6 movq %rax, %rdi callq 0x32b0 movq %rax, %r14 movl (%rbx), %edi callq 0x30d0 movq %r14, %rdi movq %rax, %rsi callq 0x32b0 pushq $0x28 popq %rdi callq 0x3170 movq %rax, %r14 leaq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x3440 movb $0x1, %bpl movq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x71a0 xorl %ebp, %ebp leaq 0x7642(%rip), %rsi # 0xdce0 leaq 0xbcb(%rip), %rdx # 0x7270 movq %r14, %rdi callq 0x34a0 jmp 0x66af movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x3140 testb %bpl, %bpl jne 0x66c8 jmp 0x66d7 jmp 0x66c5 movq %rax, %rbx movq %r14, %rdi callq 0x31f0 jmp 0x66d7 jmp 0x66d4 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x3210 jmp 0x66ee movq %rax, %rbx movq %r14, %rdi callq 0x31f0 movq %rbx, %rdi callq 0x34d0
_ZN10serial_cpp6Serial10SerialImpl6setRTSEb: push rbp push r14 push rbx sub rsp, 1B0h cmp byte ptr [rdi+2Ch], 0 jz loc_65E7 mov [rsp+1C8h+var_1C4], 4 mov edi, [rdi+28h] lea rdx, [rsp+1C8h+var_1C4] test sil, sil jz loc_65CA mov esi, 5416h xor eax, eax call _ioctl cmp eax, 0FFFFFFFFh jnz loc_65DB lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1C8h+var_190] lea rsi, aSetrtsFailedOn; "setRTS failed on a call to ioctl(TIOCMB"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ___errno_location mov rbx, rax mov esi, [rax] mov rdi, r14 call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aSetdtrFailedOn_0+2Bh; " " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax mov edi, [rbx] call _strerror mov rdi, r14 mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) push 28h ; '(' pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+1C8h+var_188] lea rdi, [rsp+1C8h+var_1C0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov bpl, 1 mov rsi, [rsp+1C8h+var_1C0]; char * mov rdi, r14; this call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*) xor ebp, ebp lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_66AD loc_65CA: mov esi, 5417h xor eax, eax call _ioctl cmp eax, 0FFFFFFFFh jz short loc_6617 loc_65DB: add rsp, 1B0h pop rbx pop r14 pop rbp retn loc_65E7: push 28h ; '(' pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aSerialSetrts; "Serial::setRTS" mov rdi, rax; this call _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc; serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) lea rsi, _ZTIN10serial_cpp22PortNotOpenedExceptionE; lptinfo lea rdx, _ZN10serial_cpp22PortNotOpenedExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_6617: lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1C8h+var_190] lea rsi, aSetrtsFailedOn_0; "setRTS failed on a call to ioctl(TIOCMB"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call ___errno_location mov rbx, rax mov esi, [rax] mov rdi, r14 call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aSetdtrFailedOn_0+2Bh; " " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax mov edi, [rbx] call _strerror mov rdi, r14 mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) push 28h ; '(' pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+1C8h+var_188] lea rdi, [rsp+1C8h+var_1C0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov bpl, 1 mov rsi, [rsp+1C8h+var_1C0]; char * mov rdi, r14; this call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*) xor ebp, ebp lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_66AD: jmp short $+2 loc_66AF: mov rbx, rax lea rdi, [rsp+1C8h+var_1C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_66C8 jmp short loc_66D7 jmp short $+2 loc_66C5: mov rbx, rax loc_66C8: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_66D7 jmp short $+2 loc_66D4: mov rbx, rax loc_66D7: lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp short loc_66EE mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception loc_66EE: mov rdi, rbx call __Unwind_Resume
long long serial_cpp::Serial::SerialImpl::setRTS(serial_cpp::Serial::SerialImpl *this, char a2) { long long v2; // rdi long long result; // rax long long v4; // r14 unsigned int *v5; // rbx long long v6; // rax long long v7; // r14 long long v8; // rax serial_cpp::SerialException *v9; // r14 serial_cpp::PortNotOpenedException *exception; // r14 long long v11; // r14 unsigned int *v12; // rbx long long v13; // rax long long v14; // r14 long long v15; // rax serial_cpp::SerialException *v16; // r14 int v17; // [rsp+4h] [rbp-1C4h] BYREF char *v18[4]; // [rsp+8h] [rbp-1C0h] BYREF _BYTE v19[16]; // [rsp+28h] [rbp-1A0h] BYREF _BYTE v20[8]; // [rsp+38h] [rbp-190h] BYREF _BYTE v21[392]; // [rsp+40h] [rbp-188h] BYREF if ( !*((_BYTE *)this + 44) ) { exception = (serial_cpp::PortNotOpenedException *)__cxa_allocate_exception(0x28uLL); serial_cpp::PortNotOpenedException::PortNotOpenedException(exception, "Serial::setRTS"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'serial_cpp::PortNotOpenedException, serial_cpp::PortNotOpenedException::~PortNotOpenedException); } v17 = 4; v2 = *((unsigned int *)this + 10); if ( a2 ) { result = ioctl(v2, 21526LL, &v17); if ( (_DWORD)result == -1 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v19); v4 = std::operator<<<std::char_traits<char>>(v20, "setRTS failed on a call to ioctl(TIOCMBIS): "); v5 = (unsigned int *)__errno_location(); v6 = std::ostream::operator<<(v4, *v5); v7 = std::operator<<<std::char_traits<char>>(v6, " "); v8 = strerror(*v5); std::operator<<<std::char_traits<char>>(v7, v8); v9 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL); std::stringbuf::str(v18, v21); serial_cpp::SerialException::SerialException(v9, v18[0]); __cxa_throw( v9, (struct type_info *)&`typeinfo for'serial_cpp::SerialException, serial_cpp::SerialException::~SerialException); } } else { result = ioctl(v2, 21527LL, &v17); if ( (_DWORD)result == -1 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v19); v11 = std::operator<<<std::char_traits<char>>(v20, "setRTS failed on a call to ioctl(TIOCMBIC): "); v12 = (unsigned int *)__errno_location(); v13 = std::ostream::operator<<(v11, *v12); v14 = std::operator<<<std::char_traits<char>>(v13, " "); v15 = strerror(*v12); std::operator<<<std::char_traits<char>>(v14, v15); v16 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL); std::stringbuf::str(v18, v21); serial_cpp::SerialException::SerialException(v16, v18[0]); __cxa_throw( v16, (struct type_info *)&`typeinfo for'serial_cpp::SerialException, serial_cpp::SerialException::~SerialException); } } return result; }
setRTS: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1b0 CMP byte ptr [RDI + 0x2c],0x0 JZ 0x001065e7 MOV dword ptr [RSP + 0x4],0x4 MOV EDI,dword ptr [RDI + 0x28] LEA RDX,[RSP + 0x4] TEST SIL,SIL JZ 0x001065ca MOV ESI,0x5416 XOR EAX,EAX CALL 0x001033c0 CMP EAX,-0x1 JNZ 0x001065db LEA RDI,[RSP + 0x28] CALL 0x001031d0 LEA RDI,[RSP + 0x38] LAB_0010653e: LEA RSI,[0x109715] CALL 0x001032b0 MOV R14,RAX CALL 0x00103040 MOV RBX,RAX MOV ESI,dword ptr [RAX] MOV RDI,R14 CALL 0x001034b0 LEA RSI,[0x1097d6] MOV RDI,RAX CALL 0x001032b0 MOV R14,RAX MOV EDI,dword ptr [RBX] CALL 0x001030d0 MOV RDI,R14 MOV RSI,RAX CALL 0x001032b0 LAB_00106583: PUSH 0x28 POP RDI CALL 0x00103170 MOV R14,RAX LEA RSI,[RSP + 0x40] LAB_00106593: LEA RDI,[RSP + 0x8] CALL 0x00103440 MOV BPL,0x1 MOV RSI,qword ptr [RSP + 0x8] LAB_001065a5: MOV RDI,R14 CALL 0x001071a0 XOR EBP,EBP LEA RSI,[0x10dce0] LEA RDX,[0x107270] MOV RDI,R14 CALL 0x001034a0 LAB_001065ca: MOV ESI,0x5417 XOR EAX,EAX CALL 0x001033c0 CMP EAX,-0x1 JZ 0x00106617 LAB_001065db: ADD RSP,0x1b0 POP RBX POP R14 POP RBP RET LAB_001065e7: PUSH 0x28 POP RDI CALL 0x00103170 MOV R14,RAX LAB_001065f2: LEA RSI,[0x109706] MOV RDI,RAX CALL 0x0010753e LAB_00106601: LEA RSI,[0x10dd10] LEA RDX,[0x10760e] MOV RDI,R14 CALL 0x001034a0 LAB_00106617: LEA RDI,[RSP + 0x28] CALL 0x001031d0 LEA RDI,[RSP + 0x38] LAB_00106626: LEA RSI,[0x109742] CALL 0x001032b0 MOV R14,RAX CALL 0x00103040 MOV RBX,RAX MOV ESI,dword ptr [RAX] MOV RDI,R14 CALL 0x001034b0 LEA RSI,[0x1097d6] MOV RDI,RAX CALL 0x001032b0 MOV R14,RAX MOV EDI,dword ptr [RBX] CALL 0x001030d0 MOV RDI,R14 MOV RSI,RAX CALL 0x001032b0 LAB_0010666b: PUSH 0x28 POP RDI CALL 0x00103170 MOV R14,RAX LEA RSI,[RSP + 0x40] LAB_0010667b: LEA RDI,[RSP + 0x8] CALL 0x00103440 MOV BPL,0x1 MOV RSI,qword ptr [RSP + 0x8] LAB_0010668d: MOV RDI,R14 CALL 0x001071a0 XOR EBP,EBP LEA RSI,[0x10dce0] LEA RDX,[0x107270] MOV RDI,R14 CALL 0x001034a0
/* serial_cpp::Serial::SerialImpl::setRTS(bool) */ void __thiscall serial_cpp::Serial::SerialImpl::setRTS(SerialImpl *this,bool param_1) { int iVar1; ostream *poVar2; int *piVar3; char *pcVar4; SerialException *pSVar5; PortNotOpenedException *this_00; int4 local_1c4; char *local_1c0; stringstream local_1a0 [16]; ostream local_190 [376]; if (this[0x2c] == (SerialImpl)0x0) { this_00 = (PortNotOpenedException *)__cxa_allocate_exception(0x28); /* try { // try from 001065f2 to 00106600 has its CatchHandler @ 001066e3 */ PortNotOpenedException::PortNotOpenedException(this_00,"Serial::setRTS"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&PortNotOpenedException::typeinfo, PortNotOpenedException::~PortNotOpenedException); } local_1c4 = 4; if (param_1) { iVar1 = ioctl(*(int *)(this + 0x28),0x5416,&local_1c4); if (iVar1 == -1) { std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 0010653e to 00106582 has its CatchHandler @ 001066d4 */ poVar2 = std::operator<<(local_190,"setRTS failed on a call to ioctl(TIOCMBIS): "); piVar3 = __errno_location(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,*piVar3); poVar2 = std::operator<<(poVar2," "); pcVar4 = strerror(*piVar3); std::operator<<(poVar2,pcVar4); pSVar5 = (SerialException *)__cxa_allocate_exception(0x28); /* try { // try from 00106593 to 0010659c has its CatchHandler @ 001066c5 */ std::__cxx11::stringbuf::str(); /* try { // try from 001065a5 to 001065c4 has its CatchHandler @ 001066af */ SerialException::SerialException(pSVar5,local_1c0); /* WARNING: Subroutine does not return */ __cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException); } } else { iVar1 = ioctl(*(int *)(this + 0x28),0x5417,&local_1c4); if (iVar1 == -1) { std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 00106626 to 0010666a has its CatchHandler @ 001066d2 */ poVar2 = std::operator<<(local_190,"setRTS failed on a call to ioctl(TIOCMBIC): "); piVar3 = __errno_location(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,*piVar3); poVar2 = std::operator<<(poVar2," "); pcVar4 = strerror(*piVar3); std::operator<<(poVar2,pcVar4); pSVar5 = (SerialException *)__cxa_allocate_exception(0x28); /* try { // try from 0010667b to 00106684 has its CatchHandler @ 001066c3 */ std::__cxx11::stringbuf::str(); /* try { // try from 0010668d to 001066ac has its CatchHandler @ 001066ad */ SerialException::SerialException(pSVar5,local_1c0); /* WARNING: Subroutine does not return */ __cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException); } } return; }
34,889
serial_cpp::Serial::SerialImpl::setRTS(bool)
ami-iit[P]serial_cpp/src/impl/unix.cc
void Serial::SerialImpl::setRTS (bool level) { if (is_open_ == false) { throw PortNotOpenedException ("Serial::setRTS"); } int command = TIOCM_RTS; if (level) { if (-1 == ioctl (fd_, TIOCMBIS, &command)) { stringstream ss; ss << "setRTS failed on a call to ioctl(TIOCMBIS): " << errno << " " << strerror(errno); throw(SerialException(ss.str().c_str())); } } else { if (-1 == ioctl (fd_, TIOCMBIC, &command)) { stringstream ss; ss << "setRTS failed on a call to ioctl(TIOCMBIC): " << errno << " " << strerror(errno); throw(SerialException(ss.str().c_str())); } } }
O3
cpp
serial_cpp::Serial::SerialImpl::setRTS(bool): pushq %rbp pushq %r14 pushq %rbx subq $0x1b0, %rsp # imm = 0x1B0 cmpb $0x0, 0x2c(%rdi) je 0x70e7 movl $0x4, 0x4(%rsp) movl 0x28(%rdi), %edi leaq 0x4(%rsp), %rdx testb %sil, %sil je 0x70ca movl $0x5416, %esi # imm = 0x5416 xorl %eax, %eax callq 0x33c0 cmpl $-0x1, %eax jne 0x70db leaq 0x28(%rsp), %rdi callq 0x31c0 leaq 0x38(%rsp), %r14 leaq 0x46ec(%rip), %rsi # 0xb725 movl $0x2c, %edx movq %r14, %rdi callq 0x3330 callq 0x3050 movq %rax, %rbx movl (%rax), %esi movq %r14, %rdi callq 0x34d0 movq %rax, %r14 leaq 0x4784(%rip), %rsi # 0xb7e6 movl $0x1, %edx movq %rax, %rdi callq 0x3330 movl (%rbx), %edi callq 0x30e0 movq %r14, %rdi movq %rax, %rsi callq 0x32a0 movl $0x28, %edi callq 0x3150 movq %rax, %r14 leaq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x3460 movb $0x1, %bpl movq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x7e74 xorl %ebp, %ebp leaq 0x8c1a(%rip), %rsi # 0xfcd0 leaq 0xf11(%rip), %rdx # 0x7fce movq %r14, %rdi callq 0x34c0 jmp 0x71bb movl $0x5417, %esi # imm = 0x5417 xorl %eax, %eax callq 0x33c0 cmpl $-0x1, %eax je 0x7119 addq $0x1b0, %rsp # imm = 0x1B0 popq %rbx popq %r14 popq %rbp retq movl $0x28, %edi callq 0x3150 movq %rax, %r14 leaq 0x461b(%rip), %rsi # 0xb716 movq %rax, %rdi callq 0x845a leaq 0x8bf6(%rip), %rsi # 0xfd00 leaq 0x14a3(%rip), %rdx # 0x85b4 movq %r14, %rdi callq 0x34c0 leaq 0x28(%rsp), %rdi callq 0x31c0 leaq 0x38(%rsp), %r14 leaq 0x4623(%rip), %rsi # 0xb752 movl $0x2c, %edx movq %r14, %rdi callq 0x3330 callq 0x3050 movq %rax, %rbx movl (%rax), %esi movq %r14, %rdi callq 0x34d0 movq %rax, %r14 leaq 0x468e(%rip), %rsi # 0xb7e6 movl $0x1, %edx movq %rax, %rdi callq 0x3330 movl (%rbx), %edi callq 0x30e0 movq %r14, %rdi movq %rax, %rsi callq 0x32a0 movl $0x28, %edi callq 0x3150 movq %rax, %r14 leaq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x3460 movb $0x1, %bpl movq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x7e74 xorl %ebp, %ebp leaq 0x8b24(%rip), %rsi # 0xfcd0 leaq 0xe1b(%rip), %rdx # 0x7fce movq %r14, %rdi callq 0x34c0 jmp 0x71bd movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x71db movq 0x18(%rsp), %rsi incq %rsi callq 0x32c0 testb %bpl, %bpl jne 0x71e7 jmp 0x71f6 jmp 0x71e4 movq %rax, %rbx movq %r14, %rdi callq 0x31e0 jmp 0x71f6 jmp 0x71f3 movq %rax, %rbx movq 0x8da3(%rip), %rsi # 0xffa0 leaq 0x28(%rsp), %rdi callq 0x3200 leaq 0xa8(%rsp), %rdi callq 0x30d0 jmp 0x7221 movq %rax, %rbx movq %r14, %rdi callq 0x31e0 movq %rbx, %rdi callq 0x34f0 nop
_ZN10serial_cpp6Serial10SerialImpl6setRTSEb: push rbp push r14 push rbx sub rsp, 1B0h cmp byte ptr [rdi+2Ch], 0 jz loc_70E7 mov [rsp+1C8h+var_1C4], 4 mov edi, [rdi+28h] lea rdx, [rsp+1C8h+var_1C4] test sil, sil jz loc_70CA mov esi, 5416h xor eax, eax call _ioctl cmp eax, 0FFFFFFFFh jnz loc_70DB lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea r14, [rsp+1C8h+var_190] lea rsi, aSetrtsFailedOn; "setRTS failed on a call to ioctl(TIOCMB"... mov edx, 2Ch ; ',' mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call ___errno_location mov rbx, rax mov esi, [rax] mov rdi, r14 call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax lea rsi, aSetdtrFailedOn_0+2Bh; " " mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edi, [rbx] call _strerror mov rdi, r14 mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+1C8h+var_188] lea rdi, [rsp+1C8h+var_1C0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov bpl, 1 mov rsi, [rsp+1C8h+var_1C0]; char * mov rdi, r14; this call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*) xor ebp, ebp lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_71BB loc_70CA: mov esi, 5417h xor eax, eax call _ioctl cmp eax, 0FFFFFFFFh jz short loc_7119 loc_70DB: add rsp, 1B0h pop rbx pop r14 pop rbp retn loc_70E7: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aSerialSetrts; "Serial::setRTS" mov rdi, rax; this call _ZN10serial_cpp22PortNotOpenedExceptionC2EPKc; serial_cpp::PortNotOpenedException::PortNotOpenedException(char const*) lea rsi, _ZTIN10serial_cpp22PortNotOpenedExceptionE; lptinfo lea rdx, _ZN10serial_cpp22PortNotOpenedExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_7119: lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea r14, [rsp+1C8h+var_190] lea rsi, aSetrtsFailedOn_0; "setRTS failed on a call to ioctl(TIOCMB"... mov edx, 2Ch ; ',' mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call ___errno_location mov rbx, rax mov esi, [rax] mov rdi, r14 call __ZNSolsEi; std::ostream::operator<<(int) mov r14, rax lea rsi, aSetdtrFailedOn_0+2Bh; " " mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edi, [rbx] call _strerror mov rdi, r14 mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+1C8h+var_188] lea rdi, [rsp+1C8h+var_1C0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov bpl, 1 mov rsi, [rsp+1C8h+var_1C0]; char * mov rdi, r14; this call _ZN10serial_cpp15SerialExceptionC2EPKc; serial_cpp::SerialException::SerialException(char const*) xor ebp, ebp lea rsi, _ZTIN10serial_cpp15SerialExceptionE; lptinfo lea rdx, _ZN10serial_cpp15SerialExceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_71BB: jmp short $+2 loc_71BD: mov rbx, rax lea rax, [rsp+1C8h+var_1B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_71DB mov rsi, [rsp+1C8h+var_1B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71DB: test bpl, bpl jnz short loc_71E7 jmp short loc_71F6 jmp short $+2 loc_71E4: mov rbx, rax loc_71E7: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_71F6 jmp short $+2 loc_71F3: mov rbx, rax loc_71F6: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1C8h+var_120]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() jmp short loc_7221 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception loc_7221: mov rdi, rbx call __Unwind_Resume
long long serial_cpp::Serial::SerialImpl::setRTS(serial_cpp::Serial::SerialImpl *this, char a2) { long long v2; // rdi long long result; // rax unsigned int *v4; // rbx long long v5; // r14 long long v6; // rax serial_cpp::SerialException *v7; // r14 serial_cpp::PortNotOpenedException *exception; // r14 unsigned int *v9; // rbx long long v10; // r14 long long v11; // rax serial_cpp::SerialException *v12; // r14 int v13; // [rsp+4h] [rbp-1C4h] BYREF char *v14[2]; // [rsp+8h] [rbp-1C0h] BYREF _BYTE v15[16]; // [rsp+28h] [rbp-1A0h] BYREF _BYTE v16[8]; // [rsp+38h] [rbp-190h] BYREF _BYTE v17[104]; // [rsp+40h] [rbp-188h] BYREF if ( !*((_BYTE *)this + 44) ) { exception = (serial_cpp::PortNotOpenedException *)__cxa_allocate_exception(0x28uLL); serial_cpp::PortNotOpenedException::PortNotOpenedException(exception, "Serial::setRTS"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'serial_cpp::PortNotOpenedException, serial_cpp::PortNotOpenedException::~PortNotOpenedException); } v13 = 4; v2 = *((unsigned int *)this + 10); if ( a2 ) { result = ioctl(v2, 21526LL, &v13); if ( (_DWORD)result == -1 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v15); std::__ostream_insert<char,std::char_traits<char>>(v16, "setRTS failed on a call to ioctl(TIOCMBIS): ", 44LL); v4 = (unsigned int *)__errno_location(); v5 = std::ostream::operator<<(v16, *v4); std::__ostream_insert<char,std::char_traits<char>>(v5, " ", 1LL); v6 = strerror(*v4); std::operator<<<std::char_traits<char>>(v5, v6); v7 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL); std::stringbuf::str(v14, v17); serial_cpp::SerialException::SerialException(v7, v14[0]); __cxa_throw( v7, (struct type_info *)&`typeinfo for'serial_cpp::SerialException, serial_cpp::SerialException::~SerialException); } } else { result = ioctl(v2, 21527LL, &v13); if ( (_DWORD)result == -1 ) { std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v15); std::__ostream_insert<char,std::char_traits<char>>(v16, "setRTS failed on a call to ioctl(TIOCMBIC): ", 44LL); v9 = (unsigned int *)__errno_location(); v10 = std::ostream::operator<<(v16, *v9); std::__ostream_insert<char,std::char_traits<char>>(v10, " ", 1LL); v11 = strerror(*v9); std::operator<<<std::char_traits<char>>(v10, v11); v12 = (serial_cpp::SerialException *)__cxa_allocate_exception(0x28uLL); std::stringbuf::str(v14, v17); serial_cpp::SerialException::SerialException(v12, v14[0]); __cxa_throw( v12, (struct type_info *)&`typeinfo for'serial_cpp::SerialException, serial_cpp::SerialException::~SerialException); } } return result; }
setRTS: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1b0 CMP byte ptr [RDI + 0x2c],0x0 JZ 0x001070e7 MOV dword ptr [RSP + 0x4],0x4 MOV EDI,dword ptr [RDI + 0x28] LEA RDX,[RSP + 0x4] TEST SIL,SIL JZ 0x001070ca MOV ESI,0x5416 XOR EAX,EAX CALL 0x001033c0 CMP EAX,-0x1 JNZ 0x001070db LEA RDI,[RSP + 0x28] CALL 0x001031c0 LEA R14,[RSP + 0x38] LAB_00107032: LEA RSI,[0x10b725] MOV EDX,0x2c MOV RDI,R14 CALL 0x00103330 CALL 0x00103050 MOV RBX,RAX MOV ESI,dword ptr [RAX] MOV RDI,R14 CALL 0x001034d0 MOV R14,RAX LEA RSI,[0x10b7e6] MOV EDX,0x1 MOV RDI,RAX CALL 0x00103330 MOV EDI,dword ptr [RBX] CALL 0x001030e0 MOV RDI,R14 MOV RSI,RAX CALL 0x001032a0 LAB_00107081: MOV EDI,0x28 CALL 0x00103150 MOV R14,RAX LEA RSI,[RSP + 0x40] LAB_00107093: LEA RDI,[RSP + 0x8] CALL 0x00103460 MOV BPL,0x1 MOV RSI,qword ptr [RSP + 0x8] LAB_001070a5: MOV RDI,R14 CALL 0x00107e74 XOR EBP,EBP LEA RSI,[0x10fcd0] LEA RDX,[0x107fce] MOV RDI,R14 CALL 0x001034c0 LAB_001070ca: MOV ESI,0x5417 XOR EAX,EAX CALL 0x001033c0 CMP EAX,-0x1 JZ 0x00107119 LAB_001070db: ADD RSP,0x1b0 POP RBX POP R14 POP RBP RET LAB_001070e7: MOV EDI,0x28 CALL 0x00103150 MOV R14,RAX LAB_001070f4: LEA RSI,[0x10b716] MOV RDI,RAX CALL 0x0010845a LAB_00107103: LEA RSI,[0x10fd00] LEA RDX,[0x1085b4] MOV RDI,R14 CALL 0x001034c0 LAB_00107119: LEA RDI,[RSP + 0x28] CALL 0x001031c0 LEA R14,[RSP + 0x38] LAB_00107128: LEA RSI,[0x10b752] MOV EDX,0x2c MOV RDI,R14 CALL 0x00103330 CALL 0x00103050 MOV RBX,RAX MOV ESI,dword ptr [RAX] MOV RDI,R14 CALL 0x001034d0 MOV R14,RAX LEA RSI,[0x10b7e6] MOV EDX,0x1 MOV RDI,RAX CALL 0x00103330 MOV EDI,dword ptr [RBX] CALL 0x001030e0 MOV RDI,R14 MOV RSI,RAX CALL 0x001032a0 LAB_00107177: MOV EDI,0x28 CALL 0x00103150 MOV R14,RAX LEA RSI,[RSP + 0x40] LAB_00107189: LEA RDI,[RSP + 0x8] CALL 0x00103460 MOV BPL,0x1 MOV RSI,qword ptr [RSP + 0x8] LAB_0010719b: MOV RDI,R14 CALL 0x00107e74 XOR EBP,EBP LEA RSI,[0x10fcd0] LEA RDX,[0x107fce] MOV RDI,R14 CALL 0x001034c0
/* serial_cpp::Serial::SerialImpl::setRTS(bool) */ void __thiscall serial_cpp::Serial::SerialImpl::setRTS(SerialImpl *this,bool param_1) { int iVar1; int *piVar2; ostream *poVar3; char *pcVar4; SerialException *pSVar5; PortNotOpenedException *this_00; int4 local_1c4; char *local_1c0; stringstream local_1a0 [16]; ostream local_190 [376]; if (this[0x2c] == (SerialImpl)0x0) { this_00 = (PortNotOpenedException *)__cxa_allocate_exception(0x28); /* try { // try from 001070f4 to 00107102 has its CatchHandler @ 00107216 */ PortNotOpenedException::PortNotOpenedException(this_00,"Serial::setRTS"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&PortNotOpenedException::typeinfo, PortNotOpenedException::~PortNotOpenedException); } local_1c4 = 4; if (param_1) { iVar1 = ioctl(*(int *)(this + 0x28),0x5416,&local_1c4); if (iVar1 == -1) { std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 00107032 to 00107080 has its CatchHandler @ 001071f3 */ std::__ostream_insert<char,std::char_traits<char>> (local_190,"setRTS failed on a call to ioctl(TIOCMBIS): ",0x2c); piVar2 = __errno_location(); poVar3 = (ostream *)std::ostream::operator<<(local_190,*piVar2); std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1); pcVar4 = strerror(*piVar2); std::operator<<(poVar3,pcVar4); pSVar5 = (SerialException *)__cxa_allocate_exception(0x28); /* try { // try from 00107093 to 0010709c has its CatchHandler @ 001071e4 */ std::__cxx11::stringbuf::str(); /* try { // try from 001070a5 to 001070c4 has its CatchHandler @ 001071bd */ SerialException::SerialException(pSVar5,local_1c0); /* WARNING: Subroutine does not return */ __cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException); } } else { iVar1 = ioctl(*(int *)(this + 0x28),0x5417,&local_1c4); if (iVar1 == -1) { std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 00107128 to 00107176 has its CatchHandler @ 001071f1 */ std::__ostream_insert<char,std::char_traits<char>> (local_190,"setRTS failed on a call to ioctl(TIOCMBIC): ",0x2c); piVar2 = __errno_location(); poVar3 = (ostream *)std::ostream::operator<<(local_190,*piVar2); std::__ostream_insert<char,std::char_traits<char>>(poVar3," ",1); pcVar4 = strerror(*piVar2); std::operator<<(poVar3,pcVar4); pSVar5 = (SerialException *)__cxa_allocate_exception(0x28); /* try { // try from 00107189 to 00107192 has its CatchHandler @ 001071e2 */ std::__cxx11::stringbuf::str(); /* try { // try from 0010719b to 001071ba has its CatchHandler @ 001071bb */ SerialException::SerialException(pSVar5,local_1c0); /* WARNING: Subroutine does not return */ __cxa_throw(pSVar5,&SerialException::typeinfo,SerialException::~SerialException); } } return; }
34,890
common_chat_format_single[abi:cxx11](common_chat_templates const*, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
llama.cpp/common/chat.cpp
std::string common_chat_format_single( const struct common_chat_templates * tmpls, const std::vector<common_chat_msg> & past_msg, const common_chat_msg & new_msg, bool add_ass, bool use_jinja) { common_chat_templates_inputs inputs; inputs.use_jinja = use_jinja; std::string fmt_past_msg; if (!past_msg.empty()) { inputs.messages = past_msg; inputs.add_generation_prompt = false; fmt_past_msg = common_chat_templates_apply(tmpls, inputs).prompt; } std::ostringstream ss; // if the past_msg ends with a newline, we must preserve it in the formatted version if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') { ss << "\n"; }; // format chat with new_msg inputs.messages.push_back(new_msg); inputs.add_generation_prompt = add_ass; auto fmt_new_msg = common_chat_templates_apply(tmpls, inputs).prompt; // get the diff part ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size()); return ss.str(); }
O3
cpp
common_chat_format_single[abi:cxx11](common_chat_templates const*, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2d8, %rsp # imm = 0x2D8 movl %r8d, %ebp movq %rcx, %r15 movq %rsi, %r14 movq %rdi, 0x40(%rsp) xorl %eax, %eax leaq 0x108(%rsp), %r13 movq %rax, -0x18(%r13) xorps %xmm0, %xmm0 movaps %xmm0, -0x28(%r13) movq %r13, -0x10(%r13) movq %rax, -0x8(%r13) movb %al, (%r13) leaq 0x128(%rsp), %rbx movq %rbx, -0x10(%rbx) movq %rax, -0x8(%rbx) movb %al, (%rbx) movb $0x1, %cl movb %cl, 0x10(%rbx) movaps %xmm0, 0x18(%rbx) movups %xmm0, 0x25(%rbx) movb %cl, 0x35(%rbx) movb %r9b, 0x11(%rbx) leaq 0x10(%rsp), %rcx movq %rcx, -0x10(%rcx) movq %rax, -0x8(%rcx) movb %al, (%rcx) movq (%rdx), %rax cmpq 0x8(%rdx), %rax je 0x96283 leaq 0xe0(%rsp), %rdi movq %rdx, %rsi callq 0xb1b46 leaq 0xe0(%rsp), %rdx movb $0x0, 0x58(%rdx) leaq 0x160(%rsp), %rdi movq %r14, %rsi callq 0x93d1f leaq 0x168(%rsp), %rsi movq %rsp, %rdi callq 0x218c0 leaq 0x1e0(%rsp), %rdi callq 0x283f2 leaq 0x1c8(%rsp), %rdi callq 0x283f2 leaq 0x1b0(%rsp), %r12 movq %r12, %rdi callq 0x28a76 movq -0x28(%r12), %rdi leaq 0x198(%rsp), %rax cmpq %rax, %rdi je 0x96262 movq 0x198(%rsp), %rsi incq %rsi callq 0x21170 leaq 0x178(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x96283 movq 0x178(%rsp), %rsi incq %rsi callq 0x21170 leaq 0x160(%rsp), %rdi callq 0x22010 testb %bpl, %bpl je 0x962c3 movq 0x8(%rsp), %rax testq %rax, %rax je 0x962c3 movq (%rsp), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x962c3 leaq 0x8b25f(%rip), %rsi # 0x121510 leaq 0x160(%rsp), %rdi movl $0x1, %edx callq 0x22070 leaq 0xe0(%rsp), %rdi movq %r15, %rsi callq 0xb101e leaq 0xe0(%rsp), %rdx movb %bpl, 0x58(%rdx) leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0x93d1f leaq 0x30(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x60(%rsp), %r15 movq -0x10(%r15), %rax cmpq %r15, %rax je 0x96319 movq %rax, 0x20(%rsp) movq 0x58(%rsp), %r12 movq 0x60(%rsp), %rax movq %rax, 0x30(%rsp) jmp 0x9632e movq 0x58(%rsp), %r12 leaq 0x1(%r12), %rdx movq %r14, %rdi movq %r15, %rsi callq 0x210e0 movq %r12, 0x28(%rsp) leaq 0xc8(%rsp), %rdi movq %r15, -0x78(%rdi) movq $0x0, -0x70(%rdi) movb $0x0, -0x68(%rdi) callq 0x283f2 leaq 0xb0(%rsp), %rdi callq 0x283f2 leaq 0x98(%rsp), %r12 movq %r12, %rdi callq 0x28a76 movq -0x28(%r12), %rdi leaq 0x80(%rsp), %rax cmpq %rax, %rdi je 0x9638f movq 0x80(%rsp), %rsi incq %rsi callq 0x21170 movq 0x50(%rsp), %rdi cmpq %r15, %rdi je 0x963a6 movq 0x60(%rsp), %rsi incq %rsi callq 0x21170 movq 0x8(%rsp), %rdx leaq 0x20(%rsp), %rsi movq 0x8(%rsi), %rcx subq %rdx, %rcx leaq 0x48(%rsp), %rdi callq 0x220d0 movq 0x40(%rsp), %r15 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x160(%rsp), %rdi callq 0x22070 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x963f8 movq 0x58(%rsp), %rsi incq %rsi callq 0x21170 leaq 0x168(%rsp), %rsi movq %r15, %rdi callq 0x21640 movq 0x20(%rsp), %rdi cmpq %r14, %rdi je 0x9641f movq 0x30(%rsp), %rsi incq %rsi callq 0x21170 leaq 0x140(%rsp), %r14 movq 0xceb22(%rip), %rsi # 0x164f50 leaq 0x160(%rsp), %rdi callq 0x21c70 leaq 0x1d0(%rsp), %rdi callq 0x21c40 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x96463 movq 0x10(%rsp), %rsi incq %rsi callq 0x21170 movq %r14, %rdi callq 0xb18d8 movq 0x118(%rsp), %rdi cmpq %rbx, %rdi je 0x96488 movq 0x128(%rsp), %rsi incq %rsi callq 0x21170 movq 0xf8(%rsp), %rdi cmpq %r13, %rdi je 0x964a5 movq 0x108(%rsp), %rsi incq %rsi callq 0x21170 leaq 0xe0(%rsp), %rdi callq 0xb11aa movq %r15, %rax addq $0x2d8, %rsp # imm = 0x2D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9650b jmp 0x9650b jmp 0x964ed movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x964f0 movq 0x58(%rsp), %rsi incq %rsi callq 0x21170 jmp 0x964f0 movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r14, %rdi je 0x96513 movq 0x30(%rsp), %rsi incq %rsi callq 0x21170 jmp 0x96513 jmp 0x96510 movq %rax, %rbx jmp 0x96534 movq %rax, %rbx movq 0xcea36(%rip), %rsi # 0x164f50 leaq 0x160(%rsp), %rdi callq 0x21c70 leaq 0x1d0(%rsp), %rdi callq 0x21c40 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x9654f movq 0x10(%rsp), %rsi incq %rsi callq 0x21170 leaq 0xe0(%rsp), %rdi callq 0xb1b00 movq %rbx, %rdi callq 0x21af0
_Z25common_chat_format_singleB5cxx11PK21common_chat_templatesRKSt6vectorI15common_chat_msgSaIS3_EERKS3_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2D8h mov ebp, r8d mov r15, rcx mov r14, rsi mov [rsp+308h+var_2C8], rdi xor eax, eax lea r13, [rsp+308h+var_200] mov [r13-18h], rax xorps xmm0, xmm0 movaps xmmword ptr [r13-28h], xmm0 mov [r13-10h], r13 mov [r13-8], rax mov [r13+0], al lea rbx, [rsp+308h+var_1E0] mov [rbx-10h], rbx mov [rbx-8], rax mov [rbx], al mov cl, 1 mov [rbx+10h], cl movaps xmmword ptr [rbx+18h], xmm0 movups xmmword ptr [rbx+25h], xmm0 mov [rbx+35h], cl mov [rbx+11h], r9b lea rcx, [rsp+308h+var_2F8] mov [rcx-10h], rcx mov [rcx-8], rax mov [rcx], al mov rax, [rdx] cmp rax, [rdx+8] jz loc_96283 lea rdi, [rsp+308h+var_228] mov rsi, rdx call _ZNSt6vectorI15common_chat_msgSaIS0_EEaSERKS2_; std::vector<common_chat_msg>::operator=(std::vector<common_chat_msg> const&) lea rdx, [rsp+308h+var_228] mov byte ptr [rdx+58h], 0 lea rdi, [rsp+308h+var_1A8] mov rsi, r14 call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&) lea rsi, [rsp+308h+var_1A0] mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+308h+var_128] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+308h+var_140] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea r12, [rsp+308h+var_158] mov rdi, r12 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector() mov rdi, [r12-28h]; void * lea rax, [rsp+308h+var_170] cmp rdi, rax jz short loc_96262 mov rsi, [rsp+308h+var_170] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96262: lea rax, [rsp+308h+var_190] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_96283 mov rsi, [rsp+308h+var_190] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96283: lea rdi, [rsp+308h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) test bpl, bpl jz short loc_962C3 mov rax, [rsp+308h+var_300] test rax, rax jz short loc_962C3 mov rcx, [rsp+308h+var_308] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_962C3 lea rsi, aExampleToolCal+1Ch; "\n" lea rdi, [rsp+308h+var_1A8] mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_962C3: lea rdi, [rsp+308h+var_228] mov rsi, r15 call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&) lea rdx, [rsp+308h+var_228] mov [rdx+58h], bpl lea rdi, [rsp+308h+var_2C0] mov rsi, r14 call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&) lea r14, [rsp+308h+var_2D8] mov [r14-10h], r14 lea r15, [rsp+308h+var_2A8] mov rax, [r15-10h] cmp rax, r15 jz short loc_96319 mov [rsp+308h+var_2E8], rax mov r12, [rsp+308h+var_2B0] mov rax, [rsp+308h+var_2A8] mov [rsp+308h+var_2D8], rax jmp short loc_9632E loc_96319: mov r12, [rsp+308h+var_2B0] lea rdx, [r12+1] mov rdi, r14 mov rsi, r15 call _memcpy loc_9632E: mov [rsp+308h+var_2E0], r12 lea rdi, [rsp+308h+var_240] mov [rdi-78h], r15 mov qword ptr [rdi-70h], 0 mov byte ptr [rdi-68h], 0 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+308h+var_258] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea r12, [rsp+308h+var_270] mov rdi, r12 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector() mov rdi, [r12-28h]; void * lea rax, [rsp+308h+var_288] cmp rdi, rax jz short loc_9638F mov rsi, [rsp+308h+var_288] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9638F: mov rdi, [rsp+308h+var_2B8]; void * cmp rdi, r15 jz short loc_963A6 mov rsi, [rsp+308h+var_2A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_963A6: mov rdx, [rsp+308h+var_300] lea rsi, [rsp+308h+var_2E8] mov rcx, [rsi+8] sub rcx, rdx lea rdi, [rsp+308h+var_2C0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov r15, [rsp+308h+var_2C8] mov rsi, [rsp+308h+var_2C0] mov rdx, [rsp+308h+var_2B8] lea rdi, [rsp+308h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+308h+var_2B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_963F8 mov rsi, [rsp+308h+var_2B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_963F8: lea rsi, [rsp+308h+var_1A0] mov rdi, r15 call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rdi, [rsp+308h+var_2E8]; void * cmp rdi, r14 jz short loc_9641F mov rsi, [rsp+308h+var_2D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9641F: lea r14, [rsp+308h+var_1C8] mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+308h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+308h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, [rsp+308h+var_308]; void * lea rax, [rsp+308h+var_2F8] cmp rdi, rax jz short loc_96463 mov rsi, [rsp+308h+var_2F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96463: mov rdi, r14 call _ZNSt6vectorI16common_chat_toolSaIS0_EED2Ev; std::vector<common_chat_tool>::~vector() mov rdi, [rsp+308h+var_1F0]; void * cmp rdi, rbx jz short loc_96488 mov rsi, [rsp+308h+var_1E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96488: mov rdi, [rsp+308h+var_210]; void * cmp rdi, r13 jz short loc_964A5 mov rsi, [rsp+308h+var_200] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_964A5: lea rdi, [rsp+308h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 2D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_9650B jmp short loc_9650B jmp short loc_964ED mov rbx, rax lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_964F0 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_964F0 loc_964ED: mov rbx, rax loc_964F0: mov rdi, [rsp+arg_18]; void * cmp rdi, r14 jz short loc_96513 mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_96513 jmp short loc_96510 loc_9650B: mov rbx, rax jmp short loc_96534 loc_96510: mov rbx, rax loc_96513: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_158] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_1C8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_96534: mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_9654F mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9654F: lea rdi, [rsp+arg_D8]; this call _ZN28common_chat_templates_inputsD2Ev; common_chat_templates_inputs::~common_chat_templates_inputs() mov rdi, rbx call __Unwind_Resume
long long common_chat_format_single[abi:cxx11]( long long a1, long long a2, _QWORD *a3, long long a4, char a5, char a6) { long long v8; // r12 long long v9; // r15 void *v11; // [rsp+0h] [rbp-308h] BYREF long long v12; // [rsp+8h] [rbp-300h] _QWORD v13[2]; // [rsp+10h] [rbp-2F8h] BYREF void *v14; // [rsp+20h] [rbp-2E8h] BYREF long long v15; // [rsp+28h] [rbp-2E0h] _QWORD v16[2]; // [rsp+30h] [rbp-2D8h] BYREF long long v17; // [rsp+40h] [rbp-2C8h] long long *v18; // [rsp+48h] [rbp-2C0h] BYREF void *v19; // [rsp+50h] [rbp-2B8h] long long v20; // [rsp+58h] [rbp-2B0h] BYREF _QWORD v21[2]; // [rsp+60h] [rbp-2A8h] BYREF long long *v22; // [rsp+70h] [rbp-298h] long long v23; // [rsp+80h] [rbp-288h] BYREF _BYTE v24[24]; // [rsp+98h] [rbp-270h] BYREF _BYTE v25[24]; // [rsp+B0h] [rbp-258h] BYREF _BYTE v26[24]; // [rsp+C8h] [rbp-240h] BYREF __int128 v27; // [rsp+E0h] [rbp-228h] BYREF long long v28; // [rsp+F0h] [rbp-218h] void *v29; // [rsp+F8h] [rbp-210h] long long v30; // [rsp+100h] [rbp-208h] _QWORD v31[2]; // [rsp+108h] [rbp-200h] BYREF void *v32; // [rsp+118h] [rbp-1F0h] long long v33; // [rsp+120h] [rbp-1E8h] _QWORD v34[2]; // [rsp+128h] [rbp-1E0h] BYREF char v35; // [rsp+138h] [rbp-1D0h] char v36; // [rsp+139h] [rbp-1CFh] _BYTE v37[32]; // [rsp+140h] [rbp-1C8h] BYREF _BYTE v38[8]; // [rsp+160h] [rbp-1A8h] BYREF void *v39[2]; // [rsp+168h] [rbp-1A0h] BYREF long long v40; // [rsp+178h] [rbp-190h] BYREF long long *v41; // [rsp+188h] [rbp-180h] long long v42; // [rsp+198h] [rbp-170h] BYREF _BYTE v43[24]; // [rsp+1B0h] [rbp-158h] BYREF _BYTE v44[8]; // [rsp+1C8h] [rbp-140h] BYREF _BYTE v45[16]; // [rsp+1D0h] [rbp-138h] BYREF _BYTE v46[296]; // [rsp+1E0h] [rbp-128h] BYREF v17 = a1; v28 = 0LL; v27 = 0LL; v29 = v31; v30 = 0LL; LOBYTE(v31[0]) = 0; v32 = v34; v33 = 0LL; LOBYTE(v34[0]) = 0; v35 = 1; memset(v37, 0, 29); v37[29] = 1; v36 = a6; v11 = v13; v12 = 0LL; LOBYTE(v13[0]) = 0; if ( *a3 != a3[1] ) { std::vector<common_chat_msg>::operator=(&v27, a3); v35 = 0; common_chat_templates_apply((long long)v38, a2, (long long *)&v27); std::string::operator=(&v11, v39); std::vector<std::string>::~vector((long long)v46); std::vector<std::string>::~vector((long long)v44); std::vector<common_grammar_trigger>::~vector((long long)v43); if ( v41 != &v42 ) operator delete(v41, v42 + 1); if ( v39[0] != &v40 ) operator delete(v39[0], v40 + 1); } std::ostringstream::basic_ostringstream(v38); if ( a5 && v12 && *((char *)v11 + v12 - 1) == 10 ) std::__ostream_insert<char,std::char_traits<char>>(v38, "\n", 1LL); std::vector<common_chat_msg>::push_back(&v27, a4); v35 = a5; common_chat_templates_apply((long long)&v18, a2, (long long *)&v27); v14 = v16; if ( v19 == v21 ) { v8 = v20; memcpy(v16, v21, v20 + 1); } else { v14 = v19; v8 = v20; v16[0] = v21[0]; } v15 = v8; v19 = v21; v20 = 0LL; LOBYTE(v21[0]) = 0; std::vector<std::string>::~vector((long long)v26); std::vector<std::string>::~vector((long long)v25); std::vector<common_grammar_trigger>::~vector((long long)v24); if ( v22 != &v23 ) operator delete(v22, v23 + 1); if ( v19 != v21 ) operator delete(v19, v21[0] + 1LL); std::string::substr(&v18, &v14, v12, v15 - v12); v9 = v17; std::__ostream_insert<char,std::char_traits<char>>(v38, v18, v19); if ( v18 != &v20 ) operator delete(v18, v20 + 1); std::stringbuf::str(v9, v39); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); std::ostringstream::~ostringstream(v38, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v45); if ( v11 != v13 ) operator delete(v11, v13[0] + 1LL); std::vector<common_chat_tool>::~vector(v37); if ( v32 != v34 ) operator delete(v32, v34[0] + 1LL); if ( v29 != v31 ) operator delete(v29, v31[0] + 1LL); std::vector<common_chat_msg>::~vector(&v27); return v9; }
common_chat_format_single[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2d8 MOV EBP,R8D MOV R15,RCX MOV R14,RSI MOV qword ptr [RSP + 0x40],RDI XOR EAX,EAX LEA R13,[RSP + 0x108] MOV qword ptr [R13 + -0x18],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [R13 + -0x28],XMM0 MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],RAX MOV byte ptr [R13],AL LEA RBX,[RSP + 0x128] MOV qword ptr [RBX + -0x10],RBX MOV qword ptr [RBX + -0x8],RAX MOV byte ptr [RBX],AL MOV CL,0x1 MOV byte ptr [RBX + 0x10],CL MOVAPS xmmword ptr [RBX + 0x18],XMM0 MOVUPS xmmword ptr [RBX + 0x25],XMM0 MOV byte ptr [RBX + 0x35],CL MOV byte ptr [RBX + 0x11],R9B LEA RCX,[RSP + 0x10] MOV qword ptr [RCX + -0x10],RCX MOV qword ptr [RCX + -0x8],RAX MOV byte ptr [RCX],AL MOV RAX,qword ptr [RDX] CMP RAX,qword ptr [RDX + 0x8] JZ 0x00196283 LAB_001961da: LEA RDI,[RSP + 0xe0] MOV RSI,RDX CALL 0x001b1b46 LEA RDX,[RSP + 0xe0] MOV byte ptr [RDX + 0x58],0x0 LAB_001961f6: LEA RDI,[RSP + 0x160] MOV RSI,R14 CALL 0x00193d1f LEA RSI,[RSP + 0x168] MOV RDI,RSP CALL 0x001218c0 LEA RDI,[RSP + 0x1e0] CALL 0x001283f2 LEA RDI,[RSP + 0x1c8] CALL 0x001283f2 LEA R12,[RSP + 0x1b0] MOV RDI,R12 CALL 0x00128a76 MOV RDI,qword ptr [R12 + -0x28] LEA RAX,[RSP + 0x198] CMP RDI,RAX JZ 0x00196262 MOV RSI,qword ptr [RSP + 0x198] INC RSI CALL 0x00121170 LAB_00196262: LEA RAX,[RSP + 0x178] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00196283 MOV RSI,qword ptr [RSP + 0x178] INC RSI CALL 0x00121170 LAB_00196283: LEA RDI,[RSP + 0x160] CALL 0x00122010 TEST BPL,BPL JZ 0x001962c3 MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x001962c3 MOV RCX,qword ptr [RSP] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x001962c3 LAB_001962aa: LEA RSI,[0x221510] LEA RDI,[RSP + 0x160] MOV EDX,0x1 CALL 0x00122070 LAB_001962c3: LEA RDI,[RSP + 0xe0] MOV RSI,R15 CALL 0x001b101e LEA RDX,[RSP + 0xe0] MOV byte ptr [RDX + 0x58],BPL LAB_001962df: LEA RDI,[RSP + 0x48] MOV RSI,R14 CALL 0x00193d1f LAB_001962ec: LEA R14,[RSP + 0x30] MOV qword ptr [R14 + -0x10],R14 LEA R15,[RSP + 0x60] MOV RAX,qword ptr [R15 + -0x10] CMP RAX,R15 JZ 0x00196319 MOV qword ptr [RSP + 0x20],RAX MOV R12,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x30],RAX JMP 0x0019632e LAB_00196319: MOV R12,qword ptr [RSP + 0x58] LEA RDX,[R12 + 0x1] MOV RDI,R14 MOV RSI,R15 CALL 0x001210e0 LAB_0019632e: MOV qword ptr [RSP + 0x28],R12 LEA RDI,[RSP + 0xc8] MOV qword ptr [RDI + -0x78],R15 MOV qword ptr [RDI + -0x70],0x0 MOV byte ptr [RDI + -0x68],0x0 CALL 0x001283f2 LEA RDI,[RSP + 0xb0] CALL 0x001283f2 LEA R12,[RSP + 0x98] MOV RDI,R12 CALL 0x00128a76 MOV RDI,qword ptr [R12 + -0x28] LEA RAX,[RSP + 0x80] CMP RDI,RAX JZ 0x0019638f MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x00121170 LAB_0019638f: MOV RDI,qword ptr [RSP + 0x50] CMP RDI,R15 JZ 0x001963a6 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x00121170 LAB_001963a6: MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] MOV RCX,qword ptr [RSI + 0x8] SUB RCX,RDX LAB_001963b7: LEA RDI,[RSP + 0x48] CALL 0x001220d0 MOV R15,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LAB_001963d0: LEA RDI,[RSP + 0x160] CALL 0x00122070 LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001963f8 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00121170 LAB_001963f8: LEA RSI,[RSP + 0x168] LAB_00196400: MOV RDI,R15 CALL 0x00121640 LAB_00196408: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R14 JZ 0x0019641f MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00121170 LAB_0019641f: LEA R14,[RSP + 0x140] MOV RSI,qword ptr [0x00264f50] LEA RDI,[RSP + 0x160] CALL 0x00121c70 LEA RDI,[RSP + 0x1d0] CALL 0x00121c40 MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x00196463 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00121170 LAB_00196463: MOV RDI,R14 CALL 0x001b18d8 MOV RDI,qword ptr [RSP + 0x118] CMP RDI,RBX JZ 0x00196488 MOV RSI,qword ptr [RSP + 0x128] INC RSI CALL 0x00121170 LAB_00196488: MOV RDI,qword ptr [RSP + 0xf8] CMP RDI,R13 JZ 0x001964a5 MOV RSI,qword ptr [RSP + 0x108] INC RSI CALL 0x00121170 LAB_001964a5: LEA RDI,[RSP + 0xe0] CALL 0x001b11aa MOV RAX,R15 ADD RSP,0x2d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_single[abi:cxx11](common_chat_templates const*, std::vector<common_chat_msg, std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */ common_chat_templates * common_chat_format_single_abi_cxx11_ (common_chat_templates *param_1,vector *param_2,common_chat_msg *param_3,bool param_4, bool param_5) { common_chat_templates *pcVar1; int7 in_register_00000009; int1 *local_308; long local_300; int1 local_2f8; int7 uStack_2f7; long *local_2e8 [2]; long local_2d8 [2]; common_chat_templates *local_2c8; long *local_2c0; long *local_2b8; long local_2b0; int1 local_2a8; int7 uStack_2a7; long *local_298; long local_288 [3]; vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_270 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_258 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_240 [24]; int8 local_228; int8 uStack_220; int8 local_218; int1 *local_210; int8 local_208; int1 local_200; int7 uStack_1ff; int1 *local_1f0; int8 local_1e8; int1 local_1e0; int7 uStack_1df; int1 local_1d0; int8 local_1c8; int5 uStack_1c0; int3 uStack_1bb; int5 uStack_1b8; int8 uStack_1b3; int1 local_1ab; common_chat_templates local_1a8 [8]; long *local_1a0 [2]; long local_190 [2]; long *local_180; long local_170 [3]; vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_158 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_140 [8]; ios_base local_138 [16]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_128 [248]; local_218 = 0; local_228 = 0; uStack_220 = 0; local_208 = 0; local_200 = 0; local_1e8 = 0; local_1e0 = 0; local_1d0 = 1; local_1c8 = 0; uStack_1c0 = 0; uStack_1bb = 0; uStack_1b8 = 0; uStack_1b3 = 0; local_1ab = 1; local_308 = &local_2f8; local_300 = 0; local_2f8 = 0; local_2c8 = param_1; local_210 = &local_200; local_1f0 = &local_1e0; if (*(long *)param_3 != *(long *)(param_3 + 8)) { /* try { // try from 001961da to 001961e9 has its CatchHandler @ 001964c9 */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::operator= ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_228, (vector *)param_3); local_1d0 = 0; /* try { // try from 001961f6 to 00196205 has its CatchHandler @ 001964c7 */ common_chat_templates_apply(local_1a8,(common_chat_templates_inputs *)param_2); std::__cxx11::string::operator=((string *)&local_308,(string *)local_1a0); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_128); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_140); std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_158); if (local_180 != local_170) { operator_delete(local_180,local_170[0] + 1); } if (local_1a0[0] != local_190) { operator_delete(local_1a0[0],local_190[0] + 1); } } /* try { // try from 00196283 to 0019628f has its CatchHandler @ 0019650b */ std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8); if (((param_5) && (local_300 != 0)) && (local_308[local_300 + -1] == '\n')) { /* try { // try from 001962aa to 001962d2 has its CatchHandler @ 00196510 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,"\n",1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_228, (common_chat_msg *)CONCAT71(in_register_00000009,param_4)); /* try { // try from 001962df to 001962eb has its CatchHandler @ 00196509 */ local_1d0 = param_5; common_chat_templates_apply ((common_chat_templates *)&local_2c0,(common_chat_templates_inputs *)param_2); if (local_2b8 == (long *)&local_2a8) { local_2e8[0] = local_2d8; memcpy(local_2d8,&local_2a8,local_2b0 + 1); } else { local_2e8[0] = local_2b8; local_2d8[0] = CONCAT71(uStack_2a7,local_2a8); } local_2b0 = 0; local_2a8 = 0; local_2b8 = (long *)&local_2a8; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_240); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_258); std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_270); if (local_298 != local_288) { operator_delete(local_298,local_288[0] + 1); } if (local_2b8 != (long *)&local_2a8) { operator_delete(local_2b8,CONCAT71(uStack_2a7,local_2a8) + 1); } /* try { // try from 001963b7 to 001963c0 has its CatchHandler @ 001964ed */ std::__cxx11::string::substr((ulong)&local_2c0,(ulong)local_2e8); pcVar1 = local_2c8; /* try { // try from 001963d0 to 001963dc has its CatchHandler @ 001964cd */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_2c0,(long)local_2b8); if (local_2c0 != &local_2b0) { operator_delete(local_2c0,local_2b0 + 1); } /* try { // try from 00196400 to 00196407 has its CatchHandler @ 001964cb */ std::__cxx11::stringbuf::str(); if (local_2e8[0] != local_2d8) { operator_delete(local_2e8[0],local_2d8[0] + 1); } std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8); std::ios_base::~ios_base(local_138); if (local_308 != &local_2f8) { operator_delete(local_308,CONCAT71(uStack_2f7,local_2f8) + 1); } std::vector<common_chat_tool,std::allocator<common_chat_tool>>::~vector ((vector<common_chat_tool,std::allocator<common_chat_tool>> *)&local_1c8); if (local_1f0 != &local_1e0) { operator_delete(local_1f0,CONCAT71(uStack_1df,local_1e0) + 1); } if (local_210 != &local_200) { operator_delete(local_210,CONCAT71(uStack_1ff,local_200) + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_228); return pcVar1; }
34,891
partitioned_key_cache_write
eloqsql/mysys/mf_keycache.c
static int partitioned_key_cache_write(PARTITIONED_KEY_CACHE_CB *keycache, File file, void *file_extra, my_off_t filepos, int level, uchar *buff, uint length, uint block_length __attribute__((unused)), int dont_write) { uint w_length; ulonglong *part_map= (ulonglong *) file_extra; uint offset= (uint) (filepos % keycache->key_cache_block_size); DBUG_ENTER("partitioned_key_cache_write"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u block_length: %u" " key_block_length: %u", (uint) file, (ulong) filepos, length, block_length, keycache ? keycache->key_cache_block_size : 0)); /* Write data in key_cache_block_size increments */ do { SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition_for_write(keycache, file, filepos, part_map); w_length = length; set_if_smaller(w_length, keycache->key_cache_block_size - offset ); if (simple_key_cache_write(partition, file, 0, filepos, level, buff, w_length, block_length, dont_write)) DBUG_RETURN(1); filepos+= w_length; buff+= w_length; offset= 0; } while ((length-= w_length)); DBUG_RETURN(0); }
O3
c
partitioned_key_cache_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %rbx movl %r8d, -0x2c(%rbp) movq %rcx, %r15 movq %rdx, -0x40(%rbp) movq %rdi, %r13 movl 0x10(%rbp), %r12d movl 0x18(%rdi), %ecx movq %r15, %rax xorl %edx, %edx divq %rcx movq %rdx, %r8 movslq %esi, %rax movq %rax, -0x38(%rbp) movl 0x18(%r13), %ecx movl 0x1c(%r13), %edi movq %r15, %rax xorl %edx, %edx divq %rcx movq -0x38(%rbp), %rsi addq %rsi, %rax xorl %edx, %edx divq %rdi movq %rdx, %rcx movl $0x1, %eax shlq %cl, %rax movq -0x40(%rbp), %rdx orq %rax, (%rdx) movq 0x8(%r13), %rax movq (%rax,%rcx,8), %rdi movl 0x18(%r13), %r14d subl %r8d, %r14d cmpl %r14d, %r12d cmovbl %r12d, %r14d movl 0x20(%rbp), %eax movl %eax, 0x10(%rsp) movl %r14d, (%rsp) movq %r15, %rcx movl -0x2c(%rbp), %r8d movq %rbx, %r9 callq 0x9943e testl %eax, %eax jne 0x9ab68 movl %r14d, %eax addq %rax, %rbx addq %rax, %r15 xorl %r8d, %r8d subl %r14d, %r12d jne 0x9aaf3 jmp 0x9ab6e movl $0x1, %r8d movl %r8d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
partitioned_key_cache_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, r9 mov [rbp+var_2C], r8d mov r15, rcx mov [rbp+var_40], rdx mov r13, rdi mov r12d, [rbp+arg_0] mov ecx, [rdi+18h] mov rax, r15 xor edx, edx div rcx mov r8, rdx movsxd rax, esi mov [rbp+var_38], rax loc_9AAF3: mov ecx, [r13+18h] mov edi, [r13+1Ch] mov rax, r15 xor edx, edx div rcx mov rsi, [rbp+var_38] add rax, rsi xor edx, edx div rdi mov rcx, rdx mov eax, 1 shl rax, cl mov rdx, [rbp+var_40] or [rdx], rax mov rax, [r13+8] mov rdi, [rax+rcx*8] mov r14d, [r13+18h] sub r14d, r8d cmp r12d, r14d cmovb r14d, r12d mov eax, [rbp+arg_10] mov [rsp+60h+var_50], eax mov [rsp+60h+var_60], r14d mov rcx, r15 mov r8d, [rbp+var_2C] mov r9, rbx call simple_key_cache_write test eax, eax jnz short loc_9AB68 mov eax, r14d add rbx, rax add r15, rax xor r8d, r8d sub r12d, r14d jnz short loc_9AAF3 jmp short loc_9AB6E loc_9AB68: mov r8d, 1 loc_9AB6E: mov eax, r8d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long partitioned_key_cache_write( long long a1, signed int a2, _QWORD *a3, unsigned long long a4, int a5, long long a6, unsigned int a7, int a8, int a9) { unsigned long long v10; // r15 unsigned long long v12; // r8 unsigned long long v13; // rcx unsigned int v14; // r14d int v16; // [rsp+8h] [rbp-58h] v10 = a4; v12 = a4 % *(unsigned int *)(a1 + 24); while ( 1 ) { v13 = (a2 + v10 / *(unsigned int *)(a1 + 24)) % *(unsigned int *)(a1 + 28); *a3 |= 1LL << v13; v14 = *(_DWORD *)(a1 + 24) - v12; if ( a7 < v14 ) v14 = a7; if ( (unsigned int)simple_key_cache_write( *(const __m128i **)(*(_QWORD *)(a1 + 8) + 8 * v13), a2, (long long)a3, v10, a5, a6, v14, v16, a9) ) break; a6 += v14; v10 += v14; LODWORD(v12) = 0; a7 -= v14; if ( !a7 ) return (unsigned int)v12; } LODWORD(v12) = 1; return (unsigned int)v12; }
partitioned_key_cache_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,R9 MOV dword ptr [RBP + -0x2c],R8D MOV R15,RCX MOV qword ptr [RBP + -0x40],RDX MOV R13,RDI MOV R12D,dword ptr [RBP + 0x10] MOV ECX,dword ptr [RDI + 0x18] MOV RAX,R15 XOR EDX,EDX DIV RCX MOV R8,RDX MOVSXD RAX,ESI MOV qword ptr [RBP + -0x38],RAX LAB_0019aaf3: MOV ECX,dword ptr [R13 + 0x18] MOV EDI,dword ptr [R13 + 0x1c] MOV RAX,R15 XOR EDX,EDX DIV RCX MOV RSI,qword ptr [RBP + -0x38] ADD RAX,RSI XOR EDX,EDX DIV RDI MOV RCX,RDX MOV EAX,0x1 SHL RAX,CL MOV RDX,qword ptr [RBP + -0x40] OR qword ptr [RDX],RAX MOV RAX,qword ptr [R13 + 0x8] MOV RDI,qword ptr [RAX + RCX*0x8] MOV R14D,dword ptr [R13 + 0x18] SUB R14D,R8D CMP R12D,R14D CMOVC R14D,R12D MOV EAX,dword ptr [RBP + 0x20] MOV dword ptr [RSP + 0x10],EAX MOV dword ptr [RSP],R14D MOV RCX,R15 MOV R8D,dword ptr [RBP + -0x2c] MOV R9,RBX CALL 0x0019943e TEST EAX,EAX JNZ 0x0019ab68 MOV EAX,R14D ADD RBX,RAX ADD R15,RAX XOR R8D,R8D SUB R12D,R14D JNZ 0x0019aaf3 JMP 0x0019ab6e LAB_0019ab68: MOV R8D,0x1 LAB_0019ab6e: MOV EAX,R8D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 partitioned_key_cache_write (long param_1,int param_2,ulong *param_3,ulong param_4,int4 param_5,long param_6, uint param_7) { int1 auVar1 [16]; int iVar2; ulong uVar3; uint uVar4; uVar3 = param_4 % (ulong)*(uint *)(param_1 + 0x18); while( true ) { auVar1._8_8_ = 0; auVar1._0_8_ = param_4 / *(uint *)(param_1 + 0x18) + (long)param_2; auVar1 = auVar1 % ZEXT416(*(uint *)(param_1 + 0x1c)); *param_3 = *param_3 | 1L << (auVar1[0] & 0x3f); uVar4 = *(int *)(param_1 + 0x18) - (int)uVar3; if (param_7 < uVar4) { uVar4 = param_7; } iVar2 = simple_key_cache_write (*(int8 *)(*(long *)(param_1 + 8) + auVar1._0_8_ * 8),(long)param_2, param_3,param_4,param_5,param_6,uVar4); if (iVar2 != 0) break; param_6 = param_6 + (ulong)uVar4; param_4 = param_4 + uVar4; uVar3 = 0; param_7 = param_7 - uVar4; if (param_7 == 0) { return 0; } } return 1; }
34,892
my_lengthsp_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_lengthsp_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t length) { const char *end= ptr + length; while (end > ptr + 1 && end[-1] == ' ' && end[-2] == '\0') end-= 2; return (size_t) (end - ptr); }
O0
c
my_lengthsp_mb2: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rdx addq $0x1, %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x21(%rbp) jbe 0x59485 movq -0x20(%rbp), %rax movsbl -0x1(%rax), %ecx xorl %eax, %eax cmpl $0x20, %ecx movb %al, -0x21(%rbp) jne 0x59485 movq -0x20(%rbp), %rax movsbl -0x2(%rax), %eax cmpl $0x0, %eax sete %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x5948e jmp 0x5949c movq -0x20(%rbp), %rax addq $-0x2, %rax movq %rax, -0x20(%rbp) jmp 0x5944c movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopl (%rax)
my_lengthsp_mb2: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_20], rax loc_5944C: mov rcx, [rbp+var_20] mov rdx, [rbp+var_10] add rdx, 1 xor eax, eax cmp rcx, rdx mov [rbp+var_21], al jbe short loc_59485 mov rax, [rbp+var_20] movsx ecx, byte ptr [rax-1] xor eax, eax cmp ecx, 20h ; ' ' mov [rbp+var_21], al jnz short loc_59485 mov rax, [rbp+var_20] movsx eax, byte ptr [rax-2] cmp eax, 0 setz al mov [rbp+var_21], al loc_59485: mov al, [rbp+var_21] test al, 1 jnz short loc_5948E jmp short loc_5949C loc_5948E: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_20], rax jmp short loc_5944C loc_5949C: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx pop rbp retn
long long my_lengthsp_mb2(long long a1, long long a2, long long a3) { bool v4; // [rsp+1h] [rbp-21h] unsigned long long i; // [rsp+2h] [rbp-20h] for ( i = a3 + a2; ; i -= 2LL ) { v4 = 0; if ( i > a2 + 1 ) { v4 = 0; if ( *(_BYTE *)(i - 1) == 32 ) v4 = *(_BYTE *)(i - 2) == 0; } if ( !v4 ) break; } return i - a2; }
my_lengthsp_mb2: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX LAB_0015944c: MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x1 XOR EAX,EAX CMP RCX,RDX MOV byte ptr [RBP + -0x21],AL JBE 0x00159485 MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + -0x1] XOR EAX,EAX CMP ECX,0x20 MOV byte ptr [RBP + -0x21],AL JNZ 0x00159485 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + -0x2] CMP EAX,0x0 SETZ AL MOV byte ptr [RBP + -0x21],AL LAB_00159485: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x0015948e JMP 0x0015949c LAB_0015948e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x2 MOV qword ptr [RBP + -0x20],RAX JMP 0x0015944c LAB_0015949c: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX POP RBP RET
long my_lengthsp_mb2(int8 param_1,long param_2,long param_3) { bool bVar1; int8 local_28; local_28 = param_2 + param_3; while( true ) { bVar1 = false; if ((param_2 + 1U < local_28) && (bVar1 = false, *(char *)(local_28 - 1) == ' ')) { bVar1 = *(char *)(local_28 - 2) == '\0'; } if (!bVar1) break; local_28 = local_28 - 2; } return local_28 - param_2; }
34,893
my_readlink
eloqsql/mysys/my_symlink.c
int my_readlink(char *to, const char *filename, myf MyFlags) { #ifndef HAVE_READLINK strmov(to,filename); return 1; #else int result=0; int length; DBUG_ENTER("my_readlink"); if ((length=readlink(filename, to, FN_REFLEN-1)) < 0) { /* Don't give an error if this wasn't a symlink */ if ((my_errno=errno) == EINVAL) { result= 1; strmov(to,filename); } else { if (MyFlags & MY_WME) my_error(EE_CANT_READLINK, MYF(0), filename, errno); result= -1; } } else to[length]=0; DBUG_PRINT("exit" ,("result: %d", result)); DBUG_RETURN(result); #endif /* HAVE_READLINK */ }
O0
c
my_readlink: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x362a0 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jge 0x7c991 callq 0x369e0 movl (%rax), %eax movl %eax, -0x24(%rbp) callq 0x7d4a0 movq %rax, %rcx movl -0x24(%rbp), %eax movl %eax, (%rcx) cmpl $0x16, %eax jne 0x7c957 movl $0x1, -0x1c(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x369c0 jmp 0x7c98f movq -0x18(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x7c988 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) callq 0x369e0 movq -0x30(%rbp), %rdx movl (%rax), %ecx movl $0x18, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x760a0 movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF jmp 0x7c99d movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx movb $0x0, (%rax,%rcx) jmp 0x7c99f jmp 0x7c9a1 jmp 0x7c9a3 movl -0x1c(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_readlink: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_8] mov edx, 1FFh call _readlink mov [rbp+var_20], eax cmp eax, 0 jge short loc_7C991 call ___errno_location mov eax, [rax] mov [rbp+var_24], eax call _my_thread_var mov rcx, rax mov eax, [rbp+var_24] mov [rcx], eax cmp eax, 16h jnz short loc_7C957 mov [rbp+var_1C], 1 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _stpcpy jmp short loc_7C98F loc_7C957: mov rax, [rbp+var_18] and rax, 10h cmp rax, 0 jz short loc_7C988 mov rax, [rbp+var_10] mov [rbp+var_30], rax call ___errno_location mov rdx, [rbp+var_30] mov ecx, [rax] mov edi, 18h xor eax, eax mov esi, eax mov al, 0 call my_error loc_7C988: mov [rbp+var_1C], 0FFFFFFFFh loc_7C98F: jmp short loc_7C99D loc_7C991: mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] mov byte ptr [rax+rcx], 0 loc_7C99D: jmp short $+2 loc_7C99F: jmp short $+2 loc_7C9A1: jmp short $+2 loc_7C9A3: mov eax, [rbp+var_1C] mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
long long my_readlink(long long a1, long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+1Ch] [rbp-24h] int v6; // [rsp+20h] [rbp-20h] unsigned int v7; // [rsp+24h] [rbp-1Ch] v7 = 0; v6 = readlink(a2, a1, 511LL); if ( v6 >= 0 ) { *(_BYTE *)(a1 + v6) = 0; } else { v5 = *(_DWORD *)__errno_location(a2); *(_DWORD *)my_thread_var() = v5; if ( v5 == 22 ) { v7 = 1; stpcpy(a1, a2); } else { if ( (a3 & 0x10) != 0 ) { v3 = (unsigned int *)__errno_location(a2); my_error(0x18u, 0LL, a2, *v3); } return (unsigned int)-1; } } return v7; }
my_readlink: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x8] MOV EDX,0x1ff CALL 0x001362a0 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JGE 0x0017c991 CALL 0x001369e0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX CALL 0x0017d4a0 MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RCX],EAX CMP EAX,0x16 JNZ 0x0017c957 MOV dword ptr [RBP + -0x1c],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001369c0 JMP 0x0017c98f LAB_0017c957: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x10 CMP RAX,0x0 JZ 0x0017c988 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CALL 0x001369e0 MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] MOV EDI,0x18 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x001760a0 LAB_0017c988: MOV dword ptr [RBP + -0x1c],0xffffffff LAB_0017c98f: JMP 0x0017c99d LAB_0017c991: MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] MOV byte ptr [RAX + RCX*0x1],0x0 LAB_0017c99d: JMP 0x0017c99f LAB_0017c99f: JMP 0x0017c9a1 LAB_0017c9a1: JMP 0x0017c9a3 LAB_0017c9a3: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
int4 my_readlink(char *param_1,char *param_2,ulong param_3) { int iVar1; ssize_t sVar2; int *piVar3; int4 local_24; local_24 = 0; sVar2 = readlink(param_2,param_1,0x1ff); if ((int)sVar2 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if (iVar1 == 0x16) { local_24 = 1; stpcpy(param_1,param_2); } else { if ((param_3 & 0x10) != 0) { piVar3 = __errno_location(); my_error(0x18,0,param_2,*piVar3); } local_24 = 0xffffffff; } } else { param_1[(int)sVar2] = '\0'; } return local_24; }
34,894
change_key_cache_param
eloqsql/mysys/mf_keycache.c
void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, uint age_threshold) { if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->change_param(keycache->keycache_cb, division_limit, age_threshold); pthread_mutex_unlock(&keycache->op_lock); } }
O3
c
change_key_cache_param: cmpb $0x0, 0x48(%rdi) je 0x5650b pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebx movl %esi, %r14d movq %rdi, %r15 leaq 0x58(%rdi), %r12 movq %r12, %rdi callq 0x28570 movq 0x8(%r15), %rdi movq 0x10(%r15), %rax movl %r14d, %esi movl %ebx, %edx callq *0x10(%rax) movq %r12, %rdi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x28280 retq
change_key_cache_param: cmp byte ptr [rdi+48h], 0 jz short locret_5650B push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov ebx, edx mov r14d, esi mov r15, rdi lea r12, [rdi+58h] mov rdi, r12 call _pthread_mutex_lock mov rdi, [r15+8] mov rax, [r15+10h] mov esi, r14d mov edx, ebx call qword ptr [rax+10h] mov rdi, r12 pop rbx pop r12 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock locret_5650B: retn
long long change_key_cache_param(long long a1, unsigned int a2, unsigned int a3) { long long result; // rax if ( *(_BYTE *)(a1 + 72) ) { pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 16LL))(*(_QWORD *)(a1 + 8), a2, a3); return pthread_mutex_unlock(a1 + 88); } return result; }
change_key_cache_param: CMP byte ptr [RDI + 0x48],0x0 JZ 0x0015650b PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14D,ESI MOV R15,RDI LEA R12,[RDI + 0x58] MOV RDI,R12 CALL 0x00128570 MOV RDI,qword ptr [R15 + 0x8] MOV RAX,qword ptr [R15 + 0x10] MOV ESI,R14D MOV EDX,EBX CALL qword ptr [RAX + 0x10] MOV RDI,R12 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00128280 LAB_0015650b: RET
void change_key_cache_param(long param_1,int4 param_2,int4 param_3) { if (*(char *)(param_1 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); (**(code **)(*(long *)(param_1 + 0x10) + 0x10))(*(int8 *)(param_1 + 8),param_2,param_3); pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); return; } return; }
34,895
my_rw_tryrdlock
eloqsql/mysys/thr_rwlock.c
int my_rw_tryrdlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if ((rwp->state < 0 ) || rwp->waiters) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state++; } pthread_mutex_unlock(&rwp->lock); return(res); }
O0
c
my_rw_tryrdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x28510 movq -0x8(%rbp), %rax cmpl $0x0, 0x88(%rax) jl 0x862cf movq -0x8(%rbp), %rax cmpl $0x0, 0x8c(%rax) je 0x862d8 movl $0x10, -0xc(%rbp) jmp 0x862f2 movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0x88(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x88(%rax) movq -0x8(%rbp), %rdi callq 0x28270 movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_rw_tryrdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] cmp dword ptr [rax+88h], 0 jl short loc_862CF mov rax, [rbp+var_8] cmp dword ptr [rax+8Ch], 0 jz short loc_862D8 loc_862CF: mov [rbp+var_C], 10h jmp short loc_862F2 loc_862D8: mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov ecx, [rax+88h] add ecx, 1 mov [rax+88h], ecx loc_862F2: mov rdi, [rbp+var_8] call _pthread_mutex_unlock mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long my_rw_tryrdlock(long long a1) { unsigned int v2; // [rsp+4h] [rbp-Ch] pthread_mutex_lock(a1); if ( *(int *)(a1 + 136) < 0 || *(_DWORD *)(a1 + 140) ) { v2 = 16; } else { v2 = 0; ++*(_DWORD *)(a1 + 136); } pthread_mutex_unlock(a1); return v2; }
my_rw_tryrdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00128510 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x88],0x0 JL 0x001862cf MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8c],0x0 JZ 0x001862d8 LAB_001862cf: MOV dword ptr [RBP + -0xc],0x10 JMP 0x001862f2 LAB_001862d8: MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x88] ADD ECX,0x1 MOV dword ptr [RAX + 0x88],ECX LAB_001862f2: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00128270 MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 my_rw_tryrdlock(pthread_mutex_t *param_1) { int4 local_14; pthread_mutex_lock(param_1); if ((*(int *)((long)param_1 + 0x88) < 0) || (*(int *)((long)param_1 + 0x8c) != 0)) { local_14 = 0x10; } else { local_14 = 0; *(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1; } pthread_mutex_unlock(param_1); return local_14; }
34,896
my_rw_tryrdlock
eloqsql/mysys/thr_rwlock.c
int my_rw_tryrdlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if ((rwp->state < 0 ) || rwp->waiters) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state++; } pthread_mutex_unlock(&rwp->lock); return(res); }
O3
c
my_rw_tryrdlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x28560 movl 0x88(%rbx), %eax movl $0x10, %r14d testl %eax, %eax js 0x5e7a1 cmpl $0x0, 0x8c(%rbx) jne 0x5e7a1 incl %eax movl %eax, 0x88(%rbx) xorl %r14d, %r14d movq %rbx, %rdi callq 0x28270 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_tryrdlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov eax, [rbx+88h] mov r14d, 10h test eax, eax js short loc_5E7A1 cmp dword ptr [rbx+8Ch], 0 jnz short loc_5E7A1 inc eax mov [rbx+88h], eax xor r14d, r14d loc_5E7A1: mov rdi, rbx call _pthread_mutex_unlock mov eax, r14d pop rbx pop r14 pop rbp retn
long long my_rw_tryrdlock(long long a1) { int v1; // eax unsigned int v2; // r14d pthread_mutex_lock(a1); v1 = *(_DWORD *)(a1 + 136); v2 = 16; if ( v1 >= 0 && !*(_DWORD *)(a1 + 140) ) { *(_DWORD *)(a1 + 136) = v1 + 1; v2 = 0; } pthread_mutex_unlock(a1); return v2; }
my_rw_tryrdlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x00128560 MOV EAX,dword ptr [RBX + 0x88] MOV R14D,0x10 TEST EAX,EAX JS 0x0015e7a1 CMP dword ptr [RBX + 0x8c],0x0 JNZ 0x0015e7a1 INC EAX MOV dword ptr [RBX + 0x88],EAX XOR R14D,R14D LAB_0015e7a1: MOV RDI,RBX CALL 0x00128270 MOV EAX,R14D POP RBX POP R14 POP RBP RET
int8 my_rw_tryrdlock(pthread_mutex_t *param_1) { int8 uVar1; pthread_mutex_lock(param_1); uVar1 = 0x10; if ((-1 < *(int *)((long)param_1 + 0x88)) && (*(int *)((long)param_1 + 0x8c) == 0)) { *(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1; uVar1 = 0; } pthread_mutex_unlock(param_1); return uVar1; }
34,897
nlohmann::json_abi_v3_11_3::detail::parser<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>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parser<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>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) leaq 0xa41df(%rip), %rsi # 0x11df08 leaq 0xa41e5(%rip), %rdx # 0x11df15 callq 0x2a262 movq 0x8(%r15), %rsi testq %rsi, %rsi je 0x79dbc leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) addq $0xf, %rsi leaq 0x8(%rsp), %rdi callq 0x20e80 leaq 0xa41ad(%rip), %rsi # 0x11df16 leaq 0x8(%rsp), %rdi callq 0x20ba0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x20590 leaq 0x8(%rsp), %rdi movl $0x20, %esi callq 0x21410 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x20590 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x79dbc movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 leaq 0xa4162(%rip), %rsi # 0x11df25 movq %rbx, %rdi callq 0x20ba0 movl 0x20(%r14), %edi cmpl $0xe, %edi jne 0x79e5f movq 0x98(%r14), %rax addq $0x28, %r14 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x79a46 leaq 0x2f(%rsp), %r8 movb $0x27, (%r8) leaq 0xa4123(%rip), %rdx # 0x11df28 leaq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x38(%rsp), %rcx callq 0x7fd42 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x20590 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x79e46 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x79ed9 movq 0x48(%rsp), %rsi jmp 0x79ed1 callq 0x7fe04 movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x206b0 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x20e80 leaq 0xa409e(%rip), %rsi # 0x11df37 leaq 0x8(%rsp), %rdi callq 0x20ba0 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x20ba0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x20590 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x79ed9 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 testl %ebp, %ebp je 0x79f59 movl %ebp, %edi callq 0x7fe04 movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x206b0 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x20e80 leaq 0xa402a(%rip), %rsi # 0x11df43 leaq 0x8(%rsp), %rdi callq 0x20ba0 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x20ba0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x20590 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x79f59 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x79fb2 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x79f90 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 jmp 0x79f90 movq %rax, %r14 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x79fdb movq 0x48(%rsp), %rsi jmp 0x79fd3 jmp 0x79fab jmp 0x79fb2 jmp 0x79fc1 movq %rax, %r14 jmp 0x79fdb jmp 0x79fb2 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi jne 0x79fce jmp 0x79fdb movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x79fdb movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 movq (%rbx), %rdi cmpq %r12, %rdi je 0x79fef movq (%r12), %rsi incq %rsi callq 0x20180 movq %r14, %rdi callq 0x20b50 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rcx mov ebp, edx mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 lea rsi, aSyntaxError; "syntax error " lea rdx, aSyntaxError+0Dh; "" 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, [r15+8] test rsi, rsi jz short loc_79DBC lea r13, [rsp+88h+var_70] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 add rsi, 0Fh lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aWhileParsing; "while parsing " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) lea rdi, [rsp+88h+var_80] mov esi, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r13 jz short loc_79DBC mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79DBC: lea rsi, asc_11DF25; "- " mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov edi, [r14+20h] cmp edi, 0Eh jnz loc_79E5F mov rax, [r14+98h] add r14, 28h ; '(' mov [rsp+88h+var_58], rax lea rdi, [rsp+88h+var_50] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_token_string(void) lea r8, [rsp+88h+var_59] mov byte ptr [r8], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_58] lea rcx, [rsp+88h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_79E46 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79E46: lea rax, [rsp+88h+var_40] mov rdi, [rax-10h] cmp rdi, rax jz loc_79ED9 mov rsi, [rsp+88h+var_40] jmp short loc_79ED1 loc_79E5F: call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_79ED9 mov rsi, [rsp+88h+var_70] loc_79ED1: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79ED9: test ebp, ebp jz short loc_79F59 mov edi, ebp call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aExpected; "; expected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_79F59 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79F59: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_79FB2 mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_79F90 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_79F90 mov r14, rax loc_79F90: lea rax, [rsp+arg_40] mov rdi, [rax-10h] cmp rdi, rax jz short loc_79FDB mov rsi, [rsp+arg_40] jmp short loc_79FD3 jmp short loc_79FAB jmp short loc_79FB2 jmp short loc_79FC1 loc_79FAB: mov r14, rax jmp short loc_79FDB jmp short $+2 loc_79FB2: mov r14, rax mov rdi, [rsp+arg_0] cmp rdi, r15 jnz short loc_79FCE jmp short loc_79FDB loc_79FC1: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_79FDB loc_79FCE: mov rsi, [rsp+arg_10] loc_79FD3: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79FDB: mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_79FEF mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79FEF: mov rdi, r14 call __Unwind_Resume
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::exception_message( _QWORD *a1, long long a2, unsigned int a3, _QWORD *a4) { long long v8; // rsi void *v9; // rdi long long v10; // rsi long long v11; // r14 long long v12; // rax long long v13; // r14 long long v14; // rax void *v16; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] _QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF char v19; // [rsp+2Fh] [rbp-59h] BYREF long long v20; // [rsp+30h] [rbp-58h] BYREF _QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF long long v22; // [rsp+48h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "syntax error ", (long long)""); v8 = a4[1]; if ( v8 ) { v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; std::string::reserve(&v16, v8 + 15); std::string::append(&v16, "while parsing "); std::string::append(&v16, *a4, a4[1]); std::string::push_back(&v16, 32LL); std::string::append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } std::string::append(a1, "- "); if ( *(_DWORD *)(a2 + 32) == 14 ) { v20 = *(_QWORD *)(a2 + 152); nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_token_string( (long long)v21, a2 + 40); v19 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( &v16, &v20, "; last read: '", v21, &v19); std::string::append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); v9 = (void *)v21[0]; if ( (long long *)v21[0] != &v22 ) { v10 = v22; LABEL_11: operator delete(v9, v10 + 1); } } else { v11 = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name)(); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v12 = strlen(v11); std::string::reserve(&v16, v12 + 11); std::string::append(&v16, "unexpected "); std::string::append(&v16, v11); std::string::append(a1, v16, v17); v9 = v16; if ( v16 != v18 ) { v10 = v18[0]; goto LABEL_11; } } if ( a3 ) { v13 = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(a3); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v14 = strlen(v13); std::string::reserve(&v16, v14 + 11); std::string::append(&v16, "; expected "); std::string::append(&v16, v13); std::string::append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } return a1; }
exception_message: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RCX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 LEA RSI,[0x21df08] LEA RDX,[0x21df15] CALL 0x0012a262 MOV RSI,qword ptr [R15 + 0x8] TEST RSI,RSI JZ 0x00179dbc LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 ADD RSI,0xf LAB_00179d58: LEA RDI,[RSP + 0x8] CALL 0x00120e80 LEA RSI,[0x21df16] LEA RDI,[RSP + 0x8] CALL 0x00120ba0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x00120590 LEA RDI,[RSP + 0x8] MOV ESI,0x20 CALL 0x00121410 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00179d9d: MOV RDI,RBX CALL 0x00120590 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00179dbc MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120180 LAB_00179dbc: LEA RSI,[0x21df25] MOV RDI,RBX CALL 0x00120ba0 MOV EDI,dword ptr [R14 + 0x20] CMP EDI,0xe JNZ 0x00179e5f MOV RAX,qword ptr [R14 + 0x98] ADD R14,0x28 MOV qword ptr [RSP + 0x30],RAX LAB_00179de8: LEA RDI,[RSP + 0x38] MOV RSI,R14 CALL 0x00179a46 LEA R8,[RSP + 0x2f] MOV byte ptr [R8],0x27 LAB_00179dfe: LEA RDX,[0x21df28] LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x30] LEA RCX,[RSP + 0x38] CALL 0x0017fd42 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00179e23: MOV RDI,RBX CALL 0x00120590 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00179e46 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120180 LAB_00179e46: LEA RAX,[RSP + 0x48] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00179ed9 MOV RSI,qword ptr [RSP + 0x48] JMP 0x00179ed1 LAB_00179e5f: CALL 0x0017fe04 MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x001206b0 LEA RSI,[RAX + 0xb] LAB_00179e88: LEA RDI,[RSP + 0x8] CALL 0x00120e80 LEA RSI,[0x21df37] LEA RDI,[RSP + 0x8] CALL 0x00120ba0 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00120ba0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00179eba: MOV RDI,RBX CALL 0x00120590 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00179ed9 MOV RSI,qword ptr [RSP + 0x18] LAB_00179ed1: INC RSI CALL 0x00120180 LAB_00179ed9: TEST EBP,EBP JZ 0x00179f59 MOV EDI,EBP CALL 0x0017fe04 MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x001206b0 LEA RSI,[RAX + 0xb] LAB_00179f08: LEA RDI,[RSP + 0x8] CALL 0x00120e80 LEA RSI,[0x21df43] LEA RDI,[RSP + 0x8] CALL 0x00120ba0 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00120ba0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00179f3a: MOV RDI,RBX CALL 0x00120590 LAB_00179f42: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00179f59 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120180 LAB_00179f59: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<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>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type, std::__cxx11::string const&) */ long * nlohmann::json_abi_v3_11_3::detail:: parser<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::exception_message(long *param_1,long param_2,int param_3,ulong *param_4) { char *pcVar1; long *local_80; int8 local_78; int1 local_70; int7 uStack_6f; int1 local_59; int8 local_58; long *local_50 [2]; long local_40 [2]; *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ",""); if (param_4[1] != 0) { local_78 = 0; local_70 = 0; /* try { // try from 00179d58 to 00179d92 has its CatchHandler @ 00179fc1 */ local_80 = (long *)&local_70; std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80,*param_4); std::__cxx11::string::push_back((char)&local_80); /* try { // try from 00179d9d to 00179da4 has its CatchHandler @ 00179fa9 */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } /* try { // try from 00179dbc to 00179dca has its CatchHandler @ 00179fab */ std::__cxx11::string::append((char *)param_1); if (*(int *)(param_2 + 0x20) == 0xe) { local_58 = *(int8 *)(param_2 + 0x98); /* try { // try from 00179de8 to 00179df4 has its CatchHandler @ 00179fa5 */ lexer<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>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::get_token_string(); local_59 = 0x27; /* try { // try from 00179dfe to 00179e18 has its CatchHandler @ 00179f8d */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> ((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50); /* try { // try from 00179e23 to 00179e2a has its CatchHandler @ 00179f6d */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } if (local_50[0] == local_40) goto LAB_00179ed9; } else { pcVar1 = (char *)lexer_base<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>> ::token_type_name(); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 00179e88 to 00179eaf has its CatchHandler @ 00179fb0 */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 00179eba to 00179ec1 has its CatchHandler @ 00179f6b */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 == (long *)&local_70) goto LAB_00179ed9; local_40[0] = CONCAT71(uStack_6f,local_70); local_50[0] = local_80; } operator_delete(local_50[0],local_40[0] + 1); LAB_00179ed9: if (param_3 != 0) { pcVar1 = (char *)lexer_base<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>> ::token_type_name(param_3); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 00179f08 to 00179f2f has its CatchHandler @ 00179fb2 */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 00179f3a to 00179f41 has its CatchHandler @ 00179fa7 */ std::__cxx11::string::append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } return param_1; }
34,898
translog_write_parts_on_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_parts_on_page(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor, translog_size_t length, struct st_translog_parts *parts) { translog_size_t left= length; uint cur= (uint) parts->current; DBUG_ENTER("translog_write_parts_on_page"); DBUG_PRINT("enter", ("Chunk length: %lu parts: %u of %u. Page size: %u " "Buffer size: %lu (%lu)", (ulong) length, (uint) (cur + 1), (uint) parts->elements, (uint) cursor->current_page_fill, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer))); DBUG_ASSERT(length > 0); DBUG_ASSERT(length + cursor->current_page_fill <= TRANSLOG_PAGE_SIZE); DBUG_ASSERT(length + cursor->ptr <= cursor->buffer->buffer + TRANSLOG_WRITE_BUFFER); do { translog_size_t len; LEX_CUSTRING *part; const uchar *buff; DBUG_ASSERT(cur < parts->elements); part= parts->parts + cur; buff= part->str; DBUG_PRINT("info", ("Part: %u Length: %lu left: %lu buff: %p", (uint) (cur + 1), (ulong) part->length, (ulong) left, buff)); if (part->length > left) { /* we should write less then the current part */ len= left; part->length-= len; part->str+= len; DBUG_PRINT("info", ("Set new part: %u Length: %lu", (uint) (cur + 1), (ulong) part->length)); } else { len= (translog_size_t) part->length; cur++; DBUG_PRINT("info", ("moved to next part (len: %lu)", (ulong) len)); } DBUG_PRINT("info", ("copy: %p <- %p %u", cursor->ptr, buff, len)); if (likely(len)) { memcpy(cursor->ptr, buff, len); left-= len; cursor->ptr+= len; } } while (left); DBUG_PRINT("info", ("Horizon: " LSN_FMT " Length %u(0x%x)", LSN_IN_PARTS(*horizon), length, length)); parts->current= cur; (*horizon)+= length; /* offset increasing */ cursor->current_page_fill+= length; if (!cursor->chaser) cursor->buffer->size+= length; /* We do not not updating parts->total_record_length here because it is need only before writing record to have total length */ DBUG_PRINT("info", ("Write parts buffer #%u: %p " "chaser: %d Size: %lu (%lu) " "Horizon: " LSN_FMT " buff offset: 0x%x", (uint) cursor->buffer->buffer_no, cursor->buffer, cursor->chaser, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer), LSN_IN_PARTS(*horizon), (uint) (LSN_OFFSET(cursor->buffer->offset) + cursor->buffer->size))); translog_check_cursor(cursor); DBUG_RETURN(0); }
O0
c
translog_write_parts_on_page: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x20(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x28(%rbp) jmp 0x5c969 jmp 0x5c96b jmp 0x5c96d jmp 0x5c96f jmp 0x5c971 jmp 0x5c973 jmp 0x5c975 jmp 0x5c977 jmp 0x5c979 jmp 0x5c97b movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movl -0x28(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) jmp 0x5c99e movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movl -0x24(%rbp), %ecx cmpq %rcx, %rax jbe 0x5c9de movl -0x24(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, %edx movq -0x38(%rbp), %rax movq 0x8(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x8(%rax) movl -0x2c(%rbp), %edx movq -0x38(%rbp), %rax movq (%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, (%rax) jmp 0x5c9dc jmp 0x5c9f6 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x2c(%rbp) movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x5c9f4 jmp 0x5c9f6 jmp 0x5c9f8 jmp 0x5c9fa cmpl $0x0, -0x2c(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x5ca43 movq -0x10(%rbp), %rax movq 0x20(%rax), %rdi movq -0x40(%rbp), %rsi movl -0x2c(%rbp), %eax movl %eax, %edx callq 0x2a090 movl -0x2c(%rbp), %ecx movl -0x24(%rbp), %eax subl %ecx, %eax movl %eax, -0x24(%rbp) movl -0x2c(%rbp), %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, 0x20(%rax) jmp 0x5ca45 cmpl $0x0, -0x24(%rbp) jne 0x5c977 jmp 0x5ca51 jmp 0x5ca53 movl -0x28(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movl -0x14(%rbp), %eax movl %eax, %ecx movq -0x8(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) movl -0x14(%rbp), %edx movq -0x10(%rbp), %rax movzwl 0x30(%rax), %ecx addl %edx, %ecx movw %cx, 0x30(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x37(%rax) jne 0x5ca9e movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movq 0x28(%rax), %rax addl 0x100030(%rax), %ecx movl %ecx, 0x100030(%rax) jmp 0x5caa0 jmp 0x5caa2 movq -0x10(%rbp), %rdi callq 0x53d60 jmp 0x5caad xorl %eax, %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_write_parts_on_page: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov eax, [rbp+var_14] mov [rbp+var_24], eax mov rax, [rbp+var_20] mov eax, [rax+8] mov [rbp+var_28], eax jmp short $+2 loc_5C969: jmp short $+2 loc_5C96B: jmp short $+2 loc_5C96D: jmp short $+2 loc_5C96F: jmp short $+2 loc_5C971: jmp short $+2 loc_5C973: jmp short $+2 loc_5C975: jmp short $+2 loc_5C977: jmp short $+2 loc_5C979: jmp short $+2 loc_5C97B: mov rax, [rbp+var_20] mov rax, [rax+10h] mov ecx, [rbp+var_28] shl rcx, 4 add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_40], rax jmp short $+2 loc_5C99E: mov rax, [rbp+var_38] mov rax, [rax+8] mov ecx, [rbp+var_24] cmp rax, rcx jbe short loc_5C9DE mov eax, [rbp+var_24] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov edx, eax mov rax, [rbp+var_38] mov rcx, [rax+8] sub rcx, rdx mov [rax+8], rcx mov edx, [rbp+var_2C] mov rax, [rbp+var_38] mov rcx, [rax] mov edx, edx add rcx, rdx mov [rax], rcx jmp short $+2 loc_5C9DC: jmp short loc_5C9F6 loc_5C9DE: mov rax, [rbp+var_38] mov rax, [rax+8] mov [rbp+var_2C], eax mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short $+2 loc_5C9F4: jmp short $+2 loc_5C9F6: jmp short $+2 loc_5C9F8: jmp short $+2 loc_5C9FA: cmp [rbp+var_2C], 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_5CA43 mov rax, [rbp+var_10] mov rdi, [rax+20h] mov rsi, [rbp+var_40] mov eax, [rbp+var_2C] mov edx, eax call _memcpy mov ecx, [rbp+var_2C] mov eax, [rbp+var_24] sub eax, ecx mov [rbp+var_24], eax mov edx, [rbp+var_2C] mov rax, [rbp+var_10] mov rcx, [rax+20h] mov edx, edx add rcx, rdx mov [rax+20h], rcx loc_5CA43: jmp short $+2 loc_5CA45: cmp [rbp+var_24], 0 jnz loc_5C977 jmp short $+2 loc_5CA51: jmp short $+2 loc_5CA53: mov ecx, [rbp+var_28] mov rax, [rbp+var_20] mov [rax+8], ecx mov eax, [rbp+var_14] mov ecx, eax mov rax, [rbp+var_8] add rcx, [rax] mov [rax], rcx mov edx, [rbp+var_14] mov rax, [rbp+var_10] movzx ecx, word ptr [rax+30h] add ecx, edx mov [rax+30h], cx mov rax, [rbp+var_10] cmp byte ptr [rax+37h], 0 jnz short loc_5CA9E mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov rax, [rax+28h] add ecx, dword ptr ds:safe_hash_change[rax] mov dword ptr ds:safe_hash_change[rax], ecx loc_5CA9E: jmp short $+2 loc_5CAA0: jmp short $+2 loc_5CAA2: mov rdi, [rbp+var_10] call translog_check_cursor jmp short $+2 loc_5CAAD: xor eax, eax add rsp, 40h pop rbp retn
long long translog_write_parts_on_page(_QWORD *a1, long long a2, unsigned int a3, long long a4) { long long v5; // [rsp+0h] [rbp-40h] long long *v6; // [rsp+8h] [rbp-38h] unsigned int v7; // [rsp+14h] [rbp-2Ch] unsigned int v8; // [rsp+18h] [rbp-28h] unsigned int v9; // [rsp+1Ch] [rbp-24h] v9 = a3; v8 = *(_DWORD *)(a4 + 8); do { v6 = (long long *)(16LL * v8 + *(_QWORD *)(a4 + 16)); v5 = *v6; if ( v6[1] <= (unsigned long long)v9 ) { v7 = v6[1]; ++v8; } else { v7 = v9; v6[1] -= v9; *v6 += v9; } if ( v7 ) { memcpy(*(_QWORD *)(a2 + 32), v5, v7); v9 -= v7; *(_QWORD *)(a2 + 32) += v7; } } while ( v9 ); *(_DWORD *)(a4 + 8) = v8; *a1 += a3; *(_WORD *)(a2 + 48) += a3; if ( !*(_BYTE *)(a2 + 55) ) *(_DWORD *)((char *)safe_hash_change + *(_QWORD *)(a2 + 40)) += a3; translog_check_cursor(); return 0LL; }
translog_write_parts_on_page: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x28],EAX JMP 0x0015c969 LAB_0015c969: JMP 0x0015c96b LAB_0015c96b: JMP 0x0015c96d LAB_0015c96d: JMP 0x0015c96f LAB_0015c96f: JMP 0x0015c971 LAB_0015c971: JMP 0x0015c973 LAB_0015c973: JMP 0x0015c975 LAB_0015c975: JMP 0x0015c977 LAB_0015c977: JMP 0x0015c979 LAB_0015c979: JMP 0x0015c97b LAB_0015c97b: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RBP + -0x28] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX JMP 0x0015c99e LAB_0015c99e: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x24] CMP RAX,RCX JBE 0x0015c9de MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x8] SUB RCX,RDX MOV qword ptr [RAX + 0x8],RCX MOV EDX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX],RCX JMP 0x0015c9dc LAB_0015c9dc: JMP 0x0015c9f6 LAB_0015c9de: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x0015c9f4 LAB_0015c9f4: JMP 0x0015c9f6 LAB_0015c9f6: JMP 0x0015c9f8 LAB_0015c9f8: JMP 0x0015c9fa LAB_0015c9fa: CMP dword ptr [RBP + -0x2c],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0015ca43 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX CALL 0x0012a090 MOV ECX,dword ptr [RBP + -0x2c] MOV EAX,dword ptr [RBP + -0x24] SUB EAX,ECX MOV dword ptr [RBP + -0x24],EAX MOV EDX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x20],RCX LAB_0015ca43: JMP 0x0015ca45 LAB_0015ca45: CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0015c977 JMP 0x0015ca51 LAB_0015ca51: JMP 0x0015ca53 LAB_0015ca53: MOV ECX,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV EAX,dword ptr [RBP + -0x14] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV EDX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX + 0x30] ADD ECX,EDX MOV word ptr [RAX + 0x30],CX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x37],0x0 JNZ 0x0015ca9e MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] ADD ECX,dword ptr [RAX + 0x100030] MOV dword ptr [RAX + 0x100030],ECX LAB_0015ca9e: JMP 0x0015caa0 LAB_0015caa0: JMP 0x0015caa2 LAB_0015caa2: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00153d60 JMP 0x0015caad LAB_0015caad: XOR EAX,EAX ADD RSP,0x40 POP RBP RET
int8 translog_write_parts_on_page(long *param_1,long param_2,uint param_3,long param_4) { void *__src; long *plVar1; uint local_34; uint local_30; uint local_2c; local_30 = *(uint *)(param_4 + 8); local_2c = param_3; do { plVar1 = (long *)(*(long *)(param_4 + 0x10) + (ulong)local_30 * 0x10); __src = (void *)*plVar1; if ((ulong)local_2c < (ulong)plVar1[1]) { local_34 = local_2c; plVar1[1] = plVar1[1] - (ulong)local_2c; *plVar1 = *plVar1 + (ulong)local_2c; } else { local_34 = (uint)plVar1[1]; local_30 = local_30 + 1; } if (local_34 != 0) { memcpy(*(void **)(param_2 + 0x20),__src,(ulong)local_34); local_2c = local_2c - local_34; *(ulong *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + (ulong)local_34; } } while (local_2c != 0); *(uint *)(param_4 + 8) = local_30; *param_1 = (ulong)param_3 + *param_1; *(short *)(param_2 + 0x30) = *(short *)(param_2 + 0x30) + (short)param_3; if (*(char *)(param_2 + 0x37) == '\0') { *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) = param_3 + *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27); } translog_check_cursor(param_2); return 0; }
34,899
common_set_adapter_lora(llama_context*, std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info>>&)
monkey531[P]llama/common/common.cpp
void common_set_adapter_lora(struct llama_context * ctx, std::vector<common_adapter_lora_info> & lora) { llama_clear_adapter_lora(ctx); for (auto & la : lora) { if (la.scale != 0.0f) { llama_set_adapter_lora(ctx, la.ptr, la.scale); } } }
O3
cpp
common_set_adapter_lora(llama_context*, std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info>>&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx callq 0x1b970 movq (%r14), %r15 movq 0x8(%r14), %r14 cmpq %r14, %r15 je 0x7537d movss 0x20(%r15), %xmm0 ucomiss 0x7b391(%rip), %xmm0 # 0xf06f8 jne 0x7536b jnp 0x75377 movq 0x28(%r15), %rsi movq %rbx, %rdi callq 0x1b950 addq $0x30, %r15 jmp 0x75355 popq %rbx popq %r14 popq %r15 retq
_Z23common_set_adapter_loraP13llama_contextRSt6vectorI24common_adapter_lora_infoSaIS2_EE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi call _llama_clear_adapter_lora mov r15, [r14] mov r14, [r14+8] loc_75355: cmp r15, r14 jz short loc_7537D movss xmm0, dword ptr [r15+20h] ucomiss xmm0, cs:dword_F06F8 jnz short loc_7536B jnp short loc_75377 loc_7536B: mov rsi, [r15+28h] mov rdi, rbx call _llama_set_adapter_lora loc_75377: add r15, 30h ; '0' jmp short loc_75355 loc_7537D: pop rbx pop r14 pop r15 retn
long long common_set_adapter_lora(long long a1, long long *a2) { long long result; // rax long long v3; // r15 long long v4; // r14 result = llama_clear_adapter_lora(); v3 = *a2; v4 = a2[1]; while ( v3 != v4 ) { if ( *(float *)(v3 + 32) != 0.0 ) result = llama_set_adapter_lora(a1, *(_QWORD *)(v3 + 40)); v3 += 48LL; } return result; }
common_set_adapter_lora: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI CALL 0x0011b970 MOV R15,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] LAB_00175355: CMP R15,R14 JZ 0x0017537d MOVSS XMM0,dword ptr [R15 + 0x20] UCOMISS XMM0,dword ptr [0x001f06f8] JNZ 0x0017536b JNP 0x00175377 LAB_0017536b: MOV RSI,qword ptr [R15 + 0x28] MOV RDI,RBX CALL 0x0011b950 LAB_00175377: ADD R15,0x30 JMP 0x00175355 LAB_0017537d: POP RBX POP R14 POP R15 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* common_set_adapter_lora(llama_context*, std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info> >&) */ void common_set_adapter_lora(llama_context *param_1,vector *param_2) { long lVar1; long lVar2; llama_clear_adapter_lora(); lVar1 = *(long *)(param_2 + 8); for (lVar2 = *(long *)param_2; lVar2 != lVar1; lVar2 = lVar2 + 0x30) { if ((*(float *)(lVar2 + 0x20) != _DAT_001f06f8) || (NAN(*(float *)(lVar2 + 0x20)) || NAN(_DAT_001f06f8))) { llama_set_adapter_lora(param_1,*(int8 *)(lVar2 + 0x28)); } } return; }